7 ms·
LLMs and Elixir: Windfall or deathblow?
- fernmyth 1y agoWindfall, for those who want it. LLMs were fantastic for writing a project[0] in a new, niche language[1]. They help write any missing libraries. They help iterate when I get stuck on language aspects. They explain concepts as well as the median SO post, and much better than the posts that don't exist. [0] https://github.com/TedSinger/chatfile/ https://github.com/TedSinger/chatfile/ [1] https://crystal-lang.org/ https://crystal-lang.org/ - quite pleasant
- 3by7 1y agoCrystal is great! Which LLMs were used in that project? In my short and not very recent experience the LLM frequently mixed up Crystal and Ruby in the code they write.
- fernmyth 1y agoCursor with defaults, I guess mostly `cursor-small`. Typically I write and adjust function names or signatures and let tab-complete draft the code and propagate refactors. It does mix up Crystal and Ruby, but the compiler catches it.
- 3by7 1y agoThat matches my experience, so I guess it may be a decent experience for someone new to the language and a bit more frustrating for someone more experienced on it (like me).
- sitkack 1y agoYou should keep a log of all the failures and then have an LLM form a patch-doc that fixes the Crystal codegen behavior in context. Your failure rate will go way way down.
- ipnon 1y agoIt's a windfall. Having written the same project in Phoenix and FastAPI/Expo, I assumed LLMs would be better at writing Python and React. But the amount of boilerplate and opportunities for harmful side effects in the code means I quickly generate large amounts of code that I then need to go back and manually grok to align my understanding. With Elixir this loop is much smaller. I generate a small amount of code, check for validity (much easier to verify in a functional language), and repeat this loop. Until we get superhuman autonomous coding agents the human in the loop grokking the generated code is still the limiting factor. LLMs are marginally better at generating mainstream languages than Elixir, but the generated Elixir code is much easier to understand and modify, and because of the runtime, will practically never crash your system.
- belter 1y ago>> and because of the runtime, will practically never crash your system. "Practically never crash" ignores software bugs, resource exhaustion, or bad architecture
- borromakot 1y agoHave you written/deployed Elixir before?
- belter 1y agoHave you deployed critical systems where human lives depend on? "BEAM crashes with segmentation fault #7683" - https://github.com/erlang/otp/issues/7683 https://github.com/erlang/otp/issues/7683 You dont use NIFs ? "A native function that crashes will crash the whole VM." - https://www.erlang.org/doc/apps/erts/erl_nif.html https://www.erlang.org/doc/apps/erts/erl_nif.html "Who Supervises The Supervisors?" - https://learnyousomeerlang.com/supervisors https://learnyousomeerlang.com/supervisors
- borromakot 1y ago1. Yes 2. You didn't answer my question? Your answer ""Practically never crash" ignores software bugs, resource exhaustion, or bad architecture" indicates I think ignorance of actually deploying BEAM applications, and instead just making statements based on things you've heard. Isolating failures in software systems is not a bad thing. The developer can choose the boundaries between the elements of their system up to and including "stopping the entire application if things go wrong".
- jaza 1y agoMy conclusion from this is: ChatGPT is the new Google, so LLM hints is the new SEO.
- photonthug 1y agoYep. Tfa mentions elixir being below the suggestions to rewrite a web app in rust and golang (??). The conclusion here should be that the LLM cannot be trusted that much, but we know that’s not going to happen, so anyone who wants to remain relevant must start playing games and damn the consequences. Now instead of improving the language in other ways there will be distracting constant pressure to appease the machine. Now call this added “efficiency” with AI, similar to how adtech calls hiring your own director of marketing and paying tons of people who actually work for google with money from your own company coffers “5:1 ROI on advertising investment“.
- sph 1y agoMy takeaway from these articles instead is that vibe coders and Copilot jockeys are just people in SWE that don't like the craft, so instead of doing the work themselves, are learning how to communicate the requirements effectively with a low-IQ code monkey. They have turned themselves into micro-managers of an idiot savant.
- bubblyworld 1y agoThere's a time for craft, and a time for other approaches. It all depends on the problem, I this is a bit of a false dichotomy.
- HappMacDonald 1y agoToday they are low-IQ code monkeys. Yesterday they were low-IQ writers of grade-school essays. So what will they be tomorrow? At minimum, still low-IQ code monkeys. Especially since AI research has come in fits and starts and stalls for many decades now. But a weakly monotonic process rarely remains plateaued for very long, now does it? It only has one direction to respond to any changes in the environment after all. Tomorrow's models will either be the same or they will be smarter. How much smarter do they need to get for that "low-" prefix to go away then?
- bad_haircut72 1y agoWith tidewave the LLM has access to iex, it can do its own repl loop debugging and investigations, its awesome - Elixir will thrive in the age of LLMs
- mkesper 1y agoGood article as it gives advice on what to do proactively as a community to assure your relevance in these LLM times. The steps taken of small, compressed 'LLM docs' make me think of ideas of the semantic web. That one never gained traction but as search more and more gets replaced by AI (even by enterprises formerly primarily identified with search) strategies like this become more and more relevant.
- tobyhinloopen 1y agoIve seen some new tools use “docs for LLMs”, maybe Elixir / Phoenix can provide these if they haven’t already. Functional programming works great on LLMs because there’s no hidden side effects. I let my LLM tools write functional style NodeJS but that’s only because Node is easiest to test with.
- deleted 1y ago[deleted]
- te_chris 1y agoClaude is reasonably good at Elixir in my experience, but gets a bit carried away with logging. Gemini is quite shit. o3 is pretty great - but I mostly use it to review things when I get stuck with claude. It definitely feels like Gemini has been fine-tuned to ace the react benchmarks.
- peteforde 1y agoIf you're worried about people who literally have no opinion or preference about the tech stack they use taking your job... actually, I don't have anything witty to say beyond those people are not going to take your job. Those people will go back to selling real estate or whatever it was they were doing before someone convinced them to take a nine week bootcamp.
- deleted 1y ago[deleted]
- badsectoracula 1y ago> any library can include a usage-rules.md file - essentially very terse documentation designed specifically for LLM context windows, explaining what to and what not to do when using the library. This is useful for humans too, though personally i hope we go away with context window limitations in the future - perhaps context windows could be something like 'CPU registers' that the CPU likes to work with internally but there will also be an external "large" memory that LLMs can access and work with.
- rickcarlino 1y agoHaving used Elixir for multiple years on something other than a server application, I disagree with calling Elixir a general purpose programming language. It’s really good for writing servers, I’ll give it that, but for stuff that isn’t an always-on network application, I felt the OTP way of doing things was designed for something I wasn’t building. Elixir makes it very easy to build servers, but the language and community are very biased towards client/server use cases. It certainly can be used for things other than server, much like I could build a web app using QBasic or Excel. The focus of the language, its history and the community around Elixir has always been server apps. To me, that’s the biggest indicator that it’s a specialized language rather than a general purpose language.
- borromakot 1y agoIt having strengths and weaknesses doesn't make it not general purpose language.
- drekipus 1y agoIn your mind, what distinguishes a language as "general" or "specific" purpose? I'd argue the community and focus of the language.
- rickcarlino 1y agoOr, to your point, the historic design considerations that led to the creation of the language in the first place. In the case of BEAM, it was very specific.
- borromakot 1y agoWhat I mean is that, you can write CLIs in Elixir. I have. You can write games in Elixir (others have, I haven't). They come with pros & cons. The Elixir community advances on many of those fronts regularly. I could write a web application in C, but I wouldn't.
- Capricorn2481 1y ago
- CompoundEyes 1y agoTried Pheonix framework / Elixir in Cursor out of curiosity last weekend and it was the best experience I’ve had so far with agentic coding. I don’t know either yet — purely an experiment. My instructions doc required TDD, a feature list, had links to pheonix/elixir/tailwind/postgres doc and sonnet 4 did a great job utilizing pheonix cli which reduces a lot of boilerplate generation. Proved changes worked with tests at each iteration. The key thing was it didn’t lose its bearings as the project got more complex. Other web app frameworks I’m familiar with invariably get lost adding npm packages left and right, fiddling with config files and wrapped in an “extension cord” needing rescuing. I think there is something to so many node world version changes and approaches in framework implementation in training data that pollute the decision making. Also I realized watching sonnet construct the project was actually a really compelling way of learning a new framework/language to me. I can stop and ask “why are you doing this? how does that work?’ and inspect the code. Made me interested in learning more about elixir.
- ricw 1y agoI've been using elixir / phoenix / liveview for a year now, basically since LLM coding has been a thing and it's been transformative. The usual "getting started" problems were so diminished that i feel like i hardly missed a beat. The usual "this won't compile / how do i do this in a new unknown language" issues that previously could have taken hours to resolve were basically gone. My LLM pair programmer just took care of it. Coming from python / django / cue, it's a breath of fresh air. It's so much easier as all the paradigms come built in with the stack (async workers, etc). The elixir / erlang library is surprisingly complete. With regards to producing code, it seems to be doing very well. The most impressive thing it did for me was a PDF OCR from scratch using google cloud. All i had to do was plug in my credentials, hook up the code and it just worked. Magic. Highly recommended.
- 2d8a875f-39a2-4 1y agoWe will start to see the emergence of frameworks and libraries (and languages?) that are optimised for LLM coding rather than human coding. Maybe - overly verbose and repetitive, but easy to generate correctly and very flexible? Or maybe super obscure syntax that allows an LLM to output much more information per token emitted? At lot of current paradigms are about things like abstraction and DRY that matter to humans creating and maintaining a code base. An agent driving some LLMs will have other priorities.
- roxolotl 1y agoIt’s already easy to generate such things without LLMs. Gleam, another BEAM language, is intentionally very simple and can tend towards the verbose however because of strict typing the lsp has code actions that’ll generate most of that verbose code for you in a way that’s provably correct, instant, and doesn’t require a network connection. Maybe a gleam specific agent could utilize those code actions?
- the_duke 1y agoI have been arguing for a while that very strict languages with a heavy type system are ideal for agent coding. The stricter the language, the harder it is for the LLM to produce nonsense, at least if it can get compilation errors and run tests. And the easier it is to validate that the output is correct, because the types already tell a lot of the story. A language with dependent types, linear types, etc... would be ideal, but alas... At the moment Rust is the sweet spot. Fairly popular (and hence known to LLMs and with a fairly good ecosystem), great error messages to guide resolution of problems, stricter type system and more compile-time guarantess than almost all of the other semi-popular languages... Now Rust isn't trivial to write, for both humans and LLMs, and the output was pretty bad for a long time. But with the ability to run `cargo check` and execute tests, even the current first iteration of agents is really quite good at iterating until it gets a working result.
- nileshtrivedi 1y agoTypes only go far. Most of the semantics of a function's behavior is in its name, documentation and tests. I think it is time to invent a unifying framework for Types, Tests and Evals: https://nilesh.trivedi.link/thoughts/we-need-a-formal-theory-of-agent-evals https://nilesh.trivedi.link/thoughts/we-need-a-formal-theory...
- aptj 1y agoVery good article with actionable ideas and suggestions. Thanks for writing and sharing! Another problem that Elixir community must address is to make it super-easy ("one-click") to deploy to hosting of choice (own VPS or cloud) with most things working auto-magically (configured): app, DB, admin-panel, observability (app, server, db), backups/restore, domain, emails (admin, transactional), even maybe CDN/caching and perhaps some integrations (payments, uptime, alerts, etc.) Make it a no-brainer as much as possible, otherwise it's a choice to buy (and fight with) a ready SaaS-in-a-box solutions, or go with FREE: Astro+CF_Workers+Neon+any_JS_payment_and_email_packages vibe-coding today! ... PS: Minor edits, love Elixir!
- jshprentz 1y agoIn his ElixirConf EU 2025 presentation [1], Chris McCord demonstrated Phoenix.new [2], an LLM-augmented VS Code in a browser that knows how to build Elixir/Phoenix apps. McCord began by reviewing the current scripted and templated Phoenix code generator. He then showed how a tool-invoking LLM agent could be implemented in one screen of Elixir code. The bulk of his talk demonstrated generating apps with the Phoenix.new tool. It was interesting to see the tool generate development plan and begin coding to implement the plan. I was fascinated to hear McCord explain and critique the LLM agent as it generated a Phoenix app. "[It's] going to come up with a plan for our app and codify that into a Markdown file." "Now it's going to take our high-level plan and make it into an expanded plan for us and itself." "You can say, 'I changed the plan; execute the plan.'" "We just recursed in the server and we did a req post. It's doing a req post right now and the tokens are coming back!" "The agent just invoked a tool, which is 'I'm going to create a file.'" "Hopefully it does a 'surgical modify tool,' which makes it not have to modify the whole file." "A run-time error! Oh, no! Live coding is terrible. Oh, wait. It knows I need to add some missing functions here." "You would be like, 'Oh, no, the page broke. What happened? I'm going to look at this error.' We just send that thing back to the chat completions endpoint and magic comes out and fixes the error." "It didn't change a web file. We should fix that." "This is an issue that humans hit; Steff and I need to fix that." "It added the input at the bottom. That's not ideal." "The agent decided to idle here. ... The way I implemented this is everything the agent responds with is a tool call and it has an idle tool and that's what it invokes when it is done." [1] https://www.youtube.com/watch?v=ojL_VHc4gLk https://www.youtube.com/watch?v=ojL_VHc4gLk [2] https://phoenix.new/ https://phoenix.new/
- duffyjp 1y agoI wonder if the phoenix.new website was built with phoenix.new... This site can’t be reached The connection was reset.
- itbeho 1y agoIt's hosted on fly.io... :)
- chrismccord 1y ago
- rhgraysonii 1y agoI have been using LLMs to write Elixir full time at work for months now. AMA, if anyone is interested. I sometimes have different thoughts of approach than Zach, but this post really resonates with me. I've been in Elixir full time for over 10 years and would love to see an evolution in its adoption fueled by this.
- andruby 1y agoI'm curious what your setup looks like. Do you use an IDE like Cursor or Windsurf, an editor like Zed or more directly an agent like Claude Code? Have you used tidewave.ai? The demo from Jose looks fun, but I've yet to play with it. What use-cases have LLMs shined in for you? I've really enjoyed using it to reduce the learning curve, eg to use Svelte and LiveSvelte on a small side-project. (I've been using Rails for 20 years, Erlang & Elixir for ~10, but spend more time on the product side nowadays.)
- pdimitar 1y agoLLMs greatly reduced my annoyance in learning various plumbing details in Phoenix (dead views), LiveView and Ash. What would be days or weeks of impatient unpacking of long tutorials and guides has shrunk to days, in rarer occasions days.
- rhgraysonii 1y ago> Do you use an IDE like Cursor or Windsurf, an editor like Zed or more directly an agent like Claude Code? At work, we use both Windsurf and Cursor. At home, I also use Claude Code. > Have you used tidewave.ai? My coworkers have and are impressed, I can't speak to it. > What use-cases have LLMs shined in for you? Well, I managed to literally have it do all my work for 3 weeks. I didn't write a single line of code. That was pretty cool. I didn't even cherry-pick work best for the LLM. It was my normal flow. I also use Claude code as an interactive tutor. I will have it implement something, break it into logical commits, then in each one break a few pieces and write tests for them and have me learn by fixing the broken tests.
- guywithahat 1y ago> If LLMs turn out to be a fad and you’re reading this after they jump the shark, please accept this article as a historical artifact from a time when we entertained the idea that fancy autocomplete might eat the world. > Aside, for those who don’t know what Elixir is: it’s the best general purpose language in the world and if you haven’t heard of it wake up and smell the bacon. I find a certain humor in this, as elixir is more likely to be a fad than LLM's. I like and use elixir, but their lightweight processes are too restrictive for a lot of use cases. It's great for scaling web apps, however, and I think it's worth recommending over nodejs or other javascript based backends for a lot of people.
- Capricorn2481 1y ago> I find a certain humor in this, as elixir is more likely to be a fad than LLM's. I like and use elixir, but their lightweight processes are too restrictive for a lot of use cases I'm not an Elixir user, but you're criticizing Erlang/OTP, which has been around way too long to be considered a "fad".
- guywithahat 1y agoI guess I mean "beam for everything" is a fad. It has a place, and is exceptional at some things, but it's relatively specialized
- sodapopcan 1y ago> I guess I mean "beam for everything" is a fad. There is no such fad. The vast majority of seasoned BEAMists will tell you that it is not for everything. There are enthusiasts bringing some surprising stuff to it which is great as it mostly falls into the category of "useful for things users are already outsourcing to other languages." But there is a whole host of things it will just never be able to do and no is pretending that it will.
- hibbitybibbity 1y agoElixir/Erlang is best for building long-running systems that you don't want to go down. Erlang's creators optimized for stability (phone systems) and sort of reinvented concurrency and distribution in support of that goal. There are some great talks by Joe Armstrong about this on YouTube, highly recommend! For CPU-bound tasks and number crunching you can always just write it in Rust (or C or Zig) and NIF out to it from Elixir. As a dev who builds apps that are served over the internet, it covers everything I need. Maybe that's a specialty niche.
- miki123211 1y agoI think the core insight of this article, and it's something I haven't thought about before in this way, is that any successful programming language needs to "market itself" to LLMs and LLM developers. We had the "first wave" of languages that were marketed to decision makers (Java), the second wave that was marketed to developers (Ruby on Rails, Rust), I think a third wave is coming, where the language will be designed to be LLM friendly from the ground up.
- morkalork 1y agoIf you wanted to go all in, you'd want a language that is denser so you get more efficiency out of tokens. Since it's being used by LLMs, readability by humans can take a back seat. Obviously the answer is: Perl. But seriously though, a high-level language designed for LLMs would be interesting, maybe with a translation layer to something more developer friendly on top.
- borromakot 1y agoHigh information density is good for LLMs. https://ash-hq.org https://ash-hq.org benefits from this, but hurts due to being fairly new. https://hexdocs.pm/usage_rules https://hexdocs.pm/usage_rules is helping.
- jimbokun 1y ago> If you wanted to go all in, you'd want a language that is denser so you get more efficiency out of tokens. That's Lisp because nothing compresses the number of tokens you have to write more than Lisp Macros.
- reddit_clone 1y agoAPL is the densest language I have come across. There may not be enough code out there for LLMs to pick it up though.
- inerte 1y agoI was looking for a programming language that's being written with LLMs in mind, and used ChatGPT to give me some pointers so I can start some research https://chatgpt.com/share/6841d3b7-13a8-800f-9bcc-0f7859114c85 https://chatgpt.com/share/6841d3b7-13a8-800f-9bcc-0f7859114c... In my mind (I am a non-academic that never really designed a new programming language), I can imagine strong typing, terseness, and no optional syntax (you can do this multiple ways) would be really cool for LLMs. I did come across a few languages / people trying to design programming languages to be used with LLMs / AI Agents, and I think the most promising thing I found is https://www.moonbitlang.com/blog/moonbit-ai https://www.moonbitlang.com/blog/moonbit-ai - which takes the whole idea of working with LLMs to another level, with actual features designed to work with agents (not only syntax).
- insane_dreamer 1y agoThe bias towards frameworks and languages for which there is most abundant code is not only real, but self-reinforcing. As "vibe coding" (I hate that term) devs crank out AI-generated code and make it available to be trained on, LLMs will see more of that code and therefore be more likely to recommend those same code pathways. This also makes it much more difficult for new, better, and innovative ideas to break through the noise floor.
- bwilli123 1y agoA point made by Theo- t3․gg in the following. 'React is the last framework.' https://www.youtube.com/watch?v=P1FLEnKZTAE https://www.youtube.com/watch?v=P1FLEnKZTAE
- mhanberg 1y agobeep boop
- sergiotapia 1y agoElixir and Phoenix is my tech stack of choice for many years, nearly a decade now. The two thorns that remain: 1. The Phoenix Form <> changeset story is still quite tricky, even to me. It's very 'yappy'. 2. Elixir not having types hurts when a project grows. Even typespecs help very little. I wish we had proper types and let the computer flag stuff.
- tortilla 1y agoSame. My tech stack now is: Phoenix, Elixir, Inertia.js, and React. I started calling it the PIER stack. lol. I prefer React to LiveView.
- sergiotapia 1y agoI just went back to rails 8 for this one. Vibe coding easily and it feels like an SPA out of the box.
- te_chris 1y agoSame here. I’ve just setup vite, inertia and react with shadcn so we can vibe code our admin. Works incredibly well
- cdelsolar 1y agoWhy did you "scroll past" the Go solutions? Types, man, types. Elixir has no types. Ergo, I can't use it.
- dragonwriter 1y ago> Types, man, types. Elixir has no types. Elixir (and BEAM more generally) has Dialyzer, which does static analysis including (but not limited to) type checking.
- te_chris 1y agoAlso the language is strongly typed and has a compiler which they’re adding more compile-time type checks to.
- mtndew4brkfst 1y agoDialyzer is easy to intentionally or accidentally mislead, so it's only as good as the quality of human-authored typespecs (which are sometimes absent from major mainstream Hex packages) and the inference is simultaneously more open-ended and unhelpfully precise than most people are accustomed to if they have prior experience with something like Rust or TypeScript. People also frequently struggle to accurately interpret its output. I still find dialyzer to have non-zero value, but it's not uncontroversial and it's not usefully integrated with the vanilla language tooling. Mix/elixirc is not generally going to throw you a bone if you violated a syntax-correct type spec. It's an opt-in secondary tool and that diminishes its utility a tad.
- pton_xd 1y ago> Elixir has no types. Elixir is strongly typed. I think you mean it is not statically typed.
- mtndew4brkfst 1y agoMaking this point in typed vs untyped debates about Elixir/Erlang specifically has never once lead to either an educational moment or a change of opinion on either side. You know exactly what they meant by that, and you're using a different definition than they are to try to pull a pedantic gotcha. It's snide and unproductive.
- djaouen 1y agoAs usual, AI is more reasonable than the humans utilizing it (see: Claude's comment on the blog post vs. human comments here on HN). Lol
- Dowwie 1y agoThe Claude models are so far ahead of the pack right now with Elixir and Erlang capabilities, comparing with o3, gemini2.5, grok3-think, and ds-r1. Elixir is so good for workflows and pipelines, utilizing all available hardware resources. It makes sense why Elixir will be used more going forward for agentic workflows, but the greenfield engineers/architects are rushing to market with Python and here we are.
- artem2471 1y agoMy experience, even though rather limited, tells me that llm’s work well with languages like Elm and Rust, with powerful static analysis and great compiler ux.
- jtbayly 1y agoIt turns out that I don’t know Elixir at all, but I’m vibe coding an app in it. I didn’t ask what language or framework to use. I “heard of Elixir on a blog post, or they saw this article topping the hacker news charts.” I even asked an LLM what else I should consider besides Phoenix, but after considering, I stuck with it. Gemini gets stuck sometimes, but I just ask ChatGPT to help and bust through. It kind of reminds me of when I wrote code and couldn’t easily see the errors. Another pair of eyes can really help. Another LLM that didn’t write the code can really help, too.
- aczerepinski 1y agoI've been using Elixir with Gemini for the past couple days, and the LLM is less successful than it has been with other languages I use. It gets stuck sometimes - for example it couldn't figure out how to use a JWT encoding/decoding library so I needed to intervene. Have I already gotten this spoiled by uncanny performance with Go/Ruby and especially JS/TS?
- debian3 1y agoGemini is not great in Elixir, Sonnet is the best by far.
- aczerepinski 1y agoThanks for that suggestion - looks like you're right.
- l2dy 1y agoGitHub Copilot's Sonnet 4 is not great in Elixir either, but I'm not sure if it's because of Copilot or Sonnet.
- 1oooqooq 1y agothe lengths people will do to not read the manual.