[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] Re: Sources of the port of Axiom to SBCL/CMUCL/Clisp
From: |
Waldek Hebisch |
Subject: |
[Axiom-developer] Re: Sources of the port of Axiom to SBCL/CMUCL/Clisp |
Date: |
Sun, 25 Feb 2007 03:30:09 +0100 (CET) |
Gregory Vanuxem wrote:
> Here are the sources:
>
> http://perso.orange.fr/parabola/axiom-cl.tar.gz
>
Thanks, nice job.
> It is based on the work of Juergen Weiss available here:
>
> http://www.staff.uni-mainz.de/weiss/axiom_cmu.tgz
>
> (So you can easily diff these to know who did what)
>
> For the question of BPINAME, I have the same problem than you.
> When I read your code I was particularly interested in your
> implementation of this function. This function is
> implemented but further investigations are needed.
>
> For example the
>
> ((and (consp func) (eq (car func) 'lambda)) (second (third func)))
>
> is probably never used. Furthermore in boot code we can see several
> reference to compiled-function-p before using BPINAME, compiled-function-p
> is really implementation dependant so... I will work on this when time will
> permit.
>
I suspect that the use of compiled-function-p is bogus: Axiom probably
assumes that the function is either given by a lambda list or is
a compiled function. But it looks that such assumption was true in
the past, but now both compiled and interpreted functions are (represented
by) function objects. I think that the case you quote above just
tests for archaic representation of interpreted functions.
I hope that Lisp implementation that is capable of finding name of a function
object will return this name as a third value of function-lambda-expression.
However, I noticed that sbcl returns funny things for functions obtained
from lambda expresions so I added a little samity check. I wonder
how well such implementation works with other Lisps -- in principle
it may be quite portable.
> To compile it 'cd' to src/boot, edit the Makefile.(sbcl|clisp|cmu) and the
> Makefile.inc
> to change the variables defined if necessary (you'll have, for sure, to
> modify AXIOMROOT).
> Export the AXIOM environment variable so for example with SBCL :
>
> export AXIOM=/usr/local/axiom-cl/mnt/sbcl
>
> and use 'make -f Makdefile.sbcl' to build bootsys with SBCL.
>
> Do the same thing for src/interp and src/algebra.
>
> To use Axiom do not forget to export the environment variable AXIOM
> (this is necessary for the moment).
>
I had apply the following diff to build with sbcl 0.9.16. The first
hunks just corrects a typo, the second chunk is a quick hack around the
problem that sb-unix::unix-mkdir accepts only base-string, while we have
a string as an argument. I did not try building using sbcl 1.0, but
I did check that in sbcl 1.0 sb-unix::unix-mkdir works just with
strings, so probably 1.0 needs no workaround.
diff -u pp/axiom-cl/src/interp/Makefile.sbcl axiom-cl/src/interp/Makefile.sbcl
--- pp/axiom-cl/src/interp/Makefile.sbcl 2007-02-24 14:01:24.000000000
+0100
+++ axiom-cl/src/interp/Makefile.sbcl 2007-02-25 00:05:33.000000000 +0100
@@ -15,7 +15,7 @@
@ echo copy $@ from $<
@ cp -p $< $@
-${OUT_DEP}/proclaims.${lisp}: ${IN}/sbcl_proclaims.lisp
+${OUT_DEP}/proclaims.${LISP}: ${IN}/sbcl_proclaims.lisp
@ echo making $@ from $<
@ ln -s $< $@
diff -u pp/axiom-cl/src/interp/nlib.lisp axiom-cl/src/interp/nlib.lisp
--- pp/axiom-cl/src/interp/nlib.lisp 2007-02-24 13:52:50.000000000 +0100
+++ axiom-cl/src/interp/nlib.lisp 2007-02-25 00:27:08.000000000 +0100
@@ -248,7 +248,7 @@
#+(and :sbcl :unix)
(defun makedir (fname)
- (sb-unix::unix-mkdir (boot::interp-make-directory fname) #o755))
+ (sb-ext::run-program "/bin/mkdir" (list fname)))
#+:clisp
(defun makedir (fname)
--
Waldek Hebisch
address@hidden