Fuckscript

From Esolang
Jump to navigation Jump to search

Fuckscript is a joke esoteric programming language created by Josh Schiavone. Fuckscript is based heavily off of Brainfuck although it is argued that it's more intuitive, with more descriptive keywords, and it shares the same tape size of 30 000 bytes. Programmers have a lot of memory to work with, so they can design all sorts of applications. Fuckscript is also said to be Turing complete so it's perfect for developing a self-driving car. The challenging part of programming in Fuckscript is that programmers are not allowed to write comments, the interpreter forbids comments as it makes programming easier.

Development

Fuckscript was developed in modern C++. The source code can be found on its official GitHub Repository.

Fuckscript Instruction Set
Fuckscript Instruction Description
FUCK increments the current value of the memory pointer (cell)
FUCKK decrements the current value of the memory pointer (cell)
FFUCK moves the memory pointer to the next cell
FUCKKK moves the memory pointer backwards to the previous cell
FUCKER user input, reads a character to stdin
FUCKITY outputs current value in the cell to stdout
WHATTHEFUCK enters a while loop
IAMFUCKED marks the end of the loop
THISISFUCKED sets the memory pointer to 0

Hello, world! Program in Fuckscript

FFUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK WHATTHEFUCK FUCKKK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FFUCK FUCKK IAMFUCKED FUCKKK FUCKITY

FFUCK FUCK FUCK FUCK FUCK WHATTHEFUCK FUCKKK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FFUCK FUCKK IAMFUCKED FUCKKK FUCK FUCKITY FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCKITY FUCKITY FUCK FUCK FUCK FUCKITY FFUCK FFUCK FUCK FUCK FUCK FUCK FUCK FUCK WHATTHEFUCK FUCKKK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FFUCK FUCKK IAMFUCKED FUCKKK FUCK FUCK FUCKITY FUCKK FUCKK FUCKK FUCKK FUCKK FUCKK FUCKK FUCKK FUCKK FUCKK FUCKK FUCKK FUCKITY FFUCK FUCK FUCK FUCK FUCK FUCK FUCK WHATTHEFUCK FUCKKK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FFUCK FUCKK IAMFUCKED FUCKKK FUCK FUCKITY FUCKKK FUCKITY FUCK FUCK FUCK FUCKITY FUCKK FUCKK FUCKK FUCKK FUCKK FUCKK FUCKITY FUCKK FUCKK FUCKK FUCKK FUCKK FUCKK FUCKK FUCKK FUCKITY FFUCK FFUCK FFUCK FUCK FUCK FUCK FUCK WHATTHEFUCK FUCKKK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FFUCK FUCKK IAMFUCKED FUCKKK FUCK FUCKITY

Add Two Numbers in Fuckscript

FUCKER
FFUCK
FUCKER
FUCKKK
FFUCK
WHATTHEFUCK
 FUCKK
 FUCKKK
 FUCK
 FFUCK
IAMFUCKED
FUCKKK
FUCKITY

Implementation

In the style of a trivial brainfuck substitution.

#!/usr/bin/ruby
eval 'm=Hash.new(p=0);'+ARGF.read.gsub(/[!-~]+|./,
    'THISISFUCKED' => 'p=0;',
    'FUCKKK' => 'p-=1;',
    'FFUCK' => 'p+=1;',
    'FUCKK' => 'm[p]-=1;',
    'FUCK' => 'm[p]+=1;',
    'WHATTHEFUCK' => '(',
    'IAMFUCKED' => ')while((m[p]&=255)!=0);',
    'FUCKITY' => 'putc m[p];',
    'FUCKER' => 'm[p]=STDIN.getbyte if !STDIN.eof;')