Re: [julia-users] Re: good practice question: dispatch on type or on type instance

2016-03-11 Thread Toivo Henningsson
Another thing to consider is the case when you want to organise your types in a 
hierarchy. It's easier to write a method that dispatches on all instances of 
(subtypes of) a given abstract type than one that dispatches on all subtypes of 
a given abstract type.

So that would be another vote in favor of dispatching on instances. 

[julia-users] Re: SIAM NEWS March 2016 article

2016-03-11 Thread Cedric St-Jean
Link 
.
 
The author is a Julia co-founder.

On Friday, March 11, 2016 at 8:12:49 PM UTC-5, James Fairbanks wrote:
>
> I just read the article in SIAM news this month. What a great introduction 
> to the wonderful world of Julia. I really like the line "I personally want 
> to see Julia emerge as the language of high performance computing blurring 
> the line distinction between 'Sillicon Valley'-style big data and 
> artificial intelligence (AI) computations, Wall Street style number 
> crunching, and National Laboratory style scientific computing". Put that on 
> a t-shirt! Has anyone seen similar articles in related publications like 
> IEEE and ACM newsletters/magazines?
>


[julia-users] SIAM NEWS March 2016 article

2016-03-11 Thread James Fairbanks
I just read the article in SIAM news this month. What a great introduction 
to the wonderful world of Julia. I really like the line "I personally want 
to see Julia emerge as the language of high performance computing blurring 
the line distinction between 'Sillicon Valley'-style big data and 
artificial intelligence (AI) computations, Wall Street style number 
crunching, and National Laboratory style scientific computing". Put that on 
a t-shirt! Has anyone seen similar articles in related publications like 
IEEE and ACM newsletters/magazines?


Re: [julia-users] Type parameters and Numbers

2016-03-11 Thread Jeffrey Sarnoff
and with that, goes:

import Base: length
length{N}(x::SomeType{N}) = N

On Wednesday, March 9, 2016 at 5:18:18 AM UTC-5, jw3126 wrote:
>
> Nice this is much cleaner!
>
> On Wednesday, March 9, 2016 at 10:49:03 AM UTC+1, Milan Bouchet-Valat 
> wrote:
>>
>> Le mercredi 09 mars 2016 à 01:41 -0800, jw3126 a écrit : 
>> > I want to construct an immutable parametrized by a number dim, which 
>> > has a field of type Tuple{Int64, Int64, ... } where Int64 is repeated 
>> > dim times. I tried  
>> > 
>> > immutable SomeType{dim} 
>> > x :: Tuple{repeat([Int64], outer = [dim])...} 
>> > end 
>> > 
>> > However this gives the following error: 
>> > 
>> > LoadError: TypeError: typeassert: expected Array{Int64,N}, got 
>> > Array{TypeVar,1} 
>> > while loading In[8], in expression starting on line 1 
>> > 
>> > What is the recommended way to construct such a type? 
>> Try this: 
>> immutable SomeType{N} 
>> x::NTuple{N, Int64} 
>> end 
>>
>>
>> Regards 
>>
>

Re: [julia-users] Code doesn't work, i can't figure out why? Please have a look!

2016-03-11 Thread Jeffrey Sarnoff
Julie, it may help someone else to understand what is needed if you would 
share what it is that you are trying to accomplish in words.  

On Friday, March 11, 2016 at 12:24:36 PM UTC-5, Julia Tylors wrote:
>
> Maybe the code generated should be looking something like this :
>
>
> GenSym(0) = 
> ((top(getfield))((top(getfield))(Transmission,:Download),:download_task))(Val{symbol("##7731")},x,y,v1,v2)
> #s222 = (top(start))(GenSym(0))
> GenSym(1) = (top(indexed_next))(GenSym(0),1,#s222)
> v3 = (top(getfield))(GenSym(1),1)
> #s222 = (top(getfield))(GenSym(1),2)
> GenSym(2) = (top(indexed_next))(GenSym(0),2,#s222)
> v4 = (top(getfield))(GenSym(2),1)
> #s222 = (top(getfield))(GenSym(2),2)
>
> I am kind of confused, can somebody offer some solution to my problem?
> Thanks
>
> On Thursday, March 10, 2016 at 11:50:47 PM UTC-8, Julia Tylors wrote:
>>
>> Now the generated code looks like this:
>>
>> AST(:($(Expr(:lambda, Any[:x,:y], 
>> Any[Any[Any[:x,:Any,1],Any[:y,:Any,1],Any[:v1,:Any,7],Any[:v2,:Any,7]],Any[],0,Any[]],
>>  
>> :(begin  # none, line 2:
>> NewvarNode(:v1)
>> NewvarNode(:v2)
>> v1 = 2.1 
>> v2 = 2.2 
>> (v1,v2) = 
>> ((top(getfield))((top(getfield))(Transmission,:Download),:download_task))(Val{symbol("##7731")},x,y,v1,v2)
>>  
>> return v1 + v2
>> end)
>>
>> however, when i call test(1.1,2.2), it gives me the following error:
>>
>> signal (11): Segmentation fault
>> var_binding_pointer at  codegen.cpp:2858
>> emit_assignment at  codegen.cpp:3052
>> emit_function at  codegen.cpp:4697
>> jl_eh_restore_state at  julia.h:1410
>> jl_compile at  codegen.cpp:812
>> jl_trampoline_compile_function at  builtins.c:1025
>> jl_apply at  gf.c:1709
>> do_call at  interpreter.c:66
>> eval at  interpreter.c:213
>> jl_toplevel_eval_flex at  toplevel.c:544
>> jl_eh_restore_state at  julia.h:1410
>> eval_user_input at ./REPL.jl:62
>> unknown function (ip: 0x7f52402a9497)
>> jl_apply at  gf.c:1711
>> anonymous at ./REPL.jl:85
>> start_task at  task.c:246
>> unknown function (ip: (nil))
>> Segmentation fault
>>
>>
>>
>>
>>
>> On Thursday, March 10, 2016 at 10:07:05 PM UTC-8, Julia Tylors wrote:
>>>
>>> I fixed it, It should have been like this:
>>>
>>>  (:v1,:v2) = 
>>> ((top(getfield))((top(getfield))(Staged,:Runtime),:kernel_call))(Val{symbol("##7731")},x,y,v1,v2)
>>>
>>> On Thursday, March 10, 2016 at 3:48:49 PM UTC-8, Yichao Yu wrote:

 On Thu, Mar 10, 2016 at 6:04 PM, Julia Tylors  
 wrote: 
 > 
 > 
 > Hi fellows, I have a problem which i can't solve. 
 > 
 > I have a function test(x,y) which has the ast as follows: 
 > (test.env.defs.func.code) 
 > 
 > 
 > :($(Expr(:method, :test, 
 > :((top(svec))((top(apply_type))(Tuple,Any,Any),(top(svec))())), 
 > AST(:($(Expr(:lambda, Any[:x,:y], 
 > 
 Any[Any[Any[:x,:Any,1],Any[:y,:Any,1],Any[:v1,:Any,7],Any[:v2,:Any,7]],Any[],0,Any[]],
  

 > :(begin  # none, line 2: 
 > NewvarNode(:v1) 
 > NewvarNode(:v2) 
 > v1 = 2.1 
 > v2 = 2.2 
 > $(Expr(:(=), :v1, :v2, 
 > 
 :(((top(getfield))((top(getfield))(Transmission,:Download),:download_task))(Val{symbol("##7775")},x,y,v1,v2
  

 > return v1 + v2 
 > end), false))) 
 > 
 > 

 Can you show how you generated `test`? 

 > 
 > when i call test(1.1,2.2), it returns 4.4 but it should have returned 
 > v1 = 1.1*2.2 = 2.42 
 > v2 = 2.2*2.1 = 4.62 
 > 
 > so the result should be v1+v2 , 7.04 
 > 
 > Here is the download_task function. 
 > @generated function download_task{id}(::Type{Val{id}}, args...) 
 > println("Download Task $id for argument types $args") 
 > :((args[1] * args[2]), (args[2] * args[3])) 
 > end 
 > 
 > I am suspicious about the part in bold 
 > 
 > $(Expr(:(=), :v1, :v2, 
 > 
 :(((top(getfield))((top(getfield))(Transmission,:Download),:download_task))(Val{symbol("##7775")},x,y,v1,v2
  

 > 
 > this part doesn't get executed! Or somewhat expanded wrong. I am not 
 totally 
 > sure. 
 > Anyone with a better understanding , please help me out.! 
 > 
 > Thanks 

>>>

Re: [julia-users] Re: Status of Plots.jl?

2016-03-11 Thread Daniel Carrera
It works. Thanks!

On 11 March 2016 at 17:32, Spencer Lyon  wrote:

> Hey Daniel,
>
> The issue you're seeing is that PlotlyJS uses Blink to spin up a dedicated
> electron window as the plotting GUI.
>
> When Blink.jl is installed it doesn't automatically install electron for
> you, but it does know how to install electron. To do that just enter `using
> Blink; Blink.AtomShell.install()` and everything should be taken care of
> for you. Then when you use the plotlyjs backend from the REPL you will get
> an electron display for your plots. More details on why you want electron
> as the GUI window here:
> http://spencerlyon.com/PlotlyJS.jl/syncplots/#electronplot
>
> Also, if you are plotting from an IJulia notebook plotlyjs plots will
> display in the notebook by default and you won't ever need to install
> electron.
>
> Good luck!
>
> On Thursday, March 10, 2016 at 2:03:14 PM UTC-5, Daniel Carrera wrote:
>>
>> On 10 March 2016 at 18:23, Tom Breloff  wrote:
>>
>>>
>>> On Thu, Mar 10, 2016 at 12:08 PM, j verzani  wrote:
>>>
 As someone who has watched his calculus students struggle with what
 should be a trivial task -- the installation of `Plots` on `juliabox`, I've
 wished it were part of base.

>>>
>>> While in my (very biased) opinion I think Plots should be the first
>>> package new users install, I don't think it belongs in base.  (please don't
>>> make me rebuild julia to hack on Plots ;)
>>>
>>
>>
>> I think Plots could be part of the "standard library" (to borrow a term
>> from Python). So it would not be in Base, but it could be pre-installed.
>> Plotting is one of the most common things that scientists and engineers do.
>> Maybe not right now, but when Plots is more mature.
>>
>> Speaking of which, I'm also having trouble with PlotlyJS.
>>
>>
>> julia> plotlyjs()
>> Plots.PlotlyJSPackage()
>>
>> julia> plot(Plots.fakedata(50,5),w=3)
>> [Plots.jl] Initializing backend: plotlyjs
>> INFO: Precompiling module Blink...
>> INFO: Recompiling stale cache file /home/daniel/.julia/lib/v0.4/Nettle.ji
>> for module Nettle.
>> ERROR: Cannot find Electron. Try `AtomShell.install()`.
>>  in electron at /home/daniel/.julia/v0.4/Blink/src/AtomShell/process.jl:49
>>  ...
>>
>>
>> For some reason, PlotlyJS seems to think that I am running it from Atom.
>> :-(
>>
>>
>>


Re: [julia-users] Re: Status of Plots.jl?

2016-03-11 Thread Daniel Carrera
Can you show me how to use GR as a backend for PyPlot / Matplotlib? I read
that it was possible but I couldn't figure out how.


On 11 March 2016 at 20:28, Josef Heinen  wrote:

> GR.jl is also supported inside Atom, either standalone (see screenshot),
> or as a backend for Plots.jl or PyPlot.jl (Matplotlib).
>
>
>


Re: [julia-users] What to read to understand finishing v0.5?

2016-03-11 Thread Daniel Carrera
On 11 March 2016 at 15:20, Andreas Lobinger  wrote:

>
> first of all:
> https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md exists.
>


Thanks!


> You really need some git experience and know how to organize your own work
> in local and github (your fork of julia) repositories. I found this helpful
>
> http://stackoverflow.com/questions/27567846/how-can-i-checkout-a-github-pull-request
>
> PRs you do (to julia) should be subject to automatic testing.
>


Yeah, I have some git experience. I use git on my own projects, but for me
it's little more than running "git commit" from time to time. I used to
know more. It's all slowly coming back to me. :-)

Cheers,
Daniel.


Re: [julia-users] Status of Graphs.jl ?

2016-03-11 Thread Tim Holy
I think LightGraphs.jl is more active.

Best,
--Tim

On Thursday, March 10, 2016 10:45:35 PM Mridul Seth wrote:
> https://github.com/JuliaLang/Graphs.jl looks like a great project but there
> haven't been a lot of activity (last commit Nov 1, 2015). Is there any
> general interest regarding working on Graphs.jl during GSoC period?
> And what the difference between https://github.com/JuliaGraphs and Graphs.jl
> 
> Thanks,
> Mridul Seth



Re: [julia-users] Re: Status of Plots.jl?

2016-03-11 Thread Josef Heinen
The convenience layer is WIP, so you have to checkout the GR master branch: 
Pkg.checkout("GR")

On Friday, March 11, 2016 at 8:43:09 PM UTC+1, Philippe Roy wrote:
>
> Thanks,
>
> However, I get the "scatter is not defined" by typing your example inside 
> Juno/Atom and Juno/LT.
>


Re: [julia-users] Re: Status of Plots.jl?

2016-03-11 Thread Tom Breloff
I just started using Atom yesterday, and I think it's pretty great.  I
spent some time today trying to figure things out, and was able to get
Gadfly, PyPlot, and GR going in Atom's PlotPane.  I'm working on
Plotly/PlotlyJS right now.  If anyone wants to experiment, check out the
dev branch of Plots.

On Fri, Mar 11, 2016 at 2:43 PM, Philippe Roy  wrote:

> Thanks,
>
> However, I get the "scatter is not defined" by typing your example inside
> Juno/Atom and Juno/LT.
>
>
> Le vendredi 11 mars 2016 14:28:00 UTC-5, Josef Heinen a écrit :
>>
>> GR.jl is also supported inside Atom, either standalone (see screenshot),
>> or as a backend for Plots.jl or PyPlot.jl (Matplotlib).
>>
>>
>> 
>>
>>
>> On Friday, March 11, 2016 at 3:35:07 PM UTC+1, Philippe Roy wrote:
>>>
>>> Hi! Nice package Tom. Is this supposed to work inside Atom with the
>>> julia "IDE" ? The plots seems to work, but I really don't know where they
>>> appear! they're not in the plots pane (I think only Gadfly is supported as
>>> of now inside Atom).
>>>
>>> Thanks for any help!
>>>
>>> Le jeudi 10 mars 2016 14:08:23 UTC-5, Tom Breloff a écrit :

 You should read up more on PlotlyJS:
 http://spencerlyon.com/PlotlyJS.jl/

 Or from the Plots docs:

 Plotly / PlotlyJS
> These are treated as separate backends, though they share much of the
> code and use the Plotly javascript API.  plotly() is the only
> dependency-free plotting option, as the required javascript is bundled 
> with
> Plots. It can create inline plots in IJulia, or open standalone browser
> windows when run from the Julia REPL.
> plotlyjs() is the preferred option, and taps into the great
> functionality of Spencer Lyon's PlotlyJS.jl. Inline IJulia plots can be
> updated from any cell... something that makes this backend stand out. From
> the Julia REPL, it taps into Blink.jl and Electron to plot within a
> standalone GUI window... also very cool.


 On Thu, Mar 10, 2016 at 2:03 PM, Daniel Carrera 
 wrote:

> On 10 March 2016 at 18:23, Tom Breloff  wrote:
>
>>
>> On Thu, Mar 10, 2016 at 12:08 PM, j verzani 
>> wrote:
>>
>>> As someone who has watched his calculus students struggle with what
>>> should be a trivial task -- the installation of `Plots` on `juliabox`, 
>>> I've
>>> wished it were part of base.
>>>
>>
>> While in my (very biased) opinion I think Plots should be the first
>> package new users install, I don't think it belongs in base.  (please 
>> don't
>> make me rebuild julia to hack on Plots ;)
>>
>
>
> I think Plots could be part of the "standard library" (to borrow a
> term from Python). So it would not be in Base, but it could be
> pre-installed. Plotting is one of the most common things that scientists
> and engineers do. Maybe not right now, but when Plots is more mature.
>
> Speaking of which, I'm also having trouble with PlotlyJS.
>
>
> julia> plotlyjs()
> Plots.PlotlyJSPackage()
>
> julia> plot(Plots.fakedata(50,5),w=3)
> [Plots.jl] Initializing backend: plotlyjs
> INFO: Precompiling module Blink...
> INFO: Recompiling stale cache file
> /home/daniel/.julia/lib/v0.4/Nettle.ji for module Nettle.
> ERROR: Cannot find Electron. Try `AtomShell.install()`.
>  in electron at
> /home/daniel/.julia/v0.4/Blink/src/AtomShell/process.jl:49
>  ...
>
>
> For some reason, PlotlyJS seems to think that I am running it from
> Atom. :-(
>
>
>



Re: [julia-users] ANN: PlotlyJS.jl

2016-03-11 Thread Mike Innes
PlotlyJS has been shaping up really nicely, and I plan to get it working
inside of Atom soon as well, so you'll get all the same interactive /
streaming possibilities inside a plot pane with history, saving etc. Really
excited to get those things integrated together. Great work by Spencer!

On Fri, 11 Mar 2016 at 17:26 Spencer Lyon  wrote:

> Callbacks are still not supported yet. Hopefully I can find some time soon
> to work on that.
>
> The data flow is Julia -> json -> js and the same in the other direction:
>  js -> json -> julia.
>
> Even without callbacks, we have the ability to send new data from Julia to
> javascript on the fly. The user is able to send _only_ new data points (the
> entire array is not serialized) and plotly will draw _only_ the new data
> (instead of redrawing the entire image). I haven't benchmarked anything,
> but I believe (hope ;) ) this should be pretty efficient for streaming plot
> updates.
>
> Once I find the time I will write up an example notebook about how this
> works. However, for the impatient, you can check the docstrings to these
> methods:
> https://github.com/spencerlyon2/PlotlyJS.jl/blob/950a21217ad4bb55d8f64f50522765653f2f31ce/src/api.jl#L233-L300
> (they are actually much more flexible than just sending new (x, y, z)
> points to be displayed and allow you to stream updates to any chart
> attribute).
>
>
>
>
>
> On Friday, March 11, 2016 at 12:17:43 PM UTC-5, Tim Holy wrote:
>>
>> This sounds really exciting!
>>
>> I have a couple of technical questions:
>> - Last I checked (a few days ago), the docs said that callbacks aren't
>> supported yet. Has that changed already?
>> - How are data transported? I assume you have to serialize arrays via
>> JSON?
>> When new data arrive, do you reserialize the entire array, or is this
>> doing
>> something uber-clever?
>>
>> Best,
>> --Tim
>>
>> On Friday, March 11, 2016 08:18:14 AM Spencer Lyon wrote:
>> > New package announcement. I've just registered PlotlyJS.jl with
>> metadata.
>> > The package leverages the plotly.js javascript library to provide a
>> backend
>> > for offline plot generation (no interaction with plotly's web API).
>> This
>> > will be the backend used to generate figures in the soon to be revamped
>> > Plotly.jl package. The latter will serve as the interface between Julia
>> and
>> > plotly's REST API.
>> >
>> > The package has two main goals
>> >
>> >1. Make it convenient to construct and manipulate plotly
>> visualizations
>> >2. Provide infrastructure for viewing plots on multiple frontends
>> and
>> >saving plotly graphics to files
>> >
>> >
>> >
>> > Up to this point I have intentionally not put effort into creating a
>> > plotting API for this package, but rather have made it easy to leverage
>> > plotly's declarative API from Julia. If you are looking for a lot of
>> API
>> > extensions, see the plotlyjs backend in Plots.jl.
>> >
>> > One main feature is a dedicated plotting GUI in an electron window
>> (powered
>> > by Blink.jl). This allows us to have full 2 way communication between
>> Julia
>> > and javascript, taking interactive plotting to a new level (enabling,
>> among
>> > other things, streaming workflows where plots are updated inplace as
>> new
>> > data arrives)
>> >
>> > Check out the docs here: http://spencerlyon.com/PlotlyJS.jl/
>>
>>


Re: [julia-users] Re: Status of Plots.jl?

2016-03-11 Thread Philippe Roy
Thanks,

However, I get the "scatter is not defined" by typing your example inside 
Juno/Atom and Juno/LT.

Le vendredi 11 mars 2016 14:28:00 UTC-5, Josef Heinen a écrit :
>
> GR.jl is also supported inside Atom, either standalone (see screenshot), 
> or as a backend for Plots.jl or PyPlot.jl (Matplotlib).
>
>
> 
>
>
> On Friday, March 11, 2016 at 3:35:07 PM UTC+1, Philippe Roy wrote:
>>
>> Hi! Nice package Tom. Is this supposed to work inside Atom with the julia 
>> "IDE" ? The plots seems to work, but I really don't know where they appear! 
>> they're not in the plots pane (I think only Gadfly is supported as of now 
>> inside Atom).
>>
>> Thanks for any help!
>>
>> Le jeudi 10 mars 2016 14:08:23 UTC-5, Tom Breloff a écrit :
>>>
>>> You should read up more on PlotlyJS: http://spencerlyon.com/PlotlyJS.jl/
>>>
>>> Or from the Plots docs:
>>>
>>> Plotly / PlotlyJS
 These are treated as separate backends, though they share much of the 
 code and use the Plotly javascript API.  plotly() is the only 
 dependency-free plotting option, as the required javascript is bundled 
 with 
 Plots. It can create inline plots in IJulia, or open standalone browser 
 windows when run from the Julia REPL.
 plotlyjs() is the preferred option, and taps into the great 
 functionality of Spencer Lyon's PlotlyJS.jl. Inline IJulia plots can be 
 updated from any cell... something that makes this backend stand out. From 
 the Julia REPL, it taps into Blink.jl and Electron to plot within a 
 standalone GUI window... also very cool.
>>>
>>>
>>> On Thu, Mar 10, 2016 at 2:03 PM, Daniel Carrera  
>>> wrote:
>>>
 On 10 March 2016 at 18:23, Tom Breloff  wrote:

>
> On Thu, Mar 10, 2016 at 12:08 PM, j verzani  wrote:
>
>> As someone who has watched his calculus students struggle with what 
>> should be a trivial task -- the installation of `Plots` on `juliabox`, 
>> I've 
>> wished it were part of base. 
>>
>
> While in my (very biased) opinion I think Plots should be the first 
> package new users install, I don't think it belongs in base.  (please 
> don't 
> make me rebuild julia to hack on Plots ;)
>


 I think Plots could be part of the "standard library" (to borrow a term 
 from Python). So it would not be in Base, but it could be pre-installed. 
 Plotting is one of the most common things that scientists and engineers 
 do. 
 Maybe not right now, but when Plots is more mature.

 Speaking of which, I'm also having trouble with PlotlyJS.


 julia> plotlyjs()
 Plots.PlotlyJSPackage()

 julia> plot(Plots.fakedata(50,5),w=3)
 [Plots.jl] Initializing backend: plotlyjs
 INFO: Precompiling module Blink...
 INFO: Recompiling stale cache file 
 /home/daniel/.julia/lib/v0.4/Nettle.ji for module Nettle.
 ERROR: Cannot find Electron. Try `AtomShell.install()`.
  in electron at 
 /home/daniel/.julia/v0.4/Blink/src/AtomShell/process.jl:49
  ...


 For some reason, PlotlyJS seems to think that I am running it from 
 Atom. :-(



>>>

Re: [julia-users] Re: Status of Plots.jl?

2016-03-11 Thread Mike Innes
Just FYI, this is actually the old Juno on Light Table, not Atom – which I
recommend everyone uses at this point :)

On Fri, 11 Mar 2016 at 19:28 Josef Heinen  wrote:

> GR.jl is also supported inside Atom, either standalone (see screenshot),
> or as a backend for Plots.jl or PyPlot.jl (Matplotlib).
>
>
> 
>
>
> On Friday, March 11, 2016 at 3:35:07 PM UTC+1, Philippe Roy wrote:
>>
>> Hi! Nice package Tom. Is this supposed to work inside Atom with the julia
>> "IDE" ? The plots seems to work, but I really don't know where they appear!
>> they're not in the plots pane (I think only Gadfly is supported as of now
>> inside Atom).
>>
>> Thanks for any help!
>>
>> Le jeudi 10 mars 2016 14:08:23 UTC-5, Tom Breloff a écrit :
>>>
>>> You should read up more on PlotlyJS: http://spencerlyon.com/PlotlyJS.jl/
>>>
>>> Or from the Plots docs:
>>>
>>> Plotly / PlotlyJS
 These are treated as separate backends, though they share much of the
 code and use the Plotly javascript API.  plotly() is the only
 dependency-free plotting option, as the required javascript is bundled with
 Plots. It can create inline plots in IJulia, or open standalone browser
 windows when run from the Julia REPL.
 plotlyjs() is the preferred option, and taps into the great
 functionality of Spencer Lyon's PlotlyJS.jl. Inline IJulia plots can be
 updated from any cell... something that makes this backend stand out. From
 the Julia REPL, it taps into Blink.jl and Electron to plot within a
 standalone GUI window... also very cool.
>>>
>>>
>>> On Thu, Mar 10, 2016 at 2:03 PM, Daniel Carrera 
>>> wrote:
>>>
 On 10 March 2016 at 18:23, Tom Breloff  wrote:

>
> On Thu, Mar 10, 2016 at 12:08 PM, j verzani  wrote:
>
>> As someone who has watched his calculus students struggle with what
>> should be a trivial task -- the installation of `Plots` on `juliabox`, 
>> I've
>> wished it were part of base.
>>
>
> While in my (very biased) opinion I think Plots should be the first
> package new users install, I don't think it belongs in base.  (please 
> don't
> make me rebuild julia to hack on Plots ;)
>


 I think Plots could be part of the "standard library" (to borrow a term
 from Python). So it would not be in Base, but it could be pre-installed.
 Plotting is one of the most common things that scientists and engineers do.
 Maybe not right now, but when Plots is more mature.

 Speaking of which, I'm also having trouble with PlotlyJS.


 julia> plotlyjs()
 Plots.PlotlyJSPackage()

 julia> plot(Plots.fakedata(50,5),w=3)
 [Plots.jl] Initializing backend: plotlyjs
 INFO: Precompiling module Blink...
 INFO: Recompiling stale cache file
 /home/daniel/.julia/lib/v0.4/Nettle.ji for module Nettle.
 ERROR: Cannot find Electron. Try `AtomShell.install()`.
  in electron at
 /home/daniel/.julia/v0.4/Blink/src/AtomShell/process.jl:49
  ...


 For some reason, PlotlyJS seems to think that I am running it from
 Atom. :-(



>>>


Re: [julia-users] Re: Status of Plots.jl?

2016-03-11 Thread Josef Heinen
GR.jl is also supported inside Atom, either standalone (see screenshot), or 
as a backend for Plots.jl or PyPlot.jl (Matplotlib).




On Friday, March 11, 2016 at 3:35:07 PM UTC+1, Philippe Roy wrote:
>
> Hi! Nice package Tom. Is this supposed to work inside Atom with the julia 
> "IDE" ? The plots seems to work, but I really don't know where they appear! 
> they're not in the plots pane (I think only Gadfly is supported as of now 
> inside Atom).
>
> Thanks for any help!
>
> Le jeudi 10 mars 2016 14:08:23 UTC-5, Tom Breloff a écrit :
>>
>> You should read up more on PlotlyJS: http://spencerlyon.com/PlotlyJS.jl/
>>
>> Or from the Plots docs:
>>
>> Plotly / PlotlyJS
>>> These are treated as separate backends, though they share much of the 
>>> code and use the Plotly javascript API.  plotly() is the only 
>>> dependency-free plotting option, as the required javascript is bundled with 
>>> Plots. It can create inline plots in IJulia, or open standalone browser 
>>> windows when run from the Julia REPL.
>>> plotlyjs() is the preferred option, and taps into the great 
>>> functionality of Spencer Lyon's PlotlyJS.jl. Inline IJulia plots can be 
>>> updated from any cell... something that makes this backend stand out. From 
>>> the Julia REPL, it taps into Blink.jl and Electron to plot within a 
>>> standalone GUI window... also very cool.
>>
>>
>> On Thu, Mar 10, 2016 at 2:03 PM, Daniel Carrera  
>> wrote:
>>
>>> On 10 March 2016 at 18:23, Tom Breloff  wrote:
>>>

 On Thu, Mar 10, 2016 at 12:08 PM, j verzani  wrote:

> As someone who has watched his calculus students struggle with what 
> should be a trivial task -- the installation of `Plots` on `juliabox`, 
> I've 
> wished it were part of base. 
>

 While in my (very biased) opinion I think Plots should be the first 
 package new users install, I don't think it belongs in base.  (please 
 don't 
 make me rebuild julia to hack on Plots ;)

>>>
>>>
>>> I think Plots could be part of the "standard library" (to borrow a term 
>>> from Python). So it would not be in Base, but it could be pre-installed. 
>>> Plotting is one of the most common things that scientists and engineers do. 
>>> Maybe not right now, but when Plots is more mature.
>>>
>>> Speaking of which, I'm also having trouble with PlotlyJS.
>>>
>>>
>>> julia> plotlyjs()
>>> Plots.PlotlyJSPackage()
>>>
>>> julia> plot(Plots.fakedata(50,5),w=3)
>>> [Plots.jl] Initializing backend: plotlyjs
>>> INFO: Precompiling module Blink...
>>> INFO: Recompiling stale cache file 
>>> /home/daniel/.julia/lib/v0.4/Nettle.ji for module Nettle.
>>> ERROR: Cannot find Electron. Try `AtomShell.install()`.
>>>  in electron at 
>>> /home/daniel/.julia/v0.4/Blink/src/AtomShell/process.jl:49
>>>  ...
>>>
>>>
>>> For some reason, PlotlyJS seems to think that I am running it from Atom. 
>>> :-(
>>>
>>>
>>>
>>

[julia-users] Run julia with -L and pass args to the loaded file

2016-03-11 Thread Adrian Salceanu
Is it possible to use 
$> julia -L filename.jl --env=test
and pass the additional args to the script, rather than to julia? 

I tried using various combinations, with and without  --  but to no avail. 
-L seems to always gobble everything following it. 

$> julia -L filename.jl --env=test
ERROR: unknown option `--env=test`

$> julia -L filename.jl -- --env=test
ERROR: could not open file /Users/adrian/Dropbox/Projects/jinnie/--

Cheers! 


[julia-users] Re: Functionality of put!, take!, and Channels

2016-03-11 Thread michael
Going off of an answer on StackOverflow using RemoteRef instead of Channel 
works as well. The answerer points out the reason why the latter doesn't 
work.

On Thursday, March 10, 2016 at 9:13:56 PM UTC-7, michael wrote:
>
> At the suggestion of @axsk  I tried this again 
> but using a SharedArray instead of a channel and it seems to be working 
> now. I am curious as to why my approach didn't work, if anyone cares to 
> explain.
>
> (I'm on v0.4.3)
>
> On Tuesday, March 8, 2016 at 6:56:39 AM UTC-7, michael wrote:
>>
>> I'm fairly new to parallel processing but I'm trying to use Channels in a 
>> way I think is consistent with the documentation but I may be 
>> misinterpreting it. I've explained in more detail in a StackOverflow post 
>> 
>>  but 
>> essentially what I'm trying to do is have an integer variable that several 
>> processes can access and, if one returns an integer smaller than that 
>> variable, can update. The general approach is something like this:
>>
>> x = Channel{Int64}(1)
>> put!(x,n)
>>
>> @everywhere function f(item,chan)
>> going = true
>> count = 0
>> while(going)
>> going = false
>> # perform some operations
>> if (count < fetch(chan) && !conditions_met())
>> # conditions_met checks the other termination conditions
>> going = true
>> count += 1
>> end
>> end
>>
>> count += 1
>>
>> if (count < fetch(chan))
>> take!(chan)
>> put!(chan,count)
>> end
>>
>> return count
>> end
>>
>> y = @parallel (min) for i in collection
>> f(i,x)
>> end
>>
>> Am I correct in my logic? Is this something I should be able to do?
>>
>

Re: [julia-users] Code doesn't work, i can't figure out why? Please have a look!

2016-03-11 Thread Yichao Yu
On Fri, Mar 11, 2016 at 12:24 PM, Julia Tylors  wrote:
> Maybe the code generated should be looking something like this :
>
>
> GenSym(0) =
> ((top(getfield))((top(getfield))(Transmission,:Download),:download_task))(Val{symbol("##7731")},x,y,v1,v2)
> #s222 = (top(start))(GenSym(0))
> GenSym(1) = (top(indexed_next))(GenSym(0),1,#s222)
> v3 = (top(getfield))(GenSym(1),1)
> #s222 = (top(getfield))(GenSym(1),2)
> GenSym(2) = (top(indexed_next))(GenSym(0),2,#s222)
> v4 = (top(getfield))(GenSym(2),1)
> #s222 = (top(getfield))(GenSym(2),2)
>
> I am kind of confused, can somebody offer some solution to my problem?
> Thanks
>

FWIW, you should never generate `GenSym()`'s yourself. And you also
shouldn't use `expand` in the macro.

>
> On Thursday, March 10, 2016 at 11:50:47 PM UTC-8, Julia Tylors wrote:
>>
>> Now the generated code looks like this:
>>
>> AST(:($(Expr(:lambda, Any[:x,:y],
>> Any[Any[Any[:x,:Any,1],Any[:y,:Any,1],Any[:v1,:Any,7],Any[:v2,:Any,7]],Any[],0,Any[]],
>> :(begin  # none, line 2:
>> NewvarNode(:v1)
>> NewvarNode(:v2)
>> v1 = 2.1
>> v2 = 2.2
>> (v1,v2) =
>> ((top(getfield))((top(getfield))(Transmission,:Download),:download_task))(Val{symbol("##7731")},x,y,v1,v2)
>> return v1 + v2
>> end)
>>
>> however, when i call test(1.1,2.2), it gives me the following error:
>>
>> signal (11): Segmentation fault
>> var_binding_pointer at  codegen.cpp:2858
>> emit_assignment at  codegen.cpp:3052
>> emit_function at  codegen.cpp:4697
>> jl_eh_restore_state at  julia.h:1410
>> jl_compile at  codegen.cpp:812
>> jl_trampoline_compile_function at  builtins.c:1025
>> jl_apply at  gf.c:1709
>> do_call at  interpreter.c:66
>> eval at  interpreter.c:213
>> jl_toplevel_eval_flex at  toplevel.c:544
>> jl_eh_restore_state at  julia.h:1410
>> eval_user_input at ./REPL.jl:62
>> unknown function (ip: 0x7f52402a9497)
>> jl_apply at  gf.c:1711
>> anonymous at ./REPL.jl:85
>> start_task at  task.c:246
>> unknown function (ip: (nil))
>> Segmentation fault
>>
>>
>>
>>
>>
>> On Thursday, March 10, 2016 at 10:07:05 PM UTC-8, Julia Tylors wrote:
>>>
>>> I fixed it, It should have been like this:
>>>
>>>  (:v1,:v2) =
>>> ((top(getfield))((top(getfield))(Staged,:Runtime),:kernel_call))(Val{symbol("##7731")},x,y,v1,v2)
>>>
>>> On Thursday, March 10, 2016 at 3:48:49 PM UTC-8, Yichao Yu wrote:

 On Thu, Mar 10, 2016 at 6:04 PM, Julia Tylors 
 wrote:
 >
 >
 > Hi fellows, I have a problem which i can't solve.
 >
 > I have a function test(x,y) which has the ast as follows:
 > (test.env.defs.func.code)
 >
 >
 > :($(Expr(:method, :test,
 > :((top(svec))((top(apply_type))(Tuple,Any,Any),(top(svec))())),
 > AST(:($(Expr(:lambda, Any[:x,:y],
 >
 > Any[Any[Any[:x,:Any,1],Any[:y,:Any,1],Any[:v1,:Any,7],Any[:v2,:Any,7]],Any[],0,Any[]],
 > :(begin  # none, line 2:
 > NewvarNode(:v1)
 > NewvarNode(:v2)
 > v1 = 2.1
 > v2 = 2.2
 > $(Expr(:(=), :v1, :v2,
 >
 > :(((top(getfield))((top(getfield))(Transmission,:Download),:download_task))(Val{symbol("##7775")},x,y,v1,v2
 > return v1 + v2
 > end), false)))
 >
 >

 Can you show how you generated `test`?

 >
 > when i call test(1.1,2.2), it returns 4.4 but it should have returned
 > v1 = 1.1*2.2 = 2.42
 > v2 = 2.2*2.1 = 4.62
 >
 > so the result should be v1+v2 , 7.04
 >
 > Here is the download_task function.
 > @generated function download_task{id}(::Type{Val{id}}, args...)
 > println("Download Task $id for argument types $args")
 > :((args[1] * args[2]), (args[2] * args[3]))
 > end
 >
 > I am suspicious about the part in bold
 >
 > $(Expr(:(=), :v1, :v2,
 >
 > :(((top(getfield))((top(getfield))(Transmission,:Download),:download_task))(Val{symbol("##7775")},x,y,v1,v2
 >
 > this part doesn't get executed! Or somewhat expanded wrong. I am not
 > totally
 > sure.
 > Anyone with a better understanding , please help me out.!
 >
 > Thanks


Re: [julia-users] ANN: PlotlyJS.jl

2016-03-11 Thread Spencer Lyon
Callbacks are still not supported yet. Hopefully I can find some time soon 
to work on that.

The data flow is Julia -> json -> js and the same in the other direction: 
 js -> json -> julia.

Even without callbacks, we have the ability to send new data from Julia to 
javascript on the fly. The user is able to send _only_ new data points (the 
entire array is not serialized) and plotly will draw _only_ the new data 
(instead of redrawing the entire image). I haven't benchmarked anything, 
but I believe (hope ;) ) this should be pretty efficient for streaming plot 
updates.  

Once I find the time I will write up an example notebook about how this 
works. However, for the impatient, you can check the docstrings to these 
methods: 
https://github.com/spencerlyon2/PlotlyJS.jl/blob/950a21217ad4bb55d8f64f50522765653f2f31ce/src/api.jl#L233-L300
 
(they are actually much more flexible than just sending new (x, y, z) 
points to be displayed and allow you to stream updates to any chart 
attribute).





On Friday, March 11, 2016 at 12:17:43 PM UTC-5, Tim Holy wrote:
>
> This sounds really exciting! 
>
> I have a couple of technical questions: 
> - Last I checked (a few days ago), the docs said that callbacks aren't 
> supported yet. Has that changed already? 
> - How are data transported? I assume you have to serialize arrays via 
> JSON? 
> When new data arrive, do you reserialize the entire array, or is this 
> doing 
> something uber-clever? 
>
> Best, 
> --Tim 
>
> On Friday, March 11, 2016 08:18:14 AM Spencer Lyon wrote: 
> > New package announcement. I've just registered PlotlyJS.jl with 
> metadata. 
> > The package leverages the plotly.js javascript library to provide a 
> backend 
> > for offline plot generation (no interaction with plotly's web API). This 
> > will be the backend used to generate figures in the soon to be revamped 
> > Plotly.jl package. The latter will serve as the interface between Julia 
> and 
> > plotly's REST API. 
> > 
> > The package has two main goals 
> > 
> >1. Make it convenient to construct and manipulate plotly 
> visualizations 
> >2. Provide infrastructure for viewing plots on multiple frontends and 
> >saving plotly graphics to files 
> > 
> > 
> > 
> > Up to this point I have intentionally not put effort into creating a 
> > plotting API for this package, but rather have made it easy to leverage 
> > plotly's declarative API from Julia. If you are looking for a lot of API 
> > extensions, see the plotlyjs backend in Plots.jl. 
> > 
> > One main feature is a dedicated plotting GUI in an electron window 
> (powered 
> > by Blink.jl). This allows us to have full 2 way communication between 
> Julia 
> > and javascript, taking interactive plotting to a new level (enabling, 
> among 
> > other things, streaming workflows where plots are updated inplace as new 
> > data arrives) 
> > 
> > Check out the docs here: http://spencerlyon.com/PlotlyJS.jl/ 
>
>

Re: [julia-users] Code doesn't work, i can't figure out why? Please have a look!

2016-03-11 Thread Julia Tylors
Maybe the code generated should be looking something like this :


GenSym(0) = 
((top(getfield))((top(getfield))(Transmission,:Download),:download_task))(Val{symbol("##7731")},x,y,v1,v2)
#s222 = (top(start))(GenSym(0))
GenSym(1) = (top(indexed_next))(GenSym(0),1,#s222)
v3 = (top(getfield))(GenSym(1),1)
#s222 = (top(getfield))(GenSym(1),2)
GenSym(2) = (top(indexed_next))(GenSym(0),2,#s222)
v4 = (top(getfield))(GenSym(2),1)
#s222 = (top(getfield))(GenSym(2),2)

I am kind of confused, can somebody offer some solution to my problem?
Thanks

On Thursday, March 10, 2016 at 11:50:47 PM UTC-8, Julia Tylors wrote:
>
> Now the generated code looks like this:
>
> AST(:($(Expr(:lambda, Any[:x,:y], 
> Any[Any[Any[:x,:Any,1],Any[:y,:Any,1],Any[:v1,:Any,7],Any[:v2,:Any,7]],Any[],0,Any[]],
>  
> :(begin  # none, line 2:
> NewvarNode(:v1)
> NewvarNode(:v2)
> v1 = 2.1 
> v2 = 2.2 
> (v1,v2) = 
> ((top(getfield))((top(getfield))(Transmission,:Download),:download_task))(Val{symbol("##7731")},x,y,v1,v2)
>  
> return v1 + v2
> end)
>
> however, when i call test(1.1,2.2), it gives me the following error:
>
> signal (11): Segmentation fault
> var_binding_pointer at  codegen.cpp:2858
> emit_assignment at  codegen.cpp:3052
> emit_function at  codegen.cpp:4697
> jl_eh_restore_state at  julia.h:1410
> jl_compile at  codegen.cpp:812
> jl_trampoline_compile_function at  builtins.c:1025
> jl_apply at  gf.c:1709
> do_call at  interpreter.c:66
> eval at  interpreter.c:213
> jl_toplevel_eval_flex at  toplevel.c:544
> jl_eh_restore_state at  julia.h:1410
> eval_user_input at ./REPL.jl:62
> unknown function (ip: 0x7f52402a9497)
> jl_apply at  gf.c:1711
> anonymous at ./REPL.jl:85
> start_task at  task.c:246
> unknown function (ip: (nil))
> Segmentation fault
>
>
>
>
>
> On Thursday, March 10, 2016 at 10:07:05 PM UTC-8, Julia Tylors wrote:
>>
>> I fixed it, It should have been like this:
>>
>>  (:v1,:v2) = 
>> ((top(getfield))((top(getfield))(Staged,:Runtime),:kernel_call))(Val{symbol("##7731")},x,y,v1,v2)
>>
>> On Thursday, March 10, 2016 at 3:48:49 PM UTC-8, Yichao Yu wrote:
>>>
>>> On Thu, Mar 10, 2016 at 6:04 PM, Julia Tylors  
>>> wrote: 
>>> > 
>>> > 
>>> > Hi fellows, I have a problem which i can't solve. 
>>> > 
>>> > I have a function test(x,y) which has the ast as follows: 
>>> > (test.env.defs.func.code) 
>>> > 
>>> > 
>>> > :($(Expr(:method, :test, 
>>> > :((top(svec))((top(apply_type))(Tuple,Any,Any),(top(svec))())), 
>>> > AST(:($(Expr(:lambda, Any[:x,:y], 
>>> > 
>>> Any[Any[Any[:x,:Any,1],Any[:y,:Any,1],Any[:v1,:Any,7],Any[:v2,:Any,7]],Any[],0,Any[]],
>>>  
>>>
>>> > :(begin  # none, line 2: 
>>> > NewvarNode(:v1) 
>>> > NewvarNode(:v2) 
>>> > v1 = 2.1 
>>> > v2 = 2.2 
>>> > $(Expr(:(=), :v1, :v2, 
>>> > 
>>> :(((top(getfield))((top(getfield))(Transmission,:Download),:download_task))(Val{symbol("##7775")},x,y,v1,v2
>>>  
>>>
>>> > return v1 + v2 
>>> > end), false))) 
>>> > 
>>> > 
>>>
>>> Can you show how you generated `test`? 
>>>
>>> > 
>>> > when i call test(1.1,2.2), it returns 4.4 but it should have returned 
>>> > v1 = 1.1*2.2 = 2.42 
>>> > v2 = 2.2*2.1 = 4.62 
>>> > 
>>> > so the result should be v1+v2 , 7.04 
>>> > 
>>> > Here is the download_task function. 
>>> > @generated function download_task{id}(::Type{Val{id}}, args...) 
>>> > println("Download Task $id for argument types $args") 
>>> > :((args[1] * args[2]), (args[2] * args[3])) 
>>> > end 
>>> > 
>>> > I am suspicious about the part in bold 
>>> > 
>>> > $(Expr(:(=), :v1, :v2, 
>>> > 
>>> :(((top(getfield))((top(getfield))(Transmission,:Download),:download_task))(Val{symbol("##7775")},x,y,v1,v2
>>>  
>>>
>>> > 
>>> > this part doesn't get executed! Or somewhat expanded wrong. I am not 
>>> totally 
>>> > sure. 
>>> > Anyone with a better understanding , please help me out.! 
>>> > 
>>> > Thanks 
>>>
>>

[julia-users] QML (Qt5) binding for Julia (GSOC?)

2016-03-11 Thread Maurice Diamantini


While trying to find some Qt5 binding for Julia, I only found the Qt5 
startup projet from Tom Breloff https://github.com/tbreloff/Qt5.jl which is 
intended to bind the full feature from Qt5. This is a huge task and will 
take some time.

So I wonder if there is some interest for a QML binding which would allows 
Julia code to display simple QML file (with callback to Julia methods!).

I just found a git repository about two QML library which could serve as a 
basis  and as an example:


   - https://github.com/seanchas116/*libqmlbind* 
    A C library for creating QML 
   bindings for other languages easily
   - https://github.com/seanchas116/*ruby-qml* 
    a Ruby binding for QML which 
   uses libqmlbind

Being able to build Qt interface directly from Julia without the need of 
 the anaconda would be a great advantage for Julia users.

That seems to be a true Julia GSOC candidate project (i.e. which could not 
be affected to another language...)

Regard,

-- Maurice



[julia-users] gsoc projects

2016-03-11 Thread awanish das
where should i discuss ideas related to gsoc projects?


[julia-users] GSoC 2016 - Simple persistent distributed storage Project

2016-03-11 Thread Soujanya Ponnpalli
Hello!

I am Soujanya Ponnapalli, a junior at International Institute of 
Information Technology, Hyderabad (IIIT-H), majoring in Computer Science 
and Engineering (CSE). I got introduced to Julia at International Parallel 
and Distributed Processing Symposium - IPDPS 2015 and was taken aback by 
the features of Julia like performance efficiency, parallel and distributed 
computation support.

I would rate my competency level in C++, Java and Python as intermediate 
and getting my hands on Julia. I would like to contribute to the project " 
Simple persistent distributed storage" as I'm interested in Distributed 
Systems. My experience in this field includes, implementing a file system 
similar to HDFS in java. 

I would be thankful if I could get some information regarding,
1. What is expected from your side, in context to this project?
2. How do I contact the mentors and get involved in the project discussions?

Regards,
Soujanya Ponnapalli.



[julia-users] GSoC

2016-03-11 Thread 'Simon Pfreundschuh' via julia-users
Hi Everyone,

I would be highly interested in working on one of the massively parallel
matrix algebra projects that you proposed for GSoC. I would therefore like 
to ask
if there is someone who would like to be a mentor for this project? 
Moreover, could you
maybe provide me with some references about which algorithms should exactly
be implemented?

Some background about me: My name is Simon Pfreundschuh and I am currently
studyin at Chalmers University of Technology in Gothenburg Sweden. I am 
just about
to finish my second Master's degree in physics, already holding a Master's 
degree in
computational science and a Bachelor's degree in computer science. I am 
currently
developing a library for remote sensing data processing, which is basically 
a big data problem.
This is also where my interest in the massively parallel matrix algorithms 
comes from.

I am looking forward to hearing from you!

Best regards,

Simon




[julia-users] Status of Graphs.jl ?

2016-03-11 Thread Mridul Seth
https://github.com/JuliaLang/Graphs.jl looks like a great project but there 
haven't been a lot of activity (last commit Nov 1, 2015). Is there any 
general interest regarding working on Graphs.jl during GSoC period?
And what the difference between https://github.com/JuliaGraphs and Graphs.jl

Thanks,
Mridul Seth


Re: [julia-users] Re: Status of Plots.jl?

2016-03-11 Thread Philippe Roy
Hi! Nice package Tom. Is this supposed to work inside Atom with the julia 
"IDE" ? The plots seems to work, but I really don't know where they appear! 
they're not in the plots pane (I think only Gadfly is supported as of now 
inside Atom).

Thanks for any help!

Le jeudi 10 mars 2016 14:08:23 UTC-5, Tom Breloff a écrit :
>
> You should read up more on PlotlyJS: http://spencerlyon.com/PlotlyJS.jl/
>
> Or from the Plots docs:
>
> Plotly / PlotlyJS
>> These are treated as separate backends, though they share much of the 
>> code and use the Plotly javascript API.  plotly() is the only 
>> dependency-free plotting option, as the required javascript is bundled with 
>> Plots. It can create inline plots in IJulia, or open standalone browser 
>> windows when run from the Julia REPL.
>> plotlyjs() is the preferred option, and taps into the great functionality 
>> of Spencer Lyon's PlotlyJS.jl. Inline IJulia plots can be updated from any 
>> cell... something that makes this backend stand out. From the Julia REPL, 
>> it taps into Blink.jl and Electron to plot within a standalone GUI 
>> window... also very cool.
>
>
> On Thu, Mar 10, 2016 at 2:03 PM, Daniel Carrera  > wrote:
>
>> On 10 March 2016 at 18:23, Tom Breloff  
>> wrote:
>>
>>>
>>> On Thu, Mar 10, 2016 at 12:08 PM, j verzani >> > wrote:
>>>
 As someone who has watched his calculus students struggle with what 
 should be a trivial task -- the installation of `Plots` on `juliabox`, 
 I've 
 wished it were part of base. 

>>>
>>> While in my (very biased) opinion I think Plots should be the first 
>>> package new users install, I don't think it belongs in base.  (please don't 
>>> make me rebuild julia to hack on Plots ;)
>>>
>>
>>
>> I think Plots could be part of the "standard library" (to borrow a term 
>> from Python). So it would not be in Base, but it could be pre-installed. 
>> Plotting is one of the most common things that scientists and engineers do. 
>> Maybe not right now, but when Plots is more mature.
>>
>> Speaking of which, I'm also having trouble with PlotlyJS.
>>
>>
>> julia> plotlyjs()
>> Plots.PlotlyJSPackage()
>>
>> julia> plot(Plots.fakedata(50,5),w=3)
>> [Plots.jl] Initializing backend: plotlyjs
>> INFO: Precompiling module Blink...
>> INFO: Recompiling stale cache file /home/daniel/.julia/lib/v0.4/Nettle.ji 
>> for module Nettle.
>> ERROR: Cannot find Electron. Try `AtomShell.install()`.
>>  in electron at /home/daniel/.julia/v0.4/Blink/src/AtomShell/process.jl:49
>>  ...
>>
>>
>> For some reason, PlotlyJS seems to think that I am running it from Atom. 
>> :-(
>>
>>
>>
>

Re: [julia-users] Re: Transpiling Julia to C – The LLVM CBackend

2016-03-11 Thread Keno Fischer
It is, to achieve static compilation, there is no advantage to generating C
code if an LLVM backend is available for the target.

On Fri, Mar 11, 2016 at 5:03 AM, 'Tobias Knopp' via julia-users <
julia-users@googlegroups.com> wrote:

> Sounds very interesting. Are there concrete plans for which this can be
> used? I thought the road towards static compilation (which you described in
> the former blog post) will directly compile to binary.
>
> Cheers,
>
> Tobi
>
>
> Am Donnerstag, 10. März 2016 22:43:18 UTC+1 schrieb Jameson:
>>
>> We at JuliaComputing have resurrected the LLVM CBackend project and given
>> it support for Julia's IR. This lets us output C89 code as the backend from
>> Julia. For more details, see our latest blog post announcing the open
>> source publication of this work:
>>
>> http://juliacomputing.com/blog/2016/03/10/j2c-announcement.html
>>
>> -jameson
>>
>>
>> *Julia Computing carried out this work under contract from the Johns
>> Hopkins University Applied Physics Laboratory (JHU APL) for the Federal
>> Aviation Administration (FAA) to support its Airborne Collision Avoidance
>> System X (ACAS X) program.*
>>
>


Re: [julia-users] Re: [ANN] Maker.jl: a make-like system for data analysis

2016-03-11 Thread Tom Short
Maybe. I haven't used BinDeps, so I'm not that familiar with it. After
looking at it some, there are parallels given that both provide a
declarative way to manage dependencies. It's not a foreseeable need for me,
though.


On Thu, Mar 10, 2016 at 11:15 PM, Jameson  wrote:

> Could this be used to replace BinDeps? I note that you mention that was
> your primary target, but I'm curious whether you think it would be feasible?
>
>
>
> On Monday, March 7, 2016 at 8:11:30 PM UTC-5, tshort wrote:
>>
>> The following package is now registered.
>>
>> https://github.com/tshort/Maker.jl
>>
>> This package helps manage actions and account for dependencies. It's like
>> *make* or Ruby's Rake, but targeted at data processing and analysis
>> rather than building code. Maker provides methods for defining tasks and
>> dependencies between tasks.
>>
>> My target use case is to define several tasks and dependencies, and run
>> `make()` to perform the analysis. Then if input files change or I change
>> part of the code, run `make()` again, and Maker will re-run only the parts
>> that have changed.
>>
>> Maker was derived from Mike Nolta's Jake.jl. The syntax and API are
>> similar to Rake. Comments welcome.
>>
>>


Re: [julia-users] What to read to understand finishing v0.5?

2016-03-11 Thread Andreas Lobinger
Hello colleague,

On Friday, March 11, 2016 at 2:56:02 PM UTC+1, Daniel Carrera wrote:
>
> Hi Tim,
>
> I'm leaving on a work trip on Monday, but let's see if I can manage to 
> make a Julia contribution on a weekend. I need some help, as I've never 
> submitted any code for Julia before. I left a comment in the PR. Let's 
> start with the basics: How do I pull your modified branch / PR? How do I 
> run the tests? How do I submit my modified code back to you?
>

first of all: 
https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md exists.
You really need some git experience and know how to organize your own work 
in local and github (your fork of julia) repositories. I found this helpful
http://stackoverflow.com/questions/27567846/how-can-i-checkout-a-github-pull-request

PRs you do (to julia) should be subject to automatic testing. 



Re: [julia-users] What to read to understand finishing v0.5?

2016-03-11 Thread Daniel Carrera
Hi Tim,

I'm leaving on a work trip on Monday, but let's see if I can manage to make 
a Julia contribution on a weekend. I need some help, as I've never 
submitted any code for Julia before. I left a comment in the PR. Let's 
start with the basics: How do I pull your modified branch / PR? How do I 
run the tests? How do I submit my modified code back to you?

Cheers,
Daniel.



On Thursday, 10 March 2016 13:42:00 UTC+1, Tim Holy wrote:
>
> For those who are eager to see 0.5 materialize, there are things you can 
> do to 
> help. Some are hard, but some are not. In particular, in 
>
> https://github.com/JuliaLang/julia/pull/15434 
>
> the thought is to audit every use of "classic" iteration (for i = 1:...) 
> in 
> base, and see if there need to be changes. Since grep tells me there are 
> 1745 
> of these, it's a big tedious job, but one that shouldn't require deep 
> julia- 
> fu. Anyone who wants to pitch in can comment over at that issue about ways 
> to 
> divvy up the work. 
>
> Best, 
> --Tim 
>
>

Re: [julia-users] Re: good practice question: dispatch on type or on type instance

2016-03-11 Thread Jeffrey Sarnoff
Val types exist for their flexibility -- which is a powerful addition, when 
needed.  In some sense, Val types run around the usual category-focused 
manner and behavior for Types and in that documentation, the key phrase is 
"consistency across Julia."  That is consistency in the use of Val types, 
and so their internal workings.  

With the more usually encountered sorts of type, it is the other way, 
instances preferred.  


On Friday, March 11, 2016 at 7:15:13 AM UTC-5, Kristoffer Carlsson wrote:
>
> On the other hand, the docs for "Val" says otherwise:
>
> http://docs.julialang.org/en/release-0.4/manual/types/#value-types
>
> "For consistency across Julia, the call site should always pass a Val type 
> rather than creating an instance, i.e., use foo(Val{:bar}) rather than 
> foo(Val{:bar}())."
>
>

Re: [julia-users] Re: good practice question: dispatch on type or on type instance

2016-03-11 Thread Kristoffer Carlsson
On the other hand, the docs for "Val" says otherwise:

http://docs.julialang.org/en/release-0.4/manual/types/#value-types

"For consistency across Julia, the call site should always pass a Val type 
rather than creating an instance, i.e., use foo(Val{:bar}) rather than 
foo(Val{:bar}())."

Re: [julia-users] Re: a excellent Julia IDE, JuliaDT

2016-03-11 Thread Igor

I tried this plugin, it works   great job. I hope that after some time 
it will be even better. Currently, I find JUNO more convenient and faster.