Domain: 99-bottles-of-beer.net
Stories and comments across the archive that link to 99-bottles-of-beer.net.
Comments · 74
-
Is ebola more popular than AIDS?
What's even the point of that question?
If you want to go crap, go all the way or go home!
Malbolge all the way!! -
Please, let's sing all together...
(you should know the music...)
9 planets orbiting around the Sun. 9 planets.
Take Pluto down, pass it around, 8 planets orbiting around the Sun... -
There are scant barriers at the moment
-
There are scant barriers at the moment
-
There are scant barriers at the moment
-
Re:Best short programs
Perl would win hands down no contest.
I've never figured out how this one works:
http://www.99-bottles-of-beer....
(not that I've tried too hard - its just a work of art) -
Re:It's rated D
Those languages have largely been superseded by Malbolge. You want to see beautiful code, just look at the 99 bottles of beer implementation in Malbolge. That's truly a work of art. And it's secure, very secure. So secure, in fact, that you have to be a cryptoanalyst just to write code that even compiles.
-
My Story of BrainFuck
I was really bored in my college compiler design class, so I was browsing the web and came across the programming website 99-bottles-of-beer.net. While browsing, I discovered a language with the greatest name ever, Brainfuck. After looking it up on Wikipedia and quickly reading over the code sample at 99 Bottles, I wrote an interpreter during class. By then end of the lecture, I had a working interpreter that ran the sample code perfectly. So in the span of ~40 minutes, I went from never knowing about this language to having written an working interpreter for it, all out of pure boredom in a compiler design class. I showed it to the professor, who found it neat, but I couldn't get any extra credit because it is a *compiler* design class and not an *interpreter* design class.
CSB?
-
My Story of BrainFuck
I was really bored in my college compiler design class, so I was browsing the web and came across the programming website 99-bottles-of-beer.net. While browsing, I discovered a language with the greatest name ever, Brainfuck. After looking it up on Wikipedia and quickly reading over the code sample at 99 Bottles, I wrote an interpreter during class. By then end of the lecture, I had a working interpreter that ran the sample code perfectly. So in the span of ~40 minutes, I went from never knowing about this language to having written an working interpreter for it, all out of pure boredom in a compiler design class. I showed it to the professor, who found it neat, but I couldn't get any extra credit because it is a *compiler* design class and not an *interpreter* design class.
CSB?
-
Re:99 bottles of beer
There is already a pretty good collection http://www.99-bottles-of-beer.net/
There is also a website with the implementations of the Perl cookbook in a bunch of languages: http://pleac.sourceforge.net/
Where performance is concerned I'd go for something like the Debian Benchmarks game. The time taken for this benchmark task, by this toy program, with this programming language implementation, with these options, on this computer, with these workloads. With enough people participating in the pissing contest you eventually get things optimized to hell and the wheat is separated from the chaff.
http://benchmarksgame.alioth.debian.org/
http://benchmarksgame.alioth.debian.org/play.phpAs for productivity, that's harder since this is highly subjective. While you can generally postulate that coding in non typed scripting languages where you don't have to worry about memory management is going to be faster than coding in a typed, manually memory managed language like C. But what happens when you compare more similar languages like Python vs. Perl? Your productivity in a language is highly dependent on your experience with it, how fast you are at typing, how intuitive the syntax is to you.... etc... But different programmers can have different issues with languages. In Perl for example the syntactic freedom can actually lead some programmers to write bugs bugs into their code because they are used to languages with a more nailed down syntax.
-
99 bottles of beer
There is already a pretty good collection http://www.99-bottles-of-beer.net/
There is also a website with the implementations of the Perl cookbook in a bunch of languages: http://pleac.sourceforge.net/
-
Re:Copyrights!
The usual loop song is 99 bootles of beer.
-
Re:Huh?
Try saying that for Malbolge.
;)I'm a Haskell programmer, and to me, using C/C++ is like using Malbolge. It...just...hurts...so...much...
-
Re:He describes how he learned to sing, too
It's in one of the comments, and a pointer from that linked page shows some exercises his instructor had him perform -- singing at different speeds and pitches. I myself wonder why software engineering never tries to teach solving the same problem in a variety of paradigms or languages; 99 bottles is the closest example I can find.
Every computer science degree program that I know of does this. Where the heck did you learn to program that didn't have a Programming Languages course?
-
He describes how he learned to sing, too
It's in one of the comments, and a pointer from that linked page shows some exercises his instructor had him perform -- singing at different speeds and pitches. I myself wonder why software engineering never tries to teach solving the same problem in a variety of paradigms or languages; 99 bottles is the closest example I can find.
-
Re:Easy
I'll go one better and do the whole post. "languages are isomorphic" is itself redundant in that sentence, so the whole phrase could be deleted if you want to delete "fluff and filler".
What's one's "fluff and filler", it's another's treasure.
For me, your post is an absolute evidence in favour of the above statement: I see your post a convoluted (i.e. with lots of "fluff") way to say
I surmise all the programming languages are Turing complete, I suspect that natural languages are too. I'll "prove" my assumption by providing a single example based on programming languages and forcing the conclusion that's the same for all natural languagesConsider x86 assembly and Java. Totally different, right? They actually have EXACTLY the same expressive power, and here's proof.
Below, an example of why specialized concepts and terminology are beneficial for the advancement of science/technology.
Except for memory limits Malbolge is Turing complete. I challenge you to write in Malbolge a program computing the factorial(99). You are even allowed to use whatever inspiration source you can, including the 99 bottles of beer implementation.Alternatively, to gain some insight into different ways of expressing the same reality, translate into mandarin the following: "laugh", "smile", "grin" and perform an analysis of the ideogram groups that make each translation (the result is descriptive rather than a simple sequence of letters that makes a word).
-
Re:java backend is not simple.
Ah right, it's the Sun assembler not the instruction set you don't like
:) That makes a lot more sense.I am not sure what you mean by missing symbols and confusing naming. Coming from MC 68k at the time, SPARC assembler was a great leap forward.
-
Re:Perl's strength
If you want expressive, check out the perl script at
http://www.99-bottles-of-beer.net/language-perl-737.html
The source code is an illustration of the output.
-
You're a bit late, mate.
Sorry, you're eight years too late:
http://99-bottles-of-beer.net/language-whitespace-154.html -
Re:Why NOT?
If google were to make a ton of source code examples in everything from C to Visual Basic to Lisp or DOS showing how to read, write and save, and make many free programs to do conversion, then programmers might start using them.
This isn't a bad idea, and with the talent Google has, it wouldn't be hard. Heck, it could be a competition (internal or external) to write the reference library in every computer language, sort of 99 bottles. And while I'm a fan of GPLv3, making the source public domain probably wouldn't hurt either.
-
Re:Looks like a good reason...
and here's another:
-
Re:Step 1
someone who claims to write a million lines of perfect code who couldn't even get through a sentence without spelling and grammar errors
That depends which programming language he was using.
-
Re:One language
-
Re:C++ incomplete. C# windoz. Java slow elephant.
Back in the day, C++ was pretty much C code written with some nicer syntax features. the lack of a string class really doesn't make much of a muchness.
Hell, even today, C++ is (well, should, you know some people overengineer C++ code so every little thing is a multiply-inherited object) pretty much C code packaged up with a nicer syntax. And some STL and Boost thrown in to make some things simpler.
C# - suffers the same memory issues as Java. Practically *is* Java really.
So Go.. add a common library of useful stuff and it could be a killer language, especially if Google drops their Java-based language they hacked up for Android and starts to use it for everything. Lets hope it doesn't become just another entry in the '99 bottles of beer' list. They're going to have to rename it though
;) -
I propose a new contest:
Who can string together the largest number of platform layers over each other, and still have it running.
The first league will start in the 2 GB core memory and 2* 2 GHz (dual-core) CPU range with no other processor (like GPU) or storage (like HDD) usage.
Every type of platform is only allowed once.Here is a list of platforms, to get you started:
- Emacs
- the CPU itself
- Virtual machine (e.g. VirtualBox/VMware)
- Browser(s)
- C/C++
- JavaScript
- interpreted Piet
- Python
- LOLCode
- MalbolgeBonus points for achieving a circle jer^H^H^Hof platforms, so that no actual real program is ever executed.
-
I propose a new contest:
Who can string together the largest number of platform layers over each other, and still have it running.
The first league will start in the 2 GB core memory and 2* 2 GHz (dual-core) CPU range with no other processor (like GPU) or storage (like HDD) usage.
Every type of platform is only allowed once.Here is a list of platforms, to get you started:
- Emacs
- the CPU itself
- Virtual machine (e.g. VirtualBox/VMware)
- Browser(s)
- C/C++
- JavaScript
- interpreted Piet
- Python
- LOLCode
- MalbolgeBonus points for achieving a circle jer^H^H^Hof platforms, so that no actual real program is ever executed.
-
I propose a new contest:
Who can string together the largest number of platform layers over each other, and still have it running.
The first league will start in the 2 GB core memory and 2* 2 GHz (dual-core) CPU range with no other processor (like GPU) or storage (like HDD) usage.
Every type of platform is only allowed once.Here is a list of platforms, to get you started:
- Emacs
- the CPU itself
- Virtual machine (e.g. VirtualBox/VMware)
- Browser(s)
- C/C++
- JavaScript
- interpreted Piet
- Python
- LOLCode
- MalbolgeBonus points for achieving a circle jer^H^H^Hof platforms, so that no actual real program is ever executed.
-
Re:Wrong Focus
The perl one is the best though:
-
Re:Wrong Focus
-
Wrong Focus
After reading the syllabi, all the higher level classes appear to teach concepts rather than work to develop advanced techniques in a specific language.
Which is exactly as it should be. The focus of a CS degree should not be "how to write a program in as many languages as possible". If you want that, go read Wikipedia or this. I tend to think that the goal of the degree should be (more or less) threefold:
- Weed out people who have no business programming. For those who can it seems crazy, but there really are people who just cannot seem to think logically or in an algorithmic fashion. They should be gone after the first or second class.
- Teach those unfamiliar with programming at least a single language to act as a starting point and as a language to be used in later classes. It used to be that C/C++ was the definitive standard for this since you could mix both high and low level techniques, but lately it seems like most places are starting off with a garbage-collected language such as Java, Python, or C# and then moving to C or C++ later on. In either case, after being 3-4 classes in, the student should be well versed in at least one language. Ideally those still left that should not be programmers would be gone after this point, but as anyone in the field will tell you, this sadly isn't the case.
- Stop teaching languages and start teaching algorithms, techniques, and the 'engineering' part of software engineering. At the end of the day it doesn't matter how many languages you know if you can't use any of them in real-world team-based programming of large and complicated projects. You also get into the more specialized areas you are interested in such as graphics, AI, computational analysis, etc.
Some of my least-favorite CS classes were about language and programming theory and while they aren't real exciting or fun, they do make you really think about good solutions to a problem and not just sitting down to "hack something together". Additionally, all the assignments were language-agnostic, so you could program in whatever you wanted as long as you completed the program spec.
In short: a decent program should be able to sit down and pick up an unfamiliar language without too much trouble, so I wouldn't worry too much about what language you learn first. What's important is that you lean to program well -- after that the language just doesn't matter that much.
-
Chapel
Looking at the 99 bottles Chapel code (from original article)
http://99-bottles-of-beer.net/language-chapel-1215.htmlThis looks like the way you do stuff in Haskell. Functions compute the data and the I/O routine is moved into a "monad" where you need to sequence. This doesn't seem outside the realm of the possible.
-
Related site...
This site is awesome. It's very simple. They have over code in over 1200 different languages that spits out the lyrics to the "99 bottles of beer on the wall" song. Check out the perl example (yes, it really does work): http://99-bottles-of-beer.net/language-perl-737.html
-
Related site...
This site is awesome. It's very simple. They have over code in over 1200 different languages that spits out the lyrics to the "99 bottles of beer on the wall" song. Check out the perl example (yes, it really does work): http://99-bottles-of-beer.net/language-perl-737.html
-
Re:Language Independent!
No. Malbolge is far worse! Have you seen this horrible masterpiece: http://99-bottles-of-beer.net/language-malbolge-995.html
Brainfuck... more like Getthefuckoff with your children's toys.
;) -
Love or Hate, but the job is done
The Python version is a good example, but I would note to the REXX sample for the same purpose, short, clear and very elegant:
http://99-bottles-of-beer.net/language-rexx-493.htmlI programmed Cobol up to 25 years, and until today, I learned some +25 diferent languages. These, almost 10-12 I've used for +10 years.
My opinion (IMHO) is: COBOL is a great language for batch processing, to larger data volumes and for calculations performance.
In the punched paper card era, coding by hand with a pencil in the program listing, and waiting hours to some cards being punched and processed, was a kind boring to do anything in ANY language.
Today, we have graphical interfaces, say "real time editors", witch are hundreds of times faster to work.
So, IMHO, I see no trouble in writing some lines of code as this appears to be very fast and easy. I'm not lazy to that.
And NO, I don't like to expend hours programming.
I think computers must do all the work, so I code hardly to do better software, for human use. I work harder for a time, then I have a high performance program and if possible, with an elegant solution, easy-to-use.This is a personal approach of my job.
I lack some COBOL features very often, mainly, the possibility of control memory use and the short object code, very suitable for performance optimization.And more than all, I think there's no one language for all thinks. I trust about mixing languages, using what is better for in case. In the 80's, I developed software for CICS, mixing COBOL, CSP/AD (a IBM L4G), Assembler, RPG II and REXX, all in the same system running under VM.
Then came to Clipper, VB, Access VBA, and many modern tools. They are very good for sure each one for each case.
Today I work with a legacy system done Unify-Accell (an older L4G) and Sybase Adaptative Enterpise Server for a larger retailer company.
The system is migrating to a new one, and some partes of the new main core are done with (guess...) COBOL!(sorry bad english)
-
Re:Why is Cobol hated?
As an example, I'd prefer http://99-bottles-of-beer.net/language-cobol-1766.html as (quoting the source comments, caps and all): WHAT ONE MIGHT COMMONLY SEE IN A "TYPICAL" MAINFRAME COBOL PROGRAM.
-
Re:Message to Google
> Well, enough of that, time for me to get onto more serious drinking.
http://99-bottles-of-beer.net/language-javascript-1079.html ?
-
Re:Why is Cobol hated?
You picked the wrong choice to show him why COBOL is hated.
-
Re:Why is Cobol hated?
And don't forget about the more modern Python version which is shorter than both the C and COBOL versions. http://99-bottles-of-beer.net/language-python-808.html
-
Re:Why is Cobol hated?
Can someone give me a side-by-side example of C and Cobol program or statement to do the same thing which would illustrate why Cobol is so "evil"?
C (No bells or whistles): http://99-bottles-of-beer.net/language-c-116.html
COBOL (or as I call it, COBALD): http://99-bottles-of-beer.net/language-cobol-1820.html -
Re:Why is Cobol hated?
Can someone give me a side-by-side example of C and Cobol program or statement to do the same thing which would illustrate why Cobol is so "evil"?
C (No bells or whistles): http://99-bottles-of-beer.net/language-c-116.html
COBOL (or as I call it, COBALD): http://99-bottles-of-beer.net/language-cobol-1820.html -
Re:Sometimes the correct answer is the simplest
Yeah, and can you make Java look like this?
;-) -
Re:Sometimes the correct answer is the simplest
Look at this site: http://99-bottles-of-beer.net/
This site make the song "99 bottles of beer" into a program that displays the lyrics of 99 bottles of beer. Now look at the Java implementation, it's a bloody mess! Waaaay to complex in order to maintain flexibility. Now look at the a comment where another person has done the same thing but then in a simple manner.
Yes, you can make any language look butt ugly if you try.
-
Expression vs. function
I know this is rather tangential, but the article did start out with contrasting Expression vs. Function under "Copyright in Context" heading. I think the best proof that software is ruled by copyright vs. patent is available at http://99-bottles-of-beer.net/ 99 bottles of beer, programmed in 1214 different languages and/or variations. Clearly the function is the same, but the expression differs wildly.
-
a little refreshment of COBOL for all
http://99-bottles-of-beer.net/language-cobol-1820.html
*nawcom reads the first part of the code and pukes all over the screen*
-
Re:brainfuck?
Stole my joke. I'd suggest my new favorite language Malbolge.
Please don't mod up, I'm just stealing the reference from david.given -
Re:Malbolge
wow that is amazing. I can't believe this is the first time I'm hearing about Malbolge. I used to collect odd programming languages. I would have thought that Funge-98 was the craziest. Now, I'm not so sure. Malbolge seems like its more of a difficult to exploit buffer overflow than a language. Then again, maybe thats the point.
Unfortunately people have done cryptanalysis of Malebolge and have managed to find an, er, exploit: it's now possible to actually write programs for it on purpose, rather than having to do brute-force searches of the program space until you find one that matches. See this link for details. If you're really brave, here is an implementation of 99 green bottles in Malebolge. (You may be interested to note that the program is roughly twice as long as its output...)
-
Re:Why Erlang doesn't matter
Where's my 'print "hello\n"' that works most other places?
Well
#!/usr/bin/env escript
main(_) -> io:format("Hello World\n").And for something less trivial here is 99 bottles of beer:
simple more standard erlang -
Re:Why Erlang doesn't matter
Where's my 'print "hello\n"' that works most other places?
Well
#!/usr/bin/env escript
main(_) -> io:format("Hello World\n").And for something less trivial here is 99 bottles of beer:
simple more standard erlang -
Re:Bah!
Actually, I've seen the specs for Malbolge, and I still think Threaded INTERCAL is more ingenious and extreme.
Really?
Have you compared
http://www.99-bottles-of-beer.net/language-malbolge-995.html
with
http://www.99-bottles-of-beer.net/language-intercal-333.htmlI'd say INTERCAL is funnier, but Malbolge is more extreme.