Domain: literateprograms.org
Stories and comments across the archive that link to literateprograms.org.
Comments · 10
-
Re:Documentation? (Il)Literate Programming
See also here.
-
Literate Programming (was Re:I don't write com...)
::applause::
Some useful links for those who aren't familiar w/ it:
http://www.literateprogramming.com/
http://en.literateprograms.org/LiteratePrograms:Welcome
and best of all, Crowther's Colossal Cave Adventure as a literate programming novel translated by Donald Ervin Knuth:
http://www.literateprogramming.com/adventure.pdf
I've found literate programming to be invaluable for coding up infrequently touched systems which need updates from time-to-time.
William
-
It totally depends what you want to do.
Ruby is porn for programmers, but it's unsuitable when performance matters.
Python has a niche carved out handling mail, and is good for many other things.
Lua is a solid embedded language for games.
Java is (used to be?) the language of business software. Maybe it's C# these days?
R is fantastic for statistics mostly due to the available libraries.
Fortran is the language for physics, again due to the libraries.
PHP is kind of a watered-down, nothing-exceptional language, but it's nonetheless quite popular for web dev.
JavaScript is ubiquitous for client-side web, but it's also sometimes a good choice when you want a high-performance, security-conscious general purpose scripting language.
Kernels are written in C with few exceptions, and of course it's second only to assembly both in performance and annoyance, for related reasons.
Perl is a dead-end in my opinion, but it's not over yet; it will still be in common use for at least another decade.
Lisp gets an honorable mention for many niches.So choose what field you want to work in, then start boning up on the language they use there.
Also: cramming the syntax in a weekend doesn't make you a programmer of that language. You can write BASIC in any language, as the saying goes. The reason all these languages exist at all is because each has some feature that enables you to construct things in a radically different way from C. Some examples:
Ruby is pervasively OO (everything is an object, everything you do is a method) and highly functional (lambdas, etc).
Take a look at this: https://en.wikipedia.org/wiki/J_(programming_language) - the whole mindset is very different from what you're used to.
Then this: http://en.literateprograms.org/Quicksort_(Haskell)Etc.
-
Re:pi
Calculating pi with this method could be a way to test the overall accuracy of the process, but there are easier and cheaper methods to calculate pi
;)For example, http://en.literateprograms.org/Pi_with_Machin's_formula_(Python)
-
Re:Literate programming...Excuse my ignorance, but please explain how this this different (or superior) to doxygen or any of the many systems that do just this. I'm not meaning to be rude, I'm just asking. I think the prime difference is that literate programming allows you to re-order the code; that is, you include snippet of code within the documentation, and attach tage to the snippets that allow them to be reassembled in a different order. That doesn't sound like much, but it means that you can just write the documentation have code appear as i is relevenat to the documentation rather than having the program structure dictate things. Take a look at some examples (in various languages) to see what I mean. The key here is that documentation is (or should be) first and foremost in the writers mind, and it is the documentation that dictates presentation structure. This means that you are concentrating on writing the documentation, and will thus write it well, as opposed to concentrating on code, and adding documentation as an afterthought if you get around to it. Well, that's the principle at least.
-
Re:Literate programming...Excuse my ignorance, but please explain how this this different (or superior) to doxygen or any of the many systems that do just this. I'm not meaning to be rude, I'm just asking. I think the prime difference is that literate programming allows you to re-order the code; that is, you include snippet of code within the documentation, and attach tage to the snippets that allow them to be reassembled in a different order. That doesn't sound like much, but it means that you can just write the documentation have code appear as i is relevenat to the documentation rather than having the program structure dictate things. Take a look at some examples (in various languages) to see what I mean. The key here is that documentation is (or should be) first and foremost in the writers mind, and it is the documentation that dictates presentation structure. This means that you are concentrating on writing the documentation, and will thus write it well, as opposed to concentrating on code, and adding documentation as an afterthought if you get around to it. Well, that's the principle at least.
-
Re:Literate programming...Excuse my ignorance, but please explain how this this different (or superior) to doxygen or any of the many systems that do just this. I'm not meaning to be rude, I'm just asking. I think the prime difference is that literate programming allows you to re-order the code; that is, you include snippet of code within the documentation, and attach tage to the snippets that allow them to be reassembled in a different order. That doesn't sound like much, but it means that you can just write the documentation have code appear as i is relevenat to the documentation rather than having the program structure dictate things. Take a look at some examples (in various languages) to see what I mean. The key here is that documentation is (or should be) first and foremost in the writers mind, and it is the documentation that dictates presentation structure. This means that you are concentrating on writing the documentation, and will thus write it well, as opposed to concentrating on code, and adding documentation as an afterthought if you get around to it. Well, that's the principle at least.
-
Re:Should I be impressed?
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.
-
LiteratePrograms
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. -
Re:if you like this...
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.