derplang

From Esolang
Jump to: navigation, search

derplang is an esoteric language, created by JesseH in 2013. It is pronounced derp-ling or derpling. The goal was to create a language that is somewhat confusing and hard to remember, and to give Hobbyist Programmers a fresh new way to travel their text editor. This is because a derplang script was intentionally to be all on one line, so that you have to scroll left and right, instead of up and down. However if you absolutely have to, you have divide them among multiple lines.

Language Overview

Commands

Command Description
va (va:x:y:) - Declares the variable x with the value of y.
ou (ou:x:) - Prints x.
co (co:z:x:y:) - Declares a variable z with the conacentated value of x and y.
ad (ad:z:x:y:) - Declares a number variable with the value of x + y.
su (su:z:x:y:) - Declares a number variable with the value of x - y.
mu (mu:z:x:y:) - Declares a number variable with the value of x * y.
di (di:z:x:y:) - Declares a number variable with the value of x / y.
ip (ip:x:) - Declares a variable x with the value of the input the user typed in.
go (go:x:) - Hops to the xth part of the program.
la (la:x:) - Creates label called x which go can go to.
eq (eq:x:y:j:k:) - If x == y goto j else goto k.
gt (gt:x:y:j:k:) - If x > y goto j else goto k.
lt (lt:x:y:j:k:) - If x < y goto j else goto k.

Every "token" has to have a colon at the end. A "token" can be defined as a command, or argument.

Computational class

Any Minsky machine can be translated into a derplang program using va, ad, su, go and eq. Therefore, derplang is Turing complete.

Examples

Hello World Script

ou:Hello World!:

Prints "Hello World!"

What is your name?

ou:What's your name?:ip:x:ou:x:

Get's input, and prints it.

Goto Example

la:start:
ou:spam!:
go:start:

If x is equal to y, program hops to the first statement, if not, it hops to the fourteenth statement.

99 Bottles

va:x:100:la:start:su:x:x:1:ou:x:ou:bottles of beer!:eq:x:0:END:start:

Contributing

Github

Lua.

IRC

Come to #esoteric on Freenode, and ping JesseH.