ted.neward@newardassociates.com | Blog: http://blogs.newardassociates.com | Github: tedneward | LinkedIn: tedneward
Learn about esoteric languages
Learn about esoteric languages
Explore how twisted programmers can be
Learn about esoteric languages
Explore how twisted programmers can be
...
Really? You think we're going to accomplish something useful here?
You agree to indemnify this conference, its organizers, its sponsors, and myself completely from any sort of medical or psychological damage that may occur by remaining present to witness the spectacle that these languages become.
Furthermore, you agree that should any sort of professional consequences (job termination, lawsuit, insane hysterics involving chainsaws and your coworkers, as a partial list of examples) arise out of your decision to utilize or demonstrate any of these languages to anyone outside of this room, neither this speaker, the conference nor any of its sponsors are liable in any way....
"An esoteric programming language ... is a programming language designed to test the boundaries of computer programming language design, as a proof of concept, or as a joke." From Wikipedia
Hello World
DO ,1 <- #13 PLEASE DO ,1 SUB #1 <- #238 DO ,1 SUB #2 <- #108 DO ,1 SUB #3 <- #112 DO ,1 SUB #4 <- #0 DO ,1 SUB #5 <- #64 DO ,1 SUB #6 <- #194 DO ,1 SUB #7 <- #48 PLEASE DO ,1 SUB #8 <- #22 DO ,1 SUB #9 <- #248 DO ,1 SUB #10 <- #168 DO ,1 SUB #11 <- #24 DO ,1 SUB #12 <- #16 DO ,1 SUB #13 <- #162 PLEASE READ OUT ,1 PLEASE GIVE UP
http://www.catb.org/~esr/intercal/
INTERCAL: acronym for "Compiler Language With No Pronounceable Acronym"
The world's first Esolang, written in 1972
Designed to be Turing-complete but not make use of any previously-seen features
Instruction manual: http://www.catb.org/~esr/intercal/ick.htm
The original manual: http://www.muppetlabs.com/~breadbox/intercal/intercal.txt
C Implementation available: http://gitorious.org/intercal/intercal
"plague" of different syntaxes and semantics of INTERCAL standards
INTERCAL-72, C-INTERCAL, CLC-INTERCAL and J-INTERCAL
Oh, and there's two different syntaxes, the Princeton syntax and the Atari syntax
... it has a web framework: http://www.intercaloninterstates.org/
https://www.intercaloninterstates.org/examples.html
Politeness is mandatory, but avoid insincerity
"the correct proportion is approximately 3 non-polite for every polite used"
Line Labels: any numbers from 1 to 65535
line labels need not necessarily increment or be in order
1000 to 1999 used by system library
Hello world
HAI CAN HAS STDIO? VISIBLE "HAI WORLD!" KTHXBYE
http://www.lolcode.com
A language based on LOLcats and l33tsp3ak
Try it in your browser! http://fullvolume.co.uk/static/lolcode/
Hello World
Hello World program >+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]>++++++++[<++++>-] <.#>+++++++++++[<+++++>-]<.>++++++++[<+++>-]<.+++.------.--------.[-]>++++++++[ <++++>-]<+.[-]++++++++++.
http://www.muppetlabs.com/~breadbox/bf/
"Brainfuck is the ungodly creation of Urban Müller, whose goal was apparently to create a Turing-complete language for which he could write the smallest compiler ever, for the Amiga OS 2.0. His compiler was 240 bytes in size."
Pointer-centric:
30k bytes of memory
an instruction pointer that can move to a cell/manipulate it
Brainfuck.NET: http://www.soulsphere.org/stuffage/bf.net/
implicit byte pointer ("the pointer")
free to move around within an array of 30000 bytes
eight commands:
">" Increment the pointer. (++p
)
"<" Decrement the pointer. (--p
)
"+" Increment the byte at the pointer. (++*p
)
"-" Decrement the byte at the pointer. (--*p
)
"." Output the byte at the pointer. (putchar(*p)
)
"," Input a byte and store it in the byte at the pointer. (*p = getchar()
)
"" Jump forward past the matching if the byte at the pointer is zero. (while(*p) { ...
)
"]" Jump backward to the matching [ unless the byte at the pointer is zero. ( } // close while
)
Fibonacci
Midnight takes your heart and your soul While your heart is as high as your soul Put your heart without your soul into your heart Give back your heart Desire is a lovestruck ladykiller My world is nothing Fire is ice Hate is water Until my world is Desire, Build my world up If Midnight taking my world, Fire is nothing and Midnight taking my world, Hate is nothing Shout "FizzBuzz!" Take it to the top If Midnight taking my world, Fire is nothing Shout "Fizz!" Take it to the top If Midnight taking my world, Hate is nothing Say "Buzz!" Take it to the top Whisper my world
https://codewithrockstar.com/
"Rockstar is a computer programming language designed for creating programs that are also hair metal power ballads."
A Tweet...
https://web.archive.org/web/20180703102005/https://twitter.com/paulstovell/status/1013960369465782273
... inspired a syntax...
https://codewithrockstar.com/docs
... which begat some implementations...
https://codewithrockstar.com/code
... which spawned a band (Dylan Beattie and the Linebreakers)
https://www.youtube.com/playlist?list=PLw0jj21rhfkM-etwRXGDIko0Ou-QLdeMq
"Rockstar is intended to give the programmer an unprecedented degree of poetic license when it comes to the composition and structure of their programs."
"The use of comments in Rockstar programs is strongly discouraged. This is rock’n’roll; it’s up to the audience to find their own meaning."
Poetic number literals ('nuff said!)
Hello World
> v v"Hello World!"< >:v ^,_@
http://en.wikipedia.org/wiki/Befunge
"Befunge is a stack-based, reflective, esoteric programming language. It differs from conventional languages in that programs are arranged on a two-dimensional grid. "Arrow" instructions direct the control flow to the left, right, up or down, and loops are constructed by sending the control flow in a cycle. It has been described as 'a cross between Forth and Lemmings.'"
In short
Stack-based operand values
Each opcode is one character
Execution begins in upper-left, moving horizontally right
Reference implementation: https://github.com/catseye/Befunge-93
IronBefunge: https://github.com/JasonBock/IronBefunge
(space): NOP
+
(add): pop b, pop a, push a + b
-
(subtract): pop b, pop a, push a - b
*
(multiply): pop b, pop a, push a * b
/
(divide): pop b, pop a, push a / b (nb. integer)
%
(modulo): pop b, pop a, push a % b
!
(not): pop v, push 0 if v non-zero, 1 otherwise
``` (greater): pop b, pop a, push 1 if b > a, 0 otherwise
>
(right) PC -> right
<
(left) PC -> left
^
(up) PC -> up
v
(down) PC -> down
?
(random) PC -> random(right, left, up, down)
_
(horiz if) pop v, PC -> left if v, else PC -> right
|
(vert if) pop v, PC -> up if v, else PC -> down
#
(jump) "jumps" PC one more character (skip next instruction)
$
(pop) pop v
:
(dup) pop v, push v, push v
\
(swap) pop b, pop a, push b, push a
g
(get) pop x, pop y, push value at (x, y)
p
(put) pop value, pop x, pop y, put value at (x, y)
.
(output int) pop v, print v (as int)
,
(output char) pop v, print v (as char)
&
(input int) get v from user, push v
~
(input char) get v from user, push v
@
(end) terminates program
so httpso doge
shh this is dogescript such goToTheMoon much doge very moon is false rly doge is 'a doge' moon is true wow wow moon plz goToTheMoon with 'a doge'
so http so wow so doge
shh example http server so http http dose createServer with much req res res dose writeHead with 200 {'Content-Type': 'text/plain'} res dose end with 'so hello\nmuch world' wow& dose listen with 8080 console dose loge with 'Server running at http://127.0.0.1:8080/'
https://github.com/dogescript/dogescript
"Dogescript is a programming language that compiles into JavaScript."
"While JavaScript is a beautiful language, it’s not quite Doge friendly. Thankfully, Dogescript fixes that, so that your code can truly go to the moon."
Transpiles to Javascript
either in browser or ahead-of-time
A New Beginning. Hamlet, a literary/storage device. Juliet, an orator. Act I: The Only Act. Scene I: The Prince's Speech. [Enter Hamlet and Juliet] Juliet: Thou art the sum of an amazing healthy honest noble peaceful fine Lord and a lovely sweet golden summer's day. Speak your mind! [A pause] Juliet: Thou art the sum of thyself and a King. Speak your mind! Thou art the sum of an amazing healthy honest hamster and a golden chihuahua. Speak your mind! [Exeunt]
https://shakespearelang.sourceforge.io/report/shakespeare/
(defunct as of 1 Jun 2023)
See https://esolangs.org/wiki/Shakespeare
A language based on Shakespearean prose
in particular, Shakespearean insults
https://shakespearelang.com/1.0/
Python implementation: python -m pip install shakespearelang
To run: shakespeare run first_play.spl
Title: The title (essentially a comment)
Dramatis Personae: all the characters in the play
these declare variables, holding signed integers
must be a real Shakespearean character
Acts consist of scenes
Scenes contain lines, enter/exit statements
Enter/exit/exeunt:
characters must be on stage
address other characters as "you" or "thou"
Enter
name
Exit
name
Exeunt
(names, or none, meaning everyone)
Line: character: one or more sentences
Nouns are constants of either 1 or -1, depending on whether it's "nice"
"flower" is 1 because it's nice
"pig" is -1 because it's dirty
"tree" is 1, because it's neutral
Nouns with prefixing adjectives multiply it by two per adjective
Hello world
(=<`$9]7<5YXz7wT.3,+O/o'K%$H"'~D|#z@b=`{^Lx8%$Xmrkpohm-kNi;gsedcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543s+O<oLm
"Malbolge, for those not familiar with it, is a language designed to be difficult (or perhaps impossible - until recently, there was not even an informal argument showing Turing completeness) to program in. For example, the effect of any instruction depends on where it is located in memory (mod 94, of course), all instructions are self-modifying (according to a permutation table) and both the code and data pointers are incremented after every instruction, making it hard to re-use any code or data."
"There is no way to initialize memory except to one of the 8 instruction characters, there is no LOAD or STORE operator, and the only available memory operators (both of them) work in trinary and are designed to be opaque. The only control flow construct is an unconditional computed jump, which is also nearly worthless since there is no way (or certainly no obvious way) to set memory to anything except the 8 instruction characters."
http://www.lscheffer.com/malbolge.shtml
Specification: http://www.lscheffer.com/malbolge_spec.html
Reference impl: http://www.lscheffer.com/malbolge_interp.html
For years, the most complex program ever written was Hello World
Aren't you glad we're done?
If you don't know... good!
Less chance of me being sued that way!