TITLE: Undâr Programming Language #+AUTHOR: Zongor #+EMAIL: archive@undar-lang.org #+DATE: [2025-04-05] #+LANGUAGE: en #+OPTIONS: H:4 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t #+STARTUP: align fold nodlcheck hidestars oddeven lognotestate #+TAGS: { TODO(t) NEXT(n) DONE(d) | HOLD(h) WAITING(w) CANCELLED(c) } #+PROPERTY: header-args :tangle-mode (identity #o0644) A permacomputing & 3D video game oriented language transpiler. * Getting Started ** Requirements *** Main - C compiler that supports C89 ** Build #+BEGIN_SRC sh git clone https://git.alfrescocavern.com/zongor/undar-lang.git cd undar-lang && ./build #+END_SRC * 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 * Roadmap [[./ROADMAP.org][Compiler, Plex, Immidate mode GUI, Constructive solid geometry, Tunnels, Actor model]] * License MIT-0 * Inspirations - [[https://plan9.io/][Plan 9]] / 9P - Unified I/O, Tunnels. - [[https://en.wikipedia.org/wiki/Lisp_(programming_language)][Lisp]] - Live coding, REPL, introspection. - [[https://fortran-lang.org/][Fortran]] - Array semantics. - [[https://en.wikipedia.org/wiki/C_(programming_language)][C]] / [[https://ziglang.org/][Zig]] - Portability, control, minimalism. - [[https://lua.org][Lua]] - Friendly syntax, portable, and minimal. - [[https://www.craftinginterpreters.com/the-lox-language.html][Lox]] - The start of my programming language creation journey. - [[https://wiki.xxiivv.com/site/uxn.html][Uxn]] - Major inspiration, espeically around the core VM. - [[http://duskos.org/][Dusk OS]] - A much better system for doing permacomputing. - [[https://doc.cat-v.org/inferno/4th_edition/dis_VM_specification][Dis VM]] - CISC VM structure - Retro Systems - N64, PS1, Mac Classic, Windows 95 - UI esthetics