On Fri, 2011-10-28 at 09:54 -0700, Mark Engelberg wrote:
> On Thu, Oct 27, 2011 at 10:58 AM, daly <d...@axiom-developer.org> wrote:
> >> Have there been any new developments on the literate programming /
> >> Clojure front, in terms of tools that leverage existing build tools,
> >> test suites, generating meaningful line numbers for stack traces and
> >> debugging?
> >>
> >
> > The question is ill-posed in sense that literate programming is not
> > a tool or technology but a change in mindset. To quote Knuth:
> 
> I think my question is legitimate.
> 
> To take an extreme example, if you tell me literate programming is
> great, but that I have to write out my programs by hand on paper and
> scan them into a computer, I'd laugh at you.  Why would I want to give
> up the convenience of typing in my programs via keyboard to do
> literate programming?
I'm not sure what tools you use for development. Straight emacs is
sufficient for my development. Emacs doesn't care what style is used
for development.

> 
> So I'd like an honest appraisal of the state of the art in literate
> programming of Clojure -- what tools and conveniences do I have to
> give up to do LP.  Do I have to give up things like meaningful line
> numbers when I get an error message?
> 

State of the art in literate programming in Clojure?

Hmmm. The pamphlet link is my only example of literate programming
related to Clojure. In order to develop you edit the pamphlet, type
"make" at a command line, and the world is rebuilt. Since the code is
extracted into the same source tree as it originally had, the line
numbers will be related to the file and line as before.

My development style involves changing about 10 lines of code or less
followed by a complete system rebuild and test cycle. Overlapping
rebuild and test is time for writing the literate explanations. 
Almost always, when something fails it is perfectly clear what lines
caused the error. When that isn't the case then a little "navel
debugging" (contemplating what might be wrong) is used. 

I don't use IDEs but I suppose it would be possible to write a
literate plugin of some kind that ignored things that were not in
code chunks. Line numbers could then be interpreted with respect
to the start of the chunk. Most IDEs allow plugins.

To your point, though, it is true that we may have reached a local
optimum of tool development for tiny files. It might be necessary
to move away from this peak in order to climb a different hill.
This would imply making things "worse" for development until the
tools adapt. Clojure moved off the local optimum of common lisp
and broke all my code-walking software, violated quite a few of my
assumptions, and invalidated my manuals but that isn't an argument
for abandoning Clojure.

You might feel that the current toolset is optimal and that
literate programming is not worth the time and effort.
De gustibus non disputandum. (There is no disputing taste).

A literate Clojure would only be of benefit to those who come after.
All it offers now is a lot of time and effort to communicate ideas
to people we will never meet. However the thing that draws people
to Clojure is the ideas, not the code.

We can debate it at length over beers at the Conj.

Tim Daly

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to