[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] noweb syntax
From: |
Martin Rubey |
Subject: |
Re: [Axiom-developer] noweb syntax |
Date: |
14 Jul 2007 21:38:52 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
address@hidden writes:
> A) NOWEB ADVANTAGES
> 1) currently works
> 2) easily recognizable syntax
> 3) axiom noweb emacs mode recognizes syntax
> 4) current build machinery uses noweb
>
> B) NOWEB DISADVANTAGES
> 1) collides with user syntax, e.g. [[1,2],[3,4]] vs [[escapedstring]]
> 2) requires a weave step to get latex
> 3) noweb is not as widely known as latex
> 4) requires noweb
> 5) requires time during build
>
> C) LATEX ADVANTAGES
> 1) pure latex files, that is pamphlet == tex
> 2) latex users can use it immediately, without learning new syntax
> 3) emacs has a latex mode
> 4) pure latex is widely known
> 5) enables latex commands within \begin{chunk} environments
> 6) allows latex tools for chunks (auto-index, auto-table of contents)
but I do not want that LaTeX mode auto indents my SPAD or Aldor commands! The
indentation rules are different!
> 7) saves build time
> 8) removes need for noweb
>
> D) LATEX DISADVANTAGES
> 1) breaks axiom noweb emacs mode
> 2) requires rewrite of sources
> 3) breaks ALLPROSE? (I don't know)
4) requires more space, i.e., @ is shorter than \end{chunk}.
5) can it handle nested chunks?
This last point is especially important if you want to intersperse commands and
documentation, as I tend to. To my eyes, @ looks more or less like an empty
line. \end{chunk} requires another empty line, I feel.
Tim, I suggest that you make this change in a separate branch. We had this
discussion once, as you said, but already then there was disagreement. Ralf
pointed out some of the difficulties back then, but I cannot find a reply of
yours:
http://lists.nongnu.org/archive/html/axiom-developer/2006-09/msg00250.html
(By the way, could you please copy the "references: " field when you reply to
mail. I find it hard to find out what mail you are replying to.)
So, how would the following code read in gclweb?
<<implementation: Compose>>=
structures(s: SetSpecies L): Generator % == generate {
for pi in structures(s)$Partition(L) repeat {
<<Yield elements of $F[\pi]\times\prod_{p\in\pi} {G[p]}$>>
}
}
@
some more documentation here...
<<Yield elements of $F[\pi]\times\prod_{p\in\pi} {G[p]}$>>=
import from MachineInteger, Partition L;
arrlist: Array List L := pi::Array List L;
for f in structures(pi::SetSpecies(SetSpecies L))$F(SetSpecies L) repeat {
for p in structures(0, arrlist) repeat yield per [pi, f, p];
}
@
Martin