λ Directly compiling Scheme to WebAssembly: lambdas, recursion, iteration!
➥ Spritely Institute
"we can now compile various Scheme procedures directly to WebAssembly. Let's clarify that: by compiling directly to WebAssembly, we mean they compile and run without any intermediate virtual machine. No C, no Rust, no Zig: Hoot outputs pure WebAssembly. It's early, but Hoot compiled programs are starting to work... and they're fast!"
When @spritelyinst closes in on their work on #Guile's wasm compiler (maybe later this year?!), it'll certainly become the easiest way to target optimized #wasm. Tree-IL has gotta be the simplest intermediate language to compile to, and you get all the optimizations Guile offers for free.
Considering Robin Templeton, the author of Guile's #elisp compiler, is one of the engineers behind it, I can't help but speculate that this will put #emacs in the browser within reach. If I can handle my org-agenda online by 2025, I will cry.
It's called #Scheme because it allows just a few friends to plot a CONSpiracy to build amazing things.
Once #guix builds on #wasm, its only so long before #hurd replaces #k8s as the distributed service orchestration tool for a more advanced age, right gang?
"Our existing mental categories are important, because they're how we approach a new system, and they're how we port existing code to new systems. So we do talk about Wasm in terms of other systems, and we do build bridges to enable concepts and code to be ported over.
I guess what Hixie is proposing is not in line with direction you wanna give to your browser impl? Not sure. But this intriguing. For a different project I've been looking a bit into - what I call a "#WebAssembly. Everywhere." paradigm shift based on #WASM, #WASI and Component Model.
(Very much in 'hype cycle' stage for early adopters with growing attention in corporate world. Not so much so in #FreeSoftware circles yet)
Ian "Hixie" Hickson editor of #WhatWG HTML specification for 10 years, in January 2023 criticises the use of #HTML, #CSS, #Javascript for intricate #Web applications, and proposes an alternate approach based on 4 lower-level #OpenStandards:
"This document proposes to enable browsers to render web pages that are served not as HTML files, but as Wasm files, skipping the need for #HTML, #JS, and #CSS parsing in the rendering of the page, by having the #WebGPU, #ARIA, and #WebHID APIs exposed directly to #Wasm. To enable developers to continue to use the wider range of APIs exposed on the web, a mechanism to "escape" to a JavaScript environment would need to be made available as well."
> I've always tended to be a web maximalist, but I've never felt more optimistic than I do now about the power of the modern web as a true application platform. @ameo
I've built a #transpiler in #Rust, compiled it to #WASM and integrated it into a #Vue app! :awesome:
It's called selecuery.✨
It can transpile X++ select statements into query expressions. If you think "X++" is a typo and you don't have any idea of what I'm talking about, don't worry.😄
Have a look at the video below.
This project is dear to my heart! ❤️ I've started it 2019 for learning #RustLang.
I think, I've been transpiled during this project as well.🤪
#Wasmtime has a JIT and a #Wasm runtime that uses a lot of pointers, so it's especially cool that this PR is able to make it preserve strict provenance and run under stacked borrows in Miri:
At this point, I have an expression that builds just the web portion of the app from a node2nix set of dependencies and the directly using webpack to generate the end result.
If I can build the rust-wasm module, I should be able to include it as a dependency.
It requires a bit of config, but not too bad, given that it's bleeding edge.
What tripped me up in the very end:
You need to call init() first from your wasm module, otherwise error "wasm is undefined", when calling your function.
Looks like a world first to me 🚀 New functionality developed as part of collaboration between @activetraveleng and @turinginst 🔥 #opensource contributions welcome 🙏👇