!!brainfeed

From Esolang
Jump to navigation Jump to search

!!brainfeed is a simple esoteric programming language created by User:Ari.

!!brainfeed
Designed by User:Ari
Appeared in 2022
Computational class Total
Reference implementation https://brainfeed-interpreter.lankybox02.repl.co/
File extension(s) .txt

Syntax & Overview

!!brainfeed operates on an array of exactly 18 cells, each being set to 0. By default, the first cell is selected. There is a memory variable, which can be used to save a value without interfering with the cell array.

> Select the cell to the right
< Select the cell to the left
+ Increase cell value by 1 (Up to 30)
- Decrease cell value by 1
. Output the current cell value
, Outputs the current cell value as a lowercase letter
? Outputs the current cell value as an uppercase letter
! Outputs the current cell value as a punctuation mark
# Sets the current cell value to 0
@ Outputs the number of cells that are equal to 0
^ Creates a prompt and then sets the input to the current cell (one digit number only)
/ Save the current cell value to the memory variable
~ Set the current cell value to the memory variable value
: Select the first cell
; Select the last cell
$ Saves the selected cell number (not the value) to the memory variable
% Outputs the selected cell (not the value) number
& Selects a random cell

Outputting characters

By using `,` or `?`, the code outputs the current cell value as a letter, in this order:

abcdefghijklmnopqrstuvwxyz

By using `!`, the code outputs the current cell value as a punctuation mark, in this order:

!? .,><()/+-:;÷*'"

For example, 0 would be !, 1 would be ?, 2 would be a space, etc.

Examples

Hello, World!

Using one cell to output every single letter:

+++++++?---,+++++++,,+++,#++++!--!++++++++++++++++++++?--------,+++,------,#+++,#!

Comment

In !!brainfeed, every single character is interpreted as a command, except for spaces, newlines, and:

[everything written in matched square brackets]

Quine

!

Move Value

/ [ save the cell value to memory ]
# [ clear the cell value ]
> [ select the cell to the right ]
~ [ overwrite cell value to memory ]

Random Math Equation

&$~.&$~.#++!+++++++++!#++!&$~.&$~.

Cat program

Like most languages, !!brainfeed has an input command. However, it can only accept one-digit numbers.

^.