99 bottles of beer on the wall – A St. Patrick’s special

Share
  • March 17, 2020

This article is a blast from the past, originally published on March 16, 2018. Enjoy!

1994 — Tim Robinson has the great idea to start a collection of ’99 bottles of beer’ programmed in different languages. Robinson’s list started off with 20 languages. The year is 2018 and his fun little project grew to include the representation of the song ’99 bottles of beer’ in 1500 different programming languages and variations! Yes, 1500!

If you don’t know the song, check out the lyrics here.

All these small programs generate the lyrics to the song as an output and it’s ridiculously fun to browse through them. The list is enormous and, of course, it’s open for any further contributions. So if you feel like the list is not long enough or it doesn’t include your favorite language or variation, the creators of the site invite you to submit your own piece of code!

SEE ALSO: Lost in the weird part of the internet: Programming jokes to crack you up

Here, I will present three of my favorite representations of the lyrics. Open up a bottle of beer and enjoy!

To beer, or not to beer?

Jonas Sjöbergh, is the author of ’99 bottles of beer’ in the Shakespeare language. For those of you who are not familiar with it, the Shakespeare programming language is written in a way that resembles Shakespeare’s plays. Not into classic literature? Trust me, you will love this one! Have a small taste:

Romeo, a man who curses men and likes women, while taking up some space.
Juliet, often the temporary affections of Romeo.
The Ghost,holds his liquor.
Hamlet, a man who is a bit jumpy.
Oberon, o.
Emilia, e.
Titus, t.
Ajax, n.
Angelo, a.
Shylock, s.
Lennox, l.
Bianca, b.
The Abbot of Westminster, w.
Desdemona, d.
Robin, r.
Capulet, ,.

		     Act I: Where the action is.

	      Scene I: Where the beginnings are located.

[Enter Hamlet and The Ghost]
Hamlet:
	Thou art as mighty as the sum of a proud rich trustworthy hero
	and a handsome Lord. Thou art as noble as the square of thyself.
	Thou art as rich as the difference between thyself and a plum.
The Ghost:
	Thou art as good as the difference between a Lord and a Lord.

	    Scene II: Where bottles of beer are displayed.

[Exeunt]
[Enter Hamlet and The Ghost]
	the Ghost: 
	Thou art as good as the sum of thyself and a Lord.
[Exeunt]
[Enter Romeo and the Ghost]
Romeo: 
	Open your heart.
	the Ghost:
	You are a fine brave gentle bold amazing Lord.
[Exit The Ghost]
[Enter Bianca]
Bianca:
	Speak your mind.
Romeo:
	Thou art as lovely as the sum of a charming handsome healthy
	lovely pretty noble angel and the sum of a sweet beautiful
	lovely fine sunny summer's day and a golden hair. Speak your mind.   
[Exit Bianca]

Something to beer up your brain

Some people prefer to keep it simple, minimal so to speak. This’s probably what Michal Wojciech Tarnowski had in mind when he wrote ’99 bottles of beer’ in Brainfuck language. Brainfuck is an extremely minimalistic language that includes only 8 simple commands and an instruction pointer. As the language dictates, this version of the song is as minimal as it can be. Check it out:

# 99 Bottles of Beer
# Brainfuck version
# by Michal Wojciech Tarnowski


                +>+++++++[>>>+++
                 +++++<<<<+++++ 
                +>>++++++++++[>+
                 +++++++++<-]>[
                 >>+>+>+>+>+>+>
                 +>>+>+>>+>+>+>
                 +>>+>+>>+>+>+>
                 >+>+>+>+>>>>>+
                 >+>+>+>>+>+>+>
                 >+>+>+>+>>+>+>
                +>>+>+>+>+>>+>+>
                >+>+>+>+>+>+>>>>
                +>+>>+>+>+>+<<<<
                <<<<<<<<<<<<<<<<
               <<<<<<<<<<<<<<<<<<
               <<<<<<<<<<<<<<<<<<
               <<<<<<<<<<<<<<<<<<
               -]<++++[>++++++++< 
               +>>>>>+>>>+>>>>+>>
              >>>+>+>>+>>>>>+>>>>+
              >>>>>+>>>>+>>>>>+>>>
              +>>>>>>>+>+>+>>>+>>>
              >>+<<<<<<<<<<<<<<<<<
              <<<<<<<<<<<<<<<<<<<<
             <<<<<<<<<<<<<<<<<<<<<<
            <<<<<<<<<<<<<<<<-]+++++[ 
          >>>>>+++>>++>++>>+++>+>>>+++
        +>->++>++>++>+++>++>>--->->+>>>+
       +>++>>>>++>++++>++>>->++>>>++>->++
     +>+++>>+>+++>>>+++>++>+++>++>>>++>>++>
    ++>>++>++>+++<<<<<<<<<<<<<<<<<<<<<<<<<<<
   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  <<<<-]>>-->+>+>+>-->+>>>+>++>>-->+>+>->>+>>>
  +>->+>>->++>-->-->++>->>>->++>++>+>>+>>+>>>+
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.>.>.>.>.>.>.>.>.>.>.>.>.>.
>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.<<<<<<<<<<<<<<<<<<
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<<<<-.>>>>.>.>.>.>.>.>.>>.>.>.>.>.>.>.>.>.>.>.>.
>.>.>.>.>.>.>.>.>>.>..<<<<<<<<<<<<<<<<<<<<<<<<<<
<<<<<<->]<<]<.>>>>.>.>.>.>.>.>.>>.>.>.>.>.>.>.>.
>.>.>.>.>.>.>.>.>.>.>.>.>.>>>.<<<<<<<<<<<<<<<<<<
<<<<<<<<<<<<<<<<<.>>>>.>.>.>.>.>.>.>>.>.>.>.>.>.
>.>.>>>>>>>>>>>>>>.>.>>.>.>.>.>.>.>.>.>.>.>.>.>.
>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.
>.>.>.>.>.<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<.>.>.>.>.>.>.
 >.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>>.> 

For the LOLz

Last but not least, the famous LOLCODE! The programming language that is written to resemble the internet sensation which is Lolcat, could not be missing from the list. I needs to says no moar…

BTW LOLCODE version of 99 Bottles of beer
BTW By Mike Gogulski (http://www.gogulski.com/) 13 July 2007
BTW LOLCODE is a programming language by and for lolcats
BTW http://www.lolcode.com/
BTW
BTW Tested with:
BTW   sjlol version 1.1 for lolcode 1.0
BTW     Win32 binary: http://www.rit.edu/~sjl7678/sjlol.zip
BTW     Home: http://lolcode.com/implementations/sjlol 
BTW     Online interpreter: http://wealhtheow.rh.rit.edu:8080/index
BTW       (Doesn't work with comments, so delete all "BTW" lines)
BTW
BTW Save as 99BOTTLZ.LOL, start with "sjlol 99bottlz.lol"
BTW
BTW LOLCATZ CNT SPEL 2 GUD
BTW
HAI
    VISIBLE "O HAI! IM IN UR BEERZ!"
    I HAS A VAR
    LOL VAR R 99
    IM IN YR LOOP
        VISIBLE VAR!
        VISIBLE " BOTTLZ OF BEER N TEH WALL, "!
        VISIBLE VAR!
        VISIBLE " BOTTLZ OF BEER!"
        VISIBLE "TAKE 1 DWN, PAS IT AROUN, "!
        NERFZ VAR!!
        IZ VAR LIEK 0?
            YARLY
                VISIBLE "NO MOAR"!
            NOWAI
                VISIBLE VAR!
        KTHX
        VISIBLE " BOTTLZ OF BEER N TEH WALL!"
        IZ VAR LIEK 0?
            GTFO
        KTHX
    KTHX
    VISIBLE "GIEV MOAR PLZ! KTHXBAI!"
KTHXBYE

Hope you had some early St. Patrick’s fun and remember to enjoy your beer responsibly when coding!

The post 99 bottles of beer on the wall – A St. Patrick’s special appeared first on JAXenter.

Source : JAXenter