Discussion:
[Maxima-discuss] Disturbing output from 'write_data'
Marco Wahl
2016-08-19 20:21:17 UTC
Permalink
Hi,

I observe disturbing output from maxima when using the function
'write_data'.

Example:

#v+
(%i1) write_data("", "/dev/stdout");

;; loading #P"/home/b/.maxima/binary/5_38_1/sbcl/1_3_6/share/numericalio/encode-decode-float.fasl"
;; loading #P"/home/b/.maxima/binary/5_38_1/sbcl/1_3_6/share/numericalio/numericalio.fasl"
(%o1) done
#v-

These two lines starting with ';; loading' disturb me.

How to get rid of these disturbing lines?


#v+
(%i2) bug_report()
;

Please report bugs to:
http://sourceforge.net/p/maxima/bugs
To report a bug, you must have a Sourceforge account.
Please include the following information with your bug report:
-------------------------------------------------------------
Maxima version: "5.38.1"
Maxima build date: "2016-06-13 21:15:58"
Host type: "x86_64-unknown-linux-gnu"
Lisp implementation type: "SBCL"
Lisp implementation version: "1.3.6"
-------------------------------------------------------------
The above information is also reported by the function 'build_info()'.
#v-


Any help is very much apprechiated. Thanks for reading, bye,
--
Marco
https://marcowahl.github.io



------------------------------------------------------------------------------
Gunter Königsmann
2016-08-19 20:42:04 UTC
Permalink
Post by Marco Wahl
;; loading #P"/home/b/.maxima/binary/5_38_1/sbcl/1_3_6/share/numericalio/encode-decode-float.fasl"
;; loading #P"/home/b/.maxima/binary/5_38_1/sbcl/1_3_6/share/numericalio/numericalio.fasl"
These lines tell that maxima automatically loaded additional packages
that provide some functionality you are going to use.

There have been tries to suppress them. But afaik until now that
resulted in error messages getting lost, as well, making debugging
eventual problems harder than needed.

Kind regards,

Gunter.

------------------------------------------------------------------------------
Richard Fateman
2016-08-19 21:01:06 UTC
Permalink
I don't see these lines, but it seems to me that
they would only appear in the first write_data().
So send some data to a garbage file. Then do the next one for real.

RJF
Post by Gunter Königsmann
Post by Marco Wahl
;; loading #P"/home/b/.maxima/binary/5_38_1/sbcl/1_3_6/share/numericalio/encode-decode-float.fasl"
;; loading #P"/home/b/.maxima/binary/5_38_1/sbcl/1_3_6/share/numericalio/numericalio.fasl"
These lines tell that maxima automatically loaded additional packages
that provide some functionality you are going to use.
There have been tries to suppress them. But afaik until now that
resulted in error messages getting lost, as well, making debugging
eventual problems harder than needed.
Kind regards,
Gunter.
------------------------------------------------------------------------------
_______________________________________________
Maxima-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
------------------------------------------------------------------------------
Marco Wahl
2016-08-20 19:36:02 UTC
Permalink
Post by Richard Fateman
I don't see these lines, but it seems to me that
they would only appear in the first write_data().
So send some data to a garbage file. Then do the next one for real.
RJF
Post by Gunter Königsmann
Post by Marco Wahl
;; loading #P"/home/b/.maxima/binary/5_38_1/sbcl/1_3_6/share/numericalio/encode-decode-float.fasl"
;; loading #P"/home/b/.maxima/binary/5_38_1/sbcl/1_3_6/share/numericalio/numericalio.fasl"
These lines tell that maxima automatically loaded additional packages
that provide some functionality you are going to use.
There have been tries to suppress them. But afaik until now that
resulted in error messages getting lost, as well, making debugging
eventual problems harder than needed.
I can confirm Richard's guess that the lines appear only in the very
first call. Unfortunately I don't see a way to hide these lines in a
garbage file in my case. Actually these lines disturb a test case in
Org mode.

For now I try to filter those lines in the test case directly.

Thanks for your answers.


Best regards,
--
Marco Wahl
https://marcowahl.github.io



------------------------------------------------------------------------------
Richard Fateman
2016-08-20 20:30:22 UTC
Permalink
Post by Marco Wahl
Unfortunately I don't see a way to hide these lines in a
garbage file in my case.
Another way would be to explicitly load those files before you do even
the first write_data.
RJF


------------------------------------------------------------------------------
Marco Wahl
2016-08-20 22:13:43 UTC
Permalink
Post by Richard Fateman
Post by Marco Wahl
Unfortunately I don't see a way to hide these lines in a
garbage file in my case.
Another way would be to explicitly load those files before you do even
the first write_data.
Yes, that's it. See the post of Leo Butler where he explains how this
can be done concretely.


Thanks and best regards,
--
Marco Wahl
https://marcowahl.github.io


------------------------------------------------------------------------------
Leo Butler
2016-08-20 20:45:23 UTC
Permalink
Post by Gunter Königsmann
Post by Marco Wahl
;; loading #P"/home/b/.maxima/binary/5_38_1/sbcl/1_3_6/share/numericalio/encode-decode-float.fasl"
;; loading #P"/home/b/.maxima/binary/5_38_1/sbcl/1_3_6/share/numericalio/numericalio.fasl"
These lines tell that maxima automatically loaded additional packages
that provide some functionality you are going to use.
The informational messages tell you Maxima had to load numericalio
before evaluating write_data.

Since those informational messages are written to stdout, do

with_stdout("/dev/null", load(numericalio))$
write_data ....

to muffle the messages. Note that sbcl warnings are muffled by

:lisp (setf sb-ext::*muffled-warnings* 'warning)

Leo

------------------------------------------------------------------------------
Marco Wahl
2016-08-20 22:04:48 UTC
Permalink
------------------------------------------------------------------------------
Marco Wahl
2016-08-20 22:11:41 UTC
Permalink
Post by Leo Butler
Post by Gunter Königsmann
Post by Marco Wahl
;; loading #P"/home/b/.maxima/binary/5_38_1/sbcl/1_3_6/share/numericalio/encode-decode-float.fasl"
;; loading #P"/home/b/.maxima/binary/5_38_1/sbcl/1_3_6/share/numericalio/numericalio.fasl"
These lines tell that maxima automatically loaded additional packages
that provide some functionality you are going to use.
The informational messages tell you Maxima had to load numericalio
before evaluating write_data.
Since those informational messages are written to stdout, do
with_stdout("/dev/null", load(numericalio))$
write_data ....
This does the trick!
Post by Leo Butler
to muffle the messages. Note that sbcl warnings are muffled by
:lisp (setf sb-ext::*muffled-warnings* 'warning)
Good to know.


Thanks and best regards,
--
Marco Wahl
https://marcowahl.github.io


------------------------------------------------------------------------------
Continue reading on narkive:
Loading...