esolang

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

Expected: Hello World

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

PastryMeans
CHOUQUETTE CLAFOUTIS( and )
PARISBRESTA quote; the words between two of them are a string
BAGUETTE;
CRUMBLE SCHNECKENKUCHEN{ and }, around the parameters of a function
SABLE FRAMBOISIERIF and THEN
MUFFIN COOKIESBEGIN and END
CUPCAKE POPCAKEtrue 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.
Expected: this is true

The function test declares TEST with one parameter, arg1, and calls it.

Expected: Argument Hello World

Without labels this implementation has no loop, but a function may call itself. This one counts down from 3.

Expected: 3 2 1

Patterns it teaches

  • Camouflage: an ordinary language in a bakery's clothes.

Further

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 baguette

Source

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