Shop Mobile More Submit  Join Login
Dear Princess Celestia: Letter One

Today I Learned an important lesson about friendship.

I learned how to write "Hello World!"

Your faithful student, Twilight Sparkle.

P.S. In this case, the syntax is similar to C++.

----------------------------------------------------------------------

Dear Princess Celestia: Letter One

I wrote "Hello World!"

Your faithful student, Twilight Sparkle.

P.S. In this case, the syntax mirrors that of Python syntax. I'll leave it to you, readers, to decide which one you deem better. -Twilight Sparkle

----------------------------------------------------------------------

Dear Princess Celestia: Letter One

Today I learned how to sing Applejack's Drinking Song.

I learned Applejack's Drinking Song with Applejack.

Did you know that Applejack likes the number 99?

I did this while Applejack had more than 1.
I sang " 'Applejack' jugs of cider on the wall, 'Applejack' jugs of cider,"
Applejack got one less.

When Applejack had more than 1,
I sang "Take one down and pass it around, 'Applejack' jugs of cider on the wall."
In the end, I did this instead.
I sang "Take one down and pass it around, 1 jug of cider on the wall.
1 jug of cider on the wall, 1 jug of cider.
Take one down and pass it around, no more jugs of cider on the wall."
That's what I did.

In the end, I did this instead.
I sang "No more jugs of cider on the wall, no more jugs of cider.
Go to the store and buy some more, 99 jugs of cider on the wall."
That's what I did.

That's about Applejack's Drinking Song with Applejack!

Your faithful student, Twilight Sparkle.

P.S. Twilight's drunken state truly frightened me, so I couldn't disregard her order to send you this letter. Who would have thought her first reaction to hard cider would be this... explosive? I need your advice, your help, everything, on how to deal with her drunk... self. -Spike
When I saw the post for FiM++, I couldn't resist.

EqD Post: [link]

99 Bottles of Beer: [link]

I know the above is probably the worst way to implement 99 Bottles of Beer in the world, but I tried to keep it in a way that remotely resembles a letter to Princess Celestia.

For the name of the language, I humbly suggest... "Friendship Reports." With the actual period. (Abbreviated: FR., read "Ef Ar Dot.") Because dots are obviously important. You'll understand if you have played EVE long enough.

=> "Today I Learned..." : Main() function. Takes no arguments. May be omitted for letters without lessons(functions).
=>=> "an important lesson about friendship." : Generic opening statement.
=>=> "<comment>": Opening statement with comment on the entire letter(code). Everything written after "Today I Learned..." is considered a comment until the next period.

=> I sang / wrote / said "" : print("")
=>=> I sang "... '<var>'" : print("... '<var>'")
=> I learned <name> (with <var>).: Define function as <name>, taking <var> as arguments.
=> => That's about <function_name> (with <arg>)! : End function definition.

=> I learned <how to> <method>.: Perform single <method>. Method ends at next period.

=> got/had <num> more : +<num>
=> got/had <num> less : -<num>

=> When <var> had more than <value> : if <var> > <value>
=> I did this while <var> <comparison> <value> : for (<var> <comparison> <value>)
=>=> That's what I did. : General closing statement for all at"I did this while" and "When" (while / if) statements.

=> Did you know that <var> is/likes (the <type>) <value>? : Assign value with enforced type.

=> P.S. : Text comment, as in // .
=> By the way, <content>.: In-line comment with <content>. Comment ends at next period. (Similar to /* */ in C++.)

Ver. 0.01A - Modified "if" statements as "When," as per croaklieuhunt's input.
Ver. 0.01B - Added "That's what I did.", general closing statement for all "When" and "I did this while" statements.
Ver. 0.02 - Decided on main() function. Updated "Hello World!" program to make sense. Updated description with function definition. Updated description for performing a single method.
Add a Comment:
 
:iconwolf-mane:
Wolf-mane Featured By Owner Jan 30, 2013
This is silly and as a programmer I love it!
Reply
:iconpekusiili:
Pekusiili Featured By Owner Nov 27, 2012
I'm like super late to the party, but this is amazing! I'm gonna take some time to learn about this stuff, and once a working compiler or whatever is out, I'll start writing some programs :)

Though I guess FiM++ isn't well suited for scientific purposes. Too bad, because then I could have doubled my fun at work :D (unless someone writes an extension for Python...)
Reply
:iconsupuhstar:
Supuhstar Featured By Owner Oct 24, 2012  Hobbyist Digital Artist
Sup, bronies! So I find that this is an original source of material for the language, so I feel it's my duty to put this here. I've made the language completely usable and many of us are racing to build the best compiler. It's currently defined in a Google doc and even has its own wiki!

Not only is is consistent and unambiguous, but it can still be read as a letter! I hope you guys like what it's become, and feel free to contribute your opinions!
Reply
:iconsupuhstar:
Supuhstar Featured By Owner Oct 24, 2012  Hobbyist Digital Artist
Dear Princess Celestia: This can get confusing.

Today I learned recursion.
I remembered recursion!
That's all about recursion.

Your faithful student, Kyli Rouge.
Reply
:icondeftcrow:
DeftCrow Featured By Owner Oct 24, 2012
"Dear Kyli Rogue,

The five lines of code you gave me earlier brought me much joy,
more so because they arrived at the opportune moment of the end of today's day court.

You have my gratitude for your contributions to the development of the new cipher, hereby known as FiM++.

May your name be known in the history of logicians that helped Equestria become the nation as it stands today.

Best wishes,
Princess Celestia of Equestria."


Oh, I almost forgot. Would you be able to give me access to the first page?
While I myself is not much of a programmer, I should be able to write a foreword that details the purpose and quirks of the language. My user name there is SingleCrystal.
Reply
:iconsupuhstar:
Supuhstar Featured By Owner Oct 24, 2012  Hobbyist Digital Artist
oh, well if Celly is sending this, I'll FWD it to my MLP OC XP
"Your Highness Celestia,

It's been a pleasure working for Equestria to bring the everypony into the modern era. You can count on me if you ever need anything.

Humbly yours,
~Digit Shine"

As I said in the chat, simply click the blue "Share" button and do what is says, and I'll be able to add you :3

I'll make a space for your foreword ^^
Reply
:iconhackalotspark:
HackalotSpark Featured By Owner Oct 19, 2012  Hobbyist General Artist
Is there a website where I can learn all this? I want to learn it Dag nabbit!
Reply
:iconsapphire475gs:
sapphire475gs Featured By Owner Oct 17, 2012
The first two sets didn't immediately strike me as code... but for that last one, it was hard to miss the conditional statements. I'm at least glad I could determine that P.S. was your commenting system. I'm an electrical engineering major that hasn't really pursued programming past some basic C (and a hint of Java), but this is really neat!
Reply
:iconroxanne13579:
Roxanne13579 Featured By Owner Oct 17, 2012  Hobbyist General Artist
This is just awesome xD
I mean, I've been working with C# for over a year now and I really like working with it, but I think this'll be my new favourite language xD

Right now though, I have to learn how to work with a functional language: Haskell @_@
Gah, gimme FiM++ plox xD
Reply
:iconemanguy:
emanguy Featured By Owner Oct 16, 2012
I'm reading the syntax specification from the Equestria Daily post ([link]) and I'm unsure about one thing. Do you have to close the main function i.e. the "Today I learned" function declaration? I would assume since it's c/java like you need to close the main function with the function close syntax "That's all about <function name>!"

In the first and second examples you should need to close the "an important lesson about friendship" function with "That's all about an important lesson about friendship!". I'm also confused with your if statement with two elses in the second example... I assume you're trying to say "go to the store and buy more cider" when the while loop is finished. If that's true you need to add an end to your while loop and place the last line of "100 bottles of cider" outside the for loop.

In this example you also declare the main function (how to sing applejack's drinking song) but never call your Applejack's drinking song function or do anything with the return (with Applejack implies you're going to return an object of Applejack type).

Therefore the implementation of "100 bottles of cider" should look more like this:

Dear Princess Celestia: Letter One

I learned applejack's drinking song.

Did you know applejack's number is 100?

I did this while applejack's number was greater than 0:

I sang applejack's number " bottles of cider on the wall " applejack's number " bottles of cider ".
applejack's number is one less.

If applejack's number was greater than 1,
I sang "take one down, pass it around, " applejack's number " bottles of cider on the wall".
That's what I did.

Otherwise,
I sang "take one down and pass it around, no more jugs of cider on the wall."
That's what I did.

That's what I did.

I sang "No more jugs of cider on the wall, no more jugs of cider. Go to the store and buy some more, 99 jugs of cider on the wall."

That's all about applejack's drinking song!

Today I learned a new song.

I remembered applejack's drinking song.

That's all about a new song!

Your faithful student, Twilight Sparkle.
Reply
:iconskyshadowmeadow:
SkyshadowMeadow Featured By Owner Oct 16, 2012
I'm not much of a programmer, I just started learning the very basics this year
but doesn't that look similar to Camouflage? I accidentally stumbled upon it on the site you've linked in description.
Reply
:icondeftcrow:
DeftCrow Featured By Owner Oct 16, 2012
There are many esoteric languages that use natural language as basic syntax and follow very specific formats. The closest to FiM++ would be Chef and Shakespeare.
Reply
:icondervonnebenaan:
dervonnebenaan Featured By Owner Oct 16, 2012
This is one of the best examples for what ponykind can achieve. Knowing that by now, the programming language is about to be completed, interpreters on their way... Holy shit! A Turing-complete, object- orientated pony programming language?
When I first heard about it, I spent a good quarter of an hour laughing hysterically. I will definitely learn this language once it's finished.
Reply
:icondeftcrow:
DeftCrow Featured By Owner Oct 16, 2012
That was exactly the reason I picked up my rusty Python and went for it; all for good fun :)
Glad you enjoyed it.
Reply
:iconsupersonic68:
SuperSonic68 Featured By Owner Oct 15, 2012
This... Is really cool. I read the entire document and understood every bit of it! I don't even know Java, only C++ so far!
Reply
:iconfrostybrand:
Frostybrand Featured By Owner Oct 15, 2012
Oh my. Can it run minecraft?
Reply
:icondeftcrow:
DeftCrow Featured By Owner Oct 16, 2012
Since the syntax of the finalized language would mirror that of Java, the same language Minecraft is written with, Brony programmers would be able to rewrite the entire source code in FiM++. At least theoretically.
Reply
:iconmadgehog:
MADgehog Featured By Owner Oct 15, 2012
PRICELESS!
Reply
:iconsupuhstar:
Supuhstar Featured By Owner Oct 11, 2012  Hobbyist Digital Artist
I'm an actual programmer.
I was able to make parsers for other esoteric languages.
I want to make a parser for this.
I want to make a full language specification for this.
May I please~?
Reply
:icondeftcrow:
DeftCrow Featured By Owner Oct 11, 2012
I say, go for it! It can either be an independent effort, or a collaboration between the guys who replied below.

The specifications given at Cereal's post is a bit wonky, so this is the list of stuff that has to be addressed to make FiM++ a more usable language:

=> Name? I'd probably say "Friendship Reports".
=> Compiled Language? Interpreted Language?
=> What will the tense of the key lines be? So far they're all in past tense, which I like because writing as if everything happened before provides the benefit of automatic rubberducking.
=> Need a better main() function, such as Today I learned an important lesson about friendship., "an important lesson about friendship" being main(). (Or, if we're using Python syntax, there won't be a need for the main function at all.)
=> Need a better way of making function calls.
=> Needs basic arithmetic support, i.e. multiplication, division, etc.
=> Implementation of printf() or Python print?
=> Importing external modules, complete with letter-like language. Language to write external modules.


Good luck to you and everyone involved in the language!
Reply
:iconsupuhstar:
Supuhstar Featured By Owner Oct 14, 2012  Hobbyist Digital Artist
I've made quite a bit of progress, including making a couple revisions to your drinking program in order to make it more easily parseable. Come take a look! [link]
Reply
:iconsupuhstar:
Supuhstar Featured By Owner Oct 11, 2012  Hobbyist Digital Artist

  • I call it FiM++, but I like the colloquial name "Friendship Reports"

  • I'll try making a compiler, first, but if that won't work, then it will work as a script

  • The whole thing should be past tense, at least in the first version. Perhaps in future versions, we can add some synonyms for different tenses so that it's more natural to write and read.

  • I'm basing it off Java or Javascript, and I like the idea of using the "Today" keyword to mean that it is the main method.

  • Indeed.

  • Working on it...

  • How's that different from printing with concatenation?

  • you mean other classes?



Let's collaborate in this Google Doc: [link] note me your email so you can edit it, too.
Reply
:icondraco-icarus:
Draco-Icarus Featured By Owner Oct 12, 2012  Hobbyist General Artist
Do you guys mind if I help? XD

I do assembly level programming, and also know Java, and a little bit of a bunch of other languages, including Python; thus I'm comfortably familiar with how programming languages in general work.

I've already got a sort of syntax worked out for this; I can email it to you if you'd like to look over it.

Also, has anyone told Cereal about this collaboration yet? XD
Reply
:iconsupuhstar:
Supuhstar Featured By Owner Oct 12, 2012  Hobbyist Digital Artist
Ooh~... let's talk about it in the doc's chat, eh? :3
I could use an assembly PoV.

Nah, let's let him find out, by himself >;D
Reply
:icontearahk:
Tearahk Featured By Owner Oct 10, 2012  Hobbyist Traditional Artist
I need to learn a lot more C++ to understand this, but I will definitely get it at some point XD
Reply
:iconrd-art:
RD-Art Featured By Owner Oct 8, 2012
I'm kinda bored, so I'm writing a compiler from FiM++ to Python. Believe it or not, I'm having fun writing it xD.
Reply
:icondeftcrow:
DeftCrow Featured By Owner Oct 11, 2012
Best wishes to you sir. I'm more familiar with Python than C++ to I'll be able to understand how to use it :)
Reply
:iconrd-art:
RD-Art Featured By Owner Oct 12, 2012
I finished it a few days ago. I haven't implemented yet the oop structures but you can use it for functional programming.
I'm more familiar with Python than with C++ too, that's why I did it in Python :D
Reply
:iconlupefenrir:
LupeFenrir Featured By Owner Oct 6, 2012
This is awesome. But I'll probably stick with c#.
Reply
:iconabcron:
Abcron Featured By Owner Oct 6, 2012
Are there any compilers that can read this? Cuz that would be awesome.
Reply
:iconrd-art:
RD-Art Featured By Owner Oct 9, 2012
I'm writing one in Python :D ~70%
Reply
:icondraco-icarus:
Draco-Icarus Featured By Owner Oct 9, 2012  Hobbyist General Artist
Are you really? Are you writing it in python as well as for python? Also, would you mind posting it somewhere when you finish?
Reply
:iconrd-art:
RD-Art Featured By Owner Oct 10, 2012
[link]
Here it is. It uses python to translate FiM++ to Python and then executes it as Python. It comes with a command line tool.
Reply
:iconcroaklieuhunt:
croaklieuhunt Featured By Owner Oct 11, 2012
It would appear that you've made the first fully functional compiler. Congratulations!
Reply
:icondraco-icarus:
Draco-Icarus Featured By Owner Oct 5, 2012  Hobbyist General Artist
A few things, firstly, I don't like how you did the statement for the Hello World. I think it'd be better to say something like this: "I said, 'Hello World!' ", (or something like that) but idk, that might just be me. The other thing is the redundancy, I think it's mostly because you're writing this like any other programming code when it could easily be made into a more paragraph-like form, but maybe try using more common identifiers for the functions.

Oh yea, and when you said "That's about Applejack's Drinking Song with Applejack" you probably didn't have to say "with Applejack" again, because it was already connected.

But I love the code as is, or rather, the idea. Hopefully PK can put all our different versions into a full language. ^.^
Reply
:icondeftcrow:
DeftCrow Featured By Owner Oct 11, 2012
Thanks for pointing it out! I didn't like that part myself, so I rewrote it based on the only two languages I barely know, C++ and Python. Both are valid as far as specs go, so I'll need your opinion on which you would like.

The bracket for the function will need a bit more attention, as you've mentioned. I'll probably have to fix the function call as well, so that the code actually calls the function to execute.

Glad you enjoyed it as much as I did :)
Reply
:iconmaster-quindo:
Master-Quindo Featured By Owner Oct 5, 2012
XD
Reply
:iconl3viathan2142:
l3viathan2142 Featured By Owner Oct 5, 2012
Please, someone's keep me from writing an interpreter. I've got stuff to do!
Reply
:iconemozombieo:
emozombieo Featured By Owner Oct 5, 2012
I'm going to try.
Reply
:iconlagdancer:
LagDancer Featured By Owner Oct 5, 2012  Hobbyist Photographer
Dear Princess Celestia: Still Saying Primes

Today I learned that there are a lot of primes.

I learned about testing with a number.
Did you know that many is a number minus 1?
I did this many times,
Did you know that Pinkie Pie likes a number modulo many?
When Pinkie Pie liked zero and many had more than 1,
I said "Pinkie! 'a number' isn't prime!".
That's about testing.
That's what I did.
Did you know that many had less?
That's what I did.
When many was 1, I said "Pinkie! 'a number is prime!". That's what I did.
That's about testing.

Did you know that Pinkie Pie likes 3?
I did this while Pinkie Pie had more than 0.
That's about the testing with Pinkie Pie!
That's what I did.

Your faithful student, Twilight Sparkle.

P.S. There are still a number of parts of the spec that need to be nailed down, but I think this letter is somewhat correctly written...
Reply
:iconcameronabab:
cameronabab Featured By Owner Oct 5, 2012  Hobbyist Writer
I think this is one language I'll pass on learning...
Reply
:iconvabla:
Vabla Featured By Owner Oct 5, 2012  Hobbyist
Arrays
Guess considering them to be a book would be ideal since both are indexed in exactly the same way (suppose FiM++ uses 1 based arrays)

I found a book titled "Numbers" today and it was full of numbers // var int *Numbers
On the 1st page of the book "Numbers" I wrote 9. // Numbers[1] = 9
On the 2nd page of the book "Numbers" I wrote what I knew about Applejack. // Numbers[2] = Applejack
On the 1st page of the book "Numbers" I read about Applejack. // Applejack = Numbers[1]

I used "about" because otherwise it just feels awkward. Oh and I guess FiM could have variables with spaces in them since it would only make sense to write 'Rainbow Dash' rather than Rainbow_Dash in a letter.

Comments
How about using "Because" for a comment line? It would work really well for explaining weird behavior to the princess that you'd kind of need for a programming language (like destroying something).
I tore out some pages out of the book "Numbers" so now there's only 3 pages left because the other pages were ruined.
Reply
:icondeftcrow:
DeftCrow Featured By Owner Oct 11, 2012
That looks like a fantastic idea. I was thinking of a "book" as an external module or library, so it's my turn to wrack my brain for more appropriate terms then.

The way I'm thinking of this language is, that each line effectively becomes a sentence and ends with a period, so that the compiler/interpreter would have an easier time reading through the code based on the location of periods. Perhaps the interpreter can read ", because" or Because as a line comment as in //(C++) or #(Python).

Thanks for the attention, by the way :)
Reply
:iconbrnway:
Brnway Featured By Owner Oct 5, 2012
I would suggest the use of "by the way" for scatttering comments throughout code
Reply
:icondeftcrow:
DeftCrow Featured By Owner Oct 5, 2012
I've put a little more rigor into the definition like this:

Initiate comment: By the way, <comment>.
Finish comment: Back to topic. / But I digress. / Anyway,
=> This is essentially /* */ in c++.

By the way, <I / pronoun / var_name> <says/said> "".
=> This is a one line comment, with strings inside the "" being the content. This is nearly equivalent to // in c++, or # in python.

What do you think?
Reply
:iconluxsolisliquidus:
luxsolisliquidus Featured By Owner Oct 5, 2012
I second this idea.
Reply
:iconlambdadusk:
lambdadusk Featured By Owner Oct 5, 2012
You can find my partial implementation of this at [link] . So far, it can only interpret the printing statements, but I can add more easily when I have the time this weekend. you can keep an eye on it at [link] .
Reply
:icondeftcrow:
DeftCrow Featured By Owner Oct 5, 2012
You sir, are a gentleman and a scholar.
Reply
:iconlambdadusk:
lambdadusk Featured By Owner Oct 5, 2012
You specs provide me no procedure for user input. I'd advise something like "I asked for <var>".
Reply
:iconvabla:
Vabla Featured By Owner Oct 5, 2012  Hobbyist
You could use something like "I found a note titled <file> in <dir>" and "I read a bit about <var> from <file>".
Reply
Add a Comment:
 
×




Details

Submitted on
October 4, 2012
File Size
2.2 KB
Submitted with
Sta.sh
Link
Thumb

Stats

Views
17,133 (7 today)
Favourites
81 (who?)
Comments
71
×