2024/09/03

2024-09-03 00:04:26 +0000machinedgod(~machinedg@d50-99-47-73.abhsia.telus.net)
2024-09-03 00:08:07 +0000EvanR(~EvanR@user/evanr)
2024-09-03 00:09:59 +0000xff0x(~xff0x@2405:6580:b080:900:9984:ac36:164d:127b) (Ping timeout: 260 seconds)
2024-09-03 00:13:06 +0000tomboy64(~tomboy64@user/tomboy64) (Ping timeout: 276 seconds)
2024-09-03 00:20:41 +0000peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com)
2024-09-03 00:25:03 +0000sawilagar(~sawilagar@user/sawilagar) (Ping timeout: 246 seconds)
2024-09-03 00:26:50 +0000d34df00d(~d34df00d@2600:1702:4f1b:7c10::43)
2024-09-03 00:27:24 +0000 <d34df00d> Hi!
2024-09-03 00:27:36 +0000 <d34df00d> What's the easiest way to see what base version corresponds to which ghc release?
2024-09-03 00:28:41 +0000 <mauke> @where base
2024-09-03 00:28:41 +0000 <lambdabot> http://darcs.haskell.org/packages/base/
2024-09-03 00:28:53 +0000 <mauke> @where+ base https://hackage.haskell.org/package/base
2024-09-03 00:28:53 +0000 <lambdabot> Done.
2024-09-03 00:29:42 +0000 <mauke> https://hackage.haskell.org/package/base-4.20.0.1/changelog search for "with GHC"
2024-09-03 00:29:51 +0000 <geekosaur> ghcup shows which base comes with each ghc version
2024-09-03 00:29:58 +0000 <d34df00d> Oh dang, changelong is something i haven't checked!
2024-09-03 00:30:04 +0000 <d34df00d> Thanks, that works.
2024-09-03 00:30:17 +0000 <geekosaur> there's also a table on the ghc wiki showing what bootlibs show with all ghc releases back to (iirc) 7.0
2024-09-03 00:30:27 +0000 <geekosaur> *go with
2024-09-03 00:30:56 +0000emmanuelux(~emmanuelu@user/emmanuelux) (Quit: au revoir)
2024-09-03 00:32:06 +0000 <d34df00d> ghcup is even nicer, especially since I have it installed on one of my machines I guess.
2024-09-03 00:32:10 +0000 <d34df00d> Thanks folks!
2024-09-03 00:59:34 +0000vglfr(~vglfr@2601:14d:4e01:1370:472:1f80:8d8f:3004) (Ping timeout: 260 seconds)
2024-09-03 01:00:45 +0000vglfr(~vglfr@c-73-163-164-68.hsd1.md.comcast.net)
2024-09-03 01:07:06 +0000Sgeo(~Sgeo@user/sgeo) (Quit: Leaving)
2024-09-03 01:11:13 +0000athan(~athan@syn-098-153-145-140.biz.spectrum.com) (Quit: Konversation terminated!)
2024-09-03 01:18:17 +0000Sgeo(~Sgeo@user/sgeo)
2024-09-03 01:37:53 +0000nyc(~nyc@user/nyc)
2024-09-03 02:11:15 +0000dostoyevsky2(~sck@user/dostoyevsky2) (Quit: leaving)
2024-09-03 02:11:33 +0000dostoyevsky2(~sck@user/dostoyevsky2)
2024-09-03 02:19:29 +0000slack1256(~slack1256@2803:c600:5111:8029:8afc:ef98:52db:3f44)
2024-09-03 02:22:46 +0000finsternis(~X@23.226.237.192) (Read error: Connection reset by peer)
2024-09-03 02:26:52 +0000slack1256(~slack1256@2803:c600:5111:8029:8afc:ef98:52db:3f44) (Remote host closed the connection)
2024-09-03 02:27:04 +0000vglfr(~vglfr@c-73-163-164-68.hsd1.md.comcast.net) (Ping timeout: 260 seconds)
2024-09-03 02:28:03 +0000vglfr(~vglfr@2607:fb91:834:1618:ac39:6af7:e3fa:db4a)
2024-09-03 02:47:45 +0000machinedgod(~machinedg@d50-99-47-73.abhsia.telus.net) (Ping timeout: 248 seconds)
2024-09-03 02:50:47 +0000sourcetarius(~sourcetar@user/sourcetarius) (Quit: nyaa~)
2024-09-03 02:56:03 +0000td_(~td@i5387090A.versanet.de) (Ping timeout: 252 seconds)
2024-09-03 02:56:29 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-03 02:57:42 +0000td_(~td@i5387093B.versanet.de)
2024-09-03 03:00:54 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
2024-09-03 03:07:48 +0000peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 246 seconds)
2024-09-03 03:11:59 +0000tomboy64(~tomboy64@user/tomboy64)
2024-09-03 03:25:24 +0000Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds)
2024-09-03 03:26:09 +0000Square2(~Square4@user/square) (Ping timeout: 276 seconds)
2024-09-03 03:27:50 +0000Lord_of_Life(~Lord@user/lord-of-life/x-2819915)
2024-09-03 03:44:54 +0000walee_(~waleee@h-176-10-144-38.na.cust.bahnhof.se) (Ping timeout: 252 seconds)
2024-09-03 03:51:30 +0000peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com)
2024-09-03 03:53:57 +0000aforemny(~aforemny@2001:9e8:6cf4:df00:6f30:d808:ba6b:50ac) (Ping timeout: 248 seconds)
2024-09-03 03:54:51 +0000aforemny(~aforemny@i59F516FA.versanet.de)
2024-09-03 03:56:33 +0000hgolden_(~hgolden@23.162.40.110) (Ping timeout: 248 seconds)
2024-09-03 04:03:28 +0000elnegro(elnegro@r186-54-32-144.dialup.adsl.anteldata.net.uy)
2024-09-03 04:05:48 +0000elnegro(elnegro@r186-54-32-144.dialup.adsl.anteldata.net.uy) (Client Quit)
2024-09-03 04:22:25 +0000hgolden(~hgolden@23.162.40.69)
2024-09-03 04:22:31 +0000gmg(~user@user/gehmehgeh) (Ping timeout: 260 seconds)
2024-09-03 04:22:33 +0000hgolden_(~hgolden@23.162.40.69)
2024-09-03 04:22:48 +0000Pixi(~Pixi@user/pixi)
2024-09-03 04:23:14 +0000hgolden(~hgolden@23.162.40.69) (Client Quit)
2024-09-03 04:23:14 +0000hgolden_(~hgolden@23.162.40.69) (Client Quit)
2024-09-03 04:23:35 +0000hgolden(~hgolden@23.162.40.69)
2024-09-03 04:25:10 +0000Pixi`(~Pixi@user/pixi) (Ping timeout: 272 seconds)
2024-09-03 04:29:31 +0000michalz(~michalz@185.246.207.218)
2024-09-03 04:33:20 +0000gmg(~user@user/gehmehgeh)
2024-09-03 04:35:49 +0000 <haskellbridge> <Bowuigi> thirdofmay18081814goya type families can't be modeled by base system F (well, anything above basic kinds can't because they are mostly unspecified)
2024-09-03 04:36:34 +0000 <haskellbridge> <thirdofmay18081814goya> hm i see, ty!
2024-09-03 04:38:09 +0000 <haskellbridge> <Bowuigi> Another big one is datatypes with complex recursion, specially "codata" (streams and all that) which require some form of lazy recursion to work
2024-09-03 04:39:02 +0000 <haskellbridge> <Bowuigi> On the same line, since system F is total you can't represent most of the useful anamorphisms (and above) without resorting to catamorphisms over natural numbers
2024-09-03 04:41:31 +0000 <haskellbridge> <Bowuigi> On the same line (2: electric boogaloo) nontermination can't be modelled with system F
2024-09-03 04:45:03 +0000 <haskellbridge> <Bowuigi> As for stuff that belongs to macro/multi-stage level, system F doesn't have proper mechanisms to ensure that deriving works (i.e, matches a specific pattern, like the signature of fmap) other than foralls, which fall short sadly. This also excludes any kind of efficient runtime generics like the ones you can get with row types or GHC magic
2024-09-03 04:45:22 +0000takuan(~takuan@178-116-218-225.access.telenet.be)
2024-09-03 04:49:58 +0000michalz(~michalz@185.246.207.218) (Remote host closed the connection)
2024-09-03 04:50:07 +0000 <haskellbridge> <Bowuigi> Finally, syntax wise it becomes uncool (but technically it can still do everything given some cleverness): system F can accomodate modules awkwardly, passing Böhm-Berarducci encoded structures holding functions exported by the module and then wiring it up like a messy analog synthesizer setup, but doesn't have most of the "syntax sugar" we are used to, like "let", "where", "case..of", "do", etc
2024-09-03 04:52:43 +0000michalz(~michalz@185.246.207.215)
2024-09-03 04:54:59 +0000athan(~athan@syn-098-153-145-140.biz.spectrum.com)
2024-09-03 05:01:44 +0000weary-traveler(~user@user/user363627) (Remote host closed the connection)
2024-09-03 05:09:49 +0000peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 260 seconds)
2024-09-03 05:22:36 +0000gmg(~user@user/gehmehgeh) (Ping timeout: 260 seconds)
2024-09-03 05:29:40 +0000gmg(~user@user/gehmehgeh)
2024-09-03 05:30:59 +0000jinsun(~jinsun@user/jinsun) (Ping timeout: 260 seconds)
2024-09-03 05:34:16 +0000gmg(~user@user/gehmehgeh) (Ping timeout: 260 seconds)
2024-09-03 05:41:20 +0000gmg(~user@user/gehmehgeh)
2024-09-03 05:43:35 +0000Pixi(~Pixi@user/pixi) (Quit: Leaving)
2024-09-03 05:44:39 +0000vglfr(~vglfr@2607:fb91:834:1618:ac39:6af7:e3fa:db4a) (Read error: Connection reset by peer)
2024-09-03 05:44:59 +0000vglfr(~vglfr@c-73-163-164-68.hsd1.md.comcast.net)
2024-09-03 06:09:30 +0000DragonMaus(~dragonmau@user/dragonmaus) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2024-09-03 06:10:56 +0000DragonMaus(~dragonmau@user/dragonmaus)
2024-09-03 06:27:09 +0000oo_miguel(~Thunderbi@78.10.207.45)
2024-09-03 06:31:52 +0000sord937(~sord937@gateway/tor-sasl/sord937)
2024-09-03 06:43:41 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-03 06:44:57 +0000terrorjack4(~terrorjac@2a01:4f8:c17:dc9f::) (Remote host closed the connection)
2024-09-03 06:47:53 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 245 seconds)
2024-09-03 06:54:00 +0000CrunchyFlakes(~CrunchyFl@ip-109-42-114-20.web.vodafone.de)
2024-09-03 06:54:39 +0000lortabac(~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4)
2024-09-03 06:58:19 +0000tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-09-03 07:26:19 +0000lortabac(~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Read error: Connection reset by peer)
2024-09-03 07:39:24 +0000misterfish(~misterfis@87.215.131.102)
2024-09-03 07:55:06 +0000merijn(~merijn@77.242.116.146)
2024-09-03 07:58:09 +0000machinedgod(~machinedg@d50-99-47-73.abhsia.telus.net)
2024-09-03 08:09:14 +0000rvalue(~rvalue@user/rvalue) (Read error: Connection reset by peer)
2024-09-03 08:09:46 +0000rvalue(~rvalue@user/rvalue)
2024-09-03 08:09:58 +0000lortabac(~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4)
2024-09-03 08:12:08 +0000Lears(~Leary@user/Leary/x-0910699) (Remote host closed the connection)
2024-09-03 08:12:31 +0000lxsameer(~lxsameer@Serene/lxsameer)
2024-09-03 08:12:34 +0000Leary(~Leary@user/Leary/x-0910699)
2024-09-03 08:16:59 +0000Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2024-09-03 08:19:27 +0000chele(~chele@user/chele)
2024-09-03 08:21:46 +0000Pixi(~Pixi@user/pixi)
2024-09-03 08:21:52 +0000tzh(~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz)
2024-09-03 08:24:27 +0000ft(~ft@p4fc2a393.dip0.t-ipconnect.de) (Quit: leaving)
2024-09-03 08:24:53 +0000pointlessslippe1(~pointless@212.82.82.3) (Ping timeout: 248 seconds)
2024-09-03 08:25:48 +0000sourcetarius(~sourcetar@user/sourcetarius)
2024-09-03 08:29:03 +0000merijn(~merijn@77.242.116.146) (Ping timeout: 276 seconds)
2024-09-03 08:35:15 +0000rosco(~rosco@175.136.158.234)
2024-09-03 08:35:29 +0000merijn(~merijn@77.242.116.146)
2024-09-03 08:36:00 +0000pointlessslippe1(~pointless@62.106.85.17)
2024-09-03 08:36:16 +0000tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-09-03 08:44:40 +0000kaskal(~kaskal@2001:4bb8:2c3:301f:8bb3:b252:9e17:9e38)
2024-09-03 08:45:53 +0000kaskal(~kaskal@2001:4bb8:2c3:301f:8bb3:b252:9e17:9e38) (Client Quit)
2024-09-03 09:02:11 +0000ubert(~Thunderbi@178.165.175.79.wireless.dyn.drei.com)
2024-09-03 09:09:00 +0000merijn(~merijn@77.242.116.146) (Ping timeout: 246 seconds)
2024-09-03 09:10:41 +0000sourcetarius(~sourcetar@user/sourcetarius) (Quit: zzz)
2024-09-03 09:13:26 +0000sawilagar(~sawilagar@user/sawilagar)
2024-09-03 09:15:03 +0000ash3en(~Thunderbi@89.246.174.164)
2024-09-03 09:20:57 +0000merijn(~merijn@77.242.116.146)
2024-09-03 09:25:54 +0000ash3en(~Thunderbi@89.246.174.164) (Ping timeout: 260 seconds)
2024-09-03 09:26:04 +0000pointlessslippe1(~pointless@62.106.85.17) (Ping timeout: 260 seconds)
2024-09-03 09:28:40 +0000pointlessslippe1(~pointless@62.106.85.17)
2024-09-03 09:37:41 +0000ash3en(~Thunderbi@89.246.174.164)
2024-09-03 09:40:59 +0000__monty__(~toonn@user/toonn)
2024-09-03 09:42:13 +0000ash3en(~Thunderbi@89.246.174.164) (Ping timeout: 248 seconds)
2024-09-03 09:42:14 +0000yazz(jarek@user/yazz) (Ping timeout: 260 seconds)
2024-09-03 09:43:06 +0000yazz(jarek@user/yazz)
2024-09-03 09:44:55 +0000akegalj(~akegalj@20-82.dsl.iskon.hr)
2024-09-03 09:48:33 +0000Smiles(uid551636@id-551636.lymington.irccloud.com)
2024-09-03 09:56:36 +0000CrunchyFlakes(~CrunchyFl@ip-109-42-114-20.web.vodafone.de) (Read error: Connection reset by peer)
2024-09-03 09:57:17 +0000merijn(~merijn@77.242.116.146) (Ping timeout: 255 seconds)
2024-09-03 09:58:57 +0000tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-09-03 09:58:57 +0000rosco(~rosco@175.136.158.234) (Quit: Lost terminal)
2024-09-03 10:09:39 +0000misterfish(~misterfis@87.215.131.102) (Ping timeout: 260 seconds)
2024-09-03 10:10:32 +0000merijn(~merijn@77.242.116.146)
2024-09-03 10:11:15 +0000misterfish(~misterfis@178.225.40.136)
2024-09-03 10:11:40 +0000kuribas(~user@ip-188-118-57-242.reverse.destiny.be)
2024-09-03 10:13:08 +0000lortabac(~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.2.2)
2024-09-03 10:24:44 +0000ZharMeny(~ZharMeny@user/ZharMeny)
2024-09-03 10:35:59 +0000jespada(~jespada@r190-64-133-178.su-static.adinet.com.uy)
2024-09-03 10:38:06 +0000sawilagar(~sawilagar@user/sawilagar) (Remote host closed the connection)
2024-09-03 10:38:30 +0000sawilagar(~sawilagar@user/sawilagar)
2024-09-03 10:40:21 +0000jespada(~jespada@r190-64-133-178.su-static.adinet.com.uy) (Ping timeout: 246 seconds)
2024-09-03 10:42:34 +0000terrorjack4(~terrorjac@2a01:4f8:c17:dc9f::)
2024-09-03 10:50:08 +0000yazz(jarek@user/yazz) (Read error: Connection reset by peer)
2024-09-03 10:53:20 +0000lortabac(~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4)
2024-09-03 10:54:49 +0000jarek(jarek@user/yazz)
2024-09-03 10:58:26 +0000jespada(~jespada@r190-64-133-178.su-static.adinet.com.uy)
2024-09-03 10:59:36 +0000terrorjack4(~terrorjac@2a01:4f8:c17:dc9f::) (Ping timeout: 246 seconds)
2024-09-03 11:00:56 +0000rosco(~rosco@175.136.158.234)
2024-09-03 11:03:19 +0000jespada(~jespada@r190-64-133-178.su-static.adinet.com.uy) (Ping timeout: 260 seconds)
2024-09-03 11:11:24 +0000statusbot(~statusbot@ec2-34-198-122-184.compute-1.amazonaws.com) (Remote host closed the connection)
2024-09-03 11:11:35 +0000statusbot(~statusbot@ec2-34-198-122-184.compute-1.amazonaws.com)
2024-09-03 11:12:22 +0000tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-09-03 11:18:04 +0000xff0x(~xff0x@2405:6580:b080:900:3618:2400:ae18:e1a3)
2024-09-03 11:19:36 +0000jarekyazz
2024-09-03 11:23:49 +0000terrorjack4(~terrorjac@static.48.15.202.116.clients.your-server.de)
2024-09-03 11:32:39 +0000rvalue-(~rvalue@user/rvalue)
2024-09-03 11:32:39 +0000statusbot(~statusbot@ec2-34-198-122-184.compute-1.amazonaws.com) (Read error: Connection reset by peer)
2024-09-03 11:32:47 +0000statusbot6(~statusbot@ec2-34-198-122-184.compute-1.amazonaws.com)
2024-09-03 11:33:43 +0000rvalue(~rvalue@user/rvalue) (Ping timeout: 264 seconds)
2024-09-03 11:34:15 +0000jespada(~jespada@r190-64-133-178.su-static.adinet.com.uy)
2024-09-03 11:36:35 +0000tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-09-03 11:38:21 +0000rvalue-rvalue
2024-09-03 11:38:57 +0000jespada(~jespada@r190-64-133-178.su-static.adinet.com.uy) (Ping timeout: 248 seconds)
2024-09-03 11:42:34 +0000ski(~ski@217.65.136.250) (Ping timeout: 260 seconds)
2024-09-03 11:50:30 +0000sord937(~sord937@gateway/tor-sasl/sord937) (Remote host closed the connection)
2024-09-03 11:50:34 +0000kuribas(~user@ip-188-118-57-242.reverse.destiny.be) (Remote host closed the connection)
2024-09-03 11:50:51 +0000sord937(~sord937@gateway/tor-sasl/sord937)
2024-09-03 11:55:30 +0000misterfish(~misterfis@178.225.40.136) (Ping timeout: 252 seconds)
2024-09-03 11:55:41 +0000Square2(~Square4@user/square)
2024-09-03 11:57:12 +0000misterfish(~misterfis@87.215.131.102)
2024-09-03 11:57:42 +0000nyc(~nyc@user/nyc) (Ping timeout: 246 seconds)
2024-09-03 12:01:33 +0000jespada(~jespada@r190-64-133-178.su-static.adinet.com.uy)
2024-09-03 12:03:06 +0000ash3en(~Thunderbi@193.32.248.193)
2024-09-03 12:05:04 +0000kuribas(~user@ip-188-118-57-242.reverse.destiny.be)
2024-09-03 12:06:43 +0000jespada(~jespada@r190-64-133-178.su-static.adinet.com.uy) (Ping timeout: 264 seconds)
2024-09-03 12:13:45 +0000alexherbo2(~alexherbo@2a02-8440-3119-49bf-4476-2d18-4679-c6a2.rev.sfr.net)
2024-09-03 12:15:29 +0000ash3en(~Thunderbi@193.32.248.193) (Quit: ash3en)
2024-09-03 12:22:06 +0000CrunchyFlakes(~CrunchyFl@ip-109-42-114-20.web.vodafone.de)
2024-09-03 12:28:10 +0000ash3en(~Thunderbi@193.32.248.193)
2024-09-03 12:33:24 +0000jespada(~jespada@r190-64-133-178.su-static.adinet.com.uy)
2024-09-03 12:38:24 +0000tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-09-03 12:46:11 +0000ash3en(~Thunderbi@193.32.248.193) (Quit: ash3en)
2024-09-03 12:49:09 +0000sawilagar(~sawilagar@user/sawilagar) (Remote host closed the connection)
2024-09-03 12:49:32 +0000sawilagar(~sawilagar@user/sawilagar)
2024-09-03 12:56:01 +0000tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-09-03 13:00:09 +0000Leary(~Leary@user/Leary/x-0910699) (Remote host closed the connection)
2024-09-03 13:01:00 +0000Leary(~Leary@user/Leary/x-0910699)
2024-09-03 13:03:32 +0000weary-traveler(~user@user/user363627)
2024-09-03 13:04:00 +0000myxos(~myxos@syn-065-028-251-121.res.spectrum.com) (Ping timeout: 276 seconds)
2024-09-03 13:07:27 +0000 <[exa]> hey all, is there any nice functional algorithm for a random generator that produces a sequence of length (n1+n2+n3+n4+...) with numbers 1,2,3,4,..., each respectively occuring exactly n1,n2,n3,... times? Problem: there isn't too many buckets (individual `n`'s), but the total sum of `n`s is galactic-scale (I won't ever hopefully fit a "permutation" into the memory)
2024-09-03 13:09:57 +0000 <[exa]> currently I guess I'll just keep a list of how many of each buckets needs to get generated and split the random generated number from (1..sum ns) into categories. Better ideas welcome. For more buckets I'd go for some kind of prefix-sum tree but since there's gonna be like 5 of them max, I don't care.
2024-09-03 13:14:48 +0000 <[exa]> Other question: I've got very nice brackety functions that safely open & close a resource and leave you to do something, such as `withFile "foo.txt" $ \f -> do ....`. Is there some kind of a monad combinator that would transform this to `withFiles ["foo1.txt", ...] $ \[f1, ...] -> do ...` ?
2024-09-03 13:18:20 +0000 <[exa]> (in short I have say `(a -> (b -> IO c) -> IO c)` and want to construct `[a] -> ([b] -> IO c) -> IO c` from it)
2024-09-03 13:20:10 +0000 <merijn> [exa]: hmm, I don't quite understand your formulation of the random number generator?
2024-09-03 13:21:31 +0000 <merijn> So you have a N numbers and for each of those numbers you want that number of duplicate values?
2024-09-03 13:22:21 +0000 <merijn> [exa]: It sounds like you could *maybe* use a trick I learned, but I'm not quite sure it fits your actual problem description
2024-09-03 13:23:03 +0000 <merijn> [exa]: As for your bracket question, if you google `ContT` and bracket you can find some nice tricks
2024-09-03 13:24:06 +0000 <[exa]> merijn: other view, basically I have a sequence of numbers [1..gazillion] and want to split it into disjunct sequences of given sizes. The gazillion is too big, so loading it to memory and "just mixing" is not an option.
2024-09-03 13:24:13 +0000 <[exa]> re the bracket, thanks a lot, will google
2024-09-03 13:24:25 +0000 <[exa]> (it really looked like Cont but I'm not good with Cont. :D)
2024-09-03 13:25:32 +0000 <merijn> The SO answer I remember for that trick appears gone, so not sure you can find it again
2024-09-03 13:26:04 +0000 <merijn> [exa]: ok, so your problem is you want to sample N random, non-repeating numbers from the space 1..gazillion?
2024-09-03 13:28:02 +0000 <[exa]> no.... say you have [1,2,3,4,5] as input (it's always 1 to something for simplification). Then I get [3,2] as bucket sizes. Valid answers then include say [[1,2,3],[4,5]] and [[1,2,4],[3,5]] and [[1,3,4],[2,5]] etc.
2024-09-03 13:29:41 +0000 <merijn> I mean, that looks like what I said, except you're wanting M sequences of random, non-repeating numbers from 1..gazillion :p
2024-09-03 13:29:51 +0000 <[exa]> problem: the input is going to be too huge to remember any of the data as a whole set, so I need to output the things iteratively; e.g. in the second example the generator would basically tell me "first input goes to bucket 1, next into bucket 1, next into bucket 2, next into bucket 1, next into bucket 2, end"
2024-09-03 13:30:16 +0000 <[exa]> yeah that would be it
2024-09-03 13:30:26 +0000 <merijn> Is the input gonna be 1 through N, though? Or not
2024-09-03 13:30:36 +0000 <[exa]> isomorphic to that, yes
2024-09-03 13:31:13 +0000 <[exa]> basically I've got a few huge data streams and need to mix them fairly
2024-09-03 13:31:23 +0000 <[exa]> might have started from this description, right. ^
2024-09-03 13:31:53 +0000 <merijn> Ok, by what definition of fair? :p
2024-09-03 13:33:40 +0000 <[exa]> basically if one of the buckets is shorter, it shouldn't affect its occurence distribution in the mixed stream
2024-09-03 13:34:09 +0000 <merijn> So, basically the problem I had was: Given the range 0..N (where N is **large**) select K random, non-repeating numbers from within 0..N. So I know a solution to that, I'm just not sure that helps you :)
2024-09-03 13:34:19 +0000 <[exa]> (i.e. if you would output just unweighted random bucket IDs and remove buckets that ran out of space, shorter buckets would be filled/emptied right in the beginning.
2024-09-03 13:35:10 +0000 <[exa]> for the K you use the knuth shuffly trick no?
2024-09-03 13:35:48 +0000rosco(~rosco@175.136.158.234) (Quit: Lost terminal)
2024-09-03 13:35:51 +0000 <merijn> I'm assuming that by Knuth you mean the Fisher-Yates shuffle, yeah.
2024-09-03 13:36:07 +0000 <merijn> Or rather a sparse partial version of it
2024-09-03 13:36:37 +0000 <[exa]> yes, just remembering the <=K things that were taken out
2024-09-03 13:36:51 +0000 <[exa]> not very useful here because K gonna get yuge
2024-09-03 13:38:51 +0000 <merijn> [exa]: But your problem has multiple streams of input that should be redistributed across N buckets?
2024-09-03 13:40:10 +0000 <Leary> :t \f -> runContT . traverse (ContT . f)
2024-09-03 13:40:12 +0000 <lambdabot> forall k (t :: * -> *) a b (m :: k -> *) (r :: k). Traversable t => (a -> (b -> m r) -> m r) -> t a -> (t b -> m r) -> m r
2024-09-03 13:44:27 +0000merijn(~merijn@77.242.116.146) (Ping timeout: 246 seconds)
2024-09-03 13:46:00 +0000 <[exa]> Leary: oh wow, nice, thanks a lot!
2024-09-03 13:48:17 +0000 <Leary> [exa]: NP. Re the number generation, if I've understood correctly, then a streaming approach is to maintain an array of weights associated with an array of buckets, then generate bucket indices in accordance with those weights, decrementing the associated weight each time its bucket is selected.
2024-09-03 13:48:48 +0000 <[exa]> yap
2024-09-03 13:49:00 +0000merijn(~merijn@77.242.116.146)
2024-09-03 13:51:37 +0000Sgeo(~Sgeo@user/sgeo)
2024-09-03 13:54:40 +0000tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-09-03 14:04:53 +0000alexherbo2(~alexherbo@2a02-8440-3119-49bf-4476-2d18-4679-c6a2.rev.sfr.net) (Remote host closed the connection)
2024-09-03 14:06:04 +0000alexherbo2(~alexherbo@2a02-8440-3119-49bf-8129-3e46-d40e-c0b2.rev.sfr.net)
2024-09-03 14:07:36 +0000ash3en(~Thunderbi@193.32.248.193)
2024-09-03 14:09:46 +0000alexherbo2(~alexherbo@2a02-8440-3119-49bf-8129-3e46-d40e-c0b2.rev.sfr.net) (Remote host closed the connection)
2024-09-03 14:10:10 +0000alexherbo2(~alexherbo@2a02-8440-3119-49bf-edf4-bd4a-ca0d-4115.rev.sfr.net)
2024-09-03 14:11:45 +0000ash3en(~Thunderbi@193.32.248.193) (Ping timeout: 246 seconds)
2024-09-03 14:13:36 +0000alexherbo2(~alexherbo@2a02-8440-3119-49bf-edf4-bd4a-ca0d-4115.rev.sfr.net) (Remote host closed the connection)
2024-09-03 14:22:10 +0000tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-09-03 14:29:17 +0000ash3en(~Thunderbi@193.32.248.193)
2024-09-03 14:30:39 +0000jespada(~jespada@r190-64-133-178.su-static.adinet.com.uy) (Ping timeout: 246 seconds)
2024-09-03 14:30:52 +0000jespada_(~jespada@r190-64-133-178.su-static.adinet.com.uy)
2024-09-03 14:33:07 +0000lxsameer(~lxsameer@Serene/lxsameer) (Ping timeout: 264 seconds)
2024-09-03 14:34:04 +0000ash3en(~Thunderbi@193.32.248.193) (Ping timeout: 260 seconds)
2024-09-03 14:34:14 +0000jespada(~jespada@r190-64-133-178.su-static.adinet.com.uy)
2024-09-03 14:35:12 +0000jespada_(~jespada@r190-64-133-178.su-static.adinet.com.uy) (Ping timeout: 246 seconds)
2024-09-03 14:43:29 +0000misterfish(~misterfis@87.215.131.102) (Ping timeout: 255 seconds)
2024-09-03 14:48:03 +0000lortabac(~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.2.2)
2024-09-03 15:00:11 +0000spew(~spew@201.141.99.170)
2024-09-03 15:05:56 +0000ash3en(~Thunderbi@193.32.248.193)
2024-09-03 15:13:17 +0000ash3en(~Thunderbi@193.32.248.193) (Quit: ash3en)
2024-09-03 15:20:09 +0000ash3en(~Thunderbi@193.32.248.193)
2024-09-03 15:20:44 +0000sawilagar(~sawilagar@user/sawilagar) (Ping timeout: 244 seconds)
2024-09-03 15:23:56 +0000Alleria(~Alleria@user/alleria)
2024-09-03 15:24:00 +0000Pixi`(~Pixi@user/pixi)
2024-09-03 15:24:22 +0000alexherbo2(~alexherbo@2a02-8440-3402-f1ef-996e-3533-9fa6-2db1.rev.sfr.net)
2024-09-03 15:24:53 +0000Pixi(~Pixi@user/pixi) (Ping timeout: 255 seconds)
2024-09-03 15:32:14 +0000athan(~athan@syn-098-153-145-140.biz.spectrum.com) (Quit: Konversation terminated!)
2024-09-03 15:38:44 +0000ash3en(~Thunderbi@193.32.248.193) (Quit: ash3en)
2024-09-03 15:56:16 +0000chele(~chele@user/chele) (Remote host closed the connection)
2024-09-03 15:57:07 +0000tzh(~tzh@c-76-115-131-146.hsd1.or.comcast.net)
2024-09-03 15:58:22 +0000tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-09-03 16:11:31 +0000merijn(~merijn@77.242.116.146) (Ping timeout: 264 seconds)
2024-09-03 16:12:20 +0000kuribas(~user@ip-188-118-57-242.reverse.destiny.be) (Quit: ERC (IRC client for Emacs 27.1))
2024-09-03 16:14:27 +0000kaskal(~kaskal@2001:4bb8:2c3:301f:e6a5:a01d:d360:9b28)
2024-09-03 16:16:08 +0000kaskal(~kaskal@2001:4bb8:2c3:301f:e6a5:a01d:d360:9b28) (Client Quit)
2024-09-03 16:17:21 +0000kaskal(~kaskal@2001:4bb8:2c3:301f:344f:f795:68cb:7518)
2024-09-03 16:17:39 +0000Smiles(uid551636@id-551636.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2024-09-03 16:18:10 +0000tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-09-03 16:27:52 +0000peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com)
2024-09-03 16:29:33 +0000waleee(~waleee@h-176-10-144-38.NA.cust.bahnhof.se)
2024-09-03 16:32:19 +0000peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 260 seconds)
2024-09-03 16:39:54 +0000econo_(uid147250@id-147250.tinside.irccloud.com)
2024-09-03 16:52:38 +0000jinsun(~jinsun@user/jinsun)
2024-09-03 16:59:01 +0000aforemny(~aforemny@i59F516FA.versanet.de) (Ping timeout: 248 seconds)
2024-09-03 16:59:28 +0000aforemny(~aforemny@2001:9e8:6cdb:2500:97cb:a459:61c8:d3a)
2024-09-03 17:01:18 +0000hammond(proscan@gateway04.insomnia247.nl) (Ping timeout: 252 seconds)
2024-09-03 17:03:52 +0000youthlic(~Thunderbi@user/youthlic) (Quit: youthlic)
2024-09-03 17:03:57 +0000aforemny(~aforemny@2001:9e8:6cdb:2500:97cb:a459:61c8:d3a) (Ping timeout: 246 seconds)
2024-09-03 17:04:01 +0000aforemny_(~aforemny@i59F516FC.versanet.de)
2024-09-03 17:04:59 +0000jespada(~jespada@r190-64-133-178.su-static.adinet.com.uy) (Quit: My Mac has gone to sleep. ZZZzzz…)
2024-09-03 17:06:05 +0000jespada(~jespada@r190-64-133-178.su-static.adinet.com.uy)
2024-09-03 17:06:20 +0000alexherbo2(~alexherbo@2a02-8440-3402-f1ef-996e-3533-9fa6-2db1.rev.sfr.net) (Remote host closed the connection)
2024-09-03 17:07:29 +0000vglfr(~vglfr@c-73-163-164-68.hsd1.md.comcast.net) (Ping timeout: 248 seconds)
2024-09-03 17:08:13 +0000vglfr(~vglfr@2607:fb91:834:1618:ac39:6af7:e3fa:db4a)
2024-09-03 17:11:36 +0000tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-09-03 17:18:02 +0000ft(~ft@p4fc2a393.dip0.t-ipconnect.de)
2024-09-03 17:22:25 +0000tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-09-03 17:26:38 +0000sourcetarius(~sourcetar@user/sourcetarius)
2024-09-03 17:29:58 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-03 17:30:39 +0000pavonia(~user@user/siracusa) (Quit: Bye!)
2024-09-03 17:33:12 +0000hammond(proscan@gateway04.insomnia247.nl)
2024-09-03 17:34:55 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 264 seconds)
2024-09-03 17:39:59 +0000misterfish(~misterfis@84.53.85.146)
2024-09-03 17:42:23 +0000sawilagar(~sawilagar@user/sawilagar)
2024-09-03 17:45:41 +0000ash3en(~Thunderbi@2a01:c23:9425:d300:a59d:7e6e:37ec:ac7f)
2024-09-03 17:45:46 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-03 17:46:24 +0000dsrt^(~dsrt@c-98-242-74-66.hsd1.ga.comcast.net) (Ping timeout: 252 seconds)
2024-09-03 17:50:17 +0000ash3en(~Thunderbi@2a01:c23:9425:d300:a59d:7e6e:37ec:ac7f) (Remote host closed the connection)
2024-09-03 17:50:41 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 255 seconds)
2024-09-03 17:56:41 +0000ash3en(~Thunderbi@2a01:c23:9425:d300:a59d:7e6e:37ec:ac7f)
2024-09-03 18:01:35 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-03 18:01:47 +0000rvalue(~rvalue@user/rvalue) (Ping timeout: 252 seconds)
2024-09-03 18:05:09 +0000peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com)
2024-09-03 18:06:53 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds)
2024-09-03 18:08:36 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-03 18:09:07 +0000misterfish(~misterfis@84.53.85.146) (Ping timeout: 264 seconds)
2024-09-03 18:11:30 +0000peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 246 seconds)
2024-09-03 18:12:58 +0000rvalue(~rvalue@user/rvalue)
2024-09-03 18:13:32 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
2024-09-03 18:14:58 +0000 <[exa]> hm, is there a library with a mmap(2) equivalent that works over a file descriptor or handle instead of a ("unopened") file path?
2024-09-03 18:15:59 +0000CrunchyFlakes(~CrunchyFl@ip-109-42-114-20.web.vodafone.de) (Read error: Connection reset by peer)
2024-09-03 18:20:05 +0000 <[exa]> ah wait it's in shared-memory. initial google failed.
2024-09-03 18:24:23 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-03 18:29:09 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
2024-09-03 18:32:53 +0000akegalj(~akegalj@20-82.dsl.iskon.hr) (Quit: leaving)
2024-09-03 18:36:05 +0000Feuermagier(~Feuermagi@user/feuermagier) (Quit: Leaving)
2024-09-03 18:36:21 +0000machinedgod(~machinedg@d50-99-47-73.abhsia.telus.net) (Ping timeout: 246 seconds)
2024-09-03 18:40:02 +0000AlexNoo_AlexNoo
2024-09-03 18:40:11 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-03 18:41:53 +0000Inst(~Inst@user/Inst)
2024-09-03 18:42:15 +0000yazz(jarek@user/yazz) ()
2024-09-03 18:45:06 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 246 seconds)
2024-09-03 18:51:48 +0000weary-traveler(~user@user/user363627) (Remote host closed the connection)
2024-09-03 18:53:28 +0000AlexZenon(~alzenon@178.34.150.250) (Ping timeout: 272 seconds)
2024-09-03 18:55:58 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-03 18:58:12 +0000AlexZenon(~alzenon@178.34.150.250)
2024-09-03 19:01:04 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
2024-09-03 19:03:02 +0000jespada(~jespada@r190-64-133-178.su-static.adinet.com.uy) (Quit: My Mac has gone to sleep. ZZZzzz…)
2024-09-03 19:03:32 +0000jespada(~jespada@r190-64-133-178.su-static.adinet.com.uy)
2024-09-03 19:09:32 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-03 19:14:24 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
2024-09-03 19:16:35 +0000 <[exa]> ...ok so, how probable is it that I test the above random generator on a sequence of 20 items and it by complete chance outputs a sorted, super-biased-looking sequence, sending me into half an hour of debugging before I get low enough to just re-run it and see actual randomness?
2024-09-03 19:18:20 +0000Alleria(~Alleria@user/alleria) (Remote host closed the connection)
2024-09-03 19:18:26 +0000 <darkling> Naively, about 1/(20!)?
2024-09-03 19:19:07 +0000 <[exa]> spoiler: from here it looked like p=1.0
2024-09-03 19:19:52 +0000 <EvanR> when you gaze into actual randomness, actual randomness gazes back
2024-09-03 19:20:23 +0000 <[exa]> memorable ^
2024-09-03 19:20:35 +0000AlexNoo_(~AlexNoo@5.139.233.35)
2024-09-03 19:20:41 +0000 <EvanR> also every ordering of 20 items is equally likely
2024-09-03 19:20:49 +0000 <EvanR> presumably
2024-09-03 19:21:09 +0000 <[exa]> yeah
2024-09-03 19:21:25 +0000 <EvanR> how long do you have to sit and watch a list of length 2 get shuffled until you see actual randomness
2024-09-03 19:22:04 +0000AlexZenon(~alzenon@178.34.150.250) (Ping timeout: 260 seconds)
2024-09-03 19:23:21 +0000AlexZenon(~alzenon@5.139.233.35)
2024-09-03 19:23:49 +0000AlexNoo(~AlexNoo@178.34.150.250) (Ping timeout: 260 seconds)
2024-09-03 19:24:03 +0000AlexNoo_AlexNoo
2024-09-03 19:25:15 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-03 19:25:27 +0000ec(~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
2024-09-03 19:25:55 +0000ec(~ec@gateway/tor-sasl/ec)
2024-09-03 19:27:57 +0000darklingbreaks out the printed book of random numbers.
2024-09-03 19:28:06 +0000sord937(~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
2024-09-03 19:29:06 +0000 <EvanR> did xkcd write that?
2024-09-03 19:30:14 +0000vglfr(~vglfr@2607:fb91:834:1618:ac39:6af7:e3fa:db4a) (Ping timeout: 260 seconds)
2024-09-03 19:30:43 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 264 seconds)
2024-09-03 19:32:02 +0000 <darkling> No, they were an actual thing, back in the '60s or so.
2024-09-03 19:32:36 +0000 <darkling> https://www.amazon.com/Million-Random-Digits-Normal-Deviates/dp/0833030477
2024-09-03 19:32:38 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-03 19:32:50 +0000 <darkling> (Although that looks like it's a reprint from this millennium)
2024-09-03 19:34:15 +0000misterfish(~misterfis@84.53.85.146)
2024-09-03 19:35:26 +0000gmg(~user@user/gehmehgeh) (Ping timeout: 260 seconds)
2024-09-03 19:37:49 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
2024-09-03 19:43:41 +0000jespada(~jespada@r190-64-133-178.su-static.adinet.com.uy) (Quit: My Mac has gone to sleep. ZZZzzz…)
2024-09-03 19:47:45 +0000misterfish(~misterfis@84.53.85.146) (Ping timeout: 246 seconds)
2024-09-03 19:48:22 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-03 19:48:33 +0000jespada(~jespada@r190-64-133-178.su-static.adinet.com.uy)
2024-09-03 19:48:39 +0000codaraxis(~codaraxis@user/codaraxis)
2024-09-03 19:51:17 +0000ash3en(~Thunderbi@2a01:c23:9425:d300:a59d:7e6e:37ec:ac7f) (Ping timeout: 265 seconds)
2024-09-03 19:51:49 +0000jespada(~jespada@r190-64-133-178.su-static.adinet.com.uy) (Client Quit)
2024-09-03 19:53:30 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 276 seconds)
2024-09-03 19:54:30 +0000machinedgod(~machinedg@d50-99-47-73.abhsia.telus.net)
2024-09-03 19:58:02 +0000vglfr(~vglfr@2601:14d:4e01:1370:aa26:2342:9c12:cd31)
2024-09-03 20:02:06 +0000sourcetarius(~sourcetar@user/sourcetarius) (Ping timeout: 246 seconds)
2024-09-03 20:04:09 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-03 20:08:45 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 246 seconds)
2024-09-03 20:09:53 +0000 <[exa]> darkling: they'd never sell this publicly if they could estimate the meme value in late 2020s
2024-09-03 20:19:56 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-03 20:24:51 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 246 seconds)
2024-09-03 20:26:07 +0000spew(~spew@201.141.99.170) (Read error: Connection reset by peer)
2024-09-03 20:31:25 +0000spew(~spew@201.141.99.170)
2024-09-03 20:35:43 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-03 20:39:13 +0000misterfish(~misterfis@84.53.85.146)
2024-09-03 20:39:41 +0000myxos(~myxos@syn-065-028-251-121.res.spectrum.com)
2024-09-03 20:40:49 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
2024-09-03 20:45:04 +0000peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com)
2024-09-03 20:45:04 +0000tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-09-03 20:48:22 +0000michalz(~michalz@185.246.207.215) (Remote host closed the connection)
2024-09-03 20:51:05 +0000tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-09-03 20:53:04 +0000misterfish(~misterfis@84.53.85.146) (Ping timeout: 260 seconds)
2024-09-03 21:00:31 +0000Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2024-09-03 21:00:32 +0000peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Remote host closed the connection)
2024-09-03 21:00:45 +0000Sgeo(~Sgeo@user/sgeo)
2024-09-03 21:00:51 +0000peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com)
2024-09-03 21:01:31 +0000Luj9(~Luj@2a01:e0a:de4:a0e1:be24:11ff:febc:b5b5) (Quit: The Lounge - https://thelounge.chat)
2024-09-03 21:02:28 +0000Luj9(~Luj@2a01:e0a:de4:a0e1:be24:11ff:febc:b5b5)
2024-09-03 21:07:18 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-03 21:12:06 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 246 seconds)
2024-09-03 21:12:23 +0000takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2024-09-03 21:13:30 +0000peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 246 seconds)
2024-09-03 21:13:34 +0000Luj9(~Luj@2a01:e0a:de4:a0e1:be24:11ff:febc:b5b5) (Quit: The Lounge - https://thelounge.chat)
2024-09-03 21:14:10 +0000Luj9(~Luj@2a01:e0a:de4:a0e1:be24:11ff:febc:b5b5)
2024-09-03 21:18:55 +0000Luj9(~Luj@2a01:e0a:de4:a0e1:be24:11ff:febc:b5b5) (Client Quit)
2024-09-03 21:19:30 +0000Luj9(~Luj@2a01:e0a:de4:a0e1:be24:11ff:febc:b5b5)
2024-09-03 21:22:15 +0000__monty__(~toonn@user/toonn) (Quit: leaving)
2024-09-03 21:23:04 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-03 21:28:02 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 255 seconds)
2024-09-03 21:29:32 +0000CrunchyFlakes(~CrunchyFl@ip-109-42-114-20.web.vodafone.de)
2024-09-03 21:30:01 +0000Luj9(~Luj@2a01:e0a:de4:a0e1:be24:11ff:febc:b5b5) (Quit: The Lounge - https://thelounge.chat)
2024-09-03 21:30:40 +0000Luj9(~Luj@2a01:e0a:de4:a0e1:be24:11ff:febc:b5b5)
2024-09-03 21:31:52 +0000spew(~spew@201.141.99.170) (Read error: Connection reset by peer)
2024-09-03 21:34:00 +0000glguy(glguy@libera/staff/glguy) (Remote host closed the connection)
2024-09-03 21:35:38 +0000sawilagar(~sawilagar@user/sawilagar) (Remote host closed the connection)
2024-09-03 21:36:12 +0000sawilagar(~sawilagar@user/sawilagar)
2024-09-03 21:37:15 +0000spew(~spew@201.141.99.170)
2024-09-03 21:37:49 +0000glguy(glguy@libera/staff/glguy)
2024-09-03 21:38:52 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-03 21:39:27 +0000spew(~spew@201.141.99.170) (Read error: Connection reset by peer)
2024-09-03 21:40:45 +0000machinedgod(~machinedg@d50-99-47-73.abhsia.telus.net) (Ping timeout: 276 seconds)
2024-09-03 21:42:20 +0000sawilagar(~sawilagar@user/sawilagar) (Remote host closed the connection)
2024-09-03 21:42:49 +0000sawilagar(~sawilagar@user/sawilagar)
2024-09-03 21:43:45 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
2024-09-03 21:44:59 +0000random-jellyfish(~random-je@user/random-jellyfish)
2024-09-03 21:45:37 +0000 <random-jellyfish> :t (.) . (.)
2024-09-03 21:45:38 +0000 <lambdabot> (b -> c) -> (a1 -> a2 -> b) -> a1 -> a2 -> c
2024-09-03 21:46:01 +0000 <random-jellyfish> How is it possible to compose the composition operator with itself?
2024-09-03 21:46:08 +0000 <random-jellyfish> :t (.)
2024-09-03 21:46:09 +0000 <lambdabot> (b -> c) -> (a -> b) -> a -> c
2024-09-03 21:46:29 +0000 <random-jellyfish> it returns c and takes (b->c) as argument
2024-09-03 21:46:38 +0000Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542)
2024-09-03 21:46:40 +0000 <random-jellyfish> those types don't match
2024-09-03 21:46:48 +0000 <mauke> :t flip id
2024-09-03 21:46:49 +0000 <lambdabot> b -> (b -> c) -> c
2024-09-03 21:46:54 +0000 <mauke> why can I flip id?
2024-09-03 21:47:01 +0000 <c_wraith> no, it's takes a (b -> c) and returns an ((a ->b) -> a -> c)
2024-09-03 21:47:25 +0000 <c_wraith> wow, my grammar went on vacation there or something
2024-09-03 21:47:39 +0000 <random-jellyfish> c_wraith okay fair, but do those types match?
2024-09-03 21:47:43 +0000 <geekosaur> remember unification. (rename the tyvars in the three uses of (.) and unify them)
2024-09-03 21:48:06 +0000 <monochrom> @type flip
2024-09-03 21:48:07 +0000 <lambdabot> (a -> b -> c) -> b -> a -> c
2024-09-03 21:49:13 +0000random-jellyfishis confused and dizzy
2024-09-03 21:49:39 +0000 <monochrom> When you unify that with id's "t -> t", t and a both become b->c. IOW you're looking at id :: (b->c) -> (b->c), i.e., ($).
2024-09-03 21:50:16 +0000spew(~spew@201.141.99.170)
2024-09-03 21:50:43 +0000 <geekosaur> the key point is that each use of (.) has its _own_ a, b, and c. they are only related by usage, which is determined by unification. this is why I advised renaming the type variables in each use
2024-09-03 21:50:57 +0000 <monochrom> (.) . (.) is a really good exercise in type inference. Let me put it bluntly: Following the type inference algorithm mechanically, "blindly", "let the symbols do the work", and suppressing your flawed intuition.
2024-09-03 21:51:57 +0000 <monochrom> @type id id id id
2024-09-03 21:51:58 +0000 <lambdabot> a -> a
2024-09-03 21:52:12 +0000Tuplanolla(~Tuplanoll@91-159-69-59.elisa-laajakaista.fi)
2024-09-03 21:52:15 +0000 <monochrom> @quote monochrom 17
2024-09-03 21:52:15 +0000 <lambdabot> monochrom says: I am 17-ary, going on 18-ary, I can take curry of you
2024-09-03 21:55:59 +0000 <int-e> the full type of the outermost . is (((a2 -> b) -> a2 -> c) -> (a1 -> a2 -> b) -> a1 -> a2 -> c) -> ((b -> c) -> (a2 -> b) -> a2 -> c) -> (b -> c) -> (a1 -> a2 -> b) -> a1 -> a2 -> c
2024-09-03 21:56:04 +0000 <int-e> such beauty.
2024-09-03 21:56:41 +0000tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-09-03 21:57:10 +0000 <monochrom> This is why unification is exponential-time. >:)
2024-09-03 21:57:32 +0000spew(~spew@201.141.99.170) (Read error: Connection reset by peer)
2024-09-03 21:57:45 +0000pavonia(~user@user/siracusa)
2024-09-03 21:58:15 +0000 <int-e> id id id id never have guessed
2024-09-03 21:59:52 +0000 <int-e> If you maintain sharing, unification is almost linear time though.
2024-09-03 22:10:26 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-03 22:12:35 +0000CrunchyFlakes(~CrunchyFl@ip-109-42-114-20.web.vodafone.de) (Read error: Connection reset by peer)
2024-09-03 22:15:10 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
2024-09-03 22:18:38 +0000weary-traveler(~user@user/user363627)
2024-09-03 22:19:55 +0000Square2(~Square4@user/square) (Ping timeout: 264 seconds)
2024-09-03 22:20:33 +0000Fooo(~Square@user/square)
2024-09-03 22:21:15 +0000peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com)
2024-09-03 22:23:13 +0000 <haskellbridge> <thirdofmay18081814goya> Bowuigi: thanks a lot for the extensive explanation!! i'll be referring to this a lot
2024-09-03 22:26:12 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-03 22:27:35 +0000 <haskellbridge> <magic_rb> Today during a course we were tasked to implement some very basic haskell functions, namely "equalFour" which takes 4 arguments and returns True if none of them equal and "factorial" which is self explanatory. "equalFour" can be done just be hardcoding the expression or by using a foldl to implement "equalN". And i wondered if the general fold based version would be optimized away or if it even could be...
2024-09-03 22:27:40 +0000 <haskellbridge> ... reasonably optimized away
2024-09-03 22:30:19 +0000guygastineau(~guygastin@137.184.131.156) (Quit: ZNC - https://znc.in)
2024-09-03 22:30:39 +0000RMSBach(~guygastin@137.184.131.156)
2024-09-03 22:30:55 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
2024-09-03 22:37:22 +0000troydm(~troydm@user/troydm)
2024-09-03 22:41:59 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-03 22:43:26 +0000 <Leary> Bowuigi, thirdofmay18081814goya: System F /can/ represent both data and codata as the least and greatest fixpoints of functors respectively. You just can't treat one like the other without paying unreasonable penalties.
2024-09-03 22:43:33 +0000acidjnk_new(~acidjnk@p200300d6e72cfb806d1b8dd9c0ab8f32.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
2024-09-03 22:46:23 +0000Luj9(~Luj@2a01:e0a:de4:a0e1:be24:11ff:febc:b5b5) (Quit: The Lounge - https://thelounge.chat)
2024-09-03 22:46:37 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 244 seconds)
2024-09-03 22:47:00 +0000Luj9(~Luj@2a01:e0a:de4:a0e1:be24:11ff:febc:b5b5)
2024-09-03 22:48:50 +0000justsomeguy(~justsomeg@user/justsomeguy)
2024-09-03 22:50:22 +0000malte(~malte@mal.tc) (Remote host closed the connection)
2024-09-03 22:51:37 +0000malte(~malte@mal.tc)
2024-09-03 22:51:49 +0000peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds)
2024-09-03 22:57:03 +0000misterfish(~misterfis@84.53.85.146)
2024-09-03 22:57:46 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-03 23:02:42 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 246 seconds)
2024-09-03 23:06:35 +0000 <Axman6> magic_rb: generally, recursive functions don't get optimised away easily. the compiler needs to have some way to stop inlining, but when lists can be infinite its hard to know when. it might be possible if you explicitly used build/foldr fusion though.
2024-09-03 23:07:46 +0000 <davean> Axman6: I mean an obvious counter example is tail recursion.
2024-09-03 23:08:21 +0000 <davean> Certain recursive cases are trivially optimized away
2024-09-03 23:09:29 +0000 <Axman6> sure, but i'm not sure what mechanism would turn f a b c d = foldr g z [a,b,c,d] into the expansion of foldr at compile time.
2024-09-03 23:09:48 +0000vglfr(~vglfr@2601:14d:4e01:1370:aa26:2342:9c12:cd31) (Ping timeout: 276 seconds)
2024-09-03 23:10:27 +0000vglfr(~vglfr@c-73-163-164-68.hsd1.md.comcast.net)
2024-09-03 23:11:03 +0000 <davean> well it knows for sure the list is finite in that case.
2024-09-03 23:11:06 +0000 <c_wraith> I'm pretty sure GHC doesn't have a pass that does that, but it certainly *could* treat fixed-length list literals specially for optimization purposes. I'm just not sure it'd be worth the implementation cost.
2024-09-03 23:12:08 +0000 <davean> One could even add a RULE for that if one wanted it to work right now for sure.
2024-09-03 23:12:28 +0000 <c_wraith> It's possible a foldr/build would do something useful there, though, as that would erase the recursion entirely and GHC would just see it as a few function applications.
2024-09-03 23:12:29 +0000 <davean> its fixed enough I'd have to look at what the optimizer did, it can handle some cases like that from pure inlining.
2024-09-03 23:12:39 +0000 <davean> c_wraith: right
2024-09-03 23:13:33 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-03 23:13:38 +0000 <davean> This is also the sort of thing that tends not to be stable across GHC versions
2024-09-03 23:13:49 +0000 <Axman6> if the literal {a,b,c,d} turns into build (\(*) z -> a * b * c * d * z) then it might get optimised away
2024-09-03 23:14:13 +0000 <c_wraith> do literals get compiled like that?
2024-09-03 23:14:43 +0000 <Axman6> not sure
2024-09-03 23:14:47 +0000 <monochrom> "only one way to find out" :)
2024-09-03 23:14:55 +0000sawilagar(~sawilagar@user/sawilagar) (Ping timeout: 252 seconds)
2024-09-03 23:15:18 +0000 <Axman6> {} -> []
2024-09-03 23:15:52 +0000 <davean> So I will repeat that IME this sort of thing is very unstable across GHC versions
2024-09-03 23:17:04 +0000 <monochrom> That's fair.
2024-09-03 23:18:35 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
2024-09-03 23:18:50 +0000 <davean> Optimizations are great, but they're there to clean up your average code and so should target the best average improvements. Thus they're prone to tunning, and changes. Core peroformance critical code is best done directly.
2024-09-03 23:19:31 +0000 <c_wraith> My general philosophy is to write the code I want to run. Not some other code that I hope the compiler magically fixes for me. :)
2024-09-03 23:19:49 +0000oo_miguel(~Thunderbi@78.10.207.45) (Ping timeout: 248 seconds)
2024-09-03 23:19:56 +0000jespada(~jespada@r190-64-133-178.su-static.adinet.com.uy)
2024-09-03 23:20:04 +0000 <davean> c_wraith: right, for at least core stuff. I'm happy when I have a lot of code saying "it'll do a decent job on cleaning up this code that runs only a few times and isn't core"
2024-09-03 23:20:12 +0000 <davean> It should never be terrible!
2024-09-03 23:20:26 +0000 <c_wraith> I mean, in that case that's the code I want to run. Something simple where performance isn't critical
2024-09-03 23:20:31 +0000 <davean> but if someone wants to abstractly think about some business logic, I'm happy to expect it to be generally improved
2024-09-03 23:21:00 +0000 <davean> Just I better not care about any specific improvements
2024-09-03 23:24:52 +0000peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com)
2024-09-03 23:27:21 +0000machinedgod(~machinedg@d50-99-47-73.abhsia.telus.net)
2024-09-03 23:29:07 +0000acidjnk_new(~acidjnk@p200300d6e72cfb5469ca77b0637d5192.dip0.t-ipconnect.de)
2024-09-03 23:29:21 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-03 23:30:20 +0000bliminse(~bliminse@user/bliminse) (Ping timeout: 252 seconds)
2024-09-03 23:34:22 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
2024-09-03 23:36:13 +0000ZharMeny(~ZharMeny@user/ZharMeny) (Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.4))
2024-09-03 23:42:25 +0000bliminse(~bliminse@user/bliminse)
2024-09-03 23:45:08 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-03 23:50:45 +0000merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 276 seconds)
2024-09-03 23:51:47 +0000justsomeguy(~justsomeg@user/justsomeguy) (Quit: WeeChat 3.6)
2024-09-03 23:54:30 +0000misterfish(~misterfis@84.53.85.146) (Ping timeout: 246 seconds)
2024-09-03 23:58:11 +0000ystael(~ystael@user/ystael) (Ping timeout: 252 seconds)