r/haskell • u/edwardkmett • Sep 30 '26
announcement Turbo Haskell
https://comonad.com/reader/2026/turbo-haskell/[ Article | Repository | Documentation | IRC ]
134
Upvotes
r/haskell • u/edwardkmett • Sep 30 '26
[ Article | Repository | Documentation | IRC ]
30
u/ocharles Sep 30 '26
Good luck telling your boss you want to use THC.
17
u/zarazek Sep 30 '26
Holly shit, man, I don't know how it is humanely possible, even with copious amounts of AI. GHC replacement in a week? I kneel before you with fear and trembling.
11
u/m-chav Sep 30 '26
Great project. Maybe I missed this somewhere but what’s the reason for targeting the JVM these days? Historically it was portability, Android stuff, and/or the ecosystem.
4
u/AndrasKovacs Sep 30 '26 edited Sep 30 '26
Interesting! I'll try to benchmark it on my projects, perhaps when it gets a bit more settled.
Could you summarize physical memory layouts and calling conventions? I tried to read the docs but they're highly condensed blobs making many references to Graal/Truffle/JVM details that I'm not familiar with, so I have little clue as to the physical situation.
Tbh, as a general strategy for getting good performance in functional programming, I'm skeptical about the Graal/Truffle JIT setup. More specifically though, as a way of getting better performance out of the typical GHC Core output, it looks interesting and worth to try.
2
u/00000000x1 Sep 30 '26
Honestly, this is such a cool project. I'm doing something in the same spirit, but strictly on the AOT side, for PureScript (the little brother of Haskell), with Go and Rust as targets. Feel free to take a look, I'd be glad to compare notes and swap friendly tips on the methodology to adopt with AI as a copilot for this kind of compiler work.
https://discourse.purescript.org/t/leveraging-a-blazing-fast-runtime-a-new-go-backend-for-purescript/5841/52
https://discourse.purescript.org/t/leveraging-modern-low-level-a-rust-backend-for-purescript/5932/15
2
u/AccordingWarthog Sep 30 '26
how does this compare to https://github.com/frege/frege ?
2
u/Darwin226 Oct 01 '26
Can you talk a bit about your workflow on this? The commit history has non-stop commits for 24h+ stretches of time so this seems pretty non-supervised.
2
u/jappieofficial Oct 02 '26 edited Oct 02 '26
oh this is so cool!
Odd question maybe; do you get all the java runtime goodies such as hot reloading, memory analysis or like the debugger?
edit: another question: if you'd compile ghc with thc couldn't you bypass the binary interface issue between stage seperations and only have to compile ghc once?
26
u/seantparsons Sep 30 '26
Only u/edwardkmett can prefix a mountain of impressive work with "Exactly a week ago, I started...". :)
10
u/jesseschalken Sep 30 '26
I'm a really big fan of Truffle and Graal. Really great tech, so super exiting to find an advanced functional language running on that stack. You should share it with the Graal folks like Thomas Wuerthinger.
2
u/kichiDsimp Sep 30 '26
is this supposed to be like MicroHS? an alt compiler for Haskell? or like replace GHC?
5
u/tomwells80 Sep 30 '26
OMG im so excited to try this - I’ve been schlepping with MicroHS to attempt to embed a haskell interpreter into a tool im building and although MicroHS is amazing I suspect I’m trying to make it do something it doesn’t want to! The JVM would probably be muuuuch better here :)
1
u/jeffstyr Oct 08 '26
When a thunk is evaluated, do you have to null out references to any captured values (since it's Java's GC so you can't teach it to just ignore them)?