Skip to content
24 October 32008 / Robin Wellner

ORK – An esoteric programming language

I recently designed an esoteric programming language. It’s called ORK, deliberately made as brain-damaged and obnoxious as possible.

Here is a small nonsense example, which shows every language feature:

0000 GOTO 0010
0001 IF 2 > 1
0002 COMEFROM 0010
0003 DISP "Hello, "[0]
0004 ASK "Number? " IN [1]
0005 ASK "Number? " IN [2]
0006 PUT [1]+[2] IN [1]
0007 IF [1] > [2]
0008 DISP [1]
0009 DISP [2]
0010 ASK "What is your name?" IN [0]
0011 TUNNEL 0009 TO 0012
0012 DISP "Tada!"
0013 END
0014 IF [1] != 0
0015 DISP "Exiting..."
0016 END

So what are the language features?

  • Optional line numbers: must be 4-character digits
  • Simple expressions: a+b is possible, a*b+c is not
  • Asking a user for input and printing on screen
  • GOTO, COMEFROM and TUNNEL, which is a COMEFROM followed by a GOTO.
  • IF on the next line:
    PUT [3]/[4]
    IF [4] != 0

I haven’t implemented it yet, but I do know how I’m going to do it.

Figure 1: simplified flowchart of above example.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: