$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?"
.. mainly due to the fact I can never come up with anything good. :-(
FP?
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
...so long as this exists? It's pretty well stocked with languages. Why did someone even come up with this contest?
if [ `uname` = "FreeBSD" ]; then
echo you\'ll be dead before this song is over;
fi
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.
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%$XmrSee http://www.acooke.org/andrew/writing/malbolge.html .
I believe posters are recognized by their sig. So I made one.
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
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... ;-)
actually, you're a janitor. Now get back to work. Those floors won't clean themselves.
A friend of mine wrote 99 bottles of beer in my COW language. It is an interesting sight to behold.
Hexy - a strategy game for iPhone/iPod Touch
I'm sure I can cut at least ten characters off of that. I doubt it will be anywhere close to the smallest, though.
NAZI
-73, de n1ywb
www.n1ywb.com
Gee, hope none of the contestants find this place, even though it's the first hit on Google...
=Smidge=
assert(expired(knowledge));
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)
import urllib, sysi cs.txt")
f = urllib.urlopen("http://www.noodleroni.com/beerlyr
sys.stdout.write(f.read())
#heh, heh, heh
-Sean
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.
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')
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."
www.HearMySoulSpeak.com
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).
Or, using my WWW::Mechanize module,
Shut your ass before I release the cleaning agent fume genie on you.
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
print read http://www.noodleroni.com/beerlyrics.txt
99 botles on the wall...
Any idea how to reduce it?
We've always been at war with Eurasia.
#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
#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
/* This program prints real words (use gcc -DUSE_WORDS) and fits in 80x24 */ /* { { */ /* } { USE_WORDS */ /* } } USE_WORDS */
#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
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
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; }
#define f printf) f("Take one down, pass it around,\n");( i==3&&x)?"\n":"");};}
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
else l[17]=" "[i==1],f(x?"%d":"No more",x),
f(l,"s"+(x==1)),f("%c\n%s",",."[i==3],
I thought it said, "perogies"... 99 Bottles in Polish? It had to have been done before.
This space for rent.
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));}}
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.
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!
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
... 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.
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"
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."
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));}
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
Let me make a wild guess, you've not seen The shining?
Done =0 ; Drink until no bottles left
//generic output - print or speak number of bottles remaining // Recurse with one less bottle
:= 1E02 - 1 // cheap excuse for scientific notation
Function Drink (Bottles):
Print_or_verbalize (Bottles);
if (Bottles !=Done)
Drink (Bottles-1)
exit
Program:
Bottles
Drink (Bottles)
Done
No, but I did know that the screensaver was from a movie, I just neglected to mention it :-).
Ahh.. well you should see the movie, it's great :)
671 bytes in NASM...