Baguette#
BASIC with every bracket, quote and keyword baked into a French pastry.
Turing complete: unknown · ●○○ easy · esolangs.org
Tested with 3 known programs · Test method
Run it
The idea
Baguette# is meant to read like BASIC, with the names of pastries in place of the symbols. A program is a list of calls to a standard library of 43 functions, and each of them is named after a sweet too. Printing is CROISSANT, the opening bracket is CHOUQUETTE and the semicolon is, of course, BAGUETTE.
The machine
| Pastry | Means |
|---|---|
CHOUQUETTE CLAFOUTIS | ( and ) |
PARISBREST | A quote; the words between two of them are a string |
BAGUETTE | ; |
CRUMBLE SCHNECKENKUCHEN | { and }, around the parameters of a function |
SABLE FRAMBOISIER | IF and THEN |
MUFFIN COOKIES | BEGIN and END |
CUPCAKE POPCAKE | true and false |
Of the 43 library functions, this implementation has 25, among them CROISSANT to print a line, PAINAUCHOCOLAT to print with %d filled in, QUATREQUART and MADELEINE to set and get a variable, CANELE to add, TARTE for greater than and BUCHE to repeat a string. It leaves out floats, arrays, random numbers, the Fibonacci function and labels.
Example
The function test declares TEST with one parameter, arg1, and calls it.
The function test declares TEST with one parameter, arg1, and calls it.
Without labels this implementation has no loop, but a function may call itself. This one counts down from 3.
Patterns it teaches
- Camouflage: an ordinary language in a bakery's clothes.
Further
See also
Also in Camouflage
Write your own in Run Convert a program from Baguette#
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: baguette.
Command line
shib run baguette -e 'CROISSANT CHOUQUETTE PARISBREST Hello World PARISBREST CLAFOUTIS BAGUETTE'shib manual baguetteSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/baguette.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org