Building a Programmer's Rosetta Stone 215
Did you ever run into the problem where you knew how to do something in one programming language, but really needed to do it in another? That's what Rosetta Code is all about. A variety of programming tasks are solved using as many languages as possible. You can examine existing tasks, or create your own.
I don't know about firehosing it (Score:2)
Re: (Score:1)
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.
Re: (Score:3, Informative)
Re: (Score:1)
Re: (Score:2)
Pointless, don't bother! (Score:3, Informative)
Might be worth posting somewhere once there's actual useful content, but just not now.
But the
Re:Pointless, don't bother! (Score:5, Insightful)
Re: (Score:2)
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.
Re: (Score:2)
Re: (Score:3, Insightful)
Whoops, my fault. Being a hater is easier.
Re: (Score:3, Insightful)
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.
Re: (Score:3, Funny)
Well, that would be pushing the limits of the MySQL LARGETEXT field.
Re: (Score:3, Interesting)
And in the 2000's, it's well on the way to triumphing over common sense... with apologies to the author.
Re: (Score:2)
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.
I made it through! (Score:2)
Re: (Score:2)
Intro Page [mirrordot.org]
Known Algorithms [mirrordot.org]
Guidelines for submitting algorithms [mirrordot.org]
Erm... (Score:2)
Re: (Score:1)
Re: (Score:3, Informative)
No Fair! (Score:5, Insightful)
Re: (Score:2)
That's what google or a good book are for. Even (bleh!) design patterns.
Or programs that convert from one source language to another ...
Re:No Fair! (Score:5, Informative)
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.
Re: (Score:3, Funny)
You mean it's not?
Re: (Score:3, Funny)
If something's written in malbolge, I don't think it really matters if it's open source.
Re: (Score:2)
The object code is the open source. Well ... more readable.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
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 lik
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)
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: (Score:2)
Just out of curiosity, why not? And what would you suggest instead?
Re:It may prove useful. (Score:5, Insightful)
Re: (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
Re: (Score:2)
Re: (Score:2)
Re: (Score:3, Insightful)
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
Re: (Score:2)
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];
Interesti
Re: (Score:2)
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: (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. [rosettacode.org]
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 t
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.
Re: (Score:2)
if you like this... (Score:4, Informative)
Re: (Score:2, Informative)
Re:if you like this... (Score:4, Informative)
Re: (Score:3, Interesting)
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 langu
Re: (Score:2)
The real attraction (Score:2)
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 t
One task that isn't on there (Score:5, Funny)
Re: (Score:3, Funny)
Hooker::Transactional->get_last->rollback;
Dude, CPAN has EVERYTHING!
Re: (Score:2)
Re: (Score:3, 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.
Re: (Score:2, Funny)
The Perl language was designed with genetic programming in mind. Any random combination of characters is executable Perl.
Re: (Score:2)
O.J. is that you?
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?
Re: (Score:1)
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.
Re: (Score:3, Insightful)
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.
Re: (Score:2)
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 Go
Re: (Score:2)
Re: (Score:2)
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.
Been Done (Score:3, Informative)
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: (Score:2, Informative)
Re:Been Done (Score:4, Informative)
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)
Couldn't find it... (Score:2)
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.
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 c
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),
Re: (Score:2, Interesting)
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.
In a more focused form (Score:4, Informative)
http://pleac.sourceforge.net/ [sourceforge.net]
How about the shootout? (Score:2)
Software Rendering in Four Languages (Score:2)
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.
Syntax Across Languages (Score:2)
http://merd.sourceforge.net/pixel/language-study/
But... (Score:3, Insightful)
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!
Re: (Score:2)
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, especia
Re: (Score:2)
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.
Re: (Score:3, 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 knowle
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
Re: (Score:2)
I'll have to find a way to get my site
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
Re: (Score:2)
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
While you wait (Score:2, Informative)
Re: (Score:2, Funny)
Akima's infamous spline? (Score:3, 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?"
PLEAC (Score:2, Informative)
Many languages are close to complete the provided examples.
VSS abstracting between C# and VB.net (Score:2)
I've got a Rosetta Stone I use for programming... (Score:2)
Even if this site was fully fleshed out, you would stil
CodeCodex (Score:2)
Re: (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: (Score:2, Informative)
LiteratePrograms (Score:2, Interesting)
As one who has worked on a couple of multi-language problem sets (SICP in other programming languages [codepoetics.com] and OO Shapes [angelfire.com]), I can appreciate the amount of work it takes. We can always use more sites that teach programming in various unique fashions.
Re: (Score:2)
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:
Re: (Score:3, Funny)
In fact, K&R presents a complete Greet interpreter very early on.
Re: (Score:2)
It's called The Slashdot Effect [wikipedia.org], and it happens from time to time. Try again later.
Re: (Score:2)
Re: (Score:2)
I'll contact you by email.
Re: (Score:3, Informative)
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
Re: (Score:2)
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 increme