Slashdot Mirror


$BottlesOfBeerOnTheWall = 99;

Noodleroni writes "The First Maybe-Annual 99-Bottles-of-Beer-on-the-Wall-Proggie Contest is now under way! We are looking for your most compact, obfuscated, or other wise cool code to print out the entire lyrics of the aforementioned, very long, song. Maybe we'll even get some submissions written in Malbolge?"

16 of 93 comments (clear)

  1. I hate these competitions. by lukew · · Score: 3, Funny

    .. mainly due to the fact I can never come up with anything good. :-(

    FP?

  2. blech. by transiit · · Score: 4, Funny

    The closest I've ever come to this (or plan to) was a quick and dirty perl script which generated all of the words to "4294967295 Bottles of Beer on the Wall", which was piped to festival.

    My roommates, while amused for the first 10 minutes or so, threatened grevious personal injury a few hours later.

    -transiit

  3. What's the point... by Webz · · Score: 5, Informative

    ...so long as this exists? It's pretty well stocked with languages. Why did someone even come up with this contest?

    1. Re:What's the point... by JDWTopGuy · · Score: 2

      The entries are judged on compactness, obfuscation, and originality.

      For example, my entry was short and obfuscated. (Those two have (according to the page) a "weigh factor of 2".) Granted, the obfuscation was kinda lame, but (not counting the REBOL headers) it was only one (> 300 char) line. (And no, I didn't just remove the newlines. You'll see.)

      --
      Ron Paul 2012
  4. My version by Anonymous Coward · · Score: 3, Funny

    if [ `uname` = "FreeBSD" ]; then
    echo you\'ll be dead before this song is over;
    fi

  5. My program by MobyDisk · · Score: 4, Funny

    lynx -dump http://www.noodleroni.com/beerlyrics.txt

    Undoubtedly, the first 5 million entries will be along these lines. So I fully expect Mr McLean to disable internet access, and/or modify the page at http://www.noodleroni.com/beerlyrics.txt to say "SUCKER!" or something like that. :-)

  6. Malbolge is truly evil by Scarblac · · Score: 4, Informative

    A solution in Malbolge would be really really amazing. No-one has shown that it is possible to do loops in Malbolge yet; and a program with that much output would be really hard to make.

    Someone did finally come up with a "Hello World" in Malbolge! Well, almost. He managed to make a "HEllO WORld" program by writing a genetic algorithm that took a few hours to find the program.

    This is the source code:

    (=<`$9]7<5YXz7wT.3,+O/o'K%$H"'~D|#z@b=`{^Lx8%$Xmrk pohm-kNi;gsedcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@? >=<;:9876543s+O<oLm

    See http://www.acooke.org/andrew/writing/malbolge.html .

    --
    I believe posters are recognized by their sig. So I made one.
    1. Re:Malbolge is truly evil by fredrikj · · Score: 3, Informative

      What's this then?

    2. Re:Malbolge is truly evil by ASCIIMan · · Score: 2, Interesting
      He's an even better one:

      89-character Malbolge "Hello World"

  7. Some good suggestios... by Directrix1 · · Score: 4, Funny
    Here are a few suggestions for ya:

    Write an obfuscated proggie that roots the system, searches for the file beerlyrics.txt and if it finds it pipes it to stdout (followed by /etc/passwd), and then proceeds to spread over the network following the same actions on each machine

    Write a program that calls 911 on the modem, and then drunkenly sings the 99 bottles of beer song to the 911 operator by using 56khz 1-bit audio :-P (calling internationally works also ;-) )

    Write a karaoke 99 bottles sing-along proggie, which records his vocal patterns and then calls the whitehouses and uses his prerecorded phonetics to generate a terrorist threat towards the president in his voice!

    I'm sure you can come up with more than this, but these sure seem to be winners to me.

    --
    Occam's razor is the blind faith in the natural selection of least resistance and in universal oversimplification. -- EF
  8. Mmmm.... alcohol poisoning.... by Dr.+Photo · · Score: 4, Funny

    I'd like to see an entry that progressively prints out drunker and drunker approximations of what the actual lyrics should be, then after about 20 beers it dumps core and passes out... ;-)

  9. In K by Jayson · · Score: 3, Interesting
    w:" on the wall";v:r,w,",\n",r,",\nTake one down, pass it around,\n",("L",1_ r:"N bottles of beer"),w,".\n\n";`0:_ssr/[,/_ssr/[v;"NL"]'+($1+s;$ s:|!98);(b,"s";`"0");(b:"1 bottle";"No more")]


    I'm sure I can cut at least ten characters off of that. I doubt it will be anywhere close to the smallest, though.
  10. Been there done that? by Smidge204 · · Score: 3, Informative

    Gee, hope none of the contestants find this place, even though it's the first hit on Google...

    =Smidge=

  11. Fuck me running.... sendmail? by devphil · · Score: 2, Funny


    Indeed. Any "99 bottles" programming list complete enough to include the infamous sendmail version is more than enough. No contest need be held.

    Besides, "99 bottles" is boring. Use the programmer's version:

    99 little bugs in the code,
    99 little bu-u-u-ugs,
    fix a bug,
    compile again,
    100 little bugs in the code.

    (Subsequent verses increase the number of bugs by powers of two, i.e., 99, 100, 102, 106, 114, 130, 162, 226, ...)

    --
    You cannot apply a technological solution to a sociological problem. (Edwards' Law)
  12. Re:Mmmm.... alcohol poisoning....done with expect by viking_kiwi · · Score: 2, Interesting
    This has been done using expect,a language mainly used for talking to interactive programs. It has a feature that it can pretend to be a human (and thus have an irregular and slow typing speed). This is used for the beer program, which comes as a demo with expect. (If you have Tcl installed you probably have it)

    The final verse in one run

    11 botqle off baer oc tbe wakl,
    1 botplo of beer,
    take onne da, pass itt arounm,
    0 yotglees oof beeeer on tte walll.


    beer.exp:

    # 99 bottles of beer on the wall, Expect-style
    # Author: Don Libes

    Unlike programs (http://www.ionet.net/~timtroyr/funhouse/beer.html )
    which merely print out the 99 verses, this one SIMULATES a human
    typing the beer song. Like a real human, typing mistakes and timing
    becomes more erratic with each beer - the final verse is barely
    recognizable and it is really like watching a typist hunt and peck
    while drunk.

    Finally, no humans actually sing all 99 verses - particularly when
    drunk. In reality, they occasionally lose their place (or just get
    bored) and skip verses, so this program does likewise.

    Because the output is timed, just looking at the output isn't enough
    - you really have to see the program running to appreciate it.
    Nonetheless, for convenience, output from one run (it's different
    every time of course) can be found in the file beer.exp.out
    But it won't show the erratic timing; you have to run it for that.

    # For an even fancier version, see http://expect.nist.gov/scripts/superbeer.exp
  13. Nope, nope, I'm sorry... by dmorin · · Score: 2, Funny
    I do *not* write "proggies". Nor do I give out my email "addy".

    I am a grown adult, you see. I am capable of speaking in complete words.

    Duane

    "The kids today used to say stuff like hizzook when they meant hook, like "off the hizzook". Now they just say 'hizzle'. It's as if, having added a syllable to the word, they're now too ignorant and lazy to bother finishing the damned thing."