[julia-users] WINSTON ERROR: StepRange not defined

2014-09-16 Thread paul analyst
Sorry , I must use this version of Julia ;) but Winston not work. If Winston does not work what other simple package to charts you recommend? Version 0.3.0-prerelease+1400 (2014-02-05 19:14 UTC) Commit 6f3a4b6* (222 days old master) x86_64-w64-mingw32 julia Pkg.add(Winston) INFO: Nothing

[julia-users] Re: WINSTON ERROR: StepRange not defined

2014-09-16 Thread Ivar Nesje
Are you really sure that you need to use a old development version of Julia. If you do, you must learn to use using Pkg.pin(Winston, v0.11.X) http://docs.julialang.org/en/release-0.3/stdlib/pkg/#Base.Pkg.pin, to use older versions of packages See METADATA.jl/.../Winston/versions

Re: [julia-users] slow julia version of c code

2014-09-16 Thread Gunnar Farnebäck
This function helped me find a couple of type problems in a somewhat complex code base. The idea is to first run your code, then use this function to dig up the type signatures that were actually called and identify type problematic variables from code_typed. I strongly suspect that the

Re: [julia-users] Why are abstract type constructors disallowed?

2014-09-16 Thread Stefan Karpinski
There are a limited number of things that can be called like a function. Abstract types aren't one of them. It requires a lot of work to change that and it affects just about everything. But we are headed in that direction. On Sep 16, 2014, at 7:11 AM, Sheehan Olver dlfivefi...@gmail.com

[julia-users] Re: WINSTON ERROR: StepRange not defined

2014-09-16 Thread cormullion
Even if you use the release version of 0.3, it still might not work. For example: julia using Winston ERROR: could not open file /Users/me/.julia/v0.3/Tk/src/../deps/deps.jl in include at /Applications/Julia-0.3.0.app/Contents/Resources/julia/lib/julia/sys.dylib in include_from_node1 at

Re: [julia-users] Why are abstract type constructors disallowed?

2014-09-16 Thread Sheehan Olver
OK, that’s reasonable, I look forward to it being one. On 16 Sep 2014, at 5:14 pm, Stefan Karpinski stefan.karpin...@gmail.com wrote: There are a limited number of things that can be called like a function. Abstract types aren't one of them. It requires a lot of work to change that

[julia-users] Re: Send variable to parallel workers for pmap

2014-09-16 Thread xiongjieyi
I see. Thank you! It's a pity that there is no explict way to just send a variable to other process before starting the task, as what @parallel did. Sometimes I need to read a large file and then do the calculation parallelly, like the Monte Carlo method. Using pmap is the most explicit way,

Re: [julia-users] Re: WINSTON ERROR: StepRange not defined

2014-09-16 Thread Paul Analyst
good idea :( Paul W dniu 2014-09-16 o 10:32, cormull...@mac.com pisze: Even if you use the release version of 0.3, it still might not work. For example: julia using Winston ERROR: could not open file /Users/me/.julia/v0.3/Tk/src/../deps/deps.jl in include at

[julia-users] Re: Module Includes Problem

2014-09-16 Thread RecentConvert
My .juliarc.jl file has three sections: the first adds any paths to LOAD_PATH, the second loads common modules including the Aerodyne one I am having issues with, and the final one is a list of requires of common functions I use including dirlist.jl. Aerodyne does call it earlier as a require

Re: [julia-users] Random numbers and the Poisson distribution

2014-09-16 Thread nbbb
In addition, every person who ever wrote code in the future that worked with Poisson objects would need to know that our definition of the Poisson distribution contradicted the definition found in textbooks. but does it really? the pmf should be P(n) = lambda^n/n! exp[-lambda] .

Re: [julia-users] Random numbers and the Poisson distribution

2014-09-16 Thread spaceLem
I suppose it comes from one's perspective -- from a modeller's point of view, a zero rate is certainly not a special case! The error was surprising, which made me baulk at handling it. From a purity argument, I agree with you -- Poisson(0) is not defined, however from a usefulness argument,

Re: [julia-users] Random numbers and the Poisson distribution

2014-09-16 Thread Simon Byrne
As this situation arises in other cases, I've opened an issue here: https://github.com/JuliaStats/Distributions.jl/issues/283 The skewness shouldn't be Inf as it arises as 0/0. We could return a NaN though. On Tuesday, 16 September 2014 12:30:20 UTC+1, spaceLem wrote: I suppose it comes from

[julia-users] Re: Unloading modules

2014-09-16 Thread Patrick O'Leary
Alternative: you can remove everything and create a new toplevel context with the workspace() function, starting in v0.3, but the module is not technically unloaded. The old context is available from the LastMain module. http://julia.readthedocs.org/en/latest/stdlib/base/#Base.workspace On

Re: [julia-users] Random numbers and the Poisson distribution

2014-09-16 Thread Alan Edelman
Would be good to sort out the implications, but I'm hoping that atomic measures are not as problematic as JMW fears. On Tuesday, September 16, 2014 8:14:58 AM UTC-4, Simon Byrne wrote: As this situation arises in other cases, I've opened an issue here:

Re: [julia-users] Re: Module Includes Problem

2014-09-16 Thread Leah Hanson
1) Have you tried changing the `require(dirlist.jl)` inside module Aerodyne to `include(dirlist.jl)`? If so, what happened? 2) If that didn't work, does dirlist.jl define any modules? -- Leah On Tue, Sep 16, 2014 at 4:46 AM, RecentConvert giz...@gmail.com wrote: My .juliarc.jl file has three

[julia-users] Re: Send variable to parallel workers for pmap

2014-09-16 Thread Thomas Covert
One thing Bradley Setzler suggested on this forum a few weeks back was to put A = rand() in a separate file, require() that file, and then proceed. I use that setup frequently. On Monday, September 15, 2014 4:52:33 AM UTC-5, xiong...@gmail.com wrote: I want to transfer a variable to all

Re: [julia-users] Re: Module Includes Problem

2014-09-16 Thread RecentConvert
include(O:\\Code\\Julia\\dirlist.jl) does ineed work dirlist.jl does not call or define any modules

Re: [julia-users] Re: Module Includes Problem

2014-09-16 Thread Leah Hanson
Great! I'm glad it works. :) As Ivar said, you should keep in mind the difference between `require` and `include`. Defaulting to using `include` inside module definitions should avoid this kind of problem in the future. On Mon, Sep 15, 2014 at 3:35 PM, Ivar Nesje iva...@gmail.com wrote: If

Re: [julia-users] Article on `@simd`

2014-09-16 Thread Arch Robison
I concur that simultaneity is the key issue, not atomicity. I've revised the sentence, and exchanged some concerns for pertains to. Thanks. - Arch On Mon, Sep 15, 2014 at 11:16 PM, Stefan Karpinski stefan.karpin...@gmail.com wrote: Excellent article. When you describe how sets of vector

Re: [julia-users] slow julia version of c code

2014-09-16 Thread Zac
Great! It seems it was the lack of array dimensions on the type specification that was causing the slowdown. W/ a bit of further fiddling I've gotten it down to 2x C speed and now just have to work out a way to parallelise it effectively

Re: [julia-users] Article on `@simd`

2014-09-16 Thread Jacob Quinn
Arch, I've been having too much fun diving into using @simd this morning. One thing I've noticed is that some @simd loops have the code_llvm output a little differently. For example, the following code: n, m = size(data) # sparse matrix @inbounds for col = 1:m clust =

Re: [julia-users] slow julia version of c code

2014-09-16 Thread Tony Fong
Thanks to this discussion, I have added some performance related lint messages related to type declaration. It would catch dimension-less array field type going forward. On Tuesday, September 16, 2014 10:10:51 PM UTC+7, Zac wrote: Great! It seems it was the lack of array dimensions on the

Re: [julia-users] slow julia version of c code

2014-09-16 Thread John Myles White
You are a genuine Julia community hero, Tony. -- John On Sep 16, 2014, at 9:17 AM, Tony Fong tony.hf.f...@gmail.com wrote: Thanks to this discussion, I have added some performance related lint messages related to type declaration. It would catch dimension-less array field type going

Re: [julia-users] slow julia version of c code

2014-09-16 Thread Zac
Aye!

Re: [julia-users] Article on `@simd`

2014-09-16 Thread Arch Robison
The llvm.mem.parallel_loop_access is an annotation on loads and stores that indicate they do not depend on other iterations. @simd causes them to be sprinkled throughout the loop when the LLVM IR is generated. The lack of load *n* x float indicates that the LLVM vectorizer gave up. I'm not sure

Re: [julia-users] Article on `@simd`

2014-09-16 Thread Jacob Quinn
Oops, the code I shared had a bug in it, it should be: N, M = size(data) @inbounds for m = 1:M clust = assignments[m] @simd for n = data.colptr[m]:(data.colptr[m+1]-1) centroids[data.rowval[n],clust] += data.nzval[n] end centroid_counts[clust] += 1.0 end where the row

Re: [julia-users] Article on `@simd`

2014-09-16 Thread Arch Robison
Yes, the indirect store (a scatter in vectorizer parlance) will stop the current vectorizer. AVX-512 has the requisite scatter instruction, so when AVX-512 becomes available and LLVM is updated to use it, we should revisit this example. In the other example, the reduction into cent_sumsq[k]

[julia-users] How does Julia decide where to truncate displayed values in the REPL?

2014-09-16 Thread gael . mcdon
Hi, I was experimenting with @simd and was a bit surprised about some results on different implementations of a plain summing function: julia f(a) 399921.25f0 julia g(a) 399916.2f0 julia sum(a) 399922.25f0 julia sum_kbn(a) 399920.66f0 julia @printf(%.6f,g(a)) 399916.187500 I don't

[julia-users] Re: Send variable to parallel workers for pmap

2014-09-16 Thread Alex
I've been trying to modify bradley's code to do something much like that, but I keep running into an error. I can get it to work on one core, but I am having trouble getting pmap to work using Bradley's example. Basically rather than parallelizing a single process that requires the same data

Re: [julia-users] Where to place .juliarc.jl on Windows?

2014-09-16 Thread Ben Arthur
if you have a domain account and echo %HOMEDRIVE%%HOMEPATH% on the windows command prompt is not to your liking then your sysadmin will have to change it as described here: http://technet.microsoft.com/en-us/library/cc783578(v=ws.10).aspx

Re: [julia-users] Where to place .juliarc.jl on Windows?

2014-09-16 Thread Peter Simon
The last time I tried, I could set up a HOME environment variable to point to whatever directory I wished, and it was honored by Julia. This does not require administrator privileges. --Peter On Tuesday, September 16, 2014 1:24:02 PM UTC-7, Ben Arthur wrote: if you have a domain account and

[julia-users] How does Julia decide where to truncate displayed values in the REPL?

2014-09-16 Thread Ivar Nesje
Julia uses the Grisu algorithm to get the shortest representation of a floating point number such that it can be parsed back to the same binary representation. That way 1.00 is printed as 1.0 and 1/3 is printed with just enough 3 digits after the point such that 1/3 == 0.3...

[julia-users] Example of how to write line by line to a CSV file in Julia?

2014-09-16 Thread yaoismyhero
Hi Guys, I'm struggling to find some examples regarding how to write line by line to a CSV file. Scouring the documentation, I have been able to come across this so far: http://julia-cn.readthedocs.org/en/latest/stdlib/base/?highlight=writecsv So I currently have a function that is part of a

Re: [julia-users] Example of how to write line by line to a CSV file in Julia?

2014-09-16 Thread Leah Hanson
Is this what you're looking for? ~~~ julia csvfile = open(ysavetuple.csv,w) IOStream(file ysavetuple.csv) julia write(csvfile,ColName A, ColName B, ColName C\n) 32 julia foo(i) = tuple(rand(Int,3)...) foo (generic function with 1 method) julia for i = 1:20 y1,y2,y3 = foo(i)

Re: [julia-users] Example of how to write line by line to a CSV file in Julia?

2014-09-16 Thread yaoismyhero
Leah, thank you for saving the day again. Regards, Wally On Tuesday, September 16, 2014 5:06:25 PM UTC-4, Leah Hanson wrote: Is this what you're looking for? ~~~ julia csvfile = open(ysavetuple.csv,w) IOStream(file ysavetuple.csv) julia write(csvfile,ColName A, ColName B, ColName C\n)

[julia-users] Re: Send variable to parallel workers for pmap

2014-09-16 Thread Gray Calhoun
Hi Alex, in your example, I think you'd need to define `error` in `needed_all_over.jl` and also call `require` after `addprocs(1)`. On Tuesday, September 16, 2014 3:16:11 PM UTC-5, Alex wrote: I've been trying to modify bradley's code to do something much like that, but I keep running into

[julia-users] Re: Send variable to parallel workers for pmap

2014-09-16 Thread Alex
Hi Gray, That was certainly a problem! Moving the require was important to the fix, but the main problem that I just found was that I was using a bracket, where I should have been using a parentheses. Please find the corrected code below and I hope this may help others who are trying to

[julia-users] Re: Send variable to parallel workers for pmap

2014-09-16 Thread Gray Calhoun
Hi Alex, I'm glad it works. You might also want to try using Tasks with pmap. There's some sample code and discussion in this thread: https://groups.google.com/d/msg/julia-users/AydkFR7mJqo/_bu4S2W-x90J and tasks are discussed in the manual here:

Re: [julia-users] Re: Control system library for Julia?

2014-09-16 Thread James Crist
I think Jim Crist spent the summer doing a Python GSoC, so progress on control packages for Julia has been mostly stalled. Ha, yeah, was working on symbolic dynamics solver stuff - more applicable to my research. I have some unpushed commits for Control.jl, but for the most part this

[julia-users] Profile.print() dies

2014-09-16 Thread G. Patrick Mauroy
I have a Julia code file containing the definition of a function I want to profile, setting up test data, and running a function call (actually 2 calls, one to compile the function, and one to actually measure its performance, and optionally a third call to profile it). So my Julia test code

[julia-users] Profile.print() dies

2014-09-16 Thread Daniel Høegh
This is a known issue on windows it is fixed on the master and is coming as in 0.3.1. See issue https://github.com/JuliaLang/julia/issues/8350

[julia-users] Re: Why cannot I see imread?

2014-09-16 Thread Tanan Kesornbua
I have the same problem... julia img = imread(cameraman.tif) ERROR: imread not defined Have anyone figure out why is it an error yet? Please help. On Friday, December 6, 2013 2:28:14 PM UTC-8, Vijay Ramachandran wrote: *julia using Imagesjulia imwriteimwrite (generic function with 5

[julia-users] Re: Profile.print() dies

2014-09-16 Thread G. Patrick Mauroy
Thanks Daniel. I will then next run it on Linux... On Wednesday, September 17, 2014 1:09:03 AM UTC-4, Daniel Høegh wrote: This is a known issue on windows it is fixed on the master and is coming as in 0.3.1. See issue https://github.com/JuliaLang/julia/issues/8350

Re: [julia-users] Profile.print() dies

2014-09-16 Thread Jameson Nash
Backtraces are currently non-functional in Julia 0.3 for windows -- that will be fixed whenever 0.3.1 binaries are created. While `@profile` introduces no overhead to the code, it needs to make a few calls to the kernel and a bit of work to look up functions. On linux, this appears to be