Re: Knuth's literate programming "tangle" function in Clojure

2011-01-08 Thread Tim Daly
Sweet! Thanks for the pointer. It is a challenge to reverse-engineer someone else's code. It is even more challenging to understand how it relates to the algorithm and the idea. This will help a lot. Tim Daly On 1/8/2011 6:22 AM, Robert McIntyre wrote: You may find http://blog.higher-order.ne

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-08 Thread Robert McIntyre
You may find http://blog.higher-order.net/2009/02/01/understanding-clojures-persistentvector-implementation/ useful for a clear explanation of PersistentVectors. Maybe even get in touch with the guy for an addition to the book? Thanks for your work on a literate clojure. sincerely, --Robert McIn

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-06 Thread Ken Wesson
On Fri, Jan 7, 2011 at 12:07 AM, Tim Daly wrote: > Hmmm. I may have misunderstood your point. I thought you were suggesting > writing code that is not part of the distribution in order to get a > minimal running system and then working from that. If that is not what > you're suggesting then I'm co

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-06 Thread Tim Daly
On 1/6/2011 11:42 PM, Ken Wesson wrote: On Thu, Jan 6, 2011 at 11:05 PM, Tim Daly wrote: On 1/6/2011 9:15 PM, Ken Wesson wrote: And then of course the overarching purpose of Clojure itself isn't even given, let alone why it has sorted-map, and why it's an immutable sorted-map ... There is v

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-06 Thread Ken Wesson
On Thu, Jan 6, 2011 at 11:05 PM, Tim Daly wrote: > On 1/6/2011 9:15 PM, Ken Wesson wrote: >> And then of course the overarching purpose of Clojure itself isn't >> even given, let alone why it has sorted-map, and why it's an immutable >> sorted-map ... > > There is very little that needs to be said

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-06 Thread Tim Daly
On 1/6/2011 9:15 PM, Ken Wesson wrote: I've now had a quick look at this too. Aside from the grammatical and spelling nitty-gritty, there are some larger scale concerns, ones that unfortunately go to the heart of the entire "literate programming" concept. Namely, at the start it jumps very qu

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-06 Thread Ken Wesson
I've now had a quick look at this too. Aside from the grammatical and spelling nitty-gritty, there are some larger scale concerns, ones that unfortunately go to the heart of the entire "literate programming" concept. Namely, at the start it jumps very quickly into a red-black tree implementation

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-06 Thread Tim Daly
On 1/6/2011 12:07 PM, Michael Wood wrote: Hi On 6 January 2011 07:33, Tim Daly wrote: [...] Take a look at http://daly.axiom-developer.org/clojure.pdf I like it :) Some simple corrections: You have a typo on the front page: "Based on Version 1.3.0-alphs4" (alphs4 instead of alpha4). In

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-06 Thread Tim Daly
On 1/6/2011 11:16 AM, Eric Schulte wrote: Tim Daly writes: On 1/6/2011 12:03 AM, Eric Schulte wrote: Can you post examples of these? I'd love to see some other examples. Sure thing, check out this old version of a file which tangles out into the directory layout expected by lein. http://gi

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-06 Thread Michael Wood
Hi On 6 January 2011 07:33, Tim Daly wrote: [...] > Take a look at http://daly.axiom-developer.org/clojure.pdf I like it :) Some simple corrections: You have a typo on the front page: "Based on Version 1.3.0-alphs4" (alphs4 instead of alpha4). In the foreword, "This is a literate fork of Clo

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-06 Thread Eric Schulte
Tim Daly writes: > On 1/6/2011 12:03 AM, Eric Schulte wrote: >>> Can you post examples of these? I'd love to see some other examples. >> Sure thing, check out this old version of a file which tangles out into >> the directory layout expected by lein. >> http://gitweb.adaptive.cs.unm.edu/?p=asm.gi

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Tim Daly
On 1/6/2011 12:03 AM, Eric Schulte wrote: Can you post examples of these? I'd love to see some other examples. Sure thing, check out this old version of a file which tangles out into the directory layout expected by lein. http://gitweb.adaptive.cs.unm.edu/?p=asm.git;a=blob;f=asm.org;h=f043a8c8

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Eric Schulte
> Can you post examples of these? I'd love to see some other examples. Sure thing, check out this old version of a file which tangles out into the directory layout expected by lein. http://gitweb.adaptive.cs.unm.edu/?p=asm.git;a=blob;f=asm.org;h=f043a8c8b0a917f58b62bdeac4c0dca441b8e2cb;hb=HEAD Al

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Tim Daly
On 1/5/2011 11:19 PM, Eric Schulte wrote: Emacs org-mode, on the other hand, is a useful development technology but it really isn't literate programming. I would be interested to hear your thoughts as to why Org-mode is not a literate programming tool. I never said org-mode wasn't a 'literat

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Tim Daly
On 1/5/2011 11:18 PM, Eric Schulte wrote: Mark Engelberg writes: On Wed, Jan 5, 2011 at 4:44 PM, Eric Schulte wrote: For the most up-to-date and comprehensive documentation of using Org-mode to work with code blocks (e.g. Literate Programming or Reproducible Research) the online manual is

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Tim Daly
On 1/5/2011 10:58 PM, Seth wrote: Now that i think of it, it is mostly a fear of having decreased productivity in writing code that affected my statement that i liked the little files. Im used to, i suppose, developing code for a specific function in a file, being able to compile, goto line num

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Eric Schulte
>>> >>> Emacs org-mode, on the other hand, is a useful development >>> technology but it really isn't literate programming. >>> >> I would be interested to hear your thoughts as to why Org-mode is not a >> literate programming tool. > I never said org-mode wasn't a 'literate programming tool'. It i

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Eric Schulte
Mark Engelberg writes: > On Wed, Jan 5, 2011 at 4:44 PM, Eric Schulte wrote: >> For the most up-to-date and comprehensive documentation of using >> Org-mode to work with code blocks (e.g. Literate Programming or >> Reproducible Research) the online manual is also very useful. > > In literate pro

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Seth
Now that i think of it, it is mostly a fear of having decreased productivity in writing code that affected my statement that i liked the little files. Im used to, i suppose, developing code for a specific function in a file, being able to compile, goto line numbers where there are errors, send code

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Tim Daly
On 1/5/2011 10:20 PM, Ken Wesson wrote: On Wed, Jan 5, 2011 at 8:39 PM, Tim Daly wrote: On 1/5/2011 8:27 PM, Mark Engelberg wrote: On Wed, Jan 5, 2011 at 4:44 PM, Eric Schulte wrote: For the most up-to-date and comprehensive documentation of using Org-mode to work with code blocks (e.g. L

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Ken Wesson
On Wed, Jan 5, 2011 at 8:39 PM, Tim Daly wrote: > On 1/5/2011 8:27 PM, Mark Engelberg wrote: >> On Wed, Jan 5, 2011 at 4:44 PM, Eric Schulte >>  wrote: >>> >>> For the most up-to-date and comprehensive documentation of using >>> Org-mode to work with code blocks (e.g. Literate Programming or >>> R

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Tim Daly
On 1/5/2011 8:27 PM, Mark Engelberg wrote: On Wed, Jan 5, 2011 at 4:44 PM, Eric Schulte wrote: For the most up-to-date and comprehensive documentation of using Org-mode to work with code blocks (e.g. Literate Programming or Reproducible Research) the online manual is also very useful. In lit

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Mark Engelberg
On Wed, Jan 5, 2011 at 4:44 PM, Eric Schulte wrote: > For the most up-to-date and comprehensive documentation of using > Org-mode to work with code blocks (e.g. Literate Programming or > Reproducible Research) the online manual is also very useful. In literate programming org-mode, will Clojure c

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Tim Daly
On 1/5/2011 7:37 PM, Eric Schulte wrote: Hi Tim, I'm confused as to what parts of LP practice are not supported by Org-mode. Are you aware that Org-mode files can be exported to formats more suitable for publication and human consumption (e.g. woven). See http://orgmode.org/manual/Exporting.

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Eric Schulte
For the most up-to-date and comprehensive documentation of using Org-mode to work with code blocks (e.g. Literate Programming or Reproducible Research) the online manual is also very useful. http://orgmode.org/manual/Working-With-Source-Code.html also, for a good review of Org-mode's support for

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Eric Schulte
Hi Tim, I'm confused as to what parts of LP practice are not supported by Org-mode. Are you aware that Org-mode files can be exported to formats more suitable for publication and human consumption (e.g. woven). See http://orgmode.org/manual/Exporting.html Tim Daly writes: > I looked at org-m

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Eric Schulte
Hi, Seth writes: >>Just discovered org-mode myself --- does anyone know of guide to using >>it with clojure for a total newbie? > > I havent actually used it for clojure per se. I was just imagining how > it could be used. You have the ability to embed arbitrary code (from > many different langu

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Eric Schulte
Seth writes: > The literate programming is actually a contrib to org-mode. > http://orgmode.org/worg/org-contrib/babel/ > This has been moved out of contrib and into the Org-mode core, so with recent versions of Org-mode the code block "Literate Programming" and "Reproducible Research" support i

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Tim Daly
On 1/5/2011 9:27 AM, Seth wrote: Just discovered org-mode myself --- does anyone know of guide to using it with clojure for a total newbie? I havent actually used it for clojure per se. I was just imagining how it could be used. You have the ability to embed arbitrary code (from many different

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Seth
>Just discovered org-mode myself --- does anyone know of guide to using >it with clojure for a total newbie? I havent actually used it for clojure per se. I was just imagining how it could be used. You have the ability to embed arbitrary code (from many different languages). You can edit the code

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Seth
The literate programming is actually a contrib to org-mode. http://orgmode.org/worg/org-contrib/babel/ Ive actually used it to create my emacs.el, by having code in emacs.org and have init.el tangle out the emacs code. Of course i never documented anything and did it for the novelty of being able

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-04 Thread Tim Daly
The new version of Clojure in Small Pieces is up at: http://daly.axiom-developer.org/clojure.pdf http://daly.axiom-developer.org/clojure.pamphlet http://daly.axiom-developer.org/clojure.sty This version of the literate document contains a complete, working system. The steps for building it are

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-04 Thread Tim Daly
I looked at org-mode. Note that 'literate programming' involves writing literature for other people to read. The executable code is included as a 'reduction to practice' but the emphasis is on describing the ideas. Rich has some powerful ideas that he has reduced to running code. What we need to

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-04 Thread Tim Daly
I thought it was also but it appears to be used in place of string, which I thought was odd. I'll look again. Thanks for the answers. On 1/4/2011 11:38 AM, Robert McIntyre wrote: the #"" is a reader macro for regexes. hope that helps, --Robert McIntyre On Tue, Jan 4, 2011 at 11:18 AM, Tim Dal

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-04 Thread Robert McIntyre
the #"" is a reader macro for regexes. hope that helps, --Robert McIntyre On Tue, Jan 4, 2011 at 11:18 AM, Tim Daly wrote: >  The latest version of clojure.pamphlet can build Clojure > directly from the book. It dynamically builds the source > tree from the book, runs tests, creates the pdf, and

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-04 Thread Jeff Valk
On Tuesday, January 04, 2011 at 10:18 am, Tim Daly wrote: > I've run into a syntax for strings that I don't understand. > The string #"some string" is used in the test files. The > documentation on the reader does not list this as a possible > input case. What does it mean? It's reader syntax for

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-04 Thread Tim Daly
The latest version of clojure.pamphlet can build Clojure directly from the book. It dynamically builds the source tree from the book, runs tests, creates the pdf, and starts the REPL. At least in theory. I am stuck with running a couple tests. The only real change I've made to the sources is to

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-04 Thread Hubert Iwaniuk
I would say start here: http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-clojure.html Cheers, Hubert On Tue, Jan 4, 2011 at 4:12 PM, Robert McIntyre wrote: > Just discovered org-mode myself --- does anyone know of guide to using > it with clojure for a total newbie? > > sincerely, >

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-04 Thread Robert McIntyre
Just discovered org-mode myself --- does anyone know of guide to using it with clojure for a total newbie? sincerely, --Robert McIntyre On Tue, Jan 4, 2011 at 9:57 AM, Hubert Iwaniuk wrote: > Hi Seth, > > Yes I did play with org-mode + babel for clojure. > It works great :-) > Just make sure you

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-04 Thread Hubert Iwaniuk
Hi Seth, Yes I did play with org-mode + babel for clojure. It works great :-) Just make sure you are using latest and greatest of org-mode. Cheers, Hubert. On Tue, Jan 4, 2011 at 3:34 PM, Seth wrote: > have you guys checked out org-mode + babel for emacs? This would be an > excellent place to

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-04 Thread Seth
have you guys checked out org-mode + babel for emacs? This would be an excellent place to start to do literate programming. Interesting ideas ... maybe i will try this in my own code ... -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this

Re: Knuth's literate programming "tangle" function in Clojure

2010-12-26 Thread Tim Daly
On 12/26/2010 8:33 PM, Robert McIntyre wrote: That's really cool. I was _just reading_ your comments from 2006 at http://www.mail-archive.com/gardeners@lispniks.com/msg01006.html and wondering about how hard something like this would be to write. If possible, could you expand on how one might

Re: Knuth's literate programming "tangle" function in Clojure

2010-12-26 Thread Tim Daly
On 12/26/2010 9:56 PM, Praki Prakash wrote: Tim, This approach is very interesting. My choice of mode for LP has always been noweb-mode but it doesn't seem to work with my version of emacs anymore. My current approach is to embed prose and clojure code in a latex document and generate a .te

Re: Knuth's literate programming "tangle" function in Clojure

2010-12-26 Thread Praki Prakash
Tim, This approach is very interesting. My choice of mode for LP has always been noweb-mode but it doesn't seem to work with my version of emacs anymore. My current approach is to embed prose and clojure code in a latex document and generate a .tex file with formatted clojure code and .clj contain

Re: Knuth's literate programming "tangle" function in Clojure

2010-12-26 Thread Robert McIntyre
That's really cool. I was _just reading_ your comments from 2006 at http://www.mail-archive.com/gardeners@lispniks.com/msg01006.html and wondering about how hard something like this would be to write. If possible, could you expand on how one might use this in a development work-flow with emacs or

Knuth's literate programming "tangle" function in Clojure

2010-12-25 Thread Tim Daly
; 0 AUTHOR and LICENSE ; 1 ABSTRACT and USE CASES ; 2 THE LATEX SUPPORT CODE ; 3 IMPORTS ; 4 THE TANGLE COMMAND ; 5 SAY ; 6 READ-FILE ; 7 ISCHUNK ; 8 HASHCHUNKS ; 9 EXPAND ; 10 TANGLE ;;; 0 AUTHOR and LICENSE ;;