Re: [fricas-devel] FriCAS + jFriCAS

2022-05-04 Thread Ralf Hemmecke

On 04.05.22 18:32, Xav Blue wrote:

I didn't try JupyText yet but your FriCAS binaries work fine for me.
Some comments :
- I'm on Manjaro(ArchLinux) and libssl.so... are in
*/usr/lib *


Thanks for trying. I have now also added a section on 
http://hemmecke.org/fricas/dist/1.3.7/ that even removes the need for 
root permission when there is not libssl.so.1.0.0


The following works for Ubuntu 22.04 other people must probably adapt 
the "/usr/lib/..." path accordingly.


==
 If you have no sudo right do the following.

ln -s /usr/lib/x86_64-linux-gnu/libssl.so.3 $L/lib/libssl.so.1.0.0
sed -i "s|^export FRICAS\$|export 
FRICAS\nLD_LIBRARY_PATH=\"\$LD_LIBRARY_PATH:$L/lib\"\nexport 
LD_LIBRARY_PATH|" $L/bin/fricas
sed -i "s|^export FRICAS\$|export 
FRICAS\nLD_LIBRARY_PATH=\"\$LD_LIBRARY_PATH:$L/lib\"\nexport 
LD_LIBRARY_PATH|" $L/bin/efricas

==


- I think there's a typo in §3 of your instructions for " Install Jupyter
 and jFriCAS ." :
*cd $FDIR/jfricas>cd $FDIR/venv/jfricas*


Definitely not.

cd $FDIR/jfricas

goes to the git repository of jfricas. That is where the setup.py lies.

under $FDIR/venv/jfricas are the files that will be installed by pip3.

Jupytext is really cool, because it allows you to put your "notebooks" 
under git without all the clutter of the .ipynb format. And if you like 
the .ipynb, no problem, JupyText can synchronize .input and .ipynb 
files, i.e. you would see both formats on your disk with the "same" 
content, only that the .input format does not include the output. 
Jupytext even takes care when you have change the .input file in your 
text editor while you work in the .ipynb notebook. It will ask you to 
reload.



Anyway thank you very much for beeing able now to use FriCas with Jupyter !


You are welcome.

BTW, may I ask for what you use FriCAS?

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 fricas-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/99e39851-c42c-c40e-c562-6526beaa5444%40hemmecke.org.


Re: [fricas-devel] FriCAS + jFriCAS

2022-05-04 Thread Xav Blue
I didn't try JupyText yet but your FriCAS binaries work fine for me.
Some comments :
- I'm on Manjaro(ArchLinux) and libssl.so... are in 
*/usr/lib *
- I think there's a typo in §3 of your instructions for " Install Jupyter 
 and jFriCAS ." :
*cd $FDIR/jfricas>cd $FDIR/venv/jfricas*

Anyway thank you very much for beeing able now to use FriCas with Jupyter !
Xavier  (MrBlueXav)


-- 
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 fricas-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/5896e327-beaf-4eef-9887-a2dfc211cb2dn%40googlegroups.com.


Re: [fricas-devel] FriCAS + jFriCAS

2022-05-02 Thread Ralf Hemmecke

But nothing happens. I do not see anything in my browser. But I can
see that Jupyter is running if I enter
   http://localhost:/?token=c5c300794e7855ba2e9e1d32a372041518f27089419dcef2
in the browser. If I logout and then exit (control-C) the Jupyter
session in the terminal, then


Yes, that also puzzled me in the beginning. That problem should go away 
if you set


c.NotebookApp.use_redirect_file = False

in $HOME/.jupyter/jupyter_notebook_config.py (under the assumption that 
you describe the same problem that I saw in Ubuntu 22.04).



Maybe I still need the redirect line?  Should I add it manually or
should the sed script be modified a little?


Can you figure out why the sed script didn't work? There obviously can 
be bugs, since I only claim that it "works for me". ;-)



The actual problem is the jupytext line. What happened to
c.NotebookApp.contents_manager_class in your case? Obviously it points
to jupytext.


Yes. I see
--
c.NotebookApp.contents_manager_class = "jupytext.TextFileContentsManager"
--


Looks fine.


I see the following when I install
--
(jfricas) wspage@desktop:~$ pip3 install jupytext


Do you see a jupytext directory under
./fricas/venv/jfricas/lib/python3.6/site-packages
?


But running this command:

(jfricas) wspage@desktop:~$ jfricas $FDIR/foo.input


H... what actually ended up in the jfricas script?

You should see

=
source /home/wspage/fricas/venv/jfricas/bin/activate
jupyter notebook $1
=

I somehow have the suspicion that you have another jupyter installed and 
"jfricas" does not switch on the virtualenv under $HOME/fricas. I 
remember that I saw a similar output to what you reported and then 
realized that my paths were messed up and I even called the wrong 
jfricas (of course with differnt content).


Hope that helps.

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 fricas-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/a81be3bc-e8c8-0056-da26-d5909b7a653e%40hemmecke.org.


Re: [fricas-devel] FriCAS + jFriCAS

2022-05-02 Thread Bill Page
On Mon, 2 May 2022 at 15:28, Ralf Hemmecke  wrote:
>
> Hi Bill,
>
> thank you for your feedback.
>
> On 02.05.22 18:55, Bill Page wrote:
> > Ralf,
> >
> > Thanks for this. I tried your installation procedure on my "Linux Mint
> > 19.3 Tricia base: Ubuntu 18.04 bionic"  system and everything seemed
> > to work fine except the installation of JupyText.
> >
> > After performing the steps in
> >* (optional) Install JupyText
> > when I run
> >jfricas $FDIR/foo.input
> > or even just
> >jfricas
> > I get the error message:
> > [C 12:38:09.008 NotebookApp] Bad config encountered during initialization:
> > [C 12:38:09.008 NotebookApp] The 'contents_manager_class' trait of
> >  instance
> > must be a type, but 'jupytext.TextFileContentsManager' could not be
> > imported
> >
> > When I checked the config file:
> >xed $HOME/.jupyter/jupyter_notebook_config.py
> > I noticed that the installation command
> > --
> > 3. Make Jupytext available.
> >
> > sed -i 's|^# *c.NotebookApp.contents_manager_class
> > =.*|c.NotebookApp.contents_manager_class =
> > "jupytext.TextFileContentsManager"|;s|^#
> > *c.NotebookApp.use_redirect_file = .*|c.NotebookApp.use_redirect_file
> > = False|' $HOME/.jupyter/jupyter_notebook_config.py
> > --
> > failed to add the line
> >c.NotebookApp.use_redirect_file = False
> > presumably because the file did not previously contain any line like
> ># *c.NotebookApp.use_redirect_file = .*
>
> Oh... in your case jupyter_notebook_config.py was probably existing.

I do not know. I did not check first. Instead I just ran
  jupyter notebook --generate-config
It did not prompt for Overwrite [y/N]. But I just re-ran this and I
now get a prompt so maybe it did not exist before.

wspage@desktop:~$ FDIR=$HOME/fricas
wspage@desktop:~$ source $FDIR/venv/jfricas/bin/activate
(jfricas) wspage@desktop:~$ jupyter notebook --generate-config
Overwrite /home/wspage/.jupyter/jupyter_notebook_config.py with
default config? [y/N]y
Writing default config to: /home/wspage/.jupyter/jupyter_notebook_config.py
(jfricas) wspage@desktop:~$

After re-creating the config file I tried running

(jfricas) wspage@desktop:~$ jfricas $FDIR/foo.input
[I 15:39:56.185 NotebookApp] Serving notebooks from local directory:
/home/wspage/fricas
[I 15:39:56.185 NotebookApp] 0 active kernels
[I 15:39:56.185 NotebookApp] The Jupyter Notebook is running at:
[I 15:39:56.185 NotebookApp]
http://localhost:/?token=c5c300794e7855ba2e9e1d32a372041518f27089419dcef2
[I 15:39:56.185 NotebookApp] Use Control-C to stop this server and
shut down all kernels (twice to skip confirmation).
[C 15:39:56.186 NotebookApp]

Copy/paste this URL into your browser when you connect for the first time,
to login with a token:

http://localhost:/?token=c5c300794e7855ba2e9e1d32a372041518f27089419dcef2
Opening in existing browser session.
[I 15:39:56.407 NotebookApp] Accepting one-time-token-authenticated
connection from 127.0.0.1
[I 15:39:56.409 NotebookApp] 302 GET
/notebooks/foo.input?token=8e615b4584b8a40575df4f1e176fd07aec2bb0759a9678d1
(127.0.0.1) 2.81ms
[1923:1923:0100/00.497003:ERROR:sandbox_linux.cc(378)]
InitializeSandbox() called with multiple threads in process
gpu-process.
--

But nothing happens. I do not see anything in my browser. But I can
see that Jupyter is running if I enter
  http://localhost:/?token=c5c300794e7855ba2e9e1d32a372041518f27089419dcef2
in the browser. If I logout and then exit (control-C) the Jupyter
session in the terminal, then

The Jupyter Notebook is running at:
http://localhost:/?token=c5c300794e7855ba2e9e1d32a372041518f27089419dcef2
Shutdown this notebook server (y/[n])? y
[C 15:44:10.548 NotebookApp] Shutdown confirmed
[I 15:44:10.549 NotebookApp] Shutting down 0 kernels
(jfricas) wspage@desktop:~$ jfricas
[I 15:44:31.826 NotebookApp] Serving notebooks from local directory:
/home/wspage
[I 15:44:31.826 NotebookApp] 0 active kernels
[I 15:44:31.826 NotebookApp] The Jupyter Notebook is running at:
[I 15:44:31.826 NotebookApp]
http://localhost:/?token=ae4481782fec549879e4ac2ed811328753aa618b148768dc
[I 15:44:31.826 NotebookApp] Use Control-C to stop this server and
shut down all kernels (twice to skip confirmation).
[C 15:44:31.827 NotebookApp]

Copy/paste this URL into your browser when you connect for the first time,
to login with a token:

http://localhost:/?token=ae4481782fec549879e4ac2ed811328753aa618b148768dc
[I 15:44:32.036 NotebookApp] Accepting one-time-token-authenticated
connection from 127.0.0.1
Opening in existing browser session.
[2284:2284:0502/154432.061548:ERROR:broker_posix.cc(43)] Invalid node
channel message
[2279:2279:0100/00.128409:ERROR:sandbox_linux.cc(378)]
InitializeSandbox() called with multiple threads in process
gpu-process.
[2279:2279:0100/00.128700:ERROR:broker_posix.cc(43)] Invalid node
channel message
[W 15:44:32.331 NotebookApp] 404 GET
/static/components/moment/locale/en-ca.js?v=20220502154431 (127.0.0.1)
6.21ms 

Re: [fricas-devel] FriCAS + jFriCAS

2022-05-02 Thread Ralf Hemmecke

Hi Bill,

thank you for your feedback.

On 02.05.22 18:55, Bill Page wrote:

Ralf,

Thanks for this. I tried your installation procedure on my "Linux Mint
19.3 Tricia base: Ubuntu 18.04 bionic"  system and everything seemed
to work fine except the installation of JupyText.

After performing the steps in
   * (optional) Install JupyText
when I run
   jfricas $FDIR/foo.input
or even just
   jfricas
I get the error message:
[C 12:38:09.008 NotebookApp] Bad config encountered during initialization:
[C 12:38:09.008 NotebookApp] The 'contents_manager_class' trait of
 instance
must be a type, but 'jupytext.TextFileContentsManager' could not be
imported

When I checked the config file:
   xed $HOME/.jupyter/jupyter_notebook_config.py
I noticed that the installation command
--
3. Make Jupytext available.

sed -i 's|^# *c.NotebookApp.contents_manager_class
=.*|c.NotebookApp.contents_manager_class =
"jupytext.TextFileContentsManager"|;s|^#
*c.NotebookApp.use_redirect_file = .*|c.NotebookApp.use_redirect_file
= False|' $HOME/.jupyter/jupyter_notebook_config.py
--
failed to add the line
   c.NotebookApp.use_redirect_file = False
presumably because the file did not previously contain any line like
   # *c.NotebookApp.use_redirect_file = .*


Oh... in your case jupyter_notebook_config.py was probably existing.
However, this redirect line was for me only necessary in Ubuntu 22.04.
There when starting "jupyter notebook", firefox would open with a 
file://... URL and it would not redirect to the localhost URL where 
Jupyter is running.


The actual problem is the jupytext line. What happened to 
c.NotebookApp.contents_manager_class in your case? Obviously it points 
to jupytext. But then I can only guess that jupytext was not installed 
in the virtualenv ($HOME/fricas/venv).


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 fricas-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/a49f5774-072e-0392-9184-d9a2af19ba00%40hemmecke.org.


Re: [fricas-devel] FriCAS + jFriCAS

2022-05-02 Thread Ralf Hemmecke

I am currently recompiling the fricas binary with having

sudo apt remove libssl.1.0.0

But cannot remove libssl.1.1, because that is obviously needed on xubu 
18.04 for cl-hunchentoot.


Gosh... that gives (see below...).

It's obviously not that easy to distribute hunchentoot together with 
FriCAS and have it working on a lot of Linux Distros. :-(


Ralf

WARNING: System definition file 
#P"/usr/share/common-lisp/source/trivial-garbage/trivial-garbage.asd" 
contains definition for system "trivial-garbage-tests". Please only 
define "trivial-garbage" and secondary systems with a name starting with 
"trivial-garbage/" (e.g. "trivial-garbage/test") in that file.
ASDF could not load hunchentoot because Unable to load any of the 
alternatives:
   ("libssl.so.1.0.2" "libssl.so.1.0.1l" "libssl.so.1.0.1e" 
"libssl.so.1.0.1j"
"libssl.so.1.0.1" "libssl.so.1.0.0q" "libssl.so.1.0.0" 
"libssl.so.0.9.8ze"

"libssl.so.0.9.8" "libssl.so" "libssl.so.4" "libssl.so.10").

debugger invoked on a CFFI:LOAD-FOREIGN-LIBRARY-ERROR in thread
#:
  Unable to load any of the alternatives:
   ("libssl.so.1.0.2" "libssl.so.1.0.1l" "libssl.so.1.0.1e" 
"libssl.so.1.0.1j"
"libssl.so.1.0.1" "libssl.so.1.0.0q" "libssl.so.1.0.0" 
"libssl.so.0.9.8ze"

"libssl.so.0.9.8" "libssl.so" "libssl.so.4" "libssl.so.10")

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [RETRY] Try loading the foreign library again.
  1: [USE-VALUE] Use another library instead.
  2: [TRY-RECOMPILING  ] Recompile reload and try loading 
it again

  3: [RETRY] Retry
 loading FASL for #"cl+ssl" "src" "reload">.

  4: [ACCEPT   ] Continue, treating
 loading FASL for #"cl+ssl" "src" "reload">

 as having been successful.
  5: Retry ASDF operation.
  6: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after 
resetting the

 configuration.
  7: Retry ASDF operation.
  8: Retry ASDF operation after 
resetting the

 configuration.
  9: [ABORT] Exit debugger, returning to top level.

(CFFI::FL-ERROR "Unable to load any of the alternatives:~%   ~S" 
("libssl.so.1.0.2" "libssl.so.1.0.1l" "libssl.so.1.0.1e" 
"libssl.so.1.0.1j" "libssl.so.1.0.1" "libssl.so.1.0.0q" 
"libssl.so.1.0.0" "libssl.so.0.9.8ze" "libssl.so.0.9.8" "libssl.so" 
"libssl.so.4" "libssl.so.10"))

   source: (ERROR 'LOAD-FOREIGN-LIBRARY-ERROR :FORMAT-CONTROL CONTROL
  :FORMAT-ARGUMENTS ARGUMENTS)
0]

--
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 fricas-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/87848ba2-ea67-75a9-0449-8af47863e294%40hemmecke.org.


Re: [fricas-devel] FriCAS + jFriCAS

2022-05-02 Thread Ralf Hemmecke

On 02.05.22 18:55, Bill Page wrote:

Ralf,

Thanks for this. I tried your installation procedure on my "Linux Mint
19.3 Tricia base: Ubuntu 18.04 bionic"  system and everything seemed
to work fine except the installation of JupyText.

After performing the steps in
   * (optional) Install JupyText
when I run
   jfricas $FDIR/foo.input
or even just
   jfricas
I get the error message:
[C 12:38:09.008 NotebookApp] Bad config encountered during initialization:
[C 12:38:09.008 NotebookApp] The 'contents_manager_class' trait of
 instance
must be a type, but 'jupytext.TextFileContentsManager' could not be
imported


Oh... I must change my website. I wrongly have included JupyText in the 
sed command. Just install


source $FDIR/venv/jfricas/bin/activate
pip3 install jupytext

Then it will work. I'll update in a few minutes.


Adding the line manually did not help.

In any case I guess jupyter is really complaining about
"jupytext.TextFileContentsManager". Commenting this line out allows
jfricas to start again but obviously
   jfricas $FDIR/foo.input
still does not work.


Yes. Loading an .input file only works if you have jupytext installed.

Thanks for testing.
BTW, I see a comment here...
https://github.com/fricas/jfricas/issues/4
I am currently recompiling the fricas binary with having

sudo apt remove libssl.1.0.0

But cannot remove libssl.1.1, because that is obviously needed on xubu 
18.04 for cl-hunchentoot.


So I guess, my binary will only work with having libssl 1.1.
That is certainly NOT perfect. If someone has an idea what to do here, 
would be greatly appreciated.


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 fricas-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/50e77529-e588-943c-2360-ae9477a31eea%40hemmecke.org.


Re: [fricas-devel] FriCAS + jFriCAS

2022-05-02 Thread Bill Page
Ralf,

Thanks for this. I tried your installation procedure on my "Linux Mint
19.3 Tricia base: Ubuntu 18.04 bionic"  system and everything seemed
to work fine except the installation of JupyText.

After performing the steps in
  * (optional) Install JupyText
when I run
  jfricas $FDIR/foo.input
or even just
  jfricas
I get the error message:
[C 12:38:09.008 NotebookApp] Bad config encountered during initialization:
[C 12:38:09.008 NotebookApp] The 'contents_manager_class' trait of
 instance
must be a type, but 'jupytext.TextFileContentsManager' could not be
imported

When I checked the config file:
  xed $HOME/.jupyter/jupyter_notebook_config.py
I noticed that the installation command
--
3. Make Jupytext available.

sed -i 's|^# *c.NotebookApp.contents_manager_class
=.*|c.NotebookApp.contents_manager_class =
"jupytext.TextFileContentsManager"|;s|^#
*c.NotebookApp.use_redirect_file = .*|c.NotebookApp.use_redirect_file
= False|' $HOME/.jupyter/jupyter_notebook_config.py
--
failed to add the line
  c.NotebookApp.use_redirect_file = False
presumably because the file did not previously contain any line like
  # *c.NotebookApp.use_redirect_file = .*

Adding the line manually did not help.

In any case I guess jupyter is really complaining about
"jupytext.TextFileContentsManager". Commenting this line out allows
jfricas to start again but obviously
  jfricas $FDIR/foo.input
still does not work.

Regards,
Bill.

On Sun, 1 May 2022 at 16:22, Ralf Hemmecke  wrote:
>
> Hello,
>
> unfortunately there were some issues at
> https://github.com/fricas/jfricas/issues
> claiming that jfricas didn't work although it worked perfectly for myself.
>
> Kurt figured out that there were compatibility problems with the
> webserver hunchentoot (that was loaded when jfricas started) and the
> SBCL version on which the current 1,3,7 release is based on.
>
> After quite some discussion and many wasted hours in finding a simple
> way for a user to make jFriCAS work, I decided that the simplest method
> is to put hunchentoot into the FRICASsys image and distribute it
> together with FriCAS. The main goal was to make it simple for a user.
>
> I have now compiled a binary FriCAS distribution that includes
> hunchentoot and that works together with jfricas (no no -- not from PyPI).
>
> I would like to ask the community to give feedback to
>
> http://hemmecke.org/fricas/dist/1.3.7/
>
> any (un)successful feedback is welcome.
>
> Ralf (with quite a lot of help from Kurt and Qian)
>
> --
> 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 fricas-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/fricas-devel/8e7a57bb-42d4-3ab8-ccd4-8b03eca37090%40hemmecke.org.

-- 
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 fricas-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/CAC6x94Ro0ijJYPUPuZYdp8emX1VTyb-%3Dd1UM%2BXafFHcve-7tmA%40mail.gmail.com.


[fricas-devel] FriCAS + jFriCAS

2022-05-01 Thread Ralf Hemmecke

Hello,

unfortunately there were some issues at
https://github.com/fricas/jfricas/issues
claiming that jfricas didn't work although it worked perfectly for myself.

Kurt figured out that there were compatibility problems with the 
webserver hunchentoot (that was loaded when jfricas started) and the 
SBCL version on which the current 1,3,7 release is based on.


After quite some discussion and many wasted hours in finding a simple 
way for a user to make jFriCAS work, I decided that the simplest method 
is to put hunchentoot into the FRICASsys image and distribute it 
together with FriCAS. The main goal was to make it simple for a user.


I have now compiled a binary FriCAS distribution that includes 
hunchentoot and that works together with jfricas (no no -- not from PyPI).


I would like to ask the community to give feedback to

http://hemmecke.org/fricas/dist/1.3.7/

any (un)successful feedback is welcome.

Ralf (with quite a lot of help from Kurt and Qian)

--
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 fricas-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/8e7a57bb-42d4-3ab8-ccd4-8b03eca37090%40hemmecke.org.