r8 One is an open-source pocket calculator with a keypad laid out for RPN, a memory LCD that needs no backlight, and a shell that runs the programs you type on it. None has been built yet, but the one on this page is running its real firmware.
leaves 42 on the stack
Press a sequence like this one to type it in, or click the calculator and use your keyboard. Esc clears the line and F1 to F5 are the keys under the screen.
Tap a sequence like this one to type it in, or tap the keys yourself.
Starting QDOS
Your stack and programs are kept in this browser, so they are still here when you come back.
A screen that keeps its picture
The display is a 2.7-inch Sharp memory LCD, 400 by 240 pixels, each one either ink or paper. It reflects the light around it instead of making its own, and it holds its picture with no power at all, so a calculator left on its stack costs next to nothing to keep showing it.
One bit per pixel is the whole colour budget. Everything the calculator draws is designed for it, from the stack to the graphs.
Two ways to type
The calculator is RPN: digits build a number, Enter pushes it, and an operator works at once. Undo takes back the last key, and Esc never touches the stack.
A line takes whole Quadrate, with definitions, loops and strings. Define a word in one and it works on the stack like any key.
leaves 49
Write a program, then run it
On the r8 One you type these on the keypad. Here, Run types them in for you, fast enough to watch, and leaves you on the result. Esc on the calculator comes back out.
Fibonacci, in a loop
A word with a stack signature, a counted loop, and two locals named with -> each time round.
fn fib(n:i64 -- r:i64) {
0 1 rot // the first two, under n
0 swap 1 for i {
-> b -> a // name the pair
b a b + // and step it along
}
drop
}
30 fib
leaves 832040
A curve from straight lines
Forty-two lines between the edges of the screen, and a parabola appears in each corner where they cross.
fn art( -- ) {
ui::cls
0 21 1 for i {
0 i 12 * i 20 * 239 ui::line
399 239 i 12 * - 399 i 20 * - 0 ui::line
}
ui::show
loop {
30 ui::frame drop
ui::pressed "" != if { return } // any key leaves
}
}
art
any key leaves
A ball that bounces
Two words: one turns the ball back at a wall, the other draws it frame after frame, asking ui::frame for sixty a second.
// The speed, turned back at either wall
fn wall(p:d128 v:d128 hi:d128 -- r:d128) {
rot dup 10.0 < if { drop drop abs return }
< if { abs neg return }
}
fn bounce( -- ) {
200.0 -> x 120.0 -> y
3.0 -> dx 2.0 -> dy
loop {
60 ui::frame drop
ui::pressed "" != if { return }
x dx + -> x y dy + -> y
x dx 390.0 wall -> dx
y dy 230.0 wall -> dy
ui::cls
x y 10.0 1 ui::circle
ui::show
}
}
bounce
any key leaves
Any word can be graphed
A word that takes x and leaves y is a function to plot. On the graph, TRACE follows the curve and CALC finds its zeros, extremes and areas.
fnint integrates any word between two bounds. The whole bell curve e−x² has an area of exactly √π, and from −6 to 6 the calculator finds it to sixteen digits.
fn bell(x:d128 -- y:d128) { sq neg exp }
"bell" -6.0 6.0 fnint // the area under it
pi sqrt // and the square root of pi
leaves 1.7724538509055159 over 1.7724538509055160…
Or on the graph, as a TI does it: type a curve into Y1, graph it, and CALC finds the integral between two bounds and shades it.
shades the hump: INTEGRAL=36
A program that works the graph pages
Everything the keys do, a program can do: cfg:: sets the angle mode, and gr:: writes the Y= slots, picks a zoom and presses GRAPH. The taylor app builds sine's Taylor series as text, a term longer each time round a loop, and graphs all six: every term hugs the curve a little further out, and when you leave, your own Y= and settings are put back as they were. Read it in the calculator's own editor, then run it.
opens it in the editor
graphs it; Esc leaves
And turned in three dimensions
Take x and y, leave z, and graph3 draws the surface as a wireframe. The arrows turn and tilt it, and + and − zoom.
54 keys in 10 rows, with an Alpha face for letters and a Symbol face for Quadrate
Computer
ESP32-S3: two 240 MHz Xtensa LX7 cores, 512 KB of RAM and 8 MB of PSRAM
Storage
16 MB of flash
USB
One port. A computer can type at the calculator over it, and send it programs and apps.
Software
QDOS, free software under the GNU GPL
Where it stands
In development. The parts are chosen and the software runs: what you are typing on is QDOS itself, compiled for the browser. No r8 One has been built yet, so there is nothing to order.
Everything is open, from the firmware to the case. Follow along, or build one with us.