elixir_script
purerl
Our great sponsors
elixir_script | purerl | |
---|---|---|
2 | 6 | |
1,560 | 314 | |
0.3% | 6.1% | |
0.0 | 5.9 | |
over 4 years ago | 4 months ago | |
Elixir | Haskell | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
elixir_script
-
Angular without SSR is faster than Next.js with SSR. I have the data
I agree that there's room for a language that runs on the BEAM and also compiles to JS. Gleam looks great, and it's one of the up and coming languages that I'm rooting for. In addition to having a Javascript compile target, it's statically typed which is a prerequisite for me when it comes to productivity and correctness.
There was actually a developer working on a subset of Elixir that compiles to JS called Elixirscript[1], but development seems to have stalled. Another functional statically typed compile-to-js language which targets the BEAM vm is Purescript through the Purerl project [2].
If you're going to compile to JS though, there's an argument to be made that you might not want to target the BEAM at all. You could potentially run your entire backend on something like Cloudflare Workers, which has over 200 points of presence around the world, so latency is about as low as possible. The other CDNs have their own competing worker runtimes as well (e.g. Cloudfront functions, Netlify functions, etc.). These edge worker runtimes also have the benefit of not charging for each individual region in which you operate. You can also run any language which compiles to WASM like Rust, Assemblyscript, or Grain [3] on these edge runtimes. The only missing piece for me is a distributed database, but it looks like Cloudflare at least is working on that [4].
[1] https://github.com/elixirscript/elixirscript
-
Erlscripten
— Elixirscript is a Elixir to Javascript transpiler with similar goals as our project. The main downside of Elixirscript is the lack of OTP support (Erlang’s main framework for building failsafe applications) — it works on a really small subset of the Elixir language and they need to rewrite the Elixir standard library in Javascript for it to work. In contrast we are OTP compatible — we transpiled the real Erlang standard library from OTP and distributed it open-source: https://github.com/erlscripten/erlps-stdlib ( Erlang Solutions ).
purerl
-
Erlang: The coding language that finance forgot
I will put in a good word for PureScript for the beam with `purerl`. It's my go-to for writing BEAM code nowadays. Notably PureScript tooling including LSP, package management, etc., just works, so you are able to just get to work in internalizing the way OTP and other Erlangy things are expressed in a statically typed, pure language.
https://github.com/purerl/purerl & https://purerl-cookbook.readthedocs.io/ for more information. Join the PureScript discord and the #purerl channel if you want help.
-
purerl - Integrating PureScript into Elixir projects
purerl is a compiler for turning PureScript code into Erlang code, so that you're able to write BEAM (the Erlang virtual machine) applications using it.
-
Phoenix 1.7 is View-less
You've been able to write PureScript that compiles to Erlang and has perfect interop for years, via `purerl`[0]. Using it with Elixir is as simple as adding `purerlex` as a compiler and having your PureScript code automatically compile when `mix` compiles things, and off you go.
In terms of the typing itself, it's exactly what you get in all of PureScript, strict static typing with no `any` or the like. Using `Pinto`, the de facto OTP layer in PureScript your processes are typed, i.e. their `info` messages & state are typed, which means that they are all much more like strongly typed state machines than anything else.
You can see an example of a basic `gen_server` here:
https://pastebin.com/UTEfz7Wg
The differences aren't very big in terms of what you'd expect to be doing. One small thing to note is that the `GenServer.call` expects a closure to be passed instead of having the split between `gen_server:call` & `handle_call`, removing the need for synchronizing two places for your messages being sent and handled.
0 - https://github.com/purerl/purerl
- Angular without SSR is faster than Next.js with SSR. I have the data
- Beam VM Wisdoms
- V0.14 of Gleam, a type safe language for the Erlang VM, has been released
What are some alternatives?
key_value_parser
hamler - Haskell-style functional programming language running on Erlang VM.
ex_abnf - Parser for ABNF Grammars
Gradualizer - A Gradual type system for Erlang
lex_luthor - Lexer in Elixir. Lexer in Elixir. Lexer in Elixir. Lexer in Elixir. Lexer in Elixir. Lexer in Elixir. Lexer in Elixir. Lexer in Elixir. Lexer in Elixir. Lexer in Elixir.
lumen - An alternative BEAM implementation, designed for WebAssembly
purescript - A strongly-typed language that compiles to JavaScript
gleam - ⭐️ A friendly language for building type-safe, scalable systems!
purescript - A strongly-typed language that compiles to JavaScript
erllambda - AWS Lambda in Erlang
abnf_parsec - ABNF in, parser out
js-framework-benchmark - A comparison of the performance of a few popular javascript frameworks