Home liberachat/#haskell: Logs Calendar

Logs on 2023-01-14 (liberachat/#haskell)

00:00:13 mei_ joins (~mei@user/mei)
00:01:00 × Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection)
00:02:44 mizlan joins (~mizlan@131.179.76.218)
00:04:34 emmanuelux joins (~emmanuelu@user/emmanuelux)
00:07:12 × CoolMa7 quits (~CoolMa7@2a02:8109:9d40:14ea:f0d1:ec87:105d:bdfe) (Quit: Textual IRC Client: www.textualapp.com)
00:15:02 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
00:15:02 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
00:15:02 wroathe joins (~wroathe@user/wroathe)
00:16:37 mizlan_ joins (~mizlan@2607:f010:3fe:ffef::dc)
00:18:43 × mizlan quits (~mizlan@131.179.76.218) (Ping timeout: 265 seconds)
00:18:44 × mizlan_ quits (~mizlan@2607:f010:3fe:ffef::dc) (Read error: Connection reset by peer)
00:19:56 v0id_ptr joins (~adrift@user/ptr-frac7al/x-0038398)
00:21:16 mizlan joins (~mizlan@2607:f010:2e9:21:815f:f34d:f352:ec8a)
00:31:01 × stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
00:31:01 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
00:31:01 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
00:31:01 × chiselfu1e quits (~chiselfus@user/chiselfuse) (Remote host closed the connection)
00:31:43 chiselfuse joins (~chiselfus@user/chiselfuse)
00:32:09 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
00:32:25 merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl)
00:32:44 stiell_ joins (~stiell@gateway/tor-sasl/stiell)
00:33:35 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
00:35:26 × paulpaul1076 quits (~textual@95-29-5-111.broadband.corbina.ru) (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:37:40 johnw joins (~johnw@2600:1700:cf00:db0:31ce:cc5d:588b:a2f8)
00:38:00 paulpaul1076 joins (~textual@95-29-5-111.broadband.corbina.ru)
00:41:55 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
00:42:51 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
00:46:22 × talismanick quits (~talismani@campus-055-139.ucdavis.edu) (Ping timeout: 272 seconds)
00:49:10 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
00:49:47 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:54fb:433:f271:a472) (Remote host closed the connection)
00:50:06 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:54fb:433:f271:a472)
00:51:59 thyriaen joins (~thyriaen@2a01:aea0:dd4:4bae:6245:cbff:fe9f:48b1)
00:52:22 × chiselfuse quits (~chiselfus@user/chiselfuse) (Remote host closed the connection)
00:52:57 chiselfuse joins (~chiselfus@user/chiselfuse)
00:58:40 × mizlan quits (~mizlan@2607:f010:2e9:21:815f:f34d:f352:ec8a) (Ping timeout: 260 seconds)
01:05:47 × merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds)
01:07:09 Neuromancer joins (~Neuromanc@user/neuromancer)
01:08:30 razetime joins (~Thunderbi@117.193.3.1)
01:10:38 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
01:14:52 × elevenkb quits (~elevenkb@105.224.38.20) (Ping timeout: 272 seconds)
01:16:46 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
01:18:06 × paulpaul1076 quits (~textual@95-29-5-111.broadband.corbina.ru) (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:20:33 × zeenk quits (~zeenk@2a02:2f04:a014:8700::7fe) (Quit: Konversation terminated!)
01:23:27 × unit73e quits (~emanuel@2001:818:e8dd:7c00:656:e5ff:fe72:9d36) (Ping timeout: 252 seconds)
01:24:31 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
01:25:23 × troydm quits (~troydm@user/troydm) (Ping timeout: 264 seconds)
01:29:13 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 268 seconds)
01:32:56 mizlan joins (~mizlan@2607:f010:2a7:1005:4cc4:5084:ee79:3f1b)
01:37:09 × mizlan quits (~mizlan@2607:f010:2a7:1005:4cc4:5084:ee79:3f1b) (Ping timeout: 255 seconds)
01:53:16 ericjmorey[m] joins (~ericjmore@2001:470:69fc:105::7afc)
01:54:59 × lewisje quits (~lewisje@2001:470:1f11:14e:f874:d68f:347f:c7da) (Ping timeout: 256 seconds)
01:57:12 × thyriaen quits (~thyriaen@2a01:aea0:dd4:4bae:6245:cbff:fe9f:48b1) (Quit: Leaving)
01:57:28 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 252 seconds)
01:58:35 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
02:00:09 razetime1 joins (~Thunderbi@117.193.3.1)
02:00:10 × razetime quits (~Thunderbi@117.193.3.1) (Read error: Connection reset by peer)
02:00:10 razetime1 is now known as razetime
02:02:55 lewisje joins (~lewisje@2001:470:1f11:14e:6808:94ac:b726:e7c2)
02:04:50 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection)
02:17:43 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:54fb:433:f271:a472) (Remote host closed the connection)
02:18:55 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
02:19:24 × beteigeuze quits (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 260 seconds)
02:21:29 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 265 seconds)
02:24:18 notzmv joins (~zmv@user/notzmv)
02:28:28 ntphillyboi joins (~ntpa@2600:4040:2cc3:9300:6933:890:4a54:c6d)
02:29:40 ntphillyboi parts (~ntpa@2600:4040:2cc3:9300:6933:890:4a54:c6d) (WeeChat 3.7.1)
02:31:06 ntphillyboi joins (~ntpa@2600:4040:2cc3:9300:6933:890:4a54:c6d)
02:32:53 <Inst> i feel like i'm doing something wrong
02:33:02 <Inst> i think i just beat C / Rust with Haskell?
02:33:29 <ggVGc> beat in what way?
02:33:52 <ggVGc> If you generate a huge list of numbers and print it, Haskell will probably "win" because of laziness
02:33:56 <Inst> i'm trying to benchmark a naked for loop with no contents over 1 billion iterations
02:33:57 <ggVGc> but that's a strange comparison to make
02:34:13 <ggVGc> that's quite a useless benchmark
02:34:16 <Inst> obviously, Rust will optimize the loop away on any settings
02:34:31 <Inst> except debug
02:34:42 <ggVGc> what are you actually expecting to be measuring with this?
02:34:59 <Inst> raw arithmetic
02:35:10 <Inst> i used magichash on Haskell with GHC.Types and GHC.Prim
02:35:24 <Inst> it seems ridiculous, the best I got with boxed was 4.5x C / Rust under O0
02:35:49 <ggVGc> an empty loop doesn't test any arithmetic though?
02:35:52 <Inst> with unboxed, I'm 1/7th C, which seems, like I said, absolutely ridiculous, more so because I'm running two operations each time
02:35:59 <Inst> the counter
02:36:30 <Inst> for (int i = 0; i <= 1000000000; i++) {}
02:37:01 <Inst> well, closer to 1/3rd C
02:38:29 <int-e> . o O ( The 90s called, the want their benchmarks back. )
02:38:43 <monochrom> This is obviously I/O-bound or, even worse, OS-bound.
02:39:18 <Inst> i must be doing something wrong
02:39:20 <Inst> https://pastebin.com/FVeBJi0q
02:39:23 <int-e> gcc optimized that loop away for me. As it should.
02:39:28 <monochrom> Even if you argue that printf and show need arithmetic to convert numbers to strings, those are dwarved by just making syscalls for printing anything at all.
02:40:02 <Inst> C code
02:40:03 <Inst> https://pastebin.com/fRnHBXye
02:40:14 <Inst> i get about 2 seconds after i ignore the sleeps
02:40:20 <Inst> Rust is something similar in debug mode
02:40:41 <Inst> RTS profiler reports 0.689 seconds for Haskell
02:41:12 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:54fb:433:f271:a472)
02:42:40 harveypwca joins (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67)
02:42:40 mimmy_ joins (~mimmy@86.48.15.173)
02:43:20 <Inst> any idea why this stupid thing is happening? I hand removed the for loop, got a 3 second delay, with it, i have a 2 second delay
02:43:30 <Inst> probably OS bound, can't be IO bound since only the Haskell version is actually printing anything
02:43:47 × johnw quits (~johnw@2600:1700:cf00:db0:31ce:cc5d:588b:a2f8) (Quit: ZNC - http://znc.in)
02:45:01 <Inst> with the for loop, i have a 5 second delay between the timers
02:45:36 johnw joins (~johnw@2600:1700:cf00:db0:b438:9e21:5677:dc85)
02:46:12 <int-e> FWIW, gcc without optimization puts the counter on the stack (in memory); ghc with optimization puts it into a register.
02:47:09 <int-e> But that shouldn't distract from the fact that this is a pretty useless comparison.
02:49:46 <Inst> int-e: well, in what other benchmarks can you get Haskell to beat C without laziness?
02:50:44 <Inst> anyways, i'm just trying to figure out if I did anything wrong with the benchmark; it sounds like it's legit(imately useless), but it's baby's first "beating C with Haskell"
02:51:19 <int-e> But you're not doing that. Using gcc, compile with -O and C will no longer be slower. Compiler with -O2 and the whole loop will be dropped and the program runs instantly.
02:51:59 <int-e> clang -O drops the loop, no -O2 needed.
02:52:16 <Inst> okay,l i'll try -O
02:53:35 <int-e> Anyway, I never expect to beat C code performance when I use Haskell. I expect to write far less code, especially when there's an opportunity for lazy evaluation.
02:56:22 irrgit__ joins (~irrgit@146.70.27.242)
02:57:47 × jero98772 quits (~jero98772@2800:484:1d80:d8ce:9815:cfda:3661:17bb) (Remote host closed the connection)
02:59:15 × mimmy_ quits (~mimmy@86.48.15.173) (Ping timeout: 268 seconds)
02:59:39 × irrgit_ quits (~irrgit@146.70.27.250) (Ping timeout: 260 seconds)
03:00:31 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
03:01:48 <Inst> i know, Haskell isn't intended as a speed demon, it's just surprisingly fast at times
03:02:20 <Inst> -O is 317 ms vs like 660 ms on Haskell
03:02:31 merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl)
03:02:47 <Inst> i can cheat and O1 and get about the same performance, but this is an extremely contrived case
03:05:12 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
03:05:14 × Kaipei quits (~Kaiepi@nwcsnbsc03w-47-55-159-86.dhcp-dynamic.fibreop.nb.bellaliant.net) (Ping timeout: 246 seconds)
03:05:23 × segfaultfizzbuzz quits (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) (Ping timeout: 252 seconds)
03:05:42 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 272 seconds)
03:06:20 × cheater quits (~Username@user/cheater) (Ping timeout: 272 seconds)
03:09:48 <Inst> and -O0 with a simple and useless countdown loop gives me the exact same thing
03:09:55 Inst shrugs, thanks for explaining
03:16:42 <Axman6> Inst: you might enjoy dons' posts https://donsbot.com/2008/05/06/write-haskell-as-fast-as-c-exploiting-strictness-laziness-and-recursion/
03:17:16 <Inst> it was just a side effect of me trying to figure out what the cost was of function calls in Haskell, except that's not even a coherent question
03:21:52 razetime1 joins (~Thunderbi@117.254.35.81)
03:22:37 irrgit_ joins (~irrgit@86.106.90.226)
03:23:18 × razetime quits (~Thunderbi@117.193.3.1) (Ping timeout: 268 seconds)
03:23:19 razetime1 is now known as razetime
03:25:40 mimmy_ joins (~mimmy@86.48.15.174)
03:25:54 × irrgit__ quits (~irrgit@146.70.27.242) (Ping timeout: 260 seconds)
03:28:12 ix joins (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe)
03:28:23 × xff0x_ quits (~xff0x@2405:6580:b080:900:33f6:9250:43b6:b1c7) (Ping timeout: 264 seconds)
03:28:58 <Inst> thanks axman6, but in testing it seems iterate' and foldl' work best if you care about performance
03:28:59 abhixec joins (~abhinav@c-67-169-139-16.hsd1.ca.comcast.net)
03:30:12 xff0x_ joins (~xff0x@178.255.149.135)
03:32:18 × mimmy_ quits (~mimmy@86.48.15.174) (Ping timeout: 272 seconds)
03:32:43 <Axman6> you'd actually learn something about performance if you read his posts
03:33:34 <Axman6> https://donsbot.com/tag/performance/ has so much great stuff, even if much of it is a decade old now, it's mostly all still relevant, and performance should have improved and built on these ideas over the years
03:35:25 × ix quits (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Ping timeout: 252 seconds)
03:36:11 × merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 264 seconds)
03:45:26 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
03:46:44 mimmy_ joins (~mimmy@86.48.15.173)
03:54:11 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
03:54:11 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
03:54:11 finn_elija is now known as FinnElija
03:54:29 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds)
03:54:56 Guest5 joins (~Guest5@68.175.140.227)
03:54:57 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
03:57:25 × Guest5 quits (~Guest5@68.175.140.227) (Client Quit)
03:58:36 × harveypwca quits (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving)
03:59:39 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 252 seconds)
04:00:14 × td_ quits (~td@83.135.9.14) (Ping timeout: 246 seconds)
04:00:55 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 268 seconds)
04:02:15 td_ joins (~td@83.135.9.53)
04:02:33 × oldfashionedcow quits (~Rahul_San@user/oldfashionedcow) (Quit: WeeChat 3.7.1)
04:10:27 eruditass joins (uid248673@id-248673.uxbridge.irccloud.com)
04:12:18 rnat joins (uid73555@id-73555.lymington.irccloud.com)
04:18:52 × justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 252 seconds)
04:20:31 × xff0x_ quits (~xff0x@178.255.149.135) (Ping timeout: 252 seconds)
04:22:26 xff0x_ joins (~xff0x@2405:6580:b080:900:33f6:9250:43b6:b1c7)
04:26:12 × abhixec quits (~abhinav@c-67-169-139-16.hsd1.ca.comcast.net) (Ping timeout: 268 seconds)
04:29:41 shriekingnoise_ joins (~shrieking@186.137.175.87)
04:31:10 Lycurgus joins (~juan@user/Lycurgus)
04:32:26 × shriekingnoise quits (~shrieking@186.137.175.87) (Ping timeout: 246 seconds)
04:36:44 abhixec joins (~abhinav@c-67-169-139-16.hsd1.ca.comcast.net)
04:37:10 × Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt: personae.ai-integration.biz)
04:39:33 <Inst> it's don stewart, he's a Haskell god, and in production
04:42:43 <EvanR> .oO( patron saint of haskell? )
04:43:31 <EvanR> .oO( someone should compile the codex of minor demons of haskell )
04:44:42 <Inst> i'm working with friends on FP discord on trying to translate primeswing factorialization to Haskell
04:44:54 alfonsox joins (~quassel@103.87.57.33)
04:45:07 <Inst> the foldb someone gave me, I think it was int-e? only gets up to 400% of Julia's C-FFI to GMP
04:45:20 <Inst> it turns out that Haskell is unusual among major languages since we don't have a GMP FFI factorial
04:45:32 <Inst> I want to see how good a native Haskell factorial does vs a FFI to GMP
04:45:47 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
04:49:48 <EvanR> you can FFI to it if you want
04:51:29 <EvanR> actually someone made the bindings already
04:51:44 <EvanR> https://hackage.haskell.org/package/hgmp-0.1.2.1
04:52:22 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
05:03:22 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
05:04:07 chexum joins (~quassel@gateway/tor-sasl/chexum)
05:04:39 troydm joins (~troydm@user/troydm)
05:05:04 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 260 seconds)
05:10:26 × waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 255 seconds)
05:19:34 talismanick joins (~talismani@2601:200:c181:8250::ce24)
05:24:00 ix joins (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe)
05:26:06 Kaipei joins (~Kaiepi@nwcsnbsc03w-47-55-159-86.dhcp-dynamic.fibreop.nb.bellaliant.net)
05:26:07 thongpv87 joins (~thongpv87@2402:9d80:36a:6294:46fa:2a59:5081:c2ff)
05:27:04 × thongpv quits (~thongpv87@2402:9d80:3bd:68e:7af8:9a7e:452b:164c) (Ping timeout: 252 seconds)
05:28:45 × ix quits (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Ping timeout: 260 seconds)
05:30:42 × Kaipei quits (~Kaiepi@nwcsnbsc03w-47-55-159-86.dhcp-dynamic.fibreop.nb.bellaliant.net) (Ping timeout: 255 seconds)
05:31:18 × ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
05:32:01 ec joins (~ec@gateway/tor-sasl/ec)
05:32:25 merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl)
05:32:53 <Inst> oh wow
05:32:54 Inst sighs
05:41:28 × monochrom quits (trebla@216.138.220.146) (Quit: NO CARRIER)
05:41:30 × razetime quits (~Thunderbi@117.254.35.81) (Ping timeout: 272 seconds)
05:43:44 × whatsupdoc quits (uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
05:49:41 × abhixec quits (~abhinav@c-67-169-139-16.hsd1.ca.comcast.net) (Quit: leaving)
05:51:15 <Inst> thanks EvanR
05:58:05 monochrom joins (trebla@216.138.220.146)
06:00:08 × phma quits (~phma@host-67-44-208-213.hnremote.net) (Read error: Connection reset by peer)
06:00:29 × mimmy_ quits (~mimmy@86.48.15.173) (Ping timeout: 260 seconds)
06:01:02 phma joins (phma@2001:5b0:211f:9a8:4ecd:10c6:a18f:491e)
06:06:41 × merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 255 seconds)
06:13:10 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 272 seconds)
06:32:00 × rnat quits (uid73555@id-73555.lymington.irccloud.com) (Quit: Connection closed for inactivity)
06:33:45 freeside joins (~mengwong@122.11.214.91)
06:37:47 mizlan joins (~mizlan@2607:f010:2a7:1005:4cc4:5084:ee79:3f1b)
06:42:08 × mizlan quits (~mizlan@2607:f010:2a7:1005:4cc4:5084:ee79:3f1b) (Ping timeout: 260 seconds)
06:43:32 × echoreply quits (~echoreply@45.32.163.16) (Quit: WeeChat 2.8)
06:43:51 × thongpv87 quits (~thongpv87@2402:9d80:36a:6294:46fa:2a59:5081:c2ff) (Read error: Connection reset by peer)
06:44:01 echoreply joins (~echoreply@2001:19f0:9002:1f3b:5400:ff:fe6f:8b8d)
06:44:36 thongpv87 joins (~thongpv87@113.176.74.88)
06:45:41 × freeside quits (~mengwong@122.11.214.91) (Read error: Connection reset by peer)
06:51:43 × wroathe quits (~wroathe@user/wroathe) (Quit: leaving)
06:59:33 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
06:59:53 abhixec joins (~abhinav@c-67-169-139-16.hsd1.ca.comcast.net)
07:12:27 × v0id_ptr quits (~adrift@user/ptr-frac7al/x-0038398) (Ping timeout: 260 seconds)
07:17:09 × laalyn quits (~laalyn@c-73-241-126-7.hsd1.ca.comcast.net) (Quit: Client closed)
07:19:40 × thongpv87 quits (~thongpv87@113.176.74.88) (Ping timeout: 272 seconds)
07:22:54 laalyn joins (~laalyn@c-73-241-126-7.hsd1.ca.comcast.net)
07:23:36 <jackdk> Why would we have GMP bindings? The whole point of Haskell is to write ever more elegant factorial functions.
07:24:42 takuan joins (~takuan@178-116-218-225.access.telenet.be)
07:31:21 elevenkb joins (~elevenkb@105.224.38.20)
07:32:48 × thegeekinside quits (~thegeekin@189.217.82.244) (Read error: Connection reset by peer)
07:35:45 thongpv87 joins (~thongpv87@113.176.74.88)
07:44:26 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
07:46:20 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
07:47:51 mizlan joins (~mizlan@2607:f010:2a7:1005:4cc4:5084:ee79:3f1b)
07:48:10 × elevenkb quits (~elevenkb@105.224.38.20) (Ping timeout: 272 seconds)
07:51:04 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
07:51:53 × mizlan quits (~mizlan@2607:f010:2a7:1005:4cc4:5084:ee79:3f1b) (Ping timeout: 246 seconds)
07:57:34 cheater joins (~Username@user/cheater)
07:59:32 <ephemient> https://gmplib.org/manual/Factorial-Algorithm the fast algorithm isn't elegant
08:02:18 mizlan joins (~mizlan@2607:f010:2a7:1005:4cc4:5084:ee79:3f1b)
08:03:03 merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl)
08:05:00 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:54fb:433:f271:a472) (Remote host closed the connection)
08:05:02 trev_ joins (~trev@109.252.35.99)
08:05:24 ChepitoSaurio joins (~email@187.244.125.172)
08:06:07 × ChepitoSaurio quits (~email@187.244.125.172) (Remote host closed the connection)
08:08:18 × eruditass quits (uid248673@id-248673.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
08:10:14 razetime joins (~Thunderbi@117.254.34.157)
08:13:38 × mizlan quits (~mizlan@2607:f010:2a7:1005:4cc4:5084:ee79:3f1b) (Ping timeout: 246 seconds)
08:15:03 × laalyn quits (~laalyn@c-73-241-126-7.hsd1.ca.comcast.net) (Quit: Client closed)
08:15:15 laalyn joins (~laalyn@c-73-241-126-7.hsd1.ca.comcast.net)
08:17:30 cheater_ joins (~Username@user/cheater)
08:17:38 gmg joins (~user@user/gehmehgeh)
08:18:09 × cheater quits (~Username@user/cheater) (Ping timeout: 260 seconds)
08:18:15 cheater_ is now known as cheater
08:18:25 <mei_> i did a clean install in windows, now it's fine, thanks for fixing ghcup
08:20:56 mei joins (~mei@user/mei)
08:23:35 × mei_ quits (~mei@user/mei) (Ping timeout: 264 seconds)
08:32:45 <maerwald> mei: https://opencollective.com/ghcup :p
08:34:29 lisbeths joins (uid135845@id-135845.lymington.irccloud.com)
08:35:38 razetime1 joins (~Thunderbi@117.193.6.209)
08:36:56 × razetime quits (~Thunderbi@117.254.34.157) (Ping timeout: 272 seconds)
08:36:56 razetime1 is now known as razetime
08:40:26 × Techcable quits (~Techcable@user/Techcable) (Ping timeout: 252 seconds)
08:43:16 razetime1 joins (~Thunderbi@117.254.34.75)
08:44:32 × razetime quits (~Thunderbi@117.193.6.209) (Ping timeout: 272 seconds)
08:44:32 razetime1 is now known as razetime
08:44:36 jinsun is now known as Guest2057
08:44:36 jinsun__ joins (~jinsun@user/jinsun)
08:44:36 × Guest2057 quits (~jinsun@user/jinsun) (Killed (copper.libera.chat (Nickname regained by services)))
08:44:37 jinsun__ is now known as jinsun
08:46:58 mizlan joins (~mizlan@2607:f010:2a7:1005:4cc4:5084:ee79:3f1b)
08:50:08 Techcable joins (~Techcable@user/Techcable)
08:51:38 × mizlan quits (~mizlan@2607:f010:2a7:1005:4cc4:5084:ee79:3f1b) (Ping timeout: 260 seconds)
08:52:31 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
08:52:55 chexum joins (~quassel@gateway/tor-sasl/chexum)
08:54:04 Midjak joins (~Midjak@82.66.147.146)
09:05:28 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:54fb:433:f271:a472)
09:06:25 libertyprime joins (~libertypr@203.96.203.167)
09:08:08 mizlan joins (~mizlan@2607:f010:2a7:1005:4cc4:5084:ee79:3f1b)
09:09:51 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:54fb:433:f271:a472) (Ping timeout: 252 seconds)
09:12:11 × mizlan quits (~mizlan@2607:f010:2a7:1005:4cc4:5084:ee79:3f1b) (Ping timeout: 248 seconds)
09:17:11 × talismanick quits (~talismani@2601:200:c181:8250::ce24) (Ping timeout: 252 seconds)
09:19:22 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 272 seconds)
09:21:14 Tuplanolla joins (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi)
09:29:02 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
09:30:32 azimut joins (~azimut@gateway/tor-sasl/azimut)
09:38:01 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
09:38:26 azimut joins (~azimut@gateway/tor-sasl/azimut)
09:42:05 mechap joins (~mechap@user/mechap)
09:42:21 × tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
09:42:22 mizlan joins (~mizlan@2607:f010:2a7:1005:4cc4:5084:ee79:3f1b)
09:43:51 <VOID[m]> Fellas, is it possible to write idiomatic code that'd be compiled to vector instructions?
09:43:51 <VOID[m]> I wrote code in Haskell, then I wrote code in BQN and optimized the fuck out of it, I'd love to bring Haskell version up to speed, but BQN uses vector instructions to process all data at once, which takes a third of the time my recursive algorithm in Haskell takes
09:50:43 <Hecate> I believe carter's comment from 2015 still holds https://stackoverflow.com/a/30634322/2936186
09:50:51 <Hecate> VOID[m]: ^
09:51:26 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
09:51:49 <VOID[m]> thank you, that makes sense
09:52:39 <VOID[m]> do you think I could compete with vectorized code despite this?
09:52:39 <VOID[m]> The task is given list of digits find biggest number divisible by 3 composed of them
09:53:35 <VOID[m]> current best is 1.6ms in Haskell (but I think I might be able to optimize the algorithm) and 0.5ms in BQN (so mostly vectorized instructions)
09:53:36 <VOID[m]> per 1000 cases
09:54:42 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
09:56:01 <[exa]> VOID[m]: Accelerate might help
09:56:03 <Hecate> VOID[m]: From what I recall, without SIMD primops you're not going to get very far. My advice is to write some C code that uses the AVX2 (or w/e) instructions
09:56:07 <Hecate> oh
09:56:32 <Hecate> VOID[m]: yes you can try Accelerate if it fits your case: https://flora.pm/packages/@hackage/accelerate
09:56:37 <[exa]> also, AFAIK repa optimizes pretty well, if it's array ops
09:57:01 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
09:58:33 <[exa]> (notably, see source of this https://hackage.haskell.org/package/repa-examples )
09:58:38 <VOID[m]> Hecate: I feel like using C defeats the point of the optimization challenge. I want to understand the languages I am using better. Also, manually written low level instruction will always win, which would make this very borring :P
09:59:03 <[exa]> (also, repa is much much smaller cannon than Accelerate and might do 99% of the task just right)
09:59:16 <VOID[m]> [exa]: BQN does only use one thread, so prallelization could very well give Haskell an edge
09:59:42 <[exa]> VOID[m]: well that's not entirely fair comparison but if it parallelizes for free.. :]
10:00:00 <VOID[m]> IMO if vector instructions are fair game...
10:00:05 <[exa]> VOID[m]: also REPA basically passes the code through llvm to generate a pretty good SIMD
10:00:10 <[exa]> see the `llvm` flag there
10:00:45 <VOID[m]> Also, as long as I am not just doing low level threads, I feel like if I am using functional aspects of Haskell to get effortless parallelization it is VERY fair
10:00:54 albet70 parts (~xxx@2400:8902::f03c:92ff:fe60:98d8) ()
10:01:00 <[exa]> true.
10:01:36 <[exa]> it's "speed vs. resources consumed" and I always forget to account for programmers consumed in the process.
10:01:37 <VOID[m]> I am not sure what you mean by "much smaller cannon"...
10:01:54 <[exa]> VOID[m]: the package footprint is not that big
10:02:20 <[exa]> btw do you have some usecase that you want to accelerate?
10:02:45 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
10:02:52 <Hecate> VOID[m]: I can also advise looking into SWAR
10:02:54 <Hecate> https://haskell-works.github.io/posts/2018-08-08-data-parallel-rank-select-bit-string-construction.html
10:04:59 × niko quits (niko@libera/staff/niko) (Ping timeout: 624 seconds)
10:05:30 <VOID[m]> I have a theoretical problem, and I am trying to implement it in various languages that I feel fit the problem well, I don't actually have a practical use case, just honing my skills, getting more familiar with strengths and weaknesses of languages I love
10:05:50 <[exa]> ah ok
10:07:20 elevenkb joins (~elevenkb@105.224.38.20)
10:10:49 <VOID[m]> Repa, Accelerate and SWAR, I'll check those out, thank you very much for tips
10:10:55 <eldritchcookie[4> i get this error... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/0115b092573ff5e8c43df0d63f142ccca7ea11eb>)
10:11:26 <eldritchcookie[4> i do have a Allegro.FFI.Types module
10:11:51 <eldritchcookie[4> does anyone know why it doesn't find the .chi file?
10:13:12 Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542)
10:13:39 <[exa]> eldritchcookie[4: .chi should have been generated by c2hs run
10:14:23 <[exa]> any messages/warnings from c2hs?
10:16:11 <[exa]> chances are that the file might have been generated to some other location, at which point you need to either specify --output or point it to the correct .chi with --include=...
10:16:22 <eldritchcookie[4> no. i can only assume it tried to generate first either Events or Display before Types.
10:18:50 <[exa]> interesting
10:19:15 <[exa]> I never used this for anything larger than 1 header file, so no idea tbh, others might know more.
10:19:39 <eldritchcookie[4> looking at ls dist-newstyle/build/x86_64-linux/ghc-9.4.2/allegro5-0.0.0/build/Allegro/FFI/ returns nothing so i can only assume it didn't generate anything
10:20:13 <[exa]> can you check the logs to see if it was ever ran on Types?
10:22:24 <eldritchcookie[4> how do i do that?
10:23:51 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
10:25:05 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds)
10:25:41 ec joins (~ec@gateway/tor-sasl/ec)
10:31:35 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
10:35:11 × thongpv87 quits (~thongpv87@113.176.74.88) (Ping timeout: 256 seconds)
10:35:44 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 246 seconds)
10:38:01 × elevenkb quits (~elevenkb@105.224.38.20) (Ping timeout: 256 seconds)
10:40:15 × _xor quits (~xor@74.215.182.83) (Read error: Connection reset by peer)
10:41:01 Guest|50 joins (~Guest|50@159.196.13.26)
10:41:54 Guest|50 parts (~Guest|50@159.196.13.26) ()
10:44:10 × lisbeths quits (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
10:44:51 _xor joins (~xor@74.215.182.83)
10:45:43 × mizlan quits (~mizlan@2607:f010:2a7:1005:4cc4:5084:ee79:3f1b) (Ping timeout: 260 seconds)
10:49:18 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 272 seconds)
10:51:49 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
10:52:36 thongpv87 joins (~thongpv87@2402:9d80:38a:8ce8:d089:d4c6:5f25:8cc4)
10:56:25 <eldritchcookie[4> reordering the modules solves the problem
10:56:55 <[exa]> ah nice, so it was deps
10:56:58 <[exa]> interesting.
10:57:17 × Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection)
10:57:21 <[exa]> btw if c2hs docs don't point this out somewhere (at least implicitly) it might be worth to open a doc issue there
10:58:23 <eldritchcookie[4> yes. will do that
11:01:15 mizlan joins (~mizlan@2607:f010:2a7:1005:4cc4:5084:ee79:3f1b)
11:02:03 × libertyprime quits (~libertypr@203.96.203.167) (Ping timeout: 252 seconds)
11:02:39 × mechap quits (~mechap@user/mechap) (Quit: WeeChat 3.8)
11:02:51 × panovia quits (~user@user/siracusa) (Quit: Bye!)
11:05:26 × mizlan quits (~mizlan@2607:f010:2a7:1005:4cc4:5084:ee79:3f1b) (Ping timeout: 246 seconds)
11:06:10 <Axman6> VOID[m]: Using thew LLVM backend it's possible get vector instructions for loops etc.
11:07:02 × elkcl quits (~elkcl@broadband-188-255-19-11.ip.moscow.rt.ru) (Ping timeout: 272 seconds)
11:08:02 <Axman6> Second time today linking to dons' blog - VOID[m] see https://donsbot.com/2010/03/01/evolving-faster-haskell-programs-now-with-llvm/; old but still relevant
11:09:06 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
11:10:35 zeenk joins (~zeenk@2a02:2f04:a014:8700::7fe)
11:14:09 <VOID[m]> vector instructions for regular, recursive way of doing Haskell loops? Or just some special cases?
11:14:10 <VOID[m]> I'll read the blog
11:14:17 <VOID[m]> thank you very much
11:15:27 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
11:17:46 fizbin joins (~fizbin@user/fizbin)
11:18:31 <eldritchcookie[4> ok i am not able to compile my code which i wasted a whole day in, c2hs is fun 🙃 .
11:18:31 <fizbin> I need someone else's eyes to double-check something I'm seeing about the base haddock.
11:18:45 <Hecate> fizbin: shoot
11:18:56 <fizbin> Look at the definition of Applicative: https://hackage.haskell.org/package/base-4.17.0.0/docs/Prelude.html#t:Applicative
11:19:02 <eldritchcookie[4> sure send the link
11:19:10 <Hecate> hahaha
11:19:36 <Hecate> (ok it's not the bit about Applicative that I dislike)
11:19:42 <Hecate> fizbin: what's the problem?
11:19:59 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 268 seconds)
11:20:18 <fizbin> Am I blind, or is liftA2 not listed as a method of that typeclass, even though an acceptable minimal complete definition of Applicative is just "pure" and "liftA2"
11:21:13 <fizbin> As far as I can tell, the source lists liftA2 correctly as a method and there's nothing in the haddock comments that would hide liftA2 from the method list.
11:21:31 <eldritchcookie[4> it isn't listed there
11:21:48 <Hecate> fizbin: it's not the first time I see this behaviour
11:22:02 <Hecate> https://hackage.haskell.org/package/base-4.17.0.0/docs/Data-Ix.html#t:Ix
11:22:09 <Hecate> there is no "unsafeIndex" listed
11:22:14 <ncf> i think it's just because Prelude doesn't export liftA2?
11:23:07 <ncf> if you click liftA2 you'll be taken to the actual class definition in Control.Applicative
11:23:08 × gmg quits (~user@user/gehmehgeh) (Ping timeout: 255 seconds)
11:23:32 <mauke> neat
11:23:43 <fizbin> Ah!
11:23:44 tremon joins (~tremon@83-85-213-108.cable.dynamic.v4.ziggo.nl)
11:24:09 titibandit1 joins (~titibandi@xdsl-81-173-160-143.nc.de)
11:24:13 <Axman6> VOID[m]: you might need to read a few of his older posts, particularly about stream fusion
11:24:42 <ncf> it might be better if Prelude.html was just an index of the exported things without any documentation
11:24:59 <ncf> but hoogle often links to Prelude.html first...
11:25:34 gmg joins (~user@user/gehmehgeh)
11:25:39 <Hecate> fizbin: yep it really does seem to be a matter of re-exports
11:26:21 <fizbin> Yeah, to get unsafeIndex listed you need to look at https://hackage.haskell.org/package/base-4.17.0.0/docs/GHC-Arr.html#t:Ix
11:36:58 mizlan joins (~mizlan@2607:f010:2a7:1005:4cc4:5084:ee79:3f1b)
11:40:09 <Hecate> ayup
11:43:15 × fizbin quits (~fizbin@user/fizbin) (Ping timeout: 260 seconds)
11:43:17 trev_ is now known as trev
11:43:31 × trev quits (~trev@109.252.35.99) (Changing host)
11:43:31 trev joins (~trev@user/trev)
11:48:46 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 252 seconds)
11:56:27 <zebrag[m]> https://paste.debian.net/1267171/
11:57:34 <zebrag[m]> Using the code above I'm trying to pen and paper eval `DB $ \i -> App (unDB x i) (unDB y i)`
11:59:27 <zebrag[m]> the article I'm taking the code from is https://bentnib.org/unembedding.html
11:59:39 × razetime quits (~Thunderbi@117.254.34.75) (Remote host closed the connection)
12:00:33 <zebrag[m]> Robert Atkey, Sam Lindley, and Jeremy Yallop. Unembedding domain-specific languages.
12:01:14 mmhat joins (~mmh@p200300f1c7123c28ee086bfffe095315.dip0.t-ipconnect.de)
12:01:24 × mmhat quits (~mmh@p200300f1c7123c28ee086bfffe095315.dip0.t-ipconnect.de) (Client Quit)
12:02:49 <zebrag[m]> Maybe I should go all the way to https://bentnib.org/syntaxforfree.html to understand what they are talking about.
12:04:12 <Axman6> what don't you understand about that expression?
12:05:01 <zebrag[m]> The only translation I've been able to do so far is `lam (\x -> x)` into `DB $ \i -> Lam (Var 0)`
12:05:02 <Axman6> that line could also be written: app (DB x) (DB y) = DB $ \i -> App (x i) (y i)
12:05:44 <Axman6> all unDB does is unwrap a DB, it pulls out the function inside
12:05:44 <zebrag[m]> (thinking)
12:08:12 <Axman6> how the maths in \j -> Var (j - (i + 1)) works I'm not sure, but this feels like De Bruijn indices?
12:08:33 <zebrag[m]> yes
12:09:06 <zebrag[m]> I'm still trying to understand sth you wrote 2 lines above, I still need 1 min
12:10:10 <Axman6> you understand that unDB (DB f) == f, yeah?
12:10:26 <zebrag[m]> yes
12:10:30 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
12:11:16 <zebrag[m]> you substitute x by BD x, and it's all right
12:11:27 <zebrag[m]> but I still need look at it a bit
12:11:36 <zebrag[m]> stare at it
12:13:08 <zebrag[m]> starting to undersatnd, hang on
12:17:34 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
12:17:53 <zebrag[m]> Axman6 what made you think that you could start your computation with `app (DB x) (DB y)` instead of `app x y`? My initial formula being `lam (\x -> lam (\y -> app x y))`
12:18:44 <zebrag[m]> I think it's part of the translation porcess...
12:18:51 <Axman6> I was talking about the definition of app: app x y = DB $ \i -> App (unDB x i) (unDB y i) == app (DB x) (DB y) = DB $ \i -> App (x i) (y i)
12:19:00 <Axman6> these are identical implementations of that function
12:19:12 <ncf> DB and unDB are essentially just noise
12:19:21 <Axman6> yep
12:19:51 <ncf> you should understand that line as app x y = \ i -> App (x i) (y i)
12:20:24 <ncf> (and you might recognise this as liftA2 App for the Reader Int applicative)
12:21:46 <zebrag[m]> provided the domain of lam is newtype DB
12:22:46 <zebrag[m]> and that might be implicit when we say instance UntypedLambda DB where?
12:22:55 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds)
12:23:25 <Axman6> I don't understand what you're asking
12:23:35 <zebrag[m]> that might be that
12:23:37 <ncf> in the instance UntypedLambda DB, you have lam :: (DB -> DB) -> DB (substituting DB for exp)
12:23:56 <zebrag[m]> yes, that's the part I've overlooked
12:23:57 <ncf> in other words, lam :: ((Int -> DBTerm) -> (Int -> DBTerm)) -> Int -> DBTerm
12:24:40 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds)
12:24:59 harveypwca joins (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67)
12:25:13 <Axman6> I'm confused that you find ap confusing and not the much more complicated definition of lam :P
12:25:19 <Axman6> app*
12:25:45 fizbin joins (~fizbin@user/fizbin)
12:26:04 <zebrag[m]> Thanks a lot Axman6 ncf
12:26:05 <carter> Hecate: yup. Also suppp
12:26:26 <zebrag[m]> Axman6: yes, I was quite confused
12:26:41 <Axman6> anyone here familiar with the worksing of hadrian and building ghc in general? Not getting much help in #ghc
12:28:24 <carter> Isn’t that about how you do the configure step? … thought a lot of how I’d do it was in the old make system
12:29:23 paulpaul1076 joins (~textual@95-29-5-111.broadband.corbina.ru)
12:31:50 <eldritchcookie[4> is there any template haskell to generate storable instances and foreign imports ?
12:32:01 <eldritchcookie[4> i hate preprocessors
12:35:47 <Axman6> I'm trying to figure out how to compile ghc using the NCG, and then run the tests by compiling with llvm
12:39:33 × mizlan quits (~mizlan@2607:f010:2a7:1005:4cc4:5084:ee79:3f1b) (Ping timeout: 255 seconds)
12:41:26 CiaoSen joins (~Jura@p200300c9574fa4002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
12:45:45 <fizbin> There isn't an alternative to 'succ' that works out to "\x -> Just (succ x) if that doesn't error, otherwise Nothing", is there?
12:46:49 <ncf> https://hackage.haskell.org/package/prelude-safeenum-0.1.1.3/docs/Prelude-SafeEnum.html
12:47:36 <ncf> if you have Bounded and Eq as well you can check for maxBound
12:48:45 × img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
12:49:03 img joins (~img@user/img)
12:54:26 <eldritchcookie[4> is there any way to portably get a c structs offsets besides compiling a c program with gcc using offsetof?
12:57:02 <jackdk> doubt it, isn't the answer to that question "however the compiler lays it out"? I imagine a configure script would detect such things
12:57:36 <[exa]> eldritchcookie[4: I think that is super architecture- and standard- dependent
12:58:59 <Benzi-Junior> I have a list [(a,Bool)] and I want a list [a] whith those elements that are tupled with True
12:59:37 <Benzi-Junior> I know the first step is: (filter snd)
12:59:41 × CiaoSen quits (~Jura@p200300c9574fa4002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
13:00:17 <eldritchcookie[4> and the second is fmap fst
13:00:50 <Benzi-Junior> eldritchcookie[4, ahh fmap , I was stuck on map
13:00:58 <carter> eldritchcookie[4: there’s c2hs and related tools that work really well. Hsc2hs
13:01:22 <carter> Those are the two really mature options for getting that info per platform you’re building on
13:01:38 <aaronv> :t mapMaybe
13:01:39 <lambdabot> (a -> Maybe b) -> [a] -> [b]
13:01:47 mizlan joins (~mizlan@2607:f010:2a7:1005:4cc4:5084:ee79:3f1b)
13:01:57 <carter> Though it sounds like you’re already using one of those ?
13:03:28 <eldritchcookie[4> carter: i want to generate it from template haskell i spent a day making a storable instance and it could have been automated
13:03:46 <carter> Gotcha.
13:04:24 <carter> I think some of that might be easier with hsc2hs or c2hs
13:04:24 <eldritchcookie[4> also c2hs is really flaky, and even worse those custom haskell files aren't checked by HLS
13:04:31 <carter> Fair enough
13:05:16 <carter> … is hls helpful these days? I’m still happy with just editors aggregating all the cli type errors
13:05:30 <carter> Which is also pretty robust over prject setup
13:05:41 <carter> Like, what are the killer features of hls
13:06:09 <carter> What’s the c definition in question ?
13:06:57 <eldritchcookie[4> ALLEGRO_EVENT
13:07:03 <eldritchcookie[4> https://liballeg.org/a5docs/trunk/events.html#allegro_event
13:07:54 <carter> https://github.com/liballeg/allegro5/blob/634fdc89807c91be8174190ad5cf9e0bc55a25c2/include/allegro5/events.h#L202
13:07:56 <carter> Ok
13:08:55 <carter> So, in theory you could use the language-c library to parse up all the headers and compute it that way, probably most easily with a little Datalog model.
13:09:01 _leo92_ joins (~emmanuelu@user/emmanuelux)
13:09:28 <carter> Did you look at how it works In hsc 2hs? That one is simpler to use than c2hs I’ve found
13:09:35 <carter> If my recall is correct
13:09:58 <carter> I kinda have been a tad underwater the past year or so
13:10:35 <eldritchcookie[4> it claims to compile with gcc and read its output i really would want to get this information by only parsing the header
13:11:26 <eldritchcookie[4> but like if i need gcc to preprocess it. i probably can just use it to compile a c program which outputs the info
13:12:08 <carter> It generates a structured program.
13:12:26 × emmanuelux quits (~emmanuelu@user/emmanuelux) (Ping timeout: 272 seconds)
13:12:35 <carter> That itself emits the new hs file with those queries filled in
13:19:47 gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
13:25:09 elkcl joins (~elkcl@broadband-188-255-19-11.ip.moscow.rt.ru)
13:32:37 × titibandit1 quits (~titibandi@xdsl-81-173-160-143.nc.de) (Quit: Leaving.)
13:32:58 <carter> eldritchcookie[4: hsc is probably the simplest option
13:36:43 oldfashionedcow joins (~Rahul_San@user/oldfashionedcow)
13:44:42 irfan joins (~irfan@user/irfan)
13:46:00 mechap joins (~mechap@user/mechap)
13:48:24 <irfan> Hello, I'm looking to express a predicate on a `Symbol` as a constraint using a type family which takes a `Symbol` and returns a `Constraint`. is there a function in the standard libarary which can help me do this? i see functions like `symbolVal` which return a `Maybe (a :~: b)` but I don't know how to convert it to a constraint.
13:49:09 <irfan> Sorry, I meant `sameSymbol` from `GHC.TypeLits`.
13:52:17 <irfan> I wanted to solve the above problem because I want to make a restricted `String` like type which follows some predicate on the value. Something like `the first letter should be in capital case`, etc.
13:53:11 <irfan> If there's a different idiomatic way to do this, I'd be happy to know. The latter is the task which I'm trying to do.
13:53:56 × fizbin quits (~fizbin@user/fizbin) (Ping timeout: 252 seconds)
14:01:01 <Hecate> carter: 'sup o/
14:04:30 Lycurgus joins (~juan@user/Lycurgus)
14:04:59 titibandit1 joins (~titibandi@xdsl-81-173-160-143.nc.de)
14:05:23 × mizlan quits (~mizlan@2607:f010:2a7:1005:4cc4:5084:ee79:3f1b) (Ping timeout: 252 seconds)
14:05:47 fizbin joins (~fizbin@user/fizbin)
14:12:04 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
14:12:09 <lyxia> irfan: do you know about ghost of departed proofs (gdp on hackage)
14:14:37 <lyxia> irfan: you can use type equality, IsUpper (Head s) ~ 'True
14:14:46 <lyxia> (for your first question)
14:15:58 <irfan> lyxia: No. I'd check it out. Thanks!
14:16:30 × titibandit1 quits (~titibandi@xdsl-81-173-160-143.nc.de) (Remote host closed the connection)
14:16:49 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 265 seconds)
14:16:56 mizlan joins (~mizlan@2607:f010:2a7:1005:4cc4:5084:ee79:3f1b)
14:17:20 <irfan> lyxia: is `IsUpper`, or `Head` present in some module?
14:18:38 × gmg quits (~user@user/gehmehgeh) (Ping timeout: 255 seconds)
14:19:39 gmg joins (~user@user/gehmehgeh)
14:20:05 unit73e joins (~emanuel@2001:818:e8dd:7c00:656:e5ff:fe72:9d36)
14:23:11 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
14:33:40 <voidzero> Is this book still up to date enough to be recommended? >> Parallel and Concurrent Programming in Haskell: Techniques for Multicore and Multithreaded Programming
14:33:58 <geekosaur> yes
14:34:01 razetime joins (~Thunderbi@117.254.34.75)
14:34:20 <voidzero> awesome
14:34:52 <voidzero> How about Real World Haskell?
14:34:58 <irfan> I see there's a `UnconsSymbol` in `GHC.TypeLits` but it looks like it's only available for base >= 4.16.
14:35:02 <voidzero> It's from 2008 so. Have to ask
14:36:22 × Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt: personae.ai-integration.biz)
14:36:43 × harveypwca quits (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving)
14:36:46 <lyxia> irfan: indeed, and I don't think there's an IsUpper besides approximating it with CmpChar
14:38:09 <lyxia> irfan: before UnconsSymbol there was this hack https://blog.csongor.co.uk/symbol-parsing-haskell/
14:43:52 × Inst quits (~Inst@2601:6c4:4081:54f0:646c:8574:a39d:53d0) (Read error: Connection reset by peer)
14:44:11 Inst joins (~Inst@2601:6c4:4081:54f0:25d1:9869:889e:4cde)
14:44:18 <irfan> lyxia: sure. thanks a lot for the answers!
14:44:32 × irfan quits (~irfan@user/irfan) (Quit: leaving)
14:45:06 <geekosaur> RWH itself is out of date, but there's an associated blog with updates
14:46:04 CiaoSen joins (~Jura@p200300c9574fa4002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
14:46:19 <geekosaur> (RWH was out of date when published, because extensible exceptions went in)
14:48:45 mimmy_ joins (~mimmy@86.48.15.176)
14:49:09 __monty__ joins (~toonn@user/toonn)
14:52:13 × gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.7.1)
14:56:26 <DigitalKiwi> is the hutton book still as good as i remember it
14:57:06 mc47 joins (~mc47@xmonad/TheMC47)
15:00:00 <__monty__> It didn't get worse.
15:02:39 × Inst quits (~Inst@2601:6c4:4081:54f0:25d1:9869:889e:4cde) (Ping timeout: 255 seconds)
15:03:26 cheater_ joins (~Username@user/cheater)
15:05:13 <maerwald> lol
15:06:10 × cheater quits (~Username@user/cheater) (Ping timeout: 252 seconds)
15:06:11 cheater_ is now known as cheater
15:09:28 <voidzero> geekosaur, I see. In that case I'll skip that one (I have other books so that's np, was just curious)
15:11:16 <geekosaur> it still has its uses, since it covers more than a beginners book
15:11:16 × L29Ah quits (~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer)
15:17:12 × mimmy_ quits (~mimmy@86.48.15.176) (Ping timeout: 272 seconds)
15:17:14 mimmy__ joins (~mimmy@142.126.70.245)
15:18:24 × mizlan quits (~mizlan@2607:f010:2a7:1005:4cc4:5084:ee79:3f1b) (Ping timeout: 255 seconds)
15:18:52 × chaitlatte0 quits (6623d1650e@user/chaitlatte0) (Remote host closed the connection)
15:19:34 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
15:21:43 × califax quits (~califax@user/califx) (Remote host closed the connection)
15:21:43 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Read error: Connection reset by peer)
15:21:43 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
15:21:50 chaitlatte0 joins (ea29c0bb16@user/chaitlatte0)
15:22:26 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
15:22:36 califax joins (~califax@user/califx)
15:23:08 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
15:23:50 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
15:23:51 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
15:23:51 wroathe joins (~wroathe@user/wroathe)
15:39:30 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
15:41:57 mizlan joins (~mizlan@2607:f010:2a7:1005:4cc4:5084:ee79:3f1b)
15:42:09 cheater_ joins (~Username@user/cheater)
15:43:41 × gmg quits (~user@user/gehmehgeh) (Ping timeout: 255 seconds)
15:44:26 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 272 seconds)
15:44:35 × cheater quits (~Username@user/cheater) (Ping timeout: 256 seconds)
15:44:44 cheater_ is now known as cheater
15:45:48 <voidzero> but probably with a book like Get Programming with Haskell, and Programming In Haskell second edition (Graham Hutton) should be sufficient at least for the beginners' stage
15:46:08 × mizlan quits (~mizlan@2607:f010:2a7:1005:4cc4:5084:ee79:3f1b) (Ping timeout: 246 seconds)
15:46:29 gmg joins (~user@user/gehmehgeh)
15:47:03 jero98772 joins (~jero98772@2800:484:1d80:d8ce:9815:cfda:3661:17bb)
15:48:22 × mimmy quits (~mimmy@2604:a880:cad:d0::3e:1001) (Killed (NickServ (GHOST command used by mimmy__!~mimmy@142.126.70.245)))
15:48:28 mimmy__ is now known as mimmy
15:49:12 mimmy_ joins (~mimmy@2604:a880:cad:d0::3e:1001)
15:49:43 titibandit1 joins (~titibandi@xdsl-81-173-160-143.nc.de)
15:51:25 beteigeuze joins (~Thunderbi@bl14-81-220.dsl.telepac.pt)
15:58:16 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
15:59:46 mizlan joins (~mizlan@2607:f010:2a7:1005:4cc4:5084:ee79:3f1b)
16:00:04 × jecxjo[m] quits (~jecxjomat@2001:470:69fc:105::2:bd7c) (Quit: You have been kicked for being idle)
16:02:43 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 256 seconds)
16:09:14 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
16:15:22 harveypwca joins (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67)
16:15:35 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 246 seconds)
16:17:12 × telser quits (~quassel@user/telser) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
16:17:32 × vgtw quits (~vgtw@user/vgtw) (Quit: ZNC - https://znc.in)
16:21:25 × gmg quits (~user@user/gehmehgeh) (Remote host closed the connection)
16:21:47 × CiaoSen quits (~Jura@p200300c9574fa4002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
16:22:10 gmg joins (~user@user/gehmehgeh)
16:27:03 tjakway joins (~tjakway@cpe-107-184-74-161.socal.res.rr.com)
16:32:17 × ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
16:32:31 ec joins (~ec@gateway/tor-sasl/ec)
16:34:49 <eldritchcookie[4> is there any way to automate the binding generation for either hsc2hs or c2hs?
16:37:35 vgtw joins (~vgtw@user/vgtw)
16:37:42 <tjakway> I'd be interesting in knowing as well
16:37:46 <eldritchcookie[4> like by assuming no marshaling using the CXXX types directly and doing no smart things like using alloca for return by reference. just raw get all function declarations in C and import with the equivalent haskell types like CInt, CUInt, etc and also get all structs defined and create marshaling code for it ?
16:38:22 <eldritchcookie[4> becuase it seems possible
16:40:10 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 272 seconds)
16:42:24 ddellacosta joins (~ddellacos@86.106.143.240)
16:42:44 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
16:43:32 <eldritchcookie[4> like i call gcc with -E and then parse the file what could be a problem with this?
16:44:40 <geekosaur> I told you that the other day: magic stuff apple and glibc (among others) stick into system includes
16:52:09 <eldritchcookie[4> what if i just preprocess with -H and remove all system headers?
16:53:59 <geekosaur> then you will get things wrong especially on os x
16:54:38 <eldritchcookie[4> why?
16:56:32 <geekosaur> because apple, and to a lesser extent glibc, f*cks around with everything for no good reason
16:57:05 <geekosaur> you're so convinced this is trivial, go ahead and try it
16:57:07 × iqubic quits (~avi@2601:602:9502:c70:8f59:bc2:c041:8ab2) (Ping timeout: 256 seconds)
16:58:35 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
16:58:40 <eldritchcookie[4> i am not convinced this is trivial i want to know why it isn't hence the questions
16:58:51 × ddellacosta quits (~ddellacos@86.106.143.240) (Ping timeout: 248 seconds)
17:05:11 <eldritchcookie[4> for instance i know that by preprocessing i lose all macros, but if i do not i can't parse correctly without having knowledge of the macros. what i want is something that mostly works and generates all boilerplate
17:06:09 <eldritchcookie[4> if a function is int name(int) {...} i should be able to automatically get it as name :: CInt -> CInt
17:06:25 × mizlan quits (~mizlan@2607:f010:2a7:1005:4cc4:5084:ee79:3f1b) (Ping timeout: 260 seconds)
17:06:54 <eldritchcookie[4> and if i have struct name {
17:06:54 <eldritchcookie[4> }
17:07:41 <c_wraith> functions really aren't the hard part of the ffi. Maybe you don't like having one line per function, but I like the explicitness.
17:07:49 <c_wraith> Data types are the really hard part.
17:08:27 <eldritchcookie[4> yes the hard part is the data types i was gonna mention they right now
17:08:36 <eldritchcookie[4> *them
17:09:56 <eldritchcookie[4> but if i have struct name{... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/40b450b317168eb9b29b90eb52738b2438602843>)
17:11:42 <eldritchcookie[4> and like there are many more things which have a useful natural to express as haskell code many things are impossible but you really should only need to do the bare minimum
17:12:13 <geekosaur> if someone had all the answers, c2hs wouldn't have a bunch of Darwin-specific bugs filed. and https://github.com/haskell/c2hs/issues/191 wouldn't have happened
17:12:35 mizlan joins (~mizlan@2607:f010:2a7:1005:4cc4:5084:ee79:3f1b)
17:14:44 <eldritchcookie[4> cool i don't want all the answers i want to do 90% automatically and the rest painlessly.
17:15:38 <eldritchcookie[4> writing 800 lines of if this constructor 1,2,3 if this constructor 2,3,4 etc is not how i want to do it
17:17:07 × mimmy quits (~mimmy@142.126.70.245) (Ping timeout: 252 seconds)
17:17:07 mimmy_ is now known as mimmy
17:17:08 <[exa]> eldritchcookie[4: I wish all libraries' APIs were written in a good, declarative way without implementation-dependent specifics
17:18:16 <eldritchcookie[4> assuming a explicit list of structs to marshal and functions to import what would be the challenges in just inferring haskell equivalents and generating the declarations?
17:18:32 L29Ah joins (~L29Ah@wikipedia/L29Ah)
17:18:55 <monochrom> Ironically the C programmers' idea of being declarative and/or abstract is precisely macros and typedefs. :D
17:19:25 gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
17:21:50 × dolio quits (~dolio@130.44.134.54) (Quit: ZNC 1.8.2 - https://znc.in)
17:22:22 <eldritchcookie[4> ok
17:23:17 × alfonsox quits (~quassel@103.87.57.33) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
17:23:56 <eldritchcookie[4> basically what are problems i would face when parsing the struct definition and just generating a file to preprocess with gcc?
17:24:41 mimmy_ joins (~mimmy@142.126.70.245)
17:25:12 dolio joins (~dolio@130.44.134.54)
17:28:51 × dolio quits (~dolio@130.44.134.54) (Client Quit)
17:29:22 × titibandit1 quits (~titibandi@xdsl-81-173-160-143.nc.de) (Remote host closed the connection)
17:29:34 × mimmy_ quits (~mimmy@142.126.70.245) (Ping timeout: 272 seconds)
17:29:47 dolio joins (~dolio@130.44.134.54)
17:37:45 econo joins (uid147250@user/econo)
17:42:19 × razetime quits (~Thunderbi@117.254.34.75) (Remote host closed the connection)
17:46:06 mimmy_ joins (~mimmy@142.126.70.245)
17:49:46 × qhong quits (~qhong@rescomp-21-400677.stanford.edu) (Read error: Connection reset by peer)
17:50:00 qhong joins (~qhong@rescomp-21-400677.stanford.edu)
17:52:08 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 246 seconds)
18:02:46 × cods quits (~fred@82-65-232-44.subs.proxad.net) (Ping timeout: 252 seconds)
18:02:58 cods joins (~fred@82-65-232-44.subs.proxad.net)
18:06:11 × mimmy_ quits (~mimmy@142.126.70.245) (Ping timeout: 246 seconds)
18:07:45 mimmy_ joins (~mimmy@142.126.70.245)
18:13:08 eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
18:13:23 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
18:13:25 × eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
18:13:41 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:54fb:433:f271:a472)
18:15:53 × mizlan quits (~mizlan@2607:f010:2a7:1005:4cc4:5084:ee79:3f1b) (Ping timeout: 256 seconds)
18:16:31 × thongpv87 quits (~thongpv87@2402:9d80:38a:8ce8:d089:d4c6:5f25:8cc4) (Ping timeout: 252 seconds)
18:18:14 <[exa]> eldritchcookie[4: AFAIK not much problems tbh, except for the extra work and needing gcc at the target
18:23:24 × mimmy_ quits (~mimmy@142.126.70.245) (Ping timeout: 272 seconds)
18:23:33 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
18:24:19 coot joins (~coot@213.134.171.3)
18:25:58 × tremon quits (~tremon@83-85-213-108.cable.dynamic.v4.ziggo.nl) (Quit: getting boxed in)
18:28:13 × L29Ah quits (~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer)
18:28:19 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds)
18:29:15 segfaultfizzbuzz joins (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net)
18:29:44 <unit73e> monochrom, that's nothing. the idea of newbies of functional programming is C because it has functions
18:29:49 <unit73e> how about that for face palm?
18:30:04 <unit73e> and I've heard that constantly
18:30:49 <unit73e> same guys that don't think there's not much of a difference between a method and a function
18:37:37 <eldritchcookie[4> say if i import data kind and get type in scope can i use types as values?
18:38:32 mimmy_ joins (~mimmy@142.126.70.245)
18:39:36 tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net)
18:39:43 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
18:42:14 justsomeguy joins (~justsomeg@user/justsomeguy)
18:42:14 <unit73e> eldritchcookie[4, can you give a code example?
18:42:21 <unit73e> of what you want to do
18:42:46 mizlan joins (~mizlan@2607:f010:2a7:1005:e1d1:8a04:4a34:845a)
18:43:06 wootehfoot joins (~wootehfoo@user/wootehfoot)
18:43:19 <unit73e> pseudo code is good enough
18:43:22 × unit73e quits (~emanuel@2001:818:e8dd:7c00:656:e5ff:fe72:9d36) (Quit: Leaving)
18:43:40 × mimmy_ quits (~mimmy@142.126.70.245) (Ping timeout: 272 seconds)
18:43:47 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Client Quit)
18:44:21 unit73e joins (~emanuel@2001:818:e8dd:7c00:656:e5ff:fe72:9d36)
18:44:36 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 268 seconds)
18:47:03 × justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 256 seconds)
18:48:18 <eldritchcookie[4> ParseCType::String -> Type and then store them
18:48:31 elevenkb joins (~elevenkb@105.224.37.136)
18:48:54 <eldritchcookie[4> in template haskell
18:48:54 <eldritchcookie[4> i guess i don't need the type exactly just something to represent it and ideally useful for quoting
18:50:13 × tjakway quits (~tjakway@cpe-107-184-74-161.socal.res.rr.com) (Quit: WeeChat 3.5)
18:50:28 <unit73e> I don't see why not. if the type is returned, you can use it.
18:50:41 wootehfoot joins (~wootehfoo@user/wootehfoot)
18:51:18 × trev quits (~trev@user/trev) (Remote host closed the connection)
18:51:23 <unit73e> of course if you have a specific use case, that's different
18:51:45 <unit73e> because you may want to use that type to do some kind of validation, idk
18:59:08 pwug joins (~pwug@user/pwug)
19:04:49 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
19:06:20 iqubic joins (~avi@2601:602:9502:c70:4c7e:f9b:b02b:5a6d)
19:09:03 × coot quits (~coot@213.134.171.3) (Quit: coot)
19:16:19 mimmy_ joins (~mimmy@142.126.70.245)
19:21:10 × mimmy_ quits (~mimmy@142.126.70.245) (Ping timeout: 260 seconds)
19:22:01 CiaoSen joins (~Jura@p200300c9574fa4002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
19:23:27 × troydm quits (~troydm@user/troydm) (Ping timeout: 268 seconds)
19:26:26 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
19:30:41 × mizlan quits (~mizlan@2607:f010:2a7:1005:e1d1:8a04:4a34:845a) (Ping timeout: 256 seconds)
19:31:16 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 252 seconds)
19:32:09 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
19:32:09 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
19:32:09 wroathe joins (~wroathe@user/wroathe)
19:33:40 waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
19:37:10 × zeenk quits (~zeenk@2a02:2f04:a014:8700::7fe) (Quit: Konversation terminated!)
19:38:18 mizlan joins (~mizlan@2607:f010:2a7:1005:e1d1:8a04:4a34:845a)
19:42:00 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
19:46:19 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 248 seconds)
19:47:08 × harveypwca quits (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving)
19:47:41 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
19:47:48 titibandit1 joins (~titibandi@xdsl-81-173-160-143.nc.de)
19:48:03 mimmy_ joins (~mimmy@142.126.70.245)
19:48:19 panovia joins (~user@user/siracusa)
19:48:41 troydm joins (~troydm@user/troydm)
19:52:54 × mimmy_ quits (~mimmy@142.126.70.245) (Ping timeout: 260 seconds)
19:54:19 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 248 seconds)
19:55:28 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 252 seconds)
19:57:13 barak joins (~barak@77.125.90.25)
19:57:18 barak_ joins (~barak@77.125.90.25)
19:57:23 × barak_ quits (~barak@77.125.90.25) (Remote host closed the connection)
19:57:43 × anpad quits (~pandeyan@user/anpad) (Ping timeout: 252 seconds)
19:58:09 caryhartline joins (~caryhartl@2600:1700:2d0:8d30:d485:7c6c:6dcc:2888)
19:58:43 Inst joins (~Inst@2601:6c4:4081:54f0:3de7:12e6:ed3d:f8f8)
20:01:24 × barak quits (~barak@77.125.90.25) (Client Quit)
20:01:38 barak joins (~barak@77.125.90.25)
20:07:20 lortabac joins (~lortabac@2a01:e0a:541:b8f0:91b5:53c3:c631:39c3)
20:10:08 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
20:11:22 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
20:11:35 × CiaoSen quits (~Jura@p200300c9574fa4002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 265 seconds)
20:12:57 cheater_ joins (~Username@user/cheater)
20:13:36 anpad joins (~pandeyan@user/anpad)
20:15:59 × cheater quits (~Username@user/cheater) (Ping timeout: 246 seconds)
20:16:02 cheater_ is now known as cheater
20:19:45 mimmy_ joins (~mimmy@142.126.70.245)
20:23:52 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
20:25:00 × mimmy_ quits (~mimmy@142.126.70.245) (Ping timeout: 272 seconds)
20:25:44 × barak quits (~barak@77.125.90.25) (Ping timeout: 268 seconds)
20:27:30 Lycurgus joins (~juan@user/Lycurgus)
20:34:46 kenran joins (~user@user/kenran)
20:37:44 wroathe joins (~wroathe@50.205.197.50)
20:37:44 × wroathe quits (~wroathe@50.205.197.50) (Changing host)
20:37:44 wroathe joins (~wroathe@user/wroathe)
20:41:48 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
20:43:04 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
20:46:00 × Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt: personae.ai-integration.biz)
20:51:27 mimmy_ joins (~mimmy@142.126.70.245)
20:54:36 <eldritchcookie[4> god i can't believe i will reimplement my 1000 lines from c2hs to hsc2hs manually.
20:55:33 × titibandit1 quits (~titibandi@xdsl-81-173-160-143.nc.de) (Quit: Leaving.)
20:56:40 × mimmy_ quits (~mimmy@142.126.70.245) (Ping timeout: 272 seconds)
20:57:39 talismanick joins (~talismani@2601:200:c181:4c40::1be2)
20:58:31 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Ping timeout: 256 seconds)
20:59:40 <eldritchcookie[4> i am considering how long it would take to implement a parser to get all structs from c i would then need to compile a c program with offsetof and get the results from it
21:00:55 <geekosaur> language-c is where to start
21:01:28 Sgeo joins (~Sgeo@user/sgeo)
21:02:06 <eldritchcookie[4> yes i am just considering if the work is worth it considering the size of my library to wrap
21:02:12 <[exa]> the usual learning outcome out of language-c is: C looked simple
21:03:07 × mizlan quits (~mizlan@2607:f010:2a7:1005:e1d1:8a04:4a34:845a) (Ping timeout: 248 seconds)
21:03:53 <geekosaur> certainly wll teach you why "90% automated and the rest painlessly" isn't a thing
21:04:09 <eldritchcookie[4> i looked at language-c and i fully agree
21:04:20 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 246 seconds)
21:07:45 <eldritchcookie[4> how likely am i to need to use another c library in the future?
21:07:51 × beteigeuze quits (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Read error: Connection reset by peer)
21:08:19 beteigeuze joins (~Thunderbi@bl14-81-220.dsl.telepac.pt)
21:08:46 mimmy_ joins (~mimmy@142.126.70.245)
21:09:29 <eldritchcookie[4> like if i am only wrapping allegro it looks easier to do by hand but what about in the future?
21:09:41 <[exa]> eldritchcookie[4: next allegro is gonna be in haskell?
21:10:11 [exa] decreases optimism
21:10:29 eldritchcookie[4 sighs
21:10:33 <geekosaur> phrased otherwise: how likely is it that you'll have to do this again when the next liballegro comes out?
21:11:02 <geekosaur> otherwise, not sure any of us can answer that; we can't know what you'll decide to do a year form now
21:11:11 <geekosaur> *from
21:11:20 <[exa]> actually wow, allegro still lives
21:11:57 [exa] finds IcyTower.exe
21:13:39 <eldritchcookie[4> yeah i am doing it the hard way no ****** way i do this again for any other library and considering that if i need a library from another language i probably will need to call it via C
21:16:32 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:91b5:53c3:c631:39c3) (Ping timeout: 246 seconds)
21:17:34 × brettgilio quits (~brettgili@x-irc.gq) (Ping timeout: 272 seconds)
21:18:05 mizlan joins (~mizlan@2607:f010:2a7:1005:e1d1:8a04:4a34:845a)
21:19:54 <[exa]> I'm kinda wondering if there ever was any sensible C-style binary call "protocol" other than "what's in the header file"
21:20:14 <[exa]> I'd say arch ABI but that typically doesn't include struct folding rules
21:21:37 <monochrom> In simpler times back then, it was arch ABI yeah, C libraries didn't pull crazy tricks.
21:22:04 × myxokephale quits (~myxokepha@cpe-65-28-251-121.cinci.res.rr.com) (Remote host closed the connection)
21:23:24 <monochrom> And C compilers didn't pull crazy tricks on structs too. Recall that OSes were written in C precisely because there was a predictable map between structs and address offsets.
21:24:29 <glguy> for this kind of thing perhaps the ideal is specifying the API with an RPC framework rather than as a C header
21:24:32 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
21:26:34 [exa] takes a hesitant look at C as a RPC framework
21:27:14 cln is now known as liszt
21:27:33 liszt is now known as liszt2
21:28:09 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:54fb:433:f271:a472) (Remote host closed the connection)
21:32:06 angelz joins (Angelz@2605:6400:30:fc15:d55b:fa6c:bd14:9973)
21:32:20 × fizbin quits (~fizbin@user/fizbin) (Ping timeout: 268 seconds)
21:34:34 fizbin joins (~fizbin@user/fizbin)
21:34:39 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds)
21:35:21 Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
21:35:39 eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
21:36:09 × son0p quits (~ff@181.136.122.143) (Remote host closed the connection)
21:37:16 × anpad quits (~pandeyan@user/anpad) (Ping timeout: 268 seconds)
21:37:50 × califax quits (~califax@user/califx) (Ping timeout: 255 seconds)
21:37:54 anpad joins (~pandeyan@user/anpad)
21:41:04 califax joins (~califax@user/califx)
21:41:17 myxokephale joins (~myxokepha@cpe-65-28-251-121.cinci.res.rr.com)
21:45:34 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
21:46:41 × ubert quits (~Thunderbi@p200300ecdf264e047aac122d9aee2265.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
21:47:00 ubert joins (~Thunderbi@p548c9ce5.dip0.t-ipconnect.de)
21:47:03 × kenran quits (~user@user/kenran) (Remote host closed the connection)
21:47:18 × gmg quits (~user@user/gehmehgeh) (Quit: Leaving)
21:50:30 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 272 seconds)
21:58:35 × Xeroine quits (~Xeroine@user/xeroine) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in)
21:59:55 Xeroine joins (~Xeroine@user/xeroine)
22:02:10 × agumonkey quits (~user@2a01:e0a:8f9:d3e0:f706:363c:fbf7:9934) (Ping timeout: 260 seconds)
22:03:14 × mei quits (~mei@user/mei) (Quit: mei)
22:08:46 × beteigeuze quits (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Quit: beteigeuze)
22:09:06 beteigeuze joins (~Thunderbi@bl14-81-220.dsl.telepac.pt)
22:12:09 CiaoSen joins (~Jura@p200300c9574fa4002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
22:15:05 angelz is now known as Angelz
22:17:42 Angelz is now known as angelz
22:17:55 × cheater quits (~Username@user/cheater) (Ping timeout: 260 seconds)
22:18:21 cheater joins (~Username@user/cheater)
22:20:02 × mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
22:20:30 <Inst> on O1 on GCC and GHC, I can make trivial code where GHC is beating GCC
22:20:44 × angelz quits (Angelz@2605:6400:30:fc15:d55b:fa6c:bd14:9973) (Changing host)
22:20:44 angelz joins (Angelz@user/angelz)
22:20:48 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
22:21:09 <Inst> sum over replicate 1_000_000_000 vs for loop increment varibale
22:21:25 × mizlan quits (~mizlan@2607:f010:2a7:1005:e1d1:8a04:4a34:845a) (Ping timeout: 260 seconds)
22:21:52 <EvanR> well, as we were told from the beginning. C (B) is really for non-numeric applications. Please use fortran xD
22:22:04 <geekosaur> heh
22:22:23 <Inst> i'm annoyed because it falls apart when I use print
22:22:31 <Inst> it works under seq (pure ()), though
22:23:18 <Inst> bleh, probably not actual
22:23:28 <[exa]> any nice IO utility function to get expanded $HOME/.dotfile from ".dotfile" ?
22:23:50 <monochrom> Like I said yesterday, with intensive printing you're benchmarking "how well does the RTS make syscalls" instead.
22:24:18 <monochrom> Or even downright just benchmarking the OS itself.
22:24:29 <Inst> i mean not the print stuff
22:24:34 <Inst> i sum, then print
22:24:38 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds)
22:24:49 <Inst> i think it's probably a benchmarking artifact or something ;_;
22:25:24 <monochrom> For that, I hope you meant "seq (the sum) (pure ())" instead.
22:25:34 <Inst> i forgot a flip
22:25:54 <Inst> import qualified Data.Vector as Vec
22:25:54 <Inst> main :: IO ()
22:25:54 <Inst> main = flip seq (print u) u
22:25:54 <Inst> u :: Int
22:25:54 <Inst> u = Vec.sum $ Vec.replicate 1000000000 (1 :: Int)
22:26:12 <Inst> this is half C's speed on my machine
22:26:15 <geekosaur> [exa], oddly there's more stuff for XDG dirs than old style dotfiles or simple from-`HOME` stuff
22:26:34 <[exa]> odd.
22:26:35 <Inst> but if you replace print u with pure ()
22:26:42 <angelz> thesum = checksumvirusfile.?
22:26:43 <Inst> it moves twice as fast, so I'm not sure what's actually going on here
22:26:49 <[exa]> geekosaur: anyway thanks for confirming
22:26:57 ec joins (~ec@gateway/tor-sasl/ec)
22:27:06 <Inst> print surely can't take 300 ms to convert 1 billion into a string
22:27:26 <geekosaur> or for Windows
22:27:41 × talismanick quits (~talismani@2601:200:c181:4c40::1be2) (Ping timeout: 255 seconds)
22:27:43 <EvanR> try measuring the computation instead of the print
22:27:54 <Inst> just by doing pure ()?
22:28:02 <EvanR> where are you putting the time probe
22:28:08 <EvanR> around what
22:28:09 <darkling> Inst: Terminals are *slow*. Although 300ms still sounds a bit much. :)
22:28:09 <geekosaur> hm, `getAppUserDataDirectory` if you're willing to omit the "."
22:28:11 <Inst> i'm just using +RTS -s right now
22:28:36 <EvanR> do
22:28:41 <EvanR> t0 <- clock
22:28:45 <EvanR> answer <- computation
22:28:50 <EvanR> t1 <- clock
22:28:50 <geekosaur> terminals may need to scroll and do have to do font rendering
22:28:59 <EvanR> print (t1 - t0, answer)
22:29:12 <monochrom> System.Directory.getAppUserDataDirectory should be pretty close to what you want, for both unixes and windows.
22:29:36 <Inst> added getCurrentTime via Data.Time.Clock
22:29:41 <monochrom> System.Directory also has XDG stuff if you want to pursue that instead.
22:29:48 <angelz> Installing dotnetcore-2.1-aspnetruntime...
22:29:48 <angelz> dotnetcore-2.1-aspnetruntime has been installed.
22:30:07 <geekosaur> mm?
22:30:08 <angelz> ops.
22:30:08 <EvanR> make sure to evaluate answer before the second clock
22:30:24 <EvanR> or else it will compute during the print, defeating the purpose of this exercise
22:30:35 <monochrom> Or use criterion
22:35:50 <Inst> yeah, sigh, i tested, if you take out the attempt to evaluate the calculation via seq, it's 16 ms
22:36:04 <Inst> if you keep it on, it's like 600 ms
22:36:32 <Inst> so something's going wrong if i just test it via seq alone
22:38:44 <geekosaur> remember that seq only evaluates one level (to WHNF). depending on how you build your computation, you might still have thunks
22:39:11 <monochrom> In this case the type is Int so there is no further structures to worry about.
22:39:46 <voidzero> The Get Programming with Haskell book says, that when you first do 'import qualified Data.ByteString as B' and then 'import qualified Data.ByteString.Char8 as BC', that the type of B.unpack will become BC.ByteString -> [GHC.Word.Word8] -- but with me this is not the case.
22:40:20 <voidzero> It says B.ByteString -> [GHC.Word.Word8]
22:40:39 <voidzero> is this a version issue, is the book incorrect or am I doing something wrong?
22:40:57 <voidzero> (on ghci)
22:41:13 <monochrom> B.ByteString and BC.ByteString are the same thing, and which one ghci prints with :type et al. is arbitrary (as far as users are concerned). Don't overthink this.
22:42:05 × mimmy_ quits (~mimmy@142.126.70.245) (Ping timeout: 255 seconds)
22:42:13 × elevenkb quits (~elevenkb@105.224.37.136) (Quit: Client closed)
22:42:19 <monochrom> The book definitely wrongly committed to a fragile implementation detail that clearly isn't future-proof.
22:42:58 <voidzero> alright, glad to hear, because "The careful reader will also notice that the type signature of B.unpack has changed!" made me hmm.
22:43:13 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
22:43:18 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
22:44:04 × gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.7.1)
22:44:11 <voidzero> it follows with "B.unpack now uses the ByteString representation from ByteString.Char8. This means you're free to treat your ByteStrings as plain ASCII text from here on out."
22:44:26 <voidzero> so this tripped me up
22:44:54 <monochrom> That one is really bad, considering how most readers will interpret the word "from" very seriously.
22:45:38 <monochrom> The actual truth that has held and looks like will continue to hold is that the representation comes from an internal module that both Data.ByteString and Data.ByteString.Char8 re-exports.
22:46:20 <voidzero> alright. Hence the hint to not overthink it I assume
22:46:29 <monochrom> Under the usual sense of "from", the ByteString type (nor its "representation" nor whatever you call it) is from neither of the public modules.
22:47:08 <voidzero> :)
22:47:53 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 256 seconds)
22:48:56 <monochrom> It's always the same bytestring content. And then functions in Data.ByteString.Char8 gives you a Char translation, and functions in Data.ByteString refuse to.
22:48:57 <voidzero> well I'm glad I asked. Now I know I can go without worrying about -- bcInt :: BC.ByteString; bcInt = "6"; :t bcInt = bcInt :: B.ByteString
22:50:50 <voidzero> now the assignment continues. I'm gonna make glitchart of a picture of HP Lovecraft. Cool eh.
22:51:39 mizlan joins (~mizlan@2607:f010:2a7:1005:e1d1:8a04:4a34:845a)
22:51:58 dcoutts_ joins (~duncan@host213-122-143-153.range213-122.btcentralplus.com)
22:52:28 <monochrom> This is what I usually do: import Data.ByteString (ByteString); the two qualified imports you have. Then in my type-sigs I just have to say "ByteString", no confusion there. And I think ghci :type then also tends to just say "ByteString" too.
22:52:35 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
22:53:52 <voidzero> Ah that's a good tip, ty
22:54:46 <monochrom> With ghci, a valuable technique is to use ":info B.ByteString" to see its first-cause origin. Then you will also find that ":info BC.ByteString" gives the very same origin. That's how you can confirm that they are aliases to the same thing.
22:55:56 × mizlan quits (~mizlan@2607:f010:2a7:1005:e1d1:8a04:4a34:845a) (Ping timeout: 246 seconds)
22:58:05 <EvanR> you're free to treat whatever you want as plain ASCII text regardless xD
22:58:37 × biberu quits (~biberu@user/biberu) (Read error: Connection reset by peer)
22:59:02 <voidzero> :info BC.ByteString even replies as type B.ByteString :: * ; data B.ByteString = ...
22:59:02 <EvanR> by arbitrarily assigning ascii char(s) to each inhabitant of the type
22:59:13 × wroathe quits (~wroathe@user/wroathe) (Quit: leaving)
22:59:34 <EvanR> which you'd have to do if ByteString bytes go out of range
23:00:14 <monochrom> It's ISO Latin 1 for the full 0-255 range.
23:00:18 mizlan joins (~mizlan@2607:f010:2a7:1005:e1d1:8a04:4a34:845a)
23:00:34 <EvanR> ok then
23:01:04 <monochrom> But you can go up one level and claim that choosing ISO Latin 1 was arbitrary. :)
23:01:36 <EvanR> oops, regardless that's not ascii
23:02:04 <EvanR> chopping off the accent marks and stuff you may be saved
23:02:25 × mechap quits (~mechap@user/mechap) (Quit: WeeChat 3.8)
23:02:59 biberu joins (~biberu@user/biberu)
23:03:04 <voidzero> this book has many weird things going on
23:03:29 <voidzero> for example -- imageFile <- BC.readFile fileName ; glitched <- return imageFile -- why not let glitched = imageFile?
23:04:00 <EvanR> ... why are we going with Char8 if we wanted to read in an image file!
23:04:13 <voidzero> that was a suggestion I got from hlint refact
23:04:44 <voidzero> because we're going to glitch a random byte in the file with another byte we pick at random
23:04:45 × mizlan quits (~mizlan@2607:f010:2a7:1005:e1d1:8a04:4a34:845a) (Ping timeout: 252 seconds)
23:04:46 <EvanR> Char8 seems highly niche to me
23:05:20 <EvanR> if you're dealing with bytes you're dealing with bytes
23:05:32 <EvanR> (Word8)
23:07:22 <geekosaur> many people think Char8 is just a bad idea
23:07:36 mimmy_ joins (~mimmy@142.126.70.245)
23:07:43 <voidzero> searching the book to see if I can find a reference to Word8
23:07:50 <monochrom> In fact since glitched = imageFile, why not just delete glitched altogether?
23:08:19 <monochrom> But yeah "foo <- return bar" should be just "let foo = bar".
23:08:40 <monochrom> Either that or just don't teach do-notation in the first place.
23:09:49 <monochrom> For changing a byte in the image you can easily stick with Word8.
23:09:54 <voidzero> Yeah, but oh what do we have here, "At this point the glitched valiable in your main doesn't need to be an IO type. Change that line so that glitched is a regulalar variable" i don't have a clue why we're not just delenting it altogether, but there is a hint that says "you're using return because eventually this will be replaced with an IO action that will alter the binary data"
23:09:56 voidzero sighs
23:10:09 <voidzero> readers should not become editors
23:10:27 <voidzero> I've already submitted over 10 errors in this book
23:11:04 <monochrom> OK I can respect future-proving it with "glitched <- IO action in the future but return original image for now".
23:11:05 <voidzero> small ones, large ones, and "your font does not support the ligatures fi, ffi" and so on
23:11:42 <voidzero> right, so in that case, don't let me change it, it's confusing
23:12:25 mizlan joins (~mizlan@2607:f010:2a7:1005:e1d1:8a04:4a34:845a)
23:12:34 <monochrom> But I can go up one level (as usual) and ask why glitching needs IO in the first place.
23:12:52 <mauke> inb4 randomRIO
23:13:02 <voidzero> but ok, at least the assignments and the progression in the book make sense
23:13:11 barak joins (~barak@77.125.90.25)
23:13:12 <monochrom> If it's just because of PRNG, even that can be refactored...
23:13:28 × mimmy_ quits (~mimmy@142.126.70.245) (Ping timeout: 272 seconds)
23:14:23 <monochrom> And there are a few more conceivable scenerios I can see how to refactor too.
23:16:28 anatta joins (~AdiIRC@h-155-4-132-216.NA.cust.bahnhof.se)
23:16:49 <voidzero> the book is also letting us use mconcat a lot, in places where concat can also be used
23:17:17 <voidzero> I'm guessing that using concat is better unless we really need mconcat
23:18:14 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 260 seconds)
23:18:26 <monochrom> That one falls under the pessimitic principle of conservation of learning effort. :)
23:19:07 <monochrom> mconcat is more general so you learn fewer names but more difficult error messages.
23:19:21 <voidzero> oh joy
23:19:43 <monochrom> concat is more special so you learn more names (for other types) but easier error messages.
23:21:04 <mauke> :t mconcat
23:21:06 <lambdabot> Monoid a => [a] -> a
23:21:15 <voidzero> alright. Haven't been introduced to Foldable yet
23:21:15 <glguy> :t concat
23:21:17 <lambdabot> Foldable t => t [a] -> [a]
23:21:22 <mauke> :t join
23:21:22 <glguy> generalizations all around
23:21:23 <lambdabot> Monad m => m (m a) -> m a
23:21:29 × shapr quits (~user@68.54.166.125) (Ping timeout: 268 seconds)
23:21:35 <monochrom> Makes me wonder why I don't go completely evil and teach neither concat nor mconcat, I teach join. >:)
23:21:44 × offdg^ quits (~offdg@76.145.190.81) (Ping timeout: 260 seconds)
23:22:18 <glguy> > > asum [[1,2],[3,4]]
23:22:21 <lambdabot> <hint>:1:1: error: parse error on input ‘>’
23:22:22 <glguy> > asum [[1,2],[3,4]]
23:22:24 <lambdabot> [1,2,3,4]
23:22:46 <glguy> :t asum
23:22:48 <lambdabot> (Foldable t, Alternative f) => t (f a) -> f a
23:23:01 <glguy> It's going to be hard to beat my 2-typeclass offering
23:23:44 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
23:24:06 <monochrom> 1-typeclass can beat 2-typeclass if the 1-typeclass has the infamous name "Monad" >:)
23:24:17 cln joins (cln@wtf.cx)
23:25:45 <monochrom> "In the Typeclass Zoo, all typeclasses are scary, but some are scarier than others."
23:26:15 acidjnk joins (~acidjnk@p200300d6e715c494853e5ab7d1dcba05.dip0.t-ipconnect.de)
23:26:44 mimmy_ joins (~mimmy@142.126.70.245)
23:28:11 <anatta> monochrom: it's kind of you to at least call it "join" still
23:28:16 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 268 seconds)
23:28:19 <anatta> instead of >>= id
23:28:34 <anatta> or smth
23:29:02 <monochrom> I am also happy to call it "flat/flatten" >:)
23:30:34 × barak quits (~barak@77.125.90.25) (Ping timeout: 272 seconds)
23:32:25 × eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
23:32:54 × mimmy_ quits (~mimmy@142.126.70.245) (Ping timeout: 252 seconds)
23:35:22 <voidzero> argh this book. Fantastic glitching. https://imgur.com/a/FVbRa87
23:35:29 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:6450:b99c:346:15e5)
23:35:39 × caryhartline quits (~caryhartl@2600:1700:2d0:8d30:d485:7c6c:6dcc:2888) (Quit: caryhartline)
23:36:01 ddellacosta joins (~ddellacos@89.46.62.175)
23:36:58 <unit73e> flat is justice
23:37:11 <voidzero> https://i.imgur.com/J8tTi2p.jpg that's more like it
23:39:49 elevenkb joins (~elevenkb@105.224.37.136)
23:40:06 v0id_ptr joins (~adrift@user/ptr-frac7al/x-0038398)
23:44:46 barak joins (~barak@77.125.90.25)

All times are in UTC on 2023-01-14.