History
The same algorithms, without rewriting them
Development of Ranger began around 2017, when I wanted to write the same
kinds of algorithms for Swift, Java, and JavaScript without maintaining
separate implementations for each platform. At the time, there was no
language that quite matched what I was looking for. Haxe was interesting,
but even small programs could bring along a relatively large amount of
generated runtime code — five lines of Haxe could easily turn into more
than twenty lines of JavaScript. For small, portable algorithm libraries,
that felt heavier than necessary.
I decided to experiment with a small Lisp-based language that would
transpile directly to the target languages I cared about. The original
goal was fairly narrow: make it easy to move simple algorithms, such as
matrix and mathematical libraries, between platforms while keeping the
generated code straightforward. Lisp was a convenient foundation for
building the compiler, but its syntax was not particularly pleasant for
all of these use cases. Ranger therefore gradually extended it with
features such as block syntax and infix operators, making ordinary
control flow and mathematical expressions more natural to write.
For a long time, the main targets were Java, Swift, and JavaScript.
Experimental support for C++, Rust, Scala, PHP, and Go was also present
from relatively early on. Eventually the project became mostly dormant
as I moved into consulting work and had less time to develop the
language.
That changed toward the end of 2025. Generative AI models — and in
particular Opus 4.5 — unexpectedly became good enough at
understanding both Ranger and its compiler codebase to make working on
the project practical again in my spare time. AI did not create the
original need for Ranger, but it gave the project a new purpose: code
can now be produced extremely quickly, while validating the same ideas
across multiple languages and platforms is still a separate problem.
Since then, Ranger development has become active again. I have been using
small projects as practical test cases for both the language and its
generated code, covering things such as rendering, a JavaScript engine,
parsers, Markdown reading and previewing, charts, diagram editors, Figma
rendering, Raspberry Pi games, and numerous UI experiments across
different platforms. Together these experiments have produced and
validated millions of lines of generated code.
Today, I write nearly everything using a combination of AI and Ranger.
It lets me take an idea, generate an implementation quickly, and run
essentially the same tests on Web, Swift, and Kotlin targets — and, when
needed, on other platforms as well.