If you ')read' in a FriCAS notebook src/input/bugs2008.input all is right
Bad things happen with bugs2009.input.
Hmmmm... right, but certainly, bugs2009.input was never intended to be
read by jfricas.
The [*] that appears in Jupyter does not necessarily mean that the
process runs indefinitely. It just indicates that jupyter did not get a
proper answer yet. This can either be because the FriCAS computation is
still running or there happens some error in the computation and FriCAS
stops and goes into the debugger and thus does not contact Jupyter to
tell that something went wrong.
The latter is the source of the problem with ")read bugs2009.input".
In order to see the FriCAS side I do not start the fricaskernel.py in
the default way, but rather edit it at the end.
Search for where you have installed jfricas.
You probably find it close to where jupyter is:
type jupyter
/home/hemmecke/HDD/hemmecke/software/virtualenv/jfricas/bin/jupyter
In my case it is
/home/hemmecke/HDD/hemmecke/software/virtualenv/jfricas/lib/python3.10/site-packages/jfricas
In this directory edit fricaskernels.py and comment out
## pid = Popen(['fricas','-eval',prereq,'-eval',start])
I usually use the last suggestion there:
pid = Popen(['gnome-terminal', '--title=jfricas', '--'] +
['fricas','-nosman','-eval',prereq,'-eval',start])
Make sure you have gnome-terminal installed. (I also tried other
terminal applications, but only was successful with gnome-terminal.)
Anyway, it starts the terminal and from there it starts fricas in
-nosman mode. The terminal contains basically exactly the fricas session
that you see inside FriCAS, only that usual output of FriCAS commands
are caught by jfricas and not shown in the terminal. However, in case of
an error (FriCAS jumps into the lisp debugger) you have a chance to look
at the terminal and clean things up outside of jupyter. From within
jfricas, I have no idea how to handle such fall-into-debugger errors.
BTW, when I )read bugs.input and afterwards (even with the [*] in that
cell) enter 1+1 into a new cell, I get some results back *and* also the
result 2.
Actually, I do not know how jfricas can contact the running fricas
session (and run additional commands) when FriCAS is in the debugger.
Anyway, if you have jupytext installed, you can open bugs2009.input as a
jupyter notebook and then execute the commands step by step via SHIFT-ENTER.
Ralf
--
You received this message because you are subscribed to the Google Groups "FriCAS -
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/b6a716bf-0d34-a696-2a36-90f4c9a2d9e1%40hemmecke.org.