common-lisp-jupyter icon indicating copy to clipboard operation
common-lisp-jupyter copied to clipboard

"Simple Program Error" when evaluating any expression

Open AtheistApe opened this issue 3 years ago • 8 comments

I'm not sure if you can help with this but I'm hoping you can.

The kernel loads fine but when I evaluate even a simple expression like:

(+ 3 4)

I get:

SIMPLE-PROGRAM-ERROR: invalid number of arguments: 7

3: ((FLET "H1" :IN JUPYTER:EVALUATE-CODE) invalid number of arguments: 7) 4: (SB-KERNEL::%SIGNAL invalid number of arguments: 7) 5: (ERROR invalid number of arguments: 7) 6: (SB-INT:%PROGRAM-ERROR invalid number of arguments: ~S 7) 7: ("INVALID-ARG-COUNT-ERROR" 7) 8: (SB-KERNEL:INTERNAL-ERROR #.(SB-SYS:INT-SAP #X7FFFF476D980) #) 9: ("foreign function: call_into_lisp") 10: ("foreign function: funcall2") 11: ("foreign function: handle_trap") 12: ("foreign function: #x41AFC0") 13: (SB-C:COMPILE-IN-LEXENV (LAMBDA NIL (PROGN (+ 3 4))) #<NULL-LEXENV> NIL #<SOURCE-INFO {10057FE8F3}> 0 NIL NIL) 14: (JUPYTER/COMMON-LISP::EVAL-AND-PRINT (+ 3 4) 0 NIL) 15: ((:METHOD JUPYTER:EVALUATE-FORM (JUPYTER/COMMON-LISP:KERNEL T T T)) # #<FORM-TRACKING-STREAM for "file /tmp/DCBF53C4CE2247A6D08599DB8E9111FA-3876129106.lisp" {10057FF793}> CELL:3876129106.LISP.NEWEST NIL # #) 16: (JUPYTER/COMMON-LISP::REPL (+ 3 4) CELL:3876129106.LISP.NEWEST NIL) 17: ((:METHOD JUPYTER:EVALUATE-CODE (JUPYTER/COMMON-LISP:KERNEL T)) # (+ 3 4) CELL:3876129106.LISP.NEWEST NIL) 18: (JUPYTER::HANDLE-EXECUTE-REQUEST) 19: (JUPYTER::RUN-SHELL #<KERNEL {1003749D43}>) 20: ((LAMBDA NIL :IN BORDEAUX-THREADS::BINDING-DEFAULT-SPECIALS)) 21: ((FLET SB-UNIX::BODY :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE)) 22: ((FLET "WITHOUT-INTERRUPTS-BODY-4" :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE)) 23: ((FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE)) 24: ((FLET "WITHOUT-INTERRUPTS-BODY-1" :IN SB-THREAD::CALL-WITH-MUTEX)) 25: (SB-THREAD::CALL-WITH-MUTEX #<CLOSURE (FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE) {7FFFF476ED4B}> #<MUTEX "thread result lock" owner: #<SB-THREAD:THREAD "SHELL Thread" RUNNING {1004AC6163}>> NIL T NIL) 26: (SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE #<THREAD "SHELL Thread" RUNNING {1004AC6163}> NIL #<CLOSURE (LAMBDA NIL :IN BORDEAUX-THREADS::BINDING-DEFAULT-SPECIALS) {1004AC610B}> NIL) 27: ("foreign function: call_into_lisp") 28: ("foreign function: new_thread_trampoline")

AtheistApe avatar Nov 24 '21 04:11 AtheistApe

What version of SBCL do you have?

yitzchak avatar Nov 24 '21 11:11 yitzchak

Thanks for responding :-)

My SBCL is 1.4.5.debian

AtheistApe avatar Nov 26 '21 21:11 AtheistApe

Not sure if that is the issue, but you should probably upgrade SBCL since v1.4.5 is over two years old.

yitzchak avatar Nov 26 '21 22:11 yitzchak

If you are on Debian Bullseye I have binaries for v2.1.6 if you can't find them elsewhere.

https://github.com/yitzchak/mpr/releases/tag/sbcl_2.1.6-1

yitzchak avatar Nov 26 '21 23:11 yitzchak

Thanks for the suggestions, unfortunately my OS is Linux Mint 19.2 (based on Ubuntu 18.04 bionic) and this, evidently, doesn't support SBCL beyond v1.4.5... sigh. So I'm not sure I'll be able to get the common lisp jupyter kernel to work.

AtheistApe avatar Nov 29 '21 02:11 AtheistApe

Can you not upgrade the OS? Just curious.

As a last resort you could bootstrap current SBCL.

yitzchak avatar Nov 29 '21 12:11 yitzchak

I've tried upgrading my installation on several occasions in the past and it always left my system unstable. I would have to do a clean install and that would entail a lot of work to get my system back to where it is now; not something I'm willing to do at this point.

What do you mean by "bootstrap current SBCL"?

AtheistApe avatar Nov 29 '21 17:11 AtheistApe

SBCL is built by bootstrapping on top of another CL implementation. It is a derivative of CMUCL which had to be bootstrapped on itself. SBCL can be bootstrapped on just about any CL implementation.

http://sbcl.org/getting.html#compile

As an aside I used to use the Debian/Ubuntu distributions and eventually migrated to Arch. It requires a bit more expertise to maintain, but rolling releases like Arch (there are others) are easier for long term usage since you never have large upgrades. Just my two cents.

yitzchak avatar Nov 29 '21 17:11 yitzchak