Home liberachat/#haskell: Logs Calendar

Logs on 2023-12-05 (liberachat/#haskell)

00:01:03 cheater_ joins (~Username@user/cheater)
00:03:04 × iqubic quits (~avi@2601:602:9502:c70:dd03:78c7:a43f:a269) (Remote host closed the connection)
00:03:20 iqubic joins (~avi@2601:602:9502:c70:dd03:78c7:a43f:a269)
00:03:41 × cheater quits (~Username@user/cheater) (Ping timeout: 256 seconds)
00:03:47 cheater_ is now known as cheater
00:06:07 tomboy64 joins (~tomboy64@user/tomboy64)
00:12:45 × idgaen quits (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 4.1.1)
00:16:23 cheater_ joins (~Username@user/cheater)
00:19:11 × cheater quits (~Username@user/cheater) (Ping timeout: 264 seconds)
00:19:18 cheater_ is now known as cheater
00:29:59 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Ping timeout: 264 seconds)
00:30:37 × CrunchyFlakes quits (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) (Ping timeout: 268 seconds)
00:34:21 kassouni joins (~textual@2601:646:401:6c30:f5a5:8b42:242f:9e0b)
00:38:41 × alp_ quits (~alp@2001:861:e3d6:8f80:2823:fd6b:81cc:5297) (Ping timeout: 252 seconds)
00:43:44 CiaoSen joins (~Jura@2a05:5800:2d9:1600:ca4b:d6ff:fec1:99da)
00:44:09 peterbecich joins (~Thunderbi@047-229-123-186.res.spectrum.com)
00:44:48 × alexherbo2 quits (~alexherbo@2a02-8440-3341-75a8-58d4-3b45-b569-2dca.rev.sfr.net) (Ping timeout: 250 seconds)
00:47:12 × euleritian quits (~euleritia@77.22.252.56) (Read error: Connection reset by peer)
00:47:19 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
00:47:21 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
00:48:11 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Client Quit)
00:48:35 × JeremyB99 quits (~JeremyB99@208.64.173.6) (Ping timeout: 264 seconds)
00:58:31 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
00:59:45 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
01:08:04 × lg188 quits (~lg188@82.18.98.230) (Ping timeout: 276 seconds)
01:09:37 [_] joins (~itchyjunk@user/itchyjunk/x-7353470)
01:12:38 JeremyB99 joins (~JeremyB99@208.64.173.6)
01:12:55 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 246 seconds)
01:26:03 lg188 joins (~lg188@82.18.98.230)
01:27:08 emmanuelux joins (~emmanuelu@user/emmanuelux)
01:28:40 × lg188 quits (~lg188@82.18.98.230) (Read error: Connection reset by peer)
01:28:52 dysfigured is now known as dfg
01:29:24 × dfg quits (~dfg@dfg.rocks) (Changing host)
01:29:24 dfg joins (~dfg@user/dfg)
01:30:46 lg188 joins (~lg188@82.18.98.230)
01:39:44 mikess joins (~sam@user/mikess)
01:52:30 × mikess quits (~sam@user/mikess) (Ping timeout: 252 seconds)
01:54:16 mikess joins (~sam@user/mikess)
01:58:31 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds)
01:58:42 × hueso quits (~root@user/hueso) (Quit: hueso)
02:03:40 × JeremyB99 quits (~JeremyB99@208.64.173.6) (Ping timeout: 246 seconds)
02:03:59 JeremyB99 joins (~JeremyB99@208.64.173.6)
02:05:48 hueso joins (~root@user/hueso)
02:06:01 × CiaoSen quits (~Jura@2a05:5800:2d9:1600:ca4b:d6ff:fec1:99da) (Ping timeout: 255 seconds)
02:07:57 CiaoSen joins (~Jura@2a05:5800:2aa:b700:ca4b:d6ff:fec1:99da)
02:12:22 emmanuelux_ joins (~emmanuelu@user/emmanuelux)
02:12:23 × kassouni quits (~textual@2601:646:401:6c30:f5a5:8b42:242f:9e0b) (Quit: My Mac has gone to sleep. ZZZzzz…)
02:13:34 × emmanuelux quits (~emmanuelu@user/emmanuelux) (Ping timeout: 255 seconds)
02:18:03 <geekosaur> @ask tomsmeding around how long do pastes stick around on paste.tomsmeding.com?
02:18:03 <lambdabot> Consider it noted.
02:18:09 × gentauro quits (~gentauro@user/gentauro) (Quit: leaving)
02:20:59 × hueso quits (~root@user/hueso) (Quit: hueso)
02:21:34 <iqubic> So, I know that Alexis King (lexi-lambda) was working on adding GHC primatives for Native Delimited First-Class Continuations. Did that project ever come to fruition?
02:22:36 hueso joins (~root@user/hueso)
02:25:18 <geekosaur> it's in as of 9.6
02:25:30 <geekosaur> https://downloads.haskell.org/ghc/9.6.1/docs/users_guide/9.6.1-notes.html#runtime-system
02:26:16 × sawilagar quits (~sawilagar@user/sawilagar) (Ping timeout: 255 seconds)
02:27:02 trev joins (~trev@user/trev)
02:27:20 <iqubic> Does this mean that Alexis King could theoretically put her Eff package on Hackage now?
02:28:07 <geekosaur> presumably
02:29:15 ec joins (~ec@gateway/tor-sasl/ec)
02:34:22 × xff0x quits (~xff0x@2405:6580:b080:900:2cef:72cf:22:b0de) (Ping timeout: 255 seconds)
02:34:53 kassouni joins (~textual@c-73-71-50-25.hsd1.ca.comcast.net)
02:35:56 <geekosaur> (I don't want to commit to anything; lex-lambda would know far more about it than I do)
02:36:01 <geekosaur> *lexi-lambda
02:49:53 gentauro joins (~gentauro@user/gentauro)
02:50:42 szkl joins (uid110435@id-110435.uxbridge.irccloud.com)
02:53:12 nate4 joins (~nate@c-98-45-158-125.hsd1.ca.comcast.net)
02:54:10 × peterbecich quits (~Thunderbi@047-229-123-186.res.spectrum.com) (Ping timeout: 255 seconds)
02:55:44 bilegeek joins (~bilegeek@2600:1008:b042:b5e2:3f15:ee09:7c7c:66d8)
02:58:07 × nate4 quits (~nate@c-98-45-158-125.hsd1.ca.comcast.net) (Ping timeout: 255 seconds)
02:59:09 × kassouni quits (~textual@c-73-71-50-25.hsd1.ca.comcast.net) (Quit: My Mac has gone to sleep. ZZZzzz…)
03:00:52 × Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection)
03:02:38 × CiaoSen quits (~Jura@2a05:5800:2aa:b700:ca4b:d6ff:fec1:99da) (Ping timeout: 268 seconds)
03:04:10 CiaoSen joins (~Jura@2a05:5800:2b3:9100:ca4b:d6ff:fec1:99da)
03:04:13 × not_reserved quits (~not_reser@185.195.59.27) (Quit: Client closed)
03:15:30 × thegeekinside quits (~thegeekin@189.141.65.247) (Remote host closed the connection)
03:17:06 nate4 joins (~nate@c-98-45-158-125.hsd1.ca.comcast.net)
03:17:19 × hueso quits (~root@user/hueso) (Quit: hueso)
03:19:51 xff0x joins (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
03:23:49 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
03:25:27 hueso joins (~root@user/hueso)
03:25:35 kassouni joins (~textual@c-73-71-50-25.hsd1.ca.comcast.net)
03:26:29 peterbecich joins (~Thunderbi@047-229-123-186.res.spectrum.com)
03:27:20 × kassouni quits (~textual@c-73-71-50-25.hsd1.ca.comcast.net) (Client Quit)
03:33:56 kassouni joins (~textual@c-73-71-50-25.hsd1.ca.comcast.net)
03:37:30 × kassouni quits (~textual@c-73-71-50-25.hsd1.ca.comcast.net) (Client Quit)
03:38:04 × lg188 quits (~lg188@82.18.98.230) (Read error: Connection reset by peer)
03:40:09 lg188 joins (~lg188@82.18.98.230)
03:40:39 kassouni joins (~textual@c-73-71-50-25.hsd1.ca.comcast.net)
03:42:53 × kassouni quits (~textual@c-73-71-50-25.hsd1.ca.comcast.net) (Client Quit)
03:43:35 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
03:43:38 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
03:48:39 × td_ quits (~td@i53870905.versanet.de) (Ping timeout: 256 seconds)
03:50:20 td_ joins (~td@i5387092A.versanet.de)
03:51:02 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:97d:c646:7189:b78d) (Remote host closed the connection)
03:51:17 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:97d:c646:7189:b78d)
03:58:45 × mikess quits (~sam@user/mikess) (Quit: leaving)
04:00:19 kassouni joins (~textual@c-73-71-50-25.hsd1.ca.comcast.net)
04:19:40 × nate4 quits (~nate@c-98-45-158-125.hsd1.ca.comcast.net) (Ping timeout: 255 seconds)
04:20:01 × gentauro quits (~gentauro@user/gentauro) (Ping timeout: 255 seconds)
04:33:59 × emmanuelux_ quits (~emmanuelu@user/emmanuelux) (Quit: au revoir)
04:39:25 × CiaoSen quits (~Jura@2a05:5800:2b3:9100:ca4b:d6ff:fec1:99da) (Ping timeout: 246 seconds)
04:39:36 rosco joins (~rosco@175.136.158.171)
04:45:06 aforemny joins (~aforemny@2001:9e8:6cfa:3700:318d:661c:fcd5:6731)
04:45:43 × aforemny_ quits (~aforemny@2001:9e8:6cd2:2300:81b8:672c:d485:69b9) (Ping timeout: 246 seconds)
04:46:25 × [_] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
05:05:58 × phma quits (~phma@2001:5b0:2143:bdc8:5f21:c979:aa9:dd43) (Read error: Connection reset by peer)
05:06:59 phma joins (~phma@host-67-44-208-46.hnremote.net)
05:07:32 _ht joins (~Thunderbi@28-52-174-82.ftth.glasoperator.nl)
05:07:41 × kassouni quits (~textual@c-73-71-50-25.hsd1.ca.comcast.net) (Quit: My Mac has gone to sleep. ZZZzzz…)
05:07:43 × mobivme quits (~mobivme@112.201.111.217) (Ping timeout: 255 seconds)
05:10:22 kassouni joins (~textual@c-73-71-50-25.hsd1.ca.comcast.net)
05:10:35 × johnw quits (~johnw@69.62.242.138) (Quit: ZNC - http://znc.in)
05:13:11 talismanick joins (~user@2601:204:ef00:bb0::f34e)
05:13:46 mobivme joins (~mobivme@112.201.111.217)
05:16:39 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
05:17:34 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
05:25:12 kassouni is now known as ElectroSpecter
05:25:51 × ElectroSpecter quits (~textual@c-73-71-50-25.hsd1.ca.comcast.net) (Quit: Textual IRC Client: www.textualapp.com)
05:26:14 kassouni joins (~textual@c-73-71-50-25.hsd1.ca.comcast.net)
05:27:29 mikess joins (~sam@user/mikess)
05:31:56 × kassouni quits (~textual@c-73-71-50-25.hsd1.ca.comcast.net) (Quit: Textual IRC Client: www.textualapp.com)
05:32:20 guest_ joins (~textual@c-73-71-50-25.hsd1.ca.comcast.net)
05:33:21 guest_ is now known as ElectroSpecter
05:35:29 loonycyborg joins (~loonycybo@wesnoth/developer/loonycyborg)
05:37:50 × mikess quits (~sam@user/mikess) (Quit: leaving)
05:40:51 × tertek quits (~tertek@user/tertek) (Quit: %quit%)
05:41:12 tertek joins (~tertek@user/tertek)
05:41:42 <int-e> Oh I guess I wasn't the only one to struggle with part 2.
05:47:05 <EvanR> haha
05:49:35 <EvanR> I think I see a clever way
05:55:52 sagax joins (~sagax_nb@user/sagax)
06:00:11 <glguy> int-e: yeah, that one made me think how to do it nicely
06:01:39 <iqubic> I'm not sure how I'm gonna be doing part 2
06:01:59 <EvanR> feynmann's method
06:02:01 × mobivme quits (~mobivme@112.201.111.217) (Ping timeout: 246 seconds)
06:02:26 × analoq quits (~yashi@user/dies) (Ping timeout: 256 seconds)
06:02:56 analoq joins (~yashi@user/dies)
06:03:10 × JeremyB99 quits (~JeremyB99@208.64.173.6) (Ping timeout: 276 seconds)
06:17:45 acidjnk_new joins (~acidjnk@p200300d6e72b9307019ea696578e67a2.dip0.t-ipconnect.de)
06:18:00 <c_wraith> I settled on the minimally dumb solution for part 2. Not smart by any means, but fast enough to not feel like wasting time.
06:19:30 azimut joins (~azimut@gateway/tor-sasl/azimut)
06:22:49 takuan joins (~takuan@178-116-218-225.access.telenet.be)
06:25:51 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Read error: Connection reset by peer)
06:27:50 waleee joins (~waleee@h-176-10-144-38.NA.cust.bahnhof.se)
06:30:39 CrunchyFlakes joins (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de)
06:32:48 × _ht quits (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Remote host closed the connection)
06:39:21 johnw joins (~johnw@69.62.242.138)
06:40:56 chomwitt joins (~chomwitt@2a02:587:7a09:c300:1ac0:4dff:fedb:a3f1)
06:41:32 × Sgeo quits (~Sgeo@user/sgeo) (Ping timeout: 256 seconds)
06:47:00 × ElectroSpecter quits (~textual@c-73-71-50-25.hsd1.ca.comcast.net) (Quit: My Mac has gone to sleep. ZZZzzz…)
06:49:07 ElectroSpecter joins (~textual@c-73-71-50-25.hsd1.ca.comcast.net)
06:53:25 × ElectroSpecter quits (~textual@c-73-71-50-25.hsd1.ca.comcast.net) (Client Quit)
06:56:21 zetef joins (~quassel@95.77.17.251)
06:57:31 mobivme joins (~mobivme@112.201.111.217)
07:01:17 Sgeo joins (~Sgeo@user/sgeo)
07:02:23 × zetef quits (~quassel@95.77.17.251) (Ping timeout: 264 seconds)
07:03:14 × analoq quits (~yashi@user/dies) (Ping timeout: 252 seconds)
07:03:55 misterfish joins (~misterfis@84-53-85-146.bbserv.nl)
07:04:49 analoq joins (~yashi@user/dies)
07:05:47 alp_ joins (~alp@2001:861:e3d6:8f80:1367:5966:495b:292c)
07:16:15 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
07:16:35 azimut joins (~azimut@gateway/tor-sasl/azimut)
07:19:23 zetef joins (~quassel@95.77.17.251)
07:24:47 kenran joins (~user@user/kenran)
07:26:52 × m1dnight quits (~christoph@78-22-4-67.access.telenet.be) (Ping timeout: 255 seconds)
07:27:37 ElectroSpecter joins (~textual@c-73-71-50-25.hsd1.ca.comcast.net)
07:30:59 int-e wonders how much room there actually is for being clever
07:37:38 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
07:37:41 <c_wraith> I feel like there has to be some clever way to turn it into a graph traversal problem
07:40:16 × mobivme quits (~mobivme@112.201.111.217) (Ping timeout: 255 seconds)
07:40:35 Xyloes joins (~wyx@2400:dd01:103a:1012:5923:33ce:7857:fc04)
07:41:42 <int-e> Hmm the only graph I see is way too big here.
07:44:49 <c_wraith> oh, heck. I think I see a clever approach. It's not a graph thing after all.
07:47:05 <int-e> (Well, "way too big" - I guess it's still feasible, but large enough that it wouldn't be fun at all...)
07:48:18 sord937 joins (~sord937@gateway/tor-sasl/sord937)
07:48:47 <int-e> maybe I should've asked how much room there is for being stupid :)
07:49:01 <int-e> (more than I thought, barely)
07:49:16 m1dnight joins (~christoph@78-22-4-67.access.telenet.be)
07:50:07 <c_wraith> I think I see how to do part 2 without any kind of iteration over elements within ranges. That seems like it should make it pretty fast.
07:51:01 <int-e> Right. And I thought that that was unavoidable. The numbers looked so big.
07:51:30 <c_wraith> Turns out if you're clever about what ranges you iterate over, it can be fast enough :)
07:52:52 × peterbecich quits (~Thunderbi@047-229-123-186.res.spectrum.com) (Ping timeout: 255 seconds)
07:56:20 × zetef quits (~quassel@95.77.17.251) (Ping timeout: 256 seconds)
07:59:34 <EvanR> iterating over every number in those ranges?
07:59:38 <EvanR> preposterous
08:00:40 <c_wraith> who said every number? Just need to find the first one.
08:01:00 <EvanR> sure
08:01:36 <EvanR> i see
08:02:58 <int-e> oh, you can work backwards
08:03:09 <int-e> that would help with that I guess
08:03:55 <EvanR> ok my interpretation of your hint was bad and wrong, empirically speaking and i see why now
08:04:25 <c_wraith> The data wasn't chosen to make that especially slow.
08:04:35 × jorik808 quits (~jorik808@d51A48920.access.telenet.be) (Remote host closed the connection)
08:06:13 zetef joins (~quassel@95.77.17.251)
08:06:18 <EvanR> I found an upper bound of about 100 million in my data, where the answer is the least upper bound
08:06:28 lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4)
08:06:40 <c_wraith> computers can count to 100 million very fast.
08:07:05 <EvanR> yes but the tests I have devised to check for real and not the silly check I used to find this upper bound is going to be too expensive
08:07:47 × waleee quits (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 264 seconds)
08:08:04 <int-e> there's a much cheaper way anyway, but it's a funny way to solve the problem without taking an eternity
08:08:26 <c_wraith> it only takes a few seconds, which is pretty funny.
08:08:54 <c_wraith> like I said.. minimally dumb solution. It's dumb, but it's pretty low on the dumb scale!
08:09:06 <xerox> funnily I had the exhaustive search go in parallel with me writing a better solution, it finished before me, and it was off by one >_< (turned out)
08:09:24 <int-e> oops
08:11:30 oo_miguel joins (~Thunderbi@78-11-179-96.static.ip.netia.com.pl)
08:16:12 nate4 joins (~nate@c-98-45-158-125.hsd1.ca.comcast.net)
08:16:24 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
08:17:13 <EvanR> ok I just had a stupid bug the whole time
08:17:37 <EvanR> k that was surprising
08:19:25 <EvanR> I made what I thought to be erroneous assumptions about the structure of the data and it worked anyway
08:19:32 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.1.1)
08:20:11 × szkl quits (uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
08:21:08 × nate4 quits (~nate@c-98-45-158-125.hsd1.ca.comcast.net) (Ping timeout: 268 seconds)
08:23:07 <int-e> the maps are quite nice (they're bijections)
08:24:36 <xerox> and monotonic
08:33:49 mobivme joins (~mobivme@112.201.111.217)
08:37:50 × shriekingnoise quits (~shrieking@186.137.175.87) (Ping timeout: 252 seconds)
08:38:14 fendor joins (~fendor@2a02:8388:1605:d100:267b:1353:13d7:4f0c)
08:42:22 coot joins (~coot@89-69-206-216.dynamic.chello.pl)
08:43:00 <int-e> only piecewise
08:45:05 <int-e> I mean, look at the seed to soil example which has f(96) < f(97) > f(98)
08:46:20 Guest8 joins (~Guest8@2001:ee0:43cc:8260:4cee:a4a6:1698:1f7f)
08:47:14 × Guest8 quits (~Guest8@2001:ee0:43cc:8260:4cee:a4a6:1698:1f7f) (Client Quit)
08:49:40 <trev> i don't get how the top dog got 1:30 for part 1
08:49:44 <trev> cheat codes?
08:51:20 × bilegeek quits (~bilegeek@2600:1008:b042:b5e2:3f15:ee09:7c7c:66d8) (Quit: Leaving)
08:51:58 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
08:52:49 lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4)
08:54:19 × econo_ quits (uid147250@id-147250.tinside.irccloud.com) (Quit: Connection closed for inactivity)
08:55:17 × tzh quits (~tzh@c-71-193-181-0.hsd1.or.comcast.net) (Quit: zzz)
09:05:51 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:97d:c646:7189:b78d) (Remote host closed the connection)
09:07:20 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
09:13:27 ricardo1 joins (~ricardo@84.16.179.218)
09:13:46 <ricardo1> :)
09:16:48 <analoq> trev: try copy pasting the question into chatgpt. for the simpler ones it will spit out working code
09:17:39 <trev> scary
09:18:12 <analoq> yeah
09:19:00 gehmehgeh joins (~user@user/gehmehgeh)
09:20:19 kuribas joins (~user@ip-188-118-57-242.reverse.destiny.be)
09:20:39 × acidjnk_new quits (~acidjnk@p200300d6e72b9307019ea696578e67a2.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
09:21:42 cfricke joins (~cfricke@user/cfricke)
09:24:08 <int-e> Well, 1:35 is long enough for some thought. Imagine you've automated fetching the input and parsing (into something convenient enough like a list of lists of lists of numbers)... you can get to the core of the problem in seconds with a lot of preparation and a bit of luck. But sure, ChatGPT & co. may be involved too.
09:26:59 <tomsmeding> geekosaur: there's an "options" box below the submit button where you can set an expiration time on your pastes. If you set none (which is default), they don't expire. (Well, until I stop paying for the server.)
09:32:25 Square2 joins (~Square4@user/square)
09:42:00 wib_jonas joins (~wib_jonas@business-37-191-60-209.business.broadband.hu)
09:44:01 × misterfish quits (~misterfis@84-53-85-146.bbserv.nl) (Ping timeout: 255 seconds)
09:45:26 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:97d:c646:7189:b78d)
09:46:55 × ElectroSpecter quits (~textual@c-73-71-50-25.hsd1.ca.comcast.net) (Quit: My Mac has gone to sleep. ZZZzzz…)
09:49:19 ubert joins (~Thunderbi@91.141.79.49.wireless.dyn.drei.com)
09:52:13 ElectroSpecter joins (~textual@c-73-71-50-25.hsd1.ca.comcast.net)
09:53:21 JeremyB99 joins (~JeremyB99@208.64.173.6)
09:53:30 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
09:57:31 × rosco quits (~rosco@175.136.158.171) (Quit: Lost terminal)
09:58:53 idgaen joins (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
10:00:19 × JeremyB99 quits (~JeremyB99@208.64.173.6) (Ping timeout: 255 seconds)
10:03:21 danse-nr3 joins (~danse@na-19-76-5.service.infuturo.it)
10:06:00 × hueso quits (~root@user/hueso) (Quit: hueso)
10:10:11 × zetef quits (~quassel@95.77.17.251) (Ping timeout: 264 seconds)
10:11:16 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
10:12:22 × xff0x quits (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 255 seconds)
10:12:24 hueso joins (~root@user/hueso)
10:12:59 × haskellbridge quits (~haskellbr@069-135-003-034.biz.spectrum.com) (Remote host closed the connection)
10:14:21 akegalj joins (~akegalj@93-142-153-242.adsl.net.t-com.hr)
10:15:41 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 256 seconds)
10:15:45 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
10:17:09 Lord_of_Life_ is now known as Lord_of_Life
10:20:37 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
10:20:46 × Me-me quits (~me-me@user/me-me) (Remote host closed the connection)
10:21:11 misterfish joins (~misterfis@87.215.131.102)
10:21:32 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
10:22:48 chele joins (~chele@user/chele)
10:23:28 Me-me joins (~me-me@2602:ff16:3:0:1:dc:beef:d00d)
10:24:37 × ElectroSpecter quits (~textual@c-73-71-50-25.hsd1.ca.comcast.net) (Quit: My Mac has gone to sleep. ZZZzzz…)
10:27:55 × chomwitt quits (~chomwitt@2a02:587:7a09:c300:1ac0:4dff:fedb:a3f1) (Remote host closed the connection)
10:30:38 × ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
10:31:02 ec joins (~ec@gateway/tor-sasl/ec)
10:39:51 npmania1 joins (~Thunderbi@45.8.223.228)
10:40:51 × npmania1 quits (~Thunderbi@45.8.223.228) (Client Quit)
10:41:36 <akegalj> Does anyone knows how to configure ormolu not to put newline between data types. Sometimes I want to have `data A\ndata B\ndata C` but he formats it like `data A\n\ndata B\n\ndata C` which I don't like
10:42:52 chomwitt joins (~chomwitt@2a02:587:7a09:c300:1ac0:4dff:fedb:a3f1)
10:43:21 <danse-nr3> i thought conf for those code formatters was quite straightforward
10:43:34 npmania1 joins (~Thunderbi@45.8.223.243)
10:46:08 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
10:47:06 <akegalj> danse-nr3: I found it in formolu https://hackage.haskell.org/package/fourmolu-0.9.0.0/docs/Ormolu-Config.html#t:PrinterOpts `poNewlinesBetweenDecls`
10:47:57 <danse-nr3> cool
10:49:23 × trev quits (~trev@user/trev) (Read error: Connection reset by peer)
10:49:49 trev joins (~trev@user/trev)
10:50:29 <trev> can someone private message me a hint on part2? just deadlocked my PC letting it run too long :[
10:52:12 <akegalj> danse-nr3: ah no, thats newlines between imports according to https://fourmolu.github.io/
10:53:01 <danse-nr3> either an option is there or what you want is not possible, and if doc is missing considering opening an issue about that
10:53:03 <akegalj> but I see formolu doesn't put space as ormolu does.. so will try switching
10:53:17 × alp_ quits (~alp@2001:861:e3d6:8f80:1367:5966:495b:292c) (Remote host closed the connection)
10:53:18 <danse-nr3> *consider opening
10:53:29 <akegalj> danse-nr3: right!
10:53:36 alp_ joins (~alp@2001:861:e3d6:8f80:fb94:68e0:bd80:c016)
10:57:44 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
10:58:02 × npmania1 quits (~Thunderbi@45.8.223.243) (Quit: npmania1)
10:58:49 <Taneb> trev: try to think of a way to operate on many numbers at once
11:02:00 acidjnk_new joins (~acidjnk@p200300d6e72b9307019ea696578e67a2.dip0.t-ipconnect.de)
11:02:51 × chomwitt quits (~chomwitt@2a02:587:7a09:c300:1ac0:4dff:fedb:a3f1) (Ping timeout: 256 seconds)
11:03:39 alexherbo2 joins (~alexherbo@2a02-8440-3440-a8d3-456b-c7e0-9704-2922.rev.sfr.net)
11:03:46 × ubert quits (~Thunderbi@91.141.79.49.wireless.dyn.drei.com) (Ping timeout: 255 seconds)
11:06:16 <trev> Taneb: thanks. how long should it run?
11:06:23 <Taneb> Mine runs in less than a second
11:08:16 <probie> It should be human-scale instantaneous
11:10:17 pyooque joins (~puke@user/puke)
11:10:18 puke is now known as Guest146
11:10:18 × Guest146 quits (~puke@user/puke) (Killed (copper.libera.chat (Nickname regained by services)))
11:10:18 pyooque is now known as puke
11:11:42 × puke quits (~puke@user/puke) (Max SendQ exceeded)
11:12:39 puke joins (~puke@user/puke)
11:14:56 xff0x joins (~xff0x@2405:6580:b080:900:7175:c6a6:e4c5:7fc9)
11:16:44 Vajb joins (~Vajb@2001:999:704:f9f4:5471:a9dd:fd2a:5408)
11:17:17 rito joins (~ritog@45.112.243.193)
11:19:29 zetef joins (~quassel@95.77.17.251)
11:21:33 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
11:24:55 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Ping timeout: 276 seconds)
11:26:17 ubert joins (~Thunderbi@91.141.79.49.wireless.dyn.drei.com)
11:27:15 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds)
11:27:38 euleritian joins (~euleritia@dynamic-002-247-249-146.2.247.pool.telefonica.de)
11:28:40 × krei-se quits (~krei-se@p5085dea2.dip0.t-ipconnect.de) (Quit: ZNC 1.8.2 - https://znc.in)
11:28:56 takuan joins (~takuan@178-116-218-225.access.telenet.be)
11:29:00 krei-se joins (~krei-se@p5085dea2.dip0.t-ipconnect.de)
11:29:13 gentauro joins (~gentauro@user/gentauro)
11:37:55 lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4)
11:44:17 × euleritian quits (~euleritia@dynamic-002-247-249-146.2.247.pool.telefonica.de) (Read error: Connection reset by peer)
11:44:34 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
12:00:16 JeremyB99 joins (~JeremyB99@208.64.173.6)
12:01:16 × zetef quits (~quassel@95.77.17.251) (Ping timeout: 255 seconds)
12:06:43 zetef joins (~quassel@95.77.17.251)
12:06:46 × JeremyB99 quits (~JeremyB99@208.64.173.6) (Ping timeout: 255 seconds)
12:14:15 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 256 seconds)
12:14:33 euleritian joins (~euleritia@dynamic-002-247-249-146.2.247.pool.telefonica.de)
12:17:43 × euleritian quits (~euleritia@dynamic-002-247-249-146.2.247.pool.telefonica.de) (Read error: Connection reset by peer)
12:17:43 nate4 joins (~nate@c-98-45-158-125.hsd1.ca.comcast.net)
12:18:00 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
12:20:24 × danse-nr3 quits (~danse@na-19-76-5.service.infuturo.it) (Ping timeout: 256 seconds)
12:22:02 × alexherbo2 quits (~alexherbo@2a02-8440-3440-a8d3-456b-c7e0-9704-2922.rev.sfr.net) (Remote host closed the connection)
12:22:25 × nate4 quits (~nate@c-98-45-158-125.hsd1.ca.comcast.net) (Ping timeout: 255 seconds)
12:29:48 chomwitt joins (~chomwitt@2a02:587:7a09:c300:1ac0:4dff:fedb:a3f1)
12:30:57 JeremyB99 joins (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc)
12:39:35 × zetef quits (~quassel@95.77.17.251) (Ping timeout: 264 seconds)
12:43:32 sawilagar joins (~sawilagar@user/sawilagar)
12:46:20 danse-nr3 joins (~danse@na-19-68-164.service.infuturo.it)
12:48:17 L29Ah parts (~L29Ah@wikipedia/L29Ah) ()
12:55:44 <pounce> are there any good style guides for haskell
12:55:52 <pounce> im having a hard time making some complicated expressions look good haha
13:03:05 <danse-nr3> it depends on a lot of factors, your colleagues' tastes, for instance. There are code formatters and we were talking about them here before. Personally when the code i write seems complex, i tend to focus more on how it is factored rather than the style, but style can mean many things i guess
13:04:56 <pounce> ooh! thanks sorry i didn't read the backlog
13:05:13 <danse-nr3> yeah of course one is not expected to
13:13:30 <ski> pounce : i think tibbe's style guide <https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md> is largely reasonable, although i don't agree with everything in it (e.g. i use two-space indentation)
13:13:56 <pounce> thanks :>
13:15:38 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
13:19:07 <pounce> the project that I'm working in isn't super opinionated, but I still care about how it looks :p
13:21:50 × JeremyB99 quits (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc) (Read error: Connection reset by peer)
13:22:11 × chele quits (~chele@user/chele) (Ping timeout: 264 seconds)
13:26:31 × alp_ quits (~alp@2001:861:e3d6:8f80:fb94:68e0:bd80:c016) (Ping timeout: 246 seconds)
13:26:37 JeremyB99 joins (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc)
13:28:42 × JeremyB99 quits (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc) (Read error: Connection reset by peer)
13:31:28 L29Ah joins (~L29Ah@wikipedia/L29Ah)
13:38:16 puke is now known as Guest6720
13:38:16 × Guest6720 quits (~puke@user/puke) (Killed (copper.libera.chat (Nickname regained by services)))
13:38:19 puke joins (~puke@user/puke)
13:39:15 × puke quits (~puke@user/puke) (Remote host closed the connection)
13:45:53 × idgaen quits (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 4.1.1)
13:49:45 JeremyB99 joins (~JeremyB99@172.58.121.184)
13:49:52 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 276 seconds)
13:49:52 × JeremyB99 quits (~JeremyB99@172.58.121.184) (Read error: Connection reset by peer)
13:50:45 euleritian joins (~euleritia@dynamic-002-247-249-146.2.247.pool.telefonica.de)
13:57:17 szkl joins (uid110435@id-110435.uxbridge.irccloud.com)
13:58:41 × immae quits (~immae@2a01:4f8:141:53e7::) (Quit: WeeChat 3.3)
14:02:19 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
14:02:54 immae joins (~immae@2a01:4f8:141:53e7::)
14:03:45 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.1.1)
14:06:49 JeremyB99 joins (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc)
14:07:44 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
14:08:30 × JeremyB99 quits (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc) (Read error: Connection reset by peer)
14:09:56 JeremyB99 joins (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc)
14:13:46 × JeremyB99 quits (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc) (Read error: Connection reset by peer)
14:17:55 JeremyB99 joins (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc)
14:18:48 shriekingnoise joins (~shrieking@186.137.175.87)
14:19:43 chele joins (~chele@user/chele)
14:21:47 × JeremyB99 quits (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc) (Read error: Connection reset by peer)
14:25:51 thegeekinside joins (~thegeekin@189.141.65.247)
14:26:36 JeremyB99 joins (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc)
14:28:49 × JeremyB99 quits (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc) (Read error: Connection reset by peer)
14:30:34 puke joins (~puke@user/puke)
14:32:32 × chomwitt quits (~chomwitt@2a02:587:7a09:c300:1ac0:4dff:fedb:a3f1) (Remote host closed the connection)
14:34:02 qqq joins (~qqq@92.43.167.61)
14:35:42 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
14:36:00 JeremyB99 joins (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc)
14:38:05 noscript joins (~james@user/earldouglas)
14:39:02 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Quit: WeeChat 4.1.1)
14:39:16 × JeremyB99 quits (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc) (Read error: Connection reset by peer)
14:39:53 JeremyB99 joins (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc)
14:40:07 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds)
14:40:58 azimut joins (~azimut@gateway/tor-sasl/azimut)
14:41:41 × misterfish quits (~misterfis@87.215.131.102) (Ping timeout: 240 seconds)
14:42:46 × JeremyB99 quits (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc) (Read error: Connection reset by peer)
14:46:17 JeremyB99 joins (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc)
14:49:31 × JeremyB99 quits (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc) (Read error: Connection reset by peer)
14:51:30 JeremyB99 joins (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc)
14:51:48 × Xyloes quits (~wyx@2400:dd01:103a:1012:5923:33ce:7857:fc04) (Quit: Konversation terminated!)
14:55:19 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds)
14:57:01 × JeremyB99 quits (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc) (Read error: Connection reset by peer)
14:57:12 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
14:58:23 × euleritian quits (~euleritia@dynamic-002-247-249-146.2.247.pool.telefonica.de) (Read error: Connection reset by peer)
14:58:40 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
14:59:06 JeremyB99 joins (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc)
14:59:59 × akegalj quits (~akegalj@93-142-153-242.adsl.net.t-com.hr) (Ping timeout: 264 seconds)
15:05:52 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 255 seconds)
15:06:38 azimut joins (~azimut@gateway/tor-sasl/azimut)
15:06:41 × kenran quits (~user@user/kenran) (Remote host closed the connection)
15:07:09 <dolio> Style guides don't make code look good. They make it look uniform and excuse you from thinking about how to make it look good.
15:08:08 × JeremyB99 quits (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc) (Read error: Connection reset by peer)
15:08:29 alp_ joins (~alp@2001:861:e3d6:8f80:d431:2a33:17df:c8f8)
15:09:24 JeremyB99 joins (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc)
15:11:55 × danse-nr3 quits (~danse@na-19-68-164.service.infuturo.it) (Ping timeout: 260 seconds)
15:12:26 × JeremyB99 quits (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc) (Read error: Connection reset by peer)
15:12:30 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds)
15:12:58 euleritian joins (~euleritia@dynamic-002-247-249-146.2.247.pool.telefonica.de)
15:17:10 × bitmapper quits (uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity)
15:21:22 × jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 260 seconds)
15:22:38 __monty__ joins (~toonn@user/toonn)
15:22:46 × euleritian quits (~euleritia@dynamic-002-247-249-146.2.247.pool.telefonica.de) (Read error: Connection reset by peer)
15:23:03 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
15:23:42 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
15:28:16 × dibblego quits (~dibblego@haskell/developer/dibblego) (Ping timeout: 255 seconds)
15:32:16 Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542)
15:32:45 abiss27 joins (~abiss27@190.213.236.106)
15:35:51 × abiss27 quits (~abiss27@190.213.236.106) (Client Quit)
15:41:50 _ht joins (~Thunderbi@28-52-174-82.ftth.glasoperator.nl)
15:46:47 JeremyB99 joins (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc)
15:47:32 waleee joins (~waleee@h-176-10-144-38.NA.cust.bahnhof.se)
15:48:09 × JeremyB99 quits (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc) (Read error: Connection reset by peer)
15:50:16 JeremyB99 joins (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc)
15:55:46 × cfricke quits (~cfricke@user/cfricke) (Ping timeout: 245 seconds)
16:00:17 zetef joins (~quassel@95.77.17.251)
16:03:05 ElectroSpecter joins (~textual@c-73-71-50-25.hsd1.ca.comcast.net)
16:06:17 × szkl quits (uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
16:07:47 × JeremyB99 quits (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc) (Read error: Connection reset by peer)
16:08:59 × kuribas quits (~user@ip-188-118-57-242.reverse.destiny.be) (Remote host closed the connection)
16:11:31 × ElectroSpecter quits (~textual@c-73-71-50-25.hsd1.ca.comcast.net) (Quit: My Mac has gone to sleep. ZZZzzz…)
16:11:51 akegalj joins (~akegalj@93-142-153-242.adsl.net.t-com.hr)
16:12:27 JeremyB99 joins (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc)
16:13:19 ElectroSpecter joins (~textual@c-73-71-50-25.hsd1.ca.comcast.net)
16:14:28 × JeremyB99 quits (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc) (Read error: Connection reset by peer)
16:16:15 danse-nr3 joins (~danse@na-19-68-164.service.infuturo.it)
16:19:14 nate4 joins (~nate@c-98-45-158-125.hsd1.ca.comcast.net)
16:20:30 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
16:21:08 misterfish joins (~misterfis@84-53-85-146.bbserv.nl)
16:22:37 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 276 seconds)
16:22:48 JeremyB99 joins (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc)
16:24:36 × nate4 quits (~nate@c-98-45-158-125.hsd1.ca.comcast.net) (Ping timeout: 268 seconds)
16:24:40 bontaq joins (~user@ool-45707d2c.dyn.optonline.net)
16:27:20 × danse-nr3 quits (~danse@na-19-68-164.service.infuturo.it) (Read error: Connection reset by peer)
16:27:41 × JeremyB99 quits (~JeremyB99@2607:fb90:8de0:9988:3153:f12e:4502:a2bc) (Ping timeout: 268 seconds)
16:28:29 danse-nr3 joins (~danse@rm-19-12-239.service.infuturo.it)
16:29:41 × waleee quits (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 240 seconds)
16:31:28 vishnix joins (~vishwas@c-73-9-42-9.hsd1.il.comcast.net)
16:33:22 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:97d:c646:7189:b78d) (Remote host closed the connection)
16:33:37 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:97d:c646:7189:b78d)
16:33:45 × puke quits (~puke@user/puke) (Remote host closed the connection)
16:34:10 puke joins (~puke@user/puke)
16:35:47 × ElectroSpecter quits (~textual@c-73-71-50-25.hsd1.ca.comcast.net) (Quit: My Mac has gone to sleep. ZZZzzz…)
16:38:55 mrmr15533 joins (~mrmr@user/mrmr)
16:38:57 ElectroSpecter joins (~textual@c-73-71-50-25.hsd1.ca.comcast.net)
16:44:14 slideshow6052 joins (uid629799@id-629799.tinside.irccloud.com)
16:44:22 <slideshow6052> hi
16:45:07 <slideshow6052> I am reading this page https://wiki.haskell.org/Maybe and am trying to how i can covert this code to use it
16:45:18 <slideshow6052> https://www.irccloud.com/pastebin/F0lhI2mT/
16:50:05 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
16:50:21 × wib_jonas quits (~wib_jonas@business-37-191-60-209.business.broadband.hu) (Quit: Client closed)
16:50:56 <danse-nr3> which "conversion" you mean? Would you mind making a quick example? Does it suit "Maybe a -> ?" or "? -> Maybe a"?
16:51:32 <slideshow6052> oh sorry i wrote that wrong
16:51:40 <slideshow6052> i meant, how can i convert it to use do notation?
16:52:00 <slideshow6052> i meant to say i read the "maybe as a monad" section of that link
16:52:59 <slideshow6052> like can i do something like (Just Bool, Just ty2, Just ty3 ) <- (infer ctx t1, infer ctx t2, infer ctx t3)?
16:53:06 <danse-nr3> nope
16:53:13 L29Ah parts (~L29Ah@wikipedia/L29Ah) ()
16:53:18 <danse-nr3> that has to go through ...
16:53:53 <danse-nr3> % :t \ a b c -> (,,,) <$> a <*> b <*> c
16:53:53 <yahb2> \ a b c -> (,,,) <$> a <*> b <*> c ; :: Applicative f => ; f a1 -> f a2 -> f a3 -> f (d -> (a1, a2, a3, d))
16:54:13 <danse-nr3> sorry, extra comma
16:54:18 <danse-nr3> % :t \ a b c -> (,,) <$> a <*> b <*> c
16:54:18 <yahb2> \ a b c -> (,,) <$> a <*> b <*> c ; :: Applicative f => f a1 -> f a2 -> f a3 -> f (a1, a2, a3)
16:54:41 <c_wraith> slideshow6052: one translation would look like this: https://paste.tomsmeding.com/bynNnKws
16:55:01 <c_wraith> (I didn't test it, there might be typos)
16:55:17 <c_wraith> oh, there are. the bare 2 and 3 should be t2 and t3
16:56:36 <slideshow6052> ah i see
16:56:47 <slideshow6052> and guard is from control.monad i had to import it
16:57:12 <c_wraith> yeah. you don't have to use it, but it is one common translation of that idiom.
16:57:17 × vishnix quits (~vishwas@c-73-9-42-9.hsd1.il.comcast.net) (Quit: leaving)
16:57:19 <slideshow6052> So guard is also gonna short circuit if ty2 /= ty3, the same as if infer ctx t3 will if we get a Nothing?
16:57:40 <c_wraith> > guard False :: Maybe ()
16:57:41 <lambdabot> Nothing
16:58:09 <slideshow6052> cool, thank you
16:58:38 econo_ joins (uid147250@id-147250.tinside.irccloud.com)
16:59:36 <c_wraith> technically the short-circuiting comes from the (>>) operator inserted by do notation, but yeah. It does happen.
16:59:41 × sagax quits (~sagax_nb@user/sagax) (Quit: Konversation terminated!)
16:59:56 <c_wraith> > guard False >> pure "data"
16:59:57 <lambdabot> error:
16:59:57 <lambdabot> • Ambiguous type variable ‘m0’ arising from a use of ‘show_M115630914304...
16:59:57 <lambdabot> prevents the constraint ‘(Show (m0 [Char]))’ from being solved.
17:01:02 <c_wraith> > guard False >> pure "data" :: Maybe String
17:01:04 <lambdabot> Nothing
17:01:58 × zetef quits (~quassel@95.77.17.251) (Ping timeout: 255 seconds)
17:04:02 × danse-nr3 quits (~danse@rm-19-12-239.service.infuturo.it) (Ping timeout: 260 seconds)
17:04:17 tzh joins (~tzh@c-71-193-181-0.hsd1.or.comcast.net)
17:04:18 × ElectroSpecter quits (~textual@c-73-71-50-25.hsd1.ca.comcast.net) (Quit: Textual IRC Client: www.textualapp.com)
17:06:34 idgaen joins (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
17:07:59 danse-nr3 joins (~danse@rm-19-12-239.service.infuturo.it)
17:11:50 dhil joins (~dhil@2001:8e0:2014:3100:9c6c:ea41:44c3:22b6)
17:13:01 × Square2 quits (~Square4@user/square) (Ping timeout: 268 seconds)
17:15:14 notzmv joins (~zmv@user/notzmv)
17:15:47 × misterfish quits (~misterfis@84-53-85-146.bbserv.nl) (Ping timeout: 268 seconds)
17:16:52 <slideshow6052> i am having some issues with a download
17:17:06 <slideshow6052> i am trying to download fourmolu formatter with cabal install
17:17:24 <slideshow6052> cabal fails to build text-2.1 it says
17:17:28 <slideshow6052> https://www.irccloud.com/pastebin/QTIvB5s5/
17:17:54 <slideshow6052> but i do dnf install libstdc++ and it says it's fine
17:18:08 <c_wraith> does that install the headers for the library?
17:18:28 <c_wraith> debian and its derivatives put the headers in a different package
17:18:33 <slideshow6052> oh right
17:18:38 <c_wraith> other distributions might also do that. (I don't recognize dnf)
17:19:27 <slideshow6052> dnf is fedora
17:20:13 <c_wraith> ah, thanks. Let's see how well I manage to remember that.
17:23:10 <slideshow6052> Ok I downloaded another one and it got further
17:23:36 <slideshow6052> now it fails on [49 of 49] Compiling Data.Text.Lazy.IO :(
17:27:32 Square joins (~Square@user/square)
17:29:12 dibblego joins (~dibblego@122-199-1-93.ip4.superloop.au)
17:29:12 × dibblego quits (~dibblego@122-199-1-93.ip4.superloop.au) (Changing host)
17:29:12 dibblego joins (~dibblego@haskell/developer/dibblego)
17:29:42 × danse-nr3 quits (~danse@rm-19-12-239.service.infuturo.it) (Ping timeout: 252 seconds)
17:41:39 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
17:42:03 <slideshow6052> ok it finally finished building :)
17:43:26 <glguy> geekosaur: haskellbridge seems to be in some kind of crisis
17:43:33 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
17:43:33 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
17:43:33 finn_elija is now known as FinnElija
17:44:36 <geekosaur> apparently my network burped overnight
17:44:44 haskellbridge joins (~haskellbr@069-135-003-034.biz.spectrum.com)
17:44:44 ChanServ sets mode +v haskellbridge
17:45:18 <geekosaur> there's a bug in the IRC code (which I reported upstream) where it tries to replay stuff immediately on reconnection to the IRC server and gets disconnected for flooding
17:46:15 mikess joins (~sam@user/mikess)
17:46:24 danse-nr3 joins (~danse@151.47.12.193)
17:47:00 <haskellbridge> 12<C​elestial> is `data Wtf = Wtf Wtf` isomorphic to `Void`?
17:47:21 <danse-nr3> not sure but great choice as a variable name
17:48:29 × dhil quits (~dhil@2001:8e0:2014:3100:9c6c:ea41:44c3:22b6) (Ping timeout: 240 seconds)
17:48:35 <ski> haskellbridge : no, because that's a non-strict `data' type
17:48:54 <ski> er, s/haskellbridge/Celestial/
17:48:54 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
17:48:55 <geekosaur> right, `Wtf undefined` is a valid value
17:49:12 <haskellbridge> 12<C​elestial> right
17:49:15 <geekosaur> `data Wtf = Wtf !Wtf` would block that
17:49:24 <ski> `data Void = AbsurdVoid !Void' would be
17:49:40 <haskellbridge> 12<C​elestial> that makes sense, thanks
17:49:44 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
17:49:51 dhil joins (~dhil@2001:8e0:2014:3100:9c6c:ea41:44c3:22b6)
17:49:52 <ski> `datatype void of AbsurdVoid of void' would be how to define it, in SML. and similarly for OCaml
17:49:53 <haskellbridge> 12<C​elestial> interesting
17:50:08 <ski> (er, replace the first `of' with `=')
17:50:34 <ski> @type absurd
17:50:35 <lambdabot> Void -> a
17:51:19 <ski> % :t absurd @Void
17:51:19 <yahb2> absurd @Void :: Void -> Void
17:51:56 <ski> (and then you can define `absurd :: Void -> a; absurd (AbsurdVoid v) = absurd v')
17:52:04 <haskellbridge> 12<C​elestial> I was thinking of tying the knot but that also doesn't work because of strictness
17:52:21 <ski> tying-the-knot, how/why ?
17:53:40 <haskellbridge> 12<C​elestial> ```hs
17:53:41 <haskellbridge> 12<C​elestial> ghci> y = let x = Wtf x in x
17:53:42 <haskellbridge> 12<C​elestial> ghci> (\(Wtf _) -> print "Hello") y
17:53:43 <haskellbridge> 12<C​elestial> ```
17:53:45 <haskellbridge> 12<C​elestial> would work if it was not strict
17:54:35 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
17:55:16 tremon joins (~tremon@83.80.159.219)
17:55:27 Achylles joins (~Achylles_@45.182.57.11)
17:57:11 <ski> well, "work" as in allow the matching to succeed and proceed
17:57:46 <haskellbridge> 12<C​elestial> right
17:58:57 hamess joins (~hamess@user/hamess)
17:59:27 misterfish joins (~misterfis@84-53-85-146.bbserv.nl)
17:59:57 <ski> ok, i just tried the following in OCaml
17:59:59 <ski> # type void = AbsurdVoid of void;;
18:00:12 <ski> type void = AbsurdVoid of void
18:00:16 <iqubic> Does that work?
18:00:19 <ski> # let rec absurd (AbsurdVoid v) = absurd v;;
18:00:26 <ski> val absurd : void -> 'a = <fun>
18:00:39 <ski> # let rec bottom = AbsurdVoid bottom;;
18:00:48 <ski> val bottom : void = AbsurdVoid <cycle>
18:00:55 <ski> # absurd bottom;;
18:01:03 <ski> ^CInterrupted.
18:01:09 <ski> # match bottom with AbsurdVoid _ -> ();;
18:01:16 <ski> - : unit = ()
18:01:19 <ski> #
18:01:19 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds)
18:02:11 <ski> so you can see that i could construct a cyclic value, and passing that to `absurd' causes non-termination, but just matching on a single level allows computation to proceed
18:02:24 euleritian joins (~euleritia@dynamic-002-247-251-001.2.247.pool.telefonica.de)
18:03:34 <ski> (OCaml allows the construction of cyclic values like that (as long as the cyclic path basically only contains data constructors), while SML does not (except for function, and i guess suspensions (lazy thunks)))
18:04:22 <iqubic> I don't know OCaml
18:05:17 <ski> the above is a fairly direct transliteration of the previous Haskell code
18:07:26 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
18:07:27 <ski> (`rec' is for recursive definitions. `match .. with .. -> .. | .. -> .. | ...' corresponds to `case .. of .. -> .. ; .. -> .. ; ...'. data constructors take at most one argument, in the data type definition (`type .. = .. | ...') the data constructor is separated from the argument type by `of'. `;;' is a terminator in the interactor)
18:08:07 × euleritian quits (~euleritia@dynamic-002-247-251-001.2.247.pool.telefonica.de) (Read error: Connection reset by peer)
18:08:25 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
18:09:39 × phma quits (~phma@host-67-44-208-46.hnremote.net) (Read error: Connection reset by peer)
18:10:11 × danse-nr3 quits (~danse@151.47.12.193) (Ping timeout: 260 seconds)
18:10:26 phma joins (~phma@2001:5b0:211b:f698:7c9e:ca7b:e453:391)
18:12:18 <mauke> "# " is the prompt
18:12:26 danse-nr3 joins (~danse@151.47.64.40)
18:12:29 <mauke> lines that don't start with "# " are system output
18:12:36 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:97d:c646:7189:b78d) (Remote host closed the connection)
18:12:38 <ski> thanks
18:13:09 × juri_ quits (~juri@faikvm.com) (Ping timeout: 252 seconds)
18:13:09 × kmein quits (~weechat@user/kmein) (Quit: ciao kakao)
18:13:28 kmein joins (~weechat@user/kmein)
18:14:33 × qqq quits (~qqq@92.43.167.61) (Quit: leaving)
18:16:03 <mauke> struct Void { Void *_1; }; template<typename T> T absurd(const Void *p) { return absurd<T>(p->_1); } const Void bottom = { &bottom };
18:16:29 <mauke> before we had empty 'data' declarations, I would define Void as: newtype Void = MkVoid Void
18:16:47 <mauke> the only inhabitant is fix MkVoid, which is bottom
18:17:41 mc47 joins (~mc47@xmonad/TheMC47)
18:18:09 <danse-nr3> fix MkVoid ... powerful spells going on ...
18:19:13 <mauke> MkVoid (MkVoid (MkVoid (MkVoid ...)))
18:19:29 <glguy> There, I fixed it.
18:19:46 <mauke> which works with normal data because there is more laziness at each level
18:20:07 <mauke> but newtype constructors don't exist at runtime, so it turns straight into an abyss
18:20:50 nate4 joins (~nate@c-98-45-158-125.hsd1.ca.comcast.net)
18:22:41 × chele quits (~chele@user/chele) (Remote host closed the connection)
18:23:58 <danse-nr3> i am just an apprentice but would the spell work the same with any similar newtype? The inner Void would not affect this, i guess
18:24:47 juri_ joins (~juri@faikvm.com)
18:25:47 × nate4 quits (~nate@c-98-45-158-125.hsd1.ca.comcast.net) (Ping timeout: 268 seconds)
18:26:23 <mauke> what do you mean?
18:26:28 × misterfish quits (~misterfis@84-53-85-146.bbserv.nl) (Ping timeout: 256 seconds)
18:26:36 <ski> you could use `newtype Void = MkVoid (forall a. a)' as well, i guess
18:26:52 <danse-nr3> does `fix Cons` yield bottom also with `data Cons = Cons ()`?
18:27:02 <ski> danse-nr3> :t Cons
18:27:14 <ski> hm, well, then `fix Cons' is a type error
18:27:16 <danse-nr3> Cons :: () -> Cons
18:27:34 <ski> @type fix
18:27:35 <lambdabot> (a -> a) -> a
18:28:02 <ski> given `data Stream a = Cons a (Stream a)', `fix (Cons 1)' works fine, though
18:28:17 <glguy> > take 10 (fix ( (:) () ))
18:28:19 <lambdabot> [(),(),(),(),(),(),(),(),(),()]
18:28:28 <ski> > fix show
18:28:30 <lambdabot> "\"\\\"\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\...
18:28:40 <ski> > fix error
18:28:41 <lambdabot> "*Exception: *Exception: *Exception: *Exception: *Exception: *Exception: *Ex...
18:28:53 <mauke> > fix (const 42)
18:28:54 <lambdabot> 42
18:29:55 <iqubic> fix is a weird thing!!!
18:30:27 <ski> hm, reminds me of modelling a predicate taking input `T' as being of type `T -> ListT m T', and then applying `mfix' to that
18:30:36 <iqubic> is fix a catamorphism?
18:30:40 <ski> no
18:30:45 Guest16 joins (~Guest16@136.169.59.60)
18:30:56 <iqubic> What is fix?
18:31:03 <iqubic> Also, what is mfix?
18:31:09 <iqubic> @src mfix
18:31:09 <lambdabot> Source not found. This mission is too important for me to allow you to jeopardize it.
18:31:12 <ski> @type mfix
18:31:13 <lambdabot> MonadFix m => (a -> m a) -> m a
18:31:14 <mauke> fix fn = let r = fn r in r
18:31:18 <ski> a method of `MonadFix'
18:31:24 <ski> fix f = x
18:31:25 <ski> where
18:31:29 <ski> x = f x
18:31:38 <ski> ^ my preferred way of defining it
18:31:43 <iqubic> Right. I get how that works.
18:32:05 <danse-nr3> you are lucky, that is not easy at all
18:32:10 <ski> > fix (\fact -> \case 0 -> 1; n -> n * fact (n-1)) 5
18:32:11 <lambdabot> 120
18:32:15 <iqubic> ski: I think you mean
18:32:21 <iqubic> where
18:32:23 <EvanR> also fix Wtf
18:32:31 <EvanR> oops scrolled up
18:32:36 <iqubic> x = fix f x
18:32:50 <mauke> iqubic: no
18:33:04 <mauke> that's a type error
18:33:08 <ski> > fix (\fibs0@ ~(_:fibs1) -> 0 : 1 : zipWith (+) fibs0 fibs1)
18:33:09 <lambdabot> [0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,...
18:33:41 <ski> iqubic : `fix' is "tying-the-knot"
18:33:48 <iqubic> I get that.
18:34:13 <ski> @wiki Tying_the_Knot
18:34:13 <lambdabot> https://wiki.haskell.org/Tying_the_Knot
18:35:05 <ski> `fix' is a "fixed point combinator"
18:35:23 <iqubic> Cool.
18:35:30 <ski> `fix f' finds an `x' which is a fixed point of `f', that is, such that `x = f x'
18:35:41 <mauke> that's misleading
18:36:03 <ski> (think of graphing a curve by `y = f(x)', and checking where it intersects with the diagonal line `y = x')
18:36:06 <glguy> 🕵️
18:36:22 <mauke> operationally, it doesn't "find" anything because it doesn't search. it just passes the lazy result thunk "back" (?) into the function
18:36:34 <ski> yea, `fix' finds the "least" such fixed point, wrt the "definedness order"
18:37:03 <mauke> for all strict functions, that fixed point is _|_
18:37:08 <ski> yes
18:37:12 <mauke> because f _|_ = _|_ is the definition of strictness
18:37:39 <mauke> so fix f is only interesting if f doesn't immediately examine its argument
18:38:13 <iqubic> powers n = n : map (* n) (powers n)
18:38:23 <iqubic> Can I rewrite that with fix?
18:38:27 <mauke> yes
18:38:34 <mauke> @pl powers n = n : map (* n) (powers n)
18:38:34 <lambdabot> powers = fix (ap (:) . liftM2 map (*))
18:38:47 <ski> in general, for `fix f', you can consider the increasing sequence `_|_',`f _|_',`f (f _|_)',`f (f (f _|_))',... for the case `f = (1 :)', this becomes the sequence `_|_',`1 : _|_',`1 : 1 : _|_'. `fix f' is the limit of this sequence, being the infinite list of ones `1 : 1 : 1 : 1 : ...' in this example
18:38:49 <glguy> that clears that up
18:39:09 <ski> (the limit being the supremum, the least upper bound)
18:39:19 <mauke> powers = fix (\rec n -> n : map (* n) (rec n))
18:39:20 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:97d:c646:7189:b78d)
18:39:41 <iqubic> ski: how would you rewrite my powers function to be more similar to your fib function?
18:39:48 <ski> (note that for `f = (1 :)', `f _|_ = 1 : _|_ =/= _|_', because this `f' is not strict)
18:40:13 <mauke> the fib example wasn't a function
18:40:14 <ski> > fix (\powers n -> n : map (* n) (powers n)) 2
18:40:15 <lambdabot> [2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536,131072,262...
18:40:45 <iqubic> I see. That's very clever
18:41:25 <ski> > (`fix` 2) $ \powers n -> n : map (* n) (powers n) -- alternative form of it
18:41:26 <lambdabot> [2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536,131072,262...
18:41:38 <ski> (some people prefer using `flip' for that)
18:41:38 <mauke> if you only need this for recursive functions, you can do something similar even in strict languages
18:41:41 <iqubic> Other weird think things you can do:
18:41:50 <iqubic> > 1 : zipWith (*) [1 ..] facs
18:41:51 <lambdabot> error: Variable not in scope: facs :: [a]
18:42:15 <ski> > let facts = 1 : zipWith (*) [1 ..] facts in facts
18:42:17 <lambdabot> [1,1,2,6,24,120,720,5040,40320,362880,3628800,39916800,479001600,6227020800,...
18:42:46 <iqubic> That is what I was trying to do, yes.
18:43:12 <mauke> is that a scanl or something?
18:43:28 <ski> @let infixr 5 /\/; (/\/) :: [a] -> [a] -> [a]; [ ] /\/ ys = ys; (x:xs) /\/ ys = x : ys /\/ xs
18:43:29 <lambdabot> Defined.
18:43:56 <iqubic> what does that do?
18:44:11 <ski> > "0123" /\/ "abcde"
18:44:13 <lambdabot> "0a1b2c3de"
18:44:15 L29Ah joins (~L29Ah@wikipedia/L29Ah)
18:44:17 <mauke> > scanl (*) 1 [1 ..]
18:44:19 <lambdabot> [1,1,2,6,24,120,720,5040,40320,362880,3628800,39916800,479001600,6227020800,...
18:44:32 <danse-nr3> :t (/\/) -- the bolt operator
18:44:33 <lambdabot> [a] -> [a] -> [a]
18:44:36 <mauke> intersperses elements alternately
18:44:50 <iqubic> That's clever, and I see how that works.
18:45:28 <iqubic> What was the point of defining that function?
18:45:38 × trev quits (~trev@user/trev) (Quit: trev)
18:46:02 <ski> > let abacaba = repeat 0 /\/ map (1 +) abacaba in abacaba
18:46:03 <lambdabot> [0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1...
18:46:21 <ski> > map (length . unfoldr (\n -> guard (even n) >> Just ((),n `div` 2))) [1 ..] -- compute how many times a number is divisible by two
18:46:22 <lambdabot> [0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1...
18:46:25 <int-e> one function to ruler them all
18:46:39 <iqubic> How the hell does that work?
18:46:48 <iqubic> How does abacaba work?
18:47:02 <mauke> abacadabra
18:47:10 <ski> > let abbcbccd = 0 : tail (abbcbccd /\/ map (1 +) abbcbccd) in abbcbccd
18:47:11 <lambdabot> [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,1,2,2,3,2,3...
18:47:22 <ski> > map popCount [0 ..]
18:47:24 <lambdabot> [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,1,2,2,3,2,3...
18:47:37 <ski> (count number of bits in binary representation of a number)
18:47:37 <iqubic> @src popCount
18:47:38 <lambdabot> Source not found.
18:47:43 <ski> @type popCount
18:47:44 <lambdabot> Bits a => a -> Int
18:47:50 <iqubic> How the hell do those work?
18:48:27 <ski> iqubic : numbers at even indices of `abacaba' are all `0's. those at odd indices is the same `abacaba' sequence again, except all incremented by one
18:48:37 <ski> (that's what `abacaba = repeat 0 /\/ map (1 +) abacaba' says, literally)
18:48:46 <int-e> iqubic: You have bits (2x) = bits x; bits (2x+1) = 1 + bits x and /\/ gives you precisely this split into evens and odds.
18:48:54 <mauke> ski: could use "map succ"
18:49:13 <danse-nr3> %t map succ
18:49:18 <ski> iqubic : numbers at even indices of `abbcbccd' is the same as the numbers in the whole `abbcbccd', while those at odd indices are the same as the whole `abbcbccd', except all incremented by one
18:49:21 <danse-nr3> % :t map succ
18:49:21 <yahb2> map succ :: Enum b => [b] -> [b]
18:49:21 <iqubic> How does abbcbccd work?
18:49:23 <ski> also, the first element is `0'
18:49:36 <ski> that's what `abbcbccd = 0 : tail (abbcbccd /\/ map (1 +) abbcbccd)' says
18:49:49 ski nods to mauke
18:50:04 <iqubic> I love this crazyness
18:50:24 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:97d:c646:7189:b78d) (Remote host closed the connection)
18:50:49 <ski> iqubic : exercise, figure out how to generate Pascal's triangle, in the form `[[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1],[1,5,10,10,5,1],...]', by defining this infinite list recursively in terms of itself
18:52:13 <iqubic> > let thueMorse = 0 : 1 /\/ thueMorse in thueMorse
18:52:14 <lambdabot> error:
18:52:14 <lambdabot> • No instance for (Num [Integer]) arising from a use of ‘e_101’
18:52:15 <lambdabot> • In the expression: e_101
18:52:25 <iqubic> What?!?
18:52:34 <mauke> 1 ain't a list
18:52:49 <iqubic> oh...
18:53:01 <ski> iqubic : exercise (harder), define `composites' (`[4,6,8,9,10,12,...]') and `primes' (`[2,3,5,7,11,13]') mutually recursively from each other. primes are integers greater than two that are not composite. composites are integers that are products of primes and integers greater than two
18:53:02 <iqubic> I was trying to be clever, and I can't...
18:53:06 × Achylles quits (~Achylles_@45.182.57.11) (Remote host closed the connection)
18:53:34 <ski> iqubic : have you seen the definition of `primes' in terms of `sieve' ?
18:53:59 <iqubic> I know what erotasthenes sieve is.
18:54:24 <iqubic> But I'm not sure what the sieve function is in hasell
18:54:36 <ski> (btw, for `abbcbccd', better than using `tail' would be to make sure that the discarded element is actually `0' .. you can do this, with a `promiseHead :: Eq a => a -> [a] -> [a]', to be defined)
18:55:38 <mauke> > ap zip tail ([0] ++ [1,2,3] ++ [0])
18:55:40 <lambdabot> [(0,1),(1,2),(2,3),(3,0)]
18:55:41 <iqubic> what is `sieve' in Haskell?
18:55:43 <ski> well, in this case it's not *actually* the sieve of Eratosthenes (since that comes with an specific intended complexity), but we can call this simplified/naïve version `sieve', for simplicity
18:55:56 <ski> primes = sieve [2 ..]
18:56:02 <danse-nr3> @hoogle sieve
18:56:02 <lambdabot> Data.Profunctor.Sieve sieve :: Sieve p f => p a b -> a -> f b
18:56:02 <lambdabot> Data.List.HT sieve :: Int -> [a] -> [a]
18:56:02 <lambdabot> Data.StorableVector sieve :: Storable a => Int -> Vector a -> Vector a
18:56:07 <ski> now define `sieve' to compute the correct result
18:56:20 <ski> none of the ones that lambdabot suggested
18:56:24 <mauke> > ap (zipWith (+)) tail ([0] ++ [1,2,1] ++ [0])
18:56:26 <lambdabot> [1,3,3,1]
18:56:37 <ski> @quote aztec
18:56:37 <lambdabot> quicksilver says: zip`ap`tail - the Aztec god of consecutive numbers
18:56:37 × dcoutts_ quits (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Ping timeout: 255 seconds)
18:57:02 <danse-nr3> % :t ap
18:57:02 <yahb2> ap :: Monad m => m (a -> b) -> m a -> m b
18:57:15 <mauke> > iterate (\xs -> ap (zipWith (+)) tail ([0] ++ xs ++ [0])) [1]
18:57:16 <lambdabot> [[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1],[1,5,10,10,5,1],[1,6,15,20,15,6,1],...
18:57:21 <ski> `ap' is `(<*>)', defined with the `Monad' operations
18:57:31 <ski> spoilsport
18:57:40 <mauke> doesn't use fix :-)
18:57:56 <ski> yea, i didn't suggest to use `fix'
18:58:01 <mauke> oh
18:58:25 <ski> but yea, i would accept either using `fix', or explicit recursion
18:58:28 <mauke> ok, then it's not recursive
18:59:32 dcoutts_ joins (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net)
19:00:06 <ski> iqubic : what we're doing here is writing computations that are "chasing their own tail"
19:00:29 × alp_ quits (~alp@2001:861:e3d6:8f80:d431:2a33:17df:c8f8) (Ping timeout: 240 seconds)
19:00:39 <ski> (`fibs',`abacaba',`abbcbccd',`pascalsTriangle',`primes',`composites')
19:00:59 <mauke> weirdly, it doesn't feel like that for me with 'iterate'
19:01:09 <ski> yea, that's not an instance
19:01:11 <int-e> > fix ((0 :) . scanl (+) 1) -- obligatory Fibonacci sequence
19:01:13 <lambdabot> [0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,...
19:01:22 × ubert quits (~Thunderbi@91.141.79.49.wireless.dyn.drei.com) (Remote host closed the connection)
19:01:25 <mauke> but iterate encapsulates this pattern
19:01:35 <mauke> or does it?
19:01:36 <ski> not really
19:01:41 ubert joins (~Thunderbi@91.141.79.49.wireless.dyn.drei.com)
19:02:03 <ncf> iterate f x = go where go = x : map f go
19:02:09 <ncf> i think it is an instance, in disguise
19:02:18 <ski> it just happens that when you have `foo = start : map bar foo', then that's `foo = iterate bar start'
19:02:51 <ncf> did you have something else in mind for pascal?
19:02:51 peterbecich joins (~Thunderbi@047-229-123-186.res.spectrum.com)
19:02:56 <ski> (it's interesting that you can both do what ncf said, and `iterate f x = x : iterate f (f x)')
19:03:46 <ski> ncf : "exercise, figure out how to generate Pascal's triangle, ..., by defining this infinite list recursively in terms of itself"
19:04:21 <ncf> well, inlining iterate in mauke's answer satisfies that, so i'm guessing you had something different in mind
19:04:25 × mobivme quits (~mobivme@112.201.111.217) (Read error: Connection reset by peer)
19:04:51 <ski> yes, inlining it would satisfy what i had in mind. not inlining it wouldn't
19:04:59 <iqubic> sieve [] _ = []; sieve (x:xs) ps = sieve xs (filter (\n -> (not (n `div` x == 0)))
19:05:05 <mauke> literate f x = x : literate (f . f) (f x)
19:05:21 <iqubic> primes = sieve [2...] [2...
19:05:37 <ski> why are there two list parameters ?
19:05:48 <ski> what is `filter' being applied to ?
19:06:01 <iqubic> I'm not sure.
19:06:04 × danse-nr3 quits (~danse@151.47.64.40) (Ping timeout: 255 seconds)
19:06:10 <iqubic> This is hard for me to think about.
19:06:19 <ski> also, i think you want `mod', not `div'
19:06:43 <ski> (and you can use `/=' in place of calling `not')
19:06:45 <mauke> not (_ == _) is _ /= _
19:07:14 <ski> perhaps you meant for the base case to return the second parameter, rather than the empty list
19:08:04 <mauke> once you run out of things to filter out, whatever remains, no matter how improbable, must be the answer
19:08:15 <int-e> > nubBy (((1 <) .) . gcd) [2..]
19:08:17 <lambdabot> [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,...
19:08:30 ski runs out of primes
19:08:46 <mauke> oh no
19:09:15 <ski> (well, i guess composites, really. but same result)
19:09:18 <ncf> @src nubBy
19:09:18 <lambdabot> nubBy eq [] = []
19:09:18 <lambdabot> nubBy eq (x:xs) = x : nubBy eq (filter (\ y -> not (eq x y)) xs)
19:09:22 <int-e> Yes, evil, because that's not an equivalence relation.
19:09:57 × haskellbridge quits (~haskellbr@069-135-003-034.biz.spectrum.com) (Remote host closed the connection)
19:10:05 <ski> uh-oh
19:10:09 <mauke> @unpl (((1 <) .) . gcd)
19:10:09 <lambdabot> (\ x x0 -> 1 < gcd x x0)
19:10:20 <iqubic> @let sieve (p:ps) = p : sieve (filter (not . (== 0) . (`mod` p)) ps
19:10:20 <lambdabot> Parse failed: Parse error: EOF
19:10:24 haskellbridge joins (~haskellbr@069-135-003-034.biz.spectrum.com)
19:10:24 ChanServ sets mode +v haskellbridge
19:10:36 <mauke> )
19:10:37 <iqubic> @let sieve (p:ps) = p : sieve (filter (not . (== 0) . (`mod` p))) ps
19:10:38 <lambdabot> /sandbox/tmp/.L.hs:163:1: error:
19:10:38 <lambdabot> • Couldn't match type ‘[a]’ with ‘[a] -> [a]’
19:10:38 <lambdabot> Expected type: ([a] -> [a]) -> [a] -> [a]
19:10:56 <ski> iqubic : move the closing bracket
19:11:11 <int-e> `not . (== 0)` *sad*
19:11:22 <iqubic> @let sieve (p:ps) = p : sieve (filter ((/= 0) . (`mod` p)) ps)
19:11:23 <lambdabot> Defined.
19:11:34 <mauke> > sieve [2..]
19:11:35 ski suggests `not . not . (0 /=)' instead
19:11:36 <lambdabot> [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,...
19:11:44 <iqubic> there we go.
19:11:51 <ski> iqubic : great ! :D
19:12:30 <ski> (this is not "chasing-your-own-tail", but it's still nice to think about)
19:13:08 <iqubic> I'm not sure how to do this in "chasing-your-own-tail" method
19:13:10 <mauke> :t (2 :) . sieve
19:13:11 <lambdabot> Integral a => [a] -> [a]
19:14:36 <iqubic> ski: how should I write the sieve function?
19:15:21 ski . o O ( "The Genuine Sieve of Eratosthenes" by Melissa E. O'Neill in 2009-01 at <https://www.cs.hmc.edu/~oneill/papers/index.html#sieve-of-eratosthenes>,<https://www.cs.hmc.edu/~oneill/papers/Sieve-JFP.pdf> )
19:15:34 <ski> iqubic : check out that ^ for the actual Sieve of Erathosthenes
19:15:55 <ski> iqubic : well, you already did the (naïve) `sieve' that i had in mind
19:16:05 <ski> (i didn't have a "chasing-your-own-tail" version in mind)
19:16:17 <iqubic> Oh. I see.
19:16:25 <ski> iqubic : but if you want, you can try the `primes' and `composites' exercise (which is a "chasing-your-own-tail" problem)
19:16:36 <ski> or the `pascalsTriangle' one (which also is)
19:16:48 <iqubic> No... Those sound hard!!!
19:16:58 <ski> `pascalsTriangle' is not hard, really
19:17:52 <ski> the `primes' & `composites' is a bit more tricky (you have to use the same technique as i had to use in `abbcbccd' above), and you'll need to define a couple of helper functions for dealing with increasing / non-decreasing sequences
19:18:14 <ski> .. but it's quite satisfying to get it to work :)
19:20:21 × shOkEy quits (~shOkEy@fibhost-66-106-250.fibernet.hu) (Ping timeout: 245 seconds)
19:20:30 <ski> iqubic : other, kinda related, examples, would be to define arrays recursively. e.g. for memoizing some recursive sequence (like `fibs'), or for doing a dynamic programming problem (like matching a "pattern" string into a text, finding approximate matches, where you can add or remove characters in the pattern to make it match the text, but you'll get a score penalty, so you want to find the solution(s) with
19:20:36 <ski> the minimum score penalty)
19:20:43 × peterbecich quits (~Thunderbi@047-229-123-186.res.spectrum.com) (Ping timeout: 276 seconds)
19:21:31 <ski> (well, you can also accept that a character in the pattern doesn't match the corresponding one at the corresponding position of the text, but that also gets you a penalty of one)
19:22:06 shOkEy joins (~shOkEy@178-164-188-90.pool.digikabel.hu)
19:22:18 <mauke> .oO( loeb? )
19:22:45 <ski> hm, haven't tried it with that .. could work, i suppose
19:22:58 <ski> (although a local contextual version would be preferable, i think)
19:28:13 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:97d:c646:7189:b78d)
19:28:49 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:97d:c646:7189:b78d) (Remote host closed the connection)
19:29:04 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:97d:c646:7189:b78d)
19:31:56 waleee joins (~waleee@h-176-10-144-38.NA.cust.bahnhof.se)
19:34:33 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
19:35:16 × Me-me quits (~me-me@2602:ff16:3:0:1:dc:beef:d00d) (Changing host)
19:35:16 Me-me joins (~me-me@user/me-me)
19:45:38 × rito quits (~ritog@45.112.243.193) (Ping timeout: 268 seconds)
19:51:01 × akegalj quits (~akegalj@93-142-153-242.adsl.net.t-com.hr) (Quit: leaving)
19:51:10 rito joins (~ritog@45.112.243.193)
19:54:14 jmdaemon joins (~jmdaemon@user/jmdaemon)
20:04:47 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
20:05:01 × dhil quits (~dhil@2001:8e0:2014:3100:9c6c:ea41:44c3:22b6) (Ping timeout: 256 seconds)
20:06:48 × Guest16 quits (~Guest16@136.169.59.60) (Quit: Client closed)
20:07:59 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
20:08:03 × coot quits (~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot)
20:16:14 <iqubic> loeb is weird. I only somewhat understand it.
20:23:21 danza joins (~francesco@151.47.64.40)
20:24:11 × forell quits (~forell@user/forell) (Quit: ZNC - https://znc.in)
20:24:28 forell joins (~forell@user/forell)
20:27:40 × dcoutts_ quits (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Ping timeout: 276 seconds)
20:29:01 mobivme joins (~mobivme@112.201.111.217)
20:30:03 <iqubic> Why is pascal so hard to do?
20:31:25 <iqubic> > let line = [1] in zipWith (+) line (tail line)
20:31:27 <lambdabot> []
20:31:53 <iqubic> > let line = [1,1] in zipWith (+) line (tail line)
20:31:54 <lambdabot> [2]
20:32:54 × jrm quits (~jrm@user/jrm) (Quit: ciao)
20:33:29 <iqubic> @define nextLine line = 1 : zipWith (+) line (tail line) : [1]
20:33:30 <lambdabot> Defined.
20:34:17 <iqubic> @define pascal = [1] : map nextLine pascal
20:34:18 <lambdabot> /sandbox/tmp/.L.hs:161:10: error:
20:34:18 <lambdabot> • Occurs check: cannot construct the infinite type: a ~ [a]
20:34:18 <lambdabot> Expected type: [[a]]
20:34:19 jrm joins (~jrm@user/jrm)
20:34:32 <iqubic> :t nextLine
20:34:33 <lambdabot> (Num a, Num [a]) => [a] -> [[a]]
20:35:06 <iqubic> @define nextLine line = 1 : zipWith (+) line (tail line) ++ [1]
20:35:06 <lambdabot> /sandbox/tmp/.L.hs:164:17: error:
20:35:06 <lambdabot> • Occurs check: cannot construct the infinite type: a ~ [a]
20:35:07 <lambdabot> Expected type: [[a]]
20:35:29 <iqubic> @define nextLine line = (1 : zipWith (+) line (tail line)) ++ [1]
20:35:30 <lambdabot> /sandbox/tmp/.L.hs:164:17: error:
20:35:30 <lambdabot> • Occurs check: cannot construct the infinite type: a ~ [a]
20:35:30 <lambdabot> Expected type: [[a]]
20:35:35 <iqubic> Huh?!?!
20:37:26 <int-e> presumably that line gets added to the existing definition, so now you have two equations for `nextLine`
20:37:28 ania123 joins (~ania123@94-43-231-47.dsl.utg.ge)
20:38:05 <int-e> And (Num a, Num [a]) => [a] -> [[a]] does not unify with (Num a) => [a] -> [a].
20:38:29 <ski> `zipWith f xs (tail xs)' will have one fewer elements than `xs' (unless `xs' is empty)
20:39:06 <int-e> @let nextLine line = 1 : zipWith (+) line (tail line) ++ [1] in iterate nextLine [1]
20:39:06 <lambdabot> Parse failed: Parse error: in
20:39:13 int-e is stupid
20:39:16 <int-e> > let nextLine line = 1 : zipWith (+) line (tail line) ++ [1] in iterate nextLine [1]
20:39:17 <lambdabot> [[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1],[1,5,10,10,5,1],[1,6,15,20,15,6,1],...
20:39:38 × danza quits (~francesco@151.47.64.40) (Ping timeout: 256 seconds)
20:40:30 <iqubic> That's what I was trying to do.
20:40:32 <int-e> > map (take 5) $ iterate (scanl1 (+)) (repeat 1) -- related
20:40:33 <lambdabot> [[1,1,1,1,1],[1,2,3,4,5],[1,3,6,10,15],[1,4,10,20,35],[1,5,15,35,70],[1,6,21...
20:40:50 <iqubic> @let nextRow row = 1 : (zipWith (+) row (tail row) ++ [1])
20:40:51 <lambdabot> Defined.
20:41:05 <iqubic> @let pascal = [1] : map nextRow pascal
20:41:07 <lambdabot> Defined.
20:41:12 <iqubic> > pascal
20:41:13 <lambdabot> [[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1],[1,5,10,10,5,1],[1,6,15,20,15,6,1],...
20:41:18 <ski> yay !
20:41:28 <iqubic> I did the thing.
20:41:54 <ski> mauke's version also works
20:42:03 <iqubic> I even recreated iterate in a chase your own tail manner
20:42:05 <ski> (adding zeroes, rather than ones, at the edges)
20:42:21 <ski> how did you define it ?
20:42:21 <int-e> > let diags ((x:xs):xss) = [x] : zipWith (:) xs (diags xss) in diags $ iterate (scanl1 (+)) (repeat 1)
20:42:22 <lambdabot> [[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1],[1,5,10,10,5,1],[1,6,15,20,15,6,1],...
20:42:40 × ania123 quits (~ania123@94-43-231-47.dsl.utg.ge) (Quit: Client closed)
20:42:55 <monochrom> Oh hey I can put Pascal triangle on my exam next time!
20:43:04 <iqubic> @let iter f x = let out = x : map f out in out
20:43:05 <lambdabot> Defined.
20:43:11 ania123 joins (~ania123@94-43-231-47.dsl.utg.ge)
20:43:16 <ski> right
20:43:18 <iqubic> iter (+1) 1
20:43:29 <iqubic> > iter (+1) 1
20:43:30 <lambdabot> [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,...
20:44:18 <iqubic> @src fix
20:44:19 <lambdabot> fix f = let x = f x in x
20:45:14 <iqubic> @let iter f x = fix ( (x:) . map )
20:45:14 <lambdabot> /sandbox/tmp/.L.hs:165:17: error:
20:45:14 <lambdabot> • Couldn't match type ‘[a]’ with ‘a0 -> b0’
20:45:15 <lambdabot> Expected type: [a] -> [a]
20:45:35 <iqubic> @let iter f x = fix ( (x:) . map f )
20:45:36 <lambdabot> /sandbox/tmp/.L.hs:165:1: error: [-Woverlapping-patterns, -Werror=overlappin...
20:45:36 <lambdabot> Pattern match is redundant
20:45:36 <lambdabot> In an equation for ‘iter’: iter f x = ...
20:45:50 <geekosaur> it's combining equations again
20:46:08 <mauke> you can clear out previous definitions with @undefine
20:46:29 <int-e> @undef
20:46:29 <lambdabot> Undefined.
20:46:44 <iqubic> @pl \out -> 2 : map (+1) out
20:46:44 <lambdabot> (2 :) . map (1 +)
20:46:58 <iqubic> @let iter f x = fix ( (x:) . map)
20:46:59 <lambdabot> /sandbox/tmp/.L.hs:157:17: error:
20:46:59 <lambdabot> • Couldn't match type ‘[a]’ with ‘a0 -> b0’
20:46:59 <lambdabot> Expected type: [a] -> [a]
20:47:17 <iqubic> @undef
20:47:17 <lambdabot> Undefined.
20:47:22 <int-e> iqubic: I'd really recommend the > let foo = ... in ... foo ... style, it doesn't suffer from this accumulation of potentially conflicting definitions.
20:47:29 <geekosaur> but that wasn'
20:47:40 <iqubic> @let iter f x = fix ( (x:) . map f)
20:47:41 <lambdabot> Defined.
20:47:42 <geekosaur> t the problem there, I think the fact that map takes two parameters was
20:48:07 <iqubic> > iter (+1) 1
20:48:08 <lambdabot> [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,...
20:48:26 <iqubic> Ski: what do you think of that definition?
20:50:17 <ski> yea, that works
20:50:39 <ski> (somewhat terse)
20:51:06 <iqubic> I know.
20:51:39 <iqubic> Can I see what you have in mind for primes and composites?
21:00:55 <iqubic> ski: what do you want me to do for primes and composites?
21:08:59 × _ht quits (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Remote host closed the connection)
21:11:38 × xigua quits (~xigua@user/xigua) (Remote host closed the connection)
21:11:45 <ski> <ski> iqubic : exercise (harder), define `composites' (`[4,6,8,9,10,12,...]') and `primes' (`[2,3,5,7,11,13]') mutually recursively from each other. primes are integers greater than two that are not composite. composites are integers that are products of primes and integers greater than two
21:12:12 xigua joins (~xigua@user/xigua)
21:12:27 <iqubic> I see. That does sound tricky!
21:12:41 <ski> it's a little bit trickier
21:13:06 <ski> <ski> the `primes' & `composites' is a bit more tricky (you have to use the same technique as i had to use in `abbcbccd' above), and you'll need to define a couple of helper functions for dealing with increasing / non-decreasing sequences
21:14:08 <ski> (btw, i gave (informal) definitions of `primes' and `composites' above, in words)
21:16:53 <iqubic> what was the technique you did in your `abbcbccd'?
21:17:17 <ski> > let abacaba = repeat 0 /\/ map (1 +) abacaba in abacaba
21:17:18 <lambdabot> error:
21:17:18 <lambdabot> • Variable not in scope: (/\/) :: [a0] -> [b1] -> [b1]
21:17:18 <lambdabot> • Perhaps you meant ‘//’ (imported from Data.Array)
21:17:23 <ski> > map (length . unfoldr (\n -> guard (even n) >> Just ((),n `div` 2))) [1 ..] -- compute how many times a number is divisible by two
21:17:24 <lambdabot> [0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1...
21:17:29 <ski> > let abbcbccd = 0 : tail (abbcbccd /\/ map (1 +) abbcbccd) in abbcbccd
21:17:31 <lambdabot> error:
21:17:31 <lambdabot> • Variable not in scope: (/\/) :: [b1] -> [b1] -> [b1]
21:17:31 <lambdabot> • Perhaps you meant ‘//’ (imported from Data.Array)
21:17:43 <ski> > map popCount [0 ..] -- count number of bits in binary representation of a number
21:17:44 <lambdabot> [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,1,2,2,3,2,3...
21:17:53 <ski> <ski> iqubic : numbers at even indices of `abacaba' are all `0's. those at odd indices is the same `abacaba' sequence again, except all incremented by one
21:18:07 <iqubic> We undefined the /\/. Sorry.
21:18:07 <ski> <ski> (that's what `abacaba = repeat 0 /\/ map (1 +) abacaba' says, literally)
21:18:29 <ski> ski> iqubic : numbers at even indices of `abbcbccd' is the same as the numbers in the whole `abbcbccd', while those at odd indices are the same as the whole `abbcbccd', except all incremented by one <ski> also, the first element is `0'
21:18:36 <ski> <ski> that's what `abbcbccd = 0 : tail (abbcbccd /\/ map (1 +) abbcbccd)' says
21:18:47 <iqubic> That makes sense!
21:18:54 <ski> <ski> (btw, for `abbcbccd', better than using `tail' would be to make sure that the discarded element is actually `0' .. you can do this, with a `promiseHead :: Eq a => a -> [a] -> [a]', to be defined)
21:19:07 <ski> oh, forgot
21:19:09 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:97d:c646:7189:b78d) (Remote host closed the connection)
21:19:24 <iqubic> What does promiseHead do?
21:19:28 <ski> @let infixr 5 /\/; (/\/) :: [a] -> [a] -> [a]; [ ] /\/ ys = ys; (x:xs) /\/ ys = x : ys /\/ xs
21:19:28 <lambdabot> Defined.
21:19:31 <ski> sorry
21:20:21 <ski> `promiseHead x (x:xs)' is equal to `x:xs'. `promiseHead x0 (x1:xs)', when `x0' is not equal to `x1', is an error
21:20:58 <iqubic> Oh. I see...
21:21:12 <ski> more specifically, `promiseHead x0 (x1:xs)' is `x0:ys', where `ys = xs' if `xs == ys = True', and `ys = _|_' otherwise
21:21:43 <ski> it's just to make the "chasing it own tail" not actually catch up to itself, by providing one element in advance
21:21:45 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:97d:c646:7189:b78d)
21:22:36 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:97d:c646:7189:b78d) (Remote host closed the connection)
21:23:05 <iqubic> Right... I see.
21:23:38 <ski> well, i should say `promiseHead x0 xs1' is `x0:ys', where `ys = xs' if `x1:xs = xs1' and `x0 == y1 = True', and `ys = _|_' otherwise
21:23:54 <ski> (sorry, goofed up the `... = True' part before)
21:24:12 <iqubic> Right. That makes sense.
21:24:23 <ski> (it's important to be able to see that there is at least one element (the head), and that this element is `x0', *before* being able to determine whether `xs0' has at least one element, and (optionally, for consistency checking, checking that this first element is equal to `x0')
21:25:04 <ski> imagine if you could say
21:25:46 <ski> abbcbccd = 0 : _|_
21:25:49 <ski> abbcbccd = abbcbccd /\/ map (1 +) abbcbccd
21:25:54 <ski> or at least
21:26:00 <ski> abbcbccd = 0 : _|_
21:26:05 pavonia joins (~user@user/siracusa)
21:26:16 <ski> `lub` abbcbccd /\/ map (1 +) abbcbccd
21:26:47 <iqubic> what's lub?
21:27:08 zetef joins (~quassel@95.77.17.251)
21:27:13 [_] joins (~itchyjunk@user/itchyjunk/x-7353470)
21:27:18 szkl joins (uid110435@id-110435.uxbridge.irccloud.com)
21:27:20 <ski> this is basically what `promiseHead' effects, here. saying that `abbcbccd' satisfies the recursive equation, but *also* saying that its first element is `0' (since the recursive definition doesn't pin down this. as soon as you ping down the first element, the remaining ones are pinned down by the recursion)
21:27:49 <iqubic> That's a cool way to think about that.
21:28:17 <ski> @hackage unamb
21:28:17 <lambdabot> https://hackage.haskell.org/package/unamb
21:28:20 <ski> @hackage lub
21:28:20 <lambdabot> https://hackage.haskell.org/package/lub
21:29:39 <iqubic> Ah!
21:29:45 <ski> @hackage lvish
21:29:45 <lambdabot> https://hackage.haskell.org/package/lvish
21:29:50 <ski> is also kinda related
21:31:00 <ski> (although much more involved, talking about concurrency. the similar part is talking about monotonically increasing information)
21:31:04 coot joins (~coot@89-69-206-216.dynamic.chello.pl)
21:31:05 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 268 seconds)
21:31:25 <ski> @hackage ivar-simple
21:31:25 <lambdabot> https://hackage.haskell.org/package/ivar-simple
21:31:26 <ski> and
21:31:30 <ski> @hackage data-ivar
21:31:30 <lambdabot> https://hackage.haskell.org/package/data-ivar
21:31:38 <ski> are also interesting
21:31:58 <ski> (though not really about monotonic increase)
21:32:18 <iqubic> These are cool things. But I need to get food now.
21:32:36 <iqubic> Bye for now.
21:32:37 <ski> anyway, you can imagine a filtering process, to remove a list of all composites, from a list of integers greater than one
21:32:40 ncf . o O ( parallel "or" )
21:32:41 <ski> that leaves primes
21:32:46 ski nods
21:32:48 zetef_ joins (~quassel@5.2.182.98)
21:32:59 × zetef quits (~quassel@95.77.17.251) (Ping timeout: 256 seconds)
21:33:45 <ski> and then having composites being products of primes and integers greater than two, imagine flattening an infinite multiplication table into a single list (removing duplicates as well)
21:34:04 × mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
21:34:31 <ski> however, if you combine these two definitions, as mutually recursive, there's no way to "start off the bat(on)", you need to seed some initial value (and possibly check it for consistency after the fact)
21:34:56 <ski> if you know the first composite was four, then you'd know immediately that the first two primes were two and three. that could work
21:35:20 <ski> or, if you know the first prime was two, then you'd immediately know that the first composite was four. which could also work
21:37:04 <shapr> @quote ski
21:37:04 <lambdabot> ski says: death or glory !
21:37:53 <ski> hmm .. i wonder what the context of that was
21:38:04 <Rembane> Recursive functions!
21:38:56 ski boings shapr's chair
21:39:25 shapr hops
21:39:28 shapr boings
21:40:09 <Rembane> #haskell goes pro wrestling
21:41:35 <ski> more like unicycling
21:42:23 <Rembane> That sounds way more wholesome
21:42:25 peterbecich joins (~Thunderbi@047-229-123-186.res.spectrum.com)
21:42:34 ski still recalls trying out shapr's unicycle, briefly
21:42:57 <shapr> it's been a few years, I have an upgraded unicycle
21:43:11 jle` joins (~jle`@2603-8001-3b02-84d4-cc77-9348-89d2-92f3.res6.spectrum.com)
21:43:22 <Rembane> ski: Did you survive or did someone have to resurrect you?
21:44:03 <ski> yea, it has. and i guess it's expected to be replaced or reconfigured, after all these years
21:44:24 <ski> i did, Rembane. it was indoors, and not that long a distance
21:44:31 <Rembane> ski: Very good!
21:44:46 <ski> i remember John Hughes also tried it
21:45:22 <Rembane> And he also didn't die, because I've met him after that! I think.
21:45:42 <ski> maybe it was his ghola
21:46:30 <ski> @quote tried.to.teach
21:46:30 <lambdabot> shapr says: I've tried to teach people autodidactism, but I've realized they have to learn it for themselves.
21:46:47 <Rembane> :D
21:47:55 <ski> @quote refreshing.desert
21:47:55 <lambdabot> chromatic says: My productivity increased when Autrijus told me about Haskell's trace function. He called it a refreshing desert in the oasis of referential transparency.
21:49:13 <ski> @palomer
21:49:13 <lambdabot> Brump!
21:49:18 <ski> @keal
21:49:18 <lambdabot> the fractal is 5 irrationals
21:49:19 <shapr> :-D
21:49:35 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 268 seconds)
21:49:49 <ski> @yhjulwwiefzojcbxybbruweejw
21:49:49 <lambdabot> "\"\\\"\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\"
21:50:00 <ski> @v
21:50:01 <lambdabot> "\"\\\"\\\\\\\"\\\\\\"
21:50:28 <ski> @ghc
21:50:28 <lambdabot> Malformed context in instance header
21:50:41 <ski> @arr
21:50:41 <lambdabot> Smartly me lass
21:50:48 <ski> @pinky
21:50:48 <lambdabot> I think so, Brain! But do I have what it take to be the 'Lord of the Dance'?
21:50:53 <ski> @brain
21:50:53 <lambdabot> Promise me something, Pinky. Never breed.
21:51:15 <ski> (there's a whole bunch of these things, in lambdabot)
21:52:02 <Rembane> A whole chicken coop worth of easter eggs!
21:53:42 × bontaq quits (~user@ool-45707d2c.dyn.optonline.net) (Ping timeout: 252 seconds)
21:53:44 <ski> @yhjulwwiefzojcbxybbruweejw
21:53:45 <lambdabot> "\"\\\"\\\\\\\"\\\\\\"
21:54:07 <ski> @help yhjulwwiefzojcbxybbruweejw
21:54:07 <lambdabot> V RETURNS!
21:54:14 <johnw> is that a Yubikey-generated command name?
21:54:36 <ski> i'd suspect, more likely, someone mashed their keyboard
21:54:49 <ski> maybe head-keyboarded
21:55:03 bontaq joins (~user@ool-45707d2c.dyn.optonline.net)
21:55:34 × ania123 quits (~ania123@94-43-231-47.dsl.utg.ge) (Quit: Client closed)
21:56:08 ski idly wonders where fog/fen 's gone
21:56:21 × bontaq quits (~user@ool-45707d2c.dyn.optonline.net) (Read error: Connection reset by peer)
21:57:28 <int-e> Oh what was the story here... did lambdabot interpret expressions by doing let v = show (expression) in v ? So `> v` would print "\"\\\"\\\\\\\"\\\\\\" etc?
21:57:47 seydar joins (~seydar@ip-185-104-139-34.ptr.icomera.net)
21:57:55 <ski> (fwiw, "palomer" and "keal" were actual people, who've chatted on #haskell in the past. what lambdabot says, when invoking their commands, is things they've actually said)
21:58:05 <ski> int-e : i believe it was something like that, yes
21:58:21 × peterbecich quits (~Thunderbi@047-229-123-186.res.spectrum.com) (Ping timeout: 256 seconds)
21:58:35 <ski> and then people discovered that, and (ab)used it. so someone renamed `v' to something more obscure
21:59:09 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:97d:c646:7189:b78d)
21:59:11 <ski> @yhjulwwiefzojcbxybbruweejw
21:59:11 <lambdabot> "\"\\\"\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\"
21:59:27 <ski> hm, it replied Just 'J' for me, in PM
22:00:22 × rito quits (~ritog@45.112.243.193) (Quit: Leaving)
22:01:03 jinsun is now known as Guest4845
22:01:03 jinsun_ joins (~jinsun@user/jinsun)
22:01:03 × Guest4845 quits (~jinsun@user/jinsun) (Killed (platinum.libera.chat (Nickname regained by services)))
22:01:03 jinsun_ is now known as jinsun
22:01:10 <ski> int-e : that was actually also pretty neat, since you could do `> ... where ....', giving the main expression you wanted to showcase first, and then the supporting definitions after that
22:03:07 × fendor quits (~fendor@2a02:8388:1605:d100:267b:1353:13d7:4f0c) (Remote host closed the connection)
22:04:02 mechap joins (~mechap@user/mechap)
22:04:23 <ski> @quote augustss
22:04:24 <lambdabot> augustss says: And just a bit of trivia: Mikael Rittri named the Either type.
22:04:42 <ski> hm, i wonder who that is
22:05:14 × hc quits (~hc@mail.hce.li) (Remote host closed the connection)
22:05:37 <Rembane> There exist at least three people with that name
22:08:18 × seydar quits (~seydar@ip-185-104-139-34.ptr.icomera.net) (Quit: leaving)
22:09:06 <monochrom> I wish it were exactly two people so that we could continue to wonder "was that the left Rittri or the right Rittri?" >:)
22:09:26 <Rembane> I guess it's Either. :)
22:10:09 <ski> These Rittri Rittri
22:21:46 nate4 joins (~nate@c-98-45-158-125.hsd1.ca.comcast.net)
22:22:16 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
22:26:46 × nate4 quits (~nate@c-98-45-158-125.hsd1.ca.comcast.net) (Ping timeout: 255 seconds)
22:27:06 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
22:30:07 dcoutts_ joins (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net)
22:31:13 stiell joins (~stiell@gateway/tor-sasl/stiell)
22:34:09 pyooque joins (~puke@user/puke)
22:34:09 puke is now known as Guest9963
22:34:09 pyooque is now known as puke
22:35:19 × zetef_ quits (~quassel@5.2.182.98) (Ping timeout: 246 seconds)
22:36:46 × Guest9963 quits (~puke@user/puke) (Ping timeout: 260 seconds)
22:40:49 aztex joins (~aztex@178.197.239.53)
22:42:09 darchitect joins (~darchitec@2a00:23c6:3584:df01:49b7:b837:bf00:38a1)
22:44:43 <darchitect> hey guys, has anyone done any research about what language models can tell us about type theory and it's potential applications in the future. I have always imagine humans writing a spec (in terms of a type) and then the model implementing the function (optimizing for readability/performance/etc..) and if it type checks we only have tests for the outputs. I have to admit I am pretty much a noob
22:44:44 <darchitect> when it comes to functional programming and type theory, but any discussion will be useful ..
22:45:05 × cyphase quits (~cyphase@user/cyphase) (Ping timeout: 268 seconds)
22:46:17 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
22:47:41 × aztex quits (~aztex@178.197.239.53) (Quit: Client closed)
22:49:40 <ski> "writing a spec (in terms of a type)" -- sounds like dependent types, then
22:51:53 <Rembane> darchitect: Some related work if you squint a bit are the type generated APIs of Servant.
22:52:05 <Rembane> darchitect: https://www.servant.dev/
22:54:03 cyphase joins (~cyphase@user/cyphase)
23:01:35 × coot quits (~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot)
23:05:21 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
23:17:23 × kmein quits (~weechat@user/kmein) (Ping timeout: 264 seconds)
23:27:22 × acidjnk_new quits (~acidjnk@p200300d6e72b9307019ea696578e67a2.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
23:29:55 × tremon quits (~tremon@83.80.159.219) (Quit: getting boxed in)
23:41:19 × talismanick quits (~user@2601:204:ef00:bb0::f34e) (Remote host closed the connection)
23:42:22 talismanick joins (~user@2601:204:ef00:bb0::f34e)
23:48:29 Sgeo joins (~Sgeo@user/sgeo)
23:49:41 × szkl quits (uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
23:52:46 <darchitect> Rembane: thanks ! I will have a look

All times are in UTC on 2023-12-05.