esolang

Glassman

Brainfuck, sung one line of Mister Glassman at a time.

cinnamony, 2023 · Turing complete: yes · ●○○ easy · esolangs.org

Tested with 3 known programs · Test method

Run it

Expected: Hello, world!

The idea

cinnamony made Glassman in 2023, after the song Mister Glassman. Each of brainfuck's eight commands is a line of the song, and three more lines start the script, print a piece of text and end it. A program is one line of the song per command, so it reads as a set of lyrics.

The machine

A tape of byte cells and a pointer, as in brainfuck.

LineDoes
Let's paint a pictureStart the script
So nervously he looks aroundRead a character into the cell
In front of fans rappin' fastPrint the cell as a character
A few years later when now it's prom seasonMove right
You're in classMove left
And he's always in his head thinking too far aheadAdd 1
Don't be shy kid, make your own fateSubtract 1
Even if you think you're bullet proofbrainfuck's [
I am glass and so are youbrainfuck's ]
They're calling her textPrint the text
Woppity wopEnd the script, as it ends the song

Indentation does not count. Reading past the end of the input gives 0, the null character that ends the cat.

Example

The truth machine.

The truth machine. Eight times six takes 48 off the character read, so a 0 leaves the cell at 0, the loop that prints 1 forever is skipped and the last line prints 0.

Expected: 0

Patterns it teaches

Further

Glassman builds on Brainfuck.

Brainfuck derivatives

Write your own in Run Convert a program from Glassman

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: glassman.

Command line

shib run glassman -e 'Let'\''s paint a picture
They'\''re calling her Hello, world!
Woppity wop'
shib manual glassman

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/glassman.js

Docs: Kernel instructions · The .shib format · Command line · Adding a language

Source esolangs.org (CC0) · Edit on esolangs.org