Slashdot Mirror


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.

3 of 215 comments (clear)

  1. Re:Here's better by Rosco+P.+Coltrane · · Score: 3, Interesting

    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
  2. It may prove useful. by Z00L00K · · Score: 3, Interesting
    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.

    --
    If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
  3. Re:Right tool for the job by Frumious+Wombat · · Score: 4, Interesting

    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