Editing FiM++ 1 The edit could not be undone due to conflicting intermediate edits. You are not logged in. The edit could not be undone due to conflicting intermediate edits. The rich text editor does not work with JavaScript switched off. Please either enable it in your browser options, or visit your preferences to switch to the old MediaWiki editor '''FiM++''' (AKA '''Friendship Reports''') is a programming language inspired by [http://mlp.wikia.com/wiki/Friendship_reports Friendship Reports], [[Wikipedia:Java (programming language)|Java]], [[Wikipedia:Shakespeare (programming language)|Shakespeare]], and [[Wikipedia:Inform 7|Inform 7]], whose syntax is not dissimilar to that of [[Wikipedia:ALGOL|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 [http://code.google.com/p/pony-lang/ a Google Code repository]. This project is abandoned June 12 of that same year. * '''Oct 4, 2012''': Cereal Velocity makes [http://www.equestriadaily.com/2012/10/editorial-fim-pony-programming-language.html a post about FiM++ on Equestria Daily]. * '''Oct 4, 2012''': DeftCrow on deviantART creates the first real program in FiM++, [http://fav.me/d5gwtse 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 [http://www.equestriaforever.com/showthread.php/1854-FiM-Programming-Language a forum post] about the aforementioned posts, also detailing some more propositional features of the language. * '''Oct 6, 2012''': KarolS posts [https://github.com/KarolS/fimpp/ a GitHub repository] for an open-source compiler. * '''Oct 11, 2012''': Supuhstar (AKA Kyli Rouge) asks permission from DeftCrow and Cereal Velocity to make a [https://docs.google.com/document/d/1gU-ZROmZu0Xitw_pfC1ktCDvJH5rM85TxxQf5pg_xmg/edit?pli=1# formal document] fully specifying the language. * '''Oct 15, 2012''': Cereal Velocity posts [http://www.equestriadaily.com/2012/10/fim-update.html 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 [[#History|above]]), but they have no number or name. == Example Programs == A program that simply uses one paragraph to print "Hello World" and exits: {{codeblock|{{code|keyword|Dear}}{{code|whitespace| }}{{code|report|Princess Celestia}}{{code|punctuation|:}}{{code|report|Hello World}}{{code|punctuation|!}}{{code|whitespace|<BR/><BR/>}}{{code|keyword|<STRONG>Today</STRONG> I learned}}{{code|whitespace| }}{{code|paragraph|how to say hello world}}{{code|punctuation|!}}{{code|whitespace|<BR/>}}{{code|keyword|I said}}{{code|whitespace| }}{{code|literal|“Hello, World!”}}{{code|punctuation|!}}{{code|whitespace|<BR/>}}{{code|keyword|That's all about}}{{code|whitespace| }}{{code|paragraph|how to say hello world}}{{code|punctuation|.}}{{code|whitespace|<BR/><BR/>}}{{code|keyword|Your faithful student}}{{code|punctuation|,}}{{code|comment| Kyli Rouge}}{{code|punctuation|.}}}} A program that uses two paragraphs, a [[mane paragraph]] and a utility paragraph, to add all the numbers from 1 to 100: {{codeblock|{{code|keyword|Dear}}{{code|whitespace| }}{{code|report|Princess Celestia}}{{code|punctuation|:}}{{code|whitespace| }}{{code|report|I can add}}{{code|punctuation|!}}{{code|whitespace|<BR/><BR/>}}{{code|keyword|<STRONG>Today</STRONG> I learned}}{{code|whitespace| }}{{code|paragraph|how to add a lot}}{{code|punctuation|.}}{{code|whitespace|<BR/>}}{{code|keyword|Did you know that}}{{code|whitespace| }}{{code|type|the number}}{{code|whitespace| }}{{code|variable|the answer}}{{code|whitespace| }}{{code|keyword|was}}{{code|whitespace| }}{{code|paragraph|how to add}}{{code|whitespace| }}{{code|keyword|using}}{{code|whitespace| }}{{code|literal|1}}{{code|whitespace| }}{{code|keyword|and}}{{code|whitespace| }}{{code|literal|100}}{{code|punctuation|?}}{{code|whitespace|<BR/>}}{{code|keyword|I said}}{{code|whitespace| }}{{code|variable|the answer}}{{code|punctuation|!}}{{code|whitespace|<BR/>}}{{code|keyword|That's all about}}{{code|whitespace| }}{{code|paragraph|how to add a lot}}{{code|punctuation|.}}{{code|whitespace|<BR/><BR/>}}{{code|keyword|I learned}}{{code|whitespace| }}{{code|paragraph|how to add}}{{code|whitespace| }}{{code|keyword|to get}}{{code|whitespace| }}{{code|type|a number}}{{code|whitespace| }}{{code|keyword|using}}{{code|whitespace| }}{{code|type|the number}}{{code|whitespace| }}{{code|variable|first}}{{code|whitespace| }}{{code|keyword|and}}{{code|whitespace| }}{{code|type|the number}}{{code|whitespace| }}{{code|variable|last}}{{code|punctuation|.}}{{code|whitespace|<BR/>}}{{code|keyword|Did you know that}}{{code|whitespace| }}{{code|type|the number}}{{code|whitespace| }}{{code|variable|sum}}{{code|whitespace| }}{{code|keyword|was}}{{code|whitespace| }}{{code|literal|0}}{{code|punctuation|?}}{{code|whitespace|<BR/>}}{{code|keyword|As long as}}{{code|whitespace| }}{{code|variable|first}}{{code|whitespace| }}{{code|operator|was no more than}}{{code|whitespace| }}{{code|variable|last}}{{code|punctuation|,}}{{code|whitespace|<BR/>}}{{code|variable|sum}}{{code|whitespace| }}{{code|keyword|became}}{{code|whitespace| }}{{code|variable|sum}}{{code|whitespace| }}{{code|operator|plus}}{{code|whitespace| }}{{code|variable|first}}{{code|punctuation|.}}{{code|punctuation|.}}{{code|punctuation|.}}{{code|whitespace|<BR/>}}{{code|variable|first}}{{code|whitespace| }}{{code|operator|got one more}}{{code|punctuation|.}}{{code|whitespace|<BR/>}}{{code|keyword|That's what I did}}{{code|punctuation|!}}{{code|whitespace|<BR/>}}{{code|keyword|Then you get}}{{code|whitespace| }}{{code|variable|sum}}{{code|punctuation|!}}{{code|whitespace|<BR/>}}{{code|keyword|That's all about}}{{code|whitespace| }}{{code|paragraph|how to add}}{{code|punctuation|!}}{{code|whitespace|<BR/><BR/>}}{{code|keyword|Your faithful student}}{{code|punctuation|,}}{{code|comment| Kyli Rouge}}{{code|punctuation|.}}}} === Mirror in Java === FiM++ can be translated into [[Wikipedia:Java (programming language)|Java]] relatively easily. Here's the above Hello World example in Java: {{codeblock|<source lang="java"> public class HelloWorld extends Object { public static void main(String[] args) { System.out.println("Hello, World!"); } } </source>}} And here's the above addition program: {{codeblock|<source lang="java"> 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; } } </source>}} == See Also == * [[Program:Jugs of Cider]] Loading editor Below are some commonly used wiki markup codes. Simply click on what you want to use and it will appear in the edit box above. Insert: – — … ° ≈ ≠ ≤ ≥ ± − × ÷ ← → · § Sign your username: ~~~~ Wiki markup: {{}} | [] [[]] [[Category:]] #REDIRECT [[]] <s></s> <sup></sup> <sub></sub> <code></code> <blockquote></blockquote> <ref></ref> {{Reflist}} <references/> <includeonly></includeonly> <noinclude></noinclude> {{DEFAULTSORT:}} <nowiki></nowiki> <!-- --> <span class="plainlinks"></span> Symbols: ~ | ¡ ¿ † ‡ ↔ ↑ ↓ • ¶ # ¹ ² ³ ½ ⅓ ⅔ ¼ ¾ ⅛ ⅜ ⅝ ⅞ ∞ ‘ “ ’ ” «» ¤ ₳ ฿ ₵ ¢ ₡ ₢ $ ₫ ₯ € ₠ ₣ ƒ ₴ ₭ ₤ ℳ ₥ ₦ № ₧ ₰ £ ៛ ₨ ₪ ৳ ₮ ₩ ¥ ♠ ♣ ♥ ♦ View this template This field is a spam trap. DO NOT fill it in! Edit summary Preview Mobile Desktop Show changes