This is kind of an esoteric programming language. The goal is to be as ugly as possible.
Expressions are a very simle concept. In a nested set of expressions, the innermost are evaluated before the outermost, eventually working its way out to the final value of the expression.
pr[2 + [3 - [6 - 2]]]
1
Comments are one of the most useful features in a programming language. They should be used to add information to a program's source code in a way that a person could open the code and know what's going on, but also not give so much information to the point of redundancy.
=+ This is a comment, and they are between these symbols. +=
A way to represent text is an integral part of any usable programming
language. The art of text manipulation is one of the most interesting
brain teasers ever created. see regexes.
&This a string, encapsulated between ampersands.&
Data manipulation is the most important function in computing, so it should go without saying that a way to represent changeable data is ingegral.
"variable" : 3
"text" : &Hello, world!&
Control flow is another important feature in programming, but some are
greater than others. goto
is an abomination, for
is a godsend. There are
several different ways to implement control flow:
"say hello to everyone" :=: :
pr[&Hello, world!&]
pr[&This is an examle function.&]
|
"function" :=: "arg1" "arg2" :
re["arg1" + "arg2"]
|
"result" : "function" . 2 3
The syntax of a funtion is as follows:
"function name (spaces allowed)" :=: "arguments" :
body
| =+ end funtion +=
"f" :=: pr[&one and two are equal&] |
"z" :=: pr[&one and two are not equal&] |
"one" : 1
"two" : 1
{[["one"]=["two"]]["f"]["z"]}
The syntax of an if statement is like so in pseudocode:
{[if this expression is true][do this][optional: otherwise, do this]}
This allows for blocks to be put inside the do
part.
3_[pr[&Three times&]]
"bool" : true
"count" : 0
"bool"_{["bool"][
"count" : "count" + 1
pr["count" + ×&]
{[["count"]=[10]][
"bool" : false
]}
]}
If you aren't giggling right now, you have something wrong with you.