Logs on 2023-07-18 (liberachat/#haskell)
| 00:03:24 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 00:12:59 | × | machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Quit: Lost terminal) |
| 00:13:46 | × | chiselfuse quits (~chiselfus@user/chiselfuse) (Remote host closed the connection) |
| 00:14:21 | → | califax joins (~califax@user/califx) |
| 00:14:28 | → | chiselfuse joins (~chiselfus@user/chiselfuse) |
| 00:17:15 | → | alexbiehl joins (~alexbiehl@2a02:8108:323f:c964:c8b9:341:c65c:41d0) |
| 00:19:14 | → | machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net) |
| 00:19:31 | → | ru0mad joins (~ru0mad@82-64-17-144.subs.proxad.net) |
| 00:21:03 | → | califax_ joins (~califax@user/califx) |
| 00:21:41 | × | alexbiehl quits (~alexbiehl@2a02:8108:323f:c964:c8b9:341:c65c:41d0) (Ping timeout: 258 seconds) |
| 00:22:51 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 00:22:52 | califax_ | is now known as califax |
| 00:23:51 | × | gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 4.0.1) |
| 00:24:35 | × | machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 264 seconds) |
| 00:25:45 | × | Inst__ quits (~Inst@2601:6c4:4081:2fc0:79c8:42a5:37ad:5ebf) (Remote host closed the connection) |
| 00:26:04 | → | machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net) |
| 00:26:09 | → | Inst__ joins (~Inst@2601:6c4:4081:2fc0:79c8:42a5:37ad:5ebf) |
| 00:26:44 | × | ru0mad quits (~ru0mad@82-64-17-144.subs.proxad.net) (Quit: leaving) |
| 00:27:52 | → | ru0mad joins (~ru0mad@82-64-17-144.subs.proxad.net) |
| 00:31:11 | × | mechap quits (~mechap@user/mechap) (Ping timeout: 246 seconds) |
| 00:31:39 | → | leungbk joins (~user@2603-8000-1201-2dd2-36ab-a543-68a1-6b50.res6.spectrum.com) |
| 00:32:09 | → | mechap joins (~mechap@user/mechap) |
| 00:36:22 | → | nyc joins (~nyc@user/nyc) |
| 00:36:55 | × | picklejuice quits (~root@172.56.218.140) (Ping timeout: 240 seconds) |
| 00:38:38 | → | picklejuice joins (~root@172.56.220.204) |
| 00:42:02 | × | infinity0 quits (~infinity0@pwned.gg) (Ping timeout: 245 seconds) |
| 00:43:33 | → | infinity0 joins (~infinity0@pwned.gg) |
| 00:43:35 | × | Inst__ quits (~Inst@2601:6c4:4081:2fc0:79c8:42a5:37ad:5ebf) (Remote host closed the connection) |
| 00:43:38 | × | mechap quits (~mechap@user/mechap) (Ping timeout: 260 seconds) |
| 00:44:33 | → | pickleju1ce joins (~root@c-73-196-164-60.hsd1.nj.comcast.net) |
| 00:45:25 | → | Inst__ joins (~Inst@2601:6c4:4081:2fc0:79c8:42a5:37ad:5ebf) |
| 00:45:27 | → | mechap joins (~mechap@user/mechap) |
| 00:47:05 | → | eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) |
| 00:47:47 | × | infinity0 quits (~infinity0@pwned.gg) (Remote host closed the connection) |
| 00:47:56 | × | thegeekinside quits (~thegeekin@189.217.90.138) (Ping timeout: 272 seconds) |
| 00:48:08 | × | picklejuice quits (~root@172.56.220.204) (Ping timeout: 246 seconds) |
| 00:50:42 | → | thegeekinside joins (~thegeekin@189.217.90.138) |
| 00:51:14 | → | infinity0 joins (~infinity0@pwned.gg) |
| 00:51:17 | × | eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 246 seconds) |
| 00:59:12 | × | Inst__ quits (~Inst@2601:6c4:4081:2fc0:79c8:42a5:37ad:5ebf) (Remote host closed the connection) |
| 00:59:15 | → | wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com) |
| 00:59:15 | × | wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
| 00:59:15 | → | wroathe joins (~wroathe@user/wroathe) |
| 00:59:55 | × | emmanuelux quits (~emmanuelu@user/emmanuelux) (Quit: au revoir) |
| 01:00:12 | → | arahael_ joins (~arahael@1.145.35.206) |
| 01:01:17 | × | infinity0 quits (~infinity0@pwned.gg) (Remote host closed the connection) |
| 01:01:22 | → | Inst__ joins (~Inst@2601:6c4:4081:2fc0:79c8:42a5:37ad:5ebf) |
| 01:02:00 | → | alexbiehl joins (~alexbiehl@2a02:8108:323f:c964:c8b9:341:c65c:41d0) |
| 01:03:23 | → | infinity0 joins (~infinity0@pwned.gg) |
| 01:05:34 | × | arizona quits (~arizona@bcdcac82.skybroadband.com) (Ping timeout: 260 seconds) |
| 01:06:16 | × | arahael_ quits (~arahael@1.145.35.206) (Ping timeout: 245 seconds) |
| 01:06:30 | × | alexbiehl quits (~alexbiehl@2a02:8108:323f:c964:c8b9:341:c65c:41d0) (Ping timeout: 260 seconds) |
| 01:08:15 | → | razetime joins (~quassel@117.193.5.43) |
| 01:10:04 | → | bilegeek joins (~bilegeek@2600:1008:b021:9e23:6101:8bf4:489c:4627) |
| 01:10:43 | → | arizona joins (~arizona@bcdcac82.skybroadband.com) |
| 01:10:57 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 01:11:58 | × | Inst__ quits (~Inst@2601:6c4:4081:2fc0:79c8:42a5:37ad:5ebf) (Remote host closed the connection) |
| 01:17:04 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 01:17:27 | → | Inst joins (~Inst@2601:6c4:4081:2fc0:79c8:42a5:37ad:5ebf) |
| 01:18:27 | → | dibblego joins (~dibblego@116-255-1-151.ip4.superloop.au) |
| 01:18:27 | × | dibblego quits (~dibblego@116-255-1-151.ip4.superloop.au) (Changing host) |
| 01:18:27 | → | dibblego joins (~dibblego@haskell/developer/dibblego) |
| 01:21:35 | × | shapr quits (~user@2600:1700:c640:3100:52c3:290a:8adb:cc55) (Ping timeout: 246 seconds) |
| 01:26:39 | × | Inst quits (~Inst@2601:6c4:4081:2fc0:79c8:42a5:37ad:5ebf) (Remote host closed the connection) |
| 01:28:42 | → | Inst joins (~Inst@2601:6c4:4081:2fc0:79c8:42a5:37ad:5ebf) |
| 01:32:41 | → | alexbiehl joins (~alexbiehl@2a02:8108:323f:c964:c8b9:341:c65c:41d0) |
| 01:32:45 | × | tabemann quits (~tabemann@2600:1700:7990:24e0:fde3:7ca7:a0b6:2269) (Remote host closed the connection) |
| 01:32:56 | → | tabemann joins (~travisb@2600:1700:7990:24e0:5306:cf38:acd1:737c) |
| 01:32:56 | × | ft quits (~ft@p508dbe50.dip0.t-ipconnect.de) (Ping timeout: 246 seconds) |
| 01:34:58 | → | ft joins (~ft@p3e9bc856.dip0.t-ipconnect.de) |
| 01:39:07 | × | alexbiehl quits (~alexbiehl@2a02:8108:323f:c964:c8b9:341:c65c:41d0) (Ping timeout: 245 seconds) |
| 01:41:54 | × | Guest585 quits (~mike@user/feetwind) (Quit: WeeChat 3.1) |
| 01:42:05 | → | feetwind joins (~mike@user/feetwind) |
| 01:43:12 | × | Inst quits (~Inst@2601:6c4:4081:2fc0:79c8:42a5:37ad:5ebf) (Remote host closed the connection) |
| 01:43:34 | → | Inst joins (~Inst@2601:6c4:4081:2fc0:79c8:42a5:37ad:5ebf) |
| 01:44:44 | × | Feuermagier quits (~Feuermagi@user/feuermagier) (Quit: Leaving) |
| 01:55:24 | [itchyjunk] | is now known as [notItchy] |
| 01:56:25 | → | Guest3849 joins (~user@76.133.152.122) |
| 01:57:02 | × | waleee quits (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 245 seconds) |
| 01:57:47 | × | Inst quits (~Inst@2601:6c4:4081:2fc0:79c8:42a5:37ad:5ebf) (Remote host closed the connection) |
| 01:58:11 | → | Inst joins (~Inst@2601:6c4:4081:2fc0:79c8:42a5:37ad:5ebf) |
| 02:06:41 | → | eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) |
| 02:07:11 | × | leungbk quits (~user@2603-8000-1201-2dd2-36ab-a543-68a1-6b50.res6.spectrum.com) (Remote host closed the connection) |
| 02:07:43 | → | Guest77 joins (~Guest77@122.11.166.8) |
| 02:14:28 | × | phma quits (phma@2001:5b0:210b:e378:ed22:f5d0:8c20:185c) (Read error: Connection reset by peer) |
| 02:14:52 | → | phma joins (phma@2001:5b0:210b:e378:cbed:ddba:6ef2:8029) |
| 02:15:25 | → | nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
| 02:16:41 | × | machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 245 seconds) |
| 02:24:45 | → | finn_elija joins (~finn_elij@user/finn-elija/x-0085643) |
| 02:24:45 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
| 02:24:45 | finn_elija | is now known as FinnElija |
| 02:25:55 | → | alexbiehl joins (~alexbiehl@2a02:8108:323f:c964:c8b9:341:c65c:41d0) |
| 02:28:02 | × | phma quits (phma@2001:5b0:210b:e378:cbed:ddba:6ef2:8029) (Read error: Connection reset by peer) |
| 02:28:26 | → | phma joins (~phma@host-67-44-208-43.hnremote.net) |
| 02:28:38 | × | td_ quits (~td@i53870921.versanet.de) (Ping timeout: 272 seconds) |
| 02:29:29 | × | Inst quits (~Inst@2601:6c4:4081:2fc0:79c8:42a5:37ad:5ebf) (Ping timeout: 246 seconds) |
| 02:29:35 | → | Inst_ joins (~Inst@2601:6c4:4081:2fc0:1c30:3af5:9430:2bcf) |
| 02:30:02 | → | td_ joins (~td@i53870919.versanet.de) |
| 02:30:30 | × | alexbiehl quits (~alexbiehl@2a02:8108:323f:c964:c8b9:341:c65c:41d0) (Ping timeout: 260 seconds) |
| 02:35:20 | × | Guest77 quits (~Guest77@122.11.166.8) (Ping timeout: 246 seconds) |
| 02:35:47 | × | ddellacosta quits (~ddellacos@143.244.47.68) (Ping timeout: 246 seconds) |
| 02:36:31 | <maerwald> | so Hong Kong prefers stack? |
| 02:38:46 | <maerwald> | I'm ok with tested package sets (at least a core) ...but stack makes it extra hard to use packages outside that set. That's why we need better cabal support for stackage. |
| 02:40:18 | → | ddellacosta joins (~ddellacos@143.244.47.81) |
| 02:41:06 | <sclv> | remote project files are most of the way there imho |
| 02:49:14 | <maerwald> | sclv: still can't override stuff like in stack |
| 02:49:42 | <sclv> | right. that’s important future work |
| 02:51:12 | <maerwald> | I kept annoying duncan about it a couple times, but apart from "it's easy" I didn't get much out of him (wrt constraint algebra) |
| 02:56:57 | <hololeap> | are there any "piping" libraries that also support Control.Arrow? |
| 02:57:02 | × | [notItchy] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
| 02:57:25 | × | foul_owl quits (~kerry@157.97.134.168) (Read error: Connection reset by peer) |
| 02:58:00 | → | alexbiehl joins (~alexbiehl@2a02:8108:323f:c964:c8b9:341:c65c:41d0) |
| 02:58:27 | <hololeap> | s/also / |
| 03:00:25 | <hololeap> | I asked in here recently about splitting an input conduit into two separate conduits and recombining their results at the end |
| 03:00:38 | <hololeap> | and it didn't sound like it was possible |
| 03:02:23 | × | alexbiehl quits (~alexbiehl@2a02:8108:323f:c964:c8b9:341:c65c:41d0) (Ping timeout: 246 seconds) |
| 03:04:46 | <fvr> | hololeap: I know it's possible to do with the streamly library (tee function in streamly-core) but I am not familiar enough with conduit library |
| 03:05:15 | <hololeap> | thanks fvr I'm just looking for places to look |
| 03:05:38 | <hololeap> | I haven't looked into streamly |
| 03:05:48 | <hololeap> | although I've heard a lot of good things |
| 03:10:12 | <maerwald> | hololeap: I made a migration guide for conduit to streamly |
| 03:10:15 | <maerwald> | https://hasufell.github.io/posts/2021-10-22-conduit-to-streamly.html |
| 03:10:16 | <maerwald> | but... |
| 03:10:27 | <maerwald> | the main problem with streamly is that API breaks too fast too often |
| 03:10:35 | <maerwald> | otherwise I think it's superior to all others |
| 03:11:03 | <maerwald> | so my blog post code will likely not compile with streamly-0.9.x anymore, which proves my point |
| 03:11:40 | <maerwald> | I don't understand why people constantly break API... like, do you get new ideas every few months? |
| 03:12:33 | <fvr> | The upgrade was due to happen for a long time, besides I think it's considered okay to break Internal |
| 03:12:41 | <fvr> | There's an upgrade guide https://streamly.composewell.com/streamly-0.9.0/User/ProjectRelated/Upgrading.html |
| 03:13:21 | <maerwald> | no, it's not ok to break internal and the *entire* Streamly prelude was deprecated and exported symbols removed (non-internal) |
| 03:13:35 | <maerwald> | I stopped bothering and added <0.9 |
| 03:13:38 | <fvr> | yeah but this was in 0.9 a breaking release anyway |
| 03:14:46 | <fvr> | I haven't upgraded to 0.9 yet, so don't know how much of a chore it is |
| 03:14:57 | <maerwald> | if you use Parsers, everything is broken |
| 03:15:46 | <maerwald> | so... I'm now wondering whether it's a good idea to rely on streamly in a professional setting, where the cost of upgrading is not low |
| 03:17:14 | <fvr> | Parser was always in Internal though, so the project thinks it's okay to move them around |
| 03:17:42 | <maerwald> | yeah, except you can't use streamly for anything serious if you're only using nonn-internal API |
| 03:18:03 | <maerwald> | because it's a huge WIP package |
| 03:18:07 | <fvr> | yeah, but now in streamly-core 0.1 it is exported from non Internal |
| 03:18:29 | <fvr> | Streamly.Data.Parser, so perhaps just renaming the import and still importing the Internal version just works |
| 03:19:13 | <hololeap> | maerwald: I will check out your guide, thanks |
| 03:19:18 | × | nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 272 seconds) |
| 03:19:27 | <hololeap> | seems like it would be really informative for me |
| 03:25:39 | <jackdk> | This is why I just stick with `streaming`, which seems like the right balance between "does what I need", "fits into my head", and "doesn't break the universe all the time" |
| 03:29:33 | <fvr> | streaming also provides stream of streams which no other popular streaming library does correctly |
| 03:30:50 | → | alexbiehl joins (~alexbiehl@2a02:8108:323f:c964:c8b9:341:c65c:41d0) |
| 03:35:05 | × | alexbiehl quits (~alexbiehl@2a02:8108:323f:c964:c8b9:341:c65c:41d0) (Ping timeout: 246 seconds) |
| 03:38:52 | <hololeap> | that sounds like what I want then :) |
| 03:39:05 | → | foul_owl joins (~kerry@71.212.137.212) |
| 03:41:05 | × | phma quits (~phma@host-67-44-208-43.hnremote.net) (Read error: Connection reset by peer) |
| 03:41:30 | → | phma joins (phma@2001:5b0:210b:e378:cbed:ddba:6ef2:8029) |
| 03:44:38 | × | foul_owl quits (~kerry@71.212.137.212) (Ping timeout: 272 seconds) |
| 03:46:13 | <sm> | I don't want to keep banging on about stack and cabal but.. how does stack make it extra hard to use packages outside that set maerwald ? I'm used to adding such packages in stack.yaml extra-deps, or just as extra arguments to stack install |
| 03:46:43 | <sm> | or as extra items in the packages list |
| 03:47:14 | <sclv> | we don't need a constraint algebra -- there's a much simpler proposal for how overrides work on the table. its just that nobody has time to implement it. |
| 03:48:48 | <sclv> | sm: one issue as i understand it is the regression with regards to being able to use the solver -- before you could solve for what version of an extra package to add (a feature you get automatically when using the project imports style from cabal). but as of some years ago the solver support was bitrotted and then removed, so the user has to figure out by some other means what version is compatible before they can add it. |
| 03:50:08 | <maerwald> | sm: yes, stack doesn't have a solver, so it knows nothing of which version to suggest when it's not in the stackage set |
| 03:50:10 | <sm> | sclv: stack dropped cabal's solver I know, alas, but I wouldn't say that makes it hard to use packages outside the snapshot. |
| 03:50:15 | <maerwald> | it does |
| 03:50:19 | <maerwald> | it keeps going in circles |
| 03:50:42 | <maerwald> | it says add "foo-0.9" then you do and 5 suggestions later it says "now add foo-0.8" |
| 03:50:47 | <sm> | it means it's not trying to do everything under the sun, and recognising cabal is good at that |
| 03:50:49 | <maerwald> | that's because it doesn't know better |
| 03:50:58 | <maerwald> | and that's a serious usability issue |
| 03:51:48 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 250 seconds) |
| 03:53:45 | <sm> | maerwald: I think you are thinking of a case where constructing your own extra-snapshot install plan is hard with stack. There are obviously lots of cases like that, and lots where going outside the snapshot with a package or two is trivially easy. Personally, I would not say "stack makes going outside the package set hard", because that can give new users a wrong idea. I'd say it makes it easy. And, then it's up to you to find a good install plan. |
| 03:54:43 | <maerwald> | look, if someone would pay me and say "pick stack or cabal and make it better", I'd pick stack and re-integrate a solver, rip out all the insane defaults and integrate it with ghcup properly... because I think stack has the better codebase |
| 03:55:08 | <maerwald> | but it's probably much more work than just enhancing what's left in cabal |
| 03:55:21 | <maerwald> | especially wrt backpack and multilib |
| 03:56:43 | <maerwald> | sm: I've had recurring issues with stack in maybe 75% of the cases when trying to go outside the set |
| 03:56:51 | <maerwald> | in private and professional setting |
| 03:57:16 | → | foul_owl joins (~kerry@157.97.134.168) |
| 03:57:24 | <sm> | that doesn't conflict with what I said at all. I am just trying to see each tool accurately described |
| 03:57:30 | <sm> | then we can make better choices |
| 03:58:05 | <sm> | new users can, in particular, use whichever is easier for them |
| 03:58:35 | <maerwald> | depends what type of choice... using something or contributing to something |
| 03:58:41 | <sm> | and not feel stupid for not knowing the current cabal lore / latest constraints breakage |
| 03:59:01 | → | aforemny_ joins (~aforemny@i59F516E9.versanet.de) |
| 03:59:54 | <maerwald> | open source has weird dynamics |
| 03:59:55 | × | aforemny quits (~aforemny@i59F516E8.versanet.de) (Ping timeout: 240 seconds) |
| 04:00:20 | <maerwald> | sometimes, the worst codebase survives (e.g. X0rg) |
| 04:10:49 | → | _ht joins (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) |
| 04:11:14 | × | razetime quits (~quassel@117.193.5.43) (Ping timeout: 272 seconds) |
| 04:12:23 | × | zmt01 quits (~zmt00@user/zmt00) (Ping timeout: 246 seconds) |
| 04:16:13 | → | neuroevolutus joins (~neuroevol@2001:ac8:9a:76::1e) |
| 04:16:48 | × | neuroevolutus quits (~neuroevol@2001:ac8:9a:76::1e) (Client Quit) |
| 04:18:44 | → | oneeyedalien joins (~oneeyedal@user/oneeyedalien) |
| 04:20:40 | → | alexbiehl joins (~alexbiehl@2a02:8108:323f:c964:c8b9:341:c65c:41d0) |
| 04:21:53 | × | biberu quits (~biberu@user/biberu) (Read error: Connection reset by peer) |
| 04:24:57 | × | alexbiehl quits (~alexbiehl@2a02:8108:323f:c964:c8b9:341:c65c:41d0) (Ping timeout: 245 seconds) |
| 04:27:33 | → | biberu joins (~biberu@user/biberu) |
| 04:42:59 | → | misterfish joins (~misterfis@84-53-85-146.bbserv.nl) |
| 04:49:57 | → | notzmv joins (~zmv@user/notzmv) |
| 04:50:12 | → | razetime joins (~quassel@117.193.5.43) |
| 04:52:57 | → | alexbiehl joins (~alexbiehl@2a02:8108:323f:c964:c8b9:341:c65c:41d0) |
| 04:56:50 | × | razetime quits (~quassel@117.193.5.43) (Ping timeout: 272 seconds) |
| 04:57:11 | × | alexbiehl quits (~alexbiehl@2a02:8108:323f:c964:c8b9:341:c65c:41d0) (Ping timeout: 246 seconds) |
| 04:58:02 | × | oneeyedalien quits (~oneeyedal@user/oneeyedalien) (Quit: Leaving) |
| 05:09:00 | <glguy> | After working on a number of parsing and pretty printing projects I'm starting to think that putting comments in the lexical syntax isn't so great. It makes comments hard to preserve and emit. In JSON contexts it's common to work around that by ignoring table keys with the name "comment" , for example. I used to think that was kind of a hack, but I'm starting to think it's actually rather superior |
| 05:09:01 | <glguy> | to regular comments. I wonder if others have thought about this |
| 05:10:02 | <Axman6> | Sounds a wee bit like Stockholm syndrome to me :P |
| 05:11:50 | → | michalz joins (~michalz@185.246.207.217) |
| 05:15:59 | × | bilegeek quits (~bilegeek@2600:1008:b021:9e23:6101:8bf4:489c:4627) (Quit: Leaving) |
| 05:20:32 | <davean> | glguy: because its slightly less options? I'm not quite seeing what the win here is. |
| 05:21:19 | → | mei joins (~mei@user/mei) |
| 05:23:17 | <glguy> | It gives the comment a specific anchor into the syntax, like how we use haddock comments with | and ^ |
| 05:24:16 | <glguy> | In Haskell we've kind of extended comments into the syntax that way. There are specific points that a haddock comment is defined to attach to syntax |
| 05:25:38 | <glguy> | davean: I think it's more about clarity about what the comment is attached to rather than just fewer options |
| 05:27:55 | <glguy> | Comments get used for a couple different things. Documentation, but also just disabling something without having to delete it. We often use the same mechanism for both things, but that might not be ideal |
| 05:30:04 | → | arahael_ joins (~arahael@115-64-199-191.tpgi.com.au) |
| 05:34:30 | × | arahael_ quits (~arahael@115-64-199-191.tpgi.com.au) (Ping timeout: 246 seconds) |
| 05:35:52 | <jackdk> | glguy: what if you approach the problem from another direction, and designed the language so you could attach first-class metadata to more things? |
| 05:38:03 | → | alexbiehl joins (~alexbiehl@2a02:8108:323f:c964:c8b9:341:c65c:41d0) |
| 05:39:54 | → | trev joins (~trev@user/trev) |
| 05:39:57 | <glguy> | Yeah, seems interesting. Do you know of any examples? A really basic version of this is probably Python using an in-language string literal for its function documentation. Allowing extensible annotations to be added across the ast could be neat |
| 05:40:57 | <jackdk> | I have dim memories of clojure doing this: https://clojure.org/reference/metadata but I would also like to be able to attach and retrieve metadata on declarations and expressions rather than just vars. But maybe that locks you into having access to the syntax tree at all times? |
| 05:41:46 | × | _ht quits (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Quit: _ht) |
| 05:42:12 | × | alexbiehl quits (~alexbiehl@2a02:8108:323f:c964:c8b9:341:c65c:41d0) (Ping timeout: 246 seconds) |
| 05:47:10 | → | mncheck joins (~mncheck@193.224.205.254) |
| 05:50:34 | × | Fischmiep quits (~Fischmiep@user/Fischmiep) (Ping timeout: 252 seconds) |
| 05:50:51 | → | arahael_ joins (~arahael@115-64-199-191.tpgi.com.au) |
| 05:51:49 | <siraben> | How can I get cabal repl to work but I get the following error? |
| 05:51:49 | <siraben> | <command line>: User-specified static library could not be loaded (/nix/store/hzcc9rw3mifk14zfj1hx8yxkfrcb5zyy-clang-wrapper-11.1.0/bin/c++) |
| 05:51:49 | <siraben> | Loading static libraries is not supported in this configuration. |
| 05:51:49 | <siraben> | Try using a dynamic library instead. |
| 05:52:07 | <siraben> | This is the flake.nix: <command line>: User-specified static library could not be loaded (/nix/store/hzcc9rw3mifk14zfj1hx8yxkfrcb5zyy-clang-wrapper-11.1.0/bin/c++) |
| 05:52:07 | <siraben> | Loading static libraries is not supported in this configuration. |
| 05:52:07 | <siraben> | Try using a dynamic library instead. |
| 05:52:12 | <siraben> | Oops, https://github.com/ethereum/hevm/blob/main/flake.nix |
| 05:52:26 | <maerwald[m]> | Oh well, nix |
| 05:52:28 | <siraben> | I think I have to pass some compiler flag, I'm on macOS. |
| 05:52:36 | <siraben> | Maybe this question is better suited for the Nix haskell channel |
| 05:52:47 | <siraben> | But I've encountered this issue before even without Nix |
| 05:55:05 | × | arahael_ quits (~arahael@115-64-199-191.tpgi.com.au) (Ping timeout: 246 seconds) |
| 05:55:22 | → | Fischmiep joins (~Fischmiep@user/Fischmiep) |
| 05:55:22 | × | Fischmiep quits (~Fischmiep@user/Fischmiep) (Excess Flood) |
| 05:56:01 | <jackdk> | There are a lot of static-related things being plumbed into hevmUnwrapped, which might be what's blocking you. |
| 05:56:20 | → | Fischmiep joins (~Fischmiep@user/Fischmiep) |
| 05:59:45 | → | oneeyedalien joins (~oneeyedal@user/oneeyedalien) |
| 06:01:16 | → | codaraxis__ joins (~codaraxis@user/codaraxis) |
| 06:04:47 | × | codaraxis quits (~codaraxis@user/codaraxis) (Ping timeout: 264 seconds) |
| 06:06:18 | × | Sgeo quits (~Sgeo@user/sgeo) (Ping timeout: 258 seconds) |
| 06:11:55 | → | alexbiehl joins (~alexbiehl@2a02:8108:323f:c964:c8b9:341:c65c:41d0) |
| 06:13:59 | × | mauke quits (~mauke@user/mauke) (Ping timeout: 246 seconds) |
| 06:15:02 | × | mizlan quits (~mizlan@c-174-62-68-33.hsd1.ca.comcast.net) (Ping timeout: 246 seconds) |
| 06:15:47 | <davean> | jackdk: that would make more sense to me, and is a thing I've missed in Haskell |
| 06:16:47 | × | alexbiehl quits (~alexbiehl@2a02:8108:323f:c964:c8b9:341:c65c:41d0) (Ping timeout: 264 seconds) |
| 06:20:51 | × | oneeyedalien quits (~oneeyedal@user/oneeyedalien) (Quit: Leaving) |
| 06:21:41 | → | acidjnk joins (~acidjnk@p200300d6e7072f560cf848d8868092f6.dip0.t-ipconnect.de) |
| 06:22:57 | aforemny_ | is now known as aforemny |
| 06:25:02 | × | misterfish quits (~misterfis@84-53-85-146.bbserv.nl) (Ping timeout: 252 seconds) |
| 06:25:36 | × | stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
| 06:26:01 | → | stiell_ joins (~stiell@gateway/tor-sasl/stiell) |
| 06:26:08 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 06:28:53 | → | oo_miguel joins (~Thunderbi@78-11-179-96.static.ip.netia.com.pl) |
| 06:33:10 | → | gmg joins (~user@user/gehmehgeh) |
| 06:36:33 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 06:36:33 | → | mizlan joins (~mizlan@c-174-62-68-33.hsd1.ca.comcast.net) |
| 06:39:47 | → | Guest8732 joins (~finn@176-151-21-224.abo.bbox.fr) |
| 06:40:04 | × | pickleju1ce quits (~root@c-73-196-164-60.hsd1.nj.comcast.net) (Ping timeout: 272 seconds) |
| 06:43:53 | → | alexbiehl joins (~alexbiehl@2a02:8108:323f:c964:c8b9:341:c65c:41d0) |
| 06:48:12 | × | alexbiehl quits (~alexbiehl@2a02:8108:323f:c964:c8b9:341:c65c:41d0) (Ping timeout: 240 seconds) |
| 06:51:39 | → | libertyprime joins (~libertypr@203.96.203.44) |
| 07:02:09 | → | CiaoSen joins (~Jura@2a05:5800:299:1a00:664b:f0ff:fe37:9ef) |
| 07:05:59 | → | fendor joins (~fendor@2a02:8388:1640:be00:1f28:32b1:54ac:a932) |
| 07:10:23 | × | econo_ quits (uid147250@id-147250.tinside.irccloud.com) (Quit: Connection closed for inactivity) |
| 07:16:10 | → | nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
| 07:18:21 | → | alexbiehl joins (~alexbiehl@2a02:8108:323f:c964:c8b9:341:c65c:41d0) |
| 07:18:28 | × | hackyhacker quits (~hackyhack@2a05:f480:1400:24b2:5400:4ff:fe76:a8f3) (Quit: The Lounge - https://thelounge.chat) |
| 07:20:55 | × | nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 240 seconds) |
| 07:35:10 | × | shriekingnoise quits (~shrieking@186.137.175.87) (Ping timeout: 272 seconds) |
| 07:35:25 | × | alexbiehl quits (~alexbiehl@2a02:8108:323f:c964:c8b9:341:c65c:41d0) (Ping timeout: 240 seconds) |
| 07:35:58 | → | alexbiehl joins (~alexbiehl@2a02:8108:323f:c964:c8b9:341:c65c:41d0) |
| 07:43:43 | → | gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) |
| 07:43:52 | × | mizlan quits (~mizlan@c-174-62-68-33.hsd1.ca.comcast.net) (Ping timeout: 252 seconds) |
| 07:44:10 | → | Ashkan joins (~Ashkan@ec2-54-78-14-109.eu-west-1.compute.amazonaws.com) |
| 07:44:23 | × | alexbiehl quits (~alexbiehl@2a02:8108:323f:c964:c8b9:341:c65c:41d0) (Ping timeout: 264 seconds) |
| 07:46:21 | × | marinelli[m] quits (~marinelli@2001:470:69fc:105::2d8) (Remote host closed the connection) |
| 07:46:35 | → | marinelli[m] joins (~marinelli@2001:470:69fc:105::2d8) |
| 07:47:09 | → | dcoutts joins (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) |
| 07:50:43 | → | arahael_ joins (~arahael@115-64-199-191.tpgi.com.au) |
| 07:51:10 | → | machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net) |
| 07:52:45 | → | alexbiehl joins (~alexbiehl@2a02:8108:323f:c964:c8b9:341:c65c:41d0) |
| 07:54:11 | × | machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Remote host closed the connection) |
| 07:55:14 | <siraben> | jackdk: thanks, commenting out the extra-lib-dirs stuff fixed it! |
| 07:55:26 | × | arahael_ quits (~arahael@115-64-199-191.tpgi.com.au) (Ping timeout: 272 seconds) |
| 07:55:37 | → | titibandit joins (~titibandi@user/titibandit) |
| 07:57:08 | → | ub joins (~Thunderbi@77.119.175.12.wireless.dyn.drei.com) |
| 07:57:18 | → | misterfish joins (~misterfis@87.215.131.102) |
| 07:57:28 | → | machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net) |
| 07:58:07 | × | machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Client Quit) |
| 07:58:30 | → | machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net) |
| 07:58:34 | × | ubert quits (~Thunderbi@91.141.70.181.wireless.dyn.drei.com) (Ping timeout: 260 seconds) |
| 07:58:34 | ub | is now known as ubert |
| 07:59:42 | → | gurkenglas joins (~gurkengla@dynamic-002-247-243-208.2.247.pool.telefonica.de) |
| 08:12:05 | → | mizlan joins (~mizlan@c-174-62-68-33.hsd1.ca.comcast.net) |
| 08:12:31 | → | danse-nr3_ joins (~francesco@151.57.218.169) |
| 08:13:48 | × | dcoutts quits (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Ping timeout: 272 seconds) |
| 08:14:12 | × | alexbiehl quits (~alexbiehl@2a02:8108:323f:c964:c8b9:341:c65c:41d0) (Remote host closed the connection) |
| 08:14:44 | → | alexbiehl joins (~alexbiehl@2a02:8108:323f:ca14:a9de:be07:3a81:7285) |
| 08:16:58 | × | mizlan quits (~mizlan@c-174-62-68-33.hsd1.ca.comcast.net) (Ping timeout: 272 seconds) |
| 08:17:00 | × | danse-nr3_ quits (~francesco@151.57.218.169) (Ping timeout: 250 seconds) |
| 08:17:01 | → | dcoutts joins (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) |
| 08:17:58 | <jackdk> | Well, how about that `:)` |
| 08:18:52 | × | alexbiehl quits (~alexbiehl@2a02:8108:323f:ca14:a9de:be07:3a81:7285) (Ping timeout: 240 seconds) |
| 08:27:38 | → | ubert1 joins (~Thunderbi@77.119.175.12.wireless.dyn.drei.com) |
| 08:28:36 | × | azy_ quits (~azy@87-97-13-0.pool.digikabel.hu) (Ping timeout: 252 seconds) |
| 08:29:55 | → | danse-nr3 joins (~francesco@151.57.218.169) |
| 08:30:27 | → | azy joins (~azy@92-249-150-146.static.digikabel.hu) |
| 08:34:48 | → | Tuplanolla joins (~Tuplanoll@91-159-68-236.elisa-laajakaista.fi) |
| 08:37:52 | × | dcoutts quits (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Ping timeout: 245 seconds) |
| 08:39:36 | → | dcoutts joins (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) |
| 08:40:34 | × | dibblego quits (~dibblego@haskell/developer/dibblego) (Quit: λ) |
| 08:43:55 | × | dcoutts quits (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Ping timeout: 240 seconds) |
| 08:50:26 | × | danse-nr3 quits (~francesco@151.57.218.169) (Ping timeout: 245 seconds) |
| 08:53:33 | → | mizlan joins (~mizlan@c-174-62-68-33.hsd1.ca.comcast.net) |
| 08:56:00 | → | danse-nr3 joins (~francesco@151.57.218.169) |
| 08:59:12 | × | ft quits (~ft@p3e9bc856.dip0.t-ipconnect.de) (Quit: leaving) |
| 09:01:06 | → | chele joins (~chele@user/chele) |
| 09:01:22 | → | dcoutts joins (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) |
| 09:02:15 | → | Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542) |
| 09:05:13 | × | eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 09:06:00 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 09:16:15 | → | dibblego joins (~dibblego@116-255-1-151.ip4.superloop.au) |
| 09:16:15 | × | dibblego quits (~dibblego@116-255-1-151.ip4.superloop.au) (Changing host) |
| 09:16:15 | → | dibblego joins (~dibblego@haskell/developer/dibblego) |
| 09:21:08 | → | fweht joins (uid404746@id-404746.lymington.irccloud.com) |
| 09:29:12 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz) |
| 09:29:28 | × | jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 258 seconds) |
| 09:29:34 | × | ByronJohnson quits (~bairyn@50-250-232-19-static.hfc.comcastbusiness.net) (Ping timeout: 260 seconds) |
| 09:31:23 | → | ByronJohnson joins (~bairyn@50-250-232-19-static.hfc.comcastbusiness.net) |
| 09:35:45 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 09:36:06 | × | Ashkan quits (~Ashkan@ec2-54-78-14-109.eu-west-1.compute.amazonaws.com) (Quit: Client closed) |
| 09:36:46 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 272 seconds) |
| 09:38:36 | Lord_of_Life_ | is now known as Lord_of_Life |
| 09:39:43 | → | alexbiehl joins (~alexbiehl@ip4d14fda4.dynamic.kabel-deutschland.de) |
| 09:41:02 | × | dibblego quits (~dibblego@haskell/developer/dibblego) (Excess Flood) |
| 09:42:05 | → | dibblego joins (~dibblego@116-255-1-151.ip4.superloop.au) |
| 09:42:05 | × | dibblego quits (~dibblego@116-255-1-151.ip4.superloop.au) (Changing host) |
| 09:42:05 | → | dibblego joins (~dibblego@haskell/developer/dibblego) |
| 09:42:43 | × | ncf quits (~n@monade.li) (Quit: Fairfarren.) |
| 09:42:52 | → | ncf joins (~n@monade.li) |
| 09:43:29 | × | dibblego quits (~dibblego@haskell/developer/dibblego) (Excess Flood) |
| 09:46:04 | × | alexbiehl quits (~alexbiehl@ip4d14fda4.dynamic.kabel-deutschland.de) (Remote host closed the connection) |
| 09:46:37 | ← | Guest3849 parts (~user@76.133.152.122) (ERC 5.6-git (IRC client for GNU Emacs 30.0.50)) |
| 09:52:36 | → | alexbiehl joins (~alexbiehl@2a02:8108:323f:ca14:a9de:be07:3a81:7285) |
| 09:54:46 | → | __monty__ joins (~toonn@user/toonn) |
| 09:57:44 | × | alexbiehl quits (~alexbiehl@2a02:8108:323f:ca14:a9de:be07:3a81:7285) (Remote host closed the connection) |
| 09:59:30 | → | dibblego joins (~dibblego@116-255-1-151.ip4.superloop.au) |
| 09:59:30 | × | dibblego quits (~dibblego@116-255-1-151.ip4.superloop.au) (Changing host) |
| 09:59:30 | → | dibblego joins (~dibblego@haskell/developer/dibblego) |
| 10:02:08 | × | img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
| 10:03:29 | × | kritzefitz quits (~kritzefit@debian/kritzefitz) (Remote host closed the connection) |
| 10:03:35 | × | mizlan quits (~mizlan@c-174-62-68-33.hsd1.ca.comcast.net) (Ping timeout: 264 seconds) |
| 10:04:19 | × | remexre quits (~remexre@user/remexre) (Read error: Connection reset by peer) |
| 10:04:57 | × | azy quits (~azy@92-249-150-146.static.digikabel.hu) (Ping timeout: 245 seconds) |
| 10:05:10 | → | kritzefitz joins (~kritzefit@debian/kritzefitz) |
| 10:05:37 | → | img joins (~img@user/img) |
| 10:05:40 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:9801:f948:f484:2fb0) |
| 10:06:40 | → | azy joins (~azy@84-236-1-98.pool.digikabel.hu) |
| 10:06:41 | → | remexre joins (~remexre@user/remexre) |
| 10:07:32 | × | kmein_ quits (~weechat@user/kmein) (Quit: ciao kakao) |
| 10:07:52 | → | kmein joins (~weechat@user/kmein) |
| 10:08:26 | × | img quits (~img@user/img) (Client Quit) |
| 10:09:35 | × | libertyprime quits (~libertypr@203.96.203.44) (Quit: leaving) |
| 10:10:06 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:9801:f948:f484:2fb0) (Ping timeout: 258 seconds) |
| 10:10:09 | → | img joins (~img@user/img) |
| 10:11:59 | × | kritzefitz quits (~kritzefit@debian/kritzefitz) (Remote host closed the connection) |
| 10:12:03 | × | img quits (~img@user/img) (Client Quit) |
| 10:12:58 | → | img joins (~img@user/img) |
| 10:13:20 | → | kritzefitz joins (~kritzefit@debian/kritzefitz) |
| 10:15:45 | → | arahael_ joins (~arahael@115-64-199-191.tpgi.com.au) |
| 10:16:15 | × | dibblego quits (~dibblego@haskell/developer/dibblego) (Read error: Connection timed out) |
| 10:20:48 | × | arahael_ quits (~arahael@115-64-199-191.tpgi.com.au) (Ping timeout: 252 seconds) |
| 10:22:32 | → | mizlan joins (~mizlan@c-174-62-68-33.hsd1.ca.comcast.net) |
| 10:24:47 | → | razetime joins (~quassel@117.193.5.43) |
| 10:32:32 | → | arahael_ joins (~arahael@115-64-199-191.tpgi.com.au) |
| 10:36:32 | × | gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 4.0.1) |
| 10:42:00 | × | arahael_ quits (~arahael@115-64-199-191.tpgi.com.au) (Ping timeout: 272 seconds) |
| 10:46:19 | → | picklejuice joins (~root@c-73-196-164-60.hsd1.nj.comcast.net) |
| 10:46:26 | × | azy quits (~azy@84-236-1-98.pool.digikabel.hu) (Ping timeout: 272 seconds) |
| 10:46:43 | → | mango joins (~finn@rul16-h01-176-151-21-224.dsl.sta.abo.bbox.fr) |
| 10:47:55 | → | azy joins (~azy@213-197-76-111.pool.digikabel.hu) |
| 10:49:06 | → | kuribas joins (~user@ptr-17d51emwh8tjgyi2pjo.18120a2.ip6.access.telenet.be) |
| 10:49:46 | × | Guest8732 quits (~finn@176-151-21-224.abo.bbox.fr) (Ping timeout: 252 seconds) |
| 10:50:44 | × | czy quits (~user@host-140-26.ilcub310.champaign.il.us.clients.pavlovmedia.net) (Ping timeout: 258 seconds) |
| 10:51:52 | → | dibblego joins (~dibblego@116-255-1-151.ip4.superloop.au) |
| 10:51:52 | × | dibblego quits (~dibblego@116-255-1-151.ip4.superloop.au) (Changing host) |
| 10:51:52 | → | dibblego joins (~dibblego@haskell/developer/dibblego) |
| 10:52:38 | × | CiaoSen quits (~Jura@2a05:5800:299:1a00:664b:f0ff:fe37:9ef) (Ping timeout: 260 seconds) |
| 10:54:09 | × | img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
| 10:55:07 | → | img joins (~img@user/img) |
| 10:55:37 | × | danse-nr3 quits (~francesco@151.57.218.169) (Remote host closed the connection) |
| 10:56:03 | → | danse-nr3 joins (~francesco@151.57.218.169) |
| 10:57:58 | → | arahael_ joins (~arahael@115-64-199-191.tpgi.com.au) |
| 10:58:42 | × | Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection) |
| 10:58:52 | → | venkateshK[m] joins (~randomint@2001:470:69fc:105::3:852e) |
| 11:00:12 | × | img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
| 11:01:04 | → | img joins (~img@user/img) |
| 11:03:51 | × | danse-nr3 quits (~francesco@151.57.218.169) (Remote host closed the connection) |
| 11:05:51 | × | dibblego quits (~dibblego@haskell/developer/dibblego) (Read error: Connection timed out) |
| 11:07:38 | × | tomku quits (~tomku@user/tomku) (Ping timeout: 246 seconds) |
| 11:08:22 | × | arahael_ quits (~arahael@115-64-199-191.tpgi.com.au) (Ping timeout: 258 seconds) |
| 11:10:33 | × | razetime quits (~quassel@117.193.5.43) (Remote host closed the connection) |
| 11:12:03 | → | ncf_ joins (~n@monade.li) |
| 11:12:33 | × | ncf_ quits (~n@monade.li) (Client Quit) |
| 11:17:43 | → | nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
| 11:21:12 | × | azy quits (~azy@213-197-76-111.pool.digikabel.hu) (Ping timeout: 245 seconds) |
| 11:21:54 | → | bontaq joins (~user@ool-45779b84.dyn.optonline.net) |
| 11:22:47 | × | nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 264 seconds) |
| 11:23:06 | → | azy joins (~azy@193-110-63-47.cable-modem.hdsnet.hu) |
| 11:24:36 | × | mizlan quits (~mizlan@c-174-62-68-33.hsd1.ca.comcast.net) (Ping timeout: 245 seconds) |
| 11:27:04 | → | alexbiehl joins (~alexbiehl@2a02:8108:323f:ca14:a9de:be07:3a81:7285) |
| 11:29:22 | → | arahael_ joins (~arahael@115-64-199-191.tpgi.com.au) |
| 11:34:10 | × | arahael_ quits (~arahael@115-64-199-191.tpgi.com.au) (Ping timeout: 250 seconds) |
| 11:37:02 | × | mango quits (~finn@rul16-h01-176-151-21-224.dsl.sta.abo.bbox.fr) (Ping timeout: 245 seconds) |
| 11:39:28 | → | dibblego joins (~dibblego@116-255-1-151.ip4.superloop.au) |
| 11:39:28 | × | dibblego quits (~dibblego@116-255-1-151.ip4.superloop.au) (Changing host) |
| 11:39:28 | → | dibblego joins (~dibblego@haskell/developer/dibblego) |
| 11:40:55 | × | anpad quits (~pandeyan@user/anpad) (Quit: ZNC 1.8.2 - https://znc.in) |
| 11:42:48 | → | anpad joins (~pandeyan@user/anpad) |
| 11:45:38 | → | mixfix41 joins (~sdeny9ee@user/mixfix41) |
| 11:56:43 | → | ripspin joins (~chatzilla@1.145.144.100) |
| 11:57:35 | → | danse-nr3 joins (~francesco@151.43.142.135) |
| 12:00:31 | → | arahael_ joins (~arahael@115-64-199-191.tpgi.com.au) |
| 12:04:52 | × | arahael_ quits (~arahael@115-64-199-191.tpgi.com.au) (Ping timeout: 240 seconds) |
| 12:07:27 | × | dibblego quits (~dibblego@haskell/developer/dibblego) (Quit: λ) |
| 12:07:41 | × | tv quits (~tv@user/tv) (Ping timeout: 246 seconds) |
| 12:09:34 | → | tv joins (~tv@user/tv) |
| 12:12:32 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 12:13:14 | → | mizlan joins (~mizlan@c-174-62-68-33.hsd1.ca.comcast.net) |
| 12:14:07 | × | tv quits (~tv@user/tv) (Ping timeout: 245 seconds) |
| 12:14:50 | × | azy quits (~azy@193-110-63-47.cable-modem.hdsnet.hu) (Ping timeout: 246 seconds) |
| 12:15:17 | → | comerijn joins (~merijn@088-129-128-083.dynamic.caiway.nl) |
| 12:15:59 | → | tv joins (~tv@user/tv) |
| 12:16:35 | → | azy joins (~azy@178-164-171-246.pool.digikabel.hu) |
| 12:18:05 | × | thegeekinside quits (~thegeekin@189.217.90.138) (Read error: Connection reset by peer) |
| 12:18:11 | × | merijn quits (~merijn@088-129-128-083.dynamic.caiway.nl) (Ping timeout: 246 seconds) |
| 12:22:27 | × | mechap quits (~mechap@user/mechap) (Ping timeout: 245 seconds) |
| 12:23:45 | → | mechap joins (~mechap@user/mechap) |
| 12:26:23 | × | L29Ah quits (~L29Ah@wikipedia/L29Ah) (Ping timeout: 264 seconds) |
| 12:29:33 | × | trev quits (~trev@user/trev) (Quit: trev) |
| 12:30:00 | × | gurkenglas quits (~gurkengla@dynamic-002-247-243-208.2.247.pool.telefonica.de) (Read error: Connection reset by peer) |
| 12:31:24 | → | waleee joins (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) |
| 12:38:52 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 12:39:28 | → | CiaoSen joins (~Jura@2a05:5800:299:1a00:664b:f0ff:fe37:9ef) |
| 12:39:45 | × | danse-nr3 quits (~francesco@151.43.142.135) (Ping timeout: 246 seconds) |
| 12:41:23 | × | machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Remote host closed the connection) |
| 12:42:33 | → | machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net) |
| 12:44:00 | → | kupi joins (uid212005@id-212005.hampstead.irccloud.com) |
| 12:46:07 | × | mechap quits (~mechap@user/mechap) (Ping timeout: 258 seconds) |
| 12:46:46 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 272 seconds) |
| 12:47:07 | → | mechap joins (~mechap@user/mechap) |
| 12:47:24 | × | azy quits (~azy@178-164-171-246.pool.digikabel.hu) (Ping timeout: 272 seconds) |
| 12:48:43 | → | azy joins (~azy@fibhost-67-47-59.fibernet.hu) |
| 12:49:32 | × | Vq quits (~vq@90-227-195-9-no77.tbcn.telia.com) (Quit: Server maintenance) |
| 12:50:13 | → | shapr joins (~user@2600:1700:c640:3100:7ba2:ae9a:8376:1284) |
| 12:52:50 | → | jonathan joins (~jonathan@c83-252-3-92.bredband.tele2.se) |
| 12:54:14 | → | danse-nr3 joins (~francesco@151.43.142.135) |
| 12:54:57 | <jonathan> | When I build with "Wall -Werror", I find myself spending quite a bit of time fixing up redundant import statements. Is there a tool to automate this process? |
| 12:55:15 | → | gurkenglas joins (~gurkengla@dynamic-002-247-243-208.2.247.pool.telefonica.de) |
| 12:55:26 | × | mei quits (~mei@user/mei) (Quit: mei) |
| 12:55:53 | <fvr> | jonathan: something other than hls? |
| 12:56:10 | → | mei joins (~mei@user/mei) |
| 12:59:31 | <jonathan> | Is there a code action for it? Having it on command line for all files would be great, but a "remove redundant imports" would take me a bit on the way |
| 12:59:52 | → | qqq joins (~qqq@92.43.167.61) |
| 13:00:43 | <fvr> | yeah there is remove redundant imports code action |
| 13:02:10 | × | phma quits (phma@2001:5b0:210b:e378:cbed:ddba:6ef2:8029) (Read error: Connection reset by peer) |
| 13:02:13 | → | p3n joins (~p3n@2a00:19a0:3:7c:0:d9c6:7cf6:1) |
| 13:02:34 | → | phma joins (phma@2001:5b0:210b:e378:a2bb:6ce4:5380:526f) |
| 13:03:34 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.6) |
| 13:06:55 | → | Vq joins (~vq@90-227-195-9-no77.tbcn.telia.com) |
| 13:10:11 | × | mechap quits (~mechap@user/mechap) (Ping timeout: 264 seconds) |
| 13:10:41 | → | mechap joins (~mechap@user/mechap) |
| 13:12:56 | × | Inst_ quits (~Inst@2601:6c4:4081:2fc0:1c30:3af5:9430:2bcf) (Ping timeout: 246 seconds) |
| 13:13:02 | <jackdk> | I would expect a haskell autoformatter to clean it up too; I know ormolu does this but I would expect others to do so also |
| 13:15:01 | → | dibblego joins (~dibblego@116.255.1.151) |
| 13:15:02 | × | dibblego quits (~dibblego@116.255.1.151) (Changing host) |
| 13:15:02 | → | dibblego joins (~dibblego@haskell/developer/dibblego) |
| 13:16:26 | × | mizlan quits (~mizlan@c-174-62-68-33.hsd1.ca.comcast.net) (Ping timeout: 250 seconds) |
| 13:19:21 | → | Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542) |
| 13:19:36 | × | mechap quits (~mechap@user/mechap) (Remote host closed the connection) |
| 13:20:00 | → | mechap joins (~mechap@user/mechap) |
| 13:20:08 | → | mango joins (~finn@176-151-21-224.abo.bbox.fr) |
| 13:22:28 | <geekosaur> | I thought formatters had access only to the source they were formatting? It would need to analyze the imported modules to detect redundant imports |
| 13:22:44 | <geekosaur> | unless it's something obvious like a module imported twice |
| 13:26:28 | → | Midjak joins (~Midjak@82.66.147.146) |
| 13:28:10 | × | azy quits (~azy@fibhost-67-47-59.fibernet.hu) (Ping timeout: 252 seconds) |
| 13:30:02 | → | azy joins (~azy@85-238-93-58.pool.digikabel.hu) |
| 13:41:22 | × | dcoutts quits (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Ping timeout: 252 seconds) |
| 13:48:35 | → | TheblackPuppet joins (~u0_a891@149.140.105.147) |
| 13:48:57 | <c_wraith> | redundant imports can be non-trivial in Haskell, thanks to allowing re-exports. |
| 13:54:26 | → | trev joins (~trev@user/trev) |
| 13:59:11 | × | son0p quits (~ff@181.136.122.143) (Ping timeout: 245 seconds) |
| 14:00:41 | → | thegeekinside joins (~thegeekin@189.217.90.138) |
| 14:02:56 | → | dcoutts joins (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) |
| 14:04:57 | → | mizlan joins (~mizlan@c-174-62-68-33.hsd1.ca.comcast.net) |
| 14:05:54 | × | thegeekinside quits (~thegeekin@189.217.90.138) (Read error: Connection reset by peer) |
| 14:06:28 | × | alexbiehl quits (~alexbiehl@2a02:8108:323f:ca14:a9de:be07:3a81:7285) (Remote host closed the connection) |
| 14:07:12 | × | azy quits (~azy@85-238-93-58.pool.digikabel.hu) (Ping timeout: 240 seconds) |
| 14:07:35 | → | tomku joins (~tomku@user/tomku) |
| 14:09:15 | → | azy joins (~azy@178-164-171-242.pool.digikabel.hu) |
| 14:13:32 | × | mncheck quits (~mncheck@193.224.205.254) (Ping timeout: 272 seconds) |
| 14:15:08 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 14:23:37 | × | tomku quits (~tomku@user/tomku) (Quit: Lost terminal) |
| 14:25:42 | → | thegeekinside joins (~thegeekin@189.217.90.138) |
| 14:26:33 | × | waleee quits (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 258 seconds) |
| 14:28:47 | → | waleee joins (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) |
| 14:32:11 | → | tomku joins (~tomku@user/tomku) |
| 14:44:37 | × | TheblackPuppet quits (~u0_a891@149.140.105.147) (Quit: WeeChat 4.0.1) |
| 14:45:42 | → | shriekingnoise joins (~shrieking@186.137.175.87) |
| 14:47:38 | <danse-nr3> | this is probably a tired topic but ... how comes `head` and similar are still unsafe? Pointers to existing flame wars appreciated |
| 14:47:48 | × | azy quits (~azy@178-164-171-242.pool.digikabel.hu) (Ping timeout: 246 seconds) |
| 14:49:30 | → | azy joins (~azy@78-131-74-116.pool.digikabel.hu) |
| 14:51:19 | × | motherfsck quits (~motherfsc@user/motherfsck) (Read error: Connection reset by peer) |
| 14:51:35 | <int-e> | they're partial, not unsafe |
| 14:51:36 | <glguy> | danse-nr3: they aren't unsafe, they're partial. You should use them when it's obvious that they will work. If you don't know if the list is empty there are other options: pattern matching, listToMaybe, etc. There's not really a flame war to point to |
| 14:51:37 | × | danse-nr3 quits (~francesco@151.43.142.135) (Remote host closed the connection) |
| 14:52:02 | → | danse-nr3 joins (~francesco@151.43.142.135) |
| 14:52:23 | <glguy> | Not all properties of values can be reflected into their types, it's an approximation |
| 14:55:29 | <int-e> | > map (head &&& length) . group . sort $ "abracadabra" |
| 14:55:30 | <lambdabot> | [('a',5),('b',2),('c',1),('d',1),('r',2)] |
| 14:55:38 | → | notzmv joins (~zmv@user/notzmv) |
| 14:56:24 | <int-e> | (one of many totally appropriate uses of `head`) |
| 14:56:38 | <danse-nr3> | well by safe i mean type safety, which is the same as non-partiality at least in this case. I know types can get only to some point, but this seems simple to improve |
| 14:58:05 | <glguy> | It wouldn't be simple to improve because you'd end up with impossible cases to handle some other way |
| 14:58:21 | <jade[m]> | int-e: you could use `Data.List.NonEmpty.Group` and then have it all typesafe |
| 14:58:32 | <glguy> | jade[m]: that doesn't scale |
| 14:58:59 | <glguy> | A whole duplicate module needed to be created for the at-least-one special case |
| 14:59:14 | <danse-nr3> | glguy, impossible? Uncomfortable, maybe, but not much |
| 14:59:36 | <glguy> | Uncomfortable but also not useful |
| 14:59:38 | <int-e> | we could make things *worse* by having a "total" head :: [a] -> Maybe a (that's actually what listToMaybe) and working in the Maybe monad for as long as possible, and then when we ultimately get Nothing due to a bug we will have no information at all about what function failed. |
| 15:00:16 | <jade[m]> | glguy: apologies, the module is just NonEmpty and the function is group |
| 15:00:23 | <jade[m]> | i accidently made that uppercase |
| 15:01:03 | <int-e> | NonEmpty could be great if it was a subtype of [a]. |
| 15:01:06 | <zzz> | int-e: just add a writer monad |
| 15:01:12 | <glguy> | jade[m]: right, that module is a special case that we would have to duplicate for every subset of list |
| 15:01:13 | <int-e> | But subtypes are their own can of worms |
| 15:01:43 | <glguy> | NonEmpty, Even list, AtLeastThree list |
| 15:02:12 | <dolio> | Type safety is not the same as non-partiality. |
| 15:02:50 | <zzz> | my rule is to always pattern match instead of using head |
| 15:03:25 | <zzz> | i don't think head should be in the prelude |
| 15:03:43 | <glguy> | zzz: could you rewrite int-e's example in your style for reference? |
| 15:03:57 | <zzz> | oh i just got here, let me check scrollback |
| 15:04:44 | <danse-nr3> | > map (head &&& length) . group . sort $ "" |
| 15:04:45 | <lambdabot> | [] |
| 15:04:53 | × | misterfish quits (~misterfis@87.215.131.102) (Ping timeout: 258 seconds) |
| 15:06:03 | <int-e> | You'll always have code where some cases are known to be impossible even though that's not captured by the types. Lists that are known to be non-empty is just a very common instance of that. |
| 15:06:28 | <glguy> | danse-nr3: "impossible" cases meant values that will never occur, like [] will never be in the output list of group |
| 15:06:30 | × | mizlan quits (~mizlan@c-174-62-68-33.hsd1.ca.comcast.net) (Ping timeout: 250 seconds) |
| 15:06:32 | <zzz> | i can't, not that line in a vacuum. i'm sure i could get around it in context |
| 15:06:39 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
| 15:08:01 | <glguy> | So you can case on the list, bit then you're stuck again in the [] -> branch |
| 15:08:43 | ← | L29Ah parts (~L29Ah@wikipedia/L29Ah) () |
| 15:09:01 | <zzz> | i feel like the compiler could be smarter about impossible cases |
| 15:09:19 | <zzz> | but i may be illuded as to how simple of a problem that is |
| 15:09:54 | <zzz> | my intuition is that identifying dead code should be trivian in haskell |
| 15:10:00 | <zzz> | *trivial |
| 15:10:03 | <int-e> | lol |
| 15:10:16 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:9801:f948:f484:2fb0) |
| 15:10:22 | <int-e> | (you're only solving the halting problem, how hard could it be) |
| 15:10:44 | <danse-nr3> | well there is NonEmpty and that can have an easy head. But well, i guess i have something to learn ... i ... would not use head and similar in no case, just find the lack of safety (or partiality) dangerous |
| 15:10:54 | <danse-nr3> | :t maximum |
| 15:10:55 | <lambdabot> | (Foldable t, Ord a) => t a -> a |
| 15:11:03 | <danse-nr3> | % maximum [] |
| 15:11:03 | <yahb2> | *** Exception: Prelude.maximum: empty list |
| 15:11:20 | <danse-nr3> | in haskell, documentation does not get as far as types do |
| 15:11:42 | <int-e> | Sure, `NonEmpty` does work for the case of `group`. But at the same time, `group` is so simple that I'm not getting much benefit out of that case. |
| 15:11:59 | <zzz> | int-e: no, i don't think so. sure there are situations where you cannot know like recursive types and whatnot but it should be easy to know when you can't know |
| 15:12:42 | <dolio> | Yes, you could have group return a list of non-empty lists. Then that example turns into one involving both non-empty and normal lists, and duplicating the API on lists, which either means you need to add cruft to your code to disambiguate between the two APIs, or you need to overload everything. |
| 15:13:14 | <int-e> | zzz: There's no clear boundary between the two (you can always try harder). The right move is to not try beyond *very* clearly defined boundaries... which are given by the type system. |
| 15:13:36 | <int-e> | GHC's exhaustiveness check for patterns is already pretty complex as is. |
| 15:13:49 | <int-e> | (And already goes wrong on occasion.) |
| 15:13:52 | → | Inst joins (~Inst@2601:6c4:4081:2fc0:c949:b3e0:9b04:3345) |
| 15:14:16 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 15:14:48 | <danse-nr3> | dolio, you mean that there is no path towards reasonable type safety? I dislike NonEmpty as well, but i think i just ignore how it could evolve. `head` is a simpler problem anyways |
| 15:14:59 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:9801:f948:f484:2fb0) (Ping timeout: 264 seconds) |
| 15:16:01 | × | thegeekinside quits (~thegeekin@189.217.90.138) (Read error: Connection reset by peer) |
| 15:17:17 | <zzz> | int-e: in this specific case, wouldn't it be easy to know that group will never give you an empty list? |
| 15:17:25 | <zzz> | for the compiler, i mean |
| 15:17:49 | <danse-nr3> | just use NonEmpty then ... but still this is shifting the problem |
| 15:18:21 | × | mei quits (~mei@user/mei) (Remote host closed the connection) |
| 15:19:14 | → | nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
| 15:19:17 | → | mizlan joins (~mizlan@c-174-62-68-33.hsd1.ca.comcast.net) |
| 15:19:18 | <int-e> | zzz: I'm not sure what your goalpost is at this point. I'd still want to write the code with `head`, even if the compiler manages to elide the `error "Prelude.head: empty list"` code in the end (which it actually just might as part of build/foldr fusion). |
| 15:19:37 | <zzz> | int-e: no goalpost! just curiosity :) |
| 15:19:37 | → | mei joins (~mei@user/mei) |
| 15:20:45 | <dolio> | What I mean is that what Haskell does is fairly reasonable. It is not always a reasonable amount of effort to make everything verifiably total. |
| 15:21:31 | <zzz> | i'm more ok with head than with the fact that length returns and Int |
| 15:21:55 | <zzz> | s/and/an |
| 15:22:15 | <danse-nr3> | mapMaybe (\g -> (, length g) <$> head' g) . group . sort $ "abra" -- does not look that terrible to me |
| 15:22:31 | × | mango quits (~finn@176-151-21-224.abo.bbox.fr) (Ping timeout: 245 seconds) |
| 15:23:10 | <int-e> | > Seq.length $ iterate (\s -> s <> s) (Seq.singleton ()) !! 63 |
| 15:23:12 | <lambdabot> | -9223372036854775808 |
| 15:23:16 | <glguy> | danse-nr3: that would hide an actual bug if an empty list occurred |
| 15:23:46 | × | nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 245 seconds) |
| 15:23:48 | <danse-nr3> | not if we are not interested in that |
| 15:24:03 | <int-e> | zzz: ^^ not a realistic issue for [a] but if you have O(log(n)) append it becomes a real problem |
| 15:24:41 | <danse-nr3> | writing the maybe handling at least makes one think about it, while having a type that tells nothing about a runtime error is not better |
| 15:24:43 | <int-e> | FSVO "real" |
| 15:25:01 | <danse-nr3> | following your reasoning, then let us have exceptions in maybe's type |
| 15:25:25 | <int-e> | > fromJust Nothing |
| 15:25:26 | <lambdabot> | *Exception: Maybe.fromJust: Nothing |
| 15:25:30 | <dolio> | In many real-world scenarios, I'd much rather have an exception than nonsense answers that make me trace through the code instead. |
| 15:26:12 | <danse-nr3> | but at least the coder was informed and decided to omit |
| 15:26:54 | <danse-nr3> | *let us have exceptions in `head` time i meant, but thanks int-e for finding another case |
| 15:27:12 | <danse-nr3> | % fromJust |
| 15:27:12 | <yahb2> | <interactive>:41:1: error: Variable not in scope: fromJust |
| 15:27:17 | <danse-nr3> | :t fromJust |
| 15:27:18 | <lambdabot> | Maybe a -> a |
| 15:27:21 | <danse-nr3> | magic |
| 15:27:37 | <int-e> | % import Data.Maybe |
| 15:27:37 | <yahb2> | <no output> |
| 15:27:42 | <int-e> | % :t fromJust |
| 15:27:42 | <yahb2> | fromJust :: GHC.Stack.Types.HasCallStack => Maybe a -> a |
| 15:28:03 | <danse-nr3> | nice, yet not an exception |
| 15:28:09 | <danse-nr3> | % :t head |
| 15:28:09 | <yahb2> | head :: [a] -> a |
| 15:28:20 | <danse-nr3> | clean and reassuring |
| 15:29:28 | <danse-nr3> | i mean, Maybe is also very useful to learn all the other stuff, it does not look that bad in a type |
| 15:29:44 | <int-e> | > case [] of x:_ -> x |
| 15:29:45 | <lambdabot> | *Exception: <interactive>:(3,1)-(4,22): Non-exhaustive patterns in case |
| 15:29:53 | <int-e> | > head [] |
| 15:29:55 | <lambdabot> | *Exception: Prelude.head: empty list |
| 15:30:13 | <danse-nr3> | non-exhaustive patterns get caught by the compiler though |
| 15:30:39 | → | mauke joins (~mauke@user/mauke) |
| 15:30:59 | <int-e> | fine, so you add an [] case... now what do you write there, knowing that it's impossible? |
| 15:31:25 | → | Square joins (~Square@user/square) |
| 15:31:31 | <int-e> | this is what `head` is for: extract the first element of a list that *you* statically know is non-empty. |
| 15:31:55 | <int-e> | no matter whether you can convince the compiler of the fact |
| 15:32:00 | <glguy> | danse-nr3: the total solution would be for int-e's example to have type like: data IdUnlessProgramError a = Bug ... | Result a |
| 15:32:13 | <glguy> | And then propagate that all the way to the top of main |
| 15:32:13 | <int-e> | which... you might either be unable to or simply unwilling to bother with |
| 15:32:48 | <glguy> | Rather than making up a value in the bug case |
| 15:33:47 | <glguy> | Which is a more-verbose version of what it does now |
| 15:34:03 | <glguy> | But it's certainly an option |
| 15:34:56 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:9801:f948:f484:2fb0) |
| 15:36:33 | → | gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) |
| 15:38:10 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:9801:f948:f484:2fb0) (Remote host closed the connection) |
| 15:38:16 | <danse-nr3> | yeah, i get it. Just my personal opinion then. After some years of experience, i basically never use `head`. From the perspective of a newcomer approaching the language, i think it would be a better path to be faced with the safer version. And about functions i use more rarely ... well. The point i made before, doc does not get as far as types do, i can just hope people generally like to write total functions |
| 15:39:27 | <danse-nr3> | % :t tail |
| 15:39:27 | <yahb2> | tail :: [a] -> [a] |
| 15:39:57 | <danse-nr3> | had some troubles with this once, did not expect it to work as it does, considering the types |
| 15:40:09 | → | thegeekinside joins (~thegeekin@189.217.90.138) |
| 15:40:10 | <danse-nr3> | but am i right? Wait, i am not sure |
| 15:40:13 | <int-e> | > drop (-1) [1,2,3] |
| 15:40:14 | <lambdabot> | [1,2,3] |
| 15:40:17 | <danse-nr3> | % tail [] |
| 15:40:17 | <yahb2> | *** Exception: Prelude.tail: empty list |
| 15:40:28 | <int-e> | > drop 1 [] |
| 15:40:30 | <lambdabot> | [] |
| 15:42:14 | × | azy quits (~azy@78-131-74-116.pool.digikabel.hu) (Ping timeout: 246 seconds) |
| 15:42:19 | <int-e> | Hmm what does Lisp do for (car nil) and (cdr nil)... return nil? Which would be an option for `tail` of course. |
| 15:42:49 | <int-e> | But `tail` is a counterpart of `head` and it would *also* be strange if one was defined when the other isn't. |
| 15:43:15 | <mniip> | fromJustMaybe :: Maybe a -> Maybe a |
| 15:43:18 | <danse-nr3> | nah, they have different types |
| 15:43:20 | <int-e> | mniip: :) |
| 15:43:21 | <danse-nr3> | :t last |
| 15:43:22 | <lambdabot> | [a] -> a |
| 15:43:28 | <danse-nr3> | this is the counterpart to head |
| 15:43:34 | <geekosaur> | disagree |
| 15:43:50 | <geekosaur> | head and tail are deconstructors for (:) |
| 15:43:54 | <mniip> | danse-nr3, it's the counterpart to head in the sense that `data [] a = [] | (:) { head :: a, tail :: [] a }` |
| 15:43:59 | <geekosaur> | init and last are similarly paired |
| 15:44:03 | → | azy joins (~azy@178-164-235-203.pool.digikabel.hu) |
| 15:45:35 | <int-e> | funny how odd `[] a` looks |
| 15:45:36 | <danse-nr3> | alright ... anyways, Maybe is a nice type, i do not think it would scare newcomers. Experts that keep static information avoiding type safety probably also know an answer to the awkwardness of NonEmpty |
| 15:46:38 | <int-e> | head doesn't violate type safety |
| 15:47:04 | <int-e> | unsafeCoerce does; it can cause compiled code to mistake values for pointers and crash, among other things |
| 15:47:12 | × | titibandit quits (~titibandi@user/titibandit) (Remote host closed the connection) |
| 15:48:13 | <mauke> | int-e: common lisp returns NIL for both |
| 15:48:46 | <danse-nr3> | maybe this is what i need to understand, how is `head` type safe. No exceptions in the type nor any sign it could fail. And if we consider stuff like `tail`, one should work with imagination |
| 15:48:54 | <int-e> | The semantics of Haskell isn't restricted to total functions. |
| 15:49:09 | <mauke> | there are errors other than type errors |
| 15:49:17 | <int-e> | If you only want total functions there are other languages for that. (Idris? Agda?) |
| 15:50:04 | <geekosaur> | haskell's type system doesn't encompass exceptions, either |
| 15:50:04 | <jade[m]> | imo there isn't an objective truth or answer to this, but just different views on the same problem |
| 15:50:11 | × | berberman_ quits (~berberman@user/berberman) (Quit: ZNC 1.8.2 - https://znc.in) |
| 15:50:12 | <jade[m]> | I don't really see a problem tbh |
| 15:50:23 | <geekosaur> | neither do I |
| 15:50:33 | → | berberman joins (~berberman@user/berberman) |
| 15:50:43 | <danse-nr3> | neither do I, i just see an opportunity to improve |
| 15:51:20 | <geekosaur> | you'd be better off starting from idris imo |
| 15:51:45 | <mniip> | haskell doesn't have a termination checker so your types are littered with non-termination bottoms anyway |
| 15:51:56 | <int-e> | it's a matter of pragmatism to me; if your language only has total functions then you have to prove termination all the time and that gets tedious quickly. Or, I guess, you use the codata escape hatch that these languages tend to have. |
| 15:52:21 | × | mechap quits (~mechap@user/mechap) (Quit: WeeChat 4.0.2) |
| 15:52:28 | <mniip> | seems reasonable to extend the notion of bottom to one that fails eagerly |
| 15:52:45 | <int-e> | (codata Result a = Tick (Result a) | Return a) |
| 15:53:26 | <mniip> | does Result work out as a monad? |
| 15:53:34 | <int-e> | (That's what i mean by the "codata escape hatch") |
| 15:53:54 | <mniip> | cool. Didn't know if there was a principled approach |
| 15:53:55 | <int-e> | mniip: I think it does, at least morally (where you identify x and Tick x)) |
| 15:54:06 | × | CiaoSen quits (~Jura@2a05:5800:299:1a00:664b:f0ff:fe37:9ef) (Ping timeout: 260 seconds) |
| 15:54:11 | × | azy quits (~azy@178-164-235-203.pool.digikabel.hu) (Ping timeout: 245 seconds) |
| 15:54:31 | → | danse-nr3_ joins (~francesco@151.43.156.73) |
| 15:54:31 | × | danse-nr3_ quits (~francesco@151.43.156.73) (Remote host closed the connection) |
| 15:54:41 | <mniip> | been thinking about self-hosted proof assistants |
| 15:54:58 | <int-e> | mniip: Note, I made the names up on the spot; there may be standard names that are different. |
| 15:55:02 | <mniip> | and a proof assistant needs termination checking, yet a typechecker needs to do reductions which may fail to terminate |
| 15:55:26 | × | waleee quits (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 245 seconds) |
| 15:55:52 | <int-e> | One data point is that IIRC, vector's stream fusion uses `Skip` for what I called `Tick` there. |
| 15:55:52 | → | azy joins (~azy@80-95-82-46.pool.digikabel.hu) |
| 15:56:23 | <mniip> | I don't suppose you get `fix :: (a -> Result a) -> Result a` |
| 15:57:12 | × | danse-nr3 quits (~francesco@151.43.142.135) (Ping timeout: 250 seconds) |
| 15:57:55 | <int-e> | mniip: Right, you don't. You do get undefined :: Result a though, so you can bootstrap lazy evaluation and `fix` if you percolate `Result` into all your types. |
| 15:58:14 | <mauke> | "that's just Identity with extra steps!" |
| 15:58:22 | <mniip> | no it is not! |
| 15:58:43 | <mniip> | it records the number of steps taken, which may be infinite (coinductively) |
| 15:58:43 | <int-e> | mniip: Now that I wrote this out loud it sounds horrible. |
| 16:00:45 | → | alexbiehl joins (~alexbiehl@2a02:8108:323f:ca14:a9de:be07:3a81:7285) |
| 16:01:14 | <int-e> | This has a similar flavor to Kleene's recursion theorem. |
| 16:01:18 | <mauke> | as I said: extra steps |
| 16:02:16 | <int-e> | Anyway if you just use a non-total language all this becomes easy ;-) |
| 16:02:44 | × | josias quits (~mottmatri@2001:470:69fc:105::b6c) (Remote host closed the connection) |
| 16:03:06 | → | sagax joins (~sagax_nb@user/sagax) |
| 16:11:13 | × | rainbyte quits (~rainbyte@181.31.239.226) (Remote host closed the connection) |
| 16:11:46 | → | dhil joins (~dhil@78.45.150.83.ewm.ftth.as8758.net) |
| 16:16:24 | → | _ht joins (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) |
| 16:18:24 | × | ubert quits (~Thunderbi@77.119.175.12.wireless.dyn.drei.com) (Quit: ubert) |
| 16:20:32 | × | ubert1 quits (~Thunderbi@77.119.175.12.wireless.dyn.drei.com) (Remote host closed the connection) |
| 16:21:01 | → | ubert joins (~Thunderbi@77.119.175.12.wireless.dyn.drei.com) |
| 16:21:58 | × | machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 252 seconds) |
| 16:27:28 | × | alexbiehl quits (~alexbiehl@2a02:8108:323f:ca14:a9de:be07:3a81:7285) (Remote host closed the connection) |
| 16:28:04 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 16:28:33 | × | fendor quits (~fendor@2a02:8388:1640:be00:1f28:32b1:54ac:a932) (Remote host closed the connection) |
| 16:28:57 | → | alexbiehl joins (~alexbiehl@2a02:8108:323f:ca14:a9de:be07:3a81:7285) |
| 16:36:16 | × | azy quits (~azy@80-95-82-46.pool.digikabel.hu) (Ping timeout: 245 seconds) |
| 16:37:46 | × | kitzman quits (~kitzman@user/dekenevs) (Quit: C-x C-c) |
| 16:38:12 | → | azy joins (~azy@92-249-193-183.pool.digikabel.hu) |
| 16:38:39 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:9801:f948:f484:2fb0) |
| 16:42:19 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:9801:f948:f484:2fb0) (Remote host closed the connection) |
| 16:42:34 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:9801:f948:f484:2fb0) |
| 16:46:41 | → | misterfish joins (~misterfis@84-53-85-146.bbserv.nl) |
| 16:52:52 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:9801:f948:f484:2fb0) (Remote host closed the connection) |
| 16:56:35 | × | kuribas quits (~user@ptr-17d51emwh8tjgyi2pjo.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 27.1)) |
| 17:02:06 | → | kitzman joins (~kitzman@user/dekenevs) |
| 17:02:25 | × | azy quits (~azy@92-249-193-183.pool.digikabel.hu) (Ping timeout: 240 seconds) |
| 17:02:27 | × | berberman quits (~berberman@user/berberman) (Quit: ZNC 1.8.2 - https://znc.in) |
| 17:02:48 | → | berberman joins (~berberman@user/berberman) |
| 17:04:18 | → | azy joins (~azy@178-164-206-51.pool.digikabel.hu) |
| 17:07:12 | × | coot quits (~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot) |
| 17:11:35 | → | zmt00 joins (~zmt00@user/zmt00) |
| 17:16:24 | × | trev quits (~trev@user/trev) (Quit: trev) |
| 17:18:48 | → | danse-nr3 joins (~francesco@151.43.156.114) |
| 17:19:30 | → | nick4 joins (~nick@50.86.118.19) |
| 17:22:50 | ← | L29Ah parts (~L29Ah@wikipedia/L29Ah) () |
| 17:25:57 | × | nick4 quits (~nick@50.86.118.19) (Ping timeout: 258 seconds) |
| 17:26:12 | → | zmt01 joins (~zmt00@user/zmt00) |
| 17:28:17 | × | zmt00 quits (~zmt00@user/zmt00) (Ping timeout: 246 seconds) |
| 17:31:03 | → | swamp_ joins (~zmt00@user/zmt00) |
| 17:32:37 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:9801:f948:f484:2fb0) |
| 17:33:56 | → | zmt00 joins (~zmt00@user/zmt00) |
| 17:34:00 | × | zmt01 quits (~zmt00@user/zmt00) (Ping timeout: 258 seconds) |
| 17:34:08 | × | zmt00 quits (~zmt00@user/zmt00) (Remote host closed the connection) |
| 17:34:55 | × | gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 4.0.1) |
| 17:35:08 | → | titibandit joins (~titibandi@user/titibandit) |
| 17:36:33 | × | swamp_ quits (~zmt00@user/zmt00) (Ping timeout: 246 seconds) |
| 17:36:52 | × | azy quits (~azy@178-164-206-51.pool.digikabel.hu) (Ping timeout: 250 seconds) |
| 17:37:34 | × | titibandit quits (~titibandi@user/titibandit) (Remote host closed the connection) |
| 17:38:26 | → | azy joins (~azy@213-197-76-73.pool.digikabel.hu) |
| 17:41:44 | → | bilegeek joins (~bilegeek@2600:1008:b030:17ef:4afb:621d:1786:70ad) |
| 17:47:02 | × | misterfish quits (~misterfis@84-53-85-146.bbserv.nl) (Ping timeout: 245 seconds) |
| 17:47:08 | <danse-nr3> | sorry, had to go |
| 17:47:39 | <danse-nr3> | geekosaur, you are right, i never used exceptions and i thought that they leave track in the types :-/ |
| 17:56:03 | <davean> | There are systems for tracking potential exceptions in the types but no one really uses them |
| 17:56:32 | × | chele quits (~chele@user/chele) (Remote host closed the connection) |
| 17:57:23 | <davean> | https://hackage.haskell.org/package/control-monad-exception as an example, danse-nr3, it just can't can't possibly track all exceptions. |
| 18:00:27 | <danse-nr3> | cheers |
| 18:03:35 | <davean> | hat you can do and what is wise to do, or what you can do while still having other beneficial properties are all different things. |
| 18:03:59 | <davean> | and do remember that you run into fundimental issues about computation and completeness when you try to catch all the edge cases. |
| 18:04:22 | <davean> | (So there will be programs you can not write under some restrictions) |
| 18:05:23 | × | ripspin quits (~chatzilla@1.145.144.100) (Remote host closed the connection) |
| 18:07:15 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:9801:f948:f484:2fb0) (Remote host closed the connection) |
| 18:07:17 | <danse-nr3> | yeah well i was mostly fighting for a safer `head`, nothing too impossible :) |
| 18:07:21 | × | alexbiehl quits (~alexbiehl@2a02:8108:323f:ca14:a9de:be07:3a81:7285) (Remote host closed the connection) |
| 18:08:31 | <davean> | danse-nr3: lots of safer heads, take a look at the 'safe' package |
| 18:08:35 | → | alexbiehl joins (~alexbiehl@2a02:8108:323f:ca14:a9de:be07:3a81:7285) |
| 18:08:39 | <davean> | also look at NonEmpty |
| 18:09:08 | × | azy quits (~azy@213-197-76-73.pool.digikabel.hu) (Ping timeout: 272 seconds) |
| 18:10:24 | → | waleee joins (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) |
| 18:10:32 | → | azy joins (~azy@87-97-2-213.pool.digikabel.hu) |
| 18:11:06 | <davean> | I actually use head a ton myself. For various reasons and various ways. I don't think its a bad thing to have handy but it does get a lot of hate for some good reasons. |
| 18:11:23 | × | alexbiehl quits (~alexbiehl@2a02:8108:323f:ca14:a9de:be07:3a81:7285) (Remote host closed the connection) |
| 18:14:08 | × | mstksg quits (~jle`@cpe-23-240-75-236.socal.res.rr.com) (Ping timeout: 246 seconds) |
| 18:16:06 | → | mstksg joins (~jle`@cpe-23-240-75-236.socal.res.rr.com) |
| 18:24:58 | <monochrom> | I am OK with head too in e.g. map head . group |
| 18:28:24 | <davean> | Right |
| 18:28:36 | <davean> | Spending code to cover cases that can't exist is a waste. |
| 18:29:09 | <davean> | is it locally obvious thats not going to happen? Good |
| 18:29:30 | <davean> | Now one could say like NonEmpty should solve this, but we'd need an entire new prelude for that to be true |
| 18:29:52 | <monochrom> | I feel like people are generally very religious about coding guidelines including "split 'f x = g x' into 4 lines to minimize diff when you change something" and "don't use head". |
| 18:30:50 | <davean> | Yah and my religion is that that is bad |
| 18:31:23 | <mniip> | I am strongly of the opinion that group should have a different type |
| 18:31:45 | <davean> | well thats the NonEmpty claim, right? |
| 18:31:55 | <mniip> | group is not in Prelude |
| 18:32:01 | <mniip> | and NonEmpty is otherwise in base, so |
| 18:32:42 | <mniip> | :t Data.List.NonEmpty.group -- we do have |
| 18:32:43 | <lambdabot> | (Foldable f, Eq a) => f a -> [NonEmpty a] |
| 18:33:45 | <davean> | yes but that doesn't map to all the other things in Prelude that are designed for list, and the libraries that are based off that. |
| 18:33:52 | → | misterfish joins (~misterfis@84-53-85-146.bbserv.nl) |
| 18:33:54 | <davean> | Which was my point above |
| 18:34:09 | <davean> | If I only had to work with my code I could do that everywhere |
| 18:36:53 | × | danse-nr3 quits (~francesco@151.43.156.114) (Ping timeout: 246 seconds) |
| 18:38:42 | × | azy quits (~azy@87-97-2-213.pool.digikabel.hu) (Ping timeout: 245 seconds) |
| 18:39:52 | → | axel_ joins (~axel@ipbcc0c12d.dynamic.kabel-deutschland.de) |
| 18:40:39 | → | azy joins (~azy@87-97-13-52.pool.digikabel.hu) |
| 18:43:24 | × | axel_ quits (~axel@ipbcc0c12d.dynamic.kabel-deutschland.de) (Client Quit) |
| 18:44:00 | → | danse-nr3 joins (~francesco@151.43.156.114) |
| 18:44:08 | × | danse-nr3 quits (~francesco@151.43.156.114) (Remote host closed the connection) |
| 18:44:41 | → | danse-nr3 joins (~francesco@151.43.156.114) |
| 18:47:23 | × | dcoutts quits (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Ping timeout: 246 seconds) |
| 18:49:40 | <danse-nr3> | davean, yeah i know about `safe`, other preludes and NonEmpty, but the most accessible default behaviour matters. Anyways, not a big deal |
| 18:51:58 | <yushyin> | so, pattern matching |
| 18:52:12 | <danse-nr3> | ? |
| 18:52:44 | <monochrom> | I like pattern matching. |
| 18:52:56 | <danse-nr3> | yeah, it is great |
| 18:53:22 | <monochrom> | http://www.vex.net/~trebla/haskell/crossroad.xhtml is how much I like pattern matching. |
| 18:56:06 | → | alexbiehl joins (~alexbiehl@ip4d14fda4.dynamic.kabel-deutschland.de) |
| 18:58:09 | × | alexbiehl quits (~alexbiehl@ip4d14fda4.dynamic.kabel-deutschland.de) (Remote host closed the connection) |
| 18:58:59 | × | bontaq quits (~user@ool-45779b84.dyn.optonline.net) (Remote host closed the connection) |
| 18:59:14 | → | bontaq joins (~user@ool-45779b84.dyn.optonline.net) |
| 19:01:56 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 19:02:23 | × | Inst quits (~Inst@2601:6c4:4081:2fc0:c949:b3e0:9b04:3345) (Remote host closed the connection) |
| 19:02:50 | → | Inst joins (~Inst@2601:6c4:4081:2fc0:c949:b3e0:9b04:3345) |
| 19:06:33 | → | mango joins (~finn@176-151-21-224.abo.bbox.fr) |
| 19:07:08 | → | Guest8732 joins (~finn@176-151-21-224.abo.bbox.fr) |
| 19:07:45 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:9801:f948:f484:2fb0) |
| 19:09:55 | → | trev joins (~trev@user/trev) |
| 19:10:00 | → | mechap joins (~mechap@user/mechap) |
| 19:12:02 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:9801:f948:f484:2fb0) (Ping timeout: 246 seconds) |
| 19:12:35 | × | azy quits (~azy@87-97-13-52.pool.digikabel.hu) (Ping timeout: 264 seconds) |
| 19:13:43 | × | bilegeek quits (~bilegeek@2600:1008:b030:17ef:4afb:621d:1786:70ad) (Quit: Leaving) |
| 19:13:48 | → | azy joins (~azy@178-164-171-242.pool.digikabel.hu) |
| 19:20:04 | × | mango quits (~finn@176-151-21-224.abo.bbox.fr) (Ping timeout: 272 seconds) |
| 19:20:46 | → | nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
| 19:21:48 | → | nick4 joins (~nick@2600:8807:9084:7800:7d9d:fc42:d20d:9e35) |
| 19:24:44 | → | machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net) |
| 19:25:40 | × | nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 252 seconds) |
| 19:26:15 | × | trev quits (~trev@user/trev) (Quit: trev) |
| 19:28:08 | × | hdggxin quits (~hdggxin@122.175.41.19) (Ping timeout: 246 seconds) |
| 19:30:17 | × | Everything quits (~Everythin@static.208.206.21.65.clients.your-server.de) (Quit: leaving) |
| 19:42:29 | × | Guest8732 quits (~finn@176-151-21-224.abo.bbox.fr) (Ping timeout: 246 seconds) |
| 19:42:52 | × | azy quits (~azy@178-164-171-242.pool.digikabel.hu) (Ping timeout: 272 seconds) |
| 19:43:52 | → | azy joins (~azy@80-95-82-10.pool.digikabel.hu) |
| 19:45:35 | × | dhil quits (~dhil@78.45.150.83.ewm.ftth.as8758.net) (Ping timeout: 264 seconds) |
| 19:54:45 | → | danse-nr3_ joins (~francesco@151.43.135.188) |
| 19:57:02 | × | danse-nr3 quits (~francesco@151.43.156.114) (Ping timeout: 246 seconds) |
| 20:07:49 | <jade[m]> | is there a way to ask hoogle for functions that return some Foo regardless of the args |
| 20:11:20 | × | _ht quits (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Quit: _ht) |
| 20:12:06 | × | azy quits (~azy@80-95-82-10.pool.digikabel.hu) (Ping timeout: 245 seconds) |
| 20:12:15 | <danse-nr3_> | lowercase letters seem to work, but you need to guess or try out different numbers of args |
| 20:13:58 | → | azy joins (~azy@87-97-13-59.pool.digikabel.hu) |
| 20:14:22 | <jade[m]> | all I get for that is unsafeCoerce and friends |
| 20:16:47 | × | ubert quits (~Thunderbi@77.119.175.12.wireless.dyn.drei.com) (Ping timeout: 246 seconds) |
| 20:18:10 | <danse-nr3_> | also for me those are the first results. The other results matching my type are at the bottom |
| 20:22:23 | × | danse-nr3_ quits (~francesco@151.43.135.188) (Quit: Leaving) |
| 20:26:02 | → | dcoutts joins (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) |
| 20:29:47 | → | ai5lk joins (~ai5lk@209-188-121-236.taosnet.com) |
| 20:31:24 | → | titibandit joins (~titibandi@user/titibandit) |
| 20:34:44 | × | Inst quits (~Inst@2601:6c4:4081:2fc0:c949:b3e0:9b04:3345) (Remote host closed the connection) |
| 20:35:02 | → | Guest8732 joins (~finn@176-151-21-224.abo.bbox.fr) |
| 20:35:03 | → | Inst joins (~Inst@2601:6c4:4081:2fc0:c949:b3e0:9b04:3345) |
| 20:37:20 | × | fweht quits (uid404746@id-404746.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 20:38:36 | × | azy quits (~azy@87-97-13-59.pool.digikabel.hu) (Ping timeout: 272 seconds) |
| 20:39:57 | → | azy joins (~azy@94-21-33-111.pool.digikabel.hu) |
| 20:41:43 | × | thegeekinside quits (~thegeekin@189.217.90.138) (Read error: Connection reset by peer) |
| 20:52:25 | → | hdggxin joins (~hdggxin@122.175.41.19) |
| 20:54:26 | × | azy quits (~azy@94-21-33-111.pool.digikabel.hu) (Ping timeout: 272 seconds) |
| 20:55:48 | → | azy joins (~azy@77-234-92-243.pool.digikabel.hu) |
| 20:59:43 | × | ai5lk quits (~ai5lk@209-188-121-236.taosnet.com) (Quit: WeeChat 3.8) |
| 21:07:16 | <hippoid> | is it possible to check that a function returns undefined? I'm trying to figure out how to write a unit test for that with tasty. example -- https://termbin.com/pjv5 |
| 21:09:18 | <Rembane> | hippoid: There's quite a bit of discussion regarding this here: https://stackoverflow.com/questions/9392129/detect-bottom-value-in-haskell |
| 21:09:55 | → | arahael_ joins (~arahael@115-64-199-191.tpgi.com.au) |
| 21:09:59 | <Rembane> | hippoid: The short answer is: use Maybe or Either instead, because then you can see what's happening in the type signature. |
| 21:11:01 | <davean> | ttps://hackage.haskell.org/package/ChasingBottoms might help here though |
| 21:11:08 | <hippoid> | Rembane: ok, i understand your point about Maybe or Either. this is more an academic exercise, opposed to production code, to see if it's possible. |
| 21:11:13 | <glguy> | I've been using hspec and it has stuff like this https://hackage.haskell.org/package/hspec-expectations-0.8.3/docs/Test-Hspec-Expectations.html#g:2 |
| 21:11:36 | <monochrom> | IMO there are only two rational specifications for myFunction: |
| 21:12:19 | <davean> | hippoid: remember, everything that isn't defined, no matter how its not defined, is bottom |
| 21:12:32 | <monochrom> | 1. If myFunction is allowed, but not required, to be a partial function, then requiring it to give bottom is over-specification, you should just leave it open instead. |
| 21:12:33 | <davean> | so there can't be any general test because bottom isn't anything specific. |
| 21:12:51 | <monochrom> | 2. Else, what everyone is saying, use Maybe. |
| 21:13:16 | <mauke> | evalute foo `catch` \e -> ... |
| 21:13:37 | <Rembane> | hippoid: No worries, is TDD involved in this question in some way? |
| 21:13:40 | <davean> | mauke: that checks for exceptions. |
| 21:14:03 | <mauke> | yes? |
| 21:14:09 | <monochrom> | Unfortunately, undefined manifests as an exception, too. |
| 21:14:14 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 21:14:38 | <monochrom> | ChasingBottoms probably does exactly that. |
| 21:14:40 | <mauke> | @src undefined |
| 21:14:41 | <lambdabot> | undefined = error "Prelude.undefined" |
| 21:14:58 | <glguy> | https://gist.github.com/glguy/61ec83f6bebbe2bc39837b6390ea49dc |
| 21:15:01 | × | arahael_ quits (~arahael@115-64-199-191.tpgi.com.au) (Ping timeout: 245 seconds) |
| 21:15:31 | <hippoid> | Rembane: no not really. I'm working through the book Haskell From First Principles, and have decided to write test suites as I go along to better acquaint myself with cabal and Tasty. One set of exercises asks the reader to predict whether an expression will return undefined or not. The exercises are related to the discussion of normal form and weak head normal form. |
| 21:15:45 | <glguy> | hippoid: that gist shows an example of what I think you asked for with example output |
| 21:15:51 | <monochrom> | Correction: ChasingBottom is that on steroid. |
| 21:16:01 | <mauke> | glguy: nice |
| 21:16:14 | <monochrom> | "evaluate the thing under a timeout `catch` \e -> case e of ...." |
| 21:16:42 | <hippoid> | glguy: thank you. i wish hunit had something like that |
| 21:17:01 | <glguy> | it probably does, I've just been using hspec lately |
| 21:17:03 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 21:17:29 | <monochrom> | I think the point of the exercise is to test your understanding, not computer's understanding. |
| 21:17:40 | <davean> | hippoid: its haaskell, most of these things can use each other's too. |
| 21:18:05 | <glguy> | hippoid: you can use evaluate and catch yourself and then assert accordingly |
| 21:18:23 | <glguy> | In this case you probably want `try` instead of `catch` , but it's not a big difference |
| 21:19:19 | <monochrom> | Because by a Chinese Room argument, the computer already understands this. There is no need to test it. |
| 21:19:55 | <monochrom> | The "intelligent" human, however... |
| 21:20:32 | <monochrom> | And for the purpose of using the computer to check your answer, the REPL is sufficient. KISS. |
| 21:20:51 | <Rembane> | hippoid: Cool! |
| 21:20:52 | <mauke> | I will not kiss the computer |
| 21:21:00 | <monochrom> | Example. I predict that head [] = 4, not bottom. |
| 21:21:02 | <monochrom> | > head [] |
| 21:21:03 | <lambdabot> | *Exception: Prelude.head: empty list |
| 21:21:18 | <mauke> | the more interesting question is why head [] is not a type error |
| 21:21:26 | <monochrom> | That says my prediction was wrong. There is nothing to catch. |
| 21:21:59 | <davean> | mauke: what if we put it in a very human like case? |
| 21:22:19 | <dolio> | Build a model of Haskell in Agda, and prove that your function returns undefined. |
| 21:22:23 | <monochrom> | Then you're just kissing the case! >:D |
| 21:22:36 | <mauke> | what, like a pacemaker? |
| 21:22:43 | <monochrom> | hahahaha |
| 21:23:25 | <monochrom> | I prefer s/Agda/Lean/ but yeah. |
| 21:23:36 | <dolio> | Eh. |
| 21:25:28 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 272 seconds) |
| 21:27:37 | <monochrom> | I suppose you also want the irony of Haskell expressed in Agda but Agda is expressed in Haskell. :) |
| 21:28:05 | <dolio> | Oh, that's true. |
| 21:32:05 | → | cheater_ joins (~Username@user/cheater) |
| 21:34:11 | × | cheater quits (~Username@user/cheater) (Ping timeout: 245 seconds) |
| 21:34:20 | cheater_ | is now known as cheater |
| 21:35:57 | → | Yumemi_ joins (~Yumemi@chamoin.net) |
| 21:38:50 | → | thelounge793 joins (~thelounge@2a05:f480:1400:24b2:5400:4ff:fe76:a8f3) |
| 21:38:50 | × | Yumemi quits (~Yumemi@chamoin.net) (Ping timeout: 260 seconds) |
| 21:41:08 | × | Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection) |
| 21:44:56 | → | gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) |
| 21:49:14 | ← | justsomeguy parts (~justsomeg@user/justsomeguy) (WeeChat 3.6) |
| 21:50:12 | × | mei quits (~mei@user/mei) (Remote host closed the connection) |
| 21:52:16 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 21:54:09 | × | titibandit quits (~titibandi@user/titibandit) (Remote host closed the connection) |
| 21:55:31 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 21:55:52 | × | jonathan quits (~jonathan@c83-252-3-92.bredband.tele2.se) (Ping timeout: 272 seconds) |
| 21:57:52 | → | mei joins (~mei@user/mei) |
| 22:07:37 | × | mechap quits (~mechap@user/mechap) (Quit: WeeChat 4.0.2) |
| 22:08:13 | → | mechap joins (~mechap@user/mechap) |
| 22:09:11 | × | Square quits (~Square@user/square) (Ping timeout: 245 seconds) |
| 22:09:29 | → | notzmv joins (~zmv@user/notzmv) |
| 22:10:53 | × | azy quits (~azy@77-234-92-243.pool.digikabel.hu) (Ping timeout: 246 seconds) |
| 22:12:37 | → | azy joins (~azy@84-236-122-149.pool.digikabel.hu) |
| 22:15:59 | × | sagax quits (~sagax_nb@user/sagax) (Ping timeout: 246 seconds) |
| 22:17:48 | → | wroathe joins (~wroathe@user/wroathe) |
| 22:19:23 | → | ft joins (~ft@p3e9bc856.dip0.t-ipconnect.de) |
| 22:22:08 | × | michalz quits (~michalz@185.246.207.217) (Remote host closed the connection) |
| 22:22:33 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 22:23:52 | × | gmg quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 22:32:08 | × | gurkenglas quits (~gurkengla@dynamic-002-247-243-208.2.247.pool.telefonica.de) (Read error: Connection reset by peer) |
| 22:33:52 | × | nick4 quits (~nick@2600:8807:9084:7800:7d9d:fc42:d20d:9e35) (Ping timeout: 240 seconds) |
| 22:36:38 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds) |
| 22:36:41 | → | thegeekinside joins (~thegeekin@189.217.90.138) |
| 22:37:02 | × | acidjnk quits (~acidjnk@p200300d6e7072f560cf848d8868092f6.dip0.t-ipconnect.de) (Ping timeout: 245 seconds) |
| 22:43:23 | → | pickleju1ce joins (~root@172.56.220.124) |
| 22:46:12 | × | picklejuice quits (~root@c-73-196-164-60.hsd1.nj.comcast.net) (Ping timeout: 245 seconds) |
| 22:47:34 | × | jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 260 seconds) |
| 22:48:16 | → | Everything joins (~Everythin@static.208.206.21.65.clients.your-server.de) |
| 22:59:12 | × | Guest8732 quits (~finn@176-151-21-224.abo.bbox.fr) (Ping timeout: 272 seconds) |
| 23:07:13 | → | dobblego joins (~dibblego@116-255-1-151.ip4.superloop.au) |
| 23:07:13 | × | dobblego quits (~dibblego@116-255-1-151.ip4.superloop.au) (Changing host) |
| 23:07:13 | → | dobblego joins (~dibblego@haskell/developer/dibblego) |
| 23:07:13 | × | dibblego quits (~dibblego@haskell/developer/dibblego) (Read error: Connection reset by peer) |
| 23:07:38 | dobblego | is now known as dibblego |
| 23:10:50 | <maerwald[m]> | https://github.com/jtdaugherty/vty/issues/260 |
| 23:10:51 | <maerwald[m]> | Woo |
| 23:11:15 | <glguy> | glirc for all ;-) |
| 23:13:08 | × | azy quits (~azy@84-236-122-149.pool.digikabel.hu) (Ping timeout: 272 seconds) |
| 23:14:14 | → | azy joins (~azy@94-21-82-1.pool.digikabel.hu) |
| 23:15:55 | × | misterfish quits (~misterfis@84-53-85-146.bbserv.nl) (Ping timeout: 240 seconds) |
| 23:22:18 | → | nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
| 23:23:16 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 272 seconds) |
| 23:25:03 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 23:26:33 | → | son0p joins (~ff@181.136.122.143) |
| 23:27:02 | × | nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 245 seconds) |
| 23:29:30 | × | mud quits (~mud@user/kadoban) (Ping timeout: 252 seconds) |
| 23:30:28 | × | bontaq quits (~user@ool-45779b84.dyn.optonline.net) (Ping timeout: 250 seconds) |
| 23:32:01 | → | mud joins (~mud@user/kadoban) |
| 23:35:09 | × | hdggxin quits (~hdggxin@122.175.41.19) (Read error: Connection reset by peer) |
| 23:35:31 | infinity0 | is now known as Guest6325 |
| 23:35:45 | → | infinity0 joins (~infinity0@pwned.gg) |
| 23:36:34 | × | Guest6325 quits (~infinity0@pwned.gg) (Ping timeout: 272 seconds) |
| 23:36:36 | → | hdggxin joins (~hdggxin@122.175.41.19) |
| 23:37:58 | → | mauke_ joins (~mauke@user/mauke) |
| 23:39:13 | → | infinity0_ joins (~infinity0@pwned.gg) |
| 23:39:13 | infinity0 | is now known as Guest4083 |
| 23:39:13 | infinity0_ | is now known as infinity0 |
| 23:39:34 | × | mauke quits (~mauke@user/mauke) (Ping timeout: 250 seconds) |
| 23:39:34 | mauke_ | is now known as mauke |
| 23:40:22 | × | Guest4083 quits (~infinity0@pwned.gg) (Ping timeout: 272 seconds) |
| 23:45:22 | × | phma quits (phma@2001:5b0:210b:e378:a2bb:6ce4:5380:526f) (Read error: Connection reset by peer) |
| 23:45:52 | → | phma joins (~phma@host-67-44-208-43.hnremote.net) |
| 23:46:12 | → | pavonia joins (~user@user/siracusa) |
| 23:54:22 | × | thegeekinside quits (~thegeekin@189.217.90.138) (Remote host closed the connection) |
All times are in UTC on 2023-07-18.