
An Interview with Jose Valim, Creator of Elixir - wickwavy
https://www.welcometothejungle.co/en/articles/btc-elixir-jose-valim
======
adamzapasnik
I know it's been said by many, but I will repeat once again.

Elixir is a very cool and powerful language for building web apps.

Having built my first product ([https://retrochat.xyz](https://retrochat.xyz))
in Elixir, I can wholeheartedly recommend it to anyone who is not happy with
their current backend language(Ruby, Python, Js, etc).

Docs, functional programming, OTP, ecosystem(Phoenix, Ecto, Mix) are really
top notch. In my opinion, you will be able to reach much higher productivity
(especially long term) in Elixir than in Ruby, which is known for it's high
level of productivity. Sounds like a fairy tale, right? Well, that fairy tale
can become a reality with Elixir.

The only thing that is a bit of pain is a good release support, but that has
been changing for better.

~~~
config_yml
I'd be interested in hearing more about this. I'm keen on learning Elixir, but
have fallen back to Rails at least 2 times when starting something fresh,
because I'm very comfortable with Rails ops. It's simple enough for my case
and rails console is just a blessing to dig around when something weird is
going on.

~~~
pdimitar
It's mostly two things:

1\. The stuff that never goes down (gets automatically restarted with last-
known good state) and the amazing runtime in general. Not to mention it's much
faster than Ruby or Python or PHP... In some cases it's faster than Javascript
although JS and Erlang/Elixir are, on average, tied on performance.

2\. A switch in philosophy and the way you troubleshoot your app: from
magic/implicit to explicit. Many people cannot cope with this one because the
force of habit is extremely hard to overcome. I for one enjoy knowing what
exactly is going on in my app and exactly where but many others disagree.
Again, it's a philosophical thing; you either are into it or you are not.
There is also the objectively technological aspect: zero magic and
implicitness mean much easier bug fighting. You no longer have to dig around
in callbacks and installed on-start handlers.

Make no mistake: it's harder to start with an FP language. Nobody is disputing
that. The benefits to be sown after the initial culture and brain shocks
however are a lot.

~~~
jashmatthews
> Not to mention it's much faster than Ruby or Python or PHP... In some cases
> it's faster than Javascript although JS and Erlang/Elixir are, on average,
> tied on performance.

By what metric? Phoenix on Elixir doesn't perform any better than Ruby and a
similarly lightweight framework like Roda:
[https://www.techempower.com/benchmarks/#section=data-r18&hw=...](https://www.techempower.com/benchmarks/#section=data-r18&hw=ph&test=db&l=zg21a7-f&f=zik0z3-zik0zj-
zik0zj-zik0zj-zhxjwf-zik0zj-zijbpb-zik0zj-zik0zj-e7)

NodeJS is also much faster than Elixir in other circumstances thanks to the V8
JIT.

Elixir's and Erlang's strengths over other dynamic languages aren't really
performance. It's mostly just that Phoenix performs much better than Rails.

~~~
thibaut_barrere
I can only speak from my own experience but here is a data point (note that I
do not use Elixir only, but also other technologies, in production).

For instance, I implemented a HTTP "business proxy" last year, which needs to
be able to keep a large number of concurrent connections & proxy the call to a
slow responding remote server.

I made multiple implementations (including Go, Node, Ruby with Roda, JRuby,
Elixir, Crystal).

In this specific case I had, Elixir throughput & stability was by far the
best. The gap (under load) between min & max was also the best (all this
without tuning), and so was the CPU use.

Of course, YMMV, make your own experiences!

~~~
pdimitar
I'd be _extremely_ interested if you open sourced all those repositories. I
thought of doing something very similar and your shared experience would be
invaluable.

~~~
thibaut_barrere
I know (you are not the first to ask!) but honestly, sorry, I won't and I will
let anyone truly interested to do their own experiments :-)

This type of topic is too prone to endless debates on the validity of this and
that, and the fact that anyone proficient in whichever stack I tested could
definitely improve it (including me on the subpart of those stacks which I'm
most proficient with!).

I don't want to lose any energy with this, and I have made my decision for
that business case (in this case, a very happy one).

~~~
swat535
> I know (you are not the first to ask!) but honestly, sorry, I won't and I
> will let anyone truly interested to do their own experiments

You made an extraordinary claim, yet refuse to provide any evidence. Either
backup your claims with data or don't make blanket statement perhaps?

As to your points regarding scrutiny.. that's the whole point. How else would
be able to measure the metrics?

~~~
thibaut_barrere
I don't have any obligation here! I'm just sharing my own little experiment,
which you are free to disregard.

While providing little details, it is actually providing value to some here.

In terms of measuring success & picking stacks, I have also a good experience
(after 35 years of coding - I hate to mention that and this is no "call to
authority", but I've seen a fair bit of stacks), and Elixir is a good
investment at the moment for my use-cases.

------
arvidkahl
Elixir, the language, the frameworks, and the community have been a blessing
to my professional life.

If allowed me to learn the paradigm of functional programming and build
systems quicker than ever before. Combined with the Phoenix framework, I
prototyped a tool within a few days that would end up changing my life. I
turned it into a SaaS business (called FeedbackPanda) with my partner, and it
has been turning my life around for the better.

Thank you Jose for being such a key person in all of that without knowing it.
Your insights and determination to leverage new tech combined with a proven
software paradigm. Spot on!

~~~
westoque
Also, don’t forget... huge props to Chris McCord, the creator of the Phoenix
Web Framework which is the main reason for me to completely come on board in
the Elixir ecosystem.

~~~
arvidkahl
I had the joy of taking part in a Phoenix workshop that Chris held here in
Berlin at ElixirConf EU. It was insightful, and you can really tell Chris is
in it with his heart and soul.

------
preommr
Can someone post/comment a more critical analysis of elixir if they can?

It's really hard to figure out how useful it is because people always build up
hype when it's not always worth it. All I ever see is how wonderful and
magical elixir is and how it's literally life changing. I want to believe but
I've seen technologies with lots of hype that didn't live up to it. Plus
elixir is different enough that I have a really hard time jumping into it to
try it out.

\----

I'll also add that recently I had to build a backend for a long term project
I've been working on. I seriously looked at elixir/phoenix, but from my
research it didn't seem like the pros outweighed the cons. Like there are some
technologies that are so useful they're worth the lack of a robust ecosystem
or the steep learning curve that may be necessary. And I am not sure Elixir
meets that criteria.

There's already existing technologies like python/ruby for fast development,
java/groovy for stability and groovy for modern features, and finally golang
which is really good for concurrency and building web related microservices.
Golang in particular is nice because it solves issues like python's slowness
and it's slimmer than java in many ways. And these solutions are already
pretty good. It's not like it's all that hard to write a backend. Like the
productivity gains from js to typescript are huge because js can be bad enough
that there's a lot of room for improvement. Whereas how much faster and MORE
productive can someone really be in elixir?

And I am not even going to get into functional programming which is a whole
other beast. It requires significantly different style of thinking, making a
lot of my experience less valuable, I don't think it solves solutions for an
oop system that's well designed, and often times the implementation can be bad
if the right tools aren't there. From my limited experience, FP provides some
really powerful features, but at the builtin cost of being more rigid when I
don't need it to be.

~~~
gamache
Here are a few legitimate complaints about Elixir (and in some cases, its host
VM, the BEAM):

* No mutation support means that for some CPU-heavy tasks, it's not as performant as languages that allow mutation. Some optimized algorithms that rely on mutation can't be expressed directly in Elixir or Erlang, and instead need to be linked in through a foreign function interface.

* It's not on the JVM so we don't get to piggyback on the thousands of dev-years of VM optimization and ecosystem around it.

* It isn't invented at, supported at, and marketed by a FAANG-type company. Money moves mountains and Ericsson doesn't spend as much on Erlang/BEAM as, say, Google spends on Go.

* Comparison across types is not a runtime exception, so you need to guard against crap like `nil > 1 == true` yourself.

* Erlang standard library, which is idiomatic to use from Elixir in the same way of using Java classes from Clojure, is a bit of a junk drawer of tools. There's good stuff, but you may have to dig for it.

* Elixir still hasn't nailed the balance between creating small, independent pieces of code ("applications" in Erlang-speak) and wrangling them so they can be used as dependencies from monorepos, multi-repos, etc. Umbrella projects were an attempt, I don't like them.

* There is an impedance mismatch between Erlang/Elixir's configuration system and 12 Factor® ENV-style configs. (Full disclosure, I wrote a library for this: [https://github.com/appcues/config_smuggler](https://github.com/appcues/config_smuggler))

* The built-in Elixir code formatter removes trailing commas from multiline lists. I mean, come on!

~~~
etxm
Could you use a nif for the heavy compute tasks?

~~~
erokar
Yes. Rust with
[https://github.com/rusterlium/rustler](https://github.com/rusterlium/rustler)
is one popular option.

~~~
etxm
I’m using rustler currently!

I wasn’t positive if the erlang VM restricted resource access in anyway.

I’m not doing anything CPU intensive, just bringing over a library I’m not
smart enough to build in elixir :)

~~~
etxm
Or maybe, too smart to build. But probably not.

------
GiorgioG
As a C# developer I've learned the basics of Rust/Elixir/Go and found that
while they're all nice languages, my knowledge of the .NET platform is so deep
that for kind of applications I develop (APIs mostly), the tradeoffs of using
something new isn't worth it. I haven't come across a problem I couldn't solve
with C#. I don't work at Google/FB/Apple, so I don't really deal with
scalability issues. F# is interesting, but honestly it's so poorly supported
by MS and the community that unless you work at Jet.com it's not worth it.

Don't get me wrong, I love learning new languages/tools, but the cost of
learning them deeply is a price that's hard to pay for when you have to get
things done at an ever-increasing pace.

~~~
dnautics
I'd love to give you a challenge: Write a live-updating web dashboard -for
anything- in Elixir with Phoenix LiveView. Then think about how you would do
that in C#. Sure you can do it, but you can't do it _as fast_ , and what you
come out with in 5 weeks as an expert in C# (which should take you 3 days -
including beautiful html documentation and all the unit tests - if you're an
expert elixir programmer, or, maybe a week and a half if you're a noob) will
not have the uptime.

~~~
ksubedi
I will guarantee you that an expert C# developer could write the same system
in same or less amount of time than Elixir with Blazor or even SignalR. C#
ecosystem is so big and robust at this time that almost all big problems have
already been solved.

~~~
dnautics
Huh, blazor looks pretty good! Nice to know. Thanks!

------
anthony_doan
I built a personal project on Elixir, Phoenix, and Postgresql(currently on
hiatus).

It have a somewhat steep learning curve with the ORM Ecto. Debugging Ecto,
changeset, etc.. is not fun. Dumping whatever Ecto returns can be a puzzle
because by default other than the main tables are not preloaded and it loaded
with meta data. Also how you deal with Ecto and forms in phoenix is not clear,
lots of gotchas. The common thing is that you have a form template that
update/edit and new/create share. The problem here is if you don't know what
you're doing one of your template will expect a changeset and the other will
expect a list. I forgot which one gotta look into my code but it was an
annoying gotcha.

The lack of things baked into Phoenix makes it a hunt to find
packages/libraries to add features to it.

Examples are Laravel having rate limiting router built in and signed links
built-in. I don't believe the html form is as good as other frameworks; can be
at time confusing. I think while Phoenix may not be aiming to be full features
as Laravel, I believe security measure such as rate limiter and signed links
should be built in.

Deploying is also a learning curve. You need to compile Elixir in production
server and then the folder layouts is different than development. So hunting
for the root web folder of your application is a thing I did and learning
about the layout of production.

Having said all that, I enjoy coding in Elixir and using Phoenix. It is fun
getting better at it. While there aren't many thing baked in like Laravel, it
made me more educated in the things I've taken for granted. I re-did the
authentication system 3 times. I tried jwt, did more research and realize when
to use session and when to use them.

I enjoy coding in Elixir more than PHP. I see myself building my side web
projects in Elixir in the foreseeable future. I do recognize that it's a
smaller community with less contributors so I hope this come off as a
constructive criticism of something I love and know well enough.

------
starvingbear
I am so appreciative of his accomplishments. Knowing the history of ruby and
functional languages, figured early on he found the right solution to the
right problem and the impact of this language has been huge very quickly

------
8ytecoder
How does one get motivated enough to say - you know what, I'm going to create
a new programming language? How do they keep it going when they face hurdles?
How long did it take to develop this?

I'm struggling to start any in-depth project. I can do stuff - make a small
app - here and there. But the thought of starting something is so daunting and
intimidating. The irony is that I built a small but working language as part
of the compilers course in college. I feel like I know so much more know but
can't bring myself to develop something that reflects that.

~~~
josevalim
I personally started the whole thing for learning purposes. I don't have a
computer science background, so it was exciting to learn all of the different
concepts. Most of it was initially driven by curiosity and challenge.

But it is also worth saying my first attempt (at Elixir) sucked and it
demotivated me to work on the project for 6 to 8 months. It was only later I
learned/figured out some of the answers or possible solutions to the problems
I was having and that motivated me to work on it again. Once I asked my
partners to let me work part-time on the language, I prepared myself it would
have to be a long term effort (at least 2 years). Then people started using it
and that in itself kept me going (and it has been like that for almost 9 years
now).

In all fairness, I also do struggle with motivation when starting hobby
projects, even more larger ones, and especially if most of the challenges have
been addressed. Also what keeps me motivated changed throughout the years, so
I try to be mindful of that.

------
120bits
As a beginner, who has never touched Elixir, where should I start? My issue is
tutorials NEVER have production quality code. How do know what my code
structure looks like? How does linking works? If I/m using database, how can I
use connection pooling. Stuff like that. I can look up the basics, but I have
always struggled to learn how use X language in production. But I guess this
is can applied to any programming language.

~~~
mrdoops
First thing I'd do is go through the Getting Started guide on the main page:
[https://elixir-lang.org/getting-started/introduction.html](https://elixir-
lang.org/getting-started/introduction.html) to get a feel for Elixir. For
setting up an Elixir environment, I'd use ASDF - this guide is good:
[https://gist.github.com/rubencaro/6a28138a40e629b06470](https://gist.github.com/rubencaro/6a28138a40e629b06470)
\- but the getting started guide's instructions will work too. The easiest
editor for Elixir is probably VSCode with the ElixirLS extension.

After tinkering around in IEX and doing the Getting Started Guide, I'd do Dave
Thomas's course ([https://codestool.coding-gnome.com/courses/elixir-for-
progra...](https://codestool.coding-gnome.com/courses/elixir-for-programmers))
and read Elixir in Action by Sasa Juric. Dave Thomas's course will get you
through the basics of the language and the important concepts step by step.
Elixir in Action will go further into the concurrency model that makes Elixir
unique.

Finally if you want to build a web app I'd go through the Phoenix Guides:
[https://hexdocs.pm/phoenix/overview.html#content](https://hexdocs.pm/phoenix/overview.html#content)
. Those guides will give you a good example of what a real Elixir/Phoenix Web
Application looks like using a database with pooling and request concurrency
out of the box. The Programming Phoenix book will take that further
([https://pragprog.com/book/phoenix14/programming-
phoenix-1-4](https://pragprog.com/book/phoenix14/programming-phoenix-1-4)).

If you want more practice writing functions and algorithms I'd recommend
Exercism's Elixir track:
[https://exercism.io/tracks/elixir](https://exercism.io/tracks/elixir) or
Project Euler ([https://projecteuler.net](https://projecteuler.net)).

------
algaeontoast
It’s a shame elixir never really seemed to take off. I’ve been a huge fan of
the language and recent Phoenix framework for three years or so. However, it
seems like specializing in this Lang would be more of a hinderance than asset.
Great for personal projects and a joy to work with, but for some reason a
lions share of developers seem to be scared of functional programming.

~~~
dnautics
I am using elixir for a very important part of a project where I work. The
project leader who is giving up their repsonsibility over a half-baked
python/django effort that is currently in prod asked me if it's risky because
we're increasing our exposure by using a product that is not battle tested.
Then i told him that our at work documentation (slab) and our soon-to-be site
reliability early warning system (pagerduty) oh yeah and our corporate card
(divvy) all are or Elixir/Phoenix so we _already_ have exposure to the risks
in adopting it.

------
Existenceblinks
The great thing that José really inspires is his energy. The moment while I'm
learning Elixir slower than he's adding things to it, is the realization. Then
I occasionally have a creepy habit where I like to stalk his git commits, to
see what he's doing.

I stay with Elixir. Thanks!

------
shay_ker
I've heard a lot from senior devs getting into Elixir, or former Ruby devs.
How about junior devs? What's their experience like?

~~~
mrdoops
I was about 2 years into professional development when I started getting into
Elixir. Recursion was a week or two of "err what?" then I got it. Functional
composition is way easier to reason about than OOP design patterns (and should
be since OOP design patterns are just over-complicated Category Theory).

The tooling gets out of the way, so a newbie is less likely to run into
roadblocks. IEX is the best REPL I've worked with. Phoenix is much simpler to
reason about than similar frameworks like Rails. And the docs are clean and
consistent (+ dark mode). It was really easy to navigate through the docs, try
things out in IEX, and get things working. It's just modules and functions.
There's no classes, base-classes, abstract-classes, inheritance,
instantiations and what-not. Just modules and functions. I doubt there's a
better way to learn back-end development (DBs, Queues, Concurrency, PubSub,
Distributed Systems, etc.) than Elixir.

A buddy of mine has been getting into Elixir recently while going to school
for CS. The school's curriculum is mostly C#, Java, PHP, and what-not. He says
Elixir demotivates him from some of the homework because everything in Elixir
would be way easier.

------
textread
What is the font used on this website?, looks very legible. Searching on
myfonts.com with a screenshot didn't work.

------
PopeDotNinja
To the Phoenix newbs, don't forget to learn how to write a GenServer!

------
whsheet
OT and FWIW
[https://trends.google.com/trends/explore?date=all&geo=US&q=E...](https://trends.google.com/trends/explore?date=all&geo=US&q=Elixir%20lang,Go%20lang,Rust%20lang)

~~~
aczerepinski
Comparing Elixir and Go is reasonable, but I don't think Elixir and Rust have
much overlap in the types of projects you would choose them for.

~~~
pythonaut_16
In fact the opposite is true! Rust is a pretty popular choice for writing
native code (NIFs) for Elixir. (Similar to Ruby FFI).

See
[https://github.com/rusterlium/rustler](https://github.com/rusterlium/rustler)

Discord especially has several real world use cases where they've implemented
native code in Rust.

------
joelbluminator
I write CRUD apps for a living , how is Elixir gonna make it easier for me? It
can't and it won't. Not saying it's bad or anything, just has nothing for me
personally.

~~~
pdimitar
If you elaborate on what you find underwhelming then perhaps people would not
downvote you? They may even engage in a discussion.

~~~
adamkittelson
A quote from pg's beating the averages
([http://www.paulgraham.com/avg.html](http://www.paulgraham.com/avg.html))
seems relevant here to me:

As long as our hypothetical Blub programmer is looking down the power
continuum, he knows he's looking down. Languages less powerful than Blub are
obviously less powerful, because they're missing some feature he's used to.
But when our hypothetical Blub programmer looks in the other direction, up the
power continuum, he doesn't realize he's looking up. What he sees are merely
weird languages. He probably considers them about equivalent in power to Blub,
but with all this other hairy stuff thrown in as well. Blub is good enough for
him, because he thinks in Blub.

