Home liberachat/#haskell: Logs Calendar

Logs on 2022-10-12 (liberachat/#haskell)

00:00:44 loras joins (~loras@c-73-139-125-125.hsd1.fl.comcast.net)
00:01:57 <monochrom> You come across as starting from first principles and using Laplace analysis to reconstruct the wave function of the whole universe and finally you're done and it contains an apple pie. :)
00:03:36 <hpc> just as carl sagan predicted
00:03:44 <monochrom> APFFP >:)
00:04:19 <monochrom> Chapter 1 teaches you Calculus. Literally. >:)
00:05:02 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
00:05:04 <monochrom> #apple-pie-beginners
00:05:16 DDR joins (~DDR@2604:3d08:4c7f:8250:8f0b:51dd:a01f:4b3f)
00:09:39 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Client Quit)
00:14:06 dsrt^ joins (~dsrt@c-76-17-6-165.hsd1.ga.comcast.net)
00:14:31 mvk joins (~mvk@2607:fea8:5ce3:8500::a80f)
00:16:01 burnsidesLlama joins (~burnsides@192.76.8.86)
00:20:17 × zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection)
00:21:16 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:9960:b0f8:561f:a74b)
00:22:15 thegeekinside joins (~thegeekin@189.180.7.159)
00:24:30 × raehik1 quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 244 seconds)
00:25:32 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:9960:b0f8:561f:a74b) (Ping timeout: 244 seconds)
00:30:27 wroathe joins (~wroathe@206.55.188.8)
00:30:27 × wroathe quits (~wroathe@206.55.188.8) (Changing host)
00:30:27 wroathe joins (~wroathe@user/wroathe)
00:31:20 zaquest joins (~notzaques@5.130.79.72)
00:36:53 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 258 seconds)
00:47:40 nate1 joins (~nate@98.45.169.16)
00:48:40 <talismanick> /JOIN #apple-pie-beginners
00:52:24 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Read error: Connection reset by peer)
00:52:28 × jinsun quits (~jinsun@user/jinsun) (Read error: Connection reset by peer)
00:52:31 × nate1 quits (~nate@98.45.169.16) (Ping timeout: 260 seconds)
00:53:55 jinsun joins (~jinsun@user/jinsun)
00:57:22 Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
00:58:30 <FlaminWalrus> Attempt 2 is better, but still terrible: I got partial results processing a million lines. https://paste.tomsmeding.com/j0jwBkg4
00:59:07 <FlaminWalrus> I couldn't figure out the ByteString parsing; is the parsing monad not included?
00:59:30 <Axman6> chunksOf looks very inefficient to me
00:59:54 <Axman6> can't you just slice the input vector?
01:00:12 <FlaminWalrus> Valid point
01:00:18 <Axman6> like, I'm pretty sure that's O(n^20
01:00:26 <Axman6> O(n^2)*
01:00:47 <FlaminWalrus> Lmao I wouldn't put it past me to write something like the first
01:01:20 beteigeuze1 joins (~Thunderbi@2001:8a0:61b5:6101:f0c:e4e3:bfdc:91df)
01:01:22 <FlaminWalrus> I had forgotten about list comps, which would have been the only advantage of doing this with List; this is despite knowing y'all invented them
01:01:33 <Axman6> using generate and slice it should be significantly more efficient
01:02:23 × beteigeuze quits (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 268 seconds)
01:02:23 beteigeuze1 is now known as beteigeuze
01:03:11 jargon joins (~jargon@184.101.208.112)
01:03:13 <Axman6> also, as a style thing, we generally wouldn't hide Prelude functions like map, but instead import Vector qualified as V and use V.map
01:04:37 <geekosaur> this is also more extensible, because for example Map also reuses some names, so you would have problems if you later started to use them in your code. importing qualified works better
01:05:31 <Axman6> also, map f (generate n id) is just generate n f
01:05:54 <Axman6> and will make the code look a lot nicer: generate n $ \k -> ...
01:06:01 <Axman6> no need to extra brackets
01:08:02 × jinsun quits (~jinsun@user/jinsun) (Read error: Connection reset by peer)
01:11:21 andreabedini joins (~andreabed@8s8kj681vht2qj3xkwc5.ip6.superloop.com)
01:12:02 <FlaminWalrus> I can translate j so that the other list is generate n id...I don't suppose there's a corresponding form for foldl' though?
01:12:28 <FlaminWalrus> Or is there a way to make sum + map strict?
01:13:28 <Axman6> I don't understand the question
01:15:41 <Axman6> FlaminWalrus: sublength = (floor (fromIntegral n / fromIntegral samples)) is just sublength = n `div` samples, no?
01:15:43 <FlaminWalrus> Sorry. That was somewhere between thinking out loud and asking; in both functions I foldl' over what is, in essence, (generate n id), so I was wondering how one would apply the refactoring to that
01:16:18 × jargon quits (~jargon@184.101.208.112) (*.net *.split)
01:16:18 × wroathe quits (~wroathe@user/wroathe) (*.net *.split)
01:16:18 × burnsidesLlama quits (~burnsides@192.76.8.86) (*.net *.split)
01:16:18 × mvk quits (~mvk@2607:fea8:5ce3:8500::a80f) (*.net *.split)
01:16:18 × DDR quits (~DDR@2604:3d08:4c7f:8250:8f0b:51dd:a01f:4b3f) (*.net *.split)
01:16:18 × inversed quits (~inversed@90.209.137.56) (*.net *.split)
01:16:18 × libertyprime quits (~libertypr@118-92-78-165.dsl.dyn.ihug.co.nz) (*.net *.split)
01:16:18 × leungbk quits (~user@cpe-142-129-149-172.socal.res.rr.com) (*.net *.split)
01:16:18 × ubert quits (~Thunderbi@77.119.214.60.wireless.dyn.drei.com) (*.net *.split)
01:16:18 × zxrom quits (~zxrom@mm-232-14-212-37.vitebsk.dynamic.pppoe.byfly.by) (*.net *.split)
01:16:18 × Natch quits (~natch@c-9e07225c.038-60-73746f7.bbcust.telenor.se) (*.net *.split)
01:16:18 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (*.net *.split)
01:16:18 × AlexZenon quits (~alzenon@178.34.161.92) (*.net *.split)
01:16:18 × econo quits (uid147250@user/econo) (*.net *.split)
01:16:18 × dr_merijn quits (~dr_merijn@86-86-29-250.fixed.kpn.net) (*.net *.split)
01:16:18 × dolio quits (~dolio@130.44.130.54) (*.net *.split)
01:16:18 × Ristovski quits (~Ristovski@hellomouse/perf/ristovski) (*.net *.split)
01:16:18 × tcard_ quits (~tcard@2400:4051:5801:7500:19ce:ed82:2ab7:90f9) (*.net *.split)
01:16:18 × yuzhao quits (~yuzhao@36.112.45.72) (*.net *.split)
01:16:18 × cyphase quits (~cyphase@user/cyphase) (*.net *.split)
01:16:18 × lottaquestions_ quits (~nick@2607:fa49:503e:7100:a9a5:f580:1f2d:9d23) (*.net *.split)
01:16:18 × dcoutts__ quits (~duncan@host86-163-164-210.range86-163.btcentralplus.com) (*.net *.split)
01:16:18 × finsternis quits (~X@23.226.237.192) (*.net *.split)
01:16:18 × TonyStone quits (~TonyStone@cpe-74-76-51-197.nycap.res.rr.com) (*.net *.split)
01:16:18 × L29Ah quits (~L29Ah@wikipedia/L29Ah) (*.net *.split)
01:16:18 × kaskal quits (~kaskal@2001:4bb8:2dc:7b0e:55ee:692c:e44d:a4b0) (*.net *.split)
01:16:18 × DigitalKiwi quits (~kiwi@137.184.156.191) (*.net *.split)
01:16:18 × megaTherion quits (~therion@unix.io) (*.net *.split)
01:16:18 × gff_ quits (~gff@user/gff) (*.net *.split)
01:16:18 × piele quits (~piele@tbonesteak.creativeserver.net) (*.net *.split)
01:16:18 × ddb quits (~ddb@tilde.club) (*.net *.split)
01:16:18 × Hafydd quits (jc@user/hafydd) (*.net *.split)
01:16:18 × ajb quits (~ajb@mimas.whatbox.ca) (*.net *.split)
01:16:18 × Ankhers quits (e99e97ef8e@2604:bf00:561:2000::2a2) (*.net *.split)
01:16:18 × haasn quits (~nand@haasn.dev) (*.net *.split)
01:16:18 × bjobjo quits (~bjobjo@user/bjobjo) (*.net *.split)
01:16:18 × Vq quits (~vq@90-227-195-41-no77.tbcn.telia.com) (*.net *.split)
01:16:18 × wrengr quits (~wrengr@201.59.83.34.bc.googleusercontent.com) (*.net *.split)
01:16:18 × cpli quits (77fc530071@2604:bf00:561:2000::252) (*.net *.split)
01:16:18 × fvr quits (ef3e56ca8b@2604:bf00:561:2000::3c4) (*.net *.split)
01:16:18 × samhh quits (7569f027cf@2604:bf00:561:2000::e4) (*.net *.split)
01:16:18 × natto quits (~natto@140.238.225.67) (*.net *.split)
01:16:18 × ell quits (~ellie@user/ellie) (*.net *.split)
01:16:18 × Inoperable quits (~PLAYER_1@fancydata.science) (*.net *.split)
01:16:18 × tv quits (~tv@user/tv) (*.net *.split)
01:16:18 × cross quits (~cross@spitfire.i.gajendra.net) (*.net *.split)
01:16:18 × nurupo quits (~nurupo.ga@user/nurupo) (*.net *.split)
01:16:18 × farn quits (~farn@2a03:4000:7:3cd:d4ab:85ff:feeb:f505) (*.net *.split)
01:16:18 × kronicmage quits (user88019@neotame.csclub.uwaterloo.ca) (*.net *.split)
01:16:18 × iphy quits (sid67735@id-67735.lymington.irccloud.com) (*.net *.split)
01:16:18 × jimki quits (~jmaki@gazorpazorp.fixme.fi) (*.net *.split)
01:16:18 × lyxia quits (~lyxia@poisson.chat) (*.net *.split)
01:16:18 × Guest585 quits (~mike@user/feetwind) (*.net *.split)
01:16:18 × yahb2 quits (~yahb2@2a01:4f8:c0c:5c7b::2) (*.net *.split)
01:16:18 × lieven quits (~mal@ns2.wyrd.be) (*.net *.split)
01:16:24 comerijn joins (~dr_merijn@86-86-29-250.fixed.kpn.net)
01:16:26 ajb joins (~ajb@mimas.whatbox.ca)
01:16:28 megaTherion joins (~therion@unix.io)
01:16:28 iphy_ joins (sid67735@id-67735.lymington.irccloud.com)
01:16:31 econo joins (uid147250@user/econo)
01:16:31 Vq_ joins (~vq@90-227-195-41-no77.tbcn.telia.com)
01:16:33 kronicmage joins (user73954@neotame.csclub.uwaterloo.ca)
01:16:35 lyxia joins (~lyxia@poisson.chat)
01:16:37 kaskal joins (~kaskal@2001:4bb8:2dc:7b0e:55ee:692c:e44d:a4b0)
01:16:38 zxrom joins (~zxrom@mm-232-14-212-37.vitebsk.dynamic.pppoe.byfly.by)
01:16:39 bjobjo joins (~bjobjo@user/bjobjo)
01:16:39 dcoutts__ joins (~duncan@host86-163-164-210.range86-163.btcentralplus.com)
01:16:40 finsternis joins (~X@23.226.237.192)
01:16:40 AlexZenon joins (~alzenon@178.34.161.92)
01:16:43 nurupo_ joins (~nurupo.ga@user/nurupo)
01:16:47 jargon joins (~jargon@184.101.208.112)
01:16:47 yahb2 joins (~yahb2@2a01:4f8:c0c:5c7b::2)
01:16:48 Guest585 joins (~mike@user/feetwind)
01:16:50 ell joins (~ellie@user/ellie)
01:16:51 lieven joins (~mal@ns2.wyrd.be)
01:16:52 Hafydd joins (~Hafydd@2001:41d0:305:2100::31aa)
01:16:53 × Hafydd quits (~Hafydd@2001:41d0:305:2100::31aa) (Signing in (Hafydd))
01:16:53 Hafydd joins (~Hafydd@user/hafydd)
01:16:54 Ristovski joins (~Ristovski@hellomouse/perf/ristovski)
01:16:54 cyphase joins (~cyphase@user/cyphase)
01:16:55 ddb joins (~ddb@tilde.club)
01:17:00 inversed joins (~inversed@90.209.137.56)
01:17:29 gff_ joins (~gff@75-174-112-159.boid.qwest.net)
01:17:35 × gff_ quits (~gff@75-174-112-159.boid.qwest.net) (Signing in (gff_))
01:17:35 gff_ joins (~gff@user/gff)
01:17:49 farn joins (~farn@2a03:4000:7:3cd:d4ab:85ff:feeb:f505)
01:17:54 haasn joins (~nand@haasn.dev)
01:18:00 tv joins (~tv@user/tv)
01:18:09 natto joins (~natto@140.238.225.67)
01:18:11 Inoperable joins (~PLAYER_1@51.91.123.222)
01:18:35 DigitalKiwi joins (~kiwi@2604:a880:400:d0::1ca0:e001)
01:18:58 dolio joins (~dolio@130.44.130.54)
01:19:17 × xff0x quits (~xff0x@ai071162.d.east.v6connect.net) (Ping timeout: 265 seconds)
01:19:27 cpli joins (77fc530071@2604:bf00:561:2000::252)
01:19:52 <monochrom> sum . map f = foldl' (\a x -> a + f x)
01:19:53 nurupo_ is now known as nurupo
01:20:11 <monochrom> err, sum . map f = foldl' (\a x -> a + f x) 0
01:20:19 samhh joins (7569f027cf@2604:bf00:561:2000::e4)
01:20:39 piele joins (~piele@tbonesteak.creativeserver.net)
01:20:40 Ankhers joins (e99e97ef8e@2604:bf00:561:2000::2a2)
01:21:12 fvr joins (ef3e56ca8b@2604:bf00:561:2000::3c4)
01:21:20 yuzhao joins (~yuzhao@36.112.45.72)
01:21:26 jimki joins (~jmaki@gazorpazorp.fixme.fi)
01:21:32 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
01:21:32 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
01:21:32 wroathe joins (~wroathe@user/wroathe)
01:21:32 libertyprime joins (~libertypr@118-92-78-165.dsl.dyn.ihug.co.nz)
01:21:37 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
01:21:38 wrengr joins (~wrengr@201.59.83.34.bc.googleusercontent.com)
01:21:39 Natch joins (~natch@c-9e07225c.038-60-73746f7.bbcust.telenor.se)
01:21:44 cross joins (~cross@spitfire.i.gajendra.net)
01:24:41 ubert joins (~Thunderbi@77.119.214.60.wireless.dyn.drei.com)
01:25:18 <FlaminWalrus> including strictness concerns?
01:26:19 <monochrom> I have already used foldl'
01:28:31 <EvanR> foldl' is strict foldl
01:37:10 × mikoto-chan quits (~mikoto-ch@193.185.223.3) (Ping timeout: 265 seconds)
01:42:28 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds)
01:43:05 × raym quits (~aritra@user/raym) (Ping timeout: 268 seconds)
01:43:22 redmp joins (~redmp@mobile-166-137-177-036.mycingular.net)
01:44:47 × mcglk quits (~mcglk@131.191.49.120) (Read error: Connection reset by peer)
01:45:14 mcglk joins (~mcglk@131.191.49.120)
01:48:15 × beteigeuze quits (~Thunderbi@2001:8a0:61b5:6101:f0c:e4e3:bfdc:91df) (Ping timeout: 250 seconds)
01:48:53 raym joins (~aritra@user/raym)
01:49:12 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
01:52:38 mikoto-chan joins (~mikoto-ch@193.185.223.3)
01:54:17 × yuzhao quits (~yuzhao@36.112.45.72) (Ping timeout: 252 seconds)
01:55:49 nate1 joins (~nate@98.45.169.16)
01:55:54 L29Ah joins (~L29Ah@wikipedia/L29Ah)
01:59:46 × redmp quits (~redmp@mobile-166-137-177-036.mycingular.net) (Ping timeout: 268 seconds)
02:00:49 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Quit: Lost terminal)
02:01:19 redmp joins (~redmp@mobile-166-137-177-036.mycingular.net)
02:02:49 xff0x joins (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
02:09:42 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:9960:b0f8:561f:a74b)
02:23:37 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 252 seconds)
02:30:39 × Franciman quits (~Franciman@mx1.fracta.dev) (Read error: Connection reset by peer)
02:31:13 × nate1 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds)
02:38:28 × jmorris quits (uid537181@id-537181.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
02:41:52 frost joins (~frost@user/frost)
02:46:07 rockystone joins (~rocky@user/rockymarine)
02:48:32 × mzan quits (~quassel@mail.asterisell.com) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
02:49:34 mzan joins (~quassel@mail.asterisell.com)
02:50:39 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 250 seconds)
02:55:23 razetime joins (~quassel@117.193.1.101)
02:56:40 × jero98772 quits (~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff) (Remote host closed the connection)
02:57:43 × td_ quits (~td@94.134.91.197) (Ping timeout: 252 seconds)
02:59:28 td_ joins (~td@94.134.91.145)
03:00:01 × haasn quits (~nand@haasn.dev) (Quit: ZNC 1.7.5+deb4 - https://znc.in)
03:01:19 haasn joins (~nand@haasn.dev)
03:06:23 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
03:10:39 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
03:10:39 rockystone joins (~rocky@user/rockymarine)
03:14:36 nate1 joins (~nate@98.45.169.16)
03:17:52 Franciman joins (~Franciman@mx1.fracta.dev)
03:19:56 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
03:21:08 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
03:23:01 × nate1 quits (~nate@98.45.169.16) (Ping timeout: 252 seconds)
03:31:23 × waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 250 seconds)
03:32:12 × redmp quits (~redmp@mobile-166-137-177-036.mycingular.net) (Ping timeout: 264 seconds)
03:35:46 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
03:36:03 × talismanick quits (~talismani@2601:200:c100:c9e0::1b0b) (Ping timeout: 248 seconds)
03:37:17 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
03:42:10 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Client Quit)
03:44:12 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
03:47:51 talismanick joins (~talismani@2601:200:c100:c9e0::1b0b)
03:48:51 × razetime quits (~quassel@117.193.1.101) (Ping timeout: 248 seconds)
03:53:21 × talismanick quits (~talismani@2601:200:c100:c9e0::1b0b) (Ping timeout: 268 seconds)
03:54:28 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 268 seconds)
03:56:07 rockystone joins (~rocky@user/rockymarine)
03:56:07 × Vajb quits (~Vajb@2001:999:504:1841:9e47:1ec7:a52e:1d57) (Read error: Connection reset by peer)
03:56:15 Vajb joins (~Vajb@85-76-75-28-nat.elisa-mobile.fi)
03:57:47 × Square quits (~a@user/square) (Ping timeout: 255 seconds)
04:02:04 Square joins (~a@user/square)
04:02:59 alecs joins (~alecs@host-62-211-49-5.pool62211.interbusiness.it)
04:03:02 nate1 joins (~nate@98.45.169.16)
04:03:38 × extratail quits (~archie@2804:214:82c9:273b:11b:69f9:589e:dd5a) (Ping timeout: 268 seconds)
04:06:50 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
04:09:00 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
04:09:53 × nate1 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds)
04:10:59 × jargon quits (~jargon@184.101.208.112) (Remote host closed the connection)
04:13:32 extratail joins (~archie@2804:214:82c9:273b:11b:69f9:589e:dd5a)
04:15:34 mbuf joins (~Shakthi@49.205.87.152)
04:18:36 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 265 seconds)
04:19:41 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
04:20:18 <Clinton[m]> Is there a class which is `MonadError` but without `catchError` and without the functional dependency?
04:20:48 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
04:20:48 × mbuf quits (~Shakthi@49.205.87.152) (Ping timeout: 264 seconds)
04:20:54 <Clinton[m]> (I could write one myself but I'd rather avoid reinventing the wheel)
04:21:18 mbuf joins (~Shakthi@49.205.87.152)
04:22:12 <Clinton[m]> I've noticed purescript has this:
04:22:12 <Clinton[m]> https://github.com/purescript/purescript-transformers/pull/91/files/9eb6543f36cec807e202d9e35b02f07460418ec3#diff-cdd4c4b7452d88a5bb407a88988c1c0f6a442ef34a702ed45a16a8f2b88dd9ed
04:23:34 <Clinton[m]> But all the versions of `MonadThrow` I can fine on Haskell do not have `e` as part of the type parameters. They force `e = Exception`.
04:26:45 × zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!)
04:26:57 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Read error: Connection reset by peer)
04:27:38 geekosaur joins (~geekosaur@xmonad/geekosaur)
04:30:38 jonathanx joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
04:32:18 <Clinton[m]> I basically want this:... (full message at <https://libera.ems.host/_matrix/media/r0/download/libera.chat/2c17d5f452458de4774b9434a3103d80ecf4db6e>)
04:33:54 <Clinton[m]> * Basically, instead of the current MonadThrow... (full message at <https://libera.ems.host/_matrix/media/r0/download/libera.chat/e2b389b66b936e66a0ec6dcf49cd882a88a29b16>)
04:37:16 razetime joins (~quassel@117.193.1.101)
04:43:48 redmp joins (~redmp@mobile-166-137-177-036.mycingular.net)
04:46:38 × JimL quits (~quassel@89-162-2-132.fiber.signal.no) (Ping timeout: 265 seconds)
04:55:23 _xor joins (~xor@74.215.182.83)
04:55:46 × bjobjo quits (~bjobjo@user/bjobjo) (Ping timeout: 260 seconds)
04:56:03 × extratail quits (~archie@2804:214:82c9:273b:11b:69f9:589e:dd5a) (Ping timeout: 268 seconds)
04:57:29 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
04:57:29 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
04:57:29 wroathe joins (~wroathe@user/wroathe)
04:57:41 <EvanR> did pure script reverse the arrow on class definition syntax... jeez
04:58:38 <EvanR> I guess it's a good way to know you're in purescript
04:59:04 <davean> Clinton[m]: I think you're thinking something like https://hackage.haskell.org/package/mtl-2.2.2/docs/Control-Monad-Except.html ? Because thats very different than MonadThrow stuff.
04:59:25 <davean> Haskell has a whole second exception thing thats less ... that
05:03:23 extratail joins (~archie@2804:214:82c9:273b:11b:69f9:589e:dd5a)
05:15:35 × YoungFrog quits (~youngfrog@39.129-180-91.adsl-dyn.isp.belgacom.be) (Ping timeout: 252 seconds)
05:16:10 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
05:17:28 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
05:18:16 nate1 joins (~nate@98.45.169.16)
05:18:31 × razetime quits (~quassel@117.193.1.101) (Ping timeout: 252 seconds)
05:20:28 YoungFrog joins (~youngfrog@2a02:a03f:ca07:f900:e5a1:b41c:7001:1951)
05:21:07 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
05:22:53 × nate1 quits (~nate@98.45.169.16) (Ping timeout: 265 seconds)
05:25:23 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 248 seconds)
05:26:31 chomwitt joins (~chomwitt@2a02:587:dc0c:c200:5b5:50e2:356d:c45b)
05:26:35 bgs joins (~bgs@212-85-160-171.dynamic.telemach.net)
05:26:43 <ski> @type let chunksOf :: Int -> Data.Vector.Vector a -> Data.Vector.Vector (Data.Vector.Vector a); chunksOf m v0 | r == 0 = Data.Vector.generate q (\i -> Data.Vector.slice (q*i) m v0) | otherwise = Data.Vector.snoc (Data.Vector.generate q (\i -> Data.Vector.slice (q*i) m v0)) (Data.Vector.slice (q*m) r v0) where n = Data.Vector.length v0; (q,r) = n `divMod` m in chunksOf
05:26:44 <lambdabot> Int -> Data.Vector.Vector a -> Data.Vector.Vector (Data.Vector.Vector a)
05:27:24 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 264 seconds)
05:28:58 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
05:29:07 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
05:31:00 × zxrom quits (~zxrom@mm-232-14-212-37.vitebsk.dynamic.pppoe.byfly.by) (Quit: Leaving)
05:31:26 zxrom joins (~zxrom@mm-232-14-212-37.vitebsk.dynamic.pppoe.byfly.by)
05:32:12 × Kaiepi quits (~Kaiepi@142.68.249.28) (Ping timeout: 264 seconds)
05:32:21 <ski> EvanR : well, evidently they took the view that the class implies its superclasses (rather than the superclasses being presuppositions of the class)
05:33:24 × qrpnxz quits (~qrpnxz@fsf/member/qrpnxz) (Ping timeout: 264 seconds)
05:34:04 <ski> (btw, fwiw, imho it would have been better if the instance head syntactically preceded the instance body (the constraints) .. like Prolog rules. perhaps also for classes and superclasses (?))
05:34:50 qrpnxz joins (~qrpnxz@fsf/member/qrpnxz)
05:36:30 × alecs quits (~alecs@host-62-211-49-5.pool62211.interbusiness.it) (Quit: WeeChat 3.6)
05:37:57 takuan joins (~takuan@178-116-218-225.access.telenet.be)
05:44:35 × Natch quits (~natch@c-9e07225c.038-60-73746f7.bbcust.telenor.se) (Remote host closed the connection)
05:44:43 × adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
05:45:08 adanwan joins (~adanwan@gateway/tor-sasl/adanwan)
05:47:28 razetime joins (~quassel@117.193.1.101)
05:52:20 × redmp quits (~redmp@mobile-166-137-177-036.mycingular.net) (Quit: leaving)
05:55:41 YoungFrawg joins (~youngfrog@39.129-180-91.adsl-dyn.isp.belgacom.be)
05:55:51 × YoungFrog quits (~youngfrog@2a02:a03f:ca07:f900:e5a1:b41c:7001:1951) (Ping timeout: 268 seconds)
05:56:45 YoungFrawg is now known as YoungFrog
06:04:12 talismanick joins (~talismani@2601:200:c100:c9e0::1b0b)
06:04:47 × mikoto-chan quits (~mikoto-ch@193.185.223.3) (Ping timeout: 250 seconds)
06:06:15 <talismanick> Tangential to FlaminWalrus 's earlier line of questioning, if I wanted to numerically compute with APL-style rank polymorphism (but in Haskell), would it be better to study HMatrix or Repa first?
06:07:03 <talismanick> (Tangential because treating data in terms of aggregates with "shape" can lend itself to algebraic clarity without sacrificing performance)
06:13:13 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 268 seconds)
06:14:15 rockystone joins (~rocky@user/rockymarine)
06:15:50 <Axman6> without understanding most of the question that does sound like more Repa than HMatrix to me
06:16:06 kenran joins (~user@user/kenran)
06:19:01 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 252 seconds)
06:22:53 <kaol> Has nub ever required for the list to be sorted? A coworker used it without sort first and I was about to remark about that but when I checked the docs it had no such requirement.
06:24:16 <Axman6> nope, it's never needed it, it has a very simple (and slow) implementation
06:24:37 <Axman6> @src nub
06:24:37 <lambdabot> nub = nubBy (==)
06:24:37 <lambdabot> --OR
06:24:38 <lambdabot> nub l = go l []
06:24:38 <lambdabot> where go [] _ = []
06:24:38 <lambdabot> go (x:xs) ls
06:24:40 <lambdabot> | x `elem` ls = go xs ls
06:24:41 <lambdabot> | otherwise = x : go xs (x:ls)
06:25:33 <Axman6> hmm, the implementation I was thinking about was: nub [] = []; nub (x:xs) = x : nub (filter (/=x) xs)
06:26:42 <kaol> O(n^2). I suppose I assumed that at some point since it'd be O(n) for the sorted case.
06:27:31 mncheck joins (~mncheck@193.224.205.254)
06:29:56 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
06:34:05 <jackdk> @src group
06:34:05 <lambdabot> group = groupBy (==)
06:34:11 <jackdk> @src groupBy
06:34:11 <lambdabot> groupBy _ [] = []
06:34:11 <lambdabot> groupBy eq (x:xs) = (x:ys) : groupBy eq zs
06:34:12 <lambdabot> where (ys, zs) = span (eq x) xs
06:34:44 <ski> @src nubBy
06:34:44 <lambdabot> nubBy eq [] = []
06:34:45 <lambdabot> nubBy eq (x:xs) = x : nubBy eq (filter (\ y -> not (eq x y)) xs)
06:34:50 <jackdk> kaol, group needs sorting first if you want to group all occurrences of something within a list. Maybe that's what you're thinking of?
06:35:19 <ski> @hoogle nubSort
06:35:20 <lambdabot> Data.List.Extra nubSort :: Ord a => [a] -> [a]
06:35:20 <lambdabot> Extra nubSort :: Ord a => [a] -> [a]
06:35:20 <lambdabot> Data.List.Ordered nubSort :: Ord a => [a] -> [a]
06:35:22 <ski> @hoogle nubOrd
06:35:22 <lambdabot> Data.Containers.ListUtils nubOrd :: Ord a => [a] -> [a]
06:35:22 <lambdabot> Data.List.Extra nubOrd :: Ord a => [a] -> [a]
06:35:23 <lambdabot> Data.List.NonEmpty.Extra nubOrd :: Ord a => NonEmpty a -> NonEmpty a
06:35:37 <jackdk> @hoogle ordNub
06:35:38 <lambdabot> Distribution.Simple.Utils ordNub :: Ord a => [a] -> [a]
06:35:38 <lambdabot> Distribution.Utils.Generic ordNub :: Ord a => [a] -> [a]
06:35:38 <lambdabot> Protolude ordNub :: Ord a => [a] -> [a]
06:36:09 <jackdk> https://hackage.haskell.org/package/discrimination-0.4.1/docs/Data-Discrimination.html#v:nub
06:37:03 <ski> > group "mississippi"
06:37:04 <lambdabot> ["m","i","ss","i","ss","i","pp","i"]
06:38:52 <ski> @hoogle sortNub
06:38:52 <lambdabot> Relude.Nub sortNub :: Ord a => [a] -> [a]
06:38:53 <lambdabot> Universum.Nub sortNub :: Ord a => [a] -> [a]
06:38:53 <lambdabot> Language.Fixpoint.Misc sortNub :: Ord a => [a] -> [a]
06:38:54 <ski> heh
06:39:55 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
06:40:50 rockystone joins (~rocky@user/rockymarine)
06:42:44 × dolio quits (~dolio@130.44.130.54) (*.net *.split)
06:42:44 × Inoperable quits (~PLAYER_1@51.91.123.222) (*.net *.split)
06:42:44 × thegeekinside quits (~thegeekin@189.180.7.159) (*.net *.split)
06:42:44 × loras quits (~loras@c-73-139-125-125.hsd1.fl.comcast.net) (*.net *.split)
06:42:44 × dsrt^ quits (~dsrt@c-76-17-6-165.hsd1.ga.comcast.net) (*.net *.split)
06:42:44 × codaraxis__ quits (~codaraxis@user/codaraxis) (*.net *.split)
06:42:44 × jbayardo quits (~jbayardo@20.83.116.49) (*.net *.split)
06:42:44 × shapr quits (~user@68.54.166.125) (*.net *.split)
06:42:44 × jmd_ quits (~jmdaemon@user/jmdaemon) (*.net *.split)
06:42:44 × son0p quits (~ff@181.136.122.143) (*.net *.split)
06:42:44 × mjs2600 quits (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) (*.net *.split)
06:42:44 × nshepperd2 quits (~nshepperd@li364-218.members.linode.com) (*.net *.split)
06:42:44 × ozkutuk quits (~ozkutuk@176.240.173.153) (*.net *.split)
06:42:44 × adium quits (adium@user/adium) (*.net *.split)
06:42:44 × arahael quits (~arahael@210.185.98.153) (*.net *.split)
06:42:44 × tomboy64 quits (~tomboy64@user/tomboy64) (*.net *.split)
06:42:44 × eL_Bart0 quits (eL_Bart0@dietunichtguten.org) (*.net *.split)
06:42:45 × Ram-Z quits (~Ram-Z@li1814-254.members.linode.com) (*.net *.split)
06:42:45 × potash quits (~foghorn@user/foghorn) (*.net *.split)
06:42:45 × pragma- quits (~chaos@user/pragmatic-chaos) (*.net *.split)
06:42:45 × Igloo quits (~ian@matrix.chaos.earth.li) (*.net *.split)
06:42:45 × oldsk00l quits (~znc@ec2-13-40-82-74.eu-west-2.compute.amazonaws.com) (*.net *.split)
06:42:45 × m5zs7k quits (aquares@web10.mydevil.net) (*.net *.split)
06:42:45 × Unode quits (~Unode@194.94.44.220) (*.net *.split)
06:42:45 × bgamari quits (~bgamari@64.223.130.138) (*.net *.split)
06:42:45 × davean quits (~davean@davean.sciesnet.net) (*.net *.split)
06:42:45 × ystael quits (~ystael@user/ystael) (*.net *.split)
06:42:45 × [Leary] quits (~Leary]@user/Leary/x-0910699) (*.net *.split)
06:42:45 × cods quits (~fred@82-65-232-44.subs.proxad.net) (*.net *.split)
06:42:45 × Ranhir quits (~Ranhir@157.97.53.139) (*.net *.split)
06:42:45 × Katarushisu quits (~Katarushi@cpc147790-finc20-2-0-cust502.4-2.cable.virginm.net) (*.net *.split)
06:42:45 × zzz quits (~z@user/zero) (*.net *.split)
06:42:45 × glguy quits (~glguy@libera/staff-emeritus/glguy) (*.net *.split)
06:42:45 × joeyh quits (~joeyh@kitenet.net) (*.net *.split)
06:42:45 × mesaoptimizer quits (apotheosis@user/PapuaHardyNet) (*.net *.split)
06:42:45 × WarzoneCommand quits (~Frank@77-162-168-71.fixed.kpn.net) (*.net *.split)
06:42:45 × Logio quits (em@kapsi.fi) (*.net *.split)
06:42:45 × auri quits (~auri@fsf/member/auri) (*.net *.split)
06:42:45 × asm quits (~alexander@user/asm) (*.net *.split)
06:42:45 × res0nat0r084490 quits (~Fletch@dia.whatbox.ca) (*.net *.split)
06:42:45 × Maja quits (~quassel@178-37-215-128.adsl.inetia.pl) (*.net *.split)
06:42:45 × haskl quits (~haskl@user/haskl) (*.net *.split)
06:42:45 × GoldsteinQ quits (~goldstein@goldstein.rs) (*.net *.split)
06:42:45 × zachel quits (~zachel@user/zachel) (*.net *.split)
06:42:45 × aweinstock quits (~aweinstoc@cpe-74-76-189-75.nycap.res.rr.com) (*.net *.split)
06:42:45 × wagle quits (~wagle@quassel.wagle.io) (*.net *.split)
06:42:45 × lambdabot quits (~lambdabot@haskell/bot/lambdabot) (*.net *.split)
06:42:45 × int-e quits (~noone@int-e.eu) (*.net *.split)
06:42:45 × taeaad quits (~taeaad@user/taeaad) (*.net *.split)
06:42:46 × TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (*.net *.split)
06:42:46 × Zemyla quits (~ec2-user@ec2-54-80-174-150.compute-1.amazonaws.com) (*.net *.split)
06:42:51 ian_ joins (~ian@matrix.chaos.earth.li)
06:42:53 joeyh joins (joeyh@2600:3c03::f03c:91ff:fe73:b0d2)
06:42:54 shapr joins (~user@68.54.166.125)
06:42:54 lambdabot joins (~lambdabot@silicon.int-e.eu)
06:42:54 eL_Bart0- joins (eL_Bart0@dietunichtguten.org)
06:42:55 aweinstock joins (~aweinstoc@cpe-74-76-189-75.nycap.res.rr.com)
06:42:58 res0nat0r084490 joins (~Fletch@dia.whatbox.ca)
06:42:58 WarzoneCommand joins (~Frank@77-162-168-71.fixed.kpn.net)
06:42:59 mjs2600 joins (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net)
06:43:00 dsrt^ joins (~dsrt@c-76-17-6-165.hsd1.ga.comcast.net)
06:43:02 bgamari joins (~bgamari@64.223.130.138)
06:43:05 × lambdabot quits (~lambdabot@silicon.int-e.eu) (Changing host)
06:43:05 lambdabot joins (~lambdabot@haskell/bot/lambdabot)
06:43:06 asm joins (~alexander@burner.asm89.io)
06:43:11 jbayardo joins (~jbayardo@20.83.116.49)
06:43:11 Ranhir joins (~Ranhir@157.97.53.139)
06:43:20 zachel joins (~zachel@user/zachel)
06:43:27 Maja joins (~quassel@178-37-215-128.adsl.inetia.pl)
06:43:37 tomboy64 joins (~tomboy64@37.120.27.183)
06:44:02 potash joins (~foghorn@94-225-47-8.access.telenet.be)
06:44:09 × tomboy64 quits (~tomboy64@37.120.27.183) (Changing host)
06:44:09 tomboy64 joins (~tomboy64@user/tomboy64)
06:44:16 × potash quits (~foghorn@94-225-47-8.access.telenet.be) (Changing host)
06:44:16 potash joins (~foghorn@user/foghorn)
06:44:25 Unode joins (~Unode@194.94.44.220)
06:44:29 lortabac joins (~lortabac@2a01:e0a:541:b8f0:a1ca:b5f2:64f1:4de6)
06:44:30 [Leary] joins (~Leary]@user/Leary/x-0910699)
06:44:34 codaraxis joins (~codaraxis@user/codaraxis)
06:44:41 thegeekinside joins (~thegeekin@189.180.7.159)
06:44:43 haskl joins (~haskl@user/haskl)
06:44:52 TheCoffeMaker joins (~TheCoffeM@200.126.129.149)
06:44:55 glguy joins (~glguy@libera/staff-emeritus/glguy)
06:44:57 Ram-Z joins (~Ram-Z@li1814-254.members.linode.com)
06:44:58 × TheCoffeMaker quits (~TheCoffeM@200.126.129.149) (Changing host)
06:44:58 TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker)
06:45:04 zero joins (~z@user/zero)
06:45:09 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
06:45:17 jmdaemon joins (~jmdaemon@user/jmdaemon)
06:45:20 wagle joins (~wagle@quassel.wagle.io)
06:45:29 dolio joins (~dolio@130.44.130.54)
06:45:32 m5zs7k joins (aquares@web10.mydevil.net)
06:45:36 × stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
06:45:40 GoldsteinQ joins (~goldstein@goldstein.rs)
06:45:53 davean joins (~davean@davean.sciesnet.net)
06:45:56 adium joins (adium@user/adium)
06:46:07 taeaad joins (~taeaad@user/taeaad)
06:46:10 pragma- joins (~chaos@user/pragmatic-chaos)
06:46:13 stiell_ joins (~stiell@gateway/tor-sasl/stiell)
06:46:16 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
06:47:09 auri joins (~auri@fsf/member/auri)
06:47:33 oldsk00l joins (~znc@ec2-13-40-82-74.eu-west-2.compute.amazonaws.com)
06:47:37 × troydm quits (~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 252 seconds)
06:47:40 <Axman6> kaol: also worth keeping in mind that nub only required Eq, not Ord, so the idea of sorting doesn't make much sense
06:47:53 int-e joins (~noone@int-e.eu)
06:47:53 Logio joins (em@kapsi.fi)
06:47:56 cods joins (~fred@82-65-232-44.subs.proxad.net)
06:48:00 <Axman6> you could require that equal elements were grouped though
06:48:01 Zemyla joins (~ec2-user@ec2-54-80-174-150.compute-1.amazonaws.com)
06:48:10 ystael joins (~ystael@user/ystael)
06:48:44 <dminuoso> Well, the reason why good implementations will demand Ord, is because they can use a Set internally.
06:49:01 <dminuoso> "good" with respect to an unknown, unordered input of course.
06:49:27 <Axman6> should be using the discrimination package anyway - give me that O(n) nub please
06:50:52 <dminuoso> I would be interested in benchmarks about discrimination. How costly is its constant factor? What about locality of reference? How much extra memory indirections do you pay for.
06:51:02 Inoperable joins (~PLAYER_1@fancydata.science)
06:52:02 <dminuoso> Worst time complexity is usually not the biggest concern you have. Often, with real world data, an algorithm with poorer complexity can perform better due to good cache performance for instance.
06:52:11 × thegeekinside quits (~thegeekin@189.180.7.159) (Ping timeout: 268 seconds)
06:55:02 <ski> hm, what if one only wants to merge adjacent duplicates ? anyone named the obvious wrapper around `group' ?
06:55:37 <dminuoso> ski: how would "aaa" and "aaaa" be grouped?
06:55:39 <Axman6> map head . group?
06:55:45 <ski> yes
06:56:42 <ski> @type map (head &&& length) . group -- and this related one, i suppose
06:56:43 <lambdabot> Eq a => [a] -> [(a, Int)]
06:57:10 <dminuoso> I use that particular one in an IPv6 pretty printing algorithm :)
06:57:29 ski . o O ( free idempotent monoid )
06:58:22 <dminuoso> Though I wrote it as a handwritten unrolled loop, as it peformed better
06:58:52 zeenk joins (~zeenk@2a02:2f04:a20a:3e00:5712:52b0:ca1d:bc63)
06:58:54 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 264 seconds)
06:59:05 <dminuoso> well not unrolled.
06:59:21 <ski> fused
06:59:41 acidjnk joins (~acidjnk@p200300d6e7137a811112d37158fd9527.dip0.t-ipconnect.de)
07:00:06 × dsrt^ quits (~dsrt@c-76-17-6-165.hsd1.ga.comcast.net) (Remote host closed the connection)
07:00:22 <dminuoso> Lately I have begun applying expected optimizations by hand, rather than relying on GHC to do it for me.
07:00:28 <ski> one wants to remove repetition of elements, in IPv6 ?
07:00:52 × echoreply quits (~echoreply@45.32.163.16) (Quit: WeeChat 2.8)
07:01:01 <dminuoso> Yes, see [RFC5952 Section 4.2.2](https://tools.ietf.org/html/rfc5952#section-4.2.2) and [RFC5952 Section 5](https://tools.ietf.org/html/rfc5952#section-5)
07:01:08 ski . o O ( counboxed sums )
07:01:21 echoreply joins (~echoreply@45.32.163.16)
07:01:39 cfricke joins (~cfricke@user/cfricke)
07:01:54 <dminuoso> So you cound the find the largest consecutive word16s, and that is going to be represented as ::
07:02:02 <dminuoso> s/cound the//
07:03:09 nshepperd2 joins (nshepperd@2600:3c03::f03c:92ff:fe28:92c9)
07:05:50 <ski> hm, so merging repeated `0's
07:06:15 <dminuoso> Yes, but only the largest occurence of repeated `0's.
07:06:25 rockystone joins (~rocky@user/rockymarine)
07:06:29 <dminuoso> Otherwise the representation would be ambiguous obviously
07:06:47 <ski> (reminds me vaguely of representing a partition with finite support .. perhaps by transpositions)
07:07:10 ski nods
07:07:44 azimut joins (~azimut@gateway/tor-sasl/azimut)
07:08:14 <ski> @type \f n g -> fmap f (Data.Vector.generate n g)
07:08:15 <lambdabot> (a -> b) -> Int -> (Int -> a) -> Data.Vector.Vector b
07:08:21 <ski> @type \f n g -> Data.Vector.generate n (f . g)
07:08:22 <lambdabot> (b -> a) -> Int -> (Int -> b) -> Data.Vector.Vector a
07:08:35 <dminuoso> What is interesting, is that only in IPv6 the representation is actually standardized. In IPv4, most implementations support a large variety of legacy artifacts of many old systems.
07:08:40 <ski> @type \n -> PamfPilfRewol (Data.Vector.generate n)
07:08:41 <lambdabot> Int -> Yoneda Data.Vector.Vector Int
07:08:50 <ski> @type \f n -> fmap f (PamfPilfRewol (Data.Vector.generate n))
07:08:51 <lambdabot> (Int -> b) -> Int -> Yoneda Data.Vector.Vector b
07:08:55 <ski> @type \f n -> PamfPilfRewol (Data.Vector.generate n . (. f))
07:08:56 <lambdabot> (Int -> a) -> Int -> Yoneda Data.Vector.Vector a
07:09:13 <dminuoso> 3232271615 is for example in most implementations considered a valid IPv4 address representation, and accepted by most generic parsers. :)
07:09:36 <ski> (the middle one generates a yoneda-ed vector of indices, which you can then map over)
07:09:38 <dminuoso> Or 192.11046143 even
07:10:15 <Axman6> wtf is PamfPilfRewol
07:10:16 <ski> hm
07:11:05 <dminuoso> :k PamfPilfRewol
07:11:06 <lambdabot> (forall b. (a -> b) -> f b) -> Yoneda f a
07:11:47 <dminuoso> Your best bet is to probably ripgrep through the entirety of hackage packages?
07:12:52 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 246 seconds)
07:17:03 <ski> > (concat . map ((\(x:xs) -> toUpper x : map toLower xs) . reverse) . unfoldr (\case [] -> Nothing; x:xs | isUpper x -> Just (first (x:) (span (not . isUpper) xs)) | otherwise -> Just (break isUpper xs))) "PamfPilfRewol"
07:17:04 <lambdabot> "FmapFlipLower"
07:17:46 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
07:19:39 <ski> using
07:19:44 <ski> data CoYoneda f b = forall a. FMapLift (a -> b) (f a)
07:19:50 <ski> @type FMapLift
07:19:51 <lambdabot> (a -> b) -> f a -> CoYoneda f b
07:19:53 <ski> @type (. liftCoYoneda) . fmap
07:19:54 <lambdabot> (a -> b) -> f a -> CoYoneda f b
07:19:55 <ski> and
07:20:02 <ski> newtype Yoneda f a = PamfPilfRewol {lowerFlipFmap :: forall b. (a -> b) -> f b}
07:20:07 <ski> @type PamfPilfRewol
07:20:08 <lambdabot> (forall b. (a -> b) -> f b) -> Yoneda f a
07:20:11 <ski> @type lowerFlipFmap
07:20:13 <lambdabot> Yoneda f a -> (a -> b) -> f b
07:20:13 <ski> @type (lowerYoneda .) . flip fmap
07:20:14 <lambdabot> Yoneda f a1 -> (a1 -> a2) -> f a2
07:20:28 × asm quits (~alexander@burner.asm89.io) (Changing host)
07:20:28 asm joins (~alexander@user/asm)
07:26:21 chele joins (~chele@user/chele)
07:27:28 rockystone joins (~rocky@user/rockymarine)
07:29:03 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
07:29:10 enoq joins (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7)
07:32:27 codaraxis__ joins (~codaraxis@user/codaraxis)
07:33:30 × extratail quits (~archie@2804:214:82c9:273b:11b:69f9:589e:dd5a) (Ping timeout: 268 seconds)
07:36:35 × codaraxis quits (~codaraxis@user/codaraxis) (Ping timeout: 268 seconds)
07:37:19 titibandit joins (~titibandi@xdsl-89-0-65-2.nc.de)
07:38:51 CiaoSen joins (~Jura@p200300c95700eb002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
07:39:02 <Axman6> Who is responsible for this nonsense
07:42:02 gurkenglas joins (~gurkengla@p548ac72e.dip0.t-ipconnect.de)
07:48:40 × wagle quits (~wagle@quassel.wagle.io) (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
07:49:09 wagle joins (~wagle@quassel.wagle.io)
07:50:33 arahael joins (~arahael@210.185.98.153)
07:50:57 × Franciman quits (~Franciman@mx1.fracta.dev) (Read error: Connection reset by peer)
07:55:34 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
07:58:02 ski <-
07:58:09 nate1 joins (~nate@98.45.169.16)
08:00:31 kuribas joins (~user@silversquare.silversquare.eu)
08:03:31 × nate1 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds)
08:03:31 × razetime quits (~quassel@117.193.1.101) (Ping timeout: 252 seconds)
08:05:43 fserucas joins (~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7)
08:07:57 × spider_ quits (~spider@vps-951ce37a.vps.ovh.ca) (Ping timeout: 268 seconds)
08:14:07 × shriekingnoise quits (~shrieking@186.137.167.202) (Quit: Quit)
08:16:10 spider_ joins (~spider@vps-951ce37a.vps.ovh.ca)
08:18:11 Franciman joins (~Franciman@mx1.fracta.dev)
08:20:13 razetime joins (~quassel@117.193.1.101)
08:25:19 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
08:26:34 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
08:28:38 × tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
08:29:01 × andreabedini quits (~andreabed@8s8kj681vht2qj3xkwc5.ip6.superloop.com) (Quit: WeeChat 3.6)
08:30:17 MajorBiscuit joins (~MajorBisc@145.94.164.10)
08:31:47 nschoe joins (~q@141.101.51.197)
08:32:18 × causal quits (~user@2001:470:ea0f:3:329c:23ff:fe3f:1e0e) (Quit: WeeChat 3.6)
08:32:35 yvan-sraka joins (~yvan-srak@2a01:c23:5c26:be00:42ca:3e4b:6bf7:d95c)
08:36:45 × titibandit quits (~titibandi@xdsl-89-0-65-2.nc.de) (Remote host closed the connection)
08:37:25 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 268 seconds)
08:42:05 <kuribas> are there other jvm functional languages like scala?
08:42:19 <kuribas> (semi-)mainstream, not some student project
08:42:31 <probie> Clojure? What does "like Scala" mean?
08:42:44 jmorris joins (uid537181@id-537181.uxbridge.irccloud.com)
08:42:57 <kuribas> static typed
08:43:11 <kuribas> and functional
08:43:32 <kuribas> (with ADTs, pattern matching, ...)
08:43:49 <kuribas> wait, scala doesn't even have pattern matching, does it?
08:44:44 <Franciman> kuribas: there used to be a haskell's clone
08:44:54 <Franciman> https://eta-lang.org/
08:45:02 <Franciman> not sure whether it's mantained anymore or nawt
08:45:21 <kuribas> that's dead
08:45:28 <kuribas> for the last three years or so.
08:46:03 ph88 joins (~ph88@tmo-114-149.customers.d1-online.com)
08:46:06 <kuribas> I mean, I can think of a few jvm functional languages (idris!), but nothing that is actually used in production.
08:46:40 × talismanick quits (~talismani@2601:200:c100:c9e0::1b0b) (Ping timeout: 246 seconds)
08:47:21 × Midjak quits (~Midjak@82.66.147.146) (Ping timeout: 260 seconds)
08:49:51 rockystone joins (~rocky@user/rockymarine)
08:50:56 <probie> Depending on your threshold for "functional", it's possible to write functional code with Kotlin using Arrow (although if Scala doesn't meet your benchmark, this won't).
08:52:59 <kuribas> I believe they added ADTs in scala lately.
08:53:18 × gmg quits (~user@user/gehmehgeh) (Ping timeout: 258 seconds)
08:53:30 <lortabac> how do I reload a package in GHCI?
08:53:53 <Hecate> good question
08:54:05 gmg joins (~user@user/gehmehgeh)
08:54:05 <comerijn> lortabac: define "package"? as in "cabal repl"?
08:54:27 <Franciman> you can reload it by restarting ghci
08:54:37 Kaiepi joins (~Kaiepi@142.68.249.28)
08:54:56 <lortabac> comerijn: yes, I'm in cabal repl and I modified one of the dependencies. Now I would like to reload it without restarting GHCI
08:54:57 <comerijn> lortabac: Does your package happen to have multiple components? (multiple libraries/1 lib + executable/etc.)?
08:55:56 <lortabac> no, the dependency is another package inside the same cabal project
08:55:57 <comerijn> lortabac: In case of multiple components (be it libraries+executable or "local" dependencies) short answer: pretty sure you can't right now
08:56:12 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 264 seconds)
08:56:22 <comerijn> Tough luck, ask again in 1 or 2 GHC releases ;)
08:57:00 <lortabac> ok, then question number 2: is there a way to save the session in GHCI? :)
08:57:10 × ph88 quits (~ph88@tmo-114-149.customers.d1-online.com) (Read error: Connection reset by peer)
08:57:30 Vq_ is now known as Vq
08:57:36 <comerijn> No
08:57:36 <lortabac> maybe I should make a GHCI script
09:00:03 ph88 joins (~ph88@2a02:8109:9e00:71d0:99a4:5f0d:c3c4:a4b6)
09:00:12 × cdsmith quits (~cdsmithma@2001:470:69fc:105::284) (Quit: You have been kicked for being idle)
09:00:25 <kuribas> lortabac: what I do sometimes is write preparatory definitions in a file, then load that in ghci using :load
09:00:47 <kuribas> lortabac: then when I need to reload code, I can just reload that file.
09:01:17 <lortabac> kuribas: good idea
09:04:09 teo joins (~teo@user/teo)
09:04:56 python476 joins (~user@2a01:e0a:8f9:d3e0:b117:81a8:33f6:93e7)
09:06:14 akegalj joins (~akegalj@93-138-150-2.adsl.net.t-com.hr)
09:06:32 beteigeuze joins (~Thunderbi@bl14-81-220.dsl.telepac.pt)
09:08:31 ph88^ joins (~ph88@2a01:598:a08a:a364:609c:c76c:ab43:af05)
09:09:46 rockystone joins (~rocky@user/rockymarine)
09:12:19 × ph88^ quits (~ph88@2a01:598:a08a:a364:609c:c76c:ab43:af05) (Read error: Connection reset by peer)
09:12:24 × ph88 quits (~ph88@2a02:8109:9e00:71d0:99a4:5f0d:c3c4:a4b6) (Ping timeout: 264 seconds)
09:12:59 bahamas joins (~lucian@188.24.138.239)
09:13:41 ph88 joins (~ph88@2a02:8109:9e00:71d0:5fa:f382:b264:895c)
09:14:23 × ft quits (~ft@p3e9bc57b.dip0.t-ipconnect.de) (Quit: leaving)
09:17:51 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
09:18:19 × bahamas quits (~lucian@188.24.138.239) (Quit: leaving)
09:18:33 bahamas joins (~lucian@188.24.138.239)
09:18:54 ph88^ joins (~ph88@2a02:8109:9e00:71d0:e513:9d48:6006:c331)
09:19:35 × ph88^ quits (~ph88@2a02:8109:9e00:71d0:e513:9d48:6006:c331) (Read error: Connection reset by peer)
09:19:58 ph88^ joins (~ph88@2a02:8109:9e00:71d0:e513:9d48:6006:c331)
09:21:07 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 248 seconds)
09:24:23 × ph88 quits (~ph88@2a02:8109:9e00:71d0:5fa:f382:b264:895c) (Ping timeout: 268 seconds)
09:35:18 rockystone joins (~rocky@user/rockymarine)
09:40:03 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
09:40:57 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 268 seconds)
09:42:42 × bahamas quits (~lucian@188.24.138.239) (Ping timeout: 264 seconds)
09:44:55 × Kaiepi quits (~Kaiepi@142.68.249.28) (Quit: Leaving)
09:46:24 zoomer123 joins (~zoomer123@24.133.173.162)
09:46:37 mesaoptimizer joins (apotheosis@user/PapuaHardyNet)
09:50:43 Kaiepi joins (~Kaiepi@142.68.249.28)
09:51:50 × zoomer123 quits (~zoomer123@24.133.173.162) (Quit: Client closed)
09:53:14 rockystone joins (~rocky@user/rockymarine)
09:57:34 × yvan-sraka quits (~yvan-srak@2a01:c23:5c26:be00:42ca:3e4b:6bf7:d95c) (Remote host closed the connection)
09:59:15 yvan-sraka joins (~yvan-srak@2a01:c23:5c26:be00:24a:f977:8936:5aea)
09:59:17 Putonlalla joins (~Putonlall@it-cyan.it.jyu.fi)
10:00:29 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 252 seconds)
10:01:02 × Franciman quits (~Franciman@mx1.fracta.dev) (Read error: Connection reset by peer)
10:05:19 × Kaiepi quits (~Kaiepi@142.68.249.28) (Read error: Connection reset by peer)
10:08:47 × xff0x quits (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 268 seconds)
10:09:32 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:9960:b0f8:561f:a74b) (Remote host closed the connection)
10:09:42 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5)
10:11:21 × comerijn quits (~dr_merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 260 seconds)
10:14:23 rockystone joins (~rocky@user/rockymarine)
10:14:33 pyrogenum joins (~pyrogenum@218.90.254.84.ftth.as8758.net)
10:15:38 Kaiepi joins (~Kaiepi@142.68.249.28)
10:17:27 nate1 joins (~nate@98.45.169.16)
10:18:48 bahamas joins (~lucian@188.24.138.239)
10:19:54 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 264 seconds)
10:22:18 × nate1 quits (~nate@98.45.169.16) (Ping timeout: 264 seconds)
10:23:12 × bahamas quits (~lucian@188.24.138.239) (Ping timeout: 264 seconds)
10:24:10 × _xor quits (~xor@74.215.182.83) (Ping timeout: 268 seconds)
10:25:41 raehik1 joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
10:25:44 _xor joins (~xor@74.215.182.83)
10:29:21 h4|80 joins (~h4|80@194.224.213.145)
10:29:56 <pyrogenum> Hi there! Is there someone who has experience with named (fifo) pipes in Haskell? I need to make use of some nodejs library and I think it makes sense to do the communication via pipes. The problem is that things in System.IO are non-blocking, for instance readFile "test.fifo" will just return nothing when nobody is writing into the pipe, rather
10:29:57 <pyrogenum> than wait for data (until hitting an eof) character. I have managed to make things work by using blocking IO from System.Posix.IO but this seems to block the entire Haskell runtime and now things like forkIO don't do what I want them to do (also Ctrl-C to kill the process don't work). Thanks a lot for any help :-)
10:31:43 × jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 268 seconds)
10:33:37 __monty__ joins (~toonn@user/toonn)
10:34:11 rockystone joins (~rocky@user/rockymarine)
10:34:55 zxrom parts (~zxrom@mm-232-14-212-37.vitebsk.dynamic.pppoe.byfly.by) (Leaving)
10:35:52 × CiaoSen quits (~Jura@p200300c95700eb002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
10:37:47 dr_merijn joins (~dr_merijn@86-86-29-250.fixed.kpn.net)
10:38:29 severen joins (~severen@202.36.179.72)
10:39:35 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 268 seconds)
10:41:29 × califax quits (~califax@user/califx) (Remote host closed the connection)
10:42:23 califax joins (~califax@user/califx)
10:43:19 × L29Ah quits (~L29Ah@wikipedia/L29Ah) (Ping timeout: 268 seconds)
10:43:29 jakalx parts (~jakalx@base.jakalx.net) ()
10:46:55 <dminuoso> pyrogenum: Use the threaded runtime
10:50:23 <dminuoso> pyrogenum: also note, you're probably better off just spawning a worker thread instead.
10:50:32 <dminuoso> while using the non-blocking API
10:50:42 × _xor quits (~xor@74.215.182.83) (Quit: WeeChat 3.6)
10:51:17 <dminuoso> So lets talk about `forkIO` perhaps. How does it not do what you want?
10:53:09 rockystone joins (~rocky@user/rockymarine)
10:55:14 fserucas_ joins (~fserucas@74.47.115.89.rev.vodafone.pt)
10:55:36 <pyrogenum> Thanks for your answers. I have a function getPipeResult :: String -> IO String which does the blocking write and read things and in main I am now joining `forkIO $ getPipeResult "..." >>= putStrLn` and then `callCommand "node processing.js"` (which reads the pipes on the other side). This does not work. What does work is if I just start node in a
10:55:37 <pyrogenum> seperate terminal after starting the Haskell program.
10:55:46 × yvan-sraka quits (~yvan-srak@2a01:c23:5c26:be00:24a:f977:8936:5aea) (Ping timeout: 244 seconds)
10:56:29 × fserucas quits (~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7) (Read error: Connection reset by peer)
11:00:52 troydm joins (~troydm@host-176-37-124-197.b025.la.net.ua)
11:01:55 nate1 joins (~nate@98.45.169.16)
11:04:32 jakalx joins (~jakalx@base.jakalx.net)
11:04:44 thyriaen joins (~thyriaen@2a01:aea0:dd4:463c:6245:cbff:fe9f:48b1)
11:05:26 <dminuoso> Can you share the code in its entirety, perhaps?
11:05:39 × severen quits (~severen@202.36.179.72) (Ping timeout: 248 seconds)
11:06:12 xff0x joins (~xff0x@ai071162.d.east.v6connect.net)
11:06:40 × nate1 quits (~nate@98.45.169.16) (Ping timeout: 246 seconds)
11:09:24 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Remote host closed the connection)
11:09:35 michalz joins (~michalz@185.246.207.222)
11:10:01 eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
11:11:23 × h4|80 quits (~h4|80@194.224.213.145) (Quit: Client closed)
11:11:35 <pyrogenum> Sure: https://pastebin.mozilla.org/VxSvjJ6H (the javascript thing on the other side is just an infinite loop which reads the input, does something to it and sends it back).
11:13:11 <pyrogenum> Apologies for using several unqualified imports, I hope it isn't too unclear which functions belong to which libraries.
11:14:30 × eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 264 seconds)
11:14:34 yvan-sraka joins (~yvan-srak@2a01:c23:5c26:be00:7180:da3e:16dd:f885)
11:15:00 <dminuoso> Okay one thing that immediately comes to mind, you should usually not use readFile, especially not here.
11:15:04 <dminuoso> Skip the forkIO
11:16:52 <dminuoso> Or maybe not mmm.
11:17:45 <dminuoso> pyrogenum: Can you include callCommand as well?
11:18:03 <dminuoso> Oh hold on, thats from System.Process isnt it
11:18:27 <pyrogenum> I guess you are saying that readFile is bad because things will be evaluated lazily which will behave terribly with OS operations.
11:18:42 <pyrogenum> Yes, it is.
11:19:14 <dminuoso> Yeah, in this particular spot it probably isnt a problem, just pointing it out
11:19:47 <dminuoso> pyrogenum: So whats the behavior of this program? Will it block at all?
11:21:00 <pyrogenum> It does block, but it doesn't produce any output. I'll check quickly whether something arrives on the javascript side.
11:21:11 <dminuoso> Note, that one big problem with the way you are using forkIO, is that exceptions in the separate thread will be silent. So if for some reason callCommand fails, you will not know that it does.
11:21:43 <dminuoso> I suspect it will fail opening the write side with ENXIO
11:22:24 <dminuoso> If memory serves right, the reader has to open the fifo before the writer can open it
11:22:40 bahamas joins (~lucian@188.24.138.239)
11:22:48 <dminuoso> And ditch the forkIO here.
11:23:10 <dminuoso> (Just as a quick step to validate my theory)
11:23:24 <dminuoso> If Im right, you have to rather forkIO the *reading* side first, and then start the command.
11:23:43 <dminuoso> With some sort of synchronization
11:25:32 <dminuoso> Or you have to repeatedly try and open for writing, perhaps with some sort of delay and a counter.
11:25:38 <pyrogenum> The weird thing is though that it does work if I'm starting the processes in two separate terminals. Your memory does serve you right but if one writes in blocking mode then things block until it's possible to write (maybe the point is though that following this approach is inadvisable).
11:26:44 <dminuoso> Mmm, I guess defaultFileFlags has nonBlock = False then
11:26:52 <pyrogenum> Yes!
11:27:37 × bahamas quits (~lucian@188.24.138.239) (Ping timeout: 268 seconds)
11:28:06 <pyrogenum> Your idea with repeatedly trying things is also on option though which would avoid having to go down to Posix.System.IO and staying in System.IO.
11:33:05 CiaoSen joins (~Jura@p200300c95700eb002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
11:36:06 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
11:45:42 × gurkenglas quits (~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
11:47:31 × frost quits (~frost@user/frost) (Quit: Client closed)
11:47:37 × akegalj quits (~akegalj@93-138-150-2.adsl.net.t-com.hr) (Quit: leaving)
11:53:20 <pyrogenum> I managed to resolve this with the help of one of your comments. The solution was to apply `forkIO` to both the `callCommand` part and the `getPipeResult` which does the blocking IO. I don't quite understand why it makes a difference whether `getPipeResult` runs in the main thread or a forked one but more reading should help. Anyway, thanks a lot!
11:56:40 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 268 seconds)
12:03:25 rockystone joins (~rocky@user/rockymarine)
12:05:27 bahamas joins (~lucian@188.24.138.239)
12:09:58 × kenran quits (~user@user/kenran) (Remote host closed the connection)
12:10:25 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
12:12:06 gurkenglas joins (~gurkengla@p548ac72e.dip0.t-ipconnect.de)
12:12:07 × bahamas quits (~lucian@188.24.138.239) (Ping timeout: 268 seconds)
12:12:31 × jmorris quits (uid537181@id-537181.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
12:13:58 yezariaely joins (~yezariael@dslb-188-110-202-237.188.110.pools.vodafone-ip.de)
12:14:31 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Remote host closed the connection)
12:15:27 Midjak joins (~Midjak@82.66.147.146)
12:17:02 × Kaiepi quits (~Kaiepi@142.68.249.28) (Quit: Leaving)
12:17:20 Kaiepi joins (~Kaiepi@142.68.249.28)
12:17:49 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
12:19:08 Tuplanolla joins (~Tuplanoll@91-159-69-34.elisa-laajakaista.fi)
12:23:19 × yvan-sraka quits (~yvan-srak@2a01:c23:5c26:be00:7180:da3e:16dd:f885) (Remote host closed the connection)
12:25:02 severen joins (~severen@202.36.179.72)
12:26:30 × infinity0 quits (~infinity0@185.112.146.113) (Remote host closed the connection)
12:29:01 bahamas joins (~lucian@188.24.138.239)
12:30:17 Franciman joins (~Franciman@mx1.fracta.dev)
12:31:22 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
12:33:25 infinity0 joins (~infinity0@pwned.gg)
12:35:44 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
12:36:17 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
12:37:52 × pyrogenum quits (~pyrogenum@218.90.254.84.ftth.as8758.net) (Quit: Client closed)
12:38:46 × severen quits (~severen@202.36.179.72) (Quit: WeeChat 3.7)
12:39:24 bahamas is now known as elbear
12:42:59 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
12:45:02 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Remote host closed the connection)
12:45:28 × infinity0 quits (~infinity0@pwned.gg) (Remote host closed the connection)
12:45:40 mimi1vx[m] joins (~osukupmat@2001:470:69fc:105::2:418d)
12:50:22 infinity0 joins (~infinity0@pwned.gg)
12:51:25 yvan-sraka joins (~yvan-srak@2a01:c23:5c26:be00:fdde:672f:bc08:2d38)
12:59:39 × yvan-sraka quits (~yvan-srak@2a01:c23:5c26:be00:fdde:672f:bc08:2d38) (Remote host closed the connection)
13:06:58 × kuribas quits (~user@silversquare.silversquare.eu) (Ping timeout: 268 seconds)
13:08:05 thegeekinside joins (~thegeekin@189.180.7.159)
13:09:02 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
13:12:13 eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
13:12:22 × infinity0 quits (~infinity0@pwned.gg) (Remote host closed the connection)
13:13:21 infinity0 joins (~infinity0@pwned.gg)
13:13:56 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 260 seconds)
13:16:32 kenran joins (~user@user/kenran)
13:16:39 × eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds)
13:18:33 waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
13:22:08 × enoq quits (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) (Quit: enoq)
13:26:21 × tv quits (~tv@user/tv) (Quit: derp)
13:26:35 tv joins (~tv@user/tv)
13:27:19 × infinity0 quits (~infinity0@pwned.gg) (Remote host closed the connection)
13:28:45 × dr_merijn quits (~dr_merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 252 seconds)
13:29:27 infinity0 joins (~infinity0@pwned.gg)
13:31:29 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Remote host closed the connection)
13:35:08 son0p joins (~ff@181.136.122.143)
13:37:07 × razetime quits (~quassel@117.193.1.101) (Remote host closed the connection)
13:41:58 zer0bitz joins (~zer0bitz@2001:2003:f748:2000:db1:77e1:e1b4:2a85)
13:44:56 rockystone joins (~rocky@user/rockymarine)
13:47:03 × libertyprime quits (~libertypr@118-92-78-165.dsl.dyn.ihug.co.nz) (Ping timeout: 268 seconds)
13:49:50 L29Ah joins (~L29Ah@wikipedia/L29Ah)
13:50:59 × waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 248 seconds)
13:52:58 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
13:59:15 hochata joins (~user@user/hochata)
14:02:21 zebrag joins (~chris@user/zebrag)
14:02:51 nate1 joins (~nate@98.45.169.16)
14:07:30 dr_merijn joins (~dr_merijn@86-86-29-250.fixed.kpn.net)
14:08:01 × nate1 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds)
14:10:01 extratail joins (~archie@2804:214:82c9:273b:11b:69f9:589e:dd5a)
14:12:53 shriekingnoise joins (~shrieking@186.137.167.202)
14:15:34 nate1 joins (~nate@98.45.169.16)
14:17:00 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
14:17:00 × califax quits (~califax@user/califx) (Remote host closed the connection)
14:17:01 × adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
14:17:22 adanwan joins (~adanwan@gateway/tor-sasl/adanwan)
14:17:46 califax joins (~califax@user/califx)
14:17:48 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
14:21:11 × dr_merijn quits (~dr_merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 252 seconds)
14:22:33 dr_merijn joins (~dr_merijn@86-86-29-250.fixed.kpn.net)
14:24:38 Sgeo joins (~Sgeo@user/sgeo)
14:27:25 × elbear quits (~lucian@188.24.138.239) (Ping timeout: 252 seconds)
14:30:38 elbear joins (~lucian@188.24.138.239)
14:31:27 × dr_merijn quits (~dr_merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 252 seconds)
14:39:30 × elbear quits (~lucian@188.24.138.239) (Ping timeout: 268 seconds)
14:42:06 × ph88^ quits (~ph88@2a02:8109:9e00:71d0:e513:9d48:6006:c331) (Ping timeout: 264 seconds)
14:47:01 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Quit: Leaving)
14:47:58 jakalx parts (~jakalx@base.jakalx.net) ()
14:48:42 jakalx joins (~jakalx@base.jakalx.net)
14:52:48 elbear joins (~lucian@188.24.138.239)
14:58:13 × elbear quits (~lucian@188.24.138.239) (Ping timeout: 252 seconds)
15:00:56 geekosaur joins (~geekosaur@xmonad/geekosaur)
15:01:28 razetime joins (~quassel@117.193.1.101)
15:02:23 vorpuni joins (~pvorp@2001:861:3881:c690:c0fe:bc56:314c:dc44)
15:04:14 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:a1ca:b5f2:64f1:4de6) (Quit: WeeChat 2.8)
15:05:06 waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
15:08:29 × hochata quits (~user@user/hochata) (Ping timeout: 268 seconds)
15:09:06 × qwedfg quits (~qwedfg@user/qwedfg) (Ping timeout: 268 seconds)
15:09:52 ph88 joins (~ph88@2a02:8109:9e00:71d0:a043:fa0a:d378:15c4)
15:10:35 allbery_b joins (~geekosaur@xmonad/geekosaur)
15:10:35 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
15:10:38 allbery_b is now known as geekosaur
15:10:38 × kenran quits (~user@user/kenran) (Remote host closed the connection)
15:11:03 × thegeekinside quits (~thegeekin@189.180.7.159) (Remote host closed the connection)
15:11:48 × waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 264 seconds)
15:13:46 Colere is now known as Sauvin
15:19:33 × nate1 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds)
15:21:07 <zero> i just found a delicious comment on r/haskell:
15:21:10 <zero> I think Haskell excels in supporting a healthy programming life style. It's slow compilation allows for ample breaks, walk outs and focusing eyes at a remote point outside of a screen.
15:21:42 yvan-sraka joins (~yvan-srak@2a01:c23:5c26:be00:187b:414e:bfdd:8cf2)
15:22:17 <tdammers> it also helps prevent balding from pulling your hair out every other hour
15:22:29 × raym quits (~aritra@user/raym) (Ping timeout: 250 seconds)
15:24:12 raym joins (~aritra@user/raym)
15:27:03 elbear joins (~lucian@188.24.138.239)
15:28:47 × yvan-sraka quits (~yvan-srak@2a01:c23:5c26:be00:187b:414e:bfdd:8cf2) (Remote host closed the connection)
15:30:13 × CiaoSen quits (~Jura@p200300c95700eb002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
15:34:49 eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
15:35:48 × califax quits (~califax@user/califx) (Remote host closed the connection)
15:36:41 califax joins (~califax@user/califx)
15:40:46 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Remote host closed the connection)
15:42:47 zns joins (~zns@user/zns)
15:43:33 × nschoe quits (~q@141.101.51.197) (Ping timeout: 268 seconds)
15:44:23 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
15:46:19 × ph88 quits (~ph88@2a02:8109:9e00:71d0:a043:fa0a:d378:15c4) (Quit: Leaving)
15:46:31 talismanick joins (~talismani@2601:200:c100:c9e0::1b0b)
15:47:27 <olivermead[m]> remember the 20:20:20 rule, every 20 minutes look at something 20m away from the office and spend 20 years off grid in the woods
15:54:10 × zns quits (~zns@user/zns) (Quit: zzz)
15:54:30 <tdammers> or the 80:20 rule: perform 80% for 20 years, after that just look busy
15:54:43 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.6)
15:57:28 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
15:58:14 ph88 joins (~ph88@2a02:8109:9e00:71d0:98bd:c30c:40c9:b06f)
15:58:41 jakalx joins (~jakalx@base.jakalx.net)
15:59:14 × fserucas_ quits (~fserucas@74.47.115.89.rev.vodafone.pt) (Quit: Leaving)
16:02:09 <olivermead[m]> reach ~80% in a logarithmic growth then taper linearly to 20% after 20 days, repeat
16:02:18 Pickchea joins (~private@user/pickchea)
16:02:54 × eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
16:03:17 × ph88 quits (~ph88@2a02:8109:9e00:71d0:98bd:c30c:40c9:b06f) (Ping timeout: 268 seconds)
16:03:49 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 246 seconds)
16:04:34 Natch joins (~natch@c-9e07225c.038-60-73746f7.bbcust.telenor.se)
16:04:44 rockystone joins (~rocky@user/rockymarine)
16:04:45 spacenautx joins (~spacenaut@user/spacenautx)
16:05:52 zns joins (~zns@user/zns)
16:07:14 ph88 joins (~ph88@ip5f5af71f.dynamic.kabel-deutschland.de)
16:07:41 × elbear quits (~lucian@188.24.138.239) (Ping timeout: 268 seconds)
16:09:25 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 246 seconds)
16:10:17 × yezariaely quits (~yezariael@dslb-188-110-202-237.188.110.pools.vodafone-ip.de) (Quit: Leaving)
16:12:00 × python476 quits (~user@2a01:e0a:8f9:d3e0:b117:81a8:33f6:93e7) (Ping timeout: 268 seconds)
16:19:36 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Remote host closed the connection)
16:20:01 elbear joins (~lucian@188.24.138.239)
16:20:04 × chele quits (~chele@user/chele) (Remote host closed the connection)
16:21:21 × Pickchea quits (~private@user/pickchea) (Quit: Leaving)
16:24:52 × elbear quits (~lucian@188.24.138.239) (Ping timeout: 268 seconds)
16:26:18 rockystone joins (~rocky@user/rockymarine)
16:27:49 thegeekinside joins (~thegeekin@189.180.7.159)
16:30:01 Everything joins (~Everythin@37.115.210.35)
16:30:03 <EvanR> @tell kuribas re: functional on JVM... Frege
16:30:03 <lambdabot> Consider it noted.
16:30:20 × ph88 quits (~ph88@ip5f5af71f.dynamic.kabel-deutschland.de) (Quit: Leaving)
16:30:28 × finsternis quits (~X@23.226.237.192) (Read error: Connection reset by peer)
16:32:35 yvan-sraka joins (~yvan-srak@31-196-142-46.pool.kielnet.net)
16:34:11 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 248 seconds)
16:34:44 × MajorBiscuit quits (~MajorBisc@145.94.164.10) (Ping timeout: 268 seconds)
16:35:22 tempuser_ joins (~archie@2804:214:8617:700:4d1d:352d:668a:1b70)
16:35:22 × yvan-sraka quits (~yvan-srak@31-196-142-46.pool.kielnet.net) (Remote host closed the connection)
16:37:07 × extratail quits (~archie@2804:214:82c9:273b:11b:69f9:589e:dd5a) (Read error: Connection reset by peer)
16:37:20 yvan-sraka joins (~yvan-srak@31-196-142-46.pool.kielnet.net)
16:39:06 vn36 joins (~vn36@123.63.203.210)
16:40:35 × vn36 quits (~vn36@123.63.203.210) (Client Quit)
16:42:13 × teo quits (~teo@user/teo) (Ping timeout: 268 seconds)
16:43:10 × yvan-sraka quits (~yvan-srak@31-196-142-46.pool.kielnet.net) (Remote host closed the connection)
16:43:19 <EvanR> the Frege README says the following is a pure function: greeting friend = "Hello, " ++ friend ++ "!"
16:43:45 <EvanR> and the following is an impure function because it returns IO (): main args = println (greeting "World")
16:44:07 <EvanR> making me thonk
16:47:05 tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
16:47:18 <EvanR> impure and laziness is supposed to be an unstable toxic mixture
16:48:14 yvan-sraka joins (~yvan-srak@31-196-142-46.pool.kielnet.net)
16:55:33 elbear joins (~lucian@188.24.138.239)
16:57:41 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
16:58:09 <ski> .. confused terminology
16:58:20 <geekosaur> as I understand it, it's not unstable or toxic, it just negates the advantages of laziness because you lose all the optimization possibilities
16:58:54 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:9960:b0f8:561f:a74b)
16:59:30 <EvanR> oh, maybe there is a way to define the evaluation so the effects you want somehow do happen? once?
16:59:52 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
17:00:07 <EvanR> in some predictable order, perhaps backwards
17:00:37 <davean> EvanR: Infact that is exactly how IO works
17:00:55 × yvan-sraka quits (~yvan-srak@31-196-142-46.pool.kielnet.net) (Remote host closed the connection)
17:01:00 <davean> it just has a chain of dependencies
17:01:04 <davean> through the monad
17:01:09 <EvanR> all I know about that is ReadWorld is deeply magical
17:01:16 <geekosaur> in fact it's not
17:01:18 <EvanR> s/Read/Real/
17:01:19 <davean> newtype IO a = IO (State# RealWorld -> (# State# RealWorld, a #))
17:01:27 <davean> Its not magical at all
17:01:35 <geekosaur> it's just a phantoom dependency that ensures IO happens in order
17:01:36 <davean> Its exactly a dependency
17:01:53 <davean> which is also why they lie when they claim that example is impure
17:02:00 <EvanR> is this an example of messing up optimizations like geekosaur said
17:02:08 <geekosaur> no
17:02:22 <davean> well it sorta prevents optimizations.
17:02:29 <geekosaur> it does mean you can't for example do let-hoisting through IO
17:02:41 <geekosaur> whereas you can if IO isn't involved (or ST or STM)
17:03:03 <davean> The chain of RealWorlds locks everything in place
17:03:13 <davean> because they are ACTUALLY LOCKED IN PLACE
17:03:24 <davean> There is no optimization to do in the face of them
17:03:35 yvan-sraka joins (~yvan-srak@31-196-142-46.pool.kielnet.net)
17:04:09 <EvanR> so the function contained in that IO is an impure function? what's going on
17:04:51 <davean> why do you think there is impurity, other than Frege lieing to you?
17:05:02 <EvanR> asking about haskell
17:05:03 <[exa]> EvanR: it is perfectly pure in haskell, but the runtime interprets it as something impure
17:05:39 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 268 seconds)
17:05:47 <[exa]> (in haskell. I have no idea about Frege and I'm kinda surprised that the project still goes on)
17:05:56 <geekosaur> you can think of Haskell as building a pure chain of actions which the runtime executes possibly impurely
17:06:28 <davean> [exa]: Frege isn't anything but a GHC fork they changed the name of and tried to build a brand around?
17:06:32 <geekosaur> linked together by data dependencies including the dependency on RealWorld injected by the IO monad
17:06:41 <EvanR> e.g. the guts of getChar is a function which takes a dummy dependency, does the systemcall, and returns a new dep and a char?
17:06:59 <davean> EvanR: that is what basicly happens.
17:07:17 <[exa]> whew wait they forked ghc???
17:07:17 <EvanR> interesting
17:07:34 <davean> [exa]: yes? I mean blame SPJ and such for that, and refusing to accept new backends?
17:07:58 <davean> Its not like they had a choice
17:08:05 × yvan-sraka quits (~yvan-srak@31-196-142-46.pool.kielnet.net) (Remote host closed the connection)
17:08:20 <davean> You might notice like no one would accept GHCJS for a decade too
17:08:22 <[exa]> Languages: Java 29% Frege 68%
17:08:26 <[exa]> ok likely not a fork
17:08:41 <[exa]> that would be one piece of effort back in 2014 :D
17:09:53 <[exa]> EvanR: anyway you were kinda right that it's magic. Internally RealWorld is afaik either Void# or (# #) or something like that, and # is by definition a MagicHash!
17:09:55 <davean> [exa]: I mean GHCJS was before 2014 and is
17:10:46 <EvanR> the RealWorld is less magical than this function which when applied causes side effects xD
17:10:53 <EvanR> shattering my haskell worldview
17:11:17 <davean> I COULD be mixing up my Haskell on JVMs
17:11:31 <geekosaur> there is one piece of magic: codegen realizes RealWorld# has a 0-length representation and removes it from the code
17:11:52 <[exa]> EvanR: you can't apply it because there's no way to get the RealWorld for it (except obviously for unsafeBreakEverythingAlsoBurnifyPerformIO)
17:12:07 <EvanR> yes it's behind the scenes
17:12:08 <davean> oh I think I am, sorry [exa] I think i mean eta
17:12:30 <[exa]> davean: ok good I was suspecting a mix-up :D
17:12:56 <geekosaur> I have to say I don't blame the ghc devs much for refusing to accept new backends
17:13:15 <geekosaur> they really need a rule saying "we accept <x> only if it comes with at least one maintainer"
17:13:15 <EvanR> i saw a different way to do the guts involving primitive IO bind chains, like a free monad ish
17:13:23 <geekosaur> otherwise you get e.g. DPH
17:13:31 <[exa]> davean: btw eta project is alive or not?
17:13:49 <davean> [exa]: oh dead
17:14:07 <davean> Trying to make a company out of that sort of thing is hard
17:14:46 <[exa]> ah.
17:15:39 <EvanR> since the idea that frege is lying seems to be based on it being GHC... I go back to square 1 xD
17:15:51 <geekosaur> EvanR, there's several ways to do it. Hugs used a different one from GHC IIRC
17:16:06 hochata joins (~user@user/hochata)
17:16:20 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
17:16:57 <[exa]> EvanR: I'd still say it's better than in ye olden dayes when patternmatching a list caused this impure operation
17:18:13 <EvanR> that sounds fun
17:18:23 <EvanR> to explain
17:19:18 <[exa]> well, you don't need monads then
17:19:42 <davean> oh it was just a lazy list of input, transformed into a lazy list of outputs
17:19:51 <[exa]> yap
17:20:10 <ski> (Mercury does the same with FFI calls, does a `IO = IO0;' .. e.g. <https://lists.mercurylang.org/archives/users/2022-September/009675.html>)
17:20:12 <EvanR> or was it a lazy list of responses transformed into a lazy list of requests
17:20:22 <johnjaye> i've heard there are companies based on haskell
17:20:31 <geekosaur> [Response] -> [Request]
17:20:35 <[exa]> (LazyByteString can still do the same right?)
17:20:38 <johnjaye> one time a guy told me he works in the military on jets and uses it
17:20:43 <geekosaur> with the initial Response being the parameters, I think?
17:20:53 <EvanR> that's so wacky I love it
17:20:54 <geekosaur> unsafeInterleaveIO
17:21:04 <davean> johnjaye: A decent number, but thats different than selling a compiler and ecosystem
17:21:06 <EvanR> your program and the world form an ouroboros
17:21:19 <johnjaye> oh you meant ghc itself
17:21:28 <geekosaur> but $SOMEONE help you if you get out of sync
17:21:36 <johnjaye> yeah that's more of a fuzzy thing. bug having a company to 'back' the ecosystem can be good sometimes
17:21:39 <[exa]> johnjaye: there are really good tools for generating safe static code with haskell, which might be a good usecase there
17:21:46 <johnjaye> like ubuntu and canonical or redhat and fedora/qemu/misc things
17:22:04 <davean> johnjaye: it can be, but bootstrapping it from scratch by calling it "not haskell" makes your life harder.
17:22:22 <davean> Note that like RH claims to be selling you linux support
17:22:23 rockystone joins (~rocky@user/rockymarine)
17:22:55 <EvanR> I've heard companies using haskell need to retain a "haskell professor". Which kind of sounds more expensive than a subscription to GHC tech support
17:23:02 <dminuoso> I found, when you want XYZ support, its best to just hire or train someone to be competent in XYZ.
17:23:05 <johnjaye> so a company couldn't call itself Haskell Inc and take over ghc and run things?
17:23:06 dminuoso shrugs
17:23:10 <ski> (iiuc, the main problem, from a theoretical standpoint, with the `State# RealWorld', is that it doesn't really account for exceptions, concurrency)
17:23:17 <ski> EvanR : "i saw a different way to do the guts involving primitive IO bind chains, like a free monad ish" -- elaborate ?
17:23:25 <dminuoso> johnjaye: To be fair, Well Typed is just that. :p
17:23:31 <ski> geekosaur : yes, with explicit exception continuation, iirc
17:24:05 <EvanR> way 1 is in the idris implementation, way 2 was in a talk by ekmett which might be what they did in (proprietary language). I can try to find links
17:24:11 jakalx joins (~jakalx@base.jakalx.net)
17:24:18 <ski> no the `type Dialogue = [Response] -> [Request]' was the pre-monadic way
17:24:29 <geekosaur> Ermine?
17:25:25 <ski> (basically coding in `Cont Dialogue' .. except with no `Cont', manual plumbing (sometimes with an alternative continuation, for failure))
17:25:58 <ski> @type interact
17:25:59 <lambdabot> (String -> String) -> IO ()
17:29:53 <ski> @hoogle f a -> (a -> b) -> f b
17:29:54 <lambdabot> Data.Functor (<&>) :: Functor f => f a -> (a -> b) -> f b
17:29:54 <lambdabot> Control.Lens.Lens (<&>) :: Functor f => f a -> (a -> b) -> f b
17:29:54 <lambdabot> Control.Lens.Operators (<&>) :: Functor f => f a -> (a -> b) -> f b
17:30:01 <ski> @hoogle f (a -> b) -> a -> f b
17:30:03 <lambdabot> Control.Lens.Lens (??) :: Functor f => f (a -> b) -> a -> f b
17:30:03 <lambdabot> Control.Lens.Operators (??) :: Functor f => f (a -> b) -> a -> f b
17:30:03 <lambdabot> Diagrams.Prelude (??) :: Functor f => f (a -> b) -> a -> f b
17:30:12 <ski> @hoogle (a -> f b) -> f (a -> b)
17:30:13 <lambdabot> No results found
17:30:36 <ski> what could the last one be called ?
17:30:50 <ski> `costrength' ??
17:31:50 <EvanR> ski, hmm... this is the latest idris 1 https://github.com/idris-lang/Idris-dev/blob/28fa2d88a8620ea6d30ed3a6a282dffec1c4c9cb/libs/prelude/IO.idr#L37
17:32:51 × zeenk quits (~zeenk@2a02:2f04:a20a:3e00:5712:52b0:ca1d:bc63) (Quit: Konversation terminated!)
17:33:40 <EvanR> they are using some kind of World (which was annoying when you wanted to use this word for your own purposes) in IO too, but they don't have laziness... ... they parameterize over an FFI but don't seem to use it for anything at the value level
17:33:52 <EvanR> ok they do have lazy annotation maybe that's why
17:34:21 <EvanR> now I go find way 2 which actually involved an ffi
17:34:28 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 246 seconds)
17:35:14 × mbuf quits (~Shakthi@49.205.87.152) (Quit: Leaving)
17:37:38 <ski> hm, seems they don't return a `World' ?
17:37:47 <ski> seems a fair bit magical
17:39:52 <EvanR> and this is not what I was thinking of for way 2... where the hell is that blog post... https://github.com/ermine-language/ermine/blob/master/stdlib/Prelude/IO/Unsafe.e
17:40:47 jinsun joins (~jinsun@user/jinsun)
17:42:00 <ski> sorry, which one was way 1 and way 2 ?
17:46:36 × Natch quits (~natch@c-9e07225c.038-60-73746f7.bbcust.telenor.se) (Ping timeout: 264 seconds)
17:47:30 × talismanick quits (~talismani@2601:200:c100:c9e0::1b0b) (Ping timeout: 268 seconds)
17:48:01 <EvanR> doesn't matter because I wouldn't find either
17:48:26 Natch joins (~natch@c-9e07225c.038-60-73746f7.bbcust.telenor.se)
17:50:10 × razetime quits (~quassel@117.193.1.101) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
17:50:21 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
17:55:19 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
17:55:19 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
17:55:19 wroathe joins (~wroathe@user/wroathe)
17:55:58 <EvanR> something like, ConstructorName :: ffi i o -> i -> (o -> IO a) -> IO a
17:56:33 <dolio> hbc might have worked something like that. I've never looked at it in detail.
17:59:43 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 252 seconds)
18:00:15 HP-UX is now known as Linux
18:01:57 rockystone joins (~rocky@user/rockymarine)
18:03:23 <dolio> I guess it's just the Cont Dialogue thing.
18:03:37 × elbear quits (~lucian@188.24.138.239) (Ping timeout: 268 seconds)
18:06:11 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 260 seconds)
18:06:39 <ski> EvanR : that does sound similar to `newtype IO a = MkIO ((a -> IOResult) -> IOResult)' with `data IOResult = Done | PutChar Char IOResult | GetChar (Char -> IOResult) | ...'
18:08:31 econo joins (uid147250@user/econo)
18:08:45 <EvanR> yes. but there was this edk tweak which simplified it further, and the ffi "actions" were not to be interpreted, but implemented as i -> o, and strung together for effects. I think
18:10:56 <dolio> EvanR's is a sort of free monad, which Cont is not.
18:12:34 <ski> you could easily make a variant `data IO a = Return a | Done | PutChar Char (IO a) | GetChar (Char -> IO a) | ...'
18:12:56 <dolio> Essentially it is the free monad generated from the algebraic signature `ffi`.
18:13:27 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:9960:b0f8:561f:a74b) (Remote host closed the connection)
18:14:13 <dolio> Similar to what you do for algebraic effects.
18:15:39 elbear joins (~lucian@188.24.138.239)
18:25:46 <EvanR> um https://paste.tomsmeding.com/bN7wwneC
18:26:10 <EvanR> this is freemonad ish, yeah
18:27:25 <ski> fmap = liftM
18:27:44 dr_merijn joins (~dr_merijn@86-86-29-250.fixed.kpn.net)
18:28:55 <EvanR> so it is
18:29:43 <dolio> Yes, if `ffi` is just an enum GADT that uses i to specify input arity, and o to specify output arity, then this is exactly algebraic effects.
18:30:20 <EvanR> \o/
18:30:56 <dolio> An `i -> o` operation becomes an `(o -> T) -> (i -> T)` operation, and this is the free monad for that.
18:31:27 eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
18:32:12 × dr_merijn quits (~dr_merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 264 seconds)
18:32:36 <EvanR> what's T
18:33:22 <dolio> T is the model of the algebra. `IO a` is the free model with variables in `a`.
18:33:59 ski . o O ( ⌜(+),(⊕),(⋅) : 2² → 2¹⌝ )
18:34:46 <Franciman> dolio: where did you learn all this model theory?
18:35:17 <dolio> Just read the algebraic effects papers.
18:35:24 <dolio> Plotkin and Power.
18:35:30 <Franciman> thnx
18:35:44 <Franciman> plotkin and power seems a nice slogan
18:35:50 ski . o O ( "Strong functors, strong monads" (slides) by Tarmo Uustalu at <https://cs.ioc.ee/~tarmo/ssgep15/ssgep-1a.pdf>,<https://cs.ioc.ee/~tarmo/ssgep15/> )
18:36:26 <Franciman> apparently Moggi's work has faded and made room for many more developments!
18:36:28 <Franciman> yay
18:37:15 × hochata quits (~user@user/hochata) (Read error: Connection reset by peer)
18:37:39 nschoe joins (~q@2a01:e0a:8e:a190:2bc1:5610:b26:873c)
18:38:14 Lycurgus joins (~juan@user/Lycurgus)
18:41:01 atwm joins (~atwm@185.234.70.94)
18:41:45 ski . o O ( "In the Power Domain Order, they are all Plotkin." )
18:41:51 <EvanR> Institute of Cybernetics in Tallinn, nice
18:42:39 <EvanR> why couldn't I have have gone to college at a place with a fucking rad name like that
18:43:38 × atwm quits (~atwm@185.234.70.94) (Remote host closed the connection)
18:45:06 × nschoe quits (~q@2a01:e0a:8e:a190:2bc1:5610:b26:873c) (Quit: Switching off)
18:46:40 k`` joins (~user@152.1.137.158)
18:48:09 Linux is now known as HP-UX
18:48:21 <k``> Is the law `mx >> mzero` = `mzero` a mistake/typo? Or should the `IO` and `ReadP` `MonadPlus` instances be removed?
18:48:22 <EvanR> ski, what is the relation between strong monads and stuff we were actually talking about xD
18:49:05 HP-UX is now known as SysV
18:49:06 <EvanR> > Just 3 >> mzero
18:49:07 <lambdabot> Nothing
18:50:02 <k``> > print "Hi there" >> mzero
18:50:04 <lambdabot> error:
18:50:04 <lambdabot> • No instance for (Typeable b0)
18:50:04 <lambdabot> arising from a use of ‘show_M36784398342963031606’
18:51:14 <k``> > print Nothing >> mzero
18:51:15 <lambdabot> error:
18:51:15 <lambdabot> • No instance for (Typeable b0)
18:51:15 <lambdabot> arising from a use of ‘show_M90845009386314507’
18:51:21 <k``> ?
18:51:26 ski . o O ( "Non-determinism in Functional Languages" by Harald Søndergaard,Peter Sestoft in 1988-08,1992-05 at <http://comjnl.oxfordjournals.org/content/35/5/514.abstract> (mentions Hoare,Smyth,Plotkin / Egli-Milner orderings on power domains ) )
18:51:35 <ski> @help run
18:51:35 <lambdabot> run <expr>. You have Haskell, 3 seconds and no IO. Go nuts!
18:51:35 <k``> > print () >> mzero
18:51:37 <lambdabot> error:
18:51:37 <lambdabot> • No instance for (Typeable b0)
18:51:37 <lambdabot> arising from a use of ‘show_M9476205005181858498’
18:51:57 <ski> > print () >> mzero :: IO ()
18:51:59 <lambdabot> <IO ()>
18:52:11 <EvanR> % print "hello"
18:52:11 <yahb2> "hello"
18:52:18 <EvanR> % print "hello" >> mzero
18:52:18 <yahb2> <interactive>:30:18: error: Variable not in scope: mzero :: IO b
18:54:06 <ski> % print "hello" >> Control.Monad.mzero
18:54:06 <yahb2> "hello" ; *** Exception: user error (mzero)
18:54:22 <ski> @wiki MonadPlus
18:54:22 <lambdabot> https://wiki.haskell.org/MonadPlus
18:54:26 <ski> @wiki MonadPlus reform proposal
18:54:26 <lambdabot> https://wiki.haskell.org/MonadPlus_reform_proposal
18:54:38 <ski> k`` : where are you looking ?
18:54:46 × gurkenglas quits (~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
18:55:11 <k``> The description of `MonadPlus` in its Haddoc:
18:55:25 <k``> https://hackage.haskell.org/package/base-4.17.0.0/docs/Control-Monad.html#t:MonadPlus
18:55:50 × Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt juan@acm.org)
18:56:20 <ski> "The precise set of rules that MonadPlus should obey is not agreed upon."
18:56:50 SysV is now known as QNX
18:56:55 <k``> Right. So it could obey some unspecified set of rules, plus the ones that are actually required in the doc.
18:56:59 <EvanR> is there an imprecise set of rules it should obey?
18:57:11 <k``> Like it doesn't have to satisfy left catch or distribution.
18:57:17 <ski> .. also, i'm not really that fond of `MonadPlus IO' (randomly swallowing exceptions doesn't seem too great an idea, to me)
18:57:24 <ski> k`` : what's the `ReadP' issue ?
18:57:49 <k``> `get ; empty` consumes input.
18:58:05 <ski> .. and commits ?
19:00:22 <ski> iirc, `ReadP' does parallel parsing (due to Claessen, also see e.g. <https://hackage.haskell.org/package/parsek>), doesn't commit (so no `try')
19:00:50 <ski> if it doesn't commit, surely it's equivalent to just `empty', ?
19:01:05 × QNX quits (~kernel@user/OpenSource) (K-Lined)
19:01:35 <EvanR> the link to the functional pearl is broken in there
19:05:00 <k``> (<|>) is basically parallel, but `get *> empty` does not use <|>. That said, I'm not sure whether it's possible to observe that input was consumed in a failed branch. In which case I'm wrong about ReadP, but it still holds for IO (and I think Parsec-like parsers).
19:05:47 <k``> I'm ignoring the monoid laws because a legal instance that didn't throw away useful errors could be defined for IO, even though it isn't.
19:07:09 <dolio> Probably the right-zero rule should just be removed.
19:07:34 <dolio> From the documentation.
19:08:14 <k``> Makes sense. Would certainly be less disruptive than removing the IO instance...
19:10:57 gurkenglas joins (~gurkengla@p548ac72e.dip0.t-ipconnect.de)
19:14:01 <ski> EvanR : try <https://web.archive.org/web/20100325144945/http://www.cs.chalmers.se/~koen/pubs/entry-jfp04-parser.html>,<https://web.archive.org/web/20061012125410if_/http://www.cs.chalmers.se/~koen/pubs/jfp04-parser.ps>
19:14:05 waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
19:14:36 <EvanR> got it
19:15:56 <ski> anyway .. one problem with right zero is partiality `undefined >> mzero = undefined >>= \_ -> mzero = undefined', not being `mzero'
19:16:12 nate1 joins (~nate@98.45.169.16)
19:16:35 <k``> Also an example of why (<>) :: () -> () -> () should be strict.
19:16:55 × zns quits (~zns@user/zns) (Quit: zzz)
19:17:17 <ski> (`undefined *> empty' could conceivably get `empty', though. but if we want `empty *> undefined = empty' as well, we'd need "parallel or" kind of thing, spawing racing computations for the two matches)
19:17:23 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 248 seconds)
19:17:33 <ski> k`` : hm ?
19:17:36 talismanick joins (~talismani@99-113-70-120.lightspeed.frokca.sbcglobal.net)
19:18:14 <k``> () is the unit of (<>), so `undefined <> ()` should be `undefined`.
19:18:47 zero is now known as zzz
19:18:49 <dminuoso> And indeed it is. :>
19:18:51 <ski> yes, but we were talking about `Alternative' and `MonadPlus', not `Monoid' ?
19:19:24 <k``> Right, just giving a similar example of laws affecting strictness requirements.
19:19:24 <ski> and `undefined >> _' already is `undefined', for `IO',&c.
19:19:28 × ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
19:19:39 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 252 seconds)
19:19:45 <k``> > undefined <> ()
19:19:47 <lambdabot> ()
19:19:55 <k``> () <> undefined
19:20:03 <k``> > () <> undefined
19:20:05 <lambdabot> ()
19:20:13 <ski> ah, so you're remarking specifically on the `Monoid ()' (or `Semigroup ()') instance
19:20:41 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
19:20:41 <k``> Should be defined `() <> y = y` or `x <> () = x`.
19:20:42 <dminuoso> Keep in mind that most laws that govern our typeclasses only exist if we pretend bottom does not exist.
19:21:14 × nate1 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds)
19:21:36 causal joins (~user@50.35.83.177)
19:22:16 <ski> > let !_ = second chr undefined :: (Bool,Char) in ()
19:22:17 <lambdabot> ()
19:22:17 <k``> The cool thing about Monoid is its laws work even in the presence of bottoms.
19:22:18 <ski> > let !_ = fmap chr undefined :: (Bool,Char) in ()
19:22:20 <lambdabot> *Exception: Prelude.undefined
19:22:44 <k``> Unlike, say naiive annihilative laws.
19:23:01 <ski> k`` : or `() <> () = ()' or `() <> y@() = y', say
19:23:34 <dminuoso> k``: Sure, but that would introduce an additional burden of say (<>) being strict on both sides.
19:23:53 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 258 seconds)
19:24:02 <dminuoso> So its best to not make that demand and pretend bottoms dont exist for the sake of the law. It's just more useful than the idealistic construction of a lawful universe in the presence of bottoms.
19:24:09 <k``> Yeah, with `() <> () = ()` you have to know how GHC evaluates arguments to know which bottom you get in `undefined "first" <> undefined "second"`.
19:24:14 <k``> But that's fine.
19:24:28 <ski> hmm .. i wonder how these choices would affect stuff like `rnf' and strategies (e.g. re tail calls)
19:24:28 <dminuoso> This applies to a lot of monoids.
19:25:04 × eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
19:25:28 <k``> But the lazy <> for () has caused a few memorable memory leaks. Not sure if that's ideal.
19:25:31 <ski> behaviour on bottoms tend to matter when you're tying knots
19:26:01 <ski> (chasing your own tail, hoping you don't reach it, stopping progress)
19:28:10 finsternis joins (~X@23.226.237.192)
19:28:13 xsebek parts (~xsebek@swarm.znchost.com) (www.ZNCHost.com)
19:29:17 <k``> Anyway, glad to hear I can safely ignore Monad right annihilation.
19:29:58 <drlkf> janus: i ended up just doing it manually with a do block because i needed to read the strings into numbers too
19:30:11 <k``> > fmap id (undefined :: ((),()))
19:30:12 <lambdabot> *Exception: Prelude.undefined
19:31:25 <k``> foldMap (\_-> ()) (undefined :: ((), ()))
19:31:27 <drlkf> but the question was more like is there something that exists in the same vein as the (.:) operator
19:31:48 × elbear quits (~lucian@188.24.138.239) (Ping timeout: 268 seconds)
19:32:16 <k``> > foldMap (\_->()) (undefined :: ((),()))
19:32:17 <lambdabot> *Exception: Prelude.undefined
19:32:18 ft joins (~ft@p3e9bc57b.dip0.t-ipconnect.de)
19:32:32 <drlkf> otherwise i could always combine withArray, Aeson.Lens.nth and fail when matching Nothing
19:33:08 zero joins (~z@user/zero)
19:33:28 rockystone joins (~rocky@user/rockymarine)
19:35:59 × zzz quits (~z@user/zero) (Ping timeout: 250 seconds)
19:41:48 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 264 seconds)
19:42:21 johnw joins (~johnw@2600:1700:cf00:db0:b1b8:33de:e15a:f4eb)
19:46:54 <johnw> back when the world was young, I could use CABAL_BUILDDIR to decide where the `dist` directory goes. What is the equivalent now in the days of `dist-newstyle`?
19:47:15 <jmcantrell> with ghcup, is there a way to set the system version as the default?
19:51:59 <dmj`> johnw: --builddir=<dir> ?
19:52:08 <johnw> it seems to be ignoring it
19:52:25 <geekosaur> jmcantrell, just set the system version earlier on $PATH
19:53:30 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
19:53:33 <jmcantrell> how would i use a ghcup version at the project level?
19:54:23 rockystone joins (~rocky@user/rockymarine)
19:55:16 <AndreasK> johnw: `cabal build --builddir=my-dist-dir` works for me
19:56:05 <geekosaur> cabal -w (or cabal-project 'with-compiler')
19:57:13 <geekosaur> note that the system one usually won't have a version, so '-w ghc' would get you that while '-w ghc-9.2.4' or etc. would get you a ghcup version. (verify this though)
19:57:28 pavonia joins (~user@user/siracusa)
19:57:29 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:657b:163b:3e09:9614)
19:57:52 <geekosaur> if necessary you can use a full pathname
19:58:53 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 252 seconds)
19:59:22 rockystone joins (~rocky@user/rockymarine)
19:59:32 <jmcantrell> ok, thanks
20:00:30 Guest51 joins (~Guest51@205.175.106.169)
20:01:03 <Guest51> With Neovim and CoC, how can I get HLS to properly identify the project root?
20:01:20 <Guest51> Is there at least a way to manually set or change the project root?
20:02:11 <geekosaur> hie.yaml?
20:05:20 <geekosaur> Guest51, I have an example https://paste.tomsmeding.com/0jiF7xM3
20:05:35 <talismanick> I case-matched on readMaybe; HLS now suggests "replace case with maybe"
20:05:54 <geekosaur> not much going on, I mostly created that one to stop HIE from poking at a lot of other stuff
20:05:54 <talismanick> not sure how that works, looking at the type signature of maybe :: b -> (a -> b) -> Maybe a -> b
20:06:29 <geekosaur> <Nothing-case> <Just-case> <Maybe-expr>
20:06:42 _xor joins (~xor@74.215.182.83)
20:06:46 <geekosaur> it's basically a case match as a function
20:07:07 <talismanick> Where might I find an example of it in context?
20:07:13 <geekosaur> that said, that's the kind of HLS complaint I usually shut off
20:07:14 <Guest51> This is relatively common practice in Haskell thanks to lazy evaluation
20:07:44 <_xor> Not very familiar with Haskell/Cabal. What do I need to look into if I want to vendor dependencies and run `cabal v2-update && cabal v2-build ...` offline?
20:08:18 <geekosaur> https://cabal.readthedocs.io/en/3.6/cabal-project.html#specifying-the-local-packages
20:09:25 <ski> talismanick : hlint is sometimes better ignored
20:09:45 <tomsmeding> it's not HLS directly that gives this particular notice; that's the hlint plugin of HLS
20:10:05 <tomsmeding> I say this because I love HLS but I don't like hlint, and I wish to note that it is possible to turn off hlint in HLS :)
20:10:06 <_xor> Ah ok, I see.
20:10:24 <geekosaur> that said, I don't think you meant running v2-update offline since by definition it's online to update the master package index. perhaps you wanted v2-build --only-dependencies
20:10:38 <tomsmeding> _xor: oops, that was directed at talismanick and geekosaur
20:10:43 <Guest51> I tried adding an hie.yaml file with similar contents and now I get "unknown local package: haskell-ide-engine"
20:10:54 × biberu quits (~biberu@user/biberu) (Read error: Connection reset by peer)
20:11:08 <geekosaur> o.O
20:11:33 <geekosaur> you might have to ask in #haskell-language-server
20:15:36 biberu joins (~biberu@user/biberu)
20:18:27 zero is now known as zzz
20:20:32 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:657b:163b:3e09:9614) (Remote host closed the connection)
20:21:29 × Guest51 quits (~Guest51@205.175.106.169) (Quit: Client closed)
20:21:45 Guest51 joins (~Guest51@205.175.106.169)
20:22:29 × Guest51 quits (~Guest51@205.175.106.169) (Client Quit)
20:25:42 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
20:26:43 × talismanick quits (~talismani@99-113-70-120.lightspeed.frokca.sbcglobal.net) (Ping timeout: 248 seconds)
20:27:08 × vorpuni quits (~pvorp@2001:861:3881:c690:c0fe:bc56:314c:dc44) (Quit: bye)
20:32:15 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 252 seconds)
20:33:29 × thyriaen quits (~thyriaen@2a01:aea0:dd4:463c:6245:cbff:fe9f:48b1) (Quit: Leaving)
20:33:48 <dmj`> is there a good / elegant functional pearl abstraction for pretty printers? Looking for something as elegant as the Hutton paper's 'type Parser a = String -> [(a,String)]'
20:34:23 wonko joins (~wjc@2a0e:1c80:2:0:45:15:19:130)
20:36:36 <ski> hm, i recall reading "A prettier printer" by Philip Wadler in 1997-04,1998-03 at <https://homepages.inf.ed.ac.uk/wadler/topics/language-design.html#prettier>, years ago
20:37:08 <ski> <https://wiki.haskell.org/Research_papers/Functional_pearls> has two pretty printing pearls, it seems
20:39:22 caryhartline joins (~caryhartl@2600:1700:2d0:8d30:c527:6c1:a00c:e1d4)
20:41:32 <ski> (also find e.g. "Functional Pearl: Replaying the stack for parsing and pretty printing" by Mathieu Boespflug at <https://www.cs.mcgill.ca/~mboes/papers/cassette.pdf>, "The Final Pretty Printer" David Darais at <https://david.darais.com/assets/papers/final-pretty-printer/fpp.pdf>, "Linear, Online, Functional Pretty Printing" by S. Doaitse Swierstra in 2004-08-24 at
20:41:37 <ski> <https://www.cs.uu.nl/research/techreps/repo/CS-2004/2004-025a.pdf>, "FUNCTIONAL PEARL Pretty Printing with Lazy Dequeues" at <https://www.cs.kent.ac.uk/pubs/2001/1813/content.pdf>)
20:41:56 × Everything quits (~Everythin@37.115.210.35) (Quit: leaving)
20:42:18 <ski> (i also recall reading one paper which did pretty-printing with attribute grammar techniques (lazy encoding, iirc), to make multiple passes .. can't recall author or title, though)
20:42:48 <dmj`> I'll try the Swiestra one first, thank you ski.
20:46:42 <EvanR> the beginning of wadler's paper defines a set of operations on a type Doc yet to be defined at that point. Without backpack, is there a way to express this directly in haskell
20:47:07 × zer0bitz quits (~zer0bitz@2001:2003:f748:2000:db1:77e1:e1b4:2a85) (Read error: Connection reset by peer)
20:47:10 <EvanR> type classes add a certain amount of noise, but might work
20:48:09 × wolfshappen quits (~waff@irc.furworks.de) (Quit: later)
20:49:33 <EvanR> like, an abstract data type and its operations, allowing multiple concrete implementations
20:49:57 <EvanR> reflection?
20:51:32 <EvanR> (dangit I basically answered my own question, "backpack")
20:59:28 <ski> EvanR : another option is to define a `data' type with fields, possibly also using existentials
20:59:46 <ski> (i'm talking about the ADT (Abstract Data Type) use of existentials, not the OO one)
20:59:48 × k`` quits (~user@152.1.137.158) (Remote host closed the connection)
21:00:50 <ski> data QueueImpl q a = QI { empty :: q,enqueue :: a -> q -> q,dequeue :: q -> Maybe (q,a) }
21:01:09 <ski> data QueueOps a = forall q. QO (QueueImpl q a)
21:01:43 <ski> (`q' here, not `QueueImpl' or `QueueOps', would correspond to the abstract data type, btw)
21:02:17 elbear joins (~lucian@188.24.138.239)
21:02:28 × michalz quits (~michalz@185.246.207.222) (Remote host closed the connection)
21:03:32 <ski> basically, `QueueImpl q a' behaves like a module, where `q' and `a' are transparent, while for `QueueOps a', `q' is opaque/hidden/abstract/forgotten/encapsulated/skolem
21:04:53 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 252 seconds)
21:05:53 <ski> to use it, you'd open up the operations, and then use them directly on `q's. in the OO view, though, you'd rather use something like `data QueueObj a = forall q. QObj { state :: q,methods :: QueueImpl q a }', defining wrappers around the operations/methods that rewrap in `QObj' each time they want to return an object
21:06:43 × zmt00 quits (~zmt00@user/zmt00) (Ping timeout: 248 seconds)
21:07:00 × elbear quits (~lucian@188.24.138.239) (Ping timeout: 264 seconds)
21:08:24 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
21:09:06 rockystone joins (~rocky@user/rockymarine)
21:09:40 <dminuoso> Is there a simple primitive in `base` or `container` that would let me `lookup` and remove at the same time comfortably and efficiently for small lists/data sets (5-10)
21:10:03 <dminuoso> Using a Set with alterF seems a bit much
21:10:22 <ski> (of course, since there are no binary methods (like a `merge' one, needing to peek into implementation of two abstract data structures), we can refactor, "using closures" (partial application), to get `data QueueObj a = QObj { enqueue :: a -> QueueObj a,dequeue :: Maybe (QueueObj a,a) }' and `newEmpty :: QueueOps a -> QueueObj a', distributing the existential inwards (forgetting that we were returning an
21:10:28 <ski> object using the same state type))
21:14:16 eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
21:19:54 Feuermagier joins (~Feuermagi@user/feuermagier)
21:20:10 × bgs quits (~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection)
21:21:35 Feuermagier_ joins (~Feuermagi@213.149.82.60)
21:21:35 × Feuermagier_ quits (~Feuermagi@213.149.82.60) (Client Quit)
21:24:18 <ski> can't think of anything better than `break', or `findIndex'/`elemIndex' with `splitAt'
21:24:25 × Feuermagier quits (~Feuermagi@user/feuermagier) (Ping timeout: 246 seconds)
21:24:33 <ski> (which isn't really "at the same time")
21:25:03 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
21:25:27 <dminuoso> So handwritten it is? https://gist.github.com/dminuoso/f9a82bd74e4f568c08ff499d8a53e124
21:25:48 <dminuoso> (For reasons beyond me, that implementation reverses the list when the located element is at the end)
21:27:47 <dminuoso> Oh, nevermind I see why now.
21:28:03 <ski> @hoogle (a -> Bool) -> [a] -> Maybe (a,[a])
21:28:04 <lambdabot> Text.XML.HXT.Arrow.Pickle.Xml findElem :: (a -> Bool) -> [a] -> Maybe (a, [a])
21:28:04 <lambdabot> Control.Concurrent.SupervisorInternal pickFromSaveStack :: (a -> Bool) -> [a] -> Maybe (a, [a])
21:28:26 <dminuoso> But I can actually live with the list being somewhat reordered.
21:28:28 jargon joins (~jargon@184.101.208.112)
21:29:07 <dminuoso> I dont have any benefit with the dlist here, do I?
21:29:39 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 248 seconds)
21:30:19 <ski> .. i don't think so ?
21:30:37 <ski> you're not using `dlistSnoc' or `dlistAppend'
21:30:57 <ski> (also, does the wrapper base really help ?)
21:31:38 <dminuoso> What do you mean by wrapper base?
21:31:51 <ski> lookupDel _key [] = Nothing
21:31:59 <dminuoso> Ah yes that is redundant
21:32:10 <dminuoso> It's just some leftover from starting with a plain lookup
21:32:35 <ski> .. maybe you'll avoid some small allocation of `emptyDList'. or some other cost of using the nested function
21:32:43 <ski> i suspect it wouldn't be a big deal
21:33:20 <ski> anyway, the "obvious" solution is the direct style, using `fmap'/`(<$>)' on `Maybe' over the recursive call
21:33:36 <EvanR> splitAt is efficient due to some kind of update frame shenanigan
21:34:09 <ski> but that suffers from the "left-associated `(>>=)'" kind of problem .. i might try using CPS for the worker in `lookupDel'
21:34:20 <ski> EvanR : hm ?
21:34:33 <dminuoso> ski: I think the handwritten version is just easier to predict mmm.
21:35:05 <ski> try the CPS ?
21:35:58 <dminuoso> Ah, I see you mean instead of the Maybe on the top signature?
21:36:07 <dminuoso> Yeah, I was going to do that anyway
21:38:27 × perrierjouet quits (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.7)
21:38:37 <ski> i mean using `go :: [(k,v)] -> o -> (v -> [(k,v)] -> o) -> o'
21:39:14 jmdaemon joins (~jmdaemon@user/jmdaemon)
21:39:15 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
21:39:19 <ski> (well, `forall o.', but it's implicit (`v' doesn't matter))
21:40:55 mikoto-chan joins (~mikoto-ch@193.185.223.3)
21:41:41 perrierjouet joins (~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
21:42:56 <dminuoso> Im so deep into continuations already. :(
21:43:19 <dminuoso> newtype ExStateT s e m a = ExStateT { runExStateT :: forall r. s -> (e -> m r) -> (s -> a -> m r) -> m r }
21:43:59 <dminuoso> Is my outer monad, while Im working over an ad-hoc continuation, using continuation constructors to build up a tree...
21:44:04 <dminuoso> And now this. :(
21:44:23 <Franciman> dminuoso: does this perform decently?
21:44:57 <dminuoso> Honestly I dont even know yet, its not finished enough to run proper benchmarks yet
21:46:37 <[Leary]> :t \k -> first (fmap snd) . partition ((k ==) . fst)
21:46:38 <lambdabot> Eq a => a -> [(a, b)] -> ([b], [(a, b)])
21:47:15 <[Leary]> It's a bit weird to use partition for lookup, but it should work.
21:51:17 × chomwitt quits (~chomwitt@2a02:587:dc0c:c200:5b5:50e2:356d:c45b) (Ping timeout: 268 seconds)
21:51:59 shawwwn joins (sid6132@id-6132.helmsley.irccloud.com)
21:52:26 <[Leary]> Though I guess it's lacking if you want early stopping, which you probably do.
21:54:52 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 268 seconds)
21:57:52 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
21:58:05 rockystone joins (~rocky@user/rockymarine)
21:58:29 ubert1 joins (~Thunderbi@91.141.75.122.wireless.dyn.drei.com)
21:59:46 × ubert quits (~Thunderbi@77.119.214.60.wireless.dyn.drei.com) (Ping timeout: 268 seconds)
21:59:47 ubert1 is now known as ubert
22:01:25 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
22:02:16 <johnw> AndreasK: I wonder why it's ignore the env var then...
22:03:05 king_gs joins (~Thunderbi@2806:103e:29:c5:4fb1:a8c9:906f:c6e0)
22:04:53 jakalx joins (~jakalx@base.jakalx.net)
22:05:09 × eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
22:05:40 × king_gs quits (~Thunderbi@2806:103e:29:c5:4fb1:a8c9:906f:c6e0) (Client Quit)
22:05:56 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 268 seconds)
22:09:05 × tempuser_ quits (~archie@2804:214:8617:700:4d1d:352d:668a:1b70) (Quit: Leaving)
22:12:13 talismanick joins (~talismani@c-73-41-86-39.hsd1.ca.comcast.net)
22:13:45 jmorris joins (uid537181@id-537181.uxbridge.irccloud.com)
22:15:01 <dminuoso> johnw: Its as per documentation at least
22:15:07 <dminuoso> https://cabal.readthedocs.io/en/3.4/installing-packages.html#environment-variables
22:16:13 <dminuoso> johnw: With v2 build, you can use the --builddir flag (or control via cabal.project): https://cabal.readthedocs.io/en/3.6/cabal-project.html#cmdoption-builddir
22:16:36 <dminuoso> Oh, cannot be specified via cabal.project apparently. Interesting
22:17:07 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
22:21:16 <talismanick> So, I'm trying to use Polysemy with the Template Haskell shortcut syntax (`makeSem`) to generate boilerplate for me
22:21:51 <talismanick> but no matter what GADT I pass to it (including examples from docs and tutorials), it errors out with "Parse error: module header, import declaration"
22:23:14 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
22:24:01 <ski> dminuoso : fwiw, with an explicit signature like that (specifying being polymorphic in `o'), you'll guard against inadvertent nqCPS
22:24:14 <talismanick> building with GHC 9.2.4, polysemy v1.7.1.0 (latest)
22:24:42 <ski> (unless nqCPS is what you're after, of course .. then you can't really do that .. unless if you parameterize on all the operations you intende to do nqCPS with)
22:25:00 <dminuoso> What is nqCPS?
22:25:25 <talismanick> non <something> continuation passing style?
22:25:37 <ski> [Leary] : nice :)
22:25:47 <ski> not-quite CPS
22:25:48 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:657b:163b:3e09:9614)
22:25:55 <ski> when not all your calls are tail calls
22:26:09 <ski> sometimes you'll "do something extra" to the "final answer computed by a call"
22:26:23 AlexZenon_2 joins (~alzenon@178.34.161.92)
22:26:31 <dminuoso> Yeah, Im doing a lot of nqCPS already
22:26:47 <ski> `Codensity f a = forall o. (a -> f o) -> f o' is a principled way to do this, you can only mess with the `f' part of the result, not the `o' part
22:27:12 <dminuoso> Mmm interesting
22:27:16 <ski> nqCPS is what delimited continuations are all about
22:27:42 <dminuoso> Im looking at a paper Continuation-Based Partial Evaluation right now, that seems to touch that subject
22:28:05 dr_merijn joins (~dr_merijn@86-86-29-250.fixed.kpn.net)
22:28:06 × AlexZenon quits (~alzenon@178.34.161.92) (Ping timeout: 260 seconds)
22:28:13 <ski> ah, that's a fun topic :)
22:28:29 <ski> found the papers by Olivier Danvy and Caroline Malmkjer, yet ?
22:28:46 <dminuoso> I've never really understood what delimited continuations were about, I guess its time now
22:28:47 <ski> (those were how i was introduced to partial evaluation)
22:30:36 × mikoto-chan quits (~mikoto-ch@193.185.223.3) (Ping timeout: 268 seconds)
22:31:55 <ski> iirc, one of the MetaML examples involved staging a regex (or similar) pattern-matcher, so it offline computed an matcher, before in the later stage being fed inputs to match on (cf. "run-time compilation")
22:32:30 <ski> anyway, that example was written in explicit CPS (for success and failure to match) .. except when it was staged, it became nqCPS !
22:32:40 libertyprime joins (~libertypr@118-92-78-165.dsl.dyn.ihug.co.nz)
22:32:40 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
22:33:04 × dr_merijn quits (~dr_merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds)
22:33:19 <ski> now, MetaML also has `shift' & `reset', so i translated the example back to direct style, inserting a few judicious calls to those two control operations
22:34:19 ec joins (~ec@gateway/tor-sasl/ec)
22:35:46 × libertyprime quits (~libertypr@118-92-78-165.dsl.dyn.ihug.co.nz) (Remote host closed the connection)
22:36:41 <dminuoso> ski: https://gist.github.com/dminuoso/3b1e7a2f5eab7055e7438f8dd5da7f1f
22:36:48 <dminuoso> So this is the code as it is right now
22:37:23 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 268 seconds)
22:37:36 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 264 seconds)
22:39:19 AlexZenon_2 is now known as AlexZenon
22:39:39 rockystone joins (~rocky@user/rockymarine)
22:40:30 <AlexNoo> 1778
22:41:00 <shapr> good year, that
22:41:08 <shapr> hi AlexNoo, how's code?
22:42:23 <ystael> Is there a way to make stack _not_ destroy .stack-work/dist when it dies with a build failure?
22:42:42 <AlexNoo> hi AlexNoo, how's code?
22:42:46 <ystael> I want to examine the battered corpse
22:42:52 <AlexNoo> got it wrong
22:43:46 <ski> dminuoso : oh, you're still doing an accumulator
22:43:47 <shapr> gutetag AlexNoo, wie gehts?
22:43:59 <shapr> bah, I'm starting German lessons in two weeks :-|
22:44:45 <ski> (also, i was thinking of doing the CPS internally, but not on the outer interface. but i guess you could have it there .. or maybe you could do some `build'-like fusion)
22:45:27 <dminuoso> ski: Yeah its a bit of impedence mismatching. :(
22:45:30 <AlexNoo> auf keine Weise
22:46:09 <dminuoso> Not much of a choice, since Im not just comparing two lists. Im sort of merging two lists on an element-by-element basis, erroring out of any side has extras
22:46:13 <ski> doing it without accumulator, in the CPS, should be easy
22:46:25 c209e6dc-4d76-47 joins (~aditya@2601:249:4300:1296:195:dac6:592c:a55a)
22:46:31 <ski> well, you do need to pass `just' as argument
22:46:39 <ski> (effectively that becomes your accumulator, instead)
22:47:18 <ski> (you could think of `just' as becoming a difference list, if you want to)
22:47:54 × raehik1 quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 268 seconds)
22:48:03 <dminuoso> Yeah the perspective has crossed my mind. In a difference place, Im using continuations to construct a nested type, as to avoid stack space for things like `(foo :>) <$> buildInner`
22:48:08 ski twitches at the redundant bracket pair
22:48:33 <ski> with `buildInner' being of type `Maybe Whatever' ?
22:48:56 <dminuoso> Something along these lines originally
22:49:26 <ski> yea, so you want to avoid percolating up your `Nothing' exception, step-by-step, instead directly jumping to the handler
22:49:28 <dminuoso> Now its just `decodeAttr__ attrLen subtree (c . (asNam next :>))`
22:49:37 <dminuoso> Indeed
22:49:47 <ski> which is what the CPS does, since it allows the `nothing' to be a semi-tail call
22:50:11 <ski> this is what the Shivers' paper i mentioned the other day is all about, except that's about doing it in direct style, rather than explicit CPS
22:50:14 <dminuoso> I think Ill get some rest, I cant focus to imagine how to put your suggestion in place.
22:50:59 <dminuoso> What I like about the continuation construction by the way, is that I can just suspend it.
22:51:18 <ski> yea, you can easily do coroutiney stuff with it
22:51:28 <shapr> AlexNoo: Are you writing cool Haskell code?
22:51:30 <ski> there's a Claessen paper, "A Poor Man's Concurrency Monad"
22:51:57 <dminuoso> Which is really helpful. Im decoding a sort of encoded algebra of types, and there's this notion of "split attributes", where attributes are encoded across other attributes, so at some point I must suspend the layers I have constructed so far, build the outer attributes, splice together, and then resume.
22:52:10 × Midjak quits (~Midjak@82.66.147.146) (Quit: This computer has gone to sleep)
22:52:28 <ski> i also used a similar idea, when i implemented `zipWith'/`zip' using two `foldr' calls on the lists, no other recursion or matching/deconstruction (explicit or indirect) of the lists
22:52:32 <dminuoso> What is really amazing how simple it: | DecodedNeedsSpliceAll (IntTree ASpec) BS.ByteString (Attr -> Attr)
22:53:03 <ski> yea, that does sound like a coroutiney situation
22:53:07 <dminuoso> Yup
22:53:40 <AlexNoo> shapr: I do not know this language. * gloomy*
22:53:49 <Axman6> o/
22:54:04 <ski> (i'm reminded the declarative debugger for Mercury allowed a similar thing, to defer one question about whether an intermediate function call result was intended, to possibly try looking for other questions, before looping back to the original one)
22:54:05 <shapr> AlexNoo: want to learn? I can suggest some starter things if you want?
22:54:37 <dminuoso> At any rate, I really have to get some sleep. o/
22:54:46 <dminuoso> Thanks for your insights, ski
22:54:56 <ski> yw :)
22:55:00 <ski> good night and pleasant dreams
22:55:01 × c209e6dc-4d76-47 quits (~aditya@2601:249:4300:1296:195:dac6:592c:a55a) (Quit: Konversation terminated!)
22:55:22 <Axman6> AlexNoo: There was a time when none of us knew this language
22:55:49 × acidjnk quits (~acidjnk@p200300d6e7137a811112d37158fd9527.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
22:55:55 <Axman6> (that time was 1990)
22:56:27 × FlaminWalrus quits (~user@wsip-24-248-9-71.br.br.cox.net) (Remote host closed the connection)
22:56:35 × Kaiepi quits (~Kaiepi@142.68.249.28) (Remote host closed the connection)
22:56:53 <AlexNoo> shapr: no. I would like to learn C, then C++, and only then... be interested in other languages. and I don't know English either. :-(
22:58:32 <AlexNoo> 1775
22:59:04 <Axman6> are we counting down to something?
22:59:09 <AlexNoo> well, again, I drove the rating into the wrong tab.
22:59:19 Kaiepi joins (~Kaiepi@142.68.249.28)
22:59:35 × Kaiepi quits (~Kaiepi@142.68.249.28) (Remote host closed the connection)
22:59:37 <ski> do you know any other languages ?
22:59:44 × Tuplanolla quits (~Tuplanoll@91-159-69-34.elisa-laajakaista.fi) (Quit: Leaving.)
22:59:59 Kaiepi joins (~Kaiepi@142.68.249.28)
23:00:11 <AlexNoo> native only.
23:00:31 <Axman6> native as in German or native as in assembly?
23:00:53 pavonia_ joins (~user@user/siracusa)
23:01:28 <AlexNoo> native, as in Russia, or the Soviet Union.
23:02:03 <AlexNoo> and in German I only know "hands up".
23:02:04 × pavonia quits (~user@user/siracusa) (Read error: Connection reset by peer)
23:02:11 pavonia_ is now known as pavonia
23:04:00 <talismanick> nvm, I forgot to enable TemplateHaskell
23:04:03 × td_ quits (~td@94.134.91.145) (Ping timeout: 268 seconds)
23:05:23 td_ joins (~td@83.135.9.60)
23:05:33 <ski> AlexNoo : ah, sorry. i meant any other proramming languages ?
23:06:25 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
23:06:37 <talismanick> AlexNoo: zachem schitaesh?
23:06:59 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 268 seconds)
23:08:14 <AlexNoo> only Python, partially. not completely.
23:08:59 <ski> добрый вечер/ночь
23:09:40 <AlexNoo> добрый.
23:10:03 <dolio> David Turner knew Haskell in 1990.
23:10:39 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 252 seconds)
23:12:24 <AlexNoo> But I'm already sleeping. good night.
23:12:33 zmt00 joins (~zmt00@user/zmt00)
23:12:39 ski waves
23:12:49 rockystone joins (~rocky@user/rockymarine)
23:13:05 <ski> shapr : möchtest Du mit deutsche Leute arbeiteteteten ?
23:15:30 <yushyin> i'm not sure if this is inflected properly
23:16:54 <EvanR> :t splitAt
23:16:54 × EvanR quits (~EvanR@user/evanr) (Remote host closed the connection)
23:16:55 <lambdabot> Int -> [a] -> ([a], [a])
23:17:13 EvanR joins (~EvanR@user/evanr)
23:17:15 <EvanR> :t splitAt
23:17:16 <lambdabot> Int -> [a] -> ([a], [a])
23:17:23 <EvanR> @src splitAt
23:17:23 <lambdabot> splitAt n xs = (take n xs, drop n xs)
23:17:41 nate1 joins (~nate@98.45.169.16)
23:18:12 <EvanR> :t space
23:18:12 <lambdabot> Doc
23:18:14 <EvanR> :t span
23:18:16 <lambdabot> (a -> Bool) -> [a] -> ([a], [a])
23:18:19 <EvanR> @src span
23:18:19 <lambdabot> span _ xs@[] = (xs, xs)
23:18:19 <lambdabot> span p xs@(x:xs') | p x = let (ys,zs) = span p xs' in (x:ys,zs)
23:18:19 <lambdabot> | otherwise = ([],xs)
23:18:28 <EvanR> I was thinking of break / span not splitAt
23:22:42 <shapr> ski: jag lära mig tysk för jobbet, ja
23:22:52 <EvanR> hopefully the same magic applies to splitAt though
23:23:01 × nate1 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds)
23:23:53 ski studsar upp och ner på stolen
23:24:13 <ski> EvanR : magic as in `RULE's ?
23:24:58 <shapr> ski: hah, I'm excited about learning German for a Haskell job, yes!
23:25:40 <EvanR> not rules, something about stg
23:26:44 <ski> hm, 'd be curious to learn what it was about / how it works
23:26:44 <Axman6> shapr: congrats - can you say where the job is?
23:26:58 × noctux quits (~noctux@user/noctux) (Ping timeout: 240 seconds)
23:27:04 <shapr> Axman6: yeah, I'm working for Least Authority on the PrivateStorage team
23:28:16 noctux joins (~noctux@user/noctux)
23:28:34 <Axman6> "formerly S4" I feel like they could have also called it PS3 =)
23:29:04 <shapr> :-)
23:29:23 <shapr> it's Python, Haskell, and Nix
23:30:42 <Axman6> looks like a cool product, and one I've wanted for a while
23:31:16 <EvanR> the problem setup is: you want to lazily process the first part of a list one way, then after the split or break, process it another way. So you probably just do break or splitAt to get two "new" lists, and just use them as input to a lazy algorithm. Eventually when something starts consuming the first part, it's not obvious that it can be dropped soon, because there was that 2nd component based on the whole list, "not needed yet"
23:32:16 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 268 seconds)
23:32:58 <EvanR> but apparently it can be collected soon, i.e. the dropping is evaluating along with the taking, sometimes, for some reason
23:33:10 <EvanR> "update frames"
23:33:16 <Axman6> shapr: HMMMMMMM, I tick a lot of the boxes for "Helpful skills and attributes for this role include" on https://leastauthority.com/blog/jobs/senior-software-developer-privatestorage/
23:34:10 <shapr> Axman6: you could apply
23:34:27 <shapr> I just started, I like it so far.
23:37:52 × spacenautx quits (~spacenaut@user/spacenautx) (Quit: WeeChat 3.0)
23:40:52 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
23:42:33 × mncheck quits (~mncheck@193.224.205.254) (Ping timeout: 252 seconds)
23:43:56 × wonko quits (~wjc@2a0e:1c80:2:0:45:15:19:130) (Ping timeout: 260 seconds)
23:44:37 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
23:44:55 geekosaur joins (~geekosaur@xmonad/geekosaur)
23:47:50 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:657b:163b:3e09:9614) (Remote host closed the connection)
23:49:32 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 268 seconds)
23:49:38 <talismanick> Does "runtime strictness analysis" make sense terminologically, by analogy with a JIT versus a compiler?
23:50:12 <talismanick> Is there a way to annotate data types with "potentially make strict at runtime", like a weaker bang pattern?
23:51:08 <talismanick> Like, opportunistically make strict if a) no results change and b) guaranteed performance increase
23:51:36 <EvanR> if a JIT runs your code slow for a while before deciding to compile it and replace it for future calls, is it actually "just in time" or "somewhat late"
23:52:01 <EvanR> because if you do that with strictness your code starts acting differently
23:52:57 <talismanick> EvanR: well, don't space leaks usually come from intermediate data structures?
23:53:17 <L29Ah> talismanick: the compiler is too dumb to predict if the results would change, and that in fact sounds like the halting problem
23:53:29 Sciencentistguy7 joins (~sciencent@hacksoc/ordinary-member)
23:53:39 <EvanR> yeah in some cases adding strictness can make it use less intermediate data. In other cases it makes the code fail to terminate when it otherwise would
23:53:44 <L29Ah> performance increase depends a lot on if/when exactly the data would be demanded
23:54:21 L29Ah just uses -XStrict and adds ~'s when needed
23:54:30 <davean> "don't space leaks usually come from intermediate data structures?" No!
23:54:35 <talismanick> L29Ah: that's why I asked if it could be done at runtime
23:54:43 <talismanick> davean: oh?
23:54:47 <EvanR> yeah I dunno about usually, but that's sometimes a thing
23:55:24 <EvanR> strict fields for an Int that is computed from a large thunk
23:55:42 <EvanR> (that would definitely terminate)
23:55:44 × Sciencentistguy quits (~sciencent@hacksoc/ordinary-member) (Ping timeout: 268 seconds)
23:55:44 Sciencentistguy7 is now known as Sciencentistguy
23:55:57 <davean> Space leaks come from something being depended on. The only way an intermediate datastructure causes one is exactly the same way as a pair where you only need one of the two values leaks the unneeded one's space
23:56:17 loras joins (~loras@c-73-139-125-125.hsd1.fl.comcast.net)
23:56:26 × perrierjouet quits (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.7)
23:56:31 <L29Ah> my last space leak was due to the pinned memory fragmentation that could have been fixed either by a smarter allocator or an ability to temporarily pin any chunk of memory in order to push it down the syscall
23:56:46 <davean> All your space leaks come from exactly the same place (unless you look at forgien data stuff)
23:57:35 <EvanR> so what you're saying is, the space leak is not caused by intermediate data. But by intermediate data outstaying its welcome
23:57:59 <EvanR> because if you evaluated the results earlier the intermediate data still exists but is not a problem
23:58:36 <davean> non-strictness is control flow

All times are in UTC on 2022-10-12.