Bawkbawk

From Esolang
Jump to navigation Jump to search

Bawkbawk is a programming language made by User:Lilchiky, and is for chickens. It has 14 commands, which are separated with whitespace.

Bawkbawk
Designed by User:Lilchiky
Appeared in 2023
Computational class Total
Reference implementation https://replit.com/@lilchiky/Bawkbawk
File extension(s) .bawkbawk

Syntax and Overview

Bawkbawk works on a memory of one cell which is set to 0. The 14 commands are:

Command Function
peck Decrements the held value
feed Increments the current value
chirp Outputs the current value
forage Multiplies the current value
happy Binary 1
sad Binary 0
theeggcamefirst Suffix
flyoverthehouse Suffix
rationtheworms Suffix
emptypocket Skip the next command if the cell is 0
think Start of comment
endthink End of comment
dig User input
retrace Loop to beginning

Note that:

- Newlines are allowed, just as long as they end with a whitespace.
- A forage does not need a theeggcamefirst, but it will not multiply without it.

Forage

The forage command is unique among the others, as it requires multiple commands to work. The syntax is as follows:

forage [binary number] [suffix]

Replace [binary number] with a binary number, like so:

sad 0
happy 1

The ending of the forage command can be used to modify the end result.

Suffix Result
theeggcamefirst Multiplies the value
flyoverthehouse Jumps to the specified command
rationtheworms Divides the value and truncates the result

Flyoverthehouse will actually jump to the command after the one you specified, like if you did:

forage happy sad flyoverthehouse

it would skip to command 3, not command 2.

Examples

Hello World

feed forage sad happy sad sad happy sad sad sad theeggcamefirst
chirp forage sad theeggcamefirst

feed forage sad happy sad sad sad happy sad happy
theeggcamefirst chirp forage sad theeggcamefirst

feed forage sad happy sad 
sad happy happy sad sad theeggcamefirst chirp chirp forage sad
theeggcamefirst

feed forage happy sad sad happy happy happy happy theeggcamefirst chirp
forage sad theeggcamefirst

feed forage sad sad happy sad happy happy sad
sad theeggcamefirst chirp forage sad
theeggcamefirst

feed forage sad sad happy sad sad sad sad sad
theeggcamefirst chirp forage sad theeggcamefirst

feed forage sad happy sad happy sad happy happy happy
theeggcamefirst chirp forage sad theeggcamefirst

feed forage happy sad sad happy happy happy happy theeggcamefirst chirp
forage sad theeggcamefirst

feed forage sad happy sad happy sad sad happy sad theeggcamefirst chirp
forage sad theeggcamefirst

feed forage sad happy sad 
sad happy happy sad sad theeggcamefirst chirp forage sad
theeggcamefirst

feed forage sad happy sad sad sad happy sad sad theeggcamefirst chirp forage sad
theeggcamefirst

Cat program

dig chirp forage sad theeggcamefirst
feed forage sad sad sad sad happy sad happy sad
theeggcamefirst
chirp retrace

Note: Due to the memory limitations, dig will only accept one character.

Computational class

Even though Bawkbawk has loops, it it not Turing Complete. After 1500 loops, the interpreter will crash and exit the program, so Bawkbawk is in Total.

Implementations

[1]

See also

Bawkbawk² is a variant of Bawkbawk.

Chicken is another esolang that is made to be readable by chickens.