OOLANG is an esoteric stack-based programming language where all instructions/commands are differnet unicode O characters
We have a custom Web IDE at https://oolang.tech, for experimenting in the browser.
oorun, a command line runner, is available on crates.io, and can be installed with Cargo:
cargo install oolang
OOLANG files end in
.oo, and consist of a number of commands specified each by a single unicode glyph. Any other character is ignored. Comments are supported using the
# character, which comments out up to the end of the line.
oorun file.oo will execute your OOLANG program.
stdin functionality is currently broken as of the latest release, but output will be written to
OOLANG emulates a stack machine, not dissimilar to how the JVM or Python's bytecode interpreter works.
The virtual machine consists of a stack of bytes, and 256 bytes of addressable memory. A valid OOLANG program may consist of any combination of the the following 10 commands:
|Unicode Character Name
|Latin Capital Letter O
|Push the value
1 onto the top of the stack
|Pop the value from the top of the stack, discarding it
|Latin Capital Letter O with Stroke and Acute
|Pop the top stack value, increment it, push the result
|Cherokee Letter Wi
|Pop the top stack value, decrement it, push the result
|Heavy Large Circle
|Pop the top two stack values, add them, push the result
|Gothic Letter Othal
|Jump to the address at the top of the stack, if the 2nd-top value is non-zero
|Latin Capital Letter O with Loop
|Jump to the address at the top of the stack, if the 2nd-top value is zero
|Pop from the stack, and push the value at the memory address specified
|Pop the top two values from the stack, storing the 2nd at the address specified by the 1st
|Parenthesized Latin Small Letter O
|Read the next byte from stdin, pushing it to the top of the stack, or
0 if stdin is empty
|Latin Subscript Small Letter O
|Pop from the stack and write the value to stdin as an ascii character
The language and interpreter are written in Rust. The compiled binary executable acts as a command line program, but the interpreter crate also exposes a public API. When compiled to webassembly, this API is used to provide functionality for the Web IDE within the browser.