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