axiom-developer
[Top][All Lists]

## RE: [Axiom-developer] Test of a WEB style

 From: C Y Subject: RE: [Axiom-developer] Test of a WEB style Date: Fri, 4 May 2007 10:41:51 -0700 (PDT)

--- Bill Page <address@hidden> wrote:

> But I *do* like the hyper-linking of the identifiers in the
> code that you also use extensively in Allprose. I think that
> this feature is very important and should not be omitted
> simply because some people are motivated to replace noweb
> with something written in Lisp.

As I mentioned to Ralf, this can be done incrementally - use the full
power now with noweb, but fall back on simpler output if the tools are
not available.  I am not convinced of the workability of this approach
in general for lisp code - code may generate calls to other code chunks
and that won't be visible until expansion time or possibly even
runtime.  CMUCL's xref might be better in this respect, I'm not sure.
The SIMPLE approach - string matching inside chunks and looking for def
statements - can also be done inside Lisp.  If there is interest in
that feature it can be explored but it could not be safely concluded
that such a scan coming up negative is proof of no dependency.

> > I don't want to reprogram their ideas only because we
> > then use
> >
> >   \begin{chunk} .. \end{chunk}
> >
>
> I agree completely with Ralf on this. While I think the
> document you are creating as an example of the kind of target
> we want to create from literate program "pamphlet" source is
> great, I still do not really understand why you (Cliff and Tim)
> want to spend so much time re-inventing noweb in Lisp.

Because it reduces the dependency graph of Axiom, and also because it
is much simpler to implement deep integration of pamphlet handling if
that functionality is in Lisp.  I am not reprogramming simply to change
chunk style - I expect if that was all we wanted noweb would be able to
deal with it.  I want to be able to easily handle pamphlets from and in
the Lisp environment without requiring extra external programs, because
each external program means extra demands on system requirements
(compilers, etc.).

> noweb works and it's open source. That is good enough for me to
> justify it's use in Axiom.

Certainly.  Axiom wouldn't be where it is now without noweb, and I
don't oppose its use as long as it provides us unique benefits.  I want
to implement cl-web for the same reason I am interested in
cl-typesetting - the flexibility and ease of portability of the feature
stack being present in one language space and with one compiler
requirement.  Lisp is a great language for exploring.

> Why not just use it as is - even
> internally in Axiom? A commands such as
>
> (1)->  )compile mytest.pamphlet
> (1)->  )compile mytest.pamphlet )chunk 'NamedCode'
>
> could be easily made to first use SI::SYSTEM to call notangle
> to extract the root or the named code chunk from the pamphlet.

To me it's a matter of reducing the dependency tree.  I have no problem
with defining this as the "front line option" if it provides more
important features, but ultimately the more compilers we have to rely
on the more potential problems we introduce.  This may not be an
immediate practical problem but many years down the road who's to say
what we will have available on a wide cross-platform basis?  In the
VERY long term, having everything in one language is simpler and Lisp
has a very long history of being good for very interesting work.

> There is no need to write a new Lisp program for this.

It's a matter of convenience, and maybe a little bit of speed too - Tim
mentioned wanting to be able to quickly process pamphlets as part of
his writing/debugging cycle.

> I think it would be better incorporate as much of Ralf's
> Allprose methods as possible now without changing the
> underlying programs.

That's a fine place to start, and doesn't conflict with what is being
done here as far as I can tell.  My code for running notangle for
comparison purposes already does what you suggest in terms of calling
notangle, so that direction is certainly valid.  Getting that working
in GCL would actually be a lot simpler, in all probability.

ALLPROSE would also introduce the requirement of a working Perl
environment though - again, I would like to depend on as few external
tools as possible in order to keep portability as simple as possible.
For a Windows port using ALLPROSE we would need to get Lisp, C, and
Perl working on any Windows box we wanted to build on.

> In the longer term the current approach of web-style markup
> in LaTeX documents seems to primitive to me. Rather than
> spending resource on re-writing things in Lisp, we should be
> looking at more advanced literature programming tools like
> Leo. Of course this is an open source project and how you
> are motived to spend your time is up to you, but I thought
> I would just re-state (once again) more clearly my personal
> opinion on this.

I have yet to fully resolve the style of academic paper writing and
Leo's model, so I may just not be thinking about it clearly.  Anyway, I
see no reason that we can't use Ralf's markup style for Axiom right now
- we have pamphlets and we can simply treat all of the pamphlets in the
Axiom tree in the same fashion as he treated cl-web, with the addition
of a script to chop off the beginning and end blocks.

Personally, I would like to be able to deal with Axiom as a "typical"
Lisp program, which is one reason for pursuing cl-web.  SLIME,
sb-profile, hunchentoot, McCLIM, etc. are tools I would like to have
available for working with Axiom.  I can understand how this looks
silly to other people, but it is my preference.

Cheers,
CY

____________________________________________________________________________________
Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food & Drink Q&A.