SCREAMCODE

From Esolang
Jump to navigation Jump to search
SCREAMCODE
Paradigm(s) imperative
Designed by Baguette
Appeared in 2020
Memory system Cell-based
Dimensions one-dimensional
Computational class Turing complete
Reference implementation Screamterpreter
Influenced by brainfuck
File extension(s) .AUGH, .PAIN


Screamcode (stylized as SCREAMCODE) is a Trivial brainfuck substitution created by Baguette one night while taking a break from Codewars. Every instruction in Screamcode is a pained yell, reflecting how painful brainfuck and its derivatives are to code in. It has unlimited, unbounded tape.

Overview

Command Description
AAAH Move the pointer to the right
AAAAGH Move the pointer to the left
FUCK Increment the memory cell at the pointer
SHIT Decrement the memory cell at the pointer
!!!!!! Output the character signified by the cell at the pointer
WHAT?! Input a character and store it in the cell at the pointer
OW Jump past the matching OWIE if the cell at the pointer is 0
OWIE Jump back to the matching OW if the cell at the pointer is nonzero

Instructions may be seperated by a space, newline, or both, although it is not required.

Examples

Hello World

FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK
OW AAAH FUCK FUCK FUCK FUCK FUCK FUCK FUCK AAAH
FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK
AAAH FUCK FUCK FUCK AAAH FUCK AAAAGH AAAAGH AAAAGH
AAAAGH SHIT OWIE AAAH FUCK FUCK !!!!!! AAAH FUCK
!!!!!! FUCK FUCK FUCK FUCK FUCK FUCK FUCK !!!!!!
!!!!!! FUCK FUCK FUCK !!!!!! AAAH FUCK FUCK !!!!!!
AAAAGH AAAAGH FUCK FUCK FUCK FUCK FUCK FUCK FUCK
FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK !!!!!! AAAH
!!!!!! FUCK FUCK FUCK !!!!!! SHIT SHIT SHIT SHIT
SHIT SHIT !!!!!! SHIT SHIT SHIT SHIT SHIT SHIT SHIT
SHIT !!!!!! AAAH FUCK !!!!!! AAAH !!!!!!

Trivial brainfuck substitution interpreter

   #!/usr/bin/ruby
   eval 'm=Hash.new(p=0);'+ARGF.read.gsub(
       /[!-~]+|./,
       'AAAH' => 'p+=1;',
       'AAAAGH' => 'p-=1;',
       'FUCK' => 'm[p]+=1;',
       'SHIT' => 'm[p]-=1;',
       '!!!!!!' => 'putc m[p];',
       'WHAT?!' => 'm[p]=STDIN.getbyte if !STDIN.eof;',
       'OW' => '(',
       'OWIE' => ')while((m[p]&=255)!=0);')