DEV Community

Cover image for Weird Programming Stuff
Filipe Herculano
Filipe Herculano

Posted on

Weird Programming Stuff

Ok, I somehow came across this today:

Whitespace is an esoteric programming language developed by Edwin Brady and Chris Morris at the University of Durham. It was released on 1 April 2003. Its name is a reference to whitespace characters. Unlike most programming languages, which ignore or assign little meaning to most whitespace characters, the Whitespace interpreter ignores any non-whitespace characters. Only spaces, tabs and linefeeds have meaning. A consequence of this property is that a Whitespace program can easily be contained within the whitespace characters of a program written in another language, except possibly in languages which depend on spaces for syntax validity such as Python, making the text a polyglot.

Which led me to this:

That reminded of this good ol' classic:

GitHub logo lhartikk / ArnoldC

Arnold Schwarzenegger based programming language

ArnoldC

Programming language based on the one-liners of Arnold Schwarzenegger.

Motivation

Although the one-liners of Arnold Schwarzenegger are fairly well known the true semantics of the uttering is yet to be understood. This project tries to discover new meanings from the Arnold movies with the means of computer science.

HelloWorld.arnoldc

IT'S SHOWTIME
TALK TO THE HAND "hello world"
YOU HAVE BEEN TERMINATED

Quick Start

wget http://lhartikk.github.io/ArnoldC.jar
echo -e "IT'S SHOWTIME\nTALK TO THE HAND \"hello world\"\nYOU HAVE BEEN TERMINATED" > hello.arnoldc
java -jar ArnoldC.jar hello.arnoldc
java hello

To create some "audible" output you can try the -declaim option:

java -jar ArnoldC.jar -declaim hello.arnoldc

Brief overview of the keywords

Check the wiki for more details

False I LIED

True NO PROBLEMO

If BECAUSE I'M GOING TO SAY PLEASE

Else BULLSHIT

EndIf YOU HAVE NO RESPECT FOR LOGIC

While STICK AROUND

EndWhile CHILL

PlusOperator GET UP

MinusOperator GET DOWN

MultiplicationOperator YOU'RE FIRED

DivisionOperator

Really tho, I could go on forever but now I'm curious to what sort of weird programming-related stuff you guys have seen throughout the years, add your findings below in the comments 👇 (oh gosh, here we go 😅)

And while we're at it, let's end this post with a video because why not

🎠

Top comments (3)

Collapse
 
ahferroin7 profile image
Austin S. Hemmelgarn

No discussion of interesting programming stuff would be complete without mentioning INTERCAL, one of the original esoteric programming languages. The syntax includes the keyword PLEASE, which is a no-op, except that if it doesn't appear enough in the program, the compiler will complain about it being impolite, and if it appears too much, the compiler will complain about it being too polite.

Other ones I've found particularly interesting over the years include:

  • Piet, a language that uses a 2-dimensional code space where the hue differential between cells encodes the program, named after Piet Mondrian.
  • Malbolge, a devilishly complex language operating on a trinary virtual machine with three registers, where the exact instruction to execute depends on the location in memory and the value there, modulo 84, with the code self-modifying as it executes.
  • Thue, a Turing complete language that has only one operation other than input and output (and is unusual in that it's not related to branching, as is the case for most Turing-complete languages with only one operation).

Also possibly of interest, there has been at least one hardware implementation of Brainfuck, called the MENTAL-1.

Collapse
 
scottshipp profile image
scottshipp

One of my favorites is that this Java code prints "Hello World"

System.out.println(randomString(-229985452) + " " + randomString(-147909649));

Reference

Collapse
 
iceorfiresite profile image
Ice or Fire

cool idea showing programming concepts with dance