46
Thomas Zimmermann [email protected] http://www.2000i.de/ esolang Esoterische Programmiersprac hen

esolang: Esoterische Programmiersprachen

Embed Size (px)

DESCRIPTION

Presented in 2002.

Citation preview

Page 1: esolang: Esoterische Programmiersprachen

Thomas [email protected]

http://www.2000i.de/

esolangEsoterische

Programmiersprachen

Page 2: esolang: Esoterische Programmiersprachen

esolang-2

EsoterikEine Definition

Exklusiver Kreis Eingeweihter

Heiliges Wissen und Kultpraktiken

Spirituelle Aufbrüche in der Gegenwart

Urwissen der Menschheit

Okkulte Praktiken

Spiritualität und Mystik

Esoterik als Religiösität

Begriffsgrundlage für wissenschaftliche Studien

Page 3: esolang: Esoterische Programmiersprachen

esolang-3

Esoterische Programm Formen

The Null ProgramEin leeres Programm.

QuinesDas Programm gibt den eigenen Quelltext aus

PolyglotsEin Programm in mehreren Programmiersprachen

Palindrome ProgramsDer Quelltext des Programms ist ein Palindrom

Page 4: esolang: Esoterische Programmiersprachen

esolang-4

EinschubQuines

:quine: /kwi:n/ (n.) A program that generates a copy of its own source text as its complete output. Devising the shortest possible quine in some given programming language is a common hackish amusement.

Benannt nach Willard van Orman Quine Existenz beweisbar mit Fixpunkt-Theorem

http://www.eleves.ens.fr:8080/home/madore/computers/quine.html

Universal Quinificator für C-Programme

Page 5: esolang: Esoterische Programmiersprachen

esolang-5

QuinesEine AnalogieQuines

Compiler Ausführungfoo.xx foo foo.xx

Interpreter/Ausführung

foo.xx foo.xx

AnalogieAusführung

Compiler Ausführungfoo.xxBox mitKnopf

Quines als Kopierer bzw. Replikator

Page 6: esolang: Esoterische Programmiersprachen

esolang-6

$ touch foo.pl$ ll foo.pl

-rw------- 1 zimmerth general 0 Nov 10 16:01 foo.pl

$ perl foo.pl > foo.out

$ diff foo.pl foo.out$ ll foo.out

-rw------- 1 zimmerth general 0 Nov 10 16:01 foo.out

$ python foo.pl > foo.out.python

$ diff foo.pl foo.out.python$

QuinesEin Beispiel

$ touch foo.pl$ ll foo.pl

-rw------- 1 zimmerth general 0 Nov 10 16:01 foo.pl

$ perl foo.pl > foo.out

$ diff foo.pl foo.out$ ll foo.out

-rw------- 1 zimmerth general 0 Nov 10 16:01 foo.out

Page 7: esolang: Esoterische Programmiersprachen

esolang-7

Noch ein EinschubFoo

:foo: /foo/– Used very generally as a sample name for

absolutely anything, esp. programs and files

– First on the standard list of metasyntactic variables used in syntax examples (bar, baz, qux, quux, corge, grault, garply, waldo, fred, plugh, xyzzy, thud).

The word `foo' had an immediate prewar history in comic strips and cartoons. The earliest documented uses were in the surrealist "Smokey Stover“ comic strip by Bill Holman about a fireman.

Page 8: esolang: Esoterische Programmiersprachen

esolang-8

EsoterischeProgrammiermethoden

Self Modification Polycoding

Polycoding is the act of non-trivially compiling or executing a single instance of code in multiple contexts.

Masochistic Programming Size Matters, and Less is More Just Plain Weird

z.B. var'aq - klingonische Programmiersprache

Page 9: esolang: Esoterische Programmiersprachen

esolang-9

EsoterischeProgrammiersprachen

Brainfuck ShakespearePietChef

?

Page 10: esolang: Esoterische Programmiersprachen

brainfuckBrain: an apparatus with which we think we think.

-- Ambrose Bierce

Page 11: esolang: Esoterische Programmiersprachen

esolang-11

BrainfuckUrban Müller

Brainfuck>+++++++++[<++++++++>-]<.>+++++++

[<++++>-]<+.+++++++..+++.[-]>++++++++[<++++>-]<.#>+++++++++++[<+++++>-]

<.>++++++++[<+++>-]<.+++.------.--------.[-]>++++++++[<++++>-]<+.[-]++++++++++.

Page 12: esolang: Esoterische Programmiersprachen

esolang-12

p

BrainfuckLanguage Concepts

Array a mit 30000 Bytes Zeiger p auf das Array Änderung von Bytes Ein-/Ausgabe von Bytes Einfache Schleifen

a: ...

Page 13: esolang: Esoterische Programmiersprachen

esolang-13

Brainfuck Anweisungen

> Increment the pointer: p++;

< Decrement the pointer: p--;

+ Increment the byte at the pointer: a[p]++;

- Decrement the byte at the pointer: a[p]--;

. Output the byte at the pointer: putchar(a[p]); , Input a byte and store it in the byte at the pointer

[ Start loop: while(a[p]){

] End loop: Jump back to the matching [

# Dump the values of a[0] thru a[9] to the console

Page 14: esolang: Esoterische Programmiersprachen

esolang-14

0 0

72 0

BrainfuckHello World

p

...a: 0 0 9

72 0 H101 0 e108 0 ll111 0 o

0 0

a[0] a[1]

111 087 0

114 0108 0100 033 010 0

32 0World

\n!

>+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]>++++++++[<++++>-]<.>+++++++++++[<+++++>-]<.>++++++++[<+++>-]<.+++.------.--------.[-]>++++++++[<++++>-]<+.[-]++++++++++.

Page 15: esolang: Esoterische Programmiersprachen

esolang-15

BrainfuckEin Quine>>+++++++>>++>>++++>>+++++++>>+>>++++>>+>>+++>>+>>+++++>>+>>++>>+>>++++++>>++>>++++>>+++++++>>+>>+++++>>++>>+>>+>>++++>>+++++++>>+>>+++++>>+>>+>>+>>++++>>+++++++>>+>>+++++>>++++++++++++++>>+>>+>>++++>>+++++++>>+>>+++++>>++>>+>>+>>++++>>+++++++>>+>>+++++>>+++++++++++++++++++++++++++++>>+>>+>>++++>>+++++++>>+>>+++++>>++>>+>>+>>+++++>>+>>++++++>>+>>++>>+>>++++++>>+>>++>>+>>++++++>>+>>++>>+>>++++++>>+>>++>>+>>++++++>>+>>++>>+>>++++++>>+>>++>>+>>++++++>>++>>++++>>+++++++>>+>>+++++>>+++++++>>+>>+++++>>+>>+>>+>>++++>>+>>++>>+>>++++++>>+>>+++++>>+++++++>>+>>++++>>+>>+>>++>>+++++>>+>>+++>>+>>++++>>+>>++>>+>>++++++>>+>>+++++>>+++++++++++++++++++>>++>>++>>+++>>++>>+>>++>>++++>>+++++++>>++>>+++++>>++++++++++>>+>>++>>++++>>+>>++>>+>>++++++>>++++++>>+>>+>>+++++>>+>>++++++>>++>>+++++>>+++++++>>++>>++++>>+>>++++++[<<]>>[>++++++[-<<++++++++++>>]<<++..------------------->[-<.>>+<]>[-<+>]>]<<[-[-[-[-[-[-[>++>]<+++++++++++++++++++++++++++++>]<++>]<++++++++++++++>]<+>]<++>]<<[->.<]<<]

(Author: Brian Raiter)

Page 16: esolang: Esoterische Programmiersprachen

esolang-16

Der PBI-Quellcode hat 228 Bytes (3 Zeilen à 76 Zeichen):char m[9999],*n[99],*r=m,*p=m+5000,**s=n,d,c;main(){for(read

(0,r,4000);c=*r;r++)c-']'||(d>1||(r=*p?*s:(--s,r)),!d||d--),

c-'['||d++||(*++s=r),d||(*p+=c=='+',*p-=c=='-',p+=c=='>',p-=

c=='<',c-'.'||write(2,p,1),c-','||read(2,p,1));}

Portable Brainfuck Interpreter in C

PBI erlaubt selbst-modifizierenden Brainfuck Code:+[-<+]-ÿ<<<<<<<[.>] (ein Quine natürlich)

Page 17: esolang: Esoterische Programmiersprachen

esolang-17

Compressed Brainfuckwww.catseye.mb.ca/esoteric/bf/compressed.html

Beobachtung: Brainfuck hat nur 8 Anweisungen, davon 4 häufige (+-<>) und 4 seltene ([].,)

Compressed Brainfuck Format

00xxxyyy: single: only instruction xxx (xxx==yyy)00xxxyyy: pair: instruction xxx then yyy (xxx!=yyy)01xxxyyy: repeat: instruction yyy, xxx (2-9) times 10xxyyzz: triplet: instruction xx then yy then zz 11xxxxyy: repeat: instruction yy, xxxx (2-17) times

Page 18: esolang: Esoterische Programmiersprachen

esolang-18

Brainfuck Audiowww.2000i.de/brainfuck-audio/

(2bf)

Parallelität

-3 -4 +2 +2+1

-1-2 +2

1 Viertel = 2 Brainfuck-Anweisungen

Schleifen

Page 19: esolang: Esoterische Programmiersprachen

chefI don‘t even butter my bread. I consider that cooking.

-- Katherine Cebrian

Page 20: esolang: Esoterische Programmiersprachen

esolang-20

ChefAnwendungsgebiet

Page 21: esolang: Esoterische Programmiersprachen

esolang-21

ChefLanguage Concepts

Ingredients

All recipes have ingredients! The ingredients hold individual data values. All ingredients are numerical, ...

Mixing Bowls and Baking DishesChef has access to an unlimited supply of mixing bowls and baking dishes. These can contain ingredient values. The ingredients ... are ordered, like a stack of pancakes.

Page 22: esolang: Esoterische Programmiersprachen

esolang-22

ChefSyntax Elements

Recipe Title

Comments optional

Ingredient ListVerschiedene Arten von Zutaten: dry oder liquid.

Cooking Time optional

Oven Temperature optional

MethodPut ingredient into [nth] mixing bowl.Add ingredient [to [nth] mixing bowl].

Serves

Page 23: esolang: Esoterische Programmiersprachen

esolang-23

ChefHello World Souffle (1)

Hello World Souffle.

This recipe prints the immortal words "Hello world!", in a basically brute force way. It also makes a lot of food for one person.

Ingredients.72 g haricot beans101 eggs108 g lard111 cups oil32 zucchinis119 ml water114 g red salmon100 g dijon mustard33 potatoes

Page 24: esolang: Esoterische Programmiersprachen

esolang-24

ChefHello World Souffle (2)

Method.Put potatoes into the mixing bowl.Put dijon mustard into the mixing bowl. Put lard into the mixing bowl. Put red salmon into the mixing bowl. Put oil into the mixing bowl. Put water into the mixing bowl. Put zucchinis into the mixing bowl. Put oil into the mixing bowl. Put lard into the mixing bowl. Put lard into the mixing bowl. Put eggs into the mixing bowl. Put haricot beans into the mixing bowl. Liquify contents of the mixing bowl. Pour contents of the mixing bowl into the baking dish.

Serves 1 33 potatoes

100 dijon mustard

72 haricot beans

108 lard

108 lard

101 eggs

111 oil

111 oil

119 water

32 zucchinis

114 red salmon108 lard

!

d

H

l

l

e

o

ow

rl

Page 25: esolang: Esoterische Programmiersprachen

pietThe Art of Computer

Programming.

-- Donald E. Knuth

Page 26: esolang: Esoterische Programmiersprachen

esolang-26

EinschubPiet Mondrian

Page 27: esolang: Esoterische Programmiersprachen

esolang-27

Google undPiet Mondrian

Page 28: esolang: Esoterische Programmiersprachen

esolang-28

EinschubGoogol und Googolplex

GoogolA googol is 10 to the 100th power. The term was invented by Milton Sirotta, the 9-year nephew of mathematician Edward Kasner. A googol is larger than the number of elementary particles in the universe, which amount to only 10 to the 80th power.

GoogolplexA googolplex is 10 to the power of googol. Frank Pilhofer has determined that, given Moore's Law, it would make no sense to try to print out a googleplex for another 524 years - since all earlier attempts to print a googleplex out would be overtaken by the faster processor.

Page 29: esolang: Esoterische Programmiersprachen

esolang-29

PietLanguage Concepts

20 Colours– Hue Cycle– Lightness Cycle

Codels Colour Blocks Stack Program Execution

– Direction Pointer (DP): right, down, left, up– Codel Chooser (CC): left, right

Page 30: esolang: Esoterische Programmiersprachen

esolang-30

PietColours

light

red yellow green cyan blue magenta

dark

white

black

Cycles

Other Colors

Page 31: esolang: Esoterische Programmiersprachen

esolang-31

PietColour Cycles

red

yellow

green

cyan

blue

magenta

Hue Cycle Lightness Cycle

light

normaldark

Page 32: esolang: Esoterische Programmiersprachen

esolang-32

PietKontrollfluss

1 2

0

0: CC

CCCC

3

1: CC

2: CC

3: CC

CCCC

CC

Page 33: esolang: Esoterische Programmiersprachen

esolang-33

PietSyntax Elements

Numbers Black Blocks and Edges White Blocks Commands

Page 34: esolang: Esoterische Programmiersprachen

esolang-34

Piet Hello World

Originalgröße (30x29)

Commands

light

red yellow green cyan blue magenta

dark

Cycles

Vergrößerung (1400%)

72101 108

111

119

32

114

33(90)

Page 35: esolang: Esoterische Programmiersprachen

esolang-35

Piet Fibonacci-Zahlen

Commands

light

red yellow green cyan blue magenta

dark

Cycles

Originalgröße (10x11) Vergrößerung (4400%)

Page 36: esolang: Esoterische Programmiersprachen

shakespeareTrying to pop when the stack is empty is a

sure sign that the author has not yet perfected her storytelling skills, and will severly disappoint the runtime system.

Page 37: esolang: Esoterische Programmiersprachen

esolang-37

ShakespeareHello World

The Infamous Hello World Program.

Romeo, a young man with a remarkable patience.

Juliet, a likewise young woman of remarkable grace.

Ophelia, a remarkable woman much in dispute with Hamlet.

Hamlet, the flatterer of Andersen Insulting A/S.

Act I: Hamlet's insults and flattery.

Scene I: The insulting of Romeo.

Page 38: esolang: Esoterische Programmiersprachen

esolang-38

ShakespeareHello World (2)

[Enter Hamlet and Romeo]

Hamlet:

You lying stupid fatherless big smelly half-witted coward!

You are as stupid as the difference between a handsome rich brave hero and thyself! Speak your mind!

Page 39: esolang: Esoterische Programmiersprachen

esolang-39

ShakespeareZuweisungen

You lying stupid fatherless big smelly half-witted coward!

You are as stupid as the difference between a handsome rich brave hero and thyself!

Speak your mind!

Romeo = 26 ·(–1) = –64

Romeo = 23 ·(1) – Romeo = 8 – (–64) = 72

Romeo gibt dich aus!

Page 40: esolang: Esoterische Programmiersprachen

esolang-40

[Enter Hamlet and Romeo]

Hamlet:

You lying stupid fatherless big smelly half-witted coward!

You are as stupid as the difference between a handsome rich brave hero and thyself! Speak your mind!

You are as brave as the sum of your fat little stuffed misused dusty old rotten codpiece and a beautiful fair warm peaceful sunny summer's day. You are as healthy as the difference between the sum of the sweetest reddest rose and my father and yourself! Speak your mind!

You are as cowardly as the sum of yourself and the difference between a big mighty proud kingdom and a horse. Speak your mind.

Speak your mind!

[Exit Romeo]

ShakespeareHello World (3)

H–128+32= –96

(4+1)– (–96)=101e

[Enter Hamlet and Romeo]

Hamlet:

You lying stupid fatherless big smelly half-witted coward!

You are as stupid as the difference between a handsome rich brave hero and thyself! Speak your mind!

You are as brave as the sum of your fat little stuffed misused dusty old rotten codpiece and a beautiful fair warm peaceful sunny summer's day. You are as healthy as the difference between the sum of the sweetest reddest rose and my father and yourself! Speak your mind!

[Enter Hamlet and Romeo]

Hamlet:

You lying stupid fatherless big smelly half-witted coward!

You are as stupid as the difference between a handsome rich brave hero and thyself! Speak your mind!

101+(8 –1)=108l

...l

Page 41: esolang: Esoterische Programmiersprachen

esolang-41

ShakespeareReverse

Outputting Input Reversedly.

Othello, a stacky man.

Lady Macbeth, who pushes him around till he pops.

Act I: The one and only.

Scene I: In the beginning, there was nothing.

[Enter Othello and Lady Macbeth]

Othello:

You are nothing!

Page 42: esolang: Esoterische Programmiersprachen

esolang-42

ShakespeareReverse (2)

Scene II: Pushing to the very end.

Lady Macbeth:

Open your mind! Remember yourself.

Othello:

You are as hard as the sum of yourself and a stone wall. Am I as

horrid as a flirt-gill?

Lady Macbeth:

If not, let us return to scene II. Recall your imminent death!

Othello:

You are as small as the difference between yourself and a hair!

Scene II: Pushing to the very end.

Lady Macbeth:

Open your mind! Remember yourself.

Othello:

You are as hard as the sum of yourself and a stone wall. Am I as

horrid as a flirt-gill?

Lady Macbeth:

If not, let us return to scene II. Recall your imminent death!

Scene II: Pushing to the very end.

Lady Macbeth:

Open your mind! Remember yourself.

Othello:

You are as hard as the sum of yourself and a stone wall. Am I as

horrid as a flirt-gill?

Scene II: Pushing to the very end.

Lady Macbeth:

Open your mind! Remember yourself.push

Lady Macbeth++

Lady Macbeth--

popIf not EOI goto scene 2

Page 43: esolang: Esoterische Programmiersprachen

esolang-43

ShakespeareReverse (3)

Scene III: Once you pop, you can't stop!

Lady Macbeth:

Recall your unhappy childhood. Speak your mind!

Othello:

You are as vile as the sum of yourself and a toad! Are you better

than nothing?

Lady Macbeth:

If so, let us return to scene III.

Scene IV: The end.

[Exeunt]

Scene III: Once you pop, you can't stop!

Lady Macbeth:

Recall your unhappy childhood. Speak your mind!

Othello:

You are as vile as the sum of yourself and a toad! Are you better

than nothing?

Scene III: Once you pop, you can't stop!

Lady Macbeth:

Recall your unhappy childhood. Speak your mind!pop print

Lady Macbeth--

if Lady Macbeth>0 goto scene 3

Page 44: esolang: Esoterische Programmiersprachen

conclusionA conclusion is the place where you got tired of thinking

-- Martin H. Fischer

Page 45: esolang: Esoterische Programmiersprachen

esolang-45

That‘s All?No, Don´t Miss...

Befunge4-dimensionalcontrol flow

Intercal Be part of the madness

UnlambdaExtreme functional

programming

Java2KUnleashing the power of rand()

MalbolgeProgramming from hell

Page 46: esolang: Esoterische Programmiersprachen

the endwww.2000i.de/esolang2002/user: pinkypassword: brain

Vielen Dank für die Aufmerksamkeit!