[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Differences between Org-Mode and Hyperbole

From: Allen S. Rout
Subject: Re: Differences between Org-Mode and Hyperbole
Date: Fri, 1 Jul 2016 19:01:47 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0

On 07/01/2016 06:09 PM, Richard Stallman wrote:
>   > 3. Babel. I don't use this, but it's obviously a really, really powerful
>   >    feature that users cannot find elsewhere. [...]
> What is Babel?

Babel is a facility that lets a document author include pieces of code
in a document, which may be used either as their text ("Here is the code
I mean") or as their results. ("Here is the output of that code") or both.

Taking a recent example I used at work:  I was attempting to articulate
a system architecture.  I enjoy doing this in graphviz.  I created a
section of my document that was a dot input

#+BEGIN_SRC dot :file fedam.png :cmdline -Kdot -Tpng
digraph  fedam {
  // graph from left to right
  node [shape=box];
  edge [arrowhead=none,arrowtail=none];

and the babel facility of org took that 'dot document' which I had
written, and inserted the result of 'compiling' that source code.

If my goals had included demonstrating the features of graphviz, I could
have changed some of the declaration, and also displayed the dot source.

The result is analogous to:

LaTeX source file including an image.
dot source file in which the source for the image is recorded
Makefile recording the dependency between the files.

This is the use which is most relevant from the perspective of a
technical document author, but babel goes further:  it defines calling
conventions so that one can pass values from one code block to another.
  This enables one to write a code path which uses, for example from my
own history: PERL to preprocess; shell to fiddle with files; and R to
collate, analyze and generate graphics.

This is all in one document, with the ability to generate and retain
intermediate results if one so desires.

Many languages all trying to work together as one.  Babel.

There is nothing there that couldn't be written with a bunch of
compilers and a makefile.   But expressing them as a single,
literate-programming document is -profoundly- more accessible,
especially to folks who might not think of themselves as systems

This polyglot facility is an important reason that Org is very useful to
the 'reproducible research' folks.


- Allen S. Rout

reply via email to

[Prev in Thread] Current Thread [Next in Thread]