Home liberachat/#haskell: Logs Calendar

Logs on 2025-01-11 (liberachat/#haskell)

00:10:45 weary-traveler joins (~user@user/user363627)
00:12:02 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
00:16:13 saulosilva joins (~saulosilv@181.216.220.21)
00:16:16 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
00:16:49 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
00:23:16 × L29Ah quits (~L29Ah@wikipedia/L29Ah) (Read error: Connection timed out)
00:23:49 × sprotte24 quits (~sprotte24@p200300d16f053e002de39e6a7dd83ed5.dip0.t-ipconnect.de) (Quit: Leaving)
00:24:42 × JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: JuanDaugherty)
00:27:25 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
00:31:52 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
00:42:07 × supercode quits (~supercode@user/supercode) (Quit: Client closed)
00:42:48 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
00:43:52 <EvanR> "flops" to measure the efficiency of rational numbers
00:44:17 <EvanR> xD
00:44:54 <EvanR> one of these programming languages comes with rational number backed by ints instead of arbitrary precision
00:45:07 <EvanR> I guess this works about as well as "int" for representing integers
00:47:15 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
00:49:30 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
00:58:10 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
00:59:04 × saulosilva quits (~saulosilv@181.216.220.21) (Quit: Client closed)
01:02:40 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
01:07:08 saulosilva joins (~saulosilv@181.216.220.21)
01:07:26 × saulosilva quits (~saulosilv@181.216.220.21) (Client Quit)
01:13:33 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
01:18:03 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 244 seconds)
01:19:58 × weary-traveler quits (~user@user/user363627) (Remote host closed the connection)
01:22:39 weary-traveler joins (~user@user/user363627)
01:24:19 saulosilva joins (~saulosilv@181.216.220.21)
01:25:16 <saulosilva> Hello
01:28:55 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
01:33:13 <geekosaur> hi
01:35:40 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
01:35:40 housemate joins (~housemate@146.70.66.228)
01:38:31 × otto_s quits (~user@p5de2f8cc.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
01:39:54 otto_s joins (~user@p5de2fce5.dip0.t-ipconnect.de)
01:40:07 × saulosilva quits (~saulosilv@181.216.220.21) (Quit: Client closed)
01:46:58 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
01:48:44 × acidjnk quits (~acidjnk@p200300d6e7283f46ed3dd32d3de732cf.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
01:49:00 × avdb13 quits (~avdb13@2001-14ba-a0a9-f200--18c.rev.dnainternet.fi) (Ping timeout: 246 seconds)
01:50:20 × housemate quits (~housemate@146.70.66.228) (Remote host closed the connection)
01:50:52 housemate joins (~housemate@146.70.66.228)
01:51:26 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
01:52:56 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
01:56:11 × housemate quits (~housemate@146.70.66.228) (Ping timeout: 252 seconds)
01:56:25 housemate joins (~housemate@pa49-183-118-117.pa.vic.optusnet.com.au)
01:56:28 × housemate quits (~housemate@pa49-183-118-117.pa.vic.optusnet.com.au) (Read error: Connection reset by peer)
01:57:17 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
01:57:48 × j1n37 quits (~j1n37@user/j1n37) (Read error: Connection reset by peer)
02:01:03 j1n37 joins (~j1n37@user/j1n37)
02:03:42 housemate_ joins (~housemate@146.70.66.228)
02:03:58 × vanishingideal quits (~vanishing@user/vanishingideal) (Ping timeout: 272 seconds)
02:05:12 vanishingideal joins (~vanishing@user/vanishingideal)
02:12:42 × vanishingideal quits (~vanishing@user/vanishingideal) (Ping timeout: 276 seconds)
02:13:19 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
02:14:05 vanishingideal joins (~vanishing@user/vanishingideal)
02:18:33 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 276 seconds)
02:19:00 × Tuplanolla quits (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Quit: Leaving.)
02:19:58 × housemate_ quits (~housemate@146.70.66.228) (Quit: Nothing to see here. I wasn't there. I take IRC seriously. I do not work for any body DIRECTLY although I do represent BOT NET.)
02:21:15 euouae joins (~euouae@user/euouae)
02:28:40 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
02:31:49 dnerchm^ joins (~dnerchm@c-98-242-74-66.hsd1.ga.comcast.net)
02:33:36 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
02:33:47 Jeanne-Kamikaze joins (~Jeanne-Ka@142.147.89.228)
02:38:17 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 265 seconds)
02:44:27 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
02:45:16 × swistak quits (~swistak@185.21.216.141) (Ping timeout: 252 seconds)
02:47:27 × euouae quits (~euouae@user/euouae) (Remote host closed the connection)
02:48:51 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 246 seconds)
02:59:49 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
03:05:08 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
03:05:13 × nitrix quits (~nitrix@user/meow/nitrix) (Quit: ZNC 1.8.2 - https://znc.in)
03:06:16 nitrix joins (~nitrix@user/meow/nitrix)
03:16:00 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
03:19:48 swistak joins (~swistak@185.21.216.141)
03:22:42 × nitrix quits (~nitrix@user/meow/nitrix) (Quit: ZNC 1.8.2 - https://znc.in)
03:22:43 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
03:23:43 nitrix joins (~nitrix@user/meow/nitrix)
03:32:26 JuanDaugherty joins (~juan@user/JuanDaugherty)
03:32:45 orangeFlu joins (orangeFlu@gateway/vpn/protonvpn/orangeflu)
03:34:02 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
03:37:07 tnt2 joins (~Thunderbi@user/tnt1)
03:38:08 × tnt1 quits (~Thunderbi@user/tnt1) (Ping timeout: 252 seconds)
03:38:35 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 244 seconds)
03:38:50 ChanServ sets mode +o litharge
03:38:51 litharge sets mode -bo *!*@user/rongwey litharge
03:40:31 tnt1 joins (~Thunderbi@user/tnt1)
03:41:22 × tnt2 quits (~Thunderbi@user/tnt1) (Ping timeout: 252 seconds)
03:49:25 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
03:50:50 housemate joins (~housemate@146.70.66.228)
03:51:50 × TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Quit: So long and thanks for all the fish)
03:52:19 TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker)
03:54:04 × TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Excess Flood)
03:54:43 TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker)
03:57:14 × TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Excess Flood)
03:57:55 TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker)
03:58:13 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
04:05:16 aforemny_ joins (~aforemny@2001:9e8:6cc3:c600:66d6:598d:d25f:7909)
04:06:22 × aforemny quits (~aforemny@i59F4C56A.versanet.de) (Ping timeout: 252 seconds)
04:09:17 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
04:10:37 × TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Ping timeout: 244 seconds)
04:14:26 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 272 seconds)
04:14:42 TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker)
04:20:39 × ljdarj quits (~Thunderbi@user/ljdarj) (Ping timeout: 244 seconds)
04:24:40 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
04:29:06 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
04:33:48 × olivial quits (~benjaminl@user/benjaminl) (Read error: Connection reset by peer)
04:34:03 olivial joins (~benjaminl@user/benjaminl)
04:40:03 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
04:40:39 × Jeanne-Kamikaze quits (~Jeanne-Ka@142.147.89.228) (Quit: Leaving)
04:40:45 × machinedgod quits (~machinedg@d108-173-18-100.abhsia.telus.net) (Read error: Connection reset by peer)
04:41:01 machinedgod joins (~machinedg@d108-173-18-100.abhsia.telus.net)
04:44:12 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 244 seconds)
04:51:12 dysthesis joins (~dysthesis@user/dysthesis)
04:55:25 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
04:55:48 × JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: JuanDaugherty)
05:02:31 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 264 seconds)
05:07:21 × euphores quits (~SASL_euph@user/euphores) (Quit: Leaving.)
05:07:27 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
05:12:56 euphores joins (~SASL_euph@user/euphores)
05:13:27 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
05:17:47 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 244 seconds)
05:28:50 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
05:31:33 × Flow quits (~none@gentoo/developer/flow) (Ping timeout: 248 seconds)
05:33:09 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
05:37:14 Flow joins (~none@gentoo/developer/flow)
05:44:13 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
05:48:57 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
05:53:45 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
05:55:06 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
05:59:40 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
06:01:54 × Me-me quits (~me-me@user/me-me) (Remote host closed the connection)
06:04:32 Me-me joins (~me-me@user/me-me)
06:06:01 × tnt1 quits (~Thunderbi@user/tnt1) (Ping timeout: 252 seconds)
06:06:13 tnt1 joins (~Thunderbi@user/tnt1)
06:10:29 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
06:15:04 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
06:22:11 × housemate quits (~housemate@146.70.66.228) (Quit: Nothing to see here. I wasn't there. I take IRC seriously. I do not work for any body DIRECTLY although I do represent BOT NET.)
06:25:53 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
06:27:07 × dysthesis quits (~dysthesis@user/dysthesis) (Remote host closed the connection)
06:30:09 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
06:39:01 tnt2 joins (~Thunderbi@user/tnt1)
06:39:57 × tnt1 quits (~Thunderbi@user/tnt1) (Ping timeout: 265 seconds)
06:39:57 tnt2 is now known as tnt1
06:41:15 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
06:45:10 × dtman34 quits (~dtman34@2601:447:d080:1a3c:ea66:e6de:89d7:22da) (Ping timeout: 272 seconds)
06:48:14 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
06:53:21 takuan joins (~takuan@178-116-218-225.access.telenet.be)
06:56:06 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
07:00:40 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
07:00:45 JamesMowery439 joins (~JamesMowe@ip68-228-212-232.ph.ph.cox.net)
07:01:57 dtman34 joins (~dtman34@2601:447:d080:1a3c:b02a:8bb0:8f4f:58a0)
07:11:31 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
07:12:55 CiaoSen joins (~Jura@2a05:5800:2ef:f000:ca4b:d6ff:fec1:99da)
07:15:51 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
07:18:08 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
07:21:48 × rvalue quits (~rvalue@user/rvalue) (Ping timeout: 252 seconds)
07:26:53 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
07:31:20 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
07:33:18 lisbeths joins (uid135845@id-135845.lymington.irccloud.com)
07:33:24 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 246 seconds)
07:36:31 rvalue joins (~rvalue@user/rvalue)
07:40:18 × prasad quits (~Thunderbi@c-73-75-25-251.hsd1.in.comcast.net) (Ping timeout: 276 seconds)
07:42:15 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
07:45:38 × orangeFlu quits (orangeFlu@gateway/vpn/protonvpn/orangeflu) (Ping timeout: 252 seconds)
07:46:44 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
07:47:30 orangeFlu joins (~orangeFlu@240-100-179-143.ftth.glasoperator.nl)
07:57:07 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
08:00:00 × caconym quits (~caconym@user/caconym) (Quit: bye)
08:00:38 caconym joins (~caconym@user/caconym)
08:02:07 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds)
08:03:34 × machinedgod quits (~machinedg@d108-173-18-100.abhsia.telus.net) (Ping timeout: 265 seconds)
08:03:38 × weary-traveler quits (~user@user/user363627) (Remote host closed the connection)
08:04:14 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
08:12:29 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
08:19:22 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
08:26:28 ash3en joins (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207)
08:29:59 × tnt1 quits (~Thunderbi@user/tnt1) (Ping timeout: 252 seconds)
08:30:23 tnt1 joins (~Thunderbi@user/tnt1)
08:30:32 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
08:35:08 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
08:38:10 L29Ah joins (~L29Ah@wikipedia/L29Ah)
08:39:08 housemate joins (~housemate@146.70.66.228)
08:40:21 × rvalue quits (~rvalue@user/rvalue) (Ping timeout: 248 seconds)
08:41:27 × housemate quits (~housemate@146.70.66.228) (Max SendQ exceeded)
08:42:28 housemate joins (~housemate@146.70.66.228)
08:45:31 × dtman34 quits (~dtman34@2601:447:d080:1a3c:b02a:8bb0:8f4f:58a0) (Ping timeout: 252 seconds)
08:45:55 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
08:46:06 dtman34 joins (~dtman34@c-174-53-203-90.hsd1.mn.comcast.net)
08:46:57 mreh joins (~matthew@host86-146-25-121.range86-146.btcentralplus.com)
08:50:57 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
08:56:51 × housemate quits (~housemate@146.70.66.228) (Read error: Connection reset by peer)
08:57:44 housemate joins (~housemate@146.70.66.228)
08:58:07 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
08:58:46 × housemate quits (~housemate@146.70.66.228) (Remote host closed the connection)
08:59:10 rvalue joins (~rvalue@user/rvalue)
09:00:23 × ash3en quits (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Quit: ash3en)
09:02:41 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
09:06:54 target_i joins (~target_i@user/target-i/x-6023099)
09:11:48 × swistak quits (~swistak@185.21.216.141) (Ping timeout: 252 seconds)
09:13:30 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
09:14:54 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
09:16:33 × CiaoSen quits (~Jura@2a05:5800:2ef:f000:ca4b:d6ff:fec1:99da) (Ping timeout: 265 seconds)
09:18:01 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
09:28:54 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
09:30:11 × tzh quits (~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz)
09:31:43 × hueso quits (~root@user/hueso) (Quit: hueso)
09:33:26 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
09:33:39 hueso joins (~root@user/hueso)
09:44:17 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
09:45:15 swistak joins (~swistak@185.21.216.141)
09:49:15 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 244 seconds)
09:49:39 acidjnk joins (~acidjnk@p200300d6e7283f9048e4a8ec3d592563.dip0.t-ipconnect.de)
09:49:49 harveypwca joins (~harveypwc@2601:246:d080:b40:1889:d9bf:2dd8:b288)
09:52:46 × lisbeths quits (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
09:53:24 × harveypwca quits (~harveypwc@2601:246:d080:b40:1889:d9bf:2dd8:b288) (Remote host closed the connection)
09:59:07 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
10:00:55 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
10:10:12 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds)
10:21:01 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
10:25:30 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
10:26:31 harveypwca joins (~harveypwc@2601:246:d080:b40:1889:d9bf:2dd8:b288)
10:29:27 × acidjnk quits (~acidjnk@p200300d6e7283f9048e4a8ec3d592563.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
10:30:36 × vanishingideal quits (~vanishing@user/vanishingideal) (Ping timeout: 276 seconds)
10:30:56 Tuplanolla joins (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi)
10:32:04 vanishingideal joins (~vanishing@user/vanishingideal)
10:36:22 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
10:41:10 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
10:48:19 <kaol> I find <$>'s precedence awkward. I tend to write code like "f1 . f2 <$> g1 $ g2 x" which I'd expect to work like "f1 . f2 <$> g1 (g2 x)" and not "(f1 . f2 <$> g1) (g2 x)".
10:49:17 <kaol> I then write "fmap (f1 . f2) $ g1 $ g2 x" instead.
10:51:47 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
10:51:56 wootehfoot joins (~wootehfoo@user/wootehfoot)
10:53:46 CiaoSen joins (~Jura@2a05:5800:2ef:f000:ca4b:d6ff:fec1:99da)
10:54:59 <Rembane> kaol: Super legit, you can also write (fmap (f1 . f2) . g1 . g2) x
10:56:14 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 245 seconds)
11:08:42 × harveypwca quits (~harveypwc@2601:246:d080:b40:1889:d9bf:2dd8:b288) (Quit: Leaving)
11:09:19 <Leary> kaol: The purpose of `$` is to be application that's a greedy as possible, by having the least precedence. If you have other expectations then you're misusing it. `g1 (g2 x)` and `(g1 . g2) x` are both cleaner options anyway.
11:11:09 tnt2 joins (~Thunderbi@user/tnt1)
11:11:17 × tnt1 quits (~Thunderbi@user/tnt1) (Ping timeout: 248 seconds)
11:11:17 tnt2 is now known as tnt1
11:14:41 <kaol> <$> is so similar to $ even down to the $ and I've gathered it's intentional except that's one thing where it isn't.
11:15:58 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
11:17:28 × rachelambda8 quits (~rachelamb@cust-95-80-25-71.csbnet.se) (Quit: β reduced)
11:17:55 × tnt1 quits (~Thunderbi@user/tnt1) (Ping timeout: 252 seconds)
11:18:21 tnt1 joins (~Thunderbi@user/tnt1)
11:19:50 rachelambda8 joins (~rachelamb@cust-95-80-25-71.csbnet.se)
11:22:36 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 276 seconds)
11:31:35 × SlackCoder quits (~SlackCode@64-94-63-8.ip.weststar.net.ky) (Quit: Leaving)
11:32:56 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
11:37:41 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds)
11:42:15 <kaol> > let (€) = (*1.03) in (€) $ 1.0
11:42:16 <lambdabot> 1.03
11:43:20 ash3en joins (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207)
11:48:18 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
11:52:46 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
11:54:10 acidjnk joins (~acidjnk@p200300d6e7283f90c8dc7c78c19bd00e.dip0.t-ipconnect.de)
11:54:37 <[exa]> kaol: wasn't there a library that literally allowed you to write "5 eur"? (via the usual typeclass trickery)
11:56:08 <ncf> > let (€) = (*1.03) in (1.0 €)
11:56:10 <lambdabot> 1.03
11:59:26 ljdarj joins (~Thunderbi@user/ljdarj)
11:59:27 <tomsmeding> the € symbol is written prefix
11:59:52 <tomsmeding> too bad that won't work with the syntax :p
11:59:53 <[exa]> not everywhere :(
12:00:04 × caconym quits (~caconym@user/caconym) (Quit: bye)
12:00:24 AlexNoo_ joins (~AlexNoo@178.34.160.135)
12:00:28 <tomsmeding> TIL
12:00:51 <haskellbridge> <magic_rb> In slovakia its postfix yeah
12:01:06 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
12:01:34 <haskellbridge> <magic_rb> {-# LANGUAGE PrefixUnaryOperators #-} when
12:01:42 <ncf> isn't € suffixed in most places that actually use €
12:01:51 <tomsmeding> there aren't unary operators in the first place
12:01:53 caconym joins (~caconym@user/caconym)
12:02:01 <haskellbridge> <magic_rb> -10 is :)
12:02:14 <tomsmeding> ncf: apparently, and apparently NL is one of the few where it's written prefix
12:02:15 <haskellbridge> <magic_rb> So yea, first we need UnaryOperators
12:02:26 <tomsmeding> magic_rb: that one is built-in :p
12:02:34 <haskellbridge> <magic_rb> Ye ik :P
12:02:48 <tomsmeding> LexicalNegation is relevant
12:03:43 <haskellbridge> <magic_rb> Cant wait for (* 4 (+ 4 5)) to be valid haskell code
12:03:43 <kaol> I wrote it like that since I wanted to abuse $.
12:03:45 × AlexZenon quits (~alzenon@94.233.240.147) (Ping timeout: 252 seconds)
12:03:52 <kaol> Even more.
12:04:04 × AlexNoo quits (~AlexNoo@94.233.240.147) (Ping timeout: 252 seconds)
12:08:45 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 276 seconds)
12:12:39 AlexZenon joins (~alzenon@178.34.160.135)
12:14:28 housemate joins (~housemate@146.70.66.228)
12:18:16 mrmr155334346318 joins (~mrmr@user/mrmr)
12:19:08 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
12:19:12 × housemate quits (~housemate@146.70.66.228) (Read error: Connection reset by peer)
12:20:05 __monty__ joins (~toonn@user/toonn)
12:20:14 housemate joins (~housemate@146.70.66.228)
12:20:38 × swistak quits (~swistak@185.21.216.141) (Ping timeout: 244 seconds)
12:20:45 × housemate quits (~housemate@146.70.66.228) (Read error: Connection reset by peer)
12:21:29 housemate joins (~housemate@146.70.66.228)
12:24:20 × housemate quits (~housemate@146.70.66.228) (Client Quit)
12:24:49 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
12:27:22 pera joins (~pera@user/pera)
12:31:49 × ash3en quits (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Ping timeout: 248 seconds)
12:35:26 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
12:36:04 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
12:40:04 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
12:40:12 ash3en joins (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207)
12:41:43 FragByte_ joins (~christian@user/fragbyte)
12:42:06 × FragByte quits (~christian@user/fragbyte) (Ping timeout: 246 seconds)
12:42:06 FragByte_ is now known as FragByte
12:46:28 × ash3en quits (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Ping timeout: 244 seconds)
12:47:35 FragByte_ joins (~christian@user/fragbyte)
12:48:14 × smalltalkman quits (uid545680@id-545680.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
12:48:32 × FragByte quits (~christian@user/fragbyte) (Ping timeout: 244 seconds)
12:48:32 FragByte_ is now known as FragByte
12:50:49 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
12:51:22 × CiaoSen quits (~Jura@2a05:5800:2ef:f000:ca4b:d6ff:fec1:99da) (Ping timeout: 252 seconds)
12:55:49 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
13:02:06 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
13:03:31 supercode joins (~supercode@user/supercode)
13:06:29 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
13:07:09 swistak joins (~swistak@185.21.216.141)
13:11:25 jinsun_ joins (~jinsun@user/jinsun)
13:11:25 jinsun is now known as Guest6442
13:11:25 jinsun_ is now known as jinsun
13:14:28 <zero> > let (#) = succ in (6 #)
13:14:30 <lambdabot> 7
13:15:00 × Guest6442 quits (~jinsun@user/jinsun) (Ping timeout: 246 seconds)
13:17:29 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
13:18:47 <tomsmeding> % let (++) = succ in (6++)
13:18:47 <yahb2> 7
13:19:29 × FragByte quits (~christian@user/fragbyte) (Quit: Quit)
13:19:53 <[exa]> magic_rb: czechoslovak hi5
13:20:14 <zero> zm
13:20:57 <[exa]> zero: ok wow cool
13:21:19 FragByte joins (~christian@user/fragbyte)
13:24:09 × swistak quits (~swistak@185.21.216.141) (Ping timeout: 276 seconds)
13:26:45 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 276 seconds)
13:26:56 machinedgod joins (~machinedg@d108-173-18-100.abhsia.telus.net)
13:28:22 swistak joins (~swistak@185.21.216.141)
13:33:41 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
13:37:09 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
13:41:39 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
13:43:05 ash3en joins (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207)
13:43:07 × AlexZenon quits (~alzenon@178.34.160.135) (Ping timeout: 252 seconds)
13:43:56 × rvalue quits (~rvalue@user/rvalue) (Read error: Connection reset by peer)
13:44:33 rvalue joins (~rvalue@user/rvalue)
13:45:57 AlexZenon joins (~alzenon@178.34.160.135)
13:46:09 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Quit: Leaving)
13:52:31 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
13:59:13 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
13:59:44 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
14:05:30 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
14:14:20 AlexNoo_ is now known as AlexNoo
14:16:28 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
14:17:40 × aforemny_ quits (~aforemny@2001:9e8:6cc3:c600:66d6:598d:d25f:7909) (Ping timeout: 265 seconds)
14:23:28 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds)
14:23:28 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
14:28:48 gentauro joins (~gentauro@user/gentauro)
14:34:31 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
14:39:33 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 276 seconds)
14:42:55 wootehfoot joins (~wootehfoo@user/wootehfoot)
14:49:54 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
14:51:08 califax_ joins (~califax@user/califx)
14:51:12 × califax quits (~califax@user/califx) (Ping timeout: 264 seconds)
14:52:21 califax_ is now known as califax
14:53:42 prasad joins (~Thunderbi@c-73-75-25-251.hsd1.in.comcast.net)
14:54:08 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 245 seconds)
14:59:53 × Katarushisu quits (~Katarushi@finc-20-b2-v4wan-169598-cust1799.vm7.cable.virginm.net) (Read error: Connection reset by peer)
15:05:15 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
15:08:06 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
15:09:37 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
15:14:04 Katarushisu joins (~Katarushi@finc-20-b2-v4wan-169598-cust1799.vm7.cable.virginm.net)
15:17:07 × OftenFaded quits (~OftenFade@user/tisktisk) (Ping timeout: 244 seconds)
15:19:13 OftenFaded joins (~OftenFade@user/tisktisk)
15:19:56 × Katarushisu quits (~Katarushi@finc-20-b2-v4wan-169598-cust1799.vm7.cable.virginm.net) (Ping timeout: 252 seconds)
15:20:38 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
15:24:54 <mreh> trying to find some documentation on this bit of arrow syntax "proc ~pattern -> do" if anyone has a reference
15:25:04 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
15:26:12 <mreh> oh is it just a lazy pattern match?
15:26:39 <haskellbridge> <sm> So.. much.. syntax..
15:33:13 × supercode quits (~supercode@user/supercode) (Quit: Client closed)
15:33:37 <mreh> don't see them very often
15:36:00 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
15:37:03 Katarushisu joins (~Katarushi@finc-20-b2-v4wan-169598-cust1799.vm7.cable.virginm.net)
15:37:09 <juri_> is anyone else here a user of the 'repa' library?
15:37:27 <juri_> I don't have any questions yet, just looking for general opinions, as i wade in.
15:39:25 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
15:40:22 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 244 seconds)
15:44:31 <geekosaur> yeh, that's just a lazy pattern match, and indeed they're not used often. but when you need them, you really need them
15:45:18 <geekosaur> there are other ways to do it (they're syntax sugar for an irrefutable match and a later lambda) but the lazy pattern match syntax is so much cleaner
15:45:21 <mreh> This page was pretty clear https://wiki.haskell.org/Lazy_pattern_match
15:46:34 lisbeths joins (uid135845@id-135845.lymington.irccloud.com)
15:49:50 <mreh> I'm still not entirely clear how it applies to the arrow syntax though
15:50:05 <mreh> these arrows aren't functions
15:51:23 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
15:52:17 <mreh> e.g. https://github.com/tobbebex/GPipe-Core/blob/4f512f1ea6e6c32bbefaae1be38a68508337b1fa/GPipe-Core/src/Graphics/GPipe/Internal/Buffer.hs#L267
15:52:55 lxsameer joins (~lxsameer@Serene/lxsameer)
15:58:18 supercode joins (~supercode@user/supercode)
15:59:58 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
16:02:27 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
16:14:13 × machinedgod quits (~machinedg@d108-173-18-100.abhsia.telus.net) (Read error: Connection reset by peer)
16:17:31 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
16:21:00 machinedgod joins (~machinedg@d108-173-18-100.abhsia.telus.net)
16:22:01 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
16:23:04 <haskellbridge> <loonycyborg> What is the proper way to trigger TypeError from a type family? If I just try to return TypeError as a type ghc says that undecidable instances would be required.
16:26:00 <geekosaur> that's not wrong, it follows normal rules and kinda by definition doesn't actually solve any types, so by said normal rules would normally lead to an infinite loop in the typechecker (except that it catches that specifically and aborts)
16:27:03 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
16:29:09 Digitteknohippie joins (~user@user/digit)
16:29:14 michalz joins (~michalz@185.246.207.218)
16:30:14 <geekosaur> one could argue that the loop checker that gets disabled with `UndecidableInstances` should recognize `TypeError` but I wonder how much extra work that would be
16:30:35 × Digit quits (~user@user/digit) (Ping timeout: 265 seconds)
16:32:53 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
16:33:39 <haskellbridge> <loonycyborg> Are there more granular ways of enabling Undecidable instances than module-wide?
16:35:56 <geekosaur> no, and I suspect it would be problematic
16:35:58 <int-e> I don't think so. (It's essentially a syntactic check... there's no change to how type checking operates outside of checking instance heads.)
16:36:31 <haskellbridge> <loonycyborg> seems I can't fool it by attaching TypeError to Proxy or using it in Tagged
16:37:25 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 244 seconds)
16:39:59 <int-e> I personally never worry about enabling UndecidableInstances.
16:40:23 <kaol> Dr. Strangelove and
16:41:31 Digitteknohippie is now known as Digit
16:41:39 <int-e> It's really not so bad... the compiler can fail to terminate (in reasonable time!) for all sorts of reasons.
16:41:48 <int-e> There are no fireworks.
16:41:56 <monochrom> how I stopped worrying and love strange loops
16:43:00 <monochrom> no fireworks? wait til your computer overheats :)
16:43:24 <kaol> My experience with UndecidableInstances is that it can make code compile but it may paper over a design issue that will explode when you try to generalise the code more.
16:44:01 <kaol> Or rather, try to add more instances of whatever you make one first.
16:44:24 <int-e> odd
16:45:12 <int-e> The scary extensions start with OverlappingInstances (which is a slippery slope leading towards IncoherentInstances which is the actually scary one)
16:45:45 <kaol> It was a while ago, may have been some other IncomprehensibleExtension.
16:46:03 <hellwolf> Per instance declaration of undecidable/ambiguous instances seem a recurring question, and it has open issues tracking it I believe
16:46:04 <int-e> But I guess you can inadvertently make type checking expensive and UndecidableInstances makes that more likely.
16:46:37 <int-e> We have dedicated per-instance pragmas for overlapping instances.
16:46:42 <geekosaur> UndecidableInstances just says "don't exclude entirely valid programs because they can't be proven to terminate at type level"
16:47:04 <int-e> Which makes sense, since that actually affects type-checking for users of those instances.
16:47:18 <kaol> Sorry, I may not be adding anything to the discussion and it was very likely some other extension.
16:47:19 <int-e> So the finer granularity bears fruits.
16:47:27 <geekosaur> I think there are other limits to prevent things getting too out of hand? "let it loop" vs. "too many loops"
16:48:16 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
16:48:17 <hellwolf> that's UndecidableSuperClasses ?
16:48:56 <kaol> I mainly just write Haskell and add extensions when GHC tells me to. It seems weird but it works.
16:49:06 <geekosaur> that's anything that can lead to looping, from type level to Core-Core passes
16:50:12 <hellwolf> Though, at numerous times I could eventually eliminate the usage of UndecidableInstances; if it were used more freely, like what I do with ambiguous types, I might not pay the necessary attention to simplify things when there is opportunity of doing so.
16:50:57 <hellwolf> that's why I would hope there is per instance declaration for them, that makes it more tamed.
16:51:15 <hellwolf> I could be irrational though, as people pointing out that it should not be feared as much.
16:52:42 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
16:55:19 <int-e> It certainly could be a per class thing but I don't think the demand for that is high. The extension is mostly harmless.
16:56:32 rynite joins (~bwkam@user/rynite)
16:57:27 <hellwolf> As this discussion usually lead to, that assessment of "harmless" is very inaccessible to all walks of Haskellers. I don't think it would be surprising that many are deterred by such an extension, and some might still think it's dangerous.
16:58:06 <hellwolf> So, works still needed to clarify this. But we are repeating here... each time this topic brought up, it is the same dicussion :)
16:58:54 <int-e> https://en.wikipedia.org/wiki/Phrases_from_The_Hitchhiker%27s_Guide_to_the_Galaxy#Mostly_Harmless
17:00:53 <monochrom> IMO the conflicting experiences are due to conflicting understandings of, for example, what "instance Ord a => Eq a" means. One of the two understandings, the more popular one, is wrong, and it also leads you to misuse UndecidableInstances, and it still won't do what you think.
17:00:54 <int-e> hellwolf: Literally the only thing that UndecidableInstances does is turn off the "The constraint ... is no smaller than the instance head ..." error.
17:01:28 <hellwolf> I sorta understand. But not everyone is off type theory background to understand its implication...
17:01:56 <monochrom> Whereas if you have the correct understanding, then you will find that, e.g., Data Types a la Carte needs UndecidableInstances and it is a correct use.
17:03:06 <c_wraith> There are a lot of shapes of recursive data type that just need UndecidableInstances to write *any* instance for.
17:03:17 <hellwolf> I think maybe we could even move it to a GHC warning, and GHC warning can be turned off per definition iirc.
17:03:22 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
17:03:36 <int-e> Which is a check that I guess will save some beginners from doing certain stupid things. But in practice the implemented termination check is woefully naive and excludes a lot of instances where type checking terminates just fine.
17:04:25 <int-e> Also accidental compile-time non-termination is far less scary than accidental runtime non-termination.
17:08:01 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
17:10:33 × machinedgod quits (~machinedg@d108-173-18-100.abhsia.telus.net) (Ping timeout: 246 seconds)
17:17:34 × acidjnk quits (~acidjnk@p200300d6e7283f90c8dc7c78c19bd00e.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
17:18:45 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
17:23:34 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 272 seconds)
17:24:00 × sim590 quits (~simon@24-122-69-233.resi.cgocable.ca) (Ping timeout: 276 seconds)
17:25:52 acidjnk joins (~acidjnk@p200300d6e7283f90c8dc7c78c19bd00e.dip0.t-ipconnect.de)
17:26:46 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
17:30:12 × gmg quits (~user@user/gehmehgeh) (Ping timeout: 264 seconds)
17:30:40 econo_ joins (uid147250@id-147250.tinside.irccloud.com)
17:32:06 gmg joins (~user@user/gehmehgeh)
17:34:08 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
17:34:59 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
17:38:14 × rynite quits (~bwkam@user/rynite) (Quit: WeeChat 4.4.1)
17:41:09 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds)
17:46:16 <haskellbridge> <Jade> hellwolf @irc_libera.chat_hellwolf:kf8nh.com: we don't have scoped warning enable/disable yet, there's a ticket which has been open for quite some time
17:50:13 <bailsman> I have a record full of IORefs and IOVectors. I would like to make a function that can make a frozen copy of it - having essentially the same type but all the IORefs replaced by the underlying and all the IOVectors replaced by frozen vectors. Is this something I can do with generics? Write "deriving freezable" or something like this and get a freeze that works on any such mutable record? Is this
17:50:14 <bailsman> an insane thing to want? (I'm discouraged by the fact that it does not seem to already exist)
17:52:11 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
17:57:54 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
17:58:54 <hellwolf> Jade: good to know!
17:59:18 <hellwolf> bailsman: code smells. just an instinct. others may have a better picture what's going on for you.
18:04:21 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
18:04:26 <bailsman> hellwolf: I'm not sure what you mean. Are you agreeing with me that it seems like it's an insane thing to want?
18:05:16 <hellwolf> a little. would you clarify what does "freeze" mean in your context?
18:08:58 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
18:11:34 <bailsman> turn IORef a into a, and IOVector a into Vector a. BTW, google has now taught me the word "type family"
18:12:04 geekosaur thinks this sounds just a bit like zonking. is something ghc's typechecker does a code smell? 😛
18:14:17 <bailsman> I want to automatically (recursively) freeze all the fields of my record without writing any boilerplate. Primarily because I want to then serialize it to JSON.
18:15:03 <bailsman> It feels like it shouldn't be too difficult to make this work generically in principle, but the fact that there doesn't already exist a function that does this make me pause.
18:15:29 <geekosaur> tbh if that's all you're doing, I wouldn't bother freezing first. if you plan to do other things with it afterward then maybe it's worthwhile
18:15:47 <haskellbridge> <magic_rb> Its definitely possible, easy to do? No
18:16:11 <geekosaur> (the cost of doing the replacements would be higher than the cost of traversing the non-frozen version to make JSON)
18:16:12 <bailsman> Huh? but I can't directly serialize a io vector. For one thing, it requires IO to read, no?
18:16:49 <bailsman> I thought I was going to need to freeze it to be able to make it serializable
18:16:49 <geekosaur> or use unsafeIOtoST 🙂
18:17:17 <bailsman> ...I see. Why is that unsafe? Or is that perfectly safe.
18:17:26 <geekosaur> well, I am assuming you're not going to use an autogenerated serialization. but again the question comes down to, which one costs more?
18:17:34 <geekosaur> it's usually perfectly safe
18:17:35 notzmv joins (~umar@user/notzmv)
18:17:50 <bailsman> I was hoping I'd just write one "deriving" thing and the rest would magically work
18:17:54 <geekosaur> there are ways to get unsafeCoerce from it, but most things are fine
18:18:02 <bailsman> instead of writing a custom ToJSON instance or something
18:18:41 <bailsman> A vector is just a list after all. And there are already ToJSON instances for vectors.
18:18:51 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
18:18:54 <geekosaur> okay, the problem is you'll be going through not one but two Generic-based traversals, and Generics is pretty expensive (it's optimized for generation by the compiler, at the cost of lousy runtime performance)
18:19:30 <bailsman> Yes, exactly. I'm terrified about compile times (template haskell makes compilation take like tens of seconds longer) and I don't care at all about how fast this is at runtime, it's mostly a debugging thing that will run maybe once.
18:19:35 <geekosaur> one for your removal of IO, the other for the ToJSON instance which is probably via Generics unless you're writing it by hand
18:21:05 <bailsman> I'm using generics for everything already. To make my records storable, and whenever I access record fields, for example. I didn't know it was slow at runtime. Oops. (I hadn't noticed yet, so I guess its good enough)
18:21:14 <bailsman> Generating lenses with template haskell just completely destroys my compilation speeds
18:21:50 <geekosaur> mm. my take on that is that I usually compile a few times and run many times, so runtime performance matters to me more
18:22:05 <geekosaur> but I'm from the 80s, you kids think a few extra seconds is slow 🙂
18:22:19 <bailsman> yes waiting 10 seconds for it to compile is unacceptable, waiting an extra nanosecond at runtime is fine
18:22:25 <bailsman> Someone should make generics fast btw, they're very useful
18:22:39 <geekosaur> they did, you just don't get them from ghc
18:23:29 <bailsman> Why isn't it a zero cost abstraction? What acceptable happens if I use generics everywhere?
18:23:33 <bailsman> actually*
18:23:41 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds)
18:23:59 <bailsman> Right now I'm having generics generate "setField" and "getField" for me so I can use overloadedrecordupdate
18:24:05 <bailsman> so basically whenever I update a field I'm going through generics
18:24:27 <haskellbridge> <magic_rb> geekosaur its not just you, im 20 and i dont think 20 seconds to compile is that bad. Gives me time to take a break, relax, plan my next move
18:24:54 <geekosaur> uniplate, syb, generics-sop
18:25:01 <bailsman> Programmeer feedback loops should be measured in milliseconds, not seconds. 20 seconds to compile is completely unacceptable.
18:25:20 <geekosaur> yeh, but my context is expecting 5 minutes to compile, what's 20 seconds?
18:25:34 <bailsman> You're probably using template haskell :P
18:25:53 <haskellbridge> <maerwald> bailsman: Well, one can dream
18:26:05 <haskellbridge> <magic_rb> I cant even comprehend i compiled within 20 miliseconds :) let alone figure out what to do next
18:27:27 <geekosaur> sop offers TH support but I think doesn't depend on it
18:27:43 <bailsman> Anyway what's the actual runtime cost of GHC.Generics? How does it work? Is this documented anywhere? I was overjoyed that it all just worked automatically as soon as I imported generic-lens and started putting deriving Generic on all my records.
18:28:17 <geekosaur> although I guess if you want automated deriving of instances it's TH, GHC.Gnenerics, or compiler plugins (not that I know any implementations that use the latter)
18:28:40 <geekosaur> GHC.Generics is documented in its haddock
18:29:10 <bailsman> It describes how to use it, not how expensive it is to use at runtime
18:29:16 <bailsman> I thought it all happened at compile time BTW
18:29:35 tzh joins (~tzh@c-76-115-131-146.hsd1.or.comcast.net)
18:30:29 <geekosaur> compile time creates the data structures representing the structure of a value, runtime traverses them to actually do things with those values (such as serialize to JSON)
18:31:16 <bailsman> but why isn't this "as if" i manually defined those derived instances? Isn't the compiler perfectly capable of optimizing the original out?
18:31:29 <geekosaur> the compiler does not generate the serialize-to-JSON code, a default typeclass method for the ToJSON typeclass implements that at runtime
18:32:34 <bailsman> And the same happens to getField and setField? Those go and figure out the actual field to use at runtime based on the generic representation of my type? And this doesn't get inlined and optimized away?
18:32:36 <geekosaur> it's not, no. generation of the Generic representation of a type is entirely separate from consumption and may be spread over both space and time
18:33:10 × _73 quits (~user@pool-173-76-100-193.bstnma.fios.verizon.net) (Ping timeout: 252 seconds)
18:33:18 <geekosaur> (the same Gneric rep is used for anything that consumes a Generic instance for whatever reason; that "whatever reason" is typically per typeclass)
18:33:41 <bailsman> I can kind of see why toJSON wouldn't work. Because it's probably too clever to optimize out
18:33:47 <bailsman> but getField and setField I would have expected to be zero cost
18:34:37 <geekosaur> my understanding, as I said earlier, is that generation and consumption of Generic representations are too separated to be optimized
18:35:18 <bailsman> In theory you could annotate them right? With the actual original type? Although it would require you to add a special optimization pass for generics.
18:35:53 <geekosaur> on the one hand, enough people don't care that GHC.Generics is still widely used; on the other, enough people do care that SYB, Uniplate, generics-sop, and another that I'm not finding quickly and never remember the name of are also widely used
18:36:10 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
18:36:17 <probie> If you want to know about the performance penalty (if any), you might be able to answer the question by making GHC to spit out the core and seeing what it looks like
18:36:46 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
18:37:10 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds)
18:37:33 × lisbeths quits (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
18:38:11 <geekosaur> (SYB predates GHC generics and is still going strong)
18:38:30 <bailsman> Back when I was profiling this, using Generic, derive-storable and storable vectors was like 100x faster than either normal Haskell lists (pure) or boxed mutable vectors. Although that was kind of a micro benchmark and my code has grown somewhat. Haven't checked if it still holds now. I also didn't study the core output in detail.
18:39:08 Lord_of_Life_ is now known as Lord_of_Life
18:40:33 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
18:40:49 × pera quits (~pera@user/pera) (Ping timeout: 248 seconds)
18:40:53 rekahsoft joins (~rekahsoft@70.51.99.237)
18:41:25 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 244 seconds)
18:42:32 pera joins (~pera@user/pera)
18:42:38 × pera quits (~pera@user/pera) (Client Quit)
18:43:32 <bailsman> Correction, only 10x
18:44:02 <bailsman> well, 10x faster than pure lists, 50x faster than boxed mutable vectors (unspecialized)
18:44:42 × swistak quits (~swistak@185.21.216.141) (Ping timeout: 246 seconds)
18:44:49 <geekosaur> doesn't take much to be faster than lists
18:45:06 <bailsman> I don't understand, if it's going through some generic indirection, I'd expect that to be about as slow as boxed vectors. I thought what made those slow was the indirection
18:45:09 <geekosaur> consecutive memory locations are always going to be faster than lots of pointer chasing
18:45:19 <bailsman> But why doesn't the generic layer cause pointer chasing?
18:45:28 cheater_ joins (~Username@user/cheater)
18:45:29 <bailsman> If it's runtime as you say
18:45:41 <geekosaur> you said storable vectors
18:45:56 <geekosaur> there's no reason to chase pointers in that case, all elements are laid out next to each other
18:45:59 <bailsman> made storable with "instance GStorable myrecord"
18:46:07 <bailsman> in one line
18:46:36 swistak joins (~swistak@185.21.216.141)
18:46:38 <geekosaur> I, uh, think we're not communicating
18:46:46 <geekosaur> I thought I explained that already
18:46:49 stef204 joins (~stef204@user/stef204)
18:46:58 <bailsman> no you're communicating, I'm just missing a lot of stuff because I'm new
18:47:46 × cheater quits (~Username@user/cheater) (Ping timeout: 252 seconds)
18:47:53 cheater_ is now known as cheater
18:48:05 <geekosaur> in the case of lists vs. GStorable: you convert once, you do possibly many accesses afterward. if you go directly via pure lists you're dereferencing pointers to values, then pointers to the next list cell, then pointer to its value, etc.
18:48:30 <geekosaur> but the result of GStorable is everything next to each other.
18:49:33 <geekosaur> this may end up being equal cost, if there's a single iteration, because making the `Storable` does the same list traversal unless you were starting from a vector to begin with (in which case there is no point in comparing these because vectors will always beat lists)
18:49:41 <bailsman> OK I think I get it. What is going through the generic layer is "how do I lay this out in memory?" but the data access does not go through that layer in this case.
18:49:54 <geekosaur> right
18:50:38 <bailsman> but if I use a generically derived "setField" it would go indirect? (let me try to figure out how to dump the core output for such a field access)
18:51:12 <geekosaur> setField I'm not sure of. if it's only done once instead of once per use it probably ends up being a win depending on how often it's used
18:51:21 <geekosaur> (creation cost is amortized over the uses)
18:51:59 <geekosaur> if it has to "re-derive" the setField at runtime for every use, you could be very unhappy. I haven't delved into generics deeply enough to know how smart that part is
18:52:08 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
18:52:14 <geekosaur> (most of my programming doesn't benefot from generics_
18:52:18 <geekosaur> )
18:52:44 <geekosaur> but from what I know of ghc generics I think if I needed them I'd eat the cost of TH and use generics-sop instead
18:53:22 <geekosaur> maybe if it really mattered I'd consider writing a compiler plugin to replace the TH, I think you can add new "default deriving" mechanisms that way
18:53:28 <c_wraith> ghc generics are something I've still never learned the how or why of.
18:53:35 <geekosaur> `deriving stock` that is
18:54:00 <bailsman> Anyway my experience with generics has been very positive. generic-lens, derive-storable etc, its one line and it just works TM. That's why I figured maybe I can make my data types serializable in one line too
18:54:02 <c_wraith> It turns out you can just ignore generics for nearly everything you do!
18:54:42 <bailsman> And the best part is it still compiles instantly, unlike template haskell, which is an abomination that should be scoured from the earth.
18:54:57 <c_wraith> template haskell is a lot faster than it used to be in the 8.x and earlier days
18:55:06 <geekosaur> I know the why, I just don't need them. I looked into how they work only because someone at one point tossed out the thing about GHC generics being a lousy implementation of sums-of-products
18:55:08 <bailsman> It literally goes from compiling instantly to taking 20+ seconds every time.
18:55:19 <c_wraith> ... yeah, TH isn't that slow anymore
18:55:25 <c_wraith> it definitely used to be
18:55:31 <bailsman> What do you mean anymore?
18:55:35 <bailsman> that's with GHC 9.13
18:55:40 <geekosaur> I'm afraid to ask what you're doing that takes 20 seconds
18:55:49 <bailsman> Just deriving lenses
18:55:53 <c_wraith> I mean they fixed the "starting an interpreter takes 10 seconds of flat overhead" thing.
18:56:08 <c_wraith> Oh, I'd never derive lenses. Just write them by hand. They're like 2 lines each.
18:56:37 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
18:56:40 <bailsman> I'm not using lenses anymore either. I like overloadedrecordupdate better
18:56:44 <EvanR> python script to write all your lenses for you xD
18:56:46 <bailsman> but that still requires generics
18:59:03 × ljdarj quits (~Thunderbi@user/ljdarj) (Ping timeout: 246 seconds)
18:59:28 pavonia joins (~user@user/siracusa)
19:05:22 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
19:05:33 ljdarj joins (~Thunderbi@user/ljdarj)
19:06:10 × acidjnk quits (~acidjnk@p200300d6e7283f90c8dc7c78c19bd00e.dip0.t-ipconnect.de) (Ping timeout: 272 seconds)
19:06:27 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
19:06:51 <monochrom> The GHC.Generics route has a linear-time runtime cost (to and from clones your input), whereas the TH route generates direct code that skips that. To be sure, I am lazy so I just use the generics route and not care about performance. :)
19:08:10 <monochrom> If someone else has already written the TH version, of course you can just use it and do nothing. But if no one has written either version and you have to write one yourself, the generics route is easier to write.
19:10:35 <EvanR> haskell script to generate haskell
19:10:43 <bailsman> OK I checked -ddump-simpl output, comparing -O0 and -O2. In -O0, there is "setField" all over the place. In -O2, there's no setField calls anywhere. Can I conclude these are actually getting optimized out, despite being generic?
19:10:56 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
19:11:02 sprotte24 joins (~sprotte24@p200300d16f109200d837c3a3f02cbb16.dip0.t-ipconnect.de)
19:11:32 <haskellbridge> <Bowuigi> They might be inlined but still there
19:12:02 <haskellbridge> <Bowuigi> Check for calls to the generic methods instead
19:12:07 <c_wraith> why not -O1? that's the most relevant level
19:12:08 <monochrom> Yeah the -O0 code is also suspiciously much shorter. >:)
19:12:46 <c_wraith> (most code is compiled at -O1, as it's the default and hackage even warns you about uploading -O2)
19:12:53 <monochrom> And yeah, actually ghc : 1 : 2 :: gcc : 2 : 3
19:13:35 <bailsman> BEcause when I did my microbenchmarks with the storable vectors -O2 was much much faster, I believe because it was specializing better
19:13:48 <bailsman> I don't actually really know what the difference is.
19:14:37 <monochrom> OK vector is one of the few exceptions where O2 is necessary.
19:16:11 <monochrom> I haven't seen an example, but it is said that O2 can be slower than O1 for some code, hence I analogize it to gcc's O3.
19:16:33 <bailsman> so far as I can understand - I'm not an expert in reading the simpl output - it has entirely optimized out my setfield calls to just creating a new record passing in values from the original values by direct field access and/or the values that I passed in, which seems optimal. No mention of generic anything.
19:17:11 <haskellbridge> <Bowuigi> Interesting, GHC is actually very smart
19:19:41 <monochrom> My favourite example is https://mail.haskell.org/pipermail/haskell-cafe/2013-April/107775.html and it's already last decade. Imagine what it can do today. :)
19:20:45 acidjnk joins (~acidjnk@p200300d6e7283f90c8dc7c78c19bd00e.dip0.t-ipconnect.de)
19:20:49 <darkling> Needle nardle noo.
19:21:40 <monochrom> There is a fairly general scheme where if you have "case m of Just z -> ... case m of Just z again -> ..." the 2nd conditional branching can be eliminated.
19:21:56 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
19:22:37 <monochrom> And there is also one where if you have "case (case y of x:_ -> Just x) of Just z -> foo" the middle Just can also be eliminated.
19:23:31 <monochrom> The vector library's stream fusion actually relies on that fundamentally.
19:24:47 <c_wraith> lens also depends on case-of-case to be efficient without tons of rewrite rules.
19:25:43 <c_wraith> (when both the lens and the operation are statically known)
19:26:18 Sgeo joins (~Sgeo@user/sgeo)
19:26:19 × swistak quits (~swistak@185.21.216.141) (Ping timeout: 252 seconds)
19:26:39 <monochrom> And my favourite example linked above, some of you asked "why doesn't GHC take one step further and just generate 'eval = fval'?" Guess what, these days it does! :)
19:27:30 <c_wraith> the recent optimizations doing join point analysis really help out with specific types of code, too.
19:27:43 <monochrom> Yeah that too.
19:28:54 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
19:31:05 × lxsameer quits (~lxsameer@Serene/lxsameer) (Ping timeout: 252 seconds)
19:32:02 machinedgod joins (~machinedg@d108-173-18-100.abhsia.telus.net)
19:34:58 tnt2 joins (~Thunderbi@user/tnt1)
19:35:30 × tnt1 quits (~Thunderbi@user/tnt1) (Ping timeout: 252 seconds)
19:38:23 tnt1 joins (~Thunderbi@user/tnt1)
19:39:32 × tnt2 quits (~Thunderbi@user/tnt1) (Ping timeout: 252 seconds)
19:39:57 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
19:42:32 tnt2 joins (~Thunderbi@user/tnt1)
19:43:06 × tnt1 quits (~Thunderbi@user/tnt1) (Ping timeout: 276 seconds)
19:43:06 tnt2 is now known as tnt1
19:44:18 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
19:46:42 tnt2 joins (~Thunderbi@user/tnt1)
19:48:18 × tnt1 quits (~Thunderbi@user/tnt1) (Ping timeout: 276 seconds)
19:49:55 × target_i quits (~target_i@user/target-i/x-6023099) (Ping timeout: 264 seconds)
19:50:01 swistak joins (~swistak@185.21.216.141)
19:50:12 tnt1 joins (~Thunderbi@user/tnt1)
19:50:57 × tnt2 quits (~Thunderbi@user/tnt1) (Ping timeout: 244 seconds)
19:55:20 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
19:59:44 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 244 seconds)
20:00:04 × caconym quits (~caconym@user/caconym) (Quit: bye)
20:00:43 caconym joins (~caconym@user/caconym)
20:00:52 acidjnk_new joins (~acidjnk@p200300d6e7283f9009bc3096dfcfc887.dip0.t-ipconnect.de)
20:01:10 × acidjnk quits (~acidjnk@p200300d6e7283f90c8dc7c78c19bd00e.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
20:02:42 × hgolden quits (~hgolden@2603:8000:9d00:3ed1:6ff3:8389:b901:6363) (Remote host closed the connection)
20:05:33 × tnt1 quits (~Thunderbi@user/tnt1) (Ping timeout: 252 seconds)
20:06:04 tnt1 joins (~Thunderbi@user/tnt1)
20:06:22 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
20:11:01 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
20:11:11 __monty__ joins (~toonn@user/toonn)
20:11:38 alecs joins (~alecs@61.pool85-58-154.dynamic.orange.es)
20:11:40 hgolden joins (~hgolden@2603:8000:9d00:3ed1:6ff3:8389:b901:6363)
20:14:21 × swistak quits (~swistak@185.21.216.141) (Ping timeout: 252 seconds)
20:16:46 swistak joins (~swistak@185.21.216.141)
20:19:01 × alecs quits (~alecs@61.pool85-58-154.dynamic.orange.es) (Ping timeout: 248 seconds)
20:20:29 × swistak quits (~swistak@185.21.216.141) (Remote host closed the connection)
20:21:44 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
20:25:31 target_i joins (~target_i@user/target-i/x-6023099)
20:26:39 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
20:29:41 × jinsun quits (~jinsun@user/jinsun) (Read error: Connection reset by peer)
20:35:37 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
20:37:06 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
20:38:03 × target_i quits (~target_i@user/target-i/x-6023099) (Ping timeout: 265 seconds)
20:39:10 × supercode quits (~supercode@user/supercode) (Ping timeout: 240 seconds)
20:39:23 supercode joins (~supercode@user/supercode)
20:40:48 Everything joins (~Everythin@195.138.86.118)
20:41:35 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 244 seconds)
20:43:13 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
20:45:05 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
20:46:23 weary-traveler joins (~user@user/user363627)
20:52:31 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
20:53:26 target_i joins (~target_i@user/target-i/x-6023099)
20:57:12 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 276 seconds)
20:58:39 <ash3en> is this a case where dependent types would shine? https://paste.tomsmeding.com/ZYCCmjse
21:00:02 <ash3en> It looks so inviting to give the type as a function parameter
21:00:32 <ash3en> ah, or just type parameter 'a' lol
21:01:11 × petrichor quits (~znc-user@user/petrichor) (Quit: ZNC 1.8.2 - https://znc.in)
21:02:38 <ash3en> or not. i don't know for sure but don't want to ask gpt or similar
21:02:56 petrichor joins (~znc-user@user/petrichor)
21:04:42 <geekosaur> that's not really a dependent type as I read it. higher order function, I think?
21:05:41 <EvanR> yes sort of like the binary operator parser combinator that takes a binary function to apply to the two operands
21:05:50 <EvanR> as a value, not a type
21:06:21 <geekosaur> it could be even simpler but you need to apply more than just the constructor sometimes (e.g. Integer)
21:07:21 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
21:08:19 <ash3en> i'm still not sure how i'd make a single function out of these.
21:11:09 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
21:11:34 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
21:11:34 <geekosaur> you can make one "master function" with wrappers for the specific uses, unless you want to pass the extra HOF at use sites. you pass a function (Text -> <whatever type rtToken is>)
21:12:19 <geekosaur> so tokenizeAddressPattern becomes tokenize AddrPattern, tokenizeInt becomes tokenize (Integer . read . BS.unpack), etc.
21:13:04 × chiselfuse quits (~chiselfus@user/chiselfuse) (Remote host closed the connection)
21:14:07 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
21:14:45 chiselfuse joins (~chiselfus@user/chiselfuse)
21:14:51 <ash3en> this probably won't work, but im not sure, since the functions are called using Alex like this:
21:14:54 <ash3en> @id = ($alpha | \_) ($alpha | $digit | \_ | \' | \?)*
21:15:02 <ash3en> <0> @id { tokenizeString }
21:16:17 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
21:16:38 <geekosaur> why wouldn't that work?
21:16:47 chexum joins (~quassel@gateway/tor-sasl/chexum)
21:17:14 × gmg quits (~user@user/gehmehgeh) (Remote host closed the connection)
21:17:58 gmg joins (~user@user/gehmehgeh)
21:17:58 <geekosaur> you can put any Haskell code inside the braces, and as long as the type of rtToken is available (since it's generating a normal Haskell source file and not using TH, it will be) you can use it
21:18:29 <ncf> monochrom: i'm still curious. how do you prove the obvious free theorem for forall a b. b -> ((a -> a) -> b) -> b ?
21:20:12 <ash3en> i think i get it now and i will try it out
21:20:33 <ash3en> geekosaur: thank you!
21:25:24 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
21:29:29 philopsos joins (~caecilius@user/philopsos)
21:29:38 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 244 seconds)
21:30:37 × supercode quits (~supercode@user/supercode) (Quit: Client closed)
21:32:30 <tomsmeding> is there a shorter way to write (\case [] -> True ; x:xs -> all (== x) xs)
21:32:39 <tomsmeding> i.e. "allEqual"
21:37:29 <ash3en> geekosaur: this is what i did now. does it look good to you? https://paste.tomsmeding.com/WfD77OU3
21:38:14 <probie> :t and . (zipWith (==) <*> tail)
21:38:15 <lambdabot> Eq a => [a] -> Bool
21:38:28 <ash3en> tomsmeding: i am not aware of something off the top of my hat
21:39:18 tomsmeding . o O ( (<*>) = S = \f g x -> f x (g x) )
21:39:24 <tomsmeding> ah yes I can read that
21:39:41 <probie> You didn't specify that you wanted it to be readable
21:39:43 <tomsmeding> > (and . (zipWith (==) <*> tail)) []
21:39:44 <lambdabot> True
21:39:58 <tomsmeding> oh the zipWith saves you here, cute
21:40:02 <tomsmeding> probie: I did not
21:40:41 <tomsmeding> the tail blows up but the zipWith doesn't evaluate the tail on []
21:40:46 <geekosaur> ash3en, that works. I think you should also be able to write tokenizeNumber in terms of tokenizeString though
21:40:47 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
21:41:32 <tomsmeding> I think I'm going to stay with a helper function. :)
21:42:03 <ash3en> geekosaur: yes, thank you. i will keep it like this for now and maybe put them into a single function later on : )
21:43:13 <geekosaur> you'll get used to HOFs eventually 🙂
21:45:18 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
21:45:23 <ash3en> i did use them in the past already, but I often am too afraid to use anti-patterns I am not aware of
21:46:27 <geekosaur> ("anti-pattern"?)
21:53:25 × rekahsoft quits (~rekahsoft@70.51.99.237) (Remote host closed the connection)
21:53:58 <c_wraith> there are anti-patterns in Haskell. Things like the existential typeclass pattern, which laziness turns out to be a much simpler solution to in nearly every case.
21:54:34 <c_wraith> But it's rare that factoring something in terms of higher-order functions turns out to be a negative.
21:56:10 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
22:00:54 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 276 seconds)
22:01:12 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
22:01:35 tnt2 joins (~Thunderbi@user/tnt1)
22:02:32 × tnt1 quits (~Thunderbi@user/tnt1) (Ping timeout: 252 seconds)
22:02:32 tnt2 is now known as tnt1
22:03:16 <ash3en> maybe anti-pattern is not the best term
22:03:35 <ash3en> more like non-idiomatic, too complicated, verbose code
22:04:41 <c_wraith> Ah, that's much more common. But there's only one way out of that. Write code, ask for feedback, try out alternatives, develop your tastes.
22:04:49 <c_wraith> Same as every other language, really.
22:06:39 <geekosaur> it's very idiomatic in Haskell
22:07:39 <geekosaur> I mean, `map`, pretty much everything in Foldable and Traversable, `interact` (which used to be the first thing you did in ghci), lots of things in Haskell use HOFs
22:07:54 <geekosaur> it is very much a pattern in functional languages, and a very important one
22:11:02 × michalz quits (~michalz@185.246.207.218) (Remote host closed the connection)
22:11:34 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
22:13:57 × target_i quits (~target_i@user/target-i/x-6023099) (Quit: leaving)
22:15:36 × ash3en quits (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Quit: ash3en)
22:16:13 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
22:16:32 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
22:26:25 × Raito_Bezarius quits (~Raito@wireguard/tunneler/raito-bezarius) (Ping timeout: 260 seconds)
22:26:44 × tnt1 quits (~Thunderbi@user/tnt1) (Ping timeout: 252 seconds)
22:26:55 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
22:28:28 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
22:31:30 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
22:31:43 × weary-traveler quits (~user@user/user363627) (Quit: Konversation terminated!)
22:31:57 weary-traveler joins (~user@user/user363627)
22:32:03 tnt1 joins (~Thunderbi@user/tnt1)
22:39:30 Raito_Bezarius joins (~Raito@wireguard/tunneler/raito-bezarius)
22:42:17 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
22:45:27 justsomeguy joins (~justsomeg@user/justsomeguy)
22:46:19 rekahsoft joins (~rekahsoft@70.51.99.237)
22:49:10 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
22:55:44 × Everything quits (~Everythin@195.138.86.118) (Quit: leaving)
22:58:37 × justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 272 seconds)
23:00:21 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
23:04:34 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 245 seconds)
23:11:02 × troydm quits (~troydm@user/troydm) (Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset)
23:13:54 × mhatta quits (~mhatta@www21123ui.sakura.ne.jp) (Quit: ZNC 1.9.1+deb2+b1 - https://znc.in)
23:15:42 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
23:16:41 mhatta joins (~mhatta@www21123ui.sakura.ne.jp)
23:17:06 troydm joins (~troydm@user/troydm)
23:20:09 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 246 seconds)
23:28:33 × dtman34 quits (~dtman34@c-174-53-203-90.hsd1.mn.comcast.net) (Ping timeout: 246 seconds)
23:29:52 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
23:31:05 × hiredman quits (~hiredman@frontier1.downey.family) (Quit: Lost terminal)
23:31:06 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
23:35:40 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
23:37:59 × machinedgod quits (~machinedg@d108-173-18-100.abhsia.telus.net) (Ping timeout: 260 seconds)
23:46:28 merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl)
23:49:44 hiredman joins (~hiredman@frontier1.downey.family)
23:51:03 × merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
23:54:36 dtman34 joins (~dtman34@c-174-53-203-90.hsd1.mn.comcast.net)
23:56:30 tomku joins (~tomku@user/tomku)
23:56:33 × mreh quits (~matthew@host86-146-25-121.range86-146.btcentralplus.com) (Ping timeout: 246 seconds)
23:57:44 Garbanzo joins (~Garbanzo@2602:304:6eac:dc10::46)

All times are in UTC on 2025-01-11.