12 ms·
Ask HN: Why Isn't Elixir More Popular?
It seems that when implemented correctly, running full-stack Elixir can greatly simplify complicated distributed systems. In-memory storage can replace a cache, and the architecture itself can replace a message queue. Horizontal or even vertical scaling can replace complicated scaling mechanisms. There are plenty of advantages to running data pipelines in parallel too.
There's also a huge trend now away from managed cloud services (ZIRP), and it seems like Elixir with a database on the same machine or network could deliver great performance and scalability.
So why don't more people use Elixir? I've read some complaints about the lack of static types or not having as many developers. But if those were the only constraints, one would think that they could be overcome, or some service could just greatly simplify Elixir deployments.
- johnklos 2y agoGot me. Running Akkoma on Elixir is a piece of cake, relatively speaking. Trying to run Mastodon on Ruby by simply using the latest version of the required Ruby components hasn't worked for me, ever. The idea that we'd need to keep a snapshot of modules from a specific date in order to run certain software is ridiculous, and the idea of running it in a container like Docker is just giving in to bad practices. Too often it means things are too fragile to update when there are security issues. I haven't seen this happen with Elixir. What do they do better / differently from Ruby that updating doesn't cause the house of cards to come crashing down?
- wkyleg 2y agoYes! That's a good point Docker is another technology that is sort of ridiculous from this perspective. Deploying an entire OS just to make dealing with dependencies easier
- abhisgup 2y agoYou are not exactly deploying an entire OS as the overhead of that would be huge. You are deploying an isolated process group having the bells and whistles of the OS you like.
- sergiotapia 2y agoIt's a wonderful language. Unfortunately the only places I've been able to use it and get paid were places where I ultimately had the decision making ability of the tech stack. Why isn't it used? It's niche and betting on such a small community is risky for the majority of companies. Why use Elixir when you could hire 10 engineers to pump out javascript. That's the mentality of most. Hiring for elixir was great, it self selected people who wrote code as their craft. You kind of have to be curious about code to even be aware of Elixir, know how to write elixir. These types of devs would pick it up really quickly because the language is just so damn ergonomic. I'm using Elixir now, and I wake up so happy that I get paid to do this. I am really blessed.
- wkyleg 2y agoIt's funny I think I remember explicitly reading this argument somewhere, that startups need to meet headcount as a metric for VC funding so they will end up picking "worse" tech for that reason.
- Terr_ 2y agoI don't follow, wouldn't it be faster/cheaper to meet an arbitrary headcount goal using a more-common language or stack?
- julienmarie 2y agoI think @wkyleg meant that an Elixir dev can be as productive as multiple js devs because of the specificity of the language and the beam virtual machine. Complicated things are trivial in Elixir, dependency management is a breather, and all in all, a really simple and productive environment as the mental model is pretty simple once it clicks.
- sgarland 2y ago> it self selected people who wrote code as their craft I’ve often thought that would be true for niche languages. I interviewed at a fintech whose backend is written in Haskell, and definitely got that vibe from the interviewers.
- yen223 2y agoThe simple reason is that Elixir is competing in the backend web-services space, which is a very crowded space with many equally-compelling alternatives. As someone who likes working with off-meta languages, it's clear that the default state for any new language is to die an early death. The fact that Elixir hasn't died is testament to its strengths.
- madamelic 2y agoSince this thread is going to be bait to more experienced Elixir devs, can someone tell me books, blogs, etc that you like that discuss performance in Elixir? I am working on an Elixir project that in no circumstance should be taxing but it's falling over miserably at like 100 - 200 events per minute. The detail is it is distributed-ish IoT. I didn't write it, the person(s) who did write it are gone, and no one else writes Elixir. I've gotten some good gains already but I'd like to squeeze the 80 - 90% of juice I think I can get before resorting to beefier hardware. I've gotten into instrumenting and measuring it and I have some ideas but I'd love to hear others point me to other ideas. The real problem is that the hardware is miserably underpowered and it is real-time, by that I mean I can't defer, schedule for later, or de-prioritize anything. --- To actually contribute, I really like Elixir. I am not yet sure why I would advocate for it over something more 'simple' like nodejs (My background is, accidentally, Javascript World) but it's certainly a very nice language to write in. It feels magical but not too magical where you get scared it's trapping you into its web. Before anyone jumps too much on me for it, I gauge "simplicity" by how many people can I hire to write it. You can barely swing a cat without hitting 3 competent Javascript developers. I tried for many years to hire another golang dev so I could write it professionally, I only encountered a few despite having been in most interviews my employers would do. With that said, it may just be that the Venn diagram between "writes Javascript" and "writes golang" is small.
- throwaway81523 2y agoDisclaimer: I've written Erlang but not Elixir. From what I can tell the issues are similar though. I'd say look at Fred Hebert's Erlang blog (ferd.ca) and "Erlang in Anger" for some tuning hints. Erlang has been around a lot longer and its devs have gotten more into nitty gritty issues, it seems to me.
- madamelic 2y agoThanks! That is a helpful tip in general I should remember: search for Erlang, not Elixir ;)
- elcritch 2y ago
- goralph 2y agoIn a commercial setting (i.e. not a side-project) the choice of programming language is also a business decision. The main factors being: - How large is the pool of available candidates for this language? A recruiting risk. - How mature is this language? A business continuity risk.
- viccis 2y ago>How large is the pool of available candidates for this language? A recruiting risk. I worked at a company with a massive Erlang codebase. Really nasty, not really following good OTP practices, etc. HUGE hiring problem and it took 6-12 months to spin up new devs to the point that they could really have ownership over things. And this is not a system that even remotely needed this. Elixir might seem better until you write enough of it to realize that you do basically have to learn Erlang or else you'll always be at a disadvantage when it comes to really understanding it.
- josevalim 2y agoYou don't have to learn the Erlang language (and this is commonly echoed by the community). At a certain scale, you have to learn the runtime, but this is the same for any technology. You have to learn JVM if you are doing Kotlin, there are plenty of discussions on V8 internals if you are running Node, etc.
- victorbjorklund 2y agoYou def dont need to learn Erlang to code in Elixir (other than maybe the very basics to interact with some Erlang libraries like ETS).
- mtndew4brkfst 2y agoAs José answered more gracefully, you don't need to learn the syntax but you do need to learn the semantics, the performance gotchas, and for most projects I'd say you'll probably need to consume Erlang documentation which is certainly a learned skill.
- rsrsrs86 2y agoI regret using it. Recruiting risk. Smaller ecosystem. I should have gone for Python.
- throwawaymaths 2y agoHired a python dev at an elixir gig because I was forced to by the CTO. Picked by the CTO "because we need someone that can do python". Dev was absolute trash. Never hired a shit elixir dev. Python is a huge recruiting risk.
- rsrsrs86 2y agoDon’t get me wrong. Phoenix is wonderful, Elixir kicks serious ass as a language. Jose valim is one of the kindest and most prolific guys I met on the net. I’d use elixir for a solo project any time.
- elixir_newbie 2y agoWill you consider hiring me (remote, non-US) if I pickup the basics in 15 days? I'm open to technical rounds that don't assume elixir familiarity.
- hakunin 2y agoHere’s my anecdote. I built 3 production projects in elixir around 2015-2018, and it was a blast to learn and work with. Those were interesting projects that were a great fit for the stack. One was March Madness bracket game which required a huge throughput on day one, and another was a football game audience play calling each play from their phone as the team is playing live at the stadium. This one needed a lot of timing coordination and poor connection handling. I even put out an open source fast/customizable leaderboard on top of ETS. However, I didn’t feel the need for this stack on most projects, and if I’m totally honest, I never got good at the novel way of building applications in it. While it was very enjoyable, everything felt a little awkward. Even 3 years in I constantly felt that I’m not doing it right, and I’m fighting the language to do data transformations in a purely functional style. I never got used to writing Ecto queries, and always had to look up their syntax. Plus, there didn’t seem to be a good architecture story, just isolated praise of OTP. And Phoenix further fueled the confusion, making it hard to understand whether I’m supposed to reason about my app like a Rails app (just build controllers, models, and views) with no regard for processes, or I should orchestrate some creative supervision trees, that I can’t even tell how they would be arranged in a typical web app. Going back to Ruby on Rails was kind of back to super productive comfort zone after a bit, and I just continued staying there. I’m still looking back at Elixir with nostalgia, wondering if I’m going to have a chance to go back to it and really make it an extension of my arms/brain like Ruby had become. And whether I can do all that amazing supervision-based architecting I keep theorizing in my mind. I loved Dave Thomas’s vision (and agreed with his controversial takes) and really wished I could get as good as Sasa Juric at really deeply reasoning in this framework. Maybe one day.
- steve_adams_86 2y agoI have to say this is a really good summary from my perspective too. Different exposure and projects, but the experience in terms of ergonomics and other developer experience was much the same. I never felt truly proficient. I recall years ago interviewing for a role and straight up telling the interviewer I wasn’t very good with Elixir. That’s just how it made me feel. In retrospect I was fine, I built some interesting stuff. I probably could have promoted myself for that. But the language kind of left me feeling like I wasn’t getting it. Even so, great fun to learn and apart from those aspects, I enjoyed building with it a lot.
- ddyevf635372 2y agoBecause it is not strictly typed language.
- maz1b 2y agoFrom what i've read, it is the "upgrade" to rails for people who want higher scale. I don't know if I agree, as Rails definitely does scale if you know what you're doing. Would love to hear more about others experience using Elixir for fast, low-latency high throughput scale.
- DoesntMatter22 2y agoRails is pretty fast today and as you said scales well. I don't think think the addressable elixir market was really ever that big. Even companies like Bleecher report migrated off
- ipnon 2y agoNo manager is going to lose their job by hiring 10 Python and JavaScript engineers to accomplish what could be done with 1 Elixir engineer. And that’s how most time and effort is allocated in our tech labor market economy. It’s by working backwards from “I want to still have a job in tech next year.” The number of people who are calculating which language to write in by thinking “how can I write a fault-tolerant distributed system with less time and energy so that I can quickly release performant products” is minuscule. The lack of popularity of Elixir is evidence of this I think. In regards to your point on ZIRP: billions of dollars have been poured in to LLMs that are biased toward legacy languages like Python and JavaScript. Even the file structure of these languages is conducive to LLMs. A HTTP server can be and is frequently defined in a single file or function, where everything from socket creation to connection handling to request parsing to database queries to response can be composed in literally a few lines of code. This immense expressiveness is a testament to the power of HTTP. But as I’m sure we’re all aware there are limits to what can be accomplished with a single machine serving these stateless requests, and the limit can be reached very quickly. But LLMs gravitate towards producing these haiku-like incantations, it’s trivial for them. Elixir’s power comes from having a well-defined API and explicit failure modes for each of these layers, each in their own expressive modules. This makes it difficult for LLMs to write Phoenix code when they’ve been optimized to output a 3-line FastAPI decorator-definition-query endpoint. Each of these layers in Phoenix is by itself quite simple, each layer has about 2-4 required functions to be implemented, and Phoenix can generate all of these for you. But ChatGPT doesn’t seem to be able to grok it all at once the way a good engineer can after readings the docs for an afternoon. Will Elixir survive an era of programming where RTFM is a lost art? I suppose we will find out soon enough!
- 7bit 2y agoI'm Not a Professional dev, but a sysadmin WHO Likes to code. I learned a bunch of languages over the year. C#, Java, Python, JS/TS, PowerShell, Rust. Not professionally, but enough to finish some Personal projects. Elixir was so vastly different, had such a small community that I lost interest very, very fast. It just felt like a waste of time. Any of the other languages I learned I could and did apply at my job. Even just knowing the languages helps a great deal when evaluating the next tech stack to implement. And Elixir just doesn't. It's a niche language for niche applications and doesn't personally help me in the least. I also just did not like the DX. I did fail to understand how to use the VS Code debugger to step through functions. Printing to console to inspect variables felt like being in the stone age again, no thank you. I still believe Phoenix LiveView is a really, really good tech and currently wish that Svelte could implement something like that. And that's my personal reason for not looking into it.
- h0l0cube 2y ago> I still believe Phoenix LiveView is a really, really good tech and currently wish that Svelte could implement something like that. Not what you meant, but there's this: https://github.com/woutdp/live_svelte https://github.com/woutdp/live_svelte > I did fail to understand how to use the VS Code debugger to step through functions. Did you have any luck with the ElixirLS extension? https://github.com/elixir-lsp/elixir-ls https://github.com/elixir-lsp/elixir-ls
- mau013 2y agoI started coding in Elixir about a year ago, and my experience with the community has been great. I was coming from Python and JS, where evidently the community size is orders of magnitude larger, but in my experience that is more than compensated by how engaging the Elixir community is. I’ve had very helpful interactions on the Discord channel and through the ElixirForum… also, you tend to get very good/thoughtful answers. So to me community size has not been an issue. Also, just out of curiosity, what do you mean by “niche”? As far as I’m aware the use case of Elixir is pretty general purpose (obviously with its strengths and weaknesses - like any other language). Anyways, to each his own ;)
- ram_rar 2y agoA limited job market, considerably smaller ecosystem (compared to java/python), and lack of support from major tech corporations (unlike Go or Rust) makes it challenging to adopt Elixir. At my company , we inherited a legacy Elixir service, but we're actively moving away from it. We found it more practical to rewrite the service in Go (entire team is proficient in + LLMs make it easier to migrate) rather than invest time and resources into learning Elixir and its associated ecosystem. The return on investment for mastering Elixir didn't justify the effort required, given our specific circumstances and needs. I do like to tinker with Elixir for hobby projects. But supporting a whole new language in a company is an uphill battle, that's incredibly hard to justify.
- innocentoldguy 2y agoI've had the opposite experience. I've worked at several companies that migrated from Go to Elixir because the return on investment DID justify the effort. For example, Elixir allows us to do hot code deployments, uses a tweezer approach to self-healing as opposed to Go's sledgehammer approach (when paired with K8s, otherwise Go can't self-heal at all), and Elixir's immutability makes concurrency less error prone than Go's imperative nature.
- jatins 2y agoI can't say about mass popularity but for me personally the lack of static types has held me back from using it. Now that it's being gradually introduced I am looking forward to trying it
- pansa2 2y agoUltimately, Elixir is a functional programming language. Has any functional language ever really become popular?
- reducesuffering 2y agoThe way people write Typescript these days is very functional. A huge amount of modern code are React apps written functionally
- andrewstuart 2y agoStraight up - you should not use it without much more compelling reasons than those you have outlined. It's not OK as CTO to push your company to use for favorite pet slightly obscure technology. The company needs ordinary technologies to get its job done - Java, C#, TypeScript, Golang, Python, something like that. Maybe even Ruby but frankly that causes hiring headaches too. Unless the company is doing something so extraordinary that it NEEDS Elixir over the technologies above, and it probably doesn't need it. I know companies that went all in on Elixir - they spend all their time trying to recruit Elixir developers from a tiny recruiting pool, or trying to find people willing to learn it and bring them up to speed. This is poor business practice - there was nothing they were doing that could not be done just as effectively with any of the other major languages. Just use normal technologies, have all the people and documentation and training and other resources available and get on with the job of building the software that the business needs. I guarantee you that the company that went with Elixir due to the enthusiasm of some current or past CTO will have to go through the painful process of getting rid of it. Elixir is for personal projects. Corporate software development is mature enough now that ordinary technologies are extraordinarily powerful and there's almost no reason sufficiently compelling to not use them. Toys are for home, tools are for work.
- toldyouso2022 2y agoUsed elixir a few years ago for tutorials and such, worked fine. Tried to use it again in 2023, vscode extension would break. Tried on 2 windows machine and one linux machine, exetension always broke. I then figured out why (I don't remember the exact reason, it was one of those "yeah I can see why it didn't work and it's my fault but it kinda isn't really" situations) but at that point I was done because I had better stuff to do. Point being, if you want your stuff to be adopted make sure the tooling is noob friendly. The noobs of today can be the professionals of tomorrow. Especially today when there is so much stuff to learn and elixir is so far from the usual and requires a certain time investment
- gregors 2y agoYou might have missed this recent announcement https://elixir-lang.org/blog/2024/08/15/welcome-elixir-language-server-team/ https://elixir-lang.org/blog/2024/08/15/welcome-elixir-langu...
- toldyouso2022 2y agoGood news, I really want elixir to become popular and improve the dev experience
- binary132 2y agoMost people just want to get something done and reach for the tools that will most straightforwardly and simply get them to their destination. Niche stuff doesn’t have the market fit because you’ll always have a hard time finding people to work on your product that don’t cost twice as much as everyone else, unless it’s 10x faster gtm / 10x cheaper. Seems obvious enough. Personally? I like good typesystems and very sharp tooling. It has seemed to me that Elixir has neither, and doesn’t really offer me a particularly big advantage that would outweigh those disadvantages.
- innocentoldguy 2y agoIn my experience, Elixir is one of the easiest languages to pick up and get stuff done quickly. It has excellent tooling and deployments ARE 10X cheaper (if not more). I've never converted a project to Elixir and not had the associated costs decrease dramatically. Also, I don't find typing to be an issue in Elixir due to the way the language works (pattern-matching, guard clauses, immutable data, etc.). Maybe I just have a talent for remembering types, though, because strong typing has always been a huge meh for me.
- mtndew4brkfst 2y agoI've never converted a project to Elixir and not had the associated costs decrease dramatically. It's useful to remind that any full rewrite without notable changes in feature scope will probably wind up performing better than the original organically developed solution, even if you never change tech stacks. That's just the nature of going in with a total picture of the problem space and knowledge of the warts already encountered.
- pjmlp 2y agoFrom my point of view, it builds on BEAM, and while Erlang might have been a success story in telecommunications, there is no reason for any of my employers to use it instead of JVM or CLR, and the languages available to them.
- hauxir 2y agoWe're using it with great success at kosmi.io
- gregors 2y agoAs an in-the-code CTO that runs small teams, I've used Elixir/Phoenix quite successfully. Hiring has never been an issue, in fact - Elixir was a tool to recruit a specific senior developer we wanted but couldn't pay them what they wanted due to budget. Elixir interest got them to come on board. I've trained a number JR developers with no prior experience with great success. I was all in on Rails for over a decade, Elixir/Phoenix has definitely replaced that stack for me. I think it hits a sweet spot in terms of runtime performance and developer productivity. The latter is not something you can afford to ignore on small teams.
- innocentoldguy 2y agoSame! I've had a lot of success training Python, Ruby, and JavaScript developers in Elixir and Phoenix. I've never had the "You can't find devs who know Elixir" problem that I occasionally see.
- deleted 2y ago[deleted]
- kugelblitz 2y agoI use Symfony (PHP based framework) and it works fine. I've been able to get into Django (Python), Laravel (PHP), Java (Spring) and even Grails (Groovy) because they either had similar concepts or even similar syntax (I mostly do web development, so this is a very biased take). Being a freelancer, I need to focus on what's marketable. Sure, Elixir will get me into a niche, but I will have way less projects to choose from. And when I start a project for a company, if I start with Elixir, I will also have a smaller pool of devs to recruit from. It's a chicken-and-egg problem. Nowadays, if I start a project, I would try to build on monolith and full framework with a PaaS. Unfortunately, most projects want to start out "the right way", which means separate backend (e.g. Java), separate frontend (React), rented server (e.g. Hetzner server) and custom deployment (some pipeline an outside agency built when they first started the project). I'd rather spend 400 USD on tools each month, but then only need 1-2 full stack devs instead of 6-8 people (1 sys admin, 1-2 deployment, 2 backend, 2 frontend) and with all the overhead that comes with it.
- wkyleg 2y agoDo you really find Java backends to be that great? I don't think they're intrinsically bad, and Kotlin or Groovy can be nice, but I've always found the community and lack of open source tools to be wanting. I've found myself to be much more productive in JavaScript/TypeScript or Python, in part because of the languages, but also because the open source libraries have been way better
- kdemetter 2y agoI love Elixir, and I've been learning it because I see the potential. But, it is a steep learning curve, and it's quite a different paradigm than most developers are used to. Which means it would be very difficult to get it adopted in say a company, because it would require lots of money to retrain people and it's harder to find people for it. I think it might also have a marketing problem, in that it uses the Erlang VM which is pretty old. That's actually evidence of it's strength, but it's less sexy than doing something completely new
- kdemetter 2y agoI love Elixir, and I've been learning it because I see the potential. But, it is a steep learning curve, and it's quite a different paradigm than most developers are used to. Which means it would be very difficult to get it adopted in say a company, because it would require lots of money to retrain people and it's harder to find people for it. I think it might also have a marketing problem, in that it uses the Erlang VM which is pretty old. That's actually evidence of it's strength, but it's less sexy than doing something completely new. However, I think it's a great language to just try out yourself. Even if you won't be able to use it professionally, you'll still learning something you can use in your job as well.
- aristofun 2y agoOne of the reasons is that FP languages just don’t feel natural to most beginners. It gives the language a very niche vibes. And rightfully so, I suppose. But the key reason is that no giant has sponsored and promoted it. Products are virtually never popular because of their internal qualities.
- shortrounddev2 2y agoI think functional programming languages are at an inherent disadvantage