| ⎡ | ᚢ | ᛫ | ᛫ | ᛫ | ⎤ |
| ⎢ | ᛫ | ᚾ | ᛫ | ᛫ | ⎥ |
| ⎢ | ᛫ | ᛫ | ᛞ | ᛫ | ⎥ |
| ⎣ | ᛫ | ᛫ | ᛫ | ᚱ | ⎦ |
A statically-typed permacomputing-oriented language for the purpose of creating 1st generation style 3D games and graphical user interfaces that work on constrained systems, microcontrollers, retro consoles, and the web using emscripten. It runs on the Reality Engine a 32 bit VM written in C89.
Install
git clone https://git.alfrescocavern.com/zongor/undar-lang.git
cd undar-lang && make
./build/linux/undar-linux-debug ./test/hello.ul.ir
Hello World
/**
* 'Low level' IR syntax (WIP)
*/
global str terminal_namespace = "/dev/term/0";
global str new_line = "\n";
global str hello = "nuqneH 'u'?";
function main () {
str msg $0;
load_address hello -> msg;
call pln (msg);
exit 0;
}
function pln (str message $0) {
plex term $1;
int msg_length $2;
str nl $3;
int nl_length $4;
int mode $5;
str term_ns $6;
load_immediate 0 -> mode;
load_address terminal_namespace -> term_ns;
syscall OPEN term_ns mode term;
string_length message -> msg_length;
syscall WRITE term message msg_length;
load_address new_line -> nl;
string_length nl -> nl_length;
syscall WRITE term nl nl_length;
return;
}
/**
* High level C-like syntax (WIP)
*/
use <terminal>;
function main(int argc, str[] argv) {
str name = "'u'";
if (argc > 1) {
name = argv[1];
}
pln("nuqneH, {name}?");
return 0;
}
Philosophy
- No dynamic memory - memory is static, stack only allocation.
- First-class arrays - Fortran-style, row-major.
- Plexes - Symbolic data containers.
- Tunnels - 9p inspired unified I/O: files, sockets, devices, APIs.
Development Timeline
| Milestone | Feature | Status |
|---|---|---|
| Pre Alpha | Primitive Types | Done |
| Q16.16 fixed point Reals | Done | |
| Arithmetic Operations | Done | |
| Touch Device | Done | |
| Webassembly Arch | Done | |
| Proof of concept Paint program | Done | |
| Mouse Device | Done | |
| Terminal Device | Done | |
| Keyboard Device | Done | |
| 8bit, 16bit numbers | Done | |
| Memory allocation refactor | Done | |
| Assembler rewrite: new syntax, optional malloc | Done | |
| Alpha | Display Device | Done |
| Compiler | In progress | |
| Refactor Device, merge with Tunnel | Todo | |
| Static Arrays | Hardcoded implementation | |
| Plex Implementation | Hardcoded implementation | |
| Minimal Standard Library | Todo | |
| String Opcodes | Todo | |
| File Tunnel | Todo | |
| Beta | Fonts | Todo |
| Immediate mode UI | Todo | |
| Trigonometry Operations | Todo | |
| Unit of measure | Todo | |
| 3D Graphics Math/Primitives | Todo | |
| Gamepad/Joystick Device | Todo | |
| 3D Collision/Physics | Todo | |
| Proof of concept 3D platformer | Todo | |
| Sound Device | Todo | |
| Network Device | Todo | |
| Actor system | Todo | |
| Networked Tunnel Implementation | Todo | |
| Multiplayer Proof of concept 3D platformer | Todo | |
| Localization | Todo | |
| Arch without FPU (Maybe PS1?) | Todo | |
| MMO Proof of concept | Todo | |
| Version 1.0 | Code Editor | Todo |
| Self hosted assembler | Todo | |
| Self hosted compiler | Todo | |
| Multithreaded actors | Todo |
Inspired by
Uxn, Plan 9, Dusk OS, Dis VM Forth, Lisp, Fortran, C, Zig, Lua, Lox,