Re: [julia-users] Re: Julia-i18n logo proposal

2016-10-04 Thread Avik Sengupta
>Or just remove the J and put the three characters from the other scripts? +1. I like this. On Tuesday, 4 October 2016 08:58:10 UTC+1, Waldir Pimenta wrote: > > That's an interesting idea. And Arabic tends to be associated with the > color green (well, Islam moreso >

[julia-users] efficiently add floats to a particular element of a vector

2016-10-04 Thread Jeff
Adding floats to an element of a vector takes about twice as long as adding float to a variable. For example, ``` val = zeros(1) for i in 1:1000 val[1] += 9. end ``` finishes in 0.034 seconds whereas ``` a = 0. for i in 1:1000 a += 9. end ``` take

Re: [julia-users] efficiently add floats to a particular element of a vector

2016-10-04 Thread Yichao Yu
On Tue, Oct 4, 2016 at 3:11 PM, Jeff wrote: > Adding floats to an element of a vector takes about twice as long as adding > float to a variable. For example, > > ``` > val = zeros(1) > for i in 1:1000 > val[1] += 9. > end > ``` > finishes in 0.034 seconds

[julia-users] Re: memory allocation in nested loops

2016-10-04 Thread Christoph Ortner
also look at `StaticArrays` and `reinterpret` E.g., R = reinterpret(SVector{3,Float64}, r, m) I use this a lot and find it very convenient.

Re: [julia-users] efficiently add floats to a particular element of a vector

2016-10-04 Thread Jeff
Ah, of course. Thanks! On Tuesday, October 4, 2016 at 12:20:08 PM UTC-7, Yichao Yu wrote: > > On Tue, Oct 4, 2016 at 3:11 PM, Jeff > wrote: > > Adding floats to an element of a vector takes about twice as long as > adding > > float to a variable. For example, > > > >

Re: [julia-users] Gadfly plots no longer showing in Juno

2016-10-04 Thread Mike Innes
Try Pkg.checkout("Gadfly"). We recently moved the integration code from Atom to Gadfly, but I guess Gadfly hasn't been tagged yet. On Tue, 4 Oct 2016 at 19:14 James Noeckel wrote: > With the latest update, it seems that display(::Gadfly.Plot) no longer > opens a plot tab in

Re: [julia-users] Gadfly plots no longer showing in Juno

2016-10-04 Thread James Noeckel
Thanks for the prompt response. On Tuesday, October 4, 2016 at 2:17:19 PM UTC-4, Mike Innes wrote: > > Try Pkg.checkout("Gadfly"). We recently moved the integration code from > Atom to Gadfly, but I guess Gadfly hasn't been tagged yet. > > On Tue, 4 Oct 2016 at 19:14 James Noeckel

[julia-users] Gadfly plots no longer showing in Juno

2016-10-04 Thread James Noeckel
With the latest update, it seems that display(::Gadfly.Plot) no longer opens a plot tab in the Atom editor. Instead, it prints the contents of the plot object in the console. Gadfly is Juno's preferred plotting environment, but I don't know if this is an issue with Gadfly.jl or Atom.jl. Can

Re: [julia-users] Simple test functions generates different codegen

2016-10-04 Thread mmh
Ah right, I forgot @code_lowered even existed , thanks for that. Yeah gcc/clang all have the same native code from this snippet, which is why I was surprised that the same julia code was produced different code native. On Tuesday, October 4, 2016 at 9:13:17 AM UTC-4, Isaiah wrote: > > These

Re: [julia-users] Re: Julia-i18n logo proposal

2016-10-04 Thread mmh
Cool logo, IMO the "J" at the top looks a little out of place and not balanced with the other two glyphs

Re: [julia-users] Re: Julia-i18n logo proposal

2016-10-04 Thread Waldir Pimenta
That's an interesting idea. And Arabic tends to be associated with the color green (well, Islam moreso , but the correlation is pretty high nevertheless), so we'd also get a nice pairing of character-color as with the Chinese one :) Looking

[julia-users] memory allocation in nested loops

2016-10-04 Thread Niccolo' Antonello
Hi all, I'm trying to make this code to go faster: n,m = 100,25 f = 100 d = randn(3,n) r = randn(3,m) Y = zeros(Complex{Float64},f,m) X = ones(f,n)+im*ones(f,n) function nested_loop!(Y::Array{Complex{Float64}},X::Array{Complex{Float64}},

Re: [julia-users] Subset a DataFrame without a #NULL value in a column

2016-10-04 Thread Milan Bouchet-Valat
Le lundi 03 octobre 2016 à 18:14 -0700, Min-Woong Sohn a écrit : > Previously, under DataArray, I could do > > df2 = df[!isna(df[:somvar),:] > > Is there a NullableArray equivalent to isna()? I've tried isnull(), > which is not defined. isnull() is defined in Julia Base. But it's not a

Re: [julia-users] Subset a DataFrame without a #NULL value in a column

2016-10-04 Thread Min-Woong Sohn
Thank you. On Tuesday, October 4, 2016 at 6:05:22 AM UTC-4, Milan Bouchet-Valat wrote: > > Le lundi 03 octobre 2016 à 18:14 -0700, Min-Woong Sohn a écrit : > > Previously, under DataArray, I could do > > > > df2 = df[!isna(df[:somvar),:] > > > > Is there a NullableArray equivalent to isna()?

[julia-users] Re: memory allocation in nested loops

2016-10-04 Thread Niccolo' Antonello
what is the best way to slice an array without allocating? I thank you! On Tuesday, October 4, 2016 at 1:20:29 PM UTC+2, Kristoffer Carlsson wrote: > > The slicing of "r" will also make a new array and thus allocate.

Re: [julia-users] Simple test functions generates different codegen

2016-10-04 Thread Isaiah Norton
These expressions are lowered differently because `test2` gets a temporary due to the conditional reassignment of `u`, whereas `test1` is just a straight line switch and jump (look at `code_lowered` and `code_typed`). For the same C code, the lowered IR from Clang looks similar, but it appears to

[julia-users] Re: memory allocation in nested loops

2016-10-04 Thread 'Greg Plowman' via julia-users
You haven't passed in r as argument to function. Try nested_loop!(Y,X,d,r,n,m,f) On Tuesday, October 4, 2016 at 8:05:41 PM UTC+11, Niccolo' Antonello wrote: > Hi all, > > I'm trying to make this code to go faster: > > n,m = 100,25 > f = 100 > d = randn(3,n) > r = randn(3,m) > > Y =

[julia-users] Re: memory allocation in nested loops

2016-10-04 Thread Kristoffer Carlsson
The slicing of "r" will also make a new array and thus allocate.

[julia-users] ANN: LLVM.jl, wrapper of the LLVM C API

2016-10-04 Thread Tim Besard
Hi all, LLVM.jl wraps the C API of the LLVM compiler toolkit. I've decided to wrap this API because is more stable than the C++ one, and easier to use (ie. with Cxx.jl currently being relatively hard to build). It forms a relatively shallow wrapper around

[julia-users] Re: memory allocation in nested loops

2016-10-04 Thread Niccolo' Antonello
Thank you so much both of you! On Tuesday, October 4, 2016 at 1:20:29 PM UTC+2, Kristoffer Carlsson wrote: > > The slicing of "r" will also make a new array and thus allocate.

[julia-users] Re: memory allocation in nested loops

2016-10-04 Thread Andrew
You can do view(r, :, i_2) in 0.5. I think slice does the same thing in 0.4. Also as a general point, you would have realized you hadn't defined r in the function if you had wrapped your entire program in a function, like function test() (your code) end test() This would throw an error with your

[julia-users] Re: memory allocation in nested loops

2016-10-04 Thread 'Greg Plowman' via julia-users
Not sure what the best way is, especially on Julia 0.5 where maybe some sort of view. But you could always use an Array of Arrays if you don't really need a true multi-dimensional array elsewhere: d = randn(3,n) d2 = [ d[:,i]::Vector{Float64} for i=1:n ] r = randn(3,m) r2 = [

[julia-users] Error showing value

2016-10-04 Thread alx
Hi, I do wrong, please -- using PyCall type One o::PyObject One() = new( PyObject(1) ) end Base.show(io::IO, n::One) = print(io, n) n=One() Error showing value of type One: ERROR: StackOverflowError: in print(::IOContext{Base.Terminals.TTYTerminal}, ::One) at ./strings/io.jl :7 in

Re: [julia-users] Re: Julia-i18n logo proposal

2016-10-04 Thread Islam Badreldin
+1 for the letters 'جو' in the green circle. (Yes, these are two letters, a consonant and a vowel!) Another option is to only use the first single letter 'ج', or its modern variation 'چ', which would be the equivalent of 'J' in Arabic. Personally, I think it'd look nicer too. Thanks,Islam PS:

[julia-users] Re: String(Vector{UInt8}) Question

2016-10-04 Thread joshbode
OK, I understand now: they're continuation bytes for UTF-8 and can't appear in that context so they get stripped from the string representation. On Wednesday, October 5, 2016 at 2:38:54 PM UTC+11, josh...@fastmail.com wrote: > > Hello julia-users, > > I'm scratching my head as to the following

[julia-users] String(Vector{UInt8}) Question

2016-10-04 Thread joshbode
Hello julia-users, I'm scratching my head as to the following behaviour with using String on a Vector of UInt8 values: for x in 0x00:0xff print("$(lpad(x, 5)): ") print(length(String([x]))) if (x + 1) % 8 == 0 println() end end which on OS X and Linux using Julia 0.5 yields: 0:

[julia-users] Re: Error showing value

2016-10-04 Thread alx
Oh, thanks El martes, 4 de octubre de 2016, 18:21:17 (UTC+2), Kristoffer Carlsson escribió: > > Restart julia and try again with my version.

[julia-users] Re: Error showing value

2016-10-04 Thread Kristoffer Carlsson
Did you mean Base.show(io::IO, n::One) = print(io, n.*o*)? On Tuesday, October 4, 2016 at 4:21:57 PM UTC+2, alx wrote: > > Hi, I do wrong, please > > -- > using PyCall > > type One > o::PyObject > One() = new( PyObject(1) ) > end > > Base.show(io::IO, n::One) = print(io, n) > > n=One() > >

[julia-users] Re: Error showing value

2016-10-04 Thread alx
also it gives me error El martes, 4 de octubre de 2016, 17:53:52 (UTC+2), Kristoffer Carlsson escribió: > > Did you mean > > Base.show(io::IO, n::One) = print(io, n.*o*)? > > On Tuesday, October 4, 2016 at 4:21:57 PM UTC+2, alx wrote: >> >> Hi, I do wrong, please >> >> -- >> using PyCall >> >>

[julia-users] Re: Error showing value

2016-10-04 Thread Kristoffer Carlsson
Restart julia and try again with my version.

[julia-users] Re: memory allocation in nested loops

2016-10-04 Thread Niccolo' Antonello
Thank you so much for all your help! ;) On Tuesday, October 4, 2016 at 4:12:43 PM UTC+2, Greg Plowman wrote: > > Not sure what the best way is, especially on Julia 0.5 where maybe some > sort of view. > > But you could always use an Array of Arrays if you don't really need a > true

[julia-users] Re: Ancient Gfortran/GCC version in Travis-CI image

2016-10-04 Thread Helge Eichhorn
Thanks Tony, that worked! Here is my new Travis config for the public record: https://github.com/KosmosML/LLEA.jl/blob/a2ea6ffa80f8a8d8c2f3198ec94a26136281c3ee/.travis.yml Am Montag, 3. Oktober 2016 23:44:50 UTC+2 schrieb Tony Kelman: > > Check the travis docs for the apt sources and packages