Re: [julia-users] Extreme garbage collection time

2015-04-07 Thread Tim Holy
Out of curiosity, what happens if you take the compute! function out of main and pass ratios (and any other needed variables) as another argument? --Tim On Monday, April 06, 2015 09:14:24 PM Adam Labadorf wrote: Thanks for the replies. I took your suggestions (and reread the scope section of

Re: [julia-users] Juno LightTable Freezes Using images.jl

2015-04-07 Thread Mike Innes
What OS is this on? Your best bet here, if you can, is to reproduce this in the terminal REPL (open a terminal repl command) and file an issue on Images.jl. On 3 April 2015 at 00:49, will ship willshipdes...@gmail.com wrote: So have discovered weird behaviour in Juno LightTable (which I have

[julia-users] Usage of floating point template arguments with many different values

2015-04-07 Thread Sheehan Olver
In Julia v0.4 its possible to do the following *immutable Foo{a} end* *Foo{0.1}()* *Foo{0.2}()* Is it bad performance-wise if the parameter a takes many different values? I.e. what's the growth in complexity of Julia as the number of types increases? (Ignoring the cost of recompiling

Re: [julia-users] Extreme garbage collection time

2015-04-07 Thread Kristoffer Carlsson
Can you post your csv file so we can actually run the program? On Tuesday, April 7, 2015 at 6:21:18 AM UTC+2, Adam Labadorf wrote: Thanks for the replies. I took your suggestions (and reread the scope section of the docs) and am still experiencing the gc creep. Below is the complete

[julia-users] Re: calling Julia from Mathematica

2015-04-07 Thread Simon Byrne
I don't think there's an easy way to do it, unfortunately: if someone really wants to tackle it, the way forward would probably be through Mathematica's LibraryLink: http://mathematica.stackexchange.com/q/8438 s On Tuesday, 7 April 2015 11:31:16 UTC+1, Sheehan Olver wrote: I would be very

Re: [julia-users] Extreme garbage collection time

2015-04-07 Thread Mauro
On Tue, 2015-04-07 at 06:14, Adam Labadorf alabad...@gmail.com wrote: Thanks for the replies. I took your suggestions (and reread the scope section of the docs) and am still experiencing the gc creep. Below is the complete program, with the notable changes that I wrapped the main

[julia-users] Re: calling Julia from Mathematica

2015-04-07 Thread Frank Kampas
I've used LibraryLink to call Ipopt from Mathematica but haven't succeeded in calling Julia from C under Windows, which would be required to use LibraryLink. On Thursday, April 2, 2015 at 9:25:04 AM UTC-4, Frank Kampas wrote: Has anyone been able to call Julia from Mathematica?

[julia-users] short-circuit evaluation question?

2015-04-07 Thread David Gold
Greetings all, I've quite taken to the short-circuit evaluation idiom. I just have a quick question about its behavior. Why does boolexpr boolvar = false throw an error (syntax: invalid assignment location), but boolexpr (boolvar = false) work just fine? The documentation

Re: [julia-users] short-circuit evaluation question?

2015-04-07 Thread Milan Bouchet-Valat
Le mardi 07 avril 2015 à 06:05 -0700, David Gold a écrit : Greetings all, I've quite taken to the short-circuit evaluation idiom. I just have a quick question about its behavior. Why does boolexpr boolvar = false throw an error (syntax: invalid assignment location), but boolexpr

[julia-users] run() yields in @async, why?

2015-04-07 Thread Ben Arthur
spawn() and readandwrite() are documented as being variants of run() which do not block the command line. yet in an @async, run() seems to yield to other tasks. to wit: # bar prints first because it's the first task julia @sync begin @async println(bar) @async (run(`sleep

Re: [julia-users] Extreme garbage collection time

2015-04-07 Thread Adam Labadorf
I moved compute! out of the main function and pass the ratios as you suggested and the performance is a bit better but I still notice the gc time increasing albeit more slowly, new code below. The csv I'm using is available at

[julia-users] Re: short-circuit evaluation question?

2015-04-07 Thread Matt Bauman
It's simply an operator precedence[1] issue. The assignment operator is one of the lowest precedence operations in Julia[2], so your expression is getting parsed as (boolexpr boolvar) = false. That's why the parentheses are required. 1. https://en.wikipedia.org/wiki/Order_of_operations 2.

Re: [julia-users] Exporter for compressed binary unstructured grid VTK XML files.

2015-04-07 Thread Rob J. Goedman
Hi Kristoffer, I’ll certainly will keep your 2 files around if you don’t mind, at least until I have some time to try the 2 existing packages. WriteVTK.jl seems closer to your bootstrap files. Regards, Rob J. Goedman goed...@mac.com On Apr 6, 2015, at 1:24 PM, Kristoffer Carlsson

[julia-users] Usage of floating point template arguments with many different values

2015-04-07 Thread Toivo Henningsson
You should make sure that you really need the specialization based on that float parameter value.

Re: [julia-users] Extreme garbage collection time

2015-04-07 Thread Mauro
Make Result an immutable: immutable Result pvalue::Float64 i::Int64 j::Int64 end that way the numbers are stored in the S array directly and all its memory is preallocated. Otherwise S just holds pointers to the Results objects. gc time is only 2% for me then (but I didn't run it for

[julia-users] Usage of floating point template arguments with many different values

2015-04-07 Thread Toivo Henningsson
I would say that recompiling code for each new type (each new combination of types that a function is called with) is the main performance cost, but that could be quite substantial if you use many different parameter values or functions with many arguments whose types can vary independently.

Re: [julia-users] Extreme garbage collection time

2015-04-07 Thread Adam Labadorf
Yes, that gives a massive improvement and I see the same gc behavior you got. I could notice the gc increasing slowly after just watching for a minute or two, and that seems to have stopped now. I'll know for sure when I run the whole thing and will report back. Thanks so much to all of you

[julia-users] Re: short-circuit evaluation question?

2015-04-07 Thread David Gold
Thank you, Milan Matt. That makes a lot of sense. Probably this will only be an issue with folks such as myself who are new to the notion of operator precedence. So I don't know if it warrants an addition to the docs. D

Re: [julia-users] Short question about type alias with partially known parameter types

2015-04-07 Thread Mauro
In 0.3 it's not possible in 0.4 this works: julia type A{T,P} a::T end julia typealias B{T} A{T, 1} A{T,1} julia call{T}(::Type{B}, a::T) = B{T}(a) call (generic function with 936 methods) julia B(1.0) A{Float64,1}(1.0) See https://github.com/JuliaLang/julia/pull/8712 for

[julia-users] Default behavior from omitted catch block when a finally block is added.

2015-04-07 Thread Harry Sungod
Hello All, I find the following behavior a bit non-intuitive. IMHO, if addition of finally block changes the default behavior provided by the omitted catch block, we should force the user to declare a catch block. # Version 0.4.0-dev+4160 (2015-04-06 03:40 UTC) Commit 8fc5b4e* (1 day old

Re: [julia-users] Is there a REPL shortcut for a subscript numeral?

2015-04-07 Thread Stefan Karpinski
Unicode only supports some (fairly arbitrary) subscripts and superscripts. I doubt that pi is one of them. On Apr 7, 2015, at 1:13 PM, Vitor Aguiar vitor@gmail.com wrote: Can also do \Theta\_\pi ? On Wednesday, August 20, 2014 at 12:10:15 PM UTC-3, John Myles White wrote:

[julia-users] Re: Can one force a newline in the epilog of Argparse help?

2015-04-07 Thread Carlo Baldassi
There is currently no way to do what you want, but I'd like to add this feature. I'm just unsure what the best/simplest API would be. Cold you open an issue about it in ArgParse.jl https://github.com/carlobaldassi/ArgParse.jl in the meanwhile? On Saturday, April 4, 2015 at 11:50:03 PM UTC+2,

Re: [julia-users] mapping to colums of a matrix

2015-04-07 Thread René Donner
Unfortunately the documentation is not really great yet, but https://github.com/rened/FunctionalData.jl#computing-map-and-friends-details is a collection of functions that could be used for this, with optional in-place operations and parallel processing. It is basically a generalization of

Re: [julia-users] Is there a REPL shortcut for a subscript numeral?

2015-04-07 Thread Vitor Aguiar
Can also do \Theta\_\pi ? On Wednesday, August 20, 2014 at 12:10:15 PM UTC-3, John Myles White wrote: Try typing the sequence \_1TAB — John On Aug 20, 2014, at 8:08 AM, Douglas Bates dmb...@gmail.com javascript: wrote: I find it convenient to use identifiers like julia a₁ = 2

[julia-users] Re: mapping to colums of a matrix

2015-04-07 Thread David Gold
Comprehensions may be what you are looking for: http://docs.julialang.org/en/latest/manual/arrays/#comprehensions. For your example, julia v = [1, 2, 3, 4] # Set the vector v 4-element Array{Int64,1}: 1 2 3 4 julia A = [ j.*v[i] for j in 1:4, i in 1:length(v) ] # Create a 2d array A where

Re: [julia-users] Extreme garbage collection time

2015-04-07 Thread Mauro
Glad that helped! (Also not all immutable are inlined that way, only when isbits==true) Maybe the gc time increased because it had to look at more and more objects as more and more Result instances were created? On Tue, 2015-04-07 at 18:24, Adam Labadorf alabad...@gmail.com wrote: Yes, that

[julia-users] Short question about type alias with partially known parameter types

2015-04-07 Thread Kristoffer Carlsson
Let's say I have a type parameterized with two other types and I do the following: type A{T,P} a::T end typealias B{T} A{T, 1} B(1.0) # Error B{Float64}(1.0) # Works Is there anyway you could write the code so that the T type is inferred from the argument to the call to B. Best

[julia-users] Re: Can one force a newline in the epilog of Argparse help?

2015-04-07 Thread Peter Simon
Opened issue 12 https://github.com/carlobaldassi/ArgParse.jl/issues/12. Thanks, --Peter On Tuesday, April 7, 2015 at 10:51:38 AM UTC-7, Carlo Baldassi wrote: There is currently no way to do what you want, but I'd like to add this feature. I'm just unsure what the best/simplest API would be.

[julia-users] Default behavior from omitted catch block when a finally block is added.

2015-04-07 Thread Toivo Henningsson
I agree, seems only consistent that try without a catch should catch nothing.

[julia-users] Re: Julia on Vagrant

2015-04-07 Thread Christian Goldammer
Thanks for the note. If I figure out a good way to get it to run (but that's far from assured), I'd be happy to put in a pull request. Chris On Monday, April 6, 2015 at 12:29:14 PM UTC-5, Patrick O'Leary wrote: This hasn't been updated in a while, so it's probably just broken (I don't think

[julia-users] Re: conditional REQUIRE entries

2015-04-07 Thread andy hayden
I think for the moment you either need to include it in the REQUIRE file, or not and make the user to install gpu-related bits themselves. IMO This is not ideal... Another example is Markdown: you have to include that in the REQUIRE, even though Base.Markdown is included in 0.4. This means you

Re: [julia-users] Extreme garbage collection time

2015-04-07 Thread Adam Labadorf
The code ran to completion at least 17x times faster than the equivalent python implementation. Out of curiosity, I collected the elapsed time and % spent in gc statistics from @time and plotted them from across the whole run: This was run on a shared cluster so the spikes in time are

[julia-users] Dynamics Arrays

2015-04-07 Thread Diego Tapias
Hello, as far as I understand the Arrays that we often use when working with julia are dynamic arrays since they support the operations of adding or removing elements (through push!/unshift! and pop!/shift! methods). In view of this, I am wondering about what is the most primitive Array type in

Re: [julia-users] Re: mapping to colums of a matrix

2015-04-07 Thread David Gold
Very good to know. Thank you for the clarification! On Tuesday, April 7, 2015 at 5:10:43 PM UTC-4, Milan Bouchet-Valat wrote: Le mardi 07 avril 2015 à 10:56 -0700, David Gold a écrit : Comprehensions may be what you are looking for:

Re: [julia-users] Extreme garbage collection time

2015-04-07 Thread Adam Labadorf
The code ran to completion at least 17x times faster than the equivalent python implementation. Out of curiosity, I collected the elapsed time and % spent in gc statistics from @time and plotted them from across the whole run. This was run on a shared cluster so the spikes in time are

[julia-users] Holt-Winters D-E Smoothing in Julia

2015-04-07 Thread Philip Tellis
Does anyone know if there's a Holt-Winters Double-Exponential Smoothing module for Julia? It's available in R: http://astrostatistics.psu.edu/su07/R/html/stats/html/HoltWinters.html

Re: [julia-users] Re: mapping to colums of a matrix

2015-04-07 Thread Milan Bouchet-Valat
Le mardi 07 avril 2015 à 10:56 -0700, David Gold a écrit : Comprehensions may be what you are looking for: http://docs.julialang.org/en/latest/manual/arrays/#comprehensions. For your example, julia v = [1, 2, 3, 4] # Set the vector v 4-element Array{Int64,1}: 1 2 3 4 julia A =

Re: [julia-users] Usage of floating point template arguments with many different values

2015-04-07 Thread Sheehan Olver
The current problem is f=Fun(x-x^2,Chebyshev(Interval(a,b))) represents a function on [a,b] as type Fun{Float64,Chebyshev}. But sometimes one needs to convert numbers to functions a la convert(typeof(f),5) e.g., as part of creating the vector [f,5]. Since the

[julia-users] PBKDF2

2015-04-07 Thread Adde Nilsson
Hi all, Couldn't find any decent password hashing algorithms so I decided to port a Python implementation of PBKDF2 as an exercise. Any ideas on how to improve the code are most welcome; me and Julia are still getting to know each other...

[julia-users] Re: run() yields in @async, why?

2015-04-07 Thread elextr
run() blocks *its task* until the separate process it invokes completes. If there are other tasks which can proceed it will yield to them as you have shown below. But if you just do run() in the REPL its the same task as the command line, so it blocks the command line. Note that running a

[julia-users] Re: Default behavior from omitted catch block when a finally block is added.

2015-04-07 Thread elextr
On Wednesday, April 8, 2015 at 6:10:07 AM UTC+10, Toivo Henningsson wrote: I agree, seems only consistent that try without a catch should catch nothing. There are four combinations of the current syntax 1. try end 2. try catch end 3. try finally end 4. try catch finally end but there are

[julia-users] REPL: show( io::IO, x::Array{my_object,1} ) = ... overwrite

2015-04-07 Thread steven Varga
When overwriting Base.show for an Array of custom_type REPL eval() uses the old version of Base.show with only partial delegation/dispatch; which is cumbersome when working with large arrays of records in REPL. Is this the expected behaviour, and there is a different approach to use REPL +

Re: [julia-users] Re: Default behavior from omitted catch block when a finally block is added.

2015-04-07 Thread Toivo Henningsson
I think you are right that this is deliberate, but I also think that making catch and finally orthogonal to each other should trump such case by case optimizations. It would allow a simpler mental model of the language. If you want the current behavior of try end you can use try catch end and