Fortune but for lojban alice
  • Rust 78.2%
  • Nix 21.8%
Find a file
2026-07-17 13:13:07 +10:00
data Fri Jul 17 13:13:07 AEST 2026 2026-07-17 13:13:07 +10:00
src Fri Jul 17 13:13:07 AEST 2026 2026-07-17 13:13:07 +10:00
.gitignore Fri Jul 17 13:13:07 AEST 2026 2026-07-17 13:13:07 +10:00
Cargo.lock Fri Jul 17 13:13:07 AEST 2026 2026-07-17 13:13:07 +10:00
Cargo.toml Fri Jul 17 13:13:07 AEST 2026 2026-07-17 13:13:07 +10:00
flake.lock Fri Jul 17 13:13:07 AEST 2026 2026-07-17 13:13:07 +10:00
flake.nix Fri Jul 17 13:13:07 AEST 2026 2026-07-17 13:13:07 +10:00
LICENSE-APACHE Fri Jul 17 13:13:07 AEST 2026 2026-07-17 13:13:07 +10:00
LICENSE-MIT Fri Jul 17 13:13:07 AEST 2026 2026-07-17 13:13:07 +10:00
README.md Fri Jul 17 13:13:07 AEST 2026 2026-07-17 13:13:07 +10:00

alis

Prints a random section of la .alis., the Lojban translation of Alice's Adventures in Wonderland by Jorge Llambias, alongside the English text.

Each section is shown four ways:

  • the Lojban text
  • its zbalermorna rendering (a zbalermorna font is needed to see it)
  • a word-by-word gloss in the style of the CLL examples
  • the corresponding English paragraph

The first three show the same words in the same order, so matching colours mark the same word across them. The English is Carroll's own paragraph, not a back-translation, and stays uncoloured.

Usage

alis                     a random section from anywhere in the book
alis --chapter 7         a random section from the Mad Tea-Party
alis --chapter 3 -n 12   a specific section
alis --chapters          list the chapters
alis --seed 42           a reproducible pick

Chapter 0 is the prefatory poem, "All in the golden afternoon". Colour is on when stdout is a terminal; see --color and the NO_COLOR convention.

Building

The morphology, dictionary, and zbalermorna conversion come from the lojban-rs workspace, expected as a sibling checkout at ../lojban-rs.

cargo build --release

On NixOS, a dev shell with the toolchain is provided:

nix develop -c cargo build --release

Data

data/alice.tsv holds the aligned text and is committed, so building needs no network or extraction step. It contains the Lojban translation from lojban.org, the English text from Project Gutenberg #11, and the prefatory poem from Project Gutenberg #28885, which #11 omits.

The two sides do not match paragraph for paragraph everywhere. The checked-in TSV records the aligned sections used by the renderer.

License

The code is dual-licensed under MIT or Apache-2.0, at your option. The English text is in the public domain. The Lojban translation is by Jorge Llambias.