Building a Programmer's Rosetta Stone
Did you ever run into the problem where you knew how to do something in one programming language, but really needed to do it in another? That's what Rosetta Code is all about. A variety of programming tasks are solved using as many languages as possible. You can examine existing tasks, or create your own.
Oops, I broke the link. Here it is: polyglot programs
"A door is what a dog is perpetually on the wrong side of" - Ogden Nash
Of course there are also cases when you will need to port the solution to a different language. This may be the cause when the project specifications requires a specific language like Ada.
As with all programming; your mileage may vary.
If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
Although the idea seems nice, it still has a long way to go. The site currently only contains a few mIRC and bash scripts.
Anyway, I'm looking forward to when it's filled with code from different languages.
PS: an applet or an IDE plug-in like those from Koders would be really cool.
Years ago my copy of Kruse's "Data Structures" came with examples of how to do all the then-hip dynamic data structures (linked lists, trees, etc) in languages without pointers. This became useful when writing high-level Fortran-77 programs, as it allowed moving beyond Gomputed Goto and Arithmetic If for algorithms. In the same vein "Numerical Algorithms" (Teukolsky, Vettering, et al.) showed how to get decent array performance and add various oversights (such as complex numbers and complex arithmetic) to C-type languages.
>>>I see this ending up as an effort to shoehorn concepts unique to one language to another language (building web sites in COBOL *shiver*).
I once saw a series of cgi-bin routines written in Fortran-77 because that's what the web-site designer knew, and the schedule was too tight for her to learn Perl in time. (for those of you who started programming after compiled languages gave way to Python/Perl/Ruby/WombatCode6000, get a copy of G77, and try to compare two strings of different lengths) It's no big deal; given enough time one Turing-complete language can accomplish the same work as any other Turing-complete language. It's just the degree of pain you're willing to endure that's the limiting factor.
As for the F77/cgi-bin programmer, She's a full professor now (though not in Comp. Sci, alas),
the more accurate the calculations became, the more the concepts tended to vanish into thin air. R. S. Mulliken
One project that deserves a look here is the LiteratePrograms project. The goals are somewhat different from Rosetta, with more emphasis on teaching of algorithms and the ability to run code directly from the wiki.
As one who has worked on a couple of multi-language problem sets (SICP in other programming languages and OO Shapes), I can appreciate the amount of work it takes. We can always use more sites that teach programming in various unique fashions.
As far as actual usefulness goes, the 99 Bottles of Beer site is worthless. The C version implements a Linux Kernel Driver! Now what's the point in that? Why not output to stdio? The C++ version doesn't even use OOP or implement a single class! It uses recursive templates and thus doesn't contain a single piece of runtime logic.
However the real nail in the coffin is that the fundamental algorithm used to generate the song varies widely from one language to another, thus no real comparison between languages is possible.
Dan East
Better known as 318230.
I wouldn't expect all tasks to be solved in all languages. For example, I wouldn't expect someone to solve the File I/O task in UDB DB2.
I would expect to see an eventual segregation between things like database tasks and web development tasks. I simply haven't known enough about programming to collect the requisite data myself.
tasks(723) drafts(105) languages(484) examples(29106)
Perhaps it would useful for you to investigate design patterns. They're at a higher level of abstraction than what appears in Rosetta Stone. It might be possible to kickstart Rosetta Stone by having multiple implementations of the patterns. A couple of caveats: someone else may already have done that, so I'd look around before spending a lot of time implementing the patterns; the Wikipedia article lists some criticisms of design patterns.
"In the 1980s capitalism triumphed over communism, In the 1990s it triumphed over democracy."
And in the 2000's, it's well on the way to triumphing over common sense... with apologies to the author.
Seven puppies were harmed during the making of this post.
That's one thing I want to see rewritten in several different languages.
Just so I can make sense of the damn thing and I won't look at my call to ITPLBV() and wonder, "What the fuck does THAT do?"
grey wolf
LET FORTRAN DIE!