Coder Social home page Coder Social logo

ff255's Introduction

FF 255 Banner Image

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;
    }

ff255's People

Contributors

ayush221b avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.