The Smart Person's Mirage

The most beautiful version, you say? Then, let's try this one in...

Shakespeare Programming Language

The Marvelously Insane FizzBuzzJazz Program.

Lady Capulet, an old bossy woman that loves to count.
The Archbishop of Canterbury, an old fart who adores to spit out letters.


          Act I: The only one of them.

          Scene I: The Archbishop of Canterbury is a bastard.

[Enter The Archbishop of Canterbury and Lady Capulet]

The Archbishop of Canterbury:
 You are nothing!

          Scene II: Count, Lady Capulet, count.

The Archbishop of Canterbury:
 You are as beautiful as the sum of yourself and a cat!

Lady Capulet:
 Am I worse than the square of the product of the sum of a warm gentle flower and a rose
 and my pretty angel?

The Archbishop of Canterbury:
 If not, let us proceed to Scene VIII.

          Scene III: Fizzing to no end!

The Archbishop of Canterbury:
 Is the remainder of the quotient between yourself and the sum of a happy cow and a
 chihuahua as good as nothing?

Lady Capulet:
 If not, let us proceed to Scene IV. Thou art as handsome as the sum of the sum of
 the sweetest reddest prettiest warm gentle peaceful fair rose and a happy proud kindgom
 and a big roman. Speak thy mind!

 Thou art as fair as the sum of thyself and a honest delicious cute blossoming peaceful
 hamster. Thou art as cunning as the sum of the sum of an embroidered King and a horse
 and thyself. Speak thy mind!

 Thou art as amazing as the sum of the sum of a good happy proud rich hero and a hair and
 thyself! Speak thy mind.

 Speak your mind!

          Scene IV: Milady, there is jazz in thy robe.

The Archbishop of Canterbury:
 Is the remainder of the quotient between yourself and a proud noble kingdom as good as
 nothing?

Lady Capulet:
 If not, let us proceed to Scene V. You are as charming as the sum of the sum of a noble
 cunning gentle embroidered brave mighty King and a big warm chihuahua and an amazing
 pony! Speak your mind!

 You are as prompt as the sum of yourself and a big black sweet animal. You are as noble
 as the sum of the sum of a gentle trustworthy lantern and yourself and a hog. Speak your
 mind!

 You are as bold as the sum of the sum of yourself and a good delicious healthy sweet
 horse and my smooth cute embroidered purse. You are as peaceful as the sum of a flower
 and yourself. Speak your mind.

 Speak your mind!

          Scene V: Buzz me up, Scotty!

The Archbishop of Canterbury:
 Is the remainder of the quotient between yourself and the sum of a gentle happy cow and a
 chihuahua as good as nothing?

Lady Capulet:
 If not, let us proceed to Scene VI. Thou art as handsome as the sum of the sweetest
 reddest prettiest warm gentle peaceful fair rose and a small town. Speak your mind!

 You are as prompt as the sum of yourself and a big healthy peaceful fair rich kingdom.
 You are as loving as the sum of the sum of an embroidered King and a horse and thyself.
 You are as amazing as the sum of yourself and a cute fine smooth sweet hamster. Speak
 your mind!

 You are as prompt as the sum of the sum of yourself and an amazing cunning Lord and a
 hair. Speak your mind.

 Speak your mind!

The Archbishop of Canterbury:
 Let us proceed to Scene VII.

          Scene VI: Output or die!

The Archbishop of Canterbury:
 Open your heart!

          Scene VII: Oh, to jump the line.

Lady Capulet:
 You are as handsome as the sum of a proud noble rich kingdom and a rural town. Speak your
 mind! You are as gentle as the sum of the sum of yourself and a green mistletoe and my
 father. Speak your mind!

The Archbishop of Canterbury:
 We must return to Scene II.

          Scene VIII: Goodbye, cruel world!

[Exeunt]

So, after my struggle with SPL here, I felt like I had to do at least one submission with it on any challenge. And this is it.

So, what's all this then?

So, first, we declare the variables we're going to use throughout the program, which must come from Shakespeare plays. Fed up of Romeo, Juliet, Ophelia and Othello, I went up with The Archbishop of Canterbury and Lady Capulet. Their descriptions, as well as the Acts'/Scenes' titles, are disgarded by the parser, so you can put there pretty much anything you like.

So, let's make some king of translation to something a little less gibberishy.

Act I, Scene I

Begin Lady Capulet = 0;

Act I is pretty straightforward: we initialize our variable with 0.

Act I, Scene II

Lady Capulet += 1; if(Lady Capulet < Math.pow((2*2*1+1)*(2*1),2)) continue; else goto Scene VIII;

We increment Lady Capulet's value and compare it with 100 (yes, that whole sentence serves solely to get the number 100); if it's not smaller, we jump to Scene VIII (the end); otherwise, we continue on to the next Scene.

Act I, Scene III

if(Lady Capulet % (2+1) == 0) continue; else goto Scene IV; The Archbishop of Canterbury = 2*2*2*2*2*2*1; System.out.print((char)The Archbishop of Canterbury); The Archbishop of Canterbury += 2*2*2*2*2*1; The Archbishop of Canterbury += 2*1+1; System.out.print((char)The Archbishop of Canterbury); The Archbishop of Canterbury += 2*2*2*2*1+1; System.out.print((char)The Archbishop of Canterbury); System.out.print((char)The Archbishop of Canterbury);

First, we see if the modulus of the division by 3 is 0; if it's not, we jump to Scene IV; if it is, we begin doing arithmetic operations and storing them on the Archieperson, outputting them in character form once we find the one we're looking for. Yes, in the end, the idea is to get Fizz.

Act I, Scene IV

if(Lady Capulet % (2*2) == 0) continue; else goto Scene V; The Archbishop of Canterbury = 2*2*2*2*2*2*1+2*2*1+2*1; System.out.print((char)The Archbishop of Canterbury); The Archbishop of Canterbury += 2*2*2*1; The Archbishop of Canterbury += 2*2*1+(-1); System.out.print((char)The Archbishop of Canterbury); The Archbishop of Canterbury += 2*2*2*2*1+2*2*2*1; The Archbishop of Canterbury += 1; System.out.print((char)The Archbishop of Canterbury); System.out.print((char)The Archbishop of Canterbury);

First checks if the modulus of the division by 4 is 0, then continues as the same scene as before, for Jazz.

Act I, Scene V

if(Lady Capulet % (2*2+1) == 0) continue; else goto Scene VI; The Archbishop of Canterbury = 2*2*2*2*2*2*1+2*1; System.out.print((char)The Archbishop of Canterbury); The Archbishop of Canterbury += 2*2*2*2*2*1; The Archbishop of Canterbury += 2*1+1; The Archbishop of Canterbury += 2*2*2*2*1; System.out.print((char)The Archbishop of Canterbury); The Archbishop of Canterbury += 2*2+1; System.out.print((char)The Archbishop of Canterbury); System.out.print((char)The Archbishop of Canterbury); goto Scene VII;

Functions like the previous two, checking if the modulus of the division by 5 returns 0, then attempts to write Buzz; the only difference is that, in the end, we skip a Scene.

Act I, Scene VI

System.out.print(Lady Capulet);

To reach this Scene, the number assumed by Lady Capulet must not have been neither Fizz nor Jazz nor Buzz; so, we output it in numeric form.

Act I, Scene VII

The Archbishop of Canterbury = 2*2*2*1+2*1; System.out.print((char)The Archbishop of Canterbury); The Archbishop of Canterbury += 2*1+1; System.out.print((char)The Archbishop of Canterbury); goto Scene II;

So, this is the only way I found to jump to the next line: output, first, a CR, then a LF; then, we return to Scene II, to that we can continue with the program.

Act I, Scene VIII

End.

Straightforward enough.

I'm still trying to see if I could show this running online, but I can't find an online compiler - the one I know doesn't seem to combine well with any program except the one already loaded, or maybe there's some kind of problem with the interface between the keyboard and the chair...

Update 1:

After mathmandan's comment, I edited the order of Jazz's and Buzz's scenes. It had to be done.


><> (Fish)

1 > :9b*)?; 0& v
               \ :3%?v "Fizz" r}oooo &1+& \
               /     <                    /
               \ :4%?v "Jazz" r}oooo &1+& \
               /     <                    /
               \ :5%?v "Buzz" r}oooo &1+& \
               /     <                    /
               \   &?v :n                 \
  ^  +1 oa           <                    /

><> is a 2D programming language where instructions are single chars and the instruction pointer (IP) can move up, down, left or right, depending on arrows ^>v< and mirrors /\. It doesn't have variables or strings so not repeating yourself is a little harder, but I think this is nice in its own way.

We push 1 and start the loop. :9b*)?; checks if the number is greater than 99 (9b* = 9*11), and if so the program halts ;. Otherwise, put a 0 into the register and move down v into the wavy part.

:3%? checks the number modulo 3. If it's nonzero, then we go down v a row and move left <. Otherwise, we skip the down arrow and push "Fizz", print it (r}oooo) and increment the register (&1+&) before bouncing off the right wall mirrors to go down a row. Either way we end up moving leftward along the third row, until we bounce off the left wall mirrors. Then we repeat for Jazz and Buzz.

This continues until the 7th line, which checks the register &'s value. If it's nonzero, then we just go down. Otherwise, we print the number itself n before going down.

Finally, ao (remember, we're moving leftward now!) prints an ASCII newline and 1+ increments the number, before we go up ^ and do the loop > again.

(Now we wait for an aesthetic Piet answer...)


LOLCODE

Elegant? Nope. Efficient? Definitely not. Beautiful? Well, you know what they say: beauty is in the eye of the beholder.

HAI
I HAS A kitty ITZ 1
IM IN YR house UPPIN YR kitty TIL BOTH SAEM kitty AN 100

    BTW, computin yr mods
    I HAS A d00d ITZ NOT MOD OF kitty AN 3
    I HAS A doge ITZ NOT MOD OF kitty AN 4
    I HAS A bro ITZ NOT MOD OF kitty AN 5

    ANY OF d00d bro doge MKAY, O RLY?
    YA RLY
        d00d, O RLY?
        YA RLY
            VISIBLE "Fizz"!
        OIC
        doge, O RLY?
        YA RLY
            VISIBLE "Jazz"! BTW, wow such jazz
        OIC
        bro, O RLY?
        YA RLY
            VISIBLE "Buzz"!
        OIC
    NO WAI
        VISIBLE kitty!
    OIC

    VISIBLE ""
IM OUTTA YR house
KTHXBYE

Some explanation:

LOLCODE programs begin with HAI and end with KTHXBYE.

Variables are dynamically typed and are assigned using I HAS A <variable> ITZ <value>. Once defined, variables can also be assigned using <variable> R <value>.

Loops in LOLCODE are named. The syntax is:

IM IN YR <loop> UPPIN YR <index> TIL BOTH SAEM <index> AN <end>
    <stuff to do>
IM OUTTA YR <loop>

This is just Internet speak for "loop until i = end". In LOLCODE 1.2, the indexing variable needs to be initialized prior to the loop. Here the loop is named "house" because it makes reading the loop initialization sound humorous.

VISIBLE prints to stdout. By default a newline is appended, but adding ! suppresses the newline.

Conditionals are specified as follows:

<condition>, O RLY?
YA RLY
    <code to execute if condition is true>
NO WAI
    <code to execute if condition is false>
OIC

Conditions must either be expressions which evaluate to a boolean or boolean values. In LOLCODE, the boolean type is called TROOF and it has values WIN (true) and FAIL (false).

Single-line comments begin with BTW.

Not well-versed in the language of teh Internetz? Just let me know and I'll happily provide further explanation.