Slashdot Log In
Building a Programmer's Rosetta Stone
Journal written by Short Circuit (52384) and posted by
CmdrTaco
on Sun Jan 21, 2007 10:09 AM
from the still-waiting-for-programmer's-tower-of-babel dept.
from the still-waiting-for-programmer's-tower-of-babel dept.
Did you ever run into the problem where you knew how to do something in one programming language, but really needed to do it in another? That's what Rosetta Code is all about. A variety of programming tasks are solved using as many languages as possible. You can examine existing tasks, or create your own.
This discussion has been archived.
No new comments can be posted.
Building a Programmer's Rosetta Stone
|
Log In/Create an Account
| Top
| 215 comments
| Search Discussion
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
I don't know about firehosing it (Score:2)
(http://www.informationr.us/ | Last Journal: Monday November 05, @09:38AM)
Re:Pointless, don't bother! (Score:5, Insightful)
I made it through! (Score:2)
(http://slashdot.org/~Shadow%20Wrought/journal | Last Journal: Wednesday November 07, @02:46PM)
Erm... (Score:2)
No Fair! (Score:5, Insightful)
Re:No Fair! (Score:5, Informative)
(http://shortcircuit.us/ | Last Journal: Sunday October 14, @02:01AM)
Re:No Fair! (Score:5, Funny)
http://en.wikipedia.org/wiki/Malbolge_programming
I hope next windows ver will be coded in Malbolge and open source.
Here's better (Score:2)
There are also programs that can be compiled or run by several different compilers/interpreters: [nyx.net]
Re:Here's better (Score:4, Interesting)
It may prove useful. (Score:4, Interesting)
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.
Re:It may prove useful. (Score:5, Insightful)
(http://www.monkeyengines.co.uk/)
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.
Re:It may prove useful. (Score:5, Insightful)
(http://www.monkeyengines.co.uk/)
Usage (Score:5, Insightful)
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.
Re:Usage (Score:4, Insightful)
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.
if you like this... (Score:4, Informative)
(http://www.taybin.com/)
Re:if you like this... (Score:4, Informative)
(http://jedidiah.stuff.gen.nz/wp/ | Last Journal: Wednesday April 04 2007, @02:51PM)
One task that isn't on there (Score:5, Funny)
(http://slashdot.org???? | Last Journal: Saturday August 12 2006, @03:06AM)
Should I be impressed? (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 [rosettacode.org] (no C/C++/Java) and that bash scripts (usually) start with #!/bin/bash [rosettacode.org]. Oh, please. Should I be impressed?
Been Done (Score:3, Informative)
(http://slashdot.org/journal.pl?op=list&uid=911325 | Last Journal: Saturday November 10, @12:25PM)
It's already been done. Planet Source Code [planetsourcecode.com] 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.
Re:Been Done (Score:4, Informative)
(http://www.hiveminds.org/)
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.)
Will they support these programming styles ?!? (Score:3, Funny)
Don't see much use (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?Couldn't find it... (Score:2)
(http://omnipelagos.com/)
New? (Score:2, Interesting)
Anyway, I'm looking forward to when it's filled with code from different languages.
PS: an applet or an IDE plug-in like those from Koders [koders.com] would be really cool.
Simple Tasks - Not Progamming Wars (Score:1)
How may ways do *you* know to solve the "Hello World" problem?
I've Been Working on This (Score:1)
(http://inglorion.net/ | Last Journal: Thursday October 06 2005, @07:17AM)
Some of what I made is up on http://inglorion.net/documents/plcomparison/ [inglorion.net]. 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.
maintainability (Score:1)
Right tool for the job (Score:2)
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.
Re:Right tool for the job (Score:5, Interesting)
>>>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),
In a more focused form (Score:4, Informative)
(http://slashdot.org/)
http://pleac.sourceforge.net/ [sourceforge.net]
This is the reason why software sucks (Score:1, Insightful)
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.
How about the shootout? (Score:2)
(http://ygingras.net/)
Software Rendering in Four Languages (Score:2)
(http://www.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.
I was working on something exactly like this... (Score:1)
(http://www.optimize.net/)
I wanted it to literally do things in "real-time" too.
My mind wandered though, so I mostly use it to do
HELLO WORLD examples (you can use the drop-down menu to change languages):
http://www.scriptnexus.com/code/all/hello/text [scriptnexus.com]
Syntax Across Languages (Score:2)
http://merd.sourceforge.net/pixel/language-study/
But... (Score:3, Insightful)
(http://www.usermode.org/ | Last Journal: Tuesday April 17 2007, @09:13PM)
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!
Nice idea, but (Score:1)
For example:
for loop
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?
Heh, heh... A little translation needed here... (Score:2)
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
While you wait (Score:2, Informative)
(http://12.183.160.165/~ccfreak2k/index.html | Last Journal: Tuesday October 03 2006, @12:11PM)
PHP at its finest (Score:1)
Akima's infamous spline? (Score:3, Interesting)
(http://the-junkyard.net/)
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?"
PLEAC (Score:2, Informative)
(http://meiao.multiply.com/)
Many languages are close to complete the provided examples.
VSS abstracting between C# and VB.net (Score:2)
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
I've got a Rosetta Stone I use for programming... (Score:2)
(http://www.chuckyg.com/)
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.
CodeCodex (Score:2)
(http://sleepingsquirrel.org/ | Last Journal: Friday July 15 2005, @05:07PM)
Already done (Score:1)
Re:Great! It as close as you can come... (Score:2)
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.
Re:minus 4, T8oll) (Score:2, Informative)
(http://shortcircuit.us/ | Last Journal: Sunday October 14, @02:01AM)
Re:Not a Bad Idea (Score:1)
(http://shortcircuit.us/ | Last Journal: Sunday October 14, @02:01AM)
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.)
Re:Internal Server Error? A true Rosetta error (Score:2)
It's called The Slashdot Effect [wikipedia.org], and it happens from time to time. Try again later.
Re:Internal Server Error? A true Rosetta error (Score:1)
(Last Journal: Wednesday August 14 2002, @12:33PM)
Re:Towers of Hanoi (Score:1)
(http://shortcircuit.us/ | Last Journal: Sunday October 14, @02:01AM)