Logs on 2023-05-22 (liberachat/#haskell)
| 00:12:40 | × | zeenk quits (~zeenk@2a02:2f04:a105:f00::7fe) (Quit: Konversation terminated!) |
| 00:12:45 | × | eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 00:15:00 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 00:16:03 | → | califax joins (~califax@user/califx) |
| 00:16:08 | → | cheater_ joins (~Username@user/cheater) |
| 00:17:53 | × | cheater quits (~Username@user/cheater) (Ping timeout: 265 seconds) |
| 00:17:54 | cheater_ | is now known as cheater |
| 00:18:39 | × | vandita quits (~vandit@91-83-11-253.pool.digikabel.hu) (Ping timeout: 256 seconds) |
| 00:20:01 | × | mei quits (~mei@user/mei) (Ping timeout: 240 seconds) |
| 00:20:22 | → | vandita joins (~vandit@176-241-19-12.pool.digikabel.hu) |
| 00:24:27 | → | mei joins (~mei@user/mei) |
| 00:27:43 | × | wiosna quits (~karangura@c-73-93-95-154.hsd1.ca.comcast.net) (Ping timeout: 256 seconds) |
| 00:32:25 | → | freeside joins (~mengwong@103.252.202.151) |
| 00:35:13 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:34cc:c2aa:d793:2028) |
| 00:36:43 | × | _________ quits (~nobody@user/noodly) (Ping timeout: 268 seconds) |
| 00:38:26 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 00:42:27 | × | freeside quits (~mengwong@103.252.202.151) (Ping timeout: 256 seconds) |
| 00:43:38 | → | _________ joins (~nobody@user/noodly) |
| 00:45:25 | → | nate2 joins (~nate@98.45.169.16) |
| 00:46:38 | × | nate2 quits (~nate@98.45.169.16) (Read error: Connection reset by peer) |
| 00:48:22 | → | Sgeo_ joins (~Sgeo@user/sgeo) |
| 00:51:11 | × | Sgeo quits (~Sgeo@user/sgeo) (Ping timeout: 240 seconds) |
| 00:52:30 | → | nate2 joins (~nate@98.45.169.16) |
| 00:52:32 | → | wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com) |
| 00:52:32 | × | wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
| 00:52:32 | → | wroathe joins (~wroathe@user/wroathe) |
| 00:58:14 | × | xff0x quits (~xff0x@2405:6580:b080:900:6bd4:c0cd:e30a:ff91) (Quit: xff0x) |
| 01:05:58 | → | freeside joins (~mengwong@103.252.202.151) |
| 01:10:24 | × | freeside quits (~mengwong@103.252.202.151) (Ping timeout: 248 seconds) |
| 01:11:07 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 01:11:55 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 256 seconds) |
| 01:17:15 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 01:19:11 | → | xff0x joins (~xff0x@2405:6580:b080:900:1b85:88b0:f232:8118) |
| 01:26:31 | × | waleee quits (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 240 seconds) |
| 01:39:49 | × | rembo10 quits (~rembo10@main.remulis.com) (Quit: ZNC 1.8.2 - https://znc.in) |
| 01:42:04 | → | rembo10 joins (~rembo10@main.remulis.com) |
| 01:43:03 | → | freeside joins (~mengwong@103.252.202.151) |
| 01:48:47 | × | nate2 quits (~nate@98.45.169.16) (Ping timeout: 240 seconds) |
| 01:50:25 | × | freeside quits (~mengwong@103.252.202.151) (Ping timeout: 240 seconds) |
| 01:53:18 | × | Nosrep quits (~Nosrep@user/nosrep) (Remote host closed the connection) |
| 01:56:08 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
| 02:00:21 | × | xff0x quits (~xff0x@2405:6580:b080:900:1b85:88b0:f232:8118) (Ping timeout: 265 seconds) |
| 02:02:50 | → | Nosrep joins (~Nosrep@user/nosrep) |
| 02:02:59 | → | czy joins (~user@host-140-24.ilcub310.champaign.il.us.clients.pavlovmedia.net) |
| 02:08:23 | × | td_ quits (~td@i5387091D.versanet.de) (Ping timeout: 240 seconds) |
| 02:08:46 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 02:10:18 | → | td_ joins (~td@i5387092F.versanet.de) |
| 02:16:47 | × | vandita quits (~vandit@176-241-19-12.pool.digikabel.hu) (Ping timeout: 240 seconds) |
| 02:18:41 | → | vandita joins (~vandit@178-164-171-200.pool.digikabel.hu) |
| 02:27:39 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:34cc:c2aa:d793:2028) (Remote host closed the connection) |
| 02:32:29 | × | bilegeek quits (~bilegeek@2600:1008:b016:b801:f96f:33c3:9ec0:ec8f) (Quit: Leaving) |
| 02:43:11 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 240 seconds) |
| 02:46:56 | → | xff0x joins (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) |
| 02:51:28 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
| 02:51:28 | → | finn_elija joins (~finn_elij@user/finn-elija/x-0085643) |
| 02:51:28 | finn_elija | is now known as FinnElija |
| 02:54:37 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 02:55:05 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 02:57:17 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 02:57:38 | → | califax joins (~califax@user/califx) |
| 03:00:25 | → | freeside joins (~mengwong@103.252.202.151) |
| 03:04:59 | × | freeside quits (~mengwong@103.252.202.151) (Ping timeout: 264 seconds) |
| 03:07:48 | → | wiosna joins (~karangura@c-73-93-95-154.hsd1.ca.comcast.net) |
| 03:12:23 | × | wiosna quits (~karangura@c-73-93-95-154.hsd1.ca.comcast.net) (Ping timeout: 240 seconds) |
| 03:27:12 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:34cc:c2aa:d793:2028) |
| 03:38:20 | → | freeside joins (~mengwong@103.252.202.151) |
| 03:39:35 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 03:41:47 | → | Radio joins (~radioredw@user/radioredwagon) |
| 03:42:28 | × | freeside quits (~mengwong@103.252.202.151) (Ping timeout: 240 seconds) |
| 03:44:32 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 248 seconds) |
| 03:46:21 | → | machinedgod joins (~machinedg@84-115-230-196.cable.dynamic.surfer.at) |
| 03:47:25 | × | wroathe quits (~wroathe@user/wroathe) (Quit: leaving) |
| 03:47:54 | → | cheater_ joins (~Username@user/cheater) |
| 03:48:09 | → | wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com) |
| 03:48:09 | × | wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
| 03:48:09 | → | wroathe joins (~wroathe@user/wroathe) |
| 03:50:47 | × | cheater quits (~Username@user/cheater) (Ping timeout: 240 seconds) |
| 03:50:50 | cheater_ | is now known as cheater |
| 03:55:44 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 248 seconds) |
| 04:01:52 | <ghostbuster> | is there a doc that describes the full output syntax of :info for ghci? there's a brief description here https://downloads.haskell.org/ghc/latest/docs/users_guide/ghci.html but it's not exhaustive |
| 04:05:46 | → | _ht joins (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) |
| 04:07:47 | → | ibizaman[m] joins (~ibizamanm@2001:470:69fc:105::a3d) |
| 04:10:46 | → | wiosna joins (~karangura@c-73-93-95-154.hsd1.ca.comcast.net) |
| 04:14:58 | × | wiosna quits (~karangura@c-73-93-95-154.hsd1.ca.comcast.net) (Ping timeout: 250 seconds) |
| 04:16:58 | → | freeside joins (~mengwong@103.252.202.151) |
| 04:21:11 | × | freeside quits (~mengwong@103.252.202.151) (Ping timeout: 256 seconds) |
| 04:21:56 | → | wiosna joins (~karangura@c-73-93-95-154.hsd1.ca.comcast.net) |
| 04:23:11 | × | vandita quits (~vandit@178-164-171-200.pool.digikabel.hu) (Ping timeout: 240 seconds) |
| 04:24:24 | → | mbuf joins (~Shakthi@49.207.178.186) |
| 04:25:12 | → | vandita joins (~vandit@92-249-185-234.pool.digikabel.hu) |
| 04:25:28 | × | rf quits (~rf@2605:59c8:179c:f610:2be8:1349:28e4:1422) (Ping timeout: 240 seconds) |
| 04:27:05 | × | wiosna quits (~karangura@c-73-93-95-154.hsd1.ca.comcast.net) (Ping timeout: 240 seconds) |
| 04:35:36 | → | freeside joins (~mengwong@103.252.202.151) |
| 04:38:26 | → | bgs joins (~bgs@212-85-160-171.dynamic.telemach.net) |
| 04:39:48 | × | freeside quits (~mengwong@103.252.202.151) (Ping timeout: 240 seconds) |
| 04:40:29 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 04:42:42 | × | Radio quits (~radioredw@user/radioredwagon) (Quit: Leaving) |
| 04:46:51 | → | jargon joins (~jargon@184.101.78.160) |
| 04:57:25 | × | mauke quits (~mauke@user/mauke) (Quit: leaving) |
| 05:02:30 | → | wiosna joins (~karangura@c-73-93-95-154.hsd1.ca.comcast.net) |
| 05:06:13 | → | titibandit joins (~titibandi@user/titibandit) |
| 05:07:26 | × | wiosna quits (~karangura@c-73-93-95-154.hsd1.ca.comcast.net) (Ping timeout: 268 seconds) |
| 05:13:59 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 264 seconds) |
| 05:23:35 | × | mei quits (~mei@user/mei) (Ping timeout: 240 seconds) |
| 05:27:41 | → | mei joins (~mei@user/mei) |
| 05:27:42 | × | bgs quits (~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection) |
| 05:28:57 | → | coot_ joins (~coot@89-69-206-216.dynamic.chello.pl) |
| 05:31:40 | → | michalz joins (~michalz@185.246.204.90) |
| 05:40:44 | × | _ht quits (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Quit: _ht) |
| 05:45:06 | × | vglfr quits (~vglfr@2a0d:3344:1b4f:9e10:5c6b:37b7:8e0:39f9) (Ping timeout: 265 seconds) |
| 05:45:52 | → | vglfr joins (~vglfr@209.198.137.192) |
| 05:47:21 | × | vglfr quits (~vglfr@209.198.137.192) (Read error: Connection reset by peer) |
| 05:49:32 | → | vglfr joins (~vglfr@2a0d:3344:1b4f:9e10:5c6b:37b7:8e0:39f9) |
| 05:52:32 | → | gensyst joins (~gensyst@user/gensyst) |
| 05:53:00 | <gensyst> | If I do forkOS in two places, could they still ultimately be bound to the same OS thread? |
| 05:53:09 | <gensyst> | Or will those necessarily be two different OS threads? |
| 05:54:04 | <gensyst> | I just want to know, if I have an infinite loop (channel) within forkOS, will that OS thread be occupied , or ... can other forkOS still utilize that OS thread? |
| 05:58:14 | → | freeside joins (~mengwong@103.252.202.151) |
| 05:59:53 | → | trev joins (~trev@user/trev) |
| 06:00:31 | <c_wraith> | they might share an OS thread. that doesn't mean they won't both get scheduled, by the normal GHC thread scheduling |
| 06:02:47 | × | freeside quits (~mengwong@103.252.202.151) (Ping timeout: 240 seconds) |
| 06:03:44 | × | machinedgod quits (~machinedg@84-115-230-196.cable.dynamic.surfer.at) (Ping timeout: 248 seconds) |
| 06:10:53 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 06:13:23 | × | vglfr quits (~vglfr@2a0d:3344:1b4f:9e10:5c6b:37b7:8e0:39f9) (Ping timeout: 264 seconds) |
| 06:16:02 | → | vglfr joins (~vglfr@209.198.137.192) |
| 06:16:11 | × | _________ quits (~nobody@user/noodly) (Quit: Reconnecting) |
| 06:16:32 | → | _________ joins (~nobody@user/noodly) |
| 06:16:33 | × | vglfr quits (~vglfr@209.198.137.192) (Read error: Connection reset by peer) |
| 06:17:15 | → | freeside joins (~mengwong@103.252.202.151) |
| 06:21:35 | × | freeside quits (~mengwong@103.252.202.151) (Ping timeout: 240 seconds) |
| 06:23:50 | → | vglfr joins (~vglfr@209.198.137.192) |
| 06:28:58 | → | acidjnk joins (~acidjnk@p200300d6e7072f543cd43d7d1255efcb.dip0.t-ipconnect.de) |
| 06:29:48 | × | vandita quits (~vandit@92-249-185-234.pool.digikabel.hu) (Ping timeout: 240 seconds) |
| 06:31:42 | → | vandita joins (~vandit@80-95-70-192.pool.digikabel.hu) |
| 06:35:18 | <gensyst> | c_wraith, what do you mean by not scheduled? (and is there anything other than "normal" scheduling)? |
| 06:35:54 | <gensyst> | can a thread engaged in a loop, do something else also? (as you can see, i'm not much about threads) |
| 06:35:59 | <gensyst> | know* |
| 06:36:00 | <DigitalKiwi> | priority scheduling |
| 06:36:16 | <c_wraith> | I don't think within GHC, there's anything other than the normal scheduling |
| 06:37:03 | <DigitalKiwi> | boo |
| 06:37:19 | <c_wraith> | GHC uses a weird semi-cooperative threading model. You can write a loop that doesn't ever yield the thread, though it is unusual |
| 06:37:40 | → | CiaoSen joins (~Jura@dynamic-046-114-219-048.46.114.pool.telefonica.de) |
| 06:37:42 | <c_wraith> | The key is that it checks for the end of its timeslice on allocations |
| 06:38:08 | <c_wraith> | you can write a zero-allocation loop, but it's unusual in Haskell |
| 06:38:32 | <DigitalKiwi> | aren't most things in haskell unusual |
| 06:39:18 | <gensyst> | c_wraith, ah, i forgot... of course the *HASKELL* loop might be anywhere, but only FFI calls are going to bound threads. so of course there can be loop. |
| 06:39:30 | <gensyst> | I'm thinking about risks of occupying bound threads |
| 06:39:37 | <gensyst> | sorry, occupying OS threads |
| 06:39:42 | <gensyst> | too many of them |
| 06:39:44 | <gensyst> | until I run out |
| 06:39:53 | <c_wraith> | I mean, failing to yield is pretty catastrophic anyway |
| 06:40:12 | <c_wraith> | it will hang the whole program at the next major GC |
| 06:40:31 | <DigitalKiwi> | i failed to yield and got a ticket and an accident :( |
| 06:41:00 | <c_wraith> | A major GC needs to stop all threads to do its job (well, ok, there is the concurrent collector now. It doesn't need to.) |
| 06:42:04 | <DigitalKiwi> | has anyone written the haskell runtime in rust yet lol |
| 06:42:28 | <gensyst> | But why can forkOS only be called limited number of times? Why aren't the OS threads reused thousand times? |
| 06:43:46 | <DigitalKiwi> | oh https://github.com/HigherOrderCO/HVM |
| 06:43:47 | <monochrom> | Both are false. |
| 06:43:49 | → | oo_miguel joins (~Thunderbi@77.252.47.84) |
| 06:44:25 | <monochrom> | And at some time you realize that "forkOS" is a poor name, should have been named "forkBound" in the first place. |
| 06:45:05 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 240 seconds) |
| 06:45:07 | <gensyst> | i distinctly recall getting "too many threads" exception in the past... maybe it was something else :S |
| 06:45:15 | <gensyst> | how could i have been so wrong lol |
| 06:45:21 | <gensyst> | about everything |
| 06:45:22 | <monochrom> | Because even if you use forkIO only, you can have as many OS threads as you want, which is controlled by the number of "capabilities", i.e., RTS option -N |
| 06:45:56 | <monochrom> | Hell, you don't even have to use forkWhatever. You can just use par. |
| 06:46:27 | <gensyst> | monochrom, so forkOS is limited by numCapabilities? (unlike forkIO) |
| 06:46:49 | <monochrom> | That's the opposite of what I said. |
| 06:49:17 | <c_wraith> | honestly, forkOS is a weird thing and I'm not sure why you'd have a program that does it frequently. |
| 06:50:30 | → | mncheckm joins (~mncheck@193.224.205.254) |
| 06:51:10 | → | freeside joins (~mengwong@103.252.202.151) |
| 06:55:59 | × | freeside quits (~mengwong@103.252.202.151) (Ping timeout: 264 seconds) |
| 07:00:01 | × | mei quits (~mei@user/mei) (Ping timeout: 265 seconds) |
| 07:04:21 | × | titibandit quits (~titibandi@user/titibandit) (Remote host closed the connection) |
| 07:06:36 | → | freeside joins (~mengwong@103.252.202.151) |
| 07:10:47 | × | freeside quits (~mengwong@103.252.202.151) (Ping timeout: 240 seconds) |
| 07:13:43 | → | delYsid joins (~user@zidpc777.tugraz.at) |
| 07:13:59 | → | titibandit joins (~titibandi@user/titibandit) |
| 07:15:03 | <delYsid> | "mmap 4096 bytes at (nil): Cannot allocate memory" since latest Debian (bookworm) kernel upgrade. Do we have a fix for this, or should I just stop coding haskell for a few weeks? |
| 07:16:17 | → | mei joins (~mei@user/mei) |
| 07:17:04 | <gensyst> | i'm confused now. i've no idea where i got this "thread limitation" exceptions. |
| 07:17:11 | <gensyst> | maybe i'm just misremembering things completely |
| 07:17:11 | → | eugenrh joins (~eugenrh@2a02:2f08:4707:3e00:454b:9ac4:8552:8de8) |
| 07:19:21 | <[exa]> | delYsid: I see no such problem on debian, what's your versions? |
| 07:21:12 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:969e:4407:eb4f:f470) |
| 07:21:25 | <monochrom> | I think https://discourse.haskell.org/t/facing-mmap-4096-bytes-at-nil-cannot-allocate-memory-youre-not-alone/6259 basically implies that there is still no solution. |
| 07:23:48 | <[exa]> | hm the test there gives me like 256k allocs before failing, should I be worried? |
| 07:24:24 | <monochrom> | It seems like a Heisenbug. Next time it will be much sooner or much later. |
| 07:24:27 | → | wiosna joins (~karangura@c-73-93-95-154.hsd1.ca.comcast.net) |
| 07:25:17 | <[exa]> | delYsid: `uname -r` pls? |
| 07:25:36 | <[exa]> | (or maybe better -v) |
| 07:26:00 | → | gmg joins (~user@user/gehmehgeh) |
| 07:26:04 | → | cfricke joins (~cfricke@user/cfricke) |
| 07:29:24 | → | freeside joins (~mengwong@103.252.202.151) |
| 07:29:35 | <[exa]> | ah ok the new kernel really kills it |
| 07:29:58 | × | wiosna quits (~karangura@c-73-93-95-154.hsd1.ca.comcast.net) (Ping timeout: 250 seconds) |
| 07:33:28 | × | freeside quits (~mengwong@103.252.202.151) (Ping timeout: 240 seconds) |
| 07:35:34 | <[exa]> | is there any reason why the C example here lists |MMAP_32BIT ? that sounds completely wrong to me |
| 07:36:10 | <delYsid> | [exa]: 6.1.0-9-amd64 |
| 07:36:45 | <delYsid> | #1 SMP PREEMPT_DYNAMIC Debian 6.1.27-1 (2023-05-08) |
| 07:36:51 | <[exa]> | ok same here, but I failed to produce a crashing version of anything haskelly yet |
| 07:36:56 | <[exa]> | and your ghc is 9.2? |
| 07:37:07 | <delYsid> | lts-20.21, so 9.4 |
| 07:37:59 | <delYsid> | https://bbs.archlinux.org/viewtopic.php?id=282429 |
| 07:38:06 | <delYsid> | So others also see the problem. |
| 07:38:32 | <[exa]> | just to check, can you strace the bad mmap syscall? |
| 07:38:38 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 07:38:42 | <delYsid> | It appears recent kernels make certain Haskell programs segfault, great stuff. |
| 07:39:27 | <[exa]> | that happens |
| 07:39:40 | <[exa]> | could you pls find the flags from the mmap syscall? |
| 07:41:22 | <delYsid> | mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_32BIT, -1, 0) = -1 ENOMEM (Cannot allocate memory) |
| 07:41:36 | <[exa]> | hm yeah also the 32bit mmap |
| 07:41:44 | <[exa]> | mine doesn't have MAP_32BIT |
| 07:41:59 | <[exa]> | is your system 32bit? |
| 07:42:03 | <delYsid> | no |
| 07:43:04 | <delYsid> | Whats interesting is, that this triggers non-deterministicly, so it appears to happen at rather random points during program execution. |
| 07:43:21 | <[exa]> | that's usual with memory issues, yes |
| 07:45:49 | <[exa]> | IMO the MAP_32BIT shouldn't be there |
| 07:45:59 | <[exa]> | because that's a pretty hard constraint |
| 07:46:09 | <[exa]> | and I don't see any reason why ghc would require that |
| 07:46:57 | <delYsid> | Oh, you're right, this is 9.2" Maybe I should try nightly and see if it goes away. |
| 07:46:59 | × | mncheckm quits (~mncheck@193.224.205.254) (Remote host closed the connection) |
| 07:48:47 | <delYsid> | nope, dependency hell prevents that. |
| 07:49:35 | × | vglfr quits (~vglfr@209.198.137.192) (Ping timeout: 240 seconds) |
| 07:49:46 | → | vglfr joins (~vglfr@2a0d:3344:1b4f:9e10:fd6f:3374:7b4:df80) |
| 07:54:11 | × | vglfr quits (~vglfr@2a0d:3344:1b4f:9e10:fd6f:3374:7b4:df80) (Ping timeout: 264 seconds) |
| 07:54:49 | → | vglfr joins (~vglfr@2a0d:3344:1b4f:9e10:fd6f:3374:7b4:df80) |
| 07:56:36 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
| 07:57:08 | × | mei quits (~mei@user/mei) (Ping timeout: 240 seconds) |
| 07:57:08 | × | vglfr quits (~vglfr@2a0d:3344:1b4f:9e10:fd6f:3374:7b4:df80) (Read error: Connection reset by peer) |
| 07:57:25 | → | vglfr joins (~vglfr@2a0d:3344:1b4f:9e10:fd6f:3374:7b4:df80) |
| 08:00:10 | → | freeside joins (~mengwong@103.252.202.151) |
| 08:01:33 | → | mei joins (~mei@user/mei) |
| 08:04:47 | × | freeside quits (~mengwong@103.252.202.151) (Ping timeout: 265 seconds) |
| 08:08:34 | → | user____1 joins (~user@dynamic-046-114-227-240.46.114.pool.telefonica.de) |
| 08:11:10 | × | Sgeo_ quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 08:16:23 | × | vglfr quits (~vglfr@2a0d:3344:1b4f:9e10:fd6f:3374:7b4:df80) (Ping timeout: 264 seconds) |
| 08:16:39 | → | vglfr joins (~vglfr@209.198.137.192) |
| 08:20:40 | → | coot joins (~coot@89-69-206-216.dynamic.chello.pl) |
| 08:21:04 | × | coot_ quits (~coot@89-69-206-216.dynamic.chello.pl) (Ping timeout: 268 seconds) |
| 08:21:39 | → | mncheck joins (~mncheck@193.224.205.254) |
| 08:26:58 | → | Unhammer joins (~Unhammer@user/unhammer) |
| 08:27:35 | <Unhammer> | Hi, I've got libbz2-dev on Ubuntu but cabal still says * Missing (or bad) header file: bzlib.h |
| 08:27:37 | <Unhammer> | bzlib> * Missing (or bad) C library: bz2 |
| 08:27:48 | <Unhammer> | anyone know what else I need to do? |
| 08:28:23 | <Unhammer> | /usr/include/bzlib.h exists |
| 08:30:23 | <Unhammer> | oh PEBCAK I forgot I run stack with use-nix so I need nix: |
| 08:30:25 | <Unhammer> | packages: [bzip2] |
| 08:34:05 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 240 seconds) |
| 08:35:43 | × | vandita quits (~vandit@80-95-70-192.pool.digikabel.hu) (Ping timeout: 265 seconds) |
| 08:36:43 | → | Guest58 joins (~Guest90@139.59.162.0) |
| 08:37:10 | → | vandita joins (~vandit@84-236-97-30.pool.digikabel.hu) |
| 08:37:31 | → | freeside joins (~mengwong@103.252.202.151) |
| 08:38:49 | → | wiosna joins (~karangura@c-73-93-95-154.hsd1.ca.comcast.net) |
| 08:40:43 | × | elkcl quits (~elkcl@broadband-37-110-27-252.ip.moscow.rt.ru) (Ping timeout: 256 seconds) |
| 08:41:44 | × | freeside quits (~mengwong@103.252.202.151) (Ping timeout: 246 seconds) |
| 08:43:33 | × | wiosna quits (~karangura@c-73-93-95-154.hsd1.ca.comcast.net) (Ping timeout: 256 seconds) |
| 08:44:01 | × | gmg quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 08:47:25 | → | MajorBiscuit joins (~MajorBisc@145.94.40.195) |
| 08:48:01 | → | elkcl joins (~elkcl@broadband-37-110-27-252.ip.moscow.rt.ru) |
| 08:50:37 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 08:51:29 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 256 seconds) |
| 08:51:49 | × | Guest58 quits (~Guest90@139.59.162.0) (Quit: Client closed) |
| 08:51:58 | Lord_of_Life_ | is now known as Lord_of_Life |
| 08:54:26 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:34cc:c2aa:d793:2028) (Remote host closed the connection) |
| 08:56:08 | × | eugenrh quits (~eugenrh@2a02:2f08:4707:3e00:454b:9ac4:8552:8de8) (Ping timeout: 240 seconds) |
| 09:00:31 | → | freeside joins (~mengwong@103.252.202.151) |
| 09:01:06 | × | magnolia_mayhem[ quits (~ashinnvma@2001:470:69fc:105::2:e5ed) (Remote host closed the connection) |
| 09:02:04 | → | chomwitt joins (~chomwitt@2a02:587:7a07:4f00:1ac0:4dff:fedb:a3f1) |
| 09:04:47 | × | freeside quits (~mengwong@103.252.202.151) (Ping timeout: 240 seconds) |
| 09:05:35 | × | user____1 quits (~user@dynamic-046-114-227-240.46.114.pool.telefonica.de) (Ping timeout: 240 seconds) |
| 09:14:01 | × | use-value quits (~Thunderbi@2a00:23c6:8a03:2f01:2973:25bc:e202:9763) (Quit: use-value) |
| 09:19:06 | → | user____1 joins (~user@dynamic-046-114-227-240.46.114.pool.telefonica.de) |
| 09:43:39 | → | freeside joins (~mengwong@103.252.202.151) |
| 09:46:08 | × | darchitect quits (~darchitec@2a00:23c6:3584:df01:617c:9829:ef2d:1384) (Ping timeout: 240 seconds) |
| 09:48:12 | → | darchitect joins (~darchitec@2a00:23c6:3584:df01:ef79:bcf3:d062:3079) |
| 09:49:15 | × | freeside quits (~mengwong@103.252.202.151) (Ping timeout: 268 seconds) |
| 09:51:08 | → | freeside joins (~mengwong@103.252.202.151) |
| 09:52:54 | → | alternateved joins (~user@77-253-195-69.adsl.inetia.pl) |
| 09:54:56 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:6cda:5d2c:763a:75d3) |
| 09:55:28 | × | freeside quits (~mengwong@103.252.202.151) (Ping timeout: 265 seconds) |
| 09:59:29 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:6cda:5d2c:763a:75d3) (Ping timeout: 256 seconds) |
| 10:03:57 | → | gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) |
| 10:04:39 | → | alexherbo2 joins (~alexherbo@2a02-842a-8180-4601-8496-336f-2351-c84a.rev.sfr.net) |
| 10:05:06 | × | ft quits (~ft@p4fc2a88b.dip0.t-ipconnect.de) (Quit: leaving) |
| 10:05:30 | user____1 | is now known as gurkenglas |
| 10:05:37 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 10:05:59 | × | xff0x quits (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 240 seconds) |
| 10:11:10 | <[exa]> | delYsid: not a big deal about 9.2 tbh, seems working here too, just not having the 32bit flag for whatever reason |
| 10:11:36 | → | fbytez joins (~uid@2001:bc8:2117:100::) |
| 10:12:01 | <[exa]> | oh wait |
| 10:12:02 | <delYsid> | [exa]: Anything I could try to figure out why it is using 32BIT on my side? |
| 10:12:28 | <[exa]> | yeah I see the new ghc is actually doing the 32bit mmap and the older one was not |
| 10:12:36 | <[exa]> | iiiiiiiinteresting |
| 10:15:37 | <[exa]> | yap looks somewhere between 8.10 and 9.4 this |32bit thing got added which obviously kills it, because you can't reasonably expect the system to give you short addresses |
| 10:17:13 | × | CiaoSen quits (~Jura@dynamic-046-114-219-048.46.114.pool.telefonica.de) (Ping timeout: 265 seconds) |
| 10:17:13 | × | shriekingnoise_ quits (~shrieking@186.137.175.87) (Ping timeout: 265 seconds) |
| 10:22:24 | × | fbytez quits (~uid@2001:bc8:2117:100::) (Ping timeout: 248 seconds) |
| 10:26:01 | → | fbytez joins (~uid@2001:bc8:2117:100::) |
| 10:28:59 | <delYsid> | well, < 6.1.27 did work, so its a combination of the 32BIT flag and a recent kernel change. |
| 10:29:25 | <probie> | [exa]: why not? It's all virtual memory |
| 10:29:27 | <[exa]> | yap, the changes in kernel can't guarantee that much 32bit prefixes, which is sad but that's the reality |
| 10:29:46 | <[exa]> | probie: for stupid historical reasons, from the code it seems that it's for supporting non-PIC code with short addresses |
| 10:30:31 | × | gurkenglas quits (~user@dynamic-046-114-227-240.46.114.pool.telefonica.de) (Ping timeout: 240 seconds) |
| 10:31:05 | <[exa]> | I'm not saying it's not a linux issue too (there's no point in not giving the memory), but IMO the 32bit flag there is just superfluous |
| 10:31:17 | × | rembo10 quits (~rembo10@main.remulis.com) (Quit: ZNC 1.8.2 - https://znc.in) |
| 10:32:25 | × | foul_owl quits (~kerry@71.212.137.212) (Ping timeout: 268 seconds) |
| 10:33:27 | → | rembo10 joins (~rembo10@main.remulis.com) |
| 10:33:55 | → | shriekingnoise joins (~shrieking@186.137.175.87) |
| 10:34:25 | → | freeside joins (~mengwong@103.252.202.151) |
| 10:34:59 | × | vandita quits (~vandit@84-236-97-30.pool.digikabel.hu) (Ping timeout: 264 seconds) |
| 10:36:29 | → | vandita joins (~vandit@fibhost-67-47-61.fibernet.hu) |
| 10:38:31 | × | freeside quits (~mengwong@103.252.202.151) (Ping timeout: 240 seconds) |
| 10:50:01 | → | melonai joins (~mel@rnrd.eu) |
| 10:55:08 | × | shriekingnoise quits (~shrieking@186.137.175.87) (Ping timeout: 240 seconds) |
| 10:56:48 | → | __monty__ joins (~toonn@user/toonn) |
| 10:59:05 | → | xff0x joins (~xff0x@2405:6580:b080:900:e2e2:76c:3d04:5dc6) |
| 11:00:44 | → | gurkenglas joins (~user@dynamic-046-114-227-240.46.114.pool.telefonica.de) |
| 11:06:23 | × | gurkenglas quits (~user@dynamic-046-114-227-240.46.114.pool.telefonica.de) (Ping timeout: 240 seconds) |
| 11:09:53 | → | freeside joins (~mengwong@103.252.202.151) |
| 11:14:35 | × | freeside quits (~mengwong@103.252.202.151) (Ping timeout: 264 seconds) |
| 11:20:01 | <jean-paul[m]> | are typeclasses exactly isomorphic to records of values? |
| 11:20:12 | <jean-paul[m]> | (records of values? what else could you have a record of) |
| 11:20:54 | <jean-paul[m]> | Haskell 98 typeclasses, I probably mean |
| 11:25:03 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 11:28:59 | ← | delYsid parts (~user@zidpc777.tugraz.at) (ERC 5.4.1 (IRC client for GNU Emacs 30.0.50)) |
| 11:29:34 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 11:30:09 | × | xff0x quits (~xff0x@2405:6580:b080:900:e2e2:76c:3d04:5dc6) (Ping timeout: 256 seconds) |
| 11:31:42 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 11:31:49 | → | xff0x joins (~xff0x@ai098135.d.east.v6connect.net) |
| 11:37:05 | × | MajorBiscuit quits (~MajorBisc@145.94.40.195) (Ping timeout: 246 seconds) |
| 11:37:16 | → | Kuttenbrunzer joins (~Kuttenbru@2a02:8108:8b80:1d48::b809) |
| 11:37:45 | → | gurkenglas joins (~user@dynamic-046-114-227-240.46.114.pool.telefonica.de) |
| 11:39:44 | <ncf> | define exactly and isomorphic |
| 11:40:58 | → | MajorBiscuit joins (~MajorBisc@145.94.155.219) |
| 11:42:55 | <dminuoso> | % data Foo { a :: Int } |
| 11:42:55 | <yahb2> | <interactive>:151:10: error: ; Unexpected type ‘{a :: Int}’ ; In the data declaration for ‘Foo’ ; A data declaration should have form ; data Foo a = ... |
| 11:43:27 | <dminuoso> | The error message is surprisingly well formulated. What syntax am I tapping into here? |
| 11:43:51 | <dminuoso> | Why is {} being considered by the lexer in that type position? |
| 11:44:06 | <geekosaur> | kind annotation, I think |
| 11:44:08 | × | mikoto-chan quits (~mikoto-ch@ip-213-49-58-19.dsl.scarlet.be) (Ping timeout: 240 seconds) |
| 11:45:42 | <dminuoso> | % :set -fprint-explicit-kinds |
| 11:45:42 | <yahb2> | <no output> |
| 11:45:46 | <dminuoso> | % :t Const |
| 11:45:46 | <yahb2> | <interactive>:1:1: error: ; • Data constructor not in scope: Const ; • Perhaps you meant variable ‘const’ (imported from Prelude) |
| 11:45:55 | <dminuoso> | % import Data.Functor.Const |
| 11:45:55 | <yahb2> | <no output> |
| 11:45:57 | <dminuoso> | % :t Const |
| 11:45:57 | <yahb2> | Const :: forall {k} a (b :: k). a -> Const @{k} a b |
| 11:46:25 | <dminuoso> | geekosaur: Ah no! I think this has to do with inferred type variables |
| 11:46:33 | <dminuoso> | But that's only an output thing. |
| 11:46:47 | <dminuoso> | % f :: forall {k} a (b :: k). a -> Const @{k} a b; f = undefined |
| 11:46:47 | <yahb2> | <interactive>:161:43: error: parse error on input ‘}’ |
| 11:46:51 | <geekosaur> | yes, it's an "explicitly inferred" (hence braces instead of parens) kind annotation |
| 11:47:10 | <geekosaur> | lets you hide it from TypeApplications |
| 11:47:41 | <dminuoso> | id :: forall {a}. a -> a; id x = x |
| 11:47:43 | <dminuoso> | % id :: forall {a}. a -> a; id x = x |
| 11:47:43 | <yahb2> | <no output> |
| 11:47:45 | <dminuoso> | Interesting |
| 11:47:54 | <dminuoso> | % :set -XTypeApplications |
| 11:47:54 | <yahb2> | <no output> |
| 11:47:58 | <dminuoso> | % id @Int 1 |
| 11:47:58 | <yahb2> | <interactive>:167:1: error: ; • Cannot apply expression of type ‘a0 -> a0’ ; to a visible type argument ‘Int’ ; • In the expression: id @Int 1 ; In an equation for ‘it’: it = id... |
| 11:48:05 | <dminuoso> | geekosaur: TIL. Cute, thanks! |
| 11:48:39 | → | nate2 joins (~nate@98.45.169.16) |
| 11:53:25 | × | nate2 quits (~nate@98.45.169.16) (Ping timeout: 240 seconds) |
| 11:56:12 | × | vglfr quits (~vglfr@209.198.137.192) (Read error: Connection reset by peer) |
| 11:56:49 | → | vglfr joins (~vglfr@209.198.137.192) |
| 12:01:01 | → | CiaoSen joins (~Jura@dynamic-046-114-219-048.46.114.pool.telefonica.de) |
| 12:01:11 | melonai | is now known as Guest5823 |
| 12:06:44 | → | oneeyedalien joins (~oneeyedal@103.21.127.60) |
| 12:08:54 | × | Guest5823 quits (~mel@rnrd.eu) (Quit: ZNC 1.8.2 - https://znc.in) |
| 12:09:24 | → | eugenrh joins (~eugenrh@2a02:2f08:4707:3e00:454b:9ac4:8552:8de8) |
| 12:10:29 | → | zer0bitz_ joins (~zer0bitz@user/zer0bitz) |
| 12:11:44 | × | zer0bitz quits (~zer0bitz@user/zer0bitz) (Ping timeout: 248 seconds) |
| 12:11:50 | × | alexherbo2 quits (~alexherbo@2a02-842a-8180-4601-8496-336f-2351-c84a.rev.sfr.net) (Remote host closed the connection) |
| 12:12:09 | → | alexherbo2 joins (~alexherbo@2a02-842a-8180-4601-8496-336f-2351-c84a.rev.sfr.net) |
| 12:23:17 | × | MajorBiscuit quits (~MajorBisc@145.94.155.219) (Ping timeout: 246 seconds) |
| 12:24:24 | × | alternateved quits (~user@77-253-195-69.adsl.inetia.pl) (Quit: Fading out...) |
| 12:28:31 | × | vglfr quits (~vglfr@209.198.137.192) (Ping timeout: 240 seconds) |
| 12:30:15 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 12:33:17 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 268 seconds) |
| 12:33:35 | × | mei quits (~mei@user/mei) (Ping timeout: 240 seconds) |
| 12:34:13 | → | vglfr joins (~vglfr@209.198.137.192) |
| 12:35:08 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds) |
| 12:41:54 | → | MajorBiscuit joins (~MajorBisc@145.94.40.195) |
| 12:41:59 | → | mei joins (~mei@user/mei) |
| 12:44:47 | × | Kuttenbrunzer quits (~Kuttenbru@2a02:8108:8b80:1d48::b809) (Remote host closed the connection) |
| 12:48:21 | × | gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8) |
| 12:49:35 | × | gensyst quits (~gensyst@user/gensyst) (Ping timeout: 240 seconds) |
| 12:53:02 | × | vglfr quits (~vglfr@209.198.137.192) (Ping timeout: 246 seconds) |
| 12:54:37 | → | vglfr joins (~vglfr@2a0d:3344:1b4f:9e10:6541:9cfd:d4d8:6c86) |
| 12:56:44 | → | Lycurgus joins (~juan@user/Lycurgus) |
| 12:58:25 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:6cda:5d2c:763a:75d3) |
| 13:02:31 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:6cda:5d2c:763a:75d3) (Ping timeout: 240 seconds) |
| 13:09:25 | × | vandita quits (~vandit@fibhost-67-47-61.fibernet.hu) (Ping timeout: 240 seconds) |
| 13:11:25 | → | vandita joins (~vandit@80-95-69-214.pool.digikabel.hu) |
| 13:15:44 | × | cheater quits (~Username@user/cheater) (Ping timeout: 248 seconds) |
| 13:16:53 | <jean-paul[m]> | ncf: Hmmm. Yea I didn't really mean isomorphic I guess. Something something subset? How about: Could I rewrite any arbitrary use of Haskell 98 typeclasses to use a manual/explicit record instead? |
| 13:17:37 | <jean-paul[m]> | I can't think of a case where I couldn't |
| 13:17:38 | <opqdonut> | yes, but you lose the guarantee of uniqueness |
| 13:18:04 | <opqdonut> | e.g. you could have two incompatible OrdDict Int records |
| 13:18:16 | <jean-paul[m]> | Ah, right. Interesting. |
| 13:18:20 | <opqdonut> | and then your binary search tree breaks its invariants |
| 13:22:52 | → | cheater joins (~Username@user/cheater) |
| 13:31:56 | <dminuoso> | opqdonut: Mmm, in principle you could still have this property in GHC Haskell compiled programs with typeclasses (even without orphan instances) |
| 13:32:07 | <dminuoso> | Or.. no. Actually hold that thought. |
| 13:32:12 | <dminuoso> | Its precisely orphan instances that can cause this. |
| 13:34:32 | → | cheater_ joins (~Username@user/cheater) |
| 13:36:05 | × | cheater quits (~Username@user/cheater) (Ping timeout: 240 seconds) |
| 13:36:08 | cheater_ | is now known as cheater |
| 13:40:57 | <jade[m]> | what's the easiest way to play around with a package in ghci? |
| 13:41:06 | <jade[m]> | download it globally with cabal and load it manually? |
| 13:41:41 | <dminuoso> | `cabal repl --build-depends bytestring` |
| 13:42:16 | <dminuoso> | Though thats a bad example, since it ships as a boot library. :P |
| 13:42:27 | <dminuoso> | `cabal repl --build-depends flatparse` |
| 13:42:43 | <jade[m]> | thank you, I wanted to try out some stuff with random |
| 13:43:18 | → | wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com) |
| 13:43:18 | × | wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
| 13:43:18 | → | wroathe joins (~wroathe@user/wroathe) |
| 13:44:02 | <dminuoso> | jade[m]: You can even include arbitrary constraints to control versions or specify build-depends for multiple packages. |
| 13:45:05 | <dminuoso> | e.g.: cabal repl --build-depends "flatparse ^>= { 0.3.5.1 }, mason == 0.2.4" |
| 13:51:18 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 250 seconds) |
| 13:51:47 | × | Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt: personae.ai-integration.biz) |
| 13:53:31 | × | dtman34 quits (~dtman34@2601:447:d000:93c9:f423:c4f2:ff81:26d4) (Ping timeout: 240 seconds) |
| 13:58:05 | → | delYsid joins (~user@84-115-138-74.cable.dynamic.surfer.at) |
| 14:01:53 | → | mikoto-chan joins (~mikoto-ch@ip-213-49-58-19.dsl.scarlet.be) |
| 14:05:52 | → | ryantrinkle joins (~ryantrink@140.174.243.224) |
| 14:13:23 | × | kritzefitz quits (~kritzefit@debian/kritzefitz) (Ping timeout: 264 seconds) |
| 14:16:03 | × | alexherbo2 quits (~alexherbo@2a02-842a-8180-4601-8496-336f-2351-c84a.rev.sfr.net) (Ping timeout: 245 seconds) |
| 14:18:11 | × | vglfr quits (~vglfr@2a0d:3344:1b4f:9e10:6541:9cfd:d4d8:6c86) (Ping timeout: 264 seconds) |
| 14:21:52 | → | vglfr joins (~vglfr@2a0d:3344:1b4f:9e10:d461:91e6:38f8:9e24) |
| 14:24:22 | → | bigLama joins (~alex@2001:861:4f80:4a50:e792:bb46:1a0c:b1d2) |
| 14:24:57 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 14:28:13 | → | dtman34 joins (~dtman34@76.156.89.180) |
| 14:28:28 | × | reverse quits (~inversed@bcdcac82.skybroadband.com) (Ping timeout: 240 seconds) |
| 14:28:29 | → | shriekingnoise joins (~shrieking@186.137.175.87) |
| 14:28:59 | × | vglfr quits (~vglfr@2a0d:3344:1b4f:9e10:d461:91e6:38f8:9e24) (Ping timeout: 264 seconds) |
| 14:32:55 | → | kritzefitz joins (~kritzefit@debian/kritzefitz) |
| 14:36:32 | → | ozkutuk[m] joins (~ozkutuk@2001:470:69fc:105::2:9af8) |
| 14:42:11 | → | reverse joins (~inversed@bcdcac82.skybroadband.com) |
| 14:44:08 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 14:50:17 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 14:54:42 | → | waleee joins (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) |
| 14:57:17 | → | vglfr joins (~vglfr@209.198.137.192) |
| 15:00:56 | × | vandita quits (~vandit@80-95-69-214.pool.digikabel.hu) (Ping timeout: 265 seconds) |
| 15:01:22 | → | rf joins (~rf@2605:59c8:179c:f610:35bd:5aa6:7274:a262) |
| 15:02:34 | → | vandita joins (~vandit@84-236-122-33.pool.digikabel.hu) |
| 15:07:08 | × | acidjnk quits (~acidjnk@p200300d6e7072f543cd43d7d1255efcb.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 15:07:57 | × | bliminse quits (~bliminse@user/bliminse) (Quit: leaving) |
| 15:09:18 | × | oneeyedalien quits (~oneeyedal@103.21.127.60) (Remote host closed the connection) |
| 15:10:01 | × | waleee quits (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 256 seconds) |
| 15:10:36 | → | bliminse joins (~bliminse@user/bliminse) |
| 15:12:54 | → | nick_ joins (~nick@ip68-14-184-208.pn.at.cox.net) |
| 15:13:09 | → | waleee joins (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) |
| 15:22:02 | → | gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) |
| 15:33:19 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Remote host closed the connection) |
| 15:35:05 | × | gurkenglas quits (~user@dynamic-046-114-227-240.46.114.pool.telefonica.de) (Ping timeout: 246 seconds) |
| 15:39:43 | → | Tuplanolla joins (~Tuplanoll@91-159-68-236.elisa-laajakaista.fi) |
| 15:40:23 | × | Alex_test quits (~al_test@178.34.163.104) (Ping timeout: 264 seconds) |
| 15:40:37 | × | CiaoSen quits (~Jura@dynamic-046-114-219-048.46.114.pool.telefonica.de) (Ping timeout: 256 seconds) |
| 15:40:45 | × | coot quits (~coot@89-69-206-216.dynamic.chello.pl) (Ping timeout: 268 seconds) |
| 15:40:59 | × | AlexZenon quits (~alzenon@178.34.163.104) (Ping timeout: 264 seconds) |
| 15:44:47 | → | Alex_test joins (~al_test@178.34.163.104) |
| 15:44:50 | × | vglfr quits (~vglfr@209.198.137.192) (Ping timeout: 250 seconds) |
| 15:45:09 | × | hugo quits (znc@verdigris.lysator.liu.se) (Ping timeout: 256 seconds) |
| 15:45:21 | → | mauke joins (~mauke@user/mauke) |
| 15:46:13 | → | AlexZenon joins (~alzenon@178.34.163.104) |
| 15:47:06 | → | gurkenglas joins (~user@dynamic-046-114-168-101.46.114.pool.telefonica.de) |
| 15:48:52 | → | acidjnk joins (~acidjnk@p200300d6e7072f5435207693d4db5d05.dip0.t-ipconnect.de) |
| 15:50:11 | → | nate2 joins (~nate@98.45.169.16) |
| 15:53:42 | → | hugo joins (znc@verdigris.lysator.liu.se) |
| 15:54:47 | × | nate2 quits (~nate@98.45.169.16) (Ping timeout: 240 seconds) |
| 15:55:31 | × | waleee quits (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 240 seconds) |
| 15:55:33 | × | eugenrh quits (~eugenrh@2a02:2f08:4707:3e00:454b:9ac4:8552:8de8) (Ping timeout: 265 seconds) |
| 15:55:42 | <eldritchcookie[m> | ghc supports shared libraries and finding them dynamically at run time, how different can the shared object be from what is expected say i compile package foo with bar 0.1 but my bar in the system is 0.1.1 with the same exported entities per module, does that work? if so how different can bar be? could i use bar 0.2 which exports more things but hasn't removed any entities? |
| 15:55:59 | × | MajorBiscuit quits (~MajorBisc@145.94.40.195) (Ping timeout: 240 seconds) |
| 15:57:55 | <geekosaur> | https://wiki.haskell.org/Shared_libraries_and_GHC |
| 15:58:21 | <geekosaur> | tl;dr: it's more complex than that because internals leak into the shared objects for cross-module inlining |
| 16:00:58 | → | _ht joins (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) |
| 16:01:59 | × | AlexZenon quits (~alzenon@178.34.163.104) (Ping timeout: 264 seconds) |
| 16:03:12 | → | AlexZenon joins (~alzenon@178.34.163.104) |
| 16:03:29 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:6cda:5d2c:763a:75d3) |
| 16:05:20 | → | use-value joins (~Thunderbi@2a00:23c6:8a03:2f01:8d0b:d6b6:c02a:1360) |
| 16:10:25 | <eldritchcookie[m> | what i gather is that i can if i disable inlining |
| 16:11:50 | <eldritchcookie[m> | which i should not do |
| 16:12:23 | <eldritchcookie[m> | can i disable inlining for only a specific package? |
| 16:15:51 | → | coot joins (~coot@89-69-206-216.dynamic.chello.pl) |
| 16:19:53 | <eldritchcookie[m> | cool there is https://downloads.haskell.org/ghc/9.2.7/docs/html/users_guide/using-optimisation.html#ghc-flag--fomit-interface-pragmas |
| 16:20:24 | <eldritchcookie[m> | is that what you mentioned or would i need to disable more optimizations? |
| 16:21:41 | <geekosaur> | I think you have to force -O0 |
| 16:22:01 | <geekosaur> | and I'm not sure even that would be sufficient to achieve ABI compatibility |
| 16:22:06 | × | gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8) |
| 16:23:07 | → | MajorBiscuit joins (~MajorBisc@145.94.155.219) |
| 16:24:43 | → | dom0 joins (~u0_a242@46.222.33.239) |
| 16:24:50 | → | Pickchea joins (~private@user/pickchea) |
| 16:27:07 | × | spatchkaa quits (~spatchkaa@S010600fc8da47b63.gv.shawcable.net) (Quit: Client closed) |
| 16:34:27 | × | MajorBiscuit quits (~MajorBisc@145.94.155.219) (Ping timeout: 256 seconds) |
| 16:35:05 | <eldritchcookie[m> | this makes hslua just so much more appealing as an option. |
| 16:35:07 | → | alexherbo2 joins (~alexherbo@ip-166.net-81-220-17.versailles.rev.numericable.fr) |
| 16:37:51 | → | dhil joins (~dhil@78.45.150.83.ewm.ftth.as8758.net) |
| 16:40:43 | → | freeside joins (~mengwong@103.252.202.151) |
| 16:46:01 | × | freeside quits (~mengwong@103.252.202.151) (Ping timeout: 240 seconds) |
| 16:47:35 | × | jjb quits (~jjb@user/jjb) (Ping timeout: 240 seconds) |
| 16:48:05 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net) |
| 16:49:13 | → | barzo joins (~hd@31.223.56.119) |
| 16:49:36 | → | jjb joins (~jjb@user/jjb) |
| 16:59:01 | × | titibandit quits (~titibandi@user/titibandit) (Remote host closed the connection) |
| 17:00:06 | → | gensyst joins (~gensyst@user/gensyst) |
| 17:01:45 | × | vandita quits (~vandit@84-236-122-33.pool.digikabel.hu) (Ping timeout: 240 seconds) |
| 17:03:53 | → | vandita joins (~vandit@84-236-122-33.pool.digikabel.hu) |
| 17:05:45 | × | gensyst quits (~gensyst@user/gensyst) (Quit: Leaving) |
| 17:06:28 | × | mbuf quits (~Shakthi@49.207.178.186) (Quit: Leaving) |
| 17:08:54 | × | finnekit quits (~finnekit@fsf/member/finnekit) (Ping timeout: 250 seconds) |
| 17:08:56 | × | bramhaag quits (~bramhaag@134.195.121.39) (Ping timeout: 268 seconds) |
| 17:09:10 | → | freeside joins (~mengwong@103.252.202.151) |
| 17:11:34 | → | bramhaag joins (~bramhaag@134.195.121.39) |
| 17:11:46 | → | finnekit joins (~finnekit@fsf/member/finnekit) |
| 17:13:11 | × | freeside quits (~mengwong@103.252.202.151) (Ping timeout: 240 seconds) |
| 17:15:33 | → | kjak joins (~kjak@pool-72-66-75-40.washdc.fios.verizon.net) |
| 17:17:57 | → | econo joins (uid147250@user/econo) |
| 17:22:56 | → | cheater_ joins (~Username@user/cheater) |
| 17:23:08 | × | cheater quits (~Username@user/cheater) (Ping timeout: 240 seconds) |
| 17:23:11 | cheater_ | is now known as cheater |
| 17:32:50 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 17:34:12 | × | dom0 quits (~u0_a242@46.222.33.239) (Read error: Connection reset by peer) |
| 17:34:30 | → | dom0 joins (~u0_a242@cm-81-9-195-53.telecable.es) |
| 17:34:57 | <ghostbuster> | what's the best haskell book that i can get a physical paper copy of? |
| 17:35:52 | <jade[m]> | i liked 'programming in haskell' by graham hutton a lot |
| 17:37:07 | <geekosaur> | consider that seconded |
| 17:37:57 | <ghostbuster> | oh he's part of computerphile on youtube? |
| 17:38:12 | <ghostbuster> | cool |
| 17:38:14 | <delYsid> | [exa]: I figured that passing ghc-options -with-rtsopts=-xm40000000 fixes the segfaults in my binary. Is there a better fix? |
| 17:41:10 | <jade[m]> | ghostbuster: yes, he has a few videos about monadic parsing on there if I recall correctly |
| 17:41:26 | × | dom0 quits (~u0_a242@cm-81-9-195-53.telecable.es) (Ping timeout: 246 seconds) |
| 17:45:05 | <ghostbuster> | ok i'm going to order it |
| 17:45:15 | <ghostbuster> | i feel like i need a book i can flip back and forth in |
| 17:45:51 | <ghostbuster> | this looks cool too but maybe not for a beginner https://www.amazon.ca/Algorithm-Design-Haskell-Richard-Bird/dp/1108491618 |
| 17:47:43 | → | Guest97 joins (~Guest97@2a00:23c4:31cc:a301:5093:416:b7a8:251f) |
| 17:52:13 | → | dom0 joins (~u0_a242@cm-81-9-195-53.telecable.es) |
| 17:53:35 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 17:57:59 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 240 seconds) |
| 17:58:31 | × | dhil quits (~dhil@78.45.150.83.ewm.ftth.as8758.net) (Ping timeout: 240 seconds) |
| 18:00:35 | × | jero98772 quits (~jero98772@2800:484:1d84:9000:8822:84bd:a4f4:947f) (Ping timeout: 256 seconds) |
| 18:01:42 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:6cda:5d2c:763a:75d3) (Remote host closed the connection) |
| 18:05:07 | × | dom0 quits (~u0_a242@cm-81-9-195-53.telecable.es) (Ping timeout: 256 seconds) |
| 18:08:08 | → | dom0 joins (~u0_a242@cm-81-9-195-53.telecable.es) |
| 18:10:26 | × | mikoto-chan quits (~mikoto-ch@ip-213-49-58-19.dsl.scarlet.be) (Quit: WeeChat 3.8) |
| 18:11:43 | → | zeenk joins (~zeenk@2a02:2f04:a105:f00::7fe) |
| 18:11:52 | → | jero98772 joins (~jero98772@2800:484:1d84:9000:8822:84bd:a4f4:947f) |
| 18:12:00 | → | mikoto-chan joins (~mikoto-ch@ip-213-49-58-19.dsl.scarlet.be) |
| 18:12:34 | × | alexherbo2 quits (~alexherbo@ip-166.net-81-220-17.versailles.rev.numericable.fr) (Remote host closed the connection) |
| 18:13:12 | → | alexherbo2 joins (~alexherbo@2a02-842a-8180-4601-1d2b-cbea-330c-620a.rev.sfr.net) |
| 18:17:26 | → | gensyst joins (~gensyst@user/gensyst) |
| 18:19:17 | × | Guest97 quits (~Guest97@2a00:23c4:31cc:a301:5093:416:b7a8:251f) (Quit: Client closed) |
| 18:19:28 | <sm> | ghostbuster: define best, obviously ? |
| 18:20:01 | <sm> | or not, maybe you found it :) |
| 18:20:31 | <[exa]> | delYsid: afaik that's hinting the default mmap location. can you check what happens if you use that in the mmap-test.c tht was posted on the forum? |
| 18:20:35 | <sm> | that might be the one book everyone recommends and no one has a bad word to say about |
| 18:23:59 | × | gensyst quits (~gensyst@user/gensyst) (Quit: Leaving) |
| 18:24:39 | → | Radioredwagon joins (~radioredw@user/radioredwagon) |
| 18:25:49 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:6cda:5d2c:763a:75d3) |
| 18:26:04 | → | freeside joins (~mengwong@bb115-66-81-217.singnet.com.sg) |
| 18:27:01 | × | mikoto-chan quits (~mikoto-ch@ip-213-49-58-19.dsl.scarlet.be) (Quit: WeeChat 3.8) |
| 18:29:31 | × | czy quits (~user@host-140-24.ilcub310.champaign.il.us.clients.pavlovmedia.net) (Ping timeout: 240 seconds) |
| 18:30:19 | → | gmg joins (~user@user/gehmehgeh) |
| 18:30:23 | × | freeside quits (~mengwong@bb115-66-81-217.singnet.com.sg) (Ping timeout: 240 seconds) |
| 18:36:31 | → | bgs joins (~bgs@212-85-160-171.dynamic.telemach.net) |
| 18:37:39 | × | coot quits (~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot) |
| 18:39:17 | → | simendsjo joins (~user@84.211.91.241) |
| 18:46:23 | × | nick_ quits (~nick@ip68-14-184-208.pn.at.cox.net) (Ping timeout: 264 seconds) |
| 18:47:52 | → | mmhat joins (~mmh@p200300f1c7066837ee086bfffe095315.dip0.t-ipconnect.de) |
| 18:48:47 | × | mmhat quits (~mmh@p200300f1c7066837ee086bfffe095315.dip0.t-ipconnect.de) (Client Quit) |
| 18:49:02 | <delYsid> | [exa]: I got that value from the GHC documentation for -xm, but I have to admit I have absolutely no idea what it does. It apparently makes the problem go away. Which forum are you refering to, the link I pasted? |
| 18:49:27 | <ghostbuster> | sm: i already ordered that one haha |
| 18:49:39 | <ghostbuster> | but i generally like to have at least 2 resources to consult when learning a new language |
| 18:49:53 | <sm> | good job supporting quality writing |
| 18:49:55 | <[exa]> | delYsid: yeah that discourse one |
| 18:50:07 | <sm> | you may not have seen |
| 18:50:07 | <sm> | @where books |
| 18:50:07 | <lambdabot> | https://www.extrema.is/articles/haskell-books is the best list of Haskell books. See also: LYAH, HTAC, RWH, PH, YAHT, SOE, HR, PIH, TFwH, wikibook, PCPH, HPFFP, FSAF, HftVB, TwT, FoP, PFAD, WYAH, |
| 18:50:07 | <lambdabot> | non-haskell-books |
| 18:51:24 | × | Radioredwagon quits (~radioredw@user/radioredwagon) (Quit: Leaving) |
| 18:51:49 | <ghostbuster> | cool |
| 18:51:50 | × | kjak quits (~kjak@pool-72-66-75-40.washdc.fios.verizon.net) (Remote host closed the connection) |
| 18:52:30 | → | machinedgod joins (~machinedg@84-115-230-104.cable.dynamic.surfer.at) |
| 18:52:36 | <ghostbuster> | this might be kind of an odd question but does experience with the parallel nature of logic design / VHDL make it easier/harder to learn functional programming, as opposed to someone who has only used imperative languages? |
| 18:53:33 | <geekosaur> | I can't say experience with Prolog / logic programming helped me very much |
| 18:54:06 | <geekosaur> | it helped a little, but more because I was already aware of / open to paradigms other than imperative or OO |
| 18:54:39 | <ghostbuster> | interesting |
| 18:54:59 | <ghostbuster> | i have no experience with prolog |
| 18:55:00 | × | dom0 quits (~u0_a242@cm-81-9-195-53.telecable.es) (Ping timeout: 268 seconds) |
| 18:55:23 | → | waleee joins (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) |
| 18:55:45 | <geekosaur> | (mathematical logic vs. hardware logic) |
| 18:56:17 | <ghostbuster> | yeah it seems from a cursory glance like it might be similar to FP but i guess not |
| 18:56:49 | <geekosaur> | a few similarities and in particular prolog is declarative |
| 18:57:06 | <geekosaur> | but there's a big difference between logic programming and functional programming |
| 18:58:52 | <[exa]> | ghostbuster: I'd say it helps; anything that abstracts you away from "running the process imperatively" to "describing how the process should run" is roughly on the way |
| 19:00:17 | <ghostbuster> | i think i've sufficiently wrapped my head around the basic concept of FP, now i'm a bit hung up on basic syntax |
| 19:01:06 | <sm> | practice grasshopper. I recommend some project euler problems |
| 19:01:24 | <jade[m]> | mhm, the concepts are the most important things |
| 19:01:33 | <jade[m]> | the syntax almost follows from that, in a sense |
| 19:01:40 | <sm> | alongside reading other people's (simple) code |
| 19:02:12 | <sm> | maybe exercism is the one that lets you easily view other solutions ? |
| 19:02:15 | <ghostbuster> | add :: Integer -> Integer -> Integer |
| 19:02:24 | → | mikoto-chan joins (~mikoto-ch@ip-213-49-58-19.dsl.scarlet.be) |
| 19:02:42 | <ghostbuster> | ^ using the same symbol to represent inputs and outputs |
| 19:02:51 | <monochrom> | exercism is better than project euler for this. |
| 19:03:07 | → | dom0 joins (~u0_a242@46.222.94.103) |
| 19:03:12 | <geekosaur> | there's not a lot of difference. consider partial application (e.g. `add 1`) |
| 19:03:30 | <geekosaur> | is the first arrow pointing to an input or an output? |
| 19:03:34 | × | dom0 quits (~u0_a242@46.222.94.103) (Client Quit) |
| 19:03:45 | sm | found project euler nice and simple.. here's a simple number problem, go |
| 19:04:01 | <monochrom> | "simple" |
| 19:04:23 | <jade[m]> | think of function definition `a -> b -> c` as `a -> (b -> c)` and the `->` simply as a way to define a function from something to something else |
| 19:04:43 | <jade[m]> | *instead* of `a -> b -> c` meaning `(a, b) -> c` |
| 19:04:52 | <monochrom> | If you aren't a math major, project euler is just practicing brute-forcing over and over again. |
| 19:05:05 | <ghostbuster> | ah ok that actually makes sense jade[m] |
| 19:05:40 | <monochrom> | If you're a math major, project euler is about thinking very hard, coding up a O(1)-time algorithm that's trivial to code up in any language. |
| 19:06:00 | <sm> | that made no difference for me; they were simple problems that didn't distract from figuring out Haskell syntax and mechanics |
| 19:06:08 | <sm> | eg https://projecteuler.net/problem=1 |
| 19:06:09 | <[exa]> | monochrom: you mean "thinking very hard and writing down the result" ? :D |
| 19:06:13 | → | foul_owl joins (~kerry@71.212.137.212) |
| 19:06:14 | <monochrom> | Either way I can't see how it learns you good programming. |
| 19:06:25 | <jade[m]> | ghostbuster: this is a lot of my personal experience. |
| 19:06:25 | <jade[m]> | "Why is thing X this weird in haskell, can it not be 'normal'" -> learning a bit more -> "Oh this makes a lot of sense actually, why are all the mainstream imperative languages *not* doing that?" |
| 19:06:40 | <sm> | "good programming" is not the goal of someone trying to write their first Haskell code :) |
| 19:06:40 | ghostbuster | is not a math major |
| 19:06:50 | jade[m] | is neither |
| 19:07:18 | [exa] | is, and avoids all that knowledge in programming by far |
| 19:07:42 | <ghostbuster> | i had a taste of real analysis in one course during undergrad but that was ~10 years ago |
| 19:07:42 | jade[m] | aspires to be, some day |
| 19:07:55 | <[exa]> | jade[m]: well good luck |
| 19:08:21 | <monochrom> | Well "trying to write their first Haskell code" is fulfilled by LYAH too. Now why don't you also recommend that? There is a reason. |
| 19:08:24 | <[exa]> | ghostbuster: btw with most confusing syntax things, don't hesitate to ask here (or in #haskell-beginners), people here love explaining stuff |
| 19:08:35 | <jade[m]> | Thank you, I will start a compsci minor in ~2 months |
| 19:08:45 | <ghostbuster> | nice |
| 19:09:08 | <[exa]> | jade[m]: what uni? (just curious, feel free to ignore :D ) |
| 19:09:25 | × | vandita quits (~vandit@84-236-122-33.pool.digikabel.hu) (Ping timeout: 240 seconds) |
| 19:09:26 | <sm> | monochrom: I'm not discounting your perspective (a teacher's, I think), but reporting my experience. Project Euler helped me get going and it fit that need ideally. LYAH didn't, nothing useful in there |
| 19:09:26 | <monochrom> | The point is that we are done with recommending resources that can only get you to write your first few lines of Haskell code. |
| 19:09:40 | → | freeside joins (~mengwong@bb115-66-81-217.singnet.com.sg) |
| 19:10:09 | <geekosaur> | but I'm pretty sure PE only works if you know the math |
| 19:10:17 | × | jero98772 quits (~jero98772@2800:484:1d84:9000:8822:84bd:a4f4:947f) (Ping timeout: 256 seconds) |
| 19:10:25 | <geekosaur> | brute forcing PE works poorly in any language |
| 19:10:30 | <ghostbuster> | project euler is pretty basic math early on isn't it? |
| 19:10:47 | <jade[m]> | [exa]: you probably wouldn't know it, a fairly small german one |
| 19:10:56 | <sm> | yep. "Find the sum of all the multiples of 3 or 5 below 1000." I certainly didn't complete all of it |
| 19:11:22 | → | vandita joins (~vandit@87-97-13-52.pool.digikabel.hu) |
| 19:11:25 | <[exa]> | ghostbuster: btw as a mental exercise, it is interesting to have a look why the function types are parenthesized "from right" while function argument application is parenthesized "from left" -- e.g., compare type `sumThree :: Int -> (Int -> (Int -> Int))` with the use: `((sumThree 1) 2) 3` |
| 19:11:50 | <mauke> | s/poorly/great/ |
| 19:12:48 | sm | checks.. I did the first 18 |
| 19:13:25 | <sm> | of.. 834 . I see why I could be giving a wrong impression :) |
| 19:13:32 | <[exa]> | I didn't like Euler problems solely for the fact that all the latter ones follow this style of "yeah let's pull in this advanced finite field theorem out of nowhere and observe how the problem gets trivial again" |
| 19:13:35 | × | freeside quits (~mengwong@bb115-66-81-217.singnet.com.sg) (Ping timeout: 240 seconds) |
| 19:14:08 | × | barzo quits (~hd@31.223.56.119) (Read error: Connection reset by peer) |
| 19:14:23 | <monochrom> | It is Math Olympiad but you have to write machine-readable solutions. |
| 19:14:37 | → | barzo joins (~hd@31.223.56.119) |
| 19:15:09 | <[exa]> | why people recommend it for programming then? |
| 19:15:16 | <monochrom> | Or you can use brute-forcing and have 1000 exercises for list comprehension, 900 of which are too slow. |
| 19:15:16 | <[exa]> | ._. |
| 19:15:58 | <mauke> | nah, just let it run for a few days |
| 19:16:20 | <sm> | [exa]: I've just been saying why.. the first few problems are simple enough and easy enough to view that it's non-distracting. Compare with exercism where it's a whole signup, checkout, learn a process kind of thing |
| 19:16:41 | <ghostbuster> | [exa]: i'm curious to see an example of a PE problem like that |
| 19:16:50 | <sm> | if it weren't for that maybe I'd rate exercism #1. But that's just me, YMMV |
| 19:17:07 | → | ft joins (~ft@p4fc2a88b.dip0.t-ipconnect.de) |
| 19:17:20 | <monochrom> | "Find the sum of all the multiples of 3 or 5 below 1000" is already like that. You are not supposed to for i=0 to 1000. |
| 19:17:30 | <[exa]> | sm: ah yeah, true |
| 19:17:47 | <[exa]> | ghostbuster: PE? |
| 19:18:03 | <mauke> | portable euler |
| 19:18:04 | <monochrom> | You are supposed to, like, div 1000 3 + div 1000 5 - div 1000 15 |
| 19:18:33 | <monochrom> | Err no sorry, that's just the counts. |
| 19:18:35 | <sm> | my answer was `a1 = sum [n | n <- [1..1000-1], n `mod` 3 == 0 || n `mod` 5 == 0]`, "supposed to" didn't enter my mind |
| 19:18:52 | <sm> | just "here's a problem you can understand, can you write that in haskell ?" |
| 19:18:56 | <ghostbuster> | mauke: what are you some kind of systems programmer? :P |
| 19:18:58 | <jade[m]> | a lot of sum problems are like that, if you can find a closed form, why would you do it programmatically |
| 19:19:03 | <[exa]> | monochrom: you can expand it to the sums (it's kinda triangular) |
| 19:20:22 | <sm> | I think some of you are thinking like a beginner in a CS algorithms class. That's not what I mean by a beginner Haskell programmer. |
| 19:20:48 | × | foul_owl quits (~kerry@71.212.137.212) (Ping timeout: 240 seconds) |
| 19:20:56 | <jade[m]> | that's what I think is the tradeoff between beautiful or expressive code and fast code. `sum [1..n]` looks great and is super expressive, but `((n - 1) * n) / 2` is "better" |
| 19:20:58 | <monochrom> | I guess "let n = div 1000 3 in 3*(n*(n-1) `div` 2)" does the sum of multiples of 3. Similarly for the other terms. |
| 19:21:20 | <ghostbuster> | [exa]: trying to write the body for sumThree now haha |
| 19:21:34 | <[exa]> | jade[m]: {-# RULES sum [1..n] = ...... #-} gogogo |
| 19:21:43 | → | jero98772 joins (~jero98772@2800:484:1d84:9000:8822:84bd:a4f4:947f) |
| 19:21:48 | <mauke> | shouldn't that be n + 1 |
| 19:21:48 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer) |
| 19:21:54 | <jade[m]> | I haven't worked with rewrite rules yet haha |
| 19:22:10 | <[exa]> | ghostbuster: that was for demonstration but you can just smash the 3 things together with + |
| 19:22:37 | <[exa]> | mauke: yap |
| 19:22:40 | <ghostbuster> | i tried `sumThree x y x = x + y + z` |
| 19:22:48 | <monochrom> | My last stab at PE before I let go (and actually afk and take a shower and have tea): |
| 19:22:55 | <jade[m]> | mauke: ah yeah, I always get that one mixed up |
| 19:23:05 | <monochrom> | If PE began with "count the number of integers from 1 to 10^100 inclusive" |
| 19:23:13 | <mauke> | and that's why sum [1..n] is superior :-) |
| 19:23:19 | <[exa]> | ghostbuster: the type might get a bit too generic there -- haskell will by default make a function that works "for all numeric things" |
| 19:23:26 | <jade[m]> | mauke: yep haha |
| 19:23:36 | <monochrom> | I'm sure programmers would be like "[1 | i<-[1..10^100]] This is a great programming exercise!" |
| 19:23:54 | <ghostbuster> | [exa]: no i mean i included the :: line as well |
| 19:24:04 | <monochrom> | but also say "why is it still too slow under -O2? GHC sucks" |
| 19:24:05 | <int-e> | monochrom: how do I parallelize this? |
| 19:24:20 | <[exa]> | ghostbuster: without the line you might see a type like `Num a => a->a->a->a` which means roughly "if we can assume that some a is Num-eric, this has a type a->a->a->a" |
| 19:24:34 | <jade[m]> | length [0 .. 10^100] |
| 19:24:45 | <mauke> | - 1 |
| 19:24:58 | × | alexherbo2 quits (~alexherbo@2a02-842a-8180-4601-1d2b-cbea-330c-620a.rev.sfr.net) (Remote host closed the connection) |
| 19:25:02 | <ghostbuster> | oh i think i see what to do |
| 19:25:06 | <int-e> | > 10^100 - 0 + 1 :: Int |
| 19:25:08 | <lambdabot> | 1 |
| 19:25:32 | <jade[m]> | should have used genericLength, heh? |
| 19:25:34 | <[exa]> | ghostbuster: if you have a ghci running, check types of stuff by typing :t something |
| 19:25:38 | <ghostbuster> | hmm no, but i think it's thinking i want x = x + y + z, thus 'Conflicting definitions for x' |
| 19:25:51 | <mauke> | > sum (replicate 10 0.1) :: Rational |
| 19:25:52 | <ghostbuster> | [exa]: trying to load a .hs file |
| 19:25:52 | <lambdabot> | 1 % 1 |
| 19:26:28 | <[exa]> | ghostbuster: you may pastebin the file (https://paste.tomsmeding.com/) |
| 19:27:27 | <ghostbuster> | https://paste.tomsmeding.com/URP8HJhI |
| 19:27:53 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:6cda:5d2c:763a:75d3) (Remote host closed the connection) |
| 19:27:55 | <mauke> | x y x |
| 19:27:58 | <jade[m]> | you have x twice in the parameters |
| 19:28:03 | <ghostbuster> | lol |
| 19:28:51 | <jade[m]> | when this works, try to use :t and apply your sumThree to only two arguments. What do you expect the output will be? |
| 19:29:35 | <ghostbuster> | will the output be a function? |
| 19:29:52 | <jade[m]> | what type will that function have? |
| 19:29:59 | × | ddellacosta quits (~ddellacos@143.244.47.88) (Ping timeout: 240 seconds) |
| 19:30:08 | <ghostbuster> | Int -> (Int -> Int) |
| 19:30:26 | <jade[m]> | close, that would be if you applied it to one parameter |
| 19:30:36 | × | cfricke quits (~cfricke@user/cfricke) (Ping timeout: 250 seconds) |
| 19:30:37 | <monochrom> | [exa]: "PE is meant to be IMO" : "why people recommend it for programming?" :: "cough syrup is meant to relieve cough, opioids are meant to relieve pain, glue is meant to stick" : "so why people recommend them for getting high?" >:) |
| 19:31:18 | <ghostbuster> | lol you wrote that analogy like a functional programmer |
| 19:31:55 | [exa] | is enlightened |
| 19:32:01 | <ghostbuster> | jade[m]: hmm, does it apply from the inside out? |
| 19:32:50 | <ghostbuster> | I'm imagining an Int -> ... and a passed argument annihilating each other |
| 19:33:21 | <[exa]> | ghostbuster: yeah that's a good view imo |
| 19:34:01 | <geekosaur> | but they apply from the outside in, not the inside out |
| 19:34:02 | <jade[m]> | not quite, `Int -> ...` means that if you give it an int, then if gives you something else. |
| 19:34:02 | <jade[m]> | `Int -> (Int -> (Int -> Int))` therefore implies that `sumThree 1` gives you back `Int -> (Int -> Int)`. |
| 19:34:02 | <jade[m]> | Applying yet another parameter `(sumThree 1) 2` thus gives you `Int -> Int` :D |
| 19:34:04 | <ghostbuster> | now i'm wondering what happens with a 3-argument function that's not associative |
| 19:34:12 | <ghostbuster> | if you only give 2 arguments i mean |
| 19:34:13 | <jade[m]> | ghostbuster: yes! |
| 19:34:20 | → | gensyst joins (~gensyst@user/gensyst) |
| 19:34:30 | × | Unhammer quits (~Unhammer@user/unhammer) (Ping timeout: 265 seconds) |
| 19:34:47 | <ghostbuster> | jade[m]: ah ok that makes sense |
| 19:34:59 | <jade[m]> | jade[m]: > <@jade.256:the-apothecary.club> not quite, `Int -> ...` means that if you give it an int, then if gives you something else. |
| 19:34:59 | <jade[m]> | > `Int -> (Int -> (Int -> Int))` therefore implies that `sumThree 1` gives you back `Int -> (Int -> Int)`. |
| 19:34:59 | <jade[m]> | > Applying yet another parameter `(sumThree 1) 2` thus gives you `Int -> Int` :D |
| 19:34:59 | <jade[m]> | and, *all* those parantheses are implicit because of the associativity of definition/application respectively |
| 19:35:01 | <lambdabot> | <hint>:1:1: error: parse error on input ‘`’ |
| 19:35:01 | <lambdabot> | <hint>:1:33: error: parse error on input ‘(’ |
| 19:35:40 | <gensyst> | Do async exceptions eventually become sync exceptions later? What I mean is, if I (on thread A) throwTo into thread B, thread B therefore crashes, but originally C was the one calling B, will C see the crash from B as a normal sync exception? |
| 19:36:01 | <gensyst> | Hmmmmmmmmm |
| 19:36:16 | → | foul_owl joins (~kerry@45.143.82.39) |
| 19:36:20 | <mauke> | what does it mean to call a thread? |
| 19:36:33 | <ghostbuster> | haskellbook.com suggests using :info (^), :info (*), :info(+) etc. to learn about operator precedence but I don't really understand the output format |
| 19:37:00 | <mauke> | ghostbuster: the "infix" line is about operator precedence |
| 19:37:08 | <gensyst> | mauke, good question. So thread B just disappears and that's it? no trace of it. |
| 19:37:14 | <mauke> | the rest is ... fun |
| 19:37:24 | <[exa]> | ghostbuster: a fun exercise is to try to work through why e.g. `id id gcd 5 3` works and try to guess the actual type of the first `id` |
| 19:37:50 | <jade[m]> | [exa]: oh god |
| 19:37:55 | <ghostbuster> | https://paste.tomsmeding.com/Fzp76qUN |
| 19:38:08 | <jade[m]> | I get it, but it's a pain to read |
| 19:38:18 | <geekosaur> | gensyst, if there is no exception handler wrapped around it then yes, it just disappears |
| 19:38:36 | <mauke> | ghostbuster: the relevant information is infixr 8 ^; infixl 7 *; infixl 6 +; infixl 6 - |
| 19:39:24 | <mauke> | type Num :: * -> Constraint is advanced nonsense |
| 19:39:29 | <mauke> | that's not even standard Haskell |
| 19:39:39 | → | titibandit joins (~titibandi@user/titibandit) |
| 19:43:15 | <EvanR> | type inferrence, "wavefunction collapse" before it was cool |
| 19:44:01 | <jade[m]> | he |
| 19:47:36 | → | Unhammer joins (~Unhammer@user/unhammer) |
| 19:49:04 | → | freeside joins (~mengwong@bb115-66-81-217.singnet.com.sg) |
| 19:51:43 | → | nate2 joins (~nate@98.45.169.16) |
| 19:53:09 | <ghostbuster> | polymorphism? |
| 19:53:36 | × | freeside quits (~mengwong@bb115-66-81-217.singnet.com.sg) (Ping timeout: 248 seconds) |
| 19:53:51 | <[exa]> | (as opposed to monomorphism.) |
| 19:56:25 | × | nate2 quits (~nate@98.45.169.16) (Ping timeout: 240 seconds) |
| 19:56:30 | × | _ht quits (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Quit: _ht) |
| 20:02:49 | ghostbuster | goes back to trying to sum three numbers |
| 20:04:59 | <monochrom> | EvanR: Heh |
| 20:05:32 | → | freeside joins (~mengwong@103.252.202.151) |
| 20:05:42 | × | titibandit quits (~titibandi@user/titibandit) (Remote host closed the connection) |
| 20:05:52 | <int-e> | ghostbuster: may I suggest 0, 0, and 0? |
| 20:08:30 | × | chomwitt quits (~chomwitt@2a02:587:7a07:4f00:1ac0:4dff:fedb:a3f1) (Remote host closed the connection) |
| 20:09:28 | × | freeside quits (~mengwong@103.252.202.151) (Ping timeout: 240 seconds) |
| 20:11:41 | <EvanR> | gensyst, you can build "I'm making a call to some thread, i.e. waiting for it to return an answer or crash, and if it crashes, I crash (or something)" out of the primitives haskell gives you. The async package has done this. But these are higher level concepts that don't just exist |
| 20:13:40 | <EvanR> | but it's a good way to avoid having silently crashing threads |
| 20:15:00 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 20:20:35 | × | jero98772 quits (~jero98772@2800:484:1d84:9000:8822:84bd:a4f4:947f) (Ping timeout: 264 seconds) |
| 20:23:34 | <sm> | "at the start of every offering of the course the professor says that students can use any language that can run on the school servers, but issues a warning that teams using Haskell have the highest variance in mark of any language, with many teams using Haskell overestimating their ability and crashing and burning then getting a terrible mark, more than any other language, while some Haskell teams do quite well and get perfect" |
| 20:23:48 | <sm> | (from this nice language comparison: https://thume.ca/2019/04/29/comparing-compilers-in-rust-haskell-c-and-python) |
| 20:26:23 | <ghostbuster> | lol |
| 20:27:05 | <ghostbuster> | for me, getting a better understanding of compiler internals is sort of a tandem goal of learning FP |
| 20:27:10 | → | alexherbo2 joins (~alexherbo@2a02-842a-8180-4601-1d2b-cbea-330c-620a.rev.sfr.net) |
| 20:27:18 | → | cheater_ joins (~Username@user/cheater) |
| 20:28:22 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:6cda:5d2c:763a:75d3) |
| 20:28:47 | × | barzo quits (~hd@31.223.56.119) (Ping timeout: 240 seconds) |
| 20:29:46 | <jade[m]> | that's a good goal imo, it has definitely done that for me |
| 20:30:11 | × | cheater quits (~Username@user/cheater) (Ping timeout: 256 seconds) |
| 20:30:13 | cheater_ | is now known as cheater |
| 20:30:45 | × | Xe quits (~cadey@tailscale/xe) (Ping timeout: 256 seconds) |
| 20:31:21 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 20:32:16 | → | jero98772 joins (~jero98772@2800:484:1d84:9000:8822:84bd:a4f4:947f) |
| 20:32:23 | <gensyst> | Thanks mates! |
| 20:32:34 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:6cda:5d2c:763a:75d3) (Ping timeout: 250 seconds) |
| 20:34:33 | <gensyst> | geekosaur, EvanR, but the question remains... can C catch the async exception that A throwTo into B? |
| 20:35:20 | <EvanR> | I had to do a double take, C is a third thread, not a programming language in this question xD |
| 20:35:23 | <geekosaur> | only if B is started with a wrapper that throwTo's it to C |
| 20:35:34 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:969e:4407:eb4f:f470) (Quit: WeeChat 2.8) |
| 20:35:36 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 250 seconds) |
| 20:35:41 | × | mei quits (~mei@user/mei) (Remote host closed the connection) |
| 20:36:07 | <EvanR> | yeah a chain of wrappers that set up this chain of re-throws would do it |
| 20:36:11 | → | pavonia joins (~user@user/siracusa) |
| 20:36:50 | <gensyst> | Are you talking about onException, etc? |
| 20:37:02 | <geekosaur> | yes, it would require a handler |
| 20:37:03 | <gensyst> | (that catch async exceptions) |
| 20:38:06 | → | mei joins (~mei@user/mei) |
| 20:38:38 | <EvanR> | if C spawned B and B spawned A, you can see where these wrappers go, at the start of each thread, and they rethrow to the spawner or communicate the fact back to them somehow before dying |
| 20:38:57 | <gensyst> | EvanR, geekosaur .. and would I be correct that onException (that catches async exception) I could also put into C itself directly (i..e all the code in C is wrapped in onException). |
| 20:39:09 | <gensyst> | Or of course I ahve the choice to catch it downstream in the code in B |
| 20:39:23 | <geekosaur> | no, a handler in C will not catch an exception thrown in B |
| 20:39:29 | <geekosaur> | even if C started B |
| 20:39:53 | <EvanR> | there's no built-in parent child thread concept aiui |
| 20:40:35 | <geekosaur> | right, async builds one by means of wrappers and such |
| 20:40:57 | → | Xe joins (~cadey@tailscale/xe) |
| 20:41:20 | × | foul_owl quits (~kerry@45.143.82.39) (Ping timeout: 246 seconds) |
| 20:43:33 | → | ddellacosta joins (~ddellacos@146.70.165.240) |
| 20:46:32 | <gensyst> | geekosaur, so if C wanted that stuff, it should start B with async package (for instance) |
| 20:46:44 | <geekosaur> | or wrap it itself |
| 20:47:02 | <gensyst> | and I presume reputable web frameworks (etc.) do stuff like that right? if a thread gets async killed, it logs the failure to log file at least |
| 20:47:21 | <geekosaur> | async will do this for you but it's just using the tools already available, viz. wrapping the function passed to forkIO in a handler that rethrows an exception to C |
| 20:47:29 | <geekosaur> | yes |
| 20:47:49 | <geekosaur> | in general async is nicer to work with than raw threads |
| 20:48:23 | × | simendsjo quits (~user@84.211.91.241) (Ping timeout: 240 seconds) |
| 20:49:02 | × | ddellacosta quits (~ddellacos@146.70.165.240) (Ping timeout: 250 seconds) |
| 20:49:16 | <gensyst> | very good info, thanks |
| 20:49:45 | <EvanR> | also the details of properly wrapping threads at spawn time, esp in the presence of async exceptions, can be tricky |
| 20:50:41 | <EvanR> | see how async does it for proof xD |
| 20:51:23 | <EvanR> | that it can be tricky, not necessarily that they even get it right! |
| 20:51:54 | <EvanR> | asynchronous exceptions is a wonderful pandoras box |
| 20:51:55 | → | ddellacosta joins (~ddellacos@146.70.171.176) |
| 20:52:56 | <gensyst> | it's only 1k LOCs... |
| 20:53:19 | <EvanR> | well I guess I have to find the relevant snippet |
| 20:53:49 | <monochrom> | I believe you. :) |
| 20:54:08 | <geekosaur> | it's not how large the code is, it's how carefully it does the appropriate masking and wrapping |
| 20:54:20 | <EvanR> | withAsyncUsing |
| 20:54:32 | <EvanR> | is where the magic happens |
| 20:54:40 | <geekosaur> | only a couple of characters but the exact placement makes a big difference in correctness/reliability |
| 20:55:28 | <monochrom> | Goes a long way to show that bugfix difficulty is not measured by edit distance. |
| 20:55:49 | <EvanR> | the "built-in" wrapper `mask' runs some code with async exceptions mask, and passes in a restore sub-wrapper to unmask which has to be used at the correct time, plus other stuff |
| 20:56:04 | <EvanR> | masked,* |
| 20:57:23 | <monochrom> | Actually the masking interface is not so hard to use if you're used to dependency injection. This is exactly dependency injection. |
| 20:58:09 | <EvanR> | thread cancellation is implemented using uninterruptibleMask, which is a variant of mask, but the spawning uses mask anyway, for reasons! |
| 20:59:37 | <EvanR> | a thread that is waiting on MVar with async exceptions masked is still interruptible, which could be right or wrong depending on what you're doing |
| 21:00:30 | <int-e> | async exceptions can sometimes be captured in pure values, no throwTo required: https://paste.tomsmeding.com/oHG3m0Fh |
| 21:03:29 | <int-e> | hmm |
| 21:05:36 | <int-e> | Actually I don't understand what's happening there. |
| 21:06:54 | → | cheater_ joins (~Username@user/cheater) |
| 21:07:08 | × | trev quits (~trev@user/trev) (Quit: trev) |
| 21:07:43 | <int-e> | Oh it's getting an exception because the MVar becomes unreachable... not what I'm aiming for. |
| 21:08:23 | <int-e> | (I should print the caught exception) |
| 21:08:25 | × | cheater quits (~Username@user/cheater) (Ping timeout: 240 seconds) |
| 21:08:29 | cheater_ | is now known as cheater |
| 21:09:02 | × | pharonix71 quits (~pharonix7@user/pharonix71) (Remote host closed the connection) |
| 21:09:45 | → | pharonix71 joins (~pharonix7@user/pharonix71) |
| 21:11:17 | <gensyst> | oh, marlow wrote async... |
| 21:11:23 | <gensyst> | the book author |
| 21:11:27 | <gensyst> | of course |
| 21:12:51 | × | gensyst quits (~gensyst@user/gensyst) (Quit: Leaving) |
| 21:13:11 | × | vulpine quits (xfnw@tilde.team) (Quit: Connection reset by purr) |
| 21:13:46 | → | vulpine joins (xfnw@tilde.team) |
| 21:17:33 | <int-e> | Oh this is the kind of thing I remembered, it was not totally pure (it involves catching exceptions under unsafePerformIO): https://paste.tomsmeding.com/kCUUhAbQ |
| 21:20:04 | <zzz> | what module should i look for if i want to parse date and time and retrieve something like the day of week> |
| 21:20:21 | <int-e> | (`onException` re-raises the exception, but under rare circumstances (like an untimely garbage collection) the re-raise can happen in a different thread here.) |
| 21:21:32 | <geekosaur> | zzz, parseTimeM in the time package comes to mind |
| 21:21:41 | <geekosaur> | or one of its cousins |
| 21:23:43 | → | foul_owl joins (~kerry@71.212.137.212) |
| 21:25:00 | <geekosaur> | Data.Time.Clock has the day of week stuff once you've parsed a date+time |
| 21:25:17 | <geekosaur> | sorry Data.Time.Calendar |
| 21:25:36 | <geekosaur> | the parse stuff is Data.Time.Format |
| 21:26:56 | → | freeside joins (~mengwong@103.252.202.151) |
| 21:27:11 | × | vandita quits (~vandit@87-97-13-52.pool.digikabel.hu) (Ping timeout: 240 seconds) |
| 21:27:51 | <zzz> | geekosaur: thanks! |
| 21:28:57 | → | vandita joins (~vandit@87-97-12-226.pool.digikabel.hu) |
| 21:29:52 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 21:30:47 | × | jero98772 quits (~jero98772@2800:484:1d84:9000:8822:84bd:a4f4:947f) (Ping timeout: 264 seconds) |
| 21:31:01 | × | freeside quits (~mengwong@103.252.202.151) (Ping timeout: 240 seconds) |
| 21:32:48 | → | falafel joins (~falafel@2603-8000-d700-115c-d608-8fcf-453d-62c0.res6.spectrum.com) |
| 21:34:25 | × | michalz quits (~michalz@185.246.204.90) (Remote host closed the connection) |
| 21:41:01 | × | falafel quits (~falafel@2603-8000-d700-115c-d608-8fcf-453d-62c0.res6.spectrum.com) (Ping timeout: 256 seconds) |
| 21:42:21 | → | jero98772 joins (~jero98772@2800:484:1d84:9000:8822:84bd:a4f4:947f) |
| 21:45:11 | × | foul_owl quits (~kerry@71.212.137.212) (Ping timeout: 264 seconds) |
| 21:51:16 | × | bgs quits (~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection) |
| 21:55:28 | × | alexherbo2 quits (~alexherbo@2a02-842a-8180-4601-1d2b-cbea-330c-620a.rev.sfr.net) (Remote host closed the connection) |
| 21:56:34 | × | gmg quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 21:58:49 | → | foul_owl joins (~kerry@45.143.82.40) |
| 21:59:34 | → | freeside joins (~mengwong@103.252.202.151) |
| 22:02:38 | × | mncheck quits (~mncheck@193.224.205.254) (Remote host closed the connection) |
| 22:03:35 | × | freeside quits (~mengwong@103.252.202.151) (Ping timeout: 240 seconds) |
| 22:03:44 | × | hgolden_ quits (~hgolden@cpe-172-251-233-141.socal.res.rr.com) (Remote host closed the connection) |
| 22:03:56 | → | mncheck joins (~mncheck@193.224.205.254) |
| 22:14:28 | → | blujupiter32 joins (~blujupite@2a0c:5bc0:40:2e31:f90c:2e75:f0e7:157b) |
| 22:15:35 | → | MajorBiscuit joins (~MajorBisc@2001:1c00:31c:8400:f184:4168:559b:d91b) |
| 22:16:04 | × | bigLama quits (~alex@2001:861:4f80:4a50:e792:bb46:1a0c:b1d2) (Remote host closed the connection) |
| 22:17:16 | × | mikoto-chan quits (~mikoto-ch@ip-213-49-58-19.dsl.scarlet.be) (Ping timeout: 268 seconds) |
| 22:17:56 | × | oo_miguel quits (~Thunderbi@77.252.47.84) (Ping timeout: 246 seconds) |
| 22:18:20 | <ghostbuster> | so, project euler spoiler but.. i guess pre-declaring the signature of a function with :: is optional? |
| 22:18:33 | <ghostbuster> | i just wrote this through trial and error in the repl `multThreeFive n = [ x | x <- [1..n-1], mod x 3 == 0 || mod x 5 == 0]` |
| 22:18:48 | <monochrom> | yes |
| 22:18:59 | <geekosaur> | yes, type inference will do it in pretty much any case you care about |
| 22:19:25 | <geekosaur> | the downside is if you make a type error, it will try to infer something that fits the error and you may then get an error somewhere else |
| 22:19:45 | <ghostbuster> | ah cool |
| 22:20:04 | <ghostbuster> | so the value of pre-declaring is for type safety |
| 22:20:05 | <geekosaur> | so it's generally good style to work out the correct type and annotate it appropriately, so the error is detected where it happens |
| 22:20:35 | × | MajorBiscuit quits (~MajorBisc@2001:1c00:31c:8400:f184:4168:559b:d91b) (Ping timeout: 264 seconds) |
| 22:20:41 | <geekosaur> | (numbers in particular do this because Num and friends are pretty loose) |
| 22:21:19 | <ghostbuster> | [1..10] :: (Num a, Enum a) => [a] |
| 22:21:26 | <ghostbuster> | a list is an enum? |
| 22:21:54 | <monochrom> | Sometimes adding a few handwritten type improves error messages. |
| 22:21:54 | <ghostbuster> | i was actually thinking of a fun project that would require enums but wasn't sure how to do them yet |
| 22:21:57 | <geekosaur> | no, but [x..y] is shorthand for an enum 0operation (specifically `enumFromTo`) |
| 22:22:10 | <monochrom> | Most times it is a courtesy to other human readers. |
| 22:24:01 | × | gurkenglas quits (~user@dynamic-046-114-168-101.46.114.pool.telefonica.de) (Ping timeout: 240 seconds) |
| 22:30:48 | × | blujupiter32 quits (~blujupite@2a0c:5bc0:40:2e31:f90c:2e75:f0e7:157b) (Remote host closed the connection) |
| 22:34:32 | × | Pickchea quits (~private@user/pickchea) (Quit: Leaving) |
| 22:34:39 | × | use-value quits (~Thunderbi@2a00:23c6:8a03:2f01:8d0b:d6b6:c02a:1360) (Remote host closed the connection) |
| 22:34:58 | → | use-value joins (~Thunderbi@2a00:23c6:8a03:2f01:8d0b:d6b6:c02a:1360) |
| 22:37:03 | → | freeside joins (~mengwong@103.252.202.151) |
| 22:39:08 | → | mikoto-chan joins (~mikoto-ch@85-76-32-200-nat.elisa-mobile.fi) |
| 22:40:21 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 22:41:39 | × | freeside quits (~mengwong@103.252.202.151) (Ping timeout: 256 seconds) |
| 22:52:32 | ← | delYsid parts (~user@84-115-138-74.cable.dynamic.surfer.at) (ERC 5.4.1 (IRC client for GNU Emacs 30.0.50)) |
| 22:54:32 | <sm> | ghostbuster: nice! same as mine 10 years ago |
| 22:55:44 | <jade[m]> | what is a declarative/functional programmers perspective on the definition of an algorithm as a fi ite sequence of steps? |
| 22:55:50 | <sm> | generally you can skip type signatures when you're confident, add them if you get an unclear error or to document the code better for others/future-you |
| 22:56:32 | <jade[m]> | s/fi ite/finite |
| 22:57:12 | <geekosaur> | our steps are different 🙂 |
| 22:58:00 | <ghostbuster> | so i have a list of integers I want to sum.. i'm guessing i need a function that takes a list and an accumulator and returns the new accumulator? |
| 22:58:39 | × | mikoto-chan quits (~mikoto-ch@85-76-32-200-nat.elisa-mobile.fi) (Ping timeout: 256 seconds) |
| 22:58:40 | <geekosaur> | and such a function exists, even. try to guess it |
| 22:58:45 | <jade[m]> | there is a function for that but I suggest you write it by hand using pattern matching on the list and recursion :D |
| 22:58:51 | <sm> | yes.. though consider this is such a common need there might be.. |
| 22:59:02 | <ghostbuster> | i wondered if there was |
| 22:59:15 | <ghostbuster> | but then i thought it would not be strange if such a common function did not exist :-P |
| 22:59:48 | <ghostbuster> | the first search engine result for "haskell count a list" was this reddit thread asking why such a function doesn't exist in Prelude |
| 23:00:20 | <jade[m]> | what does "count a list" mean? |
| 23:02:57 | <ghostbuster> | oh i was thinking that returning the number of items in a list and returning the sum of items in a list would be solved in similar ways |
| 23:03:09 | <ghostbuster> | crossed wires in my brain |
| 23:03:22 | × | xff0x quits (~xff0x@ai098135.d.east.v6connect.net) (Ping timeout: 250 seconds) |
| 23:03:27 | <jade[m]> | indeed they are |
| 23:03:39 | <jade[m]> | very similar |
| 23:03:49 | <ghostbuster> | does project euler have solutions? I think I solved problem 1 |
| 23:03:59 | <jade[m]> | try to implement both using recursion, and then attempt to see a common pattern |
| 23:05:26 | → | xff0x joins (~xff0x@178.255.149.135) |
| 23:10:18 | × | xff0x quits (~xff0x@178.255.149.135) (Ping timeout: 268 seconds) |
| 23:11:40 | → | xff0x joins (~xff0x@2405:6580:b080:900:e2e2:76c:3d04:5dc6) |
| 23:11:59 | × | zeenk quits (~zeenk@2a02:2f04:a105:f00::7fe) (Quit: Konversation terminated!) |
| 23:13:52 | <jade[m]> | anyways, I'm gonna go for the night, wish you all the best with learning haskell ghostbuster: |
| 23:19:47 | → | caryhartline joins (~caryhartl@168.182.58.169) |
| 23:20:49 | <ghostbuster> | thanks for the help, cheers |
| 23:21:27 | × | EsoAlgo8 quits (~EsoAlgo@129.146.136.145) (Remote host closed the connection) |
| 23:22:08 | × | mncheck quits (~mncheck@193.224.205.254) (Ping timeout: 240 seconds) |
| 23:23:00 | → | EsoAlgo8 joins (~EsoAlgo@129.146.136.145) |
| 23:25:27 | <monochrom> | I think PE lets you submit your code for testing. |
| 23:28:01 | × | acidjnk quits (~acidjnk@p200300d6e7072f5435207693d4db5d05.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 23:28:13 | → | mauke_ joins (~mauke@user/mauke) |
| 23:28:25 | × | vandita quits (~vandit@87-97-12-226.pool.digikabel.hu) (Ping timeout: 240 seconds) |
| 23:29:31 | × | mauke quits (~mauke@user/mauke) (Ping timeout: 240 seconds) |
| 23:29:31 | mauke_ | is now known as mauke |
| 23:30:18 | → | vandita joins (~vandit@80-95-82-220.pool.digikabel.hu) |
| 23:33:01 | × | tessier quits (~treed@ec2-184-72-149-67.compute-1.amazonaws.com) (Ping timeout: 240 seconds) |
| 23:37:14 | × | Tuplanolla quits (~Tuplanoll@91-159-68-236.elisa-laajakaista.fi) (Quit: Leaving.) |
| 23:43:35 | → | Inst joins (~Inst@2601:6c4:4081:2fc0:6477:2ba8:415:e790) |
| 23:43:43 | <Inst> | curious, why is GHCI C FFI broken in Windows? |
| 23:43:48 | <Inst> | I.e, it's a guaranteed segfault |
| 23:44:20 | <Inst> | Is it something intrinsic with the architecture that's hard to fix, or can a competent Win32 API programmer do a proper linkup? |
| 23:49:10 | × | xameer quits (~xameer@144.48.224.179) (Remote host closed the connection) |
| 23:50:32 | → | xameer joins (~xameer@144.48.224.179) |
| 23:53:14 | → | nate2 joins (~nate@98.45.169.16) |
| 23:57:17 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 23:57:41 | × | xff0x quits (~xff0x@2405:6580:b080:900:e2e2:76c:3d04:5dc6) (Ping timeout: 246 seconds) |
| 23:58:04 | → | xff0x joins (~xff0x@ai098135.d.east.v6connect.net) |
| 23:58:24 | × | nate2 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds) |
All times are in UTC on 2023-05-22.