Open javi-s opened 3 years ago
This is probably because I had to stop using dbm-read
to support the debugger. @robert-dodier I'll do some digging to figure out if it fixable.
@yitzchak any extra information about this issue? I ran into it as well, with a somewhat recent version.
SIMPLE-STREAM-ERROR: #<SB-INT:FORM-TRACKING-STREAM for "file /tmp/3CC8000FCDC140F480FB26B7A3712409-2822582361.mac" {1005A4A5D3}> is not positionable
0: (SB-IMPL::TRACKING-STREAM-MISC #<FORM-TRACKING-STREAM for "file /tmp/3CC8000FCDC140F480FB26B7A3712409-2822582361.mac" {1005A4A5D3}> FILE-POSITION 0 NIL)
1: (FILE-POSITION #<FORM-TRACKING-STREAM for "file /tmp/3CC8000FCDC140F480FB26B7A3712409-2822582361.mac" {1005A4A5D3}> 0)
2: (MREAD-SYNERR ~A is not an infix operator #<unavailable &REST argument>)
3: ((LAMBDA (ORIG &REST ARGS) :IN "/home/tux2/.local/share/maxima-jupyter/local-projects/maxima-jupyter/src/overrides.lisp") #<FUNCTION MREAD-SYNERR {5214FECB}> ~A is not an infix operator $ERF)
4: ((LAMBDA (&REST MAXIMA-JUPYTER::ARGS) :IN "/tmp/3CC8000FCDC140F480FB26B7A3712409-898870744.mac") ~A is not an infix operator $ERF)
5: (LED-CALL %ERF ($ANY . ?))
6: (PARSE $ANY 0)
7: (MREAD-RAW #<FORM-TRACKING-STREAM for "file /tmp/3CC8000FCDC140F480FB26B7A3712409-2822582361.mac" {1005A4A5D3}> NIL)
8: (MREAD-RAW #<FORM-TRACKING-STREAM for "file /tmp/3CC8000FCDC140F480FB26B7A3712409-2822582361.mac" {1005A4A5D3}>)
9: (MAXIMA-JUPYTER::MY-MREAD #<FORM-TRACKING-STREAM for "file /tmp/3CC8000FCDC140F480FB26B7A3712409-2822582361.mac" {1005A4A5D3}>)
10: ((:METHOD JUPYTER:EVALUATE-FORM (MAXIMA-JUPYTER::KERNEL T T T)) #<KERNEL {10046212E3}> #<FORM-TRACKING-STREAM for "file /tmp/3CC8000FCDC140F480FB26B7A3712409-2822582361.mac" {1005A4A5D3}> CELL:2822582361.MAC.NEWEST NIL 1 0)
11: (JUPYTER/COMMON-LISP::REPL ?? erf ; CELL:2822582361.MAC.NEWEST NIL)
12: ((:METHOD JUPYTER:EVALUATE-CODE (JUPYTER/COMMON-LISP:KERNEL T)) #<unused argument> ?? erf ; CELL:2822582361.MAC.NEWEST NIL)
13: ((:METHOD JUPYTER:EVALUATE-CODE :AROUND (MAXIMA-JUPYTER::KERNEL T)) #<KERNEL {10046212E3}> ?? erf ; CELL:2822582361.MAC.NEWEST NIL)
14: (JUPYTER::HANDLE-EXECUTE-REQUEST)
15: (JUPYTER::RUN-SHELL #<KERNEL {10046212E3}>)
16: ((LAMBDA NIL :IN BORDEAUX-THREADS::BINDING-DEFAULT-SPECIALS))
17: ((FLET SB-UNIX::BODY :IN SB-THREAD::NEW-LISP-THREAD-TRAMPOLINE))
18: ((FLET "WITHOUT-INTERRUPTS-BODY-4" :IN SB-THREAD::NEW-LISP-THREAD-TRAMPOLINE))
19: ((FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::NEW-LISP-THREAD-TRAMPOLINE))
20: ((FLET "WITHOUT-INTERRUPTS-BODY-1" :IN SB-THREAD::CALL-WITH-MUTEX))
21: (SB-THREAD::CALL-WITH-MUTEX #<CLOSURE (FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::NEW-LISP-THREAD-TRAMPOLINE) {7F1A8B7F6D7B}> #<MUTEX "thread result lock" owner: #<SB-THREAD:THREAD "SHELL Thread" RUNNING {1005B8C1B3}>> NIL T NIL)
22: (SB-THREAD::NEW-LISP-THREAD-TRAMPOLINE #<THREAD "SHELL Thread" RUNNING {1005B8C1B3}> NIL #<CLOSURE (LAMBDA NIL :IN BORDEAUX-THREADS::BINDING-DEFAULT-SPECIALS) {1005B8C15B}> NIL)
23: ("foreign function: call_into_lisp")
24: ("foreign function: new_thread_trampoline")
with the following packages, SBCL 2.0.1-Debian (Ubuntu 20.04LTS), Maxima 5.46.0, Python 3.8.10, and Jupyter
jupyter core : 4.7.1
jupyter-notebook : 6.4.3
qtconsole : not installed
ipython : 7.27.0
ipykernel : 6.4.1
jupyter client : 7.0.2
jupyter lab : 3.1.11
nbconvert : 6.1.0
ipywidgets : 7.6.4
nbformat : 5.1.3
traitlets : 5.1.0
Thanks for the bug reports. Just to be clear, ??
and erf
have to be separated, otherwise it's one token. The error triggered by ?? erf
is actually "erf
, and the Lisp error about "stream not positionable" is occurring because Maxima is trying to get line number information for the syntax error message. (Yes, the whole business about seeking back to the start of the file and then counting lines is terrible.)
?
and ??
are handled by DBM-READ which calls MREAD, but, I think, maxima-jupyter is calling MREAD or MREAD-RAW directly. We might have to reimplement ?
and ??
somehow, if we can't call DBM-READ.
Hope this clarifies the situation somewhat. Thank you for your interest in maxima-jupyter.
@robert-dodier thank you for the clarification, and i'll take the chance to thank you for your work in maxima-jupyter. It's been an invaluable tool.
I built a Docker image of Maxima-Jupyter from GitHub, editing the
Dockerfile
to have pacman install help files.RUN sed -i '/^NoExtract.*usr\/share\/info/d' /etc/pacman.conf
I can use the
describe
function for help:But if I try to use a question mark abbreviation, I get a
SIMPLE-ERROR: parser: end of file while scanning expression
:If I use a space after the question mark abbreviation, I get a different error
SIMPLE-STREAM-ERROR: #<SB-INT:FORM-TRACKING-STREAM for "file /tmp/930680F198984DD13F52082FA89DA81F-366519187.mac" {10060F87B3}> is not positionable
:These are my jupyter and maxima versions: