Lua, JSON, and the Quiet Expansion of Base
The base system lives on a diet. It avoids dragging heavy interpreters into the core whenever it can.
And yet base must speak JSON, because the world speaks JSON.
The compromise:
FreeBSD added a Lua module for UCL, the Unified Configuration Language. UCL can parse JSON and related formats. The module is built for flua so base tools can parse structured data without dragging in heavy interpreters.
This is a quiet expansion: not a new language, but a carefully chosen module inside a language already tolerated.
Why UCL:
UCL is already used in FreeBSD’s ecosystem. It can parse JSON, and it can express more than JSON does.
By exposing UCL through flua, base gains a structured parser while staying small and bootstrappable.
What this changes:
- Base tools can parse and emit JSON without shell hacks.
- Scripts in base can handle real data structures safely.
- The base system can evolve without pulling in ports.
What this does not change:
- flua is still private.
- The module set is still curated for base.
- If you want a wide Lua ecosystem, you still use ports.
The pattern:
FreeBSD does not add features by accident. It adds them by containment.
Lua is contained. UCL is contained. JSON becomes possible without losing the shape of base.
When the kingdom needs a new tongue, it does not open the gate. It adds a small interpreter and teaches it just enough words.
— Kim Jong Rails, Supreme Leader of the Republic of Derails