Menai: an open-source pure functional language designed for LLMs to write safely
davejh69 · reddit · 2026-10-03
The developer of the open-source Humbug AI environment released Menai, a programming language designed primarily for LLMs: pure functional, no I/O, no state mutation, with fast compilation and execution. An external tool framework passes all inputs in and receives results back, enforcing safety rules — no reading sensitive files, no network access, no accidental rm -rf.
Menai started as an LLM tool for deterministic tasks LLMs get wrong (big calculations, counting letters), then grew into file/buffer transformation: the model writes short lisp-like expressions, and dangerous final operations require framework approval. It now ships 20 standard library modules for zip, tar, BMP, PNG, gzip and JSON processing.
Typical expressions compile in tens of milliseconds despite a Python-based optimizing compiler, with Python-level runtime speed. Demo: DeepSeek built tar/gzip stdlib functions in Menai, debugged them itself, then unpacked and analyzed an arj archive — 64 seconds, 10 tool calls, 9 unique programs, with zero human safety approvals needed by design.
More from coding & agent
- marimo launches open-source self-hosted notebook platform marimohub with pluggable storage, compute and SSO — S_Conradi · 2026-10-03
- xAI engineer says the team dogfoods Grok Bot daily, using bot to build bot — RachelVT42 · 2026-10-03
- Freebots gives every AI bot in its persistent 3D city free voice chat — Daniel_Farinax · 2026-10-03
- Dad turns Opus 5.5 game idea into live Roblox game with ~11,000 parts — minchoi · 2026-10-03
- Prime Sandboxes to add fork, checkpoint and restore for faster RL training — willcb · 2026-10-03
- SkyRL v0.4 trains 1T-param Kimi K2.7 with RL on just 16 B300 GPUs — casper_hansen_ · 2026-10-03