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?"

93 comments

  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

    1. Re:blech. by Anonymous Coward · · Score: 0

      If you're running OS X you too can annoy your roomates with this command.

      wget -qO - http://www.noodleroni.com/beerlyrics.txt | sed 's/^/say "/;s/$/"/;'| osascript

    2. Re:blech. by Anonymous Coward · · Score: 0

      curl -s http://www.noodleroni.com/beerlyrics.txt | sed 's/^/say "/;s/$/"/;'| osascript if you don't have wget

  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 Anonymous Coward · · Score: 0

      DOGSI YNNUBSGUB DNA'TORRAC AEKIL DEPAHS ISDLROW EHTON
      FNORD
      Important Stuff: Please try to keep posts on topic. Try to reply to other people's comments instead of starting new threads. Read other people's messages before posting your own to avoid simply duplicating what has already been said. Use a clear subject that describes what your message is about. Offtopic, Inflammatory, Inappropriate, Illegal, or Offensive comments might be moderated. (You can read everything, even moderated posts, by adjusting your threshold on the User Preferences Page)

    2. 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
    3. Re:What's the point... by n1ywb · · Score: 1

      My entry is only 248 bytes and whoops the shit out of the beerlyrics program written in the same language on that other site.

      --
      -73, de n1ywb
      www.n1ywb.com
    4. Re:What's the point... by JDWTopGuy · · Score: 1

      I'm curious, what language was it? I'll admit my entry was just plain programming. I didn't really use any tricky stuff.

      That said, it's a tiny program and ran quickly. Maybe I could try writing one in python, the site did say you could enter 3 times.

      --
      Ron Paul 2012
    5. Re:What's the point... by n1ywb · · Score: 1

      You'll find out in May ;) Honestly though, I'm a little worried after seeing that one written in K. 240 bytes may not be much but that K one is still about half a long and definately a lot worse to look at.

      --
      -73, de n1ywb
      www.n1ywb.com
  4. My version by Anonymous Coward · · Score: 3, Funny

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

    1. Re:My version by Anonymous Coward · · Score: 0

      if [ `uname` = "Linux" ]; then
      echo you\'ll be raped in the ass 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. :-)

    1. Re:My program by y0bhgu0d · · Score: 1

      hey! you stole my idea! >:O

      haha.

    2. Re:My program by Directrix1 · · Score: 1

      Just use the google cache :-P. And change what you posted above to a bash script.

      --
      Occam's razor is the blind faith in the natural selection of least resistance and in universal oversimplification. -- EF
    3. Re:My program by Anonymous Coward · · Score: 0

      You got the compactness down pat, but it's not obfuscated... Try something like
      lynx -dump http://www.noodleroni.com/beerlyrics.txt #i*k4N&()bFU5k473\!

    4. Re:My program by n1ywb · · Score: 1

      I don't think that really earns any points for obfuscation or originality, so you get a 40 out of 100.

      --
      -73, de n1ywb
      www.n1ywb.com
    5. Re:My program by n1ywb · · Score: 1

      #!/bin/sh
      wget --http://www.noodleroni.com/beerlyrics.txt ; cat beerlyrics.txt

      All we have to do to disqualify obvious entries is post them here.

      --
      -73, de n1ywb
      www.n1ywb.com
  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 orangesquid · · Score: 1

      How was this done?!?! I am truly stumped....
      Advanced translation system? That's my best guess. I doubt a human could code in Malbolge in a reasonable amount of time...

      --
      --TheOrangeSquid Is it any wonder things seem so awry? We swim in a sea of confusion and don't have to think to survive
    3. Re:Malbolge is truly evil by JDWTopGuy · · Score: 1

      That is pure evil. I could never enter one of these because I mainly progam in REBOL which is much too simple.

      for bottles 99 1 -1 [
      print rejoin [ bottles " of beer on the wall..." ]
      ]

      You get the idea.

      --
      Ron Paul 2012
    4. Re:Malbolge is truly evil by JDWTopGuy · · Score: 1

      Murphy's law, after posting that I wrote & submitted an entry in REBOL. Obviously, I can't describe it here because of contest rules, but it was pretty good.

      Good luck to all those who enter.

      --
      Ron Paul 2012
    5. Re:Malbolge is truly evil by Lord+Sauron · · Score: 1

      Here's a better explanation of Malbolge

    6. Re:Malbolge is truly evil by Lord+Sauron · · Score: 1

      I was wondering... Is Malbolge object-oriented ?

    7. Re:Malbolge is truly evil by orangesquid · · Score: 1

      Ah, believe me, I've read through that document many times :) but I've never been able to create a non-trivial program... I'm just wondering how the proper Hello World one was done?

      --
      --TheOrangeSquid Is it any wonder things seem so awry? We swim in a sea of confusion and don't have to think to survive
    8. Re:Malbolge is truly evil by JDWTopGuy · · Score: 1

      No, but if you try to use it you will become object-oriented. Specifically, you will become oriented towards throwing and smashing objects, including your head.

      It needs a surgeon general's warning.

      --
      Ron Paul 2012
    9. 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
    1. Re:Some good suggestios... by Anonymous Coward · · Score: 0

      Yeah, I mean what could POSSIBLY go wrong?! :-)

  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... ;-)

    1. Re:Mmmm.... alcohol poisoning.... by Anonymous Coward · · Score: 0

      You could even set the nationality, so different groups have different effects!

    2. Re:Mmmm.... alcohol poisoning.... by JDWTopGuy · · Score: 1

      1 botttlesh of beeer on daa wallll,
      won bottle of beeeeeerrr,
      drink er down, passhh it aroun
      hey, wheresh all da beer?
      gotta go get shome more... *hic*

      2 policemen in a squad car,
      2 policemen,
      One gets out and makes an arrest,
      1 policeman left in the car.

      99 drunks in jail,
      99 drunks in jail,
      Add one more and whadya got,
      100 drunks in jail.

      In case you're wondering, I'm making this public domain.

      --
      Ron Paul 2012
    3. Re:Mmmm.... alcohol poisoning.... by larry+bagina · · Score: 1
      In case you're wondering, I'm making this public domain.

      I was hoping you'd release it as free (beer).

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

    4. Re:Mmmm.... alcohol poisoning.... by Xsh-II · · Score: 0

      How about a program that gets beer goggles and wakes up the next morning thinking "Why?", "What?" and "WHO?!" - it would be the nearest that a program has ever got to being human.

      --
      Xsh-II
  9. Re:"proggie" by Anonymous Coward · · Score: 0

    actually, you're a janitor. Now get back to work. Those floors won't clean themselves.

  10. Here it is in COW. by BigZaphod · · Score: 1

    A friend of mine wrote 99 bottles of beer in my COW language. It is an interesting sight to behold.

    1. Re:Here it is in COW. by Danta · · Score: 1

      Nice, but I think this one in written ZT is somehow neater.

    2. Re:Here it is in COW. by NamShubCMX · · Score: 1
      --
      We've always been at war with Eurasia.
  11. 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.
    1. Re:In K by n1ywb · · Score: 1

      Fuck there's the winning entry :( Oh wait, you posted it on /. so you're disqualified. YES, now I have a chance! :)

      --
      -73, de n1ywb
      www.n1ywb.com
    2. Re:In K by c_oflynn · · Score: 1

      Why post real text? Just hope they have an ASCII system and use the ASCII equivilent of all the text (ie: take one down.. etc) to be even less legible..

  12. Re:tsarkon reports - banned use of lame diminutive by n1ywb · · Score: 0, Offtopic

    NAZI

    --
    -73, de n1ywb
    www.n1ywb.com
  13. 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=

    1. Re:Been there done that? by -douggy · · Score: 1

      The Fromage one is awesome HOW >>>>>?

  14. Spell out the quantity... by runswithd6s · · Score: 1
    It'd make it far more challenging.
    Ninetynine bottles of beer on the wall,
    ninetynine bottles of beer...
    --
    assert(expired(knowledge)); /* core dump */
    1. Re:Spell out the quantity... by Anonymous Coward · · Score: 0

      You mean like this? :)

  15. 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)
    1. Re:Fuck me running.... sendmail? by cliveholloway · · Score: 1
      And I thought the Apache SSI one was bad!


      cLive ;-)

      --
      -- Trinity in high heels carrying a whip: The donimatrix - there is no spoonerism
  16. My 3 line python entry by smoondog · · Score: 1

    import urllib, sys
    f = urllib.urlopen("http://www.noodleroni.com/beerlyri cs.txt")
    sys.stdout.write(f.read())
    #heh, heh, heh

    -Sean

  17. 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
  18. Your not that smart! by Anonymous Coward · · Score: 0

    You thought you maybe smart but how about this two line entry from http://99-bottles-of-beer.ls-la.net/p.html

    a,t="\n%s bottles of beer on the wall","\nTake one down, pass it around"
    for d in range(99,0,-1):print(a%d*2)[:-12]+t+a%(d-1 or'No')

  19. 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."

    1. Re:Nope, nope, I'm sorry... by JDWTopGuy · · Score: 1

      Dis post iz off da hizzook! Wassup wit dat?

      477 y0ur b4s3 4r3 b3l0ng t0 h4x0rs. U R 0wn3d.

      7h3r3 g035 /\/\y k4rm4.

      --
      Ron Paul 2012
  20. Smaller by Jayson · · Score: 1

    It takes much less space use strings instead of interger lists, and that is one of the judging criterion. I think I might be able to pack the string tighter, though (then it would just look like garbage).

  21. My perl version by andy@petdance.com · · Score: 1
    LWP makes everything so easy. If you don't have Sean Burke's excllent LWP & Perl , do so:
    perl -MLWP::Simple -e'print get "http://www.noodleroni.com/beerlyrics.txt"'

    Or, using my WWW::Mechanize module,

    #!/usr/bin/perl -w

    use WWW::Mechanize;

    my $agent = new WWW::Mechanize();
    $agent->get( 'http://www.noodleroni.com/beerlyrics.txt' );
    print $agent->content;
    1. Re:My perl version by Anonymous Coward · · Score: 0

      http://99-bottles-of-beer.ls-la.net/p.html#Perl-(m inimal-version)

      What can I say? You suck!

  22. Re:"proggie" by Anonymous Coward · · Score: 0

    Shut your ass before I release the cleaning agent fume genie on you.

  23. ...make that 488 languages by NaDrew · · Score: 1

    Too bad that page doesn't seem to have been updated since last year sometime. I just sent him a version in InstallScript (InstallShield's scripting language). I'd enter in this contest but InstallShield isn't available on Linux.

    /*
    99 Bottles of Beer in InstallScript
    (c) 2003 Project Insomnia
    Released under GPL for http://99-bottles-of-beer.ls-la.net/
    Requires: InstallShield Professional 5 or greater
    */

    #include "ifx.h"

    NUMBER nBottles;
    STRING szTitle, szStatus, szTitleS, szStatusS;

    program

    Disable ( BACKGROUND );
    Enable ( STATUSDLG );

    for nBottles = 99 downto 0
    switch ( nBottles )
    case 1:
    szTitleS = "";
    szStatusS = "s";
    default:
    szTitleS = "s";
    switch ( nBottles )
    case 2:
    szStatusS = "";
    default:
    szStatusS = "s";
    endswitch;
    endswitch;
    Sprintf ( szTitle, "%d bottle%s of beer on the wall, %d bottle%s of beer",
    nBottles, szTitleS, nBottles, szTitleS );
    if ( nBottles ) then
    Sprintf ( szStatus, "Take one down, pass it around, %d bottle%s of beer on the wall.",
    nBottles - 1, szStatusS );
    else
    szStatus = "";
    endif;
    SetDialogTitle ( DLG_STATUS, szTitle );
    SetStatusWindow ( nBottles, szStatus );
    Delay ( 1 );
    endfor;

    Disable ( STATUSDLG );

    endprogram

    --
    Vista:XPSP2::ME:98SE
  24. One Line Entry - Rebol/Core by Anonymous Coward · · Score: 0

    print read http://www.noodleroni.com/beerlyrics.txt

  25. php by NamShubCMX · · Score: 1
    Well, took me 3 minutes, 8 ";"

    99 botles on the wall...

    Any idea how to reduce it?

    <?php
    function s($x){return($x==1?"":"s");}
    $a=99;$b=" bottle";$o=" of beer";$w=" on the wall";
    $r="\n<br>";$p= "Take one down, pass it around,$r";
    while($a>0){print("$a$b".s($a)."$o$w, $r$a$b".s($a)."$o,$r$p".(--$a==0?"No more ":$a).$b.s($a)."$o$w.$r$r"); }
    ?>
    --
    We've always been at war with Eurasia.
    1. Re:php by Anonymous Coward · · Score: 0

      ~10.52 user sec. in vi

      ---
      $time foo.php

    2. Re:php by aberson · · Score: 1

      two stupid ways:
      - change

    3. Re:php by aberson · · Score: 1

      ok, apparantly "plain text" doesn't actually mean plain text. let's try again:

      - change <?php to just <?
      - get rid of the <br>

  26. beerlyrics.c by Anonymous Coward · · Score: 0

    #include "beerlyrics.h"

    INSTRUCTIONS

    CLEAR YOUR THROAT;

    SINGING RULES: _IF NOT DRUNK YET, DRINK ONCE;
    OTHERWISE IF NOT DRUNK YET, DRINK TWICE;
    OTHERWISE IF NOT DRUNK YET, DRINK THREE TIMES;
    OTHERWISE IF NOT DRUNK YET, DRINK FOUR TIMES;
    OTHERWISE DOWN THE WHOLE BOTTLE;

    NOTE: ALWAYS SING OFF KEY;

    STEPS:

    GET HAMMERED;
    SING;
    PASS OUT;

    END

    1. Re:beerlyrics.c by Anonymous Coward · · Score: 0

      Free beer for the first one to figure out how it works!

      (Hint: beerlyrics.h)

    2. Re:beerlyrics.c by Anonymous Coward · · Score: 0

      Dude, you have way too much time on your hands.

  27. Re:beerlyrics.h by Anonymous Coward · · Score: 0

    #ifndef NO_HEADERS
    #include <stdio.h>
    #include <stdlib.h>
    #endif
    // dumb filter: vHjsXcCkDdXyOILVXZDnAHrwpqwHPhPSdEYeGzrGleKxCVYQWE SZiCHIadcS
    // dumb filter: ZZqTfJXaInPyUxNUDJXNZHsNgmzCQwJzFqeibGsfLUeZmYPbGW DOIchejXBu
    // dumb filter: NwKTJdNydKSLRXEbeCdbHJNSWyDKqpRPUxLqZgHOWOZsBwbUuN DFHtxaHywZ
    // dumb filter: hOOKrlyQEhVsboXDFwzdabmFYynKqsntIUCktxwLDtaaAuPhXl FBLqMWsgnz
    // dumb filter: osQIqxJlfaqxYNeBpeSymYTECQRcrawQQZIYNIflXPUEvjXbnT qszEXkvjdd
    // dumb filter: dsjCbyCqqQoHLIMBpIwRFKdasskUBoGgYdoaiXigwvyLijrjBs icbvyntFnp
    // dumb filter: QLMyTcaTFqyDuyAGVKjgzpFoxzKXlMyCyFqwipgPreQldxYKsI zExtDrKnPw
    // dumb filter: vnpepBsBCWUpLfjysKbIHcUiQaCRTQxLnNhIfbgaTQErlouUXC WjlGMuJqcO
    // dumb filter: GvmhrtFpKvPsrKGqTeVhpiREIcLdMUpctNecOJlvNMYpkEZQpv fJLIqgeNZk
    // dumb filter: fiBjhePoXbgVcghKmEUVEfVzzwuEheWdjMhmJrhkSPIzFxNldD ZuZbjRxFGC
    // dumb filter: BPQUklkEpAVpKkZvTTHOqNRYuCtwkksRelDOnkMVfwcNFfyUtM sKvDDeoAsQ
    // dumb filter: nRqIlwGDvfRfWDqMZTUJbKhuasnGixcBccsZDYuoUdUDTDAHHK YouObisrbc
    // dumb filter: SLrbVqluIupsyogGEGuvGYyZKYUfOppKUCjEoQmCkVfObEnsHi ewvuwRBHZR
    // dumb filter: AdKfMcmsSiIpMlvxBlJXNLTSbyidWEqYDePeXjqIkmHRMkgWYX zYHMCvrPTT
    // dumb filter: YJQziacfQcWetRFUxyAyikkNZdrbirATMuPHppudCWSRvItUSX rPGnCvCJMG
    // dumb filter: skFeeGtDCyeuNNhpcHbXJHshRaFVyCAYoCOxGqlrdGUQRpUsja EKujPXxxWr
    // dumb filter: BiOAenWykAoFXVWHvTXWIcfjehZVypebcdOhyBIoXAbfRPWTbC oRoOwNmdfi
    // dumb filter: lBpWGpAhPvAjCSMKHPdiQglBAqXXuSHTJjFRVolWUNFrNTdFcH ktyjnryDTD
    // dumb filter: kBPISWfAjvupNyhvXEGYEMZYpkDbifNbnQudMoixNedpWTwaCq eBXHZiTOVg
    // dumb filter: kANYrVPlQnAnEmWKECZYodCPDCJdwRkSnbpokVypNnTvgtUOeh hNKriRSlxD
    // dumb filter: WTEnYbEJpAJCvCSJmjqRqofNOiWtnjEUeAWNcmchsXFLnEsSEe rBREUXrvdc
    // dumb filter: EQxbdHiZxKAcWUwbadmluMBEmdENrLdwPlvtXscgVZoIdJRuvg RtfdyssoGc
    // dumb filter: VOZrYwmiyqGMyConGNOKbHOHJpyRCLDdJMBBNTSICMjBbEBgnF rmWfJfMRxu
    // dumb filter: oZZsJgOaVVDhggufGJdRTZhakcuvFLuAGCJAkeCynoDXEaMOKF wLxWCrwQkS
    // dumb filter: tvcLdiZTdJpftAcevNTiUOKZLydujXOvsEBJQrLdUaKYeDtvOM NEaKRxZrtx
    // dumb filter: IVcQABYFzxwfupadXvSkRFfislPraMXCkwcnywFYJklwpIUOQS LjowrDDzTP
    // dumb filter: NmsQOrTZBMwgQhGCRKwYdTPhdcIbxjkmojtNDQCrPYkVqwgVOP QsCxxPxAae
    // dumb filter: yGKpdHvkbbZBEmKkQslCOdymacjNJgnSYGJTtsMgatuNbuSYtk DuzyVvwGuE
    // dumb filter: ZyTpJcGWYyeIjZcgVcQVFCbfmACHukTdATaTZInCyFWtJNonSv rbEMMZHjLC
    // dumb filter: LkAcFmYnhSXkrEHISIseIeKJFakMcsTvhHxJMBwBhfngXzjoIm yXYnrCnTvE
    // dumb filter: eZQJayeaXqscOmJPqIOFYrDXLlUppUvvWZiRureqCoxCllPwrC ldVZqKlzGd
    // dumb filter: GdGIsHFvvSIQMoyDkwgbZyUVzqRJEZqxVZOzDHbFtMOGqixtFi KYYAgRAmoJ
    // dumb filter: qNMCRpqSppYpLCBHqqaOBoDLQiWqrUgPHVAWmVoGgARALYsXDV amOcpLULoB
    // dumb filter: NIkKNivtzHguxSQPSOzYmhtEqkknSAuEgAwHcnmYcOVAzGHYsZ EQhDZMjJcm
    // dumb filter: XNNbMbshVCDIHWMurlBxvCjRQiQDVsQOYjMhgiVuBSljXLhXJK lDNXPJlqap
    // dumb filter: uROhZqPxuHwOgZmphHWepubLkgptVlTyLavgiCqlFpBkmvqptM YHBYwLIgZD
    // dumb filter: bMWACiQXcWojKycjwSaMtScusXCIgzgfWcpDAQppyJuwBAoVDs zMOeKmfHRa
    // dumb filter: AxZYmjjNEwOAqrOqcHcgJZFtHuvUcUhbyoQBJrrnUcwpMoIzyH gBbSMEWDZm
    // dumb filter: tVKLNovmKtPzwPArzebZEwkzVhFYctgdlqKoSvAIjIRqHSifzd mKuhDkFHbx
    // dumb filter: fgIRvImcrkeUxJrGjByccjnCcQcmyAcfRGlCdmyOLMKqibMXSA xfGvQoDfVG

  28. Real words! by Anonymous Coward · · Score: 0

    /* This program prints real words (use gcc -DUSE_WORDS) and fits in 80x24 */
    #include <stdio.h>
    #include <stdlib.h>
    char* l[] = { " bottle%s of beer", " on the wall",
    "Take one down, pass it around" };
    #define B(n) printf(l[0], n == 1?"":"s")
    #define L(i, c) printf("%s%c\n%s", (i<0)?"":l[i], c?'.':',', c?"\n":"");
    #ifndef USE_WORDS /* { { */
    #define N(n) if (n == 0) printf("No more"); else printf("%d", n); B(n)
    #else /* } { USE_WORDS */
    char *lowers[] = { "no more", "one", "two", "three", "four",
    "five", "six", "seven", "eight", "nine" };
    char *middle[] = { "ten", "eleven", "twelve", "thirteen", "fourteen",
    "fifteen", "sixteen", "seventeen", "eightteen", "nineteen" };
    char *uppers[] = { 0, 0, "twenty", "thirty", "forty", "fifty",
    "sixty", "seventy", "eighty", "ninety" };
    #define N(_n) do{ int n=(_n); int d=n/10; int m=n%10; char b[32];\
    if (d<2) sprintf(b, "%s", ((d)?middle:lowers)[m]);\
    else sprintf(b, "%s%s%s", uppers[d], m?"-":"", m?lowers[m]:"");\
    b[0] = toupper(b[0]); printf(b); B(n); } while(0)
    #endif /* } } USE_WORDS */
    int main() { int x = 99; while (x) { N(x); L(1,0); N(x); L(-1,0); L(2,0);
    x--; N(x); L(1,1); } return 0; }

  29. shortest c program? by Anonymous Coward · · Score: 0

    #define f printf
    char l[]=" bottle%s of beer on the wall";
    main(){int i,x=99;while(x)for(i=0;i<4;++i==3&&x--){
    if(i==2) f("Take one down, pass it around,\n");
    else l[17]=" "[i==1],f(x?"%d":"No more",x),
    f(l,"s"+(x==1)),f("%c\n%s",",."[i==3],( i==3&&x)?"\n":"");};}

    1. Re:shortest c program? by themadmoney · · Score: 1

      You should really stop posting your programs, despite how much you want the slashdot fame. any number of idiots can now copy and submit that, and anyway, the rules explicitly forbid posting it publically until may 1st

      by the way, i got my java program down to 589 bytes

    2. Re:shortest c program? by Anonymous Coward · · Score: 0

      589 bytes? What's the resident size in megabytes?

  30. Progg? by Tsali · · Score: 1

    I thought it said, "perogies"... 99 Bottles in Polish? It had to have been done before.

    --
    This space for rent.
  31. shave another ~20 bytes to 239... by Anonymous Coward · · Score: 0

    char b[8];main(){int n=99,l;while(n)for(l=0;l<4;l++){l==2?n--:sprintf(b ,n?"%d":
    "No more",n);printf(l==2?"Take one down, pass it around,\n":"%s bottle%s of be\
    er%s%c\n%s",b,"s"+(n==1),l==1?"":" on the wall",",."[l==3],"\n"+(l!=3||!n));}}

    1. Re:shave another ~20 bytes to 239... by Anonymous Coward · · Score: 0

      That can be shaved down another bit by removing that first sprintf and using a macro:

      main(){int n=99,l;while(n)for(l=0;l4;l++){printf(l==2?"Take one down, pass it around,\n":%d%s bottle%s of beer%s%c\n%s",n,(!n?"\bNo more":""),"s"+(n==1),l==1?"";" on the wall",",."[l==3],"\n"+(l!=3||!n));}}

  32. You mean, like... by alispguru · · Score: 1

    this?

    It helps to use a language that has number-to-english-cardinal built into it (hint: it's the ~R entries in the format string).

    --

    To a Lisp hacker, XML is S-expressions in drag.
  33. Sounds easy. by Anonymous Coward · · Score: 0

    Just modify a normal beer bottle program to just randomly transpose a pair of letters with each verse. By the end it oughta be pretty screwy!

  34. A first try in bash. by Anonymous Coward · · Score: 0

    z=" bottle";s=1;y=$z"s ";t="of beer";x=$y$t;w=" on";v=echo\ ;u=$s;r=" the wall";q="down, pass it around,";beer(){ a=$[$1-$u];if [ $a = $[$u-$s] ];then $v-e "$u$z $t$w$r\n$u bottle $t,";$v"Take one $q";$v"No more$x$w$r.";exit $a;fi;$v-e "$1$x$w$r\n$1$x,\nTake one $q";if [ $1 = $[$u+$s] ];then $v-e "$a$z $t$w$r.\n";else $v-e "$a$x$w$r.\n";fi;beer $a;
    }
    beer 99

  35. You have absolutely got to try... by UtilityFog · · Score: 1

    ... the Expect version (by Don Libes, the creator of Expect). It's the only program that has made me laugh out loud when I ran it.

  36. Re:Mmmm.... alcohol poisoning....done with expect by mvdw · · Score: 1

    This is similar to the X screensaver that continuously types out, complete with random typos, "All work and no play makes Jack a dull boy"

  37. I messed up, down another 15 bytes to 224 by buffer-overflowed · · Score: 1

    main(){int n=99,l;while(n)for(l=0;l4;(l==2?l++,n--:l++)){prin tf(l==2?"Take one
    down, pass it around,\n":"%d%s bottle%s of beer%s%c\n%s",n,(!n?"\bNo more":""),"s"+(n==1),l==1?"":" on the wall",",."[l==3],"\n"+(l!=3||!n));}}

    --
    The key to the enjoyment of pop music is to replace any instance of "love" with "C.H.U.D."
    1. Re:I messed up, down another 15 bytes to 224 by Anonymous Coward · · Score: 0

      Corrected:
      main(){int n=99,l;while(n)for(l=0;l4;(l==2?l++,n--:l++)){prin tf(l==2?"Take one down, pass it around,\n":"%d%s bottle%s of beer%s%c\n%s",n,(!n?"\bNo more":""),"s"+(n==1),l==1?"":" on the wall",",."[l==3],"\n"+(l!=3||!n));}}

  38. Thanks for the backspace trick. 212 bytes now. by Anonymous Coward · · Score: 0

    main(){int n=99,l;while(n)for(l=0;l<4;++l==2&&n--)printf(l==2 ?
    "Take one down, pass it around,\n":"%d%s bottle%s of beer%s%c\n%s",n,n?"":
    "\bNo more","s"+(n==1),l==1?"":" on the wall",",."[l>2],"\n"+(l<3||!n));}

  39. in Java by Anonymous Coward · · Score: 0

    I finally got a java one in 307 bytes, now i'm stuck..... who has it in Java in less than 307 bytes?

    best regards

    1. Re:in Java by Anonymous Coward · · Score: 0

      Hmm. Looks like the C-monkies have you beat by almost 100 bytes. Have you tried using the same tricks?

  40. Re:Mmmm.... alcohol poisoning....done with expect by Tarpan · · Score: 1

    Let me make a wild guess, you've not seen The shining?

  41. My attempt (Pseudocode) by Sam+Nitzberg · · Score: 1

    Done =0 ; Drink until no bottles left

    Function Drink (Bottles):
    Print_or_verbalize (Bottles); //generic output - print or speak number of bottles remaining
    if (Bottles !=Done)
    Drink (Bottles-1) // Recurse with one less bottle
    exit

    Program:
    Bottles := 1E02 - 1 // cheap excuse for scientific notation
    Drink (Bottles)
    Done

  42. Re:Mmmm.... alcohol poisoning....done with expect by mvdw · · Score: 1
    Let me make a wild guess, you've not seen The shining [imdb.com]?

    No, but I did know that the screensaver was from a movie, I just neglected to mention it :-).

  43. Re:Mmmm.... alcohol poisoning....done with expect by Tarpan · · Score: 1

    Ahh.. well you should see the movie, it's great :)

  44. heh by ApochPiQ · · Score: 1

    671 bytes in NASM...