A permacomputing & 3D video game oriented programming language.
Go to file
zongor 6310390cc4 Add initial compiler 2026-03-02 21:35:45 -08:00
arch add header gen tool, add main, add archs 2026-02-28 00:48:09 -08:00
emit Add initial compiler 2026-03-02 21:35:45 -08:00
tools add header gen tool, add main, add archs 2026-02-28 00:48:09 -08:00
.gitignore add header gen tool, add main, add archs 2026-02-28 00:48:09 -08:00
LICENSE Initial commit 2026-02-27 21:56:09 -05:00
README.org add header gen tool, add main, add archs 2026-02-28 00:48:09 -08:00
ROADMAP.org add header gen tool, add main, add archs 2026-02-28 00:48:09 -08:00
build add header gen tool, add main, add archs 2026-02-28 00:48:09 -08:00
lexer.c Add initial compiler 2026-03-02 21:35:45 -08:00
lexer.h Add initial compiler 2026-03-02 21:35:45 -08:00
libc.c Add initial compiler 2026-03-02 21:35:45 -08:00
libc.h Add initial compiler 2026-03-02 21:35:45 -08:00
main.c Add initial compiler 2026-03-02 21:35:45 -08:00
parser.c Add initial compiler 2026-03-02 21:35:45 -08:00
parser.h Add initial compiler 2026-03-02 21:35:45 -08:00

README.org

TITLE: Undâr Programming Language

A permacomputing & 3D video game oriented language transpiler.

Getting Started

Requirements

Main

  • C compiler that supports C89

Build

git clone https://git.alfrescocavern.com/zongor/undar-lang.git
cd undar-lang && ./build

Memory Management

memory is stack based only.

For a limited dynamic style you can create unbounded arrays which go on a pre-allocated memory pool.

dynamic allocations push pointers within a call frame. when a frame exits, the pointer is reset and the child copys its return value to the end of the parent, thus freeing memory deterministically.

values passed to functions must be explicitly returned to propagate. if a value is modified in a child function it will change the parents value, unless the size of the structure changes then it will copy the parents value and append it to its own frame with the modification. this allows for the low resource usage of a C but the convenience of a Java/Go without the garbage collection.

Core Types

Type Description
byte Character/8 bit unsigned int
u8 8 bit unsigned int
i8 8 bit signed int
u16 16 bit unsigned int
i16 16 bit signed int
u32 exactly 32-bit unsigned integer
i32 exactly 32-bit signed integer
int signed number
nat unsigned number
real Q16.16 fixed-point real number
str fat pointer [length + data] string
bool true/false

primitive types like int, nat, real, etc. will always be safe to change in child frames.

complex types like str, plex or arrays will be references to their location in the memory pool

License

MIT-0

Inspirations

  • Plan 9 / 9P - Unified I/O, Tunnels.
  • Lisp - Live coding, REPL, introspection.
  • Fortran - Array semantics.
  • C / Zig - Portability, control, minimalism.
  • Lua - Friendly syntax, portable, and minimal.
  • Lox - The start of my programming language creation journey.
  • Uxn - Major inspiration, espeically around the core VM.
  • Dusk OS - A much better system for doing permacomputing.
  • Dis VM - CISC VM structure
  • Retro Systems - N64, PS1, Mac Classic, Windows 95 - UI esthetics