Introduction · July 30, 2026
Intro to Range
From the graph down to one point
Everything is a graph. Code is one look into it.
The world is made of things and the relationships between them. It is a vast space, where context keeps shifting, gradually, in the understanding of whoever is looking. Every program you have ever written was a piece of that space, drawn in a language that kept the lines out of sight.
The two ends can be laid out apart, here and there, copied or shared. That is where control comes from. But the meaning never splits.
Nodes come in three forms. Construct gathers values, enum chooses between them, function moves between them.
Inside a node, every member is one of four things. let is fixed. state can change. binding is someone else's. derived is worked out when asked.
Other languages choose once for the whole type. Range lets each member choose.
A shape is only a name. Construct, enum, switch, all of them names for what we need to do. Under the names, one structure, hollow the way bone is hollow. Nothing fills it, and it holds.
This is how you understand.
Code is one look into it. Write yours.
On a Mac with Apple silicon, for now, with Apple's command line tools (xcode-select --install).
- Get Range
git clone --depth 1 -b development https://github.com/RangeLang/Range cd Range - Build it, about ten seconds
./Language/Compiler/Tools/build-range ./range - Write a program
cat > Mandelbrot.range <<'END' // The Mandelbrot set, drawn in the terminal. Change a number and run it again. Picture { let width: 72 let height: 28 let centerX: -0.6 let centerY: 0.0 let zoom: 1.3 let detail: 60 } // The letter for a point: how many steps it took to fly away, of all it had. shade { let steps: Int let of: Int steps = of -> return " " steps > 20 -> return "@" steps > 10 -> return "#" steps > 6 -> return "*" steps > 3 -> return ":" return "." } @main { let picture: Picture() for row in 0..<picture.height { state line: "" for column in 0..<picture.width { let x: picture.centerX + (Float(column) / Float(picture.width) - 0.5) * 3.2 / picture.zoom let y: picture.centerY + (Float(row) / Float(picture.height) - 0.5) * 2.4 / picture.zoom state a: 0.0 state b: 0.0 state steps: 0 for step in 0..<picture.detail { a * a + b * b < 4.0 -> { let next: a * a - b * b + x b: 2.0 * a * b + y a: next steps: steps + 1 } } line: line + shade(steps: steps, of: picture.detail) } print(message: line) } } END - Run it
./range run Mandelbrot.range - It prints
...............................:::::::::::::::***###***:::::::::........ .............................::::::::::::::::##### ###*::::::::::...... ..........................:::::::::::::::::***#@ #**::::::::::..... ........................:::::::::::::::*******#@ @#***::::::::::.... ......................:::::::::::::*@@##**#@# @#@ @@ @# @*****@*:::... ...................:::::::::::::::**## #@ @ ###@##*:::.. ................:::::::::::::::::***## @*:::::. .............::::::::::::::::::**#@@# #***::::: .......:::::::::*#***************##@ #**#:::: ..::::::::::::::*####**@@*******## #@:::: :::::::::::::::***## @#@ @@ @####@ **:::: :::::::::::::***###@ ##@ @*:::: ::::::::::**#***## @ @*::::: ::**::::*****#@ @@ #*:::::: @#***:::::: ::**::::*****#@ @@ #*:::::: ::::::::::**#***## @ @*::::: :::::::::::::***###@ ##@ @*:::: :::::::::::::::***## @#@ @@ @####@ **:::: ..::::::::::::::*####**@@*******## #@:::: .......:::::::::*#***************##@ #**#:::: .............::::::::::::::::::**#@@# #***::::: ................:::::::::::::::::***## @*:::::. ...................:::::::::::::::**## #@ @ ###@##*:::.. ......................:::::::::::::*@@##**#@# @#@ @@ @# @*****@*:::... ........................:::::::::::::::*******#@ @#***::::::::::.... ..........................:::::::::::::::::***#@ #**::::::::::..... .............................::::::::::::::::##### ###*::::::::::...... - Change it
The buttons only change three numbers in the program above:
zoom: 1.3,centerX: -0.6andcenterY: 0.0. Copy it again and it prints this picture.