PAPERS & DOCUMENTATION

Research papers, technical specifications, and implementation guides for Lateralus, LateralusOS, FRISC OS, and NullSec Linux.

32
Documents
700+
Pages
5
Projects
◉ FILTER
_×
◇ RESEARCH PAPERS
_×

Lateralus: A Pipeline-Native Programming Language

bad-antics · 24 pages · March 2025 · Research

A comprehensive look at the design of a language built around the pipeline operator. Covers pipeline operator semantics, Hindley-Milner type inference, algebraic data types, and the compiler architecture.

Abstract: We present Lateralus, a compiled programming language where the pipeline operator |> is a first-class citizen rather than syntactic sugar. We demonstrate that pipeline-native design reduces cognitive complexity by 23–41% compared to equivalent nested-call patterns, while preserving type safety through Hindley-Milner inference.

↓ Download PDF

Building a Bare-Metal OS with a High-Level Language

bad-antics · 18 pages · May 2025 · Research

How LateralusOS uses the Lateralus-to-C99 transpiler in freestanding mode to build an operating system kernel without sacrificing high-level language ergonomics.

Abstract: We describe the architecture of LateralusOS, a research operating system whose kernel is written in Lateralus and compiled to C99 via the language’s multi-target backend. We detail the C99 transpiler’s freestanding mode, memory management without a standard library, and hardware abstraction layer design.

↓ Download PDF

Pipeline-Oriented Security Analysis: A Composable Approach

bad-antics · 15 pages · July 2025 · Research

Using Lateralus pipelines to build composable security tools — port scanners, TLS validators, HTTP analyzers, and DNS enumerators as chainable pipeline stages.

Abstract: We demonstrate how pipeline-oriented programming enables composable security analysis tools. A port scanner, TLS certificate validator, HTTP header analyzer, and DNS enumerator are implemented as independent pipeline stages that can be freely composed, reordered, and extended.

↓ Download PDF

Formalizing Pipeline Semantics: Algebraic Foundations

bad-antics · 22 pages · November 2024 · Research

A formal treatment of the pipeline operator as a category-theoretic morphism, with proofs of associativity, identity, and composition laws.

Abstract: We formalize the semantics of the Lateralus pipeline operator |> using category theory. We show that pipelines form a category where objects are types and morphisms are pipeline-compatible functions, prove associativity and identity laws, and demonstrate how error-propagating pipelines (|?>) correspond to Kleisli composition over the Result monad.

↓ Download PDF

Memory Safety Without Garbage Collection: Ownership in Lateralus

bad-antics · 19 pages · June 2024 · Research

How Lateralus achieves memory safety through an ownership and borrowing system when targeting C99, without runtime garbage collection overhead.

Abstract: We present the Lateralus ownership model for native compilation targets. Unlike managed-runtime languages, Lateralus enforces memory safety at compile time through affine types and region-based borrowing. We compare performance against equivalent C and Rust programs across 14 benchmarks, showing competitive throughput with zero GC pauses.

↓ Download PDF

Toward a Pipeline-Native Language: Design Rationale

bad-antics · 14 pages · September 2023 · Research

The original design document for Lateralus — why existing pipeline proposals (F#, Elixir, TC39) fall short, and what a language built around |> from day one would look like.

Abstract: We survey existing pipeline operator implementations across F#, Elixir, OCaml, and the TC39 proposal for JavaScript. We identify common limitations — syntactic sugar over function application, no error propagation, no async integration — and propose Lateralus, a language where the pipeline operator is a first-class semantic construct with variants for error handling, async streaming, and parallel fan-out.

↓ Download PDF

Pattern Matching and Algebraic Data Types: A Practical Survey

bad-antics · 16 pages · March 2024 · Research

A survey of pattern matching implementations across ML, Haskell, Rust, and Swift, and how Lateralus combines exhaustiveness checking with pipeline integration.

Abstract: We compare pattern matching and algebraic data type (ADT) implementations across six languages. We then describe Lateralus’s approach: ADTs with named fields, nested destructuring in match arms, exhaustiveness checking via the type system, and seamless integration with pipeline operators for match-and-forward patterns.

↓ Download PDF

Capability-Based Security for Systems Programming

bad-antics · 13 pages · January 2024 · Research

How LateralusOS uses capability tokens instead of access control lists for system resource management, and why this model composes naturally with pipelines.

Abstract: We describe the capability-based security model in LateralusOS, where access to files, network sockets, and hardware is mediated by unforgeable capability tokens. We show how capability passing composes with Lateralus pipeline operators, enabling least-privilege security policies that are enforced at compile time rather than runtime.

↓ Download PDF

FRISC OS: A Minimal RISC-V Operating System for Education

bad-antics · 20 pages · June 2025 · Research

Design and implementation of FRISC OS, a from-scratch operating system targeting the RISC-V 64-bit architecture. Built for teaching OS concepts on modern open hardware.

Abstract: We present FRISC OS (Free RISC Operating System), a minimal operating system for the RISC-V RV64GC architecture. Unlike educational OS projects that target x86, FRISC OS embraces RISC-V’s clean privilege model (M/S/U modes), device tree discovery, and the PLIC interrupt controller. We cover the boot sequence, Sv39 virtual memory, a buddy-system physical allocator, cooperative scheduling, and a UART-based shell.

↓ Download PDF

SMP Scheduling on RISC-V: Multi-Hart OS Design

bad-antics · 15 pages · December 2025 · Research

How FRISC OS implements symmetric multiprocessing on RISC-V — hart discovery, inter-processor interrupts, and lock-free run queues.

Abstract: We describe the SMP implementation in FRISC OS v0.4. Topics include hart enumeration via the device tree, software-generated inter-processor interrupts (IPIs) through the CLINT, per-hart run queues with work stealing, and a ticket-lock implementation for shared kernel data structures. We benchmark scheduling latency across 1–8 harts on QEMU virt.

↓ Download PDF

NullSec Linux: Building a Security-Focused Distribution

bad-antics · 18 pages · August 2024 · Research

Architecture and design decisions behind NullSec Linux — a penetration testing distribution built on Arch with custom kernel hardening and pipeline-native security tools.

Abstract: We present NullSec Linux, a rolling-release Linux distribution purpose-built for penetration testing and security research. We detail the Arch Linux base selection rationale, custom kernel configuration (lockdown LSM, restricted unprivileged BPF, hardened usercopy), tool curation methodology for 200+ packages, and the integration of Lateralus pipeline-native security scanners as first-class citizen tools.

↓ Download PDF

Pipeline-Native Penetration Testing: Composable Offensive Security

bad-antics · 14 pages · January 2026 · Research

Using Lateralus pipelines to chain reconnaissance, exploitation, and post-exploitation stages into reproducible, auditable attack workflows.

Abstract: We demonstrate a pipeline-native approach to penetration testing where each attack phase — target enumeration, service fingerprinting, vulnerability scanning, exploitation, and data exfiltration — is implemented as a composable Lateralus pipeline stage. We show that pipeline-based workflows are reproducible, version-controllable, and produce structured output suitable for automated reporting.

↓ Download PDF

Lateralus-Controlled HHO Electrolysis: Autonomous Off-Grid Power Systems

bad-antics · 26 pages · October 2025 · Research

A comprehensive study of using Lateralus pipeline-native control systems to manage HHO electrolysis for indefinite off-grid power generation, covering closed-loop water recovery, adaptive PID electrolysis control, and energy budget analysis.

Abstract: We present an autonomous off-grid power architecture centered on hydrogen-oxygen (HHO) electrolysis controlled by the Lateralus programming language. The system models the complete energy pipeline — water purification, electrolysis, gas separation, storage, fuel cell conversion, and water vapor recovery — as a typed pipeline with real-time fault propagation. We demonstrate 85–93% water recovery rates and adaptive duty-cycle control that responds to variable energy inputs within 100ms. Field trials show continuous 30-day operation on a micro-hydro bootstrap source with zero manual intervention.

↓ Download PDF

Solar-HHO Hybrid Architecture: Pipeline-Native Energy Management

bad-antics · 22 pages · December 2025 · Research

Combining solar photovoltaics with Lateralus-controlled HHO electrolysis and PEM fuel cells for 24/7 off-grid operation — solar by day, hydrogen by night, with no battery degradation.

Abstract: We describe a hybrid energy architecture that pairs solar photovoltaic arrays with HHO electrolysis and PEM fuel cell stacks, orchestrated by the Lateralus runtime. The decision engine routes surplus solar energy into hydrogen production during peak irradiance and switches to fuel cell output after sunset. We present seasonal adaptation algorithms, a 24-hour energy profile model for mid-latitude deployments, and a 20-year total cost of ownership comparison showing 64% savings over solar-plus-lithium configurations due to eliminated battery replacement cycles.

↓ Download PDF

Indefinite Off-Grid Operation: HHO Fuel Cell Systems Without Solar Dependency

bad-antics · 18 pages · January 2026 · Research

Running HHO systems indefinitely in environments where solar is unavailable — underground, arctic, dense canopy, and disaster recovery scenarios powered by micro-hydro, wind, and thermoelectric bootstrap sources.

Abstract: We investigate HHO electrolysis deployment scenarios where photovoltaic energy is unavailable or impractical. Five deployment classes are analyzed: subterranean (micro-hydro bootstrap), polar (wind-HHO with snow-melt feedwater), dense-canopy (thermoelectric), maritime (wave-powered), and mobile disaster recovery (alternator bootstrap transitioning to independent fuel-cell operation). Lateralus pipeline controllers manage intermittent energy sources, prioritize critical loads, and maintain water loops with alternative purification methods. Field data from a 78°N arctic camp demonstrates 45-day autonomous operation through polar night on a 2 kW wind turbine with 35% average capacity factor.

↓ Download PDF
⌬ TECHNICAL SPECIFICATIONS
_×

Lateralus Language Specification v3.0

bad-antics · 62 pages · January 2026 · Spec

The complete formal specification of the Lateralus programming language, version 3.0. Covers every language construct from lexical grammar to runtime semantics.

Abstract: This document defines the formal grammar, type system (Hindley-Milner inference with algebraic data types), module system, pipeline operator family (|>, |?>, |!>), async/await model, FFI, and standard library interfaces for Lateralus v3.0.

↓ Download PDF

LateralusOS Architecture Reference

bad-antics · 45 pages · November 2025 · Spec

Full architecture reference for LateralusOS — from boot sequence to GUI desktop. Covers every subsystem in the operating system.

Abstract: This reference documents the LateralusOS architecture: Multiboot2 boot sequence, memory layout and page tables, virtual filesystem (VFS), cooperative scheduler, TCP/IP stack, device driver model, and the graphical desktop environment.

↓ Download PDF

Lateralus Bytecode Format (LBC)

bad-antics · 20 pages · August 2025 · Spec

The binary specification for .lbc compiled files — instruction encoding, constant pool layout, and debug information format.

Abstract: This specification defines the Lateralus Bytecode (LBC) binary format used by .lbc files. It covers the file header, instruction encoding (opcode + operand formats), constant pool structure, function tables, and embedded debug information for source mapping.

↓ Download PDF

Lateralus Module System & Package Format

bad-antics · 28 pages · February 2025 · Spec

The specification for .ltl module resolution, the lateralus.toml manifest format, and the package registry protocol.

Abstract: This document specifies the Lateralus module system: hierarchical module paths, visibility rules (pub / pub(crate)), cyclic dependency detection, the lateralus.toml manifest schema, semantic versioning constraints, and the HTTP-based package registry API for publishing and resolving dependencies.

↓ Download PDF

Lateralus Language Specification v1.0

bad-antics · 34 pages · December 2023 · Spec

The original language specification covering the core syntax, type system, and standard library of Lateralus v1.0.

Abstract: This document defines the initial formal grammar, primitive and compound types, function definitions, pipeline operator (|>) semantics, pattern matching syntax, and the minimal standard library for Lateralus v1.0. This version established the foundational language constructs upon which all subsequent versions build.

↓ Download PDF

FRISC OS Architecture Reference

bad-antics · 32 pages · January 2026 · Spec

Complete architecture reference for FRISC OS — RISC-V boot sequence, memory layout, trap handling, device drivers, and filesystem interfaces.

Abstract: This reference documents the FRISC OS architecture for the RV64GC platform: OpenSBI handoff, M-mode to S-mode transition, Sv39 page table layout, trap vector configuration, PLIC and CLINT interrupt handling, virtio device drivers (GPU, network, block), the VFS layer with FAT32 support, and the system call interface.

↓ Download PDF

NullSec Linux Kernel Configuration Reference

bad-antics · 16 pages · October 2025 · Spec

The hardened kernel configuration used by NullSec Linux — every security-relevant CONFIG_ option documented and justified.

Abstract: This document catalogs every security-relevant kernel configuration option in the NullSec Linux custom kernel build. Topics include lockdown LSM mode, restricted /dev/mem access, module signature enforcement, KASLR, stack protector options, usercopy hardening, and BPF JIT restrictions. Each option includes rationale and trade-off analysis.

↓ Download PDF

NullSec Tool Integration Protocol

bad-antics · 11 pages · February 2026 · Spec

The JSON-based protocol that allows any security tool to integrate with the NullSec pipeline framework — input schemas, output formats, and tool metadata.

Abstract: This specification defines the NullSec Tool Integration Protocol (NTIP), a JSON-based interface for registering third-party security tools with the NullSec pipeline framework. It covers tool manifest files, input/output schema definitions (JSON Schema), result severity levels, SARIF-compatible output, and the nullsec-register CLI workflow.

↓ Download PDF

Lateralus Energy Pipeline Protocol (LEPP)

bad-antics · 24 pages · February 2026 · Spec

The formal specification for Lateralus-controlled energy systems — sensor bus protocol, telemetry stream format, safety interlock state machine, and real-time PID control interfaces for HHO electrolysis, fuel cells, and hybrid solar configurations.

Abstract: This specification defines the Lateralus Energy Pipeline Protocol (LEPP), a typed message bus for real-time energy system control. It covers sensor registration and discovery, telemetry stream schemas (pressure, flow, temperature, gas concentration), the safety interlock finite state machine (5 states, 12 transitions), PID controller parameterization for electrolysis cells, fuel cell stack management commands, and the energy routing decision protocol. LEPP messages are encoded as Lateralus algebraic data types and transmitted over a 100 Hz control bus with guaranteed <10ms latency.

↓ Download PDF
❋ GUIDES & WHITEPAPERS
_×

Zero to Language: Building a Programming Language from Scratch

bad-antics · 38 pages · February 2026 · Guide

A complete, step-by-step guide to building a programming language — from the first tokenizer to a published PyPI package.

Abstract: This guide walks through the complete lifecycle of creating a programming language: lexical analysis (tokenizer), parsing (recursive descent), AST construction, type checking, code generation (Python + C99 backends), REPL, packaging, and publishing to PyPI as lateralus-lang.

↓ Download PDF

Multi-Target Compilation: Python and C99 from One Source

bad-antics · 12 pages · September 2025 · Guide

How the Lateralus compiler generates both Python and C99 from a single source file using a shared intermediate representation.

Abstract: We describe the Lateralus compiler’s multi-target architecture: a shared intermediate representation (IR), optimization passes that run before target selection, and the Python and C99 code generation backends that produce idiomatic output for each platform.

↓ Download PDF

Developer Ecosystem Engineering

bad-antics · 16 pages · December 2025 · Guide

How to build an ecosystem around a new programming language — from repository structure to documentation strategy.

Abstract: This whitepaper documents the engineering decisions behind the Lateralus ecosystem: 22+ repositories, tutorial series, web playground, VS Code extension, CI/CD pipelines, documentation generation, and community onboarding strategy.

↓ Download PDF

Writing a REPL: Interactive Language Development

bad-antics · 10 pages · April 2024 · Guide

A guide to building the Lateralus REPL — line editing, tab completion, incremental parsing, and persistent history.

Abstract: This guide walks through the construction of the Lateralus REPL (Read-Eval-Print Loop). Topics include incremental tokenization for multi-line input, readline-style editing with tab completion, REPL-specific evaluation modes (expression vs. statement), persistent history, and colored output formatting.

↓ Download PDF

From Lexer to Language: Building Your First Tokenizer

bad-antics · 8 pages · August 2023 · Guide

The first tutorial in the Lateralus development series — building a tokenizer that handles pipelines, string interpolation, and Unicode identifiers.

Abstract: This beginner-friendly guide covers the fundamentals of lexical analysis using the Lateralus tokenizer as a case study. Starting from a single-character scanner, we incrementally add support for multi-character operators (|>, |?>), string interpolation with {expr}, Unicode identifiers, and meaningful error messages with source locations.

↓ Download PDF

Bootstrapping a Language Compiler in Python

bad-antics · 20 pages · May 2024 · Guide

Practical lessons from implementing the Lateralus compiler in Python — from prototype to PyPI package with 80+ standard library functions.

Abstract: This guide documents the journey of bootstrapping the Lateralus compiler as a Python package. Topics include recursive descent parser design, AST node architecture, the visitor pattern for code generation, testing strategies for language implementations, and publishing to PyPI with proper entry points and console scripts.

↓ Download PDF

Writing a RISC-V OS from Scratch

bad-antics · 28 pages · September 2025 · Guide

A step-by-step guide to building FRISC OS — from the first UART “Hello” to a multi-hart kernel with virtual memory and a GUI.

Abstract: This guide walks through building an operating system for RISC-V from bare metal. Starting with a minimal M-mode program that prints to UART, we incrementally add S-mode entry, page tables (Sv39), a physical memory allocator, trap handling, timer interrupts, a cooperative scheduler, virtio device drivers, and a framebuffer GUI. Each chapter includes the complete source code diff.

↓ Download PDF

Building a Penetration Testing Distro: The NullSec Way

bad-antics · 22 pages · September 2024 · Guide

How NullSec Linux is built — from Arch ISO bootstrap to custom packages, kernel patching, and automated testing of 200+ security tools.

Abstract: This guide documents the complete build process for NullSec Linux: bootstrapping from the Arch Linux ISO, building a custom kernel with security hardening patches, curating and packaging 200+ security tools, creating the XFCE desktop theme, building the live USB image with optional persistence, and the CI/CD pipeline that tests every tool on every release.

↓ Download PDF