[julia-users] Controlling all Julia outputs upto four decimal points display

2016-09-28 Thread parthasarathy ganguly
I would like to set all my Julia outputs unto 4 decimals point display. How can I do it?

[julia-users] cfunction result garbage collected

2016-09-28 Thread Christian Rorvik
I'm not yet a 100% sure what is happening in my application, but I'm embedding Julia and using cfunction() to generate C-callable functions that at a later time invoke the registered julia code. I use a fairly standard pattern I think, of passing a pointer to a julia object that is retain in C

[julia-users] Re: an error with DataFrames on Ubuntu 16.04 64bits

2016-09-28 Thread kilgore trout
K Leo: thank you so much. I am on a fresh 16.04.2 with Julia 0.4.5 from "$ sudo apt-get install julia" and had exactly your error: your fix worked for me too. On Sunday, 17 April 2016 13:15:35 UTC+1, K leo wrote: > > Run my julia code for the first time after setting julia up on Ubuntu >

Re: [julia-users] Re: translating julia

2016-09-28 Thread Ismael Venegas Castelló
Hi Henri! In order to watch your content updated in the staging site, one of the project administrators have to push your changes to staging. I usually do this several times a day or at least once a day. The Transifex Live feature uses the WYSIWYG (What You See Is What You Get) approach, so

Re: [julia-users] Re: [ANN] UnicodeFun

2016-09-28 Thread Simon Danisch
Sounds fun! Since I won't use this, this would need to wait until the next procrastination attack. But feel free to submit a PR. Should be relatively straight forward :) 2016-09-28 17:30 GMT+02:00 Chris Rackauckas : > what about the other direction? It would be a sick to

Re: [julia-users] Re: translating julia

2016-09-28 Thread henri.gir...@gmail.com
Thank you... It's displaying and I noticed already some syntax errors. Best Henri Le 28/09/2016 à 18:08, Ismael Venegas Castelló a écrit : Hi Henri! In order to watch your content updated in the staging site, one of the project administrators have to push your changes to staging. I usually

Re: [julia-users] Controlling all Julia outputs upto four decimal points display

2016-09-28 Thread Bart Janssens
I have no idea if it's still the correct way, but I add this at the top of most notebooks: Base.show(io::IO, x::Float64) = @printf io "%0.4f" x; On Wed, Sep 28, 2016 at 6:22 PM parthasarathy ganguly < parthasarathygang...@gmail.com> wrote: > I would like to set all my Julia outputs unto 4

Re: [julia-users] Re: "both DataArrays and StatsBase export "rle"; uses of it in module DataFrames must be qualified"

2016-09-28 Thread Stefan Karpinski
It's not an issue with either package: when there are two things with the same name, you need to be explicit about which one you want to use, either by qualify how you refer to is or by explicitly importing one of the two things with that name. On Wed, Sep 28, 2016 at 7:44 AM, K leo

Re: [julia-users] Re: "both DataArrays and StatsBase export "rle"; uses of it in module DataFrames must be qualified"

2016-09-28 Thread Milan Bouchet-Valat
Le mercredi 28 septembre 2016 à 04:44 -0700, K leo a écrit : > Thanks for the reply.  Then this is an issue in DataFrames. Yes, but one that is already fixed in master by removing the dependency on DataArrays. Regards > > As the error says, they both export a function called rle, so it is > >

[julia-users] Any 0.5 performance tips?

2016-09-28 Thread Kristoffer Carlsson
Look for Core.Box in @code_warntype. See https://github.com/JuliaLang/julia/issues/15276

Re: [julia-users] Re: cfunction result garbage collected

2016-09-28 Thread Yichao Yu
On Wed, Sep 28, 2016 at 5:16 PM, Christian Rorvik wrote: > Thanks! I'll try this tomorrow. So similar to what you've done here? > https://github.com/yuyichao/FunctionWrappers.jl/blob/master/src/FunctionWrappers.jl#L40 Correct. Also

Re: [julia-users] Re: cfunction result garbage collected

2016-09-28 Thread Christian Rorvik
I don't have the code at hand right now (it's at work), but what I was doing was something like type Wrapper{Arg} cfun::Ptr{Void} cobj::Ptr{Void} obj function Wrapper{T}(f::T) return new(cfunction(call_wrapper, Void, (Ref{T}, Arg)), pointer_from_objref(f), f) end

[julia-users] Re: cfunction result garbage collected

2016-09-28 Thread Christian Rorvik
GC of code turned out to be a red herring. After isolating the instance of a call that was crashing, and getting right up to it, GDB was kind enough to get its knickers in a twist and segfault itself every time I stepped instruction by instruction to find the precise point of failure (backtrace

Re: [julia-users] Re: cfunction result garbage collected

2016-09-28 Thread Christian Rorvik
Thanks! I'll try this tomorrow. So similar to what you've done here? https://github.com/yuyichao/FunctionWrappers.jl/blob/master/src/FunctionWrappers.jl#L40 I can't remember if I actually called that explicitly, but I believe what I ended up with was similar to here:

Re: [julia-users] Re: cfunction result garbage collected

2016-09-28 Thread Yichao Yu
On Wed, Sep 28, 2016 at 5:00 PM, Christian Rorvik wrote: > I don't have the code at hand right now (it's at work), but what I was doing > was something like > > type Wrapper{Arg} > cfun::Ptr{Void} > cobj::Ptr{Void} > obj > > function Wrapper{T}(f::T) >

Re: [julia-users] Re: cfunction result garbage collected

2016-09-28 Thread Yichao Yu
On Wed, Sep 28, 2016 at 4:36 PM, Christian Rorvik wrote: > GC of code turned out to be a red herring. After isolating the instance of a > call that was crashing, and getting right up to it, GDB was kind enough to > get its knickers in a twist and segfault itself every

[julia-users] Re: cfunction result garbage collected

2016-09-28 Thread Cristóvão Duarte Sousa
I can't help you at all, but I would like to ask if you pass the cfunction() result to the C side. I've been playing with embedding Julia and discovered I could call a cfunction() directly from C, although I'm not sure that's a good practice.

[julia-users] Re: cfunction result garbage collected

2016-09-28 Thread Christian Rorvik
Yeah that's what I do. I think that's kind of the point of it, although I think most people use it perhaps as in-scope callbacks, whereas I persist the callbacks and invoke them later, so additionally I have to retain the wrapped closures to prevent them being collected. On Wednesday,

[julia-users] Any 0.5 performance tips?

2016-09-28 Thread Andrew
My large project is much (3-4x?) slower under 0.5. I know there are a variety of open issues about this to be hopefully fixed in the 0.5.x timeframe, but are there any general workarounds at the moment? My project includes the following in case it's relevant: - Many nested functions forming

[julia-users] Re: Any 0.5 performance tips?

2016-09-28 Thread K leo
Just discovered a few days ago that keyword arguments in functions are very slow, but I guess they are not slower in 0.5. On Thursday, September 29, 2016 at 10:15:20 AM UTC+8, Andrew wrote: > > My large project is much (3-4x?) slower under 0.5. I know there are a > variety of open issues about

Re: [julia-users] Re: [ANN] UnicodeFun

2016-09-28 Thread Chris Rackauckas
what about the other direction? It would be a sick to write symbolic code for SymEngine or SymPy in that unicode form, and have it convert to the appropriate code. On Wednesday, September 28, 2016 at 6:43:48 AM UTC-7, Simon Danisch wrote: > > That's the short form which works with

[julia-users] Re: ClusterManagers timeout

2016-09-28 Thread Ben Arthur
you could custom modify your copy of ClusterManagers.jl to wait longer by changing the hard-coded "60" on this line: https://github.com/JuliaParallel/ClusterManagers.jl/blob/master/src/slurm.jl#L52

[julia-users] LinearMaps and eigs() in 5.0

2016-09-28 Thread Ivan Slapnicar
The following code gives expected output in Julia 4.+, but errors in Julia 5.0 using LinearMaps n=10 A=rand(n,n) function f(x::Vector) A*x end B=LinearMap(f,n) eigs(B) ERROR: LoadError: MethodError: no method matching issymmetric(::LinearMaps.FunctionMap{Float64}) Closest candidates are:

[julia-users] Southern California Julia Users Kickoff Meeting - October 7th

2016-09-28 Thread Chris Rackauckas
Hello, We are excited to announce a kickoff meeting for the Southern California Julia Users on October 7th at 6PM at UCLA (Engineering 4). There will be presentations by local Julia users showcasing their work. If you are interested in presenting, please let us know through email, Gitter, or

[julia-users] Re: help understanding different ways of wrapping functions

2016-09-28 Thread Gunnar Farnebäck
It's normal that manually inlined code of this kind is faster than wrapped code unless the compiler manages to see the full inlining potential. In this case the huge memory allocations for the wrapped solutions indicates that it's nowhere near doing that at all. I doubt it will take you all the

[julia-users] Re: "both DataArrays and StatsBase export "rle"; uses of it in module DataFrames must be qualified"

2016-09-28 Thread K leo
Thanks for the reply. Then this is an issue in DataFrames. On Wednesday, September 28, 2016 at 5:47:03 PM UTC+8, Patrick Kofod Mogensen wrote: > > As the error says, they both export a function called rle, so it is not > possible to know which one you're trying to call, if you don't qualify >

Re: [julia-users] Re: Why does Julia 0.5 keep complaining about method re-definitions?

2016-09-28 Thread Cedric St-Jean
I just removed the IJulia dependency from ClobberingReload.jl (made it optional - autoreload still works for IJulia users). Thank you for the feedback. If you `Pkg.checkout("ClobberingReload")`, it should automatically remove IJulia and its dependencies. BTW, if you haven't tried

[julia-users] Re: help understanding different ways of wrapping functions

2016-09-28 Thread K leo
Thanks so much for the tips. The culprit is the keyword argument (xRat=0.). Declaring it made the wrapped code twice as fast, but still way slower than the inline code. But making it positional made the wrapped code just a little slower than the inline code - big improvement. On Wednesday,

Re: [julia-users] [ANN] UnicodeFun

2016-09-28 Thread henri.gir...@gmail.com
thanks. I wish I could get the \frac symbol is there possible to make it ? 1 ___ 2 Best Henri Le 28/09/2016 à 12:05, Simon Danisch a écrit : Good news everyone! I've written a small library that offers various transformations of text to special Unicode characters. The most prominent one

[julia-users] Re: [ANN] UnicodeFun

2016-09-28 Thread Simon Danisch
The best adhoc solution I could find looks like this: 1̲2̲ ̲/̲ ̲2̲0̲ 200 So not impossible... I'll see how we can integrate this Am Mittwoch, 28. September 2016 12:05:36 UTC+2 schrieb Simon Danisch: > > Good news everyone! > I've written a small library that offers various transformations of

[julia-users] Re: norm() is slow when variables are arguments

2016-09-28 Thread Steven G. Johnson
On a separate note, norm([u; v]) for scalar u and v is going to be a lot slower than hypot(u, v) or sqrt(u*u + v*v) (although the latter does not check for overflow the way hypot does). Allocating little arrays and calling "vector" functions for everything, even small computations on a few

[julia-users] Re: [ANN] UnicodeFun

2016-09-28 Thread Simon Danisch
I added the to_fraction function: to_fraction("α² ⋅ α²⁺³ ≡ α⁷", " ℝ: 퐴퐯 = λᵢ퐯") --> α̲²̲ ̲⋅̲ ̲α̲²̲⁺̲³̲ ̲≡̲ ̲α̲⁷̲ ℝ: 퐴퐯 = λᵢ퐯 https://github.com/SimonDanisch/UnicodeFun.jl/pull/3 But I won't have time to add this to the *to*_*latex* function, since it's a bit more involved with the line

Re: [julia-users] Re: translating julia

2016-09-28 Thread henri.gir...@gmail.com
Hi Ismael, Looking at the git julialanges, one older french translation is showing (not mine) and above is mine still in english ? Is there a gap between translation and display ? Just for information. Le 28/09/2016 à 10:26, Ismael Venegas Castelló a écrit : Hello Henri! Currently

[julia-users] Re: "both DataArrays and StatsBase export "rle"; uses of it in module DataFrames must be qualified"

2016-09-28 Thread Patrick Kofod Mogensen
As the error says, they both export a function called rle, so it is not possible to know which one you're trying to call, if you don't qualify them. Qualifying means writing "package name dot" and then the function, as seen below module A export f f(x::Int64) = x end module B export f

Re: [julia-users] Re: translating julia

2016-09-28 Thread henri.gir...@gmail.com
I am wondering if one must write the html mark when translating ? Le 28/09/2016 à 10:26, Ismael Venegas Castelló a écrit : Hello Henri! Currently French is about 0% translated, we are adding to production the languages that at minimum have the home page translated 90 %, but you can see the

Re: [julia-users] Re: help understanding different ways of wrapping functions

2016-09-28 Thread Mauro
On Wed, 2016-09-28 at 08:50, Gunnar Farnebäck wrote: > It's normal that manually inlined code of this kind is faster than wrapped > code unless the compiler manages to see the full inlining potential. In > this case the huge memory allocations for the wrapped solutions

[julia-users] Re: julia-i18n: Translators and reviewer needed!

2016-09-28 Thread Ismael Venegas Castelló
Julia website i18n I've made a video of me translating the Julia website, just in case anyone is curious of how the workflow is like, you can help us translate the website to your native language ...one string at a time: -

[julia-users] ClusterManagers timeout

2016-09-28 Thread Matthew Pearce
Hello If I request some nodes using addprocs_slurm, slurm of course enqueues the request. However, if the request is not fulfilled within a certain time, I get a timeout type message from ClusterManagers. Is there a way of telling ClusterManagers I'm prepared to wait (a long time) for my

Re: [julia-users] Re: Why does Julia 0.5 keep complaining about method re-definitions?

2016-09-28 Thread Daniel Carrera
Suppressor.jl would suppress everything, right? So the idea is that one would use `@suppress import("foo.jl")` ? As heavy as ClobberingReload.jl is, I appreciate that it only suppresses *one* error -- the annoying "you redefined a method" error that IMO should never have existed in the first

[julia-users] Re: translating julia

2016-09-28 Thread Ismael Venegas Castelló
I forgot to link the video I mentioned, oops here it is: *https://www.livecoding.tv/ismael-vc/videos/oyvBm-julia-language-website-i18n * Cheers El miércoles, 28 de septiembre de 2016, 2:49:32 (UTC-5), Henri Girard

[julia-users] [ANN] UnicodeFun

2016-09-28 Thread Simon Danisch
Good news everyone! I've written a small library that offers various transformations of text to special Unicode characters. The most prominent one is the latex-string to latex-unicode: "\\itA \\in \\bbR^{nxn}, \\bfv \\in \\bbR^n, \\lambda_i \\in \\bbR: \\itA\\bfv = \\lambda_i\\bfv"==> "퐴 ∈

Re: [julia-users] Re: Why does Julia 0.5 keep complaining about method re-definitions?

2016-09-28 Thread Ismael Venegas Castelló
Daniel indeed Suppressor provides the following macros: @suppress (will suppress both STDERR and STDOUT), @suppress_out (just STDOUT) and @suppress_err (just STDERR), notice that STDERR suppresses warnings but not errors! This can be easily understood reading code in the README: julia> using

[julia-users] Re: translating julia

2016-09-28 Thread Ismael Venegas Castelló
Hello Henri! Currently French is about 0% translated, we are adding to production the languages that at minimum have the home page translated 90 %, but you can see the current progress of all the languages in the staging site here: - http://julialanges.github.io You can see here a

Re: [julia-users] Re: translating julia

2016-09-28 Thread henri.gir...@gmail.com
thanks... Le 28/09/2016 à 10:27, Ismael Venegas Castelló a écrit : I forgot to link the video I mentioned, oops here it is: *https://www.livecoding.tv/ismael-vc/videos/oyvBm-julia-language-website-i18n * Cheers

[julia-users] Re: Broken PyPlot... need to revert to a previous version asap.

2016-09-28 Thread Ferran Mazzanti
Hi, it seems that PyPlot is still broken in 0.5.0 and OSX, at least Mavericks... Anybody else has faced this problem? If yes, how can I solve it? If not, what versions of PyCall/PyPlot are you using? The ones I was told to use here still work, but spit quite a lot of warnings etc... and it is

Re: [julia-users] Re: [ANN] UnicodeFun

2016-09-28 Thread henri.gir...@gmail.com
Not bad at all :) Thanks Henri Le 28/09/2016 à 13:20, Simon Danisch a écrit : The best adhoc solution I could find looks like this: 1̲2̲ ̲/̲ ̲2̲0̲ 200 So not impossible... I'll see how we can integrate this Am Mittwoch, 28. September 2016 12:05:36 UTC+2 schrieb Simon Danisch: Good

Re: [julia-users] Re: Why does Julia 0.5 keep complaining about method re-definitions?

2016-09-28 Thread J Luis
> This a very heavy install. It's fetching tons of things that I have not > used. Not sure what they are, but seems like trashing my system. > Yes, unfortunately Conda is an unbearably big dependency (over 1.xxx Gb) that sneaks in via un-suspicious packages. A dependency this big should

Re: [julia-users] Re: [ANN] UnicodeFun

2016-09-28 Thread henri.gir...@gmail.com
I probably misused it but that what I get (before I add it and checkout) Sorry Henri julia> to_fraction("α² ⋅ α²⁺³ ≡ α⁷", " ℝ: 퐴퐯 = λᵢ퐯") ERROR: Char ² doesn't have a unicode superscript in to_superscript(::Char) at /home/pi/.julia/v0.5/UnicodeFun/src/sub_super_scripts.jl:156 in

Re: [julia-users] Re: Why does Julia 0.5 keep complaining about method re-definitions?

2016-09-28 Thread K leo
julia> Pkg.checkout("ClobberingReload") ERROR: ClobberingReload is not a git repo in checkout(::String, ::String, ::Bool, ::Bool) at ./pkg/entry.jl:225 in (::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#checkout,Tuple{String,String,Bool,Bool}})() at ./pkg/dir.jl:31 in

Re: [julia-users] Re: [ANN] UnicodeFun

2016-09-28 Thread Simon Danisch
That's the short form which works with sub/superscript and will create something like: to_fraction("a-123", 392) == "ᵃ⁻¹²³⁄₃₉₂" For the newline version try: to_fraction_nl("α² ⋅ α²⁺³ ≡ α⁷", " ℝ: 퐴퐯 = λᵢ퐯") I really need to rework the names and documentation ;) 2016-09-28 15:22 GMT+02:00

Re: [julia-users] Re: Why does Julia 0.5 keep complaining about method re-definitions?

2016-09-28 Thread Cedric St-Jean
That's weird, I'm pretty sure that I've had the same issue when I tried it just now, but I can't seem to reproduce it. ClobberingReload is still installed on your system, right? How about this? Pkg.checkout("ClobberingReload", "master") If you want to try IJulia, you should Pkg.add("IJulia")

[julia-users] translating julia

2016-09-28 Thread Henri Girard
I went to french translation startet to translate but can't see it on julialang.org ? it's not actualized ? Regards