.yourmom Language

Version: VQ 3.0 Latest: 1.1.0 Creator: viewerofall
"Holy C but what the fuck happened"

A quantum-enabled esoteric programming language that transpiles to C. Your mom jokes are the error messages. The CLI is a family therapy session.

Quick Links

  1. Overview
  2. Install
  3. Quick Start
  4. Hello World
  5. Features at a Glance
  6. Compilation Architecture
  7. Syntax Reference
  8. Quantum Mechanics
  9. Standard Library
  10. CLI Commands
  11. Build System

Overview

.yourmom is a quantum-enabled esoteric programming language that transpiles to pure C via GCC. It provides:

Despite the humor, it compiles to real native binaries with C-level performance.

Install

From AUR (Arch Linux):

paru -S yourmom

From source:

git clone https://github.com/viewerofall/yourmom
cd yourmom
cargo build --release
# Add ./target/release/yourmom to your PATH

Global install:

cargo install --path .

Quick Start

yourmom childmake hello.yourmom          # Compile to binary
yourmom run hello.yourmom                 # Compile and run
yourmom childmake hello.yourmom -o hello  # Custom output name
yourmom abortion                          # Clean generated C files
yourmom childmake project.yourdad         # Project-based build

Hello World

yo mama_main() {
    ymf("Hello, World!")
}

mama_main is the entry point. ymf is print. That's it.

What Makes This Different

Feature Description
Quantum superposition yo x = 1 | 2 | 3 — collapses to one value on first read, stays there
Heisenberg variables Re-collapse to a new value every single read
Entangled variables Two variables that always share the same collapsed value
8 number types int, real, rational, irrational, imaginary/complex, quaternion, transfinite
Schrödinger's if Ignores its own condition, flips a quantum coin instead
Auto library detection Uses function names in your code to auto-detect and link C libraries
.yourdad build system Like Cargo.toml but cursed
.momjoke shorthand Alias system for stdlib functions
Your mom joke errors Every compile error and crash is a yo mama joke

Compilation Architecture

The compilation pipeline:

.yourmom source
    ↓ Lexer (expands .momjoke shortcuts)
    ↓ Parser (builds AST)
    ↓ Codegen (emits C)
    ↓ Auto-detects needed libraries (pkg-config)
    ↓ GCC
native binary

The quantum runtime is a pure C header (quantum_runtime.h) with no external dependencies. Superposition uses lazy collapse via rand(). Heisenberg skips the collapse cache. Try/catch uses setjmp/longjmp.

Syntax Reference

Variables

yo x = 42             // integer
yo name = "hello"     // string
yo pi = 3.14          // float
x = x + 1             // re-assignment

Functions

yo add(a, b) {
    did_your_mom a + b
}

yo mama_main() {
    yo result = doing_your_mom add(10, 20)
    ymf(result)
}

Control Flow

If/else:

mama_said x > 0 {
    ymf("positive")
} mama_lied {
    ymf("not positive")
}

While:

mama_keeps_saying x > 0 {
    x = x - 1
}

Goto:

mama_forgot my_label
ymf("this is skipped")
my_label:
    ymf("execution jumps here")

Schrödinger's if — ignores condition, flips quantum coin:

mama_said_maybe {
    ymf("branch A")
} mama_lied {
    ymf("branch B")
}

Try/catch:

yo_daddy_issues {
    ymf("risky code")
} mama_caught {
    ymf("something went wrong")
}

Comments

// single-line comment only

Quantum Mechanics System

Basic Superposition

yo x = 10 | 20 | 30 | 40
ymf(x)    // collapses to one value, e.g. 20
ymf(x)    // same value — already collapsed
ymf(x)    // still 20

First read triggers collapse (random selection, seeded RNG). All subsequent reads return the same cached value.

Number Type Superpositions

Type Description Example
int_all All 32-bit integers -847291043
real_all All double-precision floats 1.7976931348623e+308
rational_all Rational numbers (reduced fractions) 355/113
irrational_all Famous irrational constants pi ~= 3.14159265358979
imaginary_all Complex numbers 3.5+2.1i
quaternion_all Quaternions 1.2+3.4i+5.6j-7.8k
transfinite_all Infinite cardinals and ordinals omega^omega

Heisenberg Variables

Re-collapse to a new random value every time they are read:

yo h = heisenberg(10 | 20 | 30)
ymf(h)    // might print 10
ymf(h)    // might print 30
ymf(h)    // might print 20

Entangled Variables

Always collapse to the same value as another variable:

yo x = 1 | 2 | 3
yo y = entangled_with x
ymf(x)    // e.g. 2
ymf(y)    // also 2, guaranteed

Quantum Sort

Sorts a superposition and collapses to the minimum:

yo s = quantum_sort(5 | 3 | 1 | 4 | 2)
ymf(s)    // prints: [1, 2, 3, 4, 5] -> 1

Standard Library

Defined in jksmpl.momjoke. Automatically loaded by the compiler.

Core Shortcuts

Shorthand Full Form Description
ymf yo_mama_so_fat Print with newline
ymd yo_mama_so_dumb Panic / abort
ymsu yo_mama_so_ugly Unsafe block
dym doing_your_mom Function call
ret did_your_mom Return

I/O Functions

Function Description
yo_mama_so_fat(x) Print value with newline
yo_mama_so_loud(s) Print uppercase with 🔊 emoji
yo_mama_so_nosy() Read integer from stdin
yo_mama_so_quiet() Read string from stdin

Math Functions

Function Description
yo_mama_so_random() Random integer
yo_mama_so_random_between(min, max) Random int in range
yo_mama_so_round(x) Round to nearest integer
yo_mama_so_square(x) Square (x²)
yo_mama_so_thicc(x) Absolute value
yo_mama_so_wide(x) Square root

String Functions

Function Description
yo_mama_so_long(s) String length
yo_mama_so_cheap_copy(dst, src) String copy
yo_mama_so_connected(dst, src) String concatenation
yo_mama_so_found(haystack, needle) String search (returns 1/0)
yo_mama_so_upper(str) In-place uppercase conversion
yo_mama_so_lower(str) In-place lowercase conversion

Memory Functions

Function Description
yo_mama_so_fat_malloc(size) Allocate memory
yo_mama_so_cheap_free(ptr) Free memory

Quantum Functions

Function Description
heisenberg(vals) Create Heisenberg variable
entangled_with var Create entangled variable
quantum_sort(vals) Sort superposition, collapse to minimum
yo_mama_observe(var) Force collapse
yo_mama_collapsed(var) Check if already collapsed (1/0)

Advanced Functions

Function Description
yo_mama_so_dumb(msg) Panic with message, calls abort()
yo_mama_so_loud(s) Print uppercase with emoji
yo_mama_so_paranoid(cond) 50% chance of checking assertion
yo_mama_so_lazy(expr) Lazy evaluation — compute on first access
yo_mama_so_slow(ms) Sleep in milliseconds
yo_mama_so_nosy_about_files(path) Read file to malloc'd string
yo_mama_so_chatty_about_files(path, content) Write string to file

CLI Commands

Command Description
yourmom childmake <file> Compile .yourmom or .yourdad to binary
yourmom run <file> Compile and run immediately
yourmom abortion Clean generated C files
yourmom abortion --deep Deep clean (all generated artifacts)
yourmom divorce <binary> Remove a specific binary
yourmom family-tree <.dad> Print dependency tree
yourmom deadbeat <.dad> Find unused declared dependencies
yourmom custody list List loaded .momjoke files
yourmom custody add <file> Add a .momjoke file
yourmom custody remove <file> Remove a .momjoke file

Build System (.yourdad)

Project configuration file (like Cargo.toml):

daddy_says_build_this {
    sources: ["main.yourmom", "lib.yourmom"]
    output: "my_app"
    optimization: 2
    debug: false
    warnings: true
}

daddy_says_use_protection {
    c_libs: ["pthread"]
}

daddy_says_wear_these_hats {
    "jksmpl.momjoke"
    "my_utils.momjoke"
}

daddy_left {
    unsafe_optimizations: true
}

Sections

Auto Library Detection

When compiling, the compiler scans generated C code for known function names and automatically detects which libraries are needed. It then runs pkg-config for proper include paths and linker flags, and injects the required #include directives into the generated C file before passing it to GCC.

No manual linking required for:

raylib, SDL2, SDL2_mixer, SDL2_image, SDL2_ttf, GLFW, OpenGL, GLEW, pthread, libcurl, GTK+3, ncurses, OpenAL, libpng, zlib, sqlite3, OpenSSL, Vulkan, ALSA, X11, Wayland, Cairo, FreeType p>

Example: if your .yourmom code calls InitWindow(...), the compiler detects raylib, runs pkg-config raylib --cflags --libs, injects #include <raylib.h>, and links with the correct flags — automatically.

Custom Shortcuts (.momjoke Files)

.momjoke files are plain-text alias tables loaded by the lexer. Any shorthand encountered in source is expanded before tokenization.

Format:

# comment
short_name -> full_name

Example my_utils.momjoke:

prnt -> yo_mama_so_fat
panic -> yo_mama_so_dumb
sq -> yo_mama_so_square

QoL aliases (qol.momjoke):

ymff       -> printf
ymsleep    -> yo_mama_so_slow
ymrng      -> yo_mama_so_random_between
ymrf       -> yo_mama_so_nosy_about_files
ymwf       -> yo_mama_so_chatty_about_files
ymfound    -> yo_mama_so_found
ymupper    -> yo_mama_so_upper
ymlower    -> yo_mama_so_lower
ymstress   -> yo_mama_so_stressed

Error Messages

The compiler emits Rust-style diagnostics with source context and yo mama jokes:

💀 ERROR: expected `}`, found end of file
  ┌─ hello.yourmom:5:18
  │
5 │ yo mama_main() {
  │                ^ yo mama so dumb, she forgot to close this brace
  │
  = help: add `}` at the end of the function
  = note: yo mama so forgetful, she left the block wide open

C Interoperability

Any C function can be called directly using the call syntax. The auto-detection system handles includes and linking for known libraries:

yo mama_main() {
    // If raylib is installed, this just works
    dym InitWindow(800, 600, "My App")
    mama_keeps_saying dym WindowShouldClose() == 0 {
        dym BeginDrawing()
        dym ClearBackground(0, 0, 0, 255)
        dym DrawText("yo mama", 100, 100, 20, 255, 255, 255)
        dym EndDrawing()
    }
    dym CloseWindow()
}

Use yo_mama_so_ugly blocks for raw assembly or unsafe C:

yo_mama_so_ugly {
    __asm__("nop")
    __asm__("mov $42, %rax")
}

License

GPL-3.0-or-later

Created by viewerofall. GitHub: viewerofall/yourmom