Newest at the top
| 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 +0100 | merijn | (~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 +0100 | merijn | (~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 +0100 | merijn | (~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 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 272 seconds) |
| 2026-03-07 19:33:05 +0100 | kadobanana | (~mud@user/kadoban) (Ping timeout: 245 seconds) |
| 2026-03-07 19:30:51 +0100 | tromp | (~textual@2001:1c00:3487:1b00:e975:d7be:a717:768f) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 2026-03-07 19:26:23 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn |
| 2026-03-07 19:25:00 +0100 | merijn | (~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 +0100 | driib3180 | (~driib@176.57.184.141) (Client Quit) |
| 2026-03-07 19:17:46 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn |
| 2026-03-07 19:17:43 +0100 | driib3180 | (~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 +0100 | CallipygousPepe | (~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 |
| 2026-03-07 19:10:32 +0100 | <EvanR> | worked for einstein |
| 2026-03-07 19:06:21 +0100 | <monochrom> | Just for auditability you should find a better way, i.e., a way that leads to code easy to check. |
| 2026-03-07 19:04:29 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds) |
| 2026-03-07 19:03:29 +0100 | <haskellbridge> | <zb> but it would prably be better to take an other approach? |
| 2026-03-07 19:03:27 +0100 | <monochrom> | https://xkcd.com/303/ applies >:) |
| 2026-03-07 19:03:01 +0100 | <monochrom> | (oh and how long you can wait :) ) |
| 2026-03-07 19:02:49 +0100 | <monochrom> | I think there is no preset limit apart from what GHC and your computer can handle. |
| 2026-03-07 19:01:09 +0100 | <haskellbridge> | <zb> how many equations can i use to define a single function in haskell? is 15k too much? :P (they would be something like f :: Word8 -> Word8 -> Word8 -> Char) |
| 2026-03-07 18:59:52 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn |
| 2026-03-07 18:56:34 +0100 | AlexNoo_ | (~AlexNoo@178.34.150.243) (Ping timeout: 248 seconds) |
| 2026-03-07 18:56:02 +0100 | AlexNoo | (~AlexNoo@178.34.150.243) (Ping timeout: 248 seconds) |
| 2026-03-07 18:52:21 +0100 | AlexNoo_ | (~AlexNoo@178.34.150.243) |
| 2026-03-07 18:52:18 +0100 | AlexNoo__ | (~AlexNoo@178.34.150.243) (Ping timeout: 248 seconds) |
| 2026-03-07 18:51:57 +0100 | hellwolf | (~user@a38e-19d1-a5f7-21b5-0f00-4d40-07d0-2001.sta.estpak.ee) hellwolf |
| 2026-03-07 18:51:46 +0100 | AlexNoo_ | (~AlexNoo@178.34.150.243) (Ping timeout: 248 seconds) |
| 2026-03-07 18:51:38 +0100 | AlexNoo | (~AlexNoo@178.34.150.243) |
| 2026-03-07 18:50:42 +0100 | AlexNoo | (~AlexNoo@178.34.150.243) (Ping timeout: 248 seconds) |
| 2026-03-07 18:49:00 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds) |
| 2026-03-07 18:48:31 +0100 | Digit | (~user@user/digit) Digit |
| 2026-03-07 18:47:52 +0100 | AlexNoo__ | (~AlexNoo@178.34.150.243) |
| 2026-03-07 18:47:08 +0100 | AlexNoo_ | (~AlexNoo@178.34.150.243) |
| 2026-03-07 18:46:35 +0100 | hellwolf | (~user@4884-83b1-dc5a-ca70-0f00-4d40-07d0-2001.sta.estpak.ee) (Ping timeout: 272 seconds) |
| 2026-03-07 18:46:23 +0100 | AlexNoo | (~AlexNoo@178.34.150.243) |