Re: [julia-users] Arrays as streams / consuming data with take et al

2015-11-09 Thread Yichao Yu
On Mon, Nov 9, 2015 at 8:04 AM, andrew cooke wrote: > > https://github.com/andrewcooke/StatefulIterators.jl FYI, one way to make this more efficient is to parametrize the iterator. You could easily do this for Array's. In the more general case, you needs type inference to get

Re: [julia-users] Arrays as streams / consuming data with take et al

2015-11-09 Thread andrew cooke
https://github.com/andrewcooke/StatefulIterators.jl On Monday, 9 November 2015 06:24:14 UTC-3, andrew cooke wrote: > > thanks! > > On Sunday, 8 November 2015 22:40:53 UTC-3, Yichao Yu wrote: >> >> On Sun, Nov 8, 2015 at 8:11 PM, andrew cooke wrote: >> > I'd like to be able

[julia-users] Using Meshes.ji

2015-11-09 Thread Ashley Kleinhans
Hi, I am new at this - but have decided that Julia is my language of choice. So I begin silly question stage: Could someone talk me through how to access and display an .obj file? I have gotten so far: using Meshes using PyPlot using FileIO using MeshIO obj = load(filename) vts =

[julia-users] Re: ANN: Julia 0.4.1 and 0.3.12 released

2015-11-09 Thread Tony Kelman
>From extracting them and looking around via windirstat or du --max-depth=N, most of the difference is due to the newer bundled version of Git in 0.4.1. Hopefully this will fix more issues than it might cause, but let me know if anything seems out of the ordinary. It looks like the embedded

[julia-users] Re: Escher Spinner

2015-11-09 Thread Brandon Miller
That example was exactly what I needed. I rewrote logic and implemented a busy signal as you recommended. After much reading on Reactive.jl I have a working spinner using the same technique as you used for enabling/disabling the button in mc.jl. Thank's for the help (and for contributing

[julia-users] Re: Google releases TensorFlow as open source

2015-11-09 Thread Phil Tomson
Looks like they used SWIG to create the Python bindings. I don't see Julia listed as an output target for SWIG. On Monday, November 9, 2015 at 1:02:36 PM UTC-8, Phil Tomson wrote: > > Google has released it's deep learning library called TensorFlow as open > source code: > >

Re: [julia-users] Do I have simd?

2015-11-09 Thread DNF
On Monday, November 9, 2015 at 10:14:24 PM UTC+1, DNF wrote: > > Thanks a lot. That indeed works. > Oh, and by "that", I mean installing the Julia 0.4.1 app.

Re: [julia-users] Do I have simd?

2015-11-09 Thread Rob J. Goedman
Great! I just removed all of /usr/local/Cellar, did a full 'brew install julia’, but it still fails. Will file an issue. Regards, Rob > On Nov 9, 2015, at 1:15 PM, DNF wrote: > > On Monday, November 9, 2015 at 10:14:24 PM UTC+1, DNF wrote: > Thanks a lot. That indeed

Re: [julia-users] Do I have simd?

2015-11-09 Thread DNF
Thanks a lot. That indeed works. The speedup is not particularly large, and varies quite a bit, from 1.5 to 3 times speedup. But it *is* working, and code_llvm reports a vector block. Though performance isn't all that impressive, at least I know there is nothing fundamentally stopping the SIMD

[julia-users] libgit2 and proxies

2015-11-09 Thread Tony Kelman
Your colleague also hit this https://github.com/JuliaLang/julia/issues/13472 It should be possible to work around by commenting out a restrictive pkg-config path setting in one of the makefiles and rebuilding libgit2 with libcurl support. We could remove the setting if many people are hitting

[julia-users] Re: Distribute a Julia application without exposing the cose

2015-11-09 Thread Lee Bates
> > Hi Palli, > I have taken your advice and started looking at using Escher and a server (and possibly a virtual machine if the user requires the computations are done locally). As for compiling the code; I have managed to compile a julia script that solves an LP using JuMP and Cbc (I

[julia-users] Re: libgit2 and proxies

2015-11-09 Thread Kiran Pamnany
Thanks Tony!

Re: [julia-users] Using Meshes.ji

2015-11-09 Thread Steve Kelly
The faces can be accessed with faces(load("foo.obj")) or mesh.faces. Probably the easiest way to display the mesh at this point is with ThreeJS.jl: https://github.com/rohitvarkey/ThreeJS.jl/blob/master/examples/mesh.jl. This approach should work in IJulia and Blink. GLVisualize has some good

Re: [julia-users] Array comprehension cannot detect type?

2015-11-09 Thread rizalzaf
It does work. Thank you so much Glen. Rizal On Mon, Nov 9, 2015 at 10:53 AM, Glen O wrote: > Does the assertion form work any better? > > K=[dot(X[:,i],X[:,j])::Float64 for i=1:5, j=1:5] > > > > On Tuesday, 10 November 2015 02:51:35 UTC+10, rizal zaini wrote: >> >> When I

[julia-users] Re: DataFrame to JSON

2015-11-09 Thread JobJob
It doesn't pretty print, but is there anything wrong with this: using JSON json([[string(col)=> df[col][row] for col in names(df)] for row in 1:nrow(df)]) Just to break it down, this part creates the dictionary for each row: [string(col)=> df[col][row] for col in names(df)] and

[julia-users] PyPlot won't close first figure drawn

2015-11-09 Thread lewis
Not getting any answers to a weird problem. PyPlot won't close the first figure it creates. Subsequent figures can be created and closed. gcf will not return a valid id for the first figure drawn. plt[:get_fignums]() won't return a value for the first figure (e.g.--the first figure is not

[julia-users] Re: no one knows this.....

2015-11-09 Thread lewis
Thanks! On Thursday, October 29, 2015 at 8:22:32 PM UTC-7, Steven G. Johnson wrote: > > A direct translation of the Python code works fine for me (with the > default TkAgg backend on MacOS): > > one = figure(1) > plot(1:4) > two = figure(2) > scatter(randn(25),randn(25)) > figure(1) >

Re: [julia-users] Arrays as streams / consuming data with take et al

2015-11-09 Thread andrew cooke
hmmm. maybe i'm doing it wrong as that only gives a factor of 2 speedup. anyway, it's all i need for now, i may return to this later. thanks again, andrew On Monday, 9 November 2015 14:11:55 UTC-3, andrew cooke wrote: > > > yes, i'm about to do it for arrays (i don't care about performance

[julia-users] Re: PyPlot won't close first figure drawn

2015-11-09 Thread Ethan Anderes
I have noticed something similar. For example, if I do: julia> using PyPlot julia> figure(1) julia> plot(sin(1:10)) julia> figure(2) julia> plot(cos(1:10)) then close the first figure (by clicking the red button with my mouse) I get a spinning beach ball. I’m on OSX 10.11.1 using

[julia-users] Re: Type stability with eigs

2015-11-09 Thread David Gleich
Thanks. I'll do that. Might try hacking a bit to see if I can work around it by directly calling ARPACK too. David On Monday, November 9, 2015 at 3:28:11 AM UTC-5, Tomas Lycken wrote: > > This actually seems to be a type instability issue in Base.eigs: > > julia> @code_warntype eigs(A) >

[julia-users] Array comprehension cannot detect type?

2015-11-09 Thread rizal zaini
Hi all I want to create matrix containing dot products julia> X = rand(5,5) 5x5 Array{Float64,2}: 0.274799 0.564619 0.915595 0.341059 0.57361 0.0806822 0.293939 0.379279 0.608582 0.652441 0.264678 0.532751 0.289088 0.457759 0.492777 0.338560.495587 0.499099 0.548237

Re: [julia-users] Array comprehension cannot detect type?

2015-11-09 Thread Kristoffer Carlsson
Don't run the code in global scope or alternatively be explicit about the type you want, for example Float64[] On Monday, November 9, 2015 at 5:42:15 PM UTC+1, rizal zaini wrote: > > My concern is also on parallel code: > > julia> K = @parallel [dot(X[:,i], X[:,j]) for i=1:5, j=1:5] 5x5 >

Re: [julia-users] Re: CUDART and CURAND problem on running the same "do" loop twice

2015-11-09 Thread Joaquim Masset Lacombe Dias Garcia
if I load: using CUDArt using CURAND and then I run either: d_a = curand(Float64, 1000); a = to_host(d_a); OR: result = devices(dev->capability(dev)[1]>=2) do devlist end I can repeat the block as many time I want. However if I run both combined (or alternatedly in any order): d_a =

Re: [julia-users] Array comprehension cannot detect type?

2015-11-09 Thread John Gibson
I'm no Julia expert, but I'm pretty certain this fall under the category "If you Julia to optimize, put your code in a function." gibson@timaeus$ ~/packages/julia-0.4.0/bin/julia _ _ _ _(_)_ | A fresh approach to technical computing (_) | (_) (_)|

Re: [julia-users] Arrays as streams / consuming data with take et al

2015-11-09 Thread andrew cooke
yes, i'm about to do it for arrays (i don't care about performance right now, but i want to implement read with type conversion and so need the types). On Monday, 9 November 2015 11:20:47 UTC-3, Yichao Yu wrote: > > On Mon, Nov 9, 2015 at 8:04 AM, andrew cooke > wrote: >

[julia-users] Re: Array comprehension cannot detect type?

2015-11-09 Thread Glen O
As far as I'm aware, there are two nice ways to tell the comprehension the type that is going to be returned. Option 1: Tell it the type of the comprehension: K = Float64[dot(X[:,i], X[:,j]) for i=1:5, j=1:5] Option 2: Assert the type of the return of "dot" K = [dot(X[:,i],X[:,j])::Float64

Re: [julia-users] Array comprehension cannot detect type?

2015-11-09 Thread rizalzaf
When I put that code inside a function, I got the same behavior. For single process, K = Float64[dot(X[:,i], X[:,j]) for i=1:5, j=1:5] does the job. But for parallel I got error: "ERROR: malformed @parallel loop" Rizal On Mon, Nov 9, 2015 at 10:48 AM, Kristoffer Carlsson

Re: [julia-users] Array comprehension cannot detect type?

2015-11-09 Thread Glen O
Does the assertion form work any better? K=[dot(X[:,i],X[:,j])::Float64 for i=1:5, j=1:5] On Tuesday, 10 November 2015 02:51:35 UTC+10, rizal zaini wrote: > > When I put that code inside a function, I got the same behavior. > > For single process, K = Float64[dot(X[:,i], X[:,j]) for i=1:5,

Re: [julia-users] Arrays as streams / consuming data with take et al

2015-11-09 Thread Dan
XXX in your questions = chain. Or more clearly: julia> stream = chain([1,2,3,4,5]) Iterators.Chain(Any[[1,2,3,4,5]]) julia> collect(take(stream, 3)) 3-element Array{Any,1}: 1 2 3 On Monday, November 9, 2015 at 7:47:51 PM UTC+2, andrew cooke wrote: > > > hmmm. maybe i'm doing it wrong as

[julia-users] Re: ANN: Julia 0.4.1 and 0.3.12 released

2015-11-09 Thread bernhard
Out of curiosity: why is this release 54mb (up from 40mb for 0.4). I am referring to the file size of the Win 64bit binaries here. Am Montag, 9. November 2015 20:37:48 UTC+1 schrieb Tony Kelman: > > Hello all! The latest bugfix releases of both 0.4.x and 0.3.x Julia lines > have been released.

Re: [julia-users] Arrays as streams / consuming data with take et al

2015-11-09 Thread Dan
the example with `pull` before, traverses the iterator's beginning twice... what one probably wants is: julia> function pull(itr,n::Int) state = start(itr) head = eltype(itr)[] while n>0 && !done(itr,state) val,state = next(itr,state) push!(head,val)

Re: [julia-users] Arrays as streams / consuming data with take et al

2015-11-09 Thread Dan
Hmmm... maybe there is an issue with the following: | | |_| | | | (_| | | Version 0.5.0-dev+1137 (2015-11-04 03:36 UTC) _/ |\__'_|_|_|\__'_| | Commit 95b7080 (5 days old master) |__/ | x86_64-linux-gnu julia> collect(1:3) 3-element Array{Int64,1}: 1 2 3 julia>

Re: [julia-users] Arrays as streams / consuming data with take et al

2015-11-09 Thread Dan
ouch... my suggestion takes care of the first output, but the second output repeats the start of the sequence. but `chain` is a useful method to convert an array to an iterable. anyway, I've concocted a method to generate the desired behavior: julia> function pull(itr,n) state =

Re: [julia-users] Arrays as streams / consuming data with take et al

2015-11-09 Thread andrew cooke
oh, ok :o( On Monday, 9 November 2015 17:36:13 UTC-3, Dan wrote: > > ouch... my suggestion takes care of the first output, but the second > output repeats the start of the sequence. but `chain` is a useful method to > convert an array to an iterable. anyway, I've concocted a method to >

Re: [julia-users] Do I have simd?

2015-11-09 Thread Rob J. Goedman
Hi DNF, Those instructions (if they help in all cases) only work if you build Julia yourself by cloning the Julia git repository. You have installed julia via homebrew. Unfortunately that route doesn’t work for me: ``` rob$ /usr/local/bin/julia Illegal instruction: 4 ``` I expect that maybe

[julia-users] ANN: Julia 0.4.1 and 0.3.12 released

2015-11-09 Thread Tony Kelman
Hello all! The latest bugfix releases of both 0.4.x and 0.3.x Julia lines have been released. Binaries are available from the usual place (see Old releases for 0.3.12), and as is typical with such things,

[julia-users] libgit2 and proxies

2015-11-09 Thread Kiran Pamnany
Anyone seen this? julia> Pkg.init() INFO: Initializing package repository /home/kpamnany/.julia/v0.5 INFO: Cloning METADATA from https://github.com/JuliaLang/METADATA.jl ERROR: GitError(Code:ERROR, Class:Net, SSL error: error:140E0114:SSL routines:SSL_shutdown:uninitialized) [inlined code] from

Re: [julia-users] Re: The growth of Julia userbase

2015-11-09 Thread Ken B
Here's a nice comparison of languages used in github repo's and Julia is #43 out of 50: http://githut.info/ On Thursday, 5 November 2015 02:50:43 UTC+1, Iain Dunning wrote: > > Some more data, from pkg.julialang.org web analytics: > In January there were 3.5k "users", which ramped up to 5k by

Re: [julia-users] Re: The growth of Julia userbase

2015-11-09 Thread Cedric St-Jean
https://groups.google.com/forum/#!aboutgroup/julia-users has one year of data. On Monday, November 9, 2015 at 6:10:41 PM UTC-5, Ken B wrote: > > Here's a nice comparison of languages used in github repo's and Julia is > #43 out of 50: > http://githut.info/ > > On Thursday, 5 November 2015

[julia-users] Re: DataFrame to JSON

2015-11-09 Thread Eric Forgy
Hi JobJob, I like that too. Thanks! When I got my df2json working, the next thing I naturally did was try JSON.parse(json) and saw I got back an array of Dicts, so thought constructing an array of Dicts from a DataFrame could also be a way to go, but couldn't get it to work. Your solution

[julia-users] Google releases TensorFlow as open source

2015-11-09 Thread Phil Tomson
Google has released it's deep learning library called TensorFlow as open source code: https://github.com/tensorflow/tensorflow They include Python bindings, Any ideas about how easy/difficult it would be to create Julia bindings? Phil

Re: [julia-users] Arrays as streams / consuming data with take et al

2015-11-09 Thread andrew cooke
thanks! On Sunday, 8 November 2015 22:40:53 UTC-3, Yichao Yu wrote: > > On Sun, Nov 8, 2015 at 8:11 PM, andrew cooke > wrote: > > I'd like to be able to use take() and all the other iterator tools with > a > > stream of data backed by an array (or string). > > > > By

Re: [julia-users] Arrays as streams / consuming data with take et al

2015-11-09 Thread andrew cooke
yeah, that's the problem with types and iters. this is why i had to add read() to StatefulIterators.jl it seems to me that the problem is related to the lack of a typed generic container type. but i guess it must be more complex than that. andrew On Monday, 9 November 2015 17:58:39 UTC-3,

[julia-users] Re: DataFrame to JSON

2015-11-09 Thread Eric Forgy
That is truly beautiful! Thank you Tomas On Monday, November 9, 2015 at 5:01:10 PM UTC+8, Tomas Lycken wrote: > > I’d try to use the built-in tools for iterating and transforming stuff to > make the code a little terser and easier to read: > > function df2json(df) > io = IOBuffer() >

[julia-users] Re: Type stability with eigs

2015-11-09 Thread Tomas Lycken
This actually seems to be a type instability issue in Base.eigs: julia> @code_warntype eigs(A) Variables: A::SparseMatrixCSC{Float64,Int64} Body: begin $(Expr(:line, 50, symbol("linalg/arnoldi.jl"), symbol(""))) GenSym(8) =

[julia-users] Re: Type stability with eigs

2015-11-09 Thread Kristoffer Carlsson
eig had the same problem before: https://github.com/JuliaLang/julia/issues/12304

[julia-users] Re: DataFrame to JSON

2015-11-09 Thread Tomas Lycken
I’d try to use the built-in tools for iterating and transforming stuff to make the code a little terser and easier to read: function df2json(df) io = IOBuffer() write(io, "[\n") write(io, join(map(row -> "{\"A\": $(row[:A]), \"B\": \"$(row[:B])\"}", eachrow(d)), ",\n"))

Re: [julia-users] Re: The growth of Julia userbase

2015-11-09 Thread Seth
If I'm reading the graphs correctly, the underlying data is a year old. On Monday, November 9, 2015 at 3:10:41 PM UTC-8, Ken B wrote: > > Here's a nice comparison of languages used in github repo's and Julia is > #43 out of 50: > http://githut.info/ > > On Thursday, 5 November 2015 02:50:43