[clpython-devel] RE: CLPython on LispWorks

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

Jochen, thanks for the feedback! On Tue, Apr 22, 2008 at 8:23 PM, Jochen Schmidt <jsc@crispylogics.com> wrote:
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
Right, I submitted work in progress, sorry about that, and your solution was right.
2) Reader Problem in exceptions.lisp
Good catch, and you are right again: the eval-when for {Exception} is not even needed; removed now.
Again: CLPython is a really impressive bit of work! Thanks for sharing it with us.
Thanks for the feedback. You caught the code at a bad moment, but your fixes were completely right. The code I just submitted should be in public cvs in an hour. My plan is to release a 1.0 fairly soon based on the current code, but with better integration of Python modules and Lisp packages, and hopefully with support for CMUCL and/or SBCL. - Willem
participants (2)
-
Jochen Schmidt
-
Willem Broekema