Luma Comes to the Workshop: A Small Language for the Jobs In Between

Crowned Phoenix has started using Luma in its own work: for quick scripts, for testing the messages our software lives on, and for custom AI agents. Here is why, and what it has already done for us.

Luma Comes to the Workshop: A Small Language for the Jobs In Between
Luma Comes to the Workshop: A Small Language for the Jobs In Between

Every workshop has its big machines and its hand tools. Our big machines are the products you read about on this page: Emergency Simulator, Cathedral, Lectorium, Sigma-Vanguard, Sage. They are built in Go, in Flutter, in whatever each of them needs, and they will stay that way.

But between the big projects there is a constant stream of small jobs. Check how a device answers. Pull data from an API and reshape it. Send a test message to a customer's system and see what comes back. Try an idea with a language model before it deserves a project of its own.

For years those jobs went to whichever scripting language was closest, and the price was always the same: a runtime to install, packages to manage, and a script that worked on my machine and nowhere else. From now on, many of them go to Luma.

A confession first

I should say it plainly: I am the creator of Luma. So read this with that in mind.

But that is exactly why this post matters to me. A language is easy to praise and hard to rely on. Using it in our own work, on jobs that have a deadline and a customer at the other end, is the honest test. If I am not willing to depend on it, nobody else should.

What Luma is

Luma is a small programming language with its own compiler. One program, luma, does two things:

  • luma run runs a program straight away, like a script.
  • luma build turns it into a single native program for Linux or Windows that needs nothing else installed. No runtime, no packages, no setup on the other computer.

What usually needs a pile of libraries comes with it: HTTP and HTTPS, TCP and UDP, JSON and CSV, files and folders, dates, cryptography, servers, and doing many things at once. For AI, there are mods for Claude, for OpenAI-compatible APIs and for Ollama.

This week Luma reached version 0.2.0, its first public release. It lives at luma-lang.com, and you can try it in the browser at play.luma-lang.com.

Where we use it

Quick scripting

The everyday jobs: renaming and sorting files, converting a CSV export into the shape another system expects, calling an API a few hundred times to see how it behaves under load, checking a server's answer after a deployment. Small programs, written in minutes, that still read clearly when someone opens them half a year later.

Testing the messages our software lives on

Much of what we build for industry talks to machines: scanners, printers, robots, controllers. The hardest part to test is rarely the software itself. It is the other end of the wire, which is usually on a factory floor, busy with real work.

Luma has already earned its place here. We used it to test how industrial software receives and parses TCP messages from a robot, on Windows. Instead of waiting for the robot, a few lines of Luma played its part of the conversation: sending exactly the messages the robot sends, and showing what the application answered. Something like this:

// stands in for the robot: the application connects and gets its messages
fn robot(app: tcp) {
print("${app.peer()} connected")
app.write("STATUS;READY\r\n")
app.write("POS;450.5;120.0;90.0\r\n")
print("the application answered: ${app.line()}")
app.close()
}

tcp.serve(5000, robot)

When the application connects, it gets the robot's messages, and the console shows what it did with them. Change one line and you are testing a malformed message, a slow answer, or a robot that hangs up halfway. It just worked, on Windows, the first time.

The same approach mocks an HTTP API that does not exist yet, or a service that is too expensive to call while you are still building.

Custom AI agents

The newest use, and the one we are most curious about. An agent is a language model with tools: functions it may call to look something up or do something. In Luma, a tool is an ordinary function, and its input is described by an ordinary type:

import "openai"

// A production line.
obj Line {
name: str // the line's name, e.g. L2
}

ai: openai.client = openai.ollama("qwen2.5:7b") // a model on our own server
ai.system("You help the night shift. Answer briefly.")
ai.tool("line_status", "Call this when someone asks how a production line is doing", schema(Line), fn(input: json): str {
l: Line = convert(input)
return line_report(l.name)
})
print(ai.ask("Is line L2 running normally?"))

The model decides when to call line_status, Luma runs it and hands the result back, and the answer comes from real data. With Ollama the model runs on our own hardware, so the questions and the data never leave the building. That is the same principle we follow in Lectorium, and for our industrial customers it is often the only acceptable one.

We are at the beginning here, and we will write about the agents we build as they become real.

Why it fits

  • One file to hand over. A built Luma program is a single executable. Putting a test tool on a customer's Windows PC means copying one file, not installing an environment.
  • Readable later. Luma has few ways of doing the same thing. A script written in a hurry still makes sense to the next person, and to me in six months.
  • Mistakes found early. Types are checked before the program runs, and the error messages say what to do, not only what went wrong.
  • The manual is inside. luma doc shows the documentation of the installed version, offline. On a factory network that is not a luxury.
  • AI assistants write it well. ChatGPT and Google's AI have both written working Luma programs from its documentation. When the tools we use to write code understand the language, small jobs get smaller still.

What it isn't

Luma is young. 0.2.0 is a first public release, not a finished product, and the macOS version is still a preview. It will not replace Go in our large systems, and it is not meant to. It is a tool for the jobs in between, and those jobs happen every single day.

Hand on heart

Plenty of companies announce that they are "exploring" a technology. This is not that. I can put my hand on my heart: we will use Luma, and we already do. It has already tested real software against a real robot's messages, and the small jobs on my desk are going its way.

If it fails us somewhere, we will find out first, and we will fix it. That is the advantage of using the tools you make.

More soon, from the Crowned Phoenix workshop.

Visit luma-lang.com

Guido Gröön, Crowned Phoenix LLC · Tallinn, Estonia

READ NEXT

More from the newsroom.