-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Taal: Prettify simulation summary #302
Comments
Feel free to do that. I just implemented something that was convenient to write using |
You can find some related information and code at |
I think this would be helpful for us: help?> show
[...]
show(io::IO, mime, x)
[...]
Container types generally implement 3-argument show by calling show(io, MIME"text/plain"(), x) for elements
x, with :compact => true set in an IOContext passed as the first argument.
help?> IOContext
[...]
IOContext(io::IO, KV::Pair...)
Create an IOContext that wraps a given stream, adding the specified key=>value pairs to the properties of
that stream (note that io can itself be an IOContext).
• use (key => value) in io to see if this particular combination is in the properties set
• use get(io, key, default) to retrieve the most recent value for a particular key
The following properties are in common use:
• :compact: Boolean specifying that values should be printed more compactly, e.g. that numbers should
be printed with fewer digits. This is set when printing array elements. :compact output should not
contain line breaks.
• :limit: Boolean specifying that containers should be truncated, e.g. showing … in place of most
elements.
• :displaysize: A Tuple{Int,Int} giving the size in rows and columns to use for text output. This can
be used to override the display size for called functions, but to get the size of the screen use
the displaysize function.
• :typeinfo: a Type characterizing the information already printed concerning the type of the object
about to be displayed. This is mainly useful when displaying a collection of objects of the same
type, so that redundant type information can be avoided (e.g. [Float16(0)] can be shown as
"Float16[0.0]" instead of "Float16[Float16(0.0)]" : while displaying the elements of the array, the
:typeinfo property will be set to Float16).
[...] Given this information, I think we should write appropriate 3-arg |
Thanks for the information! I used exactly this approach ( |
At the moment, running a simulation shows most relevant information in a summary to the user. However, personally, I think the presentation is still somewhat lacking in that there are no fixed widths use, which makes it harder to scan for relevant information.
I am open for suggestions, but lacking other ideas, I'd like to reinstate a summary similar to what we had in Taam.
The text was updated successfully, but these errors were encountered: