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

2016-03-10 Thread Julia Tylors
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) =

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

2016-03-10 Thread Eric Forgy
On Friday, March 11, 2016 at 10:29:12 AM UTC+8, Eric Forgy wrote: > > Hope this gets sorted soon :pray: :D > Prayers answered. It is working for me again. Thanks! :)

[julia-users] Re: flatten arrays

2016-03-10 Thread Tomas Lycken
No, vec doesn't help because I have an array of arrays (actually a vector of vectors), not a multidimensional array. (I think vec would actually be a noop...) Flatten.jl might provide some useful idioms, but my application is json deserializing, so I can't restrict myself to fixed-size

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

2016-03-10 Thread Tomas Lycken
I recently decided to switch the arguments in Interpolations.jl from types to instances, although in that case it actually made the interface a little uglier rather than prettier. The main reason was that I suddenly had the need for the flexibility provided by allowing for instance fields on

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

2016-03-10 Thread Julia Tylors
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 >

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

2016-03-10 Thread Jameson
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 >

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

2016-03-10 Thread michael
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,

Re: [julia-users] ZMQ poll

2016-03-10 Thread Jameson
Run the code for each thread of communication in a separate `@async` Task block. Julia will internally handle multiplexing the work as data becomes available on each Channel (event-driven cooperative multitasking) On Thursday, March 10, 2016 at 1:04:29 AM UTC-5, Leonardo wrote: > > I've found

[julia-users] Re: flatten arrays

2016-03-10 Thread Sheehan Olver
Can't you use vec? vec(rand(3,3,3)) # returns a Vector of size 27 On Monday, December 31, 2012 at 5:05:42 AM UTC+11, S Wade wrote: > > Is there something like flatmap or flatten for arrays? > > thanks > wade >

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

2016-03-10 Thread Eric Forgy
On Thursday, March 10, 2016 at 10:43:12 PM UTC+8, Mike Innes wrote: > > Yes, the old Juno on LightTable was starting to code rot badly – we've > taken those binaries down now. In Atom you'll find that you can get the > same features through the julia-client plugin. > But woe be to you if you

Re: [julia-users] Re: Plotsly

2016-03-10 Thread Tom Breloff
It's registered... likely just a case of corrupted cache directory: https://github.com/tbreloff/Plots.jl/issues/160. I blame the cache Mischievians... On Thu, Mar 10, 2016 at 6:46 PM, Sisyphuss wrote: > Maybe because it is not registered. Try `Pkg.clone()`. > > > On

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

2016-03-10 Thread Julia Tylors
macro down(fdef) gendtask(expand(macroexpand(fdef))) end function gendtask(func::Expr) Helper.replace(func) do expr if isa(expr,Expr) && expr.head == :call # func = expr.args[1] # if isa(func,Expr) && func.head == :call && length(func.args) == 3 && func.args[3] == :(:download) # dtask_id,

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

2016-03-10 Thread Sisyphuss
I am monitoring the milestone constantly. I find the percentage does grow: 27% -> 28% -> 33% On Wednesday, March 9, 2016 at 7:36:10 PM UTC+1, David Anthoff wrote: > > At some point in the summer there was communication from the core team > that v0.5 would be a short release cycle that was all

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

2016-03-10 Thread Yichao Yu
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, >

[julia-users] Re: Plotsly

2016-03-10 Thread Sisyphuss
Maybe because it is not registered. Try `Pkg.clone()`. On Thursday, March 10, 2016 at 7:22:42 AM UTC+1, Christoph Ortner wrote: > > > Pkg.add("Plots") > > seems to be broken? > > > julia> Pkg.add("Plots") > fatal: Not a git repository (or any of the parent directories): .git >

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

2016-03-10 Thread Sisyphuss
This can be a choice for those who have no root permission On Tuesday, March 8, 2016 at 2:56:39 PM UTC+1, Liye zhang wrote: > > If you are trying to find an IDE for Julia which is as convenient as PyDev > for python, or RStudio for R, you can test JuliaDT. Thanks for the > authors' excellent

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

2016-03-10 Thread Julia Tylors
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],

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

2016-03-10 Thread ben
Ah yes, sorry, I was coming from a more convoluted example, similar to Milan's use case. Suppose you have: ~~~ abstract Dice end immutable RedDice <: Dice end immutable BlueDice <: Dice end ~~~ I overminimalized my example :) On Thursday, March 10, 2016 at 5:02:11 PM UTC-5, DNF wrote: > >

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

2016-03-10 Thread DNF
What is the purpose of the H type parameter here? You can just use > takedecision(::Type{Dice}) = println("throw a dice") > takedecision(Dice) throw a dice That would remove the objection of 'ugliness'. immutable Dice end > immutable Coin end > > takedecision{H <:

[julia-users] Re: Do Julia accept template like CPP?

2016-03-10 Thread Jinxuan Zhu
Sorry for disturbing the list. I just found that it is already discussed. Sorry for that. On Thu, Mar 10, 2016 at 4:41 PM, Jinxuan Zhu wrote: > Recently I am writing a self-use package for calculating space > differiente. The package accept 1-st order differiente and 2-nd

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

2016-03-10 Thread Jameson Nash
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:

[julia-users] Do Julia accept template like CPP?

2016-03-10 Thread Jinxuan Zhu
Recently I am writing a self-use package for calculating space differiente. The package accept 1-st order differiente and 2-nd order differiente but throw error when calculating higher oders. I was thinking about something like types like eval(SpaceDiff{1}, arg...) and eval(SpaceDiff{2}...)

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

2016-03-10 Thread Milan Bouchet-Valat
Le jeudi 10 mars 2016 à 12:40 -0800, ben a écrit : > Thanks Milan, interesting to see others have wondered the same thing > I did. Note that you can define dice=Dice() and > encoding_utf8=Encoding{UTF8}() once and for all to avoid the > parentheses (as Jeffrey points out). Yes, but then we have

Re: [julia-users] flatten arrays

2016-03-10 Thread Robin Deits
Not sure if it's helpful, but I wrote a package called Flatten.jl to recursively flatten data structures to vectors or tuples and un-flatten them to recover the original structure. But it only operates on fixed-size data (i.e DataTypes and Tuples, not Arrays). But if you find it useful, let me

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

2016-03-10 Thread ben
Thanks Milan, interesting to see others have wondered the same thing I did. Note that you can define dice=Dice() and encoding_utf8=Encoding{UTF8}() once and for all to avoid the parentheses (as Jeffrey points out). On Thursday, March 10, 2016 at 3:27:31 PM UTC-5, Milan Bouchet-Valat wrote: > >

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

2016-03-10 Thread Milan Bouchet-Valat
Le jeudi 10 mars 2016 à 11:15 -0800, Jeffrey Sarnoff a écrit : > There are situations in which dispatching off of Type(s) is > necessary. Dispatching through Types by way of typed instances > (realizations) is more common, and the only way to go when you want > to do something with the fields'

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

2016-03-10 Thread ben
Thanks, this is aligned with what I was thinking, but much better said. The `precision` example is cheating a little because there it is cognitively very obvious that we are after a characteristic of the type, not one of its instances. In `function(argument,method)` examples, I feel like I have

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

2016-03-10 Thread Jeffrey Sarnoff
An example from Base/float.jl that dispatches on the type itself (this is just one use of many reasonable ones): ## precision, as defined by the effective number of bits in the mantissa precision(::Type{Float16}) = 11 precision(::Type{Float32}) = 24 precision(::Type{Float64}) = 53

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

2016-03-10 Thread Jeffrey Sarnoff
There are situations in which dispatching off of Type(s) is necessary. Dispatching through Types by way of typed instances (realizations) is more common, and the only way to go when you want to do something with the fields' values of a typed instance. Rather than look at the two as

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

2016-03-10 Thread Daniel Carrera
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 >>

[julia-users] Re: ERROR: error compiling test: unsupported or misplaced expression "block" in function test

2016-03-10 Thread Julia Tylors
Any how, i got rid of begin - end encomppasing the download_task, it is solved it seems there is a difference between quote GENERATED EXPR end and :(GENERATED EXPR) Interesting On Thursday, March 10, 2016 at 10:14:32 AM UTC-8, Julia Tylors wrote: > > Hi fellows; > > I have a function

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

2016-03-10 Thread ben
Thanks. I understand that, but is there a specific reason why doing: takedecision{H <: Dice}(::Type{H}) is bad / not as good? On Thursday, March 10, 2016 at 1:06:01 PM UTC-5, Jeffrey Sarnoff wrote: > > when you do > immutable Dice end > or > type Dice end > you create a singleton type -- there

[julia-users] ERROR: error compiling test: unsupported or misplaced expression "block" in function test

2016-03-10 Thread Julia Tylors
Hi fellows; I have a function generated using macro, and when i try to run it with test(1.2,2.1) , it gives me the error: ERROR: error compiling test: unsupported or misplaced expression "block" in function test test.env.defs.func.code : AST(:($(Expr(:lambda, Any[:x,:y],

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

2016-03-10 Thread Jeffrey Sarnoff
when you do immutable Dice end or type Dice end you create a singleton type -- there can be only one instance (or all instances are that identical single instance). To realize a singleton type, call it: myDice = Dice(); myCoin = Coin() now, you can use choose(x::Dice) = println("throw the

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

2016-03-10 Thread j verzani
It was a precompilation thing that was breaking, but it may have been related to another package, as they were installing a few. But fair enough, it is easier to develop outside of base. Carry on. On Thursday, March 10, 2016 at 12:23:17 PM UTC-5, Tom Breloff wrote: > > > > On Thu, Mar 10, 2016

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

2016-03-10 Thread Tom Breloff
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

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

2016-03-10 Thread Nico
For Atom, there's also Hydrogen[1] that can talk with IJulia[2]. [1] https://atom.io/packages/hydrogen [2] https://github.com/JuliaLang/IJulia.jl

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

2016-03-10 Thread j verzani
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. The `plotly` backend does not require additional dependencies, so with that as a default, it would be one less hurdle for

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

2016-03-10 Thread ben
Hi everyone, One of the many cool things we can do in Julia is use multiple dispatch to avoid a "method" argument followed by a "if" construct sending to back-end functions. I sometimes get confused about which of the following two ways of achieving this is better: ~~~ immutable Dice end

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

2016-03-10 Thread Michele Zaffalon
On Thu, Mar 10, 2016 at 4:54 PM, Daniel Carrera wrote: > > On 10 March 2016 at 14:18, Tom Breloff wrote: > >> Yes it's come a long way. Documentation is coming slower than >> functionality (typical open source...). However I added this yesterday, >> which

Re: [julia-users] flatten arrays

2016-03-10 Thread Tomas Lycken
This was the most recent mention of recursive array flattening that I could find - has anything happened since? Is this available somewhere (I couldn't find it in base)? // T

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

2016-03-10 Thread Mike Innes
Yes, the old Juno on LightTable was starting to code rot badly – we've taken those binaries down now. In Atom you'll find that you can get the same features through the julia-client plugin. On Thu, 10 Mar 2016 at 14:41 Daniel Carrera wrote: > I've had code crashes with Juno.

Re: [julia-users] Re: Non-uniform interpolation in 1D

2016-03-10 Thread Tim Holy
I don't know what P_NOM and ETA "mean," so I can't answer your question. Bottom line: if you have a function f, and x is a vector of locations, then f_itp = interpolate((x,), [f(xx) for xx in x], Gridded(Linear())) will construct an object so that f_itp[xx] interpolates f at xx. --Tim On

Re: [julia-users] Re: Non-uniform interpolation in 1D

2016-03-10 Thread jmarcellopereira
Hello Tim, good morning In this case, where we have discrete points (P_NOM = [1.5, 2.2, 3.7, 5.6, 7.5, 11.2, 14.9] and ETA = [93, 94, 94, 95, 95, 95.5, 95.5 ]), as would be "A" for P_NOM(2.8) value ? Since function f (x) is more intuitive. Em quarta-feira, 9 de março de 2016 23:22:54 UTC-3, Tim

[julia-users] Re: Basic Information

2016-03-10 Thread Scott Jones
1) I'd strongly recommend watching the intro video by @dpsanders from JuliaCon 2015. https://www.youtube.com/watch?v=gQ1y5NUD_RI=3=PLP8iPy9hna6Sdx4soiGrSefrmOPdUWixM 2) If you have a lot of experience in some other language, maybe read first the

Re: [julia-users] Basic Information

2016-03-10 Thread Milan Bouchet-Valat
Le jeudi 10 mars 2016 à 02:53 -0800, roberto.luiss...@gmail.com a écrit : > Hello all, > I'm a student, this is the first time I work with Julia programme, > and I would like to know how I can implement my ability with Julia. > Are there some good and easy manual to read?? > I study finance, hence

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

2016-03-10 Thread Tom Breloff
Yes it's come a long way. Documentation is coming slower than functionality (typical open source...). However I added this yesterday, which should help answer a few questions: http://plots.readthedocs.org/en/latest/backends/ If you want to follow the latest and greatest, the issues list is

[julia-users] Status of Plots.jl?

2016-03-10 Thread Daniel Carrera
Hello, Does anyone know the status of Plots.jl? It seems to have come a long way. At least the documentation makes it look pretty complete: http://plots.readthedocs.org/en/latest/ I'm looking at the backends. Does anyone know what "Gr", "Qwt", and "unicodeplots" are? Apparently support for

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

2016-03-10 Thread Tim Holy
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

Re: [julia-users] Julia on Android (and/or the web) - a scientific calculator on steroids.. good for tablets

2016-03-10 Thread Viral Shah
If there is someone who applies with the right background in build systems, Android and tooling, I am happy to find mentors - both on the Julia and Android side to make this port successful. The important thing is to get something up on the ideas page. Another platform for an embedded port

Re: [julia-users] Julia on Android (and/or the web) - a scientific calculator on steroids.. good for tablets

2016-03-10 Thread Ismael Venegas Castelló
Of course I understand that, it's not my intention to make assumptions or tell people otherwise. I just wanted to show to the community that the interest for Julia on Android is anything but fading away. I've never participated in an event such as GSOC, but since this semester I return to

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

2016-03-10 Thread DNF
I had no idea. I guess it shows that unless one knows what to look for, it can be a bit hard to get an impression of the state of development in some cases. Anyway, to me this is wonderful news, and the single most exciting thing I've heard for a while (about Julia, that is :) On Thursday,

Re: [julia-users] Julia on Android (and/or the web) - a scientific calculator on steroids.. good for tablets

2016-03-10 Thread Lutfullah Tomak
Hi Ismael, As I said I cannot do on my own since I've just started a new job. If there is an interested student I can help him/her though I am not software engineer. I've just curious about julia on android as you are. So, it's a little overestimate you do on gitter sorry about that. I can write

Re: [julia-users] Google Summer of Code 2016

2016-03-10 Thread Mike Innes
Sure thing, well if it's a question about admin or organisation you can go ahead and email julia-gsoc-2...@googlegroups.com. For more technical questions, or feedback on ideas and plans, you're always welcome to post on this julia-users as well. On Thu, 10 Mar 2016 at 04:39 Jorge

[julia-users] Basic Information

2016-03-10 Thread roberto . luiss998
Hello all, I'm a student, this is the first time I work with Julia programme, and I would like to know how I can implement my ability with Julia. Are there some good and easy manual to read?? I study finance, hence something connected with this last one. Thank you very much!

Re: [julia-users] ANN: A potential new Discourse-based Julia forum

2016-03-10 Thread Valentin Churavy
One could use categories as channels. Rust has two differenent discourse instances for internal and user discussions. But in practice categories can have subcategories and we could have a tree like structure that also give a namespace for the package organisation like JuliaGPU.

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

2016-03-10 Thread Viral Shah
Work to prepare for the debugger has been going on in Base all along, DWARF.jl, and Keno also has stuff that he has not yet committed. He’ll send details when he has something for everyone to try out. The first step is to get a working debugger. Once we have a debugger, the plan is to start

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

2016-03-10 Thread Andreas Lobinger
Afaics Gallium.jl is a thin layer on some other debugging/compiling infrastructure. The main work is not in Gallium.jl iself, but in the lower layers. On Thursday, March 10, 2016 at 10:45:15 AM UTC+1, DNF wrote: > > On Thursday, March 10, 2016 at 7:00:46 AM UTC+1, Viral Shah wrote: >> >> This

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

2016-03-10 Thread DNF
On Thursday, March 10, 2016 at 7:00:46 AM UTC+1, Viral Shah wrote: > > This is about the right time to start the triage for the various 0.5 > issues. With all the amazing compiler improvements, LLVM upgrade, Cxx > readiness, thread-safety (will probably remain disabled for 0.5 potentially >

[julia-users] Solving Cardinality Constrained Portfolio Optimization Problem in Convex.jl

2016-03-10 Thread Ayush Pandey
Hello, The normal Portfolio Optimization problem is when we are given a portfolio of assets and the only restriction is that the sum of weights assigned to assets is equal to 1(and of course 0<=w*i*<=1). But when we put the limit on number of assets to be invested, this problem becomes a