Re: [julia-users] errorbar plot in Plots.jl

2016-10-14 Thread franckhertz16
Beautiful, thank you! On Saturday, October 15, 2016 at 12:06:39 AM UTC+2, Tom Breloff wrote: > > Already implemented as attributes: yerror and xerror > > On Friday, October 14, 2016, wrote: > >> I have just discovered Plots, which I use mostly with the PlotlyJS >> backend

[julia-users] Re: Parallel file access

2016-10-14 Thread Ralph Smith
There are good synchronization primitives for Tasks, and a bit for threads, but not much for parallel processes. (One could use named system semaphores on Linux and Windows, but there's no Julia wrapper yet AFAIK.) I also found management of parallel processes confusing, and good nontrivial

[julia-users] Dataframe without column and row names ?

2016-10-14 Thread Henri Girard
Hi, Is it possible to have a table with only the result ? I don't want row /column names. using DataFrames function iain_magic(n::Int) M = zeros(Int, n, n) for I = 1:n, J = 1:n @inbounds M[I,J] = n*((I+J-1+(n >> 1))%n)+((I+2J-2)%n) + 1 end return M end mm=iain_magic(3)

[julia-users] Re: eachline() work with pmap() is slow

2016-10-14 Thread lovebufan
I have change the code to parallel on files rather than lines. codes are available here if anyone have interests. However, the speed is not satisfactory still (total processing speed approx. 10M/s, ideally it should be 100M/s,

Re: [julia-users] FactCheck.jl bundled with Julia?

2016-10-14 Thread Yichao Yu
On Fri, Oct 14, 2016 at 9:28 PM, Júlio Hoffimann wrote: > Ok, I am not switching to FactCheck then, didn't knew it is being > deprecated in a sense. > You can switch to BaseTestNext if you need 0.4 compatibility. > > Thank you, > -Júlio > > 2016-10-14 18:05

Re: [julia-users] FactCheck.jl bundled with Julia?

2016-10-14 Thread Júlio Hoffimann
Ok, I am not switching to FactCheck then, didn't knew it is being deprecated in a sense. Thank you, -Júlio 2016-10-14 18:05 GMT-07:00 Yichao Yu : > On Oct 14, 2016 8:52 PM, "Júlio Hoffimann" > wrote: > > > > Oh really? I'm not following it closely.

Re: [julia-users] FactCheck.jl bundled with Julia?

2016-10-14 Thread Yichao Yu
On Oct 14, 2016 8:52 PM, "Júlio Hoffimann" wrote: > > Oh really? I'm not following it closely. Please let me know why that is the case, I was planning to switch to FactCheck. Afaict the new test in base is a improved version of FactCheck. > > -Júlio

Re: [julia-users] Does julia -L work with plots?

2016-10-14 Thread Isaiah Norton
Call `show()` at the end of the script. See explanation here: https://github.com/JuliaPy/PyPlot.jl#non-interactive-plotting On Fri, Oct 14, 2016 at 1:17 PM, Stefan Rigger wrote: > > > Hello everyone, > > I'm using julia to numerically solve partial differential equations

Re: [julia-users] FactCheck.jl bundled with Julia?

2016-10-14 Thread Júlio Hoffimann
Oh really? I'm not following it closely. Please let me know why that is the case, I was planning to switch to FactCheck. -Júlio

Re: [julia-users] Embedding Julia in C++ - Determining returned array types

2016-10-14 Thread Isaiah Norton
On Fri, Oct 14, 2016 at 2:28 PM, Kyle Kotowick wrote: > > > After determining that an array was returned, how would you determine what > the inner type of the array is (i.e. the type of the objects it contains)? > `jl_array_eltype` > > And furthermore, if it returns an array

Re: [julia-users] linspace question; bug?

2016-10-14 Thread Páll Haraldsson
2016-10-14 22:58 GMT+00:00 Stefan Karpinski : > I'll answer your question with a riddle: How can you have a length-one > collection whose first and last value are different? > I know that; yes, it's a degenerate case, and as I said "may not matter too much" [Nobody makes a

Re: [julia-users] FactCheck.jl bundled with Julia?

2016-10-14 Thread Tom Breloff
Actually that's not true. AFAIK, people are switching back to the new testing in Base, and FactCheck will be deprecated eventually. (Unless I got the wrong memo?) On Friday, October 14, 2016, Júlio Hoffimann wrote: > Hi, > > It seems that FactCheck.jl has become the

[julia-users] FactCheck.jl bundled with Julia?

2016-10-14 Thread Júlio Hoffimann
Hi, It seems that FactCheck.jl has become the defacto standard for writing tests in Julia packages. Wouldn't it be a good idea to have it bundled with Julia? Any reason to keep the current test framework? -Júlio

Re: [julia-users] linspace question; bug?

2016-10-14 Thread Stefan Karpinski
I'll answer your question with a riddle: How can you have a length-one collection whose first and last value are different? On Fri, Oct 14, 2016 at 6:25 PM, Páll Haraldsson wrote: > > I mistook third param for step, and got confusing error: > > > julia> linspace(1, 2,

Re: [julia-users] Most effective way to build a large string?

2016-10-14 Thread Páll Haraldsson
On Friday, October 14, 2016 at 10:44:47 PM UTC, Páll Haraldsson wrote: > > On Friday, October 14, 2016 at 5:17:45 PM UTC, Diego Javier Zea wrote: >> >> Hi! >> I have a function that uses `IOBuffer` for this creating one `String` >> like the example. >> Is it needed or recommended `close` the

Re: [julia-users] Most effective way to build a large string?

2016-10-14 Thread Páll Haraldsson
On Friday, October 14, 2016 at 5:17:45 PM UTC, Diego Javier Zea wrote: > > Hi! > I have a function that uses `IOBuffer` for this creating one `String` like > the example. > Is it needed or recommended `close` the IOBuffer after `takebuf_string`? > I find it unlikely. help?> takebuf_string

[julia-users] linspace question; bug?

2016-10-14 Thread Páll Haraldsson
I mistook third param for step, and got confusing error: julia> linspace(1, 2, 1) ERROR: linspace(1.0, 2.0, 1.0): endpoints differ in linspace(::Float64, ::Float64, ::Float64) at ./range.jl:212 in linspace(::Float64, ::Float64, ::Int64) at ./range.jl:251 in linspace(::Int64, ::Int64,

Re: [julia-users] errorbar plot in Plots.jl

2016-10-14 Thread Tom Breloff
Already implemented as attributes: yerror and xerror On Friday, October 14, 2016, wrote: > I have just discovered Plots, which I use mostly with the PlotlyJS backend > because of the inline interactivity in Juliabox, and I have been spoiled by > it: thank you Tom and

[julia-users] Embedding Julia in C++ - Determining returned array types

2016-10-14 Thread Kyle Kotowick
I'm trying to embed Julia code in a C++ app I'm building. I have it all working and can do some basic calls, all good so far. One thing I'm struggling with, though, is determining what type of array is returned by a Julia evaluation. The only available documentation seems to be this page

[julia-users] errorbar plot in Plots.jl

2016-10-14 Thread franckhertz16
I have just discovered Plots, which I use mostly with the PlotlyJS backend because of the inline interactivity in Juliabox, and I have been spoiled by it: thank you Tom and Spencer. I need an errorbar plot (something like http://matplotlib.org/examples/statistics/errorbar_demo_features.html):

Re: [julia-users] Re: Julia-i18n logo proposal

2016-10-14 Thread Waldir Pimenta
With the final detail ironed out , I'm happy to announce that Julia-i18n has officially adopted the J version as its logo! Who said design by committee didn't work? ;) Thanks all

[julia-users] Re: Parallel file access

2016-10-14 Thread Zachary Roth
Thanks for the reply and suggestion, Ralph. I tried to get this working with semaphores/mutexes/locks/etc. But I've not been having any luck. Here's a simplified, incomplete version of what I'm trying to do. I'm hoping that someone can offer a suggestion if they see some sample code.

[julia-users] Re: Julia and the Tower of Babel

2016-10-14 Thread Jeffrey Sarnoff
Just clarifying: For a two part package name that begins with an acronym and ends in a word the present guidance: the acronym is to be uppercased and the second word is to be capitalized, no separator. so: CSSScripts, HTMLLinks the desired guidance (from 24hrs of

Re: [julia-users] Re: Any 0.5 performance tips?

2016-10-14 Thread Mauro
Good detective work, please post your code in the issue! On Fri, 2016-10-14 at 19:51, Andrew wrote: > I've found the main problem. I have a function which repeatedly accesses a > 6-dimensional array in a loop. This function took no time in 0.4, but is > actually very slow in

Re: [julia-users] Re: Any 0.5 performance tips?

2016-10-14 Thread Andrew
I've found the main problem. I have a function which repeatedly accesses a 6-dimensional array in a loop. This function took no time in 0.4, but is actually very slow in 0.5. My problem looks very similar to 18774 . Here's an example: A3 =

[julia-users] Re: eachline() work with pmap() is slow

2016-10-14 Thread Páll Haraldsson
On Friday, October 14, 2016 at 3:45:36 AM UTC, love...@gmail.com wrote: > > I want to process each line of a large text file (100G) in parallel using > the following code > > pmap(process_fun, eachline(the_file)) > > however, it seems that pmap is slow. following is a dummy experiment: > >

Re: [julia-users] Most effective way to build a large string?

2016-10-14 Thread Diego Javier Zea
Hi! I have a function that uses `IOBuffer` for this creating one `String` like the example. Is it needed or recommended `close` the IOBuffer after `takebuf_string`? Best! On Tuesday, February 17, 2015 at 1:47:08 PM UTC-3, Stefan Karpinski wrote: > > IOBuffer is what you're looking for: > > buf

[julia-users] Does julia -L work with plots?

2016-10-14 Thread Stefan Rigger
Hello everyone, I'm using julia to numerically solve partial differential equations and use PyPlot to plot the solutions. I'd like to be able to calculate a solution and plot entering something like julia -L file.jl in Terminal but unfortunately, this doesn't seem to work (there is no

[julia-users] Re: Performance of release 0.5.0 v 0.4.6.0

2016-10-14 Thread Jeremy Cavanagh
Thanks Guys, that's very helpful. I shall now go away and play with the performance tests.

[julia-users] Re: What is really "big data" for Julia (or otherwise), 1D or multi-dimensional?

2016-10-14 Thread Páll Haraldsson
On Thursday, October 13, 2016 at 7:49:51 PM UTC, cdm wrote: > > from CloudArray.jl: > > "If you are dealing with big data, i.e., your RAM memory is not enough to > store your data, you can create a CloudArray from a file." > > >

[julia-users] Re: eachline() work with pmap() is slow

2016-10-14 Thread Jeremy McNees
I need to run something similar due to a large number of text files that I have. They are too large to load into memory at one-time, let alone multiple files at the same time. I find that pmap() works very well here. First, you should wrap your for loop in a function. In general you should

[julia-users] Re: eachline() work with pmap() is slow

2016-10-14 Thread Jeremy McNees
I need to run something similar due to a large number of text files that I have. They are too large to load into memory at one-time, let alone multiple files at the same time. I find that pmap() works very well here. First, you should wrap your for loop in a function. In general you should

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

2016-10-14 Thread Páll Haraldsson
On Thursday, October 13, 2016 at 6:00:30 PM UTC, Tim Holy wrote: > > If you just want a raw dump of memory, you can get that, and if it's big > it uses `Mmap.mmap` when it reads the data back in. So you can read > terabyte-sized arrays. > [Not clear on mmap.. just a possibility, kind or

[julia-users] Re: return Bool [and casting to Bool]

2016-10-14 Thread Steven G. Johnson
https://github.com/JuliaLang/julia/issues/18367

[julia-users] return Bool [and casting to Bool]

2016-10-14 Thread Páll Haraldsson
It's great to see explicit return types in the language as of 0.5. About return [or it's implicit nature, I only read about half as very long..]: https://groups.google.com/forum/#!topic/julia-users/4RVR8qQDrUg Disallowinging implicit return, would be a breaking change. Is there some room

[julia-users] Layered subplot does not work with categorical variables

2016-10-14 Thread Christopher Fisher
Hi all- I'm having trouble creating a subplot with multiple layers when the variables are categorical. Here is a stripped down version of my code. df = DataFrame(Condition = repeat(["Condition 1","Condition 2"], inner = 3), Block = repeat(["Block 1","Block 2", "Block 3"],outer = 2),y1 =

[julia-users] Layered subplot does not work with categorical variables

2016-10-14 Thread Christopher Fisher
Hi all- I'm having trouble creating a subplot with multiple layers when the variables are categorical. Here is a stripped down version of my code. df = DataFrame(Condition = repeat(["Condition 1","Condition 2"], inner = 3), Block = repeat(["Block 1","Block 2", "Block 3"],outer = 2),y1 =

Re: [julia-users] ERROR: Target architecture mismatch

2016-10-14 Thread ABB
Ok - thanks for the clarification. I will try to compile on the compute node, not the login node. I will submit a ticket to TACC and ask about cmake too. The version on the compute node is 2.8.11. On Friday, October 14, 2016 at 10:42:51 AM UTC-5, Erik Schnetter wrote: > > Julia runs some

[julia-users] help with @generated function call please?

2016-10-14 Thread Florian Oswald
hi all, I want to evaluate a function at each index of an array. There is a N dimensional function, and I want to map it onto an N-dimensional array: fpoly(x::Array{Real,5}) = x[1] + x[2]^2 + x[3] + x[4]^2 + x[5] want to do a = rand(2,2,2,2,2); b = similar(a) for i1 in indices(a,1) for i2

Re: [julia-users] ERROR: Target architecture mismatch

2016-10-14 Thread Erik Schnetter
Julia runs some of the code it generates as part of its bootstrapping procedure. That is, traditional cross-compiling won't work. I think there's a way around it, but it's not trivial. I would avoid this in the beginning. -erik On Fri, Oct 14, 2016 at 11:28 AM, ABB wrote:

Re: [julia-users] ERROR: Target architecture mismatch

2016-10-14 Thread ABB
I was building on the (Haswell) front end. From some of the other issues I looked at it appeared that I could specify the architecture even if I was not actually building on that kind of system. But that could be totally wrong, so I can try it on the KNL node if that's required. When I put

Re: [julia-users] ERROR: Target architecture mismatch

2016-10-14 Thread Erik Schnetter
Were you building on a KNL node or on the frontend? What architecture did you specify? -erik On Thu, Oct 13, 2016 at 9:38 PM, Valentin Churavy wrote: > Since KNL is just a new platform the default version of the LLVM compiler > that Julia is based on does not support it

Re: [julia-users] why do we have Base.isless(a, ::NAtype) but not Base.isless(a, ::Nullable)?

2016-10-14 Thread Milan Bouchet-Valat
Le jeudi 13 octobre 2016 à 15:40 +0200, Florian Oswald a écrit : > i'm trying to understand why we don't have something similar in terms > of comparison for Nullable as we have for DataArrays NAtype (below). > point me to the relevant github conversation, if any, is fine.  Such a method already

Re: [julia-users] Re: What's the status of SIMD instructions from a user's perspective in v0.5?

2016-10-14 Thread Milan Bouchet-Valat
Le jeudi 13 octobre 2016 à 07:27 -0700, Florian Oswald a écrit : > > Hi Erik, > > that's great thanks. I may have a hot inner loop where this could be > very helpful. I'll have a closer look and come back with any > questions later on if that's ok.  Maybe I'm stating the obvious, but you don't

Re: [julia-users] Re: why do we have Base.isless(a, ::NAtype) but not Base.isless(a, ::Nullable)?

2016-10-14 Thread Milan Bouchet-Valat
Le jeudi 13 octobre 2016 à 06:45 -0700, Florian Oswald a écrit : > I mean, do I have to cycle through the array and basically clean it > of #NULL before findign the maximium or is there another way? Currently you have two solutions: julia> using NullableArrays julia> x = NullableArray([1, 2, 3,

[julia-users] Re: redefining Base method for `show`

2016-10-14 Thread lapeyre . math122a
I'm thinking of symbolic mathematics (Symata.jl). Another example is `SymPy.jl`, which prints rationals the same way I want to, like this: "2/3". But in SymPy.jl, rationals are not `Rational`'s, but rather wrapped python objects, so the problem with printing does not arise. If I wrapped

[julia-users] Re: Merge functions from different headers (Matrix vs. Vector)

2016-10-14 Thread DNF
On Friday, October 14, 2016 at 3:16:31 PM UTC+2, Martin Florek wrote: > > Thank you very much. This is very elegant way, I think that it solve my > problem. > You're welcome. If you are looking to improve performance further, you could add @inbounds and @simd macro calls, as seen here:

Re: [julia-users] GC rooting for embedding: what is safe and unsafe?

2016-10-14 Thread Yichao Yu
On Fri, Oct 14, 2016 at 7:03 AM, Bart Janssens wrote: > Hi, > > Replies below, to the best of my understanding of the Julia C interface: > > On Fri, Oct 14, 2016 at 11:47 AM Gunnar Farnebäck > wrote: > >> Reading through the threads and issues on gc

Re: [julia-users] Memory allocation issue when using external packages in module

2016-10-14 Thread Yichao Yu
On Fri, Oct 14, 2016 at 4:14 AM, Jan wrote: > Thanks for the hint. That seems to be the reason! > > I have a couple of follow up questions so that I learn more about Julia. > Would be nice if someone takes a couple of minutes to educate me. > > I found a simple example

Re: [julia-users] list all methods on certain datatype

2016-10-14 Thread Mauro
Try: help?> methodswith search: methodswith methodswith(typ[, module or function][, showparents]) Return an array of methods with an argument of type typ. The optional second argument restricts the search to a particular module or function (the default is all modules, starting from

Re: [julia-users] Type stability of function in composite types

2016-10-14 Thread Mauro
For Julia to infer types it needs to know the exact type of the function. Try this: type Foo{F<:Function} f::F y::Array{Float64, 1} x::Array{Float64, 2} end On Fri, 2016-10-14 at 13:26, Giuseppe Ragusa wrote: > I am failing to understand why the following code

[julia-users] Re: Nested Grouping in Gadfly

2016-10-14 Thread Christopher Fisher
I guess one approach is to use subplots with the grid lines turned off. But if someone has a better solution, I would like to know. On Friday, October 14, 2016 at 6:18:35 AM UTC-4, Christopher Fisher wrote: > > Hi all- > > I want to create a plot with nested grouping. The data contain a

[julia-users] Type stability of function in composite types

2016-10-14 Thread Giuseppe Ragusa
I am failing to understand why the following code produce type instability (caveat: the code is a reduction o large and more complex code, but the features are the same). ``` type Foo f::Function y::Array{Float64, 1} x::Array{Float64, 2} end type Bar{T} b::T end type A{T} a::T

[julia-users] list all methods on certain datatype

2016-10-14 Thread Paulito Palmes
is there a function or keyboard shortcut to list all functions operating on certain datatype? for example, in a typical object-based approach, you can type the object in REPL with a dot and it completes all methods operating on that object. in Julia, we can only list all the behavior of a

Re: [julia-users] Re: Julia and the Tower of Babel

2016-10-14 Thread Jeffrey Sarnoff
first pass at naming guidelines https://github.com/JuliaPraxis/Naming On Thursday, October 13, 2016 at 8:07:18 AM UTC-4, Páll Haraldsson wrote: > > On Sunday, October 9, 2016 at 9:59:12 AM UTC, Michael Borregaard wrote: >> >> >> So when I came to julia I was struck by how structured the package

Re: [julia-users] GC rooting for embedding: what is safe and unsafe?

2016-10-14 Thread Bart Janssens
Hi, Replies below, to the best of my understanding of the Julia C interface: On Fri, Oct 14, 2016 at 11:47 AM Gunnar Farnebäck wrote: > Reading through the threads and issues on gc rooting for embedded code, as > well as the code comments above the JL_GC_PUSH* macros in

[julia-users] Nested Grouping in Gadfly

2016-10-14 Thread Christopher Fisher
Hi all- I want to create a plot with nested grouping. The data contain a condition grouping variable (1 and 2) and a block grouping variable (1,2 and 3). So I would like to be able to group the data by condition and display the blocks (in order from 1 to 3) within each condition. Ultimately,

[julia-users] GC rooting for embedding: what is safe and unsafe?

2016-10-14 Thread Gunnar Farnebäck
Reading through the threads and issues on gc rooting for embedded code, as well as the code comments above the JL_GC_PUSH* macros in julia.h, I'm still uncertain about how defensive it's necessary to be and best practices. I'll structure this into a couple of cases with questions. 1. One of

[julia-users] Re: Merge functions from different headers (Matrix vs. Vector)

2016-10-14 Thread DNF
As a proposal, this is what I would do, given you requirements: function _scaleRestore!(Z, Zout, shift, stretch) for j in 1:size(Z, 2), i in 1:size(Z, 1) Zout[i, j] = Z[i, j] * stretch[j] + shift[j] end return Zout end scaleRestore!(Z::Vector, shift::Number, stretch::Number) =

[julia-users] Re: Merge functions from different headers (Matrix vs. Vector)

2016-10-14 Thread DNF
I don't know of any way to accomplish what you want with a single method signature. I don't see how Union can help you, because you would not be able to disallow (Vector x Vector x Vector) input, for example. You normally achieve this in Julia by writing two separate methods, which is what you

Re: [julia-users] Memory allocation issue when using external packages in module

2016-10-14 Thread Jan
Thanks for the hint. That seems to be the reason! I have a couple of follow up questions so that I learn more about Julia. Would be nice if someone takes a couple of minutes to educate me. I found a simple example reproducing my issue: module FooBar # Including BlackBoxOptim causes type

[julia-users] Re: Merge functions from different headers (Matrix vs. Vector)

2016-10-14 Thread DNF
Hmm. I slightly misread the way you had set up your code. I thought you wanted your code to cover three cases: all scalar, one vector - two scalars, and one matrix - two vectors. So to be clear: defining the function: scaleRestore(a, b, c) = a .* b' .+ c' covers both your cases and then some

Re: [julia-users] shared array of user defined type

2016-10-14 Thread Mauro
On Fri, 2016-10-14 at 09:41, Alexandros Fakos wrote: > Thank you Mauro. If I understand correctly, this means that in SharedArrays > I cannot use immutable types whose fields contain arrays. Is that right? > Thanks a lot, > Alex Yes. You can check with `isbits`. > On

[julia-users] Re: Merge functions from different headers (Matrix vs. Vector)

2016-10-14 Thread DNF
This should work for the three cases you have set up: f_scaleRestore(a, b, c) = a .* b' .+ c' On Friday, October 14, 2016 at 9:12:55 AM UTC+2, Martin Florek wrote: > > Hi all, > > I have the following two functions and I want to sensibly merge them into > one. How to marge headers and body of

Re: [julia-users] shared array of user defined type

2016-10-14 Thread Alexandros Fakos
Thank you Mauro. If I understand correctly, this means that in SharedArrays I cannot use immutable types whose fields contain arrays. Is that right? Thanks a lot, Alex On Friday, October 14, 2016 at 1:57:42 AM UTC-5, Mauro wrote: > > On Fri, 2016-10-14 at 00:02, Alexandros Fakos

[julia-users] Merge functions from different headers (Matrix vs. Vector)

2016-10-14 Thread Martin Florek
Hi all, I have the following two functions and I want to sensibly merge them into one. How to marge headers and body of function for Matrix and Vector? - f_scaleRestore(a::Float64, b::Float64, c::Float64) = a * b + c; - - # version 1 - function scaleRestore(Z::Matrix{Float64},

Re: [julia-users] shared array of user defined type

2016-10-14 Thread Mauro
On Fri, 2016-10-14 at 00:02, Alexandros Fakos wrote: > Hi, > > Is there a way to create a shared array of a user defined composite > type? Yes, but only for isbits types, i.e. immutables which do not contain non-immutable fields. Otherwise you could look into the new