)spool filename not recording output

18 views
Skip to first unread message

Ralf Hemmecke

unread,
Apr 11, 2023, 4:12:10 PM4/11/23
to fricas-devel
Johannes told me that )spool filename does not record the output of
fricas commonds in the file. I can confirm this.

)spool foo.out
a+b^c
)spool

gives in foo.out only

====================

(1) -> a+b^c
(2) -> )spool
====================

Does actually anyone use )spool? I have no need for it. The fricas book
mentions .spool files, but the generation and capturing of output works
via redirection, i.e. no need for the fricas book.

Ralf

Waldek Hebisch

unread,
Apr 13, 2023, 8:54:41 AM4/13/23
to fricas...@googlegroups.com
On Tue, Apr 11, 2023 at 10:12:06PM +0200, Ralf Hemmecke wrote:
> Johannes told me that )spool filename does not record the output of fricas
> commonds in the file. I can confirm this.
>
> )spool foo.out
> a+b^c
> )spool
>
> gives in foo.out only
>
> ====================
>
> (1) -> a+b^c
> (2) -> )spool
> ====================

AFAICS this is limitation due to way ')spool' is currently implemented.

> Does actually anyone use )spool? I have no need for it. The fricas book
> mentions .spool files, but the generation and capturing of output works via
> redirection, i.e. no need for the fricas book.

When I need to record input and output I normally either use terminal
cut and paste (for small things) or 'script' program (for larger
volume). Both ways have a drawback: recorded info contains control
characters sent by 'clef' or 'rlwrap', but ATM I found them good
enough.

Concerning ')spool', I do not think that we should keep current
implementation. OTOH we should clean out our input-output machinery
and with cleaned up implementation correct implementation of ')spool'
should be easy.

--
Waldek Hebisch

Prof. Dr. Johannes Grabmeier

unread,
Jan 11, 2024, 1:20:30 PM1/11/24
to fricas...@googlegroups.com
)spool still not works properly on 1.3.10

for old fashioned work with command line input, this still would be helpful.

- terminal cut and past is ok for small pieces, but I often have long output

- @Waldek: what exactly do you mean with "script'?

- @Ralf: what about FriCAS Jupyter notebook on MacBook? What would one
have to do?

Am 13.04.23 um 15:37 schrieb Waldek Hebisch:
Mit freundlichen Grüßen

Johannes Grabmeier

Prof. Dr. Johannes Grabmeier,
Köckstraße 1, D-94469 Deggendorf
Tel. +49-(0)-991-2979584, Tel. +49-(0)-151-681-70756
Fax: +49-(0)-991-2979592

Waldek Hebisch

unread,
Jan 11, 2024, 3:34:19 PM1/11/24
to fricas...@googlegroups.com
On Thu, Jan 11, 2024 at 07:20:27PM +0100, Prof. Dr. Johannes Grabmeier wrote:
> )spool still not works properly on 1.3.10
>
> for old fashioned work with command line input, this still would be helpful.
>
> - terminal cut and past is ok for small pieces, but I often have long output
>
> - @Waldek: what exactly do you mean with "script'?

I a terminal type:

script


then run your commands, when finished type

exit

Everything (both input and output) from typing 'script' up to 'exit' will
be saved in a file called 'typescript'. You use different file name
by giving 'script' an argument, for example:

script t5

will put things in a file called t5.

Of course, for this to work 'script' must be installed.

--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages