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

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

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

Okay