From metawilm at gmail.com Tue Apr 1 21:31:44 2008 From: metawilm at gmail.com (Willem Broekema) Date: Tue, 1 Apr 2008 23:31:44 +0200 Subject: [clpython-devel] CLPython on LispWorks Message-ID: 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 at cvspublic.franz.com:/cvs-public login Password: cvspublic cvs -d :pserver:cvspublic at 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 From jsc at crispylogics.com Tue Apr 22 18:23:06 2008 From: jsc at crispylogics.com (Jochen Schmidt) Date: Tue, 22 Apr 2008 20:23:06 +0200 Subject: [clpython-devel] RE: CLPython on LispWorks Message-ID: <2457DDF4-3DDF-4E37-AF17-3217EA5C8614@crispylogics.com> 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 `#': SyntaxError: Parse error at line 1, at token `)'. Expected one of: `(' `identifier' `*' `**'. [Internal error # 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 at crispylogics.com http://www.crispylogics.com From metawilm at gmail.com Tue Apr 22 22:43:07 2008 From: metawilm at gmail.com (Willem Broekema) Date: Wed, 23 Apr 2008 00:43:07 +0200 Subject: [clpython-devel] Re: CLPython on LispWorks In-Reply-To: <2457DDF4-3DDF-4E37-AF17-3217EA5C8614@crispylogics.com> References: <2457DDF4-3DDF-4E37-AF17-3217EA5C8614@crispylogics.com> Message-ID: Jochen, thanks for the feedback! On Tue, Apr 22, 2008 at 8:23 PM, Jochen Schmidt 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