FiM++ Wiki
Register
Advertisement

FiM++ (AKA Friendship Reports) is a programming language inspired by Friendship Reports, Java, Shakespeare, and Inform 7, whose syntax is not dissimilar to that of ALGOL. The main goal of FiM++ is to be readable by humans, to the point that a well-written FiM++ program could be mistaken for being a mere letter.

Structure[]

The general structure of a FiM++ program is class-based. That is, code is organized in individual files, called reports. Within each file, there are imports that help reference other reports, the report itself, methods (called paragraphs), literals, variables, and constants.

History[]

  • Feb 23, 2011: The first ideas of a programming language pop up in a Google Code repository. This project is abandoned June 12 of that same year.
  • Oct 4, 2012: Cereal Velocity makes a post about FiM++ on Equestria Daily.
  • Oct 4, 2012: DeftCrow on deviantART creates the first real program in FiM++, 99 Jugs of Cider and Hello World. This works out some inconsistencies and sets the stage for a fully-fledged language.
  • Oct 5, 2012: An admin on Equestria Forever named Twilight Sparkle makes a forum post about the aforementioned posts, also detailing some more propositional features of the language.
  • Oct 6, 2012: KarolS posts a GitHub repository for an open-source compiler.
  • Oct 11, 2012: Supuhstar asks permission from DeftCrow and Cereal Velocity to make a formal document fully specifying the language.
  • Oct 15, 2012: Cereal Velocity posts a follow-up post on EqD
  • Oct 18, 2012: This wiki is created when the document becomes too daunting to scroll through.

Versions[]

Currently, there is only one official version, which is 1.0, codename “Sparkle”. That is the version that this wiki details.

This wiki details version 1.0, Sparkle. Other versions exist (linked above), but they have no number or name.

Example Programs[]

A program that simply uses one paragraph to print "Hello World" and exits:

Dear Princess Celestia:Hello World!

Today I learned how to say hello world!
I said “Hello, World!”!
That's all about how to say hello world.

Your faithful student, Kyli Rouge.

A program that uses two paragraphs, a mane paragraph and a utility paragraph, to add all the numbers from 1 to 100:

Dear Princess Celestia: I can add!

Today I learned how to add a lot.
Did you know that the number the answer was how to add using 1 and 100?
I said the answer!
That's all about how to add a lot.

I learned how to add to get a number using the number first and the number last.
Did you know that the number sum was 0?
As long as first was no more than last,
sum became sum plus first...
first got one more.
That's what I did!
Then you get sum!
That's all about how to add!

Your faithful student, Kyli Rouge.

Mirror in Java[]

FiM++ can be translated into Java relatively easily. Here's the above Hello World example in Java:

public class HelloWorld extends Object {
    public static void main(String[] args) {
        System.out.println("Hello, World!");
    }
}

And here's the above addition program:

public class ICanAdd extends Object {
    
    public static void main(String[] args) {
        double theAnswer = howToAdd(1, 100);
        System.out.println(theAnswer);
    }
    
    public static double howToAdd(double first, double last) {
        double sum = 0;
        while (first <= last) {
            sum = sum + first;;;
            first++;
        }
        return sum;
    }
}

See Also[]

Advertisement