Home liberachat/#haskell: Logs Calendar

Logs on 2021-12-16 (liberachat/#haskell)

00:00:03 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) (*.net *.split)
00:00:03 × pfurla[m] quits (uid345156@id-345156.tinside.irccloud.com) (*.net *.split)
00:00:03 × bitmapper quits (uid464869@id-464869.lymington.irccloud.com) (*.net *.split)
00:00:03 × benin quits (~benin@183.82.204.250) (*.net *.split)
00:00:03 × jkaye quits (~jkaye@2601:281:8300:7530:7bc1:436b:e88b:37f9) (*.net *.split)
00:00:03 × zmt01 quits (~zmt00@user/zmt00) (*.net *.split)
00:00:03 × bollu quits (uid233390@id-233390.helmsley.irccloud.com) (*.net *.split)
00:00:03 × zaquest quits (~notzaques@5.130.79.72) (*.net *.split)
00:00:03 × tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (*.net *.split)
00:00:03 × nfd quits (~nfd@user/nfd) (*.net *.split)
00:00:03 × dsrt^ quits (~dsrt@wsip-98-188-240-142.mc.at.cox.net) (*.net *.split)
00:00:03 × Neuromancer quits (~Neuromanc@user/neuromancer) (*.net *.split)
00:00:03 × econo quits (uid147250@user/econo) (*.net *.split)
00:00:03 × srk quits (~sorki@user/srk) (*.net *.split)
00:00:03 × lbseale quits (~ep1ctetus@user/ep1ctetus) (*.net *.split)
00:00:03 × landonf quits (landonf@mac68k.info) (*.net *.split)
00:00:03 × jlamothe quits (~jlamothe@198.251.61.229) (*.net *.split)
00:00:03 × nvmd quits (~nvmd@user/nvmd) (*.net *.split)
00:00:03 × h_ quits (~rootveget@fsf/member/hays) (*.net *.split)
00:00:03 × shriekingnoise quits (~shrieking@186.137.144.80) (*.net *.split)
00:00:03 × rembo10 quits (~rembo10@remulis.com) (*.net *.split)
00:00:03 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (*.net *.split)
00:00:03 × tom_ quits (~tom@2a00:23c8:970c:4801:f5c6:93c3:2f5e:e0) (*.net *.split)
00:00:03 × jonathanx_ quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (*.net *.split)
00:00:03 × bliminse quits (~bliminse@host86-186-4-210.range86-186.btcentralplus.com) (*.net *.split)
00:00:03 × pavonia quits (~user@user/siracusa) (*.net *.split)
00:00:03 × TonyStone quits (~TonyStone@2603-7080-8607-c36a-9cdb-69bc-753b-1e50.res6.spectrum.com) (*.net *.split)
00:00:03 × acidsys quits (~LSD@2.lsd.systems) (*.net *.split)
00:00:03 × emf_ quits (~emf@2620:10d:c091:480::1:305b) (*.net *.split)
00:00:03 × jespada quits (~jespada@87.74.33.157) (*.net *.split)
00:00:03 × arahael quits (~arahael@203.158.51.1) (*.net *.split)
00:00:03 × noctux quits (~noctux@user/noctux) (*.net *.split)
00:00:04 × x88x88x quits (~x88x88x@2001:19f0:5:39a8:5400:3ff:feb6:73cb) (*.net *.split)
00:00:04 × sander quits (~sander@user/sander) (*.net *.split)
00:00:04 × turlando quits (~turlando@user/turlando) (*.net *.split)
00:00:04 × Taneb quits (~Taneb@2001:41c8:51:10d:aaaa:0:aaaa:0) (*.net *.split)
00:00:04 × terrorjack quits (~terrorjac@2a01:4f8:1c1e:509a::1) (*.net *.split)
00:00:04 × mud quits (~mud@user/kadoban) (*.net *.split)
00:00:04 × fluffyballoon quits (45ce440a48@2604:bf00:561:2000::e2) (*.net *.split)
00:00:04 × Hawker quits (~pi@user/hawker) (*.net *.split)
00:00:04 × spoofer quits (~spoofer@64.185.111.205) (*.net *.split)
00:00:04 × LambdaDuck quits (~anka@ksit.fixme.fi) (*.net *.split)
00:00:04 × opqdonut quits (opqdonut@pseudo.fixme.fi) (*.net *.split)
00:00:04 × ishutin quits (~ishutin@85-238-77-101.pool.digikabel.hu) (*.net *.split)
00:00:04 × FragByte quits (~christian@user/fragbyte) (*.net *.split)
00:00:04 × gawen quits (~gawen@user/gawen) (*.net *.split)
00:00:04 × EvanR quits (~evan@user/evanr) (*.net *.split)
00:00:04 × vgtw quits (~vgtw@c-2359205c.07-348-756d651.bbcust.telenor.se) (*.net *.split)
00:00:04 × tv quits (~tv@user/tv) (*.net *.split)
00:00:04 × exarkun quits (~exarkun@user/exarkun) (*.net *.split)
00:00:04 × tired- quits (~tired@user/tired) (*.net *.split)
00:00:04 × xdej quits (~xdej@quatramaran.salle-s.org) (*.net *.split)
00:00:04 × sm2n quits (ae95cb1267@user/sm2n) (*.net *.split)
00:00:04 × jakzale quits (6291399afa@user/jakzale) (*.net *.split)
00:00:04 × tdmm quits (1c9b9145fc@2604:bf00:561:2000::1c8) (*.net *.split)
00:00:04 × jkoshy quits (99b9359beb@2604:bf00:561:2000::10f) (*.net *.split)
00:00:04 × evanrelf quits (3addc196af@2604:bf00:561:2000::f0) (*.net *.split)
00:00:04 × filwisher quits (2e6936c793@2604:bf00:561:2000::170) (*.net *.split)
00:00:04 × lukec quits (9dfd4d094e@2604:bf00:561:2000::10e) (*.net *.split)
00:00:04 × catern quits (~sbaugh@2604:2000:8fc0:b:a9c7:866a:bf36:3407) (*.net *.split)
00:00:04 × mjs2600 quits (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) (*.net *.split)
00:00:04 × pepeiborra quits (sid443799@id-443799.ilkley.irccloud.com) (*.net *.split)
00:00:04 × hendi quits (sid489601@id-489601.lymington.irccloud.com) (*.net *.split)
00:00:04 × Vq quits (~vq@90-227-195-41-no77.tbcn.telia.com) (*.net *.split)
00:00:04 × superbil quits (~superbil@1-34-176-171.hinet-ip.hinet.net) (*.net *.split)
00:00:04 × Guest2359 quits (1000@gabilgathol.bandrate.org) (*.net *.split)
00:00:04 × absence quits (torgeihe@hildring.pvv.ntnu.no) (*.net *.split)
00:00:04 × byorgey quits (~byorgey@155.138.238.211) (*.net *.split)
00:00:04 × carbolymer quits (~carbolyme@dropacid.net) (*.net *.split)
00:00:04 × hook54321 quits (sid149355@user/hook54321) (*.net *.split)
00:00:04 × koolazer quits (~koo@user/koolazer) (*.net *.split)
00:00:05 × bradparker quits (sid262931@id-262931.uxbridge.irccloud.com) (*.net *.split)
00:00:05 × taktoa[c] quits (sid282096@id-282096.tinside.irccloud.com) (*.net *.split)
00:00:05 × flukiluke quits (~m-7humut@2603:c023:c000:6c7e:8945:ad24:9113:a962) (*.net *.split)
00:00:05 × Jonno_FTW quits (~come@api.carswap.me) (*.net *.split)
00:00:05 × int-e quits (~noone@int-e.eu) (*.net *.split)
00:00:05 × wz1000 quits (~zubin@static.11.113.47.78.clients.your-server.de) (*.net *.split)
00:00:05 × elvishjerricco quits (sid237756@id-237756.helmsley.irccloud.com) (*.net *.split)
00:00:05 × res0nat0r quits (~Fletch@dia.whatbox.ca) (*.net *.split)
00:00:05 × acowley quits (~acowley@c-68-83-22-43.hsd1.nj.comcast.net) (*.net *.split)
00:00:05 × MasseR quits (~MasseR@51.15.143.128) (*.net *.split)
00:00:05 × m5zs7k quits (aquares@web10.mydevil.net) (*.net *.split)
00:00:05 × ozzymcduff quits (~mathieu@81-234-151-21-no94.tbcn.telia.com) (*.net *.split)
00:00:05 × dibblego quits (~dibblego@haskell/developer/dibblego) (*.net *.split)
00:00:05 × Typedfern quits (~Typedfern@75.red-88-22-25.staticip.rima-tde.net) (*.net *.split)
00:00:05 × stefan-_ quits (~cri@42dots.de) (*.net *.split)
00:00:05 × theproffesor quits (~theproffe@user/theproffesor) (*.net *.split)
00:00:05 × haasn quits (~nand@haasn.dev) (*.net *.split)
00:00:05 × sus quits (zero@user/zeromomentum) (*.net *.split)
00:00:05 × phma quits (phma@2001:5b0:210f:4b78:b1e:6610:21b4:b15b) (*.net *.split)
00:00:05 × danso quits (~danso@23-233-111-52.cpe.pppoe.ca) (*.net *.split)
00:00:05 × acidjnk quits (~acidjnk@p200300d0c7271e9405040680e1e3c542.dip0.t-ipconnect.de) (*.net *.split)
00:00:05 × Akiva quits (~Akiva@user/Akiva) (*.net *.split)
00:00:05 × max22- quits (~maxime@2a01cb0883359800cb0bc7c67be4bc8f.ipv6.abo.wanadoo.fr) (*.net *.split)
00:00:05 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (*.net *.split)
00:00:05 × waleee quits (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (*.net *.split)
00:00:05 × whatsupdoc quits (uid509081@id-509081.hampstead.irccloud.com) (*.net *.split)
00:00:05 × bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (*.net *.split)
00:00:05 × jle` quits (~jle`@cpe-23-240-75-236.socal.res.rr.com) (*.net *.split)
00:00:05 × cheater quits (~Username@user/cheater) (*.net *.split)
00:00:05 × Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (*.net *.split)
00:00:05 × xacktm quits (xacktm@user/xacktm) (*.net *.split)
00:00:05 × ikke quits (~kevin@alpine/developer/ikke) (*.net *.split)
00:00:05 × asm quits (~alexander@user/asm) (*.net *.split)
00:00:05 × paddymahoney quits (~paddymaho@cpe9050ca207f83-cm9050ca207f80.cpe.net.cable.rogers.com) (*.net *.split)
00:00:05 × mcglk quits (~mcglk@131.191.49.120) (*.net *.split)
00:00:05 × surgeon[m] quits (~surge9nma@2001:470:69fc:105::f585) (*.net *.split)
00:00:05 × amesgen[m] quits (~amesgenm]@2001:470:69fc:105::82b) (*.net *.split)
00:00:05 × rednaZ[m] quits (~r3dnazmat@2001:470:69fc:105::ba70) (*.net *.split)
00:00:06 × TomWesterhout[m] quits (~twesterho@2001:470:69fc:105::1:2918) (*.net *.split)
00:00:06 × YehoshuaPesachWa quits (~yehoshuap@2001:470:69fc:105::a5f) (*.net *.split)
00:00:06 × craige[m] quits (~craigemcw@2001:470:69fc:105::35f1) (*.net *.split)
00:00:06 × mrmonday quits (~robert@what.i.hope.is.not.a.tabernaevagant.es) (*.net *.split)
00:00:06 × Kaiepi quits (~Kaiepi@156.34.44.192) (*.net *.split)
00:00:06 × obfusk quits (~quassel@a82-161-150-56.adsl.xs4all.nl) (*.net *.split)
00:00:06 × feetwind quits (~mike@user/feetwind) (*.net *.split)
00:00:06 × w1gz quits (~do@159.89.11.133) (*.net *.split)
00:00:06 × root1 quits (root@2600:3c02::f03c:92ff:fe1a:c779) (*.net *.split)
00:00:06 × rookie101 quits (~rookie@165.232.121.13) (*.net *.split)
00:00:06 × n3t quits (n3t@user/n3t) (*.net *.split)
00:00:06 × WhateverRabbit quits (~rabbit@206.81.18.26) (*.net *.split)
00:00:06 × davl quits (~davl@207.154.228.18) (*.net *.split)
00:00:06 × xstill- quits (xstill@fimu/xstill) (*.net *.split)
00:00:06 × xsarnik quits (xsarnik@lounge.fi.muni.cz) (*.net *.split)
00:00:06 × Ankhers quits (~Ankhers@ec2-54-196-233-138.compute-1.amazonaws.com) (*.net *.split)
00:00:06 × acro quits (~acro@user/acro) (*.net *.split)
00:00:06 × alinab quits (sid468903@id-468903.helmsley.irccloud.com) (*.net *.split)
00:00:06 × systemfault quits (sid267009@id-267009.uxbridge.irccloud.com) (*.net *.split)
00:00:06 × jonrh quits (sid5185@id-5185.ilkley.irccloud.com) (*.net *.split)
00:00:06 × aria quits (sid380617@id-380617.lymington.irccloud.com) (*.net *.split)
00:00:06 × alanz quits (sid110616@id-110616.uxbridge.irccloud.com) (*.net *.split)
00:00:06 × HurdyGurdyBurdy quits (~HurdyGurd@user/hurdygurdyburdy) (*.net *.split)
00:00:06 × lyxia quits (~lyxia@poisson.chat) (*.net *.split)
00:00:06 × bsima1 quits (9d7e39c8ad@2604:bf00:561:2000::dd) (*.net *.split)
00:00:06 × JimL quits (~quassel@89-162-2-132.fiber.signal.no) (*.net *.split)
00:00:06 × Pent quits (sid313808@id-313808.lymington.irccloud.com) (*.net *.split)
00:00:06 × AndreasK quits (sid320732@id-320732.uxbridge.irccloud.com) (*.net *.split)
00:00:06 × jrm quits (~jrm@156.34.249.199) (*.net *.split)
00:00:06 × leah2 quits (~leah@vuxu.org) (*.net *.split)
00:00:06 × tomsmeding quits (~tomsmedin@tomsmeding.com) (*.net *.split)
00:00:06 × unyu quits (~pyon@user/pyon) (*.net *.split)
00:00:06 × maerwald quits (~maerwald@user/maerwald) (*.net *.split)
00:00:10 xdej joins (~xdej@quatramaran.salle-s.org)
00:00:11 Jonno_FTW joins (~come@api.carswap.me)
00:00:11 absence joins (torgeihe@hildring.pvv.ntnu.no)
00:00:14 lukec joins (9dfd4d094e@2604:bf00:561:2000::10e)
00:00:14 filwisher joins (2e6936c793@2604:bf00:561:2000::170)
00:00:16 byorgey joins (~byorgey@155.138.238.211)
00:00:16 turlando joins (~turlando@93-42-250-112.ip89.fastwebnet.it)
00:00:17 spoofer joins (~spoofer@64.185.111.205)
00:00:17 JimL joins (~quassel@89-162-2-132.fiber.signal.no)
00:00:18 rembo10 joins (~rembo10@remulis.com)
00:00:18 mjs2600 joins (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net)
00:00:21 asm joins (~alexander@burner.asm89.io)
00:00:21 max22- joins (~maxime@2a01cb0883359800cb0bc7c67be4bc8f.ipv6.abo.wanadoo.fr)
00:00:22 pfurla[m] joins (uid345156@id-345156.tinside.irccloud.com)
00:00:24 tom_ joins (~tom@2a00:23c8:970c:4801:f5c6:93c3:2f5e:e0)
00:00:25 tdmm joins (1c9b9145fc@2604:bf00:561:2000::1c8)
00:00:25 root1 joins (root@2600:3c02::f03c:92ff:fe1a:c779)
00:00:26 jkoshy joins (99b9359beb@2604:bf00:561:2000::10f)
00:00:26 danso joins (~danso@23-233-111-52.cpe.pppoe.ca)
00:00:26 tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net)
00:00:27 acidjnk joins (~acidjnk@p200300d0c7271e9405040680e1e3c542.dip0.t-ipconnect.de)
00:00:29 xsarnik joins (xsarnik@lounge.fi.muni.cz)
00:00:33 res0nat0r joins (~Fletch@dia.whatbox.ca)
00:00:33 Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de)
00:00:34 whatsupdoc joins (uid509081@id-509081.hampstead.irccloud.com)
00:00:34 jlamothe joins (~jlamothe@198.251.61.229)
00:00:35 Typedfern joins (~Typedfern@75.red-88-22-25.staticip.rima-tde.net)
00:00:35 jonathanx_ joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
00:00:37 zaquest joins (~notzaques@5.130.79.72)
00:00:38 AndreasK joins (sid320732@2a03:5180:f:5::4:e4dc)
00:00:38 opqdonut joins (~opqdonut@91.105.251.154)
00:00:38 alinab joins (sid468903@helmsley.irccloud.com)
00:00:38 unyu joins (~pyon@2800:200:e840:42c7:c75:c5f:d434:a5f1)
00:00:39 × turlando quits (~turlando@93-42-250-112.ip89.fastwebnet.it) (Changing host)
00:00:39 turlando joins (~turlando@user/turlando)
00:00:40 Vq joins (~vq@90-227-195-41-no77.tbcn.telia.com)
00:00:40 bitmapper joins (uid464869@id-464869.lymington.irccloud.com)
00:00:41 Pent joins (sid313808@id-313808.lymington.irccloud.com)
00:00:41 mrmonday joins (~robert@what.i.hope.is.not.a.tabernaevagant.es)
00:00:41 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
00:00:42 waleee joins (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4)
00:00:43 FragByte joins (~christian@p579d2134.dip0.t-ipconnect.de)
00:00:44 sus joins (zero@user/zeromomentum)
00:00:44 lyxia joins (~lyxia@poisson.chat)
00:00:47 wz1000 joins (~zubin@static.11.113.47.78.clients.your-server.de)
00:00:48 Akiva joins (~Akiva@d75-156-97-166.bchsia.telus.net)
00:00:49 superbil joins (~superbil@1-34-176-171.hinet-ip.hinet.net)
00:00:49 dsrt^ joins (~dsrt@98.188.240.142)
00:00:51 dibblego joins (~dibblego@122-199-1-30.ip4.superloop.com)
00:00:51 pepeiborra joins (sid443799@ilkley.irccloud.com)
00:00:53 bradparker joins (sid262931@id-262931.uxbridge.irccloud.com)
00:00:53 jakzale joins (6291399afa@user/jakzale)
00:00:59 feetwind joins (~mike@2406:d500:6:1:216:3cff:fe36:651)
00:01:03 ikke joins (~kevin@delta.ikke.info)
00:01:03 hendi joins (sid489601@2a03:5180:f:2::7:7881)
00:01:05 n3t joins (~n3t@s45.mydevil.net)
00:01:06 jonrh joins (sid5185@2a03:5180:f:3::1441)
00:01:06 systemfault joins (sid267009@id-267009.uxbridge.irccloud.com)
00:01:11 acowley joins (~acowley@c-68-83-22-43.hsd1.nj.comcast.net)
00:01:12 taktoa[c] joins (sid282096@2a03:5180:f::4:4df0)
00:01:17 econo joins (uid147250@2a03:5180:f::2:3f32)
00:01:21 bollu joins (uid233390@id-233390.helmsley.irccloud.com)
00:01:21 alanz joins (sid110616@uxbridge.irccloud.com)
00:01:23 elvishjerricco joins (sid237756@helmsley.irccloud.com)
00:01:26 aria joins (sid380617@2a03:5180:f:2::5:cec9)
00:01:28 bsima1 joins (9d7e39c8ad@2604:bf00:561:2000::dd)
00:01:30 × FragByte quits (~christian@p579d2134.dip0.t-ipconnect.de) (Changing host)
00:01:30 FragByte joins (~christian@user/fragbyte)
00:01:37 theproffesor joins (~theproffe@2601:282:847f:8010::5fff)
00:01:38 Guest2359 joins (1000@gabilgathol.bandrate.org)
00:01:39 hook54321 joins (sid149355@user/hook54321)
00:01:42 landonf joins (landonf@mac68k.info)
00:01:48 paddymahoney joins (~paddymaho@cpe9050ca207f83-cm9050ca207f80.cpe.net.cable.rogers.com)
00:01:49 × dibblego quits (~dibblego@122-199-1-30.ip4.superloop.com) (Changing host)
00:01:49 dibblego joins (~dibblego@haskell/developer/dibblego)
00:01:49 unyu is now known as Guest6030
00:02:01 × econo quits (uid147250@2a03:5180:f::2:3f32) (Changing host)
00:02:01 econo joins (uid147250@user/econo)
00:02:13 leah2 joins (~leah@vuxu.org)
00:02:16 × theproffesor quits (~theproffe@2601:282:847f:8010::5fff) (Changing host)
00:02:16 theproffesor joins (~theproffe@user/theproffesor)
00:02:17 pavonia joins (~user@ip5f5bd527.dynamic.kabel-deutschland.de)
00:02:21 feetwind is now known as Guest9348
00:02:28 × pavonia quits (~user@ip5f5bd527.dynamic.kabel-deutschland.de) (Changing host)
00:02:28 pavonia joins (~user@user/siracusa)
00:02:31 alx741 joins (~alx741@157.100.93.160)
00:02:52 carbolymer joins (~carbolyme@dropacid.net)
00:03:06 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac)
00:03:12 <Axman6> So I was asking yesterday about an efficient array of write once valyes (essentially Array (Maybe a) where something like a bitvector is used to record Nothingness). I wonder if edwardk's promises library would give me that. I'm working on something for the discrimination library as it is, so it's not a totally crazy idea...
00:03:14 xstill- joins (xstill@fimu/xstill)
00:03:15 maerwald joins (~maerwald@mail.hasufell.de)
00:03:24 jrm joins (~jrm@156.34.249.199)
00:03:28 vgtw joins (~vgtw@c-2359205c.07-348-756d651.bbcust.telenor.se)
00:03:36 sander joins (~sander@user/sander)
00:03:38 tired joins (~tired@user/tired)
00:03:40 noctux joins (~noctux@user/noctux)
00:03:43 stefan-_ joins (~cri@42dots.de)
00:03:44 srk joins (~sorki@user/srk)
00:03:53 fluffyballoon joins (45ce440a48@2604:bf00:561:2000::e2)
00:03:54 phma joins (phma@2001:5b0:210f:4b78:b1e:6610:21b4:b15b)
00:03:59 lbseale joins (~ep1ctetus@user/ep1ctetus)
00:04:07 hays joins (rootvegeta@fsf/member/hays)
00:04:08 m5zs7k joins (aquares@web10.mydevil.net)
00:04:10 shriekingnoise joins (~shrieking@186.137.144.80)
00:04:17 exarkun joins (~exarkun@user/exarkun)
00:04:18 sm2n joins (ae95cb1267@user/sm2n)
00:04:20 obfusk joins (~quassel@a82-161-150-56.adsl.xs4all.nl)
00:04:28 Ankhers joins (~Ankhers@ec2-54-196-233-138.compute-1.amazonaws.com)
00:04:29 tomsmeding joins (~tomsmedin@tomsmeding.com)
00:04:31 haasn joins (~nand@haasn.dev)
00:04:38 gawen joins (~gawen@user/gawen)
00:04:39 x88x88x joins (~x88x88x@2001:19f0:5:39a8:5400:3ff:feb6:73cb)
00:04:40 Taneb joins (~Taneb@runciman.hacksoc.org)
00:04:43 flukiluke joins (~m-7humut@2603:c023:c000:6c7e:8945:ad24:9113:a962)
00:04:44 davl joins (~davl@207.154.228.18)
00:04:44 evanrelf joins (3addc196af@2604:bf00:561:2000::f0)
00:05:09 LambdaDuck joins (~anka@ksit.fixme.fi)
00:05:09 xacktm joins (xacktm@user/xacktm)
00:05:10 ishutin joins (~ishutin@85-238-77-101.pool.digikabel.hu)
00:05:15 acidsys joins (~LSD@2.lsd.systems)
00:05:17 int-e joins (~noone@int-e.eu)
00:05:19 bliminse joins (~bliminse@host86-186-4-210.range86-186.btcentralplus.com)
00:05:19 ozzymcduff joins (~mathieu@81-234-151-21-no94.tbcn.telia.com)
00:05:21 Hawker joins (~pi@user/hawker)
00:05:24 nfd joins (~nfd@user/nfd)
00:05:30 mcglk joins (~mcglk@131.191.49.120)
00:05:35 koolazer joins (~koo@user/koolazer)
00:05:44 <Axman6> so far I have this (and oh my god was it painful to finally figure this out) https://paste.tomsmeding.com/nXqG4mDD
00:05:50 catern joins (~sbaugh@2604:2000:8fc0:b:a9c7:866a:bf36:3407)
00:05:53 jespada joins (~jespada@87.74.33.157)
00:06:08 WhateverRabbit joins (~rabbit@206.81.18.26)
00:06:28 w1gz joins (~do@159.89.11.133)
00:06:31 tv joins (~tv@user/tv)
00:06:39 acro joins (~acro@user/acro)
00:06:41 jle` joins (~jle`@cpe-23-240-75-236.socal.res.rr.com)
00:06:47 × max22- quits (~maxime@2a01cb0883359800cb0bc7c67be4bc8f.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
00:06:57 rookie101 joins (~rookie@165.232.121.13)
00:07:03 emf joins (~emf@2620:10d:c091:480::1:305b)
00:07:07 cheater joins (~Username@user/cheater)
00:07:45 amesgen[m] joins (~amesgenm]@2001:470:69fc:105::82b)
00:07:49 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
00:07:49 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
00:07:49 wroathe joins (~wroathe@user/wroathe)
00:08:34 surgeon[m] joins (~surge9nma@2001:470:69fc:105::f585)
00:09:11 YehoshuaPesachWa joins (~yehoshuap@2001:470:69fc:105::a5f)
00:10:12 rednaZ[m] joins (~r3dnazmat@2001:470:69fc:105::ba70)
00:10:17 craige[m] joins (~craigemcw@2001:470:69fc:105::35f1)
00:11:23 TomWesterhout[m] joins (~twesterho@2001:470:69fc:105::1:2918)
00:12:04 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
00:15:35 × madjestic quits (~madjestic@88-159-247-120.fixed.kpn.net) (Ping timeout: 250 seconds)
00:17:27 TonyStone joins (~TonyStone@2603-7080-8607-c36a-9cdb-69bc-753b-1e50.res6.spectrum.com)
00:18:39 jinsun__ joins (~quassel@user/jinsun)
00:20:02 × jinsun quits (~quassel@user/jinsun) (Ping timeout: 240 seconds)
00:21:13 × acidjnk quits (~acidjnk@p200300d0c7271e9405040680e1e3c542.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
00:23:12 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
00:28:39 × whatsupdoc quits (uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
00:28:45 <koz> @pl \_ y -> f y
00:28:45 <lambdabot> const f
00:29:25 × Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 256 seconds)
00:30:01 alx741 joins (~alx741@157.100.93.160)
00:32:34 × jgeerds quits (~jgeerds@55d4ac73.access.ecotel.net) (Ping timeout: 260 seconds)
00:34:35 Erutuon_ joins (~Erutuon@user/erutuon)
00:35:40 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
00:37:25 × pfurla[m] quits (uid345156@id-345156.tinside.irccloud.com) (Quit: Connection closed for inactivity)
00:39:38 justsomeguy joins (~justsomeg@user/justsomeguy)
00:41:29 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
00:44:21 EvanR joins (~evan@2600:1700:ba69:10:48cf:5b3a:5b94:ba94)
00:44:21 × EvanR quits (~evan@2600:1700:ba69:10:48cf:5b3a:5b94:ba94) (Changing host)
00:44:21 EvanR joins (~evan@user/evanr)
00:44:27 kayvank joins (~user@52-119-115-185.PUBLIC.monkeybrains.net)
00:44:36 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Remote host closed the connection)
00:48:07 × Akiva quits (~Akiva@d75-156-97-166.bchsia.telus.net) (Ping timeout: 256 seconds)
00:54:20 × Morrow quits (~quassel@bzq-110-168-31-106.red.bezeqint.net) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
00:59:36 alx741 joins (~alx741@157.100.93.160)
01:06:38 × Tuplanolla quits (~Tuplanoll@91-159-68-169.elisa-laajakaista.fi) (Quit: Leaving.)
01:10:13 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
01:10:46 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
01:13:27 × waleee quits (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Ping timeout: 250 seconds)
01:15:35 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
01:19:37 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 240 seconds)
01:20:58 Erutuon_ is now known as Erutuon
01:29:02 lavaman joins (~lavaman@98.38.249.169)
01:29:10 alx741 joins (~alx741@157.100.93.160)
01:29:29 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Ping timeout: 256 seconds)
01:31:25 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
01:36:14 eys joins (~eys@87.196.72.73)
01:36:14 × eys quits (~eys@87.196.72.73) (Remote host closed the connection)
01:36:33 eys joins (~eys@87-196-72-73.net.novis.pt)
01:39:04 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
01:41:50 <hololeap> @pl _
01:41:50 <lambdabot> (line 1, column 1):
01:41:50 <lambdabot> unexpected "_"
01:41:50 <lambdabot> expecting white space, "()", natural, identifier, lambda abstraction or expression
01:43:12 <jackdk> @pl
01:43:13 <lambdabot> (line 1, column 1):
01:43:13 <lambdabot> unexpected end of input
01:43:13 <lambdabot> expecting white space, "()", natural, identifier, lambda abstraction or expression
01:43:23 <jackdk> @botsnack sorry lambdabot
01:43:24 <lambdabot> :)
01:44:41 Neuromancer joins (~Neuromanc@user/neuromancer)
01:46:06 × retroid_ quits (~retro@05412d78.skybroadband.com) (Ping timeout: 268 seconds)
01:46:38 Sgeo_ joins (~Sgeo@user/sgeo)
01:46:52 × lbseale quits (~ep1ctetus@user/ep1ctetus) (Read error: Connection reset by peer)
01:47:05 kjak joins (~kjak@pool-108-45-56-21.washdc.fios.verizon.net)
01:48:21 johnjay parts (~pi@154.6.152.74) (WeeChat 3.3)
01:48:45 × Sgeo quits (~Sgeo@user/sgeo) (Ping timeout: 256 seconds)
01:52:21 retroid_ joins (~retro@05412d78.skybroadband.com)
01:56:47 × mmhat quits (~mmh@55d47819.access.ecotel.net) (Quit: WeeChat 3.3)
01:56:47 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
01:57:30 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 260 seconds)
01:58:42 × _xor quits (~xor@dsl-50-5-233-169.fuse.net) (Read error: Connection reset by peer)
02:01:13 _xor joins (~xor@dsl-50-5-233-169.fuse.net)
02:01:56 lavaman joins (~lavaman@98.38.249.169)
02:06:19 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
02:06:57 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 250 seconds)
02:12:36 × bollu quits (uid233390@id-233390.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
02:12:36 hgolden joins (~hgolden2@cpe-172-114-81-123.socal.res.rr.com)
02:12:54 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
02:14:41 alx741 joins (~alx741@157.100.93.160)
02:17:39 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 256 seconds)
02:18:27 × neurocyte0132889 quits (~neurocyte@user/neurocyte) (Ping timeout: 250 seconds)
02:18:40 × eys quits (~eys@87-196-72-73.net.novis.pt) (Quit: Leaving)
02:22:05 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
02:24:27 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
02:25:17 × perrierjouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 3.3)
02:32:58 × ubert quits (~Thunderbi@p200300ecdf1abb06cc2914e8ae945344.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
02:33:28 ubert joins (~Thunderbi@p200300ecdf1abb03cc2914e8ae945344.dip0.t-ipconnect.de)
02:33:30 zmt00 joins (~zmt00@user/zmt00)
02:36:34 lavaman joins (~lavaman@98.38.249.169)
02:37:40 perrierjouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca)
02:40:35 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
02:40:53 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
02:42:27 alx741 joins (~alx741@157.100.93.160)
02:44:22 × perrierjouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 3.3)
03:01:32 × xff0x quits (~xff0x@2001:1a81:52ce:1300:fb1:616f:b19a:8052) (Ping timeout: 240 seconds)
03:03:21 mason0 joins (~bc8147f2@cerf.good1.com)
03:03:31 <zero> can we export "all except some" functions in a module?
03:03:47 xff0x joins (~xff0x@2001:1a81:530f:c500:a508:6a68:a141:6a03)
03:03:52 <zero> like `module X hiding ( some ) where`
03:04:47 <monochrom> Unfortunately no.
03:04:52 <zero> :(
03:05:48 <mason0> hi. is there a way to display Data.Ratio.Ratio as a decimal number?
03:06:23 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
03:06:28 <awpr> `module X.Internal where ...` `module X (module X.Internal) where; import X.Internal hiding (some)` if it's worth using extra files for
03:06:43 <mason0> (without converting it to double first, as that would restrict me to precision of double)
03:10:46 chexum joins (~quassel@gateway/tor-sasl/chexum)
03:13:50 <monochrom> Perhaps use the "scientific" package, use its fromRationalRepetend to convert Rational to Scientific. You can tell it when to stop, or let it detect repetition and tell you.
03:17:46 <glguy> > let decimal x = case properFraction x of (w,p) -> show w ++ "." ++ unfoldr (\x -> if x == 0 then Nothing else case properFraction (10*x) of (w,p) -> Just (intToDigit w, p)) p
03:17:47 <lambdabot> <no location info>: error:
03:17:47 <lambdabot> not an expression: ‘let decimal x = case properFraction x of (w,p) -> sh...
03:17:57 <glguy> @let decimal x = case properFraction x of (w,p) -> show w ++ "." ++ unfoldr (\x -> if x == 0 then Nothing else case properFraction (10*x) of (w,p) -> Just (intToDigit w, p)) p
03:17:58 <lambdabot> <command line>: does not exist: .L.hs
03:18:04 mbuf joins (~Shakthi@223.178.108.131)
03:19:24 <mason0> @hoogle intToDigit
03:19:25 <lambdabot> Data.Char intToDigit :: Int -> Char
03:19:25 <lambdabot> GHC.Show intToDigit :: Int -> Char
03:19:25 <lambdabot> Protolude intToDigit :: Int -> Char
03:20:22 <mason0> glguy oh interesting. is that limited to precision of some floating point number, or not? I'm not quite how it works
03:20:29 <mason0> +sure
03:21:07 × mason0 quits (~bc8147f2@cerf.good1.com) (Quit: CGI:IRC)
03:21:21 mason0 joins (~bc8147f2@cerf.good1.com)
03:21:22 <glguy> it's as limited as storing things as a Rational
03:21:56 <monochrom> > properFraction (10/3 :: Rational)
03:21:57 <snake> is this right and why wasn't it said so simply to me before? injective means every output has at most one input. surjective means every output has at least one input. bijective means every output has exactly one input.
03:21:58 <lambdabot> (3,1 % 3)
03:22:03 <monochrom> Lossless.
03:23:09 <snake> nice i love fractions
03:23:15 snake pushes up his glasses
03:23:20 <monochrom> snake: This is right. And very intuitive. And very hostile to equational reasoning.
03:23:40 <snake> hostile?
03:23:45 <monochrom> "if f x = f y then x = y" is very friendly to equational reasong i.e. doing algebra.
03:23:57 × td_ quits (~td@94.134.91.159) (Ping timeout: 256 seconds)
03:23:58 <snake> ohhh i see
03:24:00 <monochrom> "at most one" OK am I doing combinatorics or what
03:24:14 <snake> so it's good to study the equations too
03:24:18 <snake> err rules
03:24:33 <snake> :ok_hand:
03:24:41 <mason0> > 1%2 / 2
03:24:43 <lambdabot> 1 % 4
03:24:44 <monochrom> In general, intuitiveness is the anti-thesis to logic.
03:25:28 td_ joins (~td@muedsl-82-207-238-051.citykom.de)
03:25:43 <snake> yeah but i need to remember it for my discrete math final, most of the points i missed on the last exam were function and relation concepts :V
03:25:53 <snake> i tyhink the intuitive definition at least grants me that
03:27:27 <monochrom> For bijection, "f(g(x))=x and g(f(x))=x" is friendly to algebra, as said. Even better is double-down on algebra so you also do boolean algebra: "forall x,y: f(x)=y iff x=g(y)". (Note that "iff" is equality for booleans.)
03:28:38 <monochrom> Oh I memorize all perspectives and narratives and bedtime stories.
03:28:40 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
03:28:58 <snake> lol
03:30:39 <monochrom> If the exam requires proofs, and the proofs requires the hard-to-remember, unintuitive narrative, then memorizing the easy-to-remember, intuitive narrative won't help. You will end up handwaving and "this is obvious to me why are you asking for proof".
03:31:54 <monochrom> The right thing to do is to practice with the actually-needed-on-exam version a million times until it becomes intuitive. Intuition is trained not opined.
03:32:11 <monochrom> Which also means now is too late to start that.
03:32:18 <monochrom> As usual.
03:33:03 <mason0> lol, decimal (1%3) prints 0.333333 ad infinutum
03:33:25 <glguy> of course
03:33:36 <monochrom> I don't understand why programmers are so obsessed with "intuitive" esp. in the sense "if my first impression is unintuitive, I reject it".
03:33:54 <mason0> glguy, yeah, I did get what I asked for!
03:33:58 <monochrom> Actual professions can't afford that luxury.
03:34:33 <monochrom> You don't hear medical school students complaining "seeing blood and gory organs is unintuitive to me so I refuse to learn surgery".
03:34:47 <monochrom> or rather s/complaining/whining/
03:35:13 <monochrom> That's exactly what programmers do. Whining about needing to be trained. Unprofessional.
03:35:17 <snake> idk man the only person i see whining is you
03:35:25 <snake> :p
03:35:32 <monochrom> Yeah OK no problem I'll stop.
03:35:32 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
03:36:27 × featurebug quits (~featurebu@49.205.122.91) (Ping timeout: 250 seconds)
03:40:24 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) (Remote host closed the connection)
03:40:57 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
03:41:47 <snake> monochrom, i appreciate your suggestion
03:47:33 sleblanc joins (~sleblanc@user/sleblanc)
03:49:35 <monochrom> Lately, I have been working closely with inverse images of functions. They are counterintuitive at first, but turn out to be beautiful. And your understanding can be directly expressed with inverse images, so maybe you're on to something, too. (Pun intended or not, "on to", haha.)
03:50:01 <snake> lol
03:50:44 <maerwald[m]> <monochrom> "That's exactly what programmers..." <- Programmers don't need to be trained
03:50:47 <monochrom> Let f:X->Y, S⊆Y. The inverse image of f of S, I'll write "invIm f S", other people write "f^(-1) (S)", is { x in X | f(x) in S }.
03:50:47 <EvanR> formal topology, locales
03:50:50 <maerwald[m]> They need to learn
03:50:58 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac)
03:52:00 <monochrom> So your understanding means using singleton sets for S, then asking what invIm f {y} looks like for each y.
03:52:34 <monochrom> Injective is when for every y, invIm f {y} has size 0 or 1.
03:52:59 <monochrom> Surjective is when size is 1 or more. Bijective is when size is 1.
03:53:11 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
03:53:54 alx741 joins (~alx741@157.100.93.160)
03:54:19 <sprout> https://github.com/egel-lang/aoc-2021/blob/main/day15/task2.eg <- Advent of Code, day 15, task 2 - egel code
03:54:22 <sprout> https://pasteboard.co/EN3DVD0kUahm.png <- with colors
03:57:57 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds)
04:04:36 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
04:10:58 featurebug joins (~featurebu@49.205.122.91)
04:13:36 <mason0> IIRC there was a function that takes a function and keeps applying it to base value, and the result of f baseValue, etc. does anyone know the name?
04:14:09 <monochrom> iterate
04:14:13 <xsperry> @hoogle (a -> a) -> a -> [a]
04:14:14 <lambdabot> Prelude iterate :: (a -> a) -> a -> [a]
04:14:14 <lambdabot> Data.List iterate :: (a -> a) -> a -> [a]
04:14:14 <lambdabot> Data.List iterate' :: (a -> a) -> a -> [a]
04:14:25 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
04:14:25 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
04:14:25 wroathe joins (~wroathe@user/wroathe)
04:14:36 <monochrom> > iterate (* 2) 1
04:14:38 <lambdabot> [1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536,131072,2...
04:14:46 <mason0> > iterate (/2) (1%2)
04:14:47 <lambdabot> [1 % 2,1 % 4,1 % 8,1 % 16,1 % 32,1 % 64,1 % 128,1 % 256,1 % 512,1 % 1024,1 %...
04:14:52 <mason0> neat!
04:15:41 <EvanR> > let factorial n = product [1..n] in iterate factorial 2
04:15:42 <lambdabot> [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2...
04:15:46 <EvanR> shoot
04:17:13 <EvanR> > let factorial n = product [1..n] in (iterate factorial 3) !! 5
04:17:19 <lambdabot> mueval-core: Time limit exceeded
04:17:31 <monochrom> "fixed point detected"
04:18:11 × xkuru quits (~xkuru@user/xkuru) (Read error: Connection reset by peer)
04:18:16 × xff0x quits (~xff0x@2001:1a81:530f:c500:a508:6a68:a141:6a03) (Ping timeout: 245 seconds)
04:18:57 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds)
04:19:08 xff0x joins (~xff0x@2001:1a81:530f:c500:fcf0:ff87:e783:c227)
04:20:59 alx741 joins (~alx741@157.100.93.160)
04:24:32 <mason0> > sum $ take 10 $ iterate (/2) (1%1)
04:24:33 <lambdabot> 1023 % 512
04:25:17 <mason0> > sum $ take 10 $ iterate (/2) 1
04:25:19 <lambdabot> 1.998046875
04:25:31 <EvanR> zenos paradox 2
04:25:47 <mason0> hmm, I got 2.0 for the second line in ghci
04:26:39 <mason0> no, my bad
04:27:16 <EvanR> that would be sum $ take inf
04:28:00 <EvanR> > sum (iterate (/2) 1)
04:28:08 <lambdabot> mueval.real: ExitFailure 1
04:28:51 <EvanR> a real error
04:37:44 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
04:41:35 × curiousgay quits (~curiousga@77-120-141-90.kha.volia.net) (Ping timeout: 256 seconds)
04:45:27 <Axman6> > scanl (+) 0 $ iterate (/2) 1 :: [Rational]
04:45:28 <lambdabot> [0 % 1,1 % 1,3 % 2,7 % 4,15 % 8,31 % 16,63 % 32,127 % 64,255 % 128,511 % 256...
04:45:57 <Axman6> :t decimal
04:45:58 <lambdabot> (Integral a, Choice p, Applicative f) => p a (f a) -> p String (f String)
04:46:16 <Axman6> hmm, what's the best way to get a decimal string from a Rational?
04:46:59 <glguy> Did someone leak that tonight's adventofcode is converting fractions to decimals?
04:46:59 <Axman6> > map fromRational $ scanl (+) 0 $ iterate (/2) 1 :: [Double]
04:47:01 <lambdabot> [0.0,1.0,1.5,1.75,1.875,1.9375,1.96875,1.984375,1.9921875,1.99609375,1.99804...
04:47:07 <xerox> haha
04:47:24 Inst joins (~Inst@2601:6c4:4080:3f80:d9b5:7230:29a1:ab4d)
04:48:09 × Inst quits (~Inst@2601:6c4:4080:3f80:d9b5:7230:29a1:ab4d) (Read error: Connection reset by peer)
04:48:17 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
04:48:27 Inst joins (~Inst@2601:6c4:4080:3f80:d9b5:7230:29a1:ab4d)
04:49:50 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Remote host closed the connection)
04:49:59 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
04:54:28 <Axman6> > drop 10 $ map fromRational $ scanl (+) 0 $ iterate (/2) 1 :: [Double]
04:54:30 <lambdabot> [1.998046875,1.9990234375,1.99951171875,1.999755859375,1.9998779296875,1.999...
04:54:51 <Axman6> > drop 10 $ map (\n -> 2 - fromRational n) $ scanl (+) 0 $ iterate (/2) 1 :: [Double]
04:54:53 <lambdabot> [1.953125e-3,9.765625e-4,4.8828125e-4,2.44140625e-4,1.220703125e-4,6.1035156...
04:55:16 <EvanR> eww doubles
04:55:34 alx741 joins (~alx741@157.100.93.160)
04:55:54 <EvanR> > map fromRational $ scanl (+) 0 $ iterate (/2) 1 :: [CReal]
04:55:55 <lambdabot> [0.0,1.0,1.5,1.75,1.875,1.9375,1.96875,1.984375,1.9921875,1.99609375,1.99804...
04:55:59 <Axman6> > drop 10 $ map (\n -> 2 - fromRational n) $ scanl (+) 0 $ iterate (/2) 1 :: [Scientific]
04:56:01 <lambdabot> error:
04:56:01 <lambdabot> Not in scope: type constructor or class ‘Scientific’
04:56:10 <Axman6> % drop 10 $ map (\n -> 2 - fromRational n) $ scanl (+) 0 $ iterate (/2) 1 :: [Scientific]
04:56:10 <yahb> Axman6: ; <interactive>:154:77: error: Not in scope: type constructor or class `Scientific'
04:56:15 <Axman6> :(
04:56:25 <EvanR> the bots are unscientific
04:57:53 <Axman6> > let factorials = scanl (*) 1 [1..]; factorial n = factorials !! n in iterate factorial 3
04:57:54 <lambdabot> [3,6,720,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1...
04:58:05 <Axman6> o.O
04:58:16 <EvanR> Int
04:58:19 <Axman6> > let factorials = scanl (*) 1 [1..]; factorial n = factorials !! (n+1) in iterate factorial 3
04:58:21 <mason0> Axman6, glguy posted a neat function above that does that.
04:58:28 <lambdabot> mueval.real: ExitFailure 1
04:58:28 <EvanR> use genericIndex or something
04:59:07 <mason0> > let decimal x = case properFraction x of (w,p) -> show w ++ "." ++ unfoldr (\x -> if x == 0 then Nothing else case properFraction (10*x) of (w,p) -> Just (intToDigit w, p)) p in decimal (1%2)
04:59:08 <lambdabot> "0.5"
04:59:25 <mason0> > let decimal x = case properFraction x of (w,p) -> show w ++ "." ++ unfoldr (\x -> if x == 0 then Nothing else case properFraction (10*x) of (w,p) -> Just (intToDigit w, p)) p in decimal (1%3)
04:59:26 <lambdabot> "0.3333333333333333333333333333333333333333333333333333333333333333333333333...
04:59:37 × featurebug quits (~featurebu@49.205.122.91) (Ping timeout: 240 seconds)
04:59:57 <Axman6> that = decimal representation? yeah I saw that - feels inefficient but we're dealing with Strings... so...
05:00:18 <mason0> :t unfoldr
05:00:20 <lambdabot> (b -> Maybe (a, b)) -> b -> [a]
05:00:51 <Axman6> > let decimal x = case properFraction x of (w,p) -> show w ++ "." ++ unfoldr (\x -> if x == 0 then Nothing else case properFraction (10*x) of (w,p) -> Just (intToDigit w, p)) p in decimal (22%7)
05:00:52 <lambdabot> "3.1428571428571428571428571428571428571428571428571428571428571428571428571...
05:02:16 <Axman6> > let decimal x = case properFraction x of (w,p) -> show w ++ "." ++ unfoldr (\x -> if x == 0 then Nothing else case properFraction (10*x) of (w,p) -> Just (intToDigit w, p)) p in decimal (355%113)
05:02:17 <lambdabot> "3.1415929203539823008849557522123893805309734513274336283185840707964601769...
05:04:51 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
05:18:43 × shriekingnoise quits (~shrieking@186.137.144.80) (Quit: Quit)
05:20:35 coot joins (~coot@89-64-85-93.dynamic.chello.pl)
05:23:06 alx741 joins (~alx741@157.100.93.160)
05:24:04 phma_ joins (phma@2001:5b0:210f:4b78:b1e:6610:21b4:b15b)
05:24:35 <Axman6> what's the right way to say I want to build my cabal project with -Wall these days? Is it something that goes in the cabal.project file?
05:24:54 vicfred joins (~vicfred@user/vicfred)
05:25:50 <dibblego> I put it in the cabal file
05:26:07 <dibblego> https://gitlab.com/tonymorris/aviation-navigation/-/blob/master/aviation-navigation.cabal#L57
05:27:09 × phma quits (phma@2001:5b0:210f:4b78:b1e:6610:21b4:b15b) (Ping timeout: 250 seconds)
05:28:26 × acowley quits (~acowley@c-68-83-22-43.hsd1.nj.comcast.net) (Ping timeout: 260 seconds)
05:28:27 × mjs2600 quits (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) (Ping timeout: 250 seconds)
05:28:33 acowley joins (~acowley@c-68-83-22-43.hsd1.nj.comcast.net)
05:29:23 mjs2600 joins (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net)
05:30:31 <Axman6> it feels like a cabal.project thing to me, since users of the library don't really need to know about -Wall from my package, but when building the project I'd like to have it
05:34:16 × bitmapper quits (uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity)
05:36:54 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
05:37:37 × Inst quits (~Inst@2601:6c4:4080:3f80:d9b5:7230:29a1:ab4d) (Ping timeout: 240 seconds)
05:40:02 <jackdk> Axman6: https://cabal.readthedocs.io/en/latest/cabal-project.html#package-configuration-options
05:42:30 × ikke quits (~kevin@delta.ikke.info) (Changing host)
05:42:30 ikke joins (~kevin@alpine/developer/ikke)
05:42:42 <Axman6> yeah I looked at that, and added a package my-package\n flags: -Wall and it didn't work
05:42:52 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
05:44:42 <Axman6> hmm, I may be an idiot...one sec
05:45:40 iqubic joins (~user@2601:602:9502:c70:3682:5ffe:e458:d665)
05:45:43 <Axman6> I am, all good. I needed ghc-options: not flags:, obviously
05:47:21 jinsun__ is now known as jinsun
05:47:34 <Axman6> "Unrecognized field 'optimisation' on line 3" <- I am not ok with this, whatever happened to our recognition of the correcting spellings of the English language
05:47:50 <iqubic> I have "Data Bit = Zero | One". Can I use megaparsec to parse a [Bit]?
05:48:47 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
05:49:04 geekosaur joins (~geekosaur@xmonad/geekosaur)
05:51:41 <dibblego> yes
05:52:58 <iqubic> I see. How does it work?
05:55:12 × tom_ quits (~tom@2a00:23c8:970c:4801:f5c6:93c3:2f5e:e0) (Read error: Connection reset by peer)
05:55:12 × tom__ quits (~tom@2a00:23c8:970c:4801:5b6a:e81b:79dc:f684) (Read error: Connection reset by peer)
05:55:19 tom__ joins (~tom@host86-151-99-97.range86-151.btcentralplus.com)
05:56:11 zincy joins (~tom@2a00:23c8:970c:4801:f5c6:93c3:2f5e:e0)
06:06:34 alx741 joins (~alx741@157.100.93.160)
06:10:57 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
06:12:37 bahamas joins (~lucian@84.232.140.13)
06:13:13 × slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving)
06:18:10 takuan joins (~takuan@178-116-218-225.access.telenet.be)
06:18:10 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
06:19:11 × sprout quits (~quassel@2a02:a467:ccd6:1:558b:2015:9c55:ace3) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
06:19:46 chomwitt joins (~chomwitt@2a02:587:dc19:a500:12c3:7bff:fe6d:d374)
06:19:57 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 240 seconds)
06:24:22 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
06:29:26 gentauro joins (~gentauro@user/gentauro)
06:29:31 gentauro_ joins (~gentauro@185.107.12.141)
06:32:18 <EvanR> "it works quite well actually"
06:33:50 <int-e> > unwords $ map (\x -> printf "%.2f" (197-x/32)) [6208,6185,6132,6048,6012,5987,5980,5958,5906,5855]
06:33:52 <lambdabot> "3.00 3.72 5.38 8.00 9.12 9.91 10.12 10.81 12.44 14.03"
06:34:47 <int-e> Apart from not being fluent at writing parsers... I really hated today's specification.
06:35:11 <EvanR> iqubic, look at e.g. many :: Parsec a -> Parsec [a], or manyTill, or ...
06:35:25 <iqubic> I see.
06:35:55 <EvanR> apparently those were moved to parser-combinators
06:36:09 alx741 joins (~alx741@157.100.93.160)
06:36:24 <int-e> :t many
06:36:25 <lambdabot> Alternative f => f a -> f [a]
06:36:30 <int-e> shouldn't that one work?
06:36:34 × dcoutts_ quits (~duncan@71.78.6.51.dyn.plus.net) (Ping timeout: 260 seconds)
06:36:36 <int-e> (from Control.Applicative)
06:36:54 <EvanR> yeah that might be the grand daddy of many
06:37:24 <int-e> though that doesn't give you manyTill
06:38:11 <EvanR> (you probably don't need manyTill today sir)
06:40:35 × bahamas quits (~lucian@84.232.140.13) (Ping timeout: 256 seconds)
06:43:23 <int-e> (you need something else that's a bit awkward though)
06:44:11 <EvanR> i cheated and forgot to use monads to parse the bits
06:44:24 <EvanR> letting me do _whatever i want wahahaha_
06:45:37 <int-e> EvanR: I also "forgot" but that didn't stop me from struggling a bit
06:46:36 <int-e> it's not like you can save a whole lot of code anyway; there's no backtracking or other complicated choices to make
06:46:58 <EvanR> parsers are apparently a lot easier when they can't fail xD
06:47:51 × xff0x quits (~xff0x@2001:1a81:530f:c500:fcf0:ff87:e783:c227) (Ping timeout: 245 seconds)
06:48:16 <int-e> silly excerpt: https://paste.debian.net/1223675/
06:48:38 <int-e> yes they are
06:48:38 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
06:48:43 xff0x joins (~xff0x@port-92-195-102-89.dynamic.as20676.net)
06:49:18 <EvanR> lol nice
06:49:36 <EvanR> impostor monad
06:50:07 <int-e> I know :)
06:51:08 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Remote host closed the connection)
06:51:34 <EvanR> good one to show people who think haskell syntax is confusing
06:51:49 <int-e> well, they're right.
06:52:31 ProfSimm joins (~ProfSimm@87.227.196.109)
06:53:40 <int-e> This isn't a unique propert of Haskell. It's true for all programming languages until you've learned them, or at least another one that is similar.
06:53:49 × emf quits (~emf@2620:10d:c091:480::1:305b) (Ping timeout: 268 seconds)
06:54:08 <int-e> Sadly we live in a world where everyone knows something-similar-to-C
06:54:39 <EvanR> "what the hell does 10 print hello world 20 goto 10 do" said no one ever xD
06:55:11 Minnozz parts (~minnozz@salix.minnozz.com) (WeeChat 2.8)
06:55:39 <int-e> print "hello, world" raises few questions (except maybe, does it work when there's no paper in the printer?). The "goto 10" takes a bit of understanding.
06:55:58 × Sgeo_ quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
06:56:08 <EvanR> yeah, if you leave off that critical first 10
06:56:23 <EvanR> we're all screwed if you do that
06:56:39 <int-e> Well the 10 is confusing at first, too.
06:57:24 <int-e> The thing about learning programming as a teenager though is that it's just one of many confusing things in the world... it doesn't feel all that special.
07:00:42 × img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
07:02:34 arahael joins (~arahael@203.158.51.1)
07:03:26 chele joins (~chele@user/chele)
07:04:40 <int-e> EvanR: I used to write this kind of thing with `let`, but then I couldn't shadow `xs`, so I'd have xs', xs'' and eventually mix some of these up. This abuse of guards is actually convenient.
07:05:05 <EvanR> oh yeah
07:05:17 <EvanR> i hate prime, prime prime, etc
07:06:14 <int-e> the main downside is that the bindings become invisible to `where`
07:06:21 <EvanR> someone should invent a language or entire paradigm based on just replacing variables on assignment
07:06:53 <int-e> Rust kind of does that for things that can't be copied.
07:07:06 alx741 joins (~alx741@157.100.93.160)
07:08:05 img joins (~img@user/img)
07:08:11 steven1 joins (~steven@172.92.136.203)
07:08:51 <EvanR> what's an example of a thing that can't be copied
07:11:05 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
07:11:55 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
07:12:51 <EvanR> the terminology must mean something specific in rust, maybe
07:15:04 dcoutts_ joins (~duncan@ip-185-104-136-51.ptr.icomera.net)
07:17:17 × Neuromancer quits (~Neuromanc@user/neuromancer) (Ping timeout: 240 seconds)
07:18:38 <int-e> EvanR: Meh it's non-intuitive because Rust cares a lot about tracking ownership of in-memory objects. So for example, you can't have two references to the same object that allow mutation; that's the basic example of something that can't be copied.
07:19:17 <int-e> It has a type-class-like system in the form of traits, and there's a Copy trait that only types that can be copied implement.
07:19:21 <EvanR> ok the reference can't be copied
07:19:28 <EvanR> not allowed
07:19:31 × phma_ quits (phma@2001:5b0:210f:4b78:b1e:6610:21b4:b15b) (Read error: Connection reset by peer)
07:20:10 <int-e> Yeah, it's enforced by the compiler, part of the system that's responsible for Rust's advertised memory-safeness.
07:20:14 int-e shrugs.
07:20:18 phma_ joins (~phma@host-67-44-208-226.hnremote.net)
07:20:56 <EvanR> so you can copy that mutable object, you just have to have the pointer first
07:21:10 <int-e> This isn't the right channel to discuss it (also I'm still learning this, so I'm not good at explaining it yet)
07:21:27 <EvanR> fair
07:31:37 dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be)
07:32:23 featurebug108 joins (~featurebu@49.205.122.91)
07:32:25 perrierjouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca)
07:34:02 <featurebug108> Hi! I tried to do stack install on this project - https://github.com/grin-compiler/ghc-whole-program-compiler-project/tree/master/external-stg-interpreter but I am getting this error - https://pastebin.com/HVzUFLBw . Any idea what the error is and how to fix it?
07:35:45 × Ferdirand quits (~somebody@2001:4c78:2012:5000::2) (Ping timeout: 268 seconds)
07:37:24 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
07:37:29 Ferdirand joins (~somebody@2001:4c78:2012:5000::2)
07:38:59 lortabac joins (~lortabac@2a01:e0a:541:b8f0:f0a9:34f0:2c07:30d5)
07:41:55 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 268 seconds)
07:42:00 × featurebug108 quits (~featurebu@49.205.122.91) (Quit: Leaving)
07:43:55 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
07:48:00 jgeerds joins (~jgeerds@55d4ac73.access.ecotel.net)
07:48:55 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
07:56:46 cosimone joins (~user@93-47-229-223.ip115.fastwebnet.it)
07:59:07 bahamas joins (~lucian@86.120.77.115)
07:59:31 <Hecate> < Axman6> Hecate: isn't that soimething that pg_config can do for you? // I wish it did… :( :( :(
07:59:53 Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de)
08:00:21 alx741 joins (~alx741@157.100.93.160)
08:01:50 michalz joins (~michalz@185.246.204.104)
08:07:32 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
08:17:27 iqubic` joins (~user@2601:602:9502:c70:1ab:7e18:1540:e9a6)
08:17:44 × iqubic` quits (~user@2601:602:9502:c70:1ab:7e18:1540:e9a6) (Remote host closed the connection)
08:17:44 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
08:20:07 Akiva joins (~Akiva@user/Akiva)
08:21:17 × iqubic quits (~user@2601:602:9502:c70:3682:5ffe:e458:d665) (Ping timeout: 240 seconds)
08:22:22 × cosimone quits (~user@93-47-229-223.ip115.fastwebnet.it) (Remote host closed the connection)
08:22:44 iqubic joins (~user@2601:602:9502:c70:1ab:7e18:1540:e9a6)
08:22:58 cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20)
08:25:45 max22- joins (~maxime@2a01cb0883359800fd9f63ef34845b1d.ipv6.abo.wanadoo.fr)
08:27:41 × dcoutts_ quits (~duncan@ip-185-104-136-51.ptr.icomera.net) (Ping timeout: 256 seconds)
08:29:14 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
08:30:05 <YoungFrog> I
08:35:51 alx741 joins (~alx741@157.100.93.160)
08:39:31 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
08:40:09 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
08:41:17 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
08:41:56 × img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
08:44:32 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 240 seconds)
08:45:09 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
08:47:26 × dwt_ quits (~dwt_@c-98-198-103-176.hsd1.tx.comcast.net) (Quit: ZNC 1.8.2 - https://znc.in)
08:47:44 dwt_ joins (~dwt_@c-98-198-103-176.hsd1.tx.comcast.net)
08:48:43 lavaman joins (~lavaman@98.38.249.169)
08:49:26 cfricke joins (~cfricke@user/cfricke)
08:49:30 machinedgod joins (~machinedg@24.105.81.50)
08:51:22 img joins (~img@user/img)
08:52:08 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
08:52:35 waleee joins (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4)
08:53:39 acidjnk joins (~acidjnk@p200300d0c7271e9405040680e1e3c542.dip0.t-ipconnect.de)
08:55:19 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
08:55:36 featurebug joins (~featurebu@49.205.122.91)
08:57:28 × lavaman quits (~lavaman@98.38.249.169) (Read error: Connection reset by peer)
08:57:57 phma_ is now known as phma
08:58:55 lavaman joins (~lavaman@98.38.249.169)
09:00:35 jakalx parts (~jakalx@base.jakalx.net) ()
09:06:19 jakalx joins (~jakalx@base.jakalx.net)
09:06:59 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) (Remote host closed the connection)
09:09:09 × steven1 quits (~steven@172.92.136.203) (Quit: WeeChat 3.2)
09:10:07 × jle` quits (~jle`@cpe-23-240-75-236.socal.res.rr.com) (Ping timeout: 250 seconds)
09:11:55 jle` joins (~jle`@cpe-23-240-75-236.socal.res.rr.com)
09:17:18 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
09:17:42 geekosaur joins (~geekosaur@xmonad/geekosaur)
09:18:29 bollu joins (uid233390@id-233390.helmsley.irccloud.com)
09:19:26 × bahamas quits (~lucian@86.120.77.115) (Quit: Lost terminal)
09:23:43 × ubert quits (~Thunderbi@p200300ecdf1abb03cc2914e8ae945344.dip0.t-ipconnect.de) (Remote host closed the connection)
09:26:00 Guest24 joins (~Guest24@2a02:c7f:f716:ac00:195c:86b6:8540:d1a5)
09:27:59 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
09:29:12 × tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
09:32:30 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
09:38:44 × raghavgururajan quits (9fd51d1ea8@user/raghavgururajan) (Remote host closed the connection)
09:40:27 × ishutin quits (~ishutin@85-238-77-101.pool.digikabel.hu) (Ping timeout: 250 seconds)
09:41:56 RiverNotHere joins (~RiverNotH@cpe-104-172-51-133.socal.res.rr.com)
09:42:19 ishutin joins (~ishutin@78-131-74-101.pool.digikabel.hu)
09:43:03 × RiverNotHere quits (~RiverNotH@cpe-104-172-51-133.socal.res.rr.com) (Client Quit)
09:48:35 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
09:48:53 alx741 joins (~alx741@157.100.93.160)
09:49:41 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 252 seconds)
09:53:02 × mvk quits (~mvk@2607:fea8:5cdd:f000::9788) (Ping timeout: 260 seconds)
09:53:13 Ainoretho joins (~ypw@huji-132-64-244-111.xt.huji.ac.il)
09:54:59 ubert joins (~Thunderbi@2a02:8109:9880:303c:c4a4:d039:7d:7f7e)
09:57:50 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
10:00:26 × mason0 quits (~bc8147f2@cerf.good1.com) (Quit: CGI:IRC (Session timeout))
10:03:26 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
10:06:57 × tomku quits (~tomku@user/tomku) (Read error: Connection reset by peer)
10:07:24 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:dc75:5436:188a:4913)
10:09:45 dyeplexer joins (~dyeplexer@user/dyeplexer)
10:11:37 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:dc75:5436:188a:4913) (Ping timeout: 240 seconds)
10:13:58 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
10:15:41 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
10:17:03 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 256 seconds)
10:17:03 Lord_of_Life_ is now known as Lord_of_Life
10:18:45 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 256 seconds)
10:20:40 madjestic joins (~madjestic@88-159-247-120.fixed.kpn.net)
10:21:26 alx741 joins (~alx741@157.100.93.160)
10:23:07 tomku joins (~tomku@user/tomku)
10:24:51 × forell quits (~forell@user/forell) (Quit: ZNC - https://znc.in)
10:25:38 forell joins (~forell@user/forell)
10:27:27 × andjjj23 quits (~irc@107.170.228.47) (Ping timeout: 250 seconds)
10:27:45 andjjj23 joins (~irc@107.170.228.47)
10:31:21 mc47 joins (~mc47@xmonad/TheMC47)
10:32:59 × leah2 quits (~leah@vuxu.org) (Quit: trotz alledem!)
10:33:09 leah2 joins (~leah@vuxu.org)
10:33:09 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
10:33:11 × ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection)
10:33:30 ProfSimm joins (~ProfSimm@87.227.196.109)
10:37:53 <merijn> hmm, what's the way to go to run a megaparsec parser against a stream that's parsed by another megaparsec parser?
10:38:31 <merijn> I see I can define my own stream class, but the only way that works is if I produce a list or something and then parse that, which seems inefficient
10:47:10 × cheater quits (~Username@user/cheater) (Ping timeout: 260 seconds)
10:50:06 × Guest24 quits (~Guest24@2a02:c7f:f716:ac00:195c:86b6:8540:d1a5) (Quit: Client closed)
10:50:19 <[exa]> merijn: it should be able to consume anything as long as it has the class instances
10:50:47 cheater joins (~Username@user/cheater)
10:51:01 alx741 joins (~alx741@157.100.93.160)
10:51:37 <[exa]> anyway, why would the list be inefficient?
10:55:38 SummerSonw joins (~The_viole@203.77.49.232)
10:56:20 × ubert quits (~Thunderbi@2a02:8109:9880:303c:c4a4:d039:7d:7f7e) (Remote host closed the connection)
10:56:32 ubert joins (~Thunderbi@2a02:8109:9880:303c:9285:9698:be15:2e15)
10:57:03 × ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection)
10:57:22 ProfSimm joins (~ProfSimm@87.227.196.109)
10:58:25 <merijn> because it effectively ends up being two pass
10:58:39 <merijn> You parse the entire input and force the list in memory before you can run the other parser
10:59:02 <merijn> While I wanna use a megaparsec parser to lex the input into a stream of more usable stuff
10:59:12 <merijn> then parse that stream
10:59:38 <[exa]> (parse1 <$> parse2 input) doesn't fuse?
10:59:40 <[exa]> ._.
11:01:23 <merijn> [exa]: That case is to complex for me to make any predictions about whether it will or won't
11:04:07 random joins (~random@46.254.129.95)
11:04:11 <Profpatsch> Huh, I just noticed that Text.IO.readFile does not correctly handle UTF-8 Byte-Order marks?
11:04:14 <[exa]> can you model `parse2` as something like `parseTokenAndReturnRest` then fold on it?
11:04:16 random is now known as Guest2110
11:04:27 × joo-_ quits (~joo-_@fsf/member/joo--) (Quit: Lost terminal)
11:04:32 × jgeerds quits (~jgeerds@55d4ac73.access.ecotel.net) (Ping timeout: 240 seconds)
11:04:50 joo-_ joins (~joo-_@87-49-45-77-mobile.dk.customer.tdc.net)
11:04:50 × joo-_ quits (~joo-_@87-49-45-77-mobile.dk.customer.tdc.net) (Changing host)
11:04:50 joo-_ joins (~joo-_@fsf/member/joo--)
11:05:02 <[exa]> Profpatsch: utf8 needs BOM?
11:05:45 <Profpatsch> [exa]: No, but Windows will prepend three bytes of BOM to their unicode files
11:05:57 <Profpatsch> So I’d expect Text.IO to know about that
11:05:58 <Guest2110> hey guys
11:06:02 <Profpatsch> Maybe I’m wrong
11:06:05 <Guest2110> can anyone lend a hand with Generics
11:06:08 <Profpatsch> I’ll just strip them I guess
11:06:09 <Guest2110> is this possible?
11:06:10 <Guest2110> https://pastebin.com/7egxTXy0
11:06:55 <[exa]> Profpatsch: check out GHC.IO.Encoding, but generally I wouldn't expect Text to really handle that
11:06:56 CiaoSen joins (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
11:08:25 <Profpatsch> I mean to be sure it’s a bit specific to Windows madness
11:08:35 <Profpatsch> & Text.dropWhile (== byteOrderMark)
11:08:38 <Profpatsch> should fix it
11:08:49 <Profpatsch> let byteOrderMark = '\65279'
11:09:39 <[exa]> yeah Windows doesn't really help there. :]
11:10:17 <[exa]> Guest2110: you might be able to find `everywhere` function, which sounds like what you want
11:11:14 <merijn> Profpatsch: UTF-8 BOM is an insane MS atrocity and the moron who came up with that should be shot
11:11:58 <[exa]> Guest2110: highly suggest you have a look at SYB paper. The combination with classes should work out too, with a bit of care.
11:12:25 <[exa]> merijn: thanks, I didn't want to say this first. :D
11:12:45 <merijn> Profpatsch: Check if the new utf-8 based text RC supports it?
11:13:21 <Guest2110> [exa]: I'll look into `everywhere`, thanks!
11:13:26 × ByronJohnson quits (~bairyn@50-250-232-19-static.hfc.comcastbusiness.net) (Ping timeout: 268 seconds)
11:14:18 <Guest2110> [exa]: ah, that's different from what I need, `everywhere` is `a -> a` and I don't have an `a` available, just need to extract some metadata from a type
11:14:31 × cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Remote host closed the connection)
11:15:23 mmhat joins (~mmh@55d46fe9.access.ecotel.net)
11:15:34 mason0 joins (~bc8147f2@cerf.good1.com)
11:17:14 <[exa]> Guest2110: yes there are other functions for that, I just don't remember the precise names
11:17:26 <Guest2110> [exa]: on it, thanks a lot again!
11:19:01 <[exa]> Guest2110: you might like "everything", only the type is a bit obscure
11:19:25 <[exa]> it's basically the one that works with `mkQ` or `makeQuery` from the SYB paper, not sure what was the precise name anymore
11:19:39 <[exa]> but basically you can have stuff like `everything + (
11:19:39 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
11:19:45 <[exa]> oh snap
11:20:10 <Guest2110> [exa]: I need to get my reading glasses because there's some huge gaps to be filled haha
11:20:17 <[exa]> `everything (+) (\MyDataPiece x -> intval x) myStruct`
11:20:41 <[exa]> (very roughly)
11:22:41 <[exa]> the paper here https://ldpreload.com/p/syb/hmap.pdf , getting roughly to sections ~3.3 to 4.1 should solve your problem
11:23:25 × joo-_ quits (~joo-_@fsf/member/joo--) (Quit: leaving)
11:23:26 <[exa]> + Typeable and Data instances are generated by GHC (you just need to write the `deriving` for it
11:23:33 <[exa]> )
11:23:38 joo-_ joins (~joo-_@fsf/member/joo--)
11:26:17 × Akiva quits (~Akiva@user/Akiva) (Ping timeout: 240 seconds)
11:27:16 sprout joins (~quassel@2a02:a467:ccd6:1:7c88:97e7:7c77:1c93)
11:27:56 × Guest6030 quits (~pyon@2800:200:e840:42c7:c75:c5f:d434:a5f1) (Quit: WeeChat 3.3)
11:28:21 unyu joins (~pyon@user/pyon)
11:30:38 <sprout> https://pasteboard.co/TJarPW9Gt0Zz.png <- AoC, day 16, task 2. egel
11:31:53 × ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection)
11:32:43 nattiestnate joins (~nate@2001:448a:20a0:4134:25e:715f:d637:5263)
11:33:19 × nattiestnate quits (~nate@2001:448a:20a0:4134:25e:715f:d637:5263) (Client Quit)
11:37:26 alx741 joins (~alx741@157.100.93.160)
11:41:54 × jonathanx_ quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
11:42:11 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
11:42:13 jonathanx_ joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
11:43:45 × dsrt^ quits (~dsrt@98.188.240.142) (Ping timeout: 256 seconds)
11:45:15 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
11:46:02 jakalx joins (~jakalx@base.jakalx.net)
11:48:04 × cheater quits (~Username@user/cheater) (Quit: BitchX: use it, it makes you bulletproof)
11:51:58 × perrierjouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 3.3)
11:52:13 × kayvank quits (~user@52-119-115-185.PUBLIC.monkeybrains.net) (Remote host closed the connection)
11:54:37 perrierjouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca)
11:55:48 cheater joins (~Username@user/cheater)
11:58:17 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
11:59:08 earendel joins (uid498179@user/earendel)
11:59:26 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
12:00:28 × n3t quits (~n3t@s45.mydevil.net) (Changing host)
12:00:28 n3t joins (~n3t@user/n3t)
12:02:55 alx741 joins (~alx741@157.100.93.160)
12:06:02 cosimone joins (~user@93-47-229-223.ip115.fastwebnet.it)
12:10:10 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
12:10:45 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
12:11:54 × asm quits (~alexander@burner.asm89.io) (Changing host)
12:11:54 asm joins (~alexander@user/asm)
12:13:38 __monty__ joins (~toonn@user/toonn)
12:13:57 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
12:14:33 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
12:14:56 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
12:15:37 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
12:16:02 jippiedoe joins (~david@145.107.128.124)
12:16:07 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
12:16:31 × acidjnk quits (~acidjnk@p200300d0c7271e9405040680e1e3c542.dip0.t-ipconnect.de) (Read error: Connection reset by peer)
12:16:33 fef joins (~thedawn@user/thedawn)
12:16:58 terrorjack joins (~terrorjac@2a01:4f8:1c1e:509a::1)
12:17:20 jgeerds joins (~jgeerds@55d4ac73.access.ecotel.net)
12:18:44 acidjnk joins (~acidjnk@p200300d0c7271e942878552e9699ebb2.dip0.t-ipconnect.de)
12:19:33 kuribas joins (~user@ptr-25vy0i8a8smuqmxkytj.18120a2.ip6.access.telenet.be)
12:23:01 somkls^ joins (~somkls@wsip-98-188-240-142.mc.at.cox.net)
12:25:37 × awpr quits (uid446117@id-446117.lymington.irccloud.com) (Quit: Connection closed for inactivity)
12:25:53 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
12:26:59 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
12:27:53 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
12:29:05 × doyougnu quits (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
12:31:21 pavonia joins (~user@user/siracusa)
12:31:57 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
12:32:30 alx741 joins (~alx741@157.100.93.160)
12:32:56 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
12:34:16 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
12:37:44 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
12:38:02 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
12:38:23 × Ainoretho quits (~ypw@huji-132-64-244-111.xt.huji.ac.il) (Quit: WeeChat 3.3)
12:38:53 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
12:42:38 pfurla_ joins (~pfurla@2804:18:5827:38:71a1:6773:333f:330d)
12:43:39 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
12:44:19 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
12:44:23 × pfurla quits (~pfurla@177.25.189.1) (Ping timeout: 256 seconds)
12:44:27 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
12:47:47 × Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 268 seconds)
12:49:29 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
12:50:14 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
12:51:41 cadro joins (~cadro@65.0.broadband17.iol.cz)
12:52:05 <dminuoso> sprout: Can you provide some meaningful example where eager combinator rewriting offers an advantage over say what Haskell has?
12:52:44 <cadro> I'm working on a multi-threaded program, and one of the threads' computation halts unexpectedly. I suspect it's blocked on a blackhole (as I'm doing some knot tying and clearly getting it wrong). How can I figure out what it's waiting for?
12:52:57 × sleblanc quits (~sleblanc@user/sleblanc) (Ping timeout: 240 seconds)
12:53:18 <cadro> "halts" as in "doesn't proceed" (but no error message)
12:53:18 <sprout> it's more predictable. sometimes haskell programs explode unexpectedy. and the other is that I can abuse the predicatibility for say, threads which hold on to a lock
12:53:34 <sprout> when the lock goes out of scope the lock is released
12:53:43 <dminuoso> cadro: If you reenter a black hole, the RTS should immediately exit and produce a diagnostic.
12:54:03 <hpc> dminuoso: in the threaded runtime it doesn't, because another thread can potentially break the loop
12:54:14 <dminuoso> hpc: Oh really?
12:54:26 <hpc> also because it could just be two threads entering the same thunk
12:54:57 <hpc> try compiling a loop normally and with -threaded
12:55:09 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 256 seconds)
12:55:10 × puke quits (~puke@user/puke) (Remote host closed the connection)
12:55:28 puke joins (~puke@user/puke)
12:55:53 <dminuoso> cadro: You could run from GHCI, set -fbreak-on-error, and run using `:trace`. Then you can send SIGINT via C-c and then use GHCi to explore?
12:56:07 <dminuoso> That might give you an indication of where you are and how you got to that
12:56:13 <dminuoso> Just a thought
12:56:23 <hpc> hmm, except when i try it now i can't get it to stop printing <<loop>>
12:56:36 <hpc> maybe i am misrembering, or it's changed "recently"
12:56:58 <cadro> dminuoso: hmm I might try that, although I'm not particularly fond of this because it'll take me a while to run this behemoth from GHCI...
12:56:58 <geekosaur> behavior varies per release ime
12:57:26 <hpc> i also just did print (let x = x +1 in x), so maybe that's too trivial
12:57:26 <geekosaur> -fobject-code? although that might impact the information you get from breakpoints
12:57:50 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 260 seconds)
12:59:15 × coot quits (~coot@89-64-85-93.dynamic.chello.pl) (Quit: coot)
12:59:56 coot joins (~coot@89-64-85-93.dynamic.chello.pl)
13:00:30 alx741 joins (~alx741@157.100.93.160)
13:03:01 <dminuoso> hpc: But it seems to make sense now that I think about it.
13:03:08 <dminuoso> A different thread should be blocked
13:03:20 slowButPresent joins (~slowButPr@user/slowbutpresent)
13:04:17 × madjestic quits (~madjestic@88-159-247-120.fixed.kpn.net) (Ping timeout: 240 seconds)
13:06:17 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
13:07:12 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
13:08:17 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Ping timeout: 240 seconds)
13:10:13 × max22- quits (~maxime@2a01cb0883359800fd9f63ef34845b1d.ipv6.abo.wanadoo.fr) (Ping timeout: 240 seconds)
13:12:27 × iqubic quits (~user@2601:602:9502:c70:1ab:7e18:1540:e9a6) (Remote host closed the connection)
13:13:15 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
13:15:25 ByronJohnson joins (~bairyn@50-250-232-19-static.hfc.comcastbusiness.net)
13:15:41 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
13:18:23 × featurebug quits (~featurebu@49.205.122.91) (Ping timeout: 256 seconds)
13:19:57 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 240 seconds)
13:20:11 vpan joins (~0@212.117.1.172)
13:21:26 × CiaoSen quits (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
13:25:51 <merijn> There was no "strong" combinator in base, was there?
13:26:55 iqubic joins (~user@2601:602:9502:c70:c1df:76dd:a2c3:7b85)
13:29:09 × dyeplexer quits (~dyeplexer@user/dyeplexer) (Ping timeout: 256 seconds)
13:29:37 alx741 joins (~alx741@157.100.93.160)
13:35:11 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
13:37:04 madjestic joins (~madjestic@88-159-247-120.fixed.kpn.net)
13:39:27 × cadro quits (~cadro@65.0.broadband17.iol.cz) (Quit: Client closed)
13:42:36 × madjestic quits (~madjestic@88-159-247-120.fixed.kpn.net) (Quit: Reconnecting)
13:42:45 × jippiedoe quits (~david@145.107.128.124) (Ping timeout: 256 seconds)
13:42:48 madjestic joins (~madjestic@88-159-247-120.fixed.kpn.net)
13:43:58 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.3)
13:49:20 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
13:49:57 × mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
13:51:33 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
13:53:04 alx741 joins (~alx741@157.100.93.160)
13:56:10 Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de)
13:56:13 × coot quits (~coot@89-64-85-93.dynamic.chello.pl) (Quit: coot)
13:58:07 ProfSimm joins (~ProfSimm@87.227.196.109)
13:58:08 <dminuoso> merijn: What type signature would that have?
13:58:35 <merijn> dminuoso: "Applicative f => (f a, b) -> f (a, b)"
13:59:24 <dminuoso> merijn: Why does this need Applicative?
13:59:39 ph88 joins (~ph88@ip5f5af068.dynamic.kabel-deutschland.de)
13:59:42 <dminuoso> It seems this would work for all Functor
13:59:44 <merijn> oh, I guess Functor is enough
14:00:56 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
14:01:39 <iqubic> f (fa, b) = fmap (\x -> (x, b)) fa, right?
14:01:49 <dminuoso> Yes.
14:02:32 <merijn> iqubic: Sure, but I need it so often that a convenient name would be nice
14:02:49 <iqubic> I'm not sure what you should call it.
14:02:49 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
14:03:06 <merijn> Well, strong, since that's the CT name I know for it :p
14:04:42 curiousgay joins (~curiousga@77-120-141-90.kha.volia.net)
14:05:14 × xsperry quits (~xs@user/xsperry) (Remote host closed the connection)
14:05:21 shriekingnoise joins (~shrieking@186.137.144.80)
14:05:25 <iqubic> Strong is good. If you have Sum types, you can use Choice.
14:05:51 × vicfred quits (~vicfred@user/vicfred) (Quit: Leaving)
14:05:52 × SummerSonw quits (~The_viole@203.77.49.232) (Remote host closed the connection)
14:06:14 SummerSonw joins (~The_viole@203.77.49.232)
14:06:14 × SummerSonw quits (~The_viole@203.77.49.232) (Client Quit)
14:06:29 SummerSonw joins (~The_viole@203.77.49.232)
14:07:26 <dminuoso> iqubic: The term strength is used because your `f` is the canonical categorical strength that all functors have.
14:07:39 <dminuoso> or tensorials srength, rather
14:07:42 <dminuoso> gah.
14:07:44 <dminuoso> tensorial strength
14:07:51 × sprout quits (~quassel@2a02:a467:ccd6:1:7c88:97e7:7c77:1c93) (Ping timeout: 245 seconds)
14:08:22 <iqubic> I see. All I know is that the profunctor package has Strong and Choice as things. And those can be used me make lenses and prims. jle` has a blog post on it.
14:08:32 <dminuoso> yeah, the name of Strong is derived from this as well
14:09:08 <iqubic> s/things/typeclasses with a Profuctor constraint/
14:09:45 max22- joins (~maxime@2a01cb0883359800742a76b71025b974.ipv6.abo.wanadoo.fr)
14:10:54 <raehik> I have a type that lets me decide on the inner type for a functor: data Apply a f = Apply (f a)
14:11:11 <iqubic> Seems reasonable.
14:11:15 <raehik> Is there something like that in a library or in base? I can't Hoogle it for some reason
14:14:26 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
14:16:58 <dminuoso> raehik: Mmm, one variant of is is prominently found in lens
14:17:10 <dminuoso> type Lens s t a b = forall f . Functor f => (a -> f b) -> s -> f t
14:17:24 xsperry joins (~xs@user/xsperry)
14:17:33 × somkls^ quits (~somkls@wsip-98-188-240-142.mc.at.cox.net) (Remote host closed the connection)
14:17:41 <dminuoso> So this thing is polymorphic over any Functor, and in most instances the consumer would pick either Const or Identity
14:18:43 jippiedoe joins (~david@145.89.5.239)
14:18:57 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
14:20:37 alx741 joins (~alx741@157.100.93.160)
14:20:57 sprout joins (~quassel@2a02:a467:ccd6:1:7c88:97e7:7c77:1c93)
14:21:58 <raehik> dminuoso: right, I think I see that. I'll look around the lens docs. probably will rename to be problem specific first (espec. if the thing it generalizes to is lenses)
14:22:22 <dminuoso> raehik: Something like Apply I havent seen yet, and Im not sure this would yield much benefit.
14:22:47 <raehik> indeed it was just a type that I needed (I think)
14:22:55 <dminuoso> Mind my asking, what for?
14:23:01 <raehik> I want a list of functors over a given type
14:23:16 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 245 seconds)
14:23:17 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
14:23:51 <dminuoso> Sure, but why do you think you need a separate data type for that?
14:24:04 <raehik> this way lets me use `Apply a` with vinyl like `Rec (Apply String) '[Identity, Const ()]`
14:24:16 dyeplexer joins (~dyeplexer@user/dyeplexer)
14:24:16 <merijn> ok...I don't understand how to implement megaparsec's TraversableStream...
14:24:19 <dminuoso> % f :: Functor f => [f a] -> Int; f = undefined
14:24:19 <yahb> dminuoso:
14:24:51 <dminuoso> raehik: Okay I cant help any further then. Have no vinyl knowledge whatsoever.
14:25:02 <merijn> Anyone got any clues?
14:25:46 <raehik> dminuoso: I don't need vinyl! only picked it up because it seemed to fit. the best solution for me would be the simplest
14:25:47 × sprout quits (~quassel@2a02:a467:ccd6:1:7c88:97e7:7c77:1c93) (Ping timeout: 252 seconds)
14:26:04 <dminuoso> raehik: What is the general problem you are trying to solve?
14:26:28 <dminuoso> vinyl seems like quite an extreme hammer if you dont otherwise want it precisely because of what it can do..
14:26:49 <raehik> I'd like to define a list of different functors over a given type, so I can strip them off one by one (and potentially change the concrete type)
14:27:14 <dminuoso> "list of different functors over a given type"
14:27:30 <dminuoso> As in '[[], Identity, IO] ?
14:28:24 <raehik> yeah. though the usage is specifically for defining some "metadata" on `a`, so the functors will be mostly record types that may or may not use a
14:28:39 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
14:29:04 <dminuoso> I see.
14:29:18 <dminuoso> So roughly '[Tagged "foo", Tagged "bar", Tagged "quux"] ?
14:29:19 <raehik> My original solution was to nest them. But that means ordering them in a certain way, made something a little awkward
14:29:33 burnsidesLlama joins (~burnsides@dhcp168-016.wadham.ox.ac.uk)
14:30:17 <raehik> perhaps? I need to check what Tagged is
14:30:52 <dminuoso> % newtype Tagged (t :: k) a = Tagged { unTagged :: a }
14:30:52 <yahb> dminuoso:
14:31:23 <dminuoso> Anyway, this is all too sketchy and not clear to me
14:32:35 <raehik> thank you very much for the help, it is sketchy to me too hah
14:33:34 <raehik> fundamentally I want to go from having to nest functors on a given type a to having a "flat" list of them instead
14:34:29 <dminuoso> Oh.
14:34:31 <raehik> nesting them was easy, I just wrote my "metadata" functors to have an "inner metadata" field. but it's not ideal
14:34:44 × SummerSonw quits (~The_viole@203.77.49.232) (Quit: Leaving)
14:35:10 <raehik> I figured with a list of functors over a, I could strip any one in any order (and it would do something to some type outside the list)
14:35:16 <dminuoso> What kind of metadata functors are these?
14:35:52 <raehik> hope you don't mind if I link code https://github.com/raehik/bytepatch/blob/main/src/BytePatch/Patch/Align.hs#L16-L21
14:36:00 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
14:36:00 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
14:36:00 wroathe joins (~wroathe@user/wroathe)
14:36:24 Sgeo joins (~Sgeo@user/sgeo)
14:36:30 doyougnu joins (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net)
14:36:37 <raehik> I have a patch over some type `a` (ByteString, Text). I have some checks to perform before patching, they need to know `a`
14:36:46 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
14:36:56 sprout joins (~quassel@2a02:a467:ccd6:1:7c88:97e7:7c77:1c93)
14:38:23 <dminuoso> raehik: My very first intution is: why not simply have a uniform metadata type, such that you can simply have `data D a = D { metadata :: [Metadata], payload :: a }`
14:39:12 <dminuoso> But, I think Im beginning to understand the problem domain here
14:39:25 × max22- quits (~maxime@2a01cb0883359800742a76b71025b974.ipv6.abo.wanadoo.fr) (Ping timeout: 268 seconds)
14:40:35 <dminuoso> Ah heh, you have that already.
14:40:39 <dminuoso> That's your `Patch`
14:40:59 <dminuoso> Or `Pos`
14:41:07 <raehik> the code might be weird right now because I got halfway thru the meta rewrite xd
14:41:26 <dminuoso> And I can also see why you're exploring vinyl.
14:41:52 × sprout quits (~quassel@2a02:a467:ccd6:1:7c88:97e7:7c77:1c93) (Ping timeout: 268 seconds)
14:42:00 <dminuoso> You want to have these sort of anonyms sum types indexed by attached metadata, where you can slice out a piece of metadata, and everything should just work out
14:42:01 <raehik> I liked being able to pick and mix metadatas. the intent is to have a patch with a bunch of metadata, strip them off, and end up with a patch with '[] meta
14:42:02 <dminuoso> Right?
14:42:16 <dminuoso> A kind of..
14:42:28 <raehik> record!
14:42:33 <raehik> maybe? :)
14:42:54 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
14:43:34 coot joins (~coot@89-64-85-93.dynamic.chello.pl)
14:43:44 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
14:44:17 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
14:44:42 <raehik> dminuoso: to your above msg I think so yes. I may want to tag them though if it makes sense with this design, so vinyl looked even nicer
14:44:45 <dminuoso> align :: forall (mss :: [Meta], ms :: [Meta]). mss ~ ms `Sans` MetaPos => Pos 'RelSeek ms -> Either Error mss
14:44:49 <dminuoso> raehik: ^- something along these lines?
14:45:04 <dminuoso> I mean it's just something sketchy with no regard of implementability
14:45:31 <dminuoso> Oops hold on
14:45:34 <dminuoso> I missed something
14:45:52 alx741 joins (~alx741@157.100.93.160)
14:46:11 <dminuoso> align :: forall s (mss :: [Meta], ms :: [Meta]). (SeekRep s ~ Natural, mss ~ ms `Sans` MetaPos s) => Pos 'RelSeek ms -> Either Error (Pos s mss)
14:46:14 <dminuoso> Simplified a bit
14:46:27 <raehik> yesss that's exactly it. I want to have a big ol type-level record that I can rip types out of one by one
14:46:53 <dminuoso> Can vinyl express this "ripping it out"?
14:47:17 <raehik> I believe so, I'm playing with it & having more success than my tries with HList/type-level lists
14:48:52 <raehik> there's RecSubset which only works when vinyl can see the record you're ripping out does exist in the argument
14:48:54 jakalx joins (~jakalx@base.jakalx.net)
14:49:22 <dminuoso> raehik: But yeah, I would simply have a uniform `Metadata` type
14:49:46 <raehik> what do you mean by uniform?
14:49:54 <dminuoso> That would greatly simplify the surroundings (and keep myself sane), at the cost of not proving correct metadata has been supplied or consumed.
14:49:59 <raehik> right, yes
14:50:17 <dminuoso> Well, a big honking `data Metadata = MetaPos ... | MetaThing ... | MetaOther ...`
14:50:36 <dminuoso> And then just assume you have `[Metadata]` stateful operation
14:50:59 <raehik> it's largely because this started as a JSON-friendly representation and some meta belonged with one type, other with another type
14:51:24 <dminuoso> raehik: By the way, why do you want to *remove* metadata?
14:51:34 <raehik> thanks awfully much dminuoso this is very helpful
14:51:41 <dminuoso> Is that just to reduce memory residency? Or is there a different reason?
14:52:17 <raehik> Just for clarity. It means I can prepare the patch before applying, and know that it's "safe" to apply (or it's been processed)
14:52:58 <raehik> like one set of metadata tries to convert the patch into a binary representation (so Text goes to UTF-8 bytes with a null term)
14:53:21 × jespada quits (~jespada@87.74.33.157) (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:53:22 <raehik> I could do that during the patch or I could prepare it before. it's all a big hobby thing that grew from an actually useful tool
14:53:49 jespada joins (~jespada@87.74.33.157)
14:54:01 <dminuoso> So this is just my personal experience. I think when you try to assert your program has been constructed correctly in the type system, you invest so much time in finding type level trickeries, end up with completely rubbish diagnostics on the slightest of typos, often to assert something simple as `Ensure I dont write `foo >> bar` instead of `bar >> foo`.
14:54:02 <raehik> (metadata might not be the right word)
14:54:03 max22- joins (~maxime@2a01cb0883359800e979b10b27a72e14.ipv6.abo.wanadoo.fr)
14:54:19 <dminuoso> That it seems that people sometimes lose track of their goals.
14:54:49 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds)
14:54:54 <dminuoso> For our programs, I ended up throwing most type level trickeries away, and simply reengineering the program structure, so that validating correct program construction is a matter of looking at say 3 lines
14:55:11 <raehik> yeah I've certainly had that for some projects
14:55:26 sprout joins (~quassel@2a02:a467:ccd6:1:7c88:97e7:7c77:1c93)
14:55:26 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
14:56:09 <raehik> I can see where the extra type safety could be discarded and everything would work otherwise the same now
14:56:35 × ubert quits (~Thunderbi@2a02:8109:9880:303c:9285:9698:be15:2e15) (Ping timeout: 252 seconds)
14:56:49 <raehik> perhaps I go back to that, *then* attempt to split everything up into layers again
14:57:20 <dminuoso> Your choice, Im not trying to sway you
14:57:34 <zero> is there a good reason we can't eta reduce one definition of a function on a specific pattern match and not on others?
14:57:50 <dminuoso> But given the size or your project, I think engineering overkill is the right term here.
14:58:41 <mason0> @hoogle (a, b, c) -> a
14:58:42 <lambdabot> Data.Tuple.Utils fst3 :: (a, b, c) -> a
14:58:42 <lambdabot> Data.Tuple.Extra fst3 :: (a, b, c) -> a
14:58:42 <lambdabot> Extra fst3 :: (a, b, c) -> a
14:58:50 <mason0> which one should I use?
14:59:06 <dminuoso> mason0: Id just write mine on the spot.
14:59:13 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:f0a9:34f0:2c07:30d5) (Quit: WeeChat 2.8)
14:59:14 <dminuoso> Or rather, I do. :)
14:59:19 <mason0> I did as well :P
14:59:33 <mason0> named it the same too
14:59:37 <mason0> @hoogle (a, b, c) -> c
14:59:38 <lambdabot> Data.Tuple.Utils thd3 :: (a, b, c) -> c
14:59:38 <lambdabot> Data.Tuple.Extra thd3 :: (a, b, c) -> c
14:59:38 <lambdabot> Extra thd3 :: (a, b, c) -> c
14:59:53 × sprout quits (~quassel@2a02:a467:ccd6:1:7c88:97e7:7c77:1c93) (Ping timeout: 252 seconds)
14:59:58 <kuribas> raehik: You could more simply use Maybe fields.
15:00:09 <kuribas> Then instead of removing fields, just set them to Nothing.
15:00:12 ubert joins (~Thunderbi@2a02:8109:9880:303c:66c1:82a7:41b7:a81d)
15:00:18 <dminuoso> zero: This is a good question.
15:00:39 <dminuoso> And at times I've wondered myself
15:00:50 <mason0> could we write generic fst, snd, etc functions, that would work on any tuple size? lens somehow manages to do it
15:01:13 <mason0> but I'm not sure how
15:01:16 <dminuoso> zero: The one thought that comes to mind, perhaps this has subtle implications on WHNF.
15:01:17 <raehik> mason0: lens just has a ton of instances for large tuples xD
15:01:37 <dminuoso> zero: Recall how `f pat pat = z` has a different meaning from `p pat = \pat -> z`
15:01:39 <janus> mason0: i like 'extra' because it is made by Neil Mitchell which is super trustworthy
15:01:40 <mason0> just manually writing typeclass instances up to supported tuple length?
15:01:42 <janus> @package extra
15:01:42 <lambdabot> https://hackage.haskell.org/package/extra
15:01:56 <dminuoso> zero: So perhaps there's a connection here.
15:02:02 × acidjnk quits (~acidjnk@p200300d0c7271e942878552e9699ebb2.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
15:02:02 <janus> mason0: it has many other useful functions you're likely to need
15:02:21 <raehik> kuribas: yep, thanks. it was convenient to structure it all in a layer-based approach but the same could be done with a bunch of Maybes
15:02:23 <mason0> janus, okay!
15:02:30 <dminuoso> mason0: Lens just wrote them out one by one.
15:02:39 <dminuoso> And stuffed it into a typeclass.
15:02:57 <dminuoso> https://hackage.haskell.org/package/lens-5.1/docs/Control-Lens-Combinators.html#t:Each
15:03:10 <dminuoso> Note how they only support tuples up to 9 elements
15:03:21 <raehik> oh that's baby tuples. I've seen instances for like 40 LOL
15:03:24 <janus> some people will judge you for using lens. better avoid it and you won't have to fight them
15:03:30 <mason0> a bit primitive, but maybe fst and snd should have been written like that as well
15:03:50 <dminuoso> Perhaps, indeed.
15:04:44 <dminuoso> mason0: sadly you'd have to have separate typeclasses. So you'd have one Fst, one Snd...
15:05:00 <dminuoso> Because the lens-style implementation wouldn't work for actual `fst` or `snd`
15:05:05 <dminuoso> At least not in a nice way
15:05:24 <dminuoso> % (1,) ^? _3
15:05:24 <yahb> dminuoso: ; <interactive>:157:1: error:; * Could not deduce (Num t0); from the context: (Num t, Field3 (t2 -> (t, t2)) (t2 -> (t, t2)) a a); bound by the inferred type for `it':; forall {t} {t2} {a}. (Num t, Field3 (t2 -> (t, t2)) (t2 -> (t, t2)) a a) => Maybe a; at <interactive>:157:1-10; The type variable `t0' is ambiguous; * In the ambiguity check for the in
15:05:26 <dminuoso> % (1,2) ^? _3
15:05:26 <yahb> dminuoso: ; <interactive>:158:1: error:; * Could not deduce (Num a0); from the context: (Num a, Num b, Field3 (a, b) (a, b) a1 a1); bound by the inferred type for `it':; forall {a} {b} {a1}. (Num a, Num b, Field3 (a, b) (a, b) a1 a1) => Maybe a1; at <interactive>:158:1-11; The type variable `a0' is ambiguous; * In the ambiguity check for the inferred type for `
15:05:28 <dminuoso> Uh
15:06:05 <dminuoso> ACtually even lens does this with Field1, Field2, Field3, Field4, Field5...
15:11:14 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
15:11:14 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
15:11:14 wroathe joins (~wroathe@user/wroathe)
15:11:45 sprout joins (~quassel@2a02:a467:ccd6:1:7c88:97e7:7c77:1c93)
15:12:16 notzmv joins (~zmv@user/notzmv)
15:12:24 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:dc75:5436:188a:4913)
15:13:10 <mason0> hmm I actually don't have any idea how to write this typeclass. the types I wrote make no sense, and I can't figure out the right ones. https://paste.tomsmeding.com/7gNEGRcd
15:13:24 alx741 joins (~alx741@157.100.93.160)
15:14:10 <merijn> mason0: You can't write the right ones without extension voodoo
15:14:47 <mason0> I should be able to write snd in standard haskell? I don't know how to do that either
15:14:52 <mason0> for a pair
15:15:06 <merijn> mason0: You don't need a class for that, though?
15:15:28 <mason0> I know, but I'm just wondering how the types would look
15:15:36 × vpan quits (~0@212.117.1.172) (Quit: Leaving.)
15:15:50 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 252 seconds)
15:15:59 <merijn> "(a,b) -> a" and "(a,b) -> b"?
15:16:26 × sprout quits (~quassel@2a02:a467:ccd6:1:7c88:97e7:7c77:1c93) (Ping timeout: 260 seconds)
15:16:36 <mason0> what do we put in instance definition? kind has to be * -> *
15:16:37 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:dc75:5436:188a:4913) (Ping timeout: 240 seconds)
15:16:51 dcoutts_ joins (~duncan@ip-185-104-136-51.ptr.icomera.net)
15:17:47 <merijn> mason0: Rewind: where does the class come in and why do you think you need a class?
15:18:43 <dminuoso> % class Fst a where type FstTy a; fst :: a -> FstTy
15:18:44 <yahb> dminuoso: ; <interactive>:165:45: error:; * Expecting one more argument to `FstTy'; Expected a type, but `FstTy' has kind `* -> *'; * In the type signature: fst :: a -> FstTy; In the class declaration for `Fst'
15:18:48 <mason0> I wanted to try writing generic fst, snd, etc functions. and while trying, I figured out I don't know how to write any kind of instance for tuple
15:18:48 <dminuoso> % class Fst a where type FstTy a; fst :: a -> FstTy a
15:18:48 <yahb> dminuoso:
15:18:51 <dminuoso> % instance Fst (a, b) where type FstTy (a, b) = a; fst (a, b) =
15:18:51 <yahb> dminuoso: ; <interactive>:167:63: error: parse error (possibly incorrect indentation or mismatched brackets)
15:18:53 <dminuoso> % instance Fst (a, b) where type FstTy (a, b) = a; fst (a, b) = a
15:18:53 <yahb> dminuoso:
15:19:05 <dminuoso> % :t fst
15:19:05 <yahb> dminuoso: Fst a => a -> FstTy a
15:19:17 <dminuoso> % instance Fst (a, b, c) where type FstTy (a, b, c) = a; fst (a, b, c) = a
15:19:17 <yahb> dminuoso:
15:19:23 sprout joins (~quassel@2a02:a467:ccd6:1:7c88:97e7:7c77:1c93)
15:19:26 <dminuoso> % fst ('a', 'b')
15:19:26 <yahb> dminuoso: 'a'
15:19:28 <dminuoso> % fst ('a', 'b', 'c')
15:19:28 <yahb> dminuoso: 'a'
15:19:30 MiguelNegrao joins (~MiguelNeg@2001:818:dc71:d100:e682:f5cd:9590:d961)
15:19:31 <mason0> dminuoso, do I need any extension for that?
15:19:35 <dminuoso> Yes, TypeFamilies
15:19:41 <dminuoso> Alternatively you can do it with FunctionalDependencies
15:19:53 <mason0> which extension would be prefered for this?
15:20:12 <dminuoso> TyFams are usually more ergonomic for this type of thing.
15:20:32 <merijn> hmm, what's the right (mega)parsec combinator for parse "up to N times"?
15:20:46 zebrag joins (~chris@user/zebrag)
15:21:02 <dminuoso> merijn: With fundeps you also need MultiParamTypeClasses, FlexibleInstances, and I think you need FlexibleContexts in use sites?
15:21:41 <dminuoso> Oh, mason0.
15:22:52 <dminuoso> merijn: Mmm, can you use replicateM and just disable backtracking?
15:22:52 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
15:22:57 <MiguelNegrao> Hi all, I'm working on a library with two different possible implementations (for two different situations), some core functions have the same type signature but a different implementation. I then have some other functions which use these core functions. I would like to avoid having to duplicate the code, having to write these extra functions
15:22:58 <MiguelNegrao> twice, one for each implementation, as the code is exactly the same, they just use a different version of the one of the core functions. Something like  having functions core1 and core2 and then having extra = core1 1 or extra = core2 1 , depending on which module the user imports. Is there some tricks with modules do achieve this ?
15:22:58 <merijn> dminuoso: Maybe?
15:23:00 <mason0> dminuoso it works nicely. I have no idea how, but it works, and it is easy to add support for longer tuples
15:23:34 <dminuoso> mason0: So a type family is just a type-level function that takes types as input, and produces types as output
15:24:03 <merijn> MiguelNegrao: Not realy? But you can just have an internal implementation that takes the core function as argument
15:24:11 <dminuoso> mason0: FstTy is furthermore associated to the typeclass, such that any instance must also provide a type family instance, which allows you to figure out the resulting type of
15:24:18 <mason0> dminuoso, just curious how far we could take this? could we make "at" function, that accepts int literal for the position of the element in the tuple? I guess not because it needs to be known at compile time? or maybe at could take _1, which is what lens does
15:24:29 <MiguelNegrao> @merjin : that was also my plan if I didn't find anything else
15:24:29 <lambdabot> Unknown command, try @list
15:24:35 <dminuoso> mason0: Heh, well yes.. we sort of can.
15:24:42 <merijn> MiguelNegrao: And then define "myCoreFunction = internalImplementation coreFunction1" and "myCoreFunction = internalImplementation coreFunction2" in separate modules
15:24:55 <mason0> int literal or _1?
15:24:58 <dminuoso> mason0: but this starts to get very dark in type trickery land.
15:25:00 <merijn> MiguelNegrao: That's almost certainly going to be the easiest/most maintainable solution
15:25:02 <lyxia> mason0: https://hackage.haskell.org/package/generic-lens-2.2.0.0/docs/Data-Generics-Product-Positions.html#v:position
15:25:11 <mason0> dminuoso, yeah, I should probably understand this code first
15:25:30 <dminuoso> mason0: this current piece of code is highly trivial, you can probably figure it out after 3 minutes of staring yourself.
15:25:33 × waleee quits (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Quit: WeeChat 3.3)
15:25:33 <MiguelNegrao> merijn: ok, great, thanks. Just wanted to check I wasn't missing something.
15:25:59 <merijn> MiguelNegrao: Defining a generic helper and partially applying it is a common design pattern
15:26:48 <merijn> dminuoso: How would I disable backtracking? Simply 'replicateM_ 5 (try foo)' isn't sufficient
15:27:03 <dminuoso> Mmm, doesnt `try` explicitly enable backtracking?
15:27:19 <dminuoso> oh wait
15:27:24 <dminuoso> No this is actually potentialy better
15:27:26 <merijn> Well, without try it *definitely* doesn't work
15:27:30 <dminuoso> Mmm
15:27:41 <dminuoso> merijn: Do you need the output?
15:27:46 <dminuoso> Or can it be thrown away
15:27:48 <merijn> Unsure :p
15:27:51 <dminuoso> heh :P
15:28:00 <dminuoso> Honestly, just roll your replicateM_ variant using Alternative?
15:28:15 <dminuoso> The time we talked here you could have written it 10 times over.
15:28:22 <dminuoso> :p
15:28:45 × jgeerds quits (~jgeerds@55d4ac73.access.ecotel.net) (Ping timeout: 268 seconds)
15:29:03 <merijn> dminuoso: I don't think it's that straightforward?
15:29:19 <dminuoso> merijn: Mmm, count' from parser-combinators seems to fit
15:29:28 × MiguelNegrao quits (~MiguelNeg@2001:818:dc71:d100:e682:f5cd:9590:d961) (Quit: Client closed)
15:29:31 <dminuoso> i.e. `count' 0 6 foo`
15:29:51 <dminuoso> merijn: and yes, its very straight forward
15:29:59 <dminuoso> Internally its almost identical to replicateM_
15:30:21 <dminuoso> https://hackage.haskell.org/package/parser-combinators-1.3.0/docs/src/Control.Applicative.Combinators.html#count%27
15:30:22 Morrow joins (~quassel@bzq-110-168-31-106.red.bezeqint.net)
15:30:23 <dminuoso> https://hackage.haskell.org/package/base-4.16.0.0/docs/src/Control.Monad.html#replicateM
15:33:34 <byorgey> merijn: if this is for today's AoC, I don't see how that combinator is helpful ;-)
15:33:53 <merijn> byorgey: Lack of imagination on your part :p
15:34:03 <byorgey> hehe
15:34:28 <byorgey> merijn: maybe you want https://hackage.haskell.org/package/megaparsec-9.2.0/docs/Text-Megaparsec.html#v:getOffset ?
15:34:45 <xerox> . o O ( ... length type ids of 1 ... )
15:35:01 <merijn> byorgey: No? Certainly no yet
15:35:12 <byorgey> OK. carry on
15:35:20 xkuru joins (~xkuru@user/xkuru)
15:36:41 vpan joins (~0@212.117.1.172)
15:36:49 Guest8273 joins (~Guest82@2001:8003:26ff:8c01:1417:7515:4ef4:e82d)
15:37:14 <mason0> pretty neat! https://paste.tomsmeding.com/Qk3e76l3
15:37:30 pta2002 joins (~pta2002@161.230.90.170)
15:37:44 <pta2002> Hello, I'm trying to make a parser in parsec
15:38:12 <xerox> nice choice
15:38:21 <pta2002> And one of the steps I need to do to make the main parser is to run a subparser only on a specific bit
15:38:26 × Guest8273 quits (~Guest82@2001:8003:26ff:8c01:1417:7515:4ef4:e82d) (Client Quit)
15:38:40 <sprout> hah!
15:38:43 <pta2002> like, I have a string "abcdef" but I want to run a parser on string "abc"
15:38:47 adam_b_dawg joins (~adam_b_da@2001:8003:26ff:8c01:1417:7515:4ef4:e82d)
15:38:48 <pta2002> inside another parser
15:38:52 <sprout> https://pasteboard.co/TJarPW9Gt0Zz.png <- AoC, day 16, task 2. egel
15:38:57 <pta2002> yes that's what I need :P
15:39:34 <sprout> should be possible in haskell without problems too, right?
15:39:42 <pta2002> what language is that?
15:39:45 <xerox> sure, you just run the same parser you're defining
15:39:49 alx741 joins (~alx741@157.100.93.160)
15:40:00 <pta2002> oh egel got it, never heard of it
15:40:07 <pta2002> xerox: but how can I limit it to those bits?
15:40:25 <xerox> you write the parser such that it doesn't overrun, it'll consume only as much as it needs
15:40:27 × doyougnu quits (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net) (Ping timeout: 268 seconds)
15:40:29 <pta2002> other than just doing some ugly thing like parse [parser] "" [message]
15:40:52 <pta2002> oh yeah yeah ik but i need to run it with many
15:41:00 × adam_b_dawg quits (~adam_b_da@2001:8003:26ff:8c01:1417:7515:4ef4:e82d) (Client Quit)
15:41:28 <pta2002> like I need parse (many1 [parser]) "" [message], the message to parse repeats
15:41:51 <xerox> check out count to run it exactly n times
15:41:53 <pta2002> but I so I want to get as many occorrences of it as possible but only until it ends
15:42:06 <pta2002> xerox: I don't know how many times I need it
15:42:11 <pta2002> Variable length messages
15:42:22 <pta2002> I need to get all messages in n characters
15:42:41 <g> Do get the n characters, then parse them
15:42:46 <pta2002> but I don't know how many messages there are
15:43:06 <xerox> what g says works or you can also use lookAhead
15:43:15 <g> That's fine, just keep parsing till the bytes are gone
15:44:02 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds)
15:44:11 <pta2002> g: yeah, I got the n characters
15:44:17 <pta2002> but now how do I run the parser only on those characters?
15:44:28 <merijn> It's been...0 days since megaparsec's lack of 'isolate' has screwedme!
15:44:34 × pfurla_ quits (~pfurla@2804:18:5827:38:71a1:6773:333f:330d) (Quit: gone to sleep. ZZZzzz…)
15:44:48 <merijn> pta2002: Ah, I see you have the exact same problem annoying me :p
15:44:55 <g> pta2002: the same way you ran your parser the first time
15:44:58 <mason0> what is that guy's AoC page, he writes very terse haskell code?
15:45:03 <pta2002> it seems I do
15:45:09 <pta2002> no this is definitely not terse haskell
15:45:10 <mason0> I had it a couple of days ago but I can't find it
15:45:19 <pta2002> i have too many do's
15:45:24 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
15:45:29 <mason0> merijn, I think it was posted by you? with your dislike for his style :)
15:45:34 <merijn> oh
15:45:40 <byorgey> pta2002: megaparsec has a combinator called 'getOffset' that tells you where you are in the input. I don't know if parsec has something similar.
15:45:45 <merijn> https://jhidding.github.io/aoc2021/#advent-of-code-2021 ?
15:45:49 <pta2002> hm don't know if that's what I need
15:45:54 <pta2002> i did get the message part I need
15:46:01 <pta2002> just using count
15:46:02 <byorgey> pta2002: I used that to just keep parsing sub-things until the offset reached the number it was supposed to
15:46:08 <merijn> byorgey: What he (and I) want is: https://hackage.haskell.org/package/binary-0.8.9.0/docs/Data-Binary-Get.html#v:isolate :p
15:46:09 <mason0> merijn, that's it!
15:46:13 <pta2002> oh that's a nice idea
15:46:29 <g> In ReadP I did this https://github.com/glguy/advent2021/blob/main/execs/Day16.hs#L93
15:46:40 <pta2002> merijn: wait how can i use that? :o
15:46:50 <pta2002> that's not parsec
15:47:05 <pta2002> oh it's doing the clever thing of using actual binary values instead of a string of '0' and '1' lol
15:47:13 <byorgey> merijn: kind of, but it looks like that only works if the decoder consumes exactly that many bytes. In this case you want the number of available bytes to influence how the sub-parser works.
15:47:14 <merijn> pta2002: You can't, sadly
15:47:18 <pta2002> :c
15:47:20 lavaman joins (~lavaman@98.38.249.169)
15:47:33 <merijn> that's why I was complaining :p
15:47:35 <pta2002> guess i'll just do this the wrong way and run parse inside a parser
15:47:39 <pta2002> yeah got it lol
15:47:41 <merijn> byorgey: Well, I want isolate outside of AoC too :p
15:47:57 <g> You use "many" to make a parser that parsers as many items as it can
15:48:48 <g> And let that soak up the sub bytes
15:48:58 <byorgey> merijn: you should be able to write it using getOffset
15:49:11 <pta2002> i gave up on the smart way of doing things
15:49:27 <pta2002> just running parse inside of the parser, if it's stupid and it works it ain't stupid lol
15:49:30 <byorgey> hmmm, maybe
15:50:34 <g> Some libraries the offset is related to the current chunk and not the whole input, so just check that ahead of time
15:50:41 <byorgey> pta2002: actually that sounds like a decent idea to me =)
15:50:51 <byorgey> g: ah, good point
15:51:37 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 240 seconds)
15:51:37 <byorgey> pretty sure getOffset is relative to the whole input in megaparsec
15:52:45 bontaq joins (~user@ool-45779fe5.dyn.optonline.net)
15:52:57 <merijn> rats...I have to implement takeWhile_ now :\
15:53:09 <merijn> I put it off so far, because that seemed annoying >.>
15:53:24 <g> Then that would be a possible solution :) given how much time people spent pondering these two sub packet encodings I'd say today's problem was cleverly picked by the authors
15:56:34 <pta2002> my hacky solution works, here's one gold star :D
15:58:09 <byorgey> pta2002: \o/
15:58:36 <pta2002> oh damn this is intcode computer all over again
15:59:05 <pta2002> 2019 me didn't know about State and suffered heavily with the intcode computer
16:00:17 <g> I did my first version with a whole bunch of splitAt <_<
16:00:23 <merijn> ugh, I hate it when it's clear my problem has an efficient solution, but it seems so tedious to figure out...
16:00:55 <pta2002> hey, my day 15 poorly implemented dijkstra solution took like 2 minutes
16:01:19 <merijn> mine was pretty fast, although I'm not sure I implemented Dijkstra or something else :p
16:01:23 <pta2002> and it's absolutely horrible
16:02:01 <pta2002> https://gist.github.com/pta2002/6b2febf1481654858a1216b658c3f668 look at this mess :(
16:02:30 <pta2002> ignore mapDiff, doesn't work, was something I tried to do for debugging why mkPart2Map wasn't working
16:03:01 jkaye joins (~jkaye@2601:281:8300:7530:d672:a7f5:a798:3393)
16:03:05 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
16:04:30 <g> pta2002: filtering your heap each step is probably killing you
16:04:58 <pta2002> yeah probably
16:05:03 <pta2002> i got that working at 3am
16:05:07 <pta2002> i was too tired for my brain to function
16:05:14 <pta2002> was just happy it compiled
16:05:33 <pta2002> you can tell from my imports i actually tried to use a minheap
16:05:49 <kuribas> is 2 minutes bad?
16:05:52 <tomsmeding> I have a Dijkstra with a proper priority quue :) https://git.tomsmeding.com/AOC/tree/2021/15.hs
16:06:02 <kuribas> tomsmeding: how fast is it?
16:06:07 × pavonia quits (~user@user/siracusa) (Ping timeout: 256 seconds)
16:06:10 <pta2002> then gave up when i tried to reprioritize the heap
16:06:11 <merijn> pta2002: https://github.com/merijn/AdventOfCode/blob/master/Day15.hs#L114-L164
16:06:15 <tomsmeding> kuribas: 306ms on my input, both parts
16:06:18 <g> kuribas: mine runs in about 700ms
16:06:31 <pta2002> i mean dijkstra isn't that algorithm
16:06:44 <kuribas> oh, that's a bit better than 2 minutes :)
16:06:52 <merijn> kuribas: Mine finishes in 1.5s or so? And part of that is drawing the entire map :p
16:06:57 <tomsmeding> (obviously machine-dependent, but certainly better than 2min)
16:07:00 <pta2002> heh
16:07:01 <kuribas> tomsmeding: maybe you should put it in a package?
16:07:02 <merijn> Because I plot the final route to screen
16:07:07 <tomsmeding> lol
16:07:09 <pta2002> oh nice
16:07:27 <tomsmeding> it's special-purposed to this problem where you have a 2D array where distance-to-cell is equal to the value in the cell
16:07:29 <merijn> tomsmeding: It was trivial to implement with my representation and the rendering code I had from previous puzzles :p
16:07:58 <kuribas> oh right
16:08:13 <pta2002> I see two simple fixes to my slowness: 1. use a proper minheap, instead of filtering a huge list and 2. don't bother calculating costs to every node
16:08:23 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
16:08:26 <merijn> tomsmeding: Ah, I think your version looks similar to mine
16:08:29 <pta2002> mostly the minheap though
16:08:35 <merijn> I didn't even use a heap, tbh
16:08:36 <pta2002> just couldn't figure out how to reprioritize it
16:08:42 <merijn> I just used Set + minView :p
16:08:50 <kuribas> pta2002: is it dijkstra if you use a O(n^2) heap?
16:09:14 <pta2002> kuribas: well it's dijkstra* where * stands for i didn't implement it properly
16:09:14 <merijn> I think mine is more akin to A*?
16:09:16 <tomsmeding> oh good point about the minView, merijn that functions as a priority queue, right?
16:09:34 <pta2002> A* is dijkstra with a cost to end goal heuristic
16:09:34 <merijn> tomsmeding: Effectively, if you ensure elements are sort by priority/cost :p
16:09:51 <kuribas> merijn: isn't Set a heap though?
16:10:00 <tomsmeding> right, you need some 'data Box a b = Box a b' where the Ord instance only looks at 'a'
16:10:05 × jippiedoe quits (~david@145.89.5.239) (Ping timeout: 256 seconds)
16:10:09 <pta2002> i think i know this i just had a test on this yesterday
16:10:15 <tomsmeding> nice, I was thinking that there wasn't a PQ implementation in base, but apparently there is :)
16:10:18 <pta2002> which makes my dijkstra implementation even more shameful
16:10:19 <pta2002> oh well
16:10:33 <merijn> tomsmeding: Technically Set isn't in base :p
16:10:44 <tomsmeding> my brain is still not functioning correctly
16:10:50 <merijn> tomsmeding: I have a custom Estimate type that uses cost as primary key for comparison :p
16:10:53 <merijn> kuribas: No?
16:10:56 <merijn> kuribas: Set is a binary tree
16:10:57 <tomsmeding> but boot package is close enough :p
16:11:25 <tomsmeding> oh fair, and for the correct asymptotics you need a heap
16:11:28 <merijn> kuribas: But that's only O(log n) to find the minimal
16:11:31 <tomsmeding> though I wonder if it really matters in this case
16:11:44 <tomsmeding> O(log n + log n) = O(1 + log n)
16:11:53 <tomsmeding> (findMin + deleteMin)
16:12:09 <kuribas> merijn: right, and in a heap, it's O(1).
16:12:10 <merijn> tomsmeding: minView does it in on operation
16:12:27 <merijn> tomsmeding: So you do find + delete in O(log n)
16:12:42 <tomsmeding> which is also equal to the two terms I wrote, complexity-wise :p
16:12:45 <kuribas> merijn: a heap is also a binary tree BTW.
16:13:02 <tomsmeding> so a binary search tree suffices as a priority queue for dijkstra, you don't need a heap
16:13:03 <tomsmeding> interesting
16:13:37 tomsmeding can never remember whether the increaseKey function is really necessary to get dijkstra to the right complexity
16:13:52 <merijn> hmm
16:13:55 <tomsmeding> kuribas: but not a binary search tree, which Set is
16:14:07 <merijn> I'm confused whether I want foldl or foldr when lazily traversing a Text
16:14:18 <merijn> Someone help me out here!
16:14:21 <merijn> Does it even matter?
16:14:25 Neuromancer joins (~Neuromanc@user/neuromancer)
16:14:27 <tomsmeding> define lazily traversing a text
16:14:38 <merijn> A fold that only looks at a prefix of the Text
16:14:56 <tomsmeding> that needs to be a foldr then, right?
16:14:56 <[exa]> you want foldr because foldl is foldr
16:15:23 <tomsmeding> a + (b + (c + (d + ...))) ignores the suffix if (+) at some point ignores its right argument; not so for foldl
16:15:51 <tomsmeding> foldl can ignore a prefix if the combining function ignores its left argument at some point
16:16:24 <merijn> tomsmeding: I know how it works on lists, but Text's folds go through the streaming abstraction of them
16:16:30 <merijn> I dunno how that affects things
16:16:49 <tomsmeding> ¯\_(ツ)_/¯
16:16:51 <tomsmeding> try it :p
16:20:19 <pta2002> maybe next year I'll actually know how to use haskell properly and will be able to stop using do everywhere
16:20:43 <pta2002> and how to make a properi mplementation of dijkstra
16:21:18 <tomsmeding> what's the problem with 'do'
16:21:19 <glguy> Not running a sub parser appears to be the favored solution, so i've updated: https://github.com/glguy/advent2021/blob/main/execs/Day16.hs#L90-L97
16:22:02 <pta2002> hm what's the difference between readp and parsec?
16:22:03 × chele quits (~chele@user/chele) (Remote host closed the connection)
16:22:05 <pta2002> only ever heard of parsec
16:22:17 <merijn> ReadP is shite, is the difference ;)
16:22:18 <pta2002> but it seems like it does the same thing
16:22:46 <glguy> ReadP has unbiased choice, no parse errors, is in base, parses all the alternatives at once instead of the depth first algorithm parsec uses
16:23:14 <glguy> for a real use case you'd probably use megaparsec these days
16:23:56 <glguy> ReadP is good for AoC parsing because it doesn't require me to be as clever as one needs to be with parsec
16:24:29 <glguy> (where just getting the input parsed quickly is the important thing)
16:24:32 pavonia joins (~user@user/siracusa)
16:24:51 <pta2002> https://github.com/pta2002/advent-of-code-2021/blob/main/16/solve.hs i wouldn't call my solution particularly clever
16:24:51 alx741 joins (~alx741@157.100.93.160)
16:25:15 <kuribas> Why does stack build, then stack test rebuilds the whole library?
16:25:20 <glguy> parsec gives you a performance boost by pruning alternatives once the first alternative starts consuming inputs
16:25:41 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:dc75:5436:188a:4913)
16:25:52 <kuribas> Because I have template haskell?
16:27:15 featurebug joins (~featurebu@49.205.122.91)
16:27:55 <kuribas> sq-loader-0.1.0.0: unregistering (dependencies changed)
16:28:35 <tomsmeding> kuribas: are some flags different between the two targets?
16:28:42 <tomsmeding> perhaps a ghc-options
16:28:57 × dcoutts_ quits (~duncan@ip-185-104-136-51.ptr.icomera.net) (Ping timeout: 240 seconds)
16:30:00 × slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving)
16:30:14 <kuribas> I have extra test libraries...
16:30:19 <kuribas> hspec, etc...
16:30:52 <tomsmeding> perhaps those force a different flag configuration for other dependencies in the cabal solver?
16:31:05 <tomsmeding> s/flag/flag or version/
16:31:20 <kuribas> right!
16:31:20 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
16:31:45 <kuribas> aren't they pinned by stack though?
16:32:08 <tomsmeding> oh, right, stack; that should be pinned yes?
16:32:25 <tomsmeding> well versions are, flags might not be
16:32:37 <tomsmeding> but unlikely that flags are being affected by some test libraries
16:34:30 × pta2002 quits (~pta2002@161.230.90.170) (Quit: leaving)
16:35:13 <kuribas> it's not even rebuilding any dependencies...
16:35:17 CiaoSen joins (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
16:37:13 × coot quits (~coot@89-64-85-93.dynamic.chello.pl) (Quit: coot)
16:37:14 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:dc75:5436:188a:4913) (Remote host closed the connection)
16:37:28 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:dc75:5436:188a:4913)
16:37:45 coot joins (~coot@89-64-85-93.dynamic.chello.pl)
16:41:50 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.3)
16:42:38 <kuribas> ok, I can bypass the problem with "stack build --test --no-run-tests"
16:44:56 × kuribas quits (~user@ptr-25vy0i8a8smuqmxkytj.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3))
16:47:32 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:dc75:5436:188a:4913) (Remote host closed the connection)
16:48:40 × _xor quits (~xor@dsl-50-5-233-169.fuse.net) (Quit: brb - upgrading)
16:49:27 alx741 joins (~alx741@157.100.93.160)
16:49:28 jippiedoe joins (~david@2a02-a44c-e14e-1-52a9-393a-90cb-edf9.fixed6.kpn.net)
16:55:43 × jippiedoe quits (~david@2a02-a44c-e14e-1-52a9-393a-90cb-edf9.fixed6.kpn.net) (Quit: Leaving)
16:58:20 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
17:01:47 pfurla joins (~pfurla@2804:18:5827:38:71a1:6773:333f:330d)
17:02:47 × deadmarshal quits (~deadmarsh@95.38.231.95) (Ping timeout: 256 seconds)
17:03:20 deadmarshal joins (~deadmarsh@95.38.228.81)
17:06:09 econo joins (uid147250@user/econo)
17:08:58 Akiva joins (~Akiva@user/Akiva)
17:12:55 waleee joins (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4)
17:13:16 pta2002 joins (~pta2002@161.230.90.170)
17:14:27 alx741 joins (~alx741@157.100.93.160)
17:15:28 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
17:16:18 jakalx parts (~jakalx@base.jakalx.net) ()
17:18:11 mikail joins (~mikail@2a02:c7f:bc1f:4a00:fc9:3da5:3e1e:8303)
17:19:57 × coot quits (~coot@89-64-85-93.dynamic.chello.pl) (Quit: coot)
17:21:36 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
17:25:11 jakalx joins (~jakalx@base.jakalx.net)
17:25:44 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
17:29:53 × ProfSimm quits (~ProfSimm@87.227.196.109) (Ping timeout: 256 seconds)
17:33:35 <unclechu> Hey, can I somehow pass `:set` options (e.g. override `prompt`) to `ghci` before I start it? Without using `.ghci`.
17:33:51 <unclechu> Or can I maybe pass custom absolute path to `.ghci`?
17:34:24 <geekosaur> ---ghci-script
17:34:26 <geekosaur> er
17:34:30 <geekosaur> -ghci-script
17:34:44 <tomsmeding> and if you're using cabal repl, prefix that with --repl-options=
17:35:28 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
17:36:32 <unclechu> geekosaur thanks! That works
17:38:35 × vpan quits (~0@212.117.1.172) (Quit: Leaving.)
17:39:50 emf joins (~emf@2620:10d:c091:480::1:7a0e)
17:41:06 _xor joins (~xor@dsl-50-5-233-169.fuse.net)
17:41:35 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
17:43:57 Sgeo_ joins (~Sgeo@user/sgeo)
17:44:02 alx741 joins (~alx741@157.100.93.160)
17:44:12 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
17:45:38 Guest21 joins (~Guest21@pool-98-115-178-221.phlapa.fios.verizon.net)
17:47:48 <c_wraith> is there any parsing combinator library built to do things like today's AoC problem asks for? in particular, having the ability to isolate a fixed length portion of the future stream to run a sub-parser over?
17:47:56 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:dc75:5436:188a:4913)
17:50:24 × Guest21 quits (~Guest21@pool-98-115-178-221.phlapa.fios.verizon.net) (Client Quit)
17:50:52 <EvanR> I've done literally that with attoparsec but I guess literally doing that ruins the incremental nature of the parser
17:51:45 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
17:51:57 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:dc75:5436:188a:4913) (Ping timeout: 240 seconds)
17:52:18 Vajb joins (~Vajb@2001:999:62:f3d1:4390:fbed:1f9b:9d03)
17:52:21 doyougnu joins (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net)
17:52:33 <c_wraith> like, you can do it with anything if you call whatever the entry function is again, but that breaks error chaining between the sub-parser and the outer parser
17:53:07 <c_wraith> I'm wondering if anything supports it in a more integrated manner
17:53:28 × mikail quits (~mikail@2a02:c7f:bc1f:4a00:fc9:3da5:3e1e:8303) (Quit: Leaving)
17:54:55 <glguy> Is there a trick to having haddock generate documentation for internal (not exported from the module) definitions? While these aren't part of the module's API it seems like it would be useful for someone working on the module
17:54:58 <EvanR> the thing missing seemed to be a way to know how much input was just consumed so you can track it
17:55:17 <monochrom> You can use parsec's getInput to get the future stream, splitAt, then use setInput to put back the suffix, and do whatever you want with the prefix. This is of course a clutch, I don't know of any parser library that has this in design.
17:55:20 tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net)
17:55:23 <xerox> I remember having to figure that out for myself once glguy but I forget how I did it
17:56:03 <xerox> could this be it --show-all --ignore-all-exports
17:59:01 <glguy> > Causes Haddock to behave as if every module has the ignore-exports attribute (Section 3.7, “Module Attributes”). This might be useful for generating implementation documentation rather than interface documentation, for example.
17:59:02 <lambdabot> <hint>:1:38: error: parse error on input ‘module’
17:59:04 <glguy> sounds pretty good
17:59:05 <EvanR> https://www.haskell.org/haddock/doc/html/module-attributes.html ignore-exports
17:59:45 <glguy> xerox: good spot, that worked
17:59:59 <xerox> glguy: I'm glad!
18:00:07 mvk joins (~mvk@2607:fea8:5cdd:f000::745c)
18:00:41 <monochrom> "ignore all exports" is a scary name. :)
18:01:13 <monochrom> Fortunately it means pretending "module M(foo, bar)" to be "module M".
18:01:36 × CiaoSen quits (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 245 seconds)
18:01:38 <xerox> funny wording indeed
18:01:49 <glguy> https://glguy.net/advent2021/ https://glguy.net/advent2021/Day16/Main.html
18:02:24 <xerox> :)
18:04:33 × pta2002 quits (~pta2002@161.230.90.170) (Ping timeout: 256 seconds)
18:06:28 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
18:06:57 <xerox> I guess the execs aren't easily linked from there by haddock itself
18:07:03 <glguy> I haven't figure out how to do that yet
18:07:09 <glguy> figured*
18:07:53 dcoutts_ joins (~duncan@71.78.6.51.dyn.plus.net)
18:08:50 <EvanR> ReadP pulling its weight around here
18:09:57 × mvk quits (~mvk@2607:fea8:5cdd:f000::745c) (Remote host closed the connection)
18:10:49 mvk joins (~mvk@2607:fea8:5cdd:f000::745c)
18:11:01 × phma quits (~phma@host-67-44-208-226.hnremote.net) (Read error: Connection reset by peer)
18:11:09 × dyeplexer quits (~dyeplexer@user/dyeplexer) (Remote host closed the connection)
18:11:58 phma joins (phma@2001:5b0:210d:8c38:983f:1c01:826:33cd)
18:15:38 coot joins (~coot@89-64-85-93.dynamic.chello.pl)
18:19:37 × ubert quits (~Thunderbi@2a02:8109:9880:303c:66c1:82a7:41b7:a81d) (Remote host closed the connection)
18:24:33 alx741 joins (~alx741@157.100.93.160)
18:25:46 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
18:25:46 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
18:25:46 wroathe joins (~wroathe@user/wroathe)
18:27:32 × coot quits (~coot@89-64-85-93.dynamic.chello.pl) (Remote host closed the connection)
18:27:53 coot joins (~coot@2a02:a310:e03f:8500:933a:39ca:ef4e:37cb)
18:30:02 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Ping timeout: 268 seconds)
18:32:08 awpr joins (uid446117@id-446117.lymington.irccloud.com)
18:34:08 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
18:35:13 × mrus quits (~mrus@149.28.224.172) (Quit: Surfing the great wave off Kanagawa)
18:35:36 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds)
18:37:31 <sprout> https://pasteboard.co/ew4JaofWfuXW.png <- aoc, 16, 2 - beautified a bit
18:37:40 <sprout> uh, egel code
18:39:35 <monochrom> Even more beautiful in comic sans font. :)
18:41:12 shapr joins (~user@12.5.211.156)
18:41:17 <glguy> sprout: for non-haskell AoC code there's also #adventofcode-spoilers
18:41:37 CiaoSen joins (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
18:41:54 <sprout> oh neat!
18:42:16 × mbuf quits (~Shakthi@223.178.108.131) (Quit: Leaving)
18:46:12 <EvanR> glguy the haddock based solution post looks pretty good. I just ran into a readtodocs regarding haskell containers, and wish there was more nice looking web-based content for haskell
18:46:20 <EvanR> readthedocs*
18:47:39 <dsal> Is there a better way in megaparsec to call a parser over a subset of data other than to just takeP and call `parse` again?
18:47:39 × Vajb quits (~Vajb@2001:999:62:f3d1:4390:fbed:1f9b:9d03) (Read error: Connection reset by peer)
18:48:11 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
18:48:30 × coot quits (~coot@2a02:a310:e03f:8500:933a:39ca:ef4e:37cb) (Quit: coot)
18:48:50 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
18:49:05 <glguy> dsal: the other way would be to track offsets with getOffset, another way is you can use getInput and setInput
18:49:41 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:dc75:5436:188a:4913)
18:49:42 <glguy> take the input, split it, set the input parse, restore the tail
18:49:48 coot joins (~coot@2a02:a310:e03f:8500:933a:39ca:ef4e:37cb)
18:50:42 <dsal> Hmm... Yeah, I considered that as well. Might give it a try. I figured there'd be something `count` or whatever, but over bytes.
18:52:05 alx741 joins (~alx741@157.100.93.160)
18:52:19 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
18:52:19 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
18:52:19 wroathe joins (~wroathe@user/wroathe)
18:52:38 dsrt^ joins (~dsrt@wsip-98-188-240-142.mc.at.cox.net)
18:52:44 <tomsmeding> somehow everybody seems to ask the same question today :p
18:53:13 <EvanR> I did something stupid: take the difference of "rest of input" between before and after running a parser to get how many bits were consumed
18:53:15 <monochrom> EvanR: Rejoice, for cabal user guide has long been on readthedocs, and now GHC user guide, even though still hosted on downloads.haskell.org, has adopted readthedocs formatting.
18:54:49 <EvanR> nice
18:55:18 <dsal> Oh, sorry. I've been partially offline since my laptop broke yesterday. heh
18:56:09 <dsal> I did gross stuff to solve last night's thing quickly. And then I went back to do something less gross and it's still a bit more gross than I'd like.
18:56:32 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds)
18:57:13 <Rembane> I tried to do a Best Friend Search but fell asleep in the middle.
18:58:17 <dsal> There's someone out there.
19:00:19 <glguy> I was hoping they'd do something like "there's an unknown amount of padding between packets, figure out how to parse this" :)
19:00:53 lavaman joins (~lavaman@98.38.249.169)
19:00:56 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
19:02:15 <dsal> The zeros thing was a little confusing. I tried eating them a few different ways before I figured out just ignoring them made things work.
19:02:21 <aplainzetakind> When I give my parser to parseMaybe I get Nothing. I change it to parseTest and it parses fine. What is this?
19:02:55 × justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 256 seconds)
19:03:56 <monochrom> dsal: I watched an episode of MacGyver in which he rigged a motorcycle into a make-shift generator. Is that one of the gross things you did to power your router? >:)
19:04:31 <dsal> Haha. I used RC batteries for a while.
19:04:33 <glguy> aplainzetakind: which library?
19:04:35 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:dc75:5436:188a:4913) (Remote host closed the connection)
19:04:55 <monochrom> OK that's more realisitc heh
19:04:56 <glguy> aplainzetakind: > parseMaybe p input runs the parser p on input and returns the result inside Just on success and Nothing on failure. This function also parses eof, so if the parser doesn't consume all of its input, it will fail.
19:05:10 <glguy> I bet that second sentence is tripping you up
19:05:15 ubert joins (~Thunderbi@p200300ecdf1abb0334f3944fefcb567c.dip0.t-ipconnect.de)
19:06:28 × bollu quits (uid233390@id-233390.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
19:06:58 <c_wraith> I really would like a parser library that's designed to handle fields with lengths specified before them and internal structure that needs to be parsed.
19:07:11 <aplainzetakind> Ah OK.
19:07:28 <c_wraith> the AoC problem is hardly the only place that happens
19:07:33 <dsal> c_wraith: I did mqtt with attoparsec. It wasn't that bad
19:07:34 <glguy> c_wraith: When we wanted that for parsing IP packets we made the cereal package (among some other reasons)
19:08:18 <glguy> this happens more in parser combinators targetted at binary parsing than text parsing
19:08:23 <aplainzetakind> But that's... bad. I mean, parseTest is supposed to give you information on why things fail. I'd expect it to succeed or fail exactly the same way as other parsers.
19:08:25 <monochrom> Yeah, I would think cereal or binary is more geared for that. Then again, what if sufficiently complex CFG is also involved...
19:09:50 <c_wraith> yes, it is mostly a binary format thing, but.. yeah, I want some greater ability to handle complex grammars along with it
19:09:54 × jonathanx_ quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
19:10:13 jonathanx_ joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
19:11:32 <glguy> any textual language ought to have already been lexed by the time the parser's running
19:11:51 <glguy> and declaring how many lexemes you have sounds silly and declaring how many bytes sounds absurd
19:13:00 HurdyGurdyBurdy joins (~HurdyGurd@user/hurdygurdyburdy)
19:14:29 mrus joins (~mrus@2001:19f0:5:1535:5400:3ff:fe7d:10ae)
19:15:47 Pickchea joins (~private@user/pickchea)
19:18:42 alx741 joins (~alx741@157.100.93.160)
19:25:32 × madjestic quits (~madjestic@88-159-247-120.fixed.kpn.net) (Ping timeout: 240 seconds)
19:25:32 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
19:28:00 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
19:28:28 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
19:29:10 bollu joins (uid233390@id-233390.helmsley.irccloud.com)
19:30:21 justsomeguy joins (~justsomeg@user/justsomeguy)
19:33:24 madjestic joins (~madjestic@88-159-247-120.fixed.kpn.net)
19:35:13 jakalx joins (~jakalx@base.jakalx.net)
19:37:29 × justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 256 seconds)
19:37:37 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
19:38:41 <sm> useful for good error messages, maybe ?
19:39:17 <geekosaur> hate to have to rely on predeclared numbers of lexemes or bytes for that
19:39:36 <geekosaur> sounds like more errors likely from letting that get out of sync than would be improved by it
19:40:13 <sm> or.. performance ?
19:42:36 <monochrom> I have some disagreement with that, based on the problems caused by C string (just keep consuming until you see 0), and concerns of data transmission (in which it really is better to predeclare how many bytes to expect).
19:43:02 <monochrom> The C string way opens you to all kinds of DoS, first of all.
19:43:15 <shapr> denial of sanity?
19:43:17 alx741 joins (~alx741@157.100.93.160)
19:43:19 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Quit: Leaving...)
19:43:19 <geekosaur> but that's not parsing
19:43:21 <monochrom> :)
19:43:41 <geekosaur> you can still use the same source format for either C-style or counted strings in internal format
19:44:10 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:dc75:5436:188a:4913)
19:44:22 <geekosaur> and data transmission we're back to parsing binary vs. text even though the "binary" happens to be a text (fragment?)
19:44:37 <geekosaur> since the protocol is binary even if the content isn't
19:45:02 <geekosaur> (ignoring for the moment the poriginal Internet protocols, which didn't even pretend to handle binary)
19:45:29 <monochrom> OK, so next, if I design this data transmission format: how many expressions to expect, how many bytes in 1st expression, 1st expression, how many bytes in 2nd expression, 2nd expression, ...
19:46:07 <monochrom> then you really want a parser that plays well with "parse an expression for n bytes".
19:46:45 <geekosaur> again I'd claim that is a binary protocol even if the expressions are textual (bonus, easier to extend to ASTs :)
19:46:49 <EvanR> a checksum for catching bad encoding
19:47:57 × koz quits (~koz@121.99.240.58) (Remote host closed the connection)
19:48:08 <EvanR> if nothing at all can be wrong, then wrongness can't be detected
19:48:15 × madjestic quits (~madjestic@88-159-247-120.fixed.kpn.net) (Ping timeout: 256 seconds)
19:48:16 koz joins (~koz@121.99.240.58)
19:48:25 <EvanR> but multiple layers of things that must match don't help either
19:49:35 × Maxdamantus quits (~Maxdamant@user/maxdamantus) (Ping timeout: 268 seconds)
19:50:21 Maxdamantus joins (~Maxdamant@user/maxdamantus)
19:54:41 justsomeguy joins (~justsomeg@user/justsomeguy)
19:56:03 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
20:00:14 <tomsmeding> you know, you're all going on about delimited subparsing and I dunno what; what about just some liberal use of splitAt :p https://git.tomsmeding.com/AOC/tree/2021/16.hs
20:00:52 <monochrom> OK, splitAt is sufficient lazy so that if you use getInput, splitAt, setInput, it still does streaming.
20:01:13 <monochrom> > case splitAt 5 (1 : 2 : undefined) of (x,_) -> take 1 x
20:01:15 <lambdabot> [1]
20:02:14 <tomsmeding> also, this program worked the first time it compiled :)
20:02:17 × koz quits (~koz@121.99.240.58) (Ping timeout: 240 seconds)
20:02:34 <tomsmeding> (well, the first time it compiled and I felt that it was time to test it)
20:03:06 <monochrom> I was about to code up a delimited subparsing parser monad for all of you. :)
20:03:15 <tomsmeding> :D
20:03:25 <tomsmeding> not actually too hard if you don't need to support backtracking
20:03:46 <monochrom> "newtype CP a = Maybe Int -> String -> Maybe (Int, String, a)"
20:04:02 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 240 seconds)
20:04:03 <tomsmeding> I was half-and-half thinking about writing one, but then I realised that just writing the code directly would be quicker
20:04:19 <tomsmeding> monochrom: what does CP stand for? Cool Parser?
20:04:27 <monochrom> 1st Int being how many characters are allowed, 2nd Int how many characters used.
20:04:30 <EvanR> that's basically what I did
20:04:34 <monochrom> Counted Parser
20:04:37 <tomsmeding> looks decent
20:04:48 madjestic joins (~madjestic@88-159-247-120.fixed.kpn.net)
20:04:59 <EvanR> @src splitAt
20:04:59 <lambdabot> splitAt n xs = (take n xs, drop n xs)
20:05:19 × juhp quits (~juhp@128.106.188.82) (Ping timeout: 250 seconds)
20:05:25 <monochrom> That is likely not the real code.
20:05:34 <EvanR> you don't think?
20:05:58 <tomsmeding> https://hackage.haskell.org/package/base-4.14.0.0/docs/src/GHC.List.html#splitAt
20:06:06 <tomsmeding> if you set USE_REPORT_PRELUDE, that's the real code :)
20:06:18 <tomsmeding> otherwise, no, it indeed saves iterating over the prefix twice
20:07:21 <EvanR> are you sure
20:08:23 <tomsmeding> well you never know, perhaps the machine that built my compiler was actually infected with a Thompson virus through a log4j injection vulnerability
20:08:27 × fef quits (~thedawn@user/thedawn) (Ping timeout: 276 seconds)
20:09:02 <EvanR> yeah I see it goes over the input in one pass, unfortunately it still builds a thunk if you consume the left or the right result
20:09:10 <EvanR> of the original list
20:09:17 <tomsmeding> and don't consume the other one?
20:09:27 <EvanR> consume one then the other
20:09:45 <tomsmeding> except if ghc infers that you're always going to use both and does strictness analysis
20:10:00 <tomsmeding> though, like, how could it _not_ produce a thunk there
20:10:11 <EvanR> that could ever result in building whole lists ahead of time?
20:10:17 <EvanR> that's what I mean
20:10:38 <tomsmeding> I'm not sure I understand your usage of "ever"
20:10:54 <dolio> It means even.
20:10:57 <monochrom> I am not scared by "build a thunk". It beats handcoding my own equivalent micromanagement, such as me having to track the Maybe Int and Int up there in my CP.
20:11:40 <monochrom> I am only afraid of "build n thunks", and only when "there is an alternative, O(1)-space algorithm".
20:11:55 <EvanR> it would be nice if you could consume the first part and it also consumes the first part of the second part
20:12:13 <EvanR> so when you get to the second part you don't go back
20:12:15 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
20:12:32 <EvanR> and no memory builds up
20:12:43 koz joins (~koz@121.99.240.58)
20:12:49 <tomsmeding> but you don't, right?
20:13:07 <tomsmeding> if you use the complicated version of course, not the take/drop version, for that your complaint is valid
20:13:31 <monochrom> "drop n xs" is a thunk, too.
20:13:45 alx741 joins (~alx741@157.100.93.160)
20:13:52 <EvanR> no I'm not saying the report version is different
20:14:03 <tomsmeding> that xs'' that gets returned in the fallback case for splitAt' is already the suffix after the first n items
20:14:21 <monochrom> And if you consume one node of "take n xs", you get "x : thunk(take (n-1) ...)"
20:14:24 jakalx joins (~jakalx@base.jakalx.net)
20:15:57 × sprout quits (~quassel@2a02:a467:ccd6:1:7c88:97e7:7c77:1c93) (Ping timeout: 240 seconds)
20:16:01 <EvanR> oh, xs'' is forgotten at each step
20:16:09 <EvanR> cool
20:16:27 <tomsmeding> forgotten?
20:17:01 <tomsmeding> it only gets produced after the n-long prefix has been traversed, and the value that is produced there is just passed along to the beginning
20:17:44 <EvanR> ok yeah
20:18:06 <EvanR> so snd you finally access is a chain of thunks n long
20:18:51 <tomsmeding> what computation does the n/2'th thunk do?
20:19:12 <EvanR> snd?
20:19:21 <tomsmeding> isn't the last thunk, that actually returns remainder unchanged, just passed along?
20:19:24 <EvanR> or grab that x'' from the split at
20:19:36 <tomsmeding> oh right
20:21:08 <tomsmeding> I would hope that ghc optimises that though, to a function with two return values
20:21:40 × shapr quits (~user@12.5.211.156) (Remote host closed the connection)
20:21:53 shapr joins (~user@12.5.211.156)
20:24:27 <EvanR> by returning the 2nd value, that would then create list 1 ahead of time?
20:24:27 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
20:24:56 <EvanR> if you use 2nd value first, makes sense
20:26:14 <EvanR> but "intuitively" (monochroms favorite!) you probably want to consume the first list lazily, then pick up where it left off from the original list
20:26:28 <EvanR> in that order
20:31:59 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
20:37:30 × justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.3)
20:41:28 Everything joins (~Everythin@37.115.210.35)
20:42:13 alx741 joins (~alx741@157.100.93.160)
20:42:19 × burnsidesLlama quits (~burnsides@dhcp168-016.wadham.ox.ac.uk) (Remote host closed the connection)
20:42:52 <monochrom> The core and stg code looks a bit scary about accumulating n thunks, but empirical running says it stays O(1)-space.
20:43:25 sprout joins (~quassel@2a02:a467:ccd6:1:7c88:97e7:7c77:1c93)
20:43:33 <monochrom> I have (xs, ys) = splitAt n [0..], n = large numbr, do {mapM_ print xs; print (take 1 ys)}
20:44:46 <monochrom> In core and stg, you will see the equiv of "let foo = splitAt n bar; xs = fst foo; ys = snd foo".
20:45:00 Everything parts (~Everythin@37.115.210.35) ()
20:46:05 <EvanR> hmm
20:46:34 × mason0 quits (~bc8147f2@cerf.good1.com) (Quit: CGI:IRC (Session timeout))
20:46:48 <tomsmeding> I was installing ghc-vis and trying it out in there, but it's not terribly enlightening; using monochrom's names: forcing ys forces the first n items of [0..] as well, after which forcing xs is only a single thunk. However, if you force xs first, then it incrementally traverses the prefix
20:48:35 × sprout quits (~quassel@2a02:a467:ccd6:1:7c88:97e7:7c77:1c93) (Ping timeout: 252 seconds)
20:49:59 × Pickchea quits (~private@user/pickchea) (Quit: Leaving)
20:51:28 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
20:52:11 acidjnk joins (~acidjnk@p200300d0c7271e22d5fcf408496a0722.dip0.t-ipconnect.de)
20:53:24 × jonathanx_ quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
20:53:42 jonathanx_ joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
20:54:19 <EvanR> i know indirection nodes can be removed by gc later, maybe a thunk that directly runs another thunk is also cleanup like that
20:54:22 <tomsmeding> to save you from installing it too, perhaps: https://tomsmeding.com/f/ghc-vis-splitAt.mp4
20:54:49 <EvanR> simplified at gc
20:55:28 <tomsmeding> (I have no idea what those Selector nodes are)
20:55:41 <tomsmeding> (more ghc-vis demos: https://www.youtube.com/watch?v=I4lnCG18TaY)
20:55:53 <mniip> this looks wicked
20:56:01 <tomsmeding> it is, isn't it?
20:56:07 <tomsmeding> I was stunned when I watched that YT video
20:56:19 <tomsmeding> so I had to try it myself, and this seemed like an opportunity :p
20:56:47 <mniip> the pointers in nullary constructors though
20:56:52 <mniip> I wonder if something can be done about that
20:57:25 <tomsmeding> yeah Joachim explains something about that in the video I linked, apparently GHC's GC has a limitation where each heap object needs to be at least 2 words large
20:57:51 <tomsmeding> so there's "something" there, and nobody cares what
20:58:11 <monochrom> Ooohhh, I think you have to look up "STG update frame" and how it informs GC to expedite evaluating "ys = snd foo" so it lets go of foo.
20:58:15 × coot quits (~coot@2a02:a310:e03f:8500:933a:39ca:ef4e:37cb) (Quit: coot)
20:59:05 <monochrom> I say this because I look in the Cmm code for the foo thunk, it begins with "I64[Sp - 16] = stg_upd_frame_info", i.e. pushing an "update frame" on the stack.
20:59:15 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.3)
20:59:29 <mniip> tomsmeding, yeah I'm wondering if there's a way to introspect whether it's really something or not
20:59:39 <monochrom> And the STG says it too, I just didn't know to read it. It says "foo = \u ...", the "u" there means this.
21:00:04 <tomsmeding> mniip: no idea, all my knowledge about ghc-vis comes from that video, and also about that second word for nil :p
21:00:28 <tomsmeding> monochrom: that sounds cool
21:01:54 <EvanR> "surprisingly efficient"
21:04:16 <monochrom> About 20 years ago Haskell compilers/interpreters didn't pull this trick. It was a big deal, people found out that splitAt, break, span were taking up space left right and centre.
21:05:17 <monochrom> Your mental model of lazy evaluation and thunking was not wrong. The standard lazy evaluation model does predict that you have a problem. Someone had to invent this "update frame" business to solve it.
21:06:32 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
21:08:26 <dolio> I don't think that's totally accurate.
21:08:41 <dolio> Update frames are just part of lazy evaluation.
21:09:45 alx741 joins (~alx741@157.100.93.160)
21:10:10 <dolio> Where you store the answer once it's calculated and you're walking back through the stack, so that other references don't perform the calculation again.
21:10:58 <dolio> And the opposite of \u is for lambdas that aren't part of names that can share work, like just a function.
21:11:30 × AWizzArd quits (~code@gehrels.uberspace.de) (Changing host)
21:11:30 AWizzArd joins (~code@user/awizzard)
21:12:02 <dolio> But, you're talking about where the garbage collector recognizes certain things like `fst (x,y)` and opportunistically 'collects' it as `x`, right?
21:13:54 <EvanR> in the code for splitAt the left components are list nodes being built, and the right component is basically a computation that traverses all the way down the input list to the pickup point. Somehow by looking at the first component the second component is being 'bumped'
21:14:34 <EvanR> so seems different from lazy evaluation memoizing
21:14:46 <EvanR> since you're not looking at that second component right now
21:16:35 sprout joins (~quassel@2a02:a467:ccd6:1:7c88:97e7:7c77:1c93)
21:17:34 <EvanR> snd (x,y) being simplified to y by gc might explain it
21:20:47 jeetelongname joins (~jeet@88-111-159-26.dynamic.dsl.as9105.com)
21:21:07 son0p joins (~ff@2800:484:1d81:b700:d40b:900:b387:320)
21:21:50 × sprout quits (~quassel@2a02:a467:ccd6:1:7c88:97e7:7c77:1c93) (Ping timeout: 260 seconds)
21:23:15 <EvanR> or in my random guess thunk (thunk x) is simplified to thunk x
21:23:59 <dolio> Oh, is that what you thought was going on? You never push two update frames in a row.
21:24:35 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
21:24:44 <dolio> If you would ever do that, you just point the new location to the existing one and continue.
21:26:06 <dolio> Otherwise you'd get stack overflows from stuff like `f x 0 = x ; f x n = let y = x in f y (n-1)`
21:27:07 burnsidesLlama joins (~burnsides@dhcp168-016.wadham.ox.ac.uk)
21:27:09 <EvanR> this example doesn't involve a tuple return
21:27:31 <EvanR> it seems like just passing pointers to stuff
21:27:58 <EvanR> and building a bunch of minus 1 thunks
21:28:16 <EvanR> scratch that... pattern matching
21:28:19 <dolio> let always builds a closure.
21:28:43 <EvanR> really
21:29:01 <dolio> So, in this scenario, `f x n` is x with n updating closures around it.
21:29:17 <Sgeo_> My use case is a bit ridiculous (I'm vaguely curious if van Laarhoven optics are implementable in Koka as effects in place of Functors), but are there useful Functors for van Laarhoven optics that have no Monad instance?
21:29:42 <dolio> But it still takes constant space to evaluate, because once the first update frame is on the stack, all the subsequent ones just get set to point to the first one instead of taking more stack.
21:30:18 <dolio> Well, in GHC that let gets inlined, but `let` in STG always builds a closure.
21:30:40 jumper149 joins (~jumper149@static.6.71.203.116.clients.your-server.de)
21:31:24 <jumper149> Is it possible to derive an instance together with its OVERLAPPABLE pragma?
21:32:24 <dolio> My point is that if you were worried about a bunch of simple indirections like that, their stack space is clamped, at least.
21:32:42 <dolio> Heap space is not, I think.
21:33:39 <EvanR> so alternating tuple returns, moving into a new tuple return is a simple indirection?
21:33:59 <dolio> No, that has other frames on the stack, I think.
21:34:05 × deadmarshal quits (~deadmarsh@95.38.228.81) (Quit: ZNC 1.8.2 - https://znc.in)
21:34:41 <Sgeo_> ...Const isn't a monad, apparently.
21:34:42 <geekosaur> jumper149, pretty sure you cannot cause an instance derivation to be OVERLAPPABLE
21:35:17 deadmarshal joins (~deadmarsh@95.38.228.81)
21:35:57 jgeerds joins (~jgeerds@55d4ac73.access.ecotel.net)
21:36:09 <jumper149> Well I can still use OVERLAPPING on other instances though. I guess that should be enough.
21:36:52 <geekosaur> hm. wonder if that's worth a proposal
21:37:14 <geekosaur> deriving ({-# OVERLAPPABLE #-} Foo, ...)
21:40:17 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
21:42:17 alx741 joins (~alx741@157.100.93.160)
21:43:05 <jumper149> geekosaur: It might even be possible to have something like this then: `deriving newtype ({-# OVERLAPPABLE #-} Foo) \n deriving ({-# OVERLAPPING #-} Foo) via T`
21:45:43 sprout joins (~quassel@2a02:a467:ccd6:1:7c88:97e7:7c77:1c93)
21:47:00 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
21:50:30 <sm> it's fairly common to provide a set of stackX.Y.yaml files, one per major ghc version supported. But for easy building you need a default stack.yaml as well. This breaks the pattern and is a hassle for scripting. A symlink seems like a reasonable solution, but does it work on windows these days ? Any other good solution ?
21:51:43 <geekosaur> windows 10 supports symlinks but may require administrator privileges in some versions (admin privs definitely required for earlier versions but not sure anyone cares about win7/8 these days)
21:51:59 <geekosaur> does stack.yaml support include files?
21:52:14 × earendel quits (uid498179@user/earendel) (Quit: Connection closed for inactivity)
21:52:47 <sm> good question.. don't think so but I'll check
21:52:49 × cosimone quits (~user@93-47-229-223.ip115.fastwebnet.it) (Quit: ERC (IRC client for Emacs 27.1))
21:54:09 × sprout quits (~quassel@2a02:a467:ccd6:1:7c88:97e7:7c77:1c93) (Ping timeout: 268 seconds)
21:55:10 <sm> I'm having a hard time visualising the symlink experience on windows 10. If you're a regular windows 10 user and you clone a project containing a symlink, do you see a small useless file there ?
21:56:32 <geekosaur> symlinks don't work that way on windows, they're implemented as special filesystem nodes called reparse points. if symlinks are not supported or require greater privileges than the user has, cloning will fail with an error
21:59:15 <sm> ah. That sounds like something I must avoid then
21:59:32 × jeetelongname quits (~jeet@88-111-159-26.dynamic.dsl.as9105.com) (Ping timeout: 240 seconds)
22:01:03 <sm> thanks!
22:03:15 alx741 joins (~alx741@157.100.93.160)
22:06:39 × jonathanx_ quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
22:07:01 jonathanx joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
22:07:43 × waleee quits (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Ping timeout: 268 seconds)
22:08:06 × jumper149 quits (~jumper149@static.6.71.203.116.clients.your-server.de) (Quit: WeeChat 3.3)
22:08:39 <sm> though.. I have some symlinks in the repo already. Hmm
22:12:38 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
22:12:41 pfurla_ joins (~pfurla@205.185.222.148)
22:14:13 × pfurla quits (~pfurla@2804:18:5827:38:71a1:6773:333f:330d) (Ping timeout: 240 seconds)
22:15:02 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
22:21:07 sprout joins (~quassel@2a02:a467:ccd6:1:7c88:97e7:7c77:1c93)
22:22:09 × nfd quits (~nfd@user/nfd) (Quit: Lost terminal)
22:25:37 × sprout quits (~quassel@2a02:a467:ccd6:1:7c88:97e7:7c77:1c93) (Ping timeout: 240 seconds)
22:29:24 alx741 joins (~alx741@157.100.93.160)
22:29:42 Tuplanolla joins (~Tuplanoll@91-159-68-169.elisa-laajakaista.fi)
22:29:45 pfurla joins (~pfurla@177.25.182.217)
22:31:37 × pfurla_ quits (~pfurla@205.185.222.148) (Ping timeout: 240 seconds)
22:33:38 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 252 seconds)
22:35:05 notzmv joins (~zmv@user/notzmv)
22:37:29 justsomeguy joins (~justsomeg@user/justsomeguy)
22:37:36 benin joins (~benin@183.82.204.250)
22:39:19 kranius joins (~kranius@222.186.245.213.rev.sfr.net)
22:40:24 × CiaoSen quits (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
22:40:37 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
22:43:43 lavaman joins (~lavaman@98.38.249.169)
22:48:27 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
22:49:35 <sm> report from a non-admin windows 10 user - they can clone a repo with symlinks, and the symlinks are non functional but harmless (small files containing the path)
22:52:58 <geekosaur> interesting. must be some git weirdness
22:54:19 <hpc> it probably raises fewer questions than "why is git asking for admin?"
22:54:48 sprout joins (~quassel@2a02:a467:ccd6:1:7c88:97e7:7c77:1c93)
22:57:37 alx741 joins (~alx741@157.100.93.160)
23:02:16 × chomwitt quits (~chomwitt@2a02:587:dc19:a500:12c3:7bff:fe6d:d374) (Remote host closed the connection)
23:02:26 <geekosaur> yeh. or "why is this file missing?"
23:02:56 × michalz quits (~michalz@185.246.204.104) (Remote host closed the connection)
23:07:32 × sprout quits (~quassel@2a02:a467:ccd6:1:7c88:97e7:7c77:1c93) (Ping timeout: 240 seconds)
23:08:10 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
23:08:27 nighmi joins (~felix@55d4f4c1.access.ecotel.net)
23:08:28 <Axman6> Sgeo_: implementing instance Monad Const is an interesting exercise
23:10:35 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
23:13:16 lavaman joins (~lavaman@98.38.249.169)
23:15:16 × danso quits (~danso@23-233-111-52.cpe.pppoe.ca) (Quit: WeeChat 3.3)
23:15:27 sm leaves stack.yaml alone, uses a custom hie.yaml to make hls use a different one, and adds local convenience aliases like
23:15:27 sm alias stack810="stack --stack-yaml stack*8*10*.yaml"
23:15:27 sm alias stack90="stack --stack-yaml stack*9*0*.yaml"
23:15:39 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 256 seconds)
23:16:10 Vajb joins (~Vajb@2001:999:62:f3d1:4390:fbed:1f9b:9d03)
23:20:09 × nighmi quits (~felix@55d4f4c1.access.ecotel.net) (Quit: WeeChat 3.3)
23:21:18 mason0 joins (~bc8147f2@cerf.good1.com)
23:25:40 × mmhat quits (~mmh@55d46fe9.access.ecotel.net) (Quit: WeeChat 3.3)
23:26:17 alx741 joins (~alx741@157.100.93.160)
23:28:15 × max22- quits (~maxime@2a01cb0883359800e979b10b27a72e14.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
23:29:31 <janus> sm: what's the rationale for the wildcard if you only support one minor release per major version?
23:29:32 × Vajb quits (~Vajb@2001:999:62:f3d1:4390:fbed:1f9b:9d03) (Read error: Connection reset by peer)
23:29:59 <sm> janus: just to adapt to the filename conventions in different projects
23:30:17 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
23:30:23 × burnsidesLlama quits (~burnsides@dhcp168-016.wadham.ox.ac.uk) (Remote host closed the connection)
23:33:42 TranquilEcho joins (~grom@user/tranquilecho)
23:34:22 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
23:34:50 × son0p quits (~ff@2800:484:1d81:b700:d40b:900:b387:320) (Ping timeout: 260 seconds)
23:37:36 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
23:39:31 × kranius quits (~kranius@222.186.245.213.rev.sfr.net) (Ping timeout: 245 seconds)
23:39:55 sprout joins (~quassel@2a02:a467:ccd6:1:7c88:97e7:7c77:1c93)
23:42:32 × jgeerds quits (~jgeerds@55d4ac73.access.ecotel.net) (Ping timeout: 240 seconds)
23:43:57 × bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 240 seconds)
23:46:17 × sprout quits (~quassel@2a02:a467:ccd6:1:7c88:97e7:7c77:1c93) (Ping timeout: 240 seconds)
23:47:01 × Jing quits (~hedgehog@2604:a840:3::103e) (Remote host closed the connection)
23:47:41 Jing joins (~hedgehog@2604:a840:3::103e)
23:47:49 machinedgod joins (~machinedg@24.105.81.50)
23:52:17 <hololeap> mapFunction :: (Bounded k, Enum k, Ord k) => Map k v -> Maybe (k -> v)
23:52:41 alx741 joins (~alx741@157.100.93.160)
23:52:44 × justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.3)
23:53:02 <Axman6> returns Nothing if any k isn't present?
23:53:31 <hololeap> this is supposed to create a function from k to v, only if all the keys ([minBound..maxBound]) are present, but I can't think of how to implement it
23:53:40 <Axman6> this feels like such a scala thing to do, IIRC Maps are PartialFunctions
23:55:07 <Axman6> hololeap: it feels like using memo-trie could help a lot
23:55:53 × Akiva quits (~Akiva@user/Akiva) (Ping timeout: 256 seconds)
23:55:55 <hololeap> the idea is that you're searching a problem space and building up this map as you go, and once you have it completed, you can get a complete function from it
23:56:14 <Axman6> also if Data.Map exposes its constructors, you could build an expression that does a binary search from the map's structure after validating all elements
23:56:25 <monochrom> Use "keys" to get the keys present, compare with [minBound..maxBound].
23:57:32 <Axman6> also, justified containers might be relevant
23:57:52 <hololeap> ok, yeah I was trying to do something fancy using Map.lookup and the Maybe monad

All times are in UTC on 2021-12-16.