this post was submitted on 27 Mar 2024
48 points (100.0% liked)
chapotraphouse
13535 readers
57 users here now
Banned? DM Wmill to appeal.
No anti-nautilism posts. See: Eco-fascism Primer
Gossip posts go in c/gossip. Don't post low-hanging fruit here after it gets removed from c/gossip
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
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:
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.
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 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
Oh snapp
Andy Wingo's Blog
He also works at a cooperative, Igalia.
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?
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.