16 ms·
Why Elixir? Common misconceptions
- andy_ppp 1y agoYes, it’s always a surprise to me that, given how great Elixir is, it didn’t take over backend development. It seems so much better suited to doing something similar to microservices without a lot of the overhead you’d think people would love it. It always seems that fads win and projects with extremely tight concepts remain niche.
- tl 1y agoWhile Elixir is my current favorite language to hack in, it is very alien and downright hostile to integrating with existing systems. For example, relational database support was postgres focused for a long time (to the exclusion even of SQLite and continued inability to talk to Oracle). Then you have articles like https://dashbit.co/blog/you-may-not-need-redis-with-elixir https://dashbit.co/blog/you-may-not-need-redis-with-elixir pushing ETS over Redis. While it's a valid argument, it's not adoption-friendly. Clojure brings about half the novelty of Elixir, runs on the JVM and still struggles to replace Java.
- stanmancan 1y agoWhat’s wrong with that article? For what it’s worth, I’ve been using Elixir professionally for a few years now and haven’t touched Redis once. Not sure why telling people they don’t need another service is bad for adoption?
- nesarkvechnep 1y agoIn my current project we use Oracle database. It’s possible and almost on par with Postgres.
- 3eb7988a1663 1y agoJust as long as you do not need a boolean. (I know, modern Oracle has finally fixed this, but I have Oracle 11 and 12 systems which bring me daily joy)
- nesarkvechnep 1y agoIs it a problem with Elixir then?
- cess11 1y agoPretty sure there has been BEAM connectivity for Oracle for at least five years. SQLite3 is one of the defaults in Phoenix and have been for a long time. I do mix phx.new curious_idea --database=sqlite3 at least once a week, it's a sub-minute effort to a mostly generated base for a prototype (with OK auth/user management) I can just throw on a VPS and show someone. If you want an in memory store without interfacing over HTTP, that is less foreign than ETS, try Duckdbex. Mix.install or add to mix.exs, then it's two lines and you get a connection to an ephemeral database with a SQL interface. Can probably do the same with SQLite but I've never done it. If your needs are simple you can just boot a GenServer with a K-V structure as state. Pattern matching, the capture operator and functional programming style are the really "hostile" parts, in my experience.
- jjtheblunt 1y agoi understand, but i am not familiar with how one allocates hosts to create a cluster of beam instances across which elixir/gleam apps are running. is there a popular pattern, perhaps as used by whatsapp, i guess?
- andy_ppp 1y agoIt’s all built in at the language/runtime level and then extended with things like Horde or libcluster.
- jjtheblunt 1y agothanks! i knew the language/runtime but had no occasion to have tried libcluster or Horde (yet...but very soon). very useful response...thanks again.
- conradfr 1y agoThe way concurrency work in elixir compared to JS I used to view it as a potential nodejs killer. It was never marketed that way though, and then Typescript took over which makes things even harder.
- throwawaymaths 1y agoif the author is reading this a minor edit should be that whatsapp uses erlang, not elixir.
- matthewsinclair 1y agoYeah, that’s a fair point.
- Towaway69 1y agoI personally prefer Erlang because I’m closer to ideals: lightweight processes, message passing and behaviours. Elixir abstracts that away and leaves a ruby-like language that hides much away - which good and fine. Erlang is by no means a simple language to get one’s head around.
- asa400 1y ago> Elixir abstracts that away and leaves a ruby-like language that hides much away - which good and fine. Processes, message passing, and behaviours are all completely first class in Elixir. There's no hiding. `spawn` is `spawn`. `send` is `!`. `GenServer` is `gen_server`. `@behaviour` is `-behaviour(...)`. The entire Erlang stdlib is available directly. We use processes, messages, and behaviours all the time in regular Elixir work. Elixir adds a different syntax (note that I did not say better), a macro system, a protocol system, its own stdlib functionality, some better defaults, and a build tool. It's perfectly fine and reasonable to prefer Erlang (I learned Erlang before I learned Elixir), but for the benefit of other readers, they are really not that different. The distance between Elixir and Erlang is very small. They could almost be seen as dialects.
- mike1o1 1y agoI've been using Elixir for about a year on a side project and I've been enjoying it more than any other backend I've used (Node, Rails and C#). I recently discovered Ash and I feel like after that initial learning curve my productivity (and code quality) has improved quite a bit. I wish Elixir had more mindshare beside just LiveView and "real time" type functionality. Even building a GraphQL/JSON endpoint without real-time requirements, the functional nature (no side effects), pattern matching and ruby inspired syntax makes writing plain old JSON controllers a joy. While Elixir might not have a package for every use case under the sun, the low level primitives are there.
- realusername 1y agoPersonally while I enjoy Elixir/Phoenix, I didn't like Ash because there's way too many keyword DSL to learn. It's like Rails except that there's much more resources for Rails to find if you made a mistake in the DSL
- mike1o1 1y agoYes, the learning curve is a extremely high. It took a few false starts over time, but after the "Ash book" came out, I gave it a more serious try and it finally started to click for me. I think it helped that at the time I was trying to build some pretty advanced filtering functionality using Ecto and was having a pretty tough time. While searching for solutions I saw a few mentions of Ash and that it could solve the problem out of the box. After a few days of experiments, I found that it was able to do the filtering I wanted out of the box and was even more functional than what I was trying to build. For reference, I was trying to add some tagging functionality to a resource and I wanted to be able to filter by that tag, including multiple tags. Can I do that in Ecto? Of course, but Ash provided that out of the box after modeling the resource.
- pmarreck 1y agoSo if you're comfortable with Ecto and SQL, you can safely skip over Ash?
- hangonhn 1y agoI've been wanting to learn Elixir for a long time but is it worth learning it without knowing Erlang first? I'm not against learning Erlang but just curious if Erlang is a good thing to know before tackling Elixir.
- runjake 1y agoYou don't need to learn Erlang first.
- thibaut_barrere 1y agoYes, it is worth it to learn Elixir without learning Erlang, absolutely.
- _acco 1y agoI consider myself expert-level at Elixir and did not learn Erlang first. Couldn't write a single line of Erlang today unaided if I tried. I picked up Joe's Erlang book years after out of pure joy/curiosity. Especially with LLMs, totally unnecessary.
- Towaway69 1y agoErlang is definitely worth learning but definitely not required by Elixir. Learning the concepts that embody Erlang such as tail recursion and function matching, make Erlang worth learning. Erlang is also a special mix of Prolog and Lisp.
- pivo 1y agoTo add to this, Erlang is a very simple language that you can learn in just a few days. I don't know Elixir but I assume that, as is the case with Erlang, the more difficult thing to learn is OTP and not the language itself. For me Erlang was worth learning because it's so interestingly different to many other languages because of its Prolog roots.
- parthdesai 1y agoYou can get very very far in Elixir without even knowing about an acronym called OTP.
- dzonga 1y agoI have come to the simple conclusion that yeah if a tech is great and people are not launching products internally or as startups then maybe it's time to introspect. if using elixir supposedly gives a competitive advantage, why aren't companies using to launch new products - both existing and startups. a lot of those things quoted in the article are present on the jvm platform or through containers. and btw some of those companies listed have migrated away from elixir e.g brex and discord.
- thibaut_barrere 1y agoCompanies _are_ launching products with it ; that you aren't hearing about it is more about communication & leverage, than about their existence. A while back there was an effort to give more publicity on precise cases here https://elixir-lang.org/cases.html https://elixir-lang.org/cases.html ; I think the effort is now moving to advertising the platform outside Elixir circles (e.g. more generalist conferences). FWIW, I'm working on https://transport.data.gouv.fr https://transport.data.gouv.fr, Elixir-based since 2016, the National Access Point to transportation data, which includes a business specific reverse proxy with a 3x YoY growth, with no plans to migrate :-)
- wavemode 1y agoThere are a large number of companies using Elixir, in small or big ways: https://elixir-companies.com/en/companies https://elixir-companies.com/en/companies Elixir also does not stand alone - the storied history of Erlang/BEAM in mission-critical distributed systems needs no introduction. Elixir lives within, and benefits from, that same ecosystem of libraries and tools. So yeah I'm not sure what you believe there is to "introspect" about, nor to what end.
- weatherlight 1y ago3 out of 5 of all the phone calls you've ever made was managed by a box somewhere running the Erlang VM (BEAM) which Elixir gets all its concurrency and parallelism from. And no, Discord has not moved away from Elixir. While they have adopted Rust for certain parts of their infrastructure, Elixir remains a core part of their backend, particularly for real-time communication and chat infrastructure.
- cpursley 1y agoFwiw, Claude 4 is really good with Elixir, including whipping up quality test suites.
- ch4s3 1y ago> whipping up quality test suites. YMMV, but I think it writes fine unit tests, but really sub par functional or end to end tests that need to check business logic. I think that's just a hard case for LLMS and not an elixir issue though.
- spike021 1y agoCan agree with this. I have had some funny hallucinations, though, where it mixes up Elixir keywords with totally unrelated to programming things and then acts very confident that said things are in Elixir. So you just need to be a bit skeptical and double-check it. But that goes with the LLM territory anyway.
- princevegeta89 1y agoCan we say that being a functional language makes it easier for AI to understand and write cleaner code? Basically, there are no mutations of input data and I guess somehow that makes it easier for the LLMs to understand and keep a track of the input and avoid weird and fancy mutations down the call stack.
- cpursley 1y agoMaybe. Tidewave MCP is not perfect but helps. Also having good test coverage.
- Jonovono 1y agoYa, it one shotted a Server driven ui app using elixir backend, expo with phoenix channels. Was impressed.
- revskill 1y agoIt's not free.
- ram_rar 1y agoI have a ton of respect for José Valim and the Elixir core team, I have to say: Elixir just doesn’t mesh well with the kind of infrastructure tooling that’s become standard today. The ecosystem has been growing impressively and there’s a lot to admire, but its philosophy often feels at odds with containerized, Kubernetes-based deployments. Elixir promotes a "do it all in one place" model—concurrency, distribution, fault tolerance—which can be powerful, but when you try to shoehorn that into a world built around ephemeral containers and orchestration, it starts to crack. The abstractions don’t always translate cleanly. This opinion comes from experience: we’ve been migrating a fairly complex Elixir codebase to Go. It’s a language our team knows well and scales reliably in modern infra. At the end of the day, don’t get too attached to any language. Choose what aligns with your team’s strengths and your production reality.
- ch4s3 1y agoIf you can't get Elixir to work well in k8s, you're simply doing it wrong. Yeah you can build a lot of what k8s offers on the BEAM on a bare server but you don't have to at all. Elixir offers modern telemetry that works really well with pretty much any monitoring tool, and give you a lot of introspection into the internals of the VM if you need it. "Let it fail" works just fine in k8s, you can run a supervision tree in a container and have it manage process restarts internally just fine, its just an added layer of fault tolerance. Sure, you can't easily have long running stateful processes if you're doing a lot of blue-green deployments, but you probably don't need to do that most of the time. If you don't know Elixir and the BEAM well, of course you're going to have a bad time. That's true of any language.
- benmmurphy 1y agophoenix live view is effectively built around the assumption that the server process never dies and never restarts. its a very dubious model for a production deployment. > what happens when the server restarts / connection is lost / server dies? > you lose all of the current client state but you can work around this by persisting all the client state somewhere. > oh, so why am i using live view again?
- ngruhn 1y agoThe only thing putting me off is the lack of static typing. But I'm open to be convinced that this doesn't matter.
- foxygen 1y agoThey are working on a type system.
- _acco 1y agoIt doesn't matter as much as you think. I believe this is in part due to how assertive most Elixir code tends to be. [1] These assertions not only aid the LSP and can cause compiler warnings/errors, they also help LLMs just like types do. Still, every release now contains new type system features. Next up is full type inference. [2] After that will be typed structs. [1] José Valim giving his balanced view on type systems: https://www.youtube.com/watch?v=giYbq4HmfGA https://www.youtube.com/watch?v=giYbq4HmfGA [2] https://hexdocs.pm/elixir/main/changelog.html https://hexdocs.pm/elixir/main/changelog.html
- kingofheroes 1y agoPattern matching makes up for the lack of static typing for me. Combined with guard clauses it feels even stronger than static typing.
- Joker_vD 1y ago> For those I managed to confuse, “glass-to-tin” just means “front-to-back” or “from the screen to the back end”. So like a thin mirror? Which only serves to show the viewer back to themselves? And which also consists of just two extremely simple parts, that is, two panes/sheets of uniform materials, and nothing more? How do you even come up with this metaphor for a web-based application? It's horrible!
- matthewsinclair 1y agoSorry, it didn't land for you. It's something I've used for a while ("glass" for the screen, and "tin" for the back-end). Perhaps I'm showing my age or my Aussie slang. Thanks for reading, in any case!
- mijoharas 1y agoYou use the phrase twice in the article. Could I ask you to put an asterisk by the first one too? (I came across it, stopped reading the article to Google it, couldn't find it so came to HN to search the comments and then went back to the article and saw the asterisk later on)
- matthewsinclair 1y agoOk. I’ll fix it. Thanks. I’m genuinely surprised how much controversy this statement has caused. It’s something I’ve said many times in a professional environment and literally no one has ever picked me up on it. Makes me wonder if they were _ever_ listening …
- mijoharas 1y agoHahaha! dw, no controversy from me, just googled it's meaning and couldn't find an answer, so was confused. (and wanted the asterisk to help the future people out) It could be a more local idiom common in your company/area or something?
- sevenseacat 1y ago
- deleted 1y ago[deleted]
- nichochar 1y agoElixir and Phoenix are very underrated. It combines the "opinionated" aspects of ruby and rails and the power of erlang. The BEAM is like no other runtime and is incredibly fun to work with and powerful once you get how to use genservers and supervision trees. We use Elixir for Mocha, and my one issue with it (I disagree with OP on this) is that live-view is not better than React for writing consumer grade frontends. I wish Phoenix took a much stronger integration with React approach, that would finalize it as the top choice for a web stack.
- 4b11b4 1y agoAny thoughts on Inertia for including React into the picture?
- jamauro 1y agoYeah it’d be nice if they had a mix task to include your js frontend of choice and it “just worked”. Many have used inertia with success. I’m taking a different approach and pairing svelte with Phoenix channels.
- mike1o1 1y agoMy current project is using React Native (for native and web) and getting GraphQL setup was initially a pain, but having React and GraphQL subscriptions gives me enough of the "live" functionality, but without having to worry about connection issues. With gql-tada, I get fully typed experience on the front-end too. If I didn't need native functionality, I'd probably just use the recently released `phoenix_vite`: https://github.com/LostKobrakai/phoenix_vite https://github.com/LostKobrakai/phoenix_vite
- POiNTx 1y agoSomething like https://github.com/mrdotb/live_react https://github.com/mrdotb/live_react might be what you're looking for.
- Dowwie 1y agobeing able to remote into the runtime, manage state and interact with internal BEAM processes is an amazing experience
- Einenlum 1y agoAm I the only one who never tried Elixir just because it has no strict typing? Seems very hard for me to go back to a language with dynamic typing. Maybe I'm just wrong and I should give it a try.
- michaelterryio 1y agoI mean, lots of extremely talented and successful engineers, e.g., DHH, think strict typing is actually a negative. I think if you think strict typing is an absolute disqualifier, you should steelman the opposing side.
- Einenlum 1y agoI tried both and I respect different opinions about this. I feel like TS' type system makes me crazy because it's going too far. But no typing makes me anxious. I guess there is a sweet spot to find for me personally.
- Towaway69 1y agoI prefer something like specs[1] that define a function’s signature but isn’t enforced by the compiler, instead the linter enforces them. This is what Erlang has and it’s very convenient since once a design is fixed, I end up writing a spec to remind me what types the function expects. [1] = https://www.erlang.org/doc/system/typespec.html https://www.erlang.org/doc/system/typespec.html
- conradfr 1y agoI really don't get how having to write @spec foo(String.t()) :: String.t() def foo(bar) is better than def foo(String.t() bar): String.t()
- AstroBen 1y agoAnxious about what? What's your issue with dynamic typing? Thorough tests of the behavior of your system (which should be done whether the language is dynamic or not) catch the vast, vast majority of type errors. "More runtime errors" in a well designed codebase don't mean errors for the user - it means tests catch them Seriously.. the secret to writing great dynamic code is getting very good at testing
- maratc 1y agoElixir's syntax is very intimidating. We maintain a fork of "bors-ng", I'd very much like to hack around a fix or two, but just stare at the code in awe.
- asib 1y agoWhat part of the syntax is intimidating? To my mind, it's not all that dissimilar from e.g. Python, which is not a language about which people express the same feeling.
- cybrox 1y agoStructure and control flow feels very Python/Ruby-ish, however, when you get into the depths of pattern matching and binary deconstruction or even macros, Elixir syntax can become somewhat messy. However, the same concepts, once understood, are extremely powerful for parsing or protocol handling. Talking about stuff like this: nodes = node_data |> Input.split_by_line(trim: true) |> Enum.map(fn << t::binary-size(3), " = (", l::binary-size(3), ", ", r::binary-size(3), ")" >> -> {t, {l, r}} end) |> Enum.into(%{})
- maratc 1y agoI didn't say "part of syntax is intimidating," to me all of it is. Right now I stare at the sibling comment and just don't grasp what's going on.
- buzzerbetrayed 1y agoHave you learned the language? Expecting to know what’s going on without having learned the syntax is a bit silly
- OkayPhysicist 1y agoOne thing the author didn't mention is how incredibly polished the primary ecosystem of documentation, standard library, and tooling is. The Elixir standard library is incredibly consistent in order to support Elixir's piping operator, such that the first argument will basically always be the information you want passed from the function before it. In comparison, I frequently have to check the docs to confirm argument order on any lesser-used function in Python, Javascript, or C#. Then there's the fact that the second-layer of standard library, the OTP inherited from Erlang, which is expansive to the point of containing most things you'd want to do on a server. The documentation, in turn, is the gold standard that I (typically negatively) compare all other language docs to. It's organized, discoverable, and covers not just the "what" but the "How" and "Why" exceptionally well, not just at the function level, but the module layer as well. Frankly, only MDN comes close. All combined, it's just an incredibly productive language.
- nanna 1y agoAm I the only person who is put off by Elixir by the lack of S-expression syntax? I decided to learn Clojure for my next language.
- em-bee 1y agowhile i love s-expressions, i am not aware of any language outside the lisp ecosystem that supports it natively. are you saying that you are put off that elixir is not lisp? i am interested in clojure, but i am put off by it using the java run time. ;-)
- iLemming 1y ago> i am interested in clojure, but i am put off by it using the java run time Clojure runs not only on Java - you have Clojurescript, you have babashka and nbb, you have Clojure-Dart — if interested in building Flutter apps, you can even use Clojure with Python libs. If you need to target Lua, there's Fennel, which is similar as it's inspired by Clojure. For me - Clojure is a hands-down best medium for data manipulation - there's just nothing better out there to explore some data - investigate APIs; sort, group, dice and slice any kind of data - CSVs, JSON, etc. Nothing else simply can match the joy how one could incrementally build up complex data transformations, it makes it incredibly productive for the "let me just quickly check this shit" scenarios that can easily turn into full analyses. REPL-driven nature of it makes it so much fun - you feel like you're playing a videogame. I honestly wish every programmer knew at least some Clojure. I lost count of how many times I gave up on figuring out complex jq syntax and reached for Clojure instead. Or the times I'd quickly build a simple Playwright script for reproducible web-app bug trapping or quick data scraping that saved me hours of frustration and manual clicking.
- aeonik 1y agoThere's also Fennel -> Lua Jank -> C++
- Jtsummers 1y agoConsidering the vast majority of languages don't use s-exprs, possibly. There aren't many hardcore lispers who refuse to use anything but s-exprs.
- danman114 1y agoHi! I recently tried to get into Elixir as an antidote to an acute javascript-fatigue... To my surprise this there isn't really a good mobile story to build mobile apps for both Android and iOS with it, although it looks like it could be a great option for quick turnaround mobile apps with a web- or native frontend... I know that there is something being worked on, eg. LiveView native: https://native.live/ https://native.live/ , but that seems to target two entirely different frontend frameworks, one for each platform... I started using capacitor as a wrapper for a HTML frontend, but I think I might potentially run into trouble when I'd try to move into production builds... I think there's some space for research and maybe some nice starter packs / tutorials there... Because I think it is a big and pretty relevant market for browser-based apps, which Elixir seems to be very well suited to! I'm grateful for any additional pointers, peace out! :)
- andrewflnr 1y agoUh, yeah, it's primarily a backend language, with any frontend stuff being either a thin layer or experimental, AFAICT. OTOH, doing a more traditional backend-heavy web app might be just the thing for JS fatigue. :)
- hinkley 1y agoThe continued lack of DOM access from wasm is keeping a lot of potential programming languages out of this space.
- jabwd 1y agoThis language and its upsides (that come from the VM) really are not for application development in this manner. I'm sure you can make it work somehow but its like using a tank to get groceries. Reliability, scalability, aren't concepts relevant to apps on mobile phones. If an app crashes to the homescreen thats fine, if your entire service goes down that's another. Would be fun if someone could prove me super wrong here but if you want to learn Erlang/Elixir/Gleam or anything BEAM I'd pick a backend project.
- KevinMS 1y agoSome don't use it because the performance on anything other than IO is just bad. This isn't just because its "not compiled", but because it has a scheduler taking up cycles and it enforces immutability, when can be brutal for some tasks when mutability can really speed things up.
- cess11 1y agoIn some cases it might be worth the effort to extract such performance hotspots out of the BEAM and access them over port, NIF or socket. I'm not a fan of FFI stuff because I'm a simpleton, but have had an easy time incorporating both Python and Java in Elixir systems.
- matthewsinclair 1y agoPrevious discussion: https://news.ycombinator.com/item?id=44495879 https://news.ycombinator.com/item?id=44495879
- kingofheroes 1y agoI just started learning Elixir recently and I'm honestly loving it. Pattern matching is awesome and how it approaches concurrency and async work was so easy to wrap my head around. Pragmatic Studios has a great tutorial.
- theappsecguy 1y agoBiggest issue is lack of job opportunities with Elixir
- Muromec 1y ago>Why Elixir? Why nobody's hiring for Elixir :(
- hilarycheng 1y ago[dead]
- matthewsinclair 1y agoHere's another Good News Story of Elixir adoption: How Elixir Powers the BBC From PoC to Production at Scale - Ettore Berardi | ElixirConf EU 2025 https://www.youtube.com/watch?v=e99QDd0_C20&ab_channel=CodeSync https://www.youtube.com/watch?v=e99QDd0_C20&ab_channel=CodeS...
- pjmlp 1y agoThanks for sharing.
- pjmlp 1y agoI have never done anything serious with it, because I don't have any use case, it is not a programming language that either our IT, nor customers want running on their servers. Only thing that always gets overseen in language discussions about which one is best, is that most companies pick languages based on ecosystems and products they buy/adopt, not pick a programming language from a catalog and then go looking for problems to solve with that language. Unless of course they are a startup trying to get hold of a new domain, many times creating the need for others to adopt a specific programming language, when their product gains enough market share, thus we are back into how (the other) companies pick programming languages. That is how we end with languages that maybe should never have been mainstream, a lucky product, killer application, market adoption happens, people want to learn the language to get employed, and the adoption circle goes on, thus whatever misconceptions there are matter very little for most programming languages, once they pass the adoption threshold.
- dkdbejwi383 1y agoThere's a real uphill battle for adoption. Can't use it because it's not popular enough and there aren't enough experienced devs. Its not more popular and people don't have that experience because it's not used as much. Half (if not more) of the things my company is working on right now would just not be a thing if we used Elixir. But instead, we're one of millions of companies re-inventing solutions to the same distributed computing problems using Node & AWS in a less optimal and worse-tested way. Such is life.
- pjmlp 1y agoIndeed, and hence why for example while I would rather use Smalltalk, Prolog, Lisp or Standard ML, I have to also contend myself with their influences on programming languages and tools that we are actually allowed to use.
- achempion 1y agoAI generated images makes me think that an article was also generated with AI
- pkos98 1y agoI've been writing Elixir on-and-off since 2017 for personal projects and since 2024 professionally, at a big tech company. The two experiences couldn't be more different. While I loved the great development speed for my personal projects, where I am writing more code than reading it, joining an existing project needs the opposite, reading more code than writing it. And I can only repeat what many people say, dynamic typing makes this so much more difficult. For most code changes, I am not 100% certain which code paths are affected without digging a lot through the code base. I've introduced bugs which would have been caught with static typing. So in my conclusion, I'm bullish on gleam, but also on other (static) languages embracing the cooperative green-thread/actor model of concurrency like Kotlin (with JVM's virtual threads). (On another note, I personally also dislike Phoenix LiveView and the general tendency of focusing on ambiguous concepts like Phoenix Context's and other Domain Driven Design stuff)
- phplovesong 1y agoThis is why Gleam exists.
- SwiftyBug 1y agoAlso, Gleam fully supports Elixir packages.
- fteem 1y agoI am now super curious which big tech company is betting on Elixir?
- SwiftyBug 1y agoNubank, Latin America's most valuable bank, relies heavily on Elixir and even acquired Plataformatec, the company where Elixir was created. A blog post by them about this: https://building.nubank.com/tech-perspectives-behind-nubanks-first-acquisition-deal/ https://building.nubank.com/tech-perspectives-behind-nubanks...
- 1y ago
- phtrivier 1y agoI second the "9. What You Don’t Need to Worry About with Elixir" ; and indeed I would advice to _ignore_ some things that look like standards (kubenertes, docker, etc...) and embrace BEAM / OLTP / hot reloading, etc... I've seen a world where we tried to ship an elixir app "as if it was a go microservice" - it does not work, does not help, and you loose a lot. Also, I wish the author had addressed the static typing. This was my biggest pet peeve when working on a non trivial app for 5 years (Mistakes were made because actors are not familiar, and fixing those mistakes was hard because of a lack of static typing.) I wonder how the situation has changed lately with the introduction of _some_ type checking.
- veidelis 1y agoI don't find Elixir appealing for various reasons personally. But on a related note, I'm willing to bet on Gleam big time.
- rjh29 1y agoCould you have at least rewritten some of the obvious AI stuff? "it's not X - it's Y" appears about five times in the first minute of reading, at which point I gave up (after all, I could just ask ChatGPT to generate the article myself)
- hannesfur 1y agoI agree with most commenters that Gleam seems like the thing that’s going to solve a lot of the big problems I have with Elixir. I didn’t read a lot about Nx and EXLA in the comments, so I thought I’d share my view: In my opinion, that’s not a strong argument for Elixir, because pretty much every language has libraries like this. Rust, famously, never stops inventing these libraries (https://arewelearningyet.com/ https://arewelearningyet.com/), and to illustrate my point, here are some libraries for niche(-ish) languages: • Crystal (https://github.com/NeuraLegion/shainet https://github.com/NeuraLegion/shainet) • Haskell (https://hackage.haskell.org/package/neural https://hackage.haskell.org/package/neural) • Ruby (https://github.com/unagiootoro/ruby-dnn https://github.com/unagiootoro/ruby-dnn) • and many more… They might be suitable for researchers or projects building networks from scratch, but this is already difficult with a library that plays along. For most people, it’s about fine-tuning, combining, and doing inference on existing models (and weights). People like to criticize PyTorch, but in fairness, with it I can do useful things with recent models (which matters at the speed of things) pretty much the day they have their open source release (thanks to the transformers library). There exists an equivalent to transformers for Elixir (https://github.com/elixir-nx/bumblebee https://github.com/elixir-nx/bumblebee), but it doesn’t support the top 10 trending models on HuggingFace, which is a problem if you want to use them. Qwen 3, for instance, arguably the most useful open source model family at the moment, isn’t supported at all. And this is the issue all of these libraries face: they are not useful for the majority of people needing libraries like this out there. Also, PyTorch is really well optimized, and there is a good reason that vLLM (yes, it’s not the fastest but pretty fast, supports almost everything, and is the de facto standard for open source LLM inference) is written in Python and PyTorch. Things like Flash Attention 2 are crucial for LLM inference and still hard to find. Yes, OpenXLA is technically very sophisticated, but I never got it working every time I wanted to use it, and JAX seems more comfortable if you want to use TPUs. It’s still a very strange development that Python runs the AI revolution. Multi-node training might be a lot of fun with Elixir, but here performance (especially making sure the CPU is not stalling the GPU) is vital, which might make BEAM not an ideal choice. There is hope though. Recently there have been some interesting developments in the Rust world (https://luminalai.com https://luminalai.com), and of course no HN comment about training and inference is complete without mentioning TinyGrad. But Elixir simply doesn’t make sense to me (for neural networks). I’m sorry.
- travisgriggs 1y agoI really like Elixir. We’re a small team of a few. We work with series of timespans a lot in our domain (ag tech irrigation automation), and I needed to write an algorithm that creates the time based “diff” comparison between two or more span series. I’ve written this code a few times already in Swift (iOS app), Kotlin (Android app), and Python (firmware). Loop based and tricky around the edge cases. Doing it in Elixir with pattern based recursion was a pure joy. Every single test past the first time I ran it. I don’t love the Elixir syntax (it’s noise to signal ratio isn’t as good as say, Python); I don’t love the lack of a good IDE experience that really leverages Elixirs model. But I do love the mental computation model of Elixir, and the very simple set of rules, vs some of the other languages I have to work in.
- WhitneyLand 1y agoI’m skeptical of this claim, where is he getting it from? “Elixir’s foundations in functional programming…make it easier for large language models to reason about, generate, and test code. LLMs struggle with imperative codebases full of side effects, hidden state, and indirection…” It seems a larger factor in LLM performance on a given language is the amount of code available to train on.
- pmarreck 1y agoI've found (specifically using Idris 2, but any functional language with some typing should work) LLM's to write better code in these restrictive languages simply because there are significantly fewer ways to screw up that are possible without causing an error upfront. In fact, I would even go so far as to say that LLM code assistance may cause a boost in interest in those languages.
- WhitneyLand 1y agoIf you structure your prompt around small, stateless functions with explicit inputs/output, answers may look cleaner, but that advantage is not at the language level. You can do the same in TypeScript et al and get the same results. I don’t doubt that anecdotally you’ve had favorable results. However, I’m not aware of any research that backs up this claim. Or forget research - I’m not aware of any simple examples / prompts that would show it in a reproducible way across different LLMs. Corpus size tends to dominate performance.
- pmarreck 1y ago> I’m not aware of any research that backs up this claim These things are literally days old. Claude 4, which is arguably the first truly useful LLM code assistant, released in May. Scientific research proceeds at a glacial pace. I'm just speaking from anecdotal experience. It may be a perceptual illusion, or it may be a real thing. Just my data point. One could deduce that restrictive languages would naturally result in fewer runtime bugs produced by LLM's since they do the exact same thing for people. For example, Elm is literally designed to produce NO runtime errors, so coding Elm in an LLM (which I haven't done) would ostensibly result in almost all errors being caught upfront. This is not to say that other types of logic errors, redundancy, etc. wouldn't slip through without human intervention.
- gabrielpoca118 1y agoI’ve been working with Elixir professionally for the past 7 or 8 years, and I have to say, phoenix and are great, but it’s the repl I miss the most when I’m building in other languages. The ability to interact with a system, ask questions, try code, is crucial when I’m debugging
- akaike 1y agoAm I missing something or is there isn’t even an official LSP available for Elixir? For me, that looks like a red flag. From what I see, DX in VSCode is barebones.
- bdunks 1y agoIt’s available as a VSCode extension and documented here: https://elixir-lsp.github.io/elixir-ls/ https://elixir-lsp.github.io/elixir-ls/