Remix.run Logo
dnautics 5 hours ago

It's 2026 and the LLMs score high on elixir, just write it in python and patch it over to elixir gradually

Towaway69 5 hours ago | parent [-]

Or patch it over to python, I assume LLMs are even better at python.

dnautics 5 hours ago | parent [-]

Don't assume. Empirically, they are not. (This post Feb 2026 may change in future yadda yadda)

See: autocodebench

https://github.com/Tencent-Hunyuan/AutoCodeBenchmark/tree/ma...

Towaway69 5 hours ago | parent [-]

Reading that made me think how much that might be related to Elixir being very similar in syntax to Ruby. Do LLMs really differentiate between the two?

Specific studies, as the one quoted, are a long way from original real world problems.

ricketycricket 4 hours ago | parent | next [-]

Here are some thoughts on it from José Valim: https://dashbit.co/blog/why-elixir-best-language-for-ai

LLMs absolutely understand and write good Elixir. I've done complex OTP and distributed work in tandem with Sonnet/Opus and they understand it well and happily keep up. All the Elixir constructs distinct from ruby are well applied: pipes, multiple function clauses, pattern matching, etc.

I can say that anecdotally, CC/Codex are significantly more accurate and faster working with our 250K lines of Elixir than our 25K lines of JS (though not typescript).

d4mi3n 3 hours ago | parent [-]

I suspect this is partly due to the quality of documentation for Elixir, Erlang, and BEAM. The OTP documentation has been around for a long time and has been excellently written. Erlang/Elixer doc gen outputs function signatures, arity, and both Elixir and Erlang handle concepts like function overloading in very explicit, well-defined ways.

bnchrch 3 hours ago | parent [-]

Thats a large reason for sure!

I'd layer in a few more

* Largely stable and unchanged language through out its whole existance

* Authorship is largely senior engineers so the code you train on is high quality

* Relatively low number of abstractions in comparisson to other languages. Meaning there's less ways to do one thing.

* Functional Programming style pushes down hidden state, which lowers the complexity when understanding how a slice of a system works, and the likelyhood you introduce a bug

dnautics 3 hours ago | parent | prev | next [-]

Here are my thoughts:

https://m.youtube.com/watch?v=YZa5GqrZeao

OkayPhysicist 4 hours ago | parent | prev | next [-]

I suspect the biggest advantage Elixir has is the relative quality of the publicly available code. Approximately no one has Elixir as their first programming language, which keeps a lot of the absolute trash-tier code that we all make when first learning to program out of the training set. If you look at languages that are often people's first (Python, JavaScript, Java), only Java has an above average score. Of those three, Java's significantly more likely to be taught in a structured learning environment, compared to kids winging it with the other two.

(And Elixir's relationship to Ruby is pretty overstated, IMO. There's definitely inspiration, but the OO-FP jump is a makes the differences pretty extreme)

Towaway69 4 hours ago | parent [-]

Agree with the quality level but there are other languages where that is also the case: Erlang for example is probably one of those languages.

> Elixir's relationship to Ruby is pretty overstated

Perhaps I am actually am over thinking this. Elixir has probably diverged enough from Ruby (e.g. defmodule, pipe operators, :atom syntax) for LLMs to notice the difference between the two. But it does open the question, though, how does an LLM actually recognise the difference in code blocks in its training data.

There are probably many more programming languages where similarities exist.

ch4s3 4 hours ago | parent | prev [-]

Having written a lot of both languages, I'd be surprised if LLMs don't get tripped up on some of Ruby's semantics and weird stuff people do with monkey patching. I also find Ruby library documentation to be on average pretty poor.

Towaway69 4 hours ago | parent [-]

> I also find Ruby library documentation to be on average pretty poor.

That surprises me :)

From my time doing Ruby (admittedly a few years back), I found libraries were very well documented and tested. But put into context of then (not now), documentation and testing weren't that popular amongst other programming languages. Ruby was definitely one of the drivers for the general adaption of TDD principles, for example.

ch4s3 3 hours ago | parent [-]

I think they're often very well tested, but the documentation piece has always been lacking compared to Elixir.

I used to frequently find myself reading the source code of popular libraries or prying into them at runtime. There's also no central place or format for documentation in ruby. Yes rubydoc.info exists, but it's sort of an afterthought. Sidekiq uses a github wiki, Nokogiri has a dedicated site, Rails has a dedicated site, Ruby itself has yet another site. Some use RDoc, some don't. Or look at Devise https://rubydoc.info/github/heartcombo/devise/main/frames, there's simply nothing documented for most of the classes, and good luck finding in the docs where `before_action :authenticate_user!` comes from.