Deadfuck
Brainfuck with the minus taken away, spelled in DFS letters.
None1 · Turing complete: yes · ●○○ easy · esolangs.org
Tested with 2 known programs · Test method
Run it
The idea
None1 made Deadfuck by crossing brainfuck with DFS. Seven of brainfuck's eight commands get a DFS letter and - is gone. A cell is a byte that wraps, so taking 1 away is adding 255. There is no other way down.
Read the story
The Hello World shows what that costs. It is 3,084 commands, 3,072 i and 12 s, all in one cell. The two l in Hello are 256 i apart, a whole lap of the byte to land on the same value.
The machine
| Deadfuck | brainfuck | Does |
|---|---|---|
i | + | Add 1 to the cell |
d | , | Read a character into the cell |
s | . | Print the cell as a character |
o O | < > | Move the pointer left or right |
l L | [ ] | Loop while the cell is not 0 |
Cells hold 0 to 255 and the tape runs both ways. Every other character does nothing. The specification gives an interpreter in Common Lisp. At the end of input it asks for 0 and then fails on it; d gives 0.
Example
The truth machine puts 49, the code of 1, in the second cell.
The truth machine puts 49, the code of 1, in the second cell. It reads and prints the input, then adds 208. A 0 (48) wraps to 0 and the loop is skipped. A 1 (49) wraps to 1, and the loop prints the 1 from the second cell, forever.
Patterns it teaches
- Turing tarpit: brainfuck still works without
-, as long as the cells wrap.
Further
See also
Deadfuck builds on Brainfuck.
Brainfuck equivalents
Brainfuck derivatives
Write your own in Run Convert a program from Deadfuck
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: deadfuck.
Command line
shib run deadfuck -e 'Oiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
od
s
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
iiiiiiiiiiiiiiiiiiiiiiiiiiii
lOsoL' --input '0'shib manual deadfuckSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/deadfuck.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org