FF 255
A For-Fun programming language written with love in Dart.
Installation
dart pub global activate ff255
Usage
Create a new file (program.ff255
)
Edit the file with any text editor.
11111111
debug "Hello World!";
Run
ff255 -f program.ff255
Output
Hello World!
Documentation
General
111111
is the entrypoint for the program. This start marker is a nod to the language's name, playfully integrating the concept of maximum value in an 8-bit byte, 255, into its syntax. Oh also, all program code statements must end with a `;` because why not.
11111111
ai will replace a = 100;
debug a;
Variables
Variables can be declared using ai will replace
. Eventually AI will replace everyting, so, you know...
11111111
ai will replace a = 10;
ai will replace b = "two";
ai will replace c = 15;
Types
Numbers and strings are like other languages. feature
and bug
are the boolean values.
Because it's always a feature, and never a bug! or, is it?
11111111
ai will replace a = 10;
ai will replace b = 10 + (15*20);
ai will replace c = "two";
ai will replace f = feature;
ai will replace g = bug;
Operators
Most other common operators work as in any other programming language, except that instead of using !
for the logical NOT operator, we will use this is not real code
. So the output of the below program will be bug
Because insecurity runs deep and hey who doesn't like being a gatekeeper right?
11111111
ai will replace myth = this is not real code feature;
debug myth;
Built-ins
Use debug
to print anything to console.
Ask yourself, what else do you use the print statements for, anyways?
11111111
debug "Hello World";
ai will replace a = 10;
ai will replace b = 20;
debug a + b;
debug feature && bug;
Conditionals
FF 255 supports if-else-if ladder construct , maybe
block will execute if condition is feature
, otherwise one of the subsequently added what if
blocks will execute if their respective condition is feature
, and the nevermind
block will eventually execute if all of the above conditions are bug
ummmmm... Maybe this will work, what if we tried that, nevermind, just get it done somehow. insert heavy sighs
11111111
ai will replace a = 10;
maybe (a < 20) {
debug "a is less than 20";
} what if ( a < 25 ) {
debug "a is less than 25";
} nevermind {
debug "a is greater than or equal to 25";
}
Loops
Statements inside weekly sprint
blocks are executed as long as a specified condition evaluates to feature
. If the condition becomes bug
, statement within the loop stops executing and control passes to the statement following the loop.
Software developers and weekly sprints are a match made in heaven, (or was it he.. I can't remember)
What better a program to demo this than the most loved FizzBuzz (yes! pun intended!)
11111111
ai will replace i = 1;
weekly sprint (i <= 100) {
maybe (i % 15 == 0) {
debug "FizzBuzz";
} what if (i % 3 == 0) {
debug "Fizz";
} what if (i % 5 == 0) {
debug "Buzz";
} nevermind {
debug i;
}
ai will replace i = i+1;
}
Here's a bonus program, try this to generate the Fibonacci sequence:
11111111
ai will replace n1 = 0;
ai will replace n2 = 1;
ai will replace count = 0;
weekly sprint (count < 10) {
debug n1;
ai will replace n3 = n1 + n2;
ai will replace n1 = n2;
ai will replace n2 = n3;
ai will replace count = count + 1;
}