2024/04/28

2024-04-28 00:01:02 +0200sam113101(~sam@24.157.253.231) (Quit: WeeChat 4.2.2)
2024-04-28 00:01:22 +0200sam113101(~sam@24.157.253.231)
2024-04-28 00:08:40 +0200pavonia(~user@user/siracusa)
2024-04-28 00:11:06 +0200sam113101(~sam@24.157.253.231) (Quit: WeeChat 4.2.2)
2024-04-28 00:11:39 +0200sam113101(~sam@24.157.253.231)
2024-04-28 00:13:08 +0200__monty__(~toonn@user/toonn) (Quit: leaving)
2024-04-28 00:13:18 +0200sam113101(~sam@24.157.253.231) (Client Quit)
2024-04-28 00:13:51 +0200sam113101(~sam@24.157.253.231)
2024-04-28 00:17:28 +0200dispater-(~dispater@host-78-146-88-32.as13285.net)
2024-04-28 00:17:59 +0200orcus-(~orcus@host-78-146-88-32.as13285.net)
2024-04-28 00:18:10 +0200dispater-(~dispater@host-78-146-88-32.as13285.net) (Remote host closed the connection)
2024-04-28 00:18:11 +0200orcus-(~orcus@host-78-146-88-32.as13285.net) (Remote host closed the connection)
2024-04-28 00:21:42 +0200dispater-(~dispater@host-78-146-88-32.as13285.net)
2024-04-28 00:21:58 +0200dispater-(~dispater@host-78-146-88-32.as13285.net) (Remote host closed the connection)
2024-04-28 00:23:11 +0200yin(~yin@user/zero) (Ping timeout: 256 seconds)
2024-04-28 00:25:10 +0200 <dolio> ski gave the right answer. :þ
2024-04-28 00:27:17 +0200orcus-(~orcus@host-78-146-88-32.as13285.net)
2024-04-28 00:27:47 +0200orcus-(~orcus@host-78-146-88-32.as13285.net) (Remote host closed the connection)
2024-04-28 00:36:07 +0200gmg(~user@user/gehmehgeh) (Quit: Leaving)
2024-04-28 00:37:39 +0200yin(~yin@user/zero)
2024-04-28 00:37:52 +0200 <yin> huh?
2024-04-28 00:38:06 +0200 <yin> what is that list?
2024-04-28 00:38:41 +0200peterbecich(~Thunderbi@47.229.123.186) (Ping timeout: 252 seconds)
2024-04-28 00:38:48 +0200 <yin> is it just concurrent output or something else?
2024-04-28 00:41:05 +0200 <dolio> You can think of it as concurrency where the scheduling gets informed by the lazy evaluation.
2024-04-28 00:41:47 +0200 <dolio> When you need something, your thread gets interrupted and the one that was supposed to calculate it runs instead.
2024-04-28 00:42:12 +0200 <yin> got it
2024-04-28 00:45:16 +0200 <geekosaur> unprincipled coroutines
2024-04-28 00:48:41 +0200stiell_(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2024-04-28 00:49:22 +0200stiell_(~stiell@gateway/tor-sasl/stiell)
2024-04-28 00:57:43 +0200acidjnk(~acidjnk@p200300d6e714dc03d4ff90a1ba0ea518.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2024-04-28 00:57:57 +0200 <monochrom> Consider do { x <- unsafeInterleaveIO (writeIORef v 5 >> pure ()); y <- unsafeInterleaveIO (writeIORef v 6 >> pure ()) ; ... }
2024-04-28 00:59:08 +0200 <monochrom> Now v will be 5 or 6 or unchanged at unknown future times depending on when will x or y or neither is evaluated.
2024-04-28 01:03:56 +0200reki(~halloy490@broadband-5-228-80-43.ip.moscow.rt.ru)
2024-04-28 01:05:33 +0200tri(~tri@ool-18bc2e74.dyn.optonline.net)
2024-04-28 01:05:45 +0200reki(~halloy490@broadband-5-228-80-43.ip.moscow.rt.ru) (Remote host closed the connection)
2024-04-28 01:10:04 +0200tri(~tri@ool-18bc2e74.dyn.optonline.net) (Ping timeout: 255 seconds)
2024-04-28 01:12:34 +0200philopsos(~caecilius@user/philopsos)
2024-04-28 01:23:14 +0200[Leary](~Leary]@user/Leary/x-0910699) (Ping timeout: 252 seconds)
2024-04-28 01:25:26 +0200yin(~yin@user/zero) (Ping timeout: 256 seconds)
2024-04-28 01:29:41 +0200madeleine-sydney(~madeleine@c-76-155-235-153.hsd1.co.comcast.net)
2024-04-28 01:44:28 +0200hiredman(~hiredman@frontier1.downey.family) (Quit: Lost terminal)
2024-04-28 01:49:53 +0200smoge(~smoge@2603:7000:4b42:1100:d8aa:e17a:f1f9:f7b4)
2024-04-28 01:50:07 +0200dispater-(~dispater@host-78-146-88-32.as13285.net)
2024-04-28 01:50:50 +0200dispater-(~dispater@host-78-146-88-32.as13285.net) (Remote host closed the connection)
2024-04-28 01:51:23 +0200smoge(~smoge@2603:7000:4b42:1100:d8aa:e17a:f1f9:f7b4) (Client Quit)
2024-04-28 01:54:02 +0200smogeb(~smogeb@2603:7000:4b42:1100:d8aa:e17a:f1f9:f7b4)
2024-04-28 02:03:19 +0200machinedgod(~machinedg@d173-183-246-216.abhsia.telus.net)
2024-04-28 02:04:37 +0200 <EvanR> you could use IVar in the story. the value you get back from executing the unsafeInterleaveIO action could be an IVar behind the scenes. And some thread is responsible for doing the i/o and writing the IVar
2024-04-28 02:07:07 +0200 <smogeb> what's the best book to write a interpreter (that is not scheme) ??
2024-04-28 02:10:22 +0200zetef(~quassel@2a02:2f00:5202:1200:2128:605:71c4:66a4) (Remote host closed the connection)
2024-04-28 02:10:50 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 268 seconds)
2024-04-28 02:11:12 +0200smogeb(~smogeb@2603:7000:4b42:1100:d8aa:e17a:f1f9:f7b4) (Quit: Client closed)
2024-04-28 02:11:26 +0200 <dolio> EvanR: Right, exactly.
2024-04-28 02:13:21 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2024-04-28 02:22:00 +0200madeleine-sydney(~madeleine@c-76-155-235-153.hsd1.co.comcast.net) (Quit: Konversation terminated!)
2024-04-28 02:28:40 +0200xff0x(~xff0x@2405:6580:b080:900:a359:eeea:f982:7525) (Ping timeout: 245 seconds)
2024-04-28 02:34:03 +0200Tuplanolla(~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Quit: Leaving.)
2024-04-28 02:34:04 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-04-28 02:34:37 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Client Quit)
2024-04-28 02:54:22 +0200madeleine-sydney(~madeleine@c-76-155-235-153.hsd1.co.comcast.net)
2024-04-28 02:57:05 +0200y04nn(~username@2a03:1b20:8:f011::e10d) (Ping timeout: 268 seconds)
2024-04-28 03:01:56 +0200mechap(~mechap@user/mechap) (Quit: WeeChat 4.2.2)
2024-04-28 03:07:31 +0200sawilagar(~sawilagar@user/sawilagar) (Ping timeout: 255 seconds)
2024-04-28 03:09:09 +0200jdbres(~jdbres@user/jdbres)
2024-04-28 03:12:09 +0200[Leary](~Leary]@user/Leary/x-0910699)
2024-04-28 03:19:36 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 268 seconds)
2024-04-28 03:31:23 +0200otto_s(~user@p4ff27de0.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2024-04-28 03:33:07 +0200otto_s(~user@p5b0442ac.dip0.t-ipconnect.de)
2024-04-28 03:35:21 +0200waleee(~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 272 seconds)
2024-04-28 03:36:00 +0200causal(~eric@50.35.88.207)
2024-04-28 03:37:12 +0200philopsos(~caecilius@user/philopsos) (Ping timeout: 255 seconds)
2024-04-28 03:44:25 +0200L29Ah(~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer)
2024-04-28 03:45:28 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2024-04-28 03:58:30 +0200hueso(~root@user/hueso) (Quit: hueso)
2024-04-28 04:00:48 +0200mindofjoe(~joe@user/lighthouse6)
2024-04-28 04:01:41 +0200hueso(~root@user/hueso)
2024-04-28 04:03:08 +0200hueso(~root@user/hueso) (Client Quit)
2024-04-28 04:05:03 +0200op_4(~tslil@user/op-4/x-9116473) (Remote host closed the connection)
2024-04-28 04:05:33 +0200op_4(~tslil@user/op-4/x-9116473)
2024-04-28 04:05:58 +0200machinedgod(~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 246 seconds)
2024-04-28 04:06:23 +0200hueso(~root@user/hueso)
2024-04-28 04:15:16 +0200hueso(~root@user/hueso) (Quit: hueso)
2024-04-28 04:19:02 +0200hueso(~root@user/hueso)
2024-04-28 04:26:09 +0200xff0x(~xff0x@om126236141098.32.openmobile.ne.jp)
2024-04-28 04:31:57 +0200td_(~td@i5387091B.versanet.de) (Ping timeout: 256 seconds)
2024-04-28 04:33:32 +0200td_(~td@i53870914.versanet.de)
2024-04-28 04:48:11 +0200causal(~eric@50.35.88.207) (Quit: WeeChat 4.1.1)
2024-04-28 04:49:56 +0200causal(~eric@50.35.88.207)
2024-04-28 04:52:51 +0200y04nn(~username@2a03:1b20:8:f011::e10d)
2024-04-28 04:56:56 +0200mrmr1553343(~mrmr@user/mrmr) (Quit: Bye, See ya later!)
2024-04-28 05:01:10 +0200xff0x(~xff0x@om126236141098.32.openmobile.ne.jp) (Read error: Connection reset by peer)
2024-04-28 05:01:35 +0200machinedgod(~machinedg@d173-183-246-216.abhsia.telus.net)
2024-04-28 05:03:07 +0200mrmr1553343(~mrmr@user/mrmr)
2024-04-28 05:10:19 +0200aforemny_(~aforemny@i59f516da.versanet.de)
2024-04-28 05:11:35 +0200aforemny(~aforemny@i59F516DA.versanet.de) (Ping timeout: 260 seconds)
2024-04-28 05:29:05 +0200motherfsck(~motherfsc@user/motherfsck) (Ping timeout: 268 seconds)
2024-04-28 05:29:06 +0200sudden(~cat@user/sudden) (Ping timeout: 252 seconds)
2024-04-28 05:33:40 +0200mrmr1553343(~mrmr@user/mrmr) (Quit: Bye, See ya later!)
2024-04-28 05:39:34 +0200mrmr1553343(~mrmr@user/mrmr)
2024-04-28 05:39:46 +0200sudden(~cat@user/sudden)
2024-04-28 05:42:08 +0200_d0t(~{-d0t-}@user/-d0t-/x-7915216) (Ping timeout: 260 seconds)
2024-04-28 05:45:08 +0200_d0t(~{-d0t-}@user/-d0t-/x-7915216)
2024-04-28 05:50:01 +0200ocra8(ocra8@user/ocra8) (Quit: WeeChat 4.2.2)
2024-04-28 05:54:24 +0200dsrt^(~cd@c-98-242-74-66.hsd1.ga.comcast.net) (Remote host closed the connection)
2024-04-28 06:08:02 +0200jamegwaww(~jamegwaww@2406:4440:0:103::1:c0)
2024-04-28 06:09:02 +0200jamegwaww(~jamegwaww@2406:4440:0:103::1:c0) (Remote host closed the connection)
2024-04-28 06:18:24 +0200jdbres(~jdbres@user/jdbres) (Quit: leaving)
2024-04-28 06:21:57 +0200jdbres(~jdbres@user/jdbres)
2024-04-28 06:23:42 +0200jdbres(~jdbres@user/jdbres) (Client Quit)
2024-04-28 06:23:58 +0200sudden(~cat@user/sudden) (Ping timeout: 268 seconds)
2024-04-28 06:27:36 +0200mindofjoe(~joe@user/lighthouse6) (Quit: Lost terminal)
2024-04-28 06:31:48 +0200 <ski> @hackage ivar-simple
2024-04-28 06:31:48 +0200 <lambdabot> https://hackage.haskell.org/package/ivar-simple
2024-04-28 06:31:49 +0200 <ski> @hackage data-ivar
2024-04-28 06:31:50 +0200 <lambdabot> https://hackage.haskell.org/package/data-ivar
2024-04-28 06:32:29 +0200takuan(~takuan@178-116-218-225.access.telenet.be)
2024-04-28 06:35:59 +0200bilegeek(~bilegeek@2600:1008:b0ad:1165:c160:8ebf:90b8:5ca) (Quit: Leaving)
2024-04-28 06:37:15 +0200chiselfuse(~chiselfus@user/chiselfuse) (Remote host closed the connection)
2024-04-28 06:38:43 +0200chiselfuse(~chiselfus@user/chiselfuse)
2024-04-28 06:44:12 +0200chiselfuse(~chiselfus@user/chiselfuse) (Remote host closed the connection)
2024-04-28 06:45:01 +0200chiselfuse(~chiselfus@user/chiselfuse)
2024-04-28 06:51:10 +0200sudden(~cat@user/sudden)
2024-04-28 06:53:23 +0200szkl(uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
2024-04-28 06:53:25 +0200jdbres(~jdbres@user/jdbres)
2024-04-28 06:55:04 +0200ddellacosta(~ddellacos@ool-44c73d29.dyn.optonline.net)
2024-04-28 06:55:06 +0200madeleine-sydney(~madeleine@c-76-155-235-153.hsd1.co.comcast.net) (Quit: Konversation terminated!)
2024-04-28 06:55:25 +0200bliminse(~bliminse@user/bliminse)
2024-04-28 07:02:02 +0200jdbres(~jdbres@user/jdbres) (Quit: leaving)
2024-04-28 07:21:41 +0200stiell_(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2024-04-28 07:24:32 +0200motherfsck(~motherfsc@user/motherfsck)
2024-04-28 07:25:51 +0200stiell_(~stiell@gateway/tor-sasl/stiell)
2024-04-28 07:31:11 +0200motherfsck(~motherfsc@user/motherfsck) (Ping timeout: 268 seconds)
2024-04-28 07:41:55 +0200stiell_(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2024-04-28 07:42:28 +0200stiell_(~stiell@gateway/tor-sasl/stiell)
2024-04-28 07:46:32 +0200euphores(~SASL_euph@user/euphores) (Quit: Leaving.)
2024-04-28 07:48:35 +0200y04nn(~username@2a03:1b20:8:f011::e10d) (Ping timeout: 256 seconds)
2024-04-28 07:48:41 +0200tabemann_(~tabemann@2600:1700:7990:24e0:42f1:a891:a658:f99d) (Ping timeout: 272 seconds)
2024-04-28 07:56:31 +0200machinedgod(~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 256 seconds)
2024-04-28 07:56:44 +0200tabemann(~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net)
2024-04-28 07:57:11 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-04-28 08:05:11 +0200motherfsck(~motherfsc@user/motherfsck)
2024-04-28 08:05:17 +0200philopsos(~caecilius@user/philopsos)
2024-04-28 08:06:41 +0200hammond(proscan@user/hammond2) (Read error: Connection reset by peer)
2024-04-28 08:07:17 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-04-28 08:07:59 +0200euphores(~SASL_euph@user/euphores)
2024-04-28 08:11:59 +0200hammond(proscan@gateway02.insomnia247.nl)
2024-04-28 08:13:23 +0200peterbecich(~Thunderbi@47.229.123.186)
2024-04-28 08:14:25 +0200notzmv(~daniel@user/notzmv)
2024-04-28 08:22:11 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-04-28 08:24:13 +0200famubu(~julinuser@user/famubu)
2024-04-28 08:25:22 +0200 <famubu> Hi. I had been trying to use megaparsec. I was trying use `satisfy` to accept a single upper-case ascii character. So I tried `satisfy Data.Char.isUpper` but that didn't work. The required type mentions `Token`.
2024-04-28 08:41:11 +0200yin(~yin@user/zero)
2024-04-28 09:00:03 +0200tt12310(~tt1231@2603:6010:8700:4a81:219f:50d3:618a:a6ee) (Quit: The Lounge - https://thelounge.chat)
2024-04-28 09:02:55 +0200tt123109(~tt1231@2603:6010:8700:4a81:219f:50d3:618a:a6ee)
2024-04-28 09:14:53 +0200ezzieyguywuf(~Unknown@user/ezzieyguywuf) (Ping timeout: 240 seconds)
2024-04-28 09:17:10 +0200 <[exa]> famubu: what is your parser type? might be the case you are using an overly generic satisfy, or that your stream is not directly compatible with Char (might happen if you parse from bytestrings or so)
2024-04-28 09:18:18 +0200 <[exa]> (if that's the case, I'd say there is a bytestring-compatible variant of isUpper somewhere)
2024-04-28 09:20:49 +0200jinsun(~jinsun@user/jinsun) (Read error: Connection reset by peer)
2024-04-28 09:21:06 +0200ezzieyguywuf(~Unknown@user/ezzieyguywuf)
2024-04-28 09:22:17 +0200philopsos(~caecilius@user/philopsos) (Ping timeout: 252 seconds)
2024-04-28 09:35:23 +0200causal(~eric@50.35.88.207) (Quit: WeeChat 4.1.1)
2024-04-28 09:38:14 +0200gmg(~user@user/gehmehgeh)
2024-04-28 09:38:56 +0200acidjnk(~acidjnk@p200300d6e714dc79605b18ab3e573168.dip0.t-ipconnect.de)
2024-04-28 09:41:32 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-04-28 09:41:55 +0200yin(~yin@user/zero) (Ping timeout: 268 seconds)
2024-04-28 09:52:00 +0200peterbecich(~Thunderbi@47.229.123.186) (Ping timeout: 252 seconds)
2024-04-28 09:53:10 +0200_d0t(~{-d0t-}@user/-d0t-/x-7915216) (Ping timeout: 246 seconds)
2024-04-28 10:00:35 +0200yin(~yin@user/zero)
2024-04-28 10:01:35 +0200sawilagar(~sawilagar@user/sawilagar)
2024-04-28 10:02:54 +0200xff0x(~xff0x@softbank219059019218.bbtec.net)
2024-04-28 10:10:15 +0200xff0x(~xff0x@softbank219059019218.bbtec.net) (Ping timeout: 256 seconds)
2024-04-28 10:10:46 +0200Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2024-04-28 10:11:17 +0200rvalue(~rvalue@user/rvalue) (Read error: Connection reset by peer)
2024-04-28 10:11:47 +0200rvalue(~rvalue@user/rvalue)
2024-04-28 10:12:16 +0200 <famubu> [exa]: Sorry, I just had to add an explicit type annotation. It somehow worked with that.
2024-04-28 10:13:16 +0200 <famubu> Now I'm trying to find an upto date tutorial for megaparsec. The official one mentions setting up an operator table with `Operator` type, but can't find that type at all in latest megaparsec repo..
2024-04-28 10:13:32 +0200 <famubu> Or maybe I'm not looking at the right place.
2024-04-28 10:16:25 +0200 <famubu> There seems to be no `import Text.Megaparsec.Expr` in the new megaparsec.
2024-04-28 10:16:32 +0200 <tomsmeding> seems to be gone since 6.0.0
2024-04-28 10:16:54 +0200 <famubu> Yeah.. I was wondering what to use in place of it.
2024-04-28 10:16:59 +0200 <tomsmeding> https://hackage.haskell.org/package/parser-combinators-1.3.0/docs/Control-Monad-Combinators-Expr.h…
2024-04-28 10:17:22 +0200 <tomsmeding> megaparsec was reorganised to depend on `parser-combinators` where most of the higher-level API comes from
2024-04-28 10:18:36 +0200 <famubu> Thanks! Let me try that.
2024-04-28 10:19:17 +0200 <tomsmeding> not sure if the API is _exactly_ the same as in the tutorial you found, but at least it's the same idea
2024-04-28 10:20:03 +0200Tuplanolla(~Tuplanoll@91-159-69-59.elisa-laajakaista.fi)
2024-04-28 10:24:28 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 268 seconds)
2024-04-28 10:24:40 +0200euleritian(~euleritia@dynamic-176-007-198-087.176.7.pool.telefonica.de)
2024-04-28 10:25:57 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-04-28 10:27:33 +0200paddymahoney(~paddymaho@pool-99-250-26-190.cpe.net.cable.rogers.com) (Ping timeout: 268 seconds)
2024-04-28 10:28:23 +0200_d0t(~{-d0t-}@user/-d0t-/x-7915216)
2024-04-28 10:28:57 +0200euleritian(~euleritia@dynamic-176-007-198-087.176.7.pool.telefonica.de) (Ping timeout: 255 seconds)
2024-04-28 10:29:40 +0200euleritian(~euleritia@dynamic-176-007-168-231.176.7.pool.telefonica.de)
2024-04-28 10:32:02 +0200ph88(~ph88@ip5b403f30.dynamic.kabel-deutschland.de)
2024-04-28 10:35:03 +0200_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl)
2024-04-28 10:37:36 +0200tzh(~tzh@c-73-164-206-160.hsd1.or.comcast.net) (Quit: zzz)
2024-04-28 10:37:50 +0200paddymahoney(~paddymaho@pool-99-250-26-190.cpe.net.cable.rogers.com)
2024-04-28 10:39:45 +0200 <[exa]> famubu: ok so that was likely an ambiguity killing it
2024-04-28 10:41:04 +0200 <[exa]> famubu: re the tutorial, there was a repo with relatively up-to-date examples somewhere (as in, there was a .cabal file and it compiled), I used that for reference
2024-04-28 10:41:40 +0200 <[exa]> (aaaaaaand I can't find it.)
2024-04-28 10:44:48 +0200Rodney_(~Rodney@176.254.244.83) (Ping timeout: 252 seconds)
2024-04-28 10:46:05 +0200 <[exa]> ._.
2024-04-28 10:46:44 +0200L29Ah(~L29Ah@wikipedia/L29Ah)
2024-04-28 10:50:18 +0200yin(~yin@user/zero) (Ping timeout: 252 seconds)
2024-04-28 11:00:02 +0200Rodney_(~Rodney@176.254.244.83)
2024-04-28 11:00:54 +0200poscat0x04(~poscat@user/poscat) (Ping timeout: 255 seconds)
2024-04-28 11:02:49 +0200yin(~yin@user/zero)
2024-04-28 11:09:25 +0200wootehfoot(~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
2024-04-28 11:10:46 +0200poscat(~poscat@user/poscat)
2024-04-28 11:14:36 +0200wootehfoot(~wootehfoo@user/wootehfoot)
2024-04-28 11:38:47 +0200wootehfoot(~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
2024-04-28 11:40:58 +0200mreh(~matthew@host86-160-168-68.range86-160.btcentralplus.com)
2024-04-28 11:52:47 +0200 <yin> assuming no language extensions other that the default ones, when are type annotations used in pattern matching?
2024-04-28 11:53:20 +0200 <tomsmeding> ScopedTypeVariables is in GHC2021 (if that's what you mean with "the default ones")
2024-04-28 11:54:24 +0200mima(~mmh@eduroam-pool4-264.wlan.uni-bremen.de)
2024-04-28 11:55:29 +0200 <yin> when do we use type annotations in pattern matching with it?
2024-04-28 11:55:46 +0200 <tomsmeding> I think it's never actually necessary
2024-04-28 11:56:15 +0200 <tomsmeding> but it can be helpful, in my experience, in two cases: 1. you want some kind of type annotation on a lambda function but are too lazy to make it a let-defined thing with a type signature
2024-04-28 11:56:30 +0200 <tomsmeding> so you just write (x :: Int) as the argument or something
2024-04-28 11:57:08 +0200 <tomsmeding> or 2. the argument's type has some instantiation of a type variable in it that you need on the type level, and you could get via other means but that would be very cumbersome
2024-04-28 11:57:23 +0200 <tomsmeding> and with ScopedTypeVariables you can bring that thing into scope with a type annotation in a pattern
2024-04-28 11:57:31 +0200 <yin> hmm
2024-04-28 11:57:51 +0200 <tomsmeding> note that type annotations in patterns are just that -- type _annotations_, they don't influence pattern matching, they can only constrain the overall type of the function or bring type variables into scope
2024-04-28 11:58:15 +0200 <tomsmeding> you can't pattern match on types in haskell
2024-04-28 11:58:23 +0200 <yin> in the first case, isn't it always inferred by the type system anyways?
2024-04-28 11:58:25 +0200 <famubu> Type annototaion had a 'type equivalence' thing from Token to Char. That had made the error go away. As in `Token ~ Char`
2024-04-28 11:58:40 +0200 <famubu> I'm sure I'm not using the right term here..
2024-04-28 11:58:49 +0200 <tomsmeding> yin: a typical example of (1.) is https://hackage.haskell.org/package/base-4.19.0.0/docs/Control-Exception.html#v:catch
2024-04-28 11:59:06 +0200 <tomsmeding> you need that e to infer to something specific, usually, and the body of the lambda is typically not enough for that
2024-04-28 11:59:33 +0200 <tomsmeding> famubu: that would be a type equality
2024-04-28 11:59:49 +0200 <famubu> [exa]: 🥴
2024-04-28 11:59:58 +0200 <tomsmeding> famubu: was the error something like "Cannot match type Foo a with Foo a0"?
2024-04-28 11:59:59 +0200 <famubu> tomsmeding: 👍
2024-04-28 12:00:09 +0200 <famubu> Yeah.
2024-04-28 12:00:15 +0200 <tomsmeding> right, that's an ambiguity error
2024-04-28 12:00:46 +0200 <tomsmeding> where ghc sees that your expression is polymorphic, but for some reason (typically a good one in general) it doesn't quite want to just infer that polymorphic type
2024-04-28 12:01:00 +0200 <tomsmeding> perhaps because the polymorphism is constrained in some weird way
2024-04-28 12:01:14 +0200 <yin> tomsmeding: where's the type annotation on pattern matching in 'catch'?
2024-04-28 12:01:34 +0200 <tomsmeding> so then ghc asks you to say precisely what you mean -- some specific instantiation, or an actual polymorphic type where it's then on you to write down what ghc should do
2024-04-28 12:01:54 +0200 <tomsmeding> yin: do you see the `(e :: IOException)` in the example in the haddocks?
2024-04-28 12:02:08 +0200 <yin> yes
2024-04-28 12:02:14 +0200 <tomsmeding> you typically have to manually constrain e somehow, and having to do that on some occurrence in the body is kind of clunky
2024-04-28 12:02:25 +0200 <tomsmeding> it's nicer to write `catch _ (\(e :: IOException) -> ...)`
2024-04-28 12:02:51 +0200 <yin> oh i see
2024-04-28 12:03:10 +0200 <int-e> tomsmeding: oh the cloudatacost.com fan page is gone, so sad. https://web.archive.org/web/20220811231349/https://cloudatacost.com/mystory/original-story-2014
2024-04-28 12:03:26 +0200wootehfoot(~wootehfoo@user/wootehfoot)
2024-04-28 12:03:38 +0200 <yin> somehow i don't consider that to be patter matching. it's just like
2024-04-28 12:03:43 +0200 <yin> > minBound :: Int
2024-04-28 12:03:45 +0200 <lambdabot> -9223372036854775808
2024-04-28 12:03:52 +0200 <int-e> (wrong channel)
2024-04-28 12:04:09 +0200 <tomsmeding> yin: indeed, it's a type annotation that you can put in a convenient spot
2024-04-28 12:05:36 +0200mima(~mmh@eduroam-pool4-264.wlan.uni-bremen.de) (Ping timeout: 268 seconds)
2024-04-28 12:07:19 +0200 <ski> "I think it's never actually necessary" -- introducing a type variable for an opened existential
2024-04-28 12:08:25 +0200 <tomsmeding> you could also write a helper function that you pass your matched things to
2024-04-28 12:08:34 +0200mima(~mmh@eduroam-pool4-264.wlan.uni-bremen.de)
2024-04-28 12:08:47 +0200 <tomsmeding> that helper function could have a type signature from which you can get your type variables with ScopedTypeVariables
2024-04-28 12:08:51 +0200 <tomsmeding> it's a workaround to be sure
2024-04-28 12:09:28 +0200wootehfoot(~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
2024-04-28 12:12:32 +0200 <yin> i guess my question is: do we really need the ability to annotate on the function head?
2024-04-28 12:12:47 +0200 <yin> or is it just a convenience
2024-04-28 12:12:47 +0200 <tomsmeding> what does "function head" mean?
2024-04-28 12:12:54 +0200 <tomsmeding> a type annotation in a pattern?
2024-04-28 12:12:59 +0200 <yin> tomsmeding: left of the = on a function definition
2024-04-28 12:13:02 +0200 <yin> or |
2024-04-28 12:13:12 +0200wootehfoot(~wootehfoo@user/wootehfoot)
2024-04-28 12:13:13 +0200 <yin> i man
2024-04-28 12:13:13 +0200 <ski> the definiendum of the defining equation
2024-04-28 12:13:15 +0200 <tomsmeding> it's never strictly necessary, but can be very convenient in some cases
2024-04-28 12:13:15 +0200 <yin> *i mean
2024-04-28 12:13:21 +0200 <yin> forget the |
2024-04-28 12:13:46 +0200 <ski> .. i miss the ability to put a type ascription on the whole definiendum
2024-04-28 12:13:56 +0200 <yin> ski: wdym?
2024-04-28 12:14:13 +0200 <ski> map (f :: a -> b) (xs0 :: [a]) :: [b] = case xs0 of ...
2024-04-28 12:14:23 +0200 <ski> the ` :: [b]' there, specifically
2024-04-28 12:14:26 +0200 <tomsmeding> at that point just write a type signature :p
2024-04-28 12:14:41 +0200 <yin> we can't do that anymore?
2024-04-28 12:15:16 +0200 <yin> foo :: Bool = True -- works just fin
2024-04-28 12:15:21 +0200 <yin> e
2024-04-28 12:15:23 +0200 <ski> yea, but i'd rather have the option to express a full signature in this style, in addition to the usual separate type signature. rather than *almost*, but not quite, being able to do this
2024-04-28 12:15:35 +0200 <ski> yea, but that only works for pattern bindings, yin
2024-04-28 12:15:46 +0200 <ski> unlike in the MLs, where this works just fine
2024-04-28 12:16:02 +0200 <yin> i see
2024-04-28 12:16:55 +0200 <ski> (otoh, the MLs doesn't have separate type signatures, interleaved with implementation. you can only put those in signatures (/ module types))
2024-04-28 12:18:02 +0200 <ski> iow, i'd prefer to be given the choice of using the usual type signatures, or a more C-style mixed definiendum & type ascriptions. (or both, or neither)
2024-04-28 12:18:14 +0200wootehfoot(~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
2024-04-28 12:18:35 +0200mima(~mmh@eduroam-pool4-264.wlan.uni-bremen.de) (Ping timeout: 260 seconds)
2024-04-28 12:19:12 +0200wootehfoot(~wootehfoo@user/wootehfoot)
2024-04-28 12:19:22 +0200 <tomsmeding> you're right, for functions with many arguments it would sometimes be nice to be able to interleave the types with the argument names
2024-04-28 12:19:24 +0200 <ski> (i'd also like the above to be able to bind tyvars `a' and `b', without a separate type signature. as, iirc, `PatternSignatures' originally allowed, but the current `ScopedTypeVariables' doesn't. but that's a separate issue)
2024-04-28 12:19:47 +0200 <tomsmeding> wait it doesn't?
2024-04-28 12:19:54 +0200 <yin> also news t ome
2024-04-28 12:20:29 +0200 <tomsmeding> I guess it only does if the body already inferred to the annotated types?
2024-04-28 12:21:13 +0200 <ski> hm. maybe they changed it so it works, now ?
2024-04-28 12:21:35 +0200 <ski> > let map (f :: a -> b) (xs0 :: [a]) = (case xs0 of [] -> []; x:xs -> f x : map f xs) :: [b] in map (^ 2) [2,3,5,7]
2024-04-28 12:21:36 +0200 <lambdabot> [4,9,25,49]
2024-04-28 12:21:38 +0200 <ski> > let map (f :: a -> b) (xs0 :: [a]) :: [b] = case xs0 of [] -> []; x:xs -> f x : map f xs in map (^ 2) [2,3,5,7]
2024-04-28 12:21:39 +0200 <lambdabot> <hint>:1:5: error: Parse error in pattern: map
2024-04-28 12:22:15 +0200__monty__(~toonn@user/toonn)
2024-04-28 12:22:16 +0200 <yin> awful error message :p
2024-04-28 12:23:27 +0200Square(~Square@user/square)
2024-04-28 12:24:06 +0200 <tomsmeding> https://play.haskell.org/saved/AwWkZI0A
2024-04-28 12:24:21 +0200 <tomsmeding> ski: were you talking about the foo0 behaviour?
2024-04-28 12:24:27 +0200 <ski> i'm pretty sure the former (or another example that also tested the same thing) also didn't work, at some point
2024-04-28 12:24:35 +0200 <tomsmeding> in your last parenthetical
2024-04-28 12:25:43 +0200wootehfoot(~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
2024-04-28 12:26:13 +0200 <tomsmeding> to be honest I'm kind of surprised that foo3 doesn't work; I'm not sure what to expect with foo0
2024-04-28 12:26:26 +0200 <tomsmeding> and I'm even more surprised that foo1 works but foo3 doesn't
2024-04-28 12:26:59 +0200 <tomsmeding> ah no I'm not surprised about foo3
2024-04-28 12:27:28 +0200 <yin> do we need existential type applications? :p
2024-04-28 12:27:29 +0200 <ski> hm, there's no raw link at that page ?
2024-04-28 12:27:35 +0200 <ski> yes, yin
2024-04-28 12:27:55 +0200 <tomsmeding> in fact, if you change the called function (in the body) to foo2 everywhere, all cases work, even foo0
2024-04-28 12:28:07 +0200 <yin> @(forall a. a)
2024-04-28 12:28:07 +0200 <lambdabot> Unknown command, try @list
2024-04-28 12:28:16 +0200 <tomsmeding> so ski your last "that's a separate issue" parenthetical seems to be false
2024-04-28 12:28:25 +0200 <ski> that would be impredicative, not existential, yin
2024-04-28 12:28:26 +0200 <tomsmeding> you _do_ bind a and b that way
2024-04-28 12:28:56 +0200 <tomsmeding> and indeed, there's no raw link at that page; would you want one ski?
2024-04-28 12:29:19 +0200ph88(~ph88@ip5b403f30.dynamic.kabel-deutschland.de) (Quit: Leaving)
2024-04-28 12:29:24 +0200 <ski> yea, i tested in GHCi (just before i asked lambdabot), and concluded it worked (also testing whether `map' here was actually polymorphic, by applying it at different types), and so concluding it must not have worked at some point, and later got fixed
2024-04-28 12:29:43 +0200 <yin> ski: right
2024-04-28 12:30:04 +0200 <tomsmeding> my playground example works back to 8.4.4 :p
2024-04-28 12:30:05 +0200 <ski> it would be useful, sure, tomsmeding. i very commonly open pastes in terminal browser (without Javascript)
2024-04-28 12:30:12 +0200 <tomsmeding> ah!
2024-04-28 12:30:46 +0200 <ski> (atm i just rebooted $GRAPHICAL_BROWSER, since it was lagging and not responding. only just done so that i can check out the page in it)
2024-04-28 12:31:09 +0200 <tomsmeding> where should I put the link though, suggestions?
2024-04-28 12:31:24 +0200wootehfoot(~wootehfoo@user/wootehfoot)
2024-04-28 12:31:31 +0200 <ski> (another reason to open in terminal browser is so i can access the session, running under GNU Screen, from elsewhere. this also works with X forwarding of images (which W3m can display))
2024-04-28 12:31:38 +0200 <tomsmeding> heh opening the playground in elinks gives absolutely nothing useful
2024-04-28 12:32:24 +0200 <ski> maybe beside the "Save & share code" button ?
2024-04-28 12:32:44 +0200 <tomsmeding> would it be acceptable if I put the "raw" link there only if there is no javascript?
2024-04-28 12:33:15 +0200 <ski> well, opening it in W3m shows me the buttons (but they are not clickable, unlike other buttons on many pages), and doesn't show the source at all (neither readable, or with garbled formatting, as some paste sites do)
2024-04-28 12:33:39 +0200 <tomsmeding> if you open the playground without JS it's completely nonfunctional anyway, even in a state-of-the-art graphical browser
2024-04-28 12:34:05 +0200Guest83(~Guest83@79.113.204.176)
2024-04-28 12:34:24 +0200 <tomsmeding> I don't think it's worth the effort to make it work better in a no-JS environment, but I now see that having a "raw" link would be terribly useful in that case, so I'll add that
2024-04-28 12:34:35 +0200wootehfoot(~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
2024-04-28 12:34:44 +0200 <tomsmeding> I'm just thinking to hide that link if there is JS so that it doesn't clutter the UI for the majority of users, only for those for whom it would help
2024-04-28 12:35:15 +0200 <tomsmeding> (with working JS you get the source with just select-all, copy)
2024-04-28 12:36:21 +0200 <ski> "that's a separate issue" referred to it being separate from the issue being able to put a type ascription on the whole definiendum (as well as to name tyvars in opened existentials, for that matter)
2024-04-28 12:36:56 +0200Guest83(~Guest83@79.113.204.176) (Client Quit)
2024-04-28 12:39:12 +0200 <ski> "would it be acceptable if I put the "raw" link there only if there is no javascript?" -- okay, i guess, if you think it clutters the interface up too much otherwise ? (i suppose i'd prefer to have the link, regardless, so i don't have to hunt through the page source for it, if i'd like to e.g. download (e.g. with accurate timestamp, if available) or link directly to the raw text. but having it available if
2024-04-28 12:39:18 +0200 <ski> there's no Javascript is the more annoying thing)
2024-04-28 12:39:28 +0200euleritian(~euleritia@dynamic-176-007-168-231.176.7.pool.telefonica.de) (Read error: Connection reset by peer)
2024-04-28 12:39:40 +0200 <tomsmeding> what do you mean with "with accurate timestamp"?
2024-04-28 12:39:46 +0200euleritian(~euleritia@2a02:810a:b00:1568:71f7:8ec:15a3:342f)
2024-04-28 12:40:46 +0200 <ski> (i sometimes check out the raw link, or do such hunting through the page source, for other paste sites. enough that i've started to memorize the URL pattern for it in some cases, and immediately modify the given paste link before loading it in browser)
2024-04-28 12:41:42 +0200 <ski> i mean that if i `wget' the raw (or "download") source link, i get a timestamp on the downloaded file that represents when the paste was made, rather than when i downloaded it. not all sites are configured to give this information, though
2024-04-28 12:42:23 +0200 <tomsmeding> oh interesting, I would indeed have forgotten that
2024-04-28 12:42:32 +0200 <tomsmeding> or, rather, not thought about that at all
2024-04-28 12:42:42 +0200 <ski> "I now see that having a \"raw\" link would be terribly useful in that case, so I'll add that" -- great, thanks a bunch
2024-04-28 12:43:46 +0200 <ski> (s/the more annoying thing/the more annoying case/)
2024-04-28 12:45:11 +0200wootehfoot(~wootehfoo@user/wootehfoot)
2024-04-28 12:48:27 +0200 <ski> (incidentally, having the page display when the paste was made, would also be useful info, imho)
2024-04-28 12:48:47 +0200 <Rembane> +1
2024-04-28 12:48:51 +0200 <tomsmeding> where in the UI
2024-04-28 12:49:08 +0200 <tomsmeding> considering that the UI should still make some sense if the window is not terribly wide
2024-04-28 12:49:32 +0200Lord_of_Life_(~Lord@user/lord-of-life/x-2819915)
2024-04-28 12:49:40 +0200 <tomsmeding> (there is already a UI bug where there is a range of window widths where the top bar doesn't fit but doesn't scroll yet)
2024-04-28 12:49:55 +0200 <ski> top is already a bar with some elements. could display it in there ? or, i guess, maybe could make a pop-up for some stuff, if reasonable
2024-04-28 12:49:58 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 256 seconds)
2024-04-28 12:50:03 +0200 <tomsmeding> (oh that bug is trivially fixable)
2024-04-28 12:50:38 +0200 <ski> does it display the GHC output below, if the window's not wide enough ?
2024-04-28 12:50:51 +0200 <tomsmeding> yes
2024-04-28 12:50:54 +0200wootehfoot(~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
2024-04-28 12:50:59 +0200 <tomsmeding> it switches to a vertical stack below 800px width
2024-04-28 12:51:10 +0200 <ski> *nod*
2024-04-28 12:51:16 +0200 <tomsmeding> (had to choose some value)
2024-04-28 12:52:04 +0200wootehfoot(~wootehfoo@user/wootehfoot)
2024-04-28 12:52:26 +0200Lord_of_Life_Lord_of_Life
2024-04-28 12:53:12 +0200 <tomsmeding> can somebody tell me why cabal does not consider 1.0 >= 1.0.0
2024-04-28 12:53:46 +0200 <int-e> > [1,0] >= [1,0,0]
2024-04-28 12:53:47 +0200 <lambdabot> False
2024-04-28 12:54:04 +0200 <tomsmeding> hm I guess
2024-04-28 12:55:23 +0200 <yin> > [0] >= [0,0]
2024-04-28 12:55:25 +0200 <lambdabot> False
2024-04-28 12:55:30 +0200 <yin> > [] >= [0]
2024-04-28 12:55:31 +0200 <lambdabot> False
2024-04-28 12:55:44 +0200 <tomsmeding> > [1] >= repeat 0
2024-04-28 12:55:45 +0200 <lambdabot> True
2024-04-28 12:56:57 +0200 <yin> > [0] >= [0,undefined]
2024-04-28 12:56:58 +0200 <lambdabot> False
2024-04-28 12:57:54 +0200paotsaq(~paotsaq@127.209.37.188.rev.vodafone.pt) (Quit: ZNC 1.9.0 - https://znc.in)
2024-04-28 12:58:02 +0200 <ski> > [0] >= 0:undefined
2024-04-28 12:58:03 +0200 <lambdabot> *Exception: Prelude.undefined
2024-04-28 12:58:09 +0200 <ski> > [0] <= 0:undefined
2024-04-28 12:58:11 +0200 <lambdabot> *Exception: Prelude.undefined
2024-04-28 12:58:35 +0200 <yin> int-e: is it clear now?
2024-04-28 12:58:42 +0200paotsaq(~paotsaq@127.209.37.188.rev.vodafone.pt)
2024-04-28 12:58:53 +0200wootehfoot(~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
2024-04-28 12:59:06 +0200 <int-e> yin: that wasn't a question
2024-04-28 12:59:18 +0200 <ski> (it was an answer)
2024-04-28 12:59:35 +0200 <yin> lol i need to wake up
2024-04-28 12:59:41 +0200rosco(~rosco@yp-146-6.tm.net.my)
2024-04-28 13:01:11 +0200 <yin> goog conversation nontheless
2024-04-28 13:01:16 +0200 <yin> *good
2024-04-28 13:01:19 +0200 <tomsmeding> ski: that would be the Last-Modified http header, right?
2024-04-28 13:01:40 +0200 <int-e> ski: I guess [] <= undefined *could* be defined but the report defines everything in terms of `compare` and [] `compare` undefined has to be bottom
2024-04-28 13:01:48 +0200mrmr1553343(~mrmr@user/mrmr) (Quit: Bye, See ya later!)
2024-04-28 13:01:48 +0200 <ski> sounds relevant, tomsmeding
2024-04-28 13:02:13 +0200 <ski> int-e : yea, was just thinking about that, in relation to ordering on `Nat'
2024-04-28 13:02:23 +0200qqq(~qqq@92.43.167.61) (Quit: leaving)
2024-04-28 13:04:11 +0200 <ski> (well, i guess it's called `Natural' .. but lambdabot doesn't have that loaded, anymore, afaik)
2024-04-28 13:04:36 +0200 <tomsmeding> inductive peano nats?
2024-04-28 13:04:46 +0200 <ski> yes
2024-04-28 13:04:52 +0200 <tomsmeding> there are none in base and I'm salty about that
2024-04-28 13:05:34 +0200 <ski> it was nice to showcase things like `genericLength xs == (0 :: Natural)', also for infinite `xs'
2024-04-28 13:06:06 +0200 <int-e> . o O ( length' = map (const ()) )
2024-04-28 13:06:15 +0200 <tomsmeding> there is a Natural in base (in Numeric.Natural) but it's just an unsigned 'Integer'
2024-04-28 13:06:34 +0200 <int-e> (yes, I seem to be circling back to where ski started)
2024-04-28 13:10:01 +0200 <tomsmeding> (random fact: already 6378 saved snippets on the playground)
2024-04-28 13:10:37 +0200wootehfoot(~wootehfoo@user/wootehfoot)
2024-04-28 13:12:08 +0200 <ncf> length = void
2024-04-28 13:13:30 +0200wootehfoot(~wootehfoo@user/wootehfoot) (Client Quit)
2024-04-28 13:13:48 +0200paotsaq(~paotsaq@127.209.37.188.rev.vodafone.pt) (Quit: ZNC 1.9.0 - https://znc.in)
2024-04-28 13:13:59 +0200 <ncf> https://i.imgflip.com/8oapr0.jpg