Home liberachat/#haskell: Logs Calendar

Logs on 2023-10-23 (liberachat/#haskell)

00:01:04 <Axman6> =)
00:01:41 <Axman6> probie: I wish Go included Functor in the free plan
00:01:55 <Axman6> And Elm while we're at it
00:04:07 <EvanR> how to upgrade, go -> elm -> scalaz -> haskell -> neohaskell? xD
00:04:39 <geekosaur> neohaskell supposedly is an entry point to learning haskell, so swap them
00:05:03 <monochrom> After haskell, consider agda or lean :)
00:05:18 <geekosaur> idris
00:05:29 <monochrom> yeah
00:07:14 <jackdk> geekosaur: have they shipped anything yet?
00:07:33 <geekosaur> not so far as I'm aware
00:07:41 <geekosaur> not that I've been paying close attention
00:07:48 <dibblego> the scala train is a long journey to realising it was all a waste of time
00:10:19 dhruvasagar joins (~dhruvasag@49.207.194.211)
00:12:15 [_] joins (~itchyjunk@user/itchyjunk/x-7353470)
00:14:56 × dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 255 seconds)
00:16:16 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 272 seconds)
00:21:08 dhruvasagar joins (~dhruvasag@49.207.194.211)
00:25:24 × dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 240 seconds)
00:26:51 dhruvasagar joins (~dhruvasag@49.207.194.211)
00:36:16 × John_Ivan quits (~John_Ivan@user/john-ivan/x-1515935) (Quit: Disrupting the dragon's slumber one time too often shall eventually bestow upon all an empirical and indiscriminate conflagration that will last for all goddamn eternity.)
00:36:32 × dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 272 seconds)
00:50:51 × falafel quits (~falafel@62.175.113.194.dyn.user.ono.com) (Ping timeout: 258 seconds)
00:59:15 <probie> https://github.com/neohaskell/NeoHaskell hasn't had any commits pushed in the last month, but the proposals repo has https://github.com/neohaskell/NHEP
00:59:19 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 252 seconds)
00:59:21 nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net)
01:00:12 Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
01:02:19 <EvanR> holy crap the proposals site CSS
01:02:32 <EvanR> somehow it's worse than haskell
01:03:36 <EvanR> proposal 6: the list type should be implemented as Vector or Data.Sequence instead of linked list
01:04:13 × nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 255 seconds)
01:04:45 <EvanR> admits that haskells linked list is more efficient than either of these in many cases, in which case they recommend using another data type like Queue
01:04:52 <EvanR> (I guess they mean Stack)
01:05:12 <probie> What's with all the list hate?
01:05:24 <dibblego> string addiction
01:05:30 <EvanR> <- concerned
01:05:46 <probie> Strings should not be a `[Char]`, but that's a separate issue
01:05:57 <dibblego> addictions are complicated
01:06:09 <EvanR> that's proposal 5, make String = Text
01:06:35 <EvanR> but also suggests makine it equal ByteString xD
01:07:23 <EvanR> String = ByteString has going for it that every other languages accidentally has done this already
01:07:37 <EvanR> so we won't be alone is messing that up
01:07:40 <EvanR> in*
01:07:47 <monochrom> If Text=ByteString, then []=Vector=Queue=Identity=IO.
01:07:48 <probie> EvanR: Not quite - Golang didn't mess this up.
01:07:56 <EvanR> really? impressive
01:08:29 × otto_s quits (~user@p4ff27d6b.dip0.t-ipconnect.de) (Ping timeout: 258 seconds)
01:08:48 <probie> it probably helps that Rob Pike was involved in creating UTF-8, so it's front of mind for him
01:08:55 <monochrom> Oh just reinterpret "every other language" as in "every other line" so only half of the languages >:D
01:08:56 <EvanR> when in doubt make the same mistakes that anything anyone else heard of has made
01:09:48 × waleee quits (~waleee@2001:9b0:21c:e600:f2f3:f744:435d:137c) (Ping timeout: 240 seconds)
01:10:14 otto_s joins (~user@p5b044a8c.dip0.t-ipconnect.de)
01:12:59 <dsal> I think the written word was a mistake and there's no way to do it right.
01:18:14 <probie> I feel like there's a joke to be made about Arabic, Aramaic, Farsi, Hebrew etc. doing it left
01:18:29 <yin> Words are easy like the wind, faithful friends are hard to find.
01:18:59 <probie> False friends are a Gift
01:20:21 <geekosaur> in German, I presume?
01:20:23 <probie> https://en.wikipedia.org/wiki/False_friend
01:20:49 <probie> geekosaur: that was indeed the joke
01:22:18 dhruvasagar joins (~dhruvasag@49.207.194.211)
01:24:41 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 260 seconds)
01:26:04 × CiaoSen quits (~Jura@2a05:5800:2be:1b00:664b:f0ff:fe37:9ef) (Ping timeout: 248 seconds)
01:27:12 × dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 272 seconds)
01:28:13 CiaoSen joins (~Jura@2a05:5800:2cd:b800:664b:f0ff:fe37:9ef)
01:29:13 <EvanR> the same words mean fresh bread and stale bread in two languages, oof
01:30:10 <EvanR> return is a false friend I guess
01:33:39 dhruvasagar joins (~dhruvasag@49.207.194.211)
01:38:20 <probie> Out of curiosity, does anyone know what datatype NeoHaskell plans to use for things which are to be iterated over once instead of lists? It doesn't really seem to address that in the proposal to not use lists
01:38:36 × dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 272 seconds)
01:41:31 <EvanR> technically Vector would work as well as it does in ruby
01:41:37 <EvanR> for that
01:42:13 <EvanR> or maybe the assumption is the normal list type will be used qualified
01:43:49 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
01:46:49 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:7c71:e1a2:664b:2a25) (Remote host closed the connection)
01:47:35 notzmv joins (~zmv@user/notzmv)
01:54:58 dhruvasagar joins (~dhruvasag@49.207.194.211)
01:55:10 <geekosaur> someone mentioned Queue earlier, I think
01:55:34 <geekosaur> [23 01:04:45] <EvanR> admits that haskells linked list is more efficient than either of these in many cases, in which case they recommend using another data type like Queue
01:55:48 <Inst> what's the difference between random and random.fu besides rudeness?
01:56:20 <geekosaur> it's not intended to be rudeness as in a certain four letter word, it's a reference to kung fu
01:56:48 <geekosaur> and random 1.1 picked up a lot of what random-fu offers, yes
01:56:56 <Inst> bad joke on my part, i prefer f for arbitrary function name, u for arbitrary value name
01:56:56 <geekosaur> but not all
01:57:02 dhruvasagar1 joins (~dhruvasag@37.19.205.196)
01:57:08 × dhruvasagar quits (~dhruvasag@49.207.194.211) (Read error: Connection reset by peer)
01:57:27 <Inst> they actually share 1 maintainer
01:58:01 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5)
01:59:49 <geekosaur> I think mostly at this point it's just backward compatibility for folks who switched to random-fu back in the random-1.0 days
02:00:28 <geekosaur> but I have heard of folks who think random-fu still does some things better than random, and random's interface would now be hard to change to offer the same
02:01:59 <geekosaur> I don't recall details at this point though
02:02:27 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:7c71:e1a2:664b:2a25)
02:04:23 <geekosaur> one thing I think random offers but random-fu doesn't is splitting generators; there's been a long-running argument over whether splitting is actually useful and can be trusted to make safe generators
02:05:15 <geekosaur> (splitting is something you would do if you need to make a new random generator given an existing one; consider making a new thread, which should have its own independent generator)
02:12:22 <Inst> i see, as opposed to stuffing it in MVar or TVar and having each thread read the shared generator
02:13:21 <geekosaur> yes. you split the generator, keep one of the new ones, give the new thread the other. much faster than having to coordinate access via an MVar or etc.
02:13:39 × santiagopim quits (~user@90.167.66.131) (Ping timeout: 258 seconds)
02:14:44 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
02:14:44 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
02:14:44 finn_elija is now known as FinnElija
02:15:11 × arahael quits (~arahael@119-18-2-212.771202.syd.nbn.aussiebb.net) (Ping timeout: 258 seconds)
02:32:29 arahael joins (~arahael@1.145.66.50)
02:33:34 × Inst quits (~Inst@120.244.192.250) (Read error: Connection reset by peer)
02:56:12 × ddellacosta quits (~ddellacos@ool-44c738de.dyn.optonline.net) (Ping timeout: 258 seconds)
02:57:56 ddellacosta joins (~ddellacos@ool-44c738de.dyn.optonline.net)
03:03:28 × td_ quits (~td@i5387090A.versanet.de) (Ping timeout: 272 seconds)
03:05:05 td_ joins (~td@i53870920.versanet.de)
03:12:23 eggplant_ joins (~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f)
03:12:41 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:7c71:e1a2:664b:2a25) (Ping timeout: 246 seconds)
03:14:24 aforemny_ joins (~aforemny@2001:9e8:6cdc:d800:4073:3320:51a8:3861)
03:15:55 × aforemny quits (~aforemny@i59F516CF.versanet.de) (Ping timeout: 264 seconds)
03:16:08 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 258 seconds)
03:29:22 azimut joins (~azimut@gateway/tor-sasl/azimut)
03:29:22 <mauke> <EvanR> String = ByteString has going for it that every other languages accidentally has done this already <- hey, maxBound :: Char in Perl is '\9223372036854775807'
03:29:38 <mauke> even Haskell can't do that :-)
03:31:30 <mauke> <probie> Out of curiosity, does anyone know what datatype NeoHaskell plans to use for things which are to be iterated over once instead of lists? <- I wonder how they would feel about Stream (Of a) m ()
03:35:31 × arahael quits (~arahael@1.145.66.50) (Ping timeout: 252 seconds)
04:00:43 × actioninja quits (~actioninj@user/actioninja) (Quit: see ya mane)
04:01:11 actioninja joins (~actioninj@user/actioninja)
04:03:37 szkl joins (uid110435@id-110435.uxbridge.irccloud.com)
04:06:35 _ht joins (~Thunderbi@28-52-174-82.ftth.glasoperator.nl)
04:08:39 × CiaoSen quits (~Jura@2a05:5800:2cd:b800:664b:f0ff:fe37:9ef) (Ping timeout: 258 seconds)
04:19:41 Pseudonym joins (~IceChat95@203.214.86.172)
04:27:34 michalz joins (~michalz@185.246.207.215)
04:27:37 <Pseudonym> Kinda bummed to learn that David Turner died this week. RIP.
04:30:18 <jackdk> Well, damn. I'd been hacking on some stuff based on his old research just recently. RIP
04:30:18 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
04:31:03 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
04:31:36 <jackdk> https://twitter.com/FrancescoC/status/1716157062122438873 is the only thing I can see so far, so it must be very recent news
04:32:05 <Pseudonym> Yeah, apparently it was a few days ago, but it only started reaching the community today.
04:39:08 cheater_ joins (~Username@user/cheater)
04:42:26 × cheater quits (~Username@user/cheater) (Ping timeout: 260 seconds)
04:42:33 cheater_ is now known as cheater
04:43:02 rosco joins (~rosco@yp-150-69.tm.net.my)
04:44:05 lisbeths joins (uid135845@id-135845.lymington.irccloud.com)
04:46:06 Vajb joins (~Vajb@85-76-79-129-nat.elisa-mobile.fi)
04:47:54 <probie> Wikipedia has been updated
04:48:22 <probie> (I checked because I couldn't remember if he was the Miranda guy or not)
04:49:40 <probie> mauke: I think it'd be against their goals of "easy to use" - their target audience is people who know some language like Java, want to be quickly productive and don't want to spend much time learning new things
04:50:49 <jackdk> probie: https://en.wikipedia.org/w/index.php?title=David_Turner_%28computer_scientist%29&diff=1181414085&oldid=1181088093 non-logged-in user, no source as yet
04:51:27 × b_jonas quits (~x@89.134.28.176) (Read error: Connection reset by peer)
04:56:44 × Vajb quits (~Vajb@85-76-79-129-nat.elisa-mobile.fi) (Ping timeout: 245 seconds)
04:57:03 Vajb joins (~Vajb@2001:999:708:a4c2:fac0:4b47:e109:420c)
05:00:52 nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net)
05:05:27 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 240 seconds)
05:05:43 × nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 264 seconds)
05:06:01 arahael joins (~arahael@119-18-2-212.771202.syd.nbn.aussiebb.net)
05:09:01 × segfaultfizzbuzz quits (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) (Ping timeout: 255 seconds)
05:12:01 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
05:17:27 takuan joins (~takuan@178-116-218-225.access.telenet.be)
05:22:55 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
05:24:33 takuan_dozo joins (~takuan@178-116-218-225.access.telenet.be)
05:24:33 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Read error: Connection reset by peer)
05:24:33 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
05:25:03 × rgw quits (~R@2605:a601:a0df:5600:28a6:bcb9:bb55:dff5) (Read error: Connection reset by peer)
05:26:12 aljazmc joins (~aljazmc@user/aljazmc)
05:29:32 simendsjo joins (~user@84.211.91.241)
05:30:52 euleritian joins (~euleritia@dynamic-046-114-205-056.46.114.pool.telefonica.de)
05:32:30 × tzh quits (~tzh@c-71-193-181-0.hsd1.or.comcast.net) (Quit: zzz)
05:36:28 × aljazmc quits (~aljazmc@user/aljazmc) (Remote host closed the connection)
05:36:55 aljazmc joins (~aljazmc@user/aljazmc)
05:38:36 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
05:40:13 × _ht quits (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Quit: _ht)
05:49:43 Feuermagier joins (~Feuermagi@user/feuermagier)
06:01:40 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
06:12:38 × szkl quits (uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
06:14:14 × Vajb quits (~Vajb@2001:999:708:a4c2:fac0:4b47:e109:420c) (Ping timeout: 245 seconds)
06:14:28 × aljazmc quits (~aljazmc@user/aljazmc) (Quit: Leaving)
06:14:51 aljazmc joins (~aljazmc@user/aljazmc)
06:17:43 × ft quits (~ft@p4fc2a529.dip0.t-ipconnect.de) (Quit: leaving)
06:18:18 × aljazmc quits (~aljazmc@user/aljazmc) (Remote host closed the connection)
06:18:40 aljazmc joins (~aljazmc@user/aljazmc)
06:20:09 × aljazmc quits (~aljazmc@user/aljazmc) (Remote host closed the connection)
06:20:20 ShalokShalom joins (~ShalokSha@17-14-5.cgnat.fonira.net)
06:21:00 aljazmc joins (~aljazmc@user/aljazmc)
06:21:13 <ShalokShalom> Implementing Result or Maybe in another language has probably implications that are negative, if done with untagged union types, yes?
06:25:04 × brandly quits (~brandly@c-73-68-15-46.hsd1.ma.comcast.net) (Ping timeout: 255 seconds)
06:28:47 × euleritian quits (~euleritia@dynamic-046-114-205-056.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
06:29:06 euleritian joins (~euleritia@77.22.252.56)
06:32:27 sm joins (~sm@plaintextaccounting/sm)
06:39:48 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
06:40:49 random-jellyfish joins (~tiber@2a02:2f04:11e:c600:968:a8b2:adff:5b99)
06:40:49 × random-jellyfish quits (~tiber@2a02:2f04:11e:c600:968:a8b2:adff:5b99) (Changing host)
06:40:49 random-jellyfish joins (~tiber@user/random-jellyfish)
06:42:57 × nickiminjaj quits (~nickiminj@user/laxhh) (Quit: My MacBook has gone to sleep. ZZZzzz…)
06:48:11 × ShalokShalom quits (~ShalokSha@17-14-5.cgnat.fonira.net) (Quit: Client closed)
06:50:44 acidjnk_new joins (~acidjnk@p200300d6e72b935208de20f4829382c8.dip0.t-ipconnect.de)
06:53:26 nickiminjaj joins (~nickiminj@188.146.126.78)
06:53:26 × nickiminjaj quits (~nickiminj@188.146.126.78) (Changing host)
06:53:26 nickiminjaj joins (~nickiminj@user/laxhh)
07:00:33 × raym quits (~ray@user/raym) (Quit: Update to FreeBSD 14.0 RC2)
07:00:38 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
07:00:52 coot joins (~coot@89-69-206-216.dynamic.chello.pl)
07:09:06 sord937 joins (~sord937@gateway/tor-sasl/sord937)
07:09:43 lortabac joins (~lortabac@2a01:e0a:541:b8f0:8a8e:8087:d0:8e92)
07:16:39 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
07:18:16 vglfr joins (~vglfr@88.155.140.136)
07:18:40 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
07:23:21 Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542)
07:23:43 × titibandit quits (~titibandi@user/titibandit) (Quit: leaving)
07:23:59 titibandit joins (~titibandi@user/titibandit)
07:27:57 × stefan-__ quits (~m-ohzqow@42dots.de) (Remote host closed the connection)
07:28:27 stefan-__ joins (~m-ohzqow@42dots.de)
07:29:31 fendor joins (~fendor@2a02:8388:1640:be00:aab:1226:f274:5021)
07:33:55 × vglfr quits (~vglfr@88.155.140.136) (Read error: Connection reset by peer)
07:34:01 Jackneill joins (~Jackneill@20014C4E1E0E6F00958F8CDDD487D8C2.dsl.pool.telekom.hu)
07:34:15 vglfr joins (~vglfr@149.102.244.104)
07:35:31 Vajb joins (~Vajb@85-76-20-175-nat.elisa-mobile.fi)
07:35:56 × eggplant_ quits (~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f) (Remote host closed the connection)
07:40:05 <[exa]> elevenkb: thanks for the hvega link, not bad
07:40:10 × emmanuelux quits (~emmanuelu@user/emmanuelux) (Quit: au revoir)
07:40:13 <[exa]> still, cowplot quality is sorely missed
07:40:44 <[exa]> but yeah this is good, I'll try to make a theme for it
07:49:15 chele joins (~chele@user/chele)
07:50:07 × yoyofreeman quits (~yoyofreem@176.97.76.178) (Remote host closed the connection)
07:52:26 Square joins (~Square@user/square)
07:55:45 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
08:05:09 × [_] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
08:09:17 billchenchina joins (~billchenc@103.152.35.21)
08:09:21 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
08:13:35 × billchenchina quits (~billchenc@103.152.35.21) (Ping timeout: 240 seconds)
08:14:40 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f)
08:15:03 danse-nr3 joins (~francesco@151.37.143.24)
08:16:22 × mrvdb quits (~mrvdb@185.92.221.186) (Quit: ZNC 1.8.2 - https://znc.in)
08:17:23 mrvdb joins (~mrvdb@2001:19f0:5000:8582:5400:ff:fe07:3df5)
08:17:55 × econo_ quits (uid147250@id-147250.tinside.irccloud.com) (Quit: Connection closed for inactivity)
08:21:24 × vglfr quits (~vglfr@149.102.244.104) (Ping timeout: 240 seconds)
08:22:17 vglfr joins (~vglfr@88.155.140.136)
08:46:37 × danse-nr3 quits (~francesco@151.37.143.24) (Remote host closed the connection)
08:47:00 danse-nr3 joins (~francesco@151.37.143.24)
08:48:44 × Square quits (~Square@user/square) (Ping timeout: 248 seconds)
08:48:57 <danse-nr3> the question asked here on friday was answered on stack overflow https://stackoverflow.com/questions/77332495/is-it-possible-using-phoas-to-evaluate-a-term-to-normal-form-and-then-stringi
08:49:54 <danse-nr3> also, good morning from this slice of the planet
08:49:57 × adium quits (adium@user/adium) (Read error: Connection reset by peer)
08:50:07 billchenchina joins (~billchenc@103.152.35.21)
08:51:16 szkl joins (uid110435@id-110435.uxbridge.irccloud.com)
08:54:37 × billchenchina quits (~billchenc@103.152.35.21) (Read error: Connection reset by peer)
08:56:10 billchenchina joins (~billchenc@103.152.35.21)
09:01:57 × billchenchina quits (~billchenc@103.152.35.21) (Remote host closed the connection)
09:02:24 nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net)
09:03:11 × L29Ah quits (~L29Ah@wikipedia/L29Ah) (Ping timeout: 260 seconds)
09:07:01 Square joins (~Square@user/square)
09:07:05 × nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 240 seconds)
09:17:27 adium joins (adium@user/adium)
09:23:31 × lisbeths quits (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
09:25:11 ubert1 joins (~Thunderbi@91.141.50.28.wireless.dyn.drei.com)
09:26:36 × ubert quits (~Thunderbi@77.119.202.255.wireless.dyn.drei.com) (Ping timeout: 248 seconds)
09:26:37 ubert1 is now known as ubert
09:30:41 × sm quits (~sm@plaintextaccounting/sm) (Quit: sm)
09:41:52 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
09:41:52 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
09:41:52 finn_elija is now known as FinnElija
09:41:57 <elevenkb> [exa]: welcome!
09:48:06 × Square quits (~Square@user/square) (Ping timeout: 260 seconds)
09:49:03 Katarushisu19 joins (~Katarushi@cpc147790-finc20-2-0-cust502.4-2.cable.virginm.net)
09:50:16 × Katarushisu1 quits (~Katarushi@cpc147790-finc20-2-0-cust502.4-2.cable.virginm.net) (Ping timeout: 255 seconds)
09:50:16 Katarushisu19 is now known as Katarushisu1
09:50:42 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f) (Ping timeout: 272 seconds)
09:55:22 __monty__ joins (~toonn@user/toonn)
09:57:22 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
09:57:22 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
09:57:22 finn_elija is now known as FinnElija
10:21:38 × td_ quits (~td@i53870920.versanet.de) (Ping timeout: 258 seconds)
10:21:48 dhil joins (~dhil@2001:8e0:2014:3100:5b69:27c9:1127:c4c8)
10:28:26 td_ joins (~td@i5387090e.versanet.de)
10:31:30 sm joins (~sm@plaintextaccounting/sm)
10:35:34 titibandit1 joins (~titibandi@ip-037-201-154-092.um10.pools.vodafone-ip.de)
10:37:20 × sm quits (~sm@plaintextaccounting/sm) (Quit: sm)
10:40:14 × titibandit1 quits (~titibandi@ip-037-201-154-092.um10.pools.vodafone-ip.de) (Client Quit)
10:42:10 Inst joins (~Inst@120.244.192.250)
10:52:39 fweht joins (uid404746@id-404746.lymington.irccloud.com)
10:53:59 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
10:54:10 × td_ quits (~td@i5387090e.versanet.de) (Ping timeout: 255 seconds)
10:56:01 td_ joins (~td@i53870909.versanet.de)
11:02:38 CiaoSen joins (~Jura@2a05:5800:2cd:b800:664b:f0ff:fe37:9ef)
11:04:12 × td_ quits (~td@i53870909.versanet.de) (Ping timeout: 248 seconds)
11:06:18 td_ joins (~td@i53870916.versanet.de)
11:07:44 thyriaen joins (~thyriaen@2a01:aea0:dd4:7550:6245:cbff:fe9f:48b1)
11:10:04 × euleritian quits (~euleritia@77.22.252.56) (Ping timeout: 255 seconds)
11:10:37 euleritian joins (~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de)
11:12:07 crazazy joins (~user@2001:67c:2564:a315:7404:ba10:b615:5403)
11:14:31 danse-nr3_ joins (~francesco@151.35.175.49)
11:14:38 Guest|85 joins (~Guest|85@212.154.102.176.client.nordic.tel)
11:15:48 × Guest|85 quits (~Guest|85@212.154.102.176.client.nordic.tel) (Client Quit)
11:17:13 × danse-nr3 quits (~francesco@151.37.143.24) (Ping timeout: 258 seconds)
11:19:31 × AlexZenon quits (~alzenon@178.34.162.116) (Ping timeout: 258 seconds)
11:21:19 × AlexNoo quits (~AlexNoo@178.34.162.116) (Ping timeout: 255 seconds)
11:23:35 × danse-nr3_ quits (~francesco@151.35.175.49) (Ping timeout: 240 seconds)
11:25:06 <Unicorn_Princess> i wrote a library with a bunch of submodules (e.g. Farm.Animals, Farm.Equipment, Farm.Activities). now i wanna make a single module that for convenience re-exports all the stuff in those submodules, so a user can just import Farm.AllTheStuff, and get it. is there a consensus style how to name such a module? maybe just 'Farm', no submodule?
11:36:36 × random-jellyfish quits (~tiber@user/random-jellyfish) (Ping timeout: 260 seconds)
11:38:49 × euleritian quits (~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
11:38:49 × vglfr quits (~vglfr@88.155.140.136) (Read error: Connection reset by peer)
11:39:06 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
11:39:45 random-jellyfish joins (~tiber@2a02:2f04:11e:c600:968:a8b2:adff:5b99)
11:39:45 × random-jellyfish quits (~tiber@2a02:2f04:11e:c600:968:a8b2:adff:5b99) (Changing host)
11:39:45 random-jellyfish joins (~tiber@user/random-jellyfish)
11:48:19 × Pseudonym quits (~IceChat95@203.214.86.172) (Quit: I was standing in the park wondering why frisbees got bigger as they get closer. Then it hit me.)
11:48:20 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f)
11:52:59 falafel joins (~falafel@62.175.113.194.dyn.user.ono.com)
11:57:55 × arahael quits (~arahael@119-18-2-212.771202.syd.nbn.aussiebb.net) (Ping timeout: 264 seconds)
11:59:58 × int-e quits (~noone@int-e.eu) (Remote host closed the connection)
12:00:51 int-e joins (~noone@int-e.eu)
12:03:45 × lambdabot quits (~lambdabot@haskell/bot/lambdabot) (Remote host closed the connection)
12:04:12 lambdabot joins (~lambdabot@silicon.int-e.eu)
12:04:12 × lambdabot quits (~lambdabot@silicon.int-e.eu) (Changing host)
12:04:12 lambdabot joins (~lambdabot@haskell/bot/lambdabot)
12:04:12 ChanServ sets mode +v lambdabot
12:06:12 sm joins (~sm@plaintextaccounting/sm)
12:07:51 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 240 seconds)
12:08:18 danse-nr3_ joins (~francesco@151.35.175.49)
12:08:29 euleritian joins (~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de)
12:10:10 Pickchea joins (~private@user/pickchea)
12:17:52 × masterbuilder quits (~masterbui@user/masterbuilder) (Ping timeout: 255 seconds)
12:18:56 × td_ quits (~td@i53870916.versanet.de) (Ping timeout: 258 seconds)
12:19:50 masterbuilder joins (~masterbui@user/masterbuilder)
12:20:38 td_ joins (~td@i5387090D.versanet.de)
12:34:06 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
12:36:40 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
12:38:11 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Read error: Connection reset by peer)
12:48:03 AlexNoo joins (~AlexNoo@178.34.162.116)
12:48:19 × random-jellyfish quits (~tiber@user/random-jellyfish) (Ping timeout: 264 seconds)
12:52:30 vglfr joins (~vglfr@88.155.140.136)
12:53:05 × falafel quits (~falafel@62.175.113.194.dyn.user.ono.com) (Ping timeout: 240 seconds)
13:03:53 nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net)
13:05:05 × crazazy quits (~user@2001:67c:2564:a315:7404:ba10:b615:5403) (Ping timeout: 240 seconds)
13:08:56 × nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 272 seconds)
13:12:27 <Inst> ugh, this is annoying
13:13:02 <Inst> what Char in haskell represents a key press of the up arrow key?
13:13:37 <nullie> is it a char?
13:14:23 <nullie> I think it's an escape sequence
13:16:38 <mauke> none
13:16:56 <mauke> Char maps to unicodepoints, which are character (fragments), not keys
13:16:56 <danse-nr3_> i thought i could find out from a simple experiment but it did not work out. Apologies for pasting multiple lines
13:17:05 <danse-nr3_> Prelude Data.Char> show . ord <$> readLn
13:17:05 <danse-nr3_> ^[[A
13:17:05 <danse-nr3_> *** Exception: user error (Prelude.readIO: no parse)
13:17:18 <mauke> yeah, can't 'read' that
13:17:34 <mauke> > "\e[A"
13:17:35 <lambdabot> <hint>:1:3: error:
13:17:35 <lambdabot> lexical error in string/character literal at character 'e'
13:17:38 <mauke> > "\ESC[A"
13:17:40 <lambdabot> "\ESC[A"
13:17:42 <mauke> there we go
13:17:47 <mauke> > map ord "\ESC[A"
13:17:49 <lambdabot> [27,91,65]
13:18:11 <danse-nr3_> thanks mauke
13:18:18 <mauke> of course this is all terminal (and terminal settings) dependent
13:19:50 <Inst> ah, so it's ESC/A?
13:19:52 <mauke> > let ctrl = chr . xor (ord '@') . ord . toUpper in ctrl '['
13:19:54 <lambdabot> '\ESC'
13:19:59 <Inst> groan, there goes my maze program :(
13:20:08 <mauke> > let ctrl = chr . xor (ord '@') . ord . toUpper in ctrl 'A'
13:20:10 <lambdabot> '\SOH'
13:20:15 <mauke> sounds about right
13:20:19 <Inst> I'm really stalled at two problems, how to get it to detect keypresses, and how to get it to detect
13:20:26 <Inst> how to get it to hide inputs
13:20:33 <mauke> Inst: what OS is this on?
13:20:36 <Inst> I'm using Haskeline, but it feels like I'm using the wrong tool fo rthe job
13:20:37 <Inst> Arch
13:20:49 <mauke> yeah, that's terminal stuff
13:20:56 <Inst> so if I hSetEcho stdin False or hSetEcho stdout False
13:20:58 <mauke> you'd have to turn off "echo"
13:21:07 <Inst> it's no longer reading stuff anymore
13:21:37 <mauke> > let ctrl = chr . xor (ord '@') . ord . toUpper in ctrl '?'
13:21:39 <lambdabot> '\DEL'
13:22:28 danse-nr3_ is jealous of Inst, seems to be doing always fun stuff
13:22:53 <Inst> just, spare time
13:23:00 <Inst> if you're bored, go set up a project and translate this
13:23:19 <Inst> https://inventwithpython.com/bigbookpython/
13:23:45 <Inst> so hSetEcho stdout off messes with haskeline
13:23:46 Inst sighs
13:24:40 <danse-nr3_> i am mostly exhausted in spare time and try to keep away from coding for a minimum of healthy habits ^^;
13:25:36 <Inst> I'm so annoyed that the tooling needs improvement :(
13:25:41 <Inst> I wish we'd all focus on building ecosystem instead
13:28:08 × euleritian quits (~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
13:28:26 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
13:29:56 <Inst> my program so far
13:31:26 L29Ah joins (~L29Ah@wikipedia/L29Ah)
13:31:53 <Inst> https://paste.tomsmeding.com/RpwFgUkf
13:31:54 billchenchina joins (~billchenc@103.152.35.21)
13:32:22 <haskellbridge> <s​m> making a game Inst ? hurrah
13:32:47 <Inst> sm: well, just porting a project
13:33:29 <haskellbridge> <s​m> as mauke said, haskeline is the wrong tool - it's for reading one line at a time, terminated by ENTER
13:34:05 <Inst> i should be porting it to brick :(
13:35:40 John_Ivan joins (~John_Ivan@user/john-ivan/x-1515935)
13:35:59 <Inst> three problems: can't get inputs to work, either the parser or the display is truncating the last lines of the input file
13:36:04 <haskellbridge> <s​m> vty or ansi-terminal-game include raw keyboard input. There's a more basic lib for it, but I can't find it
13:36:16 <haskellbridge> <s​m> #haskell-game:matrix.org is also there to help
13:36:35 <Inst> I probably need StateT to keep track of where the display is handling it, or worse, I can call an IORef (le sigh)
13:36:45 <Inst> I'm on haskell-game Matrix :)
13:37:55 <Inst> and i need keyboard reading, but w/e, i just want to get a prototype up
13:38:13 <Inst> afterwards, I want to install a maze validator to show that the maze loaded can be solved
13:38:28 <Inst> install opt-parse applicative, and probably switch to ansi-terminal-game? :(
13:38:34 <haskellbridge> <s​m> ah: https://hackage.haskell.org/package/base-4.19.0.0/docs/System-IO.html#g:17
13:39:00 <Inst> It looks like hGetFile would be useful?
13:39:04 <Inst> erm, hGetChar?
13:39:09 <Inst> but I think I wouldn't be reading stdin?
13:39:51 <haskellbridge> <s​m> oh no that one blocks until you press a key. A raw input helper exists somewhere deep in GHC.IO IIRC
13:40:06 <Inst> so i can drop out of haskeline
13:40:19 <Inst> i mean if i need it to block, worst case, I can forkIO, no?
13:41:07 <haskellbridge> <s​m> yes you can drop haskeline. I'd use ansi-terminal-game unless you really want to figure out everything from scratch
13:42:54 <haskellbridge> <s​m> simple real time games + laziness = way more head scratching than you realise now !
13:43:14 <haskellbridge> <s​m> (afk)
13:43:42 <Inst> thanks <3
13:47:24 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 248 seconds)
13:47:35 × acarrico quits (~acarrico@dhcp-68-142-49-163.greenmountainaccess.net) (Ping timeout: 240 seconds)
13:48:07 <Inst> laziness isn't a problem if you import DeepSeq
13:48:07 × hippoid quits (~hippoid@user/hippoid) (Remote host closed the connection)
13:48:08 euleritian joins (~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de)
13:48:27 × euleritian quits (~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
13:48:29 hippoid joins (~hippoid@c-98-213-162-40.hsd1.il.comcast.net)
13:48:31 <Inst> use bang patterns, force, etc
13:48:44 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
13:51:08 AlexZenon joins (~alzenon@178.34.162.116)
13:51:12 <Inst> yeah, and not using getChar / hGetChar, once upon a time on Windows, getChar was bugged
13:57:50 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 258 seconds)
13:58:18 euleritian joins (~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de)
13:59:26 × sm quits (~sm@plaintextaccounting/sm) (Quit: sm)
13:59:34 idgaen joins (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
14:00:01 × billchenchina quits (~billchenc@103.152.35.21) (Remote host closed the connection)
14:01:20 gehmehgeh joins (~user@user/gehmehgeh)
14:06:33 gatekempt joins (~gatekempt@user/gatekempt)
14:08:39 × CiaoSen quits (~Jura@2a05:5800:2cd:b800:664b:f0ff:fe37:9ef) (Ping timeout: 240 seconds)
14:08:48 waleee joins (~waleee@2001:9b0:21c:e600:f2f3:f744:435d:137c)
14:19:21 random-jellyfish joins (~tiber@2a02:2f0f:a002:5000:c912:a1b7:f1:6617)
14:19:21 × random-jellyfish quits (~tiber@2a02:2f0f:a002:5000:c912:a1b7:f1:6617) (Changing host)
14:19:21 random-jellyfish joins (~tiber@user/random-jellyfish)
14:26:02 × vglfr quits (~vglfr@88.155.140.136) (Read error: Connection reset by peer)
14:29:50 <Inst> > '\ESC[A'
14:29:52 <lambdabot> <hint>:1:6: error:
14:29:52 <lambdabot> lexical error in string/character literal at character '['
14:30:07 CiaoSen joins (~Jura@2a05:5800:2cd:b800:664b:f0ff:fe37:9ef)
14:31:41 Inst_ joins (~Inst@120.244.192.250)
14:33:00 <danse-nr3_> > "\ESC[A"
14:33:01 <lambdabot> "\ESC[A"
14:34:32 × Inst quits (~Inst@120.244.192.250) (Ping timeout: 255 seconds)
14:35:24 × CiaoSen quits (~Jura@2a05:5800:2cd:b800:664b:f0ff:fe37:9ef) (Ping timeout: 240 seconds)
14:42:34 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
14:43:02 azimut joins (~azimut@gateway/tor-sasl/azimut)
14:54:36 × simendsjo quits (~user@84.211.91.241) (Ping timeout: 248 seconds)
14:56:02 × Inst_ quits (~Inst@120.244.192.250) (Ping timeout: 255 seconds)
14:59:40 segfaultfizzbuzz joins (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net)
15:00:28 vglfr joins (~vglfr@88.155.140.136)
15:02:55 × nickiminjaj quits (~nickiminj@user/laxhh) (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:03:33 × idgaen quits (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 4.0.5)
15:08:12 × Pickchea quits (~private@user/pickchea) (Quit: Leaving)
15:09:24 nickiminjaj joins (~nickiminj@188.146.126.78)
15:09:25 × nickiminjaj quits (~nickiminj@188.146.126.78) (Changing host)
15:09:25 nickiminjaj joins (~nickiminj@user/laxhh)
15:12:25 Inst_ joins (~Inst@120.244.192.250)
15:12:33 kuribas joins (~user@ip-188-118-57-242.reverse.destiny.be)
15:13:58 × danse-nr3_ quits (~francesco@151.35.175.49) (Read error: Connection reset by peer)
15:14:11 danse-nr3_ joins (~francesco@151.37.200.212)
15:14:59 <EvanR> Inst_, flagrant use of deepseq might result in unwanted strictness problems
15:15:39 Inst_ is now known as Inst
15:15:41 <EvanR> strict fields in data types that shouldn't be lazy might be the first step to getting rid of unwanted laziness
15:15:56 <Inst> I mean I default to Vector much of the time
15:16:03 <Inst> only problem is that I want to update a field in a nested vector
15:16:11 <Inst> now I'm confused how to do this without rewriting the entire vector
15:16:13 Guest86 joins (~Guest86@14.139.128.51)
15:16:32 <Guest86> Hi
15:16:48 <Guest86> I wanted to create a monadic version of (&&)
15:17:16 <Guest86> my current implementation: andM x y = x >>= \xm -> y >>= (pure . (&& xm))
15:17:34 <Inst> if you're challenged with your problem, write it in do notation, then desugar to direct binds
15:17:39 × vglfr quits (~vglfr@88.155.140.136) (Read error: Connection reset by peer)
15:17:44 <Inst> using lambda with direct binds usually insidacets that something went wrong
15:17:52 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:8a8e:8087:d0:8e92) (Ping timeout: 252 seconds)
15:17:59 vglfr joins (vglfr@gateway/vpn/protonvpn/vglfr)
15:18:05 <Guest86> this: andM x y = fmap (&&) x <*> y
15:18:05 <Guest86> ?
15:18:40 <EvanR> Inst, to update 1 cell in a Vector you have to rewrite the whole vector, regardless of laziness
15:18:43 <Guest86> (Just False) addM (Nothing)
15:18:47 <Guest86> gives Nothing
15:18:53 <EvanR> so do all your updates at once if possible
15:18:56 <Guest86> I want to get Just False
15:18:58 <Inst> EvanR: unless I unsafeFreeze etc?
15:19:10 <Guest86> How can I get that?
15:19:21 <EvanR> do you mean unsafeThaw
15:19:25 <Inst> yes
15:19:35 <EvanR> that sounds unsafe
15:19:46 <mauke> Guest86: andM x y = do xm <- x; ym <- y; pure (xm && ym)
15:19:50 <Inst> sounds like I love your sense of humor
15:19:57 <EvanR> regardless, deepseq is a heavy handed way to update 1 cell in a vector
15:20:16 <ncf> that will still give you Nothing because that's how the Maybe monad works. if you want something else, you'll need to use a different interface
15:20:31 <mauke> oh, wait
15:20:53 <Guest86> mauke still getting Nothing
15:21:03 <mauke> yes, this is andM, not addM
15:21:18 <EvanR> Inst, a saner way to mutate a vector in place is to use IOVector (in IO)
15:21:26 <ncf> could you specify your request a bit more? what should andM do with e.g. the list monad?
15:21:39 <EvanR> a saner way to do a multidimensional array using vector is to make it 1 dimensional and convert the indexes using a formula
15:21:43 <ncf> [True, False] `andM` [] = ?
15:21:44 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f) (Ping timeout: 246 seconds)
15:21:51 × random-jellyfish quits (~tiber@user/random-jellyfish) (Read error: Connection reset by peer)
15:22:07 <Guest86> my bad, I need andM
15:22:13 random-jellyfish joins (~tiber@2a02:2f0f:a002:5000:c912:a1b7:f1:6617)
15:22:13 × random-jellyfish quits (~tiber@2a02:2f0f:a002:5000:c912:a1b7:f1:6617) (Changing host)
15:22:13 random-jellyfish joins (~tiber@user/random-jellyfish)
15:22:29 <Guest86> and (Just False) andM Nothing
15:22:34 <Guest86> should give Just False
15:22:43 <mauke> Guest86: andM x _ = x
15:22:49 <Inst> solved it, guest86
15:23:02 <EvanR> wouldn't that be Nothing, intuitively
15:23:31 <Guest86> mauke lol, andM (Just True) (Just False) should also give (Just False)
15:23:35 <Inst> (&&>>) :: Monad m => m Bool -> m Bool -> m Bool
15:23:43 <mauke> Guest86: andM _ _ = Just False
15:23:58 × chele quits (~chele@user/chele) (Remote host closed the connection)
15:24:00 <Guest86> lol,
15:24:07 <EvanR> do you want liftA2 (&&)
15:24:13 <EvanR> :t liftA2 (&&)
15:24:14 <lambdabot> Applicative f => f Bool -> f Bool -> f Bool
15:24:18 <mauke> no
15:24:19 <Guest86> andM (Just True) (Just True) = Just True
15:24:30 <Inst> liftA2 sequences both actions together
15:24:37 <Inst> should I post my implementation or is it spoon-feeding?
15:24:53 <ncf> at this point you've probably got enough equations for a pattern-matching definition
15:25:02 <Guest86> I spent about an hour trying '=D
15:25:20 <ncf> trying to do what? you still haven't told us what the function should do, apart from a handful of cases
15:25:28 <Inst> you need Monad because you're acting based on the result of the left m Bool
15:26:17 <Guest86> monad version of AND
15:26:25 <EvanR> which means what again
15:26:27 <Inst> and or (&&)?
15:26:35 <Guest86> so that I can apply to Maybe
15:26:38 <Guest86> (&&)
15:26:44 <mauke> this is not a monad version of &&
15:26:47 <Inst> and is a function, iirc, and :: Foldable t => t Bool -> Bool
15:26:52 <EvanR> is it specific to Maybe
15:26:59 <Guest86> yes
15:27:04 <EvanR> so not really monads
15:27:12 <Inst> i guess you can't do this in a strict language
15:27:15 <Guest86> but I would like it to be generalizable
15:27:26 <mauke> yes, but to what?
15:27:32 <Guest86> yeah, it can just be a functor
15:27:35 <Inst> (&&>>) :: Monad m => m Bool -> m Bool -> m Bool
15:27:38 <Inst> It has to be a monad :)
15:27:42 <mauke> Inst: why?
15:27:48 <Guest86> andM :: (Monad m) => m Bool -> m Bool -> m Bool
15:27:53 <Inst> They want pure short-circuiting
15:28:05 <mauke> Inst: that's not what it sounded like to me
15:28:12 <Inst> so the second f/m doesn't get executed
15:28:16 <mauke> but then Guest86 never explained what they're trying to do
15:28:29 <mauke> so I guess your interpretation is as valid as mine
15:28:30 <EvanR> Inst you sound like you're talking about "monadic OR"
15:28:34 <Guest86> Inst yes I want that
15:28:42 <EvanR> do this but stop if first result is false
15:28:45 <Inst> Guest86: write it in do notation, use an if then else
15:29:18 <mauke> Guest86: what should the result be for 'andM Nothing (Just False)' and 'andM (Just True) Nothing'?
15:29:48 <Guest86> Just False and Nothing
15:30:10 <Guest86> ideally
15:30:12 <ncf> ._.
15:30:12 <mauke> ok, that means neither of our interpretations are correct
15:30:19 <EvanR> so you want to catch the failure of the first action
15:30:20 <Guest86> but I guess Nothing and Nothing will do as well
15:30:27 <mauke> I have no clue what your function is supposed to do
15:30:36 <Inst> ah, so my interpretation isn't correct either
15:30:39 <EvanR> convert a failure into pure False
15:30:46 <Inst> but it's a lot harder for it to treat failure as a pure false generically
15:30:56 <Inst> import Data.Bool
15:30:56 <Inst> (&&>>) :: Monad m => m Bool -> m Bool -> m Bool
15:30:56 <Inst> a &&>> b = a >>= bool (pure False) b
15:31:01 <EvanR> MonadCatch
15:31:31 <mauke> Guest86: start by writing down all possible cases
15:31:43 <mauke> that should give you a complete function definition in at most 9 equations
15:31:52 <Inst> the one I gave you will return Nothing if the left term is Nothing, unfortunately
15:32:26 <mauke> my interpretation would have given 'Just False' and 'Just True', respectively
15:33:01 <EvanR> ok, MonadCatch doesn't cover stuff like Maybe
15:33:21 <mauke> hmm, these are SQL NULL semantics
15:33:29 <Inst> but tbh the problem is more
15:33:36 <mauke> or at least the examples we've seen so far are compatible with that interpretation
15:33:44 <Inst> either case, Monadic and Applicative types all contain a notion of effect
15:33:56 <Guest86> andM (Just True) (Just True) == Just True
15:33:56 <Guest86> andM (Just True) (Just False) == Just False
15:33:57 <Guest86> andM (Just False) (Just True) == Just False
15:33:57 <Guest86> andM (Just False) (Just False) == Just False
15:33:58 <Guest86> andM (Just True) Nothing == Nothing
15:33:58 <Guest86> andM Nothing (Just True) == Nothing
15:33:59 <Guest86> andM (Just False) Nothing == Just False
15:33:59 <Guest86> andM Nothing (Just False) == Just False
15:34:02 <Inst> ...
15:34:03 <Inst> careful
15:34:08 <Inst> bots might boot you for spamming
15:34:12 <Inst> paste.tomsmeding.com
15:34:24 <mauke> Guest86: don't paste into the channel; use a paste site or something
15:34:29 <Guest86> Ah, sorry. Whats the limit?
15:34:35 <EvanR> lol
15:34:37 acarrico joins (~acarrico@dhcp-68-142-49-163.greenmountainaccess.net)
15:34:38 <Inst> i was pushing it with 3 entries
15:34:43 <geekosaur> ^
15:34:53 <Guest86> Oh. Will keep that in mind
15:34:54 <EvanR> what are the limits so I may push them
15:35:04 <mauke> ... yep, that's SQL NULL
15:35:27 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
15:35:35 <EvanR> Guest86, that doesn't really have much to do with monads
15:35:50 <EvanR> it's just a function on Maybe Bool
15:36:01 <Inst> i think the &&>>, even if it doesn't give you the behavior you want, is reasonable when you consider monadic effects
15:36:13 <EvanR> smh
15:36:27 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f)
15:36:29 <Inst> what's wrong with that? :(
15:36:32 <Guest86> yeah. thanks
15:37:07 <EvanR> "now that you finally defined what you want it to do, here's something that doesn't do that, and confuses monads into it like you wanted" xD
15:37:10 <mauke> I guess it's a sort of minimum function if you map Just False to 0, Nothing to 1, Just True to 2
15:37:31 <Inst> you could just data SQLBool =...
15:39:21 <mauke> data SQLBool = SQLFalse | SQLNull | SQLTrue deriving (Eq, Ord) -- :-)
15:39:31 <mauke> sqlAnd = min; sqlOr = max
15:39:48 <EvanR> is NULL really ordered between False and True
15:40:06 <mauke> NULL represents an unknown/indeterminate value
15:40:25 <EvanR> so it should be unordered?
15:40:29 <mauke> FALSE && ??? is definitely FALSE, but TRUE && ??? is indeterminate
15:40:50 <EvanR> partially ordered
15:41:17 <mauke> conversely, TRUE || ??? is definitely TRUE, but FALSE || ??? is indeterminate
15:42:02 <danse-nr3_> Guest86, how about this? https://paste.tomsmeding.com/Aa4cHddj
15:42:31 <danse-nr3_> hum no i see that is wrong, misses the `Just True` cases
15:42:51 <mauke> danse-nr3_: yeah, that was my original interpretation :-)
15:44:50 × Vajb quits (~Vajb@85-76-20-175-nat.elisa-mobile.fi) (Ping timeout: 246 seconds)
15:45:22 Square joins (~Square@user/square)
15:45:52 tzh joins (~tzh@c-71-193-181-0.hsd1.or.comcast.net)
15:46:04 <Vq> are || and && commutative at least?
15:46:19 × dhil quits (~dhil@2001:8e0:2014:3100:5b69:27c9:1127:c4c8) (Ping timeout: 245 seconds)
15:46:25 × nickiminjaj quits (~nickiminj@user/laxhh) (Read error: Connection reset by peer)
15:46:28 <int-e> not when you take laziness into account
15:46:32 <EvanR> not the version in many languages which use them to stop evaluation of the next expression
15:46:37 <int-e> > True || undefined
15:46:38 <lambdabot> True
15:46:41 <int-e> > undefined || True
15:46:42 <lambdabot> *Exception: Prelude.undefined
15:46:58 nickiminjaj joins (~nickiminj@188.146.126.78)
15:46:58 × nickiminjaj quits (~nickiminj@188.146.126.78) (Changing host)
15:46:58 nickiminjaj joins (~nickiminj@user/laxhh)
15:47:11 <Inst> hmmm, so what do I do
15:47:25 <Inst> about trying to update an element in a vector?
15:47:44 <Inst> i thought about keeping state in a scanner, but it'd be easiest... oh fffs, i need lens, don't I? :(
15:48:04 Vajb joins (~Vajb@2001:999:785:c11e:a1b8:59fa:dee7:e490)
15:48:10 santiagopim joins (~user@90.167.66.131)
15:48:19 <EvanR> updating elements 1 at a time in a big vector is suboptimal
15:48:32 <Inst> i only need to update exactly one element
15:48:32 <EvanR> but there are many scans and maps you can use
15:48:53 × euleritian quits (~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
15:49:11 euleritian joins (~euleritia@77.22.252.56)
15:49:16 <int-e> . o O ( ST a b -- the original stabby thing )
15:49:17 <Inst> https://paste.tomsmeding.com/bURBnofj
15:49:19 <Inst> yes yes, i know it's crap
15:49:20 <EvanR> write a function which does that, but make sure it evaluates the new element first
15:49:46 × danse-nr3_ quits (~francesco@151.37.200.212) (Ping timeout: 258 seconds)
15:50:04 <EvanR> (if that's what you want)
15:50:08 <mauke> Inst: could use //
15:50:20 <Inst> oh
15:50:55 <Inst> yeah, i'm changing it to get it to evaluate the 2D vector first either into a 2D Vector of chars or a 2D list of chars
15:51:10 <EvanR> nameMe i v !x = v // [(i,x)]
15:51:25 × vglfr quits (vglfr@gateway/vpn/protonvpn/vglfr) (Ping timeout: 252 seconds)
15:51:57 vglfr joins (~vglfr@88.155.140.136)
15:51:58 <EvanR> and like I said for a 2D vector it's probably easier to use a flat vector and munge the indexes
15:52:04 <Inst> so i now have a notion of a print object that I traverse_ (traverse_ ((>> putStrLn ""). putStr) ) into
15:52:07 <EvanR> instead of deal with nested vectors
15:52:13 <Inst> what do you mean by munge the indexes?
15:52:40 <mauke> C style, baby
15:52:57 <EvanR> if you want 2D index (x,y) that is i = y * width + x, or similar
15:53:19 <mauke> instead of vec2d ! i ! j, you have vec1d ! (i * dim + j)
15:53:29 <hamess> why is `:t traverse_` in ghci giving me an undefined error ?
15:53:42 <Inst> because you have to import Data.Foldable (traverse_) first
15:54:13 <Inst> the reason people don't teach that a lot, even though it's the optimal solution a lot of the time, is because traverse / for is exactly what it sounds like
15:54:35 <Inst> well, not really
15:55:12 gentauro joins (~gentauro@user/gentauro)
15:55:19 × thyriaen quits (~thyriaen@2a01:aea0:dd4:7550:6245:cbff:fe9f:48b1) (Remote host closed the connection)
15:56:01 czy joins (~user@121.231.41.11)
15:56:34 × stefan-__ quits (~m-ohzqow@42dots.de) (Remote host closed the connection)
15:57:48 <Inst> i love traverse and traverse, though, it's so great when you can repeat an applicative action with different arguments via traverse_ action ["arg1", "arg2", "arg3"]
15:58:34 danse-nr3_ joins (~francesco@151.37.200.212)
16:00:10 × euleritian quits (~euleritia@77.22.252.56) (Ping timeout: 255 seconds)
16:00:28 euleritian joins (~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de)
16:01:34 × rosco quits (~rosco@yp-150-69.tm.net.my) (Read error: Connection reset by peer)
16:02:12 × waleee quits (~waleee@2001:9b0:21c:e600:f2f3:f744:435d:137c) (Ping timeout: 240 seconds)
16:02:26 <EvanR> int-e, I only just got that one. Prior to this my theory was that ST lets you "stab" (mutate) stuff
16:03:26 <int-e> Hmm, do I remember correctly that the official meaning is "State Thread"?
16:03:36 _ht joins (~Thunderbi@28-52-174-82.ftth.glasoperator.nl)
16:04:32 <geekosaur> yes
16:04:49 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 255 seconds)
16:04:53 <geekosaur> because it's local state isolated from other computations
16:05:14 <geekosaur> so not "thread" in the CPU sense, but in local state
16:05:39 <mauke> I mean, they could have called it LocalVars or LocalState
16:05:43 × random-jellyfish quits (~tiber@user/random-jellyfish) (Ping timeout: 252 seconds)
16:05:50 <mauke> or LMut
16:06:12 × ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
16:06:52 ec joins (~ec@gateway/tor-sasl/ec)
16:09:11 <c_wraith> all of those are a lot of typing
16:10:11 rosco joins (~rosco@yp-150-69.tm.net.my)
16:12:16 Tuplanolla joins (~Tuplanoll@91-159-68-236.elisa-laajakaista.fi)
16:13:26 × euleritian quits (~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
16:13:32 × kuribas quits (~user@ip-188-118-57-242.reverse.destiny.be) (Ping timeout: 258 seconds)
16:13:48 euleritian joins (~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de)
16:17:39 econo_ joins (uid147250@id-147250.tinside.irccloud.com)
16:18:11 chomwitt joins (~chomwitt@2a02:587:7a1a:8700:1ac0:4dff:fedb:a3f1)
16:22:13 rgw joins (~R@2605:a601:a0df:5600:f816:aa41:2408:8443)
16:22:15 sm joins (~sm@plaintextaccounting/sm)
16:23:56 thegeekinside joins (~thegeekin@189.180.4.84)
16:25:56 × euleritian quits (~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
16:26:06 × thegeekinside quits (~thegeekin@189.180.4.84) (Remote host closed the connection)
16:26:14 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
16:26:28 YoungFrog joins (~youngfrog@39.129-180-91.adsl-dyn.isp.belgacom.be)
16:26:31 <monochrom> mapM_ is already in the Prelude.
16:29:38 falafel joins (~falafel@62.175.113.194.dyn.user.ono.com)
16:30:03 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
16:37:39 × Guest86 quits (~Guest86@14.139.128.51) (Quit: Client closed)
16:43:29 × ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
16:43:52 ec joins (~ec@gateway/tor-sasl/ec)
16:47:40 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 248 seconds)
16:48:20 euleritian joins (~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de)
16:52:40 × euleritian quits (~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
16:52:58 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
16:53:48 JuanDaugherty joins (~juan@user/JuanDaugherty)
16:56:14 kuribas joins (~user@2a02:1808:81:3b8c:f27b:355a:7e45:2b1)
17:00:00 × rosco quits (~rosco@yp-150-69.tm.net.my) (Quit: Lost terminal)
17:01:04 × falafel quits (~falafel@62.175.113.194.dyn.user.ono.com) (Ping timeout: 255 seconds)
17:03:30 <EvanR> the rank2 "trick" which makes ST "safe" is considered cool. But is it not the same thing as the RealWorld "hack" which is considered an inessential-to-the-concept-of-IO implementation detail
17:03:49 <EvanR> and daresay uncool
17:04:33 <EvanR> and actually the actual same thing when you break open the IO or ST wrapper
17:04:48 <mauke> IO = ST RealWorld, IIRC
17:05:18 <EvanR> maybe because the ST thing is at type level and RealWorld is at value level
17:05:24 <mauke> RealWorld is a hack
17:05:26 <mauke> ST isn't
17:05:26 nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net)
17:05:34 <int-e> No, ST has the same non-essential "token that is erased at runtime" implementation detail that IO has.
17:06:04 <int-e> The fact that the *essential* scope type is attached to that token is a distraction, it's an entirely different trick.
17:07:01 <EvanR> RealWorld is erased at runtime?
17:07:07 <c_wraith> yes.
17:07:08 <geekosaur> yes
17:07:10 <int-e> State# RealWorld is
17:07:18 <int-e> Same as State# s
17:07:26 <geekosaur> well, actually during compile time during codegen
17:07:42 <int-e> s/at/for/ I guess
17:07:50 <c_wraith> IIRC, it's kept around for all the optimizations that work on core, but eliminated when core is compiled to Cmm
17:08:01 idgaen joins (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
17:08:03 <EvanR> RealWorld had been hitherforeto erased
17:08:14 <yin> can anyone explain this error to me? https://paste.jrvieira.com/1698080870528
17:08:35 <c_wraith> yin: can you include the error message? it helps a lot.
17:08:38 <geekosaur> I don't see an error there
17:08:44 <yin> sorry, wrong link
17:08:44 × AlexZenon quits (~alzenon@178.34.162.116) (Ping timeout: 258 seconds)
17:09:05 <yin> https://paste.jrvieira.com/1698080938556
17:10:03 <int-e> There's still a distinction between a closure that takes a void argument and the result after applying the void argument, which is why there ar special apply methods in the RTS for that (cf. stg_ap_v_fast).
17:10:10 <c_wraith> oh, is this one of the cases where using church numerals in Haskell requires a higher-rank type?
17:10:47 <int-e> yin: that would be easier to answer if you included the error
17:10:52 × nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 272 seconds)
17:11:58 <yin> here's with the error message: https://paste.jrvieira.com/1698081101844
17:12:24 AlexZenon joins (~alzenon@178.34.162.116)
17:14:15 <c_wraith> yin: fwiw, it's weird to use a pattern guard when you could use a normal guard instead. But that's not the problem.
17:14:21 stefan-__ joins (~m-ohzqow@42dots.de)
17:14:27 <mauke> I don't think it needs to be higher rank if you go through a custom type
17:14:56 <mauke> newtype F = MkF (F -> F) -- or something like that? might be useless, though
17:15:05 <int-e> It's much easier though... https://paste.tomsmeding.com/dbZiGGVu
17:15:15 <int-e> mauke: Yeah that, but that makes inspection awkwardf
17:15:16 <int-e> -f
17:15:36 <int-e> (often called LC for lambda calculus)
17:17:14 <int-e> Other than that it's very nice though... newtype LC = Abs { app :: LC -> LC } allows stuff like t = Abs (\a -> Abs (\b -> a `app` b))
17:18:40 <EvanR> in the #lambdacalculus channel there was a flash of interest in various lambda calculus compilers and questions about which one "was fastest"
17:19:02 <EvanR> now that you just said that, I'm wondering if ghc is just that
17:19:20 <EvanR> by compiling programs of type LC
17:20:15 × stefan-__ quits (~m-ohzqow@42dots.de) (Remote host closed the connection)
17:20:17 <dolio> RealWorld passing gives the right semantics for ST. It doesn't for IO.
17:21:27 × kuribas quits (~user@2a02:1808:81:3b8c:f27b:355a:7e45:2b1) (Ping timeout: 240 seconds)
17:21:29 <yin> i still don't understand
17:22:34 <dolio> If you write an infinite loop that modifies references in ST, that's indistinguishable from one that doesn't modify references, because the exact reference behavior isn't supposed to be observable, just the result (which is ⊥ in both cases).
17:23:22 <dolio> If you write an infinte loop that prints things, that's not the same as an infinite loop that doesn't print things, which doesn't make sense in terms of pure functions that pass around a 'state'.
17:23:52 <c_wraith> yin: what happens if you give an explicit type to all your top-level definitions?
17:23:57 <EvanR> devil's advocate reacts to that example by saying the printer is in the world state
17:24:12 × JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: JuanDaugherty)
17:24:39 <EvanR> but RealWorld doesn't explain how getCurrentTime "works"
17:24:40 <dolio> Is the devil's advocate someone who doesn't actually think through the example?
17:25:21 <mauke> my objection is that the universe doesn't actually get piped through my PC
17:25:26 <yin> c_wraith: the type-checker flips out
17:26:25 <c_wraith> yin: it's probably worth paying attention to that. the types you want aren't inexpressible in Haskell, but they're not necessarily what you think they are.
17:27:14 <monochrom> IO's "World" is just a data dependency trick to tell the optimizer don't reorder getLine >> putStrLn "thanks" just because getLine's answer isn't "used".
17:27:21 <int-e> The "take old world, produce new world" is a small-step semantics thing, isn't it. And it falls apart when your program isnt' the only thing interacting with the world, especially once you start composing those functions blindly.
17:27:49 <EvanR> multithreading and time-dependence
17:27:52 simendsjo joins (~user@84.211.91.241)
17:27:57 <EvanR> at least
17:27:58 <int-e> (or your thread)
17:27:59 <monochrom> getLine's answer isn't used, but it's output "World" is used by the putStrLn, so the optimizer can't reorder.
17:28:01 <dolio> It falls apart with infinite loops, just like I said.
17:28:19 <dolio> Well, unless you're okay with impure functions.
17:28:20 <int-e> dolio: eh it's just another kind of bottom on the end
17:28:23 <EvanR> you're assuming there's a second thread which can observe the printer
17:28:36 <monochrom> Without it, recall that the optimizer is free to reorder code as long as nonstrictness is preserved.
17:28:47 <monochrom> (and it does often)
17:30:11 <int-e> dolio: One way to put my point of view here would be... you wouldn't see those prints if you just let the program finish first before looking.
17:30:30 <int-e> By looking, you interact with the state, and that breaks the abstraction.
17:30:47 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
17:30:52 <monochrom> But people are used to "use the source Luke" and believe that everything in the source code is real, as opposed to just pleasing the compiler.
17:30:52 <int-e> But perhaps that's a weird point of view.
17:31:17 <dolio> I'm assuming that printing things forever is distinct from not printing things forever.
17:31:18 <EvanR> what is and isn't observable is partially up to the person making up the model
17:31:29 <yin> c_wraith: ok let me work this out
17:31:40 <EvanR> because you can choose to ignore things for abstraction
17:31:43 <monochrom> It also doesn't help that SPJ's Awkward Squad lecture notes began with world passing as the preferred model.
17:31:52 <EvanR> yes!
17:31:54 <EvanR> it's terrible
17:31:55 <int-e> (I think in the end we all agree that the model breaks down for full programs.)
17:32:29 <int-e> . o O ( Turing: Award. SPJ: Awkward. )
17:32:44 <dolio> Because that's like a basic requirement for writing some actual programs.
17:32:45 <monochrom> Oh it does have one sentence "this is not real" but guess how many people take one sentence seriously when there are 1000 other lines contradicting it.
17:32:59 <int-e> It is the preferred implementation.
17:33:22 helge_ joins (~textual@h-158-174-186-9.NA.cust.bahnhof.se)
17:33:36 <int-e> (We take a broken model and execute it with great success. What's wrong with that?)
17:33:40 <EvanR> awkward squad says it gives the right intuition so I will use it for the moment. Then never returns to the point or offers a different story
17:34:34 <monochrom> Well yeah better IO semantics was (still is) very open and unsolved research question.
17:35:09 <monochrom> I was there in the lectures. He did mention "yeah would be nice to have a denotational semantics. people are trying"
17:35:23 <dolio> HBC had a different model which makes sense of infinite loops before GHC existed, I think.
17:36:19 <monochrom> Unfortunately, to most people with denotational aptitudes, IO is too ugly or mundane to be interesting. And other people lack the aptitude.
17:37:31 <EvanR> which aspect of IO would benefit from denotational semantics, because "all of it" sounds like a lot to deal with. Like do you include quantum physics somehow
17:37:34 × nickiminjaj quits (~nickiminj@user/laxhh) (Quit: Textual IRC Client: www.textualapp.com)
17:37:40 <EvanR> general relativity
17:37:49 <monochrom> :)
17:37:53 <int-e> yin: I'd do something similar to BBool: type CNat = forall r. (r -> r) -> r -> r, and give all those functions the corresponding signature, e.g. succ :: CNat -> CNat. That probably works, or at least will be closer to working.
17:38:18 <monochrom> I would be happy enough if it included merely getChar and putChar.
17:38:41 <monochrom> To a large extent the other features are "similar". I get the point.
17:38:46 <c_wraith> dolio: edwardk had a model of IO for ermine where it's essentially a free monad. what it does is up to the interpreter.
17:38:46 <int-e> GHC can't infer higher ranked types
17:39:04 <dolio> Yeah, that's sort of the same model.
17:39:08 <dolio> Dialogue trees.
17:39:22 <Inst> am I using lens wrong?
17:39:22 <monochrom> I think many people (who care) think likewise. Andrew Gordon's Functional I/O thesis did exactly that. (But operational instead of denotational.)
17:40:02 <Inst> sliced col 1 . sliced row 1 %~ const (V.fromList [V.fromList ["@"])
17:40:57 <Inst> it's constantly giving me an index out of bounds error
17:41:15 <dolio> An infinite printing loop is a different tree than an infinite do-nothing loop.
17:41:25 <monochrom> A long time ago Hoare et al. already proposed, generally and regardless of languages, set of traces for denotational I/O. But that paper was not accepted.
17:41:51 <monochrom> I am happy with set of traces or tree of traces. (Same difference.)
17:42:04 <int-e> dolio: dialogue trees correspond to some free monad I suppose
17:42:32 <EvanR> does that ignore the issue of getCurrentTime, like what determines what comes back from that. The interpreter? It chooses the time arbitrarily?
17:42:39 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 240 seconds)
17:42:42 <dolio> Yeah.
17:42:53 <monochrom> Or rather s/traces/dialogue/ # Much better wording, yeah, thanks.
17:42:57 euleritian joins (~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de)
17:43:25 <c_wraith> it's not like the OS can't return a totally arbitrary result for getCurrentTime anyway. and even will, if you change your system clock enough!
17:43:27 <dolio> And if you quotient the free get/put dialogue tree by the equations that State is supposed to satisfy, you can prove that it's equivalent to `s -> (s,a)`.
17:44:02 <monochrom> Heh this is why it is safer to say "set". >:)
17:44:07 <EvanR> yes the clock api that reacts to changes in system clock is one thing
17:44:37 <EvanR> but there's the monotonic clock, if that wasn't monotonic then you can't write a correct algorithm based on it
17:45:07 <EvanR> so you're relying on something not in the semantics
17:45:15 <dolio> At least, in better behaved settings. If you want to do it for something more like Haskell it's probably a little more work, but I expect you can do it.
17:45:18 <c_wraith> you're stuck with writing algorithms that are correct if the clock is correct.
17:45:23 <monochrom> I would consider getChar : stdin :: getCurrentTime : some-other-device-that-people-pretend-is-time-but-it's-just-another-input-source
17:46:09 <int-e> . o O ( hopefully monotonic but sometimes it isn't and you better cope with that too )
17:46:17 <monochrom> For some applications maybe just add a monotonic increasing assumption.
17:46:59 <Inst> zing, finally got the lens working, via element in control.lens
17:47:16 <monochrom> At some people, at the meta level, you accept that you use a stronger theory for a more demanding application, and a more relaxed theory for a more relaxed application. You don't need to have a unique semantics.
17:47:20 <Inst> control.lens.traversal
17:47:28 <EvanR> "so you want to update an array. First let me introduce you to some lens theory" xD
17:47:35 <monochrom> err s/At some people/At some point/
17:48:02 <albet70> help! I suddenly don't know what MaybeT and ExceptT are used for?
17:48:02 <dsal> TBH, I use lens with HashMap because I had to use HashMap somewhere and didn't want to know anything about it.
17:48:09 <int-e> EvanR: If only somebody had suggested // ...
17:48:16 <Inst> someone did
17:48:25 <EvanR> some at least one
17:48:44 <Inst> the problem was i'm still using a 2D vector
17:48:49 <monochrom> Wait, is it // ? Is it \\ ?
17:48:52 × segfaultfizzbuzz quits (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) (Remote host closed the connection)
17:48:56 <EvanR> \\ is minus
17:49:11 <monochrom> Ah right // is update/override. Sorry!
17:49:16 <EvanR> in before "haskell has too many operators!"
17:49:29 <monochrom> COBOL has too many words. :)
17:49:38 <Inst> so composing via Control.Lens was the easier way to do so given that neither Data.Vector nor Data.List support naive uses for 2D / XD vectors / arrays
17:49:41 <monochrom> Java has too many classes.
17:49:42 <dsal> albet70: Do you understand where the Maybe monad is helpful?
17:49:58 <monochrom> Everything except Haskell has too many null pointers. :)
17:49:59 <Inst> APLer: Haskell has too few operators ;)
17:50:12 <int-e> Haskell has Nothing.
17:50:13 <albet70> dsal , kind of
17:51:14 <dsal> albet70: Well, the idea is that you can have a series of things that produce Maybe values and short-circuit on Nothing. i.e., you can pretend it's not a Maybe and only work on the Just values. If you ever _did_ get a Nothing, then Nothing is returned, otherwise Just result.
17:51:49 <dsal> MaybeT allows you to mix that in with other monads, such as IO where an action might be (IO (Maybe X)) and you want to combine some of those.
17:51:55 <dsal> ExceptT is the same thing, but with Either
17:52:51 <monochrom> There is no "IOT Maybe" so "MaybeT IO" is your only choice. Fortunately it works out as expected.
17:52:52 wombat8756 joins (~user@2603-7000-3e00-1b01-687f-dfa1-6b05-7e2f.res6.spectrum.com)
17:53:36 <EvanR> IOT IO a would do what
17:53:39 <helge_> Is it a good or bad idea to remove ~/.stack, and instead use ~/.ghcup/bin/stack? Currently, my Stack installation and ghcup disagrees about which stack, which cabal and which ghci versions that are installed. I'm using a Mac, and intend to edit my programs in VS Code.
17:53:45 <dsal> EvanR: It's the internet of things monad
17:53:51 <EvanR> is that like 2 time dimensions
17:53:53 <monochrom> Don't take that fortune for granted. "ListT IO" if defined as [IO] did not work out. :)
17:54:39 <haskellbridge> <s​m> helge: if you are using ghcup, you may want to go all in; configure stack to use it (there's info in the ghcup docs)
17:54:44 <monochrom> I thought ~/.stack was data+config directory, ~/.ghcup/bin/stack was the program. Apples and oranges.
17:54:52 <geekosaur> helge_, that sounds confused? ~/.stack is the global state directory
17:54:56 <albet70> what does <- do on Nothing in do notation?
17:55:07 <geekosaur> `fail`
17:55:39 <EvanR> @undo do { x <- Nothing; return (x + 1) }
17:55:39 <lambdabot> Nothing >>= \ x -> return (x + 1)
17:55:54 <EvanR> whatever that does
17:56:01 <[Leary]> "it does Nothing"
17:56:03 <geekosaur> which short-circuits and produces Nothing, per the definition of >>= for Maybe
17:56:32 <monochrom> "Haskell has Nothing. It does Nothing." >:)
17:56:37 <geekosaur> right, sorry, not fail
17:56:43 <EvanR> "Haskell is useless"
17:57:03 <helge_> geekosaur , if it sounds confused, it's because I'm confused. It seems to me that Stack and ghcup do partly the same thing. I've seen that stack can be set up to use the ghc version that ghcup decides. But they don't even agree on which version of stack to use.
17:57:24 × wombat8756 quits (~user@2603-7000-3e00-1b01-687f-dfa1-6b05-7e2f.res6.spectrum.com) (Read error: Connection reset by peer)
17:57:31 <helge_> I just want something that works inside VSCode, so that I can get nice type annotations etc.
17:57:41 <geekosaur> you apparently have another version of stack installed somewhere (check /usr/bin from a system package, and ~/.local/bin)
17:58:31 × danse-nr3_ quits (~francesco@151.37.200.212) (Ping timeout: 255 seconds)
17:58:37 <monochrom> For VSCode, I think (but haven't really checked) my students simply went into VSCode and clicked its "add Haskell" or something, and never needed to think about this.
17:58:38 <geekosaur> you probably want to use the one installed by ghcup instead, and make sure you use the compiler install hook (https://www.haskell.org/ghcup/guide/#strategy-1-stack-hooks-new-recommended)
17:58:40 <albet70> 1. MaybeT and IO (Maybe a) different, in MaybeT do notation <- get a directly, in IO do notation get Maybe a 2. MaybeT is also a constructor, MaybeT $ f can construct MaybeT m (Maybe a)
17:58:47 <helge_> Maybe I can simply remove ~/.local/bin/stack. I'm not sure how it got there. I've tried to get started with Haskell for many years, and every time I use it, there are some changes to the echosystem.
17:58:51 <yin> c_wraith: i' not going to pretend i didn't just copy subtract's signature from a wildcard inference, but this is what i came up with
17:58:54 <yin> https://paste.jrvieira.com/1698083872712
17:58:56 wombat8756 joins (~user@2603-7000-3e00-1b01-687f-dfa1-6b05-7e2f.res6.spectrum.com)
17:59:32 <geekosaur> and the one in ~/.local/bin probably came from a "stack upgrade"
18:00:07 <EvanR> albet70, yes it's two different monads. MaybeT IO has both IO effects and the "Maybe effect"
18:00:14 <monochrom> Though I haven't checked, my hypothesis is likely because my students never asked me about "should I use stack or should I use ghcup?"
18:00:25 <c_wraith> yin: I should have been more accurate above... you can't type those in standard Haskell, but you can in GHC. you need a higher-rank type. see int-e's suggestions.
18:00:54 <monochrom> And I also hypothesis that they have HLS running because they hand in code that adds "import System.Win32" which can only be explained by HLS.
18:02:29 waleee joins (~waleee@2001:9b0:21c:e600:f2f3:f744:435d:137c)
18:03:18 <helge_> geekosaur : I've seen that web page. Will try to read it more carefully. Thank's for the suggestion.
18:03:23 <c_wraith> why would HLS insert that?
18:03:54 <[Leary]> yin: To avoid impredicativity issues, I suggest you use `newtype CNat = C{ iterate :: forall a. (a -> a) -> a -> a }`.
18:04:07 × wombat8756 quits (~user@2603-7000-3e00-1b01-687f-dfa1-6b05-7e2f.res6.spectrum.com) (Read error: Connection reset by peer)
18:04:13 <albet70> EvanR , it can only run IO action on Right a, right?
18:04:36 <geekosaur> IME HLS has a bad tendency to autoselect the first completion in a list, say "but you need an import to use that", and automatically add the import
18:05:16 <monochrom> Evidently my assignments tend to use function names that clash with Win32 and OpenGL function names. :)
18:05:18 wombat8756 joins (~user@2603-7000-3e00-1b01-687f-dfa1-6b05-7e2f.res6.spectrum.com)
18:05:39 <EvanR> albet70, use lift to turn an IO action into a MaybeT IO action
18:05:48 <EvanR> how that's implemented is not important
18:05:48 <monochrom> Hell, a long time ago I maliciously chose such a name clash.
18:06:15 <monochrom> I made an assignment that boiled down to one version of the probability monad.
18:06:37 <monochrom> Then I realized "if I call it that, it's way too googlable."
18:06:56 <monochrom> Then I further realized "let them google for the wrong thing! call it the random monad!"
18:07:18 <monochrom> I know I was successful because one student emailed me "may I import Control.Monad.Random?" >:D
18:08:00 <albet70> MaybeT's do notation, v <- x; when f :: a -> IO (); if x is IO (Right _) then f v will run, if x is IO (Left _) f v won't run
18:08:10 <tomsmeding> monochrom: did you tell them "yes, sure"? :p
18:08:20 <monochrom> Nah, I just said "no".
18:08:34 <geekosaur> albet70, that would be EitherT / ExceptT (Left and Right)
18:08:41 <tomsmeding> monochrom: I see your malice ended with the deliberate name clash
18:09:11 <albet70> geekosaur , yes
18:10:43 <albet70> since then Left won't run, what's the meaning to use case of in ExceptT do notation?
18:11:20 × helge_ quits (~textual@h-158-174-186-9.NA.cust.bahnhof.se) (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:12:25 falafel joins (~falafel@62.175.113.194.dyn.user.ono.com)
18:12:49 <monochrom> You can have an outer "catch" that catches that Left.
18:12:56 × wombat8756 quits (~user@2603-7000-3e00-1b01-687f-dfa1-6b05-7e2f.res6.spectrum.com) (Ping timeout: 272 seconds)
18:13:03 <monochrom> So now you have an exception system.
18:14:02 <geekosaur> MaybeT tells you that something failed; ExceptT lets you pass back *what* failed
18:15:32 <yin> am i *sort of* correct in saying that type-checking breaks referential transparency?
18:15:37 Guest|62 joins (~Guest|62@p5797961b.dip0.t-ipconnect.de)
18:15:50 <tomsmeding> you'll need to explain that one :p
18:15:56 <monochrom> What would be an example of that?
18:16:45 <albet70> monochrom , right
18:17:11 × Guest|62 quits (~Guest|62@p5797961b.dip0.t-ipconnect.de) (Client Quit)
18:17:57 <geekosaur> the point of not running f v is that >>= propagates the Left instead, short-circuiting the rest of the failed computation
18:19:54 <dsal> albet70: I think `do` might be confusing you a bit. It's a bit easier to think about these things if you don't also think about `do` notation.
18:20:11 <albet70> short circuiting is improper I think, Cont is short circuiting
18:20:42 <rgw> why does ghcup list cabal 3.6.2.0 and ghc 9.4.7 as the recommended versions when cabal 3.6.2.0 only supports up to ghc 9.4.0?
18:20:44 <monochrom> I won't waste time arguing against that.
18:20:56 <albet70> dsal , haha, but everyone is using do notation
18:20:59 <monochrom> Words mean nothing. Show actual examples and actual math.
18:21:38 <tomsmeding> rgw: enlighten me when you know :p
18:21:39 <dsal> albet70: do notation is just another layer on the thing you're trying to understand.
18:21:43 <monochrom> Words mean sh*t and COBOL is full of those.
18:22:32 <c_wraith> Python is also full of words. awkward as heck.
18:23:29 × dcoutts quits (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Ping timeout: 258 seconds)
18:23:35 × _xor quits (~xor@72.49.199.93) (Read error: Connection reset by peer)
18:23:42 <geekosaur> albet70, I'd say it's short-circuiting your computation (the `f …`) but not the chain of `>>=`s
18:23:52 <yin> tomsmeding: monochrom: this https://paste.jrvieira.com/1698085410423
18:23:57 <geekosaur> short circuiting could happen on multiple levels
18:24:05 danza joins (~francesco@151.37.200.212)
18:24:56 <monochrom> The ghcup team humanly considers factors including GHC bugs and hackage library support in order to choose and update the recommended GHC version. I don't know how they choose the recommended cabal-install version.
18:25:29 <tomsmeding> yin: who said that church numerals work in the simply-typed lambda calculus
18:25:38 <geekosaur> there's an obscure Windows bug in 3.8.x and 3.10.0/3.10.1 iirc. 3.10.2 should have a fix but has not yet been released
18:25:50 _xor joins (~xor@72.49.199.93)
18:26:04 <rgw> seems like they've previously recommended a haskell version that wasn't hls powered
18:26:30 <geekosaur> yes, because HLS can't always keep up with GHC
18:26:31 <tomsmeding> yin: you might have more luck with explicit polymorphism, like newtype Church = Church (forall a. (a -> a) -> a -> a)
18:26:48 <albet70> how you handle multiple wrapped monad? since ExceptT Error IO a only has Either and IO effect, what it needs more effects?
18:26:58 <rgw> i would think they'd recommend a version that is hls powered
18:27:01 <monochrom> yin: There are multiple stances about that.
18:27:07 <monochrom> One is what you said.
18:27:12 <rgw> "recommended" is kind of a nebulous term though
18:27:21 <monochrom> Another is "use a better type system" :)
18:27:33 <yin> monochrom: :)
18:27:50 <monochrom> Another is "only consider typable expressions".
18:28:40 <dsal> albet70: In practice, if I'm using MaybeT, it's around some other application-specific monad around IO. Then you just lift to unpeel each layer.
18:29:16 <yin> it was not easy for someone like me to understand why `num_ 0 = zero` breaks
18:29:21 <monochrom> But yeah all of Church encodings work in only untyped and System F. Hindley-Milner is not going to work.
18:29:46 <monochrom> "go big or go home" :)
18:31:40 <yin> going big being having System F?
18:32:33 <monochrom> Wadler's https://homepages.inf.ed.ac.uk/wadler/topics/parametricity.html#free (recursive types for free) kind of shows why you need System F and parametricity to ensure that you actually can encoding initial algebras.
18:32:37 <monochrom> Yeah
18:33:16 × John_Ivan quits (~John_Ivan@user/john-ivan/x-1515935) (Remote host closed the connection)
18:33:37 <tomsmeding> yin: https://paste.tomsmeding.com/3XGP1tfq
18:33:41 John_Ivan joins (~John_Ivan@user/john-ivan/x-1515935)
18:34:10 <monochrom> Oleg also has https://okmij.org/ftp/tagless-final/course/Boehm-Berarducci.html along the same theme.
18:35:09 <yin> ty ty
18:35:59 <yin> i have no formal education on any of this
18:36:33 <monochrom> Well yeah I bet most of us self-taught this stuff and couldn't find formal courses...
18:36:54 tomsmeding has had some formal courses but not on this :p
18:37:29 <monochrom> Who needs course when one can just read TaPL from cover to cover >:D
18:37:29 <tomsmeding> tried to understand Oleg's stuff at some point and gave up quickly -- perhaps I should persevere at some point
18:37:51 × John_Ivan quits (~John_Ivan@user/john-ivan/x-1515935) (Remote host closed the connection)
18:38:18 John_Ivan joins (~John_Ivan@user/john-ivan/x-1515935)
18:38:31 <monochrom> I think I didn't carefully read the Boehm-Berarducci paper, but I did persevere Wadler's one.
18:39:23 × sm quits (~sm@plaintextaccounting/sm) (Quit: sm)
18:40:13 <monochrom> Well, time is a zero-sum game. I spent time on this, you spent time on something else. There will be other topics you know much more deeply. :)
18:40:14 <EvanR> monochrom, I like how polymorphic "words mean sh*t" is, (not referring to the wildcard)
18:40:32 <monochrom> :)
18:44:31 Lycurgus joins (~georg@user/Lycurgus)
18:47:39 dhil joins (~dhil@2001:8e0:2014:3100:c465:c19e:7201:d418)
18:49:32 × picnoir quits (~ninja@about/aquilenet/vodoo/NinjaTrappeur) (Quit: WeeChat 4.0.5)
18:49:56 × danza quits (~francesco@151.37.200.212) (Ping timeout: 258 seconds)
18:51:02 × euleritian quits (~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de) (Ping timeout: 255 seconds)
18:51:05 × Maxdamantus quits (~Maxdamant@user/maxdamantus) (Ping timeout: 258 seconds)
18:52:41 picnoir joins (~picnoir@about/aquilenet/vodoo/NinjaTrappeur)
18:52:44 Maxdamantus joins (~Maxdamant@user/maxdamantus)
19:02:31 <haskellbridge> <m​auke> Haskellers love arguing about semantics
19:03:55 × falafel quits (~falafel@62.175.113.194.dyn.user.ono.com) (Ping timeout: 264 seconds)
19:05:05 helge_ joins (~textual@h-158-174-186-9.NA.cust.bahnhof.se)
19:05:11 × helge_ quits (~textual@h-158-174-186-9.NA.cust.bahnhof.se) (Client Quit)
19:07:39 Pickchea joins (~private@user/pickchea)
19:08:23 × fendor quits (~fendor@2a02:8388:1640:be00:aab:1226:f274:5021) (Remote host closed the connection)
19:09:50 × idgaen quits (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 4.0.5)
19:10:22 helge_ joins (~textual@h-158-174-186-9.NA.cust.bahnhof.se)
19:13:27 × Lycurgus quits (~georg@user/Lycurgus) (Quit: leaving)
19:13:59 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f) (Remote host closed the connection)
19:19:39 CiaoSen joins (~Jura@2a05:5800:2cd:b800:664b:f0ff:fe37:9ef)
19:20:43 × helge_ quits (~textual@h-158-174-186-9.NA.cust.bahnhof.se) (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:27:42 × gatekempt quits (~gatekempt@user/gatekempt) (Remote host closed the connection)
19:34:21 <johnw> mauke: what you mean by that
19:34:46 <monochrom> :)
19:36:52 <johnw> ;-)
19:37:13 <Inst> port of Python book project #44 complete, did not read nor care for Python original
19:39:16 <haskellbridge> <I​nst> https://paste.tomsmeding.com/Ni3w5J5X
19:50:00 helge_ joins (~textual@h-158-174-186-9.NA.cust.bahnhof.se)
19:51:13 dcoutts joins (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net)
19:52:45 × helge_ quits (~textual@h-158-174-186-9.NA.cust.bahnhof.se) (Client Quit)
19:53:43 × elkcl quits (~elkcl@broadband-95-84-226-240.ip.moscow.rt.ru) (Ping timeout: 255 seconds)
19:54:17 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f)
19:55:21 target_i joins (~target_i@217.175.14.39)
19:57:01 falafel joins (~falafel@62.175.113.194.dyn.user.ono.com)
19:58:52 actioninja6 joins (~actioninj@user/actioninja)
19:58:53 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f) (Ping timeout: 255 seconds)
19:58:56 × fweht quits (uid404746@id-404746.lymington.irccloud.com) (Quit: Connection closed for inactivity)
19:59:09 helge_ joins (~textual@h-158-174-186-9.NA.cust.bahnhof.se)
19:59:53 elkcl joins (~elkcl@broadband-95-84-226-240.ip.moscow.rt.ru)
19:59:58 × czy quits (~user@121.231.41.11) (Ping timeout: 272 seconds)
20:00:28 × actioninja quits (~actioninj@user/actioninja) (Ping timeout: 258 seconds)
20:00:29 actioninja6 is now known as actioninja
20:01:36 random-jellyfish joins (~tiber@2a02:2f04:11e:c600:d86:8764:b7a3:4444)
20:01:36 × random-jellyfish quits (~tiber@2a02:2f04:11e:c600:d86:8764:b7a3:4444) (Changing host)
20:01:36 random-jellyfish joins (~tiber@user/random-jellyfish)
20:04:11 × _ht quits (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Remote host closed the connection)
20:05:15 × takuan_dozo quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
20:06:42 × helge_ quits (~textual@h-158-174-186-9.NA.cust.bahnhof.se) (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:08:34 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
20:11:03 helge_ joins (~textual@h-158-174-186-9.NA.cust.bahnhof.se)
20:16:26 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 255 seconds)
20:17:45 × helge_ quits (~textual@h-158-174-186-9.NA.cust.bahnhof.se) (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:18:27 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
20:21:23 helge_ joins (~textual@h-158-174-186-9.NA.cust.bahnhof.se)
20:22:04 × simendsjo quits (~user@84.211.91.241) (Ping timeout: 255 seconds)
20:22:15 dudek joins (~dudek@185.150.236.168)
20:23:40 × dhil quits (~dhil@2001:8e0:2014:3100:c465:c19e:7201:d418) (Ping timeout: 252 seconds)
20:27:05 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f)
20:40:13 × helge_ quits (~textual@h-158-174-186-9.NA.cust.bahnhof.se) (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:40:56 helge_ joins (~textual@h-158-174-186-9.NA.cust.bahnhof.se)
20:46:51 emmanuelux joins (~emmanuelu@user/emmanuelux)
20:50:53 × helge_ quits (~textual@h-158-174-186-9.NA.cust.bahnhof.se) (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:51:01 <EvanR> Inst, it's quite an IO heavy translation
20:51:48 helge_ joins (~textual@h-158-174-186-9.NA.cust.bahnhof.se)
20:52:04 <EvanR> and I'm wondering if the lenses are helping as far as total code size
20:52:50 <Inst> It's not, I think, it's just because I didn't want to munge the vector.
20:52:59 <Inst> I'm curious if you think there's any way to increase the pure-impure ratio?
20:56:13 <EvanR> is it basically, sit and wait until an arrow key is pressed, at which point crunch a state transition function and print out an updated picture, repeat
20:56:54 <EvanR> the parseMaze was factored out of IO so that's good
20:59:13 <Inst> the weirder part i guess is probably the huge closures, which might impede readibility
20:59:42 <EvanR> I have to admit, I'm a never nester. So I would've not done that
21:00:06 <EvanR> but you see very nested haskell code if you look at libraries
21:00:07 <Inst> part of the issue is that this is designed as a cabal script, so moving off to separate modules is more difficult
21:00:45 <Inst> I guess this is a closure abuse issue :(
21:01:28 × helge_ quits (~textual@h-158-174-186-9.NA.cust.bahnhof.se) (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:02:04 <EvanR> it's pretty readable
21:02:15 <Inst> this is the original
21:02:17 <Inst> https://inventwithpython.com/bigbookpython/project44.html
21:02:20 <EvanR> but when everything is in IO that tends to increase the size of code
21:02:26 <EvanR> at least, if you don't need IO
21:04:47 <Inst> I guess it was more for a rough draft / move fast and break things approach
21:04:56 <Inst> I was horribly tempted to do the file parser in IO
21:05:07 <EvanR> that's why I brought it up
21:06:07 <EvanR> the classic advice is to have most of your code in not-IO and use it within a thin IO shell which is the part that actually does the I/O. For this program that seems actually possible
21:06:57 nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net)
21:08:01 <Inst> probably the part that could be replaced by optparse-applicative is inflating IO size
21:08:21 × CrunchyFlakes quits (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) (Quit: ZNC 1.8.2 - https://znc.in)
21:08:52 <EvanR> :t getArgs
21:08:53 <lambdabot> error: Variable not in scope: getArgs
21:09:05 <Inst> > import System.Environment
21:09:07 <lambdabot> <hint>:1:1: error: parse error on input ‘import’
21:09:11 <EvanR> getArgs :: IO [String]
21:09:19 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
21:09:47 <EvanR> the getting of the args list requires IO
21:10:00 <Inst> the [String] can be processed without IO
21:10:45 <Inst> but there's no real string processing, just a bunch of complaints if the args are given in the wrong format (no args, too many args, file doesn't exist)
21:11:13 <EvanR> either way the analysis of args doesn't require IO
21:11:46 × nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 260 seconds)
21:12:14 <EvanR> (file doesn't exist might be a complaint, but it's primarily an I/O exception when you go to open the file)
21:12:17 <Inst> that implies, though, you'd have a datatype that represents the outcomes of analysis, then pattern match on the analysis
21:12:43 <EvanR> Either String FilePath, or whatever
21:13:19 <Inst> that's an interesting design
21:13:37 <Inst> Either String Game
21:14:08 <EvanR> reading the file requires IO, if the arguments are obviously bogus
21:14:08 × falafel quits (~falafel@62.175.113.194.dyn.user.ono.com) (Ping timeout: 255 seconds)
21:14:10 <Inst> on left, output the pure error message, and exit
21:14:18 <EvanR> arent*
21:14:52 <EvanR> so there's a clear sequence of IO stages which may or may not fail until you get to the game loop
21:15:04 <Inst> the biggest complain i have with the code is the early exit
21:15:19 <Inst> main = initialize >>= mazeProg
21:15:33 <Inst> that's essentially a schematic of the program, but it's not honored
21:15:36 <EvanR> IO can exit early
21:15:39 <EvanR> everyone knows
21:15:50 <Inst> since stuff inside initialize is calling exitSuccess, exitFailure, etc
21:18:30 <EvanR> you could exit without those too, pattern matching between stages
21:18:48 <Inst> so what I can do is to change initialize to IO (Either String Game), then pass mazeProg to decide what to do about it, then create a separate loop within mazeProg
21:18:55 <Inst> there's more entertaining things to do, for instance
21:19:06 <Inst> https://invpy.com/mazes/
21:19:18 <Inst> for instance, I could build a HTML parser, call simpleHTTP onto this address
21:19:27 <Inst> then provide a choice of mazes from there
21:20:24 <Inst> seems more honorable for practicing HTML parsing than trying to bill tomsmeding for 1 GB trying to parse his irclogs
21:20:38 <rgw> " --he:lp Show help options"
21:20:41 <rgw> small typo
21:20:52 <monochrom> heh
21:21:06 <EvanR> "entertaining" and "HTML parser" in the same plan
21:21:31 <rgw> (line 88)
21:21:54 <Inst> fixed already
21:22:08 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
21:22:34 <Unicorn_Princess> hrm. how do i make available a local haskell library to ghci/other local haskell projects? i.e. how do i install it, and then how do i uninstall it? my current workflow of `cd mylocallib; cabal build; cabal install` only kinda works, and i'm sure i'm doing uninstalls wrong
21:23:09 <exarkun> Unicorn_Princess: "cabal install" for libraries is no longer encouraged
21:23:44 <exarkun> Unicorn_Princess: instead, declare dependencies with "build-depends" in a .cabal file and just use "cabal build" (or "cabal v2-build" if you have're stuck with a really old cabal for some reason)
21:24:31 <exarkun> Unicorn_Princess: with "build-depends" every project can have its own private dependency solution space, instead of throwing everything into a single global set where _everything_ has to play nicely together.
21:24:50 <Unicorn_Princess> what is ghci's version of a .cabal file?
21:25:30 <Inst> problem is, Cabal currently has no way to uninstall
21:25:51 <exarkun> Unicorn_Princess: "cabal repl" probably
21:26:48 <EvanR> I uninstall my cabalckages easily, delete the project directory
21:26:51 <exarkun> Unicorn_Princess: with "--build-depends=..." as an argument if you don't want to write a .cabal file
21:27:06 <Inst> https://cabal.readthedocs.io/en/3.4/cabal-project.html
21:27:15 <Unicorn_Princess> `cabal repl` will look for a .cabal file in ~/?
21:27:25 <exarkun> Unicorn_Princess: no, in .
21:27:47 <exarkun> or maybe it will walk up the filesystem too, I'm not sure
21:27:57 <exarkun> but I don't use it that way
21:27:58 <Unicorn_Princess> hm. i'd like to make my library available to the repl no matter where i start the repl, tho
21:28:07 <Inst> oh, old version
21:28:08 <Inst> https://cabal.readthedocs.io/en/stable/cabal-project.html
21:28:14 <exarkun> well, that's just the thing that cabal no longer particularly wants to help you do
21:28:29 <Inst> worst case, you could github your libs, then download the packages from github
21:28:44 helge_ joins (~textual@h-158-174-186-9.NA.cust.bahnhof.se)
21:29:15 <Inst> https://dev.to/piq9117/using-github-repos-as-haskell-dependency-m2o
21:29:33 <exarkun> Inst: lots of words, it's not clear who they're for
21:30:22 <Inst> which link? It's for unicornprincess, as a workaround, because I don't know how to get cabal to read local libs
21:30:26 <Unicorn_Princess> hmmm, okay, i'll hit my head against this wall some more, i see the glimmer of a solution. thanks
21:30:46 <Inst> you could ask in #hackage
21:30:50 <Inst> that's where cabal team hangs out
21:31:27 <Unicorn_Princess> (the problem with ~/.config/cabal/config is that it applies to all projects on my system. but i'll figure something out to apply it only to ghci when i want it to)
21:33:20 <Inst> via sclv, V2 install / builds ignore global repo, afaik
21:35:02 <monochrom> Unicorn_Princess: Firstly, in this the 21st Century CE, devs are overpaid and spoiled with 10PB NVMe's and 256TB of RAM, no one speaks of "uninstall" any more. Still, I wrote https://github.com/treblacy/cabalgc to help.
21:35:54 <monochrom> With that out of the way, I personally use "cabal install --lib random" sometimes (though not always), but people here will scaremonger you out of it.
21:36:03 <Unicorn_Princess> i think i'll just nuke and reinstall my whole haskell, and then never `cabal install` anything else again >_>
21:36:24 <monochrom> So if not that, then it's "cabal script" or "cabal repl -brandom". That also work fine.
21:36:29 <Inst> monochrom: gotta remember the poor kids at Chennai Mathematical Institute, who apparently intro course with Haskell
21:36:37 <Inst> a good laptop is equal to 100% of GDP per capita :(
21:36:42 <Unicorn_Princess> it's been giving me weird warnings it didn't use to anyway, and i'm not figuring out how to fix those if i don't absolutely have to
21:37:18 <monochrom> Yes it is my very extremely unpopular opinion that web devs should be confined to OLPC netbooks. (Remember those?)
21:37:33 <monochrom> And yes, netbooks, not even laptops.
21:37:49 <Unicorn_Princess> oh it's actually called `ghcup nuke`, neat
21:37:57 <Inst> Btw, sorry about the state of tooling, Unicorn_Princess
21:38:06 <Inst> there are many very talented people (not me) working on it, but it takes time.
21:38:10 <Inst> Thanks for taking an interest in Haskell :)
21:38:12 ft joins (~ft@p4fc2a529.dip0.t-ipconnect.de)
21:39:30 × helge_ quits (~textual@h-158-174-186-9.NA.cust.bahnhof.se) (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:39:37 <Unicorn_Princess> ah that's okay. ghcup is pleasant at least, and the library thing is more about documentation than tooling itself (i assume, we'll see how the no-install route works for me)
21:39:57 <Inst> you're having trouble even without --lib?
21:40:15 <Inst> I'm one of the maniacs that actually set up an env file, i.e, I set up cabal install base --lib
21:40:21 <Inst> then cabal install everything else
21:40:27 × Jackneill quits (~Jackneill@20014C4E1E0E6F00958F8CDDD487D8C2.dsl.pool.telekom.hu) (Ping timeout: 246 seconds)
21:40:42 <Inst> but without --lib, because adding --lib causes the package to be exposed in global env file
21:41:12 helge_ joins (~textual@h-158-174-186-9.NA.cust.bahnhof.se)
21:41:32 <Inst> which causes problems, instead I ghci -package necessarypackage -package otherneededpackage instead, and use :set -package in ghci to turn various libraries on
21:41:43 <Inst> and I still have to routinely clear my cabal repo
21:43:12 <Unicorn_Princess> uh i think it didn't work at all without --lib, but i forgot
21:44:23 <Inst> --lib is horrible
21:44:34 × helge_ quits (~textual@h-158-174-186-9.NA.cust.bahnhof.se) (Client Quit)
21:44:34 <Inst> you end up having the package permanently exposed in GHCI
21:45:31 <monochrom> Without --lib means exe only. For lib-only packages, therefore the computer churns but installs nothing permanent.
21:45:53 <monochrom> Great for when your stove doesn't work but you need to fry eggs.
21:47:03 <Unicorn_Princess> well in my case it is a lib-only package, so exe only does me little good, yeah
21:47:38 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 256 seconds)
21:53:48 × random-jellyfish quits (~tiber@user/random-jellyfish) (Ping timeout: 240 seconds)
21:55:11 <Inst> if you have an environment file, without --lib dumps into package repo, but doesn't expose it
21:55:24 <Inst> it also writes the existence of the lib into the environment file, but doesn't load it by default
21:55:38 <Inst> works on arch and windows afaik
21:57:08 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f) (Ping timeout: 272 seconds)
21:57:11 <Unicorn_Princess> okay but if i understand correctly, `cabal install`, with or without --lib, is not The Way anymore, right? and instead i wanna just specify my library as a dependency for other projects/ghci
21:57:31 <Unicorn_Princess> and never run cabal install mylocalproject
21:58:12 × vglfr quits (~vglfr@88.155.140.136) (Remote host closed the connection)
21:58:23 <Inst> the problem is that cabal install has been sort of broken for a long time
21:58:44 <Inst> it's connected to the old Cabal Hell, even though cabal projects now completely ignore your global environment file
21:58:53 <Inst> all the old textbooks say cabal install foo
21:59:01 vglfr joins (~vglfr@88.155.140.136)
21:59:10 <Unicorn_Princess> yes but i won't be using cabal install, right?
21:59:17 <Inst> yeah, i guess, because it's finicky
21:59:29 <Unicorn_Princess> so it may be a problem, but it is Somebody Else's Problem
21:59:29 <Inst> you can just load stuff on a github and increase your commit history
21:59:40 <Inst> then go to the package-based workflow
21:59:44 × michalz quits (~michalz@185.246.207.215) (Remote host closed the connection)
21:59:57 <monochrom> For exes, "cabal install" is standard.
22:00:19 <Inst> on Arch, at least, the compatibility issues with ghc packages are legendary
22:00:33 <Inst> if you say, want Agda, the better way to do it is not to download Agda via pacman, but cabal install agda
22:00:51 <monochrom> E.g., to build and install the hscolour exe, it's "cabal install hscolour".
22:00:57 × Pickchea quits (~private@user/pickchea) (Quit: Leaving)
22:01:38 <EvanR> cabal install is finicky because arch exists, no
22:02:01 <EvanR> case in point, I'm not on arch and it works
22:03:38 <Inst> I mean in reference to monochrom
22:05:40 <Unicorn_Princess> what exactly will `cabal install` do for an exe, is it The Way, and how can I then un-do whatever it is that cabal install would do?
22:05:49 <yushyin> even installing some tools (written in haskell) with pacman is fine, if you *do not* use it for dev-stuff. do all your dev-related stuff with a different toolchain installed via ghcup and it works fine. /me used to use arch.
22:05:53 <Unicorn_Princess> make it globally available in bash?
22:06:34 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
22:06:36 <monochrom> Yes for exe "cabal install" is The Way.
22:06:58 <Inst> can't uninstall, though, but iirc, you can override :)
22:07:44 <monochrom> If disk space is not a concern, only conerned about getting rid of something on PATH, then just delete the file from ~/.cabal/bin or ~/.local/bin I forgot which and it keeps changing.
22:08:04 <monochrom> You can dig into ~/.cabal/store to free up disk space.
22:08:36 yoyofreeman joins (~yoyofreem@176.97.76.178)
22:08:37 × yoyofreeman quits (~yoyofreem@176.97.76.178) (Max SendQ exceeded)
22:09:18 yoyofreeman joins (~yoyofreem@176.97.76.178)
22:10:10 <EvanR> uninstall is a thing debian and red hat tried to sell, but it takes a lot of engineering to support that
22:10:11 × acidjnk_new quits (~acidjnk@p200300d6e72b935208de20f4829382c8.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
22:10:20 falafel joins (~falafel@62.175.113.194.dyn.user.ono.com)
22:10:29 <EvanR> meanwhile slackware continued to just delete the exe if you really wanted to xD
22:10:34 <EvanR> manually
22:10:51 <Unicorn_Princess> what have i waded into :S
22:11:30 <EvanR> you know who should invest in the off boarding experience, like every subscription based website, not package managers
22:13:12 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
22:14:05 × target_i quits (~target_i@217.175.14.39) (Quit: leaving)
22:14:12 Sgeo joins (~Sgeo@user/sgeo)
22:15:00 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 240 seconds)
22:19:31 × vglfr quits (~vglfr@88.155.140.136) (Read error: Connection reset by peer)
22:21:52 Lycurgus joins (~georg@user/Lycurgus)
22:26:08 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
22:32:41 × coot quits (~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot)
22:34:12 × falafel quits (~falafel@62.175.113.194.dyn.user.ono.com) (Ping timeout: 240 seconds)
22:35:13 coot joins (~coot@89-69-206-216.dynamic.chello.pl)
22:37:10 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
22:39:18 × coot quits (~coot@89-69-206-216.dynamic.chello.pl) (Client Quit)
22:40:29 × Lycurgus quits (~georg@user/Lycurgus) (Quit: leaving)
22:51:28 × Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection)
22:54:39 × Square quits (~Square@user/square) (Ping timeout: 240 seconds)
23:01:12 <yin> is haskellbridge matrix?
23:01:33 <yushyin> yes
23:04:14 random-jellyfish joins (~tiber@2a02:2f04:11e:c600:d86:8764:b7a3:4444)
23:04:14 × random-jellyfish quits (~tiber@2a02:2f04:11e:c600:d86:8764:b7a3:4444) (Changing host)
23:04:14 random-jellyfish joins (~tiber@user/random-jellyfish)
23:04:20 <geekosaur> it's the #haskell-irc room on matrix; the #haskell room does not want to be bridged
23:07:23 × chomwitt quits (~chomwitt@2a02:587:7a1a:8700:1ac0:4dff:fedb:a3f1) (Quit: Leaving)
23:09:15 <yin> the marvels of technology
23:09:31 falafel joins (~falafel@62.175.113.194.dyn.user.ono.com)
23:09:46 × random-jellyfish quits (~tiber@user/random-jellyfish) (Ping timeout: 252 seconds)
23:10:26 arahael joins (~arahael@119-18-2-212.771202.syd.nbn.aussiebb.net)
23:14:47 aljazmc_ joins (~aljazmc@user/aljazmc)
23:15:15 dcoutts_ joins (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net)
23:16:54 × aljazmc quits (~aljazmc@user/aljazmc) (Remote host closed the connection)
23:17:27 × dcoutts quits (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Ping timeout: 240 seconds)
23:19:30 JuanDaugherty joins (~juan@user/JuanDaugherty)
23:24:25 chomwitt joins (~chomwitt@2a02:587:7a1a:8700:1ac0:4dff:fedb:a3f1)
23:26:42 Lycurgus joins (~georg@user/Lycurgus)
23:29:00 × chomwitt quits (~chomwitt@2a02:587:7a1a:8700:1ac0:4dff:fedb:a3f1) (Ping timeout: 240 seconds)
23:32:04 <monochrom> EvanR: Oh hey I didn't think of that. I thought I was good at seeing economics and disincentives. :)
23:32:11 × falafel quits (~falafel@62.175.113.194.dyn.user.ono.com) (Ping timeout: 255 seconds)
23:33:11 × emmanuelux quits (~emmanuelu@user/emmanuelux) (Ping timeout: 255 seconds)
23:38:26 emmanuelux joins (~emmanuelu@user/emmanuelux)
23:39:48 × Tuplanolla quits (~Tuplanoll@91-159-68-236.elisa-laajakaista.fi) (Ping timeout: 240 seconds)
23:40:28 × JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: JuanDaugherty)
23:47:49 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5)
23:50:36 × emmanuelux quits (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer)
23:52:23 × Raito_Bezarius quits (~Raito@wireguard/tunneler/raito-bezarius) (Ping timeout: 258 seconds)
23:52:26 emmanuelux joins (~emmanuelu@user/emmanuelux)
23:53:07 × Luj quits (~Luj@2a01:e0a:5f9:9681:5880:c9ff:fe9f:3dfb) (Ping timeout: 264 seconds)
23:54:03 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f)
23:58:56 Luj joins (~Luj@2a01:e0a:5f9:9681:5880:c9ff:fe9f:3dfb)
23:59:17 × santiagopim quits (~user@90.167.66.131) (Ping timeout: 255 seconds)

All times are in UTC on 2023-10-23.