2026/04/03

2026-04-03 00:00:13 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 00:05:59 +0000karenw(~karenw@user/karenw) karenw
2026-04-03 00:06:13 +0000jmcantrell_(~weechat@user/jmcantrell) jmcantrell
2026-04-03 00:07:46 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
2026-04-03 00:12:09 +0000jmcantrell_(~weechat@user/jmcantrell) (Ping timeout: 255 seconds)
2026-04-03 00:18:33 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 00:23:07 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2026-04-03 00:33:18 +0000peterbecich(~Thunderbi@71.84.33.135) (Ping timeout: 255 seconds)
2026-04-03 00:33:55 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 00:38:42 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
2026-04-03 00:49:18 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 00:52:59 +0000bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 265 seconds)
2026-04-03 00:52:59 +0000synchromesh(~john@2406:5a00:2412:2c00:fc97:d0a4:cdd9:afc1) (Read error: Connection reset by peer)
2026-04-03 00:53:42 +0000acidjnk_new3(~acidjnk@p200300d6e700e5001e1160b7d23e5dd6.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
2026-04-03 00:54:13 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds)
2026-04-03 00:54:15 +0000synchromesh(~john@2406:5a00:2412:2c00:fc97:d0a4:cdd9:afc1) synchromesh
2026-04-03 00:57:22 +0000xff0x(~xff0x@2405:6580:b080:900:1644:ff9e:fe83:e2e) (Ping timeout: 248 seconds)
2026-04-03 01:04:40 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 01:09:20 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2026-04-03 01:13:57 +0000 <mesaoptimizer> "Under the hood, Haskell is not a magical machine that performs side effects despite being pure. Behind every "pure" function in bytestring, text, and vector lies a cheerful little hellscape of mutable allocation, buffer writes, unsafe coercions, and other behavior that would alarm you if you discovered it in a junior engineer's side project. Behind the ST monad lies in-place mutation and side
2026-04-03 01:13:59 +0000 <mesaoptimizer> effects, observable within the computation. What makes it acceptable is that the side effects are encapsulated such that the boundary cannot be violated. The rank-2 type (that is, the type s is scoped within the parenthesis and can't escape) of runST ensures that the mutable references created inside the computation cannot escape due to being tagged with the type s. Internally, all sorts of
2026-04-03 01:14:01 +0000 <mesaoptimizer> imperative nonsense may occur. Externally, the function is pure. The world outside the boundary gets none of the mutation, only the result." https://blog.haskell.org/a-couple-million-lines-of-haskell/ this is an incorrect inference, right? if you use unsafe IO or unsafe side effects, the type system cannot and will not be able to guarantee the purity
2026-04-03 01:15:16 +0000 <c_wraith> It's nearly accurate for ST
2026-04-03 01:15:29 +0000humasect(~humasect@dyn-192-249-132-90.nexicom.net) humasect
2026-04-03 01:15:30 +0000 <c_wraith> which the reference to runST implies is what it's intended to be talking about.
2026-04-03 01:15:48 +0000 <c_wraith> (It's true for ST as long as you don't use any of the unsafe* functions)
2026-04-03 01:16:12 +0000 <glguy> The point isn't that all uses of unsafePerformIO are protected by the type system, it's that unsafePerformIO can be carefully used in ways that benefit from type system protection
2026-04-03 01:19:57 +0000comonad(~comonad@p200300d02717df00adc247ef70bd7367.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
2026-04-03 01:20:01 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 01:21:05 +0000comonad(~comonad@p200300d02717df00adc247ef70bd7367.dip0.t-ipconnect.de)
2026-04-03 01:24:25 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
2026-04-03 01:35:29 +0000merijn(~merijn@62.45.136.136) merijn
2026-04-03 01:36:34 +0000jmcantrell_(~weechat@user/jmcantrell) jmcantrell
2026-04-03 01:41:59 +0000merijn(~merijn@62.45.136.136) (Ping timeout: 245 seconds)
2026-04-03 01:46:01 +0000foul_owl(~kerry@94.156.149.94) (Read error: Connection reset by peer)
2026-04-03 01:51:21 +0000 <EvanR> even without unsafe perform IO, the primitives GHC has get implemented somehow
2026-04-03 01:51:42 +0000 <EvanR> there are a lot of them
2026-04-03 01:52:06 +0000 <EvanR> if you use GMP based Integer there's also that
2026-04-03 01:53:27 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 01:56:14 +0000xff0x(~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp)
2026-04-03 01:57:54 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
2026-04-03 02:07:24 +0000 <monochrom> I will start with a conversation I overheard. Two 1st-year students were at a cafe discussing logic homework. The homework question was "what is the negation of: everyone wears glasses?". The students first said "is it: no one wears glasses?" But within 10 seconds, "no, that's not right".
2026-04-03 02:08:43 +0000zzz(~zero@user/zero) (Ping timeout: 264 seconds)
2026-04-03 02:08:49 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 02:08:54 +0000 <monochrom> So even sophomores can understand that the negation of "all usages of unsafePerformIO are safe" is not "all usages of unsafePerformIO are unsafe".
2026-04-03 02:10:53 +0000 <EvanR> maybe mesaoptimizer wants to see also SafeHaskell
2026-04-03 02:13:20 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds)
2026-04-03 02:17:54 +0000zzz(~zero@user/zero) zero
2026-04-03 02:22:12 +0000squid64(~user@fsf/member/squid64) (Ping timeout: 255 seconds)
2026-04-03 02:24:17 +0000merijn(~merijn@62.45.136.136) merijn
2026-04-03 02:24:59 +0000humasect(~humasect@dyn-192-249-132-90.nexicom.net) (Quit: Leaving...)
2026-04-03 02:28:32 +0000merijn(~merijn@62.45.136.136) (Ping timeout: 252 seconds)
2026-04-03 02:33:31 +0000 <mesaoptimizer> c_wraith: it seems like it is accurate for runST, if the type system itself guarantees semantic safety, yes. I do think that the claim is almost deliberately confusing when applied to any expression that contains an `unsafe*` expression though.
2026-04-03 02:34:50 +0000abbies(~abbies@tilde.guru)
2026-04-03 02:35:01 +0000rekahsoft(~rekahsoft@bras-base-orllon1103w-grc-20-76-67-111-168.dsl.bell.ca) (Remote host closed the connection)
2026-04-03 02:35:03 +0000 <geekosaur> given what you quoted, I think it's just making the point that, if you know what you're doing, you can hide known-safe uses of unsafe operations inside pure functions
2026-04-03 02:35:05 +0000 <mesaoptimizer> If you say something is pure, I expect that the language *guarantees* the semantics of it being pure, with the exception of the expression using, say, `unsafePerformIO`. Ergo, you cannot call those functions as those where 'the boundary cannot be violated' -- you already broke the semantic safety guarantees!
2026-04-03 02:35:44 +0000 <mesaoptimizer> geekosaur: yeah that is now my current interpretation of it. it does seem quite confusing though
2026-04-03 02:36:39 +0000abbies(~abbies@tilde.guru) (Client Quit)
2026-04-03 02:37:00 +0000 <mesaoptimizer> reminds me of LLM-generated text, which has triggered similar confusion and dicussion between I and a few of my acquaintances in the past, related to type theory and semantics. I guess its best I abandon reading this essay.
2026-04-03 02:37:48 +0000 <geekosaur> this is no different from https://doc.rust-lang.org/book/ch20-01-unsafe-rust.html
2026-04-03 02:38:40 +0000 <mesaoptimizer> no I get that
2026-04-03 02:38:46 +0000 <geekosaur> since neither compiler can give you static guarantees, it's on you as programmer using unsafe features to prove that you are actually using them safely
2026-04-03 02:39:18 +0000 <davean> geekosaur: About unsafe stuff
2026-04-03 02:39:19 +0000 <mesaoptimizer> I accept the existence of parts of a language that are delineated such that they do not have semantic safety in terms of abstractions that protect you from the underlying computational substrate
2026-04-03 02:39:33 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 02:39:47 +0000 <EvanR> that article isn't LLM style at all
2026-04-03 02:39:57 +0000 <EvanR> it's classic "dev speak"
2026-04-03 02:40:00 +0000 <mesaoptimizer> my conclusion is that the essay above is generated using a SOTA LLM, and therefore is adverserially generated to seem insightful, but actually be dangerously wasteful of human time
2026-04-03 02:40:19 +0000 <EvanR> we've seen reports like this for years
2026-04-03 02:40:25 +0000 <EvanR> tales from tech
2026-04-03 02:40:38 +0000 <EvanR> none it seems especially controversial either
2026-04-03 02:40:40 +0000 <Leary> mesaoptimizer: You expect wrong; people use 'pure' just to mean 'pure'; there's no implicit /by construction/.
2026-04-03 02:41:16 +0000 <mesaoptimizer> EvanR: not fully, of course. I imagine maybe the author wrote a bunch of bullet points up and then used an LLM to expand upon it. But all right, I'll give the essay another shot and continue reading it
2026-04-03 02:42:19 +0000 <EvanR> as you wish
2026-04-03 02:42:30 +0000 <mesaoptimizer> Leary: perhaps I misused the word, but my point was about semantic safety, in the sense of Benjamin Pierce's definition in TAPL
2026-04-03 02:42:56 +0000 <mesaoptimizer> so it still stands. It is not specific to Haskell.
2026-04-03 02:42:58 +0000arandombit(~arandombi@user/arandombit) (Ping timeout: 248 seconds)
2026-04-03 02:43:17 +0000 <EvanR> ok if you're going to analyze the article then yeah maybe read it
2026-04-03 02:43:23 +0000 <EvanR> otherwise don't bother
2026-04-03 02:43:57 +0000 <EvanR> (there's a lot in there that is haskell specific, but as far as groundbreaking insights maybe not many)
2026-04-03 02:44:02 +0000 <davean> Yah the obligation is on you to actually think clearly about it.
2026-04-03 02:44:15 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
2026-04-03 02:44:47 +0000 <mesaoptimizer> EvanR: I disagree about that claim when in a cognitively adverserial environment
2026-04-03 02:44:56 +0000 <mesaoptimizer> ... sorry, that was for davean
2026-04-03 02:45:00 +0000arandombit(~arandombi@2a02:2455:8656:7100:cd4b:38a2:fba4:622b)
2026-04-03 02:45:00 +0000arandombit(~arandombi@2a02:2455:8656:7100:cd4b:38a2:fba4:622b) (Changing host)
2026-04-03 02:45:00 +0000arandombit(~arandombi@user/arandombit) arandombit
2026-04-03 02:45:39 +0000 <mesaoptimizer> EvanR: it started off quite interesting, yes, which is why I even put in the effort to ask about the thing that confused me, so yes, I am reading onwards.
2026-04-03 02:54:22 +0000weary-traveler(~user@user/user363627) user363627
2026-04-03 02:54:56 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 02:55:45 +0000bitdex(~bitdex@gateway/tor-sasl/bitdex) bitdex
2026-04-03 02:56:13 +0000 <mesaoptimizer> sidenote: "Your database layer uses connection pooling, retry logic, and mutable state internally. Your cache uses concurrent mutable maps. Your HTTP client probably has circuit breakers, pooled connections, and a small municipal government's worth of bookkeeping." this is a clear indicator that an LLM was used to write this essay
2026-04-03 02:57:22 +0000 <mesaoptimizer> it is quite common for an LLM to add a concrete, supposedly humorous exageration as part of its triadic description for something, and you can see it with "a small municipal government's worth of bookkeeping".
2026-04-03 02:57:31 +0000 <EvanR> we need a new latin fallacy like ad hominem but for attacking the LLM
2026-04-03 02:58:39 +0000 <monochrom> ad machina >:)
2026-04-03 02:58:44 +0000 <mesaoptimizer> erm, I have been paid to do research engineer work on neural networks, and have worked with researchers now at DM and Anthropic
2026-04-03 02:58:54 +0000 <EvanR> that article isn't about LLMs or AI at all so
2026-04-03 02:58:57 +0000 <monochrom> or perhaps ad machinem?
2026-04-03 02:59:37 +0000 <mesaoptimizer> okay, *at least* you aren't saying I'm wrong, I do appreciate that lol
2026-04-03 02:59:37 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 272 seconds)
2026-04-03 02:59:42 +0000 <monochrom> "I do not trust it when a computer says 1+1=2 because it's a stupid computer!"
2026-04-03 03:00:17 +0000 <EvanR> butlerian jihad!
2026-04-03 03:00:20 +0000 <Leary> mesaoptimizer: LLMs do that because they ate a huge amount of text written by humans who did that.
2026-04-03 03:00:44 +0000 <geekosaur> ^
2026-04-03 03:01:19 +0000 <monochrom> Haven't you heard? Those LLMs that have learned from history are doomed to repeat it!
2026-04-03 03:01:27 +0000 <mesaoptimizer> I think the thing you wish to encourage is "read the docs"
2026-04-03 03:01:45 +0000 <mesaoptimizer> or a sort of "hey, look you have to put in the work if you want to master this"
2026-04-03 03:02:14 +0000 <EvanR> what's this in relation to
2026-04-03 03:02:22 +0000 <EvanR> just in general?
2026-04-03 03:02:34 +0000 <EvanR> sure
2026-04-03 03:02:44 +0000 <mesaoptimizer> yeah, I'm confused by the reaction of you guys just now
2026-04-03 03:03:02 +0000 <mesaoptimizer> and yeah I agree, and have found some Haskell papers even more lucid than any introductory textbook, especially the 1997 Wadler / Blott one for typeclasses
2026-04-03 03:04:44 +0000 <mesaoptimizer> this is probably an offtopic thing, but in short, I really really do not think it is a good idea to extend this intuition to text generated by LLMs outright or even partially.
2026-04-03 03:05:27 +0000 <mesaoptimizer> anyway, let's move on
2026-04-03 03:05:28 +0000 <geekosaur> I for one am kinda confused by how you jumped straight to "must be an LLM". there _are_ some clear indications thereof, but your complaints seem more in the "I don't like its style" category
2026-04-03 03:05:55 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 03:06:07 +0000 <EvanR> your point started out as the article is a dangerous waste of time but we're still talking about it
2026-04-03 03:06:17 +0000 <geekosaur> LLMs only use the LLM part to interpret prompts and reformat results; the actual work, as best I can determine having read lots of them, is actually generated via Markov chains
2026-04-03 03:06:46 +0000 <geekosaur> the kinds of messes they produce fit that model very well
2026-04-03 03:07:15 +0000 <mesaoptimizer> will reply in #haskell-offtopic.
2026-04-03 03:10:10 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
2026-04-03 03:21:18 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 03:27:49 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-04-03 03:38:46 +0000bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 265 seconds)
2026-04-03 03:39:21 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 03:44:06 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
2026-04-03 03:54:26 +0000machinedgod(~machinedg@d172-219-48-230.abhsia.telus.net) (Ping timeout: 248 seconds)
2026-04-03 03:55:15 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 03:59:52 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds)
2026-04-03 04:03:35 +0000sp1ff(~user@2601:1c2:4080:14c0::ace8) sp1ff
2026-04-03 04:09:22 +0000monochrom(trebla@216.138.220.146) (Ping timeout: 244 seconds)
2026-04-03 04:09:29 +0000comonad(~comonad@p200300d02717df00adc247ef70bd7367.dip0.t-ipconnect.de) (Ping timeout: 245 seconds)
2026-04-03 04:10:24 +0000arandombit(~arandombi@user/arandombit) (Ping timeout: 244 seconds)
2026-04-03 04:10:38 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 04:10:40 +0000comonad(~comonad@p200300d02717df00adc247ef70bd7367.dip0.t-ipconnect.de)
2026-04-03 04:12:26 +0000monochrom(~trebla@216.138.220.146) monochrom
2026-04-03 04:14:54 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-04-03 04:15:44 +0000comonad(~comonad@p200300d02717df00adc247ef70bd7367.dip0.t-ipconnect.de) (Ping timeout: 245 seconds)
2026-04-03 04:16:50 +0000comonad(~comonad@p200300d02717df00adc247ef70bd7367.dip0.t-ipconnect.de)
2026-04-03 04:22:53 +0000arandombit(~arandombi@user/arandombit) arandombit
2026-04-03 04:26:00 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 04:30:33 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds)
2026-04-03 04:32:06 +0000ChaiTRex(~ChaiTRex@user/chaitrex) (Quit: ChaiTRex)
2026-04-03 04:34:54 +0000arandombit(~arandombi@user/arandombit) (Ping timeout: 246 seconds)
2026-04-03 04:40:42 +0000takuan(~takuan@d8D86B9E9.access.telenet.be)
2026-04-03 04:41:27 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 04:45:38 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
2026-04-03 04:46:40 +0000humasect(~humasect@dyn-192-249-132-90.nexicom.net) humasect
2026-04-03 04:49:29 +0000monochrom(~trebla@216.138.220.146) (Ping timeout: 245 seconds)
2026-04-03 04:50:40 +0000monochrom(trebla@216.138.220.146) monochrom
2026-04-03 04:54:10 +0000Nosrep(~jimothy@user/nosrep) (Ping timeout: 248 seconds)
2026-04-03 04:56:58 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 04:59:26 +0000somemathguy(~somemathg@user/somemathguy) (Quit: WeeChat 4.1.1)
2026-04-03 05:03:53 +0000ChaiTRex(~ChaiTRex@user/chaitrex) ChaiTRex
2026-04-03 05:03:58 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds)
2026-04-03 05:06:21 +0000arandombit(~arandombi@2a02:2455:8656:7100:cd4b:38a2:fba4:622b)
2026-04-03 05:06:21 +0000arandombit(~arandombi@2a02:2455:8656:7100:cd4b:38a2:fba4:622b) (Changing host)
2026-04-03 05:06:21 +0000arandombit(~arandombi@user/arandombit) arandombit
2026-04-03 05:06:56 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 05:11:22 +0000arandombit(~arandombi@user/arandombit) (Ping timeout: 268 seconds)
2026-04-03 05:11:43 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2026-04-03 05:13:32 +0000ChaiTRex(~ChaiTRex@user/chaitrex) (Quit: ChaiTRex)
2026-04-03 05:22:17 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 05:25:50 +0000ChaiTRex(~ChaiTRex@user/chaitrex) ChaiTRex
2026-04-03 05:26:42 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
2026-04-03 05:32:18 +0000somemathguy(~somemathg@user/somemathguy) somemathguy
2026-04-03 05:37:46 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 05:39:57 +0000arandombit(~arandombi@2a02:2455:8656:7100:cd4b:38a2:fba4:622b)
2026-04-03 05:39:57 +0000arandombit(~arandombi@2a02:2455:8656:7100:cd4b:38a2:fba4:622b) (Changing host)
2026-04-03 05:39:57 +0000arandombit(~arandombi@user/arandombit) arandombit
2026-04-03 05:42:06 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
2026-04-03 05:44:26 +0000arandombit(~arandombi@user/arandombit) (Ping timeout: 244 seconds)
2026-04-03 05:53:05 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 05:57:38 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
2026-04-03 06:00:47 +0000ChaiTRex(~ChaiTRex@user/chaitrex) (Remote host closed the connection)
2026-04-03 06:02:46 +0000ChaiTRex(~ChaiTRex@user/chaitrex) ChaiTRex
2026-04-03 06:02:58 +0000jmcantrell_(~weechat@user/jmcantrell) (Ping timeout: 248 seconds)
2026-04-03 06:07:57 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 06:11:50 +0000attlin(~user@user/attlin) (Ping timeout: 245 seconds)
2026-04-03 06:12:36 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
2026-04-03 06:15:02 +0000arandombit(~arandombi@user/arandombit) arandombit
2026-04-03 06:23:18 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 06:23:52 +0000attlin(~user@216.126.236.136)
2026-04-03 06:23:52 +0000attlin(~user@216.126.236.136) (Changing host)
2026-04-03 06:23:52 +0000attlin(~user@user/attlin) attlin
2026-04-03 06:27:46 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds)
2026-04-03 06:32:43 +0000karenw(~karenw@user/karenw) (Ping timeout: 264 seconds)
2026-04-03 06:38:40 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 06:40:06 +0000somemathguy(~somemathg@user/somemathguy) (Quit: WeeChat 4.1.1)
2026-04-03 06:45:06 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
2026-04-03 06:45:38 +0000qqq(~qqq@185.54.23.237)
2026-04-03 06:49:13 +0000GdeVolpiano(~GdeVolpia@user/GdeVolpiano) (Ping timeout: 248 seconds)
2026-04-03 06:53:01 +0000GdeVolpiano(~GdeVolpia@user/GdeVolpiano) GdeVolpiano
2026-04-03 06:56:43 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 07:01:12 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
2026-04-03 07:02:42 +0000CiaoSen(~Jura@p549cb690.dip0.t-ipconnect.de) CiaoSen
2026-04-03 07:08:58 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 07:13:35 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 272 seconds)
2026-04-03 07:16:33 +0000arandombit(~arandombi@user/arandombit) (Ping timeout: 268 seconds)
2026-04-03 07:17:20 +0000sim590(~simon@2001:18c0:a82:2400::9fb) (Quit: WeeChat 4.8.2)
2026-04-03 07:24:21 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 07:25:42 +0000CiaoSen(~Jura@p549cb690.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
2026-04-03 07:27:55 +0000CiaoSen(~Jura@p549cb690.dip0.t-ipconnect.de) CiaoSen
2026-04-03 07:28:30 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-04-03 07:32:25 +0000arandombit(~arandombi@2a02:2455:8656:7100:cd4b:38a2:fba4:622b)
2026-04-03 07:32:25 +0000arandombit(~arandombi@2a02:2455:8656:7100:cd4b:38a2:fba4:622b) (Changing host)
2026-04-03 07:32:25 +0000arandombit(~arandombi@user/arandombit) arandombit
2026-04-03 07:37:45 +0000arandombit(~arandombi@user/arandombit) (Ping timeout: 248 seconds)
2026-04-03 07:39:43 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 07:44:18 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds)
2026-04-03 07:46:45 +0000Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2026-04-03 07:51:11 +0000arandombit(~arandombi@2a02:2455:8656:7100:cd4b:38a2:fba4:622b)
2026-04-03 07:51:11 +0000arandombit(~arandombi@2a02:2455:8656:7100:cd4b:38a2:fba4:622b) (Changing host)
2026-04-03 07:51:11 +0000arandombit(~arandombi@user/arandombit) arandombit
2026-04-03 07:55:04 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 07:56:00 +0000humasect(~humasect@dyn-192-249-132-90.nexicom.net) (Remote host closed the connection)
2026-04-03 07:58:01 +0000CiaoSen(~Jura@p549cb690.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
2026-04-03 07:58:26 +0000arandombit(~arandombi@user/arandombit) (Ping timeout: 256 seconds)
2026-04-03 07:58:46 +0000qqq(~qqq@185.54.23.237) (Remote host closed the connection)
2026-04-03 07:59:34 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds)
2026-04-03 08:05:34 +0000humasect(~humasect@dyn-192-249-132-90.nexicom.net) humasect
2026-04-03 08:07:00 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 08:09:18 +0000CiaoSen(~Jura@p549cb690.dip0.t-ipconnect.de) CiaoSen
2026-04-03 08:10:42 +0000emmanuelux(~em@user/emmanuelux) (Quit: bye)
2026-04-03 08:12:40 +0000qqq(~qqq@185.54.23.237)
2026-04-03 08:20:13 +0000rabbull(~rabbull@user/rabbull) (Read error: Connection reset by peer)
2026-04-03 08:20:33 +0000rabbull(~rabbull@user/rabbull) rabbull
2026-04-03 08:22:12 +0000acidjnk_new3(~acidjnk@p200300d6e700e5002ce9abe45c9e09a5.dip0.t-ipconnect.de)
2026-04-03 08:23:44 +0000__monty__(~toonn@user/toonn) toonn
2026-04-03 08:32:43 +0000CiaoSen(~Jura@p549cb690.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
2026-04-03 08:36:00 +0000Digit(~user@user/digit) (Ping timeout: 245 seconds)
2026-04-03 08:41:11 +0000arandombit(~arandombi@2a02:2455:8656:7100:cd4b:38a2:fba4:622b)
2026-04-03 08:41:11 +0000arandombit(~arandombi@2a02:2455:8656:7100:cd4b:38a2:fba4:622b) (Changing host)
2026-04-03 08:41:11 +0000arandombit(~arandombi@user/arandombit) arandombit
2026-04-03 08:45:50 +0000arandombit(~arandombi@user/arandombit) (Ping timeout: 252 seconds)
2026-04-03 08:51:24 +0000Guest62(~Guest62@p200300ca8f128700b6df0e37d8ec3f22.dip0.t-ipconnect.de)
2026-04-03 08:55:31 +0000rembo10_(~rembo10@main.remulis.com) (Quit: ZNC 1.10.1 - https://znc.in)
2026-04-03 08:56:21 +0000rembo10(~rembo10@main.remulis.com) rembo10
2026-04-03 08:58:06 +0000Tuplanolla(~Tuplanoll@88-114-89-88.elisa-laajakaista.fi) Tuplanolla
2026-04-03 09:00:52 +0000arandombit(~arandombi@user/arandombit) arandombit
2026-04-03 09:02:55 +0000humasect(~humasect@dyn-192-249-132-90.nexicom.net) (Remote host closed the connection)
2026-04-03 09:07:23 +0000Guest62(~Guest62@p200300ca8f128700b6df0e37d8ec3f22.dip0.t-ipconnect.de) (Quit: Client closed)
2026-04-03 09:10:10 +0000synchromesh(~john@2406:5a00:2412:2c00:fc97:d0a4:cdd9:afc1) (Read error: Connection reset by peer)
2026-04-03 09:11:03 +0000synchromesh(~john@2406:5a00:2412:2c00:343e:4e23:bce:73a3) synchromesh
2026-04-03 09:12:25 +0000Digitteknohippie(~user@user/digit) Digit
2026-04-03 09:12:28 +0000Square3(~Square@user/square) Square
2026-04-03 09:19:14 +0000DigitteknohippieDigit
2026-04-03 09:54:17 +0000xff0x(~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp) (Ping timeout: 248 seconds)
2026-04-03 10:02:26 +0000arandombit(~arandombi@user/arandombit) (Ping timeout: 268 seconds)
2026-04-03 10:07:12 +0000califax(~califax@user/califx) (Remote host closed the connection)
2026-04-03 10:07:22 +0000Square3(~Square@user/square) (Ping timeout: 268 seconds)
2026-04-03 10:07:25 +0000califax(~califax@user/califx) califx
2026-04-03 10:10:37 +0000arandombit(~arandombi@2a02:2455:8656:7100:cd4b:38a2:fba4:622b)
2026-04-03 10:10:37 +0000arandombit(~arandombi@2a02:2455:8656:7100:cd4b:38a2:fba4:622b) (Changing host)
2026-04-03 10:10:37 +0000arandombit(~arandombi@user/arandombit) arandombit
2026-04-03 10:16:14 +0000acidjnk_new(~acidjnk@p200300d6e700e5029fa95e10e4e0754b.dip0.t-ipconnect.de) acidjnk
2026-04-03 10:19:21 +0000acidjnk_new3(~acidjnk@p200300d6e700e5002ce9abe45c9e09a5.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
2026-04-03 10:20:29 +0000__monty__(~toonn@user/toonn) (Quit: leaving)
2026-04-03 10:47:43 +0000arandombit(~arandombi@user/arandombit) (Ping timeout: 244 seconds)
2026-04-03 10:48:40 +0000 <gentauro> > :i newStdGen
2026-04-03 10:48:41 +0000 <lambdabot> <hint>:1:1: error: parse error on input `:'
2026-04-03 10:48:46 +0000 <gentauro> % :i newStdGen
2026-04-03 10:48:46 +0000 <yahb2> <interactive>:1:1: error: [GHC-76037] Not in scope: ‘newStdGen’
2026-04-03 10:49:05 +0000 <gentauro> % import System.Random
2026-04-03 10:49:05 +0000 <yahb2> <no location info>: error: [GHC-35235] ; Could not find module ‘System.Random’. ; It is not a module in the current program, or in any known package.
2026-04-03 10:49:08 +0000 <gentauro> > import System.Random
2026-04-03 10:49:09 +0000 <lambdabot> <hint>:1:1: error: parse error on input `import'
2026-04-03 11:02:13 +0000wootehfoot(~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
2026-04-03 11:43:04 +0000 <tomsmeding> gentauro: random is not a boot library
2026-04-03 11:44:30 +0000 <tomsmeding> %% System.Process.system "ghc-pkg --global list"
2026-04-03 11:44:30 +0000 <yahb2> https://paste.tomsmeding.com/SSJGWZ5X
2026-04-03 11:56:46 +0000wootehfoot(~wootehfoo@user/wootehfoot) wootehfoot
2026-04-03 12:03:32 +0000czan(~czan@user/mange) czan
2026-04-03 12:12:45 +0000 <gentauro> tomsmeding: :(
2026-04-03 12:13:22 +0000 <gentauro> tomsmeding: how do you invoke our Lord and Saviour RNGesus here?
2026-04-03 12:24:35 +0000xff0x(~xff0x@2405:6580:b080:900:ec01:f28c:6f01:3489)
2026-04-03 12:25:54 +0000tromp(~textual@2001:1c00:340e:2700:f5b2:b468:1c7d:8570)
2026-04-03 12:30:57 +0000somemathguy(~somemathg@user/somemathguy) somemathguy
2026-04-03 12:32:25 +0000 <tomsmeding> % :m Data.Bits Data.Word
2026-04-03 12:32:25 +0000 <yahb2> <no output>
2026-04-03 12:32:37 +0000 <tomsmeding> % data RNG = RNG Word64 Word64 Word64 Word64 deriving (Show) -- https://arxiv.org/pdf/2312.17043 CWG64
2026-04-03 12:32:37 +0000 <yahb2> <no output>
2026-04-03 12:32:43 +0000 <tomsmeding> % cwg64 :: RNG -> (Word64, RNG) ; cwg64 (RNG x a w s) = let x' = (x `quot` 2) * ((a + x) .|. 1) `xor` (w + s) in (a `shiftR` 48 `xor` x', RNG x' (a+x) (w+s) s)
2026-04-03 12:32:43 +0000 <yahb2> <no output>
2026-04-03 12:32:48 +0000 <tomsmeding> % newRNG :: Word64 -> RNG ; newRNG seed = iterate (snd . cwg64) (RNG 0 0 0 (2*seed+1)) !! 48
2026-04-03 12:32:48 +0000 <yahb2> <no output>
2026-04-03 12:33:24 +0000 <tomsmeding> % take 4 . map fst . iterate (cwg64 . snd) $ cwg64 (newRNG 42)
2026-04-03 12:33:24 +0000 <yahb2> [14283230361796893884,4031505161053706,7205329903210052340,4002821135440951121]
2026-04-03 12:34:53 +0000 <tomsmeding> % cwg64 :: RNG -> (Word64, RNG) ; cwg64 (RNG x a w s) = let x' = (x `quot` 2) * ((a + x) .|. 1) `xor` (w + s) in ((a+x) `shiftR` 48 `xor` x', RNG x' (a+x) (w+s) s)
2026-04-03 12:34:53 +0000 <yahb2> <no output>
2026-04-03 12:34:56 +0000 <tomsmeding> % take 4 . map fst . iterate (cwg64 . snd) $ cwg64 (newRNG 42)
2026-04-03 12:34:56 +0000 <yahb2> [14283230361796891556,4031505161050178,7205329903210052357,4002821135440958291]
2026-04-03 12:35:48 +0000 <tomsmeding> ... interesting, that typo didn't change the results; I wonder if that means that x just doesn't have high bits?
2026-04-03 12:36:00 +0000 <tomsmeding> ¯\_(ツ)_/¯
2026-04-03 12:50:32 +0000craunts795335385(~craunts@152.32.99.2) (Quit: The Lounge - https://thelounge.chat)
2026-04-03 13:02:57 +0000tromp(~textual@2001:1c00:340e:2700:f5b2:b468:1c7d:8570) (Quit: My iMac has gone to sleep. ZZZzzz…)
2026-04-03 13:05:00 +0000divlamir(~divlamir@user/divlamir) (Read error: Connection reset by peer)
2026-04-03 13:05:19 +0000 <int-e> % Data.ByteString.Lazy.take 32 <$> Data.ByteString.Lazy.readFile "/dev/urandom"
2026-04-03 13:05:19 +0000 <yahb2> *** Exception: /dev/urandom: openBinaryFile: does not exist (No such file or directory) ; ; HasCallStack backtrace: ; ioError, called at libraries/ghc-internal/src/GHC/Internal/Foreign/C/Error.h...
2026-04-03 13:05:26 +0000divlamir(~divlamir@user/divlamir) divlamir
2026-04-03 13:05:27 +0000 <int-e> oh, haha
2026-04-03 13:05:52 +0000czan(~czan@user/mange) (Quit: Zzz...)
2026-04-03 13:11:11 +0000tromp(~textual@2001:1c00:340e:2700:f5b2:b468:1c7d:8570)
2026-04-03 13:18:40 +0000 <int-e> % foreign import ccall getrandom :: Ptr a -> CSize -> CInt -> IO CSize
2026-04-03 13:18:40 +0000 <yahb2> <no output>
2026-04-03 13:18:40 +0000synchromesh(~john@2406:5a00:2412:2c00:343e:4e23:bce:73a3) (Read error: Connection reset by peer)
2026-04-03 13:18:50 +0000 <int-e> % alloca (\p -> getrandom p 8 0 >> peek p) :: IO Word
2026-04-03 13:18:50 +0000 <yahb2> 1080570571463088587
2026-04-03 13:19:48 +0000synchromesh(~john@2406:5a00:2412:2c00:343e:4e23:bce:73a3) synchromesh
2026-04-03 13:32:30 +0000 <tomsmeding> int-e: cool
2026-04-03 13:33:45 +0000 <tomsmeding> % :q
2026-04-03 13:33:45 +0000 <yahb2> <bye>
2026-04-03 13:33:51 +0000 <tomsmeding> % Data.ByteString.Lazy.take 32 <$> Data.ByteString.Lazy.readFile "/dev/urandom"
2026-04-03 13:33:51 +0000 <yahb2> "V4\205\ESC\247Kv\194\EOT\144\DLEf\165\211%\201\197&\156\ESC\190\CAN*\RS\CAN\215Fj\"\226n\CAN"
2026-04-03 13:34:07 +0000 <tomsmeding> added it to the sandbox
2026-04-03 13:34:38 +0000 <tomsmeding> gentauro: ^
2026-04-03 13:42:18 +0000somemathguy(~somemathg@user/somemathguy) (Ping timeout: 246 seconds)
2026-04-03 13:47:29 +0000byorgey(~byorgey@user/byorgey) (Quit: leaving)
2026-04-03 13:48:13 +0000 <gentauro> :)
2026-04-03 13:57:40 +0000acidjnk_new(~acidjnk@p200300d6e700e5029fa95e10e4e0754b.dip0.t-ipconnect.de) (Ping timeout: 245 seconds)
2026-04-03 13:59:35 +0000Nosrep(~jimothy@user/nosrep) Nosrep
2026-04-03 14:05:23 +0000GdeVolpiano(~GdeVolpia@user/GdeVolpiano) (Ping timeout: 252 seconds)
2026-04-03 14:07:22 +0000GdeVolpiano(~GdeVolpia@user/GdeVolpiano) GdeVolpiano
2026-04-03 14:14:38 +0000haritz(~hrtz@140.228.70.141)
2026-04-03 14:14:38 +0000haritz(~hrtz@140.228.70.141) (Changing host)
2026-04-03 14:14:38 +0000haritz(~hrtz@user/haritz) haritz
2026-04-03 14:25:12 +0000qqq(~qqq@185.54.23.237) (Remote host closed the connection)
2026-04-03 14:27:15 +0000somemathguy(~somemathg@user/somemathguy) somemathguy
2026-04-03 14:38:27 +0000tromp(~textual@2001:1c00:340e:2700:f5b2:b468:1c7d:8570) (Quit: My iMac has gone to sleep. ZZZzzz…)
2026-04-03 14:44:32 +0000tromp(~textual@2001:1c00:340e:2700:f5b2:b468:1c7d:8570)
2026-04-03 14:51:27 +0000Digit(~user@user/digit) (Ping timeout: 255 seconds)
2026-04-03 14:53:13 +0000craunts795335385(~craunts@152.32.99.2)
2026-04-03 15:12:31 +0000jmcantrell_(~weechat@user/jmcantrell) jmcantrell
2026-04-03 15:23:21 +0000absurdvoid(~absurdvoi@user/absurdvoid) absurdvoid
2026-04-03 15:24:30 +0000 <monochrom> % Data.ByteString.Lazy.take 32 <$> Data.ByteString.Lazy.readFile "/dev/urandom"
2026-04-03 15:24:30 +0000 <yahb2> ":>\164\&6\135-;\215\226?\250a\130\DC1\162\159\234\130\145p9\235\244YPY\DC1\241\240l\148{"
2026-04-03 15:24:50 +0000 <monochrom> (Just testing whether it's always the same string. >:) )
2026-04-03 15:25:06 +0000olivial(~benjaminl@user/benjaminl) (Ping timeout: 248 seconds)
2026-04-03 15:30:22 +0000pavonia(~user@user/siracusa) (Quit: Bye!)
2026-04-03 15:35:14 +0000olivial(~benjaminl@user/benjaminl) benjaminl
2026-04-03 15:37:31 +0000Ranhir(~Ranhir@157.97.53.139) (Ping timeout: 264 seconds)
2026-04-03 15:43:08 +0000tromp(~textual@2001:1c00:340e:2700:f5b2:b468:1c7d:8570) (Quit: My iMac has gone to sleep. ZZZzzz…)
2026-04-03 15:50:04 +0000 <EvanR> does lowenheim skolem paradox have anything to do with the occasional "surprise" that haskell can have uncountable "sets", since this paradox relies on the idea of a first order logic
2026-04-03 15:50:09 +0000 <EvanR> er skolem's paradox
2026-04-03 15:51:22 +0000L29Ah(~L29Ah@wikipedia/L29Ah) ()
2026-04-03 15:51:50 +0000 <EvanR> since haskell isn't logic and I'm not sure where it sits on first or second orderness, maybe not. But seems like a similar phenomenon
2026-04-03 16:04:43 +0000tromp(~textual@2001:1c00:340e:2700:f5b2:b468:1c7d:8570)
2026-04-03 16:23:04 +0000rekahsoft(~rekahsoft@76.67.111.168) rekahsoft
2026-04-03 16:37:08 +0000 <gentauro> https://abuseofnotation.github.io/category-theory-illustrated/ <- 🤯
2026-04-03 16:37:14 +0000 <gentauro> just wow !!!
2026-04-03 16:37:29 +0000gentauroI can see that Panic is going to be present at Zurihach 2026
2026-04-03 16:51:01 +0000machinedgod(~machinedg@d172-219-48-230.abhsia.telus.net) machinedgod
2026-04-03 17:00:29 +0000 <monochrom> Yes I think Skolem's paradox applies. Maybe with adjustments to technical details that don't really change the conclusion.
2026-04-03 17:01:55 +0000 <monochrom> (Natural -> Bool) looks like an uncountable space, from inside the system.
2026-04-03 17:02:18 +0000L29Ah(~L29Ah@wikipedia/L29Ah) L29Ah
2026-04-03 17:04:26 +0000tromp(~textual@2001:1c00:340e:2700:f5b2:b468:1c7d:8570) (Quit: My iMac has gone to sleep. ZZZzzz…)
2026-04-03 17:06:25 +0000jmcantrell_(~weechat@user/jmcantrell) (Ping timeout: 245 seconds)
2026-04-03 17:06:39 +0000 <monochrom> If you worry about Haskell not having a nice correspondence with logic (it has some correspondence, just messier), Lean would be a nicer example to look at. For Lean, I haven't thought about Skolem's paradox, but I have thought about parametricity. If you define a "foo :: a -> [a]" in Lean, you cannot prove that it's parametric from inside Lean. (You can and have to step outside and make it a meta-level theorem and proof.)
2026-04-03 17:07:12 +0000 <c_wraith> Haskell is perfectly logical. It just doesn't require a consistent logic.
2026-04-03 17:07:37 +0000 <monochrom> The analogy being: From inside Lean, the space of forall a. a -> [a] looks larger than what parametricity promises.
2026-04-03 17:12:39 +0000puke(~puke@user/puke) puke
2026-04-03 17:12:59 +0000 <monochrom> Err I misspoke. For each individual foo that you know the implementation of, you can prove the free theorem for that foo based on its implementation. But you can't within Lean prove the free theorem for the type "forall a. a -> [a]".
2026-04-03 17:13:00 +0000puke(~puke@user/puke) (Max SendQ exceeded)
2026-04-03 17:13:33 +0000arandombit(~arandombi@user/arandombit) arandombit
2026-04-03 17:14:56 +0000 <EvanR> what is the free theorem, that foo has to yield some number of copies of the input
2026-04-03 17:15:16 +0000 <monochrom> @free foo :: a -> [a]
2026-04-03 17:15:17 +0000 <lambdabot> $map f . foo = foo . f
2026-04-03 17:15:26 +0000 <EvanR> o_O
2026-04-03 17:15:27 +0000puke(~puke@user/puke) puke
2026-04-03 17:16:01 +0000 <c_wraith> I mean... yes. that *is* the same as saying it's producing some number of copies of the input, though it's expressed in a slightly funny way
2026-04-03 17:16:01 +0000 <monochrom> That's abstract. But if you try one single test case "foo ()" and get [(), ()], then you know that foo x = [x,x] for all x for all types.
2026-04-03 17:16:56 +0000 <monochrom> If you add the wording "that 'some number' is the same for all inputs for all types", then it's right on.
2026-04-03 17:16:57 +0000puke(~puke@user/puke) (Max SendQ exceeded)
2026-04-03 17:17:42 +0000puke(~puke@user/puke) puke
2026-04-03 17:19:14 +0000puke(~puke@user/puke) (Max SendQ exceeded)
2026-04-03 17:19:59 +0000puke(~puke@user/puke) puke
2026-04-03 17:21:08 +0000tromp(~textual@2001:1c00:340e:2700:f5b2:b468:1c7d:8570)
2026-04-03 17:21:17 +0000jmcantrell_(~weechat@user/jmcantrell) jmcantrell
2026-04-03 17:21:26 +0000puke(~puke@user/puke) (Max SendQ exceeded)
2026-04-03 17:21:28 +0000 <monochrom> Suppose you know from testing foo () = [(),()], and now you wonder about foo 4. Choose f = const 4. So map (const 4) (foo ()) = foo (const 4 ()), so [4,4] = foo 4.
2026-04-03 17:21:57 +0000puke(~puke@user/puke) puke
2026-04-03 17:21:59 +0000puke(~puke@user/puke) (Remote host closed the connection)
2026-04-03 17:22:02 +0000humasect(~humasect@dyn-192-249-132-90.nexicom.net) humasect
2026-04-03 17:30:34 +0000puke(~puke@user/puke) puke
2026-04-03 17:32:13 +0000craunts795335385(~craunts@152.32.99.2) (Quit: The Lounge - https://thelounge.chat)
2026-04-03 17:32:22 +0000 <monochrom> Here is how your idea is not too far off from the abstract equation. Suppose you say "∃n. ∀x. foo x = replicate n x".
2026-04-03 17:33:27 +0000 <EvanR> ok, I messed up because it's not just some arbitrary n, it's the same n for all types
2026-04-03 17:33:29 +0000 <monochrom> That "∃n" is annoying and elusive, especially since we know exactly how to obtain that n. It's length (foo ()).
2026-04-03 17:34:17 +0000 <monochrom> ∀x. foo x = replicate (length (foo ()) x
2026-04-03 17:34:35 +0000 <dolio> Common lean practice is to assume there are non-parametric functions.
2026-04-03 17:34:55 +0000 <monochrom> But I can simplify "replicate (length (foo ()) x" to "map (const x) (foo ())". Bonus: Now it covers infinite lists too!
2026-04-03 17:36:05 +0000 <monochrom> ∀x. foo x = map (const x) (foo ()). Now @pointfree to get: foo . const x = map (const x) . foo
2026-04-03 17:36:09 +0000 <int-e> :t \x -> [undefined, x, undefined]
2026-04-03 17:36:10 +0000 <lambdabot> a -> [a]
2026-04-03 17:36:18 +0000arandombit(~arandombi@user/arandombit) (Ping timeout: 268 seconds)
2026-04-03 17:36:25 +0000 <monochrom> The abstract equation merely generalizes from const x to arbitrary f.
2026-04-03 17:37:03 +0000 <EvanR> what's a "non-parametric function" besides the obvious
2026-04-03 17:37:07 +0000puke(~puke@user/puke) (Quit: puke)
2026-04-03 17:37:17 +0000 <EvanR> a function that's not parametric
2026-04-03 17:37:23 +0000puke(~puke@user/puke) puke
2026-04-03 17:37:41 +0000 <monochrom> foo x = if x is an Int and x==4 then [1,2,3,x,x^2,42,67] else [x,x,x]
2026-04-03 17:37:48 +0000 <dolio> E.G. `f : ∀a. a -> a` where `f` is the identity on most types, but `not` on `Bool`.
2026-04-03 17:38:05 +0000 <monochrom> anything that violates free theorems.
2026-04-03 17:38:48 +0000 <int-e> dolio: nice use of `not` in a sentence :)
2026-04-03 17:38:48 +0000 <EvanR> I might be too far gone, I never think of stuff like that xD
2026-04-03 17:38:59 +0000 <EvanR> but it comes up a lot when trying to explain haskell polymorphism
2026-04-03 17:39:57 +0000 <EvanR> oh a double not
2026-04-03 17:40:17 +0000 <dolio> Java is not parametric, either, because of `instanceof`.
2026-04-03 17:40:20 +0000 <EvanR> didn't see the quotes at first
2026-04-03 17:40:41 +0000 <monochrom> Also of toString().
2026-04-03 17:40:57 +0000 <dolio> But in lean's case it's because people usually assume excluded middle and global choice.
2026-04-03 17:41:25 +0000 <EvanR> excluded middle ruins parametricity?
2026-04-03 17:41:30 +0000 <dolio> Yeah.
2026-04-03 17:41:38 +0000 <EvanR> o_O
2026-04-03 17:42:07 +0000 <monochrom> So on parametricity homework I pose "if we listened to Java people, then foo :: Show a => a -> [a], now write your foo so that foo () = [(),()] but foo 4 = [1,2,3]"
2026-04-03 17:42:53 +0000 <dolio> Excluded middle tells you whether a type is empty or not.
2026-04-03 17:43:05 +0000 <monochrom> Oh darn haha
2026-04-03 17:43:14 +0000 <EvanR> how does that help
2026-04-03 17:43:26 +0000 <dolio> It's just not parametric over all types.
2026-04-03 17:43:48 +0000 <dolio> Some are empty, some aren't. You don't get back the same 'yes/no' answer regardless of type.
2026-04-03 17:44:13 +0000 <EvanR> oh
2026-04-03 17:44:36 +0000 <monochrom> With parametricity, bar :: [a] implies bar = []. But what if you wrote "bar = if a is empty then [] else let x = choose an element from a in [x,x,x]"
2026-04-03 17:45:09 +0000 <EvanR> list makes it clear again
2026-04-03 17:45:57 +0000 <monochrom> But I like dolio's. tellMe :: a -> Bool should be const True or const False, not tell you whether a is empty.
2026-04-03 17:46:44 +0000 <dolio> It's really `tellMe :: forall a. Bool`
2026-04-03 17:47:00 +0000 <dolio> If you have to provide an a, then the answer must be yes. :)
2026-04-03 17:47:09 +0000 <monochrom> haha
2026-04-03 17:47:18 +0000 <monochrom> Proxy a -> Bool!
2026-04-03 17:47:36 +0000 <dolio> Yeah, that'd work.
2026-04-03 17:48:35 +0000 <EvanR> yeah
2026-04-03 17:48:38 +0000 <monochrom> I guess today's Haskell has "forall a -> Bool" as a middle ground.
2026-04-03 17:48:43 +0000 <EvanR> I was trying to figure out how to fix a -> Bool
2026-04-03 17:49:11 +0000 <EvanR> forall a . Bool ...
2026-04-03 17:49:13 +0000 <EvanR> lol
2026-04-03 17:49:28 +0000 <monochrom> @free tellMe :: [a] -> Bool
2026-04-03 17:49:28 +0000 <lambdabot> tellMe = tellMe . $map f
2026-04-03 17:49:29 +0000 <dolio> Apparently that is a way of characterizing parametricity 'semantically', too. For all `A : U` then `f : U -> A` must be constant, basically.
2026-04-03 17:49:45 +0000confusedalex(~confuseda@user/confusedalex) (Ping timeout: 245 seconds)
2026-04-03 17:49:47 +0000 <dolio> Where U is the 'universe'.
2026-04-03 17:49:52 +0000confusedalex_(~confuseda@user/confusedalex) confusedalex
2026-04-03 17:50:03 +0000confusedalex_confusedalex
2026-04-03 17:50:28 +0000L29Ah(~L29Ah@wikipedia/L29Ah) ()
2026-04-03 17:50:35 +0000 <dolio> Instead of the relational way.
2026-04-03 17:53:01 +0000 <monochrom> Oh interesting, because "constant [over types]" is short for "the same code for all types".
2026-04-03 17:53:32 +0000 <monochrom> which is what I tell beginners if I'm not ready to tell the relational story.
2026-04-03 17:54:14 +0000 <dolio> Yeah. I recently heard about this, and like it better, because it seems closer to the intuitive idea of parametricity.
2026-04-03 17:57:54 +0000 <dolio> You can probably generalize it so that it doesn't depend so much on relative 'size' too.
2026-04-03 17:59:31 +0000 <dolio> Like, there is T parametricity for a class of types if for all A in that class, functions T -> A must be constant, or something.
2026-04-03 18:07:02 +0000confusedalex_(~confuseda@user/confusedalex) confusedalex
2026-04-03 18:07:15 +0000jmcantrell_(~weechat@user/jmcantrell) (Ping timeout: 246 seconds)
2026-04-03 18:08:06 +0000confusedalex(~confuseda@user/confusedalex) (Ping timeout: 255 seconds)
2026-04-03 18:08:06 +0000confusedalex_confusedalex
2026-04-03 18:13:59 +0000byorgey(~byorgey@155.138.238.211)
2026-04-03 18:13:59 +0000byorgey(~byorgey@155.138.238.211) (Changing host)
2026-04-03 18:13:59 +0000byorgey(~byorgey@user/byorgey) byorgey
2026-04-03 18:14:51 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
2026-04-03 18:22:27 +0000absurdvoid(~absurdvoi@user/absurdvoid) (Quit: WeeChat 4.8.2)
2026-04-03 18:25:54 +0000L29Ah(~L29Ah@wikipedia/L29Ah) L29Ah
2026-04-03 18:27:15 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 18:32:06 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
2026-04-03 18:34:41 +0000 <gentauro> :t \ (x :: Void) -> [x]
2026-04-03 18:34:42 +0000 <lambdabot> Void -> [Void]
2026-04-03 18:35:58 +0000 <gentauro> :t \ _ -> {}
2026-04-03 18:35:59 +0000 <lambdabot> error: [GHC-58481] parse error on input ‘{’
2026-04-03 18:36:46 +0000 <gentauro> :t \ a -> case a of {}
2026-04-03 18:36:47 +0000 <lambdabot> p1 -> p2
2026-04-03 18:37:05 +0000 <gentauro> :t \ (a :: Void) -> case a of {}
2026-04-03 18:37:06 +0000 <lambdabot> Void -> p
2026-04-03 18:40:43 +0000slomp(~slomp@47-158-212-88.lsan.ca.frontiernet.net) (Quit: Lost terminal)
2026-04-03 18:43:24 +0000merijn(~merijn@62.45.136.136) merijn
2026-04-03 18:45:36 +0000j1n37(~j1n37@user/j1n37) (Read error: Connection reset by peer)
2026-04-03 18:47:46 +0000merijn(~merijn@62.45.136.136) (Ping timeout: 248 seconds)
2026-04-03 18:48:23 +0000absurdvoid(~absurdvoi@user/absurdvoid) absurdvoid
2026-04-03 18:52:04 +0000humasect(~humasect@dyn-192-249-132-90.nexicom.net) (Remote host closed the connection)
2026-04-03 18:53:49 +0000j1n37(~j1n37@user/j1n37) j1n37
2026-04-03 18:55:55 +0000 <tomsmeding> :t absurd
2026-04-03 18:55:56 +0000 <lambdabot> Void -> a
2026-04-03 18:58:58 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 18:59:44 +0000Digit(~user@user/digit) Digit
2026-04-03 19:03:55 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-04-03 19:08:53 +0000srk(~sorki@user/srk) (Ping timeout: 244 seconds)
2026-04-03 19:12:57 +0000srk(~sorki@user/srk) srk
2026-04-03 19:14:43 +0000koz(~koz@121.99.240.58) (Ping timeout: 264 seconds)
2026-04-03 19:14:48 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 19:16:45 +0000koz(~koz@121.99.240.58)
2026-04-03 19:19:14 +0000machinedgod(~machinedg@d172-219-48-230.abhsia.telus.net) (Ping timeout: 248 seconds)
2026-04-03 19:20:07 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2026-04-03 19:30:38 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 19:35:24 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
2026-04-03 19:44:23 +0000ncfncf-
2026-04-03 19:46:28 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 19:51:12 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
2026-04-03 19:53:33 +0000ncf(~ncf@monade.li) ncf
2026-04-03 19:54:05 +0000Lord_of_Life_(~Lord@user/lord-of-life/x-2819915) Lord_of_Life
2026-04-03 19:54:55 +0000Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 264 seconds)
2026-04-03 19:56:58 +0000Lord_of_Life_Lord_of_Life
2026-04-03 19:57:43 +0000slomp(~slomp@47-158-212-88.lsan.ca.frontiernet.net)
2026-04-03 19:58:32 +0000bitdex(~bitdex@gateway/tor-sasl/bitdex) bitdex
2026-04-03 20:01:21 +0000jmcantrell_(~weechat@user/jmcantrell) jmcantrell
2026-04-03 20:02:11 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 20:03:55 +0000Digit(~user@user/digit) (Ping timeout: 245 seconds)
2026-04-03 20:03:56 +0000Digitteknohippie(~user@user/digit) Digit
2026-04-03 20:07:21 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
2026-04-03 20:11:32 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 20:17:15 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
2026-04-03 20:28:19 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 20:29:20 +0000 <tomsmeding> On the haskell-cafe mailing list there's a remark that aeson doesn't seem to be updated, and that its bound on QuickCheck needs to be bumped; aeson maintainers in turn complain that QuickCheck maintainers have strange views API stability, resulting in aeson not being able to upgrade to newest QuickCheck while keeping aeson's API stability views
2026-04-03 20:29:47 +0000 <tomsmeding> there's a whole discussion there but I feel like it all comes down to the problem it always comes down to: why the f*** does aeson even depend on quickcheck
2026-04-03 20:30:09 +0000 <tomsmeding> answer: aeson wants to provide Arbitrary instances for stuff
2026-04-03 20:30:38 +0000 <tomsmeding> the no-orphans rule understandable for soundness, but it has so many bad effects on a package ecosystem
2026-04-03 20:31:50 +0000 <dolio> Whose rule is the no orphans rule?
2026-04-03 20:32:14 +0000 <tomsmeding> well, GHC's, if you consider GHC's warnings rules
2026-04-03 20:32:25 +0000 <dolio> I don't.
2026-04-03 20:32:44 +0000 <geekosaur> I feel like it should be possible to declare exceptions
2026-04-03 20:32:47 +0000 <tomsmeding> (which is conventionally weakened to at least "no orphan instances in libraries", because in leaf applications they don't really hurt)
2026-04-03 20:33:19 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2026-04-03 20:33:26 +0000 <tomsmeding> but yeah, here I'm really at a loss why there isn't `aeson` and then `aeson-quickcheck` which gives the Arbitrary instances, apart from blowing up the number of tiny packages on Hackage
2026-04-03 20:33:36 +0000 <dolio> It seems like it should be okay for aeson to separate a canonical package out with orphan quick check instances.
2026-04-03 20:33:52 +0000 <dolio> And the rule should mean that random other idiots shouldn't be writing orphan instances for aeson.
2026-04-03 20:33:59 +0000 <tomsmeding> agreed
2026-04-03 20:34:14 +0000 <tomsmeding> good, question resolved, it's aeson's problem :p
2026-04-03 20:35:16 +0000 <dolio> Part of the problem is people unthinkinly obeying stuff in -Wall.
2026-04-03 20:35:28 +0000 <dolio> Just in general.
2026-04-03 20:36:36 +0000takuan(~takuan@d8D86B9E9.access.telenet.be) (Ping timeout: 255 seconds)
2026-04-03 20:38:24 +0000 <geekosaur> part of the problem there is people being trained by gcc/g++ where it's usually a good idea
2026-04-03 20:38:47 +0000 <geekosaur> and I have in fact heard people respond to your complaint with "so why is it in `-Wall`?"
2026-04-03 20:42:56 +0000 <dolio> It seems odd to not want all the warnings in -Wall, even though it still doesn't have all the warnings.
2026-04-03 20:43:45 +0000 <tomsmeding> -Wall not having all warnings, just the generally important ones, is a historical naming error that we're unlikely to be correcting now
2026-04-03 20:44:06 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 20:44:52 +0000 <dolio> I'm not sure any -Wall would be something that I'd endorse, because there are just too many people eager to follow arbitrary coding conventions that trade one error for another, at least in Haskell.
2026-04-03 20:46:47 +0000 <dolio> It'd have to be trimmed way back, at least.
2026-04-03 20:47:06 +0000 <tomsmeding> dolio: you mean GHC's -Wall, or also gcc's -Wall?
2026-04-03 20:47:16 +0000 <dolio> GHC.
2026-04-03 20:47:33 +0000 <dolio> I don't do much C, so I don't know about gcc's choices.
2026-04-03 20:48:32 +0000 <Leary> Global coherence and modularity are at odds; responsibility for their coexistence should fall to the language or packaging system. I can't blame 'aeson' for not wanting to write a bunch of orphans---they really shouldn't have to. Hell, they shouldn't even be /allowed/ to.
2026-04-03 20:49:04 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds)
2026-04-03 20:51:15 +0000 <tomsmeding> dolio: would -Wdefault do? Or is perhaps -Winaccessible-code too much?
2026-04-03 20:51:19 +0000 <tomsmeding> ( https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag-Wdefault )
2026-04-03 20:52:21 +0000 <geekosaur> In the case of gcc a lot of it is older sources and the rest is things known to trip unsuspecting programmers
2026-04-03 20:53:55 +0000 <geekosaur> Point being, C is a very different ecosystem
2026-04-03 20:53:58 +0000 <dolio> -Wdefault looks okay. But that's what's actually on by default, right?
2026-04-03 20:54:06 +0000 <tomsmeding> yes
2026-04-03 20:54:56 +0000 <monochrom> My tangential sideways peeve is that people blindly believe in hlint just because C's lint (totally unrelated) is a really good idea.
2026-04-03 20:55:01 +0000 <tomsmeding> then there is -Wextra, which is in between -Wdefault and -Wall
2026-04-03 20:55:04 +0000 <dolio> I think some beyond that are probably worth enabling, but even -W has some stuff I'm not a huge fan of.
2026-04-03 20:55:10 +0000 <tomsmeding> not to be confused with gcc's -Wextra, which is even more than its -Wall
2026-04-03 20:55:52 +0000 <monochrom> Forgetting that the whole reason C's lint exists is because, for example, of the stupid C syntax design such that you intend "if (x == y)" but you mistype it as "if (x = y)".
2026-04-03 20:56:03 +0000 <geekosaur> `-Wdefault` can be annoying when there are cases where it's hard to avoid defaulting
2026-04-03 20:56:40 +0000 <tomsmeding> geekosaur: I think you mean -Wtype-defaults there, which is in -Wall
2026-04-03 20:56:50 +0000 <geekosaur> lint is long gone, that's why it's compiler warnings now
2026-04-03 20:57:01 +0000 <geekosaur> Oh
2026-04-03 20:57:26 +0000 <geekosaur> It was an AT&T UNIXism
2026-04-03 20:57:37 +0000raelie(~raelie@2a06:5904:11c4:b000:148b:d28e:318a:8d84)
2026-04-03 20:57:37 +0000raelie(~raelie@2a06:5904:11c4:b000:148b:d28e:318a:8d84) (Changing host)
2026-04-03 20:57:37 +0000raelie(~raelie@user/raelie) raelie
2026-04-03 20:58:14 +0000jmcantrell_(~weechat@user/jmcantrell) (Ping timeout: 245 seconds)
2026-04-03 20:58:48 +0000 <geekosaur> And was never updated for ANSI C
2026-04-03 20:58:49 +0000 <dolio> Actually -W is probably okay as a pass before something public.
2026-04-03 20:59:17 +0000 <dolio> The annoying stuff is when you're working.
2026-04-03 20:59:53 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 21:01:18 +0000 <absurdvoid> I find it helpful to have a "dev" mode where a lot of warnings/errors are disabled for quicker iteration. Can be toggled with a flag.
2026-04-03 21:01:23 +0000 <tomsmeding> I agree that -Wunused-bindings and -Wunused-imports are nothing but in the way while you're working
2026-04-03 21:02:17 +0000 <tomsmeding> but I use -Wunused-matches _all the time_ while coding
2026-04-03 21:02:28 +0000 <tomsmeding> it's my signal that I still need to do something
2026-04-03 21:04:54 +0000 <monochrom> I refuse -Wunused-do-bind under all circumstances.
2026-04-03 21:05:01 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds)
2026-04-03 21:05:20 +0000 <tomsmeding> refuse to enable it?
2026-04-03 21:05:26 +0000 <monochrom> Yeah.
2026-04-03 21:06:07 +0000 <tomsmeding> oh, that one. Yeah, I find myself following it but it's questionable, true
2026-04-03 21:07:07 +0000 <dolio> I'm not sure I've ever found a genuine problem with that one.
2026-04-03 21:08:16 +0000 <dolio> I'm pretty down on -Wname-shadowing these days, too.
2026-04-03 21:08:22 +0000 <monochrom> Is the purpose of -Wall assistance or is it policing? If I write "do foo; quux; bar x" as a mistake and it should be "do x <- foo; quux; bar x", I will know soon enough, either because "x not in scope" or I spot the absence of x myself when I write "bar x".
2026-04-03 21:08:42 +0000pavonia(~user@user/siracusa) siracusa
2026-04-03 21:08:49 +0000 <monochrom> Only policing can explain why I need one more warning.
2026-04-03 21:09:28 +0000 <tomsmeding> C actually has a more selective version of -Wunused-do-bind: -Wunused-result, which only triggers for functions that are declared with a particular attribute warn-unused-result
2026-04-03 21:09:37 +0000arandombit(~arandombi@user/arandombit) arandombit
2026-04-03 21:09:39 +0000 <tomsmeding> which is important in C because of return values you should not forget to check
2026-04-03 21:09:52 +0000 <monochrom> Yeah that one I appreciate.
2026-04-03 21:10:16 +0000 <dolio> The purpose of unused-do-bind is supposedly to catch when you use traverse instead of traverse_ or similar.
2026-04-03 21:10:58 +0000 <dolio> But the number of efficiency errors like that is much lower than results you just don't care about.
2026-04-03 21:11:07 +0000 <monochrom> That belongs to hlint.
2026-04-03 21:11:20 +0000 <monochrom> Or at least, IMO it should belong to hlint.
2026-04-03 21:11:34 +0000 <monochrom> What's next, -Wall warn you about foldl vs foldl' too?
2026-04-03 21:11:38 +0000 <geekosaur> hlint would need to know about types instead of code heuristics to do that, though
2026-04-03 21:11:55 +0000 <tomsmeding> honestly one of the reasons -Wunused-do-bind is annoying is because parsec and friends for some inscrutable reason made `char` return a Char
2026-04-03 21:12:11 +0000finsternis(~X@23.226.237.192) finsternis
2026-04-03 21:12:18 +0000 <tomsmeding> I'm already passing you the character, why return it?
2026-04-03 21:12:28 +0000 <monochrom> No, hlint just needs to hardcode the syntax pattern of "do ... ; traverse/forM xs; ..."
2026-04-03 21:13:21 +0000 <monochrom> Oh I can justify the char parser. I may have `char 'a' <|> char 'b'` now I want to know which one I got. :)
2026-04-03 21:13:58 +0000 <tomsmeding> I guess. Now I wonder which came first: -Wall having -Wunused-do-binds, or parsec having char returning a Char
2026-04-03 21:14:21 +0000raelie(~raelie@user/raelie) (Remote host closed the connection)
2026-04-03 21:14:41 +0000 <tomsmeding> because in my (mostly pointless) following of -Wunused-do-bind in my code, 90% of the annoying cases where I add a pointless `_ <-` are for `char`
2026-04-03 21:14:44 +0000 <geekosaur> parsec by a decade, I think
2026-04-03 21:15:03 +0000 <tomsmeding> adding a _ to a mapM is really not the problem
2026-04-03 21:15:35 +0000 <geekosaur> along with a lot of example code which assumed `-Wunused-do-bind` didn't exist
2026-04-03 21:15:39 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 21:15:43 +0000 <tomsmeding> nice
2026-04-03 21:15:50 +0000 <tomsmeding> well that explains :p
2026-04-03 21:16:13 +0000 <monochrom> `char` returning the character you already know is a nicety that you have the full right to use or ignore. SImilarly to in the OOP world most methods return this so you can chain o.m1().m2().m3(). (Especially popular among the JS people.)
2026-04-03 21:16:28 +0000 <tomsmeding> ah, and 8% of the remaining cases are forkIO
2026-04-03 21:16:55 +0000 <monochrom> But most importantly, the OOP world did not freak out and added -Wunused-return-value to their -Wall.
2026-04-03 21:16:56 +0000 <tomsmeding> (I just wrote one)
2026-04-03 21:19:55 +0000absurdvoid(~absurdvoi@user/absurdvoid) (Ping timeout: 268 seconds)
2026-04-03 21:20:23 +0000Guest20(~Guest20@149.3.7.235)
2026-04-03 21:20:42 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
2026-04-03 21:21:43 +0000absurdvoid(~absurdvoi@user/absurdvoid) absurdvoid
2026-04-03 21:24:00 +0000Square3(~Square@user/square) Square
2026-04-03 21:25:03 +0000 <monochrom> OK I like -W now. Didn't know that it exists.
2026-04-03 21:28:44 +0000 <monochrom> gcc -O2 turns on more warnings than -O0. Anyone want to bring that ideology to GHC? Maybe next April 1? >:)
2026-04-03 21:29:07 +0000 <tomsmeding> isn't that to make ghc -O0 faster?
2026-04-03 21:29:21 +0000 <monochrom> I don't know. Is that it?
2026-04-03 21:29:44 +0000 <tomsmeding> IIRC some of the analyses needed to produce the warnings are only computed for the benefit of particular optimisations
2026-04-03 21:29:57 +0000 <monochrom> I was guessing that it was because -O2 breaks more code under beginner mistakes.
2026-04-03 21:30:04 +0000 <tomsmeding> or, reformulated, they think it's not worth generating the warnings if that's the only reason for running the analysis
2026-04-03 21:30:20 +0000 <tomsmeding> but this is from memory -- not 100% sure
2026-04-03 21:30:27 +0000 <monochrom> Ah OK. I think the two are logically equivalent. :)
2026-04-03 21:30:36 +0000 <tomsmeding> observationally, yes
2026-04-03 21:30:54 +0000 <tomsmeding> ideologically it's a little more nuanced
2026-04-03 21:31:00 +0000 <monochrom> At least there is a strong correlation between unoptimized and bad code working fine.
2026-04-03 21:31:21 +0000 <tomsmeding> what kind of warnings would become more important under optimisations?
2026-04-03 21:31:37 +0000 <tomsmeding> warning about = vs == is independent of optimisations
2026-04-03 21:31:42 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 21:32:11 +0000 <monochrom> I forgot. I seem to recall that unused-return-value is one of them.
2026-04-03 21:32:44 +0000 <tomsmeding> that... has nothing to do with optimisations? fork() doesn't care whether you used -O2 if it wants to fail
2026-04-03 21:33:22 +0000 <tomsmeding> not saying there are none, I just can't think of any :)
2026-04-03 21:34:32 +0000 <monochrom> OK I have: int main(void) {char b[100]; read(0, b, 100); ...
2026-04-03 21:34:41 +0000 <monochrom> No warning until -O2
2026-04-03 21:35:14 +0000 <monochrom> So I still don't know why! :)
2026-04-03 21:35:52 +0000 <tomsmeding> the manual doesn't elucidate: https://gcc.gnu.org/onlinedocs/gcc/Common-Attributes.html#index-warn_005funused_005fresult
2026-04-03 21:35:53 +0000synchromesh(~john@2406:5a00:2412:2c00:343e:4e23:bce:73a3) (Read error: Connection reset by peer)
2026-04-03 21:36:19 +0000 <tomsmeding> I guess https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result is the better link
2026-04-03 21:36:55 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2026-04-03 21:37:56 +0000synchromesh(~john@2406:5a00:2412:2c00:343e:4e23:bce:73a3) synchromesh
2026-04-03 21:43:41 +0000 <monochrom> Adding "int r; r =" kills the warning under -O2. So it is not even like "we need an elaborate live-variable analysis to discover unused results" :)
2026-04-03 21:44:00 +0000 <tomsmeding> yes, I'm a little confused too
2026-04-03 21:44:41 +0000 <tomsmeding> monochrom: although now you have a -Wunused-but-set-variable ;)
2026-04-03 21:47:05 +0000 <monochrom> When confronted with an unused-value problem, some people go, "I know, I will store it in a fresh variable!". Now they have two problems. >:)
2026-04-03 21:47:07 +0000 <tomsmeding> monochrom: I do not share your observations, I get no -Wunused-result for read(2) whatsoever on my system (linux, gcc 15.2.1), but I do get that warning for realloc() regardless of the optimisation level
2026-04-03 21:47:55 +0000 <tomsmeding> same for clang 21.1.6
2026-04-03 21:48:49 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-03 21:56:07 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2026-04-03 22:05:10 +0000puke(~puke@user/puke) (Ping timeout: 250 seconds)