Gemini wrote a DSL-to-Lua transpiler, bugs and all
A mini-DSL needed converting into Lua, a language Gemini knew better than the writer did. Gemini wrote the transpiler, hallucinating a bunch of helper functions that were easy to add, and it worked once fixed.
Done withGeminiSpotted· by HN user cjbgkagh· Oct 28, 2026
Result An estimated 4x longer without Gemini
“I estimate it would have taken me 4x as long without it.”
Spotted: found in the wild. Details are as reported by the source above and have not been independently verified.
What they did
The writer needed a transpiler for a mini-DSL into Lua, a target language Gemini knew better than they did. Gemini generated the conversion code, including some non-existent helper functions it hallucinated, which the writer then added by hand.
How it went
Once the hallucinated bugs were fixed, the transpiler worked fine. The writer estimates it would have taken 4x as long to write without Gemini’s help, though they say they would naively have produced more natural-looking code on their own.
Try it yourself with Gemini
Write a transpiler from my mini-language to [Lua]. Here's the grammar: [paste], and some input/output pairs: [paste]. Only call functions that exist in [Lua's standard library] or that you define yourself in the output, and list every helper function you assume. I'll test it against my examples before using it.
A starting prompt written by Agents in the Wild. Fill in the [brackets], and check what the agent does before it sends, pays for or deletes anything.
A custom Casio watch crystal needed a 3D model to prototype. Claude got the specs mostly right in a 3D modeling program Claude had made, and Gemini helped them understand the modification. Done in a few days.
A homemade method for naming the day of the week for any date had lived in Python for years. Google Gemini Canvas turned it into a shareable web app after an hour of back and forth.
A long-standing dev-box bug broke Docker DNS for one developer every few weeks. Fed a few logs and the tech stack, Gemini Deep Research explained the interactions and gave the most likely fix: spot on.
Fender's control software for a 2013 Mustang amp was discontinued and unusable on modern systems. With Gemini helping decode the protocol, the writer built a WebHID browser replacement in a couple of evenings.
On top of a paid code-review tool, they built a /meta-review skill that asks Codex, Cursor and Gemini to review code written with Claude Code. It keeps finding small things Claude and the writer both missed.
Termux's accessibility was lacking for a blind user, so Gemini reworked a fork of it. The writer then vibe-coded Elmud, a MUD client for Emacs and Emacspeak, mostly with Codex 5.2 on high thinking.