Update readme

This commit is contained in:
zongor 2025-09-21 11:06:22 -07:00
parent 3453b0fcd6
commit cf767b2401
1 changed files with 54 additions and 48 deletions

View File

@ -1,4 +1,4 @@
#+TITLE: The Reality Engine
#+TITLE: Undâr Programming Language
#+AUTHOR: Zongor
#+EMAIL: archive@undar-lang.org
#+DATE: [2025-04-05]
@ -15,6 +15,21 @@
· · · ᚾ]
#+END_SRC
* Undâr
Undâr is a permacomputing oriented, statically-typed language with **first-class arrays**, **immediate-mode semantics**, and **symbolic clarity**
- =Constrained systems=: microcontrollers, retro consoles (PS1, N64, Mac Classic)
- =Portable environments=: Web (Emscripten), embedded, CLI Tui
- =Permacomputing=: long-term survivability, sustainability, minimalism
- =3D world-building=: built-in primitives for PS1/N64-style rendering
- =Live development=: hot reloading, REPL, shadowing, symbol versioning
It runs on the =Reality Engine=, a minimal C89 VM inspired by Uxn, Plan 9, and Forth - but built for =spatial software=, =deterministic execution=, and =software that lasts=.
Sċieppan is a minimal macro assembler that uses s-expressions.
You can view some examples in the =.lisp= files in =/test=
The =Reality Engine= is a register-based virtual machine designed to render not just graphics, but persistent, inspectable, reproducible computational worlds.
It is:
@ -27,8 +42,8 @@ It is:
**VM Architecture**
| Feature | Specification |
|--------------------+---------------------------------------------|
| Instruction Format | 1-byte opcode, 3-byte operand (CISC-like) |
|--------------------+-----------------------------------------------|
| Instruction Format | 1-byte opcode, 3-variable operand (CISC-like) |
| Register Set | 32 general-purpose registers (R0-R31) |
| Initialization | **ZII**: Zero Is Initialization |
| Memory Model | Frame-based arenas (function scope = frame) |
@ -42,29 +57,17 @@ This ensures:
- Perfect reproducibility
- Safe failure modes
* Undâr
Undâr is a permacomputing oriented, statically-typed language with **first-class arrays**, **immediate-mode semantics**, and **symbolic clarity**
- =Constrained systems=: microcontrollers, retro consoles (PS1, N64, Mac Classic)
- =Portable environments=: Web (Emscripten), embedded, CLI Tui
- =Permacomputing=: long-term survivability, sustainability, minimalism
- =3D world-building=: built-in primitives for PS1/N64-style rendering
- =Live development=: hot reloading, REPL, shadowing, symbol versioning
It runs on the =Reality Engine=, a minimal C89 VM inspired by Uxn, Plan 9, and Forth - but built for =spatial software=, =deterministic execution=, and =software that lasts=.
Sċieppan is a minimal lisp inpsired by sectorlisp.
You can view some examples in the =.lisp= files in =/test=
**Core Types**
| Type | Description |
|--------+-------------------------------------------|
| =int= | 32-bit signed integer |
| =nat= | 32-bit natural number |
| =real= | Float/Q16.16 fixed-point real number |
| =real= | Q16.16 fixed-point real number |
| =str= | 4-byte packed string or fat pointer |
| =bool= | Compile-time flag |
| =str= | String |
| =char= | Character |
| =ref= | Reference prefix for passing by reference |
**Array Semantics (Fortran-Style)**
@ -190,27 +193,30 @@ Tunnels make I/O **uniform, composable, and archival**.
**Build the Reality Engine**
#+BEGIN_SRC sh
git clone https://git.alfrescocavern.com/zongor/reality-engine.git
cd reality-engine
make
./zre client.ul
git clone https://git.alfrescocavern.com/zongor/undar-lang.git
cd undar-lang && make
#+END_SRC
**Sample Program: =hello.ul=**
**Sample Program: =hello.asm.lisp=**
#+BEGIN_SRC ul
function main(int argc, str[] argv) {
str name = argc > 1 ? argv[1] : "World";
print("Hello, {name}!");
exits("Done");
}
#+BEGIN_SRC lisp
((code
(label main
(load $0 &terminal-str)
(load $1 &hello-str)
(strlen $2 $1)
(syscall DEVICE_WRITE $0 $1 $2)
(load $3 &new-line)
(string-length $4 $3)
(syscall DEVICE-WRITE, $0, $3, $4)
(halt)))
(data
(label terminal-str "/dev/term/0")
(label new-line "\n")
(label hello-str "nuqneH 'u'?")))
#+END_SRC
Run it:
#+BEGIN_SRC sh
./zre hello.ul Alice
# Output: Hello, Alice!
./build/linux/undar-linux-debug ./test/hello.asm.lisp
#+END_SRC
* Example: 3D Client (=client.ul=)
@ -218,7 +224,7 @@ Run it:
#+BEGIN_SRC ul
use "common.ul";
function main(int argc, str[] argv) {
fn256 main(int argc, str[] argv) {
nat w = 800, h = 450;
Player me(argv[1], [0.0, 1.0, 2.0], PURPLE);
@ -263,7 +269,7 @@ function main(int argc, str[] argv) {
- Versioned plexes: forward/backward compatibility
- Self-documenting syntax: just enough magic
- Open standard: no vendor lock-in
- Archive formats: =.ul=, =.ubin=, =.uatom=
- Archive formats: =.ul=, =.rom=
* License