Home liberachat/#haskell: Logs Calendar

Logs on 2026-04-03 (liberachat/#haskell)

00:00:13 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
00:05:59 karenw joins (~karenw@user/karenw)
00:06:13 jmcantrell_ joins (~weechat@user/jmcantrell)
00:07:46 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
00:12:09 × jmcantrell_ quits (~weechat@user/jmcantrell) (Ping timeout: 255 seconds)
00:18:33 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
00:23:07 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
00:33:18 × peterbecich quits (~Thunderbi@71.84.33.135) (Ping timeout: 255 seconds)
00:33:55 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
00:38:42 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
00:49:18 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
00:52:59 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 265 seconds)
00:52:59 × synchromesh quits (~john@2406:5a00:2412:2c00:fc97:d0a4:cdd9:afc1) (Read error: Connection reset by peer)
00:53:42 × acidjnk_new3 quits (~acidjnk@p200300d6e700e5001e1160b7d23e5dd6.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
00:54:13 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds)
00:54:15 synchromesh joins (~john@2406:5a00:2412:2c00:fc97:d0a4:cdd9:afc1)
00:57:22 × xff0x quits (~xff0x@2405:6580:b080:900:1644:ff9e:fe83:e2e) (Ping timeout: 248 seconds)
01:04:40 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
01:09:20 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
01:13:57 <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
01:13:59 <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
01:14:01 <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
01:15:16 <c_wraith> It's nearly accurate for ST
01:15:29 humasect joins (~humasect@dyn-192-249-132-90.nexicom.net)
01:15:30 <c_wraith> which the reference to runST implies is what it's intended to be talking about.
01:15:48 <c_wraith> (It's true for ST as long as you don't use any of the unsafe* functions)
01:16:12 <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
01:19:57 × comonad quits (~comonad@p200300d02717df00adc247ef70bd7367.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
01:20:01 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
01:21:05 comonad joins (~comonad@p200300d02717df00adc247ef70bd7367.dip0.t-ipconnect.de)
01:24:25 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
01:35:29 merijn joins (~merijn@62.45.136.136)
01:36:34 jmcantrell_ joins (~weechat@user/jmcantrell)
01:41:59 × merijn quits (~merijn@62.45.136.136) (Ping timeout: 245 seconds)
01:46:01 × foul_owl quits (~kerry@94.156.149.94) (Read error: Connection reset by peer)
01:51:21 <EvanR> even without unsafe perform IO, the primitives GHC has get implemented somehow
01:51:42 <EvanR> there are a lot of them
01:52:06 <EvanR> if you use GMP based Integer there's also that
01:53:27 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
01:56:14 xff0x joins (~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp)
01:57:54 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
02:07:24 <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".
02:08:43 × zzz quits (~zero@user/zero) (Ping timeout: 264 seconds)
02:08:49 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
02:08:54 <monochrom> So even sophomores can understand that the negation of "all usages of unsafePerformIO are safe" is not "all usages of unsafePerformIO are unsafe".
02:10:53 <EvanR> maybe mesaoptimizer wants to see also SafeHaskell
02:13:20 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds)
02:17:54 zzz joins (~zero@user/zero)
02:22:12 × squid64 quits (~user@fsf/member/squid64) (Ping timeout: 255 seconds)
02:24:17 merijn joins (~merijn@62.45.136.136)
02:24:59 × humasect quits (~humasect@dyn-192-249-132-90.nexicom.net) (Quit: Leaving...)
02:28:32 × merijn quits (~merijn@62.45.136.136) (Ping timeout: 252 seconds)
02:33:31 <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.
02:34:50 abbies joins (~abbies@tilde.guru)
02:35:01 × rekahsoft quits (~rekahsoft@bras-base-orllon1103w-grc-20-76-67-111-168.dsl.bell.ca) (Remote host closed the connection)
02:35:03 <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
02:35:05 <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!
02:35:44 <mesaoptimizer> geekosaur: yeah that is now my current interpretation of it. it does seem quite confusing though
02:36:39 × abbies quits (~abbies@tilde.guru) (Client Quit)
02:37:00 <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.
02:37:48 <geekosaur> this is no different from https://doc.rust-lang.org/book/ch20-01-unsafe-rust.html
02:38:40 <mesaoptimizer> no I get that
02:38:46 <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
02:39:18 <davean> geekosaur: About unsafe stuff
02:39:19 <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
02:39:33 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
02:39:47 <EvanR> that article isn't LLM style at all
02:39:57 <EvanR> it's classic "dev speak"
02:40:00 <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
02:40:19 <EvanR> we've seen reports like this for years
02:40:25 <EvanR> tales from tech
02:40:38 <EvanR> none it seems especially controversial either
02:40:40 <Leary> mesaoptimizer: You expect wrong; people use 'pure' just to mean 'pure'; there's no implicit /by construction/.
02:41:16 <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
02:42:19 <EvanR> as you wish
02:42:30 <mesaoptimizer> Leary: perhaps I misused the word, but my point was about semantic safety, in the sense of Benjamin Pierce's definition in TAPL
02:42:56 <mesaoptimizer> so it still stands. It is not specific to Haskell.
02:42:58 × arandombit quits (~arandombi@user/arandombit) (Ping timeout: 248 seconds)
02:43:17 <EvanR> ok if you're going to analyze the article then yeah maybe read it
02:43:23 <EvanR> otherwise don't bother
02:43:57 <EvanR> (there's a lot in there that is haskell specific, but as far as groundbreaking insights maybe not many)
02:44:02 <davean> Yah the obligation is on you to actually think clearly about it.
02:44:15 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
02:44:47 <mesaoptimizer> EvanR: I disagree about that claim when in a cognitively adverserial environment
02:44:56 <mesaoptimizer> ... sorry, that was for davean
02:45:00 arandombit joins (~arandombi@2a02:2455:8656:7100:cd4b:38a2:fba4:622b)
02:45:00 × arandombit quits (~arandombi@2a02:2455:8656:7100:cd4b:38a2:fba4:622b) (Changing host)
02:45:00 arandombit joins (~arandombi@user/arandombit)
02:45:39 <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.
02:54:22 weary-traveler joins (~user@user/user363627)
02:54:56 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
02:55:45 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
02:56:13 <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
02:57:22 <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".
02:57:31 <EvanR> we need a new latin fallacy like ad hominem but for attacking the LLM
02:58:39 <monochrom> ad machina >:)
02:58:44 <mesaoptimizer> erm, I have been paid to do research engineer work on neural networks, and have worked with researchers now at DM and Anthropic
02:58:54 <EvanR> that article isn't about LLMs or AI at all so
02:58:57 <monochrom> or perhaps ad machinem?
02:59:37 <mesaoptimizer> okay, *at least* you aren't saying I'm wrong, I do appreciate that lol
02:59:37 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 272 seconds)
02:59:42 <monochrom> "I do not trust it when a computer says 1+1=2 because it's a stupid computer!"
03:00:17 <EvanR> butlerian jihad!
03:00:20 <Leary> mesaoptimizer: LLMs do that because they ate a huge amount of text written by humans who did that.
03:00:44 <geekosaur> ^
03:01:19 <monochrom> Haven't you heard? Those LLMs that have learned from history are doomed to repeat it!
03:01:27 <mesaoptimizer> I think the thing you wish to encourage is "read the docs"
03:01:45 <mesaoptimizer> or a sort of "hey, look you have to put in the work if you want to master this"
03:02:14 <EvanR> what's this in relation to
03:02:22 <EvanR> just in general?
03:02:34 <EvanR> sure
03:02:44 <mesaoptimizer> yeah, I'm confused by the reaction of you guys just now
03:03:02 <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
03:04:44 <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.
03:05:27 <mesaoptimizer> anyway, let's move on
03:05:28 <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
03:05:55 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
03:06:07 <EvanR> your point started out as the article is a dangerous waste of time but we're still talking about it
03:06:17 <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
03:06:46 <geekosaur> the kinds of messes they produce fit that model very well
03:07:15 <mesaoptimizer> will reply in #haskell-offtopic.
03:10:10 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
03:21:18 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
03:27:49 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
03:38:46 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 265 seconds)
03:39:21 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
03:44:06 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
03:54:26 × machinedgod quits (~machinedg@d172-219-48-230.abhsia.telus.net) (Ping timeout: 248 seconds)
03:55:15 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
03:59:52 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds)
04:03:35 sp1ff joins (~user@2601:1c2:4080:14c0::ace8)
04:09:22 × monochrom quits (trebla@216.138.220.146) (Ping timeout: 244 seconds)
04:09:29 × comonad quits (~comonad@p200300d02717df00adc247ef70bd7367.dip0.t-ipconnect.de) (Ping timeout: 245 seconds)
04:10:24 × arandombit quits (~arandombi@user/arandombit) (Ping timeout: 244 seconds)
04:10:38 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
04:10:40 comonad joins (~comonad@p200300d02717df00adc247ef70bd7367.dip0.t-ipconnect.de)
04:12:26 monochrom joins (~trebla@216.138.220.146)
04:14:54 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
04:15:44 × comonad quits (~comonad@p200300d02717df00adc247ef70bd7367.dip0.t-ipconnect.de) (Ping timeout: 245 seconds)
04:16:50 comonad joins (~comonad@p200300d02717df00adc247ef70bd7367.dip0.t-ipconnect.de)
04:22:53 arandombit joins (~arandombi@user/arandombit)
04:26:00 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
04:30:33 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds)
04:32:06 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Quit: ChaiTRex)
04:34:54 × arandombit quits (~arandombi@user/arandombit) (Ping timeout: 246 seconds)
04:40:42 takuan joins (~takuan@d8D86B9E9.access.telenet.be)
04:41:27 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
04:45:38 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
04:46:40 humasect joins (~humasect@dyn-192-249-132-90.nexicom.net)
04:49:29 × monochrom quits (~trebla@216.138.220.146) (Ping timeout: 245 seconds)
04:50:40 monochrom joins (trebla@216.138.220.146)
04:54:10 × Nosrep quits (~jimothy@user/nosrep) (Ping timeout: 248 seconds)
04:56:58 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
04:59:26 × somemathguy quits (~somemathg@user/somemathguy) (Quit: WeeChat 4.1.1)
05:03:53 ChaiTRex joins (~ChaiTRex@user/chaitrex)
05:03:58 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds)
05:06:21 arandombit joins (~arandombi@2a02:2455:8656:7100:cd4b:38a2:fba4:622b)
05:06:21 × arandombit quits (~arandombi@2a02:2455:8656:7100:cd4b:38a2:fba4:622b) (Changing host)
05:06:21 arandombit joins (~arandombi@user/arandombit)
05:06:56 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
05:11:22 × arandombit quits (~arandombi@user/arandombit) (Ping timeout: 268 seconds)
05:11:43 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
05:13:32 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Quit: ChaiTRex)
05:22:17 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
05:25:50 ChaiTRex joins (~ChaiTRex@user/chaitrex)
05:26:42 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
05:32:18 somemathguy joins (~somemathg@user/somemathguy)
05:37:46 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
05:39:57 arandombit joins (~arandombi@2a02:2455:8656:7100:cd4b:38a2:fba4:622b)
05:39:57 × arandombit quits (~arandombi@2a02:2455:8656:7100:cd4b:38a2:fba4:622b) (Changing host)
05:39:57 arandombit joins (~arandombi@user/arandombit)
05:42:06 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
05:44:26 × arandombit quits (~arandombi@user/arandombit) (Ping timeout: 244 seconds)
05:53:05 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
05:57:38 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
06:00:47 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection)
06:02:46 ChaiTRex joins (~ChaiTRex@user/chaitrex)
06:02:58 × jmcantrell_ quits (~weechat@user/jmcantrell) (Ping timeout: 248 seconds)
06:07:57 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
06:11:50 × attlin quits (~user@user/attlin) (Ping timeout: 245 seconds)
06:12:36 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
06:15:02 arandombit joins (~arandombi@user/arandombit)
06:23:18 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
06:23:52 attlin joins (~user@216.126.236.136)
06:23:52 × attlin quits (~user@216.126.236.136) (Changing host)
06:23:52 attlin joins (~user@user/attlin)
06:27:46 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds)
06:32:43 × karenw quits (~karenw@user/karenw) (Ping timeout: 264 seconds)
06:38:40 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
06:40:06 × somemathguy quits (~somemathg@user/somemathguy) (Quit: WeeChat 4.1.1)
06:45:06 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
06:45:38 qqq joins (~qqq@185.54.23.237)
06:49:13 × GdeVolpiano quits (~GdeVolpia@user/GdeVolpiano) (Ping timeout: 248 seconds)
06:53:01 GdeVolpiano joins (~GdeVolpia@user/GdeVolpiano)
06:56:43 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
07:01:12 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
07:02:42 CiaoSen joins (~Jura@p549cb690.dip0.t-ipconnect.de)
07:08:58 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
07:13:35 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 272 seconds)
07:16:33 × arandombit quits (~arandombi@user/arandombit) (Ping timeout: 268 seconds)
07:17:20 × sim590 quits (~simon@2001:18c0:a82:2400::9fb) (Quit: WeeChat 4.8.2)
07:24:21 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
07:25:42 × CiaoSen quits (~Jura@p549cb690.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
07:27:55 CiaoSen joins (~Jura@p549cb690.dip0.t-ipconnect.de)
07:28:30 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
07:32:25 arandombit joins (~arandombi@2a02:2455:8656:7100:cd4b:38a2:fba4:622b)
07:32:25 × arandombit quits (~arandombi@2a02:2455:8656:7100:cd4b:38a2:fba4:622b) (Changing host)
07:32:25 arandombit joins (~arandombi@user/arandombit)
07:37:45 × arandombit quits (~arandombi@user/arandombit) (Ping timeout: 248 seconds)
07:39:43 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
07:44:18 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds)
07:46:45 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
07:51:11 arandombit joins (~arandombi@2a02:2455:8656:7100:cd4b:38a2:fba4:622b)
07:51:11 × arandombit quits (~arandombi@2a02:2455:8656:7100:cd4b:38a2:fba4:622b) (Changing host)
07:51:11 arandombit joins (~arandombi@user/arandombit)
07:55:04 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
07:56:00 × humasect quits (~humasect@dyn-192-249-132-90.nexicom.net) (Remote host closed the connection)
07:58:01 × CiaoSen quits (~Jura@p549cb690.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
07:58:26 × arandombit quits (~arandombi@user/arandombit) (Ping timeout: 256 seconds)
07:58:46 × qqq quits (~qqq@185.54.23.237) (Remote host closed the connection)
07:59:34 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds)
08:05:34 humasect joins (~humasect@dyn-192-249-132-90.nexicom.net)
08:07:00 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
08:09:18 CiaoSen joins (~Jura@p549cb690.dip0.t-ipconnect.de)
08:10:42 × emmanuelux quits (~em@user/emmanuelux) (Quit: bye)
08:12:40 qqq joins (~qqq@185.54.23.237)
08:20:13 × rabbull quits (~rabbull@user/rabbull) (Read error: Connection reset by peer)
08:20:33 rabbull joins (~rabbull@user/rabbull)
08:22:12 acidjnk_new3 joins (~acidjnk@p200300d6e700e5002ce9abe45c9e09a5.dip0.t-ipconnect.de)
08:23:44 __monty__ joins (~toonn@user/toonn)
08:32:43 × CiaoSen quits (~Jura@p549cb690.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
08:36:00 × Digit quits (~user@user/digit) (Ping timeout: 245 seconds)
08:41:11 arandombit joins (~arandombi@2a02:2455:8656:7100:cd4b:38a2:fba4:622b)
08:41:11 × arandombit quits (~arandombi@2a02:2455:8656:7100:cd4b:38a2:fba4:622b) (Changing host)
08:41:11 arandombit joins (~arandombi@user/arandombit)
08:45:50 × arandombit quits (~arandombi@user/arandombit) (Ping timeout: 252 seconds)
08:51:24 Guest62 joins (~Guest62@p200300ca8f128700b6df0e37d8ec3f22.dip0.t-ipconnect.de)
08:55:31 × rembo10_ quits (~rembo10@main.remulis.com) (Quit: ZNC 1.10.1 - https://znc.in)
08:56:21 rembo10 joins (~rembo10@main.remulis.com)
08:58:06 Tuplanolla joins (~Tuplanoll@88-114-89-88.elisa-laajakaista.fi)
09:00:52 arandombit joins (~arandombi@user/arandombit)
09:02:55 × humasect quits (~humasect@dyn-192-249-132-90.nexicom.net) (Remote host closed the connection)
09:07:23 × Guest62 quits (~Guest62@p200300ca8f128700b6df0e37d8ec3f22.dip0.t-ipconnect.de) (Quit: Client closed)
09:10:10 × synchromesh quits (~john@2406:5a00:2412:2c00:fc97:d0a4:cdd9:afc1) (Read error: Connection reset by peer)
09:11:03 synchromesh joins (~john@2406:5a00:2412:2c00:343e:4e23:bce:73a3)
09:12:25 Digitteknohippie joins (~user@user/digit)
09:12:28 Square3 joins (~Square@user/square)
09:19:14 Digitteknohippie is now known as Digit
09:54:17 × xff0x quits (~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp) (Ping timeout: 248 seconds)
10:02:26 × arandombit quits (~arandombi@user/arandombit) (Ping timeout: 268 seconds)
10:07:12 × califax quits (~califax@user/califx) (Remote host closed the connection)
10:07:22 × Square3 quits (~Square@user/square) (Ping timeout: 268 seconds)
10:07:25 califax joins (~califax@user/califx)
10:10:37 arandombit joins (~arandombi@2a02:2455:8656:7100:cd4b:38a2:fba4:622b)
10:10:37 × arandombit quits (~arandombi@2a02:2455:8656:7100:cd4b:38a2:fba4:622b) (Changing host)
10:10:37 arandombit joins (~arandombi@user/arandombit)
10:16:14 acidjnk_new joins (~acidjnk@p200300d6e700e5029fa95e10e4e0754b.dip0.t-ipconnect.de)
10:19:21 × acidjnk_new3 quits (~acidjnk@p200300d6e700e5002ce9abe45c9e09a5.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
10:20:29 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
10:47:43 × arandombit quits (~arandombi@user/arandombit) (Ping timeout: 244 seconds)
10:48:40 <gentauro> > :i newStdGen
10:48:41 <lambdabot> <hint>:1:1: error: parse error on input `:'
10:48:46 <gentauro> % :i newStdGen
10:48:46 <yahb2> <interactive>:1:1: error: [GHC-76037] Not in scope: ‘newStdGen’
10:49:05 <gentauro> % import System.Random
10:49:05 <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.
10:49:08 <gentauro> > import System.Random
10:49:09 <lambdabot> <hint>:1:1: error: parse error on input `import'
11:02:13 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
11:43:04 <tomsmeding> gentauro: random is not a boot library
11:44:30 <tomsmeding> %% System.Process.system "ghc-pkg --global list"
11:44:30 <yahb2> https://paste.tomsmeding.com/SSJGWZ5X
11:56:46 wootehfoot joins (~wootehfoo@user/wootehfoot)
12:03:32 czan joins (~czan@user/mange)
12:12:45 <gentauro> tomsmeding: :(
12:13:22 <gentauro> tomsmeding: how do you invoke our Lord and Saviour RNGesus here?
12:24:35 xff0x joins (~xff0x@2405:6580:b080:900:ec01:f28c:6f01:3489)
12:25:54 tromp joins (~textual@2001:1c00:340e:2700:f5b2:b468:1c7d:8570)
12:30:57 somemathguy joins (~somemathg@user/somemathguy)
12:32:25 <tomsmeding> % :m Data.Bits Data.Word
12:32:25 <yahb2> <no output>
12:32:37 <tomsmeding> % data RNG = RNG Word64 Word64 Word64 Word64 deriving (Show) -- https://arxiv.org/pdf/2312.17043 CWG64
12:32:37 <yahb2> <no output>
12:32:43 <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)
12:32:43 <yahb2> <no output>
12:32:48 <tomsmeding> % newRNG :: Word64 -> RNG ; newRNG seed = iterate (snd . cwg64) (RNG 0 0 0 (2*seed+1)) !! 48
12:32:48 <yahb2> <no output>
12:33:24 <tomsmeding> % take 4 . map fst . iterate (cwg64 . snd) $ cwg64 (newRNG 42)
12:33:24 <yahb2> [14283230361796893884,4031505161053706,7205329903210052340,4002821135440951121]
12:34:53 <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)
12:34:53 <yahb2> <no output>
12:34:56 <tomsmeding> % take 4 . map fst . iterate (cwg64 . snd) $ cwg64 (newRNG 42)
12:34:56 <yahb2> [14283230361796891556,4031505161050178,7205329903210052357,4002821135440958291]
12:35:48 <tomsmeding> ... interesting, that typo didn't change the results; I wonder if that means that x just doesn't have high bits?
12:36:00 <tomsmeding> ¯\_(ツ)_/¯
12:50:32 × craunts795335385 quits (~craunts@152.32.99.2) (Quit: The Lounge - https://thelounge.chat)
13:02:57 × tromp quits (~textual@2001:1c00:340e:2700:f5b2:b468:1c7d:8570) (Quit: My iMac has gone to sleep. ZZZzzz…)
13:05:00 × divlamir quits (~divlamir@user/divlamir) (Read error: Connection reset by peer)
13:05:19 <int-e> % Data.ByteString.Lazy.take 32 <$> Data.ByteString.Lazy.readFile "/dev/urandom"
13:05:19 <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...
13:05:26 divlamir joins (~divlamir@user/divlamir)
13:05:27 <int-e> oh, haha
13:05:52 × czan quits (~czan@user/mange) (Quit: Zzz...)
13:11:11 tromp joins (~textual@2001:1c00:340e:2700:f5b2:b468:1c7d:8570)
13:18:40 <int-e> % foreign import ccall getrandom :: Ptr a -> CSize -> CInt -> IO CSize
13:18:40 <yahb2> <no output>
13:18:40 × synchromesh quits (~john@2406:5a00:2412:2c00:343e:4e23:bce:73a3) (Read error: Connection reset by peer)
13:18:50 <int-e> % alloca (\p -> getrandom p 8 0 >> peek p) :: IO Word
13:18:50 <yahb2> 1080570571463088587
13:19:48 synchromesh joins (~john@2406:5a00:2412:2c00:343e:4e23:bce:73a3)
13:32:30 <tomsmeding> int-e: cool
13:33:45 <tomsmeding> % :q
13:33:45 <yahb2> <bye>
13:33:51 <tomsmeding> % Data.ByteString.Lazy.take 32 <$> Data.ByteString.Lazy.readFile "/dev/urandom"
13:33:51 <yahb2> "V4\205\ESC\247Kv\194\EOT\144\DLEf\165\211%\201\197&\156\ESC\190\CAN*\RS\CAN\215Fj\"\226n\CAN"
13:34:07 <tomsmeding> added it to the sandbox
13:34:38 <tomsmeding> gentauro: ^
13:42:18 × somemathguy quits (~somemathg@user/somemathguy) (Ping timeout: 246 seconds)
13:47:29 × byorgey quits (~byorgey@user/byorgey) (Quit: leaving)
13:48:13 <gentauro> :)
13:57:40 × acidjnk_new quits (~acidjnk@p200300d6e700e5029fa95e10e4e0754b.dip0.t-ipconnect.de) (Ping timeout: 245 seconds)
13:59:35 Nosrep joins (~jimothy@user/nosrep)
14:05:23 × GdeVolpiano quits (~GdeVolpia@user/GdeVolpiano) (Ping timeout: 252 seconds)
14:07:22 GdeVolpiano joins (~GdeVolpia@user/GdeVolpiano)
14:14:38 haritz joins (~hrtz@140.228.70.141)
14:14:38 × haritz quits (~hrtz@140.228.70.141) (Changing host)
14:14:38 haritz joins (~hrtz@user/haritz)
14:25:12 × qqq quits (~qqq@185.54.23.237) (Remote host closed the connection)
14:27:15 somemathguy joins (~somemathg@user/somemathguy)
14:38:27 × tromp quits (~textual@2001:1c00:340e:2700:f5b2:b468:1c7d:8570) (Quit: My iMac has gone to sleep. ZZZzzz…)
14:44:32 tromp joins (~textual@2001:1c00:340e:2700:f5b2:b468:1c7d:8570)
14:51:27 × Digit quits (~user@user/digit) (Ping timeout: 255 seconds)
14:53:13 craunts795335385 joins (~craunts@152.32.99.2)
15:12:31 jmcantrell_ joins (~weechat@user/jmcantrell)
15:23:21 absurdvoid joins (~absurdvoi@user/absurdvoid)
15:24:30 <monochrom> % Data.ByteString.Lazy.take 32 <$> Data.ByteString.Lazy.readFile "/dev/urandom"
15:24:30 <yahb2> ":>\164\&6\135-;\215\226?\250a\130\DC1\162\159\234\130\145p9\235\244YPY\DC1\241\240l\148{"
15:24:50 <monochrom> (Just testing whether it's always the same string. >:) )
15:25:06 × olivial quits (~benjaminl@user/benjaminl) (Ping timeout: 248 seconds)
15:30:22 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
15:35:14 olivial joins (~benjaminl@user/benjaminl)
15:37:31 × Ranhir quits (~Ranhir@157.97.53.139) (Ping timeout: 264 seconds)
15:43:08 × tromp quits (~textual@2001:1c00:340e:2700:f5b2:b468:1c7d:8570) (Quit: My iMac has gone to sleep. ZZZzzz…)
15:50:04 <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
15:50:09 <EvanR> er skolem's paradox
15:51:22 L29Ah parts (~L29Ah@wikipedia/L29Ah) ()
15:51:50 <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
16:04:43 tromp joins (~textual@2001:1c00:340e:2700:f5b2:b468:1c7d:8570)
16:23:04 rekahsoft joins (~rekahsoft@76.67.111.168)
16:37:08 <gentauro> https://abuseofnotation.github.io/category-theory-illustrated/ <- 🤯
16:37:14 <gentauro> just wow !!!
16:37:29 gentauro I can see that Panic is going to be present at Zurihach 2026
16:51:01 machinedgod joins (~machinedg@d172-219-48-230.abhsia.telus.net)
17:00:29 <monochrom> Yes I think Skolem's paradox applies. Maybe with adjustments to technical details that don't really change the conclusion.
17:01:55 <monochrom> (Natural -> Bool) looks like an uncountable space, from inside the system.
17:02:18 L29Ah joins (~L29Ah@wikipedia/L29Ah)
17:04:26 × tromp quits (~textual@2001:1c00:340e:2700:f5b2:b468:1c7d:8570) (Quit: My iMac has gone to sleep. ZZZzzz…)
17:06:25 × jmcantrell_ quits (~weechat@user/jmcantrell) (Ping timeout: 245 seconds)
17:06:39 <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.)
17:07:12 <c_wraith> Haskell is perfectly logical. It just doesn't require a consistent logic.
17:07:37 <monochrom> The analogy being: From inside Lean, the space of forall a. a -> [a] looks larger than what parametricity promises.
17:12:39 puke joins (~puke@user/puke)
17:12:59 <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]".
17:13:00 × puke quits (~puke@user/puke) (Max SendQ exceeded)
17:13:33 arandombit joins (~arandombi@user/arandombit)
17:14:56 <EvanR> what is the free theorem, that foo has to yield some number of copies of the input
17:15:16 <monochrom> @free foo :: a -> [a]
17:15:17 <lambdabot> $map f . foo = foo . f
17:15:26 <EvanR> o_O
17:15:27 puke joins (~puke@user/puke)
17:16:01 <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
17:16:01 <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.
17:16:56 <monochrom> If you add the wording "that 'some number' is the same for all inputs for all types", then it's right on.
17:16:57 × puke quits (~puke@user/puke) (Max SendQ exceeded)
17:17:42 puke joins (~puke@user/puke)
17:19:14 × puke quits (~puke@user/puke) (Max SendQ exceeded)
17:19:59 puke joins (~puke@user/puke)
17:21:08 tromp joins (~textual@2001:1c00:340e:2700:f5b2:b468:1c7d:8570)
17:21:17 jmcantrell_ joins (~weechat@user/jmcantrell)
17:21:26 × puke quits (~puke@user/puke) (Max SendQ exceeded)
17:21:28 <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.
17:21:57 puke joins (~puke@user/puke)
17:21:59 × puke quits (~puke@user/puke) (Remote host closed the connection)
17:22:02 humasect joins (~humasect@dyn-192-249-132-90.nexicom.net)
17:30:34 puke joins (~puke@user/puke)
17:32:13 × craunts795335385 quits (~craunts@152.32.99.2) (Quit: The Lounge - https://thelounge.chat)
17:32:22 <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".
17:33:27 <EvanR> ok, I messed up because it's not just some arbitrary n, it's the same n for all types
17:33:29 <monochrom> That "∃n" is annoying and elusive, especially since we know exactly how to obtain that n. It's length (foo ()).
17:34:17 <monochrom> ∀x. foo x = replicate (length (foo ()) x
17:34:35 <dolio> Common lean practice is to assume there are non-parametric functions.
17:34:55 <monochrom> But I can simplify "replicate (length (foo ()) x" to "map (const x) (foo ())". Bonus: Now it covers infinite lists too!
17:36:05 <monochrom> ∀x. foo x = map (const x) (foo ()). Now @pointfree to get: foo . const x = map (const x) . foo
17:36:09 <int-e> :t \x -> [undefined, x, undefined]
17:36:10 <lambdabot> a -> [a]
17:36:18 × arandombit quits (~arandombi@user/arandombit) (Ping timeout: 268 seconds)
17:36:25 <monochrom> The abstract equation merely generalizes from const x to arbitrary f.
17:37:03 <EvanR> what's a "non-parametric function" besides the obvious
17:37:07 × puke quits (~puke@user/puke) (Quit: puke)
17:37:17 <EvanR> a function that's not parametric
17:37:23 puke joins (~puke@user/puke)
17:37:41 <monochrom> foo x = if x is an Int and x==4 then [1,2,3,x,x^2,42,67] else [x,x,x]
17:37:48 <dolio> E.G. `f : ∀a. a -> a` where `f` is the identity on most types, but `not` on `Bool`.
17:38:05 <monochrom> anything that violates free theorems.
17:38:48 <int-e> dolio: nice use of `not` in a sentence :)
17:38:48 <EvanR> I might be too far gone, I never think of stuff like that xD
17:38:59 <EvanR> but it comes up a lot when trying to explain haskell polymorphism
17:39:57 <EvanR> oh a double not
17:40:17 <dolio> Java is not parametric, either, because of `instanceof`.
17:40:20 <EvanR> didn't see the quotes at first
17:40:41 <monochrom> Also of toString().
17:40:57 <dolio> But in lean's case it's because people usually assume excluded middle and global choice.
17:41:25 <EvanR> excluded middle ruins parametricity?
17:41:30 <dolio> Yeah.
17:41:38 <EvanR> o_O
17:42:07 <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]"
17:42:53 <dolio> Excluded middle tells you whether a type is empty or not.
17:43:05 <monochrom> Oh darn haha
17:43:14 <EvanR> how does that help
17:43:26 <dolio> It's just not parametric over all types.
17:43:48 <dolio> Some are empty, some aren't. You don't get back the same 'yes/no' answer regardless of type.
17:44:13 <EvanR> oh
17:44:36 <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]"
17:45:09 <EvanR> list makes it clear again
17:45:57 <monochrom> But I like dolio's. tellMe :: a -> Bool should be const True or const False, not tell you whether a is empty.
17:46:44 <dolio> It's really `tellMe :: forall a. Bool`
17:47:00 <dolio> If you have to provide an a, then the answer must be yes. :)
17:47:09 <monochrom> haha
17:47:18 <monochrom> Proxy a -> Bool!
17:47:36 <dolio> Yeah, that'd work.
17:48:35 <EvanR> yeah
17:48:38 <monochrom> I guess today's Haskell has "forall a -> Bool" as a middle ground.
17:48:43 <EvanR> I was trying to figure out how to fix a -> Bool
17:49:11 <EvanR> forall a . Bool ...
17:49:13 <EvanR> lol
17:49:28 <monochrom> @free tellMe :: [a] -> Bool
17:49:28 <lambdabot> tellMe = tellMe . $map f
17:49:29 <dolio> Apparently that is a way of characterizing parametricity 'semantically', too. For all `A : U` then `f : U -> A` must be constant, basically.
17:49:45 × confusedalex quits (~confuseda@user/confusedalex) (Ping timeout: 245 seconds)
17:49:47 <dolio> Where U is the 'universe'.
17:49:52 confusedalex_ joins (~confuseda@user/confusedalex)
17:50:03 confusedalex_ is now known as confusedalex
17:50:28 L29Ah parts (~L29Ah@wikipedia/L29Ah) ()
17:50:35 <dolio> Instead of the relational way.
17:53:01 <monochrom> Oh interesting, because "constant [over types]" is short for "the same code for all types".
17:53:32 <monochrom> which is what I tell beginners if I'm not ready to tell the relational story.
17:54:14 <dolio> Yeah. I recently heard about this, and like it better, because it seems closer to the intuitive idea of parametricity.
17:57:54 <dolio> You can probably generalize it so that it doesn't depend so much on relative 'size' too.
17:59:31 <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.
18:07:02 confusedalex_ joins (~confuseda@user/confusedalex)
18:07:15 × jmcantrell_ quits (~weechat@user/jmcantrell) (Ping timeout: 246 seconds)
18:08:06 × confusedalex quits (~confuseda@user/confusedalex) (Ping timeout: 255 seconds)
18:08:06 confusedalex_ is now known as confusedalex
18:13:59 byorgey joins (~byorgey@155.138.238.211)
18:13:59 × byorgey quits (~byorgey@155.138.238.211) (Changing host)
18:13:59 byorgey joins (~byorgey@user/byorgey)
18:14:51 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
18:22:27 × absurdvoid quits (~absurdvoi@user/absurdvoid) (Quit: WeeChat 4.8.2)
18:25:54 L29Ah joins (~L29Ah@wikipedia/L29Ah)
18:27:15 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
18:32:06 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
18:34:41 <gentauro> :t \ (x :: Void) -> [x]
18:34:42 <lambdabot> Void -> [Void]
18:35:58 <gentauro> :t \ _ -> {}
18:35:59 <lambdabot> error: [GHC-58481] parse error on input ‘{’
18:36:46 <gentauro> :t \ a -> case a of {}
18:36:47 <lambdabot> p1 -> p2
18:37:05 <gentauro> :t \ (a :: Void) -> case a of {}
18:37:06 <lambdabot> Void -> p
18:40:43 × slomp quits (~slomp@47-158-212-88.lsan.ca.frontiernet.net) (Quit: Lost terminal)
18:43:24 merijn joins (~merijn@62.45.136.136)
18:45:36 × j1n37 quits (~j1n37@user/j1n37) (Read error: Connection reset by peer)
18:47:46 × merijn quits (~merijn@62.45.136.136) (Ping timeout: 248 seconds)
18:48:23 absurdvoid joins (~absurdvoi@user/absurdvoid)
18:52:04 × humasect quits (~humasect@dyn-192-249-132-90.nexicom.net) (Remote host closed the connection)
18:53:49 j1n37 joins (~j1n37@user/j1n37)
18:55:55 <tomsmeding> :t absurd
18:55:56 <lambdabot> Void -> a
18:58:58 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
18:59:44 Digit joins (~user@user/digit)
19:03:55 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
19:08:53 × srk quits (~sorki@user/srk) (Ping timeout: 244 seconds)
19:12:57 srk joins (~sorki@user/srk)
19:14:43 × koz quits (~koz@121.99.240.58) (Ping timeout: 264 seconds)
19:14:48 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
19:16:45 koz joins (~koz@121.99.240.58)
19:19:14 × machinedgod quits (~machinedg@d172-219-48-230.abhsia.telus.net) (Ping timeout: 248 seconds)
19:20:07 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
19:30:38 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
19:35:24 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
19:44:23 ncf is now known as ncf-
19:46:28 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
19:51:12 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
19:53:33 ncf joins (~ncf@monade.li)
19:54:05 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
19:54:55 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 264 seconds)
19:56:58 Lord_of_Life_ is now known as Lord_of_Life
19:57:43 slomp joins (~slomp@47-158-212-88.lsan.ca.frontiernet.net)
19:58:32 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
20:01:21 jmcantrell_ joins (~weechat@user/jmcantrell)
20:02:11 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
20:03:55 × Digit quits (~user@user/digit) (Ping timeout: 245 seconds)
20:03:56 Digitteknohippie joins (~user@user/digit)
20:07:21 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
20:11:32 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
20:17:15 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
20:28:19 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
20:29:20 <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
20:29:47 <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
20:30:09 <tomsmeding> answer: aeson wants to provide Arbitrary instances for stuff
20:30:38 <tomsmeding> the no-orphans rule understandable for soundness, but it has so many bad effects on a package ecosystem
20:31:50 <dolio> Whose rule is the no orphans rule?
20:32:14 <tomsmeding> well, GHC's, if you consider GHC's warnings rules
20:32:25 <dolio> I don't.
20:32:44 <geekosaur> I feel like it should be possible to declare exceptions
20:32:47 <tomsmeding> (which is conventionally weakened to at least "no orphan instances in libraries", because in leaf applications they don't really hurt)
20:33:19 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
20:33:26 <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
20:33:36 <dolio> It seems like it should be okay for aeson to separate a canonical package out with orphan quick check instances.
20:33:52 <dolio> And the rule should mean that random other idiots shouldn't be writing orphan instances for aeson.
20:33:59 <tomsmeding> agreed
20:34:14 <tomsmeding> good, question resolved, it's aeson's problem :p
20:35:16 <dolio> Part of the problem is people unthinkinly obeying stuff in -Wall.
20:35:28 <dolio> Just in general.
20:36:36 × takuan quits (~takuan@d8D86B9E9.access.telenet.be) (Ping timeout: 255 seconds)
20:38:24 <geekosaur> part of the problem there is people being trained by gcc/g++ where it's usually a good idea
20:38:47 <geekosaur> and I have in fact heard people respond to your complaint with "so why is it in `-Wall`?"
20:42:56 <dolio> It seems odd to not want all the warnings in -Wall, even though it still doesn't have all the warnings.
20:43:45 <tomsmeding> -Wall not having all warnings, just the generally important ones, is a historical naming error that we're unlikely to be correcting now
20:44:06 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
20:44:52 <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.
20:46:47 <dolio> It'd have to be trimmed way back, at least.
20:47:06 <tomsmeding> dolio: you mean GHC's -Wall, or also gcc's -Wall?
20:47:16 <dolio> GHC.
20:47:33 <dolio> I don't do much C, so I don't know about gcc's choices.
20:48:32 <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.
20:49:04 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds)
20:51:15 <tomsmeding> dolio: would -Wdefault do? Or is perhaps -Winaccessible-code too much?
20:51:19 <tomsmeding> ( https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag-Wdefault )
20:52:21 <geekosaur> In the case of gcc a lot of it is older sources and the rest is things known to trip unsuspecting programmers
20:53:55 <geekosaur> Point being, C is a very different ecosystem
20:53:58 <dolio> -Wdefault looks okay. But that's what's actually on by default, right?
20:54:06 <tomsmeding> yes
20:54:56 <monochrom> My tangential sideways peeve is that people blindly believe in hlint just because C's lint (totally unrelated) is a really good idea.
20:55:01 <tomsmeding> then there is -Wextra, which is in between -Wdefault and -Wall
20:55:04 <dolio> I think some beyond that are probably worth enabling, but even -W has some stuff I'm not a huge fan of.
20:55:10 <tomsmeding> not to be confused with gcc's -Wextra, which is even more than its -Wall
20:55:52 <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)".
20:56:03 <geekosaur> `-Wdefault` can be annoying when there are cases where it's hard to avoid defaulting
20:56:40 <tomsmeding> geekosaur: I think you mean -Wtype-defaults there, which is in -Wall
20:56:50 <geekosaur> lint is long gone, that's why it's compiler warnings now
20:57:01 <geekosaur> Oh
20:57:26 <geekosaur> It was an AT&T UNIXism
20:57:37 raelie joins (~raelie@2a06:5904:11c4:b000:148b:d28e:318a:8d84)
20:57:37 × raelie quits (~raelie@2a06:5904:11c4:b000:148b:d28e:318a:8d84) (Changing host)
20:57:37 raelie joins (~raelie@user/raelie)
20:58:14 × jmcantrell_ quits (~weechat@user/jmcantrell) (Ping timeout: 245 seconds)
20:58:48 <geekosaur> And was never updated for ANSI C
20:58:49 <dolio> Actually -W is probably okay as a pass before something public.
20:59:17 <dolio> The annoying stuff is when you're working.
20:59:53 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
21:01:18 <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.
21:01:23 <tomsmeding> I agree that -Wunused-bindings and -Wunused-imports are nothing but in the way while you're working
21:02:17 <tomsmeding> but I use -Wunused-matches _all the time_ while coding
21:02:28 <tomsmeding> it's my signal that I still need to do something
21:04:54 <monochrom> I refuse -Wunused-do-bind under all circumstances.
21:05:01 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds)
21:05:20 <tomsmeding> refuse to enable it?
21:05:26 <monochrom> Yeah.
21:06:07 <tomsmeding> oh, that one. Yeah, I find myself following it but it's questionable, true
21:07:07 <dolio> I'm not sure I've ever found a genuine problem with that one.
21:08:16 <dolio> I'm pretty down on -Wname-shadowing these days, too.
21:08:22 <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".
21:08:42 pavonia joins (~user@user/siracusa)
21:08:49 <monochrom> Only policing can explain why I need one more warning.
21:09:28 <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
21:09:37 arandombit joins (~arandombi@user/arandombit)
21:09:39 <tomsmeding> which is important in C because of return values you should not forget to check
21:09:52 <monochrom> Yeah that one I appreciate.
21:10:16 <dolio> The purpose of unused-do-bind is supposedly to catch when you use traverse instead of traverse_ or similar.
21:10:58 <dolio> But the number of efficiency errors like that is much lower than results you just don't care about.
21:11:07 <monochrom> That belongs to hlint.
21:11:20 <monochrom> Or at least, IMO it should belong to hlint.
21:11:34 <monochrom> What's next, -Wall warn you about foldl vs foldl' too?
21:11:38 <geekosaur> hlint would need to know about types instead of code heuristics to do that, though
21:11:55 <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
21:12:11 finsternis joins (~X@23.226.237.192)
21:12:18 <tomsmeding> I'm already passing you the character, why return it?
21:12:28 <monochrom> No, hlint just needs to hardcode the syntax pattern of "do ... ; traverse/forM xs; ..."
21:13:21 <monochrom> Oh I can justify the char parser. I may have `char 'a' <|> char 'b'` now I want to know which one I got. :)
21:13:58 <tomsmeding> I guess. Now I wonder which came first: -Wall having -Wunused-do-binds, or parsec having char returning a Char
21:14:21 × raelie quits (~raelie@user/raelie) (Remote host closed the connection)
21:14:41 <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`
21:14:44 <geekosaur> parsec by a decade, I think
21:15:03 <tomsmeding> adding a _ to a mapM is really not the problem
21:15:35 <geekosaur> along with a lot of example code which assumed `-Wunused-do-bind` didn't exist
21:15:39 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
21:15:43 <tomsmeding> nice
21:15:50 <tomsmeding> well that explains :p
21:16:13 <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.)
21:16:28 <tomsmeding> ah, and 8% of the remaining cases are forkIO
21:16:55 <monochrom> But most importantly, the OOP world did not freak out and added -Wunused-return-value to their -Wall.
21:16:56 <tomsmeding> (I just wrote one)
21:19:55 × absurdvoid quits (~absurdvoi@user/absurdvoid) (Ping timeout: 268 seconds)
21:20:23 Guest20 joins (~Guest20@149.3.7.235)
21:20:42 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
21:21:43 absurdvoid joins (~absurdvoi@user/absurdvoid)
21:24:00 Square3 joins (~Square@user/square)
21:25:03 <monochrom> OK I like -W now. Didn't know that it exists.
21:28:44 <monochrom> gcc -O2 turns on more warnings than -O0. Anyone want to bring that ideology to GHC? Maybe next April 1? >:)
21:29:07 <tomsmeding> isn't that to make ghc -O0 faster?
21:29:21 <monochrom> I don't know. Is that it?
21:29:44 <tomsmeding> IIRC some of the analyses needed to produce the warnings are only computed for the benefit of particular optimisations
21:29:57 <monochrom> I was guessing that it was because -O2 breaks more code under beginner mistakes.
21:30:04 <tomsmeding> or, reformulated, they think it's not worth generating the warnings if that's the only reason for running the analysis
21:30:20 <tomsmeding> but this is from memory -- not 100% sure
21:30:27 <monochrom> Ah OK. I think the two are logically equivalent. :)
21:30:36 <tomsmeding> observationally, yes
21:30:54 <tomsmeding> ideologically it's a little more nuanced
21:31:00 <monochrom> At least there is a strong correlation between unoptimized and bad code working fine.
21:31:21 <tomsmeding> what kind of warnings would become more important under optimisations?
21:31:37 <tomsmeding> warning about = vs == is independent of optimisations
21:31:42 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
21:32:11 <monochrom> I forgot. I seem to recall that unused-return-value is one of them.
21:32:44 <tomsmeding> that... has nothing to do with optimisations? fork() doesn't care whether you used -O2 if it wants to fail
21:33:22 <tomsmeding> not saying there are none, I just can't think of any :)
21:34:32 <monochrom> OK I have: int main(void) {char b[100]; read(0, b, 100); ...
21:34:41 <monochrom> No warning until -O2
21:35:14 <monochrom> So I still don't know why! :)
21:35:52 <tomsmeding> the manual doesn't elucidate: https://gcc.gnu.org/onlinedocs/gcc/Common-Attributes.html#index-warn_005funused_005fresult
21:35:53 × synchromesh quits (~john@2406:5a00:2412:2c00:343e:4e23:bce:73a3) (Read error: Connection reset by peer)
21:36:19 <tomsmeding> I guess https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result is the better link
21:36:55 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
21:37:56 synchromesh joins (~john@2406:5a00:2412:2c00:343e:4e23:bce:73a3)
21:43:41 <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" :)
21:44:00 <tomsmeding> yes, I'm a little confused too
21:44:41 <tomsmeding> monochrom: although now you have a -Wunused-but-set-variable ;)
21:47:05 <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. >:)
21:47:07 <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
21:47:55 <tomsmeding> same for clang 21.1.6
21:48:49 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
21:56:07 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
22:05:10 × puke quits (~puke@user/puke) (Ping timeout: 250 seconds)
22:06:51 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
22:07:59 × Guest20 quits (~Guest20@149.3.7.235) (Quit: Client closed)
22:08:59 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 265 seconds)
22:09:33 machinedgod joins (~machinedg@d172-219-48-230.abhsia.telus.net)
22:11:08 emmanuelux joins (~em@user/emmanuelux)
22:11:30 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
22:12:53 Sgeo joins (~Sgeo@user/sgeo)
22:22:38 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
22:26:05 divlamir_ joins (~divlamir@user/divlamir)
22:26:15 × divlamir quits (~divlamir@user/divlamir) (Read error: Connection reset by peer)
22:27:45 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
22:30:23 × divlamir_ quits (~divlamir@user/divlamir) (Ping timeout: 244 seconds)
22:32:59 Digitteknohippie is now known as Digit
22:37:03 divlamir joins (~divlamir@user/divlamir)
22:38:40 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
22:44:07 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
22:54:27 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
22:58:45 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
22:59:21 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
23:05:00 × arandombit quits (~arandombi@user/arandombit) (Ping timeout: 244 seconds)
23:10:21 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
23:15:32 arandombit joins (~arandombi@user/arandombit)
23:17:34 × wennefer0 quits (~wennefer0@user/wennefer0) (Quit: Textual IRC Client: www.textualapp.com)
23:20:18 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
23:24:32 × tremon quits (~tremon@83.80.159.219) (Quit: getting boxed in)
23:26:54 humasect joins (~humasect@dyn-192-249-132-90.nexicom.net)
23:29:19 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
23:30:21 <EvanR> haha that whole issue boiled down to what -Wall means actually and culturally
23:30:50 <EvanR> it doesn't have all warnings no but someone decided it has all warnings that must be taken seriously
23:31:08 <EvanR> extra warnings in another flag are secondary
23:31:14 <EvanR> don't even enable it
23:33:50 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
23:38:35 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds)
23:43:32 × tromp quits (~textual@2001:1c00:340e:2700:f5b2:b468:1c7d:8570) (Quit: My iMac has gone to sleep. ZZZzzz…)
23:47:57 <geekosaur> "-Wall" isn't all warnings, use "-Weverything" "-Weverything isn't all warnings either, there are some that must be enabled explicitly"
23:50:53 merijn joins (~merijn@62.45.136.136)
23:55:57 × merijn quits (~merijn@62.45.136.136) (Ping timeout: 255 seconds)

All times are in UTC on 2026-04-03.