- cross-posted to:
- eric_posts_urls@discuss.online
- Deebster ( @Deebster@programming.dev ) English18•7 months ago
It looks interesting. While the compiler is written in Rust (a RRIR from Erlang), the code itself runs on the Erlang VM or on JS. Unfortunately, you can’t do hot code reloading and I’m curious what/if you have to sacrifice to run on JS.
Their cheatsheet for Rust users might be of interest to others.
- autokludge ( @autokludge@programming.dev ) English6•7 months ago
While having a quick look through old news:
From June 2021 (v0.16) (https://gleam.run/news/v0.16-gleam-compiles-to-javascript/#how-does-it-work)
Much like the Erlang compiler backend this new JavaScript backend outputs human readable and pretty printed source code. It is now included with the compiler and does not require any extra components to be installed to use it.
Rather than attempting to replicate a subset of Erlang’s actor model Gleam uses the standard promise based concurrency model when targeting JavaScript. While this may be disappointing for some, it means that there is no additional runtime code added. This keeps bundle size small and makes it so code written in Gleam can be called like normal from languages such as JavaScript and TypeScript.Jan 2024 v0.34 (https://gleam.run/news/v0.34-multi-target-projects/#multi-target-projects) mentions some additional work done to enable multi target projects such as Lustre
- owen ( @owen@lemmy.ca ) 16•7 months ago
Seems nice but I can’t tell what its purpose is
- snaggen ( @snaggen@programming.dev ) 8•7 months ago
Exactly. I appreciate the “What’s Gleam” section, but I would also like to see a “Why Gleam?” section.
- TehPers ( @TehPers@beehaw.org ) English7•7 months ago
Everytime I see a post about this, I end up confusing it with gleam.io (which is a popular service for people doing giveaways). Looks cool, just the naming conflict is unfortunate.
- anlumo ( @anlumo@feddit.de ) English6•7 months ago
The gleam name is also already taken by some OpenGL bindings on crates.io.