Seriously. There’s so many floating around. It feels like there’s a cycle of
Random programmer thinks xyz language sucks -> she/he makes a slightly different, slightly faster, slightly more secure version -> by luck this gains mass adoption-> random programmer thinks new xyz language sucks
I propose when the revolution comes and the last guillotine falls we decide a general-purpose programming language that coders should stick to. I vote Lisp or any of the dialects (scheme, clojure, racket), but i also feel something about the Julia language for scientific research. Maybe we can decriminalize using C. Absolutely ban and hunt down the use of any of the hipster languages teenagers are into these days.
Nim? Zig? Crystal?? I am absolutely losing my damn mind. It compiles to bytecode people. Make up ur damn minds. To jail with all of u
I like Guile with its compiler tower. You can use multiple languages on the same VM, even using libraries from one language on another, which is fucking cool. The core language for Guile is Scheme, and it supports standards from R4RS-R7RS, along with plenty of built-in SRFIs, some implemented out-of-tree and many of its own Guile-specific extensions.
For the compiler tower, so far we’ve got the aforementioned ballin’ Scheme implementation, Emacs Lisp, an unfinished JavaScript implementation that doesn’t even fully implement ES3, Brainfuck, Python, wonky Lua, and Guile-specific Clojure. Hopefully there’s more to come and there’s some I missed.
While the main purpose for the compiler tower is to lower a language into the IR (Tree-IL) (although you can lower a language into another language too, which then itself can be lowered into IR), which gets lowered to more verbose IR (CPS), then bytecode - we can also raise IR through decompilation. For example, Guile-JavaScript compiles Scheme to IR, then decompiles the IR and raises it to JavaScript.
Then there’s also Guile Hoot, which I believe lowers the IR into WASM. In theory, when its complete, the above languages could work with Hoot and he compiled to Hoot, but I’m not entirely sure on this.
Could I get a ELI5?
I googled but doing that made me more confused.
https://www.gnu.org/software/guile/manual/html_node/Compiler-Tower.html
Let’s use the tower metaphor for a moment. Consider Scheme:
Scheme | | v Tree Intermediate Language (Tree-IL) | | v Continuation-Passing Style (CPS) | | v Bytecode
To compile Scheme to Bytecode, it’s lowered through different stages until it’s Bytecode.
We can also decompile, and raise code instead of lowering it - for example, here’s how Guile-JavaScript works, which compiles Scheme to JavaScript, by first lowering Scheme to Tree-IL, then raising that Tree-IL to JavaScript through decompilation.
Scheme JavaScript | ^ | | v | Tree Intermediate Language (Tree-IL)
We take code through the tower to transform it into its desired form.
Hope this made sense. Or maybe it confused you even more =).
Sounds made up. Guile is only good for flash kicks and sonic booms.
Guile is the configuration language for Guix right? I didn’t know it was used outside that purpose, that’s pretty cool
“configuration language” is a bit of an understatement, as most of Guix itself is written in Guile, along with the PID 1, called Shepherd. Guile is literally the first thing the kernel starts on Guix.
Guile it is then. Also, that’s pretty cool. You’re saying Guile can compile scheme into javascript? I’ve been looking at clojurescript for this exact same purpose actually
Yes. It can. But I believe some other Schemes can actually do this better, and the Scheme->JavaScript implementation for Guile is beyond, beyond unfinished.
You’ll proboably have a better time with Guile Hoot, which compiles Scheme to WASM. It’s also unfinished, but it’s much more complete and currently making a lot of progress. It’s meant to allow Goblins, an actor-based decentralized framework by the same people that made ActivityPub (Spritely Institute), to run on the web.
Also Guile’s lead developer, and Hoot’s project lead, Andy Wingo, may or may not be a Marxist - reading his blog, and watching some of his talks, I’ve noticed some references to Hegel and Lenin, but I’m not quite sure on this. He’s also called out sexism at various developer conferences he’s been to, from GNU Hackers’ meetings to FOSDEM.
Did I mention Guile is a GNU Project?
Upon further reading, I conclude that he is based
Quote from his blog
He also makes a reference to “What is to be done?” in one of his talks. Or maybe it was a blog post. It was somewhere.
Anyways, what do you think?
Oh snapp
Andy Wingo’s Blog
He also works at a cooperative, Igalia.