| JREF Homepage | Swift Blog | Events Calendar | $1 Million Paranormal Challenge | The Amaz!ng Meeting | Useful Links | Support Us |
![]() |
|
|
|
|||||||
| Notices |
| Welcome to the JREF Forum, where we discuss skepticism, critical thinking, the paranormal and science in a friendly but lively way. You are currently viewing the forum as a guest, which means you are missing out on discussing matters that are of interest to you. Please consider registering so you can gain full use of the forum features and interact with other Members. Registration is simple, fast and free! Click here to register today. |
|
|
#1 |
|
Masterblazer
Join Date: Aug 2005
Location: Montreal, Quebec
Posts: 6,407
|
99 Bottles of Beer Program
Hi!
I recently came across http://www.99-bottles-of-beer.net/, where people post programs that print the lyrics to the song. I checked the LOLCODE variants, and found them lacking. So I wrote one. I love the use of TLDR to close a long comment, WTF? for switch, and GTFO for return. The O RLY? YA RLY, NO WAI is the if-then-else construct. OMGWTF is like default. HOW DUZ I / IF U SAY SO is the function definition block. IM IN YR LOOP NERFIN is a for loop, decrementing the index variable each pass. HAI / KTHXBYE is the BEGIN / END construct. Code:
OBTW
Almo's first LOLCODE program
done according to LOLCODE v1.2 standard
thanks to repl.it for the neat web IDE
TLDR
HAI
VISIBLE "O HAI!"
HOW DUZ I SHOWBEERZ YR NUMBEERZ
DIFFRINT NUMBEERZ AN 69
O RLY?
YA RLY
MOD OF NUMBEERZ AN 3, WTF?
OMG 0
VISIBLE "Wahl haz " NUMBEERZ " botlez!!"
GTFO
OMG 1
VISIBLE NUMBEERZ " botlez uv beer on teh wahl!"
GTFO
OMGWTF
VISIBLE NUMBEERZ " botlez uv beer stihl on teh wahl!"
OIC
NO WAI
VISIBLE "Da funy # 69 iz haow many botlez there iz!"
OIC
GTFO
IF U SAY SO
I HAS A BEERZVAR ITZ 99
IM IN YR LOOP NERFIN YR BEERZVAR TIL BOTH SAEM BEERZVAR AN 1
VISIBLE "Therez " BEERZVAR " beerz on teh wahl..."
VISIBLE "Takez wun daown, passez it around..."
SHOWBEERZ DIFF OF BEERZVAR AN 1
IM OUTTA YR LOOP
VISIBLE "Jus wun botle uv beer on teh wahl!"
VISIBLE "Takez it daown, passez it around..."
VISIBLE "No moar botlez of beer on teh wahl!"
VISIBLE "Goez to stoar, getz sum moar..."
VISIBLE "99 botlez of beer is on teh wahl again, jus liek b4!"
VISIBLE "KTHXBYE"
KTHXBYE
Code:
O HAI! Therez 99 beerz on teh wahl... Takez wun daown, passez it around... 98 botlez uv beer stihl on teh wahl! Therez 98 beerz on teh wahl... Takez wun daown, passez it around... 97 botlez uv beer on teh wahl! Therez 97 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 96 botlez!! Therez 96 beerz on teh wahl... Takez wun daown, passez it around... 95 botlez uv beer stihl on teh wahl! Therez 95 beerz on teh wahl... Takez wun daown, passez it around... 94 botlez uv beer on teh wahl! Therez 94 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 93 botlez!! Therez 93 beerz on teh wahl... Takez wun daown, passez it around... 92 botlez uv beer stihl on teh wahl! Therez 92 beerz on teh wahl... Takez wun daown, passez it around... 91 botlez uv beer on teh wahl! Therez 91 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 90 botlez!! Therez 90 beerz on teh wahl... Takez wun daown, passez it around... 89 botlez uv beer stihl on teh wahl! Therez 89 beerz on teh wahl... Takez wun daown, passez it around... 88 botlez uv beer on teh wahl! Therez 88 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 87 botlez!! Therez 87 beerz on teh wahl... Takez wun daown, passez it around... 86 botlez uv beer stihl on teh wahl! Therez 86 beerz on teh wahl... Takez wun daown, passez it around... 85 botlez uv beer on teh wahl! Therez 85 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 84 botlez!! Therez 84 beerz on teh wahl... Takez wun daown, passez it around... 83 botlez uv beer stihl on teh wahl! Therez 83 beerz on teh wahl... Takez wun daown, passez it around... 82 botlez uv beer on teh wahl! Therez 82 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 81 botlez!! Therez 81 beerz on teh wahl... Takez wun daown, passez it around... 80 botlez uv beer stihl on teh wahl! Therez 80 beerz on teh wahl... Takez wun daown, passez it around... 79 botlez uv beer on teh wahl! Therez 79 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 78 botlez!! Therez 78 beerz on teh wahl... Takez wun daown, passez it around... 77 botlez uv beer stihl on teh wahl! Therez 77 beerz on teh wahl... Takez wun daown, passez it around... 76 botlez uv beer on teh wahl! Therez 76 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 75 botlez!! Therez 75 beerz on teh wahl... Takez wun daown, passez it around... 74 botlez uv beer stihl on teh wahl! Therez 74 beerz on teh wahl... Takez wun daown, passez it around... 73 botlez uv beer on teh wahl! Therez 73 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 72 botlez!! Therez 72 beerz on teh wahl... Takez wun daown, passez it around... 71 botlez uv beer stihl on teh wahl! Therez 71 beerz on teh wahl... Takez wun daown, passez it around... 70 botlez uv beer on teh wahl! Therez 70 beerz on teh wahl... Takez wun daown, passez it around... Da funy # 69 iz haow many botlez there iz! Therez 69 beerz on teh wahl... Takez wun daown, passez it around... 68 botlez uv beer stihl on teh wahl! Therez 68 beerz on teh wahl... Takez wun daown, passez it around... 67 botlez uv beer on teh wahl! Therez 67 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 66 botlez!! Therez 66 beerz on teh wahl... Takez wun daown, passez it around... 65 botlez uv beer stihl on teh wahl! Therez 65 beerz on teh wahl... Takez wun daown, passez it around... 64 botlez uv beer on teh wahl! Therez 64 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 63 botlez!! Therez 63 beerz on teh wahl... Takez wun daown, passez it around... 62 botlez uv beer stihl on teh wahl! Therez 62 beerz on teh wahl... Takez wun daown, passez it around... 61 botlez uv beer on teh wahl! Therez 61 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 60 botlez!! Therez 60 beerz on teh wahl... Takez wun daown, passez it around... 59 botlez uv beer stihl on teh wahl! Therez 59 beerz on teh wahl... Takez wun daown, passez it around... 58 botlez uv beer on teh wahl! Therez 58 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 57 botlez!! Therez 57 beerz on teh wahl... Takez wun daown, passez it around... 56 botlez uv beer stihl on teh wahl! Therez 56 beerz on teh wahl... Takez wun daown, passez it around... 55 botlez uv beer on teh wahl! Therez 55 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 54 botlez!! Therez 54 beerz on teh wahl... Takez wun daown, passez it around... 53 botlez uv beer stihl on teh wahl! Therez 53 beerz on teh wahl... Takez wun daown, passez it around... 52 botlez uv beer on teh wahl! Therez 52 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 51 botlez!! Therez 51 beerz on teh wahl... Takez wun daown, passez it around... 50 botlez uv beer stihl on teh wahl! Therez 50 beerz on teh wahl... Takez wun daown, passez it around... 49 botlez uv beer on teh wahl! Therez 49 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 48 botlez!! Therez 48 beerz on teh wahl... Takez wun daown, passez it around... 47 botlez uv beer stihl on teh wahl! Therez 47 beerz on teh wahl... Takez wun daown, passez it around... 46 botlez uv beer on teh wahl! Therez 46 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 45 botlez!! Therez 45 beerz on teh wahl... Takez wun daown, passez it around... 44 botlez uv beer stihl on teh wahl! Therez 44 beerz on teh wahl... Takez wun daown, passez it around... 43 botlez uv beer on teh wahl! Therez 43 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 42 botlez!! Therez 42 beerz on teh wahl... Takez wun daown, passez it around... 41 botlez uv beer stihl on teh wahl! Therez 41 beerz on teh wahl... Takez wun daown, passez it around... 40 botlez uv beer on teh wahl! Therez 40 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 39 botlez!! Therez 39 beerz on teh wahl... Takez wun daown, passez it around... 38 botlez uv beer stihl on teh wahl! Therez 38 beerz on teh wahl... Takez wun daown, passez it around... 37 botlez uv beer on teh wahl! Therez 37 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 36 botlez!! Therez 36 beerz on teh wahl... Takez wun daown, passez it around... 35 botlez uv beer stihl on teh wahl! Therez 35 beerz on teh wahl... Takez wun daown, passez it around... 34 botlez uv beer on teh wahl! Therez 34 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 33 botlez!! Therez 33 beerz on teh wahl... Takez wun daown, passez it around... 32 botlez uv beer stihl on teh wahl! Therez 32 beerz on teh wahl... Takez wun daown, passez it around... 31 botlez uv beer on teh wahl! Therez 31 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 30 botlez!! Therez 30 beerz on teh wahl... Takez wun daown, passez it around... 29 botlez uv beer stihl on teh wahl! Therez 29 beerz on teh wahl... Takez wun daown, passez it around... 28 botlez uv beer on teh wahl! Therez 28 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 27 botlez!! Therez 27 beerz on teh wahl... Takez wun daown, passez it around... 26 botlez uv beer stihl on teh wahl! Therez 26 beerz on teh wahl... Takez wun daown, passez it around... 25 botlez uv beer on teh wahl! Therez 25 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 24 botlez!! Therez 24 beerz on teh wahl... Takez wun daown, passez it around... 23 botlez uv beer stihl on teh wahl! Therez 23 beerz on teh wahl... Takez wun daown, passez it around... 22 botlez uv beer on teh wahl! Therez 22 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 21 botlez!! Therez 21 beerz on teh wahl... Takez wun daown, passez it around... 20 botlez uv beer stihl on teh wahl! Therez 20 beerz on teh wahl... Takez wun daown, passez it around... 19 botlez uv beer on teh wahl! Therez 19 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 18 botlez!! Therez 18 beerz on teh wahl... Takez wun daown, passez it around... 17 botlez uv beer stihl on teh wahl! Therez 17 beerz on teh wahl... Takez wun daown, passez it around... 16 botlez uv beer on teh wahl! Therez 16 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 15 botlez!! Therez 15 beerz on teh wahl... Takez wun daown, passez it around... 14 botlez uv beer stihl on teh wahl! Therez 14 beerz on teh wahl... Takez wun daown, passez it around... 13 botlez uv beer on teh wahl! Therez 13 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 12 botlez!! Therez 12 beerz on teh wahl... Takez wun daown, passez it around... 11 botlez uv beer stihl on teh wahl! Therez 11 beerz on teh wahl... Takez wun daown, passez it around... 10 botlez uv beer on teh wahl! Therez 10 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 9 botlez!! Therez 9 beerz on teh wahl... Takez wun daown, passez it around... 8 botlez uv beer stihl on teh wahl! Therez 8 beerz on teh wahl... Takez wun daown, passez it around... 7 botlez uv beer on teh wahl! Therez 7 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 6 botlez!! Therez 6 beerz on teh wahl... Takez wun daown, passez it around... 5 botlez uv beer stihl on teh wahl! Therez 5 beerz on teh wahl... Takez wun daown, passez it around... 4 botlez uv beer on teh wahl! Therez 4 beerz on teh wahl... Takez wun daown, passez it around... Wahl haz 3 botlez!! Therez 3 beerz on teh wahl... Takez wun daown, passez it around... 2 botlez uv beer stihl on teh wahl! Therez 2 beerz on teh wahl... Takez wun daown, passez it around... 1 botlez uv beer on teh wahl! Jus wun botle uv beer on teh wahl! Takez it daown, passez it around... No moar botlez of beer on teh wahl! Goez to stoar, getz sum moar... 99 botlez of beer is on teh wahl again, jus liek b4! KTHXBYE |
|
__________________
Almo! My Blog "No society ever collapsed because the poor had too much." — LeftySergeant "It may be that there is no body really at rest, to which the places and motions of others may be referred." –Issac Newton in the Principia |
|
|
|
|
|
#2 |
|
Illuminator
Join Date: Apr 2009
Location: Hunting Moose and Squirrel
Posts: 4,154
|
You need to find a girlfriend/boyfriend or get a dog...
|
|
__________________
"Swift, silent and deadly" was a part of my job description Upon hearing me say that my friend asked me "So you're a fart?"... About my avatar. |
|
|
|
|
|
#3 |
|
Graduate Poster
Join Date: Feb 2008
Location: Ruhr Area in Germany
Posts: 1,926
|
You can't say that. LOLCODE is rather funny, and you can even "read" it and somewhat understand what it does.
Compare to this. ![]() Greetings, Chris ETA: Oh, and just in case. The two are somewhat related. That is, there is an BF interpreter written in LOLCODE available
|
|
__________________
Humber-physics 101: The treadmill has no ground equivalent. This means that the belt is not the road, but the Earth. ... That means the belt is also a privileged and unique perspective. If not then the treadmill collapses to the real world equivalent of a real treadmill, with different objects at different velocities in the same frame. Either way, no motion. |
|
|
|
|
|
#4 |
|
Graduate Poster
Join Date: Oct 2006
Location: state of denial
Posts: 1,361
|
My new goal in life is to complete ProjectEuler in lolcode.
*googles projecteuler lolcode* ...and I'm not at all surprised that I'm not the first person with this idea. |
|
|
|
|
#5 |
|
Just the right amount of cowbell
Join Date: Oct 2008
Location: Well past Hither, looking for Yon
Posts: 3,462
|
Kewl! I hadn't heard of LOLCODE before; I'm now considering whether it should bump Whitespace as my favorite non-production programming language.
|
|
__________________
"In times of war, we need warriors. But this isn't a war." - Phil Plaitt |
|
|
|
|
|
#6 |
|
Graduate Poster
Join Date: Feb 2008
Location: Ruhr Area in Germany
Posts: 1,926
|
|
|
__________________
Humber-physics 101: The treadmill has no ground equivalent. This means that the belt is not the road, but the Earth. ... That means the belt is also a privileged and unique perspective. If not then the treadmill collapses to the real world equivalent of a real treadmill, with different objects at different velocities in the same frame. Either way, no motion. |
|
|
|
|
|
#7 |
|
Just the right amount of cowbell
Join Date: Oct 2008
Location: Well past Hither, looking for Yon
Posts: 3,462
|
|
|
__________________
"In times of war, we need warriors. But this isn't a war." - Phil Plaitt |
|
|
|
|
|
#8 |
|
Muse
Join Date: Apr 2010
Location: America! (F, yeah!)
Posts: 666
|
|
|
__________________
When I think about woo, I detect myself. |
|
|
|
|
|
#9 |
|
BOFH
Join Date: Jun 2003
Location: Sheffield
Posts: 8,245
|
|
|
__________________
Aphorism: Subjects most likely to be declared inappropriate for humor are the ones most in need of it. -epepke |
|
|
|
|
|
#11 |
|
Mafia Penguin
Join Date: Dec 2007
Location: Netherlands
Posts: 10,323
|
I'm partial to Perl - yes I realize, a very traditional choice compared to the above. This program is especially fitting for the task.
|
|
__________________
Proud member of the Solipsistic Autosycophant's Group |
|
|
|
|
|
#12 |
|
Mafia Penguin
Join Date: Dec 2007
Location: Netherlands
Posts: 10,323
|
Nobody yet mentioned INTERCAL? Who can even program without the COMEFROM construct?
|
|
__________________
Proud member of the Solipsistic Autosycophant's Group |
|
|
|
|
|
#13 |
|
Nap, interrupted.
Join Date: Aug 2001
Location: a little toolshed
Posts: 18,592
|
So many important languages, so little time. Don't forget Befunge:
http://en.wikipedia.org/wiki/Befunge ~~ Paul |
|
__________________
Millions long for immortality who do not know what to do with themselves on a rainy Sunday afternoon. ---Susan Ertz RIP Mr. Skinny |
|
|
|
|
|
#14 |
|
Illuminator
Join Date: Sep 2010
Location: 31°58'S 115°57'E
Posts: 4,777
|
|
|
|
|
|
#15 |
|
Masterblazer
Join Date: Aug 2005
Location: Montreal, Quebec
Posts: 6,407
|
I'm married, so I got one of those covered.
![]() Yes, Malbolge is what I thought of when he mentioned Hell. (Note for onlookers: Malbolge is named after one of the circles of Hell in Dante's Inferno). I tried writing some Befunge. It was interesting. A similar language is used in the Playstation game Carnage Heart to program bots to fight each other. I mimiced that in 2001 to make a Shockwave game that allowed people to program bots. I only came across Befunge later.
|
|
__________________
Almo! My Blog "No society ever collapsed because the poor had too much." — LeftySergeant "It may be that there is no body really at rest, to which the places and motions of others may be referred." –Issac Newton in the Principia |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|