2026/03/07

Newest at the top

2026-03-07 20:41:58 +0100 <monochrom> The Forbidden GHC Sutra
2026-03-07 20:37:45 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-03-07 20:29:01 +0100Sgeo(~Sgeo@user/sgeo) Sgeo
2026-03-07 20:26:51 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
2026-03-07 20:21:58 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-03-07 20:21:48 +0100 <haskellbridge> <zb> yes!
2026-03-07 20:16:28 +0100zb(jobnbg@bot.kapsi.fi) zb
2026-03-07 20:14:55 +0100 <EvanR> luckily O(15000) is really efficient
2026-03-07 20:13:28 +0100DetourNe-DetourNetworkUK
2026-03-07 20:11:44 +0100DetourNetworkUK(~DetourNet@user/DetourNetworkUK) (Read error: Connection reset by peer)
2026-03-07 20:11:37 +0100elarks(~elarks@user/yerrii) yerrii
2026-03-07 20:11:17 +0100DetourNe-(~DetourNet@user/DetourNetworkUK) DetourNetworkUK
2026-03-07 20:11:07 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2026-03-07 20:08:10 +0100stackdroid18(~stackdroi@user/stackdroid) stackdroid
2026-03-07 20:06:12 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-03-07 20:01:32 +0100Square(~Square@user/square) (Remote host closed the connection)
2026-03-07 19:59:40 +0100 <haskellbridge> <sm> wizardry!
2026-03-07 19:59:00 +0100 <c_wraith> some arcane bit of lore. (I think it's actually called the User Guide? Eh. Whatever.)
2026-03-07 19:58:17 +0100 <haskellbridge> <sm> what is this "manual" you speak of...
2026-03-07 19:57:25 +0100 <c_wraith> You still need to understand *why* you'd use it, but it still provides an incredible reference for what all the syntax does.
2026-03-07 19:56:32 +0100 <c_wraith> perhaps shockingly, the ghc user's manual is actually where I learned most of what I know about template haskell.
2026-03-07 19:55:10 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-03-07 19:54:30 +0100tromp(~textual@2001:1c00:3487:1b00:e975:d7be:a717:768f)
2026-03-07 19:54:19 +0100 <[exa]> yeah I'm not sure there's any actual tutorial, it's kinda materialized pre-compilation computation, IMO very good for such usecases
2026-03-07 19:50:23 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-03-07 19:49:53 +0100 <haskellbridge> <zb> (i’ll start from https://wiki.haskell.org/Template_Haskell)
2026-03-07 19:49:45 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-03-07 19:46:36 +0100 <haskellbridge> <zb> would you have any easy pointers to where i could read more about templatehaskell preprocessing?
2026-03-07 19:45:22 +0100 <[exa]> also perhaps generating the alternatives in the process so that you don't have O(15k) of code
2026-03-07 19:45:22 +0100 <haskellbridge> ... maximum number of iterations to n)
2026-03-07 19:45:16 +0100 <haskellbridge> <zb> for the record: it works! or i think it does! though the compiling takes a couple of minutes, which is a bit inconvenient, and the first lookup i then did in my ghci session felt a bit slow, maybe like 0.5s. but then the next lookups don’t feel slow anymore. i did get a warning when compiling/loading the module: Pattern match checker exceeded (2000000) iterations in an equation for ‘g000’. (Use -fmax-pmcheck-iterations=n to set the...
2026-03-07 19:45:06 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-03-07 19:44:55 +0100 <[exa]> zb: if you totally need some such thing to happen you might want to have some templatehaskell preprocessing step that chews the 15k alternatives into something more tangible for ghc
2026-03-07 19:34:05 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 272 seconds)
2026-03-07 19:33:05 +0100kadobanana(~mud@user/kadoban) (Ping timeout: 245 seconds)
2026-03-07 19:30:51 +0100tromp(~textual@2001:1c00:3487:1b00:e975:d7be:a717:768f) (Quit: My iMac has gone to sleep. ZZZzzz…)
2026-03-07 19:26:23 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-03-07 19:25:00 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2026-03-07 19:24:19 +0100 <monochrom> Ah yeah, that. "f 1 2 3 = 4; f 1 3 7 = 2" is likely "f x y z = case x of 1 -> {cases for y and z under x=1}". But really, the benefit is negligible until you ask "can I have a function of 15k arguments?" >:)
2026-03-07 19:23:14 +0100 <c_wraith> Though I guess that still has as many leaves as there are equations, so it's not really doing much besides eliminating redundant checks
2026-03-07 19:22:05 +0100 <c_wraith> GHC *might* make it a trie at best - collapsing all the prefixes together. I wouldn't expect anything more clever than that.
2026-03-07 19:21:08 +0100driib3180(~driib@176.57.184.141) (Client Quit)
2026-03-07 19:17:46 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-03-07 19:17:43 +0100driib3180(~driib@176.57.184.141) driib
2026-03-07 19:16:41 +0100 <haskellbridge> <zb> kind of expecting, really, since defining the (f 1)’s shouldn’t be too many lines!
2026-03-07 19:15:17 +0100 <haskellbridge> <zb> ah... i was hoping for the compiler make it into some clever hash lookups or something :D
2026-03-07 19:12:58 +0100CallipygousPepe(~reuben@user/CallipygousPepe) (Quit: Konversation terminated!)
2026-03-07 19:12:42 +0100 <monochrom> 15k lines of "f 1 2 3 = 4" is likely compiled to exhaustive search over 15k cases.
2026-03-07 19:11:10 +0100 <haskellbridge> <zb> (this would be charset conversion tables, which i guess i would want to somehow compile into the module for efficiency. the specific module would define only the one 15k equations function)
2026-03-07 19:10:49 +0100 <EvanR> the einstein equation for GR expands to like... a lot of equations