Myxo v1.5 · MIT

A language built in the open

The runtime is the rule.

Myxo is a small, from-scratch, zero-dependency language with one idea at its core: used paths strengthen, unused ones decay. That isn't a tagline bolted on top — it's the semantics. Functions are agents. Variables are pathways that gain strength each time they're read. The mesh behind this text is that law, running.

$npm i -g myxo-lang
or run from source →
0 dependencies 379 tests passing own parser · interpreter · stdlib real multi-core concurrency capability fence
The same job, two ways

Watch the red — that's the code you write by hand in Python that Myxo's one rule carries for you.

Same results on both sides. The difference is how much you have to write.

Remembering answers · caching

A pure function called over and over — the classic case, Fibonacci.

Python

from functools import lru_cache

@lru_cache(maxsize=None)   # you add this line
def fib(n):
    return n if n < 2 else fib(n-1) + fib(n-2)

Without it, fib(32) makes 7,049,155 calls. You have to know to add it.

Myxo

agent fib(n) {
  when n < 2 { report n }
  report fib(n-1) + fib(n-2)
}

No annotation. The language caches a hot, pure agent itself — fib(32) returns instantly.

Sending work to the faster worker · load-balancing

Two workers do the same job; one is faster. Push more work to the fast one.

Python

# you write the balancer yourself:
def run(workers, items):
    weight = [1.0]*len(workers)
    for i, item in enumerate(items):
        w = pick_by_weight(weight)
        t = now()
        out[i] = workers[w](item)
        weight[w] = faster(weight[w], now()-t)
    # + pick_by_weight(), faster(), ...

You own the timing, the weighting, the loop — and the helpers.

Myxo

schedule("pool", [fast, slow], items)

flows("pool")
# -> { fast: 5.98, slow: 1.03 }

One line. The pool measures speed and sends more work to the fast tube — and remembers it next time.

When a worker dies · failover

One worker breaks mid-job. The work still has to get done.

Python

for i, item in enumerate(items):
    for w in by_health(workers):   # you write retry
        try:
            out[i] = w(item); break
        except Exception:
            mark_unhealthy(w)          # you write this

You write the retry, the health tracking, the reroute.

Myxo

schedule("pool", [maybe_broken, ok], items)

# a dead worker decays;
# its items reroute to the survivors

The same one line. Failover is already in the scheduler — nothing extra to write.

The honest version, so I'm not overselling

Myxo is not faster than Python for everyday work — it's an interpreter, and for tight number-crunching Python wins. The point isn't speed. The point is the red: in Python you write the cache, the balancer, and the failover. In Myxo, one rule carries all three, so that code simply isn't there.

And the part that earns its keep today isn't the self-tuning — it's safety. An Myxo program can only touch what you explicitly hand it. Nothing else exists in its world to misuse. That's the one you can hand to an AI.

The capability fence

A program that can only touch what you hand it — and logs every reach, including the refusals.

A script declares what it may use with needs. Undeclared tools don't exist to it. Budgets cap how often. Every privileged call returns in an audit ledger — successes and denials alike.

needs db_query, notify, spend(max 1)

seed rows = db_query("SELECT count(*) FROM leads")
notify("count is " + rows)
spend(20)          # over budget
pm2_restart("all")  # never declared
  • Deny by default. A capability with no needs never fires — it's refused before it runs.
  • The allowlist is the vocabulary. An undeclared tool isn't blocked, it's unknown — you can't fat-finger your way to it.
  • Budgets are hard. spend(max 1) means the second call short-circuits, logged.
  • The ledger can't lie. Refusals are first-class rows, not silent drops.
Run it in a minute

Zero dependencies, so there's nothing to configure.

A Run it

Node 18+ and nothing else — install the CLI from npm:

$ npm i -g myxo-lang
$ myxo            # drops you into the REPL

Or clone and run any example:

$ git clone https://github.com/thefinalmilkman/myxo
$ cd myxo
$ node myxo.js examples/the-law.myx --trace

B The words

Myxo keeps the building blocks and names them after the law.

seeddeclare a value
agenta function
reportreturn
reinforceloop while true
decayremove a value
needsdeclare capabilities
gatherrun tasks on real threads