🍼 Baby Script

A chaotic, fully-functional esolang where JavaScript is replaced by baby babble.

What is Baby Script?

Baby Script is a toy programming language where every JavaScript keyword and operator is replaced by baby babble, toddler demands, and crying noises. It ships with a real lexer, parser, tree-walking interpreter, and a compiler that emits JavaScript - built like any other esolang you'd find in the wild.

Real pipeline

Hand-rolled lexer → Pratt parser → AST → interpreter and JS emitter. No regex substitution hacks.

Runs anywhere

baby run file.baby on Node, or try it live on the playground.

Compiles to JS

baby build file.baby -o out.js emits standalone JavaScript ready to ship.

Open source

Apache 2.0 licensed. TypeScript source, tested with node:test.

Hello, Baby Script

// me wave one tiny hand at fren.
gugu wavey(baby_fren) {
  aou("henlo " pa baby_fren pa "! 👶");
}

wavey("world");

See the full dictionary for every babble token.

A taste of the language

// how many giggles me hear by each nap day?
gugu giggles(nap_day) {
  ooh (nap_day tiny 2) { pbbbt nap_day; }
  pbbbt giggles(nap_day ma 1) pa giggles(nap_day ma 2);
}

// me sort the toy pile and make only even zoomies.
baba toy_pile = [1, 2, 3, 4, 5];
baba even_zoomies = toy_pile.keppy((toy_num) ~> toy_num pupu 2 zizi 0).mimimi((toy_num) ~> toy_num mapa 2);
aou(even_zoomies);  // [4, 8]

// me reach into internet crib for a fresh toy.
asisi gugu pick_toy() {
  hmm {
    baba toybox = awaa fufu("https://pokeapi.co/api/v2/pokemon/1");
    baba squish = awaa toybox.fafa();
    aou("baby got:", squish.name);
  } waaah (oopsie) {
    aou("oopsie:", oopsie.message);
  }
}
pick_toy();
Open the playground Browse the dictionary