Skip to content
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

Method printing takes up too much whitespace in 0.4 #11056

Closed
jakebolewski opened this issue Apr 29, 2015 · 8 comments
Closed

Method printing takes up too much whitespace in 0.4 #11056

jakebolewski opened this issue Apr 29, 2015 · 8 comments
Milestone

Comments

@jakebolewski
Copy link
Member

seems to be a regression in the array display code as the output is not truncated

compare 0.3

julia> methodswith(Int)
187-element Array{Method,1}:
 Array{T}(::Type{T},m::Int64) at base.jl:226
 Array{T}(::Type{T},m::Int64,n::Int64) at base.jl:228
 Array{T}(::Type{T},m::Int64,n::Int64,o::Int64) at base.jl:230
 xdump(fn::Function,io::IO,x::Module,n::Int64,indent) at show.jl:693
 xdump(fn::Function,io::IO,x::Array{Any,N},n::Int64,indent) at show.jl:707
 xdump(fn::Function,io::IO,x::Symbol,n::Int64,indent) at show.jl:716
 xdump(fn::Function,io::IO,x::Function,n::Int64,indent) at show.jl:717
 xdump(fn::Function,io::IO,x::Array{T,N},n::Int64,indent) at show.jl:718
 xdump(fn::Function,io::IO,x::UnionType,n::Int64,indent) at show.jl:723

to 0.4-dev (this is how it looks in the terminal)

julia> methodswith(Int)
268-element Array{Method,1}:
 $(x::Int64,y::Int64) at int.jl:95

 rem(x::Int64,::Type{Int8}) at int.jl:162

 rem(x::Int64,::Type{UInt8}) at int.jl:162

 rem(x::Int64,::Type{Int16}) at int.jl:162

 rem(x::Int64,::Type{UInt16}) at int.jl:162

 rem(x::Int64,::Type{Int32}) at int.jl:162

 rem(x::Int64,::Type{UInt32}) at int.jl:162

 rem(x::Int64,::Type{UInt64}) at int.jl:182

 rem(x::Int64,::Type{Int128}) at int.jl:170

 rem(x::Int64,::Type{UInt128}) at int.jl:170

 rem(x::Int64,::Type{Char}) at int.jl:162
@jakebolewski jakebolewski added the domain:io Involving the I/O subsystem: libuv, read, write, etc. label Apr 29, 2015
@mauro3
Copy link
Contributor

mauro3 commented Apr 29, 2015

I get an error on 5f3bd18

julia> methodswith(Int)
ERROR: MethodError: `start` has no method matching start(::Type{Tuple{Bool}})
 in mapfoldl at reduce.jl:307
 in mapreduce at reduce.jl:115
 in methodswith at interactiveutil.jl:291
 in methodswith at interactiveutil.jl:309
 in methodswith at interactiveutil.jl:324
 in methodswith at interactiveutil.jl:317

@pao
Copy link
Member

pao commented Apr 29, 2015

@mauro3 methodswith was just fixed a few hours ago, so you need a supernew build.

@pao
Copy link
Member

pao commented Apr 29, 2015

Sorry @mauro3 -- not actually fixed yet. See #11052 and 847152d.

@mauro3
Copy link
Contributor

mauro3 commented Apr 30, 2015

Yes, now I get it too. I guess the issue was filed before it was an issue!

@mauro3
Copy link
Contributor

mauro3 commented Apr 30, 2015

Actually this seems to sometimes occur with methods as well, for instance methods(*, (AbstractArray, AbstractArray)) but not methods(sin, (FloatingPoint,)) or methods(sin).

@jayschwa
Copy link
Member

When a matrix is printed, all elements seem to be padded out to match their longest peer. When one element is long enough that it wraps across the screen, it happens everywhere. The padding should probably be capped to the terminal width or something.

https://github.com/JuliaLang/julia/blob/master/base/show.jl#L1003

@JeffBezanson JeffBezanson removed the domain:io Involving the I/O subsystem: libuv, read, write, etc. label May 29, 2015
@StefanKarpinski StefanKarpinski added this to the 0.5.x milestone Sep 13, 2016
@vtjnash
Copy link
Sponsor Member

vtjnash commented Sep 15, 2016

This was intentional: ce23174#diff-b4267643a238b5a375b3e055817ee6caR1474

@vtjnash vtjnash closed this as completed Sep 15, 2016
@tkelman
Copy link
Contributor

tkelman commented Sep 15, 2016

the excess spacing is wasteful and we should fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants