Forgot your password?
typodupeerror

Building a Programmer's Rosetta Stone 215

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.
This discussion has been archived. No new comments can be posted.

Building a Programmer's Rosetta Stone

Comments Filter:
  • Re:Here's better (Score:4, Interesting)

    by Rosco P. Coltrane ( 209368 ) on Sunday January 21, 2007 @11:20AM (#17702074)
    Oops, I broke the link. Here it is: polyglot programs [nyx.net]
  • It may prove useful. (Score:4, Interesting)

    by Z00L00K ( 682162 ) on Sunday January 21, 2007 @11:22AM (#17702086) Homepage Journal
    But as a seasoned programmer I also know that some tasks can't be ported. A more efficient method is to actually resolve the problems at link time since most object files doesn't really care about which language you use. Some tasks are better off in one language than in another and porting the "problem" may prove a herculean task ending up as the major time-consumer for a project.

    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.

  • New? (Score:2, Interesting)

    by d34d.10n ( 924456 ) on Sunday January 21, 2007 @12:13PM (#17702414)
    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 [koders.com] would be really cool.
  • by Frumious Wombat ( 845680 ) on Sunday January 21, 2007 @01:26PM (#17703004)
    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),
  • LiteratePrograms (Score:2, Interesting)

    by Chris Rathman ( 458868 ) on Sunday January 21, 2007 @01:44PM (#17703146) Homepage
    One project that deserves a look here is the LiteratePrograms project [literateprograms.org]. 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 [codepoetics.com] and OO Shapes [angelfire.com]), I can appreciate the amount of work it takes. We can always use more sites that teach programming in various unique fashions.
  • by Dan East ( 318230 ) on Sunday January 21, 2007 @01:52PM (#17703214) Journal
    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
  • by Short Circuit ( 52384 ) * <mikemol@gmail.com> on Sunday January 21, 2007 @01:55PM (#17703238) Homepage Journal
    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.
  • Re:No Fair! (Score:1, Interesting)

    by Anonymous Coward on Sunday January 21, 2007 @02:14PM (#17703418)
    Perhaps it would useful for you to investigate design patterns [wikipedia.org]. 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.
  • by Dunbal ( 464142 ) on Sunday January 21, 2007 @03:42PM (#17704090)
    "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.
  • by the_greywolf ( 311406 ) on Monday January 22, 2007 @04:13AM (#17708546) Homepage

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

The possession of a book becomes a substitute for reading it. -- Anthony Burgess

Working...