On Tuesday, October 18, 2005 10:15 PM Camm Maguire wrote: > > Bill Page writes: > > > > In fact to take best advantage of this knowledge, perhaps we > > might seriously consider the possibility of writing "new Aldor" > > in a language like Ocaml. > > > > Can't believe this thread has come full circle like this! Wow.
Perhaps I should have written my previous comment with a ;) because in a sense I was only "half serious". The main point I wanted to emphasise was that writing a new compiler was a big and difficult job. The skills required to do it properly and according to modern practices require some familiarity with other modern advanced programming languages. One way to ensure this would be to write it in such a modern advanced programming language. > May I please suggest if this is ever of interest that we > consider using the ML that built atop GCL for many years and > appears quite close to doing so now? ML in GCL might be interesting in and of itself but I am not sure how it could be used to help build a new compiler for Aldor. Could ML in GCL be made to function something like BOOT in Axiom or is it purely interpreted? > Then everything stays in one image. Or at least we could > use it as the basis for a complete implementation in lisp. Aldor runs as a separate image but produces lisp as intermediate code which is then "compiled" by GCL in the same way as the lisp produced by SPAD. This makes integration with Axiom as a library compiler relatively easy. Perhaps ML in GCL could be made to do the same? According to the docs, Ocaml compiles to either to an architecuture independent "byte code" or to "machine code" on a particular hardware. I wonder if there is still some "lisp" in there somewhere? > > I still remain confused on a point though -- I thought there > was a reliable translator from aldor to spad and vice versa? There is only a tool for doing an initial conversion of SPAD into Aldor. Additional editing of the code is often necessary to get it to compile with Aldor. > Why do we need to reimplement an aldor compiler, rather than > provide spad with the missing abilities? > Right now, quite aside from some missing language features, I think that programmig in SPAD is a major pain compared to programming in Aldor. The output from the SPAD compiler is a largely uninterptable mess - unless you happen to know enough about Axiom internals. The SPAD error messages are close to meaningless - unless you know how SPAD translates high level statements into lisp. As I said earlier, my impression is that this is a tool that never got much beyond the prototype stage. The fact that so much useful and working library code was written using this compiler amazes me, except that one must remember that a lot of this library code was written by the same brillant people who were working on the compiler (or sitting close by :). I think Aldor on the other hand is clearly a working compiler that would meet most of the expectations of modern programmers. It seems to me that getting SPAD to this level, even without adding new featuers, would still be a major effort (but certainly worthwhile if we did not have Aldor). And the SPAD language itself is a rather ill-defined thing. Creating a rigorous definition of the language that was largely compatible with SPAD was one of the major things that the Aldor developers accomplished. But in the design of Aldor some the pecularities of SPAD were deliberately eliminated as being undesirable. This is what makes converting SPAD to Aldor less than completely automatic. Regards, Bill Page. _______________________________________________ Axiom-developer mailing list Axiom-developer@nongnu.org http://lists.nongnu.org/mailman/listinfo/axiom-developer