2023/12/05

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