FriCAS banner

9 views
Skip to first unread message

Grégory Vanuxem

unread,
Apr 30, 2021, 9:32:38 AM4/30/21
to fricas...@googlegroups.com
Hi here,

A quick question, is there a way to suppress the banner at startup?

Regards,
Greg

Ralf Hemmecke

unread,
Apr 30, 2021, 10:06:41 AM4/30/21
to fricas...@googlegroups.com
On 30.04.21 15:32, Grégory Vanuxem wrote:
> A quick question, is there a way to suppress the banner at startup?

Looking at

https://github.com/fricas/fricas/blob/master/src/interp/util.lisp#L279

with my limited lisp knowledge tells me that you would have to convince

(format t "Checking for foreign routines~%")

not to write into your terminal.

Maybe there should be a commandline switch -nobanner to suppress the banner.

May I ask you why do you need that?

Ralf

Dima Pasechnik

unread,
Apr 30, 2021, 10:12:11 AM4/30/21
to fricas...@googlegroups.com
Imagine you just want the result of the computation by a fricas script.

Then you'll want to suppress the banner.

--
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/001225d0-9b27-b519-d0b7-a9ed9defad97%40hemmecke.org.

Grégory Vanuxem

unread,
Apr 30, 2021, 10:47:18 AM4/30/21
to fricas...@googlegroups.com

Grégory Vanuxem

unread,
Apr 30, 2021, 10:47:48 AM4/30/21
to fricas...@googlegroups.com

Grégory Vanuxem

unread,
Apr 30, 2021, 12:13:02 PM4/30/21
to fricas...@googlegroups.com
I was busy (health) so here is my response.

Le ven. 30 avr. 2021 à 16:47, Grégory Vanuxem <g.va...@gmail.com> a écrit :
Hello,

https://github.com/gvanuxem/fricas-vscode

Regards

Le ven. 30 avr. 2021 à 16:06, Ralf Hemmecke <ra...@hemmecke.org> a écrit :
>
> On 30.04.21 15:32, Grégory Vanuxem wrote:
> > A quick question, is there a way to suppress the banner at startup?
>
> Looking at
>
> https://github.com/fricas/fricas/blob/master/src/interp/util.lisp#L279
>
> with my limited lisp knowledge tells me that you would have to convince
>
>   (format t "Checking for foreign routines~%")

Thanks! So I guess I'll have to code that myself 😉 I had to check your (with of course Kurt) Jupiter interface how you managed that but apparently you gone through. 

>
> not to write into your terminal.
>
> Maybe there should be a commandline switch -nobanner to suppress the banner.

Yes I think so, and helping interfacing frontends to FriCAS is on the TODO list if I read correctly the README file. Of course sockets* would be better but different architectures and different Common LISP implementations doesn't help.

Ralf Hemmecke

unread,
Apr 30, 2021, 12:51:33 PM4/30/21
to fricas...@googlegroups.com
> https://github.com/gvanuxem/fricas-vscode

Oh... it seems that you are competing with Peter Broadbery's Intellij
plugin.

https://github.com/pbroadbery/aldor-idea-plugin/releases/tag/release-1.3

I appreciate very much that more and more stuff appears that is
connected to FriCAS.

As for the banner. For the jfricas interface, is simply don't care.
There a fricas is started in the background and connected to jfricas.
The input string is sent to fricas and fricas returns output that is
fenced by

--BEG:FORMAT:FormatMathJax:NN
...
--END:FORMAT:FormatMathJax:NN

https://github.com/fricas/fricas/blob/master/src/algebra/fmtjfricas.spad#L75

So the only thing I have to parse is something inside these fences.
The banner is simply ignored.

No idea whether this may help you.

In fact, when output for the FriCAS book is generated it simply creates
a .spool file with appropriately set stuff before and after the actual
output of the commands, so that it becomes easy to separate the relevant
output from garbage.

Ralf

Grégory Vanuxem

unread,
Apr 30, 2021, 2:35:21 PM4/30/21
to fricas...@googlegroups.com
Le ven. 30 avr. 2021 à 18:51, Ralf Hemmecke <ra...@hemmecke.org> a écrit :
> https://github.com/gvanuxem/fricas-vscode

Oh... it seems that you are competing with Peter Broadbery's Intellij
plugin.


We had little discussions with each other and his work is amazing. But there is a notable distinction. Intellij is an IDE with projects in mind whereas VS Code is a code *editor*. I started some time ago with Atom but Atom (like Bill Page experimented I think) is extremely slow to start and not as portable as I would like. Personally I want, in a terminal for example, 'code myfile.thing' an instant startup. VS Code, not as Vim or Emacs of course, is fast. This is what I like. And moreover a lot of visual things can be done. It's MIT licensed and on GitHub so that's attracted me.


https://github.com/pbroadbery/aldor-idea-plugin/releases/tag/release-1.3

I appreciate very much that more and more stuff appears that is
connected to FriCAS.

As for the banner. For the jfricas interface, is simply don't care.
There a fricas is started in the background and connected to jfricas.
The input string is sent to fricas and fricas returns output that is
fenced by

--BEG:FORMAT:FormatMathJax:NN
...
--END:FORMAT:FormatMathJax:NN

https://github.com/fricas/fricas/blob/master/src/algebra/fmtjfricas.spad#L75

So the only thing I have to parse is something inside these fences.
The banner is simply ignored.

No idea whether this may help you.

I dislike, actually, having the banner each time I execute several operations (snippet for example in an input file).
I would prefer of course a REPL in VS Code but for now... 

But that always helps, and in fact mathematical notation Notebook (a little of Jupyter apparently...) begins to be implemented:
(search 'Preview features')


In fact, when output for the FriCAS book is generated it simply creates
a .spool file with appropriately set stuff before and after the actual
output of the commands, so that it becomes easy to separate the relevant
output from garbage.

I think, for now, with my actual goals, the simpler way is to remove the banner.

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.

Grégory Vanuxem

unread,
May 2, 2021, 7:13:31 AM5/2/21
to fricas...@googlegroups.com, Waldek Hebisch
Hi here, Hi Waldek,

Waldek, what do you think of allowing, via an user option in command
line arguments
say, '--no-banner', to suppress the banner at startup to better
interface FriCAS to different frontends?

This could be done for example via the fricas script which sends to FRICASsys
the '--no-banner' parameter and can be extracted in fricas-init routine.
With SBCL this is available in the sb-ext:*posix-argv* variable, other
Common Lisp implementations
are also able to access command line arguments.

For what I have found the essential pieces of code to print this
banner are in fricas-init (util.lisp)
and spadStartUpMsgs (msgdb.boot). I can code a proof of concept piece
of code for review if necessary.

Regards
__
Greg

Waldek Hebisch

unread,
May 2, 2021, 3:13:15 PM5/2/21
to fricas...@googlegroups.com
On Sun, May 02, 2021 at 01:13:18PM +0200, Gr??gory Vanuxem wrote:
> Hi here, Hi Waldek,
>
> Waldek, what do you think of allowing, via an user option in command
> line arguments
> say, '--no-banner', to suppress the banner at startup to better
> interface FriCAS to different frontends?

Could be done, simply up to now nobody bothered to implement this.

> This could be done for example via the fricas script which sends to FRICASs=
> ys
> the '--no-banner' parameter and can be extracted in fricas-init routine.
> With SBCL this is available in the sb-ext:*posix-argv* variable, other
> Common Lisp implementations
> are also able to access command line arguments.

There are some complications, see 'sman.c' how '-eval' is handled.

> For what I have found the essential pieces of code to print this
> banner are in fricas-init (util.lisp)
> and spadStartUpMsgs (msgdb.boot).

Yes.

> I can code a proof of concept piece
> of code for review if necessary.
>
> Regards
> __
> Greg
>
> Le ven. 30 avr. 2021 =C3=A0 20:35, Gr=C3=A9gory Vanuxem <g.va...@gmail.co=
> m> a =C3=A9crit :
> >
> >
> >
> > Le ven. 30 avr. 2021 =C3=A0 18:51, Ralf Hemmecke <ra...@hemmecke.org> a =
> =C3=A9crit :
> >>
> >> > https://github.com/gvanuxem/fricas-vscode
> >>
> >> Oh... it seems that you are competing with Peter Broadbery's Intellij
> >> plugin.
> >
> >
> >
> > We had little discussions with each other and his work is amazing. But th=
> ere is a notable distinction. Intellij is an IDE with projects in mind wher=
> eas VS Code is a code *editor*. I started some time ago with Atom but Atom =
> (like Bill Page experimented I think) is extremely slow to start and not as=
> portable as I would like. Personally I want, in a terminal for example, 'c=
> ode myfile.thing' an instant startup. VS Code, not as Vim or Emacs of cours=
> e, is fast. This is what I like. And moreover a lot of visual things can be=
> done. It's MIT licensed and on GitHub so that's attracted me.
> >>
> >>
> >>
> >> https://github.com/pbroadbery/aldor-idea-plugin/releases/tag/release-1.3
> >>
> >> I appreciate very much that more and more stuff appears that is
> >> connected to FriCAS.
> >>
> >> As for the banner. For the jfricas interface, is simply don't care.
> >> There a fricas is started in the background and connected to jfricas.
> >> The input string is sent to fricas and fricas returns output that is
> >> fenced by
> >>
> >> --BEG:FORMAT:FormatMathJax:NN
> >> ...
> >> --END:FORMAT:FormatMathJax:NN
> >>
> >> https://github.com/fricas/fricas/blob/master/src/algebra/fmtjfricas.spad=
> #L75
> >>
> >> So the only thing I have to parse is something inside these fences.
> >> The banner is simply ignored.
> >>
> >> No idea whether this may help you.
> >
> >
> > I dislike, actually, having the banner each time I execute several operat=
> ions (snippet for example in an input file).
> > I would prefer of course a REPL in VS Code but for now...
> >
> > But that always helps, and in fact mathematical notation Notebook (a litt=
> le of Jupyter apparently...) begins to be implemented:
> > https://code.visualstudio.com/updates/v1_55
> > (search 'Preview features')
> >>
> >>
> >>
> >> In fact, when output for the FriCAS book is generated it simply creates
> >> a .spool file with appropriately set stuff before and after the actual
> >> output of the commands, so that it becomes easy to separate the relevant
> >> output from garbage.
> >
> >
> > I think, for now, with my actual goals, the simpler way is to remove the =
> banner.
> >
> > Greg
> >
> >>
> >>
> >> Ralf
> >>
> >> --
> >> You received this message because you are subscribed to the Google Group=
> s "FriCAS - computer algebra system" group.
> >> To unsubscribe from this group and stop receiving emails from it, send a=
> n email to fricas-devel...@googlegroups.com.
> >> To view this discussion on the web visit https://groups.google.com/d/msg=
> id/fricas-devel/8a45908d-c8af-dfa9-a4e6-98ebff9db33c%40hemmecke.org.
>
> --=20
> 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 e=
> mail to fricas-devel...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/=
> fricas-devel/CAHnU2dYH9kvw6ujKm5kr-TJ0DTNCToPZLgeu5j7ciTBqp2xz5w%40mail.gma=
> il.com.

--
Waldek Hebisch

Grégory Vanuxem

unread,
May 2, 2021, 4:09:50 PM5/2/21
to fricas...@googlegroups.com
Le dim. 2 mai 2021 à 21:13, Waldek Hebisch <heb...@math.uni.wroc.pl> a écrit :
>
> On Sun, May 02, 2021 at 01:13:18PM +0200, Gr??gory Vanuxem wrote:
> > Hi here, Hi Waldek,
> >
> > Waldek, what do you think of allowing, via an user option in command
> > line arguments
> > say, '--no-banner', to suppress the banner at startup to better
> > interface FriCAS to different frontends?
>
> Could be done, simply up to now nobody bothered to implement this.
>
> > This could be done for example via the fricas script which sends to FRICASs=
> > ys
> > the '--no-banner' parameter and can be extracted in fricas-init routine.
> > With SBCL this is available in the sb-ext:*posix-argv* variable, other
> > Common Lisp implementations
> > are also able to access command line arguments.
>
> There are some complications, see 'sman.c' how '-eval' is handled.

Oh! I'll take a look!
> 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/20210502191308.GB32321%40math.uni.wroc.pl.
Reply all
Reply to author
Forward
0 new messages