From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric H. Neilsen, Jr." Subject: Re: Re: Literate Programming with Org mode Date: Wed, 29 Jul 2009 17:16:10 -0500 Message-ID: <4A70CA2A.8040605@fnal.gov> References: <87my6ordhh.fsf@mundaneum.com> <1e5bcefd0907280946r7b2eb7b9lac80ddc813fa9809@mail.gmail.com> <874oswpmk1.fsf@mundaneum.com> <20090728215355.GA5609@issac.linlan> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7BIT Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MWHRa-0005rN-UY for emacs-orgmode@gnu.org; Wed, 29 Jul 2009 18:16:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MWHRV-0005qG-Ex for emacs-orgmode@gnu.org; Wed, 29 Jul 2009 18:16:18 -0400 Received: from [199.232.76.173] (port=39403 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWHRV-0005qB-At for emacs-orgmode@gnu.org; Wed, 29 Jul 2009 18:16:13 -0400 Received: from mailgw1.fnal.gov ([131.225.111.11]:35149) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MWHRU-0005cP-Tg for emacs-orgmode@gnu.org; Wed, 29 Jul 2009 18:16:13 -0400 Received: from mailav2.fnal.gov (mailav2.fnal.gov [131.225.111.20]) by mailgw1.fnal.gov (iPlanet Messaging Server 5.2 HotFix 2.06 (built Mar 28 2005)) with SMTP id <0KNK00575DTYLT@mailgw1.fnal.gov> for emacs-orgmode@gnu.org; Wed, 29 Jul 2009 17:16:11 -0500 (CDT) Received: from mailgw1.fnal.gov ([131.225.111.11]) by mailav2.fnal.gov (SAVSMTP 3.1.7.47) with SMTP id M2009072917161025595 for ; Wed, 29 Jul 2009 17:16:10 -0500 Received: from conversion-daemon.mailgw1.fnal.gov by mailgw1.fnal.gov (iPlanet Messaging Server 5.2 HotFix 2.06 (built Mar 28 2005)) id <0KNK00H01DLXU7@mailgw1.fnal.gov> (original mail from neilsen@fnal.gov) for emacs-orgmode@gnu.org; Wed, 29 Jul 2009 17:16:11 -0500 (CDT) Received: from sdsslnx33.fnal.gov (sdsslnx33.fnal.gov [131.225.7.7]) by mailgw1.fnal.gov (iPlanet Messaging Server 5.2 HotFix 2.06 (built Mar 28 2005)) with ESMTPSA id <0KNK002WYDUYA3@mailgw1.fnal.gov> for emacs-orgmode@gnu.org; Wed, 29 Jul 2009 17:16:11 -0500 (CDT) In-reply-to: <20090728215355.GA5609@issac.linlan> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Cc: emacs-orgmode@gnu.org Sam, sam kleinman wrote: ... > Here's a literate programing example: > > I talked with a statistician, programer and human rights violation > researcher, who wrote (with his team) reports of statistical studies > of data regarding possible genocide incidents. He wrote the LaTeX > documents which, within the text of the document, all values and > analysis' were called in and generated when LaTeX ran, so that as data > was collected, and the report was recompiled the analysis was > completed with the most up-to-date version of the data, and that the > production of the text was isolated from the collection of data, and > from the analysis of those figures. > > The stack itself, was comprised of Sweave > R for stats processing, > make, and a little bit of python for glue. I think. This is how it is often used in R (or S), and is compatible with the original idea, which is a little broader. The idea is to write a full software application by first writing a document about its design and implementation (in whatever organization is clearest for humans), but at a high enough level of detail that *all* code in *all* source files in the final application gets included somewhere in code snippets within the documentation. To compile your program, you run a program to "tangle" your text into C files, makefiles, or whatever is appropriate, and then compile that (with no additional editing). See http://www.literateprogramming.com/ Every time I have tried this, I have given up in frustration at the tools. I have put together some org code to do it, and have used it successfully for some small projects, but I am still pulling my hair out on being able to properly contribute it to org, and it would need to be reworked in light of other developments anyway. org-babel now has includes literate programming in it as well, but I have not yet experimented with it (but am very interested in trying). -Eric -- Eric H. Neilsen, Jr. http://home.fnal.gov/~neilsen