{"slug": "i-turned-notebook-pseudocode-into-a-real-programming-language-c-17-vm-and-all", "title": "I turned notebook pseudocode into a real programming language — C++17 VM and all", "summary": "A 14-year-old developer released X++ v0.4.1, an intent-driven programming language whose strict pseudocode syntax compiles and runs on a zero-dependency native VM written from scratch in C++17, with an AOT backend that emits portable C++ compiled to machine code. Benchmarks included in the release show the native AOT path running a 1..5,000,000 summation in 50 ms versus 381 ms for CPython 3.11, and recursive fib(28) in 10 ms versus 55 ms. The project also ships a browser playground backed by a JavaScript port of the VM, validated by a harness that requires byte-identical stdout, stderr and exit codes across 40+ programs.", "body_md": "The first program I ever wrote was in a school notebook. A guessing game, in plain steps: *pick a number, ask the player, if too low say \"too low.\"* I couldn't run it, obviously. Notebooks don't have compilers.\n\nThat annoyed me more than it should have. Every beginner can write an algorithm in plain language — the syntax is the gatekeeper, not the logic. So a year ago, at 13, I started building the unreasonable version of the fix: a programming language where the pseudocode **is** the code.\n\nThis week it hit v0.4.1 — a native VM written from scratch in C++17, zero dependencies, and an AOT backend that compiles your program to machine code. It's called X++ (more on the name later, unfortunately).\n\n*Programming For Everyone*\n\n**Same pseudocode. Same ease. Now a real native VM.**\n\nX++ is an intent-driven language: you write **strict pseudocode** (or loose English steps for the AI mode), type one command, and it *booms*. Version 0.4.1 adds a **zero-dependency native VM** (C++17) so your programs run **without Python** — the Python stack is still available for the legacy and AI paths.\n\n`x run app.xp`, done.`.xp` straight to machine code (via portable C++ emitted by the backend, compiled with your system compiler).`.xbc` (`.bc`)…\n\n```\nRNM=ZITR\n\nfn fib(n):\n  if n <= 1:\n    return n\n  end\n  return fib(n-1) + fib(n-2)\nend\n\nloop i from 0 to 10:\n  out i, fib(i)\nend\n```\n\nThat's a complete program. `x run fib.xp` prints the table.\n\nThe entire language fits in a tweet's worth of rules: blocks end with `end`. No types, no brackets, no semicolons. `push 4 to nums` reads like what it does. Errors say `division by zero`, not `TypeError: unsupported operand type(s) for /: 'int' and 'int'`. Errors you can catch, too:\n\n```\nsafe:\n  x = 1 / 0\nfail e:\n  out \"caught:\", e\nend\n```\n\nLists, dicts, `loop x in list`, `loop i from 1 to 10 step 2`, closures, recursion, `and`/` or` that short-circuit. That's the whole shape of it.\n\nv0.3 was, I'll admit it, a Python transpiler. X++ went in, Python came out, `exec` happened. It worked! It also felt like cheating. And it meant my \"language\" died without Python installed and ran at Python speed.\n\nSo for v0.4 I wrote a real engine — no dependencies, pure C++17:\n\n`nil + 1` returns `nil` instead of erroring, because the nil tag collides with a float path in my arithmetic. I've been calling it \"nil propagation\" until someone convinces me it's a bug.\nYou pick the engine with one header line: `RNM=ZITR` (VM), `RNM=ZCOM` (bytecode AOT), `RNM=ZJIT` (native). Same `.xp` file, same language, three different machines underneath.\n\n| Workload | CPython 3.11 | ZITR (my VM) | ZJIT (native AOT) | \n|---|---|---|---|\n| sum 1..5,000,000 | 381 ms | 202 ms | **50 ms** | \n| fib(28), recursive | 55 ms | 91 ms | **10 ms** | \n\nAsterisks, because I'd rather say them first:\n\n`bash bench/test_all.sh` reproduces everything — run it and post your numbers, good or bad.\nThe project's website has a playground that runs X++ entirely in your browser — a full JavaScript port of the VM's semantics. I didn't trust myself to write the same language twice (correctly, it turns out), so I built a test harness that runs 40+ programs on both engines and requires **byte-identical stdout, stderr, and exit codes**.\n\nIt caught real things. My favorite: while porting `sum()`, I discovered the native version drops the integer total if a float shows up later in the list — a genuine bug in my C++ accumulator. I reproduced it faithfully in the JavaScript port anyway, because right now divergence scares me more than bugs. Both get fixed in 0.4.2. Fidelity first, correctness second, apparently.\n\n`sum()` thing above.\nWhat's next: modules (`use \"file.xp\"`), a register JIT with profiling feedback, and native FFI.\n\nThe part of a project you can't see from the inside is the part you got wrong — so benchmark it, break it, open issues, argue with me about `end` vs indentation. The feedback form on the site goes straight to my inbox and the issue tracker is right there. Sharp feedback is the most useful thing you can hand me.\n\nThe website html and css was LLM generated, so if you smell AI there then you are right, also same is true for the readme because I don't have the skills to write a proper cool README so sorry for that too.\n\n— Aagastya Verma · Atom Software", "url": "https://wpnews.pro/news/i-turned-notebook-pseudocode-into-a-real-programming-language-c-17-vm-and-all", "canonical_source": "https://dev.to/thegreninjafan/i-turned-notebook-pseudocode-into-a-real-programming-language-c17-vm-and-all-1172", "published_at": "2026-10-01 07:30:55+00:00", "updated_at": "2026-10-01 07:44:14.226183+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["X++", "CPython 3.11", "C++17", "ZITR", "ZJIT", "ZCOM"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/i-turned-notebook-pseudocode-into-a-real-programming-language-c-17-vm-and-all", "markdown": "https://wpnews.pro/news/i-turned-notebook-pseudocode-into-a-real-programming-language-c-17-vm-and-all.md", "text": "https://wpnews.pro/news/i-turned-notebook-pseudocode-into-a-real-programming-language-c-17-vm-and-all.txt", "jsonld": "https://wpnews.pro/news/i-turned-notebook-pseudocode-into-a-real-programming-language-c-17-vm-and-all.jsonld"}}