[julia-users] Re: Error in pushing PR

2015-11-05 Thread Petr Hlavenka
Thanks a lot, 
the command 
$ git remote set-url --push origin 
https://github.com/JaneliaSciComp/NIDAQ.jl.git
helps solve the problem
I'm very supportive of changing the default git interaction from ssh to 
https://
Petr
On Wednesday, November 4, 2015 at 7:32:40 PM UTC+1, Tony Kelman wrote:
>
> This is probably due to not having ssh keys set up properly, which can be 
> kind of tricky, especially on windows. We're moving towards preferring 
> https for everything which should fix this.
>
> For now I recommend starting git bash, navigating to the package directory 
> and adding new https remotes for your forks that you can push to more 
> easily.
>


[julia-users] (Yet another) tutorial

2015-11-05 Thread Daan Huybrechs
I have recently given a Julia introduction to a group of numerical analysts 
at the university of Leuven, Belgium. For this, I have written a set of 
notebooks, and they are available here:

https://github.com/daanhb/Julia-tutorial

The goal of the tutorial is not to survey syntax and features of Julia, but 
rather to introduce the concepts of type inference and multiple dispatch to 
people with a background in technical computing and a mindset of 
object-oriented programming. That makes it a bit orthogonal to existing 
introductory material, I think. The contents reflect (hopefully) the main 
messages of the paper "Julia: a fresh approach to numerical computing".

We did three one-hour sessions, using Juliabox. Juliabox is really Very 
Convenient! This is not enough to learn Julia, but it gives a feeling for 
what to expect once you do, and to decide whether it is worth it to pursue 
further. Which of course it is - Julia easily sells itself, especially to 
the audience I had.


Feel free to use and adapt,
Daan



[julia-users] Re: a=[1:1:10] WARNING ? What to creat vectors in 4.0 ?

2015-11-05 Thread Ismael VC
Paul, you can also use this syntax with a semi colon:

   _   _ _(_)_ |  A fresh approach to technical computing
  (_) | (_) (_)|  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.4.0 (2015-10-08 06:20 UTC)
 _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
|__/   |  x86_64-w64-mingw32

julia> [1:10;]
10-element Array{Int64,1}:
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10

julia>



El miércoles, 4 de noviembre de 2015, 13:43:55 (UTC-6), paul analyst 
escribió:
>
>_
>_   _ _(_)_ |  A fresh approach to technical computing
>   (_) | (_) (_)|  Documentation: http://docs.julialang.org
>_ _   _| |_  __ _   |  Type "?help" for help.
>   | | | | | | |/ _` |  |
>   | | |_| | | | (_| |  |  Version 0.4.0 (2015-10-08 06:20 UTC)
>  _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
> |__/   |  x86_64-w64-mingw32
>
> julia> a=[1:1:10]
> WARNING: [a] concatenation is deprecated; use collect(a) instead
>  in depwarn at deprecated.jl:73
>  in oldstyle_vcat_warning at abstractarray.jl:29
>  in vect at abstractarray.jl:32
> while loading no file, in expression starting on line 0
> 10-element Array{Int64,1}:
>   1
>   2
>   3
>   4
>   5
>   6
>   7
>   8
>   9
>  10
>
> julia>
>


[julia-users] unicode names

2015-11-05 Thread Tamas Papp
Hi,

Is there a Julia library (or base function) that allows conversion
between a unicode character and its unicode name? Ie mapping α to "GREEK
SMALL LETTER ALPHA" and vice versa.

Thanks,

Tamas


Re: [julia-users] a=[1:1:10] WARNING ? What to creat vectors in 4.0 ?

2015-11-05 Thread Paul Analyst

If I am new in Julia and strting and reading this about collect:
/collect(collection) "Return an array of all items in a collection. For 
associative collections, returns Pair{KeyType, ValType}.//
//collect(element_type, collection) Return an array of type 
Array{element_type,1} of all items in a collection."//

Now nothink about vecotrs in manual !
Paul


/

W dniu 2015-11-04 o 20:45, Tom Breloff pisze:

The warning is pretty clear here I think.  Use `a = collect(1:10)`

On Wed, Nov 4, 2015 at 2:43 PM, paul analyst > wrote:


   _
   _   _ _(_)_ |  A fresh approach to technical computing
  (_) | (_) (_)|  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.4.0 (2015-10-08 06:20 UTC)
 _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
|__/   |  x86_64-w64-mingw32

julia> a=[1:1:10]
WARNING: [a] concatenation is deprecated; use collect(a) instead
 in depwarn at deprecated.jl:73
 in oldstyle_vcat_warning at abstractarray.jl:29
 in vect at abstractarray.jl:32
while loading no file, in expression starting on line 0
10-element Array{Int64,1}:
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10

julia>






[julia-users] Re: (Yet another) tutorial

2015-11-05 Thread Arch Call
This has been extremely helpful to me in understanding Julia.  Your writing 
style in gradually building up each new concept with simple examples hits 
to the very core of Julia.  Thanks again...

On Thursday, November 5, 2015 at 4:47:10 AM UTC-5, Daan Huybrechs wrote:
>
> I have recently given a Julia introduction to a group of numerical 
> analysts at the university of Leuven, Belgium. For this, I have written a 
> set of notebooks, and they are available here:
>
> https://github.com/daanhb/Julia-tutorial
>
> The goal of the tutorial is not to survey syntax and features of Julia, 
> but rather to introduce the concepts of type inference and multiple 
> dispatch to people with a background in technical computing and a mindset 
> of object-oriented programming. That makes it a bit orthogonal to existing 
> introductory material, I think. The contents reflect (hopefully) the main 
> messages of the paper "Julia: a fresh approach to numerical computing".
>
> We did three one-hour sessions, using Juliabox. Juliabox is really Very 
> Convenient! This is not enough to learn Julia, but it gives a feeling for 
> what to expect once you do, and to decide whether it is worth it to pursue 
> further. Which of course it is - Julia easily sells itself, especially to 
> the audience I had.
>
>
> Feel free to use and adapt,
> Daan
>
>

Re: [julia-users] a=[1:1:10] WARNING ? What to creat vectors in 4.0 ?

2015-11-05 Thread Alex
Could someone please explain the meaning of

"[a] concatenation is deprecated "

?

[a] - is a notion for a vector / an array.

Where concatenation is happening and how [;] fixes the problem?

-- Alex

On 11/4/2015 8:43 PM, paul analyst wrote:
>_
>_   _ _(_)_ |  A fresh approach to technical computing
>   (_) | (_) (_)|  Documentation: http://docs.julialang.org
>_ _   _| |_  __ _   |  Type "?help" for help.
>   | | | | | | |/ _` |  |
>   | | |_| | | | (_| |  |  Version 0.4.0 (2015-10-08 06:20 UTC)
>  _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
> |__/   |  x86_64-w64-mingw32
>
> julia> a=[1:1:10]
> WARNING: [a] concatenation is deprecated; use collect(a) instead
>  in depwarn at deprecated.jl:73
>  in oldstyle_vcat_warning at abstractarray.jl:29
>  in vect at abstractarray.jl:32
> while loading no file, in expression starting on line 0
> 10-element Array{Int64,1}:
>   1
>   2
>   3
>   4
>   5
>   6
>   7
>   8
>   9
>  10
>
> julia>



Re: [julia-users] Coloring Gadfly's Geom.point

2015-11-05 Thread Tom Breloff
This is how I do it in Plots:
https://github.com/tbreloff/Plots.jl/blob/master/src/backends/gadfly.jl#L140-L145

The border is the "highlight"... to remove it I think either 0 width or 0
alpha will work.  You should be able to pass RGBA colors, so that includes
opacity.

On Thu, Nov 5, 2015 at 10:40 AM, Patrick Kofod Mogensen <
patrick.mogen...@gmail.com> wrote:

> I've tried looking through the documentation, and I feel like maybe I am
> just not understanding the types in Color.jl well enough, but say I have a
> scatter plot, how do I
>
> a) Remove the border
> b) Make the points opaque?
>
> Looking at http://gadflyjl.org/geom_point.html I am not quite sure why
> the border is white in some plots and black in others. Is it because of the
> continuous color scale?
>
> Best,
> Patrick
>


Re: [julia-users] Coloring Gadfly's Geom.point

2015-11-05 Thread Tom Breloff
It is really cool.  You should.  :)

Open issues with requests/questions.

On Thu, Nov 5, 2015 at 11:23 AM, Patrick Kofod Mogensen <
patrick.mogen...@gmail.com> wrote:

> Thanks, Plots.jl seems really cool... Maybe I should try to use that.
>
> On Thursday, November 5, 2015 at 5:10:35 PM UTC+1, Tom Breloff wrote:
>>
>> This is how I do it in Plots:
>> https://github.com/tbreloff/Plots.jl/blob/master/src/backends/gadfly.jl#L140-L145
>>
>> The border is the "highlight"... to remove it I think either 0 width or 0
>> alpha will work.  You should be able to pass RGBA colors, so that includes
>> opacity.
>>
>> On Thu, Nov 5, 2015 at 10:40 AM, Patrick Kofod Mogensen <
>> patrick@gmail.com> wrote:
>>
>>> I've tried looking through the documentation, and I feel like maybe I am
>>> just not understanding the types in Color.jl well enough, but say I have a
>>> scatter plot, how do I
>>>
>>> a) Remove the border
>>> b) Make the points opaque?
>>>
>>> Looking at http://gadflyjl.org/geom_point.html I am not quite sure why
>>> the border is white in some plots and black in others. Is it because of the
>>> continuous color scale?
>>>
>>> Best,
>>> Patrick
>>>
>>
>>


Re: [julia-users] filter() & anonymous function

2015-11-05 Thread Ján Dolinský
Hi,

Thanks for the answers - it is all clear now :).

Best Regards,
Jan

Dňa štvrtok, 5. novembra 2015 15:49:50 UTC+1 Mauro napísal(-a):
>
> > 1) Is filter an effictient way for doing this ? I assume yes (optionally 
> > using an inplace version filter!() may be advantageous). 
>
> If you need speed you may need to look into FastAnonymous to define your 
> function.  If this is not a bottleneck, then don't bother. 
>
> > 2) It was surprising to me to see that "nobsTreshold" is visible to the 
> > anonymous function in play1() and also to g() in function play2(). I 
> > thought that in general function can see only its input parameters. 
> Anyway, 
> > it is extremely useful that e.g. in line g(x) = size(x, 1) > 
> nobsTreshold; 
> > g(x) sees nobsTreshold 
>
> Functions are a nested scope and can see the variables in their outer 
> scope(s).  Have a read through the scope section of the manual. 
>


Re: [julia-users] a=[1:1:10] WARNING ? What to creat vectors in 4.0 ?

2015-11-05 Thread Tom Breloff
It might be clearer with an example:


julia> x = [1,2,3]
3-element Array{Int64,1}:
 1
 2
 3

julia> [x, 4]
WARNING: [a,b] concatenation is deprecated; use [a;b] instead
 in depwarn at deprecated.jl:73
 in oldstyle_vcat_warning at ./abstractarray.jl:29
 in vect at abstractarray.jl:38
while loading no file, in expression starting on line 0
4-element Array{Int64,1}:
 1
 2
 3
 4

Essentially the square brackets used to be shorthand for "vcat(x)", but
that is changing (for good reason... it makes it very hard to make arrays
of arrays, and it can be confusing).  With the semicolon there, you are
explicitly asking to use array concatenation syntax.

On Thu, Nov 5, 2015 at 11:24 AM, Alex  wrote:

> Could someone please explain the meaning of
>
> "[a] concatenation is deprecated "
>
> ?
>
> [a] - is a notion for a vector / an array.
>
> Where concatenation is happening and how [;] fixes the problem?
>
> -- Alex
>
> On 11/4/2015 8:43 PM, paul analyst wrote:
> >_
> >_   _ _(_)_ |  A fresh approach to technical computing
> >   (_) | (_) (_)|  Documentation: http://docs.julialang.org
> >_ _   _| |_  __ _   |  Type "?help" for help.
> >   | | | | | | |/ _` |  |
> >   | | |_| | | | (_| |  |  Version 0.4.0 (2015-10-08 06:20 UTC)
> >  _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
> > |__/   |  x86_64-w64-mingw32
> >
> > julia> a=[1:1:10]
> > WARNING: [a] concatenation is deprecated; use collect(a) instead
> >  in depwarn at deprecated.jl:73
> >  in oldstyle_vcat_warning at abstractarray.jl:29
> >  in vect at abstractarray.jl:32
> > while loading no file, in expression starting on line 0
> > 10-element Array{Int64,1}:
> >   1
> >   2
> >   3
> >   4
> >   5
> >   6
> >   7
> >   8
> >   9
> >  10
> >
> > julia>
>
>


Re: [julia-users] Re: a=[1:1:10] WARNING ? What to creat vectors in 4.0 ?

2015-11-05 Thread Paul Analyst

Uf ;) semicolon is nice:) WARNING sholud this hints
Paul
W dniu 2015-11-05 o 15:31, Ismael VC pisze:

Paul, you can also use this syntax with a semi colon:

|
   _   _ _(_)_ |  A fresh approach to technical computing
  (_) | (_) (_)|  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.4.0 (2015-10-08 06:20 UTC)
 _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
|__/   |  x86_64-w64-mingw32

julia> [1:10;]
10-element Array{Int64,1}:
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10

julia>
|



El miércoles, 4 de noviembre de 2015, 13:43:55 (UTC-6), paul analyst 
escribió:


   _
   _   _ _(_)_ |  A fresh approach to technical computing
  (_) | (_) (_)|  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.4.0 (2015-10-08 06:20 UTC)
 _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
|__/   |  x86_64-w64-mingw32

julia> a=[1:1:10]
WARNING: [a] concatenation is deprecated; use collect(a) instead
 in depwarn at deprecated.jl:73
 in oldstyle_vcat_warning at abstractarray.jl:29
 in vect at abstractarray.jl:32
while loading no file, in expression starting on line 0
10-element Array{Int64,1}:
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10

julia>





Re: [julia-users] Re: How to fill a (general) subarray with a single object

2015-11-05 Thread Ján Dolinský
Yes, this is clear thanks.

Best Regards,
Jan

Dňa streda, 4. novembra 2015 17:46:34 UTC+1 Michele Zaffalon napísal(-a):
>
> What Matt is saying is that the first option is probably what you do _not_ 
> want: all elements of the matrix z point to the same location in memory. 
> Just try to change one of them!
>
> On Tue, Nov 3, 2015 at 4:10 PM, Ján Dolinský  > wrote:
>
>> Hi Matt,
>>
>> Thanks for the tips. The 1st example is quite neat and compact (similar 
>> to sub & fill!). the for loop is obviously a good option too. 
>>
>> Best Regards,
>> Jan 
>>
>> Dňa utorok, 3. novembra 2015 15:59:37 UTC+1 Matt Bauman napísal(-a):
>>
>>> The ability to assign a single element into multiple locations like this 
>>> is called scalar broadcasting.  When you have an array of arrays, however, 
>>> each element isn't a scalar.  So it's trying to assign the elements of the 
>>> right side (Float64s) to the elements of the right side (matrices).  You 
>>> can work around this several ways:
>>>
>>> Wrap the right had side in an array of the appropriate size.  Note that, 
>>> like using sub and fill! above, this puts exactly the same matrix (with 
>>> shared data) in all four locations:
>>>
>>> julia> z[2:5] = fill(rand(2,2), 4); z
>>> 10-element Array{Array{Float64,2},1}:
>>>  #undef
>>> [0.144618,0.285725,0.415011,0.232808]
>>> [0.144618,0.285725,0.415011,0.232808]
>>> [0.144618,0.285725,0.415011,0.232808]
>>> [0.144618,0.285725,0.415011,0.232808]
>>>  #undef
>>>  #undef
>>>  #undef
>>>  #undef
>>>  #undef
>>>
>>> Alternatively, the best solution is probably to use a for loop.  This 
>>> probably has the semantics that you want, with different uncoupled arrays 
>>> in each spot, and it'll be fast, too:
>>>
>>> julia> for idx = 2:5
>>>z[idx] = rand(2,2)
>>>end
>>>z
>>> 10-element Array{Array{Float64,2},1}:
>>>  #undef
>>> [0.691373,0.130612,0.837506,0.255362]
>>> [0.471128,0.492608,0.602753,0.119473]
>>> [0.133986,0.793537,0.800129,0.433915]
>>> [0.922652,0.645796,0.997629,0.982244]
>>>  #undef
>>>  #undef
>>>  #undef
>>>  #undef
>>>  #undef
>>>
>>> Matt
>>>
>>> On Tuesday, November 3, 2015 at 9:26:49 AM UTC-5, Ján Dolinský wrote:

 Hi guys,

 I came across a problem of setting up a (general) subarray with an 
 object (value which is not an ordinary number) e.g.

 julia> z = Array(Matrix{Float64}, 10)
 10-element Array{Array{Float64,2},1}:
  #undef
  #undef
  #undef
  #undef
  #undef
  #undef
  #undef
  #undef
  #undef
  #undef

 julia> z[2:5] = rand(2,2)
 ERROR: MethodError: `convert` has no method matching convert(::Type{
 Array{Float64,2}}, ::Float64)
 This may have arisen from a call to the constructor Array{Float64,2
 }(...),
 since type constructors fall back to convert methods.
 Closest candidates are:
   call{T}(::Type{T}, ::Any)
   convert{T,S,N}(::Type{Array{T,N}}, ::SubArray{S,N,P<:AbstractArray{T,
 N},I<:Tuple{Vararg{Union{AbstractArray{T,1},Colon,Int64}}},LD})
   convert{T,n}(::Type{Array{T,n}}, ::Array{T,n})
   ...
  in setindex! at array.jl:339

  What is a "correct" way of doing this ? I can do it via "sub" and 
 "fill!" e.g.

 julia> zz = sub(z, 2:5)
 4-element SubArray{Array{Float64,2},1,Array{Array{Float64,2},1},Tuple{
 UnitRange{Int64}},1}:
  #undef
  #undef
  #undef
  #undef

 julia> fill!(zz, rand(2,2))
 4-element SubArray{Array{Float64,2},1,Array{Array{Float64,2},1},Tuple{
 UnitRange{Int64}},1}:
  2x2 Array{Float64,2}:
  0.313155  0.553893
  0.74854   0.997401
  2x2 Array{Float64,2}:
  0.313155  0.553893
  0.74854   0.997401
  2x2 Array{Float64,2}:
  0.313155  0.553893
  0.74854   0.997401
  2x2 Array{Float64,2}:
  0.313155  0.553893
  0.74854   0.997401

 julia> z
 10-element Array{Array{Float64,2},1}:
  #undef  
 2x2 Array{Float64,2}:
  0.313155  0.553893
  0.74854   0.997401
 2x2 Array{Float64,2}:
  0.313155  0.553893
  0.74854   0.997401
 2x2 Array{Float64,2}:
  0.313155  0.553893
  0.74854   0.997401
 2x2 Array{Float64,2}:
  0.313155  0.553893
  0.74854   0.997401
  #undef  
  #undef  
  #undef  
  #undef  
  #undef 

 Thanks,
 Jan

>>>
>

Re: [julia-users] Re: a=[1:1:10] WARNING ? What to creat vectors in 4.0 ?

2015-11-05 Thread DNF
Did you try my suggestion? Just use
a = 1:10

Doesn't it work the way you want? 

Re: [julia-users] Coloring Gadfly's Geom.point

2015-11-05 Thread Patrick Kofod Mogensen
Thanks, Plots.jl seems really cool... Maybe I should try to use that.

On Thursday, November 5, 2015 at 5:10:35 PM UTC+1, Tom Breloff wrote:
>
> This is how I do it in Plots: 
> https://github.com/tbreloff/Plots.jl/blob/master/src/backends/gadfly.jl#L140-L145
>
> The border is the "highlight"... to remove it I think either 0 width or 0 
> alpha will work.  You should be able to pass RGBA colors, so that includes 
> opacity.
>
> On Thu, Nov 5, 2015 at 10:40 AM, Patrick Kofod Mogensen <
> patrick@gmail.com > wrote:
>
>> I've tried looking through the documentation, and I feel like maybe I am 
>> just not understanding the types in Color.jl well enough, but say I have a 
>> scatter plot, how do I 
>>
>> a) Remove the border
>> b) Make the points opaque?
>>
>> Looking at http://gadflyjl.org/geom_point.html I am not quite sure why 
>> the border is white in some plots and black in others. Is it because of the 
>> continuous color scale?
>>
>> Best,
>> Patrick
>>
>
>

[julia-users] Best approach on using a C library in Julia

2015-11-05 Thread Rivo Sarmento
I need to use a C library, a implementation of the Scale Invariant Feature 
Transform (SIFT)[1], in Julia. I don't think rewriting is an efficient 
effort, so I'm going to use their code.

My question is: Is it better to use the executables (available after 
compiling their code) or is it better to write a C file with the library 
headers and use the functions in Julia through it?


Reference:
[1] http://www.ipol.im/pub/art/2014/82/


[julia-users] Re: Interest in a Seattle-Area Julia Meetup?

2015-11-05 Thread Kirill Druzhkov
Hi,
Big fan of Julia. It would be perfect to have a Julia user group in Seattle 
area.

понедельник, 19 октября 2015 г., 12:46:02 UTC-7 пользователь 
tim@multiscalehn.com написал:
>
> I work for a company where we are big fans of Julia, and are using it for 
> several projects. We have thrown around the idea of hosting a meetup. We 
> have the space and the resources to put it on, and could provide some good 
> content. I know there are some active Julia devs at the UW but I wanted to 
> put out feelers to see who might be interested in attending, or even 
> better, giving a talk or demo. I guarantee a good time will be had by all.
>
> - Tim
>


Re: [julia-users] Best approach on using a C library in Julia

2015-11-05 Thread Yichao Yu
On Wed, Nov 4, 2015 at 5:14 PM, Rivo Sarmento  wrote:
> I need to use a C library, a implementation of the Scale Invariant Feature
> Transform (SIFT)[1], in Julia. I don't think rewriting is an efficient
> effort, so I'm going to use their code.
>
> My question is: Is it better to use the executables (available after
> compiling their code) or is it better to write a C file with the library
> headers and use the functions in Julia through it?
>

If it's a C library, you should be able to simple call C functions in
it with `ccall` without any C glue code. If it's a C++ library, you
can either use some glue code or if like experimental code, use
Cxx.jl.
Calling external executables is usually the worst option.

>
> Reference:
> [1] http://www.ipol.im/pub/art/2014/82/


[julia-users] Re: PyPlot not working on 0.4.0

2015-11-05 Thread jda
I have two windows computers that I am trying to get working.  On one of 
them a couple of un/re-installations fixed the problem.  But the second 
computer is still not working.  Here is my session on a fresh install on 
the second computer:

   _
   _   _ _(_)_ |  A fresh approach to technical computing
  (_) | (_) (_)|  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.4.0 (2015-10-08 06:20 UTC)
 _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
|__/   |  x86_64-w64-mingw32

julia> versioninfo()
Julia Version 0.4.0
Commit 0ff703b* (2015-10-08 06:20 UTC)
Platform Info:
  System: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM)2 Duo CPU E8400  @ 3.00GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Penryn)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.3

julia> Pkg.add("PyCall")
INFO: Cloning cache of BinDeps from 
git://github.com/JuliaLang/BinDeps.jl.git
INFO: Cloning cache of Compat from git://github.com/JuliaLang/Compat.jl.git
INFO: Cloning cache of Conda from git://github.com/Luthaf/Conda.jl.git
INFO: Cloning cache of Dates from git://github.com/quinnj/Dates.jl.git
INFO: Cloning cache of JSON from git://github.com/JuliaLang/JSON.jl.git
INFO: Cloning cache of PyCall from git://github.com/stevengj/PyCall.jl.git
INFO: Cloning cache of SHA from git://github.com/staticfloat/SHA.jl.git
INFO: Cloning cache of URIParser from 
git://github.com/JuliaWeb/URIParser.jl.git

INFO: Installing BinDeps v0.3.19
INFO: Installing Compat v0.7.7
INFO: Installing Conda v0.1.8
INFO: Installing Dates v0.4.4
INFO: Installing JSON v0.5.0
INFO: Installing PyCall v1.1.2
INFO: Installing SHA v0.1.2
INFO: Installing URIParser v0.1.1
INFO: Building PyCall
INFO: Precompiling module Compat...
INFO: Precompiling module Conda...
INFO: No system-wide Python was found; got the following error:
could not spawn `python -c "import distutils.sysconfig; 
print(distutils.sysconfi
g.get_config_var('VERSION'))"`: no such file or directory (ENOENT)
using the Python distribution in the Conda package
INFO: Downloading miniconda installer ...
INFO: Installing miniconda ...
Fetching package metadata: 
Solving package specifications: .
Package plan for installation in environment C:\Users\user\.julia\v0.4\Con
da\deps\usr:

The following packages will be downloaded:

package|build
---|-
msvc_runtime-1.0.1 |vc9_0 1.1 MB
conda-env-2.4.4|   py27_0  64 KB
numpy-1.10.1   |   py27_023.6 MB
pyyaml-3.11|   py27_2 167 KB
requests-2.8.1 |   py27_0 609 KB
setuptools-18.4|   py27_0 647 KB
wheel-0.26.0   |   py27_1 116 KB
conda-3.18.3   |   py27_0 218 KB
pip-7.1.2  |   py27_0 1.4 MB

   Total:28.0 MB

The following NEW packages will be INSTALLED:

msvc_runtime: 1.0.1-vc9_0   [vc9]
numpy:1.10.1-py27_0
pip:  7.1.2-py27_0
setuptools:   18.4-py27_0
wheel:0.26.0-py27_1

The following packages will be UPDATED:

conda:3.9.1-py27_0 --> 3.18.3-py27_0
conda-env:2.1.3-py27_0 --> 2.4.4-py27_0
pyyaml:   3.11-py27_0  --> 3.11-py27_2
requests: 2.5.3-py27_0 --> 2.8.1-py27_0

Fetching packages ...
msvc_runtime-1 100% |###| Time: 0:00:00   2.95 
MB/s
conda-env-2.4. 100% |###| Time: 0:00:00   2.03 
MB/s
numpy-1.10.1-p 100% |###| Time: 0:00:03   7.28 
MB/s
pyyaml-3.11-py 100% |###| Time: 0:00:00   2.76 
MB/s
requests-2.8.1 100% |###| Time: 0:00:00   4.99 
MB/s
setuptools-18. 100% |###| Time: 0:00:00   4.70 
MB/s
wheel-0.26.0-p 100% |###| Time: 0:00:00   2.54 
MB/s
conda-3.18.3-p 100% |###| Time: 0:00:00   2.41 
MB/s
pip-7.1.2-py27 100% |###| Time: 0:00:00   5.61 
MB/s
Extracting packages ...
[  COMPLETE  ] |#| 
100%
Unlinking packages ...
[  COMPLETE  ] |#| 
100%
Linking packages ...
[  COMPLETE  ] |#| 
100%
INFO: PyCall is using C:\Users\user\.julia\v0.4\Conda\deps\usr\python.exe
(Python 2.7.9) at C:\Users\user\.julia\v0.4\Conda\deps\usr\python.exe, lib
python = 

[julia-users] Re: (Yet another) tutorial

2015-11-05 Thread Daan Huybrechs
Hi Arch - thanks! I'm glad you found it helpful.

On Thursday, November 5, 2015 at 2:19:38 PM UTC+1, Arch Call wrote:
>
> This has been extremely helpful to me in understanding Julia.  Your 
> writing style in gradually building up each new concept with simple 
> examples hits to the very core of Julia.  Thanks again...
>
> On Thursday, November 5, 2015 at 4:47:10 AM UTC-5, Daan Huybrechs wrote:
>>
>> I have recently given a Julia introduction to a group of numerical 
>> analysts at the university of Leuven, Belgium. For this, I have written a 
>> set of notebooks, and they are available here:
>>
>> https://github.com/daanhb/Julia-tutorial
>>
>> The goal of the tutorial is not to survey syntax and features of Julia, 
>> but rather to introduce the concepts of type inference and multiple 
>> dispatch to people with a background in technical computing and a mindset 
>> of object-oriented programming. That makes it a bit orthogonal to existing 
>> introductory material, I think. The contents reflect (hopefully) the main 
>> messages of the paper "Julia: a fresh approach to numerical computing".
>>
>> We did three one-hour sessions, using Juliabox. Juliabox is really Very 
>> Convenient! This is not enough to learn Julia, but it gives a feeling for 
>> what to expect once you do, and to decide whether it is worth it to pursue 
>> further. Which of course it is - Julia easily sells itself, especially to 
>> the audience I had.
>>
>>
>> Feel free to use and adapt,
>> Daan
>>
>>

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

2015-11-05 Thread DNF
On Thursday, November 5, 2015 at 4:07:05 PM UTC+1, Yichao Yu wrote:
>
> You can check with `code_llvm(innersimd, 
> Tuple{Vector{Float32},Vector{Float32}})` 
>

I tried it, and got this output, but don't know how to make sense of it

*julia> **code_llvm(innersimd, Tuple{Vector{Float32},Vector{Float32}})*


define float @julia_innersimd_21674(%jl_value_t*, %jl_value_t*) {

L:

  %2 = bitcast %jl_value_t* %0 to %jl_array_t*
  %3 = getelementptr inbounds %jl_array_t* %2, i32 0, i32 1

 %4 = load i64* %3

 %5 = icmp sle i64 1, %4

 %6 = xor i1 %5, true

 %7 = select i1 %6, i64 0, i64 %4

 %8 = insertvalue %UnitRange.1 { i64 1, i64 undef }, i64 %7, 1

 %9 = extractvalue %UnitRange.1 %8, 1

 %10 = load %jl_value_t** @jl_overflow_exception

 %11 = call { i64, i1 } @llvm.ssub.with.overflow.i64(i64 %9, i64 1)

 %12 = extractvalue { i64, i1 } %11, 1

 %13 = xor i1 %12, true

 br i1 %13, label %pass, label %fail

fail: ; preds = %L

 call void @jl_throw_with_superfluous_argument(%jl_value_t* %10, i32 67)

 unreachable

pass: ; preds = %L

  %14 = extractvalue { i64, i1 } %11, 0

 %15 = call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %14, i64 1)

 %16 = extractvalue { i64, i1 } %15, 1

 %17 = xor i1 %16, true

 br i1 %17, label %pass2, label %fail1

fail1:; preds = %pass

 call void @jl_throw_with_superfluous_argument(%jl_value_t* %10, i32 67)

 unreachable

pass2:; preds = %pass

 %18 = extractvalue { i64, i1 } %15, 0

 %19 = icmp slt i64 0, %18

 %20 = xor i1 %19, true

 br i1 %20, label %L11, label %L5.preheader

L5.preheader: ; preds = %pass2

  %sunkaddr = ptrtoint %jl_value_t* %0 to i64

 %sunkaddr19 = inttoptr i64 %sunkaddr to i8**

 %21 = load i8** %sunkaddr19

 %sunkaddr20 = ptrtoint %jl_value_t* %1 to i64

 %sunkaddr21 = inttoptr i64 %sunkaddr20 to i8**

 %22 = load i8** %sunkaddr21

 br label %L5

L5:   ; preds = %L5, %L5.
preheader

  %lsr.iv16 = phi i8* [ %22, %L5.preheader ], [ %scevgep17, %L5 ]

 %lsr.iv = phi i8* [ %21, %L5.preheader ], [ %scevgep, %L5 ]

 %"##i#7153.0" = phi i64 [ %27, %L5 ], [ 0, %L5.preheader ]

 %s.1 = phi float [ %26, %L5 ], [ 0.00e+00, %L5.preheader ]

 %lsr.iv1618 = bitcast i8* %lsr.iv16 to float*

 %lsr.iv15 = bitcast i8* %lsr.iv to float*

 %23 = load float* %lsr.iv15

 %24 = load float* %lsr.iv1618

 %25 = fmul float %23, %24

 %26 = fadd fast float %s.1, %25

 %27 = add i64 %"##i#7153.0", 1

 %scevgep = getelementptr i8* %lsr.iv, i64 4

 %scevgep17 = getelementptr i8* %lsr.iv16, i64 4

 %28 = icmp slt i64 %27, %18

 br i1 %28, label %L5, label %L11


L11:  ; preds = %L5, %pass2

  %s.3 = phi float [ 0.00e+00, %pass2 ], [ %26, %L5 ]

 ret float %s.3

}

 


[julia-users] Re: PyPlot not working on 0.4.0

2015-11-05 Thread Daniel Høegh
This has also been seen https://github.com/stevengj/PyCall.jl/issues/209 
which is actually an upstream problem with the Continuum Analytics conda 
package manager, 
see https://github.com/conda/conda/issues/1753#issuecomment-153550914. I 
can fix it locally by:

using Conda
Conda.add("matplotlib=1.4.0")
Conda.add("pyqt=4.10")


Den torsdag den 5. november 2015 kl. 20.21.16 UTC+1 skrev jda:
>
> I have two windows computers that I am trying to get working.  On one of 
> them a couple of un/re-installations fixed the problem.  But the second 
> computer is still not working.  Here is my session on a fresh install on 
> the second computer:
>
>_
>_   _ _(_)_ |  A fresh approach to technical computing
>   (_) | (_) (_)|  Documentation: http://docs.julialang.org
>_ _   _| |_  __ _   |  Type "?help" for help.
>   | | | | | | |/ _` |  |
>   | | |_| | | | (_| |  |  Version 0.4.0 (2015-10-08 06:20 UTC)
>  _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
> |__/   |  x86_64-w64-mingw32
>
> julia> versioninfo()
> Julia Version 0.4.0
> Commit 0ff703b* (2015-10-08 06:20 UTC)
> Platform Info:
>   System: Windows (x86_64-w64-mingw32)
>   CPU: Intel(R) Core(TM)2 Duo CPU E8400  @ 3.00GHz
>   WORD_SIZE: 64
>   BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Penryn)
>   LAPACK: libopenblas64_
>   LIBM: libopenlibm
>   LLVM: libLLVM-3.3
>
> julia> Pkg.add("PyCall")
> INFO: Cloning cache of BinDeps from git://
> github.com/JuliaLang/BinDeps.jl.git
> INFO: Cloning cache of Compat from git://
> github.com/JuliaLang/Compat.jl.git
> INFO: Cloning cache of Conda from git://github.com/Luthaf/Conda.jl.git
> INFO: Cloning cache of Dates from git://github.com/quinnj/Dates.jl.git
> INFO: Cloning cache of JSON from git://github.com/JuliaLang/JSON.jl.git
> INFO: Cloning cache of PyCall from git://github.com/stevengj/PyCall.jl.git
> INFO: Cloning cache of SHA from git://github.com/staticfloat/SHA.jl.git
> INFO: Cloning cache of URIParser from git://
> github.com/JuliaWeb/URIParser.jl.git
>
> INFO: Installing BinDeps v0.3.19
> INFO: Installing Compat v0.7.7
> INFO: Installing Conda v0.1.8
> INFO: Installing Dates v0.4.4
> INFO: Installing JSON v0.5.0
> INFO: Installing PyCall v1.1.2
> INFO: Installing SHA v0.1.2
> INFO: Installing URIParser v0.1.1
> INFO: Building PyCall
> INFO: Precompiling module Compat...
> INFO: Precompiling module Conda...
> INFO: No system-wide Python was found; got the following error:
> could not spawn `python -c "import distutils.sysconfig; 
> print(distutils.sysconfi
> g.get_config_var('VERSION'))"`: no such file or directory (ENOENT)
> using the Python distribution in the Conda package
> INFO: Downloading miniconda installer ...
> INFO: Installing miniconda ...
> Fetching package metadata: 
> Solving package specifications: .
> Package plan for installation in environment C:\Users\user\.julia\v0.4\Con
> da\deps\usr:
>
> The following packages will be downloaded:
>
> package|build
> ---|-
> msvc_runtime-1.0.1 |vc9_0 1.1 MB
> conda-env-2.4.4|   py27_0  64 KB
> numpy-1.10.1   |   py27_023.6 MB
> pyyaml-3.11|   py27_2 167 KB
> requests-2.8.1 |   py27_0 609 KB
> setuptools-18.4|   py27_0 647 KB
> wheel-0.26.0   |   py27_1 116 KB
> conda-3.18.3   |   py27_0 218 KB
> pip-7.1.2  |   py27_0 1.4 MB
> 
>Total:28.0 MB
>
> The following NEW packages will be INSTALLED:
>
> msvc_runtime: 1.0.1-vc9_0   [vc9]
> numpy:1.10.1-py27_0
> pip:  7.1.2-py27_0
> setuptools:   18.4-py27_0
> wheel:0.26.0-py27_1
>
> The following packages will be UPDATED:
>
> conda:3.9.1-py27_0 --> 3.18.3-py27_0
> conda-env:2.1.3-py27_0 --> 2.4.4-py27_0
> pyyaml:   3.11-py27_0  --> 3.11-py27_2
> requests: 2.5.3-py27_0 --> 2.8.1-py27_0
>
> Fetching packages ...
> msvc_runtime-1 100% |###| Time: 0:00:00   2.95 
> MB/s
> conda-env-2.4. 100% |###| Time: 0:00:00   2.03 
> MB/s
> numpy-1.10.1-p 100% |###| Time: 0:00:03   7.28 
> MB/s
> pyyaml-3.11-py 100% |###| Time: 0:00:00   2.76 
> MB/s
> requests-2.8.1 100% |###| Time: 0:00:00   4.99 
> MB/s
> setuptools-18. 100% |###| Time: 0:00:00   4.70 
> MB/s
> wheel-0.26.0-p 100% |###| Time: 0:00:00   2.54 
> MB/s
> conda-3.18.3-p 100% |###| Time: 0:00:00 

[julia-users] Re: (Yet another) tutorial

2015-11-05 Thread Daan Huybrechs
Hi Scott

Thanks for your comments. You have a point, and I probably overdid it in 
the tutorial when I stressed that adding types is only for dispatch. It can 
also have documentation value and indeed may help to catch errors - nothing 
wrong with that. I will rephrase it later. The main thing I wanted to 
convince the reader of at this stage is that adding types does not help 
performance, and it is a requirement only for dispatch.


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

2015-11-05 Thread DNF
I install using homebrew from here: 
https://github.com/staticfloat/homebrew-julia

I have limited understanding of the process, but believe there is some 
compilation involved. 

[julia-users] Re: "using Gadfly" (using a package) only if needed

2015-11-05 Thread Ismael VC
This also works:

julia> function foo(x, y; make_plot::Bool=false)
   # ...
   if make_plot
   @eval using Gadfly
   plot(x = x, y = y, Geom.line)
   end
   # ...
   end
foo (generic function with 1 method)

julia> x = -π:0.1:π; foo(x, sin(x))

julia> x = -π:0.1:π; foo(x, sin(x), make_plot = true)

julia>



El martes, 4 de agosto de 2015, 12:26:58 (UTC-5), Felipe Jiménez escribió:
>
> I've written a function, fwhm, that goes fast without plotting anything 
> (which is the usual usage).
> But if one optional argument is dodraw = true, it draws a figure to 
> visualize its doings.
> To draw the figure it uses the package Gadfly. But "using Gadfly" takes 
> time to execute (the first time), and most of the sessions it is not needed 
> because by default dodraw = false.
> Since I cannot do "using Gadfly" inside a function, I cannot do something 
> like this:
>
> function fwhm(xk, yk; dodraw::Bool=false)
>   # ...
>
>   if dodraw
> using Gadfly
> plot(x=xk, y=yk)  # etc.
>   end
>
>   # ...
> end
>
> I don't want to add overhead time to every session I use the module where 
> fwhm is, because most of the times dodraw = false and I just need a fast 
> result without figures.
> Any idea?
> Thank you in advance.
>


[julia-users] Properties of IntSet?

2015-11-05 Thread Seth
Could someone please clue me in on IntSet?

1) Does the fact that it's implemented as a bitstring mean that it's a 
dense vector that takes n bits to store values from 1:n?
2) Does this also mean that search and insertion is O(1)?
3) What are common use cases for IntSets?
4) Anything else that's interesting (good or bad) about IntSets?

Thanks.


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

2015-11-05 Thread Benjamin Deonovic
Did you compile julia from source or just grab a pre-compiled binary? 


On Thursday, November 5, 2015 at 3:22:28 PM UTC-6, DNF wrote:
>
> I see. Do you know if I need to install something to get SIMD support?
>
> According to this 
> 
>  
> review of my computer model: "Haswell chips also include new instructions 
> enhancing SIMD vector processing with Advanced Vector Extensions 2".
>
> So what could be wrong?
>


Re: [julia-users] Best approach on using a C library in Julia

2015-11-05 Thread Steven G. Johnson
It's written in C, but their provided Makefile does not generate a shared 
library.  However, it looks pretty easy to compile, just do:

gcc -fPIC -shared -O3 -o libsift.so src/lib*.c

since it looks like all of their "library" code is in files named src/lib*.c

Then you can do ccall((:sift_compute_points, libsift), ..args and 
types) to directly call functions in the library.  The API looks 
straightforward to access in Julia.


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

2015-11-05 Thread Kristoffer Carlsson
If it got compiled with SIMD instructions it should have a vector body which it 
doesn't seem to have. 

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

2015-11-05 Thread DNF
I see. Do you know if I need to install something to get SIMD support?

According to this 

 
review of my computer model: "Haswell chips also include new instructions 
enhancing SIMD vector processing with Advanced Vector Extensions 2".

So what could be wrong?


Re: [julia-users] Re: error: haskey of NULL PyObject ?

2015-11-05 Thread jda
I got other errors upon re-install and from there Daniel Hoegh has provided 
me with the answer I was looking for at:
https://groups.google.com/forum/#!searchin/julia-users/PyPlot$20not$20working$200.4.0/julia-users/kZQrK8-nmQ8/r6rPDeQtocYJ


[julia-users] Re: PyPlot not working on 0.4.0

2015-11-05 Thread jda
Fixed now, great many thanks !!
Very happy to have my code start running before the weekend starts. 


On Thursday, November 5, 2015 at 3:19:03 PM UTC-5, Daniel Høegh wrote:
>
> This has also been seen https://github.com/stevengj/PyCall.jl/issues/209 
> which is actually an upstream problem with the Continuum Analytics conda 
> package manager, see 
> https://github.com/conda/conda/issues/1753#issuecomment-153550914. I can 
> fix it locally by:
>
> using Conda
> Conda.add("matplotlib=1.4.0")
> Conda.add("pyqt=4.10")
>
>
> Den torsdag den 5. november 2015 kl. 20.21.16 UTC+1 skrev jda:
>>
>> I have two windows computers that I am trying to get working.  On one of 
>> them a couple of un/re-installations fixed the problem.  But the second 
>> computer is still not working.  Here is my session on a fresh install on 
>> the second computer:
>>
>>_
>>_   _ _(_)_ |  A fresh approach to technical computing
>>   (_) | (_) (_)|  Documentation: http://docs.julialang.org
>>_ _   _| |_  __ _   |  Type "?help" for help.
>>   | | | | | | |/ _` |  |
>>   | | |_| | | | (_| |  |  Version 0.4.0 (2015-10-08 06:20 UTC)
>>  _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
>> |__/   |  x86_64-w64-mingw32
>>
>> julia> versioninfo()
>> Julia Version 0.4.0
>> Commit 0ff703b* (2015-10-08 06:20 UTC)
>> Platform Info:
>>   System: Windows (x86_64-w64-mingw32)
>>   CPU: Intel(R) Core(TM)2 Duo CPU E8400  @ 3.00GHz
>>   WORD_SIZE: 64
>>   BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Penryn)
>>   LAPACK: libopenblas64_
>>   LIBM: libopenlibm
>>   LLVM: libLLVM-3.3
>>
>> julia> Pkg.add("PyCall")
>> INFO: Cloning cache of BinDeps from git://
>> github.com/JuliaLang/BinDeps.jl.git
>> INFO: Cloning cache of Compat from git://
>> github.com/JuliaLang/Compat.jl.git
>> INFO: Cloning cache of Conda from git://github.com/Luthaf/Conda.jl.git
>> INFO: Cloning cache of Dates from git://github.com/quinnj/Dates.jl.git
>> INFO: Cloning cache of JSON from git://github.com/JuliaLang/JSON.jl.git
>> INFO: Cloning cache of PyCall from git://
>> github.com/stevengj/PyCall.jl.git
>> INFO: Cloning cache of SHA from git://github.com/staticfloat/SHA.jl.git
>> INFO: Cloning cache of URIParser from git://
>> github.com/JuliaWeb/URIParser.jl.git
>>
>> INFO: Installing BinDeps v0.3.19
>> INFO: Installing Compat v0.7.7
>> INFO: Installing Conda v0.1.8
>> INFO: Installing Dates v0.4.4
>> INFO: Installing JSON v0.5.0
>> INFO: Installing PyCall v1.1.2
>> INFO: Installing SHA v0.1.2
>> INFO: Installing URIParser v0.1.1
>> INFO: Building PyCall
>> INFO: Precompiling module Compat...
>> INFO: Precompiling module Conda...
>> INFO: No system-wide Python was found; got the following error:
>> could not spawn `python -c "import distutils.sysconfig; 
>> print(distutils.sysconfi
>> g.get_config_var('VERSION'))"`: no such file or directory (ENOENT)
>> using the Python distribution in the Conda package
>> INFO: Downloading miniconda installer ...
>> INFO: Installing miniconda ...
>> Fetching package metadata: 
>> Solving package specifications: .
>> Package plan for installation in environment C:\Users\user\.julia\v0.4\Con
>> da\deps\usr:
>>
>> The following packages will be downloaded:
>>
>> package|build
>> ---|-
>> msvc_runtime-1.0.1 |vc9_0 1.1 MB
>> conda-env-2.4.4|   py27_0  64 KB
>> numpy-1.10.1   |   py27_023.6 MB
>> pyyaml-3.11|   py27_2 167 KB
>> requests-2.8.1 |   py27_0 609 KB
>> setuptools-18.4|   py27_0 647 KB
>> wheel-0.26.0   |   py27_1 116 KB
>> conda-3.18.3   |   py27_0 218 KB
>> pip-7.1.2  |   py27_0 1.4 MB
>> 
>>Total:28.0 MB
>>
>> The following NEW packages will be INSTALLED:
>>
>> msvc_runtime: 1.0.1-vc9_0   [vc9]
>> numpy:1.10.1-py27_0
>> pip:  7.1.2-py27_0
>> setuptools:   18.4-py27_0
>> wheel:0.26.0-py27_1
>>
>> The following packages will be UPDATED:
>>
>> conda:3.9.1-py27_0 --> 3.18.3-py27_0
>> conda-env:2.1.3-py27_0 --> 2.4.4-py27_0
>> pyyaml:   3.11-py27_0  --> 3.11-py27_2
>> requests: 2.5.3-py27_0 --> 2.8.1-py27_0
>>
>> Fetching packages ...
>> msvc_runtime-1 100% |###| Time: 0:00:00   
>> 2.95 MB/s
>> conda-env-2.4. 100% |###| Time: 0:00:00   
>> 2.03 MB/s
>> numpy-1.10.1-p 100% |###| Time: 0:00:03   
>> 7.28 MB/s
>> pyyaml-3.11-py 100% |###| Time: 0:00:00   
>> 2.76 MB/s
>> requests-2.8.1 

[julia-users] Re: Large Data Sets in Julia

2015-11-05 Thread André Lage
hi Viral,

Do you have any news on this?

André Lage.

On Wednesday, July 3, 2013 at 5:12:06 AM UTC-3, Viral Shah wrote:
>
> Hi all,
>
> I am cross-posting my reply to julia-stats and julia-users as there was a 
> separate post on large logistic regressions on julia-users too.
>
> Just as these questions came up, Tanmay and I have been chatting about a 
> general framework for working on problems that are too large to fit in 
> memory, or need parallelism for performance. The idea is simple and based 
> on providing a convenient and generic way to break up a problem into 
> subproblems, each of which can then be scheduled to run anywhere. To start 
> with, we will implement a map and mapreduce using this, and we hope that it 
> should be able to handle large files sequentially, distributed data 
> in-memory, and distributed filesystems within the same framework. Of 
> course, this all sounds too good to be true. We are trying out a simple 
> implementation, and if early results are promising, we can have a detailed 
> discussion on API design and implementation.
>
> Doug, I would love to see if we can use some of this work to parallelize 
> GLM at a higher level than using remotecall and fetch.
>
> -viral
>
> On Tuesday, July 2, 2013 11:10:35 PM UTC+5:30, Douglas Bates wrote:
>>
>> On Tuesday, July 2, 2013 6:26:33 AM UTC-5, Raj DG wrote:
>>
>>> Hi all,
>>>
>>> I am a regular user of R and also use it for handling very large data 
>>> sets (~ 50 GB). We have enough RAM to fit all that data into memory for 
>>> processing, so don't really need to do anything additional to chunk, etc.
>>>
>>> I wanted to get an idea of whether anyone has, in practice, performed 
>>> analysis on large data sets using Julia. Use cases range from performing 
>>> Cox Regression on ~ 40 million rows and over 10 independent variables to 
>>> simple statistical analysis using T-Tests, etc. Also, how does the timings 
>>> for operations like logistic regressions compare to Julia ? Are there any 
>>> libraries/packages that can perform Cox, Poisson (Negative Binomial), and 
>>> other regression types ?
>>>
>>> The benchmarks for Julia look promising, but in today's age of the "big 
>>> data", it seems that the capability of handling large data is a 
>>> pre-requisite to the future success of any new platform or language. 
>>> Looking forward to your feedback,
>>>
>>
>> I think the potential for working with large data sets in Julia is better 
>> than that in R.  Among other things Julia allows for memory-mapped files 
>> and for distributed arrays, both of which have great potential.
>>
>> I have been working with some Biostatisticians on a prototype package for 
>> working with snp data of the sort generated in genome-wide association 
>> studies.  Current data sizes can be information on tens of thousands of 
>> individuals (rows) for over a million snp positions (columns).  The nature 
>> of the data is such that each position provides one of four potential 
>> values, including a missing value.  A compact storage format using 2 bits 
>> per position is widely used for such data.  We are able to read and process 
>> such a large array in a few seconds using memory-mapped files in Julia. 
>>  The amazing thing is that the code is pure Julia.  When I write in R I am 
>> always conscious of the bottlenecks and the need to write C or C++ code for 
>> those places.  I haven't encountered cases where I need to write new code 
>> in a compiled language to speed up a Julia function.  I have interfaced to 
>> existing numerical libraries but not writing fresh code.
>>
>> As John mentioned I have written the GLM package allowing for hooks to 
>> use distributed arrays.  As yet I haven't had a large enough problem to 
>> warrant fleshing out those hooks but I could be persuaded.
>>
>>

[julia-users] slice() instead of making a copy when accessing elements in a Matrix of Matrices

2015-11-05 Thread Patrick Kofod Mogensen
So I have a Matrix{Matrix{Float64}}, and I want to access the first Matrix, 
and multiply it by a parameter vector.

nX = 175
X = 0:1:nX-1
duM = Matrix{Float64}[[zeros(nX) -0.001*X],
  [-ones(nX) zeros(nX)]];

Say I have a parameter Vector b = [9; 2], and want to perform uM[:, 1] = 
duM[1]*b (uM is just a nX - by - 2 Array{Float64,2}), but I don't want to 
make a copy each time. I thought maybe slice(duM, 2), slice(duM, 2, :, :) 
would work, but it doesn't really seem to do the trick. What is it exactly 
I'm missing here?

Best,
Patrick


[julia-users] Coloring Gadfly's Geom.point

2015-11-05 Thread Patrick Kofod Mogensen
I've tried looking through the documentation, and I feel like maybe I am 
just not understanding the types in Color.jl well enough, but say I have a 
scatter plot, how do I 

a) Remove the border
b) Make the points opaque?

Looking at http://gadflyjl.org/geom_point.html I am not quite sure why the 
border is white in some plots and black in others. Is it because of the 
continuous color scale?

Best,
Patrick


Re: [julia-users] filter() & anonymous function

2015-11-05 Thread Mauro
> 1) Is filter an effictient way for doing this ? I assume yes (optionally
> using an inplace version filter!() may be advantageous).

If you need speed you may need to look into FastAnonymous to define your
function.  If this is not a bottleneck, then don't bother.

> 2) It was surprising to me to see that "nobsTreshold" is visible to the
> anonymous function in play1() and also to g() in function play2(). I
> thought that in general function can see only its input parameters. Anyway,
> it is extremely useful that e.g. in line g(x) = size(x, 1) > nobsTreshold;
> g(x) sees nobsTreshold

Functions are a nested scope and can see the variables in their outer
scope(s).  Have a read through the scope section of the manual.


[julia-users] Re: PyPlot not working on 0.4.0

2015-11-05 Thread Steven G. Johnson


On Wednesday, November 4, 2015 at 2:20:52 PM UTC-5, Scott T wrote:
>
> My reply disappeared - I may have sent it directly to jda instead of the 
> group. Anyway, try
>
> julia> Pkg.checkout("PyCall")
> julia> Pkg.update()
>
> since the instructions above are outdated and will give you an old version 
> of PyCall. Then let us know what error you're getting.
>

You need to manually run Pkg.build("PyCall") if you do Pkg.checkout.


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

2015-11-05 Thread Yichao Yu
On Thu, Nov 5, 2015 at 9:12 AM, DNF  wrote:
> I have been looking through the performance tips section of the manual.
> Specifically, I am curious about @simd
> (http://docs.julialang.org/en/release-0.4/manual/performance-tips/#performance-annotations).
>
> When I cut and paste the code demonstrating the @simd macro, I don't get
> substantial speedups. Before updating from OSX Yosemite to El Capitan, I saw
> no speedup whatsoever. After the update, there is a small speedup (I ran the
> example repeatedly):
>
> julia> timeit(1000,1000)
> GFlop= 1.2292170133468385
> GFlop (SIMD) = 1.5351220575547964
>
>
> This contrasts sharply to the example in the documentation which shows a
> speedup from 1.95GFlop to 17.6GFlop.
>
> Does my computer not have simd? How can I tell?
>
> This is my versioninfo:
>
> Julia Version 0.4.0
> Commit 0ff703b* (2015-10-08 06:20 UTC)
> Platform Info:
>   System: Darwin (x86_64-apple-darwin15.0.0)
>   CPU: Intel(R) Core(TM) i7-4850HQ CPU @ 2.30GHz
>   WORD_SIZE: 64
>   BLAS: libopenblas (DYNAMIC_ARCH NO_AFFINITY Haswell)
>   LAPACK: libopenblas
>   LIBM: libopenlibm
>   LLVM: libLLVM-3.3
>

You can check with `code_llvm(innersimd,
Tuple{Vector{Float32},Vector{Float32}})`


Re: [julia-users] Re: error: haskey of NULL PyObject ?

2015-11-05 Thread jda
Can you give more info about how to do this?  


Re: [julia-users] Re: error: haskey of NULL PyObject ?

2015-11-05 Thread jda
Can you provide more details about how to do this?  

On Wednesday, November 4, 2015 at 9:30:42 PM UTC-5, le...@neilson-levin.org 
wrote:
>
> I did not build Julia from source.  But, I am back in business using 
> system Python.  Never got conda to build everything on Windows.
>
>


[julia-users] Do I have simd?

2015-11-05 Thread DNF
I have been looking through the performance tips section of the manual. 
Specifically, I am curious about @simd 
(http://docs.julialang.org/en/release-0.4/manual/performance-tips/#performance-annotations).

When I cut and paste the code demonstrating the @simd macro, I don't get 
substantial speedups. Before updating from OSX Yosemite to El Capitan, I 
saw no speedup whatsoever. After the update, there is a small speedup (I 
ran the example repeatedly):

julia> timeit(1000,1000)
GFlop= 1.2292170133468385
GFlop (SIMD) = 1.5351220575547964


This contrasts sharply to the example in the documentation which shows a 
speedup from 1.95GFlop to 17.6GFlop.

Does my computer not have simd? How can I tell?

This is my versioninfo:

Julia Version 0.4.0
Commit 0ff703b* (2015-10-08 06:20 UTC)
Platform Info:
  System: Darwin (x86_64-apple-darwin15.0.0)
  CPU: Intel(R) Core(TM) i7-4850HQ CPU @ 2.30GHz
  WORD_SIZE: 64
  BLAS: libopenblas (DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas
  LIBM: libopenlibm
  LLVM: libLLVM-3.3



[julia-users] Re: (Yet another) tutorial

2015-11-05 Thread Scott T
Great tutorial, Daan - I think you are onto the right idea focusing on 
dispatch and typing. I liked your example of where value types could be 
useful, as well as stressing that the only reason to add types to arguments 
is to take advantage of dispatch.

Here at Cambridge the mathematics students do a computer-aided project in 
their third year, for which the language of choice seems to be Matlab, but 
I was looking at the list of projects the other day and thinking it would 
be fun to give them a try with Julia.

On Thursday, 5 November 2015 09:47:10 UTC, Daan Huybrechs wrote:
>
> I have recently given a Julia introduction to a group of numerical 
> analysts at the university of Leuven, Belgium. For this, I have written a 
> set of notebooks, and they are available here:
>
> https://github.com/daanhb/Julia-tutorial
>
> The goal of the tutorial is not to survey syntax and features of Julia, 
> but rather to introduce the concepts of type inference and multiple 
> dispatch to people with a background in technical computing and a mindset 
> of object-oriented programming. That makes it a bit orthogonal to existing 
> introductory material, I think. The contents reflect (hopefully) the main 
> messages of the paper "Julia: a fresh approach to numerical computing".
>
> We did three one-hour sessions, using Juliabox. Juliabox is really Very 
> Convenient! This is not enough to learn Julia, but it gives a feeling for 
> what to expect once you do, and to decide whether it is worth it to pursue 
> further. Which of course it is - Julia easily sells itself, especially to 
> the audience I had.
>
>
> Feel free to use and adapt,
> Daan
>
>

Re: [julia-users] a=[1:1:10] WARNING ? What to creat vectors in 4.0 ?

2015-11-05 Thread Tom Breloff
Well, a vector is a one dimensional array... I don't know that this
description should need to point out that typealias...

On Thu, Nov 5, 2015 at 8:00 AM, Paul Analyst  wrote:

> If I am new in Julia and strting and reading this about collect:
> *collect(collection) "Return an array of all items in a collection. For
> associative collections, returns Pair{KeyType, ValType}.*
> *collect(element_type, collection) Return an array of type
> Array{element_type,1} of all items in a collection."*
>
>
>
>
> * Now nothink about vecotrs in manual ! Paul *
>
> W dniu 2015-11-04 o 20:45, Tom Breloff pisze:
>
> The warning is pretty clear here I think.  Use `a = collect(1:10)`
>
> On Wed, Nov 4, 2015 at 2:43 PM, paul analyst 
> wrote:
>
>>_
>>_   _ _(_)_ |  A fresh approach to technical computing
>>   (_) | (_) (_)|  Documentation: 
>> http://docs.julialang.org
>>_ _   _| |_  __ _   |  Type "?help" for help.
>>   | | | | | | |/ _` |  |
>>   | | |_| | | | (_| |  |  Version 0.4.0 (2015-10-08 06:20 UTC)
>>  _/ |\__'_|_|_|\__'_|  |  Official 
>> http://julialang.org/ release
>> |__/   |  x86_64-w64-mingw32
>>
>> julia> a=[1:1:10]
>> WARNING: [a] concatenation is deprecated; use collect(a) instead
>>  in depwarn at deprecated.jl:73
>>  in oldstyle_vcat_warning at abstractarray.jl:29
>>  in vect at abstractarray.jl:32
>> while loading no file, in expression starting on line 0
>> 10-element Array{Int64,1}:
>>   1
>>   2
>>   3
>>   4
>>   5
>>   6
>>   7
>>   8
>>   9
>>  10
>>
>> julia>
>>
>
>
>


Re: [julia-users] a=[1:1:10] WARNING ? What to creat vectors in 4.0 ?

2015-11-05 Thread DNF
A vector is a 1-dimensional array, so *Array{element_type,1} *means 
*Vector{element_type}.*

But I would like to suggest that you should *not* collect into an array. 
Just use 
a = 1:10
and use that directly. 1:10 is a Range which again is an *AbstractVector. *Just 
try if you can use that, and if not, do
a = collect(1:10)

(BTW: you don't need, and shouldn't do 1:1:10, use 1:10.)


On Thursday, November 5, 2015 at 2:01:04 PM UTC+1, paul analyst wrote:
>
> If I am new in Julia and strting and reading this about collect:
> *collect(collection) "Return an array of all items in a collection. For 
> associative collections, returns Pair{KeyType, ValType}.*
> *collect(element_type, collection) Return an array of type 
> Array{element_type,1} of all items in a collection."*
>
>
> * Now nothink about vecotrs in manual ! Paul*
>


[julia-users] Re: (Yet another) tutorial

2015-11-05 Thread Scott T
I just realised that that sounds a bit prescriptivist - of course you could 
add types to a function if you wanted to catch errors early, rather than 
waiting for some deeper call to not work. There are probably other good 
reasons too. But the point where I realised it didn't matter if I didn't 
annotate everything was definitely a load off my mind when programming. So 
I like that you highlighted that.

On Thursday, 5 November 2015 13:52:25 UTC, Scott T wrote:
>
> Great tutorial, Daan - I think you are onto the right idea focusing on 
> dispatch and typing. I liked your example of where value types could be 
> useful, as well as stressing that the only reason to add types to arguments 
> is to take advantage of dispatch.
>
> Here at Cambridge the mathematics students do a computer-aided project in 
> their third year, for which the language of choice seems to be Matlab, but 
> I was looking at the list of projects the other day and thinking it would 
> be fun to give them a try with Julia.
>
> On Thursday, 5 November 2015 09:47:10 UTC, Daan Huybrechs wrote:
>>
>> I have recently given a Julia introduction to a group of numerical 
>> analysts at the university of Leuven, Belgium. For this, I have written a 
>> set of notebooks, and they are available here:
>>
>> https://github.com/daanhb/Julia-tutorial
>>
>> The goal of the tutorial is not to survey syntax and features of Julia, 
>> but rather to introduce the concepts of type inference and multiple 
>> dispatch to people with a background in technical computing and a mindset 
>> of object-oriented programming. That makes it a bit orthogonal to existing 
>> introductory material, I think. The contents reflect (hopefully) the main 
>> messages of the paper "Julia: a fresh approach to numerical computing".
>>
>> We did three one-hour sessions, using Juliabox. Juliabox is really Very 
>> Convenient! This is not enough to learn Julia, but it gives a feeling for 
>> what to expect once you do, and to decide whether it is worth it to pursue 
>> further. Which of course it is - Julia easily sells itself, especially to 
>> the audience I had.
>>
>>
>> Feel free to use and adapt,
>> Daan
>>
>>

[julia-users] filter() & anonymous function

2015-11-05 Thread Ján Dolinský
Hi,

I am exploring filter() and anonymous functions. I'd like to e.g. filter on 
a collection of matrices removing matrices which have less rows than a 
certain critical threshold. 

function play1(X, nobsTreshold)
  filter(x->size(x,1)>nobsTreshold, X)
end

function play2(X, nobsTreshold)
  g(x) = size(x, 1) > nobsTreshold
  filter(g, X)
end

a = [ rand(i, 3) for i in 1:10 ]


play1(a, 7)
play2(a, 7)

Both functions works correctly. I'd like to ask the following:

1) Is filter an effictient way for doing this ? I assume yes (optionally 
using an inplace version filter!() may be advantageous).
2) It was surprising to me to see that "nobsTreshold" is visible to the 
anonymous function in play1() and also to g() in function play2(). I 
thought that in general function can see only its input parameters. Anyway, 
it is extremely useful that e.g. in line g(x) = size(x, 1) > nobsTreshold; 
g(x) sees nobsTreshold

Thanks,
Jan