--help and errors when executing fricas with wrong option(s)

22 views
Skip to first unread message

Grégory Vanuxem

unread,
Jul 29, 2020, 12:21:53 PM7/29/20
to fricas...@googlegroups.com
Hello here,

In the process of testing jfricas I tried to use the fricas script
which I never use. I usually use directly FRICASsys.

But to properly start FriCAS and not having an error message 'X cannot
be found' I tried to use 'fricas' with the good option, i.e. just in a
terminal here.
Following is a result of a sample session:

Unknown option: --nox
To use a specific workspace use, e.g.: fricas -ws --nox
Goodbye.
Unknown option: --no-x
To use a specific workspace use, e.g.: fricas -ws --no-x
Goodbye.
Unknown option: --help
To use a specific workspace use, e.g.: fricas -ws --help
Goodbye.

As a suggestion, what about adding '--help' option and eventually
'--version' option? Those are really common and when you are stuck a
simple '--help' usually helps you. And that's very fast. FriCAS use
-'h' to give help on options available, but '-h' is sometimes a real
option, see 'ls -h for example' so I suggest to add '--help' as
another option.

Additionally, I wonder why the error message is always:

To use a specific workspace use, e.g.: fricas -ws YourWrongOption.
Goodbye

What about returning:
Unrecognized option '********'
Try 'fricas -h' or 'WhateverYouWant' for more information.


(In fact I do not even understand the place of the comma in the
'fricas' error message. Probably my ignorance)

Just a suggestion of course!
__
G. Vanuxem

PS / I know the '-h' option for information, but I do not know exactly
what are the FSF guidelines for example.

Ralf Hemmecke

unread,
Jul 29, 2020, 1:17:13 PM7/29/20
to fricas-devel, Grégory Vanuxem
> In the process of testing jfricas I tried to use the fricas script
> which I never use. I usually use directly FRICASsys.

You certainly know that calling "fricas -nosman" is equivalent to
calling FRICASsys directly, but with the right environment variables
(FRICAS) set.

> But to properly start FriCAS and not having an error message 'X cannot
> be found' I tried to use 'fricas' with the good option, i.e. just in a
> terminal here.

> Following is a result of a sample session:

> Unknown option: --nox

Come on, you should know that AXIOM was invented before they started the
convention that only single letter options should have just one dash.

It's "-nox" and not "--nox".

But be careful. If you want to use it in connection with jfricas, Kurt
realized that it will hang when you try to draw something. Honestly, I
haven't actually tested this situation.

And unfortuately, if you want to use "fricas -nosman" instead, that is
something that did not work on my computer. As you see in
fricaskernel.py, for me it worked with

pid = Popen(['gnome-terminal', '--title=jfricas', '--'] +
['fricas','-nosman','-eval',prereq,'-eval',start])


If it works on your side without putting the first list (gnome-terminal)
in front, I would be happy to learn about your setup.

> As a suggestion, what about adding '--help' option and eventually
> '--version' option?

Yes, I'll prepare a pull request for it. Or are you quicker?

> Additionally, I wonder why the error message is always:
>
> To use a specific workspace use, e.g.: fricas -ws YourWrongOption.
> Goodbye

I also don't know. Nobody has complained up to now. ;-)

> What about returning:
> Unrecognized option '********'
> Try 'fricas -h' or 'WhateverYouWant' for more information.

Right.

Ralf

Grégory Vanuxem

unread,
Jul 29, 2020, 7:10:39 PM7/29/20
to fricas...@googlegroups.com
Le mer. 29 juil. 2020 à 19:17, Ralf Hemmecke <ra...@hemmecke.org> a écrit :
>
> > In the process of testing jfricas I tried to use the fricas script
> > which I never use. I usually use directly FRICASsys.
>
> You certainly know that calling "fricas -nosman" is equivalent to
> calling FRICASsys directly, but with the right environment variables
> (FRICAS) set.

No, I was not aware of that, thanks. I never looked deeply into those
stuff and their interactions.

> > But to properly start FriCAS and not having an error message 'X cannot
> > be found' I tried to use 'fricas' with the good option, i.e. just in a
> > terminal here.
>
> > Following is a result of a sample session:
>
> > Unknown option: --nox
>
> Come on, you should know that AXIOM was invented before they started the
> convention that only single letter options should have just one dash.
>
> It's "-nox" and not "--nox".
> But be careful. If you want to use it in connection with jfricas, Kurt
> realized that it will hang when you try to draw something. Honestly, I
> haven't actually tested this situation.
>
> And unfortuately, if you want to use "fricas -nosman" instead, that is
> something that did not work on my computer. As you see in
> fricaskernel.py, for me it worked with
>
> pid = Popen(['gnome-terminal', '--title=jfricas', '--'] +
> ['fricas','-nosman','-eval',prereq,'-eval',start])
>
>
> If it works on your side without putting the first list (gnome-terminal)
> in front, I would be happy to learn about your setup.

I'll look into that I think. For now the notebook does not find jfricas.
My configuration is special so I have to clean it a little and see why
the Debian version of Julia is buggy.

> > As a suggestion, what about adding '--help' option and eventually
> > '--version' option?
>
> Yes, I'll prepare a pull request for it. Or are you quicker?

I would prefer you do it. I'm not as fluent with GitHub as I would like.

>
> > Additionally, I wonder why the error message is always:
> >
> > To use a specific workspace use, e.g.: fricas -ws YourWrongOption.
> > Goodbye
>
> I also don't know. Nobody has complained up to now. ;-)

I guessed too.

> > What about returning:
> > Unrecognized option '********'
> > Try 'fricas -h' or 'WhateverYouWant' for more information.
>
> Right.
>
> 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...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/c6c0b492-e16e-84d4-ff29-907f82bffd06%40hemmecke.org.

Ralf Hemmecke

unread,
Jul 30, 2020, 8:45:25 AM7/30/20
to fricas...@googlegroups.com
> I'll look into that I think. For now the notebook does not find jfricas.

I guess

$ jupyter kernelspec list

does not show something like this?

jupyter kernelspec list

Available kernels:
jfricas /home/hemmecke/virtualenv/jfricas/share/jupyter/kernels/jfricas
python3 /home/hemmecke/virtualenv/jfricas/share/jupyter/kernels/python3



What did you do to install jfricas?
What system are you on?
What's your version of Python?
In general:

https://jfricas.readthedocs.io/en/latest/install.html#check-requirements

> My configuration is special so I have to clean it a little and see why
> the Debian version of Julia is buggy.

Julia? jFriCAS should not interfere with Julia.

Ralf

Grégory Vanuxem

unread,
Jul 30, 2020, 6:27:12 PM7/30/20
to fricas...@googlegroups.com
Le jeu. 30 juil. 2020 à 14:45, Ralf Hemmecke <ra...@hemmecke.org> a écrit :
>
> > I'll look into that I think. For now the notebook does not find jfricas.
>
> I guess
>
> $ jupyter kernelspec list
>
> does not show something like this?

Good now but no output. The list is correct.


>
> jupyter kernelspec list
>
> Available kernels:
> jfricas /home/hemmecke/virtualenv/jfricas/share/jupyter/kernels/jfricas
> python3 /home/hemmecke/virtualenv/jfricas/share/jupyter/kernels/python3

greg@ELLIPSE-LAPTOP:~$ jupyter-kernelspec list
Available kernels:
jfricas /home/greg/.local/share/jupyter/kernels/jfricas
julia-1.4 /home/greg/.local/share/jupyter/kernels/julia-1.4
python3 /usr/local/share/jupyter/kernels/python3
greg@ELLIPSE-LAPTOP:~$


>
>
> What did you do to install jfricas?
> What system are you on?

Here Julia on Windows via Kali. Same on pure Parrot. Good work!
Even.

> What's your version of Python?

3.8 - sid - Kali

> In general:
>
> https://jfricas.readthedocs.io/en/latest/install.html#check-requirements
>
> > My configuration is special so I have to clean it a little and see why
> > the Debian version of Julia is buggy.
>
> Julia? jFriCAS should not interfere with Julia.

You're right I know. For now I'm stuck. Will look deeper tomorrow

Greg

>
> 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...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/69a304c3-79b1-dd0f-a52c-c687ea526eb5%40hemmecke.org.
Reply all
Reply to author
Forward
0 new messages