Free

From Esolang
Jump to navigation Jump to search
This is still a work in progress. It may be changed in the future.

Free is a joke esoteric programming language created as a parody language where the syntax is based entirely on digits and a few special symbols. The idea behind Free is that "syntax is price": every command corresponds to a digit, making the source code look like a sequence of numbers rather than text.

Overview

The language operates with two internal variables:

  • The Accumulator, which is used mainly for output operations (printing numbers or ASCII characters).
  • The Accumulator2, which is used for controlling program flow such as conditional checks and loops.

A Free program is simply a chain of digits and a few non-digit symbols. Execution starts when the $ command is encountered.

Commands:

Command Description
$ Marks the start of program execution.
1 Increment the Accumulator by 1.
0 Decrement the Accumulator by 1.
2 Output the current value of the Accumulator as an ASCII character.
3 Output the current value of the Accumulator as a number.
4 If Accumulator2 is equal to 0, jump forward to the next 5.
5 If Accumulator2 is not equal to 0, jump back to the previous 4.
6 Reset both Accumulator and Accumulator2 to zero.
7 If Accumulator2 equals the most recently executed digit command, execute the next command. Otherwise, skip it.
8 Increment the Accumulator2 by 1.
9 Decrement the Accumulator2 by 1.
, Begin a comment block. Everything after this command is ignored until the next ..
. End a comment block.

Interpreter

This section is still a work in progress. It may be changed in the future.

Examples

Output "1"

A trivial program that outputs the number 1:

$13

Output "A"

A program that outputs the letter A (ASCII code 65):

$111111111111111111111111111111111111111111111111111111111111111111112

Status

The language was created as a parody and has no practical use. Its main feature is the deliberately absurd restriction of "everything is digits", making code appear like meaningless numbers.

See also

User:DumbEsolangsOrgUser — creator