rocinantealpha

a language for prototyping, testing and shipping great ideas, with a fast and modern engine under it

Supported platforms:

  • macOS
  • Windows
  • Linux
  • FreeBSD
  • OpenBSD
  • iOS
  • Android

rocinante is made for a symbiotic future, where people and machines make things together and people stay in charge of what's made. It is for making desktop and mobile apps, pictures, animations, sounds and interactive pieces with code. The language is small enough to learn in an afternoon, and underneath it is an engine of today's graphics, sound and AI technology. Here's our hello world! One line makes a picture in its own window:

sketch.roci
circle at 100 100 radius 50
what it draws: the whole window, 800 by 600
The window that line opens: 800 by 600 pixels of light gray, with a white circle near its top-left corner

change it while it runs

Save the file and the window changes while it runs. Mistakes never stop it: the window keeps the last good picture and says, in plain words, what went wrong and what would work.

sketch.roci
score = 1if score = 10 [  fill red]
what rocinante says
── A condition asks, it does not assign ─────────────── sketch.roci:2:10

2 │ if score = 10 [
  │          ^

A single equals sign gives a name a value. To ask whether two things are the same, write `is`.

Write:  if score is 10 [

what a sketch looks like

A few more lines: rocinante's own logo, drawn by rocinante from the numbers of its drawing. Names hold the positions, repeat turns one bar into the asterisk, and push keeps those turns to the asterisk alone.

sketch.roci
// rocinante's logo, drawn with rocinante:// a speech bubble with an asterisk in it.window size 740 540 title "rocinante"background whitegrow 0.5move -10 -90MIDDLE = { 942, 622 }RING = { 945, 630 }TIP = { 90, 595 }MOUTH_TOP = { 461, 595 }MOUTH_BOTTOM = { 654, 1018 }OUTLINE = 48// The bubblefill whitestroke blackthickness OUTLINEcircle at RING radius 485quad TIP MOUTH_TOP RING MOUTH_BOTTOMno strokecircle at RING radius (485 - OUTLINE / 2)// The dot, and the asterisk on it:// one white bar, turned an eighth of a turn at a time.circle at MIDDLE radius 365 fill blackpush [  move MIDDLE.x MIDDLE.y  repeat 4 [    rect at 0 0 size 80 460 as center    turn 45  ]]
what it draws: the whole window, 740 by 540
rocinante's logo, as the sketch draws it: a speech bubble with an asterisk in a black dot

what is under it

graphics
Vulkan, Metal and Direct3D 12, through SDL3 and its GPU API. Full Wayland support on Linux, FreeBSD and OpenBSD, with X11 also being supported. Shapes are batched and drawn on the GPU: the engine draws 100,000 circles a frame at 60 frames a second.
everywhere
macOS, Windows, Linux, FreeBSD and OpenBSD, with the same sketch behaving the same on each.
live
While you work, sketches are interpreted and reload the moment you save, keeping their values.
open
Free software under the Zero-Clause BSD license, the most permissive there is, written in Odin.

what it does today

shapes and color
Circles, ellipses, rectangles, lines, triangles, quads and arcs, with caps, joins and named styles. Colors by CSS name, hex, RGB, HSB or OKLCH, and gradients (linear, radial, conic) mixed in Oklab so they never go muddy.
movement
Tweens with seven easing curves, from smooth to elastic and bounce, timers that run every so many seconds or frames, and transforms that move, turn, grow and shear.
mouse, keys and fingers
Every mouse button by name and the wheel, keys pressed and held, and multi-touch: each finger with its place, where it started and how hard it presses.
collision
Whether shapes touch, where and how deep, which items of a list a shape hits, and what a ray meets first. A tree of boxes keeps a thousand shapes against a thousand cheap.
noise and chance
Perlin and simplex noise in one to four dimensions, fractal noise, gaussian and ranged random numbers. One seed repeats a whole picture, the same on every system.
lists, records and tables
Keep, skip, collect, combine, find, sort and shuffle; records shaped by how you use them; tables of names and values. Thousands of particles in a few lines.
your own verbs
Teach it new words with learn, with optional words and defaults, results and recursion. Every kind of value is worked out for you; you never write a type.
the turtle
Logo's turtle in every window: walk, turn, lift the pen, and save its place to grow branching trees and fractals.
many windows
As many windows as you like, each with its own drawing, sending values to one another, resized, moved, made fullscreen or kept on top while they run.
folders and libraries
A sketch folder with git set up, several files read as one program, and other people's libraries from any git address, kept in your sketch so it never breaks.
errors that teach
Every mistake found in one go and said in plain words, with a line that would work. A mistake while it runs never stops the window either.
tools
roci fmt tidies a sketch, roci check checks it, roci man explains a word; sketches run headless for tests, and the same verbs work from Odin and C.

what is coming (and it is coming fast)

text, images and shaders
Fonts, images and their pixels, drawing into canvases, blend modes and masks, shaders of your own that reload as you save, and pictures saved as PNG, SVG or PDF.
widgets
Buttons, sliders, knobs, text boxes and color pickers as plain verbs, in any sketch: usable with a keyboard, a mouse or a finger, and read aloud by screen readers.
3D
Boxes, spheres and meshes in the same window as the 2D, a camera that orbits by itself, lights, materials and shadows, glTF models, and the turtle in three dimensions.
sound
Playing and making sound, effects, the microphone, and its loudness and frequencies as values a drawing reads, with MIDI and OSC for instruments and other programs.
machine learning
Bodies, hands, faces and objects found in the webcam's picture, and models of your own, run on your own computer: no cloud, no account.
the world outside
The webcam and video, files and data, the network, Arduino boards, gamepads that players can remap, and 2D physics.
apps, compiled
One command turns a sketch into native code and an app for macOS, Windows, Linux, FreeBSD, OpenBSD, iPhone and Android, drawing exactly the frames it draws while you work.
tools
Errors and the kinds of values shown as you type, in nvim, Helix, VS Code and Zed, a public index of libraries, and extensions written in Odin or C.

guides

Learn it a topic at a time: shapes, movement, input, lists, collision, windows, the turtle, verbs of your own.

reference

Every word of the language, each with an example and the picture it draws.

messages

Everything rocinante can tell you when something is wrong, with a sketch that makes each message.

faq

Why another language, why Logo, where the objects are, what it runs on, and who is behind it.

start

  1. roci new my-sketch

    makes a sketch folder with one circle in it

  2. cd my-sketch
  3. roci run

    opens the window; change sketch.roci and save, and rocinante reloads it while it runs

This is an alpha: the language and these pages will still change. The getting started guide says how to install it.

rocinante

Y así, después de muchos nombres que formó, borró y quitó, añadió, deshizo y tornó a hacer en su memoria e imaginación, al fin le vino a llamar Rocinante: nombre, a su parecer, alto, sonoro y significativo de lo que había sido cuando fue rocín, antes de lo que ahora era, que era antes y primero de todos los rocines del mundo.

Miguel de Cervantes, El ingenioso hidalgo don Quijote de la Mancha, Part I, Chapter 1 (1605)

Four centuries later the name went to a ship. In The Expanse, the novel series by James S. A. Corey (the pen name of Daniel Abraham and Ty Franck) that began with Leviathan Wakes in 2011, the Rocinante starts out as the Tachi, a Martian navy gunship. The survivors of the ice freighter Canterbury take it over and rename it Rocinante, and it carries them through all nine novels and the television series (Syfy from 2015, then Amazon Prime Video). It is a small ship that keeps flying when it has no business doing so.