Skip to content
Ridgun
English

The Ridgun Book · English

The Ridgun Book

Forty-three chapters: the language, from why Ridgun exists to parallel graphs, agents, tensors and memory regions, and then each standard library. The team wrote every edition, so code and explanations match chapter for chapter.

Ridgun, the mascot: a lynx with the horns of a ram, drawn as an ink engraving.
  1. 00Why Do I Need Ridgun? Oh Really? I Had No Idea... Tell Me More!
  2. 01Your First Contact with Ridgun (No Boilerplate, No Braces, No Semicolons)
  3. 02Your Two Best Friends: ridgunc and stable (Zero YAML Files, Promised)
  4. 03Functions, Type Signatures, and the Art of Writing Code as a Table
  5. 04Goodbye if/else, Goodbye while (Pattern Matching, Guards, and TCO)
  6. 05Lists, Tuples, and the Ninja Trick of Sequences
  7. 06Algebraic Data Types (ADTs), Polymorphism, and Why We Don't Want null or Any Here
  8. 07Higher-Order Functions and Sweat-Free Parallelism (No Mutex, No Deadlocks)
  9. 08Tensors, RMM Compiled Memory (RMM1/RMM2), Regions, and Systems
  10. 09The str Lib — Text Manipulation, Search, and Tabular Padding
  11. 10The math Lib — Safe Division, Number Theory, and Statistics
  12. 11The list Lib — Slicing, $O(N \log N)$ Mergesort, and Associative KV Maps
  13. 12The btree Lib — Persistent $O(\log N)$ AVL Maps, Sets, and Priority Queues
  14. 13The tensor Lib — Multi-Dimensional Tensors, Views, and Einstein Contraction
  15. 14The linalg Lib — Tensor[Real] Linear Algebra, Bareiss Solver, and Activations
  16. 15The codec Lib — RFC 4648 Hex, Base64, Base64url, and URL Percent-Encoding
  17. 16The json Lib — Recursive RFC 8259 AST Parser, Pretty-Printer, and Dot-Path Queries
  18. 17The csv Lib — RFC 4180 CSV/TSV State-Machine Parser and Header-Indexed Tables
  19. 18The ini Lib — Sectioned .ini Configs, .env Files, and Variable Interpolation
  20. 19The regex Lib — Linear-Time $O(N \cdot M)$ Thompson NFA Regular Expression Engine
  21. 20The glob Lib — Wildcard Patterns (*, ?, [a-z]) and List Filtering
  22. 21The diff Lib — LCS Line Diff, Edit Distance, Unified Diff, and Patching
  23. 22The template Lib — Safe Mustache Templates with HTML and LaTeX Auto-Escaping
  24. 23The fmt Lib — Canonical 2D Tabular Formatter and 9-Target Syntax Highlighter
  25. 24The cli Lib — Flags, Options, -- Barrier, Subcommands, and Typed Env Readers
  26. 25The path Lib — POSIX Normalization (path clean) and Path-Traversal Confinement
  27. 26The time Lib — Howard Hinnant UTC Calendar, ISO-8601, Durations, and Backoff
  28. 27The uuid Lib — RFC 9562 UUIDv4/UUIDv7, Checksums (CRC-32), and PRNG
  29. 28The log Lib — Structured NDJSON Logging and Automatic Secret Redaction
  30. 29The test Lib — Unit and Functional Test Assertion Primitives (RG-011)
  31. 30The posix Lib — 2-Layer PAL (SysOs, SysArch), Clocks, Signals, and CSPRNG
  32. 31The io Lib — Typed IoResult Errors, with timeout Descriptor I/O, and Processes
  33. 32The crypto Lib — SHA-256, HMAC, PBKDF2, Argon2id, and ChaCha20-Poly1305 AEAD
  34. 33The argon2id Lib — RFC 9106 Argon2id on Tensor[U64 * 8 * 16], Blake2b, and OWASP Presets
  35. 34The jwt Lib — RFC 7519 HS256 JSON Web Tokens and ChaCha20-Poly1305 Encrypted Tokens
  36. 35The socket Lib — TCP, UDP, AF_UNIX, Framing, DNS, and RGF-001 Kernel Sockets
  37. 36The http Lib — RFC 3986 URIs, RFC 9112 HTTP/1.1 Wire Codec, and Live TCP Client
  38. 37The ws Lib — RFC 6455 WebSocket Handshake, 16/64-Bit Frame Codec, and XOR Masking
  39. 38The agent Lib — Native Actor Concurrency (agent, send, receive), KV Store, and Rate Limiter
  40. 39The pool Lib — Bounded Worker Pool, Round-Robin Dispatch, and Work-Stealing
  41. 40The net_agent Lib — Socket Connection Actor Supervisor and Non-Blocking Event Bridge
  42. 41The ai lib — AI Agents, Tool Calling, SSE Streaming, Bounded ReAct, Guardrails, Mini-RAG & MCP
  43. 42The locale Lib — CLDR Plural Rules, UTC Date & Number Formatting, and Language Autonyms

Other languages