Very interesting. I have been using Docco to document a project in JavaScript, and this is an interesting enhancement.
Embedding code in documentation was only half of Knuth's Web (Wow! This dates back to when the word 'web' had no other meaning in software). The part I don't see is the macro expansion that Knuth used. Is this implemented, or is the feeling that it is the wrong thing to use with modern languages? Also, does it apply markdown or multi markdown; the latter has support for math and footnotes, etc. I would guess it is configurable. Do you know if the screenshot in http://cl.ly/LxEu is of Sublime Text 2? If so, is a special package required, or are they using the CoffeeScript package? I know I could look all of this up, but I'm hoping you could save me some time. Also, the answers could be useful to others on this list. --Barry On Feb 25, 2013, at 11:03 AM, Owen Densmore <[email protected]> wrote: > (This may be a bit odd for some of us, but I wanted to pass on a novel > innovation) > > The latest release of coffeescript has a new Literate "mode": if you use the > extension .litcoffee it is also treated as markdown! This is a modern > extension to Knuth's Literate Programming: > http://www-cs-faculty.stanford.edu/~uno/lp.html > > This is likely brought about by the coffeescript docco documentation tool, > but now integrated into the coffeescript compiler. > > I've been imbedding markdown in agentscript for docco use once the project > "got real". You can see it here: > > http://htmlpreview.github.com/?https://raw.github.com/backspaces/agentscript/master/docs/model.html > I wasn't sure initially, but now am entirely sold on the approach. For one > thing it has been invaluable for discussing the project with other > programmers wishing to modify the code. > > The literate coffeescript announcement is here, with links showing the source > in various formats: > http://coffeescript.org/#literate > > As odd as it may seem, I recommend use of similar stunts in all languages > that support it. Knuth has quite a following in this area. The idea of > markdown comments certainly has a lot of traction. > > ( Now back to our scheduled .. er.. programming! :) > > -- Owen > Literate CoffeeScript > > Besides being used as an ordinary programming language, CoffeeScript may also > be written in "literate" mode. If you name your file with a .litcoffee > extension, you can write it as a Markdown document — a document that also > happens to be executable CoffeeScript code. The compiler will treat any > indented blocks (Markdown's way of indicating source code) as code, and > ignore the rest as comments. > > Just for kicks, a little bit of the compiler is currently implemented in this > fashion: See it as a document, raw, and properly highlighted in a text editor. > > I'm fairly excited about this direction for the language, and am looking > forward to writing (and more importantly, reading) more programs in this > style. As 1.5.0 is the first version of CoffeeScript that supports it, let us > know if you have any ideas for improving the feature. > > > > > > > ============================================================ > FRIAM Applied Complexity Group listserv > Meets Fridays 9a-11:30 at cafe at St. John's College > to unsubscribe http://redfish.com/mailman/listinfo/friam_redfish.com
============================================================ FRIAM Applied Complexity Group listserv Meets Fridays 9a-11:30 at cafe at St. John's College to unsubscribe http://redfish.com/mailman/listinfo/friam_redfish.com
