Betterave

Betterave is a functional programming language created by User:Boily in 2007.

Syntax
In the spirit of Brainfuck, False and Befunge, Betterave's commands are assigned to single characters. But, unlike these three languages, it is not tape- nor stack-based. Instead, programs are written as expressions. Like Scheme, it has a prefix notation, but unlike Scheme, there are no parentheses; each operator knows how many arguments must follow it. Thus, for example, the parameters of an addition come after the "+" symbol.

Most things in Betterave are considered to be function calls, even numbers. When the interpreter encounters a digit, its value is immediately returned to the preceding command for further evaluation. This means that to obtain numbers bigger than 9, you will have to use mathematic operations. If you want to use a number like 42, a possible solution may be:

*67

Or, if you feel more verbose,

-**2558

Which produces the same result.

Structure
Control flow is achieved with two means. There is the

[ xxx | yyy ]

construct. When encountered, the "[" does nothing. It has the same purpose as a label. The "|" (pipe) evaluates the "yyy" function. If it is true, the interpreter jumps to the corresponding "[", else it jumps to the following "]". Also, there is the pair:

? xxx yyy !

If "xxx" evaluates to a non-zero value, then yyy is evaluated. Else, the interpreter jumps to the next "!". These commands somewhat work as a "normal" if-statement. Because of the syntax, if you need to express a thing such as "IF a AND b THEN do something", you will have to write:

? aaa ? bbb yyy !

It is possible to nest "bracket-pipe-bracket" blocks, but "interro-bang" blocks do not have this property.

Strings
Betterave's strings are contained in a list. Each string is assigned an index, beginning at zero and counting upwards. To create a new string you may ask one for input by the user with the

;

command, or you may specify one with

" content of string "

To append a character to an existing string, use

& xxx yyy

where "xxx" is the index of the string and "yyy" is the character to append. "#", instead of appending a character, adds a number.

The "_" command deletes a string. This shifts the index of the strings that had a higher index than the one deleted.

List of commands
Every character not in this list is ignored (this includes whitespace).

Examples
Hello, World! program: $"Hello, World!"

This prints all the Fibonacci numbers smaller than 100:

AB1[.b,*48TbB+abAt|b0]

External resources

 * Interpreter (in ruby)
 * Article by Mark C. Chu-Carroll