# Lua's parser can print "hello, world" five million times where CPython chokes

Original title: Lua for Data Representation

> Hacker News story 50637888 · language: en · submitted 2026-11-25
> Web version: https://zeli.app/story/50637888
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 92 · by [vinhnx](<https://news.ycombinator.com/user?id=vinhnx>) · 💬 48
[original](<https://citrons.xyz/journal/2025-07-23>) · [HN discussion](<https://news.ycombinator.com/item?id=50637888>)

## Summary

Lua was built for embedding, but its speed and flexibility make it a surprisingly strong data and configuration format. The author lays out three styles — JSON-like returned tables, INI-style globals captured through a controlled environment, and imperative calls like path "/x" — and explains how to sandbox untrusted chunks by stripping the standard library and rejecting bytecode. It shines most when you already ship Lua or need a config language you can extend arbitrarily.

## Key quote

> The major problem with using an entire programming language to represent data is that untrusted data can be readily crafted to be malicious.

## HN discussion (48 comments)

### [tylerneylon](<https://news.ycombinator.com/item?id=50639376>)

> It's not a coincidence that Lua's good at representing data -- the language started life as a data-specification syntax called Simple Object Language. Or SOL (sun), which evolved into Lua (moon). If you've used BibTeX, then SOL will look familiar -- also not a coincidence! (BibTeX was first.)
>
> The article indirectly nods to that history by linking here: https://www.lua.org/history.html#:~:text=All%20this%20config...

### [virtualritz](<https://news.ycombinator.com/item?id=50642325>)

> The 3Delight|NSI offline 3D renderer has supported Lua as scene description (essentially data) since about 15 years.
>
> It was their answer to the old VFX industry default, RIB (or custom scene description) files (i.e. data) manipulated with "filters" or inline-expanded Python inside the "pipeline".
>
> Didn't get traction but it was the right idea and they never discontinued support for it.
>
> If you watch movies/series containing VFX you have seen CGI rendered with 3Delight. But most of it will have been intermediate .nsi files, not .lua.

### [gilber](<https://news.ycombinator.com/item?id=50638804>)

> Lua as a whole is incredibly underrated, especially given things like LuaJIT - I don't understand why it felt out of popularity with most people. Maybe related to Roblox.

### [gonzus](<https://news.ycombinator.com/item?id=50639783>)

> In my experience, tying your data format to a programming language is a mistake you most likely will pay for later. For example, when you need access to that data from a different programming language.

### [TheCycoONE](<https://news.ycombinator.com/item?id=50638567>)

> For better or worse CorsixTH makes extensive use of these techniques, as the config format [1], the translation format [2], and even the format for the update check [3]
>
> [1] https://github.com/CorsixTH/CorsixTH/blob/master/CorsixTH/Lu...
>
> [2] https://github.com/CorsixTH/CorsixTH/blob/master/CorsixTH/Lu...
>
> [3] https://github.com/CorsixTH/CorsixTH/blob/gh-pages/check-for...

---

## Cite

- Page: https://zeli.app/story/50637888
- Date: 2026-11-25
- Source: citrons.xyz (https://citrons.xyz/journal/2025-07-23)
- Hacker News: https://news.ycombinator.com/item?id=50637888

## Other languages

- zh: https://zeli.app/zh/story/50637888 · markdown: https://zeli.app/zh/story/50637888.md
- ja: https://zeli.app/ja/story/50637888 · markdown: https://zeli.app/ja/story/50637888.md
- ko: https://zeli.app/ko/story/50637888 · markdown: https://zeli.app/ko/story/50637888.md
- de: https://zeli.app/de/story/50637888 · markdown: https://zeli.app/de/story/50637888.md
- es: https://zeli.app/es/story/50637888 · markdown: https://zeli.app/es/story/50637888.md
- ru: https://zeli.app/ru/story/50637888 · markdown: https://zeli.app/ru/story/50637888.md
