Content Warning

New #ual programmers can start coding following most ideas they would assume to work using Lua, and progressively adopt the ual-specific stacked mode when it makes sense. For example, in resource-constrained systems where an algorithm using a Forth-like stack can be more efficient for certain tasks.

The > operator indicates a line that operates on the stack system, using a vocabulary for the most part similar to Forth's.

The @stackname > expression allows the programmer to select on which stack the operations are executed. The system comes with a data stack (@dstack) and a return stack (@rstack) built-in, but you can instantiate new ones, since stacks are first class objects in ual.

Take for example this implementation of Dijkstra's shortest path algorithm, uses its own separate stack to perform its computation.
https://github.com/ha1tch/ual/blob/main/examples/dijkstra.ual

Hope you like it!

#ual #retrodev #retrocomputing #forth #lua #golang #programming #rc2014#ZXSpectrum #z80 #speccy #spectrum #embedded #rustlang #rust

Other ideas in the works:
  • Adding the zxa assembler as one additional backend, to produce Z80 binaries.
    https://github.com/ha1tch/zxa
    in the future this could allow ual programs to target the ZX Spectrum and the RC2014.

  • Adding a uxntal backend to produce uxn roms.

Introducing the concept of transmutation

  • Write ual, or Z80 assembler, then send uxn or Z80 binaries to an ESP32 system, and have the binaries transmuted into Xtensa or RISC-V binaries as sort of shaders that run in-mcu.

#ual #retrodev #retrocomputing #forth #lua #golang #programming #rc2014#ZXSpectrum #z80 #speccy #spectrum #embedded

Content Warning

This is something I pondered quite a lot about, and it looks almost Rust-like, which I believe offers a better way to handle errors at least for the typical use cases that ual aims for.

Let me know what you think!

#ual #retrodev #retrocomputing #forth #lua #golang #programming #rc2014#ZXSpectrum #z80 #speccy #spectrum #embedded #rustlang #rust

Content Warning

Other ideas in the works:
  • Adding the zxa assembler as one additional backend, to produce Z80 binaries.
    https://github.com/ha1tch/zxa
    in the future this could allow ual programs to target the ZX Spectrum and the RC2014.

  • Adding a uxntal backend to produce uxn roms.

Introducing the concept of transmutation

  • Write ual, or Z80 assembler, then send uxn or Z80 binaries to an ESP32 system, and have the binaries transmuted into Xtensa or RISC-V binaries as sort of shaders that run in-mcu.

#ual #retrodev #retrocomputing #forth #lua #golang #programming #rc2014#ZXSpectrum #z80 #speccy #spectrum #embedded

Content Warning

ual is a new programming language for small systems, it borrows from Lua, Forth, and Go/TinyGo.
https://github.com/ha1tch/ual

It's not a scripting language, it compiles to TinyGo, and Go, therefore binaries are produced for the same targets of those compilers. In the case of TinyGo using an optimised LLVM-based backend (esp32, risc-v, wasm, various mcus), and for mainstream server/desktop computing architectures via the Go compiler's own backend (x86-64, arm64, etc.) and OSes (Linux, Mac, Windows).
The general idea is that this design allows developers for fast iteration cycles on a workstation, with sound and safely tested algorithms before moving to a second stage workflow on the real embedded platform.

((Work in progrees))
Not ready to use yet, but I thought I'd RFC before I complete the first implementation, whilst there's still time to influence design.

Hope you find it interesting!

Spec:
https://github.com/ha1tch/ual/tree/main/spec

Examples:
https://github.com/ha1tch/ual/tree/main/examples

Let me know what you think!

#ual #retrocomputing #embedded #programming #z80 #riscv #esp32 #uallang #compsci #retrodev #forth #lua #golang

Content Warning

@georgetakei It’s a COBOL invalid date bug.

Musk is such a hacker that he doesn’t know these things.

Well played, sir.

#cobol #150years #programming #bug