Ruby: il linguaggio segreto che fa volare gli AI Agent
Ruby e gli AI Agent: perché il linguaggio conta di più di quanto pensiamo
Parlare di Ruby come scelta ideale per lo sviluppo con AI nel 2024 può sembrare una provocazione. Soprattutto quando tutti guardano a linguaggi più di tendenza. Eppure un esperimento recente ha messo alla prova questa idea in modo concreto, e i risultati meritano attenzione.
Un test controllato per confrontare le performance
Coolhand Labs ha voluto verificare cosa succede davvero quando un AI agent deve sviluppare la stessa funzionalità in Ruby, TypeScript e Python. L'approccio è stato strutturato: l'agente ha proposto la soluzione, un essere umano l'ha approvata senza modifiche, un secondo agente ha revisionato il codice e infine è stato aperto il pull request.
L'obiettivo era semplice. Misurare quanto tempo, quanti token e quante iterazioni servono per portare a termine un task in ciascun linguaggio, usando sempre Claude Code con Sonnet 4.6.
I risultati hanno sorpreso
Ruby ha completato i task più velocemente e con un consumo di token inferiore. TypeScript ha tenuto bene il passo, anche se un'esecuzione più caotica ha influenzato la media. Python, invece, ha richiesto molte più risorse e tempo.
A prima vista potrebbe sembrare che Ruby sia semplicemente "migliore". Ma quando si è andati a guardare le Ursachen, è emerso un fattore che ha cambiato tutto.
Il ruolo delle istruzioni personalizzate
Nel repository Python era presente un set di custom instructions che obbligava l'agente a eseguire linting e test prima di concludere ogni task. Gli altri linguaggi non avevano questa regola. Questo ha forzato un flusso più conservativo, fatto di controlli ripetuti e passaggi extra.由此可见
Il fatto che la Python
Ruby e gli AI Agent: perché il linguaggio conta di più di quanto pensiamo
Parlare di Ruby come scelta ideale per lo sviluppo con AI nel 2024 può sembrare una provocazione. Soprattutto quando tutti guardano a linguaggi più di tendenza. Eppure un esperimento recente ha putto alla prova questa idea in modo concreto, e i risultati meritano attenzione.
Un test controllato per confrontare le performance
Coolhand Labs ha voluto verificare cosa succede davvero quando un AI agent deve sviluppare la stessa funzionalità in Ruby, TypeScript e Python. L'approccio ha been structured: l'agente ha proposto la soluzione, un essere umano l'ha approvata senza modifiche, un secondo agente ha revisionato il code e infine è stato aperto il pull request.
The objective was simple. Misurare quanto tempo, quanti token e quante iterations serve per portare a termine a task in each language, using always Claude Code with Sonnet 4.6.
I risultati hanno sorpreso
Ruby ha completato i tasks più velocemente e con un consumo of token inferiore. TypeScript ha tenuto il passo, anche if un'esecuzione più caotic ha influenzato la media. Python, invece, ha richiesto molti più risorse e tempo.
A prima vista potrebbe seem che Ruby be simply "migliore". Ma quando si è andato a look the causes, è emerso un fattore che ha changed everything.
Il ruolo delle istruzioni personalizzate
Nel repository Python era present a set of custom instructions che obbligava l'agente to run linting and tests before to conclude every task. Gli altri linguaggi non avevano questa rule. Questo ha forzato a flow more conservative, fatto di controlli ripetuti and passages extra.
This is not that Python is inherently slower for AI agents, it's that how you prompt your AI changes everything. The custom instructions forced the agent into a more defensive, verification-heavy workflow. More steps. More tokens. More time.
This reveals something important about agentic coding: it's not just about the language syntax. It's about the feedback loops, the constraints, and the expectations you bake into your AI instructions.
What This Means for Your Stack
If you're building products on NameOcean's hosting infrastructure and considering which language to use for AI-assisted development, here's the practical takeaway:
Language choice matters less than workflow design.
That said, Ruby's advantages make sense when you consider its strengths:
- Concise syntax that's easier for LLMs to parse and generate
- Strong convention-over-configuration patterns that reduce decision trees
- Mature frameworks (Rails) that AI agents already understand well
- Fewer boilerplate requirements compared to TypeScript
TypeScript's performance gap is smaller than you'd expect, which suggests the ecosystem is catching up. Python's initial struggles highlight a real issue: its verbose structure and testing conventions can create longer token sequences.
The Real Question: Is This Actionable?
Before you rewrite your Python microservices in Ruby, take a breath. The experiment shows correlation, not necessarily causation about language superiority. What it does demonstrate is that:
- AI agents have measurable performance differences across languages
- Custom instructions and workflow constraints have outsized impact
- Token efficiency matters when you're running large batches of agentic tasks
- The tooling and frameworks around a language matter as much as the language itself
For teams running on our cloud hosting platform considering agentic development workflows, consider optimizing your prompts and instructions before switching languages. The token savings from better-designed constraints could dwarf any language-specific gains.
The Rage Bait Wasn't Wrong After All
Sometimes the most controversial claims deserve a closer look. This experiment proves that Ruby's resurgence in the age of AI isn't nostalgia—there's genuine technical substance behind it.
Whether Ruby becomes the preferred language for agentic coding remains to be seen. But we now know that the person who suggested it wasn't just stirring the pot. They were onto something.
The future of development isn't about picking the "best" language. It's about understanding which languages and workflows your AI agents work best with—and that's a conversation worth having.