Re: [julia-users] Re: Mathematical Computing course in Julia

2016-04-16 Thread Tamas Papp
On Fri, Apr 15 2016, Daniel Carrera wrote: > As for jupyterhub, I honestly had not heard of it until you mentioned it > just now. The website says that it's a multi-user server. I definitely > don't want to go down that route. I wouldn't want to be responsible for > running a server where students

[julia-users] Re: SIMD multicore

2016-04-16 Thread Valentin Churavy
Blas is using a combination of SIMD and multi-core processing. Multi-core (threading) is coming in Julia v0.5 as an experimental feature. On Saturday, 16 April 2016 14:13:00 UTC+9, Jason Eckstein wrote: > > I noticed in Julia 4 now if you call A+B where A and B are matrices of > equal size, the

Re: [julia-users] Re: Mathematical Computing course in Julia

2016-04-16 Thread Daniel Carrera
On 16 April 2016 at 10:33, Tamas Papp wrote: > > In a university you usually have an IT department who would maintain the > server; it is very unusual that these kind of tasks would be the > responsibility of the lecturer. Many universities already run Jupyter so > it is easy to add Julia, and if

[julia-users] build.jl help

2016-04-16 Thread Bart Janssens
Hi, I use CMake to build code from the deps directory using BinDeps. An issue with this is that when the C++ code is changed, the package is not rebuilt because the existence of the library is still detected. Is there an elegant way to force a make each time Pkg.build is called? The only way I

Re: [julia-users] Re: Mathematical Computing course in Julia

2016-04-16 Thread Sheehan Olver
I had IJulia installed on our lab machines in a shared folder specified in LOAD_PATH. Then had the students copy the Jupyter config file to their local directory. This way they could each run their own Jupyter server. This has worked fairly well. If students want to install on their own mach

Re: [julia-users] Re: Mathematical Computing course in Julia

2016-04-16 Thread Tim Holy
I agree line numbers have been a persistent problem in julia. In a language that inlines as aggressively as julia, and uses macros and metaprogramming to generate code, it's not a trivial problem---in some cases you might even wonder what "line number" really means. Fortunately, you'll be pleas

[julia-users] Re: Int or Int64

2016-04-16 Thread Páll Haraldsson
On Wednesday, April 13, 2016 at 9:27:00 AM UTC, Bill Hart wrote: > > Int is either Int32 or Int64, depending on the machine. Int64 does still > seem to be defined on a 32 bit machine. In fact, even Int128 is defined. > Yes, this is all safe when you only have one thread, but if you plan for the

Re: [julia-users] Re: Mathematical Computing course in Julia

2016-04-16 Thread Peter Kovesi
Thanks Tim. That is very good news indeed! On Saturday, April 16, 2016 at 6:57:51 PM UTC+8, Tim Holy wrote: > > I agree line numbers have been a persistent problem in julia. In a > language > that inlines as aggressively as julia, and uses macros and metaprogramming > to > generate code, it's

Re: [julia-users] Re: Parametric types which add or delete fields.

2016-04-16 Thread Eric Forgy
Thank you Tim! That is some excellent wisdom. I appreciate that and shared it with my team. On Friday, April 15, 2016 at 10:35:02 PM UTC+8, Tim Holy wrote: > > Your best bet is always to benchmark. Here's how I make such decisions: > > # The type-based system: > julia> immutable Container1{T}

[julia-users] Re: Vectorised usage of Compose

2016-04-16 Thread Christoph Ortner
so for those who are interested, I found a partial solution in how VoronoiDelaunay plots meshes. Basically, one can interrupt lines and polygons using NaNs. For example: points = Tuple{Float64, Float64}[] for n = 1:size(T, 2) p = [X[:, T[:, n]] X[:, T[1,n]]] for m = 1:size(p, 2) p

[julia-users] logic operations

2016-04-16 Thread digxx
Say I have 2 arrays A=[1,2,3,4,5,6] B=[1,6,7] and the resulting array C=[2,3,4,5] = A NOT B results from a logical operation Is there already something implemented like this?

[julia-users] Re: logic operations

2016-04-16 Thread Matt Bauman
If I understand correctly, it looks like you're describing `C = setdiff(A, B)`. http://docs.julialang.org/en/release-0.4/stdlib/collections/#Base.setdiff On Saturday, April 16, 2016 at 12:05:39 PM UTC-4, digxx wrote: > > Say I have 2 arrays > A=[1,2,3,4,5,6] > B=[1,6,7] > and the resulting arra

[julia-users] Re: logic operations

2016-04-16 Thread STAR0SS
I think you are looking for symdiff : http://docs.julialang.org/en/release-0.4/stdlib/collections/?highlight=intersect#Base.symdiff

[julia-users] Re: logic operations

2016-04-16 Thread Lutfullah Tomak
I think setdiff does what you want. Ref http://docs.julialang.org/en/release-0.4/stdlib/collections/#Base.setdiff On Saturday, April 16, 2016 at 7:05:39 PM UTC+3, digxx wrote: > > Say I have 2 arrays > A=[1,2,3,4,5,6] > B=[1,6,7] > and the resulting array > C=[2,3,4,5] = A NOT B results from a log

[julia-users] Re: logic operations

2016-04-16 Thread digxx
Thx, setdiff is what I want. symdiff seems to do symdiff(A,B)=sort([setdiff(A,B),setdiff(B,A)]) Am Samstag, 16. April 2016 18:05:39 UTC+2 schrieb digxx: > > Say I have 2 arrays > A=[1,2,3,4,5,6] > B=[1,6,7] > and the resulting array > C=[2,3,4,5] = A NOT B results from a logical operation > Is the

[julia-users] Pkg.update() error

2016-04-16 Thread digxx
When using Pkg.update() I had these errors. I was just wondering coz I didnt have these before!? What went wrong and what do I need to do? julia> Pkg.update() INFO: Updating METADATA... INFO: Updating cache of ColorTypes... INFO: Updating cache of DistributedArrays... INFO: Updating cache of Cont

[julia-users] Re: Pkg.update() error

2016-04-16 Thread digxx
As a sidenote: I do have Conda installed? Should I maybe NOT use Pkg anymore then? Am Samstag, 16. April 2016 19:59:46 UTC+2 schrieb digxx: > > When using Pkg.update() I had these errors. I was just wondering coz I > didnt have these before!? > What went wrong and what do I need to do? > >

[julia-users] Re: asynchronous reading from file

2016-04-16 Thread James Fairbanks
Hi Tomas, tomas writes: > the skeleton of my current implementation looks like this > > rr = RemoteChannel() > @async put!(rr, remotecall_fetch(loaddata,2) > > for ii in 1:maxiter > #do some steps of the gradient descend > > #check if the data are ready and schedule next reading > if isready(rr)

[julia-users] worker waiting???

2016-04-16 Thread digxx
When accessing a SharedArray do the other workers wait when at one moment in time a specific worker is changing some entry another worker would like to access to too? for example power=SharedArray(Int64,10) @parallel for i=1,100 if power(1)==0 power(1) = something end end

[julia-users] Re: worker waiting???

2016-04-16 Thread digxx
Sry, I accidentally sent my post. So the above version seems to run berserker if i put an @sync infront of @parallel it seems to work, but does it really?

Re: [julia-users] Re: worker waiting???

2016-04-16 Thread Yichao Yu
On Sat, Apr 16, 2016 at 5:35 PM, digxx wrote: > Sry, I accidentally sent my post. > So the above version seems to run berserker > if i put an @sync infront of @parallel it seems to work, but does it really? It's not vary clear from your code above what you want to do although there's a few things

[julia-users] Re: Pkg.update() error

2016-04-16 Thread Steven G. Johnson
Looks like you are hitting #13458, but this was fixed in #13506 and should have been backported in Julia 0.4.1? What version of Julia are you using? In any case, just retrying Pkg.update() from a fresh Julia session should fix it. On Saturday, April 16, 2016 at 2:03:52 PM UTC-4, digxx wrote: >

Re: [julia-users] Re: Mathematical Computing course in Julia

2016-04-16 Thread Steven G. Johnson
On Saturday, April 16, 2016 at 12:44:54 AM UTC-4, Daniel Carrera wrote: > > Is there a way to try out your instructions on a computer where I have > previously installed IJulia and PyPlot? Or do I have to remove and re-add > IJulia and PyPlot? > Yes, just substitute Pkg.build for Pkg.add in my

[julia-users] What is the proper way to allocate and free C struct?

2016-04-16 Thread Andrei Zh
I have a question regarding Struct Type correspondences section of the documentation. Let's say, in a C library we have a struct like this: typedef struct { int rows; int cols; doubl

Re: [julia-users] What is the proper way to allocate and free C struct?

2016-04-16 Thread Yichao Yu
On Sat, Apr 16, 2016 at 6:55 PM, Andrei Zh wrote: > I have a question regarding Struct Type correspondences section of the > documentation. Let's say, in a C library we have a struct like this: > > typedef struct { > int rows; > int cols; > double* data; > } xmatrix; > > In C code it can be

[julia-users] Re: SIMD multicore

2016-04-16 Thread Jason Eckstein
I often use julia muticore features with pmap and @parallel for loops. So the best way to achieve this is to split the array up into parts for each core and then run SIMD loops on each parallel process? Will there ever by a time when you can add a tag like SIMD that will have the compiler aut

Re: [julia-users] What is the proper way to allocate and free C struct?

2016-04-16 Thread Andrei Zh
This is exactly the answer I hoped to see! Thanks a lot! On Sunday, April 17, 2016 at 2:46:15 AM UTC+3, Yichao Yu wrote: > > On Sat, Apr 16, 2016 at 6:55 PM, Andrei Zh > wrote: > > I have a question regarding Struct Type correspondences section of the > > documentation. Let's say, in a C librar

[julia-users] How to delete multiple keys from a dictionary

2016-04-16 Thread Anonymous
The question basically says it all, delete!(mydict, key), will delete a single key, but how do I pass a vector of keys to delete! in order to delete multiple keys at once?

Re: [julia-users] How to delete multiple keys from a dictionary

2016-04-16 Thread Yichao Yu
On Sat, Apr 16, 2016 at 10:19 PM, Anonymous wrote: > The question basically says it all, delete!(mydict, key), will delete a > single key, but how do I pass a vector of keys to delete! in order to delete > multiple keys at once? Just write a loop should work and be fast.

[julia-users] Re: SIMD multicore

2016-04-16 Thread Chris Rackauckas
BLAS functions are painstakingly developed to be beautiful bastions of parallelism (because of how ubiquitous their use is). The closest I think you can get is ParallelAccelerator.jl's @acc which does a lot of optimizations all together. However, it still won't match BLAS in terms of its effici

Re: [julia-users] Re: SIMD multicore

2016-04-16 Thread Jiahao Chen
Yes, optimized BLAS implementations like MKL and OpenBLAS use vectorization heavily. Note that matrix addition A+B is fundamentally a very different beast from matrix multiplication A*B. In the former you have O(N^2) work and O(N^2) data, so the ratio of work to data is O(1). It is very likely