Re: [julia-users] Re: deepcopy_internal and arrays

2016-02-25 Thread 'Bill Hart' via julia-users
Thanks. Indeed I missed this in the docs, so no ticket needs to be opened. The fact that overloading deecopy_internal is fully supported is perfectly fine. However, could you please explain to me what is involved in updating dict? I understand an ObjectIdDict is a hash table whose keys are object

[julia-users] Re: Using push! with vector-elements of a matrix ?

2016-02-25 Thread Ilya Orson
Ok, thanks!

[julia-users] Re: Using push! with vector-elements of a matrix ?

2016-02-25 Thread Greg Plowman
matrix = [ Int64[] for i=1:2, j=1:2 ] Friday, February 26, 2016 at 11:51:09 AM UTC+11, Ilya Orson wrote: > > Hello everyone, > > I am working with a matrix of initially empty vectors and wanted to fill > each vector with specific elements using push!, but I get a weird result: > > > matrix = fi

Re: [julia-users] Using push! with vector-elements of a matrix ?

2016-02-25 Thread Yichao Yu
On Thu, Feb 25, 2016 at 7:51 PM, Ilya Orson wrote: > Hello everyone, > > I am working with a matrix of initially empty vectors and wanted to fill > each vector with specific elements using push!, but I get a weird result: > > > matrix = fill(Int64[],2,2) > > 2x2 Array{Array{Int64,1},2}: > Int64[]

[julia-users] Using push! with vector-elements of a matrix ?

2016-02-25 Thread Ilya Orson
Hello everyone, I am working with a matrix of initially empty vectors and wanted to fill each vector with specific elements using push!, but I get a weird result: matrix = fill(Int64[],2,2) 2x2 Array{Array{Int64,1},2}: Int64[] Int64[] Int64[] Int64[] push!(matrix[1,1],3,2) 2-element A

Re: [julia-users] Re: JuliaCon 2016: Second Call For Proposals

2016-02-25 Thread Stefan Karpinski
I believe 2014 was around 80 people. Not sure about 2015 but upwards of 200 sounds right. On Thu, Feb 25, 2016 at 4:49 PM, Pontus Stenetorp wrote: > On 25 February 2016 at 20:12, Cedric St-Jean > wrote: > > > > Out of curiosity, how many people attended last year? > > There are not official num

[julia-users] Re: sizeof confusion and converting arrays

2016-02-25 Thread Jeffrey Sarnoff
as Erik says: immutable Point # immutable is the kind of type to use when you want memory to be immediate x::Cdouble y::Cdouble end a = [Point(0.0, 0.0),Point(0.2,0.3),Point(1.1, 1.3)] sizeof(a) 48 On Thursday, February 25, 2016 at 4:34:20 PM UTC-5, Martin Kuzma wrote: > > I have the the foll

Re: [julia-users] sizeof confusion and converting arrays

2016-02-25 Thread Erik Schnetter
Your type `Point` has in C a layout comparable to `struct*`, not `struct. You could use `immutable Point` instead, and what you're trying to achieve should work. -erik On Thu, Feb 25, 2016 at 4:34 PM, Martin Kuzma wrote: > I have the the following type defined: > > type Point > x::Cdouble > y::C

Re: [julia-users] Re: JuliaCon 2016: Second Call For Proposals

2016-02-25 Thread Pontus Stenetorp
On 25 February 2016 at 20:12, Cedric St-Jean wrote: > > Out of curiosity, how many people attended last year? There are not official numbers by any means, but around 250 in 2015. This was quite a significant increase compared to 2014 when I think we were about 50 people or so. Pontus

[julia-users] sizeof confusion and converting arrays

2016-02-25 Thread Martin Kuzma
I have the the following type defined: type Point x::Cdouble y::Cdouble end Calling sizeof returns 16 as expected. But when I have for example: a = [Point(0.0, 0.0),Point(0.2,0.3),Point(1.1, 1.3)] sizeof returns *24*. But I expected it to return 3 * 16 = *48*. (It looks like in the array are st

[julia-users] `Base.localize_vars` breaks in Julia 0.5?

2016-02-25 Thread Erik Schnetter
The `MPI` package contains this macro: ```Julia macro mpi_do(mgr, expr) expr = Base.localize_vars(:(()->$expr), false) :(mpi_do($(esc(mgr)), $(esc(expr end ``` This fails on the current master with ``` julia> x=1 julia> @mpi_do MPIManager() info(x) ERROR: syntax: unhandled expr (locali

[julia-users] Re: Loading a module without loading its submodules

2016-02-25 Thread Cedric St-Jean
Yes, that would help. On Thursday, February 25, 2016 at 11:48:44 AM UTC-5, Josh Langsfeld wrote: > > Maybe a solution to this kind of design problem would be to allow multiple > top-level modules per package, with syntax to let you load the particular > one you want/need. > > On Thursday, Februa

Re: [julia-users] Re: deepcopy_internal and arrays

2016-02-25 Thread Yichao Yu
On Thu, Feb 25, 2016 at 2:57 PM, Toivo Henningsson wrote: > It seems very reasonable that you should be able to overload deepcopy for a > given type, and that if that has to be done on a specific way, it should be > mentioned in the documentation for deepcopy. Open an issue? Please read the doc

[julia-users] Re: deepcopy_internal and arrays

2016-02-25 Thread Toivo Henningsson
It seems very reasonable that you should be able to overload deepcopy for a given type, and that if that has to be done on a specific way, it should be mentioned in the documentation for deepcopy. Open an issue?

[julia-users] Re: Loading a module without loading its submodules

2016-02-25 Thread Josh Langsfeld
Maybe a solution to this kind of design problem would be to allow multiple top-level modules per package, with syntax to let you load the particular one you want/need. On Thursday, February 25, 2016 at 1:10:28 AM UTC-5, John Myles White wrote: > > I don't think Julia is really amenable to this k

Re: [julia-users] Re: eachindex is much slower than normal indexing for matrices

2016-02-25 Thread Mauro
On Thu, 2016-02-25 at 15:57, J Luis wrote: > Incidentally, this errors in 0.5 (but works fine in 0.4) > > julia> s=0.0; > > julia> m=rand(1,1000); > > julia> @time for el in m >s = s + el >end > ERROR: UndefVarError: s not defined > [inlined code] from .\none:2 > in anonymous a

Re: [julia-users] eachindex is much slower than normal indexing for matrices

2016-02-25 Thread J Luis
Nope julia> s=0.0; julia> m=rand(1,1000); julia> @time for i in 1:1, j in 1:1000 s = s + m[i,j] end ERROR: UndefVarError: s not defined [inlined code] from .\none:2 in anonymous at .\no file:4294967295 in eval at :0 quinta-feira, 25 de Fevereiro de 2016 às 14:58:44 UT

Re: [julia-users] eachindex is much slower than normal indexing for matrices

2016-02-25 Thread Yichao Yu
On Thu, Feb 25, 2016 at 9:57 AM, Yichao Yu wrote: > On Thu, Feb 25, 2016 at 9:33 AM, abc wrote: >> Ah, yes, this seems to have fixed the problem, thank you. >> >> Now, when not in global scope, using eachindex is definitely the fastest >> approach. >> I made some measurements over 1000 runs for e

Re: [julia-users] eachindex is much slower than normal indexing for matrices

2016-02-25 Thread Yichao Yu
On Thu, Feb 25, 2016 at 9:33 AM, abc wrote: > Ah, yes, this seems to have fixed the problem, thank you. > > Now, when not in global scope, using eachindex is definitely the fastest > approach. > I made some measurements over 1000 runs for each of the approaches in the > original post, here are the

[julia-users] Collecting user codes for indexing benchmarks

2016-02-25 Thread Viral Shah
Hello all, I am collecting as many user codes as I can lay my hands on for the Indexing benchmarks. Primarily the goal is to evaluate array views and performance / correctness impacts. If this effort is successful, it will also create a body of user codes that we can use for longer term perfo

[julia-users] Re: eachindex is much slower than normal indexing for matrices

2016-02-25 Thread J Luis
Incidentally, this errors in 0.5 (but works fine in 0.4) julia> s=0.0; julia> m=rand(1,1000); julia> @time for el in m s = s + el end ERROR: UndefVarError: s not defined [inlined code] from .\none:2 in anonymous at .\no file:4294967295 in eval at :0 quinta-f

Re: [julia-users] eachindex is much slower than normal indexing for matrices

2016-02-25 Thread abc
Ah, yes, this seems to have fixed the problem, thank you. Now, when not in global scope, using eachindex is definitely the fastest approach. I made some measurements over 1000 runs for each of the approaches in the original post, here are the averages: Using eachindex: 0.0026683 Using ranges: 0.

[julia-users] ANN: StringEncodings.jl v0.1.0

2016-02-25 Thread Milan Bouchet-Valat
I'm glad to announce you that I recently tagged a new package called StringEncodings.jl. As its name implies, it allows converting text between character encodings: this includes decoding vectors of bytes to Julia strings, encoding strings to such vectors, as well as reading from and writing to enc

Re: [julia-users] eachindex is much slower than normal indexing for matrices

2016-02-25 Thread Stefan Karpinski
Can you try it not in global scope? On Thu, Feb 25, 2016 at 5:17 AM, abc wrote: > For the following matrix > my_matrix = randn(1, 1000) > using eachindex to access all elements is much slower than using ranges > or even for el in my_matrix, even though it says in the documentation ( > http:/

[julia-users] C REPL for Keno's Cxx.jl?

2016-02-25 Thread Scott Jones
At JuliaCon 2015 this last summer, after seeing Keno's presentation on Cxx, some of us were talking about how it would be nice to also have a simpler C REPL for Julia, just like his C++ REPL in Cxx.jl. People even said that having the C REPL like that would even be something they'd be happy to pa

[julia-users] eachindex is much slower than normal indexing for matrices

2016-02-25 Thread abc
For the following matrix my_matrix = randn(1, 1000) using eachindex to access all elements is much slower than using ranges or even for el in my_matrix, even though it says in the documentation (http://docs.julialang.org/en/release-0.4/stdlib/arrays/#Base.eachindex) that eachindex uses rang

Re: [julia-users] Adding the same functionality / variables into many functions

2016-02-25 Thread Michael Borregaard
I am relieved to hear you what not use it in practice, I was trying really hard to grasp the utility of it :-) It is a very elegant piece of code, though. Den torsdag den 25. februar 2016 kl. 01.18.16 UTC+1 skrev Tom Breloff: > > I think he was just referring to the fact that it's "one more thin