Home liberachat/#haskell: Logs Calendar

Logs on 2024-05-10 (liberachat/#haskell)

00:04:18 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
00:13:07 × mud quits (~mud@user/kadoban) (Quit: quit)
00:19:23 <Axman6> kaol: I always love a "It's now N times faster" story - spill the beans?
00:38:50 × ocra8 quits (ocra8@user/ocra8) (Quit: WeeChat 4.2.2)
00:41:17 ocra8 joins (ocra8@user/ocra8)
00:42:52 yin joins (~yin@user/zero)
00:44:51 agent314 joins (~quassel@87.249.134.25)
00:47:10 steew_ joins (~steew@user/steew)
00:47:37 × steew quits (~steew@user/steew) (Ping timeout: 256 seconds)
00:47:37 steew_ is now known as steew
00:47:43 × agent314_ quits (~quassel@103.75.11.77) (Ping timeout: 272 seconds)
00:56:23 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 268 seconds)
00:58:13 × EvanR quits (~EvanR@user/evanr) (Remote host closed the connection)
00:58:32 EvanR joins (~EvanR@user/evanr)
00:59:56 × yin quits (~yin@user/zero) (Ping timeout: 252 seconds)
01:16:57 × otto_s quits (~user@p5b0442c9.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
01:18:32 otto_s joins (~user@p4ff273b9.dip0.t-ipconnect.de)
01:19:22 × szkl quits (uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
01:22:54 × philopsos1 quits (~caecilius@user/philopsos) (Ping timeout: 268 seconds)
01:23:07 aforemny joins (~aforemny@2001:9e8:6ce3:a900:fdc1:1211:f6bf:cc11)
01:23:31 × aforemny_ quits (~aforemny@2001:9e8:6ccf:3a00:7430:dc9b:b924:f855) (Ping timeout: 260 seconds)
01:25:59 raehik joins (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net)
01:35:39 × xff0x quits (~xff0x@2405:6580:b080:900:2714:5816:85fc:7cc) (Ping timeout: 260 seconds)
01:40:40 × mei quits (~mei@user/mei) (Remote host closed the connection)
01:43:05 mei joins (~mei@user/mei)
01:54:23 <monochrom> We have added security patches, it is now 0.3 times faster. >:)
01:54:34 <monochrom> err, 0.3 times as fast. :)
01:58:16 × arahael quits (~arahael@119-18-1-21.771201.syd.nbn.aussiebb.net) (Ping timeout: 260 seconds)
02:09:47 × L29Ah quits (~L29Ah@wikipedia/L29Ah) (Ping timeout: 252 seconds)
02:17:47 × td_ quits (~td@i5387093C.versanet.de) (Ping timeout: 268 seconds)
02:19:35 td_ joins (~td@i5387091A.versanet.de)
02:24:31 xff0x joins (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
02:25:07 × waleee quits (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 260 seconds)
02:32:16 philopsos joins (~caecilius@user/philopsos)
02:33:42 tri joins (~tri@ool-18bc2e74.dyn.optonline.net)
02:34:30 × tri quits (~tri@ool-18bc2e74.dyn.optonline.net) (Remote host closed the connection)
02:35:02 tri joins (~tri@ool-18bc2e74.dyn.optonline.net)
02:36:03 × tri quits (~tri@ool-18bc2e74.dyn.optonline.net) (Remote host closed the connection)
02:36:16 tri joins (~tri@ool-18bc2e74.dyn.optonline.net)
02:37:11 × tri quits (~tri@ool-18bc2e74.dyn.optonline.net) (Remote host closed the connection)
02:37:32 tri joins (~tri@ool-18bc2e74.dyn.optonline.net)
02:42:59 × xff0x quits (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 272 seconds)
02:44:48 xff0x joins (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
02:45:39 × raehik quits (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 260 seconds)
02:57:38 × tri quits (~tri@ool-18bc2e74.dyn.optonline.net) (Remote host closed the connection)
03:14:02 flounders_ is now known as flounders
03:15:42 raehik joins (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net)
03:40:05 × xff0x quits (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 240 seconds)
03:46:35 × raehik quits (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 268 seconds)
03:46:46 <EvanR> speed = 0.3x !!!!
03:50:15 × rvalue quits (~rvalue@user/rvalue) (Read error: Connection reset by peer)
03:50:47 rvalue joins (~rvalue@user/rvalue)
03:57:16 × mulk quits (~mulk@p5b112e4a.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
03:57:17 ddellacosta joins (~ddellacos@ool-44c73d29.dyn.optonline.net)
04:00:32 × aforemny quits (~aforemny@2001:9e8:6ce3:a900:fdc1:1211:f6bf:cc11) (Ping timeout: 260 seconds)
04:00:36 aforemny_ joins (~aforemny@2001:9e8:6cf2:cc00:4716:28bd:787d:4b08)
04:04:54 mulk joins (~mulk@p5b112e4a.dip0.t-ipconnect.de)
04:13:27 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
04:14:46 xff0x joins (~xff0x@om126254198057.33.openmobile.ne.jp)
04:15:42 × xff0x quits (~xff0x@om126254198057.33.openmobile.ne.jp) (Read error: Connection reset by peer)
04:16:48 × xdminsy quits (~xdminsy@117.147.70.240) (Ping timeout: 268 seconds)
04:18:59 dysthesis joins (~dysthesis@user/dysthesis)
04:20:24 rustisafungus joins (~segfaultf@23-93-189-95.fiber.dynamic.sonic.net)
04:24:31 <kaol> Axman6: https://gitlab.com/kaol/recommender-als Has the steps in recent git history. Numerical stuff where I avoided recomputing some stuff and changed others to use a better algorithm. Like not turning a matrix to a list of vectors if I could do the same thing on the original matrix.
04:28:07 × dysthesis quits (~dysthesis@user/dysthesis) (Quit: WeeChat 4.2.1)
04:30:39 <kaol> I had originally only used my library as a part of a larger project but once I had made a small stand alone executable for it it was much easier to just run and test it and I saw that I had done some silly things in it.
04:31:05 <Axman6> Noice, always such a good feeling, because it generally means you understand the problem better (but mo faster mo better also)
04:34:41 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 268 seconds)
04:43:42 <kaol> My original intent was to port the algorithm to Futhark to see how it'd run on a GPU but I had to revisit it to regain some understanding of it and I find all this clutter now.
04:44:57 × anpad quits (~pandeyan@user/anpad) (Quit: ZNC 1.8.2 - https://znc.in)
04:46:56 anpad joins (~pandeyan@user/anpad)
04:51:52 <kaol> The original tardiness didn't matter all that much though since it was still fast enough for my data and the model building is all done in the background.
05:00:31 × rustisafungus quits (~segfaultf@23-93-189-95.fiber.dynamic.sonic.net) (Ping timeout: 260 seconds)
05:07:15 arahael joins (~arahael@119-18-1-21.771201.syd.nbn.aussiebb.net)
05:09:45 yeitrafferin joins (~user@2a04:4540:720d:c100:9522:d5b:bf55:c2ec)
05:10:33 × motherfsck quits (~motherfsc@user/motherfsck) (Ping timeout: 272 seconds)
05:30:05 × Sgeo_ quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
05:47:29 × notzmv quits (~daniel@user/notzmv) (Remote host closed the connection)
05:52:34 motherfsck joins (~motherfsc@user/motherfsck)
05:52:35 xff0x joins (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
05:55:18 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
05:55:34 titibandit joins (~titibandi@user/titibandit)
05:57:39 × euphores quits (~SASL_euph@user/euphores) (Quit: Leaving.)
05:58:15 notzmv joins (~daniel@user/notzmv)
06:05:00 euphores joins (~SASL_euph@user/euphores)
06:05:01 × philopsos quits (~caecilius@user/philopsos) (Quit: Lost terminal)
06:05:44 takuan joins (~takuan@178-116-218-225.access.telenet.be)
06:07:37 oo_miguel joins (~Thunderbi@78-11-181-16.static.ip.netia.com.pl)
06:13:51 causal joins (~eric@50.35.88.207)
06:30:26 sord937 joins (~sord937@gateway/tor-sasl/sord937)
06:31:56 × xff0x quits (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Quit: xff0x)
06:36:53 × machinedgod quits (~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 240 seconds)
06:37:59 xff0x joins (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
06:43:40 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 255 seconds)
06:48:43 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
06:56:17 × yeitrafferin quits (~user@2a04:4540:720d:c100:9522:d5b:bf55:c2ec) (Quit: Leaving)
07:05:48 × arahael quits (~arahael@119-18-1-21.771201.syd.nbn.aussiebb.net) (Ping timeout: 260 seconds)
07:08:19 Mach joins (~Mach@92.87.113.25)
07:13:22 vpan joins (~vpan@212.117.1.172)
07:13:31 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
07:17:08 danza joins (~francesco@ba-19-147-188.service.infuturo.it)
07:22:36 mima joins (~mmh@aftr-62-216-211-252.dynamic.mnet-online.de)
07:24:32 xdminsy joins (~xdminsy@117.147.70.240)
07:24:57 acidjnk_new joins (~acidjnk@p200300d6e714dc66380a62904c39c61d.dip0.t-ipconnect.de)
07:28:41 × Mach quits (~Mach@92.87.113.25) (Ping timeout: 256 seconds)
07:42:12 cfricke joins (~cfricke@user/cfricke)
07:52:44 Mach joins (~Mach@92.87.113.25)
07:54:07 chele joins (~chele@user/chele)
07:54:13 philopsos joins (~caecilius@user/philopsos)
07:59:06 gmg joins (~user@user/gehmehgeh)
08:04:21 × philopsos quits (~caecilius@user/philopsos) (Ping timeout: 268 seconds)
08:04:25 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
08:12:14 × Square quits (~Square@user/square) (Ping timeout: 252 seconds)
08:14:30 rosco joins (~rosco@yp-146-6.tm.net.my)
08:16:53 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
08:17:45 × tzh quits (~tzh@c-73-164-206-160.hsd1.or.comcast.net) (Quit: zzz)
08:24:48 sawilagar joins (~sawilagar@user/sawilagar)
08:27:15 × foul_owl quits (~kerry@185.216.231.182) (Ping timeout: 260 seconds)
08:28:11 × atwm quits (~atwm@19-193-28-81.ftth.cust.kwaoo.net) (Ping timeout: 252 seconds)
08:29:17 × danza quits (~francesco@ba-19-147-188.service.infuturo.it) (Ping timeout: 252 seconds)
08:31:18 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
08:32:08 michalz joins (~michalz@185.246.207.200)
08:35:15 pandeyan joins (~pandeyan@135-180-52-213.fiber.dynamic.sonic.net)
08:36:15 × anpad quits (~pandeyan@user/anpad) (Ping timeout: 256 seconds)
08:41:15 foul_owl joins (~kerry@174-21-80-176.tukw.qwest.net)
08:47:05 × econo_ quits (uid147250@id-147250.tinside.irccloud.com) (Quit: Connection closed for inactivity)
08:49:19 danse-nr3 joins (~danse-nr3@ba-19-147-188.service.infuturo.it)
08:50:32 __monty__ joins (~toonn@user/toonn)
08:50:34 zetef joins (~quassel@2a02:2f00:5202:1200:2128:605:71c4:66a4)
08:51:04 × danse-nr3 quits (~danse-nr3@ba-19-147-188.service.infuturo.it) (Remote host closed the connection)
08:51:29 danse-nr3 joins (~danse-nr3@ba-19-147-188.service.infuturo.it)
09:11:49 × causal quits (~eric@50.35.88.207) (Quit: WeeChat 4.1.1)
09:12:26 causal joins (~eric@50.35.88.207)
09:18:05 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 4.2.2)
09:26:22 atwm joins (~atwm@19-193-28-81.ftth.cust.kwaoo.net)
09:28:11 cfricke joins (~cfricke@user/cfricke)
09:31:14 × driib quits (~driib@vmi931078.contaboserver.net) (Quit: The Lounge - https://thelounge.chat)
09:31:48 driib joins (~driib@vmi931078.contaboserver.net)
09:31:57 × titibandit quits (~titibandi@user/titibandit) (Ping timeout: 255 seconds)
09:33:25 paddymahoney joins (~paddymaho@pool-99-250-26-190.cpe.net.cable.rogers.com)
09:42:26 greenflower joins (~greenflow@43.254.176.136)
09:42:29 × paddymahoney quits (~paddymaho@pool-99-250-26-190.cpe.net.cable.rogers.com) (Ping timeout: 240 seconds)
09:43:10 L29Ah joins (~L29Ah@wikipedia/L29Ah)
09:45:04 visilii joins (~visilii@188.254.110.43)
09:45:08 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
09:47:23 × visilii_ quits (~visilii@188.254.126.249) (Ping timeout: 252 seconds)
10:03:23 × xff0x quits (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 260 seconds)
10:05:16 paddymahoney joins (~paddymaho@pool-99-250-26-190.cpe.net.cable.rogers.com)
10:10:16 pja joins (~pja@217.155.153.10)
10:13:28 × greenflower quits (~greenflow@43.254.176.136) (Quit: Ping timeout (120 seconds))
10:32:34 × rosco quits (~rosco@yp-146-6.tm.net.my) (Quit: Lost terminal)
10:40:47 × paddymahoney quits (~paddymaho@pool-99-250-26-190.cpe.net.cable.rogers.com) (Ping timeout: 264 seconds)
10:47:43 × cfricke quits (~cfricke@user/cfricke) (Ping timeout: 256 seconds)
10:50:13 paddymahoney joins (~paddymaho@pool-99-250-26-190.cpe.net.cable.rogers.com)
10:51:36 × foul_owl quits (~kerry@174-21-80-176.tukw.qwest.net) (Ping timeout: 255 seconds)
10:57:01 × paddymahoney quits (~paddymaho@pool-99-250-26-190.cpe.net.cable.rogers.com) (Ping timeout: 268 seconds)
10:57:24 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
10:58:24 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 256 seconds)
11:00:20 Lord_of_Life_ is now known as Lord_of_Life
11:00:41 euleritian joins (~euleritia@dynamic-176-002-065-139.176.2.pool.telefonica.de)
11:02:03 × inedia quits (~irc@2600:3c00:e000:287::1) (Ping timeout: 272 seconds)
11:02:47 inedia joins (~irc@2600:3c00:e000:287::1)
11:05:02 foul_owl joins (~kerry@71.212.149.206)
11:07:34 × danse-nr3 quits (~danse-nr3@ba-19-147-188.service.infuturo.it) (Read error: Connection reset by peer)
11:10:59 × foul_owl quits (~kerry@71.212.149.206) (Ping timeout: 252 seconds)
11:23:42 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
11:24:25 foul_owl joins (~kerry@185.216.231.180)
11:31:19 yeitrafferin joins (~user@2a04:4540:720d:c100:db27:e626:fcd2:9951)
11:36:57 barak joins (~barak@2a0d:6fc2:68c1:7200:3cf2:a87d:a02b:3e21)
12:04:56 × ddellacosta quits (~ddellacos@ool-44c73d29.dyn.optonline.net) (Ping timeout: 260 seconds)
12:07:55 × ocra8 quits (ocra8@user/ocra8) (Quit: WeeChat 4.2.2)
12:09:59 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
12:11:48 paddymahoney joins (~paddymaho@pool-99-250-26-190.cpe.net.cable.rogers.com)
12:12:37 cfricke joins (~cfricke@user/cfricke)
12:17:30 × paddymahoney quits (~paddymaho@pool-99-250-26-190.cpe.net.cable.rogers.com) (Ping timeout: 268 seconds)
12:19:01 xff0x joins (~xff0x@2405:6580:b080:900:b7f1:8627:ae1f:1fb0)
12:22:59 × Hafydd quits (~Hafydd@user/hafydd) (Quit: WeeChat 4.2.2)
12:25:08 ocra8 joins (ocra8@user/ocra8)
12:30:39 danse-nr3 joins (~danse-nr3@an-19-180-249.service.infuturo.it)
12:32:12 Hafydd joins (~Hafydd@user/hafydd)
12:33:43 × ocra8 quits (ocra8@user/ocra8) (Ping timeout: 246 seconds)
12:34:51 × xdminsy quits (~xdminsy@117.147.70.240) (Quit: Konversation terminated!)
12:35:16 xdminsy joins (~xdminsy@117.147.70.240)
12:35:24 × danse-nr3 quits (~danse-nr3@an-19-180-249.service.infuturo.it) (Remote host closed the connection)
12:35:28 ocra8 joins (ocra8@user/ocra8)
12:35:48 danse-nr3 joins (~danse-nr3@an-19-180-249.service.infuturo.it)
12:37:07 × ocra8 quits (ocra8@user/ocra8) (Client Quit)
12:37:22 ocra8 joins (ocra8@user/ocra8)
12:44:07 × ft quits (~ft@p508dba4c.dip0.t-ipconnect.de) (Ping timeout: 255 seconds)
12:45:55 ft joins (~ft@p508db8fc.dip0.t-ipconnect.de)
12:45:56 Guest85 joins (~Guest42@94-255-250-108.cust.bredband2.com)
12:46:36 <Guest85> Hello, I'm trying to install ghcup on Ubuntu 22.04 using the curl script on their web page, but the configure step says it can't find my c++ std library. I have searched the web and can't find anything useful. Is this a known problem? Error message in brief: "configure: error: Failed to find C++ standard library"
12:48:05 × xdminsy quits (~xdminsy@117.147.70.240) (Read error: Connection reset by peer)
12:48:43 stef204 joins (~stef204@user/stef204)
12:51:07 × manwithluck quits (manwithluc@gateway/vpn/protonvpn/manwithluck) (Ping timeout: 256 seconds)
12:52:42 xdminsy joins (~xdminsy@117.147.70.240)
12:52:52 <int-e> So what did you do exactly? Do you have a working C++ compiler? (Either clang (executable clang++) or g++)
12:53:39 manwithluck joins (~manwithlu@149.102.244.20)
12:55:45 × demon-cat quits (~demon-cat@dund-15-b2-v4wan-169642-cust1347.vm6.cable.virginm.net) (Read error: Connection reset by peer)
13:03:06 × dagit9841 quits (~dagit@2001:558:6025:38:71c6:9d58:7252:8976) (Read error: Connection reset by peer)
13:03:07 <Guest85> I did
13:03:08 <Guest85> curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
13:03:08 <Guest85> My C++ compiler is
13:03:09 <Guest85> dpkg -l|grep libstdc++
13:03:09 <Guest85> ii libstdc++-11-dev:amd64 11.4.0-1ubuntu1~22.04 amd64 GNU Standard C++ Library v3 (development files)
13:03:10 <Guest85> ii libstdc++6:amd64 12.3.0-1ubuntu1~22.04 amd64 GNU Standard C++ Library v3
13:03:10 <Guest85> So it seems to be correctly installed (I have compiled other stuff successfully, for instance C++ code for CUDA)
13:05:05 kayvank joins (~user@52-119-115-185.PUBLIC.monkeybrains.net)
13:06:19 raehik joins (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net)
13:06:59 <Guest85> Last lines of .ghcup/logs/ghc-configure.log:
13:07:00 <Guest85> checking C++ standard library flavour... libstdc++
13:07:00 <Guest85> checking for linkage against 'stdc++'... failed
13:07:01 <Guest85> checking for linkage against 'stdc++ supc++'... failed
13:07:01 <Guest85> configure: error: Failed to find C++ standard library
13:07:35 <danse-nr3> how is that ... ?
13:07:37 <danse-nr3> @paste
13:07:37 <lambdabot> A pastebin: https://paste.debian.net/
13:10:48 <Guest85> Sorry, I'll use tha pastebin next time. Could it be the supc++ that is misssing?
13:13:53 mankanor joins (~mankanor@210.185.176.242)
13:16:47 × mankanor quits (~mankanor@210.185.176.242) (Remote host closed the connection)
13:31:09 <Guest85> Maybe it's possible to tell by setting an environment variable, helping ghcup to find my libstdc++ ?
13:31:59 <jackdk> Do you have the entire autoconf configure.log? Usually that shows what commands it tried to execute, about 2/3 of the way through
13:32:02 <carbolymer> can I have multiple threads waiting on `readMVar`, do `tryPutMVar mv () >> tryTakeMVar mv` and expect that all of them to wake up?
13:35:55 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
13:35:56 × cfricke quits (~cfricke@user/cfricke) (Ping timeout: 256 seconds)
13:36:50 <Lears> carbolymer: IIRC, threads are woken in the order they block, so yes.
13:43:45 paddymahoney joins (~paddymaho@pool-99-250-26-190.cpe.net.cable.rogers.com)
13:45:20 <carbolymer> hmm, can I use TMVar for multiple-wakeup? I guess not, because readTMVar does take -> put
13:45:41 <carbolymer> I wonder how to do it in STM
13:45:44 × AlexZenon quits (~alzenon@178.34.162.125) (Ping timeout: 260 seconds)
13:49:37 × Mach quits (~Mach@92.87.113.25) (Ping timeout: 256 seconds)
13:50:29 <Lears> You can just have them wake when a TVar holding a Bool is True.
13:52:13 dagit joins (~dagit@2001:558:6025:38:71c6:9d58:7252:8976)
13:52:37 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
13:53:23 cfricke joins (~cfricke@user/cfricke)
13:53:47 × paddymahoney quits (~paddymaho@pool-99-250-26-190.cpe.net.cable.rogers.com) (Ping timeout: 252 seconds)
13:55:25 AlexZenon joins (~alzenon@178.34.162.125)
13:57:08 <Lears> E.g. `makeMultipleWakeuperer = do { wake <- newTVarIO False; let { waitForIt = atomically (readTVar wake >>= check); readySetGo = atomically (writeTVar wake True) }; pure (waitForIt, readySetGo)`.
14:02:57 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
14:05:33 × Guest85 quits (~Guest42@94-255-250-108.cust.bredband2.com) (Ping timeout: 250 seconds)
14:06:21 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
14:07:34 × AlexZenon quits (~alzenon@178.34.162.125) (Ping timeout: 268 seconds)
14:08:12 billchenchina joins (~billchenc@2a0d:2580:ff0c:1:e3c9:c52b:a429:5bfe)
14:11:25 × cfricke quits (~cfricke@user/cfricke) (Ping timeout: 272 seconds)
14:15:11 AlexZenon joins (~alzenon@178.34.162.125)
14:16:22 × chele quits (~chele@user/chele) (Remote host closed the connection)
14:21:49 × gmg quits (~user@user/gehmehgeh) (Remote host closed the connection)
14:24:10 cfricke joins (~cfricke@user/cfricke)
14:26:07 <carbolymer> Lears: ah but it requires check to run in STM. I'd like to do an IO action on lock update, and then wait for another update.
14:26:16 Sgeo joins (~Sgeo@user/sgeo)
14:26:49 gmg joins (~user@user/gehmehgeh)
14:28:42 Guest10 joins (~Guest42@94-255-250-108.cust.bredband2.com)
14:29:40 <Guest10> jackdk, I am now Guest10, I was previously Guest85
14:32:02 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
14:32:52 × zetef quits (~quassel@2a02:2f00:5202:1200:2128:605:71c4:66a4) (Ping timeout: 260 seconds)
14:33:49 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 4.2.2)
14:34:30 <Lears> carbolymer: You can also make a `reset = atomically (writeTVar wake False)`. Then your master thread would `readySetGo >> reset` while your workers `forever (waitForIt >> doTheThing)`. This isn't really a good idea though, whether with STM or an MVar. Consider using a TChan: have your master thread write to a `newBroadcastTChan`, while your workers read from `dupTChans` produced from it.
14:34:38 titibandit joins (~titibandi@user/titibandit)
14:35:18 <carbolymer> oh yeah dupTChan is much better
14:35:31 × vpan quits (~vpan@212.117.1.172) (Quit: Leaving.)
14:40:21 <carbolymer> Guest10: don't be a guest, make yourself at home
14:50:15 <Guest10> ok :-)
14:50:26 rvalue- joins (~rvalue@user/rvalue)
14:50:59 × rvalue quits (~rvalue@user/rvalue) (Ping timeout: 252 seconds)
14:53:05 Guest10 is now known as brox66
14:53:17 machinedgod joins (~machinedg@d173-183-246-216.abhsia.telus.net)
14:54:28 rvalue- is now known as rvalue
14:54:34 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
14:56:29 × raehik quits (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 252 seconds)
14:56:44 × son0p quits (~ff@152.203.77.121) (Remote host closed the connection)
14:56:58 × brox66 quits (~Guest42@94-255-250-108.cust.bredband2.com) (Changing host)
14:56:58 brox66 joins (~Guest42@user/brox66)
14:59:45 <brox66> jackdk, I am now registered. Here is the link to pastebin, with my configure log from ghcup installation: https://paste.debian.net/1316549/
15:02:19 <brox66> What is the current recommended way to install haskell stack on Ubuntu? I have been away for a few years from setting up haskell environments.
15:03:41 × danse-nr3 quits (~danse-nr3@an-19-180-249.service.infuturo.it) (Ping timeout: 268 seconds)
15:03:56 <jackdk> use ghcup if you can, and cabal is a lot better than it used to be. I gave stack away years ago
15:04:35 <jackdk> I wish I knew why configure is testing for all those llvm compilers since it found gcc. I wonder if you haven't got c++ stuff installed properly
15:05:37 <jackdk> https://www.haskell.org/ghcup/install/#linux-ubuntu is the packages you need, though I would've thought the script would've installed them for you
15:05:51 <jackdk> I use nix these days so I'm not across ghcup, though it is the default recommendation
15:08:11 waleee joins (~waleee@h-176-10-144-38.NA.cust.bahnhof.se)
15:12:19 × xdminsy quits (~xdminsy@117.147.70.240) (Read error: Connection reset by peer)
15:12:46 <brox66> jackdk, thanks! I have already installed all those dependencies successfully. I have a working Rust toolchain, a working c++ environment when I try to compile some examples containing c++ code for CUDA demos, so I believe they work correctly. Although there is a setting between verion 11 and version 12 I can set. Maybe that could be a problem. I'll
15:12:46 <brox66> try to switch...
15:12:47 <brox66> Yes, I got the impression that ghcup is the recommended way now, and got surprised it was so hard to get it working.
15:13:34 <EvanR> I'm on ubuntu, ghcup worked
15:13:54 <brox66> EvanR, how did you install it?
15:14:15 <EvanR> curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
15:15:06 × euleritian quits (~euleritia@dynamic-176-002-065-139.176.2.pool.telefonica.de) (Ping timeout: 268 seconds)
15:15:24 × rvalue quits (~rvalue@user/rvalue) (Ping timeout: 268 seconds)
15:15:41 <EvanR> or whatever the command on the website was at the time
15:16:21 euleritian joins (~euleritia@dynamic-176-005-132-201.176.5.pool.telefonica.de)
15:18:23 xdminsy joins (~xdminsy@117.147.70.240)
15:19:12 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
15:19:56 <brox66> EvanR and jackdk, I finally got past the error! I switched back from gcc-12 to gcc-11 using update-alternatives, and now it seems to work! Many thanks!!
15:23:21 target_i joins (~target_i@user/target-i/x-6023099)
15:24:27 × AlexZenon quits (~alzenon@178.34.162.125) (Ping timeout: 260 seconds)
15:25:49 rvalue joins (~rvalue@user/rvalue)
15:25:52 × xdminsy quits (~xdminsy@117.147.70.240) (Quit: Konversation terminated!)
15:26:15 xdminsy joins (~xdminsy@117.147.70.240)
15:27:49 emmanuelux joins (~emmanuelu@user/emmanuelux)
15:31:26 tzh joins (~tzh@c-73-164-206-160.hsd1.or.comcast.net)
15:31:48 spamonia joins (~user@user/siracusa)
15:34:04 AlexZenon joins (~alzenon@178.34.162.125)
15:42:33 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
15:43:51 raehik joins (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net)
15:44:38 econo_ joins (uid147250@id-147250.tinside.irccloud.com)
15:48:19 × AlexZenon quits (~alzenon@178.34.162.125) (Ping timeout: 272 seconds)
15:49:19 <brox66> Another problem: stack times out for almost any stack command. I believe it tries to use ipv6. Is there a way to force it to use ipv4 instead?
15:49:26 × atwm quits (~atwm@19-193-28-81.ftth.cust.kwaoo.net) (Quit: WeeChat 4.0.5)
15:50:18 <glguy> If IPv6 is configured to be broken on your computer you should just fix that
15:51:29 paddymahoney joins (~paddymaho@pool-99-250-26-190.cpe.net.cable.rogers.com)
15:53:22 AlexZenon joins (~alzenon@178.34.162.125)
15:56:05 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
15:58:19 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
15:58:42 <brox66> glguy, I have previously disabled ipv6 on my system, since many appllication becomes extremely unresponsive due to it. I believe it has to do wih dns queries. I should make another attempt to make it work, but I wish I could focus on Haskell issues and not having to dig deep into ipv6 now...
15:59:47 <glguy> most network applications just assume you have a working network stack. It's relatively uncommon for them to provide workarounds individually for one
16:00:27 tram joins (~tram@2a02:586:7e3a:cb96:c7d7:78d4:c6de:913a)
16:01:32 × paddymahoney quits (~paddymaho@pool-99-250-26-190.cpe.net.cable.rogers.com) (Ping timeout: 260 seconds)
16:02:34 <EvanR> I leave my IPV6 enabled and it works
16:02:59 <EvanR> but that's entirely thanks to my ISP
16:04:26 __monty_1 joins (~toonn@user/toonn)
16:05:03 × AlexZenon quits (~alzenon@178.34.162.125) (Ping timeout: 260 seconds)
16:05:19 × __monty__ quits (~toonn@user/toonn) (Killed (NickServ (GHOST command used by __monty_1)))
16:05:27 __monty_1 is now known as __monty__
16:07:42 <raehik> Does GHC place a limit on number of fields in a data type? I'm doing some generics and want to know that I can report the index of a field as an Int or something easier than a Natural.
16:07:59 <raehik> s/number of fields in a data type/number of fields in a constructor
16:08:02 AlexZenon joins (~alzenon@178.34.162.125)
16:09:24 <EvanR> if you go over max Int, you'll probably have other problems first
16:09:26 <raehik> I guess realistically no one's getting past 2^16. but curious if there's a hard stop
16:10:40 <EvanR> > 2^29
16:10:42 <lambdabot> 536870912
16:11:11 <raehik> you make a good point lambdabot
16:11:15 <EvanR> > maxBound :: Int
16:11:16 <lambdabot> 9223372036854775807
16:12:21 <raehik> I realize I can perform a transformation early so I never have to return a Natural, so I'm more certain the reification will get inlined now. so lucky this non-issue will remain so xd
16:12:31 × yeitrafferin quits (~user@2a04:4540:720d:c100:db27:e626:fcd2:9951) (Quit: Leaving)
16:13:01 <brox66> glguy, I guess you are right. But nevertheless, if ipv6 doen't work for whatever reason, it would be good to be able to fall back to ipv4. I have seen others having the same problem.
16:13:44 <glguy> I don't know of any options for stack. I think you just have to configure your network first to use it
16:16:46 × machinedgod quits (~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 268 seconds)
16:21:18 × rvalue quits (~rvalue@user/rvalue) (Read error: Connection reset by peer)
16:21:30 × brox66 quits (~Guest42@user/brox66) (Quit: Client closed)
16:21:47 rvalue joins (~rvalue@user/rvalue)
16:22:50 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
16:23:08 __monty__ joins (~toonn@user/toonn)
16:23:15 × __monty__ quits (~toonn@user/toonn) (Client Quit)
16:23:47 __monty__ joins (~toonn@user/toonn)
16:34:58 philopsos joins (~caecilius@user/philopsos)
16:38:33 × mima quits (~mmh@aftr-62-216-211-252.dynamic.mnet-online.de) (Ping timeout: 255 seconds)
16:40:02 × billchenchina quits (~billchenc@2a0d:2580:ff0c:1:e3c9:c52b:a429:5bfe) (Remote host closed the connection)
16:40:23 billchenchina joins (~billchenc@103.152.35.21)
16:43:38 × billchenchina quits (~billchenc@103.152.35.21) (Remote host closed the connection)
16:43:54 billchenchina joins (~billchenc@103.152.35.21)
16:46:04 × xdminsy quits (~xdminsy@117.147.70.240) (Ping timeout: 246 seconds)
16:52:52 × stef204 quits (~stef204@user/stef204) (Quit: WeeChat 4.2.2)
17:04:25 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
17:25:01 <justsomeguy> What am I doing wront with my lconcat function here? https://termbin.com/krr5
17:28:40 <int-e> justsomeguy: nothing
17:28:57 <int-e> (the `nested` thing in the comment is flawed though)
17:30:22 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
17:32:11 × justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 272 seconds)
17:38:18 <ski> Cons x xs `lappend` ys = Cons x (xs `lappend` ys)
17:38:29 <ski> lconcat = foldr lappend Nil
17:40:24 <ski> Cons m mfs <*> mxs = fmap m mxs `lappend` (mfs <*> mxs)
17:42:19 × ocra8 quits (ocra8@user/ocra8) (Quit: WeeChat 4.2.2)
17:45:29 justsomeguy joins (~justsomeg@user/justsomeguy)
17:48:03 brox66 joins (~brox66@user/brox66)
18:04:49 zetef joins (~quassel@2a02:2f00:5202:1200:df0b:9c52:7feb:3551)
18:08:23 × philopsos quits (~caecilius@user/philopsos) (Ping timeout: 264 seconds)
18:08:39 Tuplanolla joins (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi)
18:15:27 hippoid joins (~hippoid@user/hippoid)
18:17:18 <hippoid> is there a way to go `String -> IO FilePath`, which does the equivalent of `which nvim`? I want a haskell thing to give me the path of a program found in the env var $PATH
18:18:12 akegalj joins (~akegalj@141-136-219-195.dsl.iskon.hr)
18:18:28 × euleritian quits (~euleritia@dynamic-176-005-132-201.176.5.pool.telefonica.de) (Ping timeout: 246 seconds)
18:22:55 <ncf> hippoid: https://ircbrowse.tomsmeding.com/day/lchaskell/2023/05/27?id=971542#trid971542
18:23:31 <yushyin> Turtle.Prelude.which, Shelly.which
18:24:32 <yushyin> ah lol, https://ircbrowse.tomsmeding.com/day/lchaskell/2023/05/27?id=971562#trid971562
18:25:34 <mauke> https://hackage.haskell.org/package/directory-1.3.8.4/docs/System-Directory.html#v:findExecutable
18:25:40 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
18:31:05 <hippoid> thanks everyone.
18:31:42 × gmg quits (~user@user/gehmehgeh) (Ping timeout: 260 seconds)
18:36:24 <justsomeguy> How do I write a two-dimensional list with this datatype? data List a = Nil | Cons a (List a) deriving (Eq, Ord, Show)
18:37:10 <mauke> List (List a) -- a list of lists
18:38:30 × akegalj quits (~akegalj@141-136-219-195.dsl.iskon.hr) (Quit: leaving)
18:38:31 gmg joins (~user@user/gehmehgeh)
18:39:52 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
18:41:49 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
18:42:04 Square joins (~Square@user/square)
18:43:32 Henson joins (~kvirc@192-0-202-2.cpe.teksavvy.com)
18:43:38 <justsomeguy> I just came up with ·∾ Cons (Cons 1 (Cons 2 (Cons 3 Nil))) (Cons (Cons 4 (Cons 5 (Cons 5 Nil))) Nil) but I'm not sure if it's what I want. I'm trying to write the equivalent of [[1,2,3],[4,5,6]].
18:44:20 <mauke> that looks right
18:44:46 <int-e> @let data List a = Nil | Cons a (List a) deriving Show
18:44:47 <lambdabot> Defined.
18:44:52 <mauke> > let cons = (:); nil = [] in cons (cons 1 (cons 2 (cons 3 nil))) (cons (cons 4 (cons 5 (cons 6 nil))) nil)
18:44:53 <lambdabot> [[1,2,3],[4,5,6]]
18:45:19 <int-e> > let fromList = foldr Cons Nil in fromList (map fromList [[1,2,3],[4,5,6]])
18:45:21 <lambdabot> Cons (Cons 1 (Cons 2 (Cons 3 Nil))) (Cons (Cons 4 (Cons 5 (Cons 6 Nil))) Nil)
18:45:47 <int-e> justsomeguy: your last 5 should be a 6
18:46:54 <justsomeguy> Good catch.
18:47:41 <Henson> does anybody know how to use Aeson to parse nested JSON with potentially missing fields. Say for JSON we have: 'foo': { 'bar': 2 } but sometimes those can be missing, and we want to use Aeson like (o .:? "foo") >>= (.:? "bar") The problem is that to monadically chain Parsers together with >>= they have to be Objects inside, but .:? produces a Maybe Object which the second level of .:?
18:48:05 <Henson> doesn't like. Is there some way to chain them together with potential failures to produce a Maybe Int in the end.
18:48:46 <Henson> because the way I'm having to do this is to individually extract the optional fields, and do case switches on them before going to the next level, which is ugly.
18:53:59 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
18:55:44 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
19:01:05 <probie> If you concern is ugliness, you could always write a new operator which handles the `Maybe Object` e.g. `?:? :: FromJSON a => Maybe Object -> Key -> Parser (Maybe a); Nothing ?:? _ = pure Nothing; (Just o) ?:? k = o .:? k` and then do something like `(o .:? "foo") >>= (?:? "bar")`
19:01:32 <ncf> or use lens
19:03:05 <justsomeguy> int-e: Why does the second nested list need an extra Cons around it?
19:03:12 <probie> Does Aeson ship with lenses these days, or is that still yet another dependency (in addition to both aeson and lens)
19:04:07 <int-e> justsomeguy: it's from the outer list
19:04:58 <int-e> justsomeguy: just work your way in from the outside: [[1,2,3],[4,5,6]] becomes Cons [1,2,3] (Cons [4,5,6] Nil). And you already know how to deal with the two inner lists
19:05:15 <int-e> (Just be careful to add enough parentheses)
19:06:02 <int-e> Or, well, be lazy like I was above and let Haskell do it for you.
19:06:39 × brox66 quits (~brox66@user/brox66) (Quit: Client closed)
19:06:48 × sawilagar quits (~sawilagar@user/sawilagar) (Ping timeout: 260 seconds)
19:07:22 <ncf> or i guess you could chain (.:) and use <|> pure Nothing
19:07:41 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
19:09:48 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
19:10:04 <Henson> ncf: can you give an example of how I'd do the chaining?
19:12:03 × raehik quits (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 256 seconds)
19:12:13 × zetef quits (~quassel@2a02:2f00:5202:1200:df0b:9c52:7feb:3551) (Remote host closed the connection)
19:13:05 zetef joins (~quassel@2a02:2f00:5202:1200:df0b:9c52:7feb:3551)
19:13:27 <ncf> i guess (.: "foo") >=> (.: "bar")
19:15:06 <Henson> probie, ncf: thank you for your help. I'll give your suggestions a try.
19:16:00 <justsomeguy> int-e: Is it possible to write a toList function that will convert a List of arbitrary depth to []?
19:16:19 <justsomeguy> I think it's probably not, because the type system wants to know the dimension of the list beforehand...
19:16:20 <int-e> justsomeguy: yes, foldr (:) []
19:16:29 <int-e> justsomeguy: since you already have Foldable
19:16:46 <ncf> you could wrap the dimension in an existential
19:16:56 <int-e> :t Data.Foldable.toList
19:16:57 <lambdabot> Foldable t => t a -> [a]
19:17:06 <int-e> (It even exists there already)
19:17:40 <int-e> (Not exported by Prelude. Too many other modules define toList functions.)
19:18:35 <mauke> that only does one level
19:18:38 <justsomeguy> To get what I want (a 2-dimensional [] from a 2-dimensional List), I have to use toList $ fmap toList nested.
19:18:57 <justsomeguy> But the goal is to not have to specify the depth.
19:18:57 <int-e> justsomeguy: right
19:19:21 <justsomeguy> ...I finally feel like I'm learning something...
19:19:33 <int-e> you can't reasily do that... you'll have to play some nasty type class tricks.
19:20:37 raehik joins (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net)
19:21:36 <ncf> is there a GADT that builds the sum of powers of a functor
19:21:43 <ncf> 1 + f + f² + ...
19:22:11 mankanor joins (~mankanor@210.185.176.242)
19:22:37 <ncf> Powers f a = Z | S (Powers f (f a)) ?
19:22:48 <EvanR> 1 / (1 - f)
19:22:53 <ncf> no wait
19:23:01 <ncf> EvanR: lol
19:23:08 <ski> s/Z/Z a/
19:23:20 <probie> Assuming f is `[]`, do you mean something that's equivalent to `data Lists a = F0 a | F1 [a] | F2 [[a]] | F3 [[[a]]] ...` or have I misinterpreted?
19:23:23 <ncf> oh yeah
19:23:25 × mankanor quits (~mankanor@210.185.176.242) (Remote host closed the connection)
19:23:43 <ski> (and this is a nonregular data type, not a GADT)
19:23:48 <ncf> yes yes
19:23:54 mankanor joins (~mankanor@210.185.176.242)
19:23:55 × mankanor quits (~mankanor@210.185.176.242) (Remote host closed the connection)
19:23:56 <ncf> you can encode it as a GADT right?
19:23:58 <ski> (requires polymorphic recursion)
19:24:15 <ncf> Z :: a -> Powers f a; S :: Powers f (f a) -> Powers f a
19:24:33 <ski> that's just `GADTSyntax'
19:25:00 <ski> you can separate it into a singleton, and an indexed type, if you want to ..
19:25:00 <ncf> right, it's not an actual GADT
19:25:09 <int-e> ncf: You don't need GADT powers for that; Haskell 98 data types would allow that.
19:25:57 <probie> You only need GADTs if you want to include the depth in the type
19:25:58 mankanor joins (~mankanor@210.185.176.242)
19:25:58 × mankanor quits (~mankanor@210.185.176.242) (Remote host closed the connection)
19:27:00 mankanor joins (~mankanor@210.185.176.242)
19:28:35 justsomeguy goes off to google GADTs
19:29:06 × mankanor quits (~mankanor@210.185.176.242) (Read error: Connection reset by peer)
19:29:12 <mauke> goofy-ahh dark templar
19:29:46 talismanick joins (~user@2601:644:937c:ed10::ae5)
19:29:49 <monochrom> The GHC user's guide has the best explanation and motivating example of GADTs.
19:30:52 <justsomeguy> So, I've finally gotten through the basics of Semigroup, Monoid, Functor, Foldable, Applicative and Monad. Can I write cool command-line apps now?
19:31:06 <justsomeguy> ^_^;...
19:31:38 <dolio> Probably.
19:32:33 <monochrom> or a PhD thesis >:)
19:33:27 ocra8 joins (ocra8@user/ocra8)
19:37:50 <justsomeguy> in latex :D
19:38:14 philopsos1 joins (~caecilius@user/philopsos)
19:38:22 × Henson quits (~kvirc@192-0-202-2.cpe.teksavvy.com) (Quit: KVIrc 5.0.1 Aria http://www.kvirc.net/)
19:38:24 <justsomeguy> (I actually have to learn latex for school.)
19:41:12 <monochrom> We all learned latex for school. :)
19:45:05 <probie> I see a lot of the younger generation rather enamoured with Typst right now
19:50:38 × euphores quits (~SASL_euph@user/euphores) (Quit: Leaving.)
19:53:32 <[exa]> justsomeguy: optparse-applicative and gogogo
19:55:22 × justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 268 seconds)
19:57:21 <tram> I think I have a good solution for problem 2 in H-99 (https://wiki.haskell.org/H-99:_Ninety-Nine_Haskell_Problems). I think it's faster than the ones on the wiki (at least the ones that are not cheating by using built in functions...)
19:57:24 <ncf> <ncf> 1 + f + f² + ...
19:57:37 <ncf> anyone know what this thing is called? it's the free monad on f if f preserves coproducts i guess
19:58:52 <ncf> er no nvm
19:59:15 <ncf> or maybe yes
19:59:19 <probie> It's not quite a free monad, because all "branches" have the same depth, whilst a free monad doesn't have that restriction
19:59:31 <ncf> > if f preserves coproducts
19:59:32 <lambdabot> <hint>:1:26: error:
19:59:32 <lambdabot> parse error (possibly incorrect indentation or mismatched brackets)
19:59:51 <ncf> then you have 1 + f (1 + f (1 + ...)) = 1 + f + ff + ...
20:00:13 <ncf> but it seems too simple to not have a name of its own
20:00:30 <ncf> what is this even called in math
20:01:02 <ncf> sum of the geometric series
20:02:06 <[exa]> ncf: looks like (1-f)^{-1} via maclaurin series
20:02:56 <[exa]> (now we can try to geek it and invent negation in ADTs so that this generates well)
20:05:15 <[exa]> also similar thing happens if you calculate products with vandermonde matrices, with less ugly calculus in the way
20:07:06 <[exa]> (other than that just a sum of geometric series. Funnily the type will be finite exactly if f<1.)
20:08:08 <ski> ∃ n : ℕ. fⁿ
20:13:10 <ncf> oooh right what i was remembering is that you can actually make sense of 1/(1-f) for lists
20:13:23 <ski> "Seven Trees in One" by Andreas Blass in 1995 at <https://dept.math.lsa.umich.edu/~ablass/cat.html>,<https://dept.math.lsa.umich.edu/~ablass/7trees.pdf>,cf. <https://golem.ph.utexas.edu/category/2009/07/searching_for_a_video_proof_of.html>
20:13:30 <ski> "Objects of Categories as Complex Numbers" by Marcelo Fiore,Tom Leinster in 2002-12-30 at <https://arxiv.org/abs/math/0212377>
20:13:33 <ski> "This Week's Finds in Mathematical Physics (Week 202)" by John Baez in 2004-02-21 at <http://math.ucr.edu/home/baez/week202.html>
20:13:40 <talismanick> shoving the standard imperative FRACTRAN implementation into State should work (right?), but I decided to purify a trivial recursive translation to see how Haskell would handle it
20:13:43 <ncf> staying in the monoidal category Hask, we have List a = 1 + a + a² + ..., and List a = 1 + a * List a
20:13:44 <talismanick> https://0x0.st/X8Uj.txt
20:13:59 <ncf> hence List a = 1 / (1 - a)
20:14:43 <talismanick> My thinking was that it should kill most of the shortlived `map (fromInteger n *)` lists in the nursery and eventually spit out an answer, but that seems to have been wrong
20:15:36 <talismanick> the memory usage climbs up a bit, falls back down, and then jumps up a gigabyte, repeating several times until I run out before computing the 7th Fibonacci (as is the traditional FRACTRAN test program)
20:16:57 <talismanick> it survived a bit longer when I forced it to compile with -O2, but ran into the same problem
20:17:26 demon-cat joins (~demon-cat@dund-15-b2-v4wan-169642-cust1347.vm6.cable.virginm.net)
20:17:47 <talismanick> I thought list fusion plus taking the first integer and bailing would help, but either it's not enough or the optimizations aren't kicking
20:17:56 <talismanick> aren't kicking in*
20:18:28 justsomeguy joins (~justsomeg@user/justsomeguy)
20:18:38 <talismanick> It terminates with Int instead of Integer, but, of course, returns the wrong answer due to overflow
20:18:59 <talismanick> I feel like I'm missing something...
20:22:24 <monochrom> I know nothing about FRACTRAN. I also don't know what input led to the space growth you saw. But perhaps you really ran into a really big number.
20:25:09 <talismanick> monochrom: huge numbers are par for course with FRACTRAN - I think of it as "prime-indexed" computing by iterating over rationals
20:25:11 <talismanick> https://raganwald.com/2020/05/03/fractran.html
20:25:49 <[exa]> talismanick: aren't you multiplying by `n` twice unnecessarily?
20:26:08 <talismanick> it's a really simple language: your program is a list of positive rationals, your input is a natural
20:26:09 <[exa]> talismanick: (`r` is already multiplied no?)
20:27:12 <talismanick> [exa]: wait, you're right, lol
20:27:24 talismanick hangs head in shame
20:27:40 <[exa]> like I suppose you are a victim of the wikipedia description
20:27:53 <[exa]> the double `nf` there ain't a happy way to put that
20:28:10 mikess joins (~mikess@user/mikess)
20:28:13 <[exa]> got me super confused. :D
20:28:33 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
20:29:06 <talismanick> monochrom: the rules are, you multiply everything in the list by n, then take the first of those which reduces to an integer and recurse with that as your new n
20:29:08 <probie> FRACTRAN doesn't involve prime numbers or fractions beyond _parsing_ a program
20:29:15 <talismanick> and you halt when the list is empty
20:29:41 <probie> it can be phrased as such, but that's not a particularly productive way to think about it
20:30:37 <[exa]> "gödel encoded registers" is kinda guiding
20:30:46 <[exa]> nvm /me off
20:34:00 machinedgod joins (~machinedg@d173-183-246-216.abhsia.telus.net)
20:35:00 <monochrom> I have looked at the -O core code. It fused the filter with the map.
20:36:24 <talismanick> it finishes instantly after I remove the spurious multiplication ;_;
20:37:10 <monochrom> The whole "filter ((1 ==) . denominator) $ (fromInteger n *) <$> p" produces at most one "r : small thunk" node, ever. That node is then immediately pattern-matched by your "[] -> n; (r : _) -> recurse" and becomes garbage.
20:38:11 <talismanick> although, it does return Infinity with an input of just 20
20:38:20 <talismanick> so there's clearly plenty of room for optimization
20:39:08 × philopsos1 quits (~caecilius@user/philopsos) (Ping timeout: 252 seconds)
20:40:02 <talismanick> (in bringing down intermediate sizes, since apparently it didn't break a sweat in exceeding Haskell's bignum abilities)
20:40:52 <talismanick> probie: are you sure there's nothing to be said about primality in the way of intermediate term simplification?
20:42:27 <talismanick> I feel like there's some deep number theory hiding in there... is there a proof (Rice's thm corollary or something) that says that there's always a breaking exception to any optimizing pattern you find?
20:44:55 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
20:46:53 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 240 seconds)
20:49:14 <monochrom> I see how the spurrious (n *) makes an exponential difference.
20:49:47 <monochrom> So yeah, put it acidically, surprised why anyone does not expect OOM.
20:51:27 <monochrom> This is also why I ignored all attempts at teaching me FRACTRAN. A clean slate sees what the erroneous code actually does, not misread it as correct code.
20:52:08 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
20:53:42 <talismanick> monochrom: would you believe me if I said it was a typo?
20:54:07 <monochrom> Yes it is a typo.
20:54:13 <talismanick> I read over it several times, wondering what went wrong because I thought I already had the right algorithm
20:54:30 <talismanick> but no, user error (even though I knew what I was supposed to do)
20:56:37 <monochrom> But when I blindly guessed "perhaps you really ran into really big numbers", you should have tried to refute me with empirical evidence by adding some Debug.Trace things to print out the numbers and shove them into my face. That way you would discover that they were actually wrongly big numbers.
20:57:51 <monochrom> I am saying all this as good techniques and habits of debugging that apply generally / for future reference.
20:58:12 <talismanick> tbf, the point of FRACTRAN is that what look like "wrongly big numbers" can do useful work
20:58:51 <talismanick> unless I knew the exact sequence of n's this program would take, I'd look in there and say "wow, those are some big numbers - sure is weird how FRACTRAN gets stuff done"
20:59:10 <darkling> I always get the feeling that the horrible, slow, painful, step-by-step, question-everything process of debugging isn't sufficiently well taught.
20:59:56 <monochrom> I trust that you actually had one small test case where you actually knew what numbers to expect. Again, just commenting on good habits in general.
21:00:19 <darkling> Probably because so many of the teachers can spot the students' simple mistakes immediately, and so point them out, and it looks like magic (or guessing and luck), and so the students don't learn the boring consistent way.
21:00:59 <monochrom> It is worse. Student even expects experts to be telepathic.
21:01:15 <darkling> That too. :)
21:02:49 <monochrom> OK I'm exaggerating. Students tell you only "it says 'syntax error at line 4 column 3'" and expect you to know how to cause it. The irony being that, since I am the teacher, therefore I was an A+ student, therefore I have never learned how to cause errors, only how to cause correct code.
21:03:17 <monochrom> I need to start actually rubbing that into those students' faces.
21:03:25 <darkling> Causing specific errors deliberately is hard.
21:04:06 <glguy> monochrom: pretty good that they read the error enough to know the line and column, at least. not everyone gets to that level
21:04:49 <darkling> After that, the next step is to understand that the error might not actually be at that position...
21:05:08 <darkling> It's just where the compiler noticed something odd.
21:05:44 <monochrom> There is even a story in the religious circles about a similar thing. There is an experienced ship captain who has piloted through a certain river all his life. So someone said to him "so you know every place along that river that is not safe for the ship, right?". The captain replied "no, why should I? I need only know one safe route and stick to it."
21:09:25 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 272 seconds)
21:12:26 sawilagar joins (~sawilagar@user/sawilagar)
21:15:33 jmdaemon joins (~jmdaemon@user/jmdaemon)
21:18:38 <talismanick> in any case, isn't Integer supposed to be correct for arbitrarily large numbers?
21:18:57 <talismanick> because `round $ logBase 2.0 $ fromInteger $ naive fibs $ 78*5^(16-1)` returns 987 as it should
21:18:58 × michalz quits (~michalz@185.246.207.200) (Quit: ZNC 1.8.2 - https://znc.in)
21:19:19 <talismanick> but `round $ logBase 2.0 $ fromInteger $ naive fibs $ 78*5^(17-1)` returns an ungodly large number spanning several lines instead of 1597
21:19:26 × zetef quits (~quassel@2a02:2f00:5202:1200:df0b:9c52:7feb:3551) (Remote host closed the connection)
21:19:59 <davean> fromInteger
21:20:07 <davean> No longer an integer?
21:20:36 <talismanick> davean: fromInteger lifts into a Rational (Ratio Integer) with denominator 1
21:20:54 <davean> you've checked thats what it ends up as?
21:20:56 <glguy> > logBase 2.0 1.0 :: Rational
21:20:57 <talismanick> inside `naive`, that is
21:20:57 <lambdabot> error:
21:20:57 <lambdabot> • No instance for (Floating Rational)
21:20:57 <lambdabot> arising from a use of ‘logBase’
21:20:59 <glguy> o.O
21:21:20 <talismanick> the outer one just converts it to Float so logBase stops complaining
21:21:40 <davean> talismanick: check that?
21:21:43 <talismanick> (see the paste I posted earlier, I thought that was the `fromInteger` call you meant)
21:21:49 × ystael quits (~ystael@user/ystael) (Ping timeout: 256 seconds)
21:22:11 <talismanick> https://0x0.st/X80c.txt
21:22:40 <talismanick> I thought that was the call you meant, because that's where it generates large numbers
21:23:03 <talismanick> by the time it exits the call to `naive` (naive FRACTRAN interpreter), it should have shrunk to the correct size
21:23:46 <EvanR> Integer is correct, look for problem elsewhere
21:26:59 × jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 264 seconds)
21:26:59 × titibandit quits (~titibandi@user/titibandit) (Ping timeout: 252 seconds)
21:32:58 <monochrom> Please don't go through Double (which logBase does) when counting digits of numbers that are going to be out of range of Double.
21:33:33 <monochrom> Integer surely enjoys the functions from Data.Bits, one of which can tell you about # of digits, no?
21:34:52 <talismanick> ah, you're right
21:34:53 <talismanick> https://stackoverflow.com/questions/26416323/function-to-calculate-log-of-integer
21:35:20 <talismanick> apparently it is the outermost `fromInteger` which is to blame
21:36:05 philopsos joins (~caecilius@user/philopsos)
21:37:28 <monochrom> Ah damn Data.Bits doesn't have something to count digits. Well, at least you know how to repeatedly divided by 10 or something.
21:38:15 × mikess quits (~mikess@user/mikess) (Ping timeout: 256 seconds)
21:38:18 <monochrom> But GHC.Integer.Logarithms has something.
21:38:24 <talismanick> the SO answer fixed it, yeah
21:38:34 <talismanick> `(\n -> I# (integerLog2# n))`
21:40:05 <EvanR> snazzy
21:40:30 <monochrom> GHC.Num.Integer may be more future proof.
21:41:19 <monochrom> > maxBound :: Double
21:41:21 <lambdabot> error:
21:41:21 <lambdabot> • No instance for (Bounded Double) arising from a use of ‘maxBound’
21:41:21 <lambdabot> • In the expression: maxBound :: Double
21:41:29 <monochrom> Oh fun.
21:41:38 <talismanick> unfortunately, Hackage doesn't have a page for it
21:41:45 <talismanick> but it is there...
21:41:55 <mauke> > 1/0 > 0/0
21:41:57 <lambdabot> False
21:42:14 <monochrom> I normally use the docs that come with GHC instead of the web.
21:42:33 <int-e> > 1/0 `compare` 0/0
21:42:35 <lambdabot> error:
21:42:35 <lambdabot> • No instance for (Num Ordering) arising from the literal ‘1’
21:42:35 <lambdabot> • In the first argument of ‘(/)’, namely ‘1’
21:42:42 <int-e> > (1/0) `compare` (0/0)
21:42:43 <lambdabot> GT
21:43:48 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
21:44:31 × qqq quits (~qqq@92.43.167.61) (Remote host closed the connection)
21:45:39 <monochrom> Basically the max finite Double is around 2^1023.
21:46:32 <monochrom> > (encodeFloat 1 1023 :: Double, encodeFloat 1 1024 :: Double)
21:46:33 <lambdabot> (8.98846567431158e307,Infinity)
21:47:05 <talismanick> ah, so the jump from fib 16 -> 987 to fib 17 -> 1597 is just where it begins to overflow
21:47:11 <talismanick> makes sense
21:56:21 × ocra8 quits (ocra8@user/ocra8) (Quit: WeeChat 4.2.2)
21:58:05 × raehik quits (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 268 seconds)
22:02:09 <EvanR> > 1.797e308
22:02:11 <lambdabot> 1.797e308
22:02:20 <EvanR> heh
22:05:39 <EvanR> > encodeFloat (2^52 - 1) (1024 - 52)
22:05:40 <lambdabot> 1.7976931348623155e308
22:06:43 <mauke> > succ 1e16 > 1e16
22:06:44 <lambdabot> False
22:08:10 × Tuplanolla quits (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Quit: Leaving.)
22:09:28 son0p joins (~ff@152.203.77.121)
22:09:33 mankanor joins (~mankanor@2001:4455:20b:1d00:2153:5fb:f743:bfa3)
22:09:34 × target_i quits (~target_i@user/target-i/x-6023099) (Quit: leaving)
22:10:28 × mankanor quits (~mankanor@2001:4455:20b:1d00:2153:5fb:f743:bfa3) (Read error: Connection reset by peer)
22:15:56 mikess joins (~mikess@user/mikess)
22:16:26 jmdaemon joins (~jmdaemon@user/jmdaemon)
22:17:13 Feuermagier joins (~Feuermagi@user/feuermagier)
22:22:47 × jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 264 seconds)
22:23:07 raehik joins (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net)
22:36:37 × philopsos quits (~caecilius@user/philopsos) (Ping timeout: 256 seconds)
23:08:11 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
23:15:56 Ryan86 joins (~Ryan@2601:602:8b00:b0f0:8dcb:b30d:2976:cb47)
23:16:08 <Ryan86> Hey all, was trying to get some help on a small project I've been using generic-lenses for. Mainly to understand a type signature: So I created a helper operator ?. for usage similar to Kotlins ?. for nested nullable access. So If I have a data structure like Foo { bar = Maybe (Baz { biz = Maybe Int } ) } I could do something like foo ^? bar ?.
23:16:08 <Ryan86> baz. I'm using the haskell language server in neovim, and the resulting type signature of the equation "lens1 ?. lens2 = lens1 . _Just . lens2" is "(?.) :: (Choice p, Applicative f) => (p (Maybe a1) (f (Maybe b)) -> c) -> (a2 -> p a1 (f b)) -> a2 -> c". I've been trying to parse this out for a while now so hopefully I can rewrite it using the Lens'
23:16:09 <Ryan86> and Prism' type aliases to make it a little easier to understand what's going on. Anybody have any experience with this?
23:19:40 <c_wraith> Ryan86: what's you're implementation? roughly like this? \x y -> x . _Just . y
23:20:13 <Ryan86> Yes exactly, what I have written is "lens1 ?. lens2 = lens1 . _Just . lens2"
23:20:27 <ncf> Ryan86: you could try something like ATraversal' a (Maybe b) -> ATraversal' b c -> Traversal' a c and complexify if needed
23:21:09 <Ryan86> Ah, so I should be using ATraversal' instead of Prism'. Let me plug that in.
23:21:14 <ncf> hmm that doesn't quite work
23:22:11 <ncf> just Traversal' works
23:26:31 <Ryan86> Ah looks like that's it. Any clue why Prism' a (Maybe b) -> Prism' b c -> Prism' a c wouldn't work the same?
23:27:51 <ncf> i mean that type checks, but you want to use it on non-Prisms
23:28:06 <ncf> like bar and baz
23:28:10 <c_wraith> Yeah, the problem is that it's asking too much from its arguments
23:29:15 <c_wraith> Also, you might want to modify the types to allow type-changing use.
23:30:14 <c_wraith> the definition allows type-changing, if you make the types a bit more general
23:31:29 <ncf> i can never remember what ATraversal & friends are for
23:31:39 <ncf> is it for when you don't have rank-2 types?
23:31:52 <c_wraith> They're for allowing you to accept a Traversal (or whatever) and use it with multiple types for f.
23:32:25 <ncf> isn't that like the opposite of what it does
23:32:32 <ncf> it specialises f to Bazaar
23:32:46 <ncf> or Baazar
23:32:53 <c_wraith> but then you have the various clone* functions to restore
23:33:17 <ncf> ok but what do you gain over just taking a Traversal?
23:33:56 <c_wraith> not using higher-rank types or a polymorphic wrapping type
23:34:17 <ncf> why wouldn't you want to use higher-rank types?
23:35:53 <c_wraith> some people are afraid of extensions.
23:36:01 <dolio> Inference, or putting them in containers.
23:36:13 mima joins (~mmh@aftr-62-216-211-22.dynamic.mnet-online.de)
23:38:25 <ncf> right, inference
23:38:51 × acidjnk_new quits (~acidjnk@p200300d6e714dc66380a62904c39c61d.dip0.t-ipconnect.de) (Ping timeout: 255 seconds)
23:40:55 <ncf> so to get the ATraversal version to work you could do cloneTraversal a . _Just . cloneTraversal b
23:40:58 <ncf> seems inefficien
23:40:59 <ncf> t
23:45:41 × kayvank quits (~user@52-119-115-185.PUBLIC.monkeybrains.net) (Ping timeout: 240 seconds)
23:45:52 <c_wraith> Honestly, I'd just do what lens itself does with a lot of these
23:46:04 szkl joins (uid110435@id-110435.uxbridge.irccloud.com)
23:46:20 × dolio quits (~dolio@130.44.134.54) (Quit: ZNC 1.8.2 - https://znc.in)
23:46:21 <c_wraith> Leave the checked type as the mess, then document it with "You can think of this as having this type" using the aliases
23:46:38 <ncf> yeah
23:46:41 <c_wraith> Then you don't need to worry about higher-rank types, because f scopes over the whole definition
23:48:15 phma_ joins (phma@2001:5b0:211f:3048:948d:80d2:e152:3a7b)
23:49:08 <c_wraith> well. it's in the type. declaration, not definition
23:49:53 dolio joins (~dolio@130.44.134.54)
23:50:32 × dolio quits (~dolio@130.44.134.54) (Client Quit)
23:50:44 × gmg quits (~user@user/gehmehgeh) (Quit: Leaving)
23:51:55 × phma quits (phma@2001:5b0:211f:3048:6a1a:6f68:3864:d84f) (Ping timeout: 255 seconds)
23:53:42 dolio joins (~dolio@130.44.134.54)
23:57:14 phma_ is now known as phma

All times are in UTC on 2024-05-10.