Logs on 2021-10-06 (liberachat/#haskell)
| 00:00:25 | <lbseale> | I am trying to read an input from stdin using Data.Text.IO, why would using `putStr` not show my prompt, but `putStrLn` show it? |
| 00:00:35 | × | machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Remote host closed the connection) |
| 00:00:44 | <lbseale> | When I use `putStr`, it only prints after the program is finished |
| 00:01:40 | → | machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca) |
| 00:02:18 | × | machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Client Quit) |
| 00:02:21 | <lbseale> | And I only have this problem after I compile it with GHC, it does not occur if I run it with `runhaskell` |
| 00:02:33 | <monochrom> | Buffering. |
| 00:02:35 | → | machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca) |
| 00:02:54 | <monochrom> | Use "hFlush stdout". (import System.IO) |
| 00:03:49 | × | Null_A quits (~null_a@2601:645:8700:2290:e8ac:2b75:e714:d893) (Read error: Connection reset by peer) |
| 00:04:00 | <monochrom> | Or look under System.IO for "hSetBuffering". |
| 00:04:04 | → | Null_A joins (~null_a@2601:645:8700:2290:e8ac:2b75:e714:d893) |
| 00:04:12 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 268 seconds) |
| 00:04:59 | <monochrom> | In a Unix-and-C course I pose a related puzzle to my students. |
| 00:05:21 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 00:05:37 | <monochrom> | have a printf("hello"), then fork, then printf(" there\n"). Why do you see two hello's, not just one? |
| 00:08:31 | <lbseale> | thank you very much! I used `hSetBuffering` and it did just what I wanted |
| 00:09:35 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 00:13:20 | × | jespada quits (~jespada@2803:9800:9842:7a62:2d4b:7b80:ce15:fc84) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 00:15:19 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 00:16:21 | → | jlamothe joins (~jlamothe@104.158.48.100) |
| 00:17:50 | <geekosaur> | and the reason it works with runhaskell (and ghci) is that those automatically turn off buffering |
| 00:18:09 | <lbseale> | ah thanks geekosaur , I was wondering |
| 00:21:47 | → | notzmv joins (~zmv@user/notzmv) |
| 00:22:23 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 00:23:58 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.3) |
| 00:26:37 | × | Null_A quits (~null_a@2601:645:8700:2290:e8ac:2b75:e714:d893) (Remote host closed the connection) |
| 00:49:29 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds) |
| 00:51:26 | <zzz> | quick question: what's the function we use to turn a list into a list of same sized chunks? |
| 00:51:45 | <geekosaur> | @index chunksOf |
| 00:51:45 | <lambdabot> | bzzt |
| 00:51:48 | <geekosaur> | bah |
| 00:51:51 | <geekosaur> | :t chunksOf |
| 00:51:53 | <lambdabot> | Int -> [e] -> [[e]] |
| 00:52:19 | <geekosaur> | in Data.List.Split from the split package. also look there for other kinds of list splitters |
| 00:52:22 | <zzz> | is that from Data.List? |
| 00:52:26 | <zzz> | ah... ok |
| 00:52:28 | <zzz> | Split |
| 00:52:40 | <zzz> | that's what i was forgetting |
| 00:55:28 | × | pgib quits (~textual@173.38.117.88) (Ping timeout: 252 seconds) |
| 01:05:25 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 252 seconds) |
| 01:10:08 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
| 01:10:20 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 01:12:05 | × | xff0x quits (~xff0x@2001:1a81:52e7:9700:89ea:128b:cbad:e425) (Ping timeout: 246 seconds) |
| 01:13:24 | → | sleblanc joins (~sleblanc@user/sleblanc) |
| 01:14:01 | → | xff0x joins (~xff0x@2001:1a81:5322:8500:eff4:1133:1236:ed4a) |
| 01:16:47 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 01:21:07 | → | kimjetwav joins (~user@2607:fea8:235f:9730:733c:b68b:7b22:df97) |
| 01:21:30 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 01:26:09 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 245 seconds) |
| 01:27:14 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 01:27:14 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 01:27:14 | → | wroathe joins (~wroathe@user/wroathe) |
| 01:34:40 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 250 seconds) |
| 01:36:10 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 252 seconds) |
| 01:38:12 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 01:38:12 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 01:38:12 | → | wroathe joins (~wroathe@user/wroathe) |
| 01:38:37 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.2) |
| 01:38:47 | × | abrantesasf quits (~abrantesa@187.36.170.211) (Remote host closed the connection) |
| 01:42:52 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds) |
| 01:44:02 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 01:56:22 | → | xiongxin joins (~quassel@119.123.102.49) |
| 02:06:28 | × | benin0369323016 quits (~benin@183.82.205.238) (Ping timeout: 252 seconds) |
| 02:07:32 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 268 seconds) |
| 02:10:18 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 276 seconds) |
| 02:11:25 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Ping timeout: 252 seconds) |
| 02:11:50 | → | benin0369323016 joins (~benin@183.82.176.241) |
| 02:12:24 | × | alzgh quits (~alzgh@user/alzgh) (Remote host closed the connection) |
| 02:12:27 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 02:13:26 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 02:20:52 | → | ahappydeath_ joins (~ahappydea@dsl-74-83-53-157.fuse.net) |
| 02:25:48 | × | ahappydeath_ quits (~ahappydea@dsl-74-83-53-157.fuse.net) (Ping timeout: 250 seconds) |
| 02:29:44 | × | sprout quits (~quassel@2a02:a467:ccd6:1:7da6:2d3:65ff:ac76) (Ping timeout: 268 seconds) |
| 02:34:32 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 02:34:32 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 02:34:32 | → | wroathe joins (~wroathe@user/wroathe) |
| 02:38:30 | → | Null_A joins (~null_a@2601:645:8700:2290:e8ac:2b75:e714:d893) |
| 02:40:43 | × | yinghua quits (~yinghua@181.228.40.183) (Quit: Leaving) |
| 02:42:02 | × | terrorjack quits (~terrorjac@static.3.200.12.49.clients.your-server.de) (Quit: The Lounge - https://thelounge.chat) |
| 02:43:17 | × | Null_A quits (~null_a@2601:645:8700:2290:e8ac:2b75:e714:d893) (Ping timeout: 264 seconds) |
| 02:47:17 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 02:53:13 | × | cheater quits (~Username@user/cheater) (Ping timeout: 252 seconds) |
| 02:54:04 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 245 seconds) |
| 02:56:09 | × | td_ quits (~td@muedsl-82-207-238-165.citykom.de) (Ping timeout: 245 seconds) |
| 02:58:10 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 252 seconds) |
| 02:58:10 | → | td_ joins (~td@94.134.91.91) |
| 02:59:07 | → | sprout joins (~quassel@2a02:a467:ccd6:1:3914:a7b1:2a0f:e9d8) |
| 02:59:49 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 02:59:58 | → | cheater joins (~Username@user/cheater) |
| 03:03:35 | → | rkrishnan joins (~user@2402:e280:215c:2cd:6d16:f9a5:49d8:1fa5) |
| 03:08:38 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 03:08:38 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 03:08:38 | → | wroathe joins (~wroathe@user/wroathe) |
| 03:14:38 | × | jiribenes quits (~jiribenes@rosa.jiribenes.com) (Remote host closed the connection) |
| 03:14:54 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 245 seconds) |
| 03:15:08 | → | wroathe joins (~wroathe@user/wroathe) |
| 03:15:22 | → | jiribenes joins (~jiribenes@rosa.jiribenes.com) |
| 03:15:23 | × | _0x47 quits (sid508683@id-508683.tinside.irccloud.com) (Read error: Connection reset by peer) |
| 03:15:32 | → | _0x47 joins (sid508683@id-508683.tinside.irccloud.com) |
| 03:15:52 | × | kristjansson_ quits (sid126207@id-126207.tinside.irccloud.com) (Read error: Connection reset by peer) |
| 03:15:52 | × | agander_m quits (sid407952@id-407952.tinside.irccloud.com) (Read error: Connection reset by peer) |
| 03:15:54 | × | angerman quits (sid209936@id-209936.ilkley.irccloud.com) (Read error: Connection reset by peer) |
| 03:16:01 | → | agander_m joins (sid407952@id-407952.tinside.irccloud.com) |
| 03:16:03 | → | angerman joins (sid209936@id-209936.ilkley.irccloud.com) |
| 03:16:09 | → | kristjansson_ joins (sid126207@id-126207.tinside.irccloud.com) |
| 03:16:14 | × | codedmart quits (codedmart@2600:3c01::f03c:92ff:fefe:8511) (Quit: ZNC 1.7.5+deb4 - https://znc.in) |
| 03:16:15 | × | astra` quits (sid289983@user/amish) (Read error: Connection reset by peer) |
| 03:16:17 | × | ProofTechnique quits (sid79547@id-79547.ilkley.irccloud.com) (Read error: Connection reset by peer) |
| 03:16:19 | × | nrr quits (sid20938@id-20938.lymington.irccloud.com) (Read error: Connection reset by peer) |
| 03:16:26 | → | ProofTechnique joins (sid79547@id-79547.ilkley.irccloud.com) |
| 03:16:27 | → | astra` joins (sid289983@user/amish) |
| 03:16:28 | → | nrr joins (sid20938@id-20938.lymington.irccloud.com) |
| 03:16:30 | → | codedmart joins (codedmart@2600:3c01::f03c:92ff:fefe:8511) |
| 03:18:08 | × | fendor[m] quits (~fendormat@2001:470:69fc:105::fcbd) (Ping timeout: 265 seconds) |
| 03:18:08 | × | YoungChiefBTW quits (~youngchie@user/youngchiefbtw) (Ping timeout: 265 seconds) |
| 03:18:37 | × | Topik[m] quits (~topikmatr@2001:470:69fc:105::a082) (Ping timeout: 265 seconds) |
| 03:18:37 | × | lwe[m] quits (~dendrumat@2001:470:69fc:105::2f9b) (Ping timeout: 265 seconds) |
| 03:18:37 | × | ericson23141 quits (~ericson23@2001:470:69fc:105::70c) (Ping timeout: 265 seconds) |
| 03:18:37 | × | rosariopulella[m quits (~rosariopu@2001:470:69fc:105::a57) (Ping timeout: 265 seconds) |
| 03:18:37 | × | alexfmpe[m] quits (~alexfmpem@2001:470:69fc:105::38ba) (Ping timeout: 265 seconds) |
| 03:18:37 | × | Morrow[m] quits (~morrowmma@2001:470:69fc:105::1d0) (Ping timeout: 265 seconds) |
| 03:18:37 | × | MatrixTravelerb4 quits (~voyagert2@2001:470:69fc:105::22) (Ping timeout: 265 seconds) |
| 03:18:38 | × | maerwald[m] quits (~maerwaldm@user/maerwald) (Ping timeout: 265 seconds) |
| 03:18:38 | × | dualinverter[m] quits (~dualinver@2001:470:69fc:105::16a7) (Ping timeout: 265 seconds) |
| 03:18:38 | × | Drew[m] quits (~drewefenw@2001:470:69fc:105::c8c4) (Ping timeout: 265 seconds) |
| 03:18:38 | × | psydroid quits (~psydroid@user/psydroid) (Ping timeout: 265 seconds) |
| 03:18:38 | × | lieven quits (~mal@ns2.wyrd.be) (Ping timeout: 265 seconds) |
| 03:18:38 | × | greenbourne277 quits (~greenbour@2001:4b98:dc2:45:216:3eff:fe8a:bbf0) (Ping timeout: 265 seconds) |
| 03:18:38 | × | mstruebing quits (~maex@2001:41d0:8:93c7::1) (Ping timeout: 265 seconds) |
| 03:18:38 | × | bwe quits (~bwe@2a01:4f8:1c1c:4878::2) (Ping timeout: 265 seconds) |
| 03:19:03 | → | bwe joins (~bwe@2a01:4f8:1c1c:4878::2) |
| 03:19:06 | × | carmysilna quits (~brightly-@2001:470:69fc:105::2190) (Ping timeout: 265 seconds) |
| 03:19:06 | × | vaibhavsagar[m] quits (~vaibhavsa@2001:470:69fc:105::ffe) (Ping timeout: 265 seconds) |
| 03:19:07 | × | hjulle[m] quits (~hjullemat@2001:470:69fc:105::1dd) (Ping timeout: 265 seconds) |
| 03:19:07 | × | hsiktas[m] quits (~hsiktasma@2001:470:69fc:105::30d4) (Ping timeout: 265 seconds) |
| 03:19:07 | × | maralorn quits (~maralorn@2001:470:69fc:105::251) (Ping timeout: 265 seconds) |
| 03:19:07 | × | jophish quits (~jophish@2001:470:69fc:105::670) (Ping timeout: 265 seconds) |
| 03:19:07 | → | lieven joins (~mal@ns2.wyrd.be) |
| 03:19:11 | → | mstruebing joins (~maex@2001:41d0:8:93c7::1) |
| 03:20:11 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds) |
| 03:20:26 | × | alx741 quits (~alx741@186.178.109.65) (Quit: alx741) |
| 03:21:38 | → | YoungChiefBTW joins (~youngchie@2001:470:69fc:105::214c) |
| 03:21:59 | → | hsiktas[m] joins (~hsiktasma@2001:470:69fc:105::30d4) |
| 03:22:09 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 268 seconds) |
| 03:22:30 | → | rosariopulella[m joins (~rosariopu@2001:470:69fc:105::a57) |
| 03:22:32 | → | lwe[m] joins (~dendrumat@2001:470:69fc:105::2f9b) |
| 03:23:15 | → | psydroid joins (~psydroid@user/psydroid) |
| 03:24:18 | → | MatrixTravelerb4 joins (~voyagert2@2001:470:69fc:105::22) |
| 03:25:40 | × | machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 252 seconds) |
| 03:25:57 | → | mbuf joins (~Shakthi@223.178.119.120) |
| 03:27:46 | × | shapr quits (~user@pool-100-36-247-68.washdc.fios.verizon.net) (Ping timeout: 250 seconds) |
| 03:30:47 | → | greenbourne277 joins (~greenbour@2001:4b98:dc2:45:216:3eff:fe8a:bbf0) |
| 03:32:13 | → | fendor[m] joins (~fendormat@2001:470:69fc:105::fcbd) |
| 03:32:39 | → | maerwald[m] joins (~maerwaldm@2001:470:69fc:105::1ee) |
| 03:33:03 | → | Morrow[m] joins (~morrowmma@2001:470:69fc:105::1d0) |
| 03:33:08 | → | Drew[m] joins (~drewefenw@2001:470:69fc:105::c8c4) |
| 03:34:26 | → | alexfmpe[m] joins (~alexfmpem@2001:470:69fc:105::38ba) |
| 03:35:41 | → | Topik[m] joins (~topikmatr@2001:470:69fc:105::a082) |
| 03:36:15 | → | ericson23141 joins (~ericson23@2001:470:69fc:105::70c) |
| 03:36:30 | → | dualinverter[m] joins (~dualinver@2001:470:69fc:105::16a7) |
| 03:38:07 | → | carmysilna joins (~brightly-@2001:470:69fc:105::2190) |
| 03:38:10 | → | hjulle[m] joins (~hjullemat@2001:470:69fc:105::1dd) |
| 03:38:58 | → | jophish joins (~jophish@2001:470:69fc:105::670) |
| 03:39:29 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 245 seconds) |
| 03:40:19 | → | maralorn joins (~maralorn@2001:470:69fc:105::251) |
| 03:41:20 | → | vaibhavsagar[m] joins (~vaibhavsa@2001:470:69fc:105::ffe) |
| 03:46:50 | × | myShoggoth quits (~myShoggot@97-120-70-214.ptld.qwest.net) (Ping timeout: 250 seconds) |
| 03:48:13 | × | sleblanc quits (~sleblanc@user/sleblanc) (Ping timeout: 252 seconds) |
| 03:52:09 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
| 03:52:18 | × | Cajun quits (~Cajun@user/cajun) (Quit: Client closed) |
| 03:52:34 | × | YoungChiefBTW quits (~youngchie@2001:470:69fc:105::214c) (Changing host) |
| 03:52:34 | → | YoungChiefBTW joins (~youngchie@user/youngchiefbtw) |
| 03:54:33 | × | Psybur quits (~Psybur@mobile-166-170-32-197.mycingular.net) (Remote host closed the connection) |
| 03:58:14 | × | xiongxin quits (~quassel@119.123.102.49) (Ping timeout: 245 seconds) |
| 03:59:13 | × | geranim0 quits (~geranim0@modemcable242.171-178-173.mc.videotron.ca) (Ping timeout: 252 seconds) |
| 04:09:32 | × | waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 246 seconds) |
| 04:09:34 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 04:12:36 | → | emf joins (~emf@2620:10d:c090:400::5:b405) |
| 04:17:39 | × | shriekingnoise quits (~shrieking@186.137.144.80) (Ping timeout: 268 seconds) |
| 04:23:06 | × | emf quits (~emf@2620:10d:c090:400::5:b405) (Ping timeout: 260 seconds) |
| 04:26:39 | × | ByronJohnson quits (~bairyn@mail.digitalkingdom.org) (Remote host closed the connection) |
| 04:29:54 | → | shriekingnoise joins (~shrieking@186.137.144.80) |
| 04:31:40 | → | dajoer joins (~david@user/gvx) |
| 04:42:28 | → | lavaman joins (~lavaman@98.38.249.169) |
| 04:58:30 | → | ByronJohnson joins (~bairyn@mail.digitalkingdom.org) |
| 05:04:25 | → | Guest41 joins (~Guest41@l37-195-64-169.novotelecom.ru) |
| 05:09:20 | Guest41 | is now known as vins |
| 05:12:31 | × | turlando quits (~turlando@user/turlando) (Read error: Connection reset by peer) |
| 05:13:47 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 05:16:29 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 05:17:05 | → | turlando joins (~turlando@93-42-250-112.ip89.fastwebnet.it) |
| 05:17:05 | × | turlando quits (~turlando@93-42-250-112.ip89.fastwebnet.it) (Changing host) |
| 05:17:05 | → | turlando joins (~turlando@user/turlando) |
| 05:22:59 | → | myShoggoth joins (~myShoggot@97-120-70-214.ptld.qwest.net) |
| 05:24:41 | → | Heisen joins (~Heisen@77.240.67.20) |
| 05:26:11 | → | chomwitt joins (~chomwitt@2a02:587:dc18:b400:12c3:7bff:fe6d:d374) |
| 05:28:51 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 05:29:55 | × | vins quits (~Guest41@l37-195-64-169.novotelecom.ru) (Quit: Client closed) |
| 05:30:09 | → | jtomas joins (~jtomas@95.red-88-11-64.dynamicip.rima-tde.net) |
| 05:31:35 | × | slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving) |
| 05:33:18 | × | phma quits (~phma@host-67-44-208-158.hnremote.net) (Read error: Connection reset by peer) |
| 05:33:55 | × | Guest20 quits (~Guest20@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Ping timeout: 256 seconds) |
| 05:34:26 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 05:34:28 | → | phma joins (~phma@host-67-44-208-228.hnremote.net) |
| 05:39:50 | → | max22- joins (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) |
| 05:42:32 | × | zmt00 quits (~zmt00@user/zmt00) (Ping timeout: 250 seconds) |
| 05:47:00 | × | Heisen quits (~Heisen@77.240.67.20) (Quit: Client closed) |
| 05:49:18 | → | fef joins (~thedawn@user/thedawn) |
| 05:50:14 | × | myShoggoth quits (~myShoggot@97-120-70-214.ptld.qwest.net) (Ping timeout: 265 seconds) |
| 05:50:29 | → | ubert joins (~Thunderbi@77.119.164.97.wireless.dyn.drei.com) |
| 05:50:31 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds) |
| 05:57:37 | → | mei joins (~mei@user/mei) |
| 06:02:29 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 268 seconds) |
| 06:03:05 | → | xiongxin joins (~quassel@119.123.102.49) |
| 06:08:08 | → | Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) |
| 06:10:41 | → | Guest82 joins (~Guest82@l37-195-64-169.novotelecom.ru) |
| 06:17:08 | → | vinstre joins (~vinstre@l37-195-64-169.novotelecom.ru) |
| 06:21:46 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 06:23:08 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 06:25:09 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:285c:5722:2a44:fb76) |
| 06:28:14 | <vinstre> | !cloakme |
| 06:29:17 | sshine | gives vinstre a cloak and wizard hat |
| 06:29:40 | <sshine> | you've been initiated! |
| 06:30:40 | <tomsmeding> | monochrom: okay yeah, that point of how untyped lambda calculus gives you power by essentially allowing you to unify a and a->a is kind of compelling |
| 06:31:29 | → | lavaman joins (~lavaman@98.38.249.169) |
| 06:32:32 | Axman6 | runs over and wraps vinstre in his wizard cloak - "You are safe now, they won't find you here" |
| 06:32:45 | <tomsmeding> | still, that's within a functional world. If you go claiming that even in the non-functional world, you need self-reference to do anything (which I guess is true for the right definition of self-reference, with the labels discussed earlier), you don't even need this functional argument anymore: your FPL interpreter runs on a very imperative processor :p |
| 06:33:13 | → | vysn joins (~vysn@user/vysn) |
| 06:35:21 | ← | vinstre parts (~vinstre@l37-195-64-169.novotelecom.ru) () |
| 06:35:37 | → | kenran joins (~kenran@b2b-37-24-119-190.unitymedia.biz) |
| 06:35:56 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 06:36:18 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 265 seconds) |
| 06:41:46 | → | libertyprime joins (~libertypr@118.149.75.34) |
| 06:43:08 | <libertyprime> | Hey guys. need some help figuring out why I am getting "Could not find module ‘Data.Aeson’". Here is my code: http://github.com/semiosis/ilambda/blob/master/hs-stack/app/Main.hs |
| 06:43:23 | <libertyprime> | I have tried running hlint through stack, and that checks out fine with no errors. |
| 06:43:37 | × | yielduck quits (~yielduck@176.120.238.10) (Ping timeout: 256 seconds) |
| 06:44:02 | × | xiongxin quits (~quassel@119.123.102.49) (Ping timeout: 265 seconds) |
| 06:44:08 | <libertyprime> | However I am using hie which is providing the error through my LSP client |
| 06:44:44 | <libertyprime> | I have tried creating both cabal and stack projects, the stack project which defers to cabal anyway for the adding of the dependency |
| 06:44:58 | <jneira[m]> | i hope it will be haskell-language-server(hls) and not hie :-) |
| 06:45:31 | <libertyprime> | Oh, sorry, you're right. I'm using hls |
| 06:45:52 | <jneira[m]> | hie was the predecessor of hls, still is mentioning in some docs and config files though |
| 06:47:11 | × | chomwitt quits (~chomwitt@2a02:587:dc18:b400:12c3:7bff:fe6d:d374) (Ping timeout: 245 seconds) |
| 06:47:12 | <jneira[m]> | ok, i think maybe you are hitting https://github.com/haskell/haskell-language-server/issues/366 |
| 06:47:48 | <jneira[m]> | so you need to succesfully build the package with `stack clean && stack build`, before opening it in the editor |
| 06:48:26 | × | Guest82 quits (~Guest82@l37-195-64-169.novotelecom.ru) (Quit: Client closed) |
| 06:48:53 | <jneira[m]> | if the lib was not built or contain compile errors when opening the editor, tests and executables cant be loaded |
| 06:49:10 | <jneira[m]> | 😥 |
| 06:50:43 | <jneira[m]> | it should work for cabal, but to make hls picks cabal to load the project you have to delete/rename stack.yaml or create a explicit `hie.yaml` config file telling hls using cabal |
| 06:53:26 | <libertyprime> | jneira[m]: thank you very much for this info. extremely helpful. i will try again for cabal exclusively. i have a bit of my own legacy scripts. wondering now if i can avoid all of this by using nix |
| 06:54:04 | <jneira[m]> | well you will avoid some issues and will have some new ones :-D |
| 06:55:07 | <jneira[m]> | but that is the fate of programming i suppose, at least the new ones could be more interesting :-P |
| 06:56:28 | <libertyprime> | ah hell. yeah. upon beginning working on my project as you can see with haskell, and an otherwise sexy emacs setup, i have realised getting over this hill is sooooo worth it. i had a glimpse at basically using this hacky as project with my shell interop working inside haskell. ill give my setup some more work tonight. just want hls to be g. |
| 06:58:32 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 265 seconds) |
| 07:00:35 | <libertyprime> | jneira[m]: how important is the linting to the workings of hls? if i ignore the issue will hls function normally areas? or is the linter coupled with other things such as code actions? |
| 07:00:39 | <libertyprime> | https://asciinema.org/a/v6HGLeIDtQju4qQIBsurRRnsh |
| 07:01:31 | <jneira[m]> | it is totally optional and you can disable it via configuration |
| 07:02:35 | <libertyprime> | oh, perfect. :) i have something that works well enough then |
| 07:02:39 | <jneira[m]> | https://haskell-language-server.readthedocs.io/en/latest/configuration.html#generic-plugin-configuration |
| 07:02:42 | <libertyprime> | thanks. not going to test fate |
| 07:03:04 | → | neurocyte013288 joins (~neurocyte@46.243.81.207) |
| 07:03:04 | × | neurocyte013288 quits (~neurocyte@46.243.81.207) (Changing host) |
| 07:03:04 | → | neurocyte013288 joins (~neurocyte@user/neurocyte) |
| 07:03:13 | <libertyprime> | do you want to see some haskell pick up lines? |
| 07:03:15 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 07:03:40 | <jneira[m]> | so `haskell.plugin.hlint.globalOn: false`should make it be silenced |
| 07:04:25 | <jneira[m]> | not sure how to set it in emacs, lsp-haskell plugin docs might help you |
| 07:07:22 | → | michalz joins (~michalz@185.246.204.94) |
| 07:13:41 | × | azeem quits (~azeem@2a00:801:23d:c203:2f8f:c97c:ce0f:f54f) (Read error: Connection reset by peer) |
| 07:13:47 | → | kuribas joins (~user@ptr-25vy0i833ltdcqizn0k.18120a2.ip6.access.telenet.be) |
| 07:14:06 | → | azeem joins (~azeem@2a00:801:23d:c203:2f8f:c97c:ce0f:f54f) |
| 07:17:08 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
| 07:19:04 | × | arahael quits (~arahael@118.211.178.62) (Quit: WeeChat 2.7.1) |
| 07:20:05 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 07:21:14 | → | chomwitt joins (~chomwitt@94.66.61.137) |
| 07:22:32 | → | tremon joins (~tremon@217-63-61-89.cable.dynamic.v4.ziggo.nl) |
| 07:22:39 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 07:22:44 | × | azeem quits (~azeem@2a00:801:23d:c203:2f8f:c97c:ce0f:f54f) (Read error: Connection reset by peer) |
| 07:23:27 | → | slavaqq joins (~slavaqq@sdmail.sdserver.cz) |
| 07:24:03 | → | azeem joins (~azeem@emp-183-4.eduroam.uu.se) |
| 07:30:51 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 07:37:32 | × | ubert quits (~Thunderbi@77.119.164.97.wireless.dyn.drei.com) (Ping timeout: 265 seconds) |
| 07:37:32 | → | ub joins (~Thunderbi@178.115.45.189.wireless.dyn.drei.com) |
| 07:39:51 | ub | is now known as ubert |
| 07:42:27 | × | dextaa quits (~DV@user/dextaa) (Ping timeout: 240 seconds) |
| 07:47:25 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 07:49:37 | → | chele joins (~chele@user/chele) |
| 07:52:36 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 07:55:34 | × | hnOsmium0001 quits (uid453710@id-453710.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 07:55:35 | → | Heisen joins (~Heisen@77.240.67.20) |
| 07:56:40 | × | jtomas quits (~jtomas@95.red-88-11-64.dynamicip.rima-tde.net) (Remote host closed the connection) |
| 07:58:16 | × | neurocyte013288 quits (~neurocyte@user/neurocyte) (Read error: Connection reset by peer) |
| 07:59:04 | → | neurocyte013288 joins (~neurocyte@46.243.81.207) |
| 07:59:05 | × | neurocyte013288 quits (~neurocyte@46.243.81.207) (Changing host) |
| 07:59:05 | → | neurocyte013288 joins (~neurocyte@user/neurocyte) |
| 08:01:32 | → | mc47 joins (~mc47@xmonad/TheMC47) |
| 08:02:08 | → | Guest20 joins (~Guest20@eth-west-pareq2-46-193-4-100.wb.wifirst.net) |
| 08:04:38 | <Guest20> | How would I take an input list in HSpec and compare it to an output list while also describing what each comparison means (through a list of descriptions) ? |
| 08:05:14 | × | neurocyte013288 quits (~neurocyte@user/neurocyte) (Read error: Connection reset by peer) |
| 08:05:15 | <Guest20> | I guess I could just compare the lists but that would waste a lot of the information |
| 08:05:57 | → | hendursa1 joins (~weechat@user/hendursaga) |
| 08:06:01 | → | neurocyte013288 joins (~neurocyte@46.243.81.207) |
| 08:06:01 | × | neurocyte013288 quits (~neurocyte@46.243.81.207) (Changing host) |
| 08:06:01 | → | neurocyte013288 joins (~neurocyte@user/neurocyte) |
| 08:08:02 | × | neurocyte013288 quits (~neurocyte@user/neurocyte) (Read error: Connection reset by peer) |
| 08:08:39 | → | neurocyte013288 joins (~neurocyte@46.243.81.207) |
| 08:08:39 | × | neurocyte013288 quits (~neurocyte@46.243.81.207) (Changing host) |
| 08:08:39 | → | neurocyte013288 joins (~neurocyte@user/neurocyte) |
| 08:09:06 | × | hendursaga quits (~weechat@user/hendursaga) (Ping timeout: 276 seconds) |
| 08:10:48 | → | neurocyte0132889 joins (~neurocyte@46.243.81.207) |
| 08:10:49 | × | neurocyte0132889 quits (~neurocyte@46.243.81.207) (Changing host) |
| 08:10:49 | → | neurocyte0132889 joins (~neurocyte@user/neurocyte) |
| 08:12:22 | × | neurocyte0132889 quits (~neurocyte@user/neurocyte) (Read error: Connection reset by peer) |
| 08:13:18 | × | neurocyte013288 quits (~neurocyte@user/neurocyte) (Ping timeout: 265 seconds) |
| 08:13:38 | → | notzmv joins (~zmv@user/notzmv) |
| 08:14:14 | → | cfricke joins (~cfricke@user/cfricke) |
| 08:15:10 | × | shriekingnoise quits (~shrieking@186.137.144.80) (Quit: Quit) |
| 08:18:46 | → | wonko joins (~wjc@62.115.229.50) |
| 08:19:19 | → | neurocyte0132889 joins (~neurocyte@46.243.81.207) |
| 08:19:19 | × | neurocyte0132889 quits (~neurocyte@46.243.81.207) (Changing host) |
| 08:19:19 | → | neurocyte0132889 joins (~neurocyte@user/neurocyte) |
| 08:19:37 | → | xiongxin joins (~quassel@119.123.102.49) |
| 08:20:59 | → | acidjnk_new joins (~acidjnk@p200300d0c703cb14e484f2ea659578d3.dip0.t-ipconnect.de) |
| 08:23:03 | → | enoq joins (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) |
| 08:23:20 | × | Heisen quits (~Heisen@77.240.67.20) (Quit: Client closed) |
| 08:31:27 | × | mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
| 08:34:41 | × | phma quits (~phma@host-67-44-208-228.hnremote.net) (Read error: Connection reset by peer) |
| 08:35:34 | → | phma joins (~phma@host-67-44-209-33.hnremote.net) |
| 08:52:29 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 08:59:47 | → | Guest55 joins (~Guest55@l37-195-64-169.novotelecom.ru) |
| 09:00:07 | → | vinstre joins (~vinstre@l37-195-64-169.novotelecom.ru) |
| 09:00:21 | → | ubert1 joins (~Thunderbi@178.115.45.189.wireless.dyn.drei.com) |
| 09:02:31 | <Guest20> | I _almost_ figured it out. now I just need a way to run a [IO ()] |
| 09:02:36 | × | ubert quits (~Thunderbi@178.115.45.189.wireless.dyn.drei.com) (Ping timeout: 265 seconds) |
| 09:02:37 | ubert1 | is now known as ubert |
| 09:02:49 | <Guest20> | this sounds like I'm writing garbage haskell (and I probably am) |
| 09:03:49 | <merijn> | Guest20: Sounds like you want sequence/sequence_ |
| 09:04:01 | <merijn> | Guest20: Or, more likely: mapM_ |
| 09:04:04 | <merijn> | :t sequence |
| 09:04:05 | <lambdabot> | (Traversable t, Monad m) => t (m a) -> m (t a) |
| 09:04:06 | <merijn> | :t sequence_ |
| 09:04:07 | <lambdabot> | (Foldable t, Monad m) => t (m a) -> m () |
| 09:04:11 | <merijn> | :t mapM_ |
| 09:04:12 | <lambdabot> | (Foldable t, Monad m) => (a -> m b) -> t a -> m () |
| 09:04:31 | <kuribas> | merijn: traverse_ |
| 09:04:54 | <Guest20> | :t traverse_ |
| 09:04:55 | <lambdabot> | (Foldable t, Applicative f) => (a -> f b) -> t a -> f () |
| 09:05:22 | <Guest20> | ok so sequence_ it is |
| 09:05:51 | <Guest20> | what doc do I need to read to be aware of this? x) |
| 09:06:25 | <kuribas> | Guest20: base :) |
| 09:06:46 | <kuribas> | https://hackage.haskell.org/package/base |
| 09:07:18 | <kuribas> | Guest20: if it's monadic, it'll be probably in Control.Monad or Control.Applicative. |
| 09:07:50 | <kuribas> | well traverse_ is in Data.Foldable. |
| 09:08:02 | <kuribas> | maybe just ask here :) |
| 09:08:05 | <merijn> | Guest20: Foldable/Traversable are important enough that you usually encounter them fairly quickly |
| 09:08:25 | <Guest20> | kuribas: thank you that means a lot :) |
| 09:08:35 | <merijn> | Guest20: In general, skimming the module list of "base" and skimming some random modules in it every few weeks is a good way to discover a lot of neat stuff :) |
| 09:08:35 | × | vinstre quits (~vinstre@l37-195-64-169.novotelecom.ru) () |
| 09:09:05 | <kuribas> | When I started learning haskell I went over every function in the prelude. |
| 09:09:30 | → | vinstre joins (~vinstre@l37-195-64-169.novotelecom.ru) |
| 09:09:31 | × | qwedfg_ quits (~qwedfg@user/qwedfg) (Remote host closed the connection) |
| 09:10:54 | → | qwedfg joins (~qwedfg@user/qwedfg) |
| 09:12:14 | <kuribas> | but you don't need to memorise base, just skimming as merijn said, so you know what is there, and can come back later to look it up. |
| 09:12:41 | → | DNH joins (~DNH@2a02:8108:1100:16d8:a11a:d19d:8c20:4068) |
| 09:13:07 | ← | vinstre parts (~vinstre@l37-195-64-169.novotelecom.ru) () |
| 09:14:14 | → | vinstre joins (~vinstre@user/vinstre) |
| 09:14:23 | → | arahael joins (~arahael@118.211.178.62) |
| 09:14:27 | <arahael> | join #haskell-offtopic |
| 09:14:42 | × | Guest55 quits (~Guest55@l37-195-64-169.novotelecom.ru) (Quit: Client closed) |
| 09:14:47 | <arahael> | Uh... Yes.... I'm advertising a channel, sorry guys! |
| 09:15:01 | arahael | types it correctly, this time. |
| 09:15:02 | <kuribas> | free monads! |
| 09:16:58 | <Guest20> | TIL I can't do IO inside an HSpec describe block |
| 09:17:27 | <Guest20> | the docs say I just use before_ |
| 09:18:16 | <Guest20> | but I'm not just trying to flush a database somewhere, I want to read a file and test with it |
| 09:20:54 | <dminuoso> | Of course you can |
| 09:21:43 | <dminuoso> | describe :: HasCallStack => String -> SpecWith a -> SpecWith a |
| 09:21:46 | <dminuoso> | type SpecWith a = SpecM a () |
| 09:21:55 | <dminuoso> | runIO :: IO r -> SpecM a r |
| 09:23:09 | <Guest20> | but ghc complains that it couldn't match type IO with SpecWith o_o |
| 09:23:29 | <Guest20> | https://paste.tomsmeding.com/YgN1ODrh |
| 09:24:30 | <Guest20> | I only get it on getDirectoryContents |
| 09:24:44 | <dminuoso> | Guest20: Use `runIO` |
| 09:26:06 | <merijn> | I find hspec's types entirely undecipherable |
| 09:26:19 | <dminuoso> | Well they are clearly not undecipherable. |
| 09:26:24 | <dminuoso> | You probably meant annoying to decipher. |
| 09:26:45 | <dminuoso> | Normally I wouldn't care, but I expect more language precision from you, merijn. |
| 09:27:54 | <merijn> | They are undecipherable to me, because by the 2nd indirection of clicking through things I run out of motivation/care and give up |
| 09:30:06 | <arahael> | merijn: We need more people like you here. :) |
| 09:32:49 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 245 seconds) |
| 09:33:41 | × | cfricke quits (~cfricke@user/cfricke) (Ping timeout: 265 seconds) |
| 09:34:00 | → | cfricke joins (~cfricke@user/cfricke) |
| 09:34:38 | × | slavaqq quits (~slavaqq@sdmail.sdserver.cz) (Quit: Client closed) |
| 09:34:56 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 09:35:04 | <kuribas> | haskellers have a tendency to overcomplicate things. |
| 09:35:17 | <kuribas> | where it's the opposite in clojure, they oversimplify things. |
| 09:35:44 | <arahael> | One can't overly-simplify. |
| 09:35:46 | → | oxide joins (~lambda@user/oxide) |
| 09:35:51 | × | cfricke quits (~cfricke@user/cfricke) (Client Quit) |
| 09:36:04 | → | cfricke joins (~cfricke@user/cfricke) |
| 09:36:47 | <kuribas> | yes, one can. By pushing complexity around. |
| 09:36:55 | sm2n_ | is now known as sm2n |
| 09:38:26 | <kuribas> | then you get a seemingly very simple solution, only you have to deal later with the consequences. |
| 09:38:32 | <merijn> | I mean it seems weird to demand "more precise" natural language about subjective statements |
| 09:39:04 | <kuribas> | Like in clojure requiring a huge testsuite if you want to get some degree of robustness. |
| 09:39:37 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 252 seconds) |
| 09:40:46 | <kuribas> | or like using nil everywhere, look we got rid of those pesky Maybe's! |
| 09:44:49 | <dminuoso> | I think a major issue is that programmers in general have a misconception about what abstraction is, and when to use it. |
| 09:44:56 | <dminuoso> | To quote Dijkstra "The purpose of abstraction is not to be vague, but to create a new semantic level in which one can be absolutely precise" |
| 09:45:07 | → | lavaman joins (~lavaman@98.38.249.169) |
| 09:45:32 | <dminuoso> | More often than not, programmers make vague things and label it "an abstraction" for an increase in perceived professionality |
| 09:45:44 | → | benin03693230163 joins (~benin@183.82.176.241) |
| 09:46:25 | <kuribas> | OO design patterns... |
| 09:47:24 | × | benin0369323016 quits (~benin@183.82.176.241) (Ping timeout: 245 seconds) |
| 09:47:25 | benin03693230163 | is now known as benin0369323016 |
| 09:47:41 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 09:48:34 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 09:49:36 | × | libertyprime quits (~libertypr@118.149.75.34) (Quit: leaving) |
| 09:49:58 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 265 seconds) |
| 09:50:56 | × | chomwitt quits (~chomwitt@94.66.61.137) (Ping timeout: 265 seconds) |
| 09:53:07 | → | robosexual joins (~spaceoyst@88.85.216.62) |
| 09:54:48 | → | koishi_ joins (~user@2001:da8:d800:611:95e1:c9a3:1a48:f791) |
| 09:55:12 | <koishi_> | Is it possible to enable 'RebindableSyntax' locally? |
| 09:57:29 | <koishi_> | Hmm, I have to move some functions into a separate module anyways due to 'import'... |
| 09:58:02 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 09:58:31 | koishi_ | is now known as koishi` |
| 09:59:00 | × | gehmehgeh quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 09:59:18 | ← | koishi` parts (~user@2001:da8:d800:611:95e1:c9a3:1a48:f791) () |
| 10:00:41 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 10:00:50 | <Guest20> | Is it normal for https://hackage.haskell.org/package/megaparsec-9.2.0/docs/Text-Megaparsec-Char-Lexer.html#v:charLiteral |
| 10:00:53 | → | ormaaj joins (~ormaaj@user/ormaaj) |
| 10:01:02 | <Guest20> | to error out on parsing "\/" ? |
| 10:01:12 | <Guest20> | lexical error in string/character literal at character '/' |
| 10:01:46 | <Guest20> | there are no issues with other escape chars like \n, \t ... |
| 10:02:21 | <Guest20> | is there something specific about haskell conventions that makes this possible? |
| 10:05:10 | × | cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.3) |
| 10:13:17 | × | xff0x quits (~xff0x@2001:1a81:5322:8500:eff4:1133:1236:ed4a) (Ping timeout: 264 seconds) |
| 10:13:51 | × | azeem quits (~azeem@emp-183-4.eduroam.uu.se) (Ping timeout: 245 seconds) |
| 10:16:37 | → | jtomas joins (~jtomas@95.red-88-11-64.dynamicip.rima-tde.net) |
| 10:17:45 | → | ub joins (~Thunderbi@178.115.45.189.wireless.dyn.drei.com) |
| 10:19:16 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 245 seconds) |
| 10:19:56 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 10:20:57 | <dminuoso> | Guest20: I dont quite understand the problem. |
| 10:21:04 | <dminuoso> | Can you provide the input and the code you're using? |
| 10:21:40 | <Guest20> | the code is simply `parseTest charLiteral "\/"` |
| 10:21:46 | <Guest20> | on ghci |
| 10:21:59 | × | ub quits (~Thunderbi@178.115.45.189.wireless.dyn.drei.com) (Ping timeout: 245 seconds) |
| 10:22:39 | → | azeem joins (~azeem@2a00:801:238:7b15:4e2a:7c39:18f9:6354) |
| 10:23:02 | × | azeem quits (~azeem@2a00:801:238:7b15:4e2a:7c39:18f9:6354) (Read error: Connection reset by peer) |
| 10:23:38 | → | azeem joins (~azeem@emp-183-4.eduroam.uu.se) |
| 10:23:47 | <Guest20> | dminuoso: trying `parseTest charLiteral "\n" doesn't throw a parse error |
| 10:23:59 | <Guest20> | (this is Megaparsec) |
| 10:25:13 | <dminuoso> | % import Data.Char |
| 10:25:13 | <yahb> | dminuoso: |
| 10:25:30 | <dminuoso> | % readLitChar "\/" |
| 10:25:30 | <yahb> | dminuoso: ; <interactive>:6:15: error: lexical error in string/character literal at character '/' |
| 10:25:51 | <dminuoso> | Guest20: So yeah, megaparsec ends up using readLitChar as per note: |
| 10:26:09 | <dminuoso> | "The literal character is parsed according to the grammar rules defined in the Haskell report." |
| 10:26:52 | <dminuoso> | What this essentially means is: |
| 10:26:58 | <dminuoso> | "\/" is not a valid haskell string. |
| 10:27:34 | <dminuoso> | Because \/ is not considered a valid character according to the grammar rules defined in the Haskell report. |
| 10:27:48 | <dminuoso> | More to the point: |
| 10:27:58 | <dminuoso> | % '\/' -- is not a valid haskell character |
| 10:27:59 | <yahb> | dminuoso: ; <interactive>:9:3: error: lexical error in string/character literal at character '/' |
| 10:28:03 | <dminuoso> | Guest20: Does this make sense? |
| 10:28:37 | → | olibiera joins (~olibiera@194.117.40.220) |
| 10:28:40 | <Guest20> | is makes perfect sense but the implications scare me |
| 10:28:53 | <Guest20> | how would replace readLitCHar |
| 10:29:08 | <Guest20> | s/would/would I |
| 10:29:35 | <dminuoso> | Well you have to define what this would even mean to you. |
| 10:29:47 | <dminuoso> | But really, you can simply do this yourself. |
| 10:29:49 | <dminuoso> | Use lookahead |
| 10:30:13 | <dminuoso> | *lookAhead |
| 10:30:22 | <Guest20> | Alright I have some reading to do |
| 10:30:42 | <olibiera> | is there any function that takes a list and divides it? for example [1,2,3,4,5,6] turns into ([1,2,3],[4,5,6]) |
| 10:31:23 | <dminuoso> | olibiera: You mean something like https://hackage.haskell.org/package/split-0.2.3.4/docs/Data-List-Split.html#v:chunksOf ? |
| 10:31:37 | <dminuoso> | You can find variations of it on hackage, or you can just roll it yourself. |
| 10:31:44 | <dminuoso> | It's a relatively straight forward 4-5 liner |
| 10:32:05 | → | cfricke joins (~cfricke@user/cfricke) |
| 10:32:54 | <olibiera> | not really i needed it in tuple |
| 10:33:11 | × | Guest20 quits (~Guest20@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Quit: Client closed) |
| 10:34:28 | → | chomwitt joins (~chomwitt@94.66.61.137) |
| 10:35:56 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Ping timeout: 245 seconds) |
| 10:38:32 | rosariopulella[m | is now known as Rosuavio[m] |
| 10:38:49 | × | cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.3) |
| 10:39:46 | edro | is now known as edr |
| 10:53:24 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 10:54:12 | → | xff0x joins (~xff0x@2001:1a81:5322:8500:eff4:1133:1236:ed4a) |
| 10:55:19 | × | darkstardevx quits (~darkstard@c-24-21-53-33.hsd1.or.comcast.net) (Ping timeout: 245 seconds) |
| 10:55:33 | <kuribas> | olibiera: span? |
| 10:55:35 | <kuribas> | or splitAt? |
| 10:55:37 | <kuribas> | :t span |
| 10:55:38 | <lambdabot> | (a -> Bool) -> [a] -> ([a], [a]) |
| 10:55:41 | <kuribas> | :t splitAt |
| 10:55:42 | <lambdabot> | Int -> [a] -> ([a], [a]) |
| 10:55:49 | → | darkstardevx joins (~darkstard@c-24-21-53-33.hsd1.or.comcast.net) |
| 10:57:43 | <kuribas> | > splitAt 3 [1..6] |
| 10:57:45 | <lambdabot> | ([1,2,3],[4,5,6]) |
| 10:57:54 | <kuribas> | > span (< 4) [1..6] |
| 10:57:56 | <lambdabot> | ([1,2,3],[4,5,6]) |
| 10:58:05 | <olibiera> | ty! |
| 10:59:09 | × | olibiera quits (~olibiera@194.117.40.220) (Quit: Client closed) |
| 10:59:34 | × | azeem quits (~azeem@emp-183-4.eduroam.uu.se) (Ping timeout: 265 seconds) |
| 10:59:56 | → | azeem joins (~azeem@2a00:801:238:7b15:4e2a:7c39:18f9:6354) |
| 11:00:52 | → | alx741 joins (~alx741@186.178.109.65) |
| 11:02:27 | × | azeem quits (~azeem@2a00:801:238:7b15:4e2a:7c39:18f9:6354) (Read error: Connection reset by peer) |
| 11:02:44 | → | azeem joins (~azeem@emp-183-4.eduroam.uu.se) |
| 11:04:43 | × | azeem quits (~azeem@emp-183-4.eduroam.uu.se) (Read error: Connection reset by peer) |
| 11:05:05 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 11:05:13 | → | azeem joins (~azeem@emp-183-4.eduroam.uu.se) |
| 11:12:16 | → | alzgh joins (~alzgh@user/alzgh) |
| 11:12:18 | → | ub joins (~Thunderbi@178.115.45.189.wireless.dyn.drei.com) |
| 11:14:42 | × | acidjnk_new quits (~acidjnk@p200300d0c703cb14e484f2ea659578d3.dip0.t-ipconnect.de) (Ping timeout: 265 seconds) |
| 11:18:36 | × | hiruji quits (~hiruji@user/hiruji) (Read error: Connection reset by peer) |
| 11:18:50 | → | hiruji joins (~hiruji@user/hiruji) |
| 11:20:00 | × | int-e quits (~noone@int-e.eu) (Remote host closed the connection) |
| 11:20:43 | → | int-e joins (~noone@int-e.eu) |
| 11:22:18 | × | vinstre quits (~vinstre@user/vinstre) (Remote host closed the connection) |
| 11:22:50 | × | lambdabot quits (~lambdabot@haskell/bot/lambdabot) (Quit: ...) |
| 11:23:23 | → | lambdabot joins (~lambdabot@silicon.int-e.eu) |
| 11:23:23 | × | lambdabot quits (~lambdabot@silicon.int-e.eu) (Changing host) |
| 11:23:23 | → | lambdabot joins (~lambdabot@haskell/bot/lambdabot) |
| 11:26:38 | → | zer0bitz joins (~zer0bitz@dsl-hkibng31-54fafc-123.dhcp.inet.fi) |
| 11:27:44 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Quit: Laa shay'a waqi'un moutlaq bale kouloun moumkine) |
| 11:27:59 | → | ftzm[m] joins (~ftzmmatri@2001:470:69fc:105::1:dfc) |
| 11:33:39 | × | mestre quits (~mestre@191.177.175.57) (Quit: Lost terminal) |
| 11:34:46 | → | Amras joins (~Amras@user/Amras) |
| 11:36:14 | → | CiaoSen joins (~Jura@p200300c9571e34002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 11:36:42 | × | aidy quits (~aidy@2001:470:69fc:105::c7b4) (Quit: Reconnecting) |
| 11:36:42 | × | fef quits (~thedawn@user/thedawn) (Remote host closed the connection) |
| 11:36:56 | → | aidy joins (~aidy@2001:470:69fc:105::c7b4) |
| 11:39:53 | × | DNH quits (~DNH@2a02:8108:1100:16d8:a11a:d19d:8c20:4068) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 11:41:46 | × | ub quits (~Thunderbi@178.115.45.189.wireless.dyn.drei.com) (Ping timeout: 245 seconds) |
| 11:42:16 | → | cfricke joins (~cfricke@user/cfricke) |
| 11:42:53 | × | Everything quits (~Everythin@37.115.210.35) (Ping timeout: 268 seconds) |
| 11:44:22 | → | Everything joins (~Everythin@37.115.210.35) |
| 11:46:42 | × | vjoki quits (~vjoki@2a00:d880:3:1::fea1:9ae) (Quit: ...) |
| 11:46:52 | → | acidjnk_new joins (~acidjnk@p200300d0c703cb14e484f2ea659578d3.dip0.t-ipconnect.de) |
| 11:46:56 | → | vjoki joins (~vjoki@2a00:d880:3:1::fea1:9ae) |
| 11:47:22 | → | DNH joins (~DNH@2a02:8108:1100:16d8:a11a:d19d:8c20:4068) |
| 11:49:54 | → | mmhat joins (~mmh@55d43024.access.ecotel.net) |
| 11:54:34 | → | machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca) |
| 11:59:35 | × | max22- quits (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) (Ping timeout: 246 seconds) |
| 11:59:59 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 265 seconds) |
| 12:02:00 | → | jespada joins (~jespada@2803:9800:9842:7a62:2d4b:7b80:ce15:fc84) |
| 12:04:04 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Ping timeout: 245 seconds) |
| 12:12:37 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 12:13:08 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
| 12:13:31 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 12:14:51 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 12:19:45 | → | fendor joins (~fendor@91.141.79.91.wireless.dyn.drei.com) |
| 12:27:19 | → | Guest87 joins (~Guest87@194.117.40.220) |
| 12:27:26 | <Guest87> | halve :: [a] -> ([a],[a]) |
| 12:27:27 | <Guest87> | halve [] = ([],[]) |
| 12:27:27 | <Guest87> | halve [x] = ([x],[]) |
| 12:27:28 | <Guest87> | halve xs = ([x | x <- take (length xs `div` 2) xs], [y | y <- ys]) |
| 12:27:28 | <Guest87> | where ys = if (length xs `div` 2 /= 0) |
| 12:27:29 | <Guest87> | then drop (length xs `div` 2) + 1 |
| 12:27:29 | <Guest87> | else drop (length xs `div` 2) |
| 12:27:41 | <Guest87> | can someone tell me what is wrong with this code? |
| 12:28:52 | → | Guest8747 joins (~Guest87@194.117.40.220) |
| 12:29:21 | <merijn> | Aside from the list comprehensions being redundant and the repeat length calls being super slow? |
| 12:29:42 | <merijn> | "[ y | y <- ys]" <- why not just write "ys"? |
| 12:30:08 | <Guest8747> | right |
| 12:30:17 | <merijn> | Same for "[x | x <- take (length xs `div` 2) xs]", that's just "take (length xs `div` 2) xs" with extra steps... |
| 12:31:11 | <hpc> | you might also consider using mod, instead of that if |
| 12:31:14 | <merijn> | Oh |
| 12:31:14 | <hpc> | > 5 `mod` 2 |
| 12:31:16 | <lambdabot> | 1 |
| 12:31:27 | <merijn> | I have questions about your if condition |
| 12:31:39 | <merijn> | Ah, no, I guess that if it typechecks it's fine |
| 12:31:57 | <merijn> | But also, it's useless because that branch is only taken if xs has at least 2 elements, so it's always true |
| 12:32:41 | × | Guest87 quits (~Guest87@194.117.40.220) (Ping timeout: 256 seconds) |
| 12:32:54 | <Guest8747> | halve :: [a] -> ([a],[a]) |
| 12:32:54 | <Guest8747> | halve [] = ([],[]) |
| 12:32:55 | <Guest8747> | halve [x] = ([x],[]) |
| 12:32:55 | <Guest8747> | halve xs = (take (length xs `div` 2) xs, ys) |
| 12:32:56 | <Guest8747> | where ys = if (length xs `div` 2 /= 0) |
| 12:32:56 | <Guest8747> | then drop (length xs `div` 2) + 1 |
| 12:32:57 | <Guest8747> | else drop (length xs `div` 2) |
| 12:33:13 | <Guest8747> | it still doesnt compile |
| 12:33:37 | <merijn> | because: 1) the "then" case isn't correctly parenthesised |
| 12:33:46 | <merijn> | 2) you forgot to give a list argument to drop |
| 12:34:03 | <merijn> | "drop ((length xs `div` 2) + 1)" |
| 12:34:23 | <merijn> | Your current version parses as "(drop (length xs `div` 2)) + 1" |
| 12:35:30 | → | geranim0 joins (~geranim0@modemcable242.171-178-173.mc.videotron.ca) |
| 12:35:32 | <maerwald> | @hoogle (k -> a -> m Bool) -> Map k a -> Map k a |
| 12:35:34 | <lambdabot> | No results found |
| 12:35:34 | <maerwald> | srsly... |
| 12:35:38 | <maerwald> | oops |
| 12:35:42 | <Guest8747> | can u explain 2)? |
| 12:35:50 | <maerwald> | @hoogle (k -> a -> m Bool) -> Map k a -> m (Map k a) |
| 12:35:51 | <lambdabot> | No results found |
| 12:35:53 | <maerwald> | ... |
| 12:36:08 | <Guest8747> | are u saying it should be where ys xs... |
| 12:36:09 | <Guest8747> | ? |
| 12:36:22 | <merijn> | Guest8747: "drop f list" |
| 12:36:35 | <merijn> | Guest8747: In your code "ys" is a function |
| 12:36:39 | <merijn> | i.e. partially applied drop |
| 12:39:06 | <Guest8747> | halve :: [a] -> ([a],[a]) |
| 12:39:06 | <Guest8747> | halve [] = ([],[]) |
| 12:39:07 | <Guest8747> | halve [x] = ([x],[]) |
| 12:39:07 | <Guest8747> | halve xs = (take (length xs `div` 2) xs, ys) |
| 12:39:08 | <Guest8747> | where ys xs = if (length xs `div` 2 /= 0) |
| 12:39:08 | <Guest8747> | then drop ((length xs `div` 2) + 1) |
| 12:39:09 | <Guest8747> | else drop (length xs `div` 2) |
| 12:39:13 | <Guest8747> | so what do i change here? |
| 12:39:24 | <Guest8747> | merijn |
| 12:39:46 | <sshine> | > let halve xs = splitAt (length xs `quot` 2) xs in halve [1,2,3] -- it rounds the wrong way, but other than that...? |
| 12:39:47 | <lambdabot> | ([1],[2,3]) |
| 12:40:22 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 12:40:36 | <merijn> | Change it to "drop (length xs `div` 2) xs" |
| 12:40:43 | <sshine> | https://hackage.haskell.org/package/base-4.15.0.0/docs/Prelude.html#v:splitAt |
| 12:41:08 | <merijn> | splitAt and length is still inefficient! |
| 12:41:30 | <merijn> | Clearly the way to go: https://gist.github.com/merijn/c163cc106fd245d1cf2e :p |
| 12:41:45 | <Guest8747> | merijn but if the list has an odd number of elements? |
| 12:42:12 | <merijn> | Guest8747: You need to add "xs" to both calls to drop |
| 12:42:24 | <merijn> | Guest8747: Also, your currentl logic doesn't check for odd number of elements |
| 12:42:31 | <merijn> | Guest8747: It checks for "less than 2" elements |
| 12:42:41 | <merijn> | > 3 `div` 2 |
| 12:42:43 | <lambdabot> | 1 |
| 12:44:12 | <Guest8747> | it was that thx! |
| 12:45:12 | → | lavaman joins (~lavaman@98.38.249.169) |
| 12:46:42 | → | lbseale_ joins (~lbseale@user/ep1ctetus) |
| 12:46:59 | × | oxide quits (~lambda@user/oxide) (Ping timeout: 245 seconds) |
| 12:49:07 | → | oxide joins (~lambda@user/oxide) |
| 12:49:16 | × | vysn quits (~vysn@user/vysn) (Ping timeout: 245 seconds) |
| 12:49:29 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 245 seconds) |
| 12:49:54 | × | lbseale quits (~lbseale@user/ep1ctetus) (Ping timeout: 245 seconds) |
| 12:50:47 | → | hexfive joins (~eric@50.35.83.177) |
| 12:51:35 | × | hexfive quits (~eric@50.35.83.177) (Client Quit) |
| 12:51:35 | → | sleblanc joins (~sleblanc@user/sleblanc) |
| 12:54:36 | <Guest8747> | > let halve xs = (take (length xs `div` 2) xs, ys) |
| 12:54:36 | <Guest8747> | where ys = if (length xs `mod` 2 /= 0) |
| 12:54:37 | <Guest8747> | then drop ((length xs `div` 2) + 1) xs |
| 12:54:37 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 12:54:37 | <Guest8747> | else drop (length xs `div` 2) xs |
| 12:54:37 | <lambdabot> | <no location info>: error: |
| 12:54:37 | <lambdabot> | not an expression: ‘let halve xs = (take (length xs `div` 2) xs, ys)’ |
| 12:55:05 | <merijn> | You can't do multiline code in lambdabot |
| 12:55:22 | <Guest8747> | halve xs = (take (length xs `div` 2) xs, ys) |
| 12:55:23 | <Guest8747> | where ys = if (length xs `mod` 2 /= 0) then drop ((length xs `div` 2) + 1) xs else drop (length xs `div` 2) xs |
| 12:55:34 | <Guest8747> | > halve xs = (take (length xs `div` 2) xs, ys) |
| 12:55:35 | <Guest8747> | where ys = if (length xs `mod` 2 /= 0) then drop ((length xs `div` 2) + 1) xs else drop (length xs `div` 2) xs |
| 12:55:36 | <lambdabot> | <hint>:1:10: error: parse error on input ‘=’ |
| 12:56:02 | → | Psybur joins (~Psybur@mobile-166-170-32-197.mycingular.net) |
| 12:56:19 | <Guest8747> | > let halve xs = (take (length xs `div` 2) xs, ys) |
| 12:56:19 | <Guest8747> | where ys = if (length xs `mod` 2 /= 0) then drop ((length xs `div` 2) + 1) xs else drop (length xs `div` 2) xs |
| 12:56:21 | <lambdabot> | <no location info>: error: |
| 12:56:21 | <lambdabot> | not an expression: ‘let halve xs = (take (length xs `div` 2) xs, ys)’ |
| 12:56:27 | <Guest8747> | nvm |
| 12:57:34 | <Guest8747> | i want [1,2,3,4] to turn in ([1,2],[3,4]) for exemple |
| 12:57:43 | <Guest8747> | halve :: [a] -> ([a],[a]) |
| 12:57:44 | <Guest8747> | halve [] = ([],[]) |
| 12:57:44 | <Guest8747> | halve [x] = ([x],[]) |
| 12:57:45 | <Guest8747> | halve xs = (take (length xs `div` 2) xs, ys) |
| 12:57:45 | <Guest8747> | where ys = if (length xs `mod` 2 /= 0) |
| 12:57:46 | <Guest8747> | then drop ((length xs `div` 2) + 1) xs |
| 12:57:46 | <Guest8747> | else drop (length xs `div` 2) xs |
| 12:57:51 | → | ub joins (~Thunderbi@178.115.45.189.wireless.dyn.drei.com) |
| 12:58:36 | <Guest8747> | like this it turns in ([1,2],[4]) |
| 12:58:48 | <Guest8747> | cant tell why |
| 13:00:09 | <Guest8747> | its working nvm |
| 13:00:31 | <robosexual> | try this instead of reinventing splitting algorithm: https://hackage.haskell.org/package/base-4.15.0.0/docs/src/GHC-List.html#splitAt |
| 13:01:19 | <merijn> | Nothing wrong with reinventing algorithms |
| 13:01:24 | × | Alex_test quits (~al_test@94.233.240.2) (Quit: ;-) |
| 13:01:34 | <merijn> | The problem is that, as I said before, your code *always* picks the true branch |
| 13:01:37 | × | AlexZenon quits (~alzenon@94.233.240.2) (Quit: ;-) |
| 13:01:44 | <merijn> | And thus drops 3 items, not 2 |
| 13:01:45 | × | AlexNoo quits (~AlexNoo@94.233.240.2) (Quit: Leaving) |
| 13:02:44 | <tdammers> | (technically this isn't even reinventing an algorithm, just reimplementing it) |
| 13:03:03 | <merijn> | tdammers: Nothing wrong with that either :p |
| 13:03:13 | <tdammers> | indeed |
| 13:03:21 | <tdammers> | just need to be aware of the pros and cons |
| 13:03:24 | <Guest8747> | halve [1,2,3,4,5] is returning ([1,2],[4,5]) for some reason :( |
| 13:03:32 | <merijn> | Guest8747: Same as my previous answer |
| 13:03:39 | → | shapr joins (~user@pool-100-36-247-68.washdc.fios.verizon.net) |
| 13:03:48 | × | ub quits (~Thunderbi@178.115.45.189.wireless.dyn.drei.com) (Quit: ub) |
| 13:03:50 | <Guest8747> | instead of ([1,2],[3,4,5]) |
| 13:04:10 | → | ub joins (~Thunderbi@178.115.45.189.wireless.dyn.drei.com) |
| 13:04:16 | <Hecate> | :9 |
| 13:04:55 | <Guest8747> | merijn can u tell why? |
| 13:05:04 | <Guest8747> | i thought adding +1 would solve it |
| 13:05:20 | <merijn> | What is the if/else supposed to do? |
| 13:06:29 | <Guest8747> | if the length is an odd number it would drop length/2 + 1 |
| 13:06:38 | <merijn> | Well, it doesn't do that |
| 13:06:42 | <Guest8747> | if its even just the other half |
| 13:06:50 | <merijn> | Because, as stated before, you're not checking if the length is odd |
| 13:07:02 | <merijn> | You're checking if the length is less than 2 |
| 13:07:44 | <Guest8747> | if (length xs `mod` 2 /= 0) |
| 13:08:20 | <Guest8747> | how isnt this checking the length being odd |
| 13:08:21 | <Guest8747> | ? |
| 13:09:02 | <merijn> | oh, wait, it's mod now, in one of the original version it was div >.> |
| 13:09:13 | <merijn> | Anyway, you drop 1 more |
| 13:09:19 | → | yinghua joins (~yinghua@2800:2121:1400:900:9813:e2cc:52c1:9b50) |
| 13:09:20 | <merijn> | But you don't take 1 more when that happens |
| 13:09:36 | <merijn> | So if it's true, you drop 1 extra, but don't take 1 more |
| 13:09:46 | × | rkrishnan quits (~user@2402:e280:215c:2cd:6d16:f9a5:49d8:1fa5) (Ping timeout: 252 seconds) |
| 13:11:13 | × | gehmehgeh quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 13:11:14 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection) |
| 13:11:40 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 13:12:02 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 13:12:19 | <Guest8747> | ohhh i was looking at drop the wrong way! |
| 13:12:23 | <Guest8747> | ty |
| 13:15:26 | → | zebrag joins (~chris@user/zebrag) |
| 13:20:47 | → | AlexZenon joins (~alzenon@94.233.240.2) |
| 13:20:56 | × | Guest8747 quits (~Guest87@194.117.40.220) (Quit: Client closed) |
| 13:21:04 | → | AlexNoo joins (~AlexNoo@94.233.240.2) |
| 13:21:41 | → | slowButPresent joins (~slowButPr@user/slowbutpresent) |
| 13:22:18 | → | Alex_test joins (~al_test@94.233.240.2) |
| 13:23:01 | lbseale_ | is now known as lbseale |
| 13:23:26 | × | CiaoSen quits (~Jura@p200300c9571e34002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 245 seconds) |
| 13:25:11 | → | sneedsfeed joins (~sneedsfee@rrcs-173-95-122-169.midsouth.biz.rr.com) |
| 13:26:37 | → | fendor_ joins (~fendor@178.115.78.172.wireless.dyn.drei.com) |
| 13:27:34 | <sneedsfeed> | can this be written as a pure composition? sndMapAccumL a b c = snd $ mapAccumL a b c |
| 13:28:11 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 13:28:14 | <Franciman> | sneedsfeed: you mean like |
| 13:28:20 | <Franciman> | sndMapAccumL a b = snd . mapAccumL a b |
| 13:28:23 | <Franciman> | ? |
| 13:28:27 | <Franciman> | sorry I can't do better :< |
| 13:28:49 | <sneedsfeed> | Well I couldnt even figure that out! |
| 13:29:11 | <Franciman> | when you have multivalued functions |
| 13:29:18 | <sneedsfeed> | but yea it does beg the question still now how better. |
| 13:29:19 | <Franciman> | :t (.) |
| 13:29:20 | <lambdabot> | (b -> c) -> (a -> b) -> a -> c |
| 13:29:24 | × | fendor quits (~fendor@91.141.79.91.wireless.dyn.drei.com) (Ping timeout: 265 seconds) |
| 13:29:33 | <Franciman> | if you have multiparam functions |
| 13:29:36 | <Franciman> | in this case |
| 13:29:38 | <Franciman> | :t mapAccumL |
| 13:29:39 | <lambdabot> | Traversable t => (a -> b -> (a, c)) -> a -> t b -> (a, t c) |
| 13:29:48 | <Franciman> | the b in there becomes |
| 13:29:49 | <byorgey> | anything can always be written in "point-free" style, with no parameters, though it's often not worth it. |
| 13:30:00 | <Franciman> | a -> t b -> (a, t c) |
| 13:30:20 | <Franciman> | wait so you can do |
| 13:30:26 | <Franciman> | no nothing |
| 13:30:54 | <byorgey> | :t ((.).(.).(.)) snd mapAccumL |
| 13:30:56 | <lambdabot> | Traversable t => (a -> b -> (a, c)) -> a -> t b -> t c |
| 13:31:10 | <Franciman> | byorgey: you blowed my mind |
| 13:32:15 | <sneedsfeed> | byorgey yea but... and i'm a noob I know... but i've always been operating under the assumption that these "not worth it" cases are not situations where the parameter applications come at the end of the function in the same order. its weird to me to have sndMapAccumL a b = snd . mapAccumL a b... why cant I just take off the a and the b??? |
| 13:33:14 | <sneedsfeed> | and yea i know just type :t and the answer is always right there in the type signature... but i'm not smart enough to just figure everything out like that... |
| 13:33:32 | <merijn> | sneedsfeed: Because "snd . mapAccumL a b" is "snd . (mapAccumL a b)" |
| 13:33:34 | <byorgey> | sneedsfeed: yeah, if they are not in the same order then that is even worse, then you need some applications of 'flip' in there |
| 13:33:42 | <Franciman> | sneedsfeed: i think you can get a tast of what's happening by looking at this: |
| 13:33:44 | <Franciman> | :t (.) |
| 13:33:45 | <lambdabot> | (b -> c) -> (a -> b) -> a -> c |
| 13:33:48 | <Franciman> | :t (.).(.) |
| 13:33:49 | <lambdabot> | (b -> c) -> (a1 -> a2 -> b) -> a1 -> a2 -> c |
| 13:33:52 | <merijn> | sneedsfeed: If you remove a b you make it "(snd . mapAccumL) a b" |
| 13:33:56 | <byorgey> | sneedsfeed: it's a good question, but yeah, snd . mapAccumL a b is not the same as (snd . mapAccumL) a b |
| 13:34:45 | <byorgey> | (f . g x) y = f (g x y), but ((f . g) x) y = (f . g) x y = f (g x) y |
| 13:35:34 | <byorgey> | sneedsfeed: you are smart enough, you just don't have enough experience. Big difference. =) |
| 13:35:47 | <sneedsfeed> | "snd . mapAccumL a b is not the same as (snd . mapAccumL) a b o" okay that makes sense |
| 13:36:02 | <sneedsfeed> | byorgey would that I were 23 coming into this and not 33 :D |
| 13:36:52 | <byorgey> | hah, well, we work with what we've got |
| 13:37:49 | <merijn> | sneedsfeed: The key insight is that (.) and ($) aren't magical "braces-away" notation, but simply function that take two arguments and what those two arguments are, matters. |
| 13:38:01 | <byorgey> | sneedsfeed: you still probably have at least another 40 years of productive Haskell use ahead of you =D |
| 13:38:11 | <Franciman> | will my language ever be better than haskell? Surely no, because I am not as smart as people here. Will I have lots of fun doing it? HELL YEAH, sneedsfeed |
| 13:38:14 | <Franciman> | so don't worry |
| 13:38:17 | <Franciman> | just have fun |
| 13:40:14 | <shapr> | I joined a small Haskell chat group, we meet weekly. This week we're going to wander through this new game swarm |
| 13:41:41 | × | cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.3) |
| 13:42:17 | <shapr> | byorgey: glad you published swarm, the source code is fun to read! |
| 13:42:20 | <byorgey> | =D |
| 13:43:02 | <shapr> | I haven't played it yet, but I joined a text user interface group that's planning to host a whole bunch of TUI games, it might end up on there. |
| 13:43:11 | <shapr> | specifically https://bluebird.sh/ |
| 13:44:35 | × | hrdl quits (~hrdl@mail.hrdl.eu) (Remote host closed the connection) |
| 13:44:36 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 13:44:36 | <byorgey> | shapr: cool! |
| 13:45:58 | × | neurocyte0132889 quits (~neurocyte@user/neurocyte) (Quit: The Lounge - https://thelounge.chat) |
| 13:46:17 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 13:46:17 | <byorgey> | shapr: I mean maybe wait a bit until it is more feature-complete, but it'll get there |
| 13:47:01 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 13:52:59 | → | hrdl joins (~hrdl@mail.hrdl.eu) |
| 13:56:08 | × | acidjnk_new quits (~acidjnk@p200300d0c703cb14e484f2ea659578d3.dip0.t-ipconnect.de) (Ping timeout: 265 seconds) |
| 13:58:06 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 14:01:38 | × | sprout quits (~quassel@2a02:a467:ccd6:1:3914:a7b1:2a0f:e9d8) (Ping timeout: 268 seconds) |
| 14:05:15 | → | max22- joins (~maxime@2a01cb08833598007fcfb2955ee7c812.ipv6.abo.wanadoo.fr) |
| 14:06:29 | × | xsperry quits (~xs@user/xsperry) (Remote host closed the connection) |
| 14:06:58 | → | xsperry joins (~xs@user/xsperry) |
| 14:06:59 | × | xsperry quits (~xs@user/xsperry) (Excess Flood) |
| 14:08:35 | fendor_ | is now known as fendor |
| 14:10:30 | → | shriekingnoise joins (~shrieking@186.137.144.80) |
| 14:10:54 | → | concrete-houses joins (~g@209.6.150.53) |
| 14:11:05 | <concrete-houses> | anyone here try happstack.com? |
| 14:11:18 | → | azimut_ joins (~azimut@gateway/tor-sasl/azimut) |
| 14:12:00 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 14:12:48 | → | cfricke joins (~cfricke@user/cfricke) |
| 14:13:06 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 276 seconds) |
| 14:14:10 | → | waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
| 14:15:58 | → | sprout joins (~quassel@2a02:a467:ccd6:1:aca2:ad7b:536b:eb53) |
| 14:17:44 | × | sleblanc quits (~sleblanc@user/sleblanc) (Ping timeout: 265 seconds) |
| 14:20:31 | × | sprout quits (~quassel@2a02:a467:ccd6:1:aca2:ad7b:536b:eb53) (Ping timeout: 245 seconds) |
| 14:26:55 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Quit: Laa shay'a waqi'un moutlaq bale kouloun moumkine) |
| 14:27:53 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 265 seconds) |
| 14:31:38 | → | sprout joins (~quassel@2a02:a467:ccd6:1:aca2:ad7b:536b:eb53) |
| 14:33:14 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 14:45:17 | → | Lord_of_Life joins (~Lord@46.217.216.227) |
| 14:45:18 | × | Lord_of_Life quits (~Lord@46.217.216.227) (Changing host) |
| 14:45:18 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 14:45:46 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.3) |
| 14:47:50 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 14:48:27 | → | betelgeuse joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 14:49:42 | <kuribas> | Franciman: it's possible to make a language better than haskell. It's not easy to make people use it :) |
| 14:50:24 | <dminuoso> | Is it easy to make a *performant* better version of Haskell? That's going to be extremely tricky now. |
| 14:50:37 | <kuribas> | dminuoso: maybe using GRIN + LLVM? |
| 14:50:46 | <kuribas> | though GRIN is still lacking optimizations. |
| 14:50:47 | <dminuoso> | Just tossing GRIN or LLVM at it will not make it magically go fast. |
| 14:51:08 | <kuribas> | dminuoso: it helps :) |
| 14:51:23 | → | hnOsmium0001 joins (uid453710@id-453710.hampstead.irccloud.com) |
| 14:51:32 | <Franciman> | kuribas: not for me :P |
| 14:51:45 | <kuribas> | Franciman: what are you doing then? |
| 14:51:52 | <Franciman> | I just enjoy writing things |
| 14:51:53 | <kuribas> | what kind of language is it? |
| 14:52:01 | <Franciman> | now I copied an idea from a langjam winner |
| 14:52:06 | <Franciman> | Debug.trace in comments |
| 14:52:06 | <kuribas> | Franciman: in that case you don't care about going fast. |
| 14:52:08 | <Franciman> | i love the idea |
| 14:52:13 | <dminuoso> | kuribas: And LLVM is very incompatible with the type of code that GHC produces, for instance. |
| 14:52:19 | <dminuoso> | Which is why the LLVM is regularly slower |
| 14:52:22 | <dminuoso> | Which is why the LLVM backend is regularly slower |
| 14:52:24 | <Franciman> | kuribas: it's a strict functional language with System F types |
| 14:52:26 | <kuribas> | dminuoso: yeah, that's the usecase of GRIN. |
| 14:52:53 | <Franciman> | I wanted to add: a more ML like module system, that would help in whishful thinking, i.e. you declar eyour module as wishful |
| 14:53:03 | <kuribas> | dminuoso: it's true that GRIN is lacking useful optimizations. |
| 14:53:05 | <Franciman> | so you don't have to provide implementations and the compiler can only go as far as typechecking |
| 14:53:11 | <Franciman> | then I want to add codata |
| 14:53:17 | <Franciman> | as an explicit construction |
| 14:53:20 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b))) |
| 14:53:20 | → | allbery_b joins (~geekosaur@xmonad/geekosaur) |
| 14:53:22 | <Franciman> | later linear logic, when I learn about it |
| 14:53:24 | allbery_b | is now known as geekosaur |
| 14:53:39 | <kuribas> | wishful? |
| 14:53:52 | <Franciman> | wishful module Vector where |
| 14:54:01 | <Franciman> | and you only define its interface, without implementing it |
| 14:54:07 | <kuribas> | you mean putting holes for functions? |
| 14:54:10 | <Franciman> | in haskell I usually do it by writing functionName = undefined |
| 14:54:11 | <dminuoso> | kuribas: My experience with GRIN is fairly limited, so I cant speak much about it. |
| 14:54:12 | <Franciman> | yep |
| 14:54:48 | <kuribas> | dminuoso: it doesn't do extensive inlining or specialization (yet). But it removes higher order functions and lazyness. |
| 14:54:59 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Quit: Laa shay'a waqi'un moutlaq bale kouloun moumkine) |
| 14:55:01 | <kuribas> | dminuoso: so it can be better compiled by a lower level backend, like LLVM. |
| 14:55:35 | <dminuoso> | kuribas: Is it comparably fast to the GHC core>simpl>cmm pipeline? |
| 14:55:49 | <kuribas> | dminuoso: I have no idea... |
| 14:55:52 | <dminuoso> | (not in terms of produced code, but its own execution time) |
| 14:56:16 | <kuribas> | fast as in compilation times, or as in runtime performance? |
| 14:56:23 | <Franciman> | can you use grinn for an interpreter too? or does it only do compilation? |
| 14:56:26 | <dminuoso> | Did someone try to bolt GRIN onto GHC already? |
| 14:56:37 | <Franciman> | dminuoso: there is JHC using GRIN iiuc |
| 14:56:47 | <dminuoso> | https://github.com/grin-compiler/ghc-grin |
| 14:56:49 | <dminuoso> | Interesting |
| 14:57:09 | <merijn> | dminuoso: There's a guy working on it |
| 14:57:18 | <merijn> | Franciman: Use typed holes! |
| 14:57:25 | <merijn> | Franciman: Undefined is strictly inferior |
| 14:57:51 | <dminuoso> | GRIN seems like a really cool idea then. :) |
| 14:57:54 | <merijn> | "functionName = _" |
| 14:58:00 | <Franciman> | merijn: oh cool |
| 14:58:14 | <Franciman> | do I have to put some extension on? |
| 14:58:17 | <merijn> | No |
| 14:58:24 | <Franciman> | n-nice, thank you! |
| 14:58:26 | <Franciman> | TIL |
| 14:58:34 | <dminuoso> | GRIN kind of reminds me of the Truffle Language Implementation framework. |
| 14:58:45 | <merijn> | Franciman: Typed holes produce an error saying "found typed hole of type: Type that should go there" |
| 14:59:11 | <Franciman> | this may be better than my wishful moduels |
| 14:59:14 | <Franciman> | nice! |
| 14:59:15 | <merijn> | Franciman: There's -fdefer-typed-holes" which turns the error into a warning, which means you can run the code (like you could with undefined) |
| 14:59:35 | <Franciman> | I see |
| 14:59:36 | <Franciman> | useful |
| 14:59:44 | <merijn> | But unlike "undefined" you can delete -fdefer-typed-holes from your GHC flags and get a compile error if you forgot any :p |
| 14:59:57 | <Franciman> | yaaap! it's really nice, thanks merijn |
| 15:00:02 | <merijn> | With undefined you gotta hope you remember to implement all them :p |
| 15:00:10 | <tomsmeding> | merijn: HLS feedback seems to take a little longer to appear in my editor whenever there's a typed hole in the file. It feels like GHC proceeds until a later stage of compilation than normal or something, due to which it takes longer, but this is just a feeling, not based on anything. Do you have any idea why this happens? |
| 15:00:11 | <lortabac> | Franciman: similarly, there is also an extension to enable partial type signatures, when you want to put holes in types |
| 15:00:40 | <merijn> | tomsmeding: longer than compared to what? |
| 15:00:45 | <lortabac> | PartialTypeSignatures |
| 15:01:00 | <tomsmeding> | compared to if there are no typed holes, but only other type errors |
| 15:01:06 | <Franciman> | ty lortabac |
| 15:01:19 | <tomsmeding> | it's not a problem or anything, just seems weird to me |
| 15:02:01 | <tomsmeding> | hm can't really reproduce it now, but it was certainly there earlier (on a slower machine, maybe that's the reason) |
| 15:02:17 | <lortabac> | tomsmeding: I guess it takes time because it looks for possible matches |
| 15:02:24 | <tomsmeding> | oooooooo yes |
| 15:02:29 | <tomsmeding> | that makes total sense |
| 15:02:30 | <merijn> | tomsmeding: I'm not up to date on the current implementation :) |
| 15:02:38 | <tomsmeding> | lortabac++ |
| 15:02:38 | <merijn> | oh, you can disable the possible matches |
| 15:03:22 | <merijn> | I'm just shilling typed holes, because I don't want my effort to get -fdefer-typed-holes to go to waste :p |
| 15:03:26 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Read error: Connection reset by peer) |
| 15:03:39 | <tomsmeding> | I know :p |
| 15:04:00 | <tomsmeding> | but that makes you the typed holes man for me in this channel |
| 15:04:33 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 15:04:53 | <shapr> | tritlo wrote some nice papers on typed holes |
| 15:05:11 | <shapr> | at least, I think that's the right person |
| 15:05:27 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Read error: Connection reset by peer) |
| 15:06:33 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 15:07:15 | → | cigsender joins (~mbrown@74.124.58.162) |
| 15:14:26 | → | _ht joins (~quassel@82-169-194-8.biz.kpn.net) |
| 15:18:14 | × | alx741 quits (~alx741@186.178.109.65) (Ping timeout: 245 seconds) |
| 15:19:07 | × | kenran quits (~kenran@b2b-37-24-119-190.unitymedia.biz) (Ping timeout: 265 seconds) |
| 15:21:40 | → | zmt00 joins (~zmt00@user/zmt00) |
| 15:21:47 | → | vysn joins (~vysn@user/vysn) |
| 15:28:15 | → | doyougnu joins (~user@c-73-25-202-122.hsd1.or.comcast.net) |
| 15:29:39 | <zzz> | what's the default fixity for infix data constructors? |
| 15:30:14 | × | lbseale quits (~lbseale@user/ep1ctetus) (Ping timeout: 265 seconds) |
| 15:30:17 | <merijn> | infixl 9 |
| 15:30:27 | <merijn> | Or rather, that's the default fixity, period :p |
| 15:30:30 | → | myShoggoth joins (~myShoggot@97-120-70-214.ptld.qwest.net) |
| 15:30:33 | <cigsender> | pretty sure everything defaults to infixl 9, like merijn said |
| 15:30:48 | → | mc47 joins (~mc47@xmonad/TheMC47) |
| 15:30:56 | → | alx741 joins (~alx741@181.196.69.122) |
| 15:31:07 | <zzz> | ok just checking |
| 15:31:14 | × | alzgh quits (~alzgh@user/alzgh) (Remote host closed the connection) |
| 15:31:24 | → | alzgh joins (~alzgh@user/alzgh) |
| 15:32:45 | → | xsperry joins (~xs@user/xsperry) |
| 15:33:03 | × | jonathanx quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Remote host closed the connection) |
| 15:39:24 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:285c:5722:2a44:fb76) (Quit: WeeChat 2.8) |
| 15:40:06 | → | Guest3130 joins (~Guest31@45.148.198.128) |
| 15:40:30 | <tomsmeding> | in an error message stating that a particular constraint 'C a' cannot be satisfied, if applicable, ghc says that one could fix the error by adding that constraint in the GADT that you're matching, or somewhere else. But this type variable 'a' is derived from some random type signature somewhere, which is sometimes a completely different one than it tells you to put the constraint on |
| 15:40:39 | × | Guest3130 quits (~Guest31@45.148.198.128) (Client Quit) |
| 15:41:03 | <tomsmeding> | so you have like 'data T b where Constr :: Bool -> T Int', and it tells you to add 'C a' to the context of Constr |
| 15:41:08 | <tomsmeding> | like, that ain't going to work, ghc :p |
| 15:41:20 | <geekosaur> | ghc's suggestions are usually lousy in my experience |
| 15:41:29 | <tomsmeding> | in general ghc seems to confuse type variable names in error messages all over the place |
| 15:41:55 | <geekosaur> | like it will tell you to enable some extension iunstead of fixing the realproblem |
| 15:41:57 | <tomsmeding> | in fact the suggestion is completely valid in this case, and even what I wanted to do, but for the incorrect variable name :p |
| 15:42:27 | × | azeem quits (~azeem@emp-183-4.eduroam.uu.se) (Read error: Connection reset by peer) |
| 15:42:36 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds) |
| 15:42:47 | × | dajoer quits (~david@user/gvx) (Quit: leaving) |
| 15:42:49 | → | azeem joins (~azeem@emp-183-4.eduroam.uu.se) |
| 15:44:12 | → | econo joins (uid147250@user/econo) |
| 15:44:24 | <zzz> | it ain't easy being ghc |
| 15:44:28 | <monochrom> | I too confuse type variables between parametric polymorphism, GADTs, and type families. :) |
| 15:45:37 | <tomsmeding> | it definitely ain't easy being ghc |
| 15:47:27 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f81d:7133:81c9:b91d) (Remote host closed the connection) |
| 15:49:13 | × | cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.3) |
| 15:49:16 | × | wonko quits (~wjc@62.115.229.50) (Ping timeout: 245 seconds) |
| 15:49:34 | × | myShoggoth quits (~myShoggot@97-120-70-214.ptld.qwest.net) (Ping timeout: 265 seconds) |
| 15:50:03 | × | azeem quits (~azeem@emp-183-4.eduroam.uu.se) (Ping timeout: 265 seconds) |
| 15:50:14 | → | azeem joins (~azeem@2a00:801:2d6:ef11:512b:756c:612a:d872) |
| 15:53:52 | × | azeem quits (~azeem@2a00:801:2d6:ef11:512b:756c:612a:d872) (Read error: Connection reset by peer) |
| 15:54:36 | → | azeem joins (~azeem@2a00:801:2d6:ef11:512b:756c:612a:d872) |
| 15:54:37 | × | enoq quits (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) (Quit: enoq) |
| 15:56:18 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f81d:7133:81c9:b91d) |
| 15:56:54 | <ggVGc> | I think we might be due a GHC fork with an extension purge |
| 15:57:05 | <ggVGc> | and get rid of all the ones that turned out not super great ideas |
| 15:57:21 | → | Null_A joins (~null_a@2601:645:8700:2290:99d8:b393:f0ac:dbda) |
| 15:58:29 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net) |
| 15:58:57 | <ProofTechnique> | Also with Alexis King's delimited continuations work so I can finally use `eff` 🥺 |
| 16:00:02 | <monochrom> | Which extensions actually turned out to be not super great ideas? |
| 16:00:10 | → | myShoggoth joins (~myShoggot@97-120-70-214.ptld.qwest.net) |
| 16:00:23 | <c_wraith> | PolymorphicComponents. :P |
| 16:00:45 | <monochrom> | Yeah that's superseded by RankNTypes, no? |
| 16:01:12 | <c_wraith> | yeah. They're just different names for the same thing now |
| 16:01:24 | <monochrom> | I am going for "all of them are already obsoleted or replaced". |
| 16:02:42 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
| 16:02:55 | <ggVGc> | I don't have concrete suggestions right now... But, I'm sure I've read quite a lot about some extensions not working well with others, and we have some tackling quite similar issues from different angles, right? |
| 16:03:06 | <monochrom> | i.e., a cry for "fork GHC to purge them" is basically vacuous. |
| 16:03:25 | <ggVGc> | I wasn't being entirely serious :) |
| 16:06:58 | × | xiongxin quits (~quassel@119.123.102.49) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 16:11:29 | → | Tuplanolla joins (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) |
| 16:11:34 | → | __monty__ joins (~toonn@user/toonn) |
| 16:13:26 | → | vicfred joins (~vicfred@user/vicfred) |
| 16:16:54 | × | ub quits (~Thunderbi@178.115.45.189.wireless.dyn.drei.com) (Quit: ub) |
| 16:17:11 | <dolio> | PolymorphicComponents came after RankNTypes, I think, as a way to have certain data types without turning on the whole extended type system. |
| 16:17:12 | → | ub joins (~Thunderbi@178.115.45.189.wireless.dyn.drei.com) |
| 16:17:15 | × | ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
| 16:18:08 | <geekosaur> | iirc it came after Rank2Types; RankNTypes came later and subsumed Rank2Types |
| 16:18:31 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 16:18:36 | <geekosaur> | and PolymorphicComponents |
| 16:18:50 | <c_wraith> | but these days Rank2Types and PolymorphicComponents both just enable RankNTypes |
| 16:19:01 | <geekosaur> | right |
| 16:19:14 | <dolio> | Ah. |
| 16:19:31 | → | bsima joins (~bsima@2604:a880:400:d0::19f1:7001) |
| 16:19:32 | × | dibblego quits (~dibblego@haskell/developer/dibblego) (Ping timeout: 250 seconds) |
| 16:20:11 | → | neurocyte0132889 joins (~neurocyte@46.243.81.207) |
| 16:20:12 | × | neurocyte0132889 quits (~neurocyte@46.243.81.207) (Changing host) |
| 16:20:12 | → | neurocyte0132889 joins (~neurocyte@user/neurocyte) |
| 16:20:13 | <dolio> | It seems kind of pointless to just remove another name for the same extension. It will just break programs. |
| 16:23:02 | × | chele quits (~chele@user/chele) (Remote host closed the connection) |
| 16:23:40 | → | dibblego joins (~dibblego@122-199-1-30.ip4.superloop.com) |
| 16:23:41 | × | dibblego quits (~dibblego@122-199-1-30.ip4.superloop.com) (Changing host) |
| 16:23:41 | → | dibblego joins (~dibblego@haskell/developer/dibblego) |
| 16:25:19 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 245 seconds) |
| 16:26:33 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 16:27:00 | × | hendursa1 quits (~weechat@user/hendursaga) (Ping timeout: 276 seconds) |
| 16:35:29 | → | hendursaga joins (~weechat@user/hendursaga) |
| 16:37:08 | → | Hanicef joins (~gustaf@81-229-9-108-no92.tbcn.telia.com) |
| 16:39:08 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 16:41:34 | × | cheater quits (~Username@user/cheater) (Ping timeout: 245 seconds) |
| 16:43:41 | × | DNH quits (~DNH@2a02:8108:1100:16d8:a11a:d19d:8c20:4068) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 16:48:10 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 16:48:27 | × | ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
| 16:52:05 | × | robosexual quits (~spaceoyst@88.85.216.62) (Quit: Konversation terminated!) |
| 16:57:36 | → | lavaman joins (~lavaman@98.38.249.169) |
| 16:58:03 | × | mbuf quits (~Shakthi@223.178.119.120) (Quit: Leaving) |
| 16:58:38 | × | Null_A quits (~null_a@2601:645:8700:2290:99d8:b393:f0ac:dbda) () |
| 16:58:41 | × | yinghua quits (~yinghua@2800:2121:1400:900:9813:e2cc:52c1:9b50) (Read error: Connection reset by peer) |
| 16:59:00 | → | yinghua joins (~yinghua@2800:2121:1400:900:550d:5356:b600:ab96) |
| 17:00:31 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 17:02:04 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 265 seconds) |
| 17:02:24 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 245 seconds) |
| 17:05:58 | × | mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
| 17:06:14 | → | DNH joins (~DNH@2a02:8108:1100:16d8:a11a:d19d:8c20:4068) |
| 17:06:16 | → | pavonia joins (~user@user/siracusa) |
| 17:08:01 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.2) |
| 17:09:26 | <kuribas> | is using the `Ap` Monoid fancy haskell? |
| 17:09:49 | <vaibhavsagar[m]> | fancy haskell is whatever i don't know |
| 17:09:51 | <vaibhavsagar[m]> | so yes |
| 17:10:03 | <kuribas> | I have "Validation (ann, Text) (DeviceTables ann -> DeviceTables ann)" |
| 17:10:26 | <kuribas> | if I use Endo and Ap, I can more easily compose them. |
| 17:10:41 | <vaibhavsagar[m]> | I was being facetious |
| 17:10:57 | <vaibhavsagar[m]> | there is no definition of "fancy haskell" that makes sense |
| 17:11:15 | <vaibhavsagar[m]> | if it makes your code better then it's probably good |
| 17:11:24 | <vaibhavsagar[m]> | it it makes your code worse then it's probably bad |
| 17:11:36 | <kuribas> | it makes it better if you know what Ap and Endo do... |
| 17:11:56 | <vaibhavsagar[m]> | I looked it up just now, seems reasonable to me |
| 17:12:03 | <kuribas> | ok, thanks :) |
| 17:12:36 | × | Hanicef quits (~gustaf@81-229-9-108-no92.tbcn.telia.com) (Quit: leaving) |
| 17:12:52 | <vaibhavsagar[m]> | IME when people talk about "fancy haskell" it involves type-level programming, lens, etc |
| 17:13:04 | <vaibhavsagar[m]> | but again, there is no consistent definition |
| 17:13:10 | <kuribas> | lens also :-( |
| 17:13:20 | <kuribas> | I think basic lenses should be ok. |
| 17:13:35 | <vaibhavsagar[m]> | but that's the thing, sometimes lenses are simpler than the alternative |
| 17:13:38 | <awpr> | hmm, I need to delete my own reimplementation of `Ap`. didn't know that existed in `base` |
| 17:13:39 | <kuribas> | like view, set, over |
| 17:13:53 | <vaibhavsagar[m]> | I wrote some code to update JSON without lenses that is incredibly ugly |
| 17:13:53 | <monochrom> | :) |
| 17:14:24 | <vaibhavsagar[m]> | so it might actually be an improvement to rewrite that |
| 17:14:31 | <kuribas> | I've found the more fancy lenses are easy to avoid. |
| 17:15:13 | <kuribas> | For example (view (#field % to f)) => (f . view #field) |
| 17:15:16 | → | cheater joins (~Username@user/cheater) |
| 17:16:25 | <vaibhavsagar[m]> | I don't have a good grasp of lenses but I believe you |
| 17:16:32 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 17:16:54 | <awpr> | this is at least vaguely on-topic: I don't think you need to lose (.) composition to have a sensible OverloadedLabels instance for optics |
| 17:17:34 | <awpr> | the instance head can just be `OpticWrapper p f a b -> OpticWrapper p f s t` |
| 17:17:41 | × | Everything quits (~Everythin@37.115.210.35) (Quit: leaving) |
| 17:18:09 | <kuribas> | awpr: for optics the composition operator is `%` |
| 17:18:16 | <awpr> | that's what I was responding to |
| 17:18:29 | <kuribas> | You don't loose it, it's just a different operator |
| 17:18:38 | → | Null_A joins (~null_a@2601:645:8700:2290:7419:a622:3a5a:ee04) |
| 17:18:45 | <awpr> | "(.) composition" is different from "any form of composition" |
| 17:18:56 | <awpr> | I mean literally the ability to use (.) for composition |
| 17:19:07 | <kuribas> | awpr: are you refering to Control.Category? |
| 17:19:17 | <awpr> | no, literally (Prelude..) |
| 17:19:32 | <kuribas> | in that case, not using (.) is a good thing. |
| 17:19:42 | <awpr> | I don't agree with that |
| 17:20:00 | <kuribas> | because Optics are a concept, a function is an implementation detail. |
| 17:20:12 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 17:20:13 | <kuribas> | you don't want to leak implementation into your API. |
| 17:20:35 | <kuribas> | (.) for lenses is quite confusing. |
| 17:21:07 | <dminuoso> | awpr: The point of using % rather than . has nothing to do with not being able to. |
| 17:21:11 | <awpr> | *shrug* it doesn't confuse me. it's not objectively confusing |
| 17:21:19 | × | sprout quits (~quassel@2a02:a467:ccd6:1:aca2:ad7b:536b:eb53) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 17:22:00 | <dminuoso> | awpr: It's about being able to generate legible diagnostics at composition time, rather than deferring illegible diagnostics to consumption time. |
| 17:22:20 | <dminuoso> | (%) :: forall k l m is js ks s t u v a b . (JoinKinds k l m, AppendIndices is js ks) => Optic k is s t u v -> Optic l js u v a b -> Optic m ks s t a b |
| 17:22:31 | <dminuoso> | So the magic juice is JoinKinds and AppendIndices |
| 17:23:07 | <awpr> | yeah, I guess that makes sense. I still prefer `.` and error messages relating to what's actually going on, myself |
| 17:24:26 | <dminuoso> | Me personally I prefer if GHC produces a type error that says "A Getter cannot be composed with a Setter", rather than being able to satisfy some cryptic constraints. |
| 17:24:40 | <dminuoso> | I dont need to understand what profunctor typeclasses are used |
| 17:24:57 | <awpr> | yeah, I'm the opposite. different libraries for different preferences, I guess |
| 17:25:01 | <dminuoso> | Absolutely. :) |
| 17:26:13 | <dminuoso> | It's also quite possibly relating to the fact that if you're already familiar with the involved constraints, you might not care much. |
| 17:26:27 | <dminuoso> | For a new user who really doesn't care about the implementation, it might be different. |
| 17:27:04 | <dminuoso> | I know some do think that being forced to understand the inner workings is preferrable, but as long as the optics involved have clear semantics, is that really necessary? |
| 17:27:11 | <dminuoso> | But this is definitely personal preference |
| 17:27:14 | × | DNH quits (~DNH@2a02:8108:1100:16d8:a11a:d19d:8c20:4068) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 17:27:22 | <awpr> | yeah, definitely curated error messages are more newcomer-friendly |
| 17:27:29 | <monochrom> | I haven't used lens and optics, but I have a related philosophy comparing C++ operator overloading and Haskell type classes. |
| 17:28:31 | × | Null_A quits (~null_a@2601:645:8700:2290:7419:a622:3a5a:ee04) (Remote host closed the connection) |
| 17:28:38 | <awpr> | part of the downside to me though is that it turns the internally-consistent mechanism into what looks like an ad-hoc set of specific rules |
| 17:28:57 | → | Null_A joins (~null_a@2601:645:8700:2290:7419:a622:3a5a:ee04) |
| 17:28:59 | <dminuoso> | awpr: these ad-hoc rules are formalized though. |
| 17:29:22 | <dminuoso> | awpr: In lens you simply have https://i.imgur.com/ALlbPRa.png |
| 17:29:24 | <awpr> | and for me it's easier to internalize the profunctor workings than to memorize the table of composition rules |
| 17:29:41 | <dminuoso> | So (%) isnt some adhoc nonsense, it's just an implementation of that very hierarchy. :) |
| 17:29:49 | <dminuoso> | (or equivalent for profunctors) |
| 17:29:51 | <monochrom> | If you make the mistake of using a polymorphic function that needs (+) on a type, say T, that doesn't support (+), ... |
| 17:29:58 | <sshine> | as long as they provide an ergonomic, internally-consistent DSL, I don't mind that some parts are opaque. in fact, I prefer it, until I suddenly find that I don't. I guess you always reach a point where you wanna knock down a wall. |
| 17:30:18 | <awpr> | right, I'm not saying it _is_ ad-hoc, just that if you're approaching from a new learner perspective, it looks ad-hoc and nobody ever lets you see the underlying principle |
| 17:30:23 | <dminuoso> | awpr: Perhabs the ideal library would be backpack driven, such that you could pick your flavour. |
| 17:30:33 | <monochrom> | C++ be like "at line 1023 in the polymorphic function, it uses (+), which is not supported" |
| 17:30:42 | <dminuoso> | Assuming we had a working and documented backpack. |
| 17:30:46 | <monochrom> | Haskell be like "T is not an instance of Num". |
| 17:31:08 | <dminuoso> | Such that some users could use say `optics` in the raw profunctor style, and others could use it in the newtype style. |
| 17:31:17 | <monochrom> | I prefer the Haskell way. It's clearly more modular. Why do I need to know that it's line 1023 in the function I'm calling. |
| 17:31:55 | <awpr> | that would be pretty nice. I prefer the profunctor-only presentation over the weird hybrid van laarhoven + profunctors thing of `lens`, so I think a "veil-lifted" `optics` might be my ideal choice |
| 17:33:14 | <awpr> | C++ concepts have been around for ... *looks at standardization progress* ...oh. |
| 17:33:15 | <dminuoso> | awpr: Out of curiosity, what do you find to be "in the way" or "annoying" with the newtype style? |
| 17:33:35 | <monochrom> | C++ concept is very recent. |
| 17:33:43 | <dminuoso> | So far I haven't found anything that was arbitrarily constrained by it, everything that seems legal is also supported/allowed by optics. |
| 17:34:01 | <dminuoso> | With some minor bits like being unable to view through a traversal (which lens supports), that I absolutely loathe. |
| 17:34:16 | <dminuoso> | Oh that was poorly phrased. I absolutely loathe that lens does this. |
| 17:34:18 | × | waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Quit: WeeChat 3.3) |
| 17:34:22 | <dminuoso> | but that too is personal opinion |
| 17:34:22 | <awpr> | I don't have any actual experience with `optics`, it's just a philosophical preference |
| 17:34:29 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds) |
| 17:34:32 | <awpr> | I'm sure it works great in practice |
| 17:35:14 | <dminuoso> | awpr: If that's even a philosophical preference, shouldn't we just abandon data and newtype entirely? |
| 17:35:32 | <dminuoso> | Or is there a limit to that philosophy? |
| 17:36:28 | <dminuoso> | In my experience, hiding implementation details behind a veil that you cant accidentally pierce is generally a good thing. |
| 17:36:47 | → | waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
| 17:36:51 | <awpr> | it's specific to optics: IMO there isn't a need for that to be a protected abstraction, because as far as I'm concerned the underlying mechanism is a clean enough thing to merit having a library for |
| 17:37:34 | <dminuoso> | Yeah, I guess I can sympathize with that. |
| 17:37:59 | <dminuoso> | profunctor optics is incredibly interesting, it has a certain mathematical beauty and it arises just naturally |
| 17:38:14 | <awpr> | I guess the laws for the various optic types contradict that position, though. I've often wanted to export "a thing that has the type of a lens but isn't a lens", which doesn't fit into the un-newtyped view very well |
| 17:38:39 | → | fef joins (~thedawn@user/thedawn) |
| 17:38:43 | <awpr> | like, it is a bit weird that `lens` imposes laws on types that exist independently of the `lens` package |
| 17:38:52 | × | Null_A quits (~null_a@2601:645:8700:2290:7419:a622:3a5a:ee04) (Remote host closed the connection) |
| 17:38:55 | <awpr> | (modulo type aliases) |
| 17:39:16 | → | Null_A joins (~null_a@2601:645:8700:2290:7419:a622:3a5a:ee04) |
| 17:39:33 | <c_wraith> | optics lets you create unlawful lenses |
| 17:39:56 | → | ThatsWhatIDo joins (~whateverm@pool-108-54-183-148.nycmny.fios.verizon.net) |
| 17:40:24 | <awpr> | hmm, I suppose that's a pragmatic choice. but it doesn't really change the situation |
| 17:40:42 | <dminuoso> | Yeah I think this is a bit orthogonal, c_wraith. |
| 17:40:45 | <awpr> | it's not that it's /possible/ to break the laws, it's that breaking the laws is a no-op |
| 17:41:41 | <awpr> | as far as `lens` and GHC's type checker are concerned, my `forall f. Functor f => (a -> f b) -> s -> f t` that doesn't claim to uphold the lens laws /is/ a `Lens`, even though I didn't say it was |
| 17:42:00 | <dminuoso> | awpr: I just dont see what real value you gain by having these details exposed. In my experience, it does somewhat frequently (depending your level of expertise and complexity of code) generate horrible to decipher diagnostics. |
| 17:42:34 | <c_wraith> | well, trivially, you gain the ability to do things the library authors did not divine that you'd need |
| 17:42:41 | <dminuoso> | About the only thing I can think of is that (.) is visually less annoying than (%), but emacs + font locking can address that if its a real issue... |
| 17:43:16 | <dminuoso> | c_wraith: But that's not true. The Optic data constructor is exported. |
| 17:43:29 | <dminuoso> | So you can break optics open or repackage them to construct anything of your chosing. |
| 17:43:43 | <dminuoso> | The entire set of possible compositions is already built |
| 17:43:56 | <awpr> | `view` being polymorphic over `Traversal`s would be one example of that. it's a fair point that it's error-prone, but I prefer less hand-holding over more |
| 17:44:19 | <c_wraith> | I don't see any way to use optics combinators with new things that aren't already in the library |
| 17:44:24 | <dminuoso> | awpr: you can still use foldOf mmm. |
| 17:44:37 | <awpr> | I'm not trying to convince anyone to ditch `optics`, just explaining my personal preference |
| 17:44:48 | → | emf joins (~emf@2620:10d:c090:400::5:ad58) |
| 17:44:52 | <dminuoso> | You just have to be explicit here, with `view` the behavior is completely hidden and relies on you ambiently knowing what a given composition even is |
| 17:44:56 | <dminuoso> | Absolutely! |
| 17:45:09 | <dminuoso> | Im not convincing you anyway, I really want to understand your position. |
| 17:45:20 | <awpr> | totally valid to prefer `optics`, too, and perhaps even a truly better choice for codebases that frequently get newcomers |
| 17:45:34 | × | myShoggoth quits (~myShoggot@97-120-70-214.ptld.qwest.net) (Ping timeout: 265 seconds) |
| 17:45:39 | × | ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
| 17:46:25 | <maerwald> | I don't think this is about newcomers |
| 17:46:57 | <awpr> | I feel the same way as with `instance Foldable ((,) a)`: it's a perfectly valid thing to have and use, and removing it is only desirable inasmuch as you want the compiler to second-guess you when you might have unintentionally used it |
| 17:47:24 | <dminuoso> | awpr: The difference with that instance though, is that it's very easy to see that the argument to some fold happens to be a tuple., |
| 17:47:31 | → | myShoggoth joins (~myShoggot@97-120-70-214.ptld.qwest.net) |
| 17:47:35 | <awpr> | okay, s/newcomers/non-ivory-tower-elitists/ :) |
| 17:47:44 | <dminuoso> | awpr: but realizing that your composition is suddenly no longer a lens but an (affine) traversal because there's a prism you didnt quite see... that's very hard |
| 17:47:51 | <dminuoso> | because as long as there's a monoid instance, it will just work |
| 17:47:54 | <maerwald> | awpr: I still don't understand |
| 17:48:46 | <maerwald> | optics isn't a watered down version of lens for newcomers or noobs |
| 17:48:52 | <dminuoso> | awpr: So with `view` you dont readily know whether this will fold a traversal, or view a singular point. That's my take on it. |
| 17:48:55 | <maerwald> | it's a drop-in replacement |
| 17:49:12 | <dminuoso> | maerwald: I dont think its their position that optics is for newcomers. |
| 17:49:12 | × | Null_A quits (~null_a@2601:645:8700:2290:7419:a622:3a5a:ee04) (Remote host closed the connection) |
| 17:49:22 | <awpr> | no, but it adds complexity for the sake of better error messages, and I don't find that necessary for my own preferences |
| 17:49:34 | <maerwald> | sure |
| 17:49:37 | → | Null_A joins (~null_a@2601:645:8700:2290:7419:a622:3a5a:ee04) |
| 17:49:50 | <awpr> | so, if it's just me working on something, I'd rather have an un-newtyped form |
| 17:49:54 | <maerwald> | but your preferences have little to do with newcomers |
| 17:50:06 | <dminuoso> | awpr: to be fair, optics does have its problems. at times the type machinery for the diagnostics fails, and I get *truly* cryptic errors involving the helper typefamilies that are designed to help me. |
| 17:50:19 | <dminuoso> | So yeah, rarely diagnostics get tons worse |
| 17:50:48 | <maerwald> | the main reason I use optics is because `view` is stricter and the lens Monoid constraint caused a pretty bad production bug for me |
| 17:51:05 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 17:51:16 | <awpr> | must just be an issue of poor wording. I just meant to acknowledge that for codebases with multiple contributors who aren't me or who don't share my admittedly eccentric preference, it's probably better to just use `optics` |
| 17:51:17 | <dminuoso> | maerwald: My thought of, you can easily just use foldOf, and make the monoid folding an explicit choice! |
| 17:52:14 | <dminuoso> | awpr: But perhaps you've already hilighted the core essence of what Im trying to understand. |
| 17:52:19 | <awpr> | hmm. "this caused a real bug" is usually a convincing argument for me |
| 17:52:27 | <dminuoso> | Your preference is based on a personal philosophical view |
| 17:52:45 | <maerwald> | my coding preferences are mainly shaped by PTSD experiences |
| 17:53:05 | <awpr> | er, "multiple contributors who aren't me" <- not to suggest there are multiple of me |
| 17:53:47 | <awpr> | notwithstanding any Champaign meteorologist, UK storm photographer, or former UK drug lord who might share my name |
| 17:53:50 | <dminuoso> | My personal story behind optics is, I never used lens becaue I could never translate these magical constraint compositions into what type of optic they were. And I like putting things like optics into bindings, but that conflicted with my other rule of annotating almost every binding. |
| 17:54:08 | <dminuoso> | And `optics` allowed me to do this, so `optics` is when I started using this DSL. :P |
| 17:55:43 | <maerwald> | I still haven't found a real use case for optics... it's more like convenience, being cool or having too much time on your hands. If you don't use them a lot, the intelectual complexity penalty isn't worth it most of the time |
| 17:55:53 | <maerwald> | because I can't understand then lens code I wrote a couple months ago |
| 17:56:03 | <dminuoso> | maerwald: yeah, we only use them extensively in one project |
| 17:56:08 | <geekosaur> | same here |
| 17:56:09 | <dminuoso> | but we really go bold with optics in that one. :) |
| 17:56:35 | <geekosaur> | every so often I look lens/optics over again and decide I don't really have a use for them yet |
| 17:56:54 | <awpr> | for me the only highly compelling use case is compositions of traversals, especially over things that don't fit the kind signature of `Traversable` |
| 17:57:05 | <c_wraith> | Man, optics really doesn't support most of the things I do with lenses. (trivial data access is boring. concise expression of complex data access is where it's at) |
| 17:57:16 | <c_wraith> | optics doesn't even have universeOf. :( |
| 17:58:10 | <c_wraith> | err. cosmosOf is the one I was thinking of. But optics doesn't have that, either |
| 17:59:00 | <dminuoso> | Mmm, why was I thinking optics had Plated |
| 18:00:11 | <ProofTechnique> | My main use of optics lately has been dealing with responses from really terribly designed GraphQL schemas. Nested optional data is _gross_ |
| 18:00:32 | <dminuoso> | c_wraith: In some way this actually hilights how lenses/optics are sometimes used really well. You have this particular usage pattern you can best describe with this style. |
| 18:00:38 | <dminuoso> | And nothing else comes close. |
| 18:00:51 | <c_wraith> | yeah, that's true |
| 18:03:15 | <dminuoso> | https://gist.github.com/dminuoso/38033cec207a51cf191fad8976e69a40 |
| 18:03:27 | <dminuoso> | This is the kind of pattern we use in our sdn compiler very often |
| 18:08:17 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 265 seconds) |
| 18:09:34 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 18:11:22 | × | Null_A quits (~null_a@2601:645:8700:2290:7419:a622:3a5a:ee04) (Remote host closed the connection) |
| 18:11:46 | → | Null_A joins (~null_a@2601:645:8700:2290:7419:a622:3a5a:ee04) |
| 18:12:44 | × | ThatsWhatIDo quits (~whateverm@pool-108-54-183-148.nycmny.fios.verizon.net) (Quit: Leaving) |
| 18:12:58 | × | ubert quits (~Thunderbi@178.115.45.189.wireless.dyn.drei.com) (Remote host closed the connection) |
| 18:12:59 | ub | is now known as ubert |
| 18:13:26 | × | emf quits (~emf@2620:10d:c090:400::5:ad58) (Ping timeout: 245 seconds) |
| 18:13:53 | → | mortemeur joins (~mortemeur@pool-173-76-107-201.bstnma.fios.verizon.net) |
| 18:17:52 | → | emf joins (~emf@163.114.132.5) |
| 18:20:06 | × | ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
| 18:20:23 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 18:21:42 | × | Null_A quits (~null_a@2601:645:8700:2290:7419:a622:3a5a:ee04) (Remote host closed the connection) |
| 18:22:07 | → | Null_A joins (~null_a@2601:645:8700:2290:7419:a622:3a5a:ee04) |
| 18:27:07 | × | kuribas quits (~user@ptr-25vy0i833ltdcqizn0k.18120a2.ip6.access.telenet.be) (Remote host closed the connection) |
| 18:27:20 | × | kaol quits (~kaol@178.62.241.234) (Remote host closed the connection) |
| 18:27:50 | → | ThatsWhatIDo joins (~whateverm@pool-108-54-183-148.nycmny.fios.verizon.net) |
| 18:27:54 | × | ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
| 18:30:59 | × | kimjetwav quits (~user@2607:fea8:235f:9730:733c:b68b:7b22:df97) (Remote host closed the connection) |
| 18:31:27 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f81d:7133:81c9:b91d) (Remote host closed the connection) |
| 18:37:46 | × | ThatsWhatIDo quits (~whateverm@pool-108-54-183-148.nycmny.fios.verizon.net) (Quit: Leaving) |
| 18:38:24 | → | emf_ joins (~emf@2620:10d:c090:400::5:ad58) |
| 18:40:14 | → | wonko joins (~wjc@62.115.229.50) |
| 18:40:31 | × | emf quits (~emf@163.114.132.5) (Ping timeout: 245 seconds) |
| 18:41:18 | → | ub joins (~Thunderbi@178.115.45.189.wireless.dyn.drei.com) |
| 18:41:59 | × | ubert quits (~Thunderbi@178.115.45.189.wireless.dyn.drei.com) (Ping timeout: 245 seconds) |
| 18:42:00 | ub | is now known as ubert |
| 18:42:11 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 245 seconds) |
| 18:43:01 | × | emf_ quits (~emf@2620:10d:c090:400::5:ad58) (Ping timeout: 245 seconds) |
| 18:44:59 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 18:45:07 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 18:45:29 | × | jespada quits (~jespada@2803:9800:9842:7a62:2d4b:7b80:ce15:fc84) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 18:46:06 | × | fef quits (~thedawn@user/thedawn) (Ping timeout: 276 seconds) |
| 18:47:00 | → | emf joins (~emf@2620:10d:c090:400::5:9760) |
| 18:48:18 | → | mmohammadi9812 joins (~Mohammad@188.210.104.46) |
| 18:55:16 | × | NinjaTrappeur quits (~ninja@user/ninjatrappeur) (Ping timeout: 252 seconds) |
| 18:56:11 | × | yinghua quits (~yinghua@2800:2121:1400:900:550d:5356:b600:ab96) (Remote host closed the connection) |
| 18:56:34 | → | DNH joins (~DNH@2a02:8108:1100:16d8:a11a:d19d:8c20:4068) |
| 18:57:44 | → | yinghua joins (~yinghua@2800:2121:1400:900:9813:e2cc:52c1:9b50) |
| 19:03:07 | × | sneedsfeed quits (~sneedsfee@rrcs-173-95-122-169.midsouth.biz.rr.com) (Ping timeout: 256 seconds) |
| 19:03:14 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 245 seconds) |
| 19:04:02 | → | Pickchea joins (~private@user/pickchea) |
| 19:07:01 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
| 19:07:34 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 19:07:56 | → | NinjaTrappeur joins (~ninja@user/ninjatrappeur) |
| 19:09:48 | × | ubert quits (~Thunderbi@178.115.45.189.wireless.dyn.drei.com) (Quit: ubert) |
| 19:09:49 | → | jespada joins (~jespada@2803:9800:9842:7a62:24b8:8bfb:be5c:585b) |
| 19:09:57 | × | raoul quits (~raoul@95.179.203.88) (Quit: Ping timeout (120 seconds)) |
| 19:12:20 | × | abhixec quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Remote host closed the connection) |
| 19:13:39 | × | unmanbearpig quits (~unmanbear@user/unmanbearpig) (Ping timeout: 245 seconds) |
| 19:14:06 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 19:14:07 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 19:14:07 | → | wroathe joins (~wroathe@user/wroathe) |
| 19:15:28 | × | myShoggoth quits (~myShoggot@97-120-70-214.ptld.qwest.net) (Ping timeout: 265 seconds) |
| 19:16:03 | → | ubert joins (~Thunderbi@178.115.45.189.wireless.dyn.drei.com) |
| 19:16:32 | × | kawpuh quits (~kawpuh@66.42.81.80) (Quit: Ping timeout (120 seconds)) |
| 19:16:48 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f513:8be8:adee:de02) |
| 19:18:22 | → | CiaoSen joins (~Jura@p200300c9571e34002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 19:19:04 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f513:8be8:adee:de02) (Remote host closed the connection) |
| 19:23:58 | → | myShoggoth joins (~myShoggot@97-120-70-214.ptld.qwest.net) |
| 19:29:13 | × | elcaro quits (~anonymous@45.32.191.75) (Ping timeout: 252 seconds) |
| 19:30:02 | × | Andrew quits (~andrew@user/andrewyu) (Remote host closed the connection) |
| 19:30:27 | × | ubert quits (~Thunderbi@178.115.45.189.wireless.dyn.drei.com) (Ping timeout: 265 seconds) |
| 19:30:57 | × | ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
| 19:31:41 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 19:34:08 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 19:34:28 | × | doyougnu quits (~user@c-73-25-202-122.hsd1.or.comcast.net) (Remote host closed the connection) |
| 19:34:46 | × | byorgey quits (~byorgey@155.138.238.211) (Ping timeout: 252 seconds) |
| 19:35:38 | → | tfeb joins (~tfb@88.98.95.237) |
| 19:36:26 | → | byorgey joins (~byorgey@155.138.238.211) |
| 19:37:38 | → | raoul joins (~raoul@95.179.203.88) |
| 19:40:30 | → | AndrewYu joins (~andrew@user/andrewyu) |
| 19:40:48 | → | elcaro joins (~anonymous@45.32.191.75) |
| 19:41:14 | → | kawpuh joins (~kawpuh@66.42.81.80) |
| 19:41:22 | → | Morrow joins (~Morrow@bzq-110-168-31-106.red.bezeqint.net) |
| 19:46:04 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 19:47:22 | × | zer0bitz quits (~zer0bitz@dsl-hkibng31-54fafc-123.dhcp.inet.fi) (Ping timeout: 265 seconds) |
| 19:47:25 | → | unmanbearpig joins (~unmanbear@user/unmanbearpig) |
| 19:47:38 | × | oxide quits (~lambda@user/oxide) (Quit: oxide) |
| 19:50:45 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 265 seconds) |
| 19:53:39 | × | _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
| 19:55:10 | × | azimut_ quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
| 19:55:11 | × | hendursaga quits (~weechat@user/hendursaga) (Remote host closed the connection) |
| 19:55:28 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 19:55:34 | → | hendursaga joins (~weechat@user/hendursaga) |
| 19:58:51 | × | cigsender quits (~mbrown@74.124.58.162) (Quit: leaving) |
| 20:00:47 | × | mmohammadi9812 quits (~Mohammad@188.210.104.46) (Remote host closed the connection) |
| 20:01:10 | → | acidjnk_new joins (~acidjnk@p200300d0c703cb14e484f2ea659578d3.dip0.t-ipconnect.de) |
| 20:04:47 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
| 20:05:02 | × | juhp quits (~juhp@128.106.188.220) (Ping timeout: 246 seconds) |
| 20:05:31 | × | yinghua quits (~yinghua@2800:2121:1400:900:9813:e2cc:52c1:9b50) (Ping timeout: 245 seconds) |
| 20:06:07 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 20:06:37 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 20:07:24 | → | juhp joins (~juhp@128.106.188.220) |
| 20:09:26 | × | tfeb quits (~tfb@88.98.95.237) (Quit: died) |
| 20:11:43 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 20:15:09 | × | ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
| 20:16:50 | → | yinghua joins (~yinghua@2800:2121:1400:900:9813:e2cc:52c1:9b50) |
| 20:18:18 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 20:19:28 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f513:8be8:adee:de02) |
| 20:21:21 | × | wonko quits (~wjc@62.115.229.50) (Ping timeout: 245 seconds) |
| 20:23:11 | → | cigsender joins (~cigsender@74.124.58.162) |
| 20:23:13 | → | terrorjack joins (~terrorjac@static.3.200.12.49.clients.your-server.de) |
| 20:23:51 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f513:8be8:adee:de02) (Ping timeout: 245 seconds) |
| 20:24:35 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 265 seconds) |
| 20:26:32 | × | mei quits (~mei@user/mei) (Read error: Connection reset by peer) |
| 20:27:06 | → | mei joins (~mei@user/mei) |
| 20:27:24 | × | hpc quits (~juzz@ip98-169-35-13.dc.dc.cox.net) (Ping timeout: 245 seconds) |
| 20:27:38 | → | hpc joins (~juzz@ip98-169-35-13.dc.dc.cox.net) |
| 20:33:14 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 245 seconds) |
| 20:34:18 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 20:39:05 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 265 seconds) |
| 20:41:44 | × | Pickchea quits (~private@user/pickchea) (Quit: Leaving) |
| 20:42:27 | × | ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
| 20:44:29 | → | jumper149 joins (~jumper149@80.240.31.34) |
| 20:47:24 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 20:49:14 | × | jtomas quits (~jtomas@95.red-88-11-64.dynamicip.rima-tde.net) (Ping timeout: 265 seconds) |
| 20:49:25 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 20:53:16 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 20:53:57 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Read error: Connection reset by peer) |
| 20:54:47 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 21:09:30 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 21:09:30 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 21:09:30 | → | wroathe joins (~wroathe@user/wroathe) |
| 21:09:36 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 21:11:00 | × | jjhoo quits (~jahakala@user/jjhoo) (Ping timeout: 260 seconds) |
| 21:14:22 | × | neurocyte0132889 quits (~neurocyte@user/neurocyte) (Ping timeout: 265 seconds) |
| 21:14:51 | × | mei quits (~mei@user/mei) (Ping timeout: 265 seconds) |
| 21:15:49 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f513:8be8:adee:de02) |
| 21:17:42 | → | ru0mad joins (~ru0mad@82-64-17-144.subs.proxad.net) |
| 21:18:50 | ← | ru0mad parts (~ru0mad@82-64-17-144.subs.proxad.net) () |
| 21:19:27 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 21:19:54 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 245 seconds) |
| 21:22:12 | Lord_of_Life_ | is now known as Lord_of_Life |
| 21:23:28 | → | Cajun joins (~Cajun@user/cajun) |
| 21:23:45 | → | bdaed joins (~bdaed@185.234.208.208.r.toneticgroup.pl) |
| 21:24:16 | × | chomwitt quits (~chomwitt@94.66.61.137) (Ping timeout: 245 seconds) |
| 21:24:43 | → | abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) |
| 21:25:21 | × | ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
| 21:25:28 | × | gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 21:28:38 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 21:33:48 | × | ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
| 21:34:49 | × | fendor quits (~fendor@178.115.78.172.wireless.dyn.drei.com) (Remote host closed the connection) |
| 21:37:59 | → | brainfreeze joins (~brainfree@2a03:1b20:4:f011::20d) |
| 21:38:51 | × | bdaed quits (~bdaed@185.234.208.208.r.toneticgroup.pl) (Ping timeout: 245 seconds) |
| 21:43:41 | → | abrantesasf joins (~abrantesa@187.36.170.211) |
| 21:45:41 | × | yinghua quits (~yinghua@2800:2121:1400:900:9813:e2cc:52c1:9b50) (Remote host closed the connection) |
| 21:45:58 | → | yinghua joins (~yinghua@2800:2121:1400:900:550d:5356:b600:ab96) |
| 21:50:46 | → | dermato joins (~dermatobr@cpe-70-114-219-76.austin.res.rr.com) |
| 21:53:36 | × | max22- quits (~maxime@2a01cb08833598007fcfb2955ee7c812.ipv6.abo.wanadoo.fr) (Quit: Leaving) |
| 21:54:24 | × | Cajun quits (~Cajun@user/cajun) (Quit: Client closed) |
| 22:02:08 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 22:02:13 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 265 seconds) |
| 22:02:22 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Quit: WeeChat 3.3) |
| 22:11:39 | × | emf quits (~emf@2620:10d:c090:400::5:9760) (Quit: emf) |
| 22:12:47 | → | emf joins (~emf@2620:10d:c090:400::5:9760) |
| 22:13:31 | × | alzgh quits (~alzgh@user/alzgh) (Remote host closed the connection) |
| 22:13:51 | → | alzgh joins (~alzgh@user/alzgh) |
| 22:13:59 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 22:15:59 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 22:18:45 | × | hiruji quits (~hiruji@user/hiruji) (Read error: Connection reset by peer) |
| 22:18:50 | × | tomboy64 quits (~tomboy64@user/tomboy64) (Quit: Off to see the wizard.) |
| 22:19:14 | → | tomboy64 joins (~tomboy64@user/tomboy64) |
| 22:20:44 | × | vysn quits (~vysn@user/vysn) (Ping timeout: 265 seconds) |
| 22:20:54 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 22:22:18 | → | MQ-17J joins (~MQ-17J@d192-24-122-179.try.wideopenwest.com) |
| 22:25:10 | → | bitmapper joins (uid464869@id-464869.lymington.irccloud.com) |
| 22:25:39 | <Axman6> | dminuoso: what's the type of summing there? |
| 22:26:21 | <Axman6> | dminuoso: ... also keen to hear more about the SDN thing! |
| 22:26:28 | × | DNH quits (~DNH@2a02:8108:1100:16d8:a11a:d19d:8c20:4068) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 22:27:11 | × | emf quits (~emf@2620:10d:c090:400::5:9760) (Ping timeout: 245 seconds) |
| 22:29:23 | → | lavaman joins (~lavaman@98.38.249.169) |
| 22:29:30 | → | spider joins (~spider@vps-951ce37a.vps.ovh.ca) |
| 22:31:21 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 245 seconds) |
| 22:33:39 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 245 seconds) |
| 22:36:32 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 22:36:55 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 22:37:28 | → | sprout joins (~quassel@2a02:a467:ccd6:1:aca2:ad7b:536b:eb53) |
| 22:39:06 | × | abhixec quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Quit: restarting) |
| 22:41:22 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 265 seconds) |
| 22:42:08 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 22:50:55 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 22:55:30 | × | michalz quits (~michalz@185.246.204.94) (Remote host closed the connection) |
| 22:55:31 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 245 seconds) |
| 22:58:01 | × | CiaoSen quits (~Jura@p200300c9571e34002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 245 seconds) |
| 23:01:26 | → | emf joins (~emf@2620:10d:c090:400::5:9760) |
| 23:02:11 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 23:02:40 | → | Cajun joins (~Cajun@user/cajun) |
| 23:03:06 | → | econo joins (uid147250@user/econo) |
| 23:03:39 | → | lbseale joins (~lbseale@user/ep1ctetus) |
| 23:06:22 | × | jumper149 quits (~jumper149@80.240.31.34) (Quit: WeeChat 3.2.1) |
| 23:06:39 | × | xff0x quits (~xff0x@2001:1a81:5322:8500:eff4:1133:1236:ed4a) (Ping timeout: 265 seconds) |
| 23:07:21 | → | xff0x joins (~xff0x@2001:1a81:5322:8500:3dbc:62b9:b7d:93a4) |
| 23:08:15 | <lbseale> | Does anyone have a recommendation for a library for deriving Arbitrary for a record type? All I have found is this: https://hackage.haskell.org/package/derive |
| 23:09:07 | <Axman6> | Can't it be done for any Generic? |
| 23:09:10 | <Morrow> | https://hackage.haskell.org/package/generic-arbitrary ? |
| 23:09:52 | <Axman6> | ah - "There is no generic arbitrary implementation included because we don't know how to make a high-quality one. If you want one, consider using the testing-feat or generic-random packages." |
| 23:10:04 | <Axman6> | from the docs for Arbitrary |
| 23:11:19 | <byorgey> | sadly, testing-feat seems unmaintained and doesn't build with latest GHCs |
| 23:11:23 | <byorgey> | you can also try https://hackage.haskell.org/package/dragen |
| 23:12:47 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 265 seconds) |
| 23:12:52 | <lbseale> | These are all good, thanks |
| 23:12:59 | <dmj`> | I think people usually avoid Generic Arbitrary because they don't implement the shrinking properly for lists and other recursive data types. You need to shrink at least logarithmically to keep your program from hanging during generation. |
| 23:14:29 | <lbseale> | maybe I should back up and ask a broader question: Our program takes a huge record with many fields of input, we were hoping to just generate this randomly and see if it works, is this a good idea? |
| 23:17:03 | <dmj`> | lbseale: It depends, is your program expected to work for all random combinations of input? If not, you can get bespoke with how you generate the data, and only generate random cases that are expected. |
| 23:17:04 | <geekosaur> | huge record? sounds like you would either have a very slow thorough test or a fast inadequate one |
| 23:17:28 | <geekosaur> | but that depends on how random the randomness has to be |
| 23:18:47 | <lbseale> | ok these are good questions, it's not expected to work for all random combinations of input |
| 23:19:12 | <lbseale> | it might be good to make sure that it doesn't do something unexpected if it got a completely random input, but that's not my greatest concern |
| 23:19:42 | <lbseale> | so we should focus on writing our own `arbitrary` that generates random but reasonable input |
| 23:20:13 | <lbseale> | geekosaur: you mean slow because it would take a long time to generate truly random data for every field of input? |
| 23:20:31 | <geekosaur> | to test every possible combination across all fields |
| 23:20:42 | <geekosaur> | even with shrinking |
| 23:20:59 | <lbseale> | yeah, doing that is unreasonable |
| 23:27:27 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 23:28:39 | × | Null_A quits (~null_a@2601:645:8700:2290:7419:a622:3a5a:ee04) (Remote host closed the connection) |
| 23:29:51 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Ping timeout: 265 seconds) |
| 23:30:12 | → | Null_A joins (~null_a@2601:645:8700:2290:7419:a622:3a5a:ee04) |
| 23:33:14 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 245 seconds) |
| 23:34:04 | → | Vajb joins (~Vajb@n8vwdu04eps78g521-2.v6.elisa-mobile.fi) |
| 23:37:15 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 23:40:34 | × | Null_A quits (~null_a@2601:645:8700:2290:7419:a622:3a5a:ee04) (Remote host closed the connection) |
| 23:40:34 | × | MQ-17J quits (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer) |
| 23:40:41 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 23:41:19 | → | MQ-17J joins (~MQ-17J@8.6.144.117) |
| 23:42:30 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 276 seconds) |
| 23:43:13 | <monochrom> | My impression is that the best known technique for this is fuzzing, and it is meant to run for hours. |
| 23:45:05 | → | Null_A joins (~null_a@2601:645:8700:2290:7419:a622:3a5a:ee04) |
| 23:45:35 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 23:45:55 | <monochrom> | But regarding a tree-like ADT and so generating random trees, it is very easy to make a very dumb mistake, I made it once. |
| 23:46:07 | × | acidjnk_new quits (~acidjnk@p200300d0c703cb14e484f2ea659578d3.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
| 23:46:40 | <monochrom> | I had a binary tree type. So I went "how about 0.5 chance leaf, 0.5 chance branch-and-recurse". |
| 23:46:40 | × | Vajb quits (~Vajb@n8vwdu04eps78g521-2.v6.elisa-mobile.fi) (Read error: Connection reset by peer) |
| 23:47:16 | <monochrom> | It ran for a long time building a very large tree. Actually I didn't wait for it to stop. |
| 23:47:20 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 23:47:31 | → | nvmd joins (~nvmd@user/nvmd) |
| 23:48:05 | <monochrom> | Someone here pointed out the obvious: So at every node, the expected number of children is 1? |
| 23:48:54 | <monochrom> | That explains why the algorithm is trying to generate an infinite tree. |
| 23:49:01 | <lbseale> | XD |
| 23:49:34 | <monochrom> | That incident inspired me to take a look at a few papers and learn some related math. |
| 23:49:52 | <awpr> | it's interesting that it has a decent chance of fizzling out right away, but once it gets going, it's probably not going to terminate |
| 23:50:29 | × | MQ-17J quits (~MQ-17J@8.6.144.117) (Ping timeout: 265 seconds) |
| 23:51:10 | → | dajoer joins (~david@user/gvx) |
| 23:52:05 | <monochrom> | For example, if you have decided "p chance of leaf, 1-p chance of branch-and-recurse", there is a formula about expected total size, and the theory involves some beautiful combinatoric techniques such as generating functions. |
| 23:52:11 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 245 seconds) |
| 23:53:37 | <monochrom> | (And of course you invert that formula to find out: If you want an expected number of 100 nodes, what should p be.) |
| 23:54:39 | → | MQ-17J joins (~MQ-17J@d192-24-122-179.try.wideopenwest.com) |
| 23:54:44 | <awpr> | something like p/2^(k*depth) to branch would reign in the exponential growth |
| 23:55:34 | × | Null_A quits (~null_a@2601:645:8700:2290:7419:a622:3a5a:ee04) (Remote host closed the connection) |
| 23:55:34 | × | MQ-17J quits (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer) |
| 23:55:37 | <monochrom> | And then there is a series of papers investigating: Suppose you use that algorithm plus this: In case you end up with a tree too large/small, you throw it away and try again. How many times will you have to try? |
| 23:56:02 | <monochrom> | And then the proof wanders into complex analysis land. |
| 23:56:14 | <monochrom> | This can be a very deep rabbit hole. |
| 23:56:18 | × | emf quits (~emf@2620:10d:c090:400::5:9760) (Ping timeout: 260 seconds) |
| 23:59:21 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
All times are in UTC on 2021-10-06.