[clpython-devel] Re: CLPython on SBCL
Jason Nielsen
jdn at math.carleton.ca
Tue May 13 21:43:50 UTC 2008
On Tue, 13 May 2008, Willem Broekema wrote:
> On Tue, May 13, 2008 at 5:24 PM, Leonardo Varuzza <varuzza at gmail.com> wrote:
>
>> Nope, thing get little bit worst:
>>
>> Errors detected in this test: 98 UNEXPECTED: 94
>> Successes this test:601
>
>
> You get further than I do (on SBCL 1.0.10): compilation now succeeds (update
> in CVS), but SBCL crashes when attempting to create a Python function.
> Apparently you don't have this problem? If this issue is fixed in SBCL in
> the mean time, that would be great.
>
> By the way, the module handling is rewritten so that CMUCL does not complain
> about modification of literal objects anymore. But CMUCL ends with an
> illegal instruction when creating a Python function; that is shown below
> this SBCL backtrace.
>
> Things are still fine on Allegro and LispWorks.
>
> - Willem
>
> [SBCL 1.0.10]
> * (clpython::make-py-function :name "foo" :context-name "foo" :lambda
> (lambda () 42))
>
Well I can confirm that it now compiles and seems to run. I also get the
same message when running the tests. The following works using sbcl
1.0.16:
>>> foo(10)
; Evaluation aborted.
CLPYTHON> (repl)
[CLPython -- type `:q' to quit, `:help' for help]
>>> (defun foo (x) (+ x 10))
CLPYTHON.APP.REPL::FOO
>>> #'foo
#<FUNCTION CLPYTHON.APP.REPL::FOO>
>>> foo = _
; in: LAMBDA NIL
; (CLPYTHON.AST.NODE:|assign-stmt|
; (CLPYTHON.AST.NODE:|identifier-expr| CLPYTHON.USER::_)
; ((CLPYTHON.AST.NODE:|identifier-expr| CLPYTHON.USER::|foo|)))
; --> LET SETF LET* MULTIPLE-VALUE-BIND LET SETF LET* MULTIPLE-VALUE-BIND
; --> LET
; ==>
; (SB-KERNEL:%PUTHASH #:G2 #:G3 #:G5)
;
; caught WARNING:
; Destructive function SB-KERNEL:%PUTHASH called on constant data.
; See also:
; The ANSI Standard, Special Operator QUOTE
; The ANSI Standard, Section 3.2.2.3
;
; compilation unit finished
; caught 1 WARNING condition
#<function #<FUNCTION CLPYTHON.APP.REPL::FOO> {1003059CC9}>
>>> foo (20)
30
>>> a=[10, 20, 30]
; in: LAMBDA NIL
; (CLPYTHON.AST.NODE:|assign-stmt| (CLPYTHON.AST.NODE:|list-expr| (10
20 30))
; ((CLPYTHON.AST.NODE:|identifier-expr|
; CLPYTHON.USER::|a|)))
; --> LET SETF LET* MULTIPLE-VALUE-BIND LET SETF LET* MULTIPLE-VALUE-BIND
; --> LET
; ==>
; (SB-KERNEL:%PUTHASH #:G2 #:G3 #:G5)
;
; caught WARNING:
; Destructive function SB-KERNEL:%PUTHASH called on constant data.
; See also:
; The ANSI Standard, Special Operator QUOTE
; The ANSI Standard, Section 3.2.2.3
;
; compilation unit finished
; caught 1 WARNING condition
[10, 20, 30]
>>> a[1:]
[20, 30]
Cheers,
Jason
More information about the Clpython-devel
mailing list