Understanding Tiny Square
Tiny Square is a minimal educational programming language and sandbox environment designed to teach core computational concepts without the noise of production-grade tooling. It strips away everything nonessential so you can see how the machine actually executes code, one step at a time. The syntax relies heavily on square-bracket delimited blocks, which makes the structure of operations visually obvious compared to languages with implicit scoping. I spent a few days working with it after someone mentioned it on a dev board, and honestly it was exactly what I expected — clean but unforgiving if you don't pay attention to block boundaries. The runtime is tiny, the VM is minimal, and there's nothing fancy about error messages. You'll get something like "block mismatch at line 7" and that's it. No stack trace, no helpful suggestion. You're on your own to figure out which bracket didn't close properly.How Tiny Square Actually Works
The language compiles to a custom bytecode that runs in its own lightweight VM. There's no garbage collector — memory is managed through explicit allocation and deallocation statements, which sounds painful but is actually the whole point. You learn where your allocations come from and where they go. The variable system is statically typed at compile time but dynamically resolved at runtime, which means you'll catch type mismatches during compilation but not necessarily during execution unless you hit the exact path. The instruction set is small. Maybe twelve or so opcodes. Load, store, add, subtract, branch, call, return, print. That's basically it. You can write entire programs with those and still feel constrained by the lack of a built-in string library. You do have to roll your own string handling or work around it using character arrays, which most people do without thinking twice about it. One thing beginners consistently miss: the VM uses a flat register file, not a stack-based architecture. This means function calls don't automatically preserve registers the way you'd expect from more familiar languages. If you call a function from inside a loop and that function clobbers a register you're using in the outer scope, you're going to get silent data corruption. I hit this exact issue when writing a sorting routine that called a helper function inside a nested loop. The sort produced incorrect results every third run, and it took me two hours to realize the helper was trashing register 4, which my outer loop depended on. The fix was adding explicit push/pop around the call site, or just rewriting the helper to use a different register entirely.Downloading and installing Tiny Square is straightforward. The project lives on GitHub under a permissive MIT license. You clone the repository, run the build script (it uses CMake), and you get a compiler binary and a standalone VM executable. The source is in C, so if you're on macOS or Linux it compiles out of the box. Windows users need either MinGW or the Visual Studio build tools. The README covers this but doesn't mention that the latest commit sometimes breaks the build on older toolchains, so check the issue tracker before spending time troubleshooting a compiler error.