Overly "compressed" display

109 views
Skip to first unread message

Scott Jones

unread,
May 18, 2015, 7:52:34 PM5/18/15
to juli...@googlegroups.com
I ran into the following:
julia> d
Dict{UInt128,Int16} with 188 entries:
 
0x0000ffffffffffff0000f => 123
 
0xffffffffff7fff3dfffff => 61
 
0xfffffffe027ffffffffff => 13
 
0xfffffffffffcfffffffff => 181
 
0x00000000000007fffffff => 113


where whatever is being used to display the dictionary is unnecessarily truncating the display of the key...
1) I'd like to know what code is responsible for this display (so that I might fix it at some point)
2) *If* people agree with me that the current display isn't very helpful...

-Scott

Stefan Karpinski

unread,
May 19, 2015, 9:47:50 AM5/19/15
to juli...@googlegroups.com
It would be good to improve this – in particular, not eliding output when there is room to print the entire output would be good. This is kind of involved and I've lost track of where this code is, but you can start to follow the breadcrumbs with @edit show(STDOUT, d).

Matt Bauman

unread,
May 19, 2015, 9:55:03 AM5/19/15
to juli...@googlegroups.com
Yes, this could definitely be improved.  The relevant section is here: https://github.com/JuliaLang/julia/blob/eb5da264e87f24a091966ecca266b3568aaf7a10/base/dict.jl#L86-L125

Right now it uses (up to) one third of the screen for the key, and the remainder for the values.  That should be changed to be more flexible.
Reply all
Reply to author
Forward
0 new messages