[julia-users] trying to build Cxx, unable to access llvm.org/git

2016-01-09 Thread Andreas Lobinger
Hello colleagues, is this some kind of wrong pointer, or is llvm.org down? Cloning into '/home/lobi/julia05/deps/srccache/llvm-svn/projects/compiler-rt'... fatal: unable to access 'http://llvm.org/git/compiler-rt.git/': Recv failure: Connection reset by peer And if, is there a mirror of the

Re: [julia-users] excessive memory allocation with @printf at compile time

2016-01-09 Thread Stefan Karpinski
I've been meaning to do just that for some time now but haven't gotten to it yet. Maison Bially also had talked about overhauling printf, on account of which I figured I'd wait and see what he came up with. On Friday, January 8, 2016, 'Greg Plowman' via julia-users < julia-users@googlegroups.com>

[julia-users] What happens when I do x[:] when x::SharedArray{Float64,1}?

2016-01-09 Thread Nils Gudat
Usually when doing calculations on SharedArrays, I would extract their contents using sdata() to be able to pass them to functions only defined for regular arrays, and then write the return value back into the SharedArray. However, I just realized that instead of doing say: shared[:] =

[julia-users] Re: What happens when I do x[:] when x::SharedArray{Float64,1}?

2016-01-09 Thread Kristoffer Carlsson
I believe this: func(shared[:]) is equivalent to: tmp = similar(shared) for i in eachindex(shared) tmp[i] = shared[i] end func(tmp) Note: julia> typeof(similar(SharedArray(Float64,10))) Array{Float64,1} On Saturday, January 9, 2016 at 8:04:28 PM UTC+1, Nils Gudat wrote: > > Usually when

Re: [julia-users] jl_call function in c++ code

2016-01-09 Thread Isaiah Norton
> > There's always only one return value ("output argument"), when you > write `return (a, b)`, it returns a tuple. Just to add to what Yichao said, this line is wrong because the return signature for `jl_call` is `jl_value_t*` (one pointer level, not two): ret = (jl_value_t**)

Re: [julia-users] Defining function's argument to be either Int or Float

2016-01-09 Thread Eric Forgy
Hi Alex, I ran into the same issue before and spent an embarrassing amount of time scratching my head before I realized that if A <: B, this does not imply that Vector{A} <: Vector{B}. It would be interesting to learn why this is the case because I would think it should be. To answer your

Re: [julia-users] Defining function's argument to be either Int or Float

2016-01-09 Thread Mauro
> It would be interesting to learn why this is the case because I would think > it should be. Have you read through the, I think linked, wikipedia article? You only need to read the Array section: https://en.wikipedia.org/wiki/Covariance_and_contravariance_%28computer_science%29#Arrays > To

[julia-users] ANN: Lisp.jl gitter chat room online!

2016-01-09 Thread Ismael Venegas Castelló
Come join us, welcome everybody! :D * https://gitter.im/swadey/Lisp.jl

[julia-users] Defining function's argument to be either Int or Float

2016-01-09 Thread Alexandr
Hello, I am trying to define the type of the input vector to be either Int or Float. In order to do that I defined a union: IntOrFloat = Union{Int, AbstractFloat} Next I write to functions definitions which I expected to be equivalent: #-# function

Re: [julia-users] Defining function's argument to be either Int or Float

2016-01-09 Thread Yichao Yu
> > Which version are you using? `f1` shouldn't match either and it's a > bug if it does. Also check if you've already defined another `f1` that does accept the arrays of different types. And for why neither of them should match. See

Re: [julia-users] Defining function's argument to be either Int or Float

2016-01-09 Thread Alexandr
I am using Version 0.4.0 (2015-10-08 06:20 UTC) I restarted Julia repl/intrpreter. Below is a complete code where I am trying to solve my task in a two ways: 1) by defining a Union of the types 2) by specifying the type of elements in the input vector as "Number". (Is it correct to do it?)

Re: [julia-users] Defining function's argument to be either Int or Float

2016-01-09 Thread Yichao Yu
On Sat, Jan 9, 2016 at 1:48 PM, Alexandr wrote: > I am using Version 0.4.0 (2015-10-08 06:20 UTC) > > I restarted Julia repl/intrpreter. > > Below is a complete code where I am trying to solve my task in a two ways: > > 1) by defining a Union of the types > > 2) by

Re: [julia-users] Defining function's argument to be either Int or Float

2016-01-09 Thread Yichao Yu
On Sat, Jan 9, 2016 at 2:25 PM, Alexandr wrote: > > >> See the manual I linked. Float64 <: Number does not imply >> Vector{Float64} <: Vector{Number} > > Sorry, I didn't notice it. Thanks! > > But what is then a proper way to define a function whose argument is > either

[julia-users] Re: ANN: Lisp.jl gitter chat room online!

2016-01-09 Thread Ismael Venegas Castelló
S-Expressions for Julia! * https://en.wikipedia.org/wiki/S-expression El sábado, 9 de enero de 2016, 10:21:20 (UTC-6), Ismael Venegas Castelló escribió: > > Come join us, welcome everybody! :D > > * https://gitter.im/swadey/Lisp.jl >

Re: [julia-users] trying to build Cxx, unable to access llvm.org/git

2016-01-09 Thread Isaiah Norton
HTTPS://github.com/llvm-mirror You can set custom irks in make.user On Saturday, January 9, 2016, Andreas Lobinger wrote: > Hello colleagues, > > is this some kind of wrong pointer, or is llvm.org down? > > Cloning into >

Re: [julia-users] Defining function's argument to be either Int or Float

2016-01-09 Thread Yichao Yu
On Sat, Jan 9, 2016 at 1:11 PM, Alexandr wrote: > Hello, > > I am trying to define the type of the input vector to be either Int or > Float. In order to do that I defined a union: > > IntOrFloat = Union{Int, AbstractFloat} > > Next I write to functions definitions which I

Re: [julia-users] Defining function's argument to be either Int or Float

2016-01-09 Thread Alexandr
> See the manual I linked. Float64 <: Number does not imply > Vector{Float64} <: Vector{Number} Sorry, I didn't notice it. Thanks! But what is then a proper way to define a function whose argument is either Vector{Float64} or Vector{Int64}? On 1/9/2016 8:17 PM, Yichao Yu wrote: > On Sat, Jan

Re: [julia-users] jl_call function in c++ code

2016-01-09 Thread Shamika
I'm using jl_call for more than one input/output argument. The code is int main(int argc, char *argv[]) { /* required: setup the julia context */ jl_init_with_image("/usr/lib/x86_64-linux-gnu/julia","sys.so"); /* run julia commands */ jl_value_t** args; jl_value_t** ret;

Re: [julia-users] jl_call function in c++ code

2016-01-09 Thread Yichao Yu
On Sat, Jan 9, 2016 at 10:59 AM, Yichao Yu wrote: > On Sat, Jan 9, 2016 at 4:45 AM, Shamika wrote: >> I'm using jl_call for more than one input/output argument. The code is >> >> int main(int argc, char *argv[]) >> { >> /* required: setup the

Re: [julia-users] jl_call function in c++ code

2016-01-09 Thread Yichao Yu
On Sat, Jan 9, 2016 at 4:45 AM, Shamika wrote: > I'm using jl_call for more than one input/output argument. The code is > > int main(int argc, char *argv[]) > { > /* required: setup the julia context */ > >

Re: [julia-users] Defining function's argument to be either Int or Float

2016-01-09 Thread Eric Forgy
On Sunday, January 10, 2016 at 6:34:09 AM UTC+8, Mauro wrote: > > > It would be interesting to learn why this is the case because I would > think it should be. > > Have you read through the, I think linked, wikipedia article? You only > need to read the Array section: > >

[julia-users] Daemonize a process

2016-01-09 Thread Thomas Hatch
As far as I can tell you can't fork a process in Julia yet, which would preclude one from doing a Unix double pid fork to daemonize a process. Am I correct in this assumption and I just need to wait for Julia to be able to fork()? Or have I missed something in the documentation? Thanks, and

[julia-users] How to resolve "WARNING: both Compose and PyPlot export "draw"; uses of it in module Main must be qualified"?

2016-01-09 Thread EvanB
I detail the problem here: https://github.com/dpsanders/scipy_2014_julia/issues/5 It appears that two exports are clashing. How does one resolve this? Any more explanatory details are be appreciated. Thank you

Re: [julia-users] Re: Better alternative to find all permutations?

2016-01-09 Thread Ratan Sur
Any consensus on this? On Monday, November 23, 2015 at 8:52:54 PM UTC+5:30, Stefan Karpinski wrote: > > Any algorithm for producing unique permutations obviously needs to rely on > some notion of element equality. That could be user-defined but default to > something sane. I suspect that

Re: [julia-users] Daemonize a process

2016-01-09 Thread Isaiah Norton
> > Am I correct in this assumption and I just need to wait for Julia to be > able to fork()? Or have I missed something in the documentation? Yes, see https://github.com/JuliaLang/julia/issues/8295 and https://github.com/JuliaLang/julia/issues/985#issuecomment-54837219 On Sat, Jan 9, 2016 at

Re: [julia-users] Daemonize a process

2016-01-09 Thread Thomas S Hatch
Thank you for the confirmation. One valid point in the Linux world is that is daemons are being started via systemd there is little need for the old pid fork anyway as systemd manages the process regardless and can be started with the right mode. With that said, I will simply not bother with

[julia-users] Re: How to resolve "WARNING: both Compose and PyPlot export "draw"; uses of it in module Main must be qualified"?

2016-01-09 Thread elextr
On Sunday, January 10, 2016 at 5:43:30 PM UTC+10, ele...@gmail.com wrote: > > > > On Sunday, January 10, 2016 at 3:19:55 PM UTC+10, EvanB wrote: >> >> I detail the problem here: >> >> https://github.com/dpsanders/scipy_2014_julia/issues/5 >> >> It appears that two exports are clashing. How does

[julia-users] Re: How to resolve "WARNING: both Compose and PyPlot export "draw"; uses of it in module Main must be qualified"?

2016-01-09 Thread elextr
On Sunday, January 10, 2016 at 3:19:55 PM UTC+10, EvanB wrote: > > I detail the problem here: > > https://github.com/dpsanders/scipy_2014_julia/issues/5 > > It appears that two exports are clashing. How does one resolve this? > > Any more explanatory details are be appreciated. Thank you > As