PhaserKell

PhaserKell

Create a compiler and a VM in Elixir

Hi, I would like to make in the near future a programming language like https://vlang.io/
I think Elixir is an excellent candidate for this job but I fear two points:

  • Would the performance be sufficient? According to some articles Elixir would be slower than Java, do you have bindings to LLVM?

  • I can’t ask my users to download the project and elixir to run it, do you have a way to get a static binary?

I am interested in GitHub - nicolasdilley/dwarf-interpreter: The compiler for the dwarf's language · GitHub and when I compile it I get a tiny binary of 1 mo, how did it do?

Most Liked

rvirding

rvirding

Creator of Erlang

Hi, I have done 2 languages on top Erlang/BEAM, public languages anyway, LFE (Lisp Flavoured Erlang) GitHub - lfe/lfe: Lisp Flavoured Erlang (LFE) · GitHub and Luerl GitHub - rvirding/luerl: Lua in Erlang · GitHub . The first is a Lisp which keeps the basic Erlang semantics as provide by the BEAM while the second is an implementation Lua implemented in Erlang. [*] Note that the BEAM is designed to run Erlang and most the of the Erlang language features are directly implemented in the BEAM.

Luerl works by compiling down to a VM for which I have then written an interpreter. This to provide the data and code handling which Lua requires but is not provided by the BEAM. Basically Lua has shared, mutable and global data which we don’t do. Yes, the resulting language is slower but the Erlang interface is fast and you get free access to Erlang’s concurrency and parallelism.

[*] I call the first “native” languages on the Erlang Ecosystem, Elixir is of course another one, while the second “non-native” languages.

NobbZ

NobbZ

What kinds of documents do you mean?

There is the BEAM book and also BEAM wisdom. Perhaps you can find even more valuable resources in Best resources on BEAM internals?.

As well as there might be some wisdom available in the OTP sourcecode or in the two RUST re-implementations ErlangRT and enigma.

You could, but if your language has a lot of mutability or objects (I do infer this from your constant mention of the JVM) or other semantics building on those, then the BEAM is probably not a suitable runtime for your language.

Still, building a compiler for your language on the BEAM is a valid choice.

Where Next?

Popular in Questions Top

sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

Other popular topics Top

chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30877 112
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
johnnyicon
Hi all, I’ve just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I’m trying to use Postgres...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 52341 488
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New

We're in Beta

About us Mission Statement