Hello Willem,
I've tried to compile CLPython as you suggested in your message.
There were two problems I had to solve:
1) Incomplete Definition in core/csetup.lisp
The only Definition in this file was:
(defun py-raise (exc-type string &rest format-args)
"Raise a Python exception with given format string"
(if +exceptions-are-python-objects+
(error exc-type :args (cons string format-args)))
(error exc-type
I just closed the two open parens to get it compiling. If I understood
the code right - the incomplete part of this function would not get
taken by LispWorks anyways (because on LispWorks you did set
+exceptions-are-python-objects+ to T).
2) Reader Problem in exceptions.lisp
There are two definitions for {Exception}, depending on the value of
+exceptions-are-python-objects+. The decision which of the definitions
applies is done by a reader-conditional which is setup within the same
EVAL-WHEN like the definitions themselves; this means that the
definitions are already through the reader before you push :exceptions-
are-python-objects on *features*. The solution is to split the EVAL-
WHEN form into two: One to push :exceptions-are-python-objects on
*features* and the second one with the definitions of {Exception}.
Actually I think the {Exception}-Definition wouldn't have to be within
an EVAL-WHEN at all.
After this two points CLPython compiles through and it seems to run -
impressive!
I've run your test-suite and the only failure was this one:
Test failed: known failure: (CLPYTHON.PARSER:PARSE "def f(a=3,): pass")
Reason: detected an unexpected error of type `#<CLPYTHON::PY-TYPE
CLPYTHON.USER.BUILTIN.TYPE.EXCEPTION:|SyntaxError| 21A26D3B>':
SyntaxError: Parse error at line 1, at token `)'.
Expected one of: `(' `identifier' `*' `**'.
[Internal error #<YACC:YACC-PARSE-ERROR
200FC37F> caught due to CLPYTHON.PARSER::*CATCH-YACC-CONDITIONS*]
Which - as I understood the message - is a already known problem.
Again: CLPython is a really impressive bit of work! Thanks for sharing
it with us.
ciao,
Jochen Schmidt
--
Jochen Schmidt
CRISPYLOGICS
Julienstr. 1, 90419 Nuremberg
Fon +49 (0)911 517 999 82
Fax +49 (0)911 517 999 83
mailto:info@crispylogics.com
http://www.crispylogics.com
Dear list members,
In the last few days I made CLPython more portable, so that it now
runs on LispWorks too!
If you have LispWorks, please give it a try and let me know if you
encounter any problems. In particular I'd like to hear if the unit
test runs fine for you, too. Once that is verified, I'll update the
outdated web page with the new status, and call this "CLPython 1.0".
Please take these steps:
1. Download CLPython from CVS:
cvs -d :pserver:cvspublic@cvspublic.franz.com:/cvs-public login
Password: cvspublic
cvs -d :pserver:cvspublic@cvspublic.franz.com:/cvs-public checkout clpython
2. Download the test framework "ptester" (the portable version of
Allegro's "tester") from
http://files.b9.com/ptester/ptester-latest.tar.gz
and install that asdf system.
3. Load the :clpython asdf system: (asdf:operate 'asdf:load-op :clpython)
4. Run the CLPython unit tests: (asdf:operate 'asdf:test-op :clpython)
The unit test should finish with the message "Errors detected in this
test: 5" (which are 5 known issues) and several hundred test
successes.
Please let me know how this works for you.
Also, start up the Python REPL with (clpython:repl) and start typing :-)
Cheers,
- Willem