axiom-developer
[Top][All Lists]
Advanced

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

Re: [Axiom-developer] Desired functionality from noweb


From: C Y
Subject: Re: [Axiom-developer] Desired functionality from noweb
Date: Tue, 8 May 2007 10:20:20 -0700 (PDT)

--- Ralf Hemmecke <address@hidden> wrote:

> > I still think the most promising direction for the "read the source
> > code and find definitions and where they are used" is to use the
> > compiler to find that information - anything else just seems too
> > fragile.
> 
> Of course. But starting the compiler to get hyperlinks in the 
> documentation should be optional, because it would basically mean to 
> compile the code and add the symbol information to the documentation
> to get nice hyperlinks. The bad thing is if you want to document 
> what you currently have, but the code does not yet compile.

A good point.  Perhaps in default mode it could try to compile, and if
that fails fall back on basic tangle w/o the usage processing.


> The only problem is that with %def one can only do identifiers, but
> not semantic links. So I restrict that %def thing to type names.
> They are more or less unique in a project.

OK.

> >> Try
> >> %---BEGIN aaa.pamphlet
> >> <<*>>=
> >> <<X>>
> >> A
> >> @
> >> <<X>>=
> >> EFG
> >> @
> >> <<*>>=
> >> B
> >> @
> >> <<C>>=
> >> UVW
> >> @
> >> %---END aaa.pamphlet
> >>
> >> notangle aaa.pamphlet
> >> EFG
> >> A
> >> UVW
> >> B
> > 
> > Ugh.  I don't think this is a style of LP we should use.
> 
> Why not? Well, it was just an example, but I don't think that a 
> continued code junk is a terribly bad idea. I would only require that
> braces are paired within each chunk.

Non-unique root node definitions in a file will increase complexity. 
Ideally all code chunks in a program would have unique chunk names - at
the very least, anything part of a particular tangle operation should
have a unique name.  I expect to run tangle once per <<*>> defined, and
I expect one <<*>> per file (or "project" if you prefer.)  Perhaps
there are reasons not to do that but I'm not seeing it right now.

> You don't need to use this option of noweb. And again. I have not
> enough experience that I could already suggest a good LP style.

Neither do I.  I guess we can wait and see - nothing is set in stone.

>  > My preference
> > in the above situation would be to throw an error that chunk "X" is
> > already defined.
> 
> What? There is only one definition of X.

I beg your pardon - "*" not X.  I read it too fast.

> > For multiple "root" nodes in a file tangle the
> > requested node but print a note that chunks "foo" and "bar" in this
> > file are also root nodes.
> 
> There is always only one "root" node. And that is started by the
> first <<*>>= in a file.

So any other node being called <<*>> is just going to confuse the
issue, in my opinion.

> Hmm, seems that you confuse the way noweb (the program) treats a file
> with the way notangle/noweave treats the same file when giving no 
> additional command line switches.

That could be.

> > Probably.  I personally prefer not to have "hidden" root nodes in
> > files that the pamphlet name doesn't suggest,
> 
> I don't understand, what i "hidden root node" is.

Sorry - by that I mean a root node in a file that isn't intended to be
included in the tangled file implied by the pamphlet name.  An example
would be the lisp code included in the pamphlets for boot - if you look
at my runlisptangle file you'll see some examples where I have to
explicitly select the node.

> Personally I sometimes use
> 
> <<OLD: foo>>=
> some code
> @
> 
> <<foo>>=
> same code with a little modification
> @
> 
> I particularly find that useful to test some slight variations of the
> code I have without the need to remove the old code. Maybe that I
> will finally remove <<OLD: foo>>, since it is never used, but think
> about
> 
> <<ALTERNATIVE: foo>>=
> ...
> @
> 
> and a corresponding description when that should be used or what 
> idea behind that alternative is.

Maybe.  I guess I can see that, but my preference is to keep all code
in a program "live" in the sense of it's being intended for use.  I
think that's a stylistic difference.

It's less of an issue if it is never intended to be translated and
compiled.

> >> That line numbering in the .tex is *identical* to the .pamphlet
> >> file is needed for the inverse search feature.
> 
> LaTeX (or better srcltx.sty) only sees the .tex file. So it can only 
> write line numbers of the .tex file as \special into the .dvi file.
> If the line numbers differ from the .pamplet source, inverse search
> would jump to the wrong place.

OK.  Perhaps a way around that would be to pass the pamphlet line
number to the tex code for use in srcltx.sty (or some variation
thereof.)  Right now I don't see it being a problem.

> So you don't want to require something like axiom.sty? But then you
> put all the style information into your weave program. That doesn't
> sound like the right way to do.

I had sort of assumed we would settle on a particular style as the
"official" Axiom style, but maybe that's not a good assumption.

Cheers,
CY

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




reply via email to

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