The Adama Language

I built a programming language. That sentence still feels strange to type, but here we are. Adama is a domain-specific language — it's not trying to be the next Python or Rust. It's trying to solve one very specific problem: building real-time, stateful applications where the server handles state management, privacy, and client synchronization so you don't have to.

The language is the heart of the whole system, and this section is where I walk through it piece by piece.

Chapters

1. Fundamentals

Variables, constants, control flow, loops, functions versus procedures. The ground floor. If you've written code in any C-family language, most of this will feel familiar — with a few twists.

2. Types

Adama's type system — primitives, temporals, maybes, enums, vectors, matrices, and all the conversion rules between them. There's more here than you might expect from a "domain-specific" language (I kept adding things).

3. Records and Messages

Records are your persistent state; messages are your communication shapes. They look similar but serve fundamentally different purposes. This chapter covers both, plus privacy modifiers, methods, validation, and the merge pattern I use constantly in production.

4. Tables and Queries

Tables hold collections of records, and the LINQ-style query syntax lets you filter, sort, shuffle, limit, and aggregate them. I basically embedded a tiny database into the language because — well, every app needs one.

5. Formulas

Reactive computed values. Think spreadsheet cells that recalculate when their inputs change. Formulas, bubbles, viewer state — this is where Adama's reactive model really comes alive.

6. Privacy

Every connected client sees a different projection of the same document. Privacy is enforced at compile time, not bolted on as an afterthought. This chapter covers all the modifiers, policies, guards, and the philosophy behind it all.

7. Channels

How clients talk to documents. Channels are the "write" path — typed message handlers that receive input, validate it, and mutate state. Also covers async workflows, open channels, and connection lifecycle.

8. State Machines

Document lifecycle management. States and transitions for controlling application flow — particularly useful for turn-based games and multi-step workflows.

9. Web Endpoints

HTTP request handling. Define GET, PUT, POST, DELETE, and OPTIONS handlers directly in your Adama code for REST-style integration.

10. Services

Calling out to external APIs from inside a document. Email, SMS, HTTP, AI chat — the bridge between Adama's isolated document world and the rest of the internet.

11. Scheduled Tasks

Cron-style scheduling for periodic work. Time-based automation inside the document.

12. Testing

Built-in testing. Write tests, run them, catch bugs before deployment. I know, I know — everyone says they'll write tests later. At least the framework is there.

13. Agents

AI agents as first-class reactive types. Sessions, tools, mutable state, multi-turn LLM conversations with automatic tool dispatch. This is the newest and (I think) most interesting part of the language.

14. Debug Logging

Opt-in debug logging with @debug. Compile-time format validation, policy-controlled subscriptions, zero overhead when nobody's listening.

Previous First App