Update readme
This commit is contained in:
parent
3453b0fcd6
commit
cf767b2401
78
README.org
78
README.org
|
@ -1,4 +1,4 @@
|
||||||
#+TITLE: The Reality Engine
|
#+TITLE: Undâr Programming Language
|
||||||
#+AUTHOR: Zongor
|
#+AUTHOR: Zongor
|
||||||
#+EMAIL: archive@undar-lang.org
|
#+EMAIL: archive@undar-lang.org
|
||||||
#+DATE: [2025-04-05]
|
#+DATE: [2025-04-05]
|
||||||
|
@ -15,6 +15,21 @@
|
||||||
· · · ᚾ]
|
· · · ᚾ]
|
||||||
#+END_SRC
|
#+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.
|
The =Reality Engine= is a register-based virtual machine designed to render not just graphics, but persistent, inspectable, reproducible computational worlds.
|
||||||
|
|
||||||
It is:
|
It is:
|
||||||
|
@ -27,8 +42,8 @@ It is:
|
||||||
**VM Architecture**
|
**VM Architecture**
|
||||||
|
|
||||||
| Feature | Specification |
|
| 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) |
|
| Register Set | 32 general-purpose registers (R0-R31) |
|
||||||
| Initialization | **ZII**: Zero Is Initialization |
|
| Initialization | **ZII**: Zero Is Initialization |
|
||||||
| Memory Model | Frame-based arenas (function scope = frame) |
|
| Memory Model | Frame-based arenas (function scope = frame) |
|
||||||
|
@ -42,29 +57,17 @@ This ensures:
|
||||||
- Perfect reproducibility
|
- Perfect reproducibility
|
||||||
- Safe failure modes
|
- 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**
|
**Core Types**
|
||||||
|
|
||||||
| Type | Description |
|
| Type | Description |
|
||||||
|--------+-------------------------------------------|
|
|--------+-------------------------------------------|
|
||||||
| =int= | 32-bit signed integer |
|
| =int= | 32-bit signed integer |
|
||||||
| =nat= | 32-bit natural number |
|
| =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 |
|
| =str= | 4-byte packed string or fat pointer |
|
||||||
| =bool= | Compile-time flag |
|
| =bool= | Compile-time flag |
|
||||||
|
| =str= | String |
|
||||||
|
| =char= | Character |
|
||||||
| =ref= | Reference prefix for passing by reference |
|
| =ref= | Reference prefix for passing by reference |
|
||||||
|
|
||||||
**Array Semantics (Fortran-Style)**
|
**Array Semantics (Fortran-Style)**
|
||||||
|
@ -190,27 +193,30 @@ Tunnels make I/O **uniform, composable, and archival**.
|
||||||
**Build the Reality Engine**
|
**Build the Reality Engine**
|
||||||
|
|
||||||
#+BEGIN_SRC sh
|
#+BEGIN_SRC sh
|
||||||
git clone https://git.alfrescocavern.com/zongor/reality-engine.git
|
git clone https://git.alfrescocavern.com/zongor/undar-lang.git
|
||||||
cd reality-engine
|
cd undar-lang && make
|
||||||
make
|
|
||||||
./zre client.ul
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
**Sample Program: =hello.ul=**
|
**Sample Program: =hello.asm.lisp=**
|
||||||
|
|
||||||
#+BEGIN_SRC ul
|
#+BEGIN_SRC lisp
|
||||||
function main(int argc, str[] argv) {
|
((code
|
||||||
str name = argc > 1 ? argv[1] : "World";
|
(label main
|
||||||
print("Hello, {name}!");
|
(load $0 &terminal-str)
|
||||||
exits("Done");
|
(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
|
#+END_SRC
|
||||||
|
|
||||||
Run it:
|
|
||||||
|
|
||||||
#+BEGIN_SRC sh
|
#+BEGIN_SRC sh
|
||||||
./zre hello.ul Alice
|
./build/linux/undar-linux-debug ./test/hello.asm.lisp
|
||||||
# Output: Hello, Alice!
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* Example: 3D Client (=client.ul=)
|
* Example: 3D Client (=client.ul=)
|
||||||
|
@ -218,7 +224,7 @@ Run it:
|
||||||
#+BEGIN_SRC ul
|
#+BEGIN_SRC ul
|
||||||
use "common.ul";
|
use "common.ul";
|
||||||
|
|
||||||
function main(int argc, str[] argv) {
|
fn256 main(int argc, str[] argv) {
|
||||||
nat w = 800, h = 450;
|
nat w = 800, h = 450;
|
||||||
Player me(argv[1], [0.0, 1.0, 2.0], PURPLE);
|
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
|
- Versioned plexes: forward/backward compatibility
|
||||||
- Self-documenting syntax: just enough magic
|
- Self-documenting syntax: just enough magic
|
||||||
- Open standard: no vendor lock-in
|
- Open standard: no vendor lock-in
|
||||||
- Archive formats: =.ul=, =.ubin=, =.uatom=
|
- Archive formats: =.ul=, =.rom=
|
||||||
|
|
||||||
* License
|
* License
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue