Uiua

Table of Contents

Introduction to Uiua

Uiua (pronounced "wee-wuh") is a modern array programming language that distinguishes itself through its unique stack-based paradigm. Unlike traditional array languages that rely on named variables, Uiua embraces a tacit programming style where data flows through an implicit stack. This approach creates remarkably concise and expressive code while maintaining readability through carefully designed glyphs.

The language builds upon decades of array programming research, drawing inspiration from APL, J, and BQN, while introducing innovative stack manipulation semantics that feel fresh and intuitive.

Comparison to APL/J/BQN

While APL pioneered array-oriented thinking with its mathematical notation, and J modernized it with ASCII characters, Uiua takes a different path. Where APL uses trains and J uses hooks and forks, Uiua employs stack combinators. BQN's influence is visible in Uiua's clean glyph design, but Uiua's stack-based execution model creates a fundamentally different programming experience.

The key distinction is immediacy: in Uiua, every function consumes arguments from the stack and pushes results back, creating a natural left-to-right flow that many find more intuitive than APL's right-to-left evaluation.

Key Concepts

Tacit Programming

Functions are composed without explicitly naming parameters. The stack serves as the implicit data channel between operations.

Stack Manipulation

Combinators like dup (duplicate), flip (swap), and over (copy second) enable elegant data flow without variables.

Simple Code Examples

# Sum of squares from 1 to 10
/+ⁿ2⇡10

# Reverse a list
⇌ [1 2 3 4 5]

# Fibonacci sequence (first 10)
⊃⊢(↘1)⊂:⍥10 [0 1]

Resources

Author: Jason Walsh

j@wal.sh

Last Updated: 2025-12-22 21:15:43

build: 2025-12-23 09:12 | sha: e32f33e