Re: [julia-users] Re: vector assignment performance

2016-05-19 Thread Tim Holy
If you have a lot of small arrays, you might consider FixedSizeArrays, which may address some of these points. Best, --Tim On Thursday, May 19, 2016 07:20:22 PM vava...@uwaterloo.ca wrote: > Dear Yichao, > > Thanks very much for the prompt response. This question arises regarding a > code for

[julia-users] parallel computing in julia

2016-05-19 Thread SHORE SHEN
Hi Im doing a loop and need parallel computing. from the doc, it is said to "julia -p n" command to start n processor in local mashine however here's the result: julia> julia -p 2 ERROR: syntax: extra token "2" after end of expression also I tried addprocs(n), my computer is 4 core 8

[julia-users] Re: vector assignment performance

2016-05-19 Thread Steven G. Johnson
On Thursday, May 19, 2016 at 10:20:22 PM UTC-4, vav...@uwaterloo.ca wrote: > > Dear Yichao, > > Thanks very much for the prompt response. This question arises regarding > a code for finite element stiffness matrix assembly. This computation > involves an outer loop over elements (possibly

[julia-users] Re: vector assignment performance

2016-05-19 Thread vavasis
Dear Yichao, Thanks very much for the prompt response. This question arises regarding a code for finite element stiffness matrix assembly. This computation involves an outer loop over elements (possibly millions of them). Inside this loop is a sequence of operations on 'small' vectors and

Re: [julia-users] Re: Coefficient of determination/R2/r-squared of model and accuracy of R2 estimate

2016-05-19 Thread Kevin Liu
Thanks. I might need some help if I encounter problems on this pseudo version. On Thursday, May 19, 2016 at 1:54:37 PM UTC-3, Milan Bouchet-Valat wrote: > > Le jeudi 19 mai 2016 à 09:30 -0700, Kevin Liu a écrit : > > It seems the pkg owners are still deciding > > > > Funcs to evaluate fit

Re: [julia-users] vector assignment performance

2016-05-19 Thread Yichao Yu
On Thu, May 19, 2016 at 9:47 PM, wrote: > The two functions test4 and test5 below are equivalent, but test5 is much > faster than test4. Apparently test4 is carrying out a heap allocation on > each iteration of the j-loop. Why? In general, which kinds of assignment >

[julia-users] vector assignment performance

2016-05-19 Thread vavasis
The two functions test4 and test5 below are equivalent, but test5 is much faster than test4. Apparently test4 is carrying out a heap allocation on each iteration of the j-loop. Why? In general, which kinds of assignment statements of the form = create temporaries, and which don't? (In the

Re: [julia-users] Re: Ubuntu bug? Executing .jl files via shebang does nothing on Ubuntu 16.04 x64

2016-05-19 Thread Jonathan Goldfarb
Yes [1] I've been bitten by this before as well; it's unfortunate. Is there perhaps some way to change some command line arguments after starting Julia? [1] http://unix.stackexchange.com/questions/14887/the-way-to-use-usr-bin-env-sed-f-in-shebang/14892#14892 On Thursday, May 19, 2016 at

Re: [julia-users] Re: Async file IO?

2016-05-19 Thread Andrei Zh
> > > To clarify: operations on the `IOStream` type use the "ios" library. > Operations on `LibuvStream` (and its subtypes) use Libuv. > Huh, didn't know that. Sorry for confusion in previous answer and thanks for valuable comment. > On Thu, May 19, 2016 at 6:36 PM, Isaiah Norton

Re: [julia-users] Re: Async file IO?

2016-05-19 Thread Isaiah Norton
> > Julia IO is mostly built on libuv, but file IO uses the internal ios > library that is part of flisp. (I guess file IO is kind of important so replace "mostly" with "partly"...) To clarify: operations on the `IOStream` type use the "ios" library. Operations on `LibuvStream` (and its

Re: [julia-users] Re: Async file IO?

2016-05-19 Thread Isaiah Norton
> > I don't think this happens for normal file IO. Right, good point. The stuff in the thread linked by Andrei applies to Libuv streams only. I think that Julia IO is built on libuv > Julia IO is mostly built on libuv, but file IO uses the internal ios library that is part of flisp. On Thu,

[julia-users] Re: moving data to workers for distributed workloads

2016-05-19 Thread 'Greg Plowman' via julia-users
> > > It looks like that SO answer is moving data into the global scope of each > worker. It is probably worth experimenting with but I'd be worried about > performance implications of non-const global variables. It's probably the > case that this is still a win for my use case though. Thanks

Re: [julia-users] Re: Async file IO?

2016-05-19 Thread Yichao Yu
On Thu, May 19, 2016 at 5:24 PM, Andrei Zh wrote: > Based on answers to my own question, I believe it's safe to assume that > `read()` on file will switch to another task during IO operation. I don't think this happens for normal file IO. > > > > On Tuesday, May 17,

[julia-users] Re: Async file IO?

2016-05-19 Thread Andrei Zh
Based on answers to my own question , I believe it's safe to assume that `read()` on file will switch to another task during IO operation. On Tuesday, May 17, 2016 at 2:03:21 AM UTC+3, g wrote: > > Hello All, > > I think

[julia-users] Re: moving data to workers for distributed workloads

2016-05-19 Thread Matthew Pearce
Michael That's right. With `sow` the mod.eval of the third argument gets bound to the second; where mod defaults to Main. Maybe someone could think of a cleaner way to make values available for later work, but it seems to do the trick. It seems best to avoid using the `sow` function heavily.

Re: [julia-users] Re: [ANN & RFC] Measurements.jl: Uncertainty propagation library

2016-05-19 Thread Mosè Giordano
Hi Andre, 2016-05-19 9:05 GMT+02:00 Andre Bieler: > As an experimental physicist I thank you very much for this package! :D You're welcome :-) If you have wishes or suggestions, please share them! Bye, Mosè

[julia-users] Re: Using LOAD_PATH from the command line

2016-05-19 Thread Tony Kelman
What exactly is in myfile.jl? Yes, when you call the julia command-line program on a script file it has to be able to read that script file, so either it's a relative path to where it's run from, or an absolute path. If you want to leverage LOAD_PATH to import modules, then try importing from a

[julia-users] Re: moving data to workers for distributed workloads

2016-05-19 Thread Michael Eastwood
Hi Fabian, It looks like that SO answer is moving data into the global scope of each worker. It is probably worth experimenting with but I'd be worried about performance implications of non-const global variables. It's probably the case that this is still a win for my use case though. Thanks

[julia-users] Re: moving data to workers for distributed workloads

2016-05-19 Thread Michael Eastwood
Hi Matthew, ClusterUtils.jl looks very useful. I will definitely try it out. Am I correct in reading that the trick to moving input to the workers is here ? You're also

Re: [julia-users] Re: Ubuntu bug? Executing .jl files via shebang does nothing on Ubuntu 16.04 x64

2016-05-19 Thread Yichao Yu
On May 19, 2016 1:54 PM, "Adrian Salceanu" wrote: > > OK, I figured out what causes the problem. > > It seems that on linux it does not like the --color=yes > > Removed that and it works as expected. Cmdline parseing for shebang is wierd. I believe linux only split at

Re: [julia-users] beginner with Julia graphs

2016-05-19 Thread Andrea Vigliotti
yes it works now! many thanks!! andrea On Thursday, May 19, 2016 at 8:08:31 PM UTC+2, Miguel Bazdresch wrote: > > You seem to be missing graphviz: http://www.graphviz.org/ > > -- mb > > On Thu, May 19, 2016 at 12:21 PM, Andrea Vigliotti > wrote: > >> Hi all! >> >> I'm

Re: [julia-users] beginner with Julia graphs

2016-05-19 Thread Miguel Bazdresch
You seem to be missing graphviz: http://www.graphviz.org/ -- mb On Thu, May 19, 2016 at 12:21 PM, Andrea Vigliotti < andrea.viglio...@gmail.com> wrote: > Hi all! > > I'm trying to run this example (taken from here : > https://github.com/JuliaLang/Graphs.jl/blob/master/doc/source/examples.rst >

[julia-users] Re: Ubuntu bug? Executing .jl files via shebang does nothing on Ubuntu 16.04 x64

2016-05-19 Thread Adrian Salceanu
OK, I figured out what causes the problem. It seems that on linux it does not like the --color=yes Removed that and it works as expected. Cheers! joi, 19 mai 2016, 19:48:04 UTC+2, Adrian Salceanu a scris: > > Hi, > > There seems to be a problem with executing .jl scripts on Ubuntu 16.04

[julia-users] Re: Using LOAD_PATH from the command line

2016-05-19 Thread David Parks
One minor correction, it's not looking to my home directory, it's looking to my current directory for the script file. The point remains, it does not use LOAD_PATH to find the script file I want to run. So to run a script I need to specify the full path to the julia script file on the command

Re: [julia-users] Ubuntu bug? Executing .jl files via shebang does nothing on Ubuntu 16.04 x64

2016-05-19 Thread Isaiah Norton
What is `versioninfo()` for both cases? If your versions are different, this might be a bug that has been fixed... On Thu, May 19, 2016 at 1:48 PM, Adrian Salceanu wrote: > Hi, > > There seems to be a problem with executing .jl scripts on Ubuntu 16.04 x64 > > Take

[julia-users] Ubuntu bug? Executing .jl files via shebang does nothing on Ubuntu 16.04 x64

2016-05-19 Thread Adrian Salceanu
Hi, There seems to be a problem with executing .jl scripts on Ubuntu 16.04 x64 Take this simple program in exec_text.jl #!/usr/bin/env julia --color=yes println("all good!") On Mac OS: $ ./exec_test.jl all good! On Ubuntu it just hangs $ ./exec_test.jl [=> never returns, does nothing]

Re: [julia-users] Re: static compilation

2016-05-19 Thread Isaiah Norton
It looks like there might be a parser ambiguity when the arguments are given as a tuple (the whole thing is parsed as keyword argument to the macro call). Either of the following will work right now: @Base.ccallable Int64 foo(x::Int64) = x+1 @Base.ccallable(Int64, function foo(x::Int64)

Re: [julia-users] Using @spawnat to define var on particular process

2016-05-19 Thread Isaiah Norton
On Mon, May 16, 2016 at 7:48 PM, Alex Williams wrote: The basic question is why this doesn't define `x` on worker #2: > > *@spawnat 2 x=1* > Because it is wrapped in a closure; so `x` is local to the closure when the code is executed on the other process. To see the

Re: [julia-users] Re: Coefficient of determination/R2/r-squared of model and accuracy of R2 estimate

2016-05-19 Thread Milan Bouchet-Valat
Le jeudi 19 mai 2016 à 09:30 -0700, Kevin Liu a écrit : > It seems the pkg owners are still deciding > > Funcs to evaluate fit                                                 >        https://github.com/JuliaStats/GLM.jl/issues/74 > Add fit statistics functions and document existing ones  

[julia-users] Re: Using LOAD_PATH from the command line

2016-05-19 Thread David Parks
Thanks, that helps, I didn't know about that. It does feel counter intuitive that loading juliarc isn't the default, but maybe there's some hidden logic I don't see. Though, trying this, I do run into further issues that I'd like to post about. D:\mydir>julia --startup-file=yes -- myfile.jl

[julia-users] Re: Coefficient of determination/R2/r-squared of model and accuracy of R2 estimate

2016-05-19 Thread Kevin Liu
It seems the pkg owners are still deciding Funcs to evaluate fit https://github.com/JuliaStats/GLM.jl/issues/74 Add fit statistics functions and document existing ones https://github.com/JuliaStats/StatsBase.jl/pull/146 Implement fit

[julia-users] beginner with Julia graphs

2016-05-19 Thread Andrea Vigliotti
Hi all! I'm trying to run this example (taken from here : https://github.com/JuliaLang/Graphs.jl/blob/master/doc/source/examples.rst) using Graphs g = simple_graph(3) add_edge!(g, 1, 2) add_edge!(g, 3, 2) add_edge!(g, 3, 1) plot(g) but I get this error ERROR: could not spawn `neato -Tx11`:

[julia-users] Coefficient of determination/R2/r-squared of model and accuracy of R2 estimate

2016-05-19 Thread Kevin Liu
I looked in GLM.jl but couldn't find a function for calculating the R2 or the accuracy of the R2 estimate. My understanding is that both should appear with the glm() function. Help would be appreciated. Kevin

Re: [julia-users] Re: static compilation

2016-05-19 Thread Ján Adamčák
Thanks @Jameson The problem with @ccallable is, I get following error(Version 0.5.0-dev+4124 (2016-05-16 22:35 UTC)): julia> @Base.ccallable (Int64, foo(x::Int64) = x+1) ERROR: expected method definition in @ccallable in eval(::Module, ::Any) at .\boot.jl:226 Thanks Dňa streda, 18. mája 2016

[julia-users] Re: moving data to workers for distributed workloads

2016-05-19 Thread Matthew Pearce
Also... The above doesn't respect ordering of the `myidx` variable. Not sure how your problem domain operates, so it could get more complicated if things like order of execution matter. ;)

[julia-users] Re: moving data to workers for distributed workloads

2016-05-19 Thread Matthew Pearce
Hi Michael Your current code looks like will pull back the `coefficients` across the network (500 gb transfer) and as you point out transfer `input` each time. I wrote a package ClusterUtils.jl to handle my own problems (MCMC sampling) which were

Re: [julia-users] Re: Macro to generate equivalent types

2016-05-19 Thread Tom Breloff
This is very close to what I need. Thanks! On Thu, May 19, 2016 at 10:00 AM, Kristoffer Carlsson wrote: > Sounds like: > https://github.com/JuliaLang/DataStructures.jl/blob/master/src/delegate.jl > > In action: >

[julia-users] Re: Macro to generate equivalent types

2016-05-19 Thread Kristoffer Carlsson
Sounds like: https://github.com/JuliaLang/DataStructures.jl/blob/master/src/delegate.jl In action: https://github.com/JuliaLang/DataStructures.jl/blob/f67dc0b144d1fcc83eb48a7beddca746d4841f9e/src/default_dict.jl#L52 On Thursday, May 19, 2016 at 3:53:35 PM UTC+2, Tom Breloff wrote: > > I have

[julia-users] Macro to generate equivalent types

2016-05-19 Thread Tom Breloff
I have a pattern that I frequently use, and I'm considering writing a macro to automate it, but figured I'd check if it exists already. I frequently want to have the equivalent of an existing type functionally, but I want to be able to either dispatch on it or include additional fields for

[julia-users] Re: Change input key bindings

2016-05-19 Thread yousef . k . alhammad
Greetings all, So, after much reading through Julia base, I believe I've figured out how to directly read keyboard inputs from the terminal. First, here is the code: ### function main() raw_mode() println("Just type away and see your characters print, line by line.") println("Press escape

[julia-users] Re: moving data to workers for distributed workloads

2016-05-19 Thread Fabian Gans
Hi Michael, I recently had a similar problem and this SO thread helped me a lot: http://stackoverflow.com/questions/27677399/julia-how-to-copy-data-to-another-processor-in-julia As a side question: Which code are you using to calculate spherical harmonics transforms. I was looking for a julia

[julia-users] Re: [ANN & RFC] Measurements.jl: Uncertainty propagation library

2016-05-19 Thread Andre Bieler
As an experimental physicist I thank you very much for this package! :D On Tuesday, May 17, 2016 at 11:21:27 PM UTC+2, Mosè Giordano wrote: > > Hi Lucas, > > Looks great! >> >> How about overloading the ± operator? >> using Measurements >> >> ±(μ, σ) = Measurement(μ, σ) >> # => ± (generic

[julia-users] Re: http://quant-econ.net/jl/linear_algebra.html

2016-05-19 Thread Henri Girard
Great job :) Your add makes it great that's the only one I found on the net with ijulia Thanks your for your quick response :) Henri Le mercredi 18 mai 2016 11:04:11 UTC+2, Henri Girard a écrit : > > http://quant-econ.net/jl/linear_algebra.html > > It says :If you’re interested, the Julia code