Home liberachat/#haskell: Logs Calendar

Logs on 2023-03-07 (liberachat/#haskell)

00:07:57 mauke_ joins (~mauke@user/mauke)
00:09:04 × mauke quits (~mauke@user/mauke) (Ping timeout: 248 seconds)
00:09:04 mauke_ is now known as mauke
00:12:34 meinside joins (uid24933@id-24933.helmsley.irccloud.com)
00:13:04 eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
00:17:24 segfaultfizzbuzz joins (~segfaultf@12.172.217.142)
00:17:35 × eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 248 seconds)
00:20:45 son0p joins (~ff@181.136.122.143)
00:21:10 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
00:22:15 × enoq quits (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) (Quit: enoq)
00:34:24 TonyStone joins (~TonyStone@cpe-74-76-57-186.nycap.res.rr.com)
00:48:11 × segfaultfizzbuzz quits (~segfaultf@12.172.217.142) (Ping timeout: 248 seconds)
00:50:43 × caryhartline quits (~caryhartl@cpe-76-187-114-220.tx.res.rr.com) (Quit: caryhartline)
00:53:52 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 248 seconds)
01:06:11 × tusko quits (~yeurt@user/tusko) (Ping timeout: 255 seconds)
01:08:27 tusko joins (~yeurt@user/tusko)
01:09:17 × TonyStone quits (~TonyStone@cpe-74-76-57-186.nycap.res.rr.com) (Quit: Leaving)
01:10:59 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
01:14:18 zaquest joins (~notzaques@5.130.79.72)
01:16:30 segfaultfizzbuzz joins (~segfaultf@12.172.217.142)
01:16:48 ix joins (~ix@213.205.192.69)
01:17:07 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
01:18:13 × Tuplanolla quits (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) (Quit: Leaving.)
01:18:36 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
01:18:36 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
01:18:36 wroathe joins (~wroathe@user/wroathe)
01:22:51 × ix quits (~ix@213.205.192.69) (Ping timeout: 248 seconds)
01:24:42 <segfaultfizzbuzz> what is ' in 'Normal here? https://github.com/awakesecurity/gRPC-haskell/blob/master/examples/echo/echo-hs/EchoServer.hs
01:25:37 <geekosaur> it indicates a promoted type
01:25:39 <monochrom> You can write Normal without ' in that context.
01:25:48 <geekosaur> see the DataKinds extension
01:25:53 <segfaultfizzbuzz> geekosaur: promoted? ok
01:26:45 <monochrom> Yeah please consult the GHC user's guide on DataKinds.
01:26:57 <monochrom> Better than any blog.
01:35:35 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
01:36:43 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
01:40:49 × wroathe quits (~wroathe@user/wroathe) (Quit: leaving)
01:41:04 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
01:41:04 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
01:41:04 wroathe joins (~wroathe@user/wroathe)
01:43:05 erisco_ joins (~erisco@d24-141-66-165.home.cgocable.net)
01:44:37 × erisco quits (~erisco@d24-141-66-165.home.cgocable.net) (Ping timeout: 252 seconds)
01:44:37 erisco_ is now known as erisco
01:44:45 × thegeekinside quits (~thegeekin@189.141.115.134) (Remote host closed the connection)
01:48:58 × vglfr quits (~vglfr@145.224.100.65) (Ping timeout: 252 seconds)
01:51:10 × jle` quits (~jle`@cpe-23-240-75-236.socal.res.rr.com) (Ping timeout: 252 seconds)
01:53:10 jle` joins (~jle`@cpe-23-240-75-236.socal.res.rr.com)
01:55:49 Umeaboy joins (~Umeaboy@94-255-145-133.cust.bredband2.com)
01:55:52 <Umeaboy> Hi!
01:57:02 <Umeaboy> Is it possible to use a custom install path for ghc in the happy spec file if I've used homebrew to install ghc?
01:57:33 <Umeaboy> I can't get rpmbuild to see ghc if I use the result of whereis ghc
01:59:40 × xff0x quits (~xff0x@ai098135.d.east.v6connect.net) (Ping timeout: 265 seconds)
02:12:01 lisbeths joins (uid135845@id-135845.lymington.irccloud.com)
02:17:26 thegeekinside joins (~thegeekin@189.141.115.134)
02:23:30 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
02:24:42 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 268 seconds)
02:24:48 Lord_of_Life_ is now known as Lord_of_Life
02:27:19 gdown joins (~gavin@h69-11-148-35.kndrid.broadband.dynamic.tds.net)
02:29:57 talismanick joins (~talismani@2601:200:c000:f7a0::5321)
02:36:00 × fryguybob quits (~fryguybob@cpe-24-94-51-210.stny.res.rr.com) (Quit: leaving)
02:38:54 rekahsoft joins (~rekahsoft@bras-base-orllon1122w-grc-07-174-95-68-142.dsl.bell.ca)
02:42:10 × Umeaboy quits (~Umeaboy@94-255-145-133.cust.bredband2.com) (Quit: Leaving)
02:43:10 × adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Quit: _)
02:43:14 × thegeekinside quits (~thegeekin@189.141.115.134) (Remote host closed the connection)
02:43:29 adanwan joins (~adanwan@gateway/tor-sasl/adanwan)
02:44:49 xff0x joins (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
02:50:18 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
02:54:32 × fnurglewitz quits (uid263868@id-263868.lymington.irccloud.com) (Quit: Connection closed for inactivity)
02:56:20 × gmg quits (~user@user/gehmehgeh) (Remote host closed the connection)
02:56:55 ix joins (~ix@213.205.192.69)
02:57:05 gmg joins (~user@user/gehmehgeh)
03:04:55 × jero98772 quits (~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff) (Remote host closed the connection)
03:05:58 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
03:05:58 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
03:05:58 finn_elija is now known as FinnElija
03:08:14 razetime joins (~Thunderbi@43.254.111.18)
03:11:20 × wroathe quits (~wroathe@user/wroathe) (Quit: leaving)
03:13:17 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
03:13:17 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
03:13:17 wroathe joins (~wroathe@user/wroathe)
03:13:59 eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
03:14:02 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 268 seconds)
03:19:48 gastus_ joins (~gastus@5.83.191.63)
03:23:17 × gastus quits (~gastus@185.6.123.188) (Ping timeout: 268 seconds)
03:23:55 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 248 seconds)
03:29:10 TonyStone joins (~TonyStone@cpe-74-76-57-186.nycap.res.rr.com)
03:29:35 × TonyStone quits (~TonyStone@cpe-74-76-57-186.nycap.res.rr.com) (Remote host closed the connection)
03:31:18 × td_ quits (~td@i53870927.versanet.de) (Ping timeout: 268 seconds)
03:32:50 td_ joins (~td@i53870905.versanet.de)
03:35:37 × rekahsoft quits (~rekahsoft@bras-base-orllon1122w-grc-07-174-95-68-142.dsl.bell.ca) (Ping timeout: 268 seconds)
03:42:37 × ix quits (~ix@213.205.192.69) (Read error: Connection reset by peer)
03:44:39 × [_] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
03:45:17 × cassaundra quits (~cassaundr@user/cassaundra) (Quit: leaving)
03:47:53 ix joins (~ix@213.205.192.69)
03:49:51 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 248 seconds)
03:51:44 cassaundra joins (~cassaundr@c-73-25-18-25.hsd1.or.comcast.net)
03:51:45 × cassaundra quits (~cassaundr@c-73-25-18-25.hsd1.or.comcast.net) (Client Quit)
03:52:32 cheater joins (~Username@user/cheater)
03:56:38 cassaundra joins (~cassaundr@c-73-25-18-25.hsd1.or.comcast.net)
03:56:38 × cassaundra quits (~cassaundr@c-73-25-18-25.hsd1.or.comcast.net) (Client Quit)
03:57:13 × gdown quits (~gavin@h69-11-148-35.kndrid.broadband.dynamic.tds.net) (Remote host closed the connection)
03:59:16 notzmv joins (~zmv@user/notzmv)
04:05:33 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
04:05:58 jpds joins (~jpds@gateway/tor-sasl/jpds)
04:11:05 _xor joins (~xor@72.49.195.228)
04:16:05 npm_i_kurbus joins (~npm_i_kur@user/kurbus)
04:20:13 mbuf joins (~Shakthi@49.207.178.186)
04:21:54 cassaundra joins (~cassaundr@user/cassaundra)
04:22:22 × segfaultfizzbuzz quits (~segfaultf@12.172.217.142) (Quit: segfaultfizzbuzz)
04:22:22 × meinside quits (uid24933@id-24933.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
04:22:39 × cassaundra quits (~cassaundr@user/cassaundra) (Client Quit)
04:27:25 × waleee quits (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 252 seconds)
04:31:11 cassiopea joins (~cassiopea@user/cassiopea)
04:42:07 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 248 seconds)
04:47:59 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 248 seconds)
04:51:38 rettahcay joins (~kaushikv@223.178.86.127)
04:52:01 rettahcay parts (~kaushikv@223.178.86.127) ()
04:54:24 × polyphem_ quits (~rod@2a02:810d:840:8754:224e:f6ff:fe5e:bc17) (Ping timeout: 248 seconds)
04:57:20 thegeekinside joins (~thegeekin@189.141.115.134)
04:57:47 × ix quits (~ix@213.205.192.69) (Ping timeout: 248 seconds)
05:10:35 × lbseale quits (~quassel@user/ep1ctetus) (Ping timeout: 268 seconds)
05:11:22 × lisbeths quits (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
05:14:18 × jmorris quits (uid537181@id-537181.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
05:18:36 × razetime quits (~Thunderbi@43.254.111.18) (Ping timeout: 268 seconds)
05:20:20 × npm_i_kurbus quits (~npm_i_kur@user/kurbus) (Quit: Client closed)
05:20:35 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
05:31:02 razetime joins (~Thunderbi@43.254.111.18)
05:32:30 npm_i_kurbus joins (~npm_i_kur@user/kurbus)
05:34:54 × jwiegley quits (~jwiegley@76-234-69-149.lightspeed.frokca.sbcglobal.net) (Quit: ZNC - http://znc.in)
05:34:54 × johnw quits (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) (Quit: ZNC - http://znc.in)
05:38:15 × freeside quits (~mengwong@103.252.202.85) (Ping timeout: 260 seconds)
05:41:15 freeside joins (~mengwong@103.252.202.85)
05:42:13 Square2 joins (~Square4@user/square)
05:42:59 ix joins (~ix@213.205.192.69)
05:55:23 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 248 seconds)
05:58:23 whatsupdoc joins (uid509081@id-509081.hampstead.irccloud.com)
06:01:04 × npm_i_kurbus quits (~npm_i_kur@user/kurbus) (Quit: Client closed)
06:03:36 bgs joins (~bgs@212-85-160-171.dynamic.telemach.net)
06:04:09 lisbeths joins (uid135845@id-135845.lymington.irccloud.com)
06:11:23 kenran joins (~user@user/kenran)
06:12:42 × kenran quits (~user@user/kenran) (Remote host closed the connection)
06:13:44 takuan joins (~takuan@178-116-218-225.access.telenet.be)
06:16:00 × razetime quits (~Thunderbi@43.254.111.18) (Ping timeout: 248 seconds)
06:18:39 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 248 seconds)
06:26:45 harveypwca joins (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67)
06:29:05 trev joins (~trev@user/trev)
06:38:16 rettahcay joins (~kaushikv@223.178.86.127)
06:38:46 cheater_ joins (~Username@user/cheater)
06:40:59 johnw joins (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net)
06:41:29 jwiegley joins (~jwiegley@76-234-69-149.lightspeed.frokca.sbcglobal.net)
06:41:37 × cheater quits (~Username@user/cheater) (Ping timeout: 252 seconds)
06:41:41 cheater_ is now known as cheater
06:52:29 notzmv joins (~zmv@user/notzmv)
06:54:24 rettahcay parts (~kaushikv@223.178.86.127) ()
06:55:07 × thegeekinside quits (~thegeekin@189.141.115.134) (Ping timeout: 248 seconds)
06:59:11 × shriekingnoise quits (~shrieking@186.137.175.87) (Ping timeout: 248 seconds)
06:59:22 michalz joins (~michalz@185.246.204.126)
07:08:27 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 248 seconds)
07:10:37 notzmv joins (~zmv@user/notzmv)
07:10:54 jakalx parts (~jakalx@base.jakalx.net) ()
07:17:10 × bliminse quits (~bliminse@user/bliminse) (Quit: leaving)
07:20:03 jakalx joins (~jakalx@base.jakalx.net)
07:21:15 gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
07:24:52 cheater_ joins (~Username@user/cheater)
07:26:35 × cheater quits (~Username@user/cheater) (Ping timeout: 248 seconds)
07:26:38 cheater_ is now known as cheater
07:31:33 razetime joins (~Thunderbi@117.193.1.99)
07:36:07 lortabac joins (~lortabac@2a01:e0a:541:b8f0:cdff:bbec:88eb:b8a)
07:37:52 Square3 joins (~Square4@user/square)
07:39:44 × Square2 quits (~Square4@user/square) (Ping timeout: 248 seconds)
07:48:30 bliminse joins (~bliminse@user/bliminse)
07:50:19 × harveypwca quits (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving)
07:50:45 × monochrom quits (trebla@216.138.220.146) (Ping timeout: 255 seconds)
07:51:13 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
07:54:13 mncheck joins (~mncheck@193.224.205.254)
07:55:55 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 248 seconds)
07:56:46 meinside joins (uid24933@id-24933.helmsley.irccloud.com)
07:57:47 monochrom joins (trebla@216.138.220.146)
07:59:57 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
08:02:14 × eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
08:06:48 MajorBiscuit joins (~MajorBisc@2001:1c00:2408:a400:67e:5371:52a7:9b9a)
08:09:32 × hugo- quits (znc@verdigris.lysator.liu.se) (Ping timeout: 255 seconds)
08:12:59 × MajorBiscuit quits (~MajorBisc@2001:1c00:2408:a400:67e:5371:52a7:9b9a) (Ping timeout: 248 seconds)
08:13:21 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
08:14:38 codaraxis__ joins (~codaraxis@user/codaraxis)
08:14:38 × lottaquestions quits (~nick@2607:fa49:503e:7100:29d5:6a23:249a:7ab4) (Remote host closed the connection)
08:15:01 MajorBiscuit joins (~MajorBisc@c-001-030-044.client.tudelft.eduvpn.nl)
08:15:04 lottaquestions joins (~nick@2607:fa49:503e:7100:dbe0:8110:91f3:4f25)
08:15:08 hugo joins (znc@verdigris.lysator.liu.se)
08:16:05 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
08:17:48 jpds joins (~jpds@gateway/tor-sasl/jpds)
08:18:08 × codaraxis quits (~codaraxis@user/codaraxis) (Ping timeout: 248 seconds)
08:19:58 × ft quits (~ft@p3e9bc443.dip0.t-ipconnect.de) (Quit: leaving)
08:30:40 ubert1 joins (~Thunderbi@p200300ecdf0c57b39b0cedad49907c5f.dip0.t-ipconnect.de)
08:30:41 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
08:33:48 Midjak joins (~Midjak@82.66.147.146)
08:37:04 <Philonous> I'm trying to write a bug report for the network package, but I'd like to figure out some details to include, where would be a good place to ask Linux network API related questions?
08:38:21 × hugo quits (znc@verdigris.lysator.liu.se) (Ping timeout: 256 seconds)
08:38:43 vglfr joins (~vglfr@145.224.100.65)
08:43:24 gurkenglas joins (~gurkengla@dynamic-046-114-156-015.46.114.pool.telefonica.de)
08:46:12 Inst joins (~Inst@2601:6c4:4081:54f0:a86f:4b5c:43f7:99bc)
08:46:22 <Inst> I don't get why there's not more people talking about Streamly, it's a great fucking library
08:46:31 <Inst> 67% of C performance
08:46:46 <Inst> let me reboot and trial on debian instead of WSL, might be able to get better performance that way
08:48:42 × Inst quits (~Inst@2601:6c4:4081:54f0:a86f:4b5c:43f7:99bc) (Read error: Connection reset by peer)
08:49:29 hugo joins (znc@verdigris.lysator.liu.se)
08:50:00 cfricke joins (~cfricke@user/cfricke)
08:57:47 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
09:02:42 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:ed80:eb1e:1340:95af)
09:07:05 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:ed80:eb1e:1340:95af) (Ping timeout: 260 seconds)
09:14:03 × razetime quits (~Thunderbi@117.193.1.99) (Quit: See You Space Cowboy)
09:17:23 cheater_ joins (~Username@user/cheater)
09:19:28 × cheater quits (~Username@user/cheater) (Ping timeout: 248 seconds)
09:19:38 cheater_ is now known as cheater
09:28:06 chomwitt joins (~chomwitt@2a02:587:7a18:6d00:1ac0:4dff:fedb:a3f1)
09:28:40 Eihel joins (~Eihel@wikipedia/eihel)
09:29:30 Eihel parts (~Eihel@wikipedia/eihel) ()
09:31:22 × lisbeths quits (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
09:31:55 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 248 seconds)
09:32:26 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
09:34:56 × tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
09:37:47 × ix quits (~ix@213.205.192.69) (Ping timeout: 248 seconds)
09:39:23 × gurkenglas quits (~gurkengla@dynamic-046-114-156-015.46.114.pool.telefonica.de) (Ping timeout: 248 seconds)
09:40:38 ix joins (~ix@213.205.192.69)
09:46:18 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
10:03:54 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559)
10:06:42 × mncheck quits (~mncheck@193.224.205.254) (Remote host closed the connection)
10:08:25 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559) (Ping timeout: 252 seconds)
10:12:16 × xff0x quits (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 248 seconds)
10:12:59 × cheater quits (~Username@user/cheater) (Ping timeout: 248 seconds)
10:20:15 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 248 seconds)
10:22:16 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
10:22:20 × codaraxis__ quits (~codaraxis@user/codaraxis) (Quit: Leaving)
10:32:44 emmanuelux joins (~emmanuelu@user/emmanuelux)
10:35:41 × ix quits (~ix@213.205.192.69) (Read error: Connection reset by peer)
10:35:49 Inst joins (~Inst@2601:6c4:4081:54f0:c4dc:214a:b41a:859d)
10:35:51 <Inst> ugh
10:36:24 <Inst> streamly is great and all, but i rebuilt as per settings, and their WC is still 33% slower than wc
10:39:06 jumper149 joins (~jumper149@base.felixspringer.xyz)
10:41:05 ix joins (~ix@213.205.192.69)
10:41:46 <jumper149> Are there two different `(->)`s? Because if I ask ghci, it tells me `:k (->)` is `Type -> Type -> Type`. But kind signatures disagree with this. For example `:k Const` is `Type -> k -> Type` and also `:k Eq` is `Type -> Constraint`. `k` and `Constraints` are clearly not `Type`, right?
10:42:52 <merijn> jumper149: Yes
10:43:08 <merijn> There is "->" at the type level and "->" at the kind level
10:43:27 <merijn> Although, I suppose GHC now also has TypeInType lunacy making them "the same but different"
10:43:39 <jumper149> merijn: So `->` at kind level would have kind `a -> b -> c` then, I guess?
10:44:22 evanmeek joins (~user@91.217.139.207)
10:44:49 <merijn> jumper149: Where 'a, b, and c' are some kind with sort BOX, yes :p
10:45:05 <merijn> Unless you believe in TypeInType heresy, then I dunno what it should be
10:45:14 × the_proffesor quits (~theproffe@user/theproffesor) (Ping timeout: 255 seconds)
10:47:44 <jumper149> I'm not sure, what "sort" and "BOX" are. Afaiu: Values have types, while types have kinds and kinds have kinds. Is that not correct?
10:48:07 <jumper149> Compared to dependent types where: Values have types and types have types.
10:51:10 <tomsmeding> rather, in dependent types, values have types, types have kinds, kinds have sorts, sorts have ... : an infinite stack
10:51:17 <tomsmeding> in sound dependent types, that is
10:51:53 <tomsmeding> in GHC haskell with TypeInType (which has been the case since ghc 6 or so), values have types, and types have types: the stack stops one level earlier
10:52:09 <tomsmeding> but in practice it's very useful to distinguish between types and kinds, yielding what you wrote
10:52:23 <tomsmeding> % :k Type
10:52:23 <yahb2> <interactive>:1:1: error: ; Not in scope: type constructor or class ‘Type’
10:52:26 <tomsmeding> % :k Data.Kind.Type
10:52:26 <yahb2> Data.Kind.Type :: *
10:52:33 <tomsmeding> % :set -XNoStarIsType
10:52:33 <yahb2> <no output>
10:52:35 <tomsmeding> % :k Data.Kind.Type
10:52:35 <yahb2> Data.Kind.Type :: Type
10:52:43 cheater joins (~Username@user/cheater)
10:53:35 <merijn> jumper149: In the "classical" type theory GHC are based on, the values have types, types have kinds, and kinds have sorts (and the only existing sort within GHC was BOX, so every kind has sort BOX)
10:53:41 <merijn> tomsmeding: TypeInType is 8.x
10:53:50 <tomsmeding> ah
10:53:55 <tomsmeding> what happened before
10:54:01 <Inst> now types trigger russell's paradox
10:54:04 <merijn> GHC 6 was, like, over a decade ago
10:54:17 <tomsmeding> was type-level ghc haskell just not expressive enough to observe the equality of sorts and kinds or something?
10:54:19 <merijn> Although I guess TypeInType is also a few years old by now
10:54:31 <tomsmeding> because I find it unlikely that ghc had a full infinite universe stack
10:54:32 <merijn> tomsmeding: There was no other sort thatn BOX
10:54:49 <Inst> was there datakinds at the time?
10:55:02 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
10:55:09 <tomsmeding> datakinds is since 7.4.1 according to the ghc user guide
10:55:22 <merijn> DataKinds isn't really affected by this
10:55:55 <Inst> you'd imagine that with user-definable types and kinds, you'd naturally end up with sorts
10:55:56 cheater_ joins (~Username@user/cheater)
10:56:05 <Inst> also, does MVar or TVar go better with streamly?
10:56:33 <merijn> Inst: Why would you naturally end up with sorts?
10:56:50 <merijn> GHC has never been able to represent kinds not in BOX, so you couldn't write them anyway
10:56:58 <Inst> well, probably datakinds isn't powerful enough, but you might be interested in giving...
10:56:59 <Inst> ah
10:57:55 × cheater quits (~Username@user/cheater) (Ping timeout: 260 seconds)
10:57:58 cheater__ joins (~Username@user/cheater)
10:57:59 cheater__ is now known as cheater
10:59:43 × evanmeek quits (~user@91.217.139.207) (Remote host closed the connection)
11:00:44 <jumper149> tomsmeding: Isn't there a problem with the infinite stack for dependent types? What type/kind/sort does `(->)` have here.
11:00:59 × cheater_ quits (~Username@user/cheater) (Ping timeout: 248 seconds)
11:02:17 <tomsmeding> jumper149: in dependent types?
11:02:21 <jumper149> Yes
11:03:39 <tomsmeding> in Agda, (->) is a special thing https://agda.readthedocs.io/en/v2.6.3/language/function-types.html
11:03:40 <jumper149> Maybe that question doesn't make sense, but intuitively I would have said "the type of `(->)` is `Type -> Type -> Type`"
11:04:27 <jumper149> I have mostly experience with Idris, where I actually think "types have types" is true. There was some note about unsoundness somewhere.
11:06:29 <ncf> idris, like agda, has an infinite hierarchy of universes
11:06:47 xff0x joins (~xff0x@2405:6580:b080:900:c9db:48d9:400c:36fe)
11:07:03 <jumper149> https://idris2.readthedocs.io/en/latest/faq/faq.html#does-idris-have-universe-polymorphism-what-is-the-type-of-type
11:07:08 <tomsmeding> can't find the definition of (->) or pi-types or similar for idris in 2mins of casual searching
11:08:35 <tomsmeding> and I'm not sure asking for "the type of Π" makes sense in such a system
11:09:10 <tomsmeding> like you have to go outside of a logical system to prove that system's soundness, usually
11:09:42 <jumper149> tomsmeding: I'm not sure either.
11:09:59 <jumper149> Is it even possible to prove "soundness" for something like Idris or Agda?
11:10:15 <tomsmeding> a non-dependent function arrow would be typeable, though: (->) : forall (n m : Level). forall (a : Set n). forall (b : Set m). a -> b -> Set (max n m)
11:10:17 <tomsmeding> or something
11:10:20 <tomsmeding> probably got that wrong
11:10:26 <tomsmeding> also that definition uses (->) itself, so what gives?
11:10:46 <tomsmeding> jumper149: would that not be the soundness of type theory, basically?
11:11:06 <tomsmeding> which is just a logic
11:11:23 <jumper149> tomsmeding: That violates the 2nd incompleteness theorem, doesn't it?
11:11:23 <tomsmeding> asking for the soundness of that is similar to asking for the soundness of ZF set theory or something
11:12:21 <tomsmeding> jumper149: that's what I was referring to, yeah -- proving the soundness of the system within itself is not possible
11:12:34 <tomsmeding> not quite the same as giving types to things though
11:13:22 <ncf> tomsmeding: that would be (->) : Set n -> Set m -> Set (max n m)
11:13:34 <tomsmeding> eliding the foralls, yes
11:13:41 <tomsmeding> oh no
11:13:45 <ncf> no, what you wrote is different
11:13:47 <tomsmeding> it is
11:13:59 <tomsmeding> yeah you're right
11:14:12 <jumper149> (a : Set n) -> (b : Set m) -> (c : Set (max n m)0
11:14:25 <tomsmeding> can't bind the result to a name :p
11:14:28 <tomsmeding> but yes
11:14:49 <jumper149> Syntax issue :D
11:15:29 <ncf> Π could also be given a type: Π : (A : Set n) → (B : A → Set m) → Set (max n m)
11:15:49 <tomsmeding> hm yeah
11:16:01 <tomsmeding> with the same issue that you're now using Π in the type of Π
11:16:04 <ncf> of course, usually Π is taken as primitive so that does not literally make sense, but you can always ask for the type of λ A B. Π A B
11:16:32 <jumper149> tomsmeding: A recursive definition would still be a definition though, right?
11:16:57 <tomsmeding> I... guess? Though in most systems, the type of a thing cannot contain that thing itself :p
11:17:05 <tomsmeding> that gives paradoxes very quickly I think
11:17:16 ccapndave joins (~ccapndave@xcpe-62-167-164-99.cgn.res.adslplus.ch)
11:17:17 <tomsmeding> % data A (a :: A ()) = MkA
11:17:17 <yahb2> <interactive>:26:16: error: ; Illegal kind: ‘()’ Perhaps you intended to use DataKinds
11:17:25 <tomsmeding> % :set -XDataKinds -XKindSignatures
11:17:25 <yahb2> <no output>
11:17:28 <tomsmeding> % data A (a :: A ()) = MkA
11:17:28 <yahb2> <interactive>:30:14: error: ; • Type constructor ‘A’ cannot be used here ; (it is defined and used in the same recursive group) ; • In the kind ‘A ()’ ; In the data type decla...
11:17:47 <tomsmeding> not that haskell is sounds as a proof system anyway
11:17:50 <tomsmeding> *sound
11:18:21 <jumper149> ... bringing us back to russels paradox I guess
11:18:46 <ncf> maybe a better way to see this would be to define Π_n, the Π type former for the universe level n. then you'd have Π_n : (A : Set n) → (B : A → Set n) → Set n, where the Π's involved in that type are Π_(n+1)
11:18:57 <ncf> so there's no actual recursion, more of a "microcosm principle"
11:19:18 <tomsmeding> you'd want to allow either A or B to yield something smaller than n though
11:19:36 <ncf> you can always lift values from Set n to Set m provided n <= m
11:19:50 <tomsmeding> agda doesn't like that I believe, but yes with some handwaving in any case
11:20:02 <tomsmeding> iirc idris has that as an axiom indeed
11:21:04 <ncf> there's a --cumulativity flag, but even without it you can do things like https://agda.github.io/agda-stdlib/Level.html
11:22:26 <tomsmeding> TIL
11:24:13 × emmanuelux quits (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer)
11:24:29 emmanuelux joins (~emmanuelu@user/emmanuelux)
11:24:31 <tomsmeding> (for lurkers: https://agda.readthedocs.io/en/v2.6.3/language/cumulativity.html )
11:26:09 × emmanuelux quits (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer)
11:26:42 emmanuelux joins (~emmanuelu@user/emmanuelux)
11:27:29 × emmanuelux quits (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer)
11:32:03 emmanuelux joins (~emmanuelu@user/emmanuelux)
11:34:22 × cheater quits (~Username@user/cheater) (Read error: Connection reset by peer)
11:35:08 cheater joins (~Username@user/cheater)
11:36:11 × xff0x quits (~xff0x@2405:6580:b080:900:c9db:48d9:400c:36fe) (Ping timeout: 248 seconds)
11:36:37 × cfricke quits (~cfricke@user/cfricke) (Ping timeout: 268 seconds)
11:38:02 xff0x joins (~xff0x@ai098135.d.east.v6connect.net)
11:42:41 kuribas joins (~user@ip-188-118-57-242.reverse.destiny.be)
11:51:21 Square2 joins (~Square4@user/square)
11:52:30 __monty__ joins (~toonn@user/toonn)
11:53:51 × Square3 quits (~Square4@user/square) (Ping timeout: 256 seconds)
11:54:37 pikipiki joins (~pikipiki@2a00:8a60:c000:1:3c66:5b32:c285:a7b7)
12:01:24 takuan joins (~takuan@178-116-218-225.access.telenet.be)
12:05:29 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559)
12:06:34 × meinside quits (uid24933@id-24933.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
12:06:35 × pikipiki quits (~pikipiki@2a00:8a60:c000:1:3c66:5b32:c285:a7b7) (Read error: Connection reset by peer)
12:07:20 zephyr__ joins (~irfan@182.69.86.253)
12:08:04 pikipiki joins (~pikipiki@2a00:8a60:c000:1:3c66:5b32:c285:a7b7)
12:10:15 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559) (Ping timeout: 260 seconds)
12:10:15 × pikipiki quits (~pikipiki@2a00:8a60:c000:1:3c66:5b32:c285:a7b7) (Read error: Connection reset by peer)
12:11:08 pikipiki joins (~pikipiki@2a00:8a60:c000:1:3c66:5b32:c285:a7b7)
12:13:31 × pikipiki quits (~pikipiki@2a00:8a60:c000:1:3c66:5b32:c285:a7b7) (Read error: Connection reset by peer)
12:13:50 pikipiki joins (~pikipiki@dynamic-046-114-105-147.46.114.pool.telefonica.de)
12:13:52 × pikipiki quits (~pikipiki@dynamic-046-114-105-147.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
12:13:59 pikipiki joins (~pikipiki@2a00:8a60:c000:1:3c66:5b32:c285:a7b7)
12:17:36 Inst_ joins (~Inst@2601:6c4:4081:54f0:4d94:d8d8:7d2b:a18e)
12:18:42 cfricke joins (~cfricke@user/cfricke)
12:19:10 × ccapndave quits (~ccapndave@xcpe-62-167-164-99.cgn.res.adslplus.ch) (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:21:31 × Inst quits (~Inst@2601:6c4:4081:54f0:c4dc:214a:b41a:859d) (Ping timeout: 248 seconds)
12:22:30 × Inst_ quits (~Inst@2601:6c4:4081:54f0:4d94:d8d8:7d2b:a18e) (Ping timeout: 260 seconds)
12:25:19 ccapndave joins (~ccapndave@xcpe-62-167-164-99.cgn.res.adslplus.ch)
12:27:42 × pikipiki quits (~pikipiki@2a00:8a60:c000:1:3c66:5b32:c285:a7b7) (Quit: Quit)
12:27:55 × zephyr__ quits (~irfan@182.69.86.253) (Quit: leaving)
12:28:43 npm_i_kurbus joins (~npm_i_kur@user/kurbus)
12:29:27 lyle joins (~lyle@104.246.145.237)
12:34:39 mechap joins (~mechap@user/mechap)
12:37:52 × mechap_ quits (~mechap@user/mechap) (Ping timeout: 248 seconds)
12:45:57 × ix quits (~ix@213.205.192.69) (Ping timeout: 255 seconds)
12:53:35 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 255 seconds)
12:54:25 Inst joins (~Inst@2601:6c4:4081:54f0:a1f8:4ef8:3abb:c29)
12:54:35 <Inst> also
12:54:47 <Inst> why does the :: Eq a => [a] -> a exist?
12:55:09 <Inst> https://hackage.haskell.org/package/base-4.18.0.0/docs/GHC-Exts.html#v:the
12:56:07 <hellwolf[m]> ^^
12:56:08 <sm> yes Guest31, it's a useful prototyping/pseudo-code/type-annotating language
12:56:10 <Clinton[m]> Using servant, I've got a type like the following, but more complex:... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/f957189b01a55c43ed3532ac48be10aee38f124a>)
12:56:10 <jean-paul[m]> alloca() in C might overflow the stack. Can the alloca functions in Foreign.Marshal.Alloc? From the docs it sounds like no, but only by implication, not explicit statement.
12:56:10 <Jade[m]1> ¯\_(ツ)_/¯ might have some use-cases
12:57:22 <Jade[m]1> could imagine something like the . map (rem 2)
12:57:46 <Jade[m]1> * could imagine something like the . map (`rem` 2)
12:58:15 <Jade[m]1> But it does seem bad because it's partial
12:58:17 <Jade[m]1> s/partial/not total/
12:58:43 <Jade[m]1> would have preferred something like `(Eq a, Foldable t) => t a -> Maybe a`
13:00:05 <fbytez> Whats the difference between `pure` and `return`?
13:00:51 <int-e> history, `return` was there first
13:01:25 <fbytez> So they can be used interchangeably?
13:01:31 <merijn> fbytez: For lawful instances of pure/monad there should be no difference, yes
13:01:40 <merijn> applicative/monad, I mean
13:01:52 <int-e> `return` lives in the Monad class; `pure` lives in Applicative. First there was only Monad, then for some time, both classes existed side by side; now Applicative is a superclass of Monad and pure = return is one of the laws involved in that.
13:04:55 <fbytez> So, Applicative is like a "superset" of Monad in which `pure` can be used but `return` can not?
13:04:55 <Jade[m]1> always use pure over return - the latter is deprecated and should be implemented like return = pure
13:05:53 <fbytez> I think 'pure' is a nicer word to use, given the meaning of 'return' in most other languages.
13:05:57 <Jade[m]1> it's a supercöass
13:06:03 <Jade[m]1> * it's a superclass
13:06:20 <Jade[m]1> and yes
13:06:51 <merijn> fbytez: For some interpretations of superset, Applicative is a superset of Monad, yes
13:07:30 <merijn> (there's two perspectives, the operations allowed by Monad are a superset of those allowed by Applicative, but "things that are Applicative" is a superset of "things that are Monad")
13:07:36 <fbytez> I said 'superset' for my own clarity as I'm very new and am uncertain about type classes.
13:08:20 <merijn> fbytez: Just meaning you can think in terms of "sub-/superset of operations" and "sub-/superset of things that are instances" and those have inverted answers ;)
13:09:10 <fbytez> Yes, right, that's very clear. Thanks.
13:12:12 × vglfr quits (~vglfr@145.224.100.65) (Ping timeout: 268 seconds)
13:12:44 × emmanuelux quits (~emmanuelu@user/emmanuelux) (Quit: au revoir)
13:13:31 vglfr joins (~vglfr@145.224.100.240)
13:18:45 × npm_i_kurbus quits (~npm_i_kur@user/kurbus) (Quit: Client closed)
13:18:53 emmanuelux joins (~emmanuelu@user/emmanuelux)
13:19:25 L29Ah parts (~L29Ah@wikipedia/L29Ah) ()
13:19:30 jpds joins (~jpds@gateway/tor-sasl/jpds)
13:20:11 <fbytez> Would it be fair to consider Haskell "safer" than Rust due to it's runtime and IO Monad?
13:20:39 L29Ah joins (~L29Ah@wikipedia/L29Ah)
13:20:46 <fbytez> Perhaps it's age too.
13:21:15 <fbytez> s/it's/its/g
13:23:18 <int-e> nah
13:28:11 <fbytez> Why so? On par? Worse?
13:31:12 × emmanuelux quits (~emmanuelu@user/emmanuelux) (Quit: au revoir)
13:31:36 gurkenglas joins (~gurkengla@dynamic-046-114-176-216.46.114.pool.telefonica.de)
13:33:31 fnurglewitz joins (uid263868@id-263868.lymington.irccloud.com)
13:38:51 <Cale> Haskell code that's allowed to use IO can do basically anything. There might be some reason to consider it safer overall, but those aren't exactly reasons on their own.
13:41:33 <merijn> Hold on
13:41:41 <merijn> all these answers are nonsensical
13:41:49 <merijn> because you have not defined "safe"/"safer"
13:41:59 <Cale> Yeah, also true.
13:42:08 <merijn> Things are safe *with respect to some model of faults/correctness*
13:42:26 <merijn> It's why type safe is so misused by many people
13:42:42 <Cale> But even without getting into the details of what we mean, older languages are not generally speaking "safer" for any reasonable definition of the word.
13:42:46 <mauke> the "monad" part is irrelevant. IO is safe (or not) regardless of whether it implements the Monad interface
13:42:47 <merijn> "type-safety" = "well-typed code can't go wrong...with respect to our language's safety model"
13:43:08 <Cale> There might be some libraries one would trust more for being battle-tested, but the relative rarity of Haskell users counterbalances that a good bit. Though, when it comes to Rust specifically, it's hard to say. I wouldn't fully trust crypto libraries written in either language.
13:43:10 <mauke> also, I can segfault in Haskell, so :shrug:
13:43:18 <merijn> Cale: I mean, Rust is also allowed to do anything, so
13:43:26 <Cale> merijn: Of course
13:43:44 jero98772 joins (~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff)
13:43:56 <merijn> I would say neither is really considerably safer than the other
13:43:59 <Cale> The provided reasons were "its runtime", "IO monad" and "age".
13:44:25 <Cale> Some Haskell code might be safer than Rust code for *avoiding* use of the IO monad.
13:45:04 <dminuoso> 14:43:08 Cale | There might be some libraries one would trust more for being battle-tested, but the relative rarity of Haskell users counterbalances that a good bit. Though, when it comes to Rust specifically, it's hard to say. I wouldn't fully trust crypto libraries written in either language.
13:45:05 <mauke> (none of those prevent me from casting a random number to a pointer and writing to arbitrary memory)
13:45:27 <dminuoso> Cale: I think there's a misconception in that statement. Being memory safe does not imply you can trust a crypto library.
13:45:52 <Cale> dminuoso: I wasn't implying that
13:45:56 <fbytez> mauke, in Haskell? You can do that?
13:46:01 <merijn> fbytez: Sure
13:46:03 <merijn> Easily
13:46:07 <dminuoso> Cale: Fair.
13:46:10 <merijn> In, like 8 different ways :p
13:46:27 <Cale> I was implying that one might expect that older libraries are more trustworthy, because of a longer period of time available to find bugs.
13:46:32 <mauke> fbytez: https://hackage.haskell.org/package/base-4.18.0.0/docs/Foreign-Ptr.html
13:46:34 <merijn> % unsafeCoerce True :: Int -- I wonder if unsafeCoerce is allowed?
13:46:34 <yahb2> <interactive>:32:1: error: ; Variable not in scope: unsafeCoerce :: Bool -> Int
13:46:48 <merijn> % import Unsafe.Coerce
13:46:48 <yahb2> <no output>
13:47:02 <merijn> % unsafeCoerce True :: Int
13:47:02 <yahb2> -576460203687845904
13:47:04 <merijn> Nice
13:47:05 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
13:47:16 <lyxia> would you expect readFile :: FilePath -> IO Text to do newline conversion? I know the one in text does, but there's a proposal to have a locale independent variant and I'm wondering whether the lack of newline conversion could lead to bad surprises.
13:47:36 <merijn> lyxia: Almost all languages except C do that
13:47:40 <mauke> depends on whether I am a C programmer
13:47:42 <merijn> So, I kinda would
13:47:48 <mauke> uh, C started it
13:47:52 <mauke> C definitely does it
13:48:04 <merijn> Oh, then almost everything does :p
13:48:22 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
13:48:48 <merijn> fbytez: Haskell's reputation for safety and safety getting in the way of "getting things done" is mostly exaggeration by people who don't really know Haskell
13:49:05 <merijn> fbytez: GHC will gleefully hand you like a dozen different unsafe tools to do whatever you want
13:49:18 <mauke> C started out as a systems language for unix (for creating/porting unix, really), and initially its '\n' (newline) character was simply char 10 and treated literally
13:49:48 <mauke> when C got ported to other systems with other text conventions, people got creative
13:49:52 × lxi quits (~quassel@2a02:2f08:4d1c:400:c33f:394a:2177:e1a0) (Ping timeout: 248 seconds)
13:49:58 <Cale> lyxia: I would expect it to do whatever newline conversion was set up by the NewlineMode
13:50:06 <merijn> fbytez: Except unlike most other languages, most of those tools are pretty obviously unsafe and labelled as such and they WILL blow up in your face if you don't know what you're doing, unlike C where lots of unsafe things often "seem" to work without blowing up
13:50:07 <Cale> https://downloads.haskell.org/ghc/latest/docs/libraries/base-4.17.0.0/System-IO.html#v:hSetNewlineMode
13:50:19 <lyxia> Cale: readFile doesn't take a handle
13:50:46 <Cale> True, so you just get the default
13:50:48 <lyxia> but yeah that makes sense for the other functions that do
13:50:49 <merijn> lyxia: Either way, I consider readFile mostly a cute toy for quick and dirty prototypes/hacks and not a serious tool to begin with
13:50:53 <mauke> some systems simply use a different end-of-line marker (e.g. classic MacOS used char 13, DOS and later Windows used a combination of 13 10)
13:50:59 <dminuoso> merijn: I dont know what you mean. I _read_ Haskell every day, and it never unsafely performs IO. But I may have an incomplete view on patterns.
13:51:05 <mauke> only on Windows it is treated as a line *separator*
13:51:26 <merijn> dminuoso: hmm?
13:51:26 <dminuoso> merijn: My latest rage is improper IsString instances.
13:51:35 <dminuoso> Like `IsString IPv4` and some such
13:51:36 <mauke> but other systems have an entirely different concept of files
13:51:46 <merijn> dminuoso: Tell them to use validated-literals ;)
13:51:50 <dminuoso> Nah
13:51:52 <mauke> like, record-oriented files with structure, not just a random string of bytes
13:51:57 <merijn> Which reminds me...I need to update for GHC 9.6 and new template-haskell
13:51:59 <dminuoso> merijn: I ended up writing my own IP library
13:52:10 <dminuoso> `ipv4 127 0 0 01` is just as good as writing "127.0.0.1"
13:52:19 <Cale> . o O ( IsString Integer that parses Roman numerals )
13:52:27 <dminuoso> haha
13:52:31 <merijn> dminuoso: I've argued that IsString (and the other OverloadedX extensions) should work like validated-literals
13:52:53 <mauke> on those systems, a "text file" may be represented as, say, a sequence of 256 byte records, each of which stores a line of text
13:53:03 <merijn> But that idea was met with skepticism and useless. Until people 7 years later decided it should work more like that
13:53:09 <merijn> So, my take away is that I'm a visionary
13:53:23 <merijn> And my words should be heeded like those of a prophet
13:54:02 <mauke> so the C library abstracts files as follows: files can be opened in either "text mode" (the default) or "binary mode" (the "b" flag in fopen())
13:54:37 <mauke> in binary mode, bytes read and written are intended to go to disk as literally as possible
13:54:51 <mauke> ftell() and fseek() operate in byte offsets
13:55:27 <mauke> in text mode, the special '\n' character (whose value is implementation defined) indicates a virtual "end of line" and is translated to/from whatever on-disk representation the platform uses
13:56:09 <mauke> also, ftell() returns not byte offsets, but "file position cookies" whose value is meaningless except as argument to subsequent fseek() calls
13:56:09 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 255 seconds)
13:57:08 <mauke> on unix systems, no distinction is made between text/binary files. '\n' is 10 and nothing is translated
13:57:27 <mauke> on classic MacOS, '\n' is 13, but everything else is as with unix
13:57:57 <mauke> (this does mean that if you write e.g. an HTTP library, you have to be careful to terminate your lines with "\015\012", not "\r\n")
13:58:02 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
13:58:42 <mauke> on windows, '\n' is 10, but text files translate it to a CR-LF pair (13, 10) when writing
13:59:41 <mauke> TL;DR: C's "portable newline abstraction" is '\n', and anyone who uses std::endl is doing it wrong
13:59:52 cheater_ joins (~Username@user/cheater)
14:00:32 <fbytez> So what is `std::endl` doing?
14:00:52 <fbytez> From C++, right?
14:02:15 <mauke> handle << std::endl is defined to be equivalent to handle << '\n' << std::flush
14:02:19 × cheater quits (~Username@user/cheater) (Ping timeout: 248 seconds)
14:02:26 cheater_ is now known as cheater
14:02:36 <mauke> that is, it writes a single '\n' character and then flushes the stream
14:03:01 <mauke> which is non-obvious enough that you should simply use std::flush explicitly
14:03:08 <mauke> (in cases where you really need it, that is)
14:04:21 <lyxia> Cale: does "default" also mean "follow the locale"?
14:04:45 <merijn> lyxia: imo yes
14:05:57 <mauke> in Haskell there is the additional wrinkle that Char is specified as Unicode
14:06:11 thegeekinside joins (~thegeekin@189.141.115.134)
14:06:30 <mauke> so e.g. '\123' does not mean "character 123 in the platform charset" (whatever that is), it explicitly means '{'
14:06:31 <Cale> The default is nativeNewlineMode which does nothing on unix-like systems, but on Windows, translates \r\n to \n and back.
14:06:54 <mauke> and '\n' is defined as '\LF', which is defined as '\10'
14:07:00 <lyxia> I meant my last question more broadly, not just regarding newlines
14:07:05 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559)
14:07:34 <mauke> so I would assume that on EBCDIC systems a Haskell implementation would have to do full translation of every character read/written
14:07:44 <Cale> Text encoding otherwise follows the locale, but I don't know if there's information in the locale about how newlines are to be translated.
14:07:53 <lyxia> I think the motivation behind that proposal (not mine) is that some people disagree that locales are a reliable default.
14:09:16 <mauke> so in the words of MS Outlook: J
14:09:22 <merijn> lyxia: Yes, these people are stupid
14:09:35 × superbil quits (~superbil@1-34-176-171.hinet-ip.hinet.net) (Ping timeout: 268 seconds)
14:09:38 <lyxia> merijn: I knew you would say that
14:09:44 <merijn> There's a bunch of "anti-locale" radicalists in the Haskell community which argue "oh, everything should only work on UTF-8"
14:10:16 <merijn> But I fundamentally oppose the idea that Haskell programs should "stop working" when I run them on an otherwise properly configured machine with reasonable settings
14:10:53 <merijn> All my machines use utf-8 locales, but I don't see any good justification for "all Haskell programs should just break when someone has a machine set to use a utf-16 or other encoding locale"
14:11:04 <merijn> That just seems an insane point to argue in favour of
14:11:12 superbil joins (~superbil@1-34-176-171.hinet-ip.hinet.net)
14:11:39 <merijn> Should most people be using utf-8 locales? Probably. Is that a reason to break compatibility with 40+ years of unix expectations?
14:11:42 <mauke> oh, I guess I'm somewhat of a radicalist, then?
14:11:47 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559) (Ping timeout: 255 seconds)
14:12:04 <mauke> depends on how far you want to go with locales
14:13:28 <merijn> mauke: There are some people who argue that all the file operations should disregard the locales encoding and ONLY do utf-8 always.
14:14:23 <int-e> ...well, in the absence of file metadata specifying the encoding...
14:14:39 <lyxia> int-e: ... you read the locale?
14:14:41 <mauke> merijn: that's certainly a tempting option
14:14:43 <merijn> int-e: In the absence of file metadata "following the locale" is the only sensible option
14:15:02 <merijn> Because if you assume the systems is properly configured, that will be the right encoding
14:15:06 <int-e> I mean, what's the alternative, should scp/sftp/rsync recode files according to the locales?
14:15:13 <merijn> And if the system is NOT properly configured, then you're shit outta luck anyway
14:15:26 <mauke> merijn: how is it sensible to follow the system locale in this one aspect if everything else is ignored?
14:15:36 <merijn> int-e: If files don't follow the locale AND you don't know what they are from metadata, you'r fucked anyway
14:16:09 <mauke> for example, the show instance for numbers does not respect the locale and assumes US/UK conventions
14:16:09 <merijn> int-e: And if you know the encoding from metadata and it differs from the locale, there's already functions for accessing them
14:16:28 <merijn> mauke: Show specifically follows the Haskell syntax conventions
14:16:33 <merijn> (which happen to be US/UK)
14:16:34 <int-e> I think that there's no right default for text files in non-UTF-8 locales.
14:16:43 <int-e> Either way will cause trouble.
14:16:57 <merijn> int-e: the default is "what the system is configured to produce/expect"
14:16:59 × superbil quits (~superbil@1-34-176-171.hinet-ip.hinet.net) (Ping timeout: 268 seconds)
14:17:01 <mauke> merijn: yes
14:17:22 <merijn> int-e: If the locale is configured to something non-UTF8, how is that less valid than the locale being configured to utf-8?
14:17:29 <int-e> merijn: or the default is what is most portable across systems
14:17:31 int-e shrugs
14:17:42 <int-e> I said what I said and I believe it.
14:18:11 <merijn> int-e: it already falls back to utf8 for unknown locales as of recently
14:18:31 <mauke> from a practical standpoint, it is better to have simple and deterministic behavior
14:18:35 <merijn> int-e: If a locale is set, why would you disbelief it is set correctly?
14:19:00 <mauke> the alternative is to include encoding tables for every character set under the sun
14:19:12 <merijn> mauke: Why?
14:19:19 <int-e> merijn: Well, if it's not UTF-8 I'll stare at it in disbelief and wonder how the user survives.
14:19:26 <mauke> merijn: why which one?
14:19:46 <merijn> mauke: Why would you have to include encoding tables for everything? Can just produce an error for unknown
14:19:53 <int-e> (my sole locale setting is LC_CTYPE=en_US.UTF-8, been doing that for about 20 years, because all other charsets cause way too much friction.)
14:20:05 <merijn> int-e: Any form of utf-X seems reasonable and I don't know if something else might be reasonable for Asia
14:20:15 <mauke> merijn: OK, which ones do you include by default, then? :-)
14:20:41 <merijn> mauke: Certainly all the UTF ones, whatever the standard old windows one was. aka the ones we already include anyway
14:20:54 × vglfr quits (~vglfr@145.224.100.240) (Ping timeout: 255 seconds)
14:21:03 <mauke> there is no single "the standard" one for windows
14:21:14 <mauke> it was all country specific
14:21:43 <mauke> merijn: UTF-7? UTF-EBCDIC?
14:21:53 vglfr joins (~vglfr@145.224.100.65)
14:22:05 <mauke> (the latter is A Thing and Perl uses it)
14:22:15 <merijn> int-e: I don't know what people in Asia use, but who am I to say UTF-16 is "wrong" if you're dealing with exclusively SEA texts
14:22:18 <int-e> merijn: I really think that in an ideal world (not the one we live in, obviously), text files should carry their encoding as metadata. Tying it to a global locale in a world where we download stuff all the time is ridiculous.
14:22:57 <merijn> int-e: Of course it is ridiculous, but we gotta work with what we have
14:23:03 <int-e> The locale is kind of like a broken clock; maybe it's right more than twice a day even but it'll still be wrong *a lot*.
14:23:31 <merijn> And what we have is that all commandline tools assume the locale is correct and consume/produce that encoding
14:23:51 <merijn> int-e: Assuming utf-8 for everything has the same odds of being wrong for stuff downloaded in some arbitrary encoding
14:25:01 <mauke> now I'm tempted to find out if you can configure a UTF-7 or UTF-EBCDIC locale for linux
14:25:11 <mauke> and whether e.g. ls will respect it
14:35:23 <mauke> ... it looks like typical command-line tools "cheat" by just assuming ASCII
14:35:44 <merijn> ls is double fucked, of course
14:35:48 <mauke> and all the supported system locales on Debian that I can see are ASCII extensions in some way
14:35:57 <merijn> since on linux you can't assume everything about filenames either :p
14:37:25 <mauke> even stuff like Big5 is based on a "lead byte" with the high bit set, so any single byte in the range 00-7F can just be "passed through"
14:38:05 <merijn> at least there's one thing we can all agree on
14:38:36 <merijn> Whoever at microsoft decided to insert a "unicode byte order mark" ahead of UTF8 text should be tried for crimes against humanity
14:39:36 <lyxia> uhoh. How does base handle that?
14:40:21 <mauke> also the MS guy who decided to call the single-byte vendor-specific charset "ANSI"
14:40:23 <merijn> Well, from spending 3 hours debugging my girlfriend's first Haskell program I can tell you that aeson breaks horribly on it
14:40:39 <mauke> and the MS guy who decided to call UTF-16LE "UNICODE"
14:40:43 <merijn> Because apparently excel inserts said byte order mark when saving utf-8 CSV
14:40:56 <merijn> eh, not aeson
14:40:58 <merijn> cassava
14:41:02 <merijn> brainfart
14:41:19 <mauke> even worse, you need that UTF-8 "BOM" in CSV files intended for Excel
14:41:28 <mauke> otherwise it will probably get the Unicode wrong
14:43:28 ix joins (~ix@213.205.192.69)
14:48:48 shriekingnoise joins (~shrieking@186.137.175.87)
14:48:48 × ix quits (~ix@213.205.192.69) (Ping timeout: 255 seconds)
14:51:33 ix joins (~ix@213.205.192.69)
15:00:50 superbil joins (~superbil@1-34-176-171.hinet-ip.hinet.net)
15:02:32 chexum_ joins (~quassel@gateway/tor-sasl/chexum)
15:04:05 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 255 seconds)
15:07:39 <lyxia> I was on the fence at first but merijn you've changed my mind a bunch towards your side.
15:08:37 <merijn> \o/
15:08:48 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 246 seconds)
15:09:01 <lyxia> I'm always skeptical when an issue boils down to "learn to configure your system" because we all know users don't learn
15:09:04 × gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8)
15:10:41 <merijn> lyxia: Well, in the past GHC would default to ASCII only on systems with a broken locale (and then fail on unicode input), but recent GHC (everything in the 9.x series and maybe some earlier ones, iirc) default to UTF-8 instead of ascii when that happens
15:11:20 <merijn> So I would concede that accepting ascii only in case of failure is "probably the wrong default", but that has already been fixed :p
15:18:29 Sciencentistguy4 joins (~sciencent@hacksoc/ordinary-member)
15:19:17 pdw joins (~user@215.156.62.185.bridgefibre.net)
15:19:24 × Sciencentistguy quits (~sciencent@hacksoc/ordinary-member) (Ping timeout: 255 seconds)
15:19:24 Sciencentistguy4 is now known as Sciencentistguy
15:20:28 <pdw> Hello all. I've created a trivial project with the 'hashable' package (1.4.2.0) in its build-depends, and it fails to build on Windows using an integer-simple GHC 8.10.7 release.
15:20:30 <pdw> Searching has taught me that package flags are thing, so I've run 'cabal configure --constraint="hashable -integer-gmp"' and rebuilt, but that hasn't helped. Should that have worked, or am I missing something?
15:22:20 <tdammers> Age-old conflict between "don't be annoying" and "don't guess". Failing when the encoding cannot be reliably determined is sound, but also annoying; picking a best-guess encoding may be wrong, but is likely correct and won't annoy the user too much even when it's not.
15:22:27 <tdammers> See also XHTML Strict.
15:23:56 cheater_ joins (~Username@user/cheater)
15:23:56 × mrcsno_afk quits (~mrcsno@user/mrcsno) (Quit: WeeChat 3.5)
15:26:36 × masterbuilder quits (~masterbui@user/masterbuilder) (Ping timeout: 255 seconds)
15:26:44 masterbuilder joins (~masterbui@user/masterbuilder)
15:27:07 × cheater quits (~Username@user/cheater) (Ping timeout: 248 seconds)
15:27:10 cheater_ is now known as cheater
15:29:36 × ubert1 quits (~Thunderbi@p200300ecdf0c57b39b0cedad49907c5f.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
15:33:30 barzo joins (~barzo@176.55.97.55)
15:34:03 × masterbuilder quits (~masterbui@user/masterbuilder) (Ping timeout: 248 seconds)
15:35:06 × barzo quits (~barzo@176.55.97.55) (Remote host closed the connection)
15:36:09 masterbuilder joins (~masterbui@user/masterbuilder)
15:38:30 jumper149 parts (~jumper149@base.felixspringer.xyz) (WeeChat 3.8)
15:38:55 jumper149 joins (~jumper149@base.felixspringer.xyz)
15:39:05 razetime joins (~Thunderbi@117.193.1.99)
15:40:01 × razetime quits (~Thunderbi@117.193.1.99) (Client Quit)
15:40:26 L29Ah parts (~L29Ah@wikipedia/L29Ah) ()
15:43:04 mechap_ joins (~mechap@user/mechap)
15:44:27 L29Ah joins (~L29Ah@wikipedia/L29Ah)
15:44:43 × mechap quits (~mechap@user/mechap) (Ping timeout: 248 seconds)
15:45:23 Sgeo joins (~Sgeo@user/sgeo)
15:50:16 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.8)
15:51:07 × jumper149 quits (~jumper149@base.felixspringer.xyz) (Quit: WeeChat 3.8)
15:52:01 Everything joins (~Everythin@46.185.124.65)
15:59:20 irrgit_ joins (~irrgit@89.47.234.26)
16:03:10 × irrgit__ quits (~irrgit@146.70.27.242) (Ping timeout: 252 seconds)
16:12:10 <AWizzArd> For newtype Cont a = Cont { unCont :: forall r. (a -> r) -> r } I have this fmap implementation: fmap f (Cont c) = Cont (\b -> c (b . f))
16:12:14 <AWizzArd> Interestingly fmap f (Cont c) = Cont (\b -> b (c f)) also compiles.
16:15:21 × vglfr quits (~vglfr@145.224.100.65) (Ping timeout: 268 seconds)
16:15:49 shapr joins (~user@68.54.166.125)
16:16:11 vglfr joins (~vglfr@145.224.100.240)
16:16:30 × mbuf quits (~Shakthi@49.207.178.186) (Quit: Leaving)
16:17:50 <Hecate> teo: would I be able to use your shortstraw tool to produce a trace for the compilation time of Flora? Or do you think it's too early to experiment with it?
16:18:19 × Square2 quits (~Square4@user/square) (Ping timeout: 248 seconds)
16:20:01 <geekosaur> AWizzArd, monochrom pointed out that they're actually the same thing, last time you mentioned this
16:20:27 × vglfr quits (~vglfr@145.224.100.240) (Ping timeout: 248 seconds)
16:20:53 cheater_ joins (~Username@user/cheater)
16:21:27 vglfr joins (~vglfr@145.224.100.65)
16:23:05 <geekosaur> Feb 28 00:01:27 <monochrom> AWizzArd: Something about parametricity or Yoneda's lemma says that they do the same thing, too!
16:23:13 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:cdff:bbec:88eb:b8a) (Quit: WeeChat 2.8)
16:23:49 <geekosaur> (if it's Yoneda, prepare to get your head twisted even harder than Cont does…)
16:24:12 × cheater quits (~Username@user/cheater) (Ping timeout: 252 seconds)
16:24:19 cheater_ is now known as cheater
16:24:53 <int-e> Well, mostly the same... the second one is a bit lazier.
16:26:47 <AWizzArd> geekosaur: I must have missed it.
16:27:02 <AWizzArd> monochrom: belated thanks :-)
16:27:06 <int-e> @free c :: (a -> r) -> r
16:27:06 <lambdabot> g . h = k . f => g (c h) = c k
16:27:28 <int-e> Hmm, dubious, what's happening to the `f` here?
16:28:47 × irrgit_ quits (~irrgit@89.47.234.26) (Read error: Connection reset by peer)
16:29:07 <AWizzArd> To be honest, I can't see why those two are the same.
16:29:08 <int-e> I guess it's a bug; it would work for g . h = k.
16:29:08 <[Leary]> @free c :: (A -> r) -> r
16:29:08 <lambdabot> f . c = c . (.) f
16:30:14 <int-e> (Or, possibly, the fact that types are omitted in @free? f :: forall a. a -> a would restrict f sufficiently.)
16:30:37 <int-e> [Leary]: yeah that's better
16:31:32 <monochrom> AWizzArd: Let's say parametricity (free theorems). After a few steps, we conclude that if you give me a value (Cont c), then c id contains all the information. Equivalently, we can reverse engineer: c = \k -> k (c id)
16:31:41 <[Leary]> @free c :: a
16:31:41 <lambdabot> f c = c
16:32:18 <[Leary]> I guess f is redundant when you have, in effect, `forall a. a`.
16:32:27 <monochrom> A corollary I'll use is: if you give me two values (Cont c) and (Cont c'), and ask whether they're the same, then I can use: c=c' iff c id = c' id.
16:32:56 <int-e> [Leary]: Oh, right.
16:32:58 <monochrom> So now just check that (\b -> c (b . f)) id = (\b -> b (c f)) id.
16:33:23 × ccapndave quits (~ccapndave@xcpe-62-167-164-99.cgn.res.adslplus.ch) (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:35:35 × gentauro quits (~gentauro@user/gentauro) (Ping timeout: 246 seconds)
16:42:16 × lyle quits (~lyle@104.246.145.237) (Quit: WeeChat 3.8)
16:42:28 × mei quits (~mei@user/mei) (Remote host closed the connection)
16:42:38 gentauro joins (~gentauro@user/gentauro)
16:46:50 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559)
16:50:28 × sadmax quits (~user@64.130.91.66) (Ping timeout: 252 seconds)
16:50:51 mei joins (~mei@user/mei)
16:52:24 jtomas joins (~user@81.172.17.107.dyn.user.ono.com)
16:57:33 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
16:59:54 <ncf> c (b . f) = b (c f) = b (f (c id))
17:00:05 <ncf> we even have three possible definitions!
17:02:07 × cheater quits (~Username@user/cheater) (Quit: Going offline, see ya! (www.adiirc.com))
17:02:30 gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
17:04:25 × mei quits (~mei@user/mei) (Quit: mei)
17:05:59 mei joins (~mei@user/mei)
17:06:40 × kuribas quits (~user@ip-188-118-57-242.reverse.destiny.be) (Read error: Connection reset by peer)
17:08:31 × jtomas quits (~user@81.172.17.107.dyn.user.ono.com) (Ping timeout: 246 seconds)
17:09:48 tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net)
17:11:06 azimut joins (~azimut@gateway/tor-sasl/azimut)
17:11:16 cheater joins (~Username@user/cheater)
17:11:31 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559) (Remote host closed the connection)
17:11:35 hiredman joins (~hiredman@frontier1.downey.family)
17:17:42 polyphem_ joins (~rod@2a02:810d:840:8754:da48:4c29:8382:1f9b)
17:19:07 × Everything quits (~Everythin@46.185.124.65) (Quit: leaving)
17:22:18 azimut_ joins (~azimut@gateway/tor-sasl/azimut)
17:23:08 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
17:23:11 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559)
17:25:24 × mei quits (~mei@user/mei) (Ping timeout: 255 seconds)
17:25:39 × ix quits (~ix@213.205.192.69) (Ping timeout: 268 seconds)
17:27:20 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
17:32:07 × cheater quits (~Username@user/cheater) (Quit: Going offline, see ya! (www.adiirc.com))
17:33:39 ix joins (~ix@213.205.192.69)
17:34:32 × fnurglewitz quits (uid263868@id-263868.lymington.irccloud.com) (Quit: Connection closed for inactivity)
17:36:37 econo joins (uid147250@user/econo)
17:37:16 × ddellacosta quits (~ddellacos@146.70.166.10) (Quit: WeeChat 3.8)
17:38:55 ddellacosta joins (~ddellacos@146.70.166.10)
17:43:12 Fischmiep joins (~Fischmiep@user/Fischmiep)
17:45:34 mei joins (~mei@user/mei)
17:46:20 cheater joins (~Username@user/cheater)
17:52:00 gensyst joins (gensyst@user/gensyst)
17:52:26 <gensyst> Hi, will stuff like this work for global variables? https://dpaste.com/4LKER738V I.e. can the global be dependent on something (in this case Int)?
17:52:44 <dsal> gensyst: What are you doing? That seems like a terrible idea.
17:52:44 <gensyst> so if I already grabbed a global for 3, will the next time I grab it for 3 be the exact same thing?
17:52:55 <gensyst> dsal, i know it's a hack that i must remove soon
17:53:00 <gensyst> just wondering if this will work for now
17:53:08 <gensyst> soon(TM)
17:54:04 <dsal> It's not really clear what you mean to do there. It's creating an IORef and then reading it each time.
17:54:39 <gensyst> it's not the best example. imagine the Int in the IORef is a more complex object
17:54:50 <dsal> If you wanted it to actually behave like a global variable, you'd only ever create one IORef and make it accessible.
17:55:06 <dsal> It doesn't matter how complex it is. If you make it every time you access it, that's the same as not using IO at all.
17:55:08 <gensyst> dsal, yes... i want one *for each int*
17:55:35 <geekosaur> you can't have a parameter
17:55:50 <geekosaur> it no longer behaves like a global if you do
17:55:57 <gensyst> ok good to know lol
17:56:06 <gensyst> gotta bite the bullet and fix this mess (should have been done ages ago)
17:56:17 <dsal> You could have an IORef Map, but yeah, Doing It Right is a better idea.
17:56:23 <gensyst> oh... i guess ic ould hack it with a Map?
17:56:27 <gensyst> Map Int ComplexObject
17:56:27 × MajorBiscuit quits (~MajorBisc@c-001-030-044.client.tudelft.eduvpn.nl) (Ping timeout: 248 seconds)
17:56:55 <gensyst> no that won't help
17:58:58 cheater_ joins (~Username@user/cheater)
17:59:52 <monochrom> Map Int (IORef XXX)
18:01:11 <monochrom> You were basically hoping that your _foo would be memoized. But that hope was misplaced.
18:01:51 × cheater quits (~Username@user/cheater) (Ping timeout: 255 seconds)
18:01:54 cheater_ is now known as cheater
18:03:15 mmhat joins (~mmh@p200300f1c7095e7aee086bfffe095315.dip0.t-ipconnect.de)
18:03:27 × mmhat quits (~mmh@p200300f1c7095e7aee086bfffe095315.dip0.t-ipconnect.de) (Client Quit)
18:05:26 × ddellacosta quits (~ddellacos@146.70.166.10) (Quit: WeeChat 3.8)
18:05:43 ddellacosta joins (~ddellacos@146.70.166.10)
18:06:22 segfaultfizzbuzz joins (~segfaultf@12.172.217.142)
18:06:30 <segfaultfizzbuzz> is there a finite or infinite number of types?
18:07:32 <ddellacosta> yes?
18:08:12 <monochrom> Can you try constructing an infinite bunch of types?
18:08:13 <segfaultfizzbuzz> well either the number of types which "exist" are either finite or infinite
18:08:22 <mauke> every number is finite
18:08:23 <segfaultfizzbuzz> a related question is, can an automated system "discover" a type?
18:08:44 <monochrom> Can you name a language that does automatic type inference?
18:09:05 <segfaultfizzbuzz> that is to say, are there things i can check about something (not sure what the thing is or how the checking works) which can "objectively" determine whether that thing is a type
18:09:41 <monochrom> Can you name a compiler that says "syntax error" whenever you write an illegal type expression?
18:09:55 <mauke> yes: const "syntax error"
18:10:16 <segfaultfizzbuzz> monochrom: i mean type inference is common but you need to have uh, "source types" or something defined by a human which can be used to determine the "destination types"
18:10:30 <monochrom> s/human/compiler/
18:11:30 <segfaultfizzbuzz> let's say i have an infinite String --can a system "discover" types within the String and parse them automatically?
18:12:15 <geekosaur> that's just a modified compiler
18:12:38 <segfaultfizzbuzz> does "type" mean: "invariants which appear to always be true empirically, or which a human has mandated always be true"?
18:12:44 <monochrom> for i=0 to oo { for j=i to oo { ask the compiler whether s[i..j] is a legal type expression } }
18:13:09 <mauke> Have you ever had a dream that you, um, you had, your, you- you could, you’ll do, you- you wants, you, you could do so, you- you’ll do, you could- you, you want, you want him to do you so much you could do anything?
18:13:29 <segfaultfizzbuzz> haha ok i guess i will stop. i'm trying to understand what a type is
18:13:34 <monochrom> "type" means: The Haskell2010 Report says it's a type expression.
18:14:47 <segfaultfizzbuzz> monochrom: i guess you are saying that a type is simply a tag exposed to the compiler and beyond that the compiler decides what i means...?
18:14:54 <segfaultfizzbuzz> what it means
18:14:58 <monochrom> No.
18:15:17 <dsal> segfaultfizzbuzz: a String is a type alias for a list of characters. The only types you'll find within a String are either the List * or the Char (depending on how you look at it)
18:15:36 × gurkenglas quits (~gurkengla@dynamic-046-114-176-216.46.114.pool.telefonica.de) (Ping timeout: 268 seconds)
18:15:36 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559) (Remote host closed the connection)
18:15:43 × ix quits (~ix@213.205.192.69) (Ping timeout: 252 seconds)
18:15:52 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559)
18:16:20 <dsal> I assume there's a practical limit to how many types you can have in a program compiled by GHC.
18:16:50 <segfaultfizzbuzz> i will try one last time... an alien lands and can only see your RAM, and thinks you are lying about the types your data has. how does the alien verify that some stuff in RAM has a certain type?
18:17:08 <mauke> what does that even mean?
18:17:17 <geekosaur> dsal, I believe that limit is set by available memory
18:17:52 <segfaultfizzbuzz> data Pet = Cat | Dog | None
18:18:07 <segfaultfizzbuzz> i have observed twenty people, and all people i have observed have a pet cat, a pet dog, or no pet
18:18:09 <mauke> types are assigned to expressions in the source code
18:18:24 <segfaultfizzbuzz> and therefore i have created a type which allows me to specify the "pet type"
18:18:39 <segfaultfizzbuzz> however empirically, this is a "wrong type" because if i learn about more people
18:18:42 <geekosaur> my mom had a pet turtle. how does your alien deal with that?
18:18:47 <segfaultfizzbuzz> i will discover that there also are pet turtles, pet parrots, etc
18:19:06 <segfaultfizzbuzz> geekosaur: the alien falsifies the type
18:19:16 <segfaultfizzbuzz> so it is a "wrong" type, and the type is "empirically wrong"
18:19:20 <mauke> ok, so you've modeled the problem wrong
18:19:29 <mauke> "wrong"
18:19:47 <segfaultfizzbuzz> so a human (me) defined a type (Pet) based on some empirical observation (20 people)
18:19:49 <mauke> doesn't mean the type is wrong
18:20:19 <segfaultfizzbuzz> at the very least the type would need to be data CorrectPet = Cat | Dog | None | Other
18:20:41 <mauke> or I could classify parrots as Cat
18:20:45 <segfaultfizzbuzz> lol
18:21:37 <segfaultfizzbuzz> https://www.youtube.com/watch?v=B-eeNvUEGDk
18:22:26 <segfaultfizzbuzz> anyway, the common assumption is that as the human (programmer) i am inputting this type information
18:22:35 <geekosaur> unless the circumstances dictate that only cats and dogs are tracked, so None is the correct answer for other pets
18:22:50 <geekosaur> (and yes, I can think of such circumstances)
18:23:05 <geekosaur> (I'm not sure an alien would care about them though)
18:23:10 <segfaultfizzbuzz> and in many circumstances (but not all) the type information comes from some kind of empirical situation
18:23:18 <monochrom> No no, I wonder if polymorphic recursion (data X a = Nil | P (X [a])) allows unboundedly many types to exist in a program (grow with time) without needing unbounded memory because 1. compile just checks base cases and inductive cases, 2. type erasure, so not in the exe.
18:23:37 <monochrom> s/compile/compiler/
18:24:14 <segfaultfizzbuzz> put another way, how would i make a "unit test for types"
18:24:39 <mauke> the type is just Pet
18:24:45 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
18:24:56 <mauke> Cat is a data constructor
18:25:14 <segfaultfizzbuzz> right
18:26:02 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
18:26:40 <segfaultfizzbuzz> i will ask this another way: how many types are there on wikipedia, whether explicitly defined in a computer program or implicitly defined (such as listing a bunch of city names, the city name itself being a type)?
18:27:07 <monochrom> I don't understand the question.
18:27:24 <mauke> segfaultfizzbuzz: can you give me an example of an expression of type Los Angeles?
18:27:40 <segfaultfizzbuzz> Los Angeles is not a type (i think?) but CityName is a type
18:28:25 <segfaultfizzbuzz> CityName is not explicitly defined on wikipedia--we will suppose that there is no source code on wikipedia which defines a type system for information about cities
18:28:48 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
18:29:06 <segfaultfizzbuzz> however hypothetically i might be able to feed wikipedia to a computer program, and that computer program could discover a CityName type, in principle
18:30:00 <mauke> take a bucket of seawater. how many sets are there in that bucket?
18:30:05 <segfaultfizzbuzz> lol
18:30:06 <monochrom> You start with what you want types for, then that reason drives what you consider to be types.
18:31:06 <segfaultfizzbuzz> so automated systems cannot discover types?
18:31:10 × talismanick quits (~talismani@2601:200:c000:f7a0::5321) (Ping timeout: 260 seconds)
18:31:26 <monochrom> I wouldn't say that.
18:31:47 <segfaultfizzbuzz> that is to say, humans are uniquely priviledged in being capable of identifying types?
18:32:25 <monochrom> I don't make the leap of faith from "you need to have a reason/purpose" to "you need to be human".
18:32:36 <monochrom> or "you need to be non-machine" for that matter
18:32:48 <mauke> can automated systems discover pet names? or are humans uniquely privileged in being capable of identifying pets' names?
18:33:03 <segfaultfizzbuzz> ok, so then it seems that we agree that there should be, at the least, some heuristics, and maybe some rigid rules, for defining when we empirically encounter a type
18:34:33 <monochrom> It is really no different if you s/types/programs/ or s/types/axioms/ or s/types/nouns/ or s/types/verbs/ or ...
18:35:27 <mauke> or sets
18:35:36 <mauke> which you empirically encounter in a bucket of seawater
18:35:37 × jwiegley quits (~jwiegley@76-234-69-149.lightspeed.frokca.sbcglobal.net) (Quit: ZNC - http://znc.in)
18:35:37 × johnw quits (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) (Quit: ZNC - http://znc.in)
18:37:45 <segfaultfizzbuzz> lol
18:39:30 <mauke> OO is the most natural way to write programs because the real world naturally decomposes into classes and subclasses of objects
18:39:34 <segfaultfizzbuzz> a relevant quote might be: "walks like a type, quacks like a type, what are walk and quack?"
18:40:55 × superbil quits (~superbil@1-34-176-171.hinet-ip.hinet.net) (Ping timeout: 268 seconds)
18:41:03 <geekosaur> an AI could well define its own types. there's no guarantee they'd look like ours. because a type describes (part of) a problem domain, and the problem is specified by the specifier, whether that be human, alien, AI, whatever
18:41:19 superbil joins (~superbil@1-34-176-171.hinet-ip.hinet.net)
18:41:32 <geekosaur> or even animals, although they're not generally solving as complex problems (we think)
18:41:46 swan joins (~swan@209.133.79.6)
18:41:54 swan is now known as Swan1000
18:43:32 zeenk joins (~zeenk@2a02:2f04:a20d:f900::7fe)
18:44:03 <segfaultfizzbuzz> bbiab i will read the logs
18:44:06 × segfaultfizzbuzz quits (~segfaultf@12.172.217.142) (Quit: segfaultfizzbuzz)
18:48:55 × Inst quits (~Inst@2601:6c4:4081:54f0:a1f8:4ef8:3abb:c29) (Read error: Connection reset by peer)
18:49:17 Inst joins (~Inst@2601:6c4:4081:54f0:a1f8:4ef8:3abb:c29)
18:51:54 lbseale joins (~quassel@user/ep1ctetus)
18:51:54 × lbseale quits (~quassel@user/ep1ctetus) (Client Quit)
18:54:18 lbseale joins (~quassel@user/ep1ctetus)
18:55:21 × lbseale quits (~quassel@user/ep1ctetus) (Client Quit)
18:56:29 lbseale joins (~quassel@user/ep1ctetus)
19:01:33 × gensyst quits (gensyst@user/gensyst) (Quit: Leaving)
19:01:44 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
19:02:18 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
19:08:52 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559) (Remote host closed the connection)
19:14:15 × lbseale quits (~quassel@user/ep1ctetus) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
19:15:24 lbseale joins (~quassel@user/ep1ctetus)
19:16:59 × polyphem_ quits (~rod@2a02:810d:840:8754:da48:4c29:8382:1f9b) (Ping timeout: 248 seconds)
19:17:59 polyphem_ joins (~rod@2a02:810d:840:8754:224e:f6ff:fe5e:bc17)
19:20:53 × pdw quits (~user@215.156.62.185.bridgefibre.net) (Quit: ERC (IRC client for Emacs 26.3))
19:26:23 wootehfoot joins (~wootehfoo@user/wootehfoot)
19:26:41 <krei-se> @geekosaur as far as i understood from d2l AI has no idea about types, its "just" complex n-dimensional functions.
19:26:41 <lambdabot> Unknown command, try @list
19:26:59 <krei-se> geekosaur: as far as i understood from d2l AI has no idea about types, its "just" complex n-dimensional functions.
19:27:33 <geekosaur> segfaultfizzbuzz has some odd notions of how things work
19:27:46 <krei-se> we all start somewhere
19:29:52 × Swan1000 quits (~swan@209.133.79.6) (Quit: Client closed)
19:30:19 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 248 seconds)
19:31:42 <geekosaur> in any case, my point still stands: what constitutes a type is not determined by the reader but by the writer
19:34:03 <krei-se> i see. So if you take a stand from a self-learning solution-finder like an AI you would take the types you find in a specific domain and work from there into composable functions?
19:36:45 <stefan-_> geekosaur, it could also be determined by a community, i.e. a "shared conceptualization" (-> ontology)
19:41:15 CiaoSen joins (~Jura@p200300c9570e91002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
19:42:43 ft joins (~ft@p3e9bc443.dip0.t-ipconnect.de)
19:43:22 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559)
19:45:17 <geekosaur> stefan-_, absolutely. consider that "Leslie" changed from a male name to a female one in the West recently enough that there are still males around with that name
19:50:19 gok joins (~gok@c-71-205-240-222.hsd1.co.comcast.net)
19:50:26 Lycurgus joins (~juan@user/Lycurgus)
19:51:52 mastarija joins (~mastarija@188.252.198.44)
19:52:32 <mastarija> Is there a lens like `last` that focuses on the last element of a list / structure?
19:54:08 × son0p quits (~ff@181.136.122.143) (Ping timeout: 248 seconds)
19:55:39 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
19:56:24 <mastarija> Is there a nice way to focus on the last element of a list using lenses?
19:56:47 <mastarija> I could use `ix (length xs - 1)` but that seems like wasted effort
19:56:51 <lyxia> https://hackage.haskell.org/package/lens-5.2.1/docs/Control-Lens-Lens.html#v:last1
19:56:56 <lyxia> https://hackage.haskell.org/package/lens-5.2.1/docs/Control-Lens-Fold.html#v:lastOf
19:57:02 codaraxis joins (~codaraxis@user/codaraxis)
19:57:17 <mastarija> thx lyxia , don't know how I've missed those
19:57:18 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
19:57:31 × chomwitt quits (~chomwitt@2a02:587:7a18:6d00:1ac0:4dff:fedb:a3f1) (Ping timeout: 248 seconds)
20:00:05 dsrt^ joins (~dsrt@c-24-30-76-89.hsd1.ga.comcast.net)
20:00:19 waleee joins (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7)
20:01:48 <mastarija> On second thought, how do I use this? `xs & last1 .~ 10` doesn't appear to be working
20:03:26 <mauke> what type is xs?
20:03:56 <dminuoso> @let import qualified Data.NonEmpty as NE
20:03:57 <lambdabot> /sandbox/tmp/.L.hs:109:1: error:
20:03:57 <lambdabot> Could not find module ‘Data.NonEmpty’
20:03:57 <lambdabot> Use -v (or `:set -v` in ghci) to see a list of the files searched for.
20:04:01 <dminuoso> @let import qualified Data.List.NonEmpty as NE
20:04:03 <lambdabot> Defined.
20:04:16 <dminuoso> > 1 :| [2,3,4] & last1 .~ 10
20:04:17 <lambdabot> 1 :| [2,3,10]
20:04:26 × ormaaj quits (~ormaaj@user/ormaaj) (Quit: Reconnecting)
20:04:42 ormaaj joins (~ormaaj@user/ormaaj)
20:05:01 <mauke> > liftA2 (:|) head tail [1,2,3,4] & last1 .~ 10
20:05:04 <lambdabot> 1 :| [2,3,10]
20:05:27 <dminuoso> :t NE.fromList
20:05:29 <lambdabot> [a] -> NonEmpty a
20:05:40 <dminuoso> That's probably a bit easier on the eyes
20:06:45 <mauke> yes, but it doesn't show a call stack on error
20:06:58 <mastarija> dminuoso: it's just a list of something
20:07:00 <dminuoso> fromList :: HasCallStack => [a] -> NonEmpty a
20:07:02 <mauke> plus (:|) looks like a monkey
20:07:07 <dminuoso> mauke: Looks like it does, to me
20:07:34 <mauke> https://hackage.haskell.org/package/base-4.16.3.0/docs/src/Data.List.NonEmpty.html#fromList
20:07:45 <dminuoso> Oh.
20:07:56 <dminuoso> That's 4.16.3
20:08:14 <mastarija> Does `last1` not work on simple list `[a]`?
20:08:16 <dminuoso> Guess that changed in 9.6
20:08:23 <dminuoso> mastarija: Correct, observe the type signature
20:08:29 <dminuoso> last1 :: Traversable1 t => Lens' (t a) a
20:08:35 <mastarija> Aha...
20:08:39 <dminuoso> It requires `t` (your [a]) to satisfy Traversable1
20:08:44 <mastarija> `Traversable1`, not `Traversable`
20:08:47 <dminuoso> Right.
20:09:07 <dminuoso> mastarija: Hence going through NonEmpty in the examples above
20:09:07 <mastarija> I mean, can't we have `last` that will simply do nothing on empty list?
20:09:30 <dminuoso> Well you could have an (affine) traversal, but not a lens.
20:10:43 <mastarija> Is there such a utility?
20:12:14 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559) (Remote host closed the connection)
20:21:48 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 255 seconds)
20:24:00 Albina_Pavlovna joins (~Albina_Pa@cpe-66-65-40-132.nyc.res.rr.com)
20:29:37 <ncf> last1 maybe
20:29:47 × Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt: personae.ai-integration.biz)
20:30:21 <ncf> hmm that's a lens
20:30:56 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
20:31:19 pavonia joins (~user@user/siracusa)
20:31:37 <geekosaur> :t lastOf
20:31:38 <lambdabot> Getting (Rightmost a) s a -> s -> Maybe a
20:32:10 <ncf> i guess such a traversal would be non-trivial to implement
20:32:39 <ncf> in terms of Traversable at least
20:35:35 × pwntips quits (~user@24-113-98-114.wavecable.com) (Ping timeout: 268 seconds)
20:36:12 × trev quits (~trev@user/trev) (Remote host closed the connection)
20:38:26 <ncf> hm. maybe something like \ f -> fmap getReverse . taking 1 f . Reverse
20:38:45 × hgolden_ quits (~hgolden@cpe-172-251-233-141.socal.res.rr.com) (Remote host closed the connection)
20:39:44 × zeenk quits (~zeenk@2a02:2f04:a20d:f900::7fe) (Quit: Konversation terminated!)
20:42:30 <ncf> @let lastT f = fmap getReverse . taking 1 traverse f . Reverse
20:42:31 <lambdabot> /sandbox/tmp/.L.hs:167:1: error: [-Woverlapping-patterns, -Werror=overlappin...
20:42:31 <lambdabot> Pattern match is redundant
20:42:31 <lambdabot> In an equation for ‘lastT’: lastT f = ...
20:42:42 <ncf> (i defined that in PM)
20:42:46 <ncf> > "hi" & lastT %~ succ
20:42:48 <lambdabot> "hj"
20:42:49 <ncf> > "" & lastT %~ succ
20:42:50 <lambdabot> ""
20:48:34 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
20:48:58 × mei quits (~mei@user/mei) (Remote host closed the connection)
20:51:22 mei joins (~mei@user/mei)
20:52:59 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 248 seconds)
20:54:43 stef204 joins (~stef204@user/stef204)
20:58:02 talismanick joins (~talismani@campus-107-253.ucdavis.edu)
20:59:14 × stef204 quits (~stef204@user/stef204) (Client Quit)
21:01:34 a_coll joins (~acoll@45.92.120.189)
21:03:55 NiceBird joins (~NiceBird@185.133.111.196)
21:04:48 juri__ is now known as juri_
21:06:04 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
21:12:43 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559)
21:14:00 × thegeekinside quits (~thegeekin@189.141.115.134) (Ping timeout: 255 seconds)
21:14:19 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 248 seconds)
21:16:59 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559) (Ping timeout: 248 seconds)
21:22:49 × lambdabot quits (~lambdabot@haskell/bot/lambdabot) (Remote host closed the connection)
21:25:03 zeenk joins (~zeenk@2a02:2f04:a20d:f900::7fe)
21:26:15 szkl joins (uid110435@id-110435.uxbridge.irccloud.com)
21:30:57 × gok quits (~gok@c-71-205-240-222.hsd1.co.comcast.net) (Quit: Client closed)
21:35:30 × talismanick quits (~talismani@campus-107-253.ucdavis.edu) (Ping timeout: 260 seconds)
21:37:11 Lumia joins (~Lumia@user/Lumia)
21:37:51 × _xor quits (~xor@72.49.195.228) (Ping timeout: 255 seconds)
21:39:05 _xor joins (~xor@72.49.195.228)
21:40:09 × Albina_Pavlovna quits (~Albina_Pa@cpe-66-65-40-132.nyc.res.rr.com) (Quit: ZZZzzz…)
21:40:39 Albina_Pavlovna joins (~Albina_Pa@cpe-66-65-40-132.nyc.res.rr.com)
21:44:26 × shapr quits (~user@68.54.166.125) (Remote host closed the connection)
21:46:37 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
21:50:46 × CiaoSen quits (~Jura@p200300c9570e91002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
21:54:38 johnw joins (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net)
21:55:08 jwiegley joins (~jwiegley@76-234-69-149.lightspeed.frokca.sbcglobal.net)
21:56:03 thegeekinside joins (~thegeekin@189.141.115.134)
22:04:14 son0p joins (~ff@181.136.122.143)
22:04:40 segfaultfizzbuzz joins (~segfaultf@12.172.217.142)
22:05:47 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
22:06:41 × Albina_Pavlovna quits (~Albina_Pa@cpe-66-65-40-132.nyc.res.rr.com) (Quit: ZZZzzz…)
22:10:11 Albina_Pavlovna joins (~Albina_Pa@cpe-66-65-40-132.nyc.res.rr.com)
22:11:14 × dolio quits (~dolio@130.44.134.54) (Quit: ZNC 1.8.2 - https://znc.in)
22:12:21 <mastarija> what's the difference between an `IndexedTraversal` and something like `Index m -> Traversal' m (IxValue m)`?
22:17:34 Tuplanolla joins (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi)
22:19:41 × gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8)
22:20:00 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
22:20:10 dolio joins (~dolio@130.44.134.54)
22:20:11 × bgs quits (~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection)
22:20:25 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds)
22:21:04 janus joins (janus@anubis.0x90.dk)
22:21:41 <janus> I found documentation of the _ccall_ FFI old GHC's use! https://web.archive.org/web/20020625130011/http://www.ki.informatik.uni-frankfurt.de/doc/html/ghc-2.10/user.html#SEC69
22:23:06 × michalz quits (~michalz@185.246.204.126) (Remote host closed the connection)
22:23:41 lambdabot joins (~lambdabot@silicon.int-e.eu)
22:23:41 × lambdabot quits (~lambdabot@silicon.int-e.eu) (Changing host)
22:23:41 lambdabot joins (~lambdabot@haskell/bot/lambdabot)
22:27:19 mrcsno joins (~mrcsno@user/mrcsno)
22:29:40 × segfaultfizzbuzz quits (~segfaultf@12.172.217.142) (Ping timeout: 268 seconds)
22:30:06 <monochrom> 2.10 that's old
22:31:02 <monochrom> And casm...
22:32:08 pwntips joins (~user@24-113-98-114.wavecable.com)
22:37:39 <janus> trying to bootstrap and I have made some progress getting GHC 0.29 to compile on NHC98
22:37:52 <janus> but GHC 3 needs GHC 2.10 to compile and I don't know where to get the sources
22:38:21 <janus> I wrote an sysadmin at the University of Glasgow an email, asking if they have backups of their ftp server
22:38:52 <janus> If somebody has it, please let me know...
22:41:07 <janus> Also wrote the University of Warsaw since this listing suggests they had it backed up: https://www.ftpstatus.com/site_directories.php?name=ftp.mimuw.edu.pl
22:41:33 <janus> if they mirrored it at the University of Warsaw, surely enough people mirrored it, there must be a copy somewhere
22:42:26 <janus> Also discovered that there is an even older release than 0.29 available at discmaster! 0.16 http://discmaster.textfiles.com/browse/951/LANGUAGE%20OS.iso/haskell/glasgow/ghc-src.lha
22:43:23 <janus> the sources of 0.29 suggest that it was supposed to work with multiple compilers though, so not sure 0.16 buys us a lot since it looks like it is only supposed to compile on HBC
22:43:59 <janus> but it is good to know that we actually have a release of GHC that isn't self-hosting
22:44:47 <janus> the University of Warsaw also has a backup of Chalmers, so maybe the LML compiler can be recovered? Then HBC could be compiled https://github.com/haskell-implementations/hbc
22:45:42 <mauke> janus: https://github.com/ghc/ghc/tree/6df3befbd269355a600a16c69468025cd2c793aa ?
22:46:22 <janus> oh cool, of course! thanks mauke
22:47:05 <janus> will post your link at https://gitlab.haskell.org/ghc/homepage/-/issues/8
22:47:20 <janus> do you want credit?
22:48:41 <mauke> ... credit for clicking around on github? :-)
22:48:50 <janus> sure sure, credit is cheap :P
22:49:05 <mauke> ok then :-)
22:49:47 <mauke> note that the commit is approximate; I was just looking for something that updated the ghc/ANNOUNCE file to 2.10
22:50:14 × NiceBird quits (~NiceBird@185.133.111.196) (Quit: Leaving)
22:50:30 <janus> yeah, makes sense
22:53:18 <Hecate> what are the rules for bootstrapping? Do you always have to start from C?
22:53:42 <Hecate> okay nevermind I realised my question was stupid right after pressing Enter.
22:54:27 <mauke> it's too bad old releases aren't tagged properly
22:55:47 <mauke> with perl I can just checkout "perl-2.001" from 1988 or whatever
22:56:03 <janus> Hecate: i would be pretty happy if i could just get, let's say the ghc 8.6.5 binary (that ancient for me already :P) without using any binary GHC build
22:56:11 × Lumia quits (~Lumia@user/Lumia) (Ping timeout: 248 seconds)
22:56:56 <janus> Hecate: so I don't actually remember what I did to get NHC compiled, maybe it used some binary artifact that shipped with the distribution. but bootstrapping NHC is a separate effort in my eyes
22:58:18 <janus> it should all compose anyway
22:58:20 × Albina_Pavlovna quits (~Albina_Pa@cpe-66-65-40-132.nyc.res.rr.com) (Ping timeout: 260 seconds)
22:58:34 × Midjak quits (~Midjak@82.66.147.146) (Quit: This computer has gone to sleep)
22:58:58 Albina_Pavlovna joins (~Albina_Pa@cpe-66-65-40-132.nyc.res.rr.com)
23:00:31 dekster joins (~Albina_Pa@2603-7000-1203-4d7c-413b-439c-1900-10c5.res6.spectrum.com)
23:00:34 segfaultfizzbuzz joins (~segfaultf@12.172.217.142)
23:02:26 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 255 seconds)
23:03:39 × Albina_Pavlovna quits (~Albina_Pa@cpe-66-65-40-132.nyc.res.rr.com) (Ping timeout: 248 seconds)
23:04:59 Albina_Pavlovna joins (~Albina_Pa@cpe-66-65-40-132.nyc.res.rr.com)
23:06:51 × dekster quits (~Albina_Pa@2603-7000-1203-4d7c-413b-439c-1900-10c5.res6.spectrum.com) (Ping timeout: 248 seconds)
23:07:54 ctyjr joins (~ctyjr@95.107.235.112)
23:07:55 dekster joins (~Albina_Pa@2603-7000-1203-4d7c-40cf-a70c-7c21-82e8.res6.spectrum.com)
23:09:11 dekster_ joins (~Albina_Pa@cpe-66-65-40-132.nyc.res.rr.com)
23:09:19 × Albina_Pavlovna quits (~Albina_Pa@cpe-66-65-40-132.nyc.res.rr.com) (Ping timeout: 248 seconds)
23:09:42 seriously_ joins (~seriously@2001:1c06:2715:c200:3edc:a4c7:c4c6:1c9e)
23:12:24 × EsoAlgo8 quits (~EsoAlgo@129.146.136.145) (Remote host closed the connection)
23:12:32 × dekster quits (~Albina_Pa@2603-7000-1203-4d7c-40cf-a70c-7c21-82e8.res6.spectrum.com) (Ping timeout: 248 seconds)
23:13:38 EsoAlgo8 joins (~EsoAlgo@129.146.136.145)
23:13:50 <seriously_> Hey all; Im reading "Purely Functional Data Structures" by okasaki, and im hung up on a concept. Specifically, I'm looking at the purely functional implementation of queues. He mentions that one of his queue implementations is inefficient if you "persistently". I'm struggling with the context of the word "persistent" here. If a function that
23:13:50 <seriously_> returns IO Int, reads an MVar thats a [Int], reverses that MVar, then removes 2 elements, then returns the first element in the list, I would effectively have created 3 versions in the lifespan of that function.
23:14:08 <seriously_> **if you use it "persistently"
23:14:28 <seriously_> reverses that list**
23:15:49 <seriously_> But when that IO method has ran, those versions will be garbage collected and only one version will remain in state technically; so Im confused if thats still innefficient by his defintion.
23:19:31 <seriously_> My intuition is "yes, since we created 3 versions of this list then its innefficient" but I thought that unchanged data points are shared between versions of a data structure so whats the fuss?
23:21:28 <mauke> I have no idea what you mean by that IO stuff, but "used persistently" means using multiple versions of the data structure in parallel, basically
23:22:39 <mauke> also, reads an MVar how?
23:22:48 Lumia joins (~Lumia@user/Lumia)
23:24:24 <mauke> as for reversing a list, that recreates the spine of the list, so it can't share any structure with the original list
23:26:46 <monochrom> Suppose I use the easy "(front-list, back-list)" implementation. Suppose I have done a ton of enqueues, so I have ([], [1, 2 ,3, 4, ..., 10^10]). Suppose I give that to a backtracking algorithm that holds on to that forever and reuses it a million times.
23:27:14 Guest88 joins (~Guest88@2601:547:500:4e80:405:ede5:9691:e21)
23:27:17 <monochrom> First time we do a dequeue, so we spend 10^10 steps reversing that back list.
23:27:47 × Qudit quits (~user@user/Qudit) (Read error: Connection reset by peer)
23:28:03 <monochrom> Second time we backtrack back to that (i.e., the original ([], [1, 2 ,3, 4, ..., 10^10])), dequeue again, so we spend 10^10 steps again.
23:28:04 malte joins (~malte@mal.tc)
23:28:10 × szkl quits (uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
23:28:11 <monochrom> Third time... you get the point.
23:28:46 <mauke> more abstractly, this is about amortized performance. if you have N steps that take O(1) each and then one step that takes O(N), the whole sequence is amortized O(N) still
23:28:46 <monochrom> ([], [1, 2 ,3, 4, ..., 10^10]) persists. This is persistence. This kills the amortization benefit.
23:28:59 <mauke> as long as you don't repeat any previous steps
23:29:46 <mauke> but if you hold on to the data structure after the first N steps and then perform the O(N) step repeatedly on it (say M times), it becomes O(M*N)
23:30:41 <Guest88> Quick question: map is to Functor as foldl is to ...?
23:30:50 <Guest88> Is there an analogue?
23:30:54 <monochrom> No.
23:31:31 <mauke> in the ephemeral case, every step is amortized O(1). in the persistent case (where you reuse data structures), every step is O(N) in the worst case
23:31:46 <mauke> Foldable?
23:31:53 <jackdk> Guest88: Foldable
23:31:58 <jackdk> oh mauke got there first
23:32:23 × xff0x quits (~xff0x@ai098135.d.east.v6connect.net) (Ping timeout: 260 seconds)
23:32:47 × malte quits (~malte@mal.tc) (Ping timeout: 248 seconds)
23:33:36 <Guest88> Thanks, that's what I was looking for.
23:34:21 xff0x joins (~xff0x@178.255.149.135)
23:39:20 <seriously_> So correct me mauke & monochrom, the key here is the "reuse" of a previous version? Persistence in this case means using previous versions
23:39:31 × Guest88 quits (~Guest88@2601:547:500:4e80:405:ede5:9691:e21) (Quit: Client closed)
23:39:47 <monochrom> Yes.
23:40:19 <mauke> that's the point of "functional updates"
23:40:33 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
23:40:47 <mauke> in a typical imperative language, all data structures are ephemeral because they're updated in place
23:41:30 <mauke> in a functional setting, structures are not modified; instead all operations return new versions of the data structure
23:42:10 <mauke> that's persistent because you get versioning "for free" just by holding on to old values
23:42:35 × xff0x quits (~xff0x@178.255.149.135) (Ping timeout: 248 seconds)
23:42:37 <seriously_> but if I'm just reversing a list, then removing the first to elements from the reversed result, then returning the first n elements of that result; technically the list has three versions so it's technically persistent
23:43:02 <seriously_> All in the scope of a function f :: [a] -> [a]; im not holding onto the first 2 versions?
23:43:48 <seriously_> I think im confused on the use of the word persistent in multiple contexts
23:43:54 <mauke> that's an O(n) operation (in the length of the list)
23:44:25 <mauke> because reversing the list traverses the whole thing anyway
23:44:33 xff0x joins (~xff0x@2405:6580:b080:900:c9db:48d9:400c:36fe)
23:44:58 <seriously_> true, but was my use of the list "persistent"?
23:45:19 <monochrom> I think you are attempting a local analysis where local analyses are inappropriate.
23:45:29 <mauke> I'd say yes because f does not modify the list in place
23:45:48 <monochrom> If you say "f xs = drop 10 (reverse xs)" then sure f doesn't persist the original xs.
23:46:14 <monochrom> But what if I have "for i=1 to 10^100; print (f [1..10^10])"
23:46:34 <monochrom> f doesn't persist the original list. My for-loop does.
23:46:54 <mauke> ... it does?
23:47:02 <monochrom> You now have to think like the GC algorithm.
23:47:34 <monochrom> Yeah! That handwritten [1..10^10] becomes a top-level CAF.
23:47:42 <mauke> oh, you're assuming CAFs
23:47:59 <mauke> that's kind of weird in an imperative language
23:49:48 <monochrom> GHC totally does it. Haskell is a weird imperative language. :)
23:50:50 × xff0x quits (~xff0x@2405:6580:b080:900:c9db:48d9:400c:36fe) (Ping timeout: 260 seconds)
23:51:20 <seriously_> "If you say "f xs = drop 10 (reverse xs)" then sure f doesn't persist the original xs." -- do you have an example where f would persist the original xs?
23:51:38 <monochrom> (xs, drop 10 (reverse xs))
23:51:56 × a_coll quits (~acoll@45.92.120.189) (Remote host closed the connection)
23:52:41 × dekster_ quits (~Albina_Pa@cpe-66-65-40-132.nyc.res.rr.com) (Quit: ZZZzzz…)
23:52:48 <mauke> since we can't store anything in an external reference (f is a pure function), the only way to "persist" things beyond f itself is to return it as part of the result
23:52:49 <monochrom> f xs = y where y = ... code that ends up re-computing drop 10 (reverse xs) a million times rather than memoizing for some reason ...
23:52:50 xff0x joins (~xff0x@ai098135.d.east.v6connect.net)
23:52:52 <mauke> such as a tuple
23:54:10 Albina_Pavlovna joins (~Albina_Pa@2603-7000-1203-4d7c-7018-4867-79af-ff6f.res6.spectrum.com)
23:54:27 <monochrom> In closing I'll just reduce this to understanding GC.
23:54:40 <monochrom> If your value isn't GC'ed then it persists.
23:55:35 <seriously_> that makes sense to me!
23:57:01 catern joins (~sbaugh@2604:2000:8fc0:b:a9c7:866a:bf36:3407)
23:57:21 <seriously_> For me, saying "datastructures are persistent in haskell"  means something different then, "Using a data stucture persistently"
23:57:31 × Albina_Pavlovna quits (~Albina_Pa@2603-7000-1203-4d7c-7018-4867-79af-ff6f.res6.spectrum.com) (Client Quit)
23:58:08 <seriously_> the former is just saying that all datastructures are immutable and therefor a new version is created whenever modifying a datastructure
23:58:35 <monochrom> I have never heard "data structures are persistent in haskell".
23:59:00 <monochrom> Therefore there is no need to worry about what it would mean.
23:59:21 <monochrom> But I have heard "data structures are immutable in haskell" which is precisely right.
23:59:39 × segfaultfizzbuzz quits (~segfaultf@12.172.217.142) (Ping timeout: 248 seconds)

All times are in UTC on 2023-03-07.