Console
The console (system/console/console.rio, a system app) runs Rio as it's typed,
a line or a block at a time, in a session of its own: try things out, and look at what apps do. On the
Fruit Jam, Ctrl+C over the USB serial port opens it from anywhere, which is how tools/send.py sends
apps.
Typing Rio
What's typed is Rio: a statement runs when it's complete, and a block (a proc, an if, a loop) when
its end comes. A value on its own is shown. Up and down bring back lines typed before: they're kept in
/save/console/history.txt (8 KB of them, a few hundred lines), so they're there after another app's
run, or a restart.
> x := 6 * 7
> sq :: proc(n: Int) -> Int
. return n * n
. end
> sq(x)
1764
Commands
A line on its own can be a command instead:
| command | |
|---|---|
run | run what's been typed as a game (its update* and draw*), until Esc |
ls | list the apps, and the projects (a + after the name: chord+) |
run name | run app name, as itself |
delete name | remove app name |
install name | install project name+ as app name (its dev folder, its own saves and tests, stays with the project) |
active, active name | say which app or project is active (what the editor opens), or make name it |
home | back home |
history, history clear | the last 20 lines typed, or forget them all (its file too) |
Each name can be a project's, with its +: run chord+ runs project chord+, with its own saves.
Apps are written in the editor; a library is tried here by typing its import (import clip), its names
there after.