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

Doesn't work on Juno (doesn't print) #12

Closed
Datseris opened this issue Nov 13, 2017 · 9 comments
Closed

Doesn't work on Juno (doesn't print) #12

Datseris opened this issue Nov 13, 2017 · 9 comments

Comments

@Datseris
Copy link
Contributor

# while in Juno do:
Pkg.add("Measurements") #works
using Measurements #works
a = 5 ± 0.2 # worked the first time I run it but printed nothing
a #freezes juno entirely

Then, restart the Julia kernel in juno because it is frozen and do:

a = 5 ± 0.2

This freezes julia again, completely. Doesn't even allow me to try and print a.

This works fine:

a = 5 ± 0.2; typeof(a)
Measurements.Measurement{Float64}

So yeah pretty much printing breaks the entire thing down.

Maybe this line messes up Juno; get(io, :compact, false) ?

@giordano
Copy link
Member

Thanks for the report. I don't use Juno, could you please point me to where printing for Juno is documented? Here are all the methods related to printing defined in the package: https://github.com/JuliaPhysics/Measurements.jl/blob/master/src/Measurements.jl#L93-L120

@Datseris
Copy link
Contributor Author

Fixed by #13

@giordano
Copy link
Member

I installed Atom and Juno, it works for me without problems:

screenshot_20171113_115912

@Datseris
Copy link
Contributor Author

Hm that is weird. For me it doesn't work. I am on Windows 10 and Julia 0.6 with latest Atom/Juno.

Have you used any Pkg.checkout() on anything? I haven't.

@giordano
Copy link
Member

Hm that is weird. For me it doesn't work.

I trust you ;-)

I am on Windows 10 and Julia 0.6 with latest Atom/Juno.

Debian and Julia 0.6 here, with latest Atom/Juno I guess, just installed.

Have you used any Pkg.checkout() on anything? I haven't.

Well, I'm on master of Measurements.jl, but that shouldn't matter, show methods haven't been changed for a while.

Is this perhaps an issue on Windows? This looks to be the only difference between us. What happens if you redefine

Base.show(io::IO, measure::Measurement) = print(io, measure.val, " ± ", measure.err)

?

@Datseris
Copy link
Contributor Author

Using this suggestion it still freezes. Could it be that somehow print(io, ...) in windows and Juno doesn't take more than 2 argumentrs? @pfitzseb do you know why this happens for me?

@Datseris
Copy link
Contributor Author

Works for me as well after the latest update of Atom!

@giordano
Copy link
Member

Great!

@pfitzseb
Copy link

Just for reference: JunoLab/atom-julia-client#380

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

3 participants