DEV Community

Sushant Bajracharya
Sushant Bajracharya

Posted on

5 1

Elixir is written in Elixir

Okay, I exaggerated the title a bit but most of the elixir’s source is written on top of elixir itself. But how? Did the chicken came first or the egg?

Turns out that, there is a technique called Bootstraping in compiler design which creates a self compiling compiler. What that means is, you write the core compiler for Y language in X language and then write a new version of the X compiler in Y language. Then you compile the Y compiler with the X compiler. Mindfuck.

In Elixir, the core compiler is written in Erlang and the tooling and libraries are written in elixir itself.

Coming from a ruby background with no prior CS degree, this really caught me off guard.

Top comments (1)

Collapse
 
cescquintero profile image
Francisco Quintero 🇨🇴

I just got mindfucked 🤣🤣

This is a whole new concept to me but yeah, I kinda get it

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay