Home liberachat/#haskell: Logs Calendar

Logs on 2025-04-06 (liberachat/#haskell)

00:03:54 <EvanR> on web you have a cosmic struggle between needing to use less resources and just use more resources
00:04:21 hgolden joins (~hgolden@2603:8000:9d00:3ed1:2fa6:8257:2d41:b9b0)
00:04:40 <EvanR> web apps used to be written in C!
00:05:26 <monochrom> It's not a struggle, it's a synergy! Use less resource on your server, offload it to using more resource on the customer web browser!
00:05:34 × otto_s quits (~user@p5de2f9f0.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
00:05:57 <EvanR> just send them the whole database and have them filter it
00:06:00 <monochrom> "less is more" = less burden on me is more burden on you!
00:07:14 otto_s joins (~user@p5de2fd95.dip0.t-ipconnect.de)
00:09:33 hattckory joins (~hattckory@70.27.118.207)
00:10:53 × jacopovalanzano quits (~jacopoval@cpc151911-cove17-2-0-cust105.3-1.cable.virginm.net) (Quit: Client closed)
00:19:29 × hattckory quits (~hattckory@70.27.118.207) (Ping timeout: 248 seconds)
00:30:13 × acidjnk_new3 quits (~acidjnk@p200300d6e71c4f099ca861e17b9ec3ec.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
00:31:01 hattckory joins (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca)
00:41:34 × hattckory quits (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca) (Ping timeout: 260 seconds)
00:53:39 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds)
00:53:42 amadaluzia joins (~amadaluzi@2a00:23c7:ed8b:6701:f802:c6e0:6002:2ef9)
00:55:59 × amadaluzia quits (~amadaluzi@2a00:23c7:ed8b:6701:f802:c6e0:6002:2ef9) (Client Quit)
00:56:40 amadaluzia joins (~amadaluzi@host81-159-254-182.range81-159.btcentralplus.com)
01:01:52 JuanDaugherty is now known as ColinRobinson
01:01:58 arahael joins (~arahael@user/arahael)
01:02:21 × otto_s quits (~user@p5de2fd95.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
01:04:11 otto_s joins (~user@p5de2fb60.dip0.t-ipconnect.de)
01:05:12 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
01:05:18 × Tuplanolla quits (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Quit: Leaving.)
01:07:16 × amadaluzia quits (~amadaluzi@host81-159-254-182.range81-159.btcentralplus.com) (Quit: Hi, this is Paul Allen. I'm being called away to London for a few days. Meredith, I'll call you when I get back. Hasta la vista, baby.)
01:07:38 amadaluzia joins (~amadaluzi@2a00:23c7:ed8b:6701:f802:c6e0:6002:2ef9)
01:09:32 hattckory joins (~hattckory@70.27.118.207)
01:09:58 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
01:13:55 × amadaluzia quits (~amadaluzi@2a00:23c7:ed8b:6701:f802:c6e0:6002:2ef9) (Quit: Hi, this is Paul Allen. I'm being called away to London for a few days. Meredith, I'll call you when I get back. Hasta la vista, baby.)
01:15:21 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
01:19:40 amadaluzia_ joins (~amadaluzi@2a00:23c7:ed8b:6701:f802:c6e0:6002:2ef9)
01:20:58 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
01:21:38 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Quit: peterbecich)
01:21:59 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
01:22:18 amadaluzia joins (~amadaluzi@host81-159-254-182.range81-159.btcentralplus.com)
01:23:51 × amadaluzia_ quits (~amadaluzi@2a00:23c7:ed8b:6701:f802:c6e0:6002:2ef9) (Client Quit)
01:23:51 × amadaluzia quits (~amadaluzi@host81-159-254-182.range81-159.btcentralplus.com) (Client Quit)
01:24:10 amadaluzia joins (~amadaluzi@host81-159-254-182.range81-159.btcentralplus.com)
01:24:41 amadaluzia_ joins (~amadaluzi@host81-159-254-182.range81-159.btcentralplus.com)
01:25:37 × hattckory quits (~hattckory@70.27.118.207) (Ping timeout: 248 seconds)
01:26:55 × amadaluzia_ quits (~amadaluzi@host81-159-254-182.range81-159.btcentralplus.com) (Client Quit)
01:26:55 × amadaluzia quits (~amadaluzi@host81-159-254-182.range81-159.btcentralplus.com) (Client Quit)
01:27:54 amadaluzia joins (~amadaluzi@2a00:23c7:ed8b:6701:f802:c6e0:6002:2ef9)
01:29:00 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
01:29:42 × amadaluzia quits (~amadaluzi@2a00:23c7:ed8b:6701:f802:c6e0:6002:2ef9) (Client Quit)
01:29:53 wootehfoot joins (~wootehfoo@user/wootehfoot)
01:30:13 amadaluzia joins (~amadaluzi@2a00:23c7:ed8b:6701:f802:c6e0:6002:2ef9)
01:34:14 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Ping timeout: 260 seconds)
01:37:51 × amadaluzia quits (~amadaluzi@2a00:23c7:ed8b:6701:f802:c6e0:6002:2ef9) (Quit: Hi, this is Paul Allen. I'm being called away to London for a few days. Meredith, I'll call you when I get back. Hasta la vista, baby.)
01:37:59 xff0x joins (~xff0x@2405:6580:b080:900:5d6b:27d2:3f72:9d18)
01:38:26 amadaluzia joins (~amadaluzi@2a00:23c7:ed8b:6701:f802:c6e0:6002:2ef9)
01:40:27 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
01:44:48 × machinedgod quits (~machinedg@d108-173-18-100.abhsia.telus.net) (Ping timeout: 244 seconds)
01:45:19 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds)
01:53:11 × xff0x quits (~xff0x@2405:6580:b080:900:5d6b:27d2:3f72:9d18) (Ping timeout: 252 seconds)
01:54:12 xff0x joins (~xff0x@2405:6580:b080:900:3e40:a734:5781:f378)
01:55:35 <tabaqui> While learning Elixir, I found that they have so called "pins" in pattern matching. Like, you can associate a variable with a value and then match to this variable. In Haskell, afaik, it is impossible. Is it some hard compiler restriction, or something?
01:56:22 <tabaqui> Like, in Elixir you can "x = 5; case y of ^x -> <something>".
01:56:30 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
01:56:40 <tabaqui> And it will match y to 5 without new bindings
01:56:46 <geekosaur> you use guards in Haskell
01:56:56 <geekosaur> just a quirk of the language
01:57:29 <tabaqui> Guards aren't quite the same, boolean blindness f.e.
01:57:54 <geekosaur> hypotheticslly thy could add that ability, although I suppose it would require some new pattern matching machinery; Haskell patters match structure, not values
01:58:06 × hiecaq quits (~hiecaq@user/hiecaq) (Quit: ERC 5.6.0.30.1 (IRC client for GNU Emacs 30.0.92))
01:59:16 hiecaq joins (~hiecaq@user/hiecaq)
02:00:23 × xff0x quits (~xff0x@2405:6580:b080:900:3e40:a734:5781:f378) (Quit: xff0x)
02:01:40 <monochrom> I don't know Elixir so there is no use telling me "it's called pin in Elixir".
02:01:57 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds)
02:02:16 <monochrom> But it sounds like for example "f xs@(x : xt) = (x, xs, xt)"
02:02:35 <monochrom> > case [0,1,2] of xs@(x : xt) -> (x, xs, xt)
02:02:37 <lambdabot> (0,[0,1,2],[1,2])
02:04:55 <tabaqui> monochrom: here you bind variables xs, x and t with some new values. With "pins" you can declare some variables before and then match without bindings
02:05:04 × op_4 quits (~tslil@user/op-4/x-9116473) (Remote host closed the connection)
02:05:35 op_4 joins (~tslil@user/op-4/x-9116473)
02:06:52 <tabaqui> geekosaur: Yeah, I suspect it has to do with structural matchmaking. Just wanted to make sure it's not something that could be easily added with new sugar.
02:07:23 <geekosaur> sugar wouldn't do it, no
02:08:02 × cheater quits (~Username@user/cheater) (Quit: Going offline, see ya! (www.adiirc.com))
02:08:50 hattckory joins (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca)
02:09:52 cheater joins (~Username@user/cheater)
02:10:23 <monochrom> If it is just a cute way to say "x == y", then Haskell already has ==. If it is actually as profound as full-blown Prolog unification, then consider the Curry language.
02:10:25 × cheater quits (~Username@user/cheater) (Client Quit)
02:12:15 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
02:13:01 xff0x joins (~xff0x@2405:6580:b080:900:2d8c:c4f2:3458:8ce1)
02:13:54 <geekosaur> there's also an additional complication: if you match against a literal number, it desugars to a guard, so you lose anyway
02:16:02 cheater joins (~Username@user/cheater)
02:17:24 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds)
02:17:53 <monochrom> Yeah matching against 5, whether that 5 was hardcoded or obtained during run time, is a very point-defeating example of speaking against boolean blindness.
02:19:13 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 268 seconds)
02:20:11 × cheater quits (~Username@user/cheater) (Client Quit)
02:20:22 <EvanR> the pin is like taking the value of the variable and using it as a pattern
02:20:32 <EvanR> which requires ==
02:20:44 <EvanR> it's done for you in the case of a constant pattern
02:20:50 <EvanR> laskdjfasdkfj
02:20:59 cheater joins (~Username@user/cheater)
02:21:24 <EvanR> in the case of numeric, char, string constants (anything else?)
02:22:10 <EvanR> not all data types in haskell have an == and so this wouldn't universally work like in elixir
02:22:21 <monochrom> I guess I gave Elixir way too much credit for entertaining the remote possibility that it may do something half as interesting as logic programming.
02:22:42 <monochrom> One more data point for being more cynical.
02:22:54 <EvanR> I found an interesting thing about elixir
02:22:57 <geekosaur> Char acts like an actual constructor, and String like a list of them. this guard business is specific to Num, and is why Num used to have Eq as a "superclass"
02:23:09 <EvanR> alright numeric constants
02:24:00 <EvanR> the interest thing about elixir is the === operator, which differs from == in that it doesn't convert numerics between int and float, and distinguishes -0.0 from 0.0
02:24:05 <EvanR> it follows this law
02:24:21 <EvanR> if x === y then f(x) === f(y) (assuming f is a pure function)
02:25:15 <EvanR> elixir carefully prints out its values in such a way you can't violate that law
02:25:24 × hattckory quits (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca) (Ping timeout: 260 seconds)
02:25:26 <monochrom> That's actually nice.
02:25:42 <Leary> tabaqui: There's no issue of "boolean blindness" in equality testing. Both `((== x) -> True) -> ...` and `y | x == y -> ...` are perfectly good Haskell equivalents.
02:25:48 <EvanR> as far as I could tell after an afternoon of trying
02:26:16 <Leary> Though it would be nice if we could write `pattern Is x = (== x) -> True`.
02:28:03 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
02:29:39 <geekosaur> oh, and the special handling of numeric literals is because they're functions in Haskell (wrapped in fromInteger or fromRational as appropriate)
02:32:48 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
02:38:48 <geekosaur> (I don't know if this is extended to IsString)
02:40:37 hattckory joins (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca)
02:43:51 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
02:46:13 × Square2 quits (~Square@user/square) (Ping timeout: 245 seconds)
02:51:15 × hattckory quits (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca) (Ping timeout: 276 seconds)
02:57:54 × nitrix quits (~nitrix@user/meow/nitrix) (Quit: ZNC 1.9.1 - https://znc.in)
03:11:33 hattckory joins (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca)
03:14:46 × smalltalkman quits (uid545680@id-545680.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
03:16:09 × hattckory quits (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca) (Ping timeout: 260 seconds)
03:19:52 × tomku quits (~tomku@user/tomku) (Ping timeout: 272 seconds)
03:24:02 nitrix joins (~nitrix@user/meow/nitrix)
03:26:38 tomku joins (~tomku@user/tomku)
03:36:36 × harveypwca quits (~harveypwc@2601:246:d080:f6e0:27d6:8cc7:eca9:c46c) (Quit: Leaving)
03:39:59 amadaluzia parts (~amadaluzi@2a00:23c7:ed8b:6701:f802:c6e0:6002:2ef9) (ERC 5.6.0.30.1 (IRC client for GNU Emacs 30.1))
03:48:01 hattckory joins (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca)
03:48:48 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds)
03:48:54 notdabs joins (~Owner@2600:1700:69cf:9000:58e6:6428:d346:1de6)
03:53:00 × hattckory quits (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca) (Ping timeout: 276 seconds)
03:59:33 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
04:04:44 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds)
04:15:20 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
04:18:38 × notdabs quits (~Owner@2600:1700:69cf:9000:58e6:6428:d346:1de6) (Read error: Connection reset by peer)
04:20:05 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
04:25:33 tromp joins (~textual@2001:1c00:3487:1b00:8156:72e2:e83d:bafd)
04:27:49 × tromp quits (~textual@2001:1c00:3487:1b00:8156:72e2:e83d:bafd) (Client Quit)
04:28:06 × forell quits (~forell@user/forell) (Ping timeout: 268 seconds)
04:29:06 × ColinRobinson quits (~juan@user/JuanDaugherty) (Quit: praxis.meansofproduction.biz (juan@acm.org))
04:31:06 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
04:33:25 hattckory joins (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca)
04:38:10 × hattckory quits (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca) (Ping timeout: 248 seconds)
04:56:43 hattckory joins (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca)
05:08:18 statusbot joins (~statusbot@ec2-34-198-122-184.compute-1.amazonaws.com)
05:08:39 × statusbot10 quits (~statusbot@ec2-34-198-122-184.compute-1.amazonaws.com) (Read error: Connection reset by peer)
05:09:54 × hattckory quits (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca) (Ping timeout: 260 seconds)
05:26:42 takuan joins (~takuan@d8D86B601.access.telenet.be)
05:40:24 × thuna` quits (~thuna`@user/thuna/x-1480069) (Ping timeout: 244 seconds)
05:41:25 × jmcantrell quits (~weechat@user/jmcantrell) (Quit: WeeChat 4.6.0)
05:41:25 jmcantrell_ is now known as jmcantrell
05:56:59 hattckory joins (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca)
06:01:04 wootehfoot joins (~wootehfoo@user/wootehfoot)
06:17:08 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
06:30:12 × tabaqui quits (~tabaqui@167.71.80.236) (Quit: WeeChat 4.5.2)
06:38:13 × Fangs quits (sid141280@id-141280.hampstead.irccloud.com) (Ping timeout: 248 seconds)
06:39:00 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds)
06:39:27 Fangs joins (sid141280@id-141280.hampstead.irccloud.com)
06:45:37 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 268 seconds)
06:50:19 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
06:54:31 rit joins (~rit@2409:40e0:1c:121c:589e:a7ae:8d66:baae)
06:59:32 j1n37 joins (~j1n37@user/j1n37)
07:00:00 × caconym quits (~caconym@user/caconym) (Quit: bye)
07:00:02 × tt12310978324354 quits (~tt1231@2603:6010:8700:4a81:219f:50d3:618a:a6ee) (Quit: The Lounge - https://thelounge.chat)
07:00:28 × j1n37- quits (~j1n37@user/j1n37) (Ping timeout: 252 seconds)
07:00:53 caconym joins (~caconym@user/caconym)
07:04:35 tt12310978324354 joins (~tt1231@2603:6010:8700:4a81:219f:50d3:618a:a6ee)
07:14:50 tromp joins (~textual@2001:1c00:3487:1b00:210a:3dd2:fb83:a589)
07:15:30 × tromp quits (~textual@2001:1c00:3487:1b00:210a:3dd2:fb83:a589) (Client Quit)
07:17:48 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 252 seconds)
07:18:18 Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
07:18:20 tromp joins (~textual@2001:1c00:3487:1b00:210a:3dd2:fb83:a589)
07:19:37 gadot is now known as Gadot
07:19:47 × rit quits (~rit@2409:40e0:1c:121c:589e:a7ae:8d66:baae) (Remote host closed the connection)
07:21:37 rit joins (~rit@152.58.177.31)
07:22:02 × weary-traveler quits (~user@user/user363627) (Remote host closed the connection)
07:46:07 acidjnk_new3 joins (~acidjnk@p200300d6e71c4f1475e75972aae4f669.dip0.t-ipconnect.de)
07:48:21 Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542)
07:57:09 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
08:00:55 × tromp quits (~textual@2001:1c00:3487:1b00:210a:3dd2:fb83:a589) (Quit: My iMac has gone to sleep. ZZZzzz…)
08:01:34 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
08:03:24 tromp joins (~textual@2001:1c00:3487:1b00:210a:3dd2:fb83:a589)
08:04:17 sprotte24 joins (~sprotte24@p200300d16f28a1000c1aac2cfe7f30d8.dip0.t-ipconnect.de)
08:06:12 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
08:15:13 × hattckory quits (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca) (Ping timeout: 248 seconds)
08:18:05 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
08:20:16 × krei-se quits (~krei-se@p200300f1cfff387fda9ef3fffe7fdac8.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
08:23:12 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds)
08:23:36 krei-se joins (~krei-se@p5dea1c1d.dip0.t-ipconnect.de)
08:30:40 <haskellbridge> <Liamzee> wait, this code depends on undefined behavior, right?
08:30:43 <haskellbridge> <Liamzee> https://web.archive.org/web/20200809232447/https://benchmarksgame-team.pages.debian.net/benchmarksgame/program/pidigits-ghc-5.html
08:31:06 <haskellbridge> <Liamzee> actually, you know what, i'll switch ghc versions and see if it works with 8.10
08:35:03 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
08:39:17 × XZDX quits (~xzdx@user/XZDX) (Remote host closed the connection)
08:39:44 XZDX joins (~xzdx@2601:404:ce00:4e51:214:51ff:fe2b:e82e)
08:39:49 × krei-se quits (~krei-se@p5dea1c1d.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
08:40:44 krei-se joins (~krei-se@p200300f1cfff4b46da9ef3fffe7fdac8.dip0.t-ipconnect.de)
08:41:44 × XZDX quits (~xzdx@2601:404:ce00:4e51:214:51ff:fe2b:e82e) (Changing host)
08:41:44 XZDX joins (~xzdx@user/XZDX)
08:42:35 <haskellbridge> <Liamzee> it sort of works, i don't have the optimization pass level right, and i can't figure out how ot set O2, not least because I lost access to llvm 10. Then it segfaults on the 110th digit. So, almost definitely undefined behavior
08:44:06 hattckory joins (~hattckory@70.27.118.207)
08:46:06 × rit quits (~rit@152.58.177.31) (Ping timeout: 240 seconds)
08:46:44 krei-se- joins (~krei-se@p3ee0f5ab.dip0.t-ipconnect.de)
08:47:08 × krei-se quits (~krei-se@p200300f1cfff4b46da9ef3fffe7fdac8.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
08:49:14 × hattckory quits (~hattckory@70.27.118.207) (Ping timeout: 260 seconds)
08:53:16 × acidjnk_new3 quits (~acidjnk@p200300d6e71c4f1475e75972aae4f669.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
08:53:38 × takuan quits (~takuan@d8D86B601.access.telenet.be) (Remote host closed the connection)
08:56:39 × AlexZenon quits (~alzenon@178.34.162.245) (Quit: ;-)
08:59:18 × AlexNoo quits (~AlexNoo@178.34.162.245) (Quit: Leaving)
09:04:34 lxsameer joins (~lxsameer@Serene/lxsameer)
09:11:29 × todi quits (~todi@p57803331.dip0.t-ipconnect.de) (Quit: ZNC - https://znc.in)
09:11:40 krei-se joins (~krei-se@p5dea1cf8.dip0.t-ipconnect.de)
09:12:00 × krei-se- quits (~krei-se@p3ee0f5ab.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
09:12:33 Tuplanolla joins (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi)
09:16:19 × tzh quits (~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz)
09:17:11 krei-se- joins (~krei-se@p200300f1cfff4b89da9ef3fffe7fdac8.dip0.t-ipconnect.de)
09:17:24 × krei-se quits (~krei-se@p5dea1cf8.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
09:28:41 AlexNoo joins (~AlexNoo@178.34.162.245)
09:33:55 todi joins (~todi@p57803331.dip0.t-ipconnect.de)
09:35:04 AlexZenon joins (~alzenon@178.34.162.245)
09:41:22 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds)
09:48:47 hattckory joins (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca)
09:52:23 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
09:53:36 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
09:53:45 × hattckory quits (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca) (Ping timeout: 276 seconds)
09:55:22 × TMA quits (tma@twin.jikos.cz) (Ping timeout: 252 seconds)
09:57:03 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
10:02:15 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
10:12:03 hattckory joins (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca)
10:15:49 dhil joins (~dhil@2a0c:b381:52e:3600:4c26:24b1:e3bc:1cdd)
10:16:49 × hattckory quits (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca) (Ping timeout: 248 seconds)
10:24:48 acidjnk_new3 joins (~acidjnk@p200300d6e71c4f1484dd604455bfc05c.dip0.t-ipconnect.de)
10:25:48 × tromp quits (~textual@2001:1c00:3487:1b00:210a:3dd2:fb83:a589) (Ping timeout: 245 seconds)
10:35:21 × m257 quits (msa@msa.planetofnix.com) (Quit: Still trying to figure out how bouncers work.)
10:41:47 × sprotte24 quits (~sprotte24@p200300d16f28a1000c1aac2cfe7f30d8.dip0.t-ipconnect.de) (Quit: Leaving)
10:48:11 hattckory joins (~hattckory@70.27.118.207)
10:51:33 msa joins (msa@msa.planetofnix.com)
10:53:59 __monty__ joins (~toonn@user/toonn)
10:55:06 <ski> Elixir borrowed this from Erlang, which got it from Prolog. in the two latter, there is no explicit annotation for "don't shadow, match on value of variable", rather this always happens, if the variable is already in scope. iirc Oz does have a specific notation for getting a "read-only" view of a logic variable, which you can't instantiate, though
10:56:12 <ski> (useful when you want to hand of the not-yet-instantiated result of a computation, e.g. to another thread (or just callback, say), not allowing it to instantiating it, only inspecting its value)
11:02:02 jespada joins (~jespada@r179-25-205-222.dialup.adsl.anteldata.net.uy)
11:04:34 × hattckory quits (~hattckory@70.27.118.207) (Ping timeout: 260 seconds)
11:09:33 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds)
11:14:12 hattckory joins (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca)
11:20:43 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
11:26:03 × lxsameer quits (~lxsameer@Serene/lxsameer) (Ping timeout: 244 seconds)
11:34:30 × acidjnk_new3 quits (~acidjnk@p200300d6e71c4f1484dd604455bfc05c.dip0.t-ipconnect.de) (Ping timeout: 272 seconds)
11:35:48 × hattckory quits (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca) (Ping timeout: 276 seconds)
11:44:26 tremon joins (~tremon@83.80.159.219)
12:15:11 hattckory joins (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca)
12:19:50 <haskellbridge> <thirdofmay18081814goya> hm. is there any construct, or monad, that allows you to extract information about where "let ... = ..." statements are within the value?
12:20:01 × hattckory quits (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca) (Ping timeout: 248 seconds)
12:20:29 <haskellbridge> <thirdofmay18081814goya> the value being a value of type "m ()" with "Monad m" (or something like it)
12:20:33 <merijn> I don't understand what that even means?
12:21:08 <merijn> How would you even query that?
12:22:18 <int-e> there's TemplateHaskell
12:22:28 <merijn> int-e: That leaves my 2nd question :p
12:22:38 <merijn> So I guess the real issue here is: What is your actual problem?
12:22:50 <merijn> Because this sounds like an X-Y problem :)
12:28:05 sprotte24 joins (~sprotte24@p200300d16f28a1000c1aac2cfe7f30d8.dip0.t-ipconnect.de)
12:31:01 Square2 joins (~Square@user/square)
12:31:16 <haskellbridge> <thirdofmay18081814goya> merijn: well that's my own question and the problem of interest, but spitballing a bit, some variation of an "Accum [(Int, ?)] m" monad where the bind "m a -> (a -> m b) -> m b" adds a value "(Int, b)" to the accumulated stack, where the "Int" value tracks how many binds there have been so far, and disallowing (somehow?) "let _ = _" without "in".
12:31:48 <haskellbridge> <thirdofmay18081814goya> "[(Int, ?)]" being a type of list of pairs heterogeneous on the right side
12:32:14 <haskellbridge> <thirdofmay18081814goya> int-e: I've been thinking about digging into it for this sort of thing yeah
12:32:16 <merijn> Does that even obey the Monad laws?
12:33:54 <haskellbridge> <thirdofmay18081814goya> i would believe so, seems to me that this is a slight variation on a state monad
12:34:21 <merijn> I mean, simple counter example
12:34:28 hattckory joins (~hattckory@70.27.118.207)
12:34:43 <merijn> Your description seems to violate "x >>= pure" being the same as "x"
12:36:40 <haskellbridge> <thirdofmay18081814goya> hm
12:41:59 × hattckory quits (~hattckory@70.27.118.207) (Ping timeout: 260 seconds)
12:49:30 <Leary> A let statement is just the first half of a let-in expression obscured by sugar.
12:50:24 <Leary> As for counting binds, iirc you can do it lawfully if `pure` has -1.
12:50:51 <merijn> Leary: no
12:51:08 <merijn> hmm, actually, maybe that no longer violates my example
12:51:15 <merijn> But I'm not convinced that's lawful
12:53:32 TMA joins (tma@twin.jikos.cz)
12:56:31 × hiecaq quits (~hiecaq@user/hiecaq) (Quit: ERC 5.6.0.30.1 (IRC client for GNU Emacs 30.0.92))
13:01:07 <haskellbridge> <thirdofmay18081814goya> merijn: a first and probably wrong attempt: "doval :: MyAccumMonad [(Int, Int + a)] ()", "doval = do x <- double 7; y <- x + 1; pure ()" s.t. it produces a value "((), [(0, Fst 14), (1, Fst 15)])", where "data a + b = Fst a | Snd b". could we do some version of "pure x = (x, [])"?
13:01:35 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Quit: leaving)
13:02:02 hattckory joins (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca)
13:02:37 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
13:04:10 <ski> is `x' there an `Int', or ?
13:04:25 jacopovalanzano joins (~jacopoval@cpc151911-cove17-2-0-cust105.3-1.cable.virginm.net)
13:04:37 <haskellbridge> <thirdofmay18081814goya> you're right that "x + 1" doesn't typecheck
13:05:14 <ski> perhaps you means `y <- pure (x + 1)' in place of `y <- x + 1'
13:05:31 <ski> or perhaps some other function in place of `pure'
13:06:25 × hattckory quits (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca) (Ping timeout: 248 seconds)
13:07:12 <haskellbridge> <thirdofmay18081814goya> right good observation, I'll think about whether this could be salvaged at all
13:08:25 <merijn> Maybe take a stepback and tell us what you're trying to accomplish :)
13:09:07 <haskellbridge> <thirdofmay18081814goya> ultimately, logging that's not syntax-intrusive
13:09:40 <haskellbridge> <thirdofmay18081814goya> or more specifically: whether this necessarily needs to be a metaprogram, or whether this can be done internally to the type system
13:29:38 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection)
13:30:02 ChaiTRex joins (~ChaiTRex@user/chaitrex)
13:45:54 forell joins (~forell@user/forell)
13:51:44 <ski> logging what ?
13:52:00 <ski> you could have an explicit logging-operation, you know ?
13:52:45 × rvalue quits (~rvalue@user/rvalue) (Read error: Connection reset by peer)
13:52:56 hattckory joins (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca)
13:53:18 rvalue joins (~rvalue@user/rvalue)
13:56:25 amadaluzia joins (~amadaluzi@user/amadaluzia)
13:58:09 × hattckory quits (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca) (Ping timeout: 276 seconds)
14:11:43 hattckory joins (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca)
14:17:59 ljdarj1 joins (~Thunderbi@user/ljdarj)
14:18:57 × hattckory quits (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca) (Ping timeout: 248 seconds)
14:20:54 × ljdarj quits (~Thunderbi@user/ljdarj) (Ping timeout: 244 seconds)
14:20:54 ljdarj1 is now known as ljdarj
14:27:19 milan joins (~milan@88.212.61.169)
14:35:09 hattckory joins (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca)
14:44:18 smalltalkman joins (uid545680@id-545680.hampstead.irccloud.com)
14:45:39 × hattckory quits (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca) (Ping timeout: 260 seconds)
14:53:22 × hacklschorsch quits (~flo@2a01:4f9:3a:2296::2) (Ping timeout: 272 seconds)
14:58:00 × segfaultfizzbuzz quits (~segfaultf@23-93-74-222.fiber.dynamic.sonic.net) (Quit: segfaultfizzbuzz)
15:00:51 hattckory joins (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca)
15:01:46 Guest21 joins (~Guest21@2600:6c4c:787f:a0a4:d65b:f01e:6eda:2fac)
15:05:45 × hattckory quits (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca) (Ping timeout: 276 seconds)
15:07:00 × Guest21 quits (~Guest21@2600:6c4c:787f:a0a4:d65b:f01e:6eda:2fac) (Quit: Client closed)
15:07:22 acidjnk_new3 joins (~acidjnk@p200300d6e71c4f1484a8b96e5b185115.dip0.t-ipconnect.de)
15:12:52 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
15:15:52 mauke joins (~mauke@user/mauke)
15:18:58 __jmcantrell__ joins (~weechat@user/jmcantrell)
15:25:11 amadaluzia_ joins (~amadaluzi@host81-159-254-182.range81-159.btcentralplus.com)
15:26:50 × amadaluzia_ quits (~amadaluzi@host81-159-254-182.range81-159.btcentralplus.com) (Changing host)
15:26:50 amadaluzia_ joins (~amadaluzi@user/amadaluzia)
15:31:43 tromp joins (~textual@2001:1c00:3487:1b00:c873:d422:44c2:cc0c)
15:48:12 × picnoir quits (~picnoir@about/aquilenet/vodoo/NinjaTrappeur) (Quit: WeeChat 4.5.1)
15:49:56 picnoir joins (~picnoir@about/aquilenet/vodoo/NinjaTrappeur)
15:51:49 × dhil quits (~dhil@2a0c:b381:52e:3600:4c26:24b1:e3bc:1cdd) (Ping timeout: 248 seconds)
16:01:38 × acidjnk_new3 quits (~acidjnk@p200300d6e71c4f1484a8b96e5b185115.dip0.t-ipconnect.de) (Ping timeout: 245 seconds)
16:02:26 hattckory joins (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca)
16:07:40 target_i joins (~target_i@user/target-i/x-6023099)
16:08:59 jmcantrell is now known as Guest7797
16:08:59 × Guest7797 quits (644f1bed9a@user/jmcantrell) (Killed (copper.libera.chat (Nickname regained by services)))
16:08:59 __jmcantrell__ is now known as jmcantrell
16:09:08 jmcantrell_ joins (644f1bed9a@user/jmcantrell)
16:14:54 <monochrom> Counting binds does not break the associative law, it just can break the identity laws. But with pure contributing -1, (m >>= pure) has the same count as m because you have x+1-1. SImilarly for the other identity law.
16:15:22 <monochrom> But I don't like to tell people about this. Counting binds is every beginners favourite anti-monad anti-pattern.
16:15:45 × hattckory quits (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca) (Ping timeout: 248 seconds)
16:20:01 <monochrom> This is what the model "monad/>>= is programmable semicolon" gets right. In C programming, do people even imagine writing a program that counts its own lines of code?
16:22:52 toby-bro joins (~toby-bro@user/toby-bro)
16:24:19 <enikar> why one would want to count bind?
16:24:34 <ski> dubious reasons
16:24:51 <enikar> I don't understand the use case.
16:24:52 <monochrom> :)
16:26:58 × amadaluzia quits (~amadaluzi@user/amadaluzia) (Ping timeout: 244 seconds)
16:27:12 <monochrom> Not to endorse it, but presumably the monad also does something else, and the author hides a counter increment in bind as a proxy to count cost.
16:27:42 <enikar> let monads do their job :)
16:27:50 <monochrom> Of course we know the right way is to hide the counter increment is the something else.
16:28:06 <monochrom> s/is the/in the/
16:28:32 <ski> i recall doing a CGI monad, which had an `io :: (Show a,Read a) => IO a -> CGI a' operation, caching the result of `IO' operations, serializing them into the generated page (when a query was generated), so that the program could then be resumed, fastforwarded to the point where it left off, to continue on
16:29:21 <ski> it sounded like thirdofmay18081814goya wanted something a bit reminiscent of the caching part, but for every bind automatically
16:33:46 <monochrom> Spin-off exercise: Suppose x +++ y = x + y + 1. Prove that +++ is a monoid operation with -1 as the identity. >:)
16:36:05 hattckory joins (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca)
16:37:19 ski idly ponders making this into a word group
16:37:21 <mauke> and inverse x' = -x - 2?
16:37:40 × __monty__ quits (~toonn@user/toonn) (Quit: Lost terminal)
16:39:11 <ski> i suppose you could take coproduct of the given group, and the group of integers
16:39:39 <ski> (note, arbitrary groups, not abelian ones)
16:42:06 <ski> hmm .. no, that doesn't quite work. coproduct would identify the neutral elements of the two groups
16:42:57 <ski> but we want the neutral element of the given group to be identified with `-1', not with `1', of the group of integers
16:43:49 <ski> er .. i suppose, not with `0'. same issue, though
16:53:22 × tromp quits (~textual@2001:1c00:3487:1b00:c873:d422:44c2:cc0c) (Quit: My iMac has gone to sleep. ZZZzzz…)
17:00:54 ss4 joins (~wootehfoo@user/wootehfoot)
17:01:13 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
17:01:31 × ss4 quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
17:03:32 __monty__ joins (~toonn@user/toonn)
17:04:04 emojelly joins (~eselber_p@user/endojelly)
17:04:42 <emojelly> So I have the following function in my type class:
17:04:44 <emojelly> class MonadTransControl t => MonadTransCombine t where
17:04:46 <emojelly> ...
17:04:48 <emojelly> combineC :: forall m1 m2 a1 a2. (t m1 a1) -> (t m2 a2) -> Maybe (StT t a1) -> Maybe (StT t a2) -> StT t (Maybe a1, Maybe a2)
17:05:36 <emojelly> Those first two arguments, of type (t m1 a1) and (t m2 a2), are only there to disambiguate the type. Otherwise, ghc complains that all the "St t"s are ambiguous.
17:05:37 tzh joins (~tzh@c-76-115-131-146.hsd1.or.comcast.net)
17:05:55 <emojelly> Is there a more elegant way to do that, than passing arguments which are not actually used for anything?
17:06:42 <emojelly> All the information about the (t m1 a1) and (t m2 a2) are containing in (StT t a1) (StT t a2) respectively, that's pretty much their point.
17:07:30 <c_wraith> with that particular class definition, all that you normally should need to disambiguate is t
17:08:24 <c_wraith> unless StT is a type family?
17:09:06 <emojelly> it is, yeah!
17:09:16 <c_wraith> well that makes it a ton more complicated.
17:09:33 <emojelly> It's actually a type family from MonadTransControl (which is a relatively common class), but it's the same if I define it myself of course.
17:09:51 <c_wraith> But you still should only need to disambiguate t itself somehow, not m1 m2 a1 or a2
17:10:03 <emojelly> Yeah. I've been wondering about using proxies... but then I think I have to pass a Proxy instead?
17:10:26 <emojelly> Yeah that's possible... I don't quite remember if I had to disambiguate both.
17:11:01 <haskellbridge> <hellwolf> options:
17:11:01 <haskellbridge> ... long message truncated: https://kf8nh.com/_heisenbridge/media/kf8nh.com/JYSfMNZqjiXzhkfTeJfRrGsX/9kwQ5Tzz6so (4 lines)
17:14:41 <emojelly> Type applications seem at least a bit cleaner than "gratuitous" arguments...
17:14:45 <emojelly> How can I do 1.?
17:15:54 <emojelly> I know very little about the theory behind the system, I guess the class does not unify "t" across all its definitions somehow...
17:16:19 <c_wraith> the problem is that it never actually uses t in the definition of combineC
17:16:22 <haskellbridge> <hellwolf> class A a b | a -> b
17:16:22 <haskellbridge> This means that knowing "a" uniquely determins "b"
17:16:26 <emojelly> (have to run, will read later, thanks for the help so far!)
17:16:34 <haskellbridge> <hellwolf> GHC will check that
17:16:45 <c_wraith> err, in the type of
17:16:47 <haskellbridge> <hellwolf> type family has similar mechanism; which has its own limitation.
17:16:50 <emojelly> yeah but I'm not sure how to use a fundep here when there's only a single type?
17:17:00 <c_wraith> But it needs to know what t is to select an instance
17:17:22 <haskellbridge> <hellwolf> I don't know if it applies to your case. But I do see "StT t a1", I wonder what is StT.
17:17:35 <emojelly> It's a type family
17:17:46 <haskellbridge> <hellwolf> then you may use typefamilydependencies
17:17:58 <haskellbridge> <hellwolf> but there is a lot of limitations, usually it won't work for you
17:18:03 <emojelly> for illustration, pretend the same class would define:
17:18:05 <emojelly> type StT t a :: *
17:18:11 <haskellbridge> <hellwolf> check the doc, it has a list of rules when you can or cannot define dependencies
17:18:41 <emojelly> (StT is actually coming from MonadTransControl, but shouldn't matter)
17:18:57 <emojelly> ok, really gotta run now, but I'll read if there's anything more! Thanks again for the help so far!
17:21:14 <haskellbridge> <hellwolf> okay. https://hackage.haskell.org/package/monad-control-1.0.3.1/docs/src/Control.Monad.Trans.Control.html#StT
17:21:15 <haskellbridge> ... long message truncated: https://kf8nh.com/_heisenbridge/media/kf8nh.com/yxUTAVDLAhEYmWfAmyqvumAm/BKPqvW_Oq7A (4 lines)
17:21:43 <haskellbridge> <hellwolf> unless it's really polymorphic to any m1 m2, then for a good reason, you will need to use type applications
17:23:23 <haskellbridge> <hellwolf> with 9.10, you have an alternative syntax (which will be used for even more complicated use case) that is RequiredTypeArguments (or vdq, mouthfully, visible dependent quantification)
17:24:05 <haskellbridge> <hellwolf> with typeapplication, the annoying thing is that you need to know what's the order of the type variables, with type class's type variables come first. you can also use @_ to skip ones that you don't care
17:24:16 <haskellbridge> <hellwolf> with vdq, it's part of the regular currying order.
17:30:00 weary-traveler joins (~user@user/user363627)
17:32:58 <milan> Hello I just found I can pattern match on cons (:) and I can't on add (+). I managed to find that cons is constructor and add is just function. How can I in ghci find what functions are also constructors and thus can be used in pattern matching?
17:34:07 <haskellbridge> <hellwolf> > :! Maybe
17:34:18 <haskellbridge> <hellwolf> :i Maybe
17:34:32 XZDX is now known as XZDX_afk
17:34:40 <geekosaur> leave a blank line. but lambdabot doesn't understand :i anyway
17:35:08 tromp joins (~textual@2001:1c00:3487:1b00:c873:d422:44c2:cc0c)
17:35:09 <haskellbridge> <geekosaur> %% :i Maybe
17:35:21 <haskellbridge> <geekosaur> oh, crap, they removed that again
17:35:58 <hellwolf> %% :i Maybe
17:35:59 <yahb2> https://paste.tomsmeding.com/AtPoarKA
17:36:12 <geekosaur> (whether the bridge lets that work or npot seems to depend on version, and they don't provide config for it)
17:36:58 <hellwolf> yahb2 is just one regex away from AGI
17:37:17 <mauke> milan: if it starts with : it's a constructor
17:37:23 <mauke> or an uppercase letter
17:38:39 <hellwolf> type name can also start with ":", right?
17:38:58 <mauke> > case sqrt (-2) of x :+ y -> show x <> " + " <> show y <> "i"
17:39:00 <lambdabot> "0.0 + 1.4142135623730951i"
17:39:31 <mauke> type names are weird now
17:40:36 econo_ joins (uid147250@id-147250.tinside.irccloud.com)
17:40:46 <mauke> I think all symbols can be used at the start of type names
17:46:42 <hellwolf> https://www.haskell.org/onlinereport/haskell2010/haskellch10.html#x17-17700010.2 <-- is that even part of haskell2012
17:46:46 <hellwolf> *2010
17:48:24 <geekosaur> TypeOperators is default these days, I think? (at least if you turn on NoStarIsType so they're available)
17:48:33 <geekosaur> …if that's the question
17:50:00 × tromp quits (~textual@2001:1c00:3487:1b00:c873:d422:44c2:cc0c) (Quit: My iMac has gone to sleep. ZZZzzz…)
17:51:29 <milan> mauke: Thanks
17:53:28 <hellwolf> I see. I didn't realize it was an language extension.
17:54:36 <geekosaur> pretty much anything related to type level stuff is an extension
17:54:46 <kqr> merijn, late response, sorry. how do I dump out a GC report? is that -s? I mean yes, practically speaking, building the data structure currently takes 250 MB, but I there's no theoretical reason it should take significantly more space to build it than represent it.
17:57:20 × Square2 quits (~Square@user/square) (Remote host closed the connection)
17:57:48 <monochrom> milan: Data constructors start with capital letters, e.g., "Just" rather than "just"; or in the symbol case start with colon, e.g., ":+" rather than "+".
17:58:24 <monochrom> Oh, already answered, heh.
17:58:26 Square joins (~Square@user/square)
17:59:57 <milan> monochrom: Thank you.
18:00:36 <milan> Could + be defined as constructor too?
18:01:34 <monochrom> I am somewhat uncertain what that would mean, but likely no.
18:03:19 <hellwolf> no. term level has a clear rule: only infix type constructors may start with (:). see https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/infix_tycons.html#infix-tycons. What's not clear to me is that is it part of haskell2010.
18:03:50 <hellwolf> oh, also, "which are required to begin with a :."
18:03:54 <hellwolf> goes both ways.
18:04:32 <hellwolf> term level functions or variables may not start with (:)
18:06:06 tromp joins (~textual@2001:1c00:3487:1b00:c873:d422:44c2:cc0c)
18:08:17 j1n37- joins (~j1n37@user/j1n37)
18:09:30 × j1n37 quits (~j1n37@user/j1n37) (Ping timeout: 268 seconds)
18:15:54 Guest94 joins (~Guest94@2402:8100:2713:dce3:44d2:5f5e:34e2:9148)
18:16:41 × Guest94 quits (~Guest94@2402:8100:2713:dce3:44d2:5f5e:34e2:9148) (Client Quit)
18:19:01 pavonia joins (~user@user/siracusa)
18:23:18 × toby-bro quits (~toby-bro@user/toby-bro) (Ping timeout: 252 seconds)
18:28:49 michalz joins (~michalz@185.246.207.215)
18:36:40 × tromp quits (~textual@2001:1c00:3487:1b00:c873:d422:44c2:cc0c) (Quit: My iMac has gone to sleep. ZZZzzz…)
18:38:01 acidjnk_new3 joins (~acidjnk@p200300d6e71c4f1484a8b96e5b185115.dip0.t-ipconnect.de)
18:41:22 lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4)
18:41:32 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Client Quit)
18:41:50 tromp joins (~textual@2001:1c00:3487:1b00:c873:d422:44c2:cc0c)
18:48:32 XZDX_afk is now known as XZDX
18:49:25 × forell quits (~forell@user/forell) (Ping timeout: 248 seconds)
18:50:30 forell joins (~forell@user/forell)
19:00:04 × caconym quits (~caconym@user/caconym) (Quit: bye)
19:00:45 caconym joins (~caconym@user/caconym)
19:06:45 kathryn1024_ joins (~kathryn10@user/kathryn1024)
19:17:45 |cos| joins (~libera@loza.netizen.se)
19:17:46 amadaluzia joins (~amadaluzi@user/amadaluzia)
19:19:54 |cos| sees koala_man lists this channel in relation to shellcheck, and my question is in relation to those two topics. (anyone may answer)
19:21:07 <|cos|> i'm naively looking at building shellcheck on haiku. the docs says it requires haskell. haiku has some hugs98 implementation of haskell.
19:21:51 <|cos|> should one understand that shellcheck practically needs ghc, or is there more than a snowflakes chance in hell to succeed a build with hugs98?
19:22:01 toby-bro joins (~toby-bro@user/toby-bro)
19:23:32 <|cos|> when it comes to haskell i'm lost in general, and specifically for building shellcheck i get stuck at not having something called `cabal`
19:25:46 <EvanR> cabal comes with ghc
19:26:06 <EvanR> it's the build system
19:26:32 <EvanR> but "all it does" is issue compiler commands
19:26:51 <EvanR> it's not strictly necessary to compile something
19:35:13 <mauke> cabal used to support hugs, at least early on, right?
19:35:33 <EvanR> does hugs even "build" stuff?
19:36:10 <mauke> |cos|: you're probably not going to have much luck there. hugs is a haskell interpreter (written in C), so there's not much "building" you're going to get out of it
19:36:54 ham joins (~ham@user/ham)
19:37:08 <mauke> also, there hasn't been a hugs release in the last ... 20 years?
19:37:37 <|cos|> i figured the answer would be something like this, but it never hurts to ask. thanks! (:
19:37:49 × remexre quits (~remexre@user/remexre) (Remote host closed the connection)
19:38:18 <mauke> basically, anything not explicitly written in what amounts to an ancient haskell dialect won't run on it
19:38:46 <|cos|> the next question, probably with a similar answer, then becomes: would one have any hope of running ghc on top of haiku?
19:38:56 <EvanR> written in C is good because at least you won't need a working haskell compiler to compiler hugs
19:39:33 <mauke> wait, was haiku the beos thing?
19:39:58 <|cos|> typ, that's the thing. and i notice there is a thread at https://discuss.haiku-os.org/t/ghc-haskell-compiler/677
19:42:25 <EvanR> yes
19:43:01 <EvanR> can GHC be ported to haiku, yes
19:43:22 <EvanR> will you or me be the one to do it? situation unclear
19:48:44 <monochrom> Very clear, the answer is "no". :)
19:49:08 <|cos|> it appears to be more of a bug fix than a full port, according to that thread. but, yeah. answer is likely still no.
19:49:30 <EvanR> well that thread is 15 years old
19:49:39 <EvanR> none of the information may be relevant
19:51:58 <energizer> what is the difference between mconcat and fold?
19:52:12 <EvanR> :t mconcat
19:52:13 <lambdabot> Monoid a => [a] -> a
19:52:15 <EvanR> :t fold
19:52:16 <lambdabot> (Foldable t, Monoid m) => t m -> m
19:52:38 <energizer> what is the point of mconcat then? doesn't fold do the job?
19:52:46 <|cos|> the thread might have started fiftheen years ago, but the latest post is merely four years old.
19:53:05 <EvanR> Foldable is a lot newer in history than Monoid
19:53:28 <EvanR> so it's one of many cases of more general library functions becoming available and the special cases not being removed so as not to break anything
19:54:02 <|cos|> but nah. i'm not invested enough to debug and fix assembler generation specific to x86_64. :/
19:54:46 × hgolden quits (~hgolden@2603:8000:9d00:3ed1:2fa6:8257:2d41:b9b0) (Remote host closed the connection)
19:55:18 <EvanR> see also the debate over whether "map" is pointless since there is fmap
19:58:12 inca joins (~inca@pool-96-255-212-224.washdc.fios.verizon.net)
19:58:46 hgolden joins (~hgolden@2603:8000:9d00:3ed1:1b03:b08c:d961:6530)
20:03:40 × inca quits (~inca@pool-96-255-212-224.washdc.fios.verizon.net) (Ping timeout: 252 seconds)
20:05:45 × ham quits (~ham@user/ham) (Quit: WeeChat 3.5)
20:06:57 × Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Quit: Leaving)
20:11:00 × AlexZenon quits (~alzenon@178.34.162.245) (Ping timeout: 252 seconds)
20:16:07 inca joins (~inca@pool-96-255-212-224.washdc.fios.verizon.net)
20:18:29 AlexZenon joins (~alzenon@178.34.162.245)
20:21:19 × inca quits (~inca@pool-96-255-212-224.washdc.fios.verizon.net) (Ping timeout: 244 seconds)
20:36:40 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
20:41:11 IlyaChernov566 joins (~IlyaChern@82.215.95.81)
20:43:03 <IlyaChernov566> I, for one, think Elon is doing a wonderful job
20:43:27 <EvanR> this channel is about haskell, a programming language
20:43:34 × IlyaChernov566 quits (~IlyaChern@82.215.95.81) (Remote host closed the connection)
20:48:47 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
20:48:49 JuanDaugherty joins (~juan@user/JuanDaugherty)
20:50:25 × michalz quits (~michalz@185.246.207.215) (Remote host closed the connection)
20:55:44 sh1n joins (~sh1n@2800:2134:583f:e223:7b49:e90d:6522:419d)
20:55:45 × 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)
20:57:57 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
20:58:14 Guest90 joins (~Guest90@76.78.179.109)
20:59:12 inca joins (~inca@pool-96-255-212-224.washdc.fios.verizon.net)
21:04:01 × inca quits (~inca@pool-96-255-212-224.washdc.fios.verizon.net) (Ping timeout: 268 seconds)
21:08:48 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
21:10:49 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
21:11:23 troydm joins (~troydm@user/troydm)
21:14:34 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
21:16:21 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds)
21:24:58 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 245 seconds)
21:26:35 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
21:27:09 <hellwolf> I made a lineartype mutable vector hack for https://0xd34df00d.me/posts/2024/09/naive-nfas.html#linear-vectors
21:27:22 <hellwolf> now it is almost as fast as the ST monad version.
21:28:04 <hellwolf> not sure where contributing to the remaining the slow factor
21:31:33 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
21:32:17 <EvanR> confirmed linearity probably doesn't bear on performance in haskell
21:32:30 <EvanR> it's more of a type system thing
21:33:03 <haskellbridge> <hellwolf> I can't come up with a something that can show case linearity + par/pseq yet
21:33:09 <haskellbridge> <hellwolf> that's where ST monad wouldn't be able to do
21:33:48 <EvanR> parallel programming ought to bear on performance
21:33:56 <haskellbridge> <hellwolf> but I do generally agree that linearity is a type safety feature.
21:34:20 <haskellbridge> <hellwolf> and there is a lot of millage we could get with it.
21:34:39 <haskellbridge> <hellwolf> I did this experiment because I wanted to make sure it doesn't have fundamental performance issue.
21:34:54 <haskellbridge> <hellwolf> in theory, it shouldn't. But in practice, it lacks a few library.
21:35:02 <haskellbridge> <hellwolf> especially the unboxed immutable data types.
21:35:15 <haskellbridge> <hellwolf> that's why I made the hack to just see if I am missing sometthing
21:35:33 <haskellbridge> <hellwolf> I will wrap up the code a little and share it here.
21:35:37 <EvanR> using unsafe such and such maybe you can write the library
21:35:56 <haskellbridge> <hellwolf> yea, not I used unsafe with mutable unboxed vector
21:36:08 <haskellbridge> <hellwolf> s/not//
21:37:04 <EvanR> interesting that the unboxed code ended up with a tight gc-less loop
21:37:17 <EvanR> good for performance, but bad for interruptibility
21:38:15 <haskellbridge> <hellwolf> If the language allow you to organize code into safe and unsafe blocks nicely, I think that is fine.
21:38:45 <EvanR> the unsafe kernel of trust hidden in an "internal" module with a type safe interface
21:38:49 × amadaluzia quits (~amadaluzi@user/amadaluzia) (Ping timeout: 260 seconds)
21:38:56 <haskellbridge> <hellwolf> Some people may even push for complete separation of syntax and semantics
21:39:10 amadaluzia joins (~amadaluzi@user/amadaluzia)
21:39:21 <monochrom> We were hoping that IO was how we would organize code into safe and unsafe blocks. :)
21:39:46 <haskellbridge> <hellwolf> that's boomer tech
21:39:49 <haskellbridge> <hellwolf> :p
21:40:03 <EvanR> if the non IO language was total then maybe, but still probably not
21:40:30 <monochrom> What happens is that different people define "safe" differently.
21:40:58 <monochrom> E.g., I totally (pun!) accept partial functions as safe. Apparently I'm in the minority.
21:41:00 <haskellbridge> <hellwolf> https://safe.js.org/
21:41:14 <haskellbridge> <hellwolf> sorry, that was a random post.
21:41:18 <c_wraith> Safe Haskell kind of crashed and burned because no one agrees what safe means
21:41:34 <EvanR> my webserver is totally safe. Somebody uploads a request which triggers a partial function call leading to freeze up
21:41:47 <c_wraith> my web server is totally safe, because I didn't start it.
21:42:20 <EvanR> safe -> js -> Void
21:42:22 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
21:43:27 <EvanR> "safe" gets brought up in conjunction with rust, maybe they have a definition
21:43:54 <monochrom> Why do I feel that "complete separation of syntax and semantics" is the definition of cryptography? :)
21:44:16 <EvanR> I'm not sure what an example of incomplete separation of syntax and semantics is
21:45:32 <EvanR> even in lisp, if you try, you'll see it's two different things
21:45:47 inca joins (~inca@pool-96-255-212-224.washdc.fios.verizon.net)
21:46:08 <haskellbridge> <hellwolf> but back to the linearity + parallelism, I do believe there can be an inspirational example where linearity provides reasource safety and convenience of coding (no need for monads), while parallism using par/pseq gives it the ultimate edge over ST monad.
21:46:20 <haskellbridge> <hellwolf> another day..
21:47:12 × tromp quits (~textual@2001:1c00:3487:1b00:c873:d422:44c2:cc0c) (Quit: My iMac has gone to sleep. ZZZzzz…)
21:47:32 <EvanR> monads and linear types aren't mutually exclusive competing things
21:47:34 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 272 seconds)
21:47:36 × kathryn1024_ quits (~kathryn10@user/kathryn1024) (Ping timeout: 264 seconds)
21:48:17 <EvanR> linear base has several linear monads
21:48:54 <hellwolf> monad necessarily sequentialize things.
21:49:06 <EvanR> no?
21:49:27 <monochrom> The Identity Monad doesn't sequentialize things.
21:50:13 <monochrom> What you want to state instead is that there is no guarantee that an arbitrary monad doesn't sequentialize things.
21:50:15 <EvanR> e.g. Par is a monad
21:50:50 <monochrom> But one is really better off talking about one particular monad rather than general statements.
21:51:26 <c_wraith> What's funny is that if you take Identity and change it from newtype to data, leaving all the function definitions the same... it suddenly starts strongly ordering in >>=
21:52:29 <EvanR> probably a bug in "what is sequentialize even"
21:52:34 <monochrom> OK, what you want to state instead is that monads necessarily adds data dependency.
21:52:55 <EvanR> does it?
21:53:13 <monochrom> (But Tardis would be an example where data dependency does not imply control flow sequentiency.)
21:53:33 <c_wraith> Eh. It adds the opportunity for a data dependency
21:53:50 <monochrom> OK right right.
21:53:58 × forell quits (~forell@user/forell) (Ping timeout: 268 seconds)
21:54:08 <dolio> Data Identity doesn't really sequence things, either. At least, you aren't specified to be able to rely on it.
21:55:04 <monochrom> Also, I used to have much fun with left recursion with Control.Monad.State.Lazy.
21:55:26 <dolio> I think.
21:55:57 <c_wraith> It depends on how >>= is implemented. If it pattern matches its left argument, it does guarantee sequential evaluation to at least that constructor.
21:56:13 <c_wraith> But it had better document how it's implemented.
21:56:44 <koala_man> |cos|: it's hard enough to try to stay compatible with different GHC versions, let alone anything else. if you have Wine then you could try running the windows binary
21:56:45 <dolio> I'm not certain that if you have multiple binds that the compiler can see, it isn't allowed to reorder them and stuff.
21:56:47 <c_wraith> (the big difference here is that pattern-matching a data constructor causes evaluation, but matching a newtype constructor is a no-op)
21:58:09 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
21:58:16 <EvanR> > error "hmm" >>= error "haw" :: Identity Char
21:58:17 <lambdabot> Identity *Exception: haw
21:58:29 <EvanR> > error "hmm" >>= error "haw" :: IO Char
21:58:30 <lambdabot> <IO Char>
21:58:37 <EvanR> lol
21:58:44 <monochrom> You will need yahb2 for that.
21:58:53 <monochrom> > putStrLn "<IO ()>"
21:58:55 <lambdabot> <IO ()>
21:59:04 <EvanR> % error "hmm" >>= error "haw" :: IO Char
21:59:04 <yahb2> *** Exception: hmm ; ; HasCallStack backtrace: ; error, called at <interactive>:53:1 in interactive:Ghci12
22:00:04 × gmg quits (~user@user/gehmehgeh) (Remote host closed the connection)
22:00:46 gmg joins (~user@user/gehmehgeh)
22:03:12 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
22:04:05 ljdarj1 joins (~Thunderbi@user/ljdarj)
22:07:24 × ljdarj quits (~Thunderbi@user/ljdarj) (Ping timeout: 260 seconds)
22:07:24 ljdarj1 is now known as ljdarj
22:11:02 <hellwolf> here you go: https://github.com/hellwolf/haskell-examples/blob/master/2025-04-07-nfa-unboxed-linearity/nfa-perf.hs will share to discourse tomorrow with a few more details. feedback welcome.
22:13:56 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
22:16:30 × target_i quits (~target_i@user/target-i/x-6023099) (Quit: leaving)
22:18:20 × Guest90 quits (~Guest90@76.78.179.109) (Quit: Client closed)
22:19:15 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds)
22:29:51 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
22:39:01 <|cos|> koala_man: understandable! i wasn't really expecting it to be possible. the wine-idea is a creative approach!
22:39:07 × jacopovalanzano quits (~jacopoval@cpc151911-cove17-2-0-cust105.3-1.cable.virginm.net) (Quit: Client closed)
22:45:12 × inca quits (~inca@pool-96-255-212-224.washdc.fios.verizon.net) (Ping timeout: 272 seconds)
22:52:52 inca joins (~inca@pool-96-255-212-224.washdc.fios.verizon.net)
22:57:29 × inca quits (~inca@pool-96-255-212-224.washdc.fios.verizon.net) (Ping timeout: 268 seconds)
22:58:30 <|cos|> koala_man: unless there are other ways to run wine on haiku than winebox, i guess that's a non-starter. it sure looks like a cool project, but it appears to be fully graphical with no concept of a console. it would be tricky to connect shellcheck to vim through such a component.
23:00:07 <EvanR> what appears to be fully graphical wit hno concept of a console? winebox? spellcheck?
23:02:28 × jespada quits (~jespada@r179-25-205-222.dialup.adsl.anteldata.net.uy) (Ping timeout: 245 seconds)
23:03:13 <|cos|> i see nothing in the documentation of winebox to connect a console
23:05:34 machinedgod joins (~machinedg@d108-173-18-100.abhsia.telus.net)
23:06:19 jespada joins (~jespada@r179-25-210-114.dialup.adsl.anteldata.net.uy)
23:11:37 emmanuelux joins (~emmanuelu@user/emmanuelux)
23:13:20 × sprotte24 quits (~sprotte24@p200300d16f28a1000c1aac2cfe7f30d8.dip0.t-ipconnect.de) (Quit: Leaving)
23:15:08 <geekosaur> windows doesn't have the concept of connecting an external console, so I wouldn't expect one
23:16:36 <geekosaur> the closest you get is RDP, which would be running as a service inside of winebox (and would only be available if you were running actual windows inside of it, which is possible with linux wine but I have no idea about winebox)
23:18:09 <EvanR> wine ought to be able to run a console only windows program
23:18:20 <EvanR> dunno about winebox
23:19:45 <geekosaur> well, wine doesn't come with a console, but you can install windows inside of it and use cmd.exe and probably powershell
23:20:07 <geekosaur> or install msys2 and use mintty
23:22:41 <geekosaur> but "winebox" suggests to me it's more complex than that (wine on most platforms translates win32 calls to native ones, but this sounds like it runs them in a separate environment of some kind)
23:22:59 <geekosaur> so a lot will depend on the nature of that environment
23:23:49 × amadaluzia quits (~amadaluzi@user/amadaluzia) (Ping timeout: 260 seconds)
23:25:08 <EvanR> what is this program "wineconsole"
23:29:57 <monochrom> Yikes, installing windows inside wine... That breaks my mind. :)
23:30:25 <monochrom> I need more wine to understand that. >:)
23:30:34 <geekosaur> it shouldn't. wine just emulates the win32 api, it provides none of the commands or services
23:30:49 <geekosaur> so for many things you need to install windows in it to get them
23:33:46 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
23:34:24 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
23:34:50 inca joins (~inca@pool-96-255-212-224.washdc.fios.verizon.net)
23:35:11 <EvanR> wouldn't a windows program that writes to stdout, suitably "translated", be outputting to your terminal as normal
23:36:13 <EvanR> I could try it using a random EXE from the internet but I might get hacked!
23:37:29 <geekosaur> oddly enough, that "suitably translated" turns out to be surprisingly hard under windows
23:38:37 <geekosaur> the runtime "manufactures" a cmd.exe and hooks it somehow to your program. I'm a bit weak on the details
23:39:13 <geekosaur> and when it does so it usually turns off gui calls for some reason
23:39:54 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 276 seconds)
23:41:12 × inca quits (~inca@pool-96-255-212-224.washdc.fios.verizon.net) (Ping timeout: 276 seconds)
23:42:25 × sh1n quits (~sh1n@2800:2134:583f:e223:7b49:e90d:6522:419d) (Remote host closed the connection)
23:43:35 inca joins (~inca@pool-96-255-212-224.washdc.fios.verizon.net)
23:44:29 hgolden_ joins (~hgolden@2603:8000:9d00:3ed1:d319:57ed:d2cb:68a5)
23:45:08 remexre joins (~remexre@user/remexre)
23:47:09 × hgolden quits (~hgolden@2603:8000:9d00:3ed1:1b03:b08c:d961:6530) (Ping timeout: 260 seconds)
23:48:31 sprotte24 joins (~sprotte24@p200300d16f28a1000c1aac2cfe7f30d8.dip0.t-ipconnect.de)
23:48:34 × sprotte24 quits (~sprotte24@p200300d16f28a1000c1aac2cfe7f30d8.dip0.t-ipconnect.de) (Remote host closed the connection)
23:50:26 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
23:55:21 × msa quits (msa@msa.planetofnix.com) (Quit: Still trying to figure out how bouncers work.)
23:57:39 × JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: praxis.meansofproduction.biz (juan@acm.org))

All times are in UTC on 2025-04-06.