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.

215 comments

  1. I don't know about firehosing it by Marxist+Hacker+42 · · Score: 1

    But would you mind if I submitted it to Technocrat?

    --
    SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
    1. Re:I don't know about firehosing it by Short+Circuit · · Score: 1

      Not at all.

      My only concern is that it's on shared hosting through Dreamhost. But if it comes down to it, I've got people I can talk to to see about alternate hosting.

    2. Re:I don't know about firehosing it by Marxist+Hacker+42 · · Score: 2, Informative

      Posted to Technocrat.net- as I'm "semi-paid contributing editor" there, it hit the front page immediately of course.

      --
      SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
    3. Re:I don't know about firehosing it by Short+Circuit · · Score: 1

      Cool. I've been watching the activity on the wiki. There appear to be more than a few exploring the site and updating the pages.

    4. Re:I don't know about firehosing it by Dunbal · · Score: 2, Interesting

      "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.
    5. Re:I don't know about firehosing it by Anonymous Coward · · Score: 1, Funny
      "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.


      What is your secret? Every post I have seen that is critical of capitalism immediately gets modded as a troll, offtopic or flamebait.

      How did you do it?
    6. Re:I don't know about firehosing it by brunson · · Score: 1

      Thank you, Randy Jackson...

      --
      09F911029D74E35BD84156C5635688C0
      Jesus loves you, I think you suck
    7. Re:I don't know about firehosing it by Anonymous Coward · · Score: 1, Insightful

      Oh, there we go, modded offtopic now, though criticism of capitalism usually gets you a troll label pretty quick. I guess the kids(mods) were just a bit slow yesterday.

      But this does not explain how an enlightened mod crept in and modded you up earlier. It is encouraging to think that there might be one non-redneck who earned mod points around here.

      The censors here will clamp down on anything critical of the fatal flaws of capitalism pretty quick usually.

      I find it very strange that a basically open source software and nerd site is so strongly dominated by right wing a-holes. They have a way of taking over every public forum I have ever come across. I suspect that they are motivated to defend the evil of capitalism because they know at heart that it is morally just about as wrong and evil as the human soul can get, therefore it needs all the reinforcing propaganda and dogma that it can get.

      Let him who hath understanding...

  2. I made it through! by Shadow+Wrought · · Score: 1

    Whatever was keeping me out is either gone or something, but I have access now. Since I am attempting (yet again) to teach myself coding I am very excited about using the site and will be voting you up in the hose;-)

    --
    If brevity is the soul of wit, then how does one explain Twitter?
    1. Re:I made it through! by goarilla · · Score: 1

      same here this could be very handy indeed
      instead of having to search that one paper in a (online) book or tutorial about the
      syntax of the if construct in tcl, C, python, LISP, ...
      i could just have a small copy of this rosetta's code in my hand and just have to
      look through a few decently structured pages, ... then i can finally throw away
      my mess of written schematics on language syntax

    2. Re:I made it through! by MattPat · · Score: 1
      Whatever was keeping me out is either gone or something...

      I believe that would be the Slashdot Effect. ;)

    3. Re:I made it through! by Short+Circuit · · Score: 1

      At the moment, it's a PHP misconfiguration on the server. Hopefully, this will be taken care of tomorrow morning.

      Updates will be at blog.rosettacode.org.

    4. Re:I made it through! by MattPat · · Score: 1

      Oh.

      Whoopsy :P Excuse me for jumping to conclusions... you see a 403 or 503 error after a site's been posted to Slashdot and 99% of the time it's caused by one thing.

    5. Re:I made it through! by orangesquid · · Score: 1

      MirrorDot managed to grab a few pages before the site went down, so you can at least peek at a few things:
      Intro Page
      Known Algorithms
      Guidelines for submitting algorithms

      --
      --TheOrangeSquid Is it any wonder things seem so awry? We swim in a sea of confusion and don't have to think to survive
    6. Re:I made it through! by Short+Circuit · · Score: 1

      Too bad it didn't cache the CSS.

      We'll be back up some time today. I just need to get back into the server and tweak the database settings.

    7. Re:I made it through! by orangesquid · · Score: 1

      Awesome! :) Send me an email when it's back up.. I probably have some things to contribute very soon!!! =) Plus, I'd love to look at the code in the wiki, and the coding styles and commenting.

      --
      --TheOrangeSquid Is it any wonder things seem so awry? We swim in a sea of confusion and don't have to think to survive
    8. Re:I made it through! by Short+Circuit · · Score: 1

      Stop by blog.rosettacode.org. I'll make an announcement there.

    9. Re:I made it through! by Short+Circuit · · Score: 1

      Tried sending you an email. Rosetta Code's been up for a couple days now. It's all I've been able to do to keep up with all the users. :)

  3. Erm... by jpellino · · Score: 1

    You're itchin' for a fight with Cupertino, is that it?

    --
    "Win treats sysadmins better than users. Mac treats users better than sysadmins. Linux treats everyone like sysadmins."
    1. Re:Erm... by lexarius · · Score: 2, Informative

      Apple, which currently has a product called Rosetta, which allows PPC code to be executed on Intel chips by translating it dynamically or something.

    2. Re:Erm... by Short+Circuit · · Score: 1

      Ouch.

      Well, I'll put contact info in About page. If they want to make an issue out of it, I'll hand over the domain. I've got another name as backup.

    3. Re:Erm... by AndrewNeo · · Score: 1

      Apple won't have anything on you since it's a name based off of something else.. if anything, the actual company Rosetta Stone would be a problem.

    4. Re:Erm... by Anonymous Coward · · Score: 0

      It's a completely valid domain name. If Apple or anyone gives you any shit about it, make it as inconvenient and public as possible. You don't need to take it to court, you just need to make it an utter pain in the ass for them. We've all seen far too much legal bullying over domain names.

  4. No Fair! by Watson+Ladd · · Score: 4, Insightful

    A lot of the tasks assume imperative programing, e.x. assigning values to an array. This should be about algorithms that we can all implement, not code fragments that assume a particular style of programing.

    --
    Inventions have long since reached their limit, and I see no hope for further development.-- Frontinus, 1st cent. AD
    1. Re:No Fair! by tomhudson · · Score: 1

      That's what google or a good book are for. Even (bleh!) design patterns.

      Or programs that convert from one source language to another ...

    2. Re:No Fair! by Short+Circuit · · Score: 5, Informative

      I would be happy to see other types of programming represented in Rosetta Code. I only included what I already knew. Rosetta Code should be about many things I don't already know. Once the server's no longer slashdotted, stop by blog.rosettacode.org, and I'll make a point to bring up how to add your own programming tasks. (Really, you just have to add a template to the top of of the page. But there are some guidelines.)

    3. Re:No Fair! by frakir · · Score: 5, Funny

      I program in Malbolge, you insensitive clod!
      http://en.wikipedia.org/wiki/Malbolge_programming_ language

      I hope next windows ver will be coded in Malbolge and open source.

    4. Re:No Fair! by Anonymous Coward · · Score: 1, Interesting

      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.

    5. Re:No Fair! by Dunbal · · Score: 2, Funny

      I hope next windows ver will be coded in Malbolge and open source.

            You mean it's not? ;)

      --
      Seven puppies were harmed during the making of this post.
    6. Re:No Fair! by slide-rule · · Score: 1

      I disagree. I already can think in rather generic, algorithmic terms. If I'm suddenly backed against the wall to get a code from language A into language B, I'd want to see how the language mechanics worked ... whether its 'int' or 'integer', how functions get declared/called, how multidimensioned arrays are created/manipulated... etc. While it might be better to have a pocket reference for every language available on a desk somewhere, this sort of site means I might not have to bother even with a pocket reference: I look up a task close-ish to what I need and see how it maps from, say, Java to Perl. Kinda like how the rosetta stone itself worked.

    7. Re:No Fair! by nuzak · · Score: 2, Funny

      > I hope next windows ver will be coded in Malbolge and open source.

      If something's written in malbolge, I don't think it really matters if it's open source.

      --
      Done with slashdot, done with nerds, getting a life.
    8. Re:No Fair! by Evil+Pete · · Score: 1

      The object code is the open source. Well ... more readable.

      --
      Bitter and proud of it.
    9. Re:No Fair! by Marxist+Hacker+42 · · Score: 1

      Until you run it, at which point it encrypts the guilty instructions (and the innocent instruction immediately preceeding a jump) to something entirely different.....

      --
      SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
    10. Re:No Fair! by DRAGONWEEZEL · · Score: 1

      You know...
      I have to agree with you ABSOLUTELY

      I am not a huge programmer (or at all really). Why then do I then feel empowered to talk?
      No, not because I am a Karma Whore^tm...

      I took 2 years of programming classes, and had only two teachers show me something useful. The first, Stephanie Bowe (awesome teacher) made relational database concepts very simple to understand. The second was never one of my programming teachers. He was my math teacher, Paul Smith (yes that's his real name. No he doesn't look like an agent. He looks like Einstein kinda..) One of the things he taught me was that you don't need to know all the ins and outs of a particular language, but you should learn concepts. Such as an Looping (if then else loop, for-next, do-while, do-until, etc...) Proper use of variables including scope, and arrays. Following a logical progression from Input to Output, etc... The funny thing was that made this come across in a way that was so simple. He made programming look like simple addition. He is a great man to talk to about anything really.

      My programming logic class followed this pattern, but the teacher was incapable of engaging the class. I sat front and center, and learned more from the book than anything, and most of it was Visio designing using Mr. Smith's theories.

      Interestingly (to me anyway) was that I found my logic class, Database concepts, and the conversations I had w/ Mr. Smith to be useful in my daily life. It really helped when mapping business process' current and future. It has also caused me to take a significant interest in logistics, and management.

      --
      How much is your data worth? Back it up now.
  5. Here's better by Rosco+P.+Coltrane · · Score: 1

    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?

    There are also programs that can be compiled or run by several different compilers/interpreters:

    --
    "A door is what a dog is perpetually on the wrong side of" - Ogden Nash
    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
  6. 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.
    1. Re:It may prove useful. by arevos · · Score: 4, Insightful

      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. If you look at the programming tasks the website attempts to translate, you'll notice that they are extremely basic and generic. I don't think the aim of the website is to translate some complex library into another language; rather to provide a learning resource where programmers can see how to map simple tasks from one language to another, which presumably will help them better understand a new language. Remember that the original Rosetta stone was used for a similar purpose.

      This site could be useful, but MediaWiki doesn't seem the best tool to use, and the content so far is rather sparse. I'm uncertain whether this will prove a success; it's an interesting concept, but many interesting concepts have fallen by the wayside.
    2. Re:It may prove useful. by Anonymous Coward · · Score: 0

      "most object files doesn't really care about which language you use"

      You sure? Can I link a java class file into a C++ binary? You can't even link C++ object files compiled with different compilers on the same platform, in some cases (different compilers mangle symbol names in different ways, etc - and obviously linking C++ object files compiled on different platforms isn't going to work). It sounds like you might be a seasoned .NET programmer, at best.

    3. Re:It may prove useful. by Anonymous Coward · · Score: 0

      I also know that some tasks can't be ported. Can't all tasks be ported between two languages, assuming they're both turing complete?
    4. Re:It may prove useful. by mrchaotica · · Score: 1
      This site could be useful, but MediaWiki doesn't seem the best tool to use...

      Just out of curiosity, why not? And what would you suggest instead?

      --

      "[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz

    5. Re:It may prove useful. by arevos · · Score: 4, Insightful

      Just out of curiosity, why not? And what would you suggest instead? A Wiki is essentially just an editable website. It must be manually ordered; tables of contents put in, pages linked to other pages, and so forth. This is find for data that has a very general structure, such as an encyclopaedia or a manual of some kind. But the Rosetta Stone concept is highly structured, cross-referencing programming languages with programming problems, and it seems to me as if this cross-referencing would be better done automatically, rather than making several Wiki pages and maintaining them manually. The site concept would be better suited to some sort of customised CMS, or perhaps something designed from scratch.
    6. Re:It may prove useful. by Raffaello · · Score: 2, Insightful

      Only if you're allowed to write an interpreter or compiler for the more powerful language in the less powerful one.

      This is what has been called the "Turing Tarpit." In a formal logical sense, all turing complete languages are equivalently powerful. But that means that punching holes in a paper tape by hand is technically as powerful as a high level language. We have high level languages so that we don't have to twiddle ones and zeroes.

      High level languages themselves differer in expressiveness. They can all accomplish the same tasks, but some languages make certain tasks a whole lot easier. For some language pairs, the only way to easily accomplish certain tasks in the less powerful language is to write what amounts to "an ad-hoc, informally-specified bug-ridden slow implementation of half of " the more powerful language.

      As a consequence, there is no "basic" or "generic" list of programming tasks. Tasks that one has become accustomed to do in many languages are a non-issue in some other languages. "Design Patterns" in some languages don't exist in certain others because the language itself makes them unnecessary (see Google's director of search quality, and AI expert Peter Norvig's treatment of the subject especially this slide)

      A site like Rosetta Code could only be useful for languages that are so similar that they essentially differ mostly in surface syntax. For languages much different than this their whole paradigms are different, and many of the tasks themselves are no longer the same.

    7. Re:It may prove useful. by Reverend528 · · Score: 1
      But as a seasoned programmer I also know that some tasks can't be ported.
      That's when you invoke Greenspun's Tenth Rule
    8. Re:It may prove useful. by maxwell+demon · · Score: 1
      "most object files doesn't really care about which language you use"

      You sure? Can I link a java class file into a C++ binary? You can't even link C++ object files compiled with different compilers on the same platform, in some cases

      Most object files don't really care about if you can link them. :-)
      --
      The Tao of math: The numbers you can count are not the real numbers.
    9. Re:It may prove useful. by maxwell+demon · · Score: 1

      The task of copying a file cannot be ported to a language which has no concept of file I/O, even if that language is turing-complete.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    10. Re:It may prove useful. by Short+Circuit · · Score: 2, Informative

      Just out of curiosity, why not? And what would you suggest instead? A Wiki is essentially just an editable website. It must be manually ordered; tables of contents put in, pages linked to other pages, and so forth. I make use of as many MediaWiki features as I know how. There's one template for programming languages, one for compilers, one for interpreters, one for programming tasks, etc. Adding the template to a new page automatically adds the page to the related category, and the category index pages are the primary tool for browsing the site.

      In short, our Tables of Contents are automatically updated for us by the wiki engine. It's cool.

      This is find for data that has a very general structure, such as an encyclopaedia or a manual of some kind. But the Rosetta Stone concept is highly structured, cross-referencing programming languages with programming problems, and it seems to me as if this cross-referencing would be better done automatically, rather than making several Wiki pages and maintaining them manually. The site concept would be better suited to some sort of customised CMS, or perhaps something designed from scratch. The benefit of using a wiki, and why I chose to use it, is that in each of these intermediary pages, one can place descriptive information about the relationship. The net effect is that an encyclopedia forms around the structured data. This has only happened in a couple places, such as the page about LAMP, and the page about GCC, but it's something I want to see continue.

    11. Re:It may prove useful. by arevos · · Score: 1

      In short, our Tables of Contents are automatically updated for us by the wiki engine. It's cool. Ah, I wasn't aware that MediaWiki could do that. Still... storing a cross-references on a Wiki page seems somewhat untidy to me. However, I can't think of any major practical disadvantages to the Wiki approach if cross-referencing languages to tasks is handled automatically, so it may be a reasonable solution despite my reservations.
    12. Re:It may prove useful. by Lodragandraoidh · · Score: 1
      For languages much different than this their whole paradigms are different, and many of the tasks themselves are no longer the same.


      A good point. One example would be implimenting a fast hash algorithm in C; in Perl and Python this is accomplished for you via hash and dictionary objects respectively. In those languages, you simply assign key,value pairs to the hash/dictionary variable type; later you can do a fast search e.g. in python: value=myhash[key]
      or equivalent in perl:
      $value=$myhash[$key];
      Interestingly, the hash algorithm in both of these examples is implimented in C under the hood.

      On modern computers, getting the last iota of cpu cycles is less important than saving developer time in most cases. This is particularly true given more demand for software in organizations than there are developers to fill those needs. In an environment where users are clamoring for results, using traditional means is not reasonable, hence the development of higher level constructs.

      Only under special circumstances would you need to resort to ultra tight programming (via C or assembler) - jobs where the number of cpu cycles is large (e.g. complex supercomputing applications), or the resources available are small (e.g. embedded systems) - and this problem domain is so small as to be the least likely case.

      In a formal logical sense, all turing complete languages are equivalently powerful.


      This is true - if you are only measuring the application running on the computer. What this doesn't measure are the man-hours required to accomplish equivalent tasks in each given language. I think I've illustrated why we should be selective when considering ease of development, versus system performance; in most cases you want to err on the side of more efficient development - because that is most likely where your problem domain will lay. Of course, if you work as a research scientist at a supercomputing lab, then you may come to a different conclusion.
      --

      Lodragan Draoidh
      The more you explain it, the more I don't understand it. - Mark Twain
    13. Re:It may prove useful. by Short+Circuit · · Score: 1

      Check out this page. That'll be the basis of browsing the site soon. :-)

    14. Re:It may prove useful. by Short+Circuit · · Score: 1

      In such a situation, one creates an abstraction of files. That's how one gets files in the first place.

      But yes, your point makes sense. In Rosetta Code, it wouldn't make sense to create a file abstraction for programming languages which don't support file I/O inherently. However, it would make sense to provide a programming example which makes use of a library which provides that abstraction.

  7. Usage by mgiuca · · Score: 5, Insightful

    I'm not sure the right idea is to "know how to do something" in a particular language. If programmers are encouraged to learn algorithms specific to a particular language, how will they ever adapt once their pet language sinks? (By using an algorithm repository to re-learn rote code?)

    At any rate, I think this site has already encountered a problem which is only going to escalate as it grows: code isn't cross-indexed properly at all. For example, there are many "programming tasks" with solutions in C, but there is nothing on the C page. I think this problem stems from the fact they used MediaWiki.

    MediaWiki's great for something like... well, Wikipedia. But it doesn't support a cross-referenced database like this. The wiki concept is good for this site, but the server needs to be running some software designed better to the task.

    1. Re:Usage by Short+Circuit · · Score: 3, Informative

      I'm not sure the right idea is to "know how to do something" in a particular language. If programmers are encouraged to learn algorithms specific to a particular language, how will they ever adapt once their pet language sinks? (By using an algorithm repository to re-learn rote code?) Rosetta Code was largely inspired by a page on Wikipedia where the classic "Hello World" example was shown in a few hundred languages.

      Rosetta Code takes the concept behind Hello World, and spreads it to other tasks.

      At any rate, I think this site has already encountered a problem which is only going to escalate as it grows: code isn't cross-indexed properly at all. For example, there are many "programming tasks" with solutions in C, but there is nothing on the C page. I think this problem stems from the fact they used MediaWiki. Actually, this is (almost) intentional. I want people to be able to learn about the languages they're using. I've been filling in the pages as I've had the opportunity. (I'm a full time college student, and president of a student organization.) Check the page on GCC, for example.

      MediaWiki's great for something like... well, Wikipedia. But it doesn't support a cross-referenced database like this. The wiki concept is good for this site, but the server needs to be running some software designed better to the task. I'm open to suggestions. (And assistance, if it'll go that far.)
    2. Re:Usage by cp.tar · · Score: 3, Insightful
      I'm not sure the right idea is to "know how to do something" in a particular language. If programmers are encouraged to learn algorithms specific to a particular language, how will they ever adapt once their pet language sinks? (By using an algorithm repository to re-learn rote code?)

      But this kind of thing should be very good for someone learning a new language - you know how to do it in one language, now you're looking it up in another one... like learning the most common phrases first when learning a natural language.

      I hope this project will amount to something; it can be really useful.

      --
      Ignore this signature. By order.
    3. Re:Usage by garo5 · · Score: 1

      Mod parent up!

      MediaWiki is not a good platform for this. You should create own software which is designed for this kind of usage.

        - Garo

    4. Re:Usage by Anonymous Coward · · Score: 0

      And then in the spirit of the site, port it to all languages!!!!!!!

    5. Re:Usage by Oligonicella · · Score: 1

      Or, you, in a sense of magnanomy, could do the work for him and let him do the content oversight.

    6. Re:Usage by Anonymous Coward · · Score: 0
      MediaWiki is not a good platform for this. You should create own software which is designed for this kind of usage.


      Care to contribute? Or are you just going to criticize?
    7. Re:Usage by lordmatthias215 · · Score: 1

      Actually, this is (almost) intentional. I want people to be able to learn about the languages they're using. I think your logic's a bit faulty here- even though a given page may translate from language A to language B, someone learning language B could just read the entry in "reverse" so to speak- that is looking at Language B's code in relation to what language A's users had to change to get there. It's just like a dictionary- sure, I'm learning spanish and know english, but it doesn't always work to look up a Spanish word and figure out what it means in English- sometimes I need to look up English to translate to Spanish.
    8. Re:Usage by raphae · · Score: 1

      I hope it will be useful too. As far as some of the critical comments above, I don't quite understand where they are coming from. By saying that some languages are so fundamentally different that there can't be some kind of easy reference on doing tasks between them - I would take that fact and draw the exact opposite conclusion. It is exactly because they are different not just in surface ways that such a site would be very useful.

      I can think of a lot of little tasks that it would be nice to have a cross-language reference for:

      - Do something recursively to every file (or onlhy certain matching files) in a directory
      - Perform some task over all elements of an array
      - Execute a command on a remote system
      - Ask for input, if input matches (or doesn't match) some answer, do something, otherwise do something else
      - Perform operations like concatenation of file names based on patterns in the name
      - Check if argument supplied (or not), then do something

      These are just a few basic things that someone would want to do which would be helpful to see how they are done in another language. The fact that the whole structure for implementing these things could be radically different in different languages to me calls for such a site, not the opposite.

    9. Re:Usage by Short+Circuit · · Score: 1

      Every mention of a language, compiler, interpreter or platform comes with a hyperlink to a page specifically about that tool. So if one wants to learn about GCC, one can click on the appropriate link, or type it in the search field. If one wants to learn about Haskell, one can click on Haskell's link.

    10. Re:Usage by Short+Circuit · · Score: 1

      I have a really hard time developing using software I didn't write. Believe me, if it was possible, I would have written custom software.

      But, being a full time college student only halfway through to his Bachelor's, I have neither the time nor the skills.

    11. Re:Usage by mgiuca · · Score: 1

      Rosetta Code was largely inspired by a page on Wikipedia where the classic "Hello World" example was shown in a few hundred languages.

      Rosetta Code takes the concept behind Hello World, and spreads it to other tasks.

      Sure, it's a good resource for that purpose. I did a lot of work on that wiki page ("Hello World") before it got moved to WikiBooks and messed up. So yes, it is a good reference for seeing how other languages work... precisely as the name suggests, a Rosetta stone.

      My criticism was mainly on the summary which suggested you could "port" your algorithms using this reference, which I don't think is the correct usage for it.

      I'm open to suggestions. (And assistance, if it'll go that far.)

      Well now that I've thought about it, I realise you could get away with MediaWiki... just make extensive use of the categories system instead of making manually-indexed reference pages. For instance, instead of having those 3 index pages "By language used," "By task solved" and the other one, just delete all except "By task solved". Have the page on "By task solved" as the main index. Then create categories for each programming language, and whatever that other index was. And then for each "task", add the programming languages it features as categories at the bottom.

      This effectively automatically cross-references each task with all the languages used.

      PM me or something if you need help setting that up (once the site comes back online).

    12. Re:Usage by Short+Circuit · · Score: 1

      The site's back up. I believe this is the page you're interested in.

      (Gah! I've been working on Rosetta Code day-and-night, while eating, working, and in class, since the Slashdotting, just to keep up with all the new material. I tried to create the link using wiki syntax.)

    13. Re:Usage by mgiuca · · Score: 1

      Hey man, that's exactly what I meant. Well done - must have taken you awhile but it's great now. :)

    14. Re:Usage by Short+Circuit · · Score: 1

      It took a friend and me less than an hour, all told. :)

  8. if you like this... by taybin · · Score: 3, Informative
    1. Re:if you like this... by mgiuca · · Score: 2, Informative

      Another great one: HanoiMania. 111 solutions to the "Tower of Hanoi" recursive problem, some in very creative and bizarre environments (as outlined in the summary at the top).

    2. Re:if you like this... by Anonymous Coward · · Score: 0
      I've found PLEAC useful as well. From the site:

      Following the great Perl Cookbook (...) which presents a suite of common programming problems solved in the Perl language, this project aims to gather fans of programming, in order to implement the solutions in other programming languages.
    3. Re:if you like this... by Coryoth · · Score: 3, Informative

      Also worth looking into is LiteratePrograms which provides a wide range of algorithms written (and documented - hence the "literate" part) in a wide variety of languages. Currently there are over 50 different "Hello World" programs in different languages, including such things as AliceML, AspectJ, Haskell, and Oz, as well as all the usual suspects. More to the point, it also includes a decent variety of more interesting algorithms, including basic sorting algorithms (quick sort, merge sort etc.) in a wide variety of languages, right the way up to a basic GUI file manager in GTK. It's a Wiki, and still growing, but it seems to be well ahead of RosettaCode at the moment.

    4. Re:if you like this... by Dan+East · · Score: 2, Interesting

      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.
    5. Re:if you like this... by Anonymous Coward · · Score: 0

      Did you even have a look at the site before flaming away?
      For C there are 4 more versions, for C++ 5.
      With simple output to stdout and with classes.

      The *point* of this site is to show different language features, not to implement the program in the most simple way.

    6. Re:if you like this... by timeOday · · Score: 1
      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.
      That's not stupid, it's awesome!
    7. Re:if you like this... by huckda · · Score: 1

      oh if only I had my first pascal program of 99 bottles of beer....it was wildly entertaining for such a lively song.

      --
      "Just Smile and Nod." --Huck
    8. Re:if you like this... by Anonymous Coward · · Score: 0

      If you are going to use "Hello, World!" as an example, you must include this one:
      http://www.gnu.org/software/hello/hello.html

      This version supports internationalization, has man pages, and uses automake/autoconf to configure itself for most environments. It also has a few extensions to the original program and is written to GNU coding standards.

    9. Re:if you like this... by Short+Circuit · · Score: 1

      I created a page that lists all the similar sites that Slashdot users mentioned in their replies.

    10. Re:if you like this... by Short+Circuit · · Score: 1

      I created a page that lists all the similar sites that Slashdot users mentioned in their replies.

  9. One task that isn't on there by antifoidulus · · Score: 4, Funny

    "How to bring a hooker back to life" Damn, I really neede....I mean, was interested in how you would do it in Perl, for curiosity's sake....

    1. Re:One task that isn't on there by Anonymous Coward · · Score: 3, Funny

      use Hooker::Transactional;

      Hooker::Transactional->get_last->rollback;

      Dude, CPAN has EVERYTHING! :)

    2. Re:One task that isn't on there by Hektor_Troy · · Score: 1

      I didn't know Ben Affleck posted on Slashdot.

      --
      We do not live in the 21st century. We live in the 20 second century.
    3. Re:One task that isn't on there by patio11 · · Score: 2, Funny

      >>
      I mean, was interested in how you would do it in Perl, for curiosity's sake....
      >>

      There's more than one way to do it.

    4. Re:One task that isn't on there by Larry+Lightbulb · · Score: 1

      My book "101 uses for a dead hooker" will be published in time for Christmas.

    5. Re:One task that isn't on there by Lord+Ender · · Score: 1, Funny
      I mean, was interested in how you would do it in Perl, for curiosity's sake....

      • Hold down shift.
      • Mash the top row of your keyboard with your fist. You may also consider outsourcing this job to your cat.

      The Perl language was designed with genetic programming in mind. Any random combination of characters is executable Perl.
      --
      A slashdotter who didn't build his own computer is like a Jedi who didn't build his own lightsaber.
    6. Re:One task that isn't on there by Dunbal · · Score: 1

      My book "101 uses for a dead hooker" will be published in time for Christmas.

            O.J. is that you?

      --
      Seven puppies were harmed during the making of this post.
  10. Great! It as close as you can come... by Anonymous Coward · · Score: 0

    to having a psuedocode compiler!

    1. Re:Great! It as close as you can come... by $RANDOMLUSER · · Score: 1

      > to having a psuedocode compiler!

      And what standard for psuedocode are we going to use? I once worked for an old-fart IMB 360 assembly language programmer turned CTO, and for a while he had us (I'm not making this up) using a program that used a psuedocodish language to produce flowcharts, which could then be used to document programs written in a 4gl (Progress). He did not see the irony or humor in this.

      --
      No folly is more costly than the folly of intolerant idealism. - Winston Churchill
  11. The wonderful world of copy and past programming ! by Anonymous Coward · · Score: 0

    As if we didn't have too much of that already.

  12. Should I be impressed? by Fulkkari · · Score: 4, Insightful

    The site has absolutely no real content. There are only a couple of pages on the whole site. The most advanced thing found there is something along the lines of how to open a file with mIRC scripting (no C/C++/Java) and that bash scripts (usually) start with #!/bin/bash. Oh, please. Should I be impressed?

    --
    I demand the Cone of Silence!
    1. Re:Should I be impressed? by TodMinuit · · Score: 1

      Oh, please. Should I be impressed?

      I think so: Somehow, inspite it's nothingness, it got on the frontpage of Slashdot.

      Then again, it is a Sunday, and yet the server got Slashdotted.

      --
      I wonder if I use bold in my signature, people will notice my posts.
    2. Re:Should I be impressed? by peektwice · · Score: 1

      No, do not be impressed. This is only a test. There is no content. In the event that there is actual content, you will be notified by a Slashdot front page article.....wait.....dammit. Also, does anyone have to be show how to do something in Perl? In general, if yo slap together some code, it'll run. Whether it will do what you want or not, is usually up for debate. Iterations of this process will eventually make it perform the task at hand.

      --
      Other than this text, there is no discernible information contained in this sig.
    3. Re:Should I be impressed? by LiquidCoooled · · Score: 3, Insightful

      It got to the frontpage because its an interesting idea.
      The firehose will help with things like this.

      I agree it was empty and its implimentation feels flawed, but it gives a baseline for thoughts other people may be having.
      I know *I* have been thinking about this since I saw it and how it should/could be once filled.

      It gets a thumbs up from me.

      --
      liqbase :: faster than paper
    4. Re:Should I be impressed? by Short+Circuit · · Score: 1, Insightful

      I'm sorry it doesn't meet with your approval. It's a wiki. Care to improve it?

    5. Re:Should I be impressed? by Short+Circuit · · Score: 1

      Then again, it is a Sunday, and yet the server got Slashdotted. 3000 hits to the main page in 45 minutes. I've got to find better hosting.
    6. Re:Should I be impressed? by Fulkkari · · Score: 1

      Sorry if I seemed a bit harsh, but it was a Slashdot frontpage story after all and I think most of us kind of expected a bit more from it. As you probably know there already are much competition from tons of other programming-related wikis. Not that this is a bad idea, but there should be some foundation done before making this big much publicity...

      That being said, I don't have anything against "solving a task" or two if this site would take off.

      --
      I demand the Cone of Silence!
    7. Re:Should I be impressed? by TodMinuit · · Score: 1

      That's not a lot, although that is to merely the frontpage. Perhaps it isn't the server, but the fact that you use MediaWiki, which I think is SQL query heavy.

      --
      I wonder if I use bold in my signature, people will notice my posts.
    8. Re:Should I be impressed? by Giometrix · · Score: 1

      "3000 hits to the main page in 45 minutes. I've got to find better hosting."

      I wasn't able to get to the site, and I don't know how much data your pulling from the database on that page.... but did you cache the data being returned from the database?

      My site, also on a shared hosting platform (cheap plug alert: www.bookgoldmine.com) received similar traffic when it got on StumbleUpon and it handled it quite well. I made heavy use of caching, which is what probably did the trick.

      Also, my back end is SQLite (www.sqlite.org). In the past I've had issues with databases on shared hosting plans. Basically the web servers had terrific uptime, but the database uptime was mediocre, at best. Even when the db (I've used both MySQL and SQL Server on shared hosting plans, MySQL fared worse, probably because the plan is cheaper and more people are on those servers) was up, performance often stinks because there are many other sites hitting those db severs... which means plenty of badly written queries hitting the same db server.

      I figured I might as well use SQLite, which is very fast and scales well up to about 4GB (my database is about 1.5MB right now @ 161 books, so I'll never get close to even .5GB). The db is actually part of your program, that is, it runs on the web server. Since from my experience the web server uptime is much better than the db server on these plans, this solution made sense to me. Of course, if I ever need to use some sort of load balancing system I'll probably need to port this system to a RDMS, but I'll worry about that when the time comes. If your site doesn't have a large number of users PUSHING data at the same time (SQLite's is ACID compliant, but the locking system is not as eloquent as the ones used by RDMSs) then you may want to consider using it as your back end, especially if you continue to have problems.

      --
      Download free e-books, lectures, and tutorials at bookgoldmine.com
    9. Re:Should I be impressed? by llefler · · Score: 1

      3000 hits to the main page in 45 minutes. I've got to find better hosting.

      Wikis seem to be fairly processor intensive. I looked at MediaWiki when I was setting up one of mine, and besides being slow it was a pain to set up. I don't know why they don't include a lot of the stock help pages in the distribution. I ended up using DokuWiki for user documentation for my apps. My production documentation server runs in a VM and the CPU spikes to 100% every time it serves a page. I doubt my hosted site over at GoDaddy would fare much better.

      --
      It is amazing what you can accomplish if you do not care who gets the credit. -- Harry Truman
    10. Re:Should I be impressed? by Short+Circuit · · Score: 1

      I'm following up on an offer to move the site to a faster, dedicated server. We'll see how it works out. :-)

    11. Re:Should I be impressed? by Short+Circuit · · Score: 1

      The server load average at the moment is 178.35, 153.35, 143.98. I don't think Dreamhost wants me any more.

    12. Re:Should I be impressed? by Short+Circuit · · Score: 1

      Meta has been very helpful. Of course, I hadn't referenced it in how to set up a proper server...

    13. Re:Should I be impressed? by Anonymous Coward · · Score: 0

      That being said, I don't have anything against "solving a task" or two if this site would take off. How about doing it now, to help making the site take off? You know, be one of those crazy trailblazers? :-)
    14. Re:Should I be impressed? by Anonymous Coward · · Score: 0

      > Wikis seem to be fairly processor intensive.

      No, that's just MediaWiki. It issues a sql select for every single link in a page, every single time the page is loaded. Utterly batshit insane. MediaWiki has never had a real design, and it shows.

    15. Re:Should I be impressed? by JohnQPublic · · Score: 1

      No, but perhaps you should think about that next time you submit a story about your own website. It's a great idea, and LiteratePrograms is already doing a fine job at it.

    16. Re:Should I be impressed? by Short+Circuit · · Score: 1

      Take a look now. Last time I checked, we solved 22 tasks in 43 languages. There are probably more, now.

  13. Been Done by WED+Fan · · Score: 3, Informative

    It's already been done. Planet Source Code does this already, and it's been around for ages. You can find code examples and complete projects.

    Then for projects in the .NET set there are a number of online translators that do C#VB.NET. Very good for moving code between different types of projects.

    Now, something that would be truely useful would be a service that would do translations from a wider variety languages.

    --
    Politics is the art of looking for trouble, finding it everywhere, diagnosing it incorrectly and applying the wrong fix.
    1. Re:Been Done by Inferger · · Score: 2, Informative

      It's been done before in another program called XTRAN too.

    2. Re:Been Done by Zontar+The+Mindless · · Score: 3, Informative

      Planet Source Code is not that hot. There's heaps of trivial examples that just aren't done very well - like a "new" PHP4-style class for connecting to MySQL which hard-codes "localhost" for the server name. I guess the guy hasn't heard of mysqli?

      The quality of the writing itself is pretty bad, too. People who are purporting to teach you something ought to be a bit more... well... literate.

      Neither am I inclined to be overly impressed when a site throws 175+ JavaScript and CSS errors in Firefox in just the first 2-3 pages. (I didn't bother counting the errors after that point.)

      --
      Il n'y a pas de Planet B.
    3. Re:Been Done by jomama717 · · Score: 1

      Now, something that would be truely useful would be a service that would do translations from a wider variety languages.
      Agreed. How sweet would it be to have a cross-compiler that could "compile" C code to Java, Java to C, Java to C#, etc. I'm pretty sure that at some level of code complexity it becomes an impossibility but even a cross compiler that could translate single methods/functions at a time would have some use. Sounds like a fun javacc or yacc experiment.
      --
      while [ 1 ]; do echo -n -e "\xe2\x95\xb$((($RANDOM&1)+1))"; done
    4. Re:Been Done by Short+Circuit · · Score: 1

      It's already been done. Planet Source Code does this already, and it's been around for ages. You can find code examples and complete projects. Nice. Not sure I like their layout, though.

      For me, one of the benefits of using a wiki is that I can include content on things like specific compilers and languages. (Not that there's a whole lot of that up there, now, though.)
    5. Re:Been Done by HeroreV · · Score: 1
      Planet Source Code groups Java and JavaScript together. It doesn't seem to understand anything besidse the name.

      JavaScript, is a scripting language used to create interactive web pages. Though less powerful than the Java programming language, it is also much simpler to learn.

    6. Re:Been Done by WED+Fan · · Score: 1

      But, you have a built in discrimination routine that allows you to hit the filter and get JavaScript only if that's what you are looking for.

      The human brain is wonderful.

      In the .NET section, it divides up C#, VB.NET, C++, and ASP.NET. Never mind that ASP.NET can have code-behind of just about any of the .NET languages. But, I really don't need the site to microfilter for me, I might just miss something else I'm looking for.

      --
      Politics is the art of looking for trouble, finding it everywhere, diagnosing it incorrectly and applying the wrong fix.
    7. Re:Been Done by HeroreV · · Score: 1

      What I don't like is that it treats them like they're related, as if JavaScript is based on Java or something.

  14. Can't get there from here. by Anonymous Coward · · Score: 0, Flamebait

    "as a seasoned programmer I also know that some tasks can't be ported"

    Are you an old man in bibbed overalls leaning back in a rocking chair on the porch of an old run down general store playing checkers and exchanging quick glances with your friend suggesting the pair of you have some fun with this rube asking directions to the next town?

    "Yer cannit git thar frum hair."

  15. Will they support these programming styles ?!? by ctrl-alt-canc · · Score: 3, Funny
    1. Re:Will they support these programming styles ?!? by Short+Circuit · · Score: 1

      Heh. I added it to the page that lists all the similar sites that Slashdot users mentioned in their replies.

  16. Re:minus 4, T8oll) by Short+Circuit · · Score: 2, Informative

    I had to get it started. My hope is that other people will contribute with languages (and tasks) that they know.

  17. Don't see much use by kalpaha · · Score: 1

    Any piece of code for which you can do a literal enough translation that looking at the mapping would help you, is trivial anyway. Any larger piece of Haskell would probably take huge amount of, say C, and the translation wouldn't make it one bit easier to understand.

    The only help the service will be is for beginning programmers who need to learn the syntax, but really, how long does learning a language's syntax take anyway?
    1. Re:Don't see much use by Short+Circuit · · Score: 1

      If you look at the programming examples pages, you can see that each mention of a programming language links to a page about that language, each mention of a compiler links to a page about that interpreter, libraries to a page about libraries, platforms to their own pages, etc.

      What I'm really hoping for is that a programming encyclopedia will grow around the programming examples. Take a glance at the page I wrote for GCC. I'd love to see pages like that sprout up around all the different languages, compilers and libraries.

    2. Re:Don't see much use by Anonymous Coward · · Score: 0

      Any piece of code for which you can do a literal enough translation that looking at the mapping would help you, is trivial anyway.

      So, you can quickly whip together functions to do Fourier transforms in half a dozen different languages?

  18. Couldn't find it... by hugg · · Score: 1

    I was looking for some code to help me load-balance a busy server that was just posted on Slashdot ... all I found was code for this old Applesoft BASIC wiki server.

  19. New? by d34d.10n · · Score: 2, Interesting

    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.

  20. Pointless, don't bother! by Anonymous Coward · · Score: 3, Informative

    Did you even bother looking at the site first? Perhaps not as it's slashdotted. The idea isn't bad, but it's just a nearly empty wiki. Not many languages, and looking at some tasks, most of the stuff wasn't very useful. For example, I looked at the file I/O task, and there were no versions for C, C++, Java, C#, VB (not that I'd want that), PHP (idem) nor anything like that - but there was a mIRC scripting version...

    Might be worth posting somewhere once there's actual useful content, but just not now.

    But then again, I'm sure the editors didn't even look at it either before posting. There's nothing news worthy or interesting there - yet.

    1. Re:Pointless, don't bother! by JoshJ · · Score: 5, Insightful

      Right now it may be "pointless" for someone looking at it. It is certainly not "pointless" for contributing to it. Posting it to /. , technocrat, and similar means that it will get exposed to a lot of potential contributors.

    2. Re:Pointless, don't bother! by dosius · · Score: 1

      mIRC script, eh? I could use a SysReset or UPP here on X-chat... rather than having to run wine for mirc or use the braindead irssi fserv...

      -uso.

      --
      What you hear in the ear, preach from the rooftop Matthew 10.27b
    3. Re:Pointless, don't bother! by Zadaz · · Score: 2, Insightful

      Then add something.

      Whoops, my fault. Being a hater is easier.

    4. Re:Pointless, don't bother! by Marxist+Hacker+42 · · Score: 2, Insightful

      It must have hit the front page.

      The whole idea of a wiki is for the community to build the content. The Rosetta Code is rather new, of course it's not complete. But it's a damned good idea, and deserves wider advertising so that the wiki will be filled!

      However, having said that, I agree, which is why I wasn't sure about firehosing this journal entry just yet. Better to let the professional FOSS experts at Technocrat have a crack at it first.

      --
      SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
    5. Re:Pointless, don't bother! by Reverend528 · · Score: 2, Funny
      I looked at the file I/O task, and there were no versions for ... Java

      Well, that would be pushing the limits of the MySQL LARGETEXT field.

    6. Re:Pointless, don't bother! by ozmanjusri · · Score: 1, Funny
      The idea isn't bad, but it's just a nearly empty wiki.

      NEARLY empty? I can only see one PHP example, and I don't think it's a very good one...

      Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/mike/public_html/includes/Exception.php on line 139
      --
      "I've got more toys than Teruhisa Kitahara."
    7. Re:Pointless, don't bother! by mr_mischief · · Score: 1

      Apparently, too many potential contributors.

      The steps are like this:

      1. build web hosting presence that will survive /.
      2. announce yourself on /.
      3. ???
      4. profit!

      It seems someone put #2 ahead of #1.

    8. Re:Pointless, don't bother! by Short+Circuit · · Score: 1

      Someone didn't know what was required for #1.

      We'll be back up some time today.

    9. Re:Pointless, don't bother! by Anonymous Coward · · Score: 0

      I think it's a great idea, too. Of course, maybe I'm biased because I had this same idea over the summer, but didn't have the time and resources to get my wiki up and running and seeded with some preliminary code. If the programming community can take the time to input into this, the resulting library would be amazingly useful. My compliments to the OP for putting this in place.

    10. Re:Pointless, don't bother! by Marxist+Hacker+42 · · Score: 1

      I had just assumed that you did know- I should have warned you. Technocrat is *very* minor compared to a slashdotting, and God Help You if you get Link Of The Day on User Friendly....

      --
      SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
    11. Re:Pointless, don't bother! by Short+Circuit · · Score: 1

      Check now: C, C++, Java, C#. No VB implementation yet, oddly enough. I wonder what language Slashdot users don't touch often...

  21. Simple Tasks - Not Progamming Wars by hackershandbook · · Score: 1

    Strikes me that the "Rosetta Stone" should concentrate on algorithms and not religious solutions ... "99 Bottles" is good because it allows so many variants on a simple task .. a little like a "meta-hello-world" ...

    How may ways do *you* know to solve the "Hello World" problem?

    1. Re:Simple Tasks - Not Progamming Wars by maxwell+demon · · Score: 1
      Depends on how you count. That is, which solutions you consider as equivalent.
      In the most extreme case (source file identity), there are in principle infinitely many solutions (just take your favourite solution and add arbitrary comments).

      Of course the simplest implementation is in m4:

      Hello, world!
      --
      The Tao of math: The numbers you can count are not the real numbers.
    2. Re:Simple Tasks - Not Progamming Wars by seebs · · Score: 2, Funny

      I can beat that. The language Greet has the specification that an empty input file (or indeed, any other) is a program directing the language to print "Hello, world!"

      In fact, K&R presents a complete Greet interpreter very early on.

      --
      My blog: http://www.seebs.net/log/ --- My iPhone/iPad app: http://www.seebs.net/seebsfrac/
    3. Re:Simple Tasks - Not Progamming Wars by Short+Circuit · · Score: 1

      That's one of the reasons the "User Output" task specifies the output text to be "Goodbye World!"

  22. Perhaps I'm not hip enough. by Anonymous Coward · · Score: 0

    Firehosing would seem to imply dousing, as in putting out his idea with a firehose. The definition that seems to apply to the context here is:

    Extensive and possibly excessive criticism of an idea by presenting an overwhelming number of arguments against it.

    I don't know what technocrat is, that could be where the confusion is coming from. It is perhaps a site that rips apart ideas? Site won't load for me so I honestly don't know. Other than that I don't understand how your title and comment go together other than you just really wanting to use the term firehosing to sound with it.

    To me what you said is like...

    I'm sorry to burst your bubble but I think that's a great idea, you mind if I share your idea with others?

    1. Re:Perhaps I'm not hip enough. by Short+Circuit · · Score: 1

      I have no problem with criticism. It tells me how I can improve.

      The exposure has pointed me to several other sites and projects with similar aims. I won't rip code off, but I will be investigating how they run their projects.

    2. Re:Perhaps I'm not hip enough. by Marxist+Hacker+42 · · Score: 1

      Firehosing refers to the new "Firehose" feature available to subscribers here at Slashdot to recommend journal entries for front page status.

      Technocrat.net is another site that FOSS geeks hang out at, starte by Bruce Perens for the discussion of governmental policy related to ham radios and computer topics.

      When you learn to use a computer, let us know.

      --
      SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
  23. I can see this as useful... by Anonymous Coward · · Score: 0

    if it weren't getting /.'ed... 5 minutes to load a page = nothx.

  24. Not a Bad Idea by WiseMuse · · Score: 0

    How is this practical? Please enlighten me!

    1. Re:Not a Bad Idea by Short+Circuit · · Score: 1

      Knowing how things are done in one language and seeing how they're done in other languages, gives you a perspective on those other languages. You can see how some other languages are similar to ones you already know, or you can see how totally messed up some languages are.

      Aside from that, I hope to have a programming encyclopedia grow around all of the incidental links. (Each programming example links to a local wiki page about each of the software tools used, be they compiler, interpreter, library or platform.)

  25. I've Been Working on This by RAMMS+EIN · · Score: 0

    I've been working on something like this for a while. Basically, the idea was to represent common tasks in various programming languages. The tasks are things like performing some operation on every element of a sequence, doing file I/O, defining recursive functions, etc.

    Some of what I made is up on http://inglorion.net/documents/plcomparison/. Eventually, I got tired of writing the C and Java programs. On my home machine, I have some more examples; like an implementation of the filter (AKA delete-if-not) function, a math formula internal-representation-to-text translator, and a TCP echo server, but I still have to write some of the programs, as well as the documentation for these.

    Anyway, just thought I should share. :-)

    --
    Please correct me if I got my facts wrong.
    1. Re:I've Been Working on This by Short+Circuit · · Score: 1

      I'll add a link to your site, if you like. Really, though, I'd like to see your code and tasks included on RC.

    2. Re:I've Been Working on This by RAMMS+EIN · · Score: 1

      For now, please add a link. In the future, I'd like to cooperate more.

      I'll contact you by email.

      --
      Please correct me if I got my facts wrong.
  26. maintainability by Crusty+Cracker · · Score: 1

    This may be all fine and well for writing a program, but what about maintaining the code... for anyone else trying to do anything with the code, it would be a huge headache... especially once the original programmer left. Completely unmanageable for projects of any decent size.

  27. Right tool for the job by mrjb · · Score: 1

    Nice idea, some concepts (string functions, (associative) arrays, file I/O) may be portable across some languages and in these cases rosettacode will be useful.

    But I think the actual problem is not given due value. Sometimes performing the same task in the same language requires different code on different platforms. Examples: Reading a file bigger than 4 Gigabyte in gnu-flavored C++ on mac, linux, windows; figuring out the total number of sectors on disk, etc.

    Also, we should accept that not all languages can do everything. Try creating an array of functions in VBA. Or (also in VBA) even simply breaking out of a loop, for that matter. Try exceptions in ANSI pascal or ANSI C. Try using pointers in Java. Try writing a GUI windowed interface in ANSI Pascal (no, Turbo Pascal doesn't count). Try recursion in GWBasic (this is actually possible).

    I see this ending up as an effort to shoehorn concepts unique to one language to another language (building web sites in COBOL *shiver*). Rather than using the wrong tool, it will pay off to actually learn the other language.

    --
    Visit http://ringbreak.dnd.utwente.nl/~mrjb/growingbettersoftware to download your free copy of the book
    1. 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
    2. Re:Right tool for the job by Short+Circuit · · Score: 2, Interesting

      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.

    3. Re:Right tool for the job by Tablizer · · Score: 1

      building web sites in COBOL *shiver*

      Just use Cobol-Script :-)

  28. In a more focused form by aero6dof · · Score: 3, Informative

    Sourceforge has hosted to Programming Language Examples Alike Cookbook project for a while now. It does something similar, filling out "Perl Cookbook" recipes for a fairly wide range of languages...

    http://pleac.sourceforge.net/

    1. Re:In a more focused form by Short+Circuit · · Score: 1

      I created a page that lists all the similar sites that Slashdot users mentioned in their replies.

  29. LiteratePrograms by Chris+Rathman · · Score: 2, Interesting

    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.

    1. Re:LiteratePrograms by Short+Circuit · · Score: 1

      I created a page that lists all the similar sites that Slashdot users mentioned in their replies.

  30. This is the reason why software sucks by Anonymous Coward · · Score: 1, Insightful

    We are always reinventing the wheel, recreating frameworks and libraries from codesnippets. software has failed, if it succeeded then we could just "connect" together from a library of existing "components" / "objects" but no, we have too much fucking ego so we have to always "create" something, must create must create, how about no? Just "BUILD"!

    Are you really afraid to accept that software is a BLUE COLLAR job today? I think that is why we MUST (re)CREATE something every fucking time.

    It is like an arms race, proliferation of code.

    Implement it once and reuse it many times. Yes I know it is the holy grail but this is not a TECHNICAL problem, it is more of a POLITICAL problem. This is why software will continue to suck. /Rant

  31. How about the shootout? by YGingras · · Score: 1

    I didn't look at the site (/. effect) but the Shootout sounds like a good place to get a list of tasks implemented in several languages. You even get arbitrary, but still usefull, metrics like the line-of-code count, run time and memory usage. If someone has time to waste coding trivial tasks in his favorite language, he should contribute to the shootout. I did and I must admit I got a kick when a few well placed suggestions cranked the performance of my entry. Today Common Lisp is faster than Pascal and OCaml, tomorrow we beat Fortran and C++!

  32. It was already done before by Anonymous Coward · · Score: 0

    It was already done before:
        http://99-bottles-of-beer.net/
    xD

  33. Software Rendering in Four Languages by KalvinB · · Score: 1

    http://code.icarusindie.com/

    The tutorials there show how to do software rendering in Javascript, PHP, C++ and Java. In Javascript, C++ and Java it gets into advanced raycasting. All three languages have a wolf3d clone.

    1. Re:Software Rendering in Four Languages by Short+Circuit · · Score: 1

      I created a page that lists all the similar sites that Slashdot users mentioned in their replies.

  34. Internal Server Error? A true Rosetta error by Anonymous Coward · · Score: 0

    I like this site! The following page comes up when I try to access the site and is both vague and general, yet detailed in a universal kind-of way. A true "Rosetta Error" if you will

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator, webmaster@rosettacode.org and inform them of the time the error occurred, and anything you might have done that may have caused the error.
    More information about this error may be available in the server error log.
    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    TDz.

    1. Re:Internal Server Error? A true Rosetta error by Dunbal · · Score: 1

      I like this site! The following page comes up when I try to access the site

      It's called The Slashdot Effect, and it happens from time to time. Try again later.

      --
      Seven puppies were harmed during the making of this post.
    2. Re:Internal Server Error? A true Rosetta error by Anonymous Coward · · Score: 0

      You must be unfamiliar with the concept of "sarcasm" or "humour" ...check into it sometime
      I'm well aware of the Slashdot effect,

    3. Re:Internal Server Error? A true Rosetta error by maxwell+demon · · Score: 1

      You get a 404? I get only a 403! That's unfair! :-)

      --
      The Tao of math: The numbers you can count are not the real numbers.
    4. Re:Internal Server Error? A true Rosetta error by Short+Circuit · · Score: 1

      I'm waiting for DNS to propagate to our new server. :-/

    5. Re:Internal Server Error? A true Rosetta error by Anonymous Coward · · Score: 0

      hey that pesky slashdot effect is transcending space and time!

      Now its re-writing code!!!1!11

      Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/mike/public_html/includes/Exception.php on line 139

      this calls for immediate discussion.

    6. Re:Internal Server Error? A true Rosetta error by Short+Circuit · · Score: 1

      It's been up for a couple days now. Take a peek.

    7. Re:Internal Server Error? A true Rosetta error by maxwell+demon · · Score: 1

      Thanks for the info. I already took a peek earlier, and even did some edits), although I didn't yet create an account. BTW, when I do, it will not be named "maxwell demon" - I tend to keep my identities somewhat separate (although I tend to use the same identity on several Wikis; I'll likely re-use my Wiki identity on Rosetta when I create an account).

      --
      The Tao of math: The numbers you can count are not the real numbers.
  35. I was working on something exactly like this... by CleverBoy · · Score: 1

    I called it ScriptNexus: http://www.scriptnexus.com
    I wanted it to literally do things in "real-time" too.
    My mind wandered though, so I mostly use it to do .htaccess files and write quick proposals from time to time. It's still a feasible idea though. Someday...
    HELLO WORLD examples (you can use the drop-down menu to change languages):
    http://www.scriptnexus.com/code/all/hello/text

    1. Re:I was working on something exactly like this... by Short+Circuit · · Score: 1

      I created a page that lists all the similar sites that Slashdot users mentioned in their replies.

  36. Syntax Across Languages by aldheorte · · Score: 1

    Once you get beyond syntax you start delving deep into the particular style of a language, which frustrates attempts to compare. A very good 'Rosetta stone' for programming languages already exists:

    http://merd.sourceforge.net/pixel/language-study/s yntax-across-languages/

    1. Re:Syntax Across Languages by Short+Circuit · · Score: 1

      I created a page that lists all the similar sites that Slashdot users mentioned in their replies.

  37. But... by Brandybuck · · Score: 2, Insightful

    But all Real Programmers know all languages! At least that's what Slashdot keeps telling me...

    AC: Stupid article, the guy could have used Haskell and solved his problems
    BB: But maybe he didn't know Haskell?
    AC: Then he deserves get fired!

    --
    Don't blame me, I didn't vote for either of them!
    1. Re:But... by arevos · · Score: 1

      But all Real Programmers know all languages! At least that's what Slashdot keeps telling me... Whilst it's obviously an exaggeration to state that any experienced programmer is familiar with all computer languages, I feel I should point out than any programmer worth his salt should have a wide enough knowledge as to make learning a good proportion (if not the majority) of programming languages a fairly trivial task. Haskell is one of the exceptions, as it has a lot of features that are not found in many other languages. But most programming languages have a great deal of syntactical overlap, especially more 'mainstream' languages.
    2. Re:But... by Brandybuck · · Score: 1

      An old saying: "Jack of all trades, master of none."

      This is true for programming as well. You can aquire a deep understanding of a few languages, or basic survival skills in dozens. Aquiring a deep understanding in dozens of languages is a truly exceptional feat.

      --
      Don't blame me, I didn't vote for either of them!
    3. Re:But... by arevos · · Score: 2, Insightful

      An old saying: "Jack of all trades, master of none."

      This is true for programming as well. You can aquire a deep understanding of a few languages, or basic survival skills in dozens. Aquiring a deep understanding in dozens of languages is a truly exceptional feat. I agree that it's difficult to acquire a deep understanding of most languages. One can study Java and all its related libraries and frameworks for years and still not learn it all. Indeed, my last job was as a Java programmer, and whilst I'm pretty familiar with several web frameworks, libraries and GUI toolkits, I have little knowledge about, say, the SecurityManager class, or J2ME, or JMS.

      But on the other hand, I disagree that a deep understanding of a single language is more useful than a working knowledge of a dozen (as you seem to imply). A good programmer needs to know the limitations of the environment that he or she is working in, and the only way to do this is via comparison. Furthermore, learning different languages exposes you to different ways of thinking about a problem; if you don't learn a good spread of languages, your perspective is severely limited, and this naturally affects your ability to solve problems efficiently. To use a metaphor, I believe stepping back and seeing the whole wood is more important than gaining detailed information about a single tree.

      Finally, I'm not sure I'd say that the only alternative to a deep understanding is "basic survival skills". Perhaps instead:

      You can aquire a deep understanding of a few languages, or a good working knowledge in dozens.
  38. Nice idea, but by Axello · · Score: 1
    It's a nice idea, but I wonder if a wiki is the right way to go about it. I was toying with the ideas years ago, to have a table for many similar constructs in various procedural languages. e.g, how to do a print, while loop, for loop, if-then-else statement in various languages. With examples of their use.

    For example:
    for loop
    C:
    for ([var] = [startvalue] ; [var] < [endvalue] ; [var]+= [incrementvalue]) {
    statements
    }

    Fortran:
    DO [var] = [startvalue], [endvalue], [incrementvalue]
    statements
    continue

    Perl:
    for ([var] = [startvalue] ; [var] < [endvalue] ; [var]+= [incrementvalue]) {
    statements
    }

    Korn shell:
    The for-loop in the shell iterates over lines in a list or file. It can be simulated using a while loop:
    [var] = [startvalue]
    while test [var] < [endvalue]
    do
    statements
    [var]=`expr [var] + [incrementvalue]`
    done

    Since some languages have the same token for different tasks, you would need cross-references in various positions. E.g. in perl:
    for (i=0 ; i<n ; i++) or
    for $var (@array), this would translate to foreach in other languages

    The way I picture it, is a mainmenu where you select the languages you want to compare. Then you get a list of the statements side by side. Or you can search for a particular token.

    Does anyone know if such a site exists?
    1. Re:Nice idea, but by Axello · · Score: 1

      Apparently, while I was typing my piece, aldheorte gave a pointer to http://merd.sourceforge.net/pixel/language-study/s yntax-across-languages/.
      That pretty much does what I want, but in a non-dynamic way.
      And there are 'subtle' differences between procedural languages like C, and object-oriented languages like Smalltalk...

    2. Re:Nice idea, but by multipartmixed · · Score: 2, Informative
      Your thinking around loops actually shows (to me, anyhow) why these Rosetta-stone-type projects are actually counter-productive in the long run. (I can also argue that using cross-language keywords is also poisonous).

      Why?

      Your C-language for-loop example uses the same crappy example as nearly every crappy text of the "learn C in 7 days [assuming you already know BASIC)" genre. Giving the first example this way --- as "a for-loop is something that counts, here's how you make it count" is ... so... bogus. And serves to completely POISON programmers' minds. I can't BEGIN to count how many programmers I've met who are confused about basic for-loops in C because they think they have to count.

      A for loop in C is simply the exact, beautiful, expression of the iteration concept:

      for (LOOP_INITIALIZER; LOOP_INVARIANT; PROPELLER)
      {
        EXPRESSION;
      }
      See? Has nothing to do with numbers.

      You're saying: execute LOOP_INITIALIZER, evaluate LOOP_INVARIANT, if it's true, perform EXPERSSION, evaluate PROPELLER and go back to the part of this sentence where we evaluated LOOP_INVARIANT.

      Because of this craputidinous teaching, I am constantly faced with programmers who cannot understand a loops of these types:

      for (a = arr; *a; a++)
        do_shit();
       
      or
       
      for (a = db_get_stuff(); a; a = db_get_more_stuff())
        do_shit();
       
      or even
       
      for (a = fgets(file, line, sizeof(line); a && !ferror(file); a = fgets(file, line, sizeof(line))
        do_shit();
      ...and these people have freakin' degrees in computer science. That final (contrived) example, BTW, is a fine way to avoid doing stupid shit like

      do
      {
        a = fgets(file, line, sizeof(line);
        if (a)
        do_shit();
      } while(a && !ferror(file));
      .... So: Why is the for-loop superior in every way to this while loop example?

      Look carefully.

      Loop control in the for statement is on the same line of code as the loop-construct keyword. In the above while-statement, loop control is at the beginning, middle, and end of the block. That's just BEGGING for a maintainer error. Yet 99 out of 100 C programmers prefer the second form... because it looks more like BASIC... they don't understand the beauty of the for-loop... they simply think ("Oh, I don't have any numbers to count, so I'd better use a while-loop"). That's CRAP! It's broken thinking, and it encourages buggy programs.

      It all comes down to people teaching to the lowest common example [denominator], rather than actually exploring the concepts behind the language.
      --

      Do daemons dream of electric sleep()?
    3. Re:Nice idea, but by ctzan · · Score: 1

      for (a = fgets(file, line, sizeof(line); a && !ferror(file); a = fgets(file, line, sizeof(line))
      do_shit();

      your example is syntactically incorrect, and the order of arguments to fgets() is completely wrong.

      and that example of using a for(;;) loop gratuitously is crap anyway ...

    4. Re:Nice idea, but by msebast · · Score: 1

      In your last example the for loop repeats the same fgets command in two different places. This is redundant and confusing for future maintainers.
      And why are you checking ferror? fgets returns null at both eof and on error.
      (And as another poster pointed out you get the argument order on fgets wrong.)

      How about:

      while ( a = fgets(line, sizeof(line), file) ) {
          do_shit();
      }

    5. Re:Nice idea, but by multipartmixed · · Score: 1

      Your while loop is, indeed, superior in this example -- I was trying to find stuff in stdio -- which I seldom use -- for exemplar purposes... since the probability of you being familiar with the libs I *do* use verges on zero since they're closed and proprietary. :)

      Okay, I suppose I could have dug through APR (which I use quite a lot) for an example. I guess that final one wasn't such a good example. :?

      The point I'm trying to make, though -- is that people need to STOP thinking of the for-loop as a incrementer construct in C. It isn't. Its three contained expressions quite clearly expresses the key loop concepts -- initialization, check for invariant, propulsion step. An argument can easily be made that while is two special cases of for, but my last point and your response accidentally made that point. (Not that would advocate writing that -- but it is critical that a programmer be able to *READ* it without throwing an exception).

      This thread isn't about syntax of system libraries; it's about _understanding_ loops. Simple concepts? Yes. But how many errors have you seen in the real world which are a direct result of erroneous flow control? I'll bet you've seen plenty. Getting programmers to think CLEARLY about the three steps of the loop is paramount. Not rote. Not "oh the numbers get bigger, just like FOR N...NEXT N".

      This is undoubtedly why CS types teach inductive proofs. Wish I'd understood that 20 years ago, I might have been a happier student.

      --

      Do daemons dream of electric sleep()?
    6. Re:Nice idea, but by msebast · · Score: 1

      Oh, I agree with your main point.
      But you posted code snippets to Slashdot.
      And I just couldn't resist...

    7. Re:Nice idea, but by Short+Circuit · · Score: 1

      I created a page that lists all the similar sites that Slashdot users mentioned in their replies.

    8. Re:Nice idea, but by Axello · · Score: 1

      That's a neat gesture. Thanks!

  39. MODERATORS ON $2 CRACK! by Anonymous Coward · · Score: 0

    Sheesh!
    Parent is totally full of shit.
    First of all he misses the fact that there are *multiple* versions for C and C++ some of them *exactly* the way he would like to see them.
    And than he *completely* misses the point of the site. Its point is to show the *difference* between the languages. So the algorithms *are* supposed to be different. Of course you can use a functional language like an imperative one, but that's besides the point.

  40. To evaluate what language is best for a task... by Anonymous Coward · · Score: 0

    To evaluate what language is best for a task...or to learn new languages this is a great concept...er, I can't view the site, however...

  41. Heh, heh... A little translation needed here... by Master+of+Transhuman · · Score: 1

    Forbidden

    You don't have permission to access / on this server.

    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

    So much for THAT idea...courtesy of /.

    --
    Richard Steven Hack - This sig is TOO GODDAMN SHORT TO DO ANYTHING USEFUL WITH! MORONS!
    1. Re:Heh, heh... A little translation needed here... by Short+Circuit · · Score: 1

      Actually, Slashdot gave me a huge influx of contributing users. It's all I can do to keep up with the submissions; I'm faced with the task of building a group of people with an active interest in maintaining style and content quality.

      Plus, I was offered free hosting with unlimited bandwidth, and it's holding up. How can you beat that?

    2. Re:Heh, heh... A little translation needed here... by Master+of+Transhuman · · Score: 1


      I'll have to find a way to get my site /.'d...

      My site is only four pages, but I have 200GB of space (which grows by a few gig a week) and 2 terabytes of download limit (which also grows weekly) for $10/month. Shared box, though, so being /.'d would probably get me canned.

      --
      Richard Steven Hack - This sig is TOO GODDAMN SHORT TO DO ANYTHING USEFUL WITH! MORONS!
    3. Re:Heh, heh... A little translation needed here... by Short+Circuit · · Score: 1

      Your hosting provider probably isn't set up to handle that kind of load. The Slashdotting actually crashed the Dreamhost server Rosetta Code originally resided on. That's why people were getting 403 errors for a while; Dreamhost dropped the site.

    4. Re:Heh, heh... A little translation needed here... by Master+of+Transhuman · · Score: 1


      Yup - Dreamhost is my provider, so I'm not too surprised.

      They've had a lot of problems last year - which they now claim are over because they have one or two new data centers and are offloading some of their servers.

      Maybe not.

      I'd say a high-powered dedicated server (or two or three or more) are probably necessary for a /.'ing...

      --
      Richard Steven Hack - This sig is TOO GODDAMN SHORT TO DO ANYTHING USEFUL WITH! MORONS!
  42. Dumb idea by Kittenman · · Score: 0, Redundant
    IMHO. There are a range of spoken languages out there. Each one is best used by it's adherents and some devotees who usually speak another language, but chose the second language to make the point better. The French Voila, for example, has no English equivalent. I know a few other examples in Italian, and doubtless there are others in any other language you care to name.

    For computer languages, everyone has their own favourite - we just need a way to get one to talk to the other without any confusion. OO was the solution for this.

    This seems to be a solution for a problem that doesn't exist.

    --
    "The greatest lesson in life is to know that even fools are right sometimes" - Winston Churchill
  43. While you wait by CCFreak2K · · Score: 2, Informative

    for the site to come back, you can use this.

    --
    "Beware of he who would deny you access to information, for in his heart he dreams himself your master."
    1. Re:While you wait by Short+Circuit · · Score: 2, Funny

      That's actually the page that inspired the site.

  44. PHP at its finest by sproketboy · · Score: 1

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/mike/public_html/includes/Exception.php on line 139

    1. Re:PHP at its finest by Short+Circuit · · Score: 1

      This will hopefully be fixed soon. :-(

  45. Akima's infamous spline? by the_greywolf · · Score: 2, Interesting

    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!
  46. PLEAC by meiao · · Score: 2, Informative

    There is the PLEAC (Programming Language Examples Alike Cookbook) which uses (or should use) the same examples for many programming languages.

    Many languages are close to complete the provided examples.

    1. Re:PLEAC by Short+Circuit · · Score: 1

      I created a page that lists all the similar sites that Slashdot users mentioned in their replies.

  47. VSS abstracting between C# and VB.net by Miamicanes · · Score: 1

    I read somewhere that Microsoft actually has an internal version of SourceSafe that does, in fact, attempt to treat VB.net and C# as two different presentation layers of the same underlying code, and allows you to work on a file using whichever of the two languages you prefer. In other words, two developers can check out the "same" code from the repository -- one, as VB.net, the other, as C#. If #1 commits changes, VSS semi-compiles it to intermediate code and treats the VB.net code as nothing more than a presentation layer. When #2 updates his copy, it decompiles the code on the server to C# and updates HIS copy.

    Unfortunately, Microsoft discovered that it's a lot easier to describe on paper than do in real-life, because the devil's in the details. Apparently, the system had to make changes to code at commit time (officially, things like formatting), and those changes botched things up *just* enough to destroy its users' confidence in the system (in reality, it unnerved developers 99% of the time, and really screwed something up about .1%, but the combo was lethal anyway). That, and the fact that VSS is kind of brittle to begin with & likely to be replaced by something else as soon as Microsoft can figure out what to replace it with...

  48. I've got a Rosetta Stone I use for programming... by chuckgrosvenor · · Score: 1

    This idea makes sense, (even if the site sounds like it's empty and poorly designed), but only if you are comparing similar languages. For web scripting, I learned PERL first, and recently made the switch over to PHP for most of my new website stuff. Due to the old stuff still needing periodic work, I'm constantly going back and forth between the languages, and a cheat sheet showing me the syntax diffrences and basic fundamentals is invaluable for me.

    Even if this site was fully fleshed out, you would still never get past the initial learning curve of a new language with just a list of ways to do all the particular tasks. It would be useful while learning it, but you still have to learn the new language.

  49. CodeCodex by sleepingsquirrel · · Score: 1

    While I haven't been able to take a look at the Rosetta Stone project, it seems like it might be similar in spirit to the Code Codex.

    1. Re:CodeCodex by Short+Circuit · · Score: 1

      Wow. Eerily similar. I left a message on their Sysop's talk page mentioning my site, and asking for pointers on setting up infrastructure.

      I'm going to have to add a links page to RC.

    2. Re:CodeCodex by Short+Circuit · · Score: 1

      I created a page that lists all the similar sites that Slashdot users mentioned in their replies.

  50. Towers of Hanoi by joker784 · · Score: 0

    Another approach can be found on Amit Singhs site, where he has more than 100 implementations of Towers of Hanoi (in all kinds of languages etc): http://www.kernelthread.com/hanoi/

    1. Re:Towers of Hanoi by Short+Circuit · · Score: 1

      I created a page that lists all the similar sites that Slashdot users mentioned in their replies.

  51. The real attraction by Evil+Pete · · Score: 1

    The real attraction of 99 Bottles of Beer ... and the reason it is so unhelpful if you just want to compare languages is that the examples often use exotic uses of the programming language in question. More a "lets use the weirdest way possible of writing this program that we can in the given language". So we see examples like, Java using no loops or ifs just throwing exceptions and printing stack traces to get the effect, or the C++ version doing it *all* in template meta-programming .... or my favourite the perl example (who said perl is hard to read?). Very amusing, but not a real comparison of languages .. as they are actually used.

    --
    Bitter and proud of it.
  52. Already done by dewolfe001 · · Score: 1

    I did a simple look-up of one of these waay back when: http://mike.dewolfe.bc.ca/rosettastone.asp

    1. Re:Already done by Short+Circuit · · Score: 1

      That's pretty cool, but it's not quite the same as Rosetta Code. You've got 18 simple tasks, and RC has 36. You've got 13 programming languages, while RC has 50. This is largely because RC is a wiki, while your site isn't community-expandable.

      I received lots of "This has been done before"-type responses, with the most similar site being Code Codex. I created a page on RC, linked off the navigation bar, listing all the sites Slashdotters mentioned.