Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-29 Thread Ralf Hemmecke
I still see conceptual problems with "names". I can take one source code containing, say a local variable named X that compiles and runs properly, do a text substitution of X to Y (assumming that the variable Y does not aldready occur) to create an entirely new source code that compiles abd which

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-29 Thread Christian Aistleitner
Hello, Also if I did use named categories shouldn't I use the 'define' keyword since ultimately I will probably be interested in using the value of these categories in forming other domains? when sticking to the AUG, you are right. However, in real life, the Aldor Compiler does not seem to n

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-29 Thread Christian Aistleitner
Hello, I still see conceptual problems with "names". I can take one source code containing, say a local variable named X that compiles and runs properly, do a text substitution of X to Y (assumming that the variable Y does not aldready occur) to create an entirely new source code that compiles a

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-29 Thread Ralf Hemmecke
Unfortunately Aldor treats named categories differently than anonymous ones: "7.5 ... Note that Aldor is constructed so that a domain is only a member of a named category if it explicitly inherits from the category - not if it merely exports the same collection of (explicit) declarations." I t

non-constant constants was: Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-28 Thread Ralf Hemmecke
Hi Bill, I turned exports into a function, as you'd probably want to call it more than once. I don't understand the relevance of whether exports is a function or not. As a generator we can use it as often as we like. No? Try the following piece of code. ---BEGIN aaa14.as #include "aldor" #

RE: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-28 Thread Bill Page
Christian, On July 28, 2006 3:21 AM you wrote: >... > However, besides the parsing part, the extensions and all > the other issues, if it's the way you choose, let me help > you getting it to compile and run. The following piece of > code works: > ... > > Just as expected. What did I do to get

RE: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-28 Thread Bill Page
Christian, On July 28, 2006 3:21 AM you wrote: > Bill Page wrote: > > Does it really make sense that such a high level language > should care about the name that a particular programmer > assigned to one of it's objects? > > yes, there are lots of applications of reflection that do not > involv

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-28 Thread Christian Aistleitner
Hello, Does it really make sense that such a high level language should care about the name that a particular programmer assigned to one of it's objects? yes, there are lots of applications of reflection that do not involve debugging. So you should typically be able to get the names of thing

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-27 Thread Christian Aistleitner
Hello, On Thu, 27 Jul 2006 14:21:03 +0200, root <[EMAIL PROTECTED]> wrote: I agree, .asy or Foam is better than C or LISP, for what you are considering. But Ralf considered looking into the compiler sources. The discussion has now drifted towards "I do not need the sources; I simply compile to

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-27 Thread Ralf Hemmecke
| Right, I am not used to reflection. Is there a collection of nice | examples where reflection is a "must have"? It is hard to argue for "must have", because the only thing we need is a binary file editor :-) However, the way I see reflection uses in my own work is not too far from the examp

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-27 Thread Gabriel Dos Reis
Ralf Hemmecke <[EMAIL PROTECTED]> writes: [...] | > I agree that this is nothing "fancy". Actually, reflection is | > not really such a "fancy" concept at all, its just that we have | > got used to not having access to this sort of information in | > non lisp-based programming without first-order

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-27 Thread Ralf Hemmecke
Of course. But if you want to print out things you must be able to convert to something that you can put onto a screen. Yes you are right. In Axiom such output is a matter resolved by providing (almost) every domain with a coercion function to the OutputForm domain. Since in Axiom lisp underlie

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-27 Thread Gabriel Dos Reis
"Page, Bill" <[EMAIL PROTECTED]> writes: | Gaby, | | On Thursday, July 27, 2006 1:40 PM you wrote: | | > ... | > Bill Page writes: | > | > | It is very very easy for the compiler to generate self- | > | identifying type constants either all the time or as a | > | compile-time option. This can

RE: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-27 Thread Page, Bill
Gaby, On Thursday, July 27, 2006 1:40 PM you wrote: > ... > Bill Page writes: > > | It is very very easy for the compiler to generate self- > | identifying type constants either all the time or as a > | compile-time option. This can even been done in a simple > | pre-compilation step if necess

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-27 Thread Gabriel Dos Reis
"Page, Bill" <[EMAIL PROTECTED]> writes: [...] | > Unless, you have a way to implement this directly in | > the compiler. See Template Haskell (in GHC sources) for | > the kind of thing that is done. | > | | It is very very easy for the compiler to generate self- | identifying type constants e

RE: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-27 Thread Page, Bill
On July 27, 2006 12:44 PM Gaby wrote: > ... Basically, it boils down to manipulating things > symbolically and Lisp is very good at that. I do not see that reflection has anything specifically to do with symbolic manipulation. > Other languages can be used, but they are going to > mimic Lisp. W

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-27 Thread Gabriel Dos Reis
"Page, Bill" <[EMAIL PROTECTED]> writes: | I do not see any relevance of Lisp to the subject of reflection in Aldor. I suspect it comes from implementation experience. Basically, it boils down to manipulating things symbolically and Lisp is very good at that. Other languages can be used, but th

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-27 Thread Gabriel Dos Reis
"Page, Bill" <[EMAIL PROTECTED]> writes: | On Thursday, July 27, 2006 9:51 AM Tim Daly wrote: | > | > Reflection involves inspecting the internal details of a | > program. A reflection domain would be able to look into other | > domains for details. A reflection domain would export a set | > of m

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-27 Thread Gabriel Dos Reis
Ralf Hemmecke <[EMAIL PROTECTED]> writes: | > I might mention that the lisp output would be significantly easier | > to parse and maintain. | | Are you saying that aldor should not be translated to C or Fortran or | whatever other target there will be in the future? I'm not sure that is what is

RE: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-27 Thread Page, Bill
Ralf, On Thursday, July 27, 2006 11:26 AM you wrote: > > ... > > This example is a good one but I object to the use of > > String as a representation for the output of Reflection > > operators. > > Of course. But if you want to print out things you must be > able to convert to something that yo

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-27 Thread Ralf Hemmecke
with { s for s in describe$MyDom where MyDom2 has s } I would be amazed if this is working some day. Since everything in Aldor is first class, it should already work. ;-) Ralf ___ Axiom-developer mailing list Axiom-developer@nongnu.org http://list

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-27 Thread Ralf Hemmecke
#include "aldor" #include "aldorio" import from Reflection; l: List String := exports(PrimitiveType); stdout << l << newline; just prints something like list(=, ~=); This example is a good one but I object to the use of String as a representation for the output of Reflection operators. Of c

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-27 Thread Ralf Hemmecke
On 07/27/2006 03:50 PM, root wrote: > Ralf, > > Reflection involves inspecting the internal details of a program. > A reflection domain would be able to look into other domains for details. > A reflection domain would export a set of methods like fetchSignatures. > > So how would REFLECT get this

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-27 Thread root
> I think Tim is fixated on Lisp. I do not see any relevance > of Lisp to the subject of reflection in Aldor. > > Lisp is irrelevant to this. For that matter as Christian > Aistleitner pointed out in a recent email, so are the > actual internal details of Aldor such as FOAM, the contents > of the

RE: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-27 Thread Page, Bill
On Thursday, July 27, 2006 9:51 AM Tim Daly wrote: > > Reflection involves inspecting the internal details of a > program. A reflection domain would be able to look into other > domains for details. A reflection domain would export a set > of methods like fetchSignatures. > > So how would REFLECT

RE: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-27 Thread Page, Bill
On Thursday, July 27, 2006 9:10 AM Ralf Hemmecke wrote: > Tim Daly wrote: > > I might mention that the lisp output would be significantly > > easier to parse and maintain. > > Are you saying that aldor should not be translated to C or > Fortran or whatever other target there will be in the future

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-27 Thread root
Ralf, Reflection involves inspecting the internal details of a program. A reflection domain would be able to look into other domains for details. A reflection domain would export a set of methods like fetchSignatures. So how would REFLECT get this information? Well, in aldor you can ask the compi

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-27 Thread Ralf Hemmecke
I might mention that the lisp output would be significantly easier to parse and maintain. Are you saying that aldor should not be translated to C or Fortran or whatever other target there will be in the future? I have no access to the LISP output at runtime of my program. > Language manipula

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-27 Thread root
> I agree, .asy or Foam is better than C or LISP, for what you are > considering. But Ralf considered looking into the compiler sources. The > discussion has now drifted towards "I do not need the sources; I simply > compile to and get the required information by mysolf". > Thereby, I gues

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-27 Thread Christian Aistleitner
Hello, On Wed, 26 Jul 2006 17:36:34 +0200, Page, Bill <[EMAIL PROTECTED]> wrote: On Wednesday, July 26, 2006 10:35 AM Ralf Hemmecke wrote: ... I believe reflections are not too complicated once we know how the internal datastructures for domains are. (Yes, yes, we must look inside the compi

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-26 Thread Christian Aistleitner
Hello, Christian, I think that you should have said that reflection would be just perfect for your AldorUnit http://www.risc.uni-linz.ac.at/software/aldor/aldorunit You are right, reflection would be wonderfull for AldorUnit. However, that's not all I have int mind for reflection. For examp

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-26 Thread root
Can anyone consider writing up a good tutorial-style summary of this thread? Can you diagram the relationships? I think that the points made here would be very valuable when presented in an incremental, logical, tutorial fashion. t ___ Axiom-develope

RE: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-26 Thread Page, Bill
On Wednesday, July 26, 2006 10:35 AM Ralf Hemmecke wrote: > ... > I believe reflections are not too complicated once we know > how the internal datastructures for domains are. (Yes, yes, > we must look inside the compiler sources, or does anybody > already have a description of how domains are rep

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-26 Thread Gabriel Dos Reis
Ralf Hemmecke <[EMAIL PROTECTED]> writes: | On 07/26/2006 03:56 PM, root wrote: | > Ralf, Gaby, | | > If you generate lisp from Aldor and parse the result you will have | > complete reflection information. | | Well, you are always assuming that the target language is LISP. | The aldor compiler

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-26 Thread Ralf Hemmecke
On 07/26/2006 03:56 PM, root wrote: Ralf, Gaby, If you generate lisp from Aldor and parse the result you will have complete reflection information. Well, you are always assuming that the target language is LISP. The aldor compiler is able to target other languages, too. So I would prefer a s

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-26 Thread root
Ralf, Gaby, If you generate lisp from Aldor and parse the result you will have complete reflection information. This can be done dynamically by an aldor domain since you can invoke the compiler and get the result. A 'refection' domain could have functions to access all of the information available

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-26 Thread Ralf Hemmecke
On 07/26/2006 07:53 AM, Christian Aistleitner wrote: But perhaps "has" is not so weak. What other applications of reflection are there other then conditional ones? I do not know if you'd consider that to be reflection or not... I'd need a generator for all the fields of a domain. I'd need a w

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-25 Thread Christian Aistleitner
Hello, But perhaps "has" is not so weak. What other applications of reflection are there other then conditional ones? I do not know if you'd consider that to be reflection or not... I'd need a generator for all the fields of a domain. I'd need a way to determine the type of a field. I'd need a

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-25 Thread Gabriel Dos Reis
Jacques Carette <[EMAIL PROTECTED]> writes: | If you want a better experience with metaprogramming, I definitely | recommend MetaOCaml (http://www.metaocaml.org). Unlike Template | Haskell, it is fully typed; TH only types the result of the | generation, not the generator itself [though SimonPJ a

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-25 Thread Jacques Carette
If you want a better experience with metaprogramming, I definitely recommend MetaOCaml (http://www.metaocaml.org). Unlike Template Haskell, it is fully typed; TH only types the result of the generation, not the generator itself [though SimonPJ assures me they are working on that too]. Gabrie

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-24 Thread Christian Aistleitner
Hello, On Mon, 24 Jul 2006 17:05:18 +0200, Bill Page <[EMAIL PROTECTED]> wrote: On July 24, 2006 3:12 AM Christian Aistleitner wrote: On 07/21/2006 07:58 AM, Martin Rubey wrote: http://wiki.axiom-developer.org/SandBox7 I moved Martin's code to http://wiki.axiom-developer.org/SandBoxAldo

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-24 Thread Gabriel Dos Reis
"Bill Page" <[EMAIL PROTECTED]> writes: | Gaby, | | On July 24, 2006 9:41 PM you wrote: | > | > Bill Page writes: | > | ... | > | How would more general forms of reflection within Aldor help | > | to achieve this? | > | > Please, download Generic Haskell and do some experiment by | > yourself.

RE: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-24 Thread Bill Page
Gaby, On July 24, 2006 9:41 PM you wrote: > | > Bill Page writes: > | ... > | How would more general forms of reflection within Aldor help > | to achieve this? > > Please, download Generic Haskell and do some experiment by > yourself. Look at the resulting codes in each case. > I have the Cora

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-24 Thread Gabriel Dos Reis
"Bill Page" <[EMAIL PROTECTED]> writes: | On July 24, 2006 9:10 PM Gaby wrote: | > | > Bill Page writes: | > [...] | > | But perhaps "has" is not so weak. What other applications of | > | reflection are there other then conditional ones? | > | > Support for generic programming. | > | > http:/

RE: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-24 Thread Bill Page
On July 24, 2006 9:10 PM Gaby wrote: > > Bill Page writes: > [...] > | But perhaps "has" is not so weak. What other applications of > | reflection are there other then conditional ones? > > Support for generic programming. > > http://haskell.org/th/ > http://www.iai.uni-bonn.de/~loeh/Explori

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-24 Thread Gabriel Dos Reis
"Bill Page" <[EMAIL PROTECTED]> writes: [...] | But perhaps "has" is not so weak. What other applications of | reflection are there other then conditional ones? Support for generic programming. http://haskell.org/th/ http://www.iai.uni-bonn.de/~loeh/ExploringGH.pdf BTW, the deadline for L

RE: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-24 Thread Bill Page
On July 24, 2006 3:12 AM Christian Aistleitner wrote: > On 07/21/2006 07:58 AM, Martin Rubey wrote: >> >> I made yet another experiment (on SandBox7, no ssh here), >> and tested whether in the code below H would have SomeCat. >> It does not. B has,though. >> >> http://wiki.axiom-developer.org/Sand

Re: [Aldor-l] [Axiom-developer] Re: exports and constants

2006-07-24 Thread Christian Aistleitner
Hello, On Fri, 21 Jul 2006 13:48:47 +0200, Ralf Hemmecke <[EMAIL PROTECTED]> wrote: On 07/21/2006 07:58 AM, Martin Rubey wrote: Dear all, I made yet another experiment (on SandBox7, no ssh here), and tested whether in the code below H would have SomeCat. It does not. B has, though. http://w