[julia-users] Re: ExcelReaders: specific range

2016-04-17 Thread Fernando Banez-Chicharro
I mean a range defined by an user. For example, data = readxl("Filename.xlsx", "Sheet1!Investments") In the case I am using, I have this: dfData = readxl(DataFrame, file0, "Control!B5:C5", header=false) but I would like to use this: dfData = readxl(DataFrame, file0, "Control!Investments",

[julia-users] an error with DataFrames on Ubuntu 16.04 64bits

2016-04-17 Thread Tony Kelman
Where is your Julia build from?

Re: [julia-users] using Atomic

2016-04-17 Thread ben e
Thank you - that answers it. On Sunday, April 17, 2016 at 6:54:15 PM UTC-4, Yichao Yu wrote: > > On Sun, Apr 17, 2016 at 5:45 PM, ben e > wrote: > > Hello, > > I'm still relatively new to Julia so this is probably a simple question, > but > > I've had trouble finding

Re: [julia-users] using Atomic

2016-04-17 Thread Erik Schnetter
Ben The threading and atomic API is not exported from Base. That means that you need to use names such as `x = Threads.Atomic{Int}()` to create an atomic variable. -erik On Sun, Apr 17, 2016 at 5:45 PM, ben e wrote: > Hello, > I'm still relatively new to Julia so this is

Re: [julia-users] using Atomic

2016-04-17 Thread Yichao Yu
On Sun, Apr 17, 2016 at 5:45 PM, ben e wrote: > Hello, > I'm still relatively new to Julia so this is probably a simple question, but > I've had trouble finding the answer. > I'm interested in using shared memory to do ipc. Shared arrays make a single > producer / single

Re: [julia-users] What is the proper way to allocate and free C struct?

2016-04-17 Thread Andrei Zh
It makes sense. Thanks, once again! For reference, I ended up with code like this: # internal only type XMatrixStruct rows::Cint cols::Cint data::Ptr{Float64} end type XMatrix ptr::Ptr{XMatrixStruct} data::Ptr{Float64} # copied from `unsafe_load(ptr).data` end This way I

[julia-users] using Atomic

2016-04-17 Thread ben e
Hello, I'm still relatively new to Julia so this is probably a simple question, but I've had trouble finding the answer. I'm interested in using shared memory to do ipc. Shared arrays make a single producer / single reader impl exceptionally easy in Julia. I was planning to use Atomic and some

[julia-users] Re: Some sort of sandboxing and scheduling and persistence of state

2016-04-17 Thread Páll Haraldsson
On Tuesday, April 12, 2016 at 3:22:50 PM UTC, Aaron R. M. wrote: > > Hey I'm looking for a solution to some problems that i have using Julia as > a general purpose language. > Given that there are no access modifiers i cannot restrict people calling > functions i don't want them to call. > Use

Re: [julia-users] extra constructor with optional, default value for second parameter?

2016-04-17 Thread Davide Lasagna
Thanks Mauro. I though about passing the extra type as a normal function argument, but did not like it as it was pretty much equivalent to specifying the parameter in the first place. Using the call overload is a nice trick: call{T}(::Type{foo{T}}) = foo{T, Int32}() which let me define new

Re: [julia-users] 'do' notation in documentation?

2016-04-17 Thread Andrew Gibb
I have a little document which I add to periodically called "Julia unsearchables" where I note down which things can't be found in the docs without asking someone. I do hope, once my Thesis is done, that I can contribute it to the documentation.

[julia-users] Re: Some sort of sandboxing and scheduling and persistence of state

2016-04-17 Thread Páll Haraldsson
On Tuesday, April 12, 2016 at 3:22:50 PM UTC, Aaron R. M. wrote: > > Hey I'm looking for a solution to some problems that i have using Julia as > a general purpose language. > Given that there are no access modifiers i cannot restrict people calling > functions i don't want them to call. > Use

Re: [julia-users] extra constructor with optional, default value for second parameter?

2016-04-17 Thread Mauro
I wrote about this a few days ago: https://groups.google.com/d/msg/julia-users/jUMu9A3QKQQ/-ZShKvLXAwAJ It's inner vs outer constructors. Basically you have to pass in the type as a normal function argument, like e.g. `Array(Int,3)` does, or use `call` overloading: julia> Array{Int}(3)

[julia-users] Re: 2d density plot in Gadfly?

2016-04-17 Thread Christopher Fisher
Thanks for the suggestions, Mykel. On Sunday, April 17, 2016 at 12:37:58 PM UTC-4, Mykel Kochenderfer wrote: > > > I was wondering if it is possible to create a 2d density plot in Gadfly. > > It will produce counts rather than densities, so the scale will not be > quite right, but you can get

[julia-users] Re: Int or Int64

2016-04-17 Thread Kristoffer Carlsson
Because of what Mauro said above. On Sunday, April 17, 2016 at 8:07:39 PM UTC+2, Christoph Ortner wrote: > > Why is there no `Float`? Is this discussed somewhere? >

[julia-users] Re: Int or Int64

2016-04-17 Thread Christoph Ortner
Why is there no `Float`? Is this discussed somewhere?

Re: [julia-users] Submodule troubles

2016-04-17 Thread Yichao Yu
On Sun, Apr 17, 2016 at 12:44 PM, STAR0SS wrote: > I have something like that, except that the module B is inside an > include("...") > > > module A > type foo > x > foo(x) = new(x) > end > module B > import A.foo, Base.call > const y

[julia-users] Submodule troubles

2016-04-17 Thread STAR0SS
I have something like that, except that the module B is inside an include("...") module A type foo x foo(x) = new(x) end module B import A.foo, Base.call const y = foo(1) end end I'm getting something like ERROR: LoadError: LoadError:

[julia-users] Re: 2d density plot in Gadfly?

2016-04-17 Thread Mykel Kochenderfer
> I was wondering if it is possible to create a 2d density plot in Gadfly. It will produce counts rather than densities, so the scale will not be quite right, but you can get something along the lines of what you want using 2D histograms

[julia-users] Re: ExcelReaders: specific range

2016-04-17 Thread Scott T
The readxl() function takes a sheet and range as its second argument like this example from the documentation: data = readxl("Filename.xlsx", "Sheet1!A1:C4") Is this what you meant? Or by "previously defined in the excel file" do you have some other use in mind? On Sunday, 17 April 2016

[julia-users] extra constructor with optional, default value for second parameter?

2016-04-17 Thread Davide Lasagna
Hi, I am defining a type with two parameters, see code below as a demonstration. I can, of course, use the default constructor with all parameters explicitly specified. However, I would like to have an extra constructor in which I have to specify only the first parameter, and have the second

Re: [julia-users] Re: SIMD multicore

2016-04-17 Thread Jiahao Chen
Is that because Julia is calling a precompiled library and doesn't directly see the byte code? Yes

Re: [julia-users] Re: SIMD multicore

2016-04-17 Thread Jason Eckstein
There's also a BLAS operation for a*X + Y which is axpy!(a, X, Y). I tried it with the following lines. X = rand(Float32, 5000, 5000) Y = rand(Float32, 5000, 5000) for i = 1:100 axpy!(a, X, Y) end in a normal interactive session and noticed that all the cores were in use, near 100% CPU

Re: [julia-users] bounds error / inexacterror

2016-04-17 Thread Yichao Yu
On Sun, Apr 17, 2016 at 9:14 AM, Emeline Lépine wrote: > Hi, > > According the index line 37 I have either "Bounds error" and "Inexact error" > (line in red). What's the matter, is it the type ? Where do you see it? P.S. Also make sure you are not doing this in global

[julia-users] 2d density plot in Gadfly?

2016-04-17 Thread Christopher Fisher
Hi all- I was wondering if it is possible to create a 2d density plot in Gadfly. The closest option I found was a contour plot, but I would prefer a smooth gradient, such as the last example in the following link (minus the data points):

[julia-users] ExcelReaders: specific range

2016-04-17 Thread Fernando Banez-Chicharro
Hi all, Do you know how to read a specific range (previously defined in the excel file) using readxl()? Is it possible? Thanks!

Re: [julia-users] Re: Mathematical Computing course in Julia

2016-04-17 Thread Scott Jones
On Saturday, April 16, 2016 at 6:57:51 AM UTC-4, Tim Holy wrote: > > I agree line numbers have been a persistent problem in julia. In a > language > that inlines as aggressively as julia, and uses macros and metaprogramming > to > generate code, it's not a trivial problem---in some cases you

[julia-users] Is it possible to read a specific defined range in excel file?

2016-04-17 Thread Fernando Banez-Chicharro
HI all, I am new using Julia, but I found it very interesting. I am using ExcelReaders, and it works fine. But i am trying to read a specific range (defined previously in the excel file) with readxl(). Is it possible? Do you know if there is any way to do this? Thnaks!

[julia-users] parametric composite types constructors

2016-04-17 Thread Didier Verna
Can someone explain this sentence that I don't understand in the user manual (parametric composite types section): "Only one default constructor is generated for parametric types, since overriding it is not possible." Thanks. -- ELS'16 registration open! http://www.european-lisp-symposium.org

[julia-users] bounds error / inexacterror

2016-04-17 Thread Emeline Lépine
Hi, According the index line 37 I have either "Bounds error" and "Inexact error" (line in red). What's the matter, is it the type ? Thanks ! Emi #split step fourier method #16/03/2016 using Gadfly cputime=0 tic(); ln=1;

Re: [julia-users] What is the proper way to allocate and free C struct?

2016-04-17 Thread Yichao Yu
On Sun, Apr 17, 2016 at 6:23 AM, Andrei Zh wrote: > A followup question. In the above example I'd like to add method `getindex` > for `XMatrix`. Previously, I could do it like this: > > type XMatrix > rows::Cint > cols::Cint > data::Ptr{Float64} > end > >

[julia-users] an error with DataFrames on Ubuntu 16.04 64bits

2016-04-17 Thread K leo
Run my julia code for the first time after setting julia up on Ubuntu 16.04, I got the following errors: INFO: Precompiling module DataFrames... ERROR: LoadError: LoadError: error compiling anonymous: could not load library "libz" libz: cannot open shared object file: No such file or directory

Re: [julia-users] 'do' notation in documentation?

2016-04-17 Thread Eric Forgy
Hi Andreas, I don't know how to improve the documentation, but I was also confused by the "do" notation. It seemed kind of mysterious to me at first. Now, I think I got it and use it often. Basically, it is a nice way to rewrite a function whose FIRST argument is a function. For example, say

[julia-users] Atom package autocomplete-julia missing?

2016-04-17 Thread K leo
The package is no longer available. Does anyone know why?

Re: [julia-users] What is the proper way to allocate and free C struct?

2016-04-17 Thread Andrei Zh
A followup question. In the above example I'd like to add method `getindex` for `XMatrix`. Previously, I could do it like this: type XMatrix rows::Cint cols::Cint data::Ptr{Float64} end getindex(mat::XMatrix, i::Integer) = unsafe_load(mat.data, i) Now after Yichao's suggestion my type

Re: [julia-users] 'do' notation in documentation?

2016-04-17 Thread Kevin Squire
Hello, Andreas, see: http://docs.julialang.org/en/release-0.4/manual/functions/#do-block-syntax-for-function-arguments Cheers, Kevin On Sunday, April 17, 2016, Andreas Lobinger wrote: > Hello colleagues, > > although it's around and found in some/many lines, where is

[julia-users] 'do' notation in documentation?

2016-04-17 Thread Andreas Lobinger
Hello colleagues, although it's around and found in some/many lines, where is actually the documentation of the 'do' notation. I'm sitting here, trying to debug a Pkg problem and the lines cd("METADATA") do something end give me some problems in understanding. While it's obviously some kind

[julia-users] Re: Parametric types which add or delete fields.

2016-04-17 Thread 'Greg Plowman' via julia-users
Notwithstanding the explosion of possible types and the excellent advice and insight provided by Tim, you can get the following to compile and run. typealias Color ASCIIString typealias Horsepower Float64 typealias Model ASCIIString typealias Year Int type Car{ C<:Union{Color,Void},

Re: [julia-users] Re: Mathematical Computing course in Julia

2016-04-17 Thread Daniel Carrera
It works! Thanks! On 17 April 2016 at 00:30, Steven G. Johnson wrote: > > > On Saturday, April 16, 2016 at 12:44:54 AM UTC-4, Daniel Carrera wrote: >> >> Is there a way to try out your instructions on a computer where I have >> previously installed IJulia and PyPlot? Or