axiom-developer
[Top][All Lists]
Advanced

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

Re: [Axiom-developer] Value stack overflow bug


From: Ayal Pinkus
Subject: Re: [Axiom-developer] Value stack overflow bug
Date: Mon, 9 Jun 2003 01:40:16 +0200


Hi,

first off, a disclaimer: I am the maintainer of Yacas, a competing CAS ;-)




But if I were to even entertain such a huge job (which,
believe me, I'm not) I'd go the other way and grind it
all into common lisp syntax. The ability of a program to
read another program as data gives a "second order" power
that is hard in Axiom.


You mean that this is not possible in Axiom, i.e. programs
as data? This is not such a foreign idea in high level
languages any more. For example it is fundamental to
Python and other languages of that genre. You can even find
it in Maple's programming language.



You don't need to cast the source code into LISP syntax in
order to be able to read a program and manipulate it symbolically.
You can convert the code to internal format while reading (parsing) it.
We do that all the time with Yacas. Yacas code can be compiled, and
the compiler is written in Yacas script code, for instance.

Given an internal format that the interpreter understands (linked lists
perhaps even), the parser is simply responsible for converting it into
internal format. So you can define any syntax you like, and program
using that syntax. I haven't seen Axiom code yet, but it runs on top
of LISP, so I would imagine that is how it works in Axiom?

With Yacas we took the liberty of defining our own programming language,
which can be parsed by a simple operator grammar parser (similar to
what you have in Prolog). The internal structure is LISP however.

I agree that LISP is perhaps not the most pleasant syntax to
program in. You miss the opportunity of designing the programming
language specifically for the task at hand (building a CAS). LISP
does allow you to define your own language on top of it very easily.
I'd go that route in stead of using flat LISP syntax. LISP is a more natural
environment for defining your own programming language than say C++, I
believe. Being able to cast algorithms in a syntax that is more pleasant to read is important, from a maintainability perspective. It makes it easier for
other developers to start contributing, or to fix bugs.

But that is subjective, just an opinion.

On another note: I saw some of you will be at the Libre Software Meeting. Looking
forward to meeting you!

Ayal Pinkus










reply via email to

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