Re: [julia-users] Creating a bitmapped image with color bar

2015-08-16 Thread Andreas Lobinger
two additional notes: I get the missing map information when trying to imwrite png julia imwrite(img,a22.png) ERROR: MethodError: `mapinfo` has no method matching mapinfo(::Type{Images. ImageMagick}, ::Images.ImageCmap{Color.RGB{T:Union{AbstractFloat,

[julia-users] Re: JuliaCon 2015 videos

2015-08-16 Thread Eric Forgy
This is awesome. Thanks for all the effort putting this together.

[julia-users] Re: ANN: tuplegen macro for fixed-length arrays

2015-08-16 Thread Jeffrey Sarnoff
I see you caplitalized the name already. In your README, consider including the information you give here: .. but this latter code would create a heap-allocated array as a temporary variable and hence would presumably be less efficient. For me, that's the marketing message. On Sunday, August

[julia-users] Announcing UnicodePlots.jl

2015-08-16 Thread Christof Stocker
Hello everyone! If you are like me and work a lot from the command line, but you would still like to visualise your data somehow, then maybe UnicodePlots.jl https://github.com/Evizero/UnicodePlots.jl could be of use to you. It supports colors and also offers a low-level API to the canvas itself

[julia-users] How quickly compute the density of the vector in the selected range?

2015-08-16 Thread paul analyst
Hi, How quickly computethe density of the vector in the selected range? I have vec=[0 0 0 1 0 1 0 1 1 0] I am lookking for function computing density of this vector on selelcted range i.e. 5 elements : foo(vec,5) result: [0.2 0.2 0.2 0.2 0.2 0.6 0.6 0.6 0.6 0.6] mean first 5 elements is 0.2

[julia-users] Re: ANN: JuliaGPU mailing list

2015-08-16 Thread Uwe Fechner
Hello, is there a reason, why only group members can read this group? The usual policy is, that everybody can read and only group members can post. Regards: Uwe Am Samstag, 15. August 2015 23:46:25 UTC+2 schrieb Pontus Stenetorp: Everyone, I have gradually been pushed towards GPU computing

[julia-users] Type instability?

2015-08-16 Thread Sisyphuss
In the Rational.jl https://github.com/JuliaLang/julia/blob/master/base/rational.jl : In Line 8: `num == den == zero(T)` uses `zero(T)` to represent 0 In Line 9: `g = den 0` uses `0` to represent 0 Why this difference? My intuition tells me that in Line 8, it can be replaced by 0 without

Re: [julia-users] Type instability?

2015-08-16 Thread Tim Holy
There shouldn't be any penalty: julia foo(x) = x == 0 foo (generic function with 1 method) julia foo2(x) = x == zero(x) foo2 (generic function with 1 method) julia @code_llvm foo(3.2) define i1 @julia_foo_21071(double) { top: %1 = fcmp oeq double %0, 0.00e+00 ret i1 %1 } julia

Re: [julia-users] Re: installing clang.jl

2015-08-16 Thread Jameson Nash
You need to download and install msysGit, and make sure it ends up on your path ahead of cygwin git when running any windows programs (including Julia), but does not end up on your path when running cygwin. On Sun, Aug 16, 2015 at 8:46 AM Marcio Sales marciole...@hotmail.com wrote: I tried to

[julia-users] Re: Overloading . by specializing getfield() / setfield!()?

2015-08-16 Thread tim . lebel
I ran into this as well. I assumed it would be the same as overriding getindex and setindex!, and was surprised by the different behavior. On Saturday, August 15, 2015 at 11:05:31 PM UTC-4, Dominique Orban wrote: Excellent, thanks. I searched through issues but didn't hit that one. On

Re: [julia-users] How quickly compute the density of the vector in the selected range?

2015-08-16 Thread Tim Holy
If you want a running density, look into c = cumsum(v) density = c[6:end] - c[1:end-5] If you want in blocks, reshape to a matrix and take the mean along dimension 1. --Tim On Sunday, August 16, 2015 09:08:23 AM paul analyst wrote: Hi, How quickly computethe density of the vector in the

[julia-users] Re: ANN: tuplegen macro for fixed-length arrays

2015-08-16 Thread Jeffrey Sarnoff
I have immediate use for this. Thanks. Please follow Tony's advice, so I can keep up to date with any modifications. On Saturday, August 15, 2015 at 8:13:57 PM UTC-4, vav...@uwaterloo.ca wrote: I wrote a short macro for Julia 0.4 to generate fixed-length tuples using comprehension-like

Re: [julia-users] Type instability?

2015-08-16 Thread Stefan Karpinski
One is being returned, the other isn't. You cannot change line 8 without causing the returned type to depend on the value. On Aug 16, 2015, at 10:10 AM, Sisyphuss zhengwend...@gmail.com wrote: In the Rational.jl : In Line 8: `num == den == zero(T)` uses `zero(T)` to represent 0 In Line

[julia-users] Re: Sparse matrix with elements that are fixed-size dense matrices

2015-08-16 Thread Kristoffer Carlsson
You can use them in PETSc for faster assembly IIRC. On Monday, August 17, 2015 at 1:55:51 AM UTC+2, Christoph Ortner wrote: data structures like that would be very natural, e.g., in FE codes and similar applications. But I would argue unless there are good solvers that exploits this

Re: [julia-users] from called function, getting name in caller used as arg

2015-08-16 Thread Yichao Yu
On Sun, Aug 16, 2015 at 4:51 PM, Jeffrey Sarnoff jeffrey.sarn...@gmail.com wrote: not throw -- raise On Sun, Aug 16, 2015 at 2:59 PM, Jeffrey Sarnoff jeffrey.sarn...@gmail.com wrote: Writing customized exception, I want to include the name of a var used as an argument in the caller of the

[julia-users] Re: Sparse matrix with elements that are fixed-size dense matrices

2015-08-16 Thread Christoph Ortner
data structures like that would be very natural, e.g., in FE codes and similar applications. But I would argue unless there are good solvers that exploits this structure, they are essentially useless. Do such solvers exist? (The only case I know of, off the top of my head, is the trivial case

Re: [julia-users] Re: Creating a show method for type alias

2015-08-16 Thread Ben Ward
I did debate doing this, but went with the typealias as, the way I understood it, CIGARString would be a variable containing a reference, to a vector or CIGARS. When in my mind, where a String is thought of as the array of chars, so it should be with CIGARString, it is the array of CIGARS. I

Re: [julia-users] How quickly compute the density of the vector in the selected range?

2015-08-16 Thread paul analyst
Nice way, thx. paull W dniu niedziela, 16 sierpnia 2015 18:25:02 UTC+2 użytkownik Tim Holy napisał: If you want a running density, look into c = cumsum(v) density = c[6:end] - c[1:end-5] If you want in blocks, reshape to a matrix and take the mean along dimension 1. --Tim On

[julia-users] Re: Wanted to share some spaceflight mechanics code I wrote: SGP4.jl and Interplanetary.jl

2015-08-16 Thread Jeffrey Sarnoff
I agree. There may be some help from one of the pkgs listed, in case you missed either (at least one needs updating to work v0.4, I don't know about v0.3) JuliaAstro https://github.com/JuliaAstro svaksha-Astronomy https://github.com/svaksha/Julia.jl/blob/master/Astronomy.md On Sunday, August

Re: [julia-users] Re: Sparse matrix with elements that are fixed-size dense matrices

2015-08-16 Thread Tim Holy
Note: julia sparse([1,2,3],[1,2,3],Matrix{Float64}[ones(2,2),zeros(2,2),eye(2,2)]) 3x3 sparse matrix with 3 Array{Float64,2} entries: [1, 1] = 2x2 Array{Float64,2}: 1.0 1.0 1.0 1.0 [2, 2] = 2x2 Array{Float64,2}: 0.0 0.0 0.0 0.0 [3, 3] = 2x2 Array{Float64,2}:

[julia-users] Re: Recommended Hardware Setup for Simulations such as magnetic fields, fluid simulations of fire dynamics

2015-08-16 Thread Tero Frondelius
We are starting https://github.com/JuliaFEM/JuliaFEM.jl currently no answers to your questions. Although at work we use significantly more computing resources for combustion simulations. I propose that you will look the commercial software hardware recommendations as a starting point. On

Re: [julia-users] from called function, getting name in caller used as arg

2015-08-16 Thread Jeffrey Sarnoff
not throw -- raise On Sun, Aug 16, 2015 at 2:59 PM, Jeffrey Sarnoff jeffrey.sarn...@gmail.com wrote: Writing customized exception, I want to include the name of a var used as an argument in the caller of the function generating the exception. I saw similiar access from a function once, and am

[julia-users] Return value discrepancy between `foo[i] = x` and `setindex!(foo, x, i)`

2015-08-16 Thread Kenta Sato
I thought that `foo[i] = x` is a syntax sugar of `setindex!(foo, x, i)` and hence the return values are identical in both cases. This is suggested in a section of the manual: http://julia.readthedocs.org/en/release-0.3/stdlib/collections/#indexable-collections . setindex!(*collection*,

Re: [julia-users] Return value discrepancy between `foo[i] = x` and `setindex!(foo, x, i)`

2015-08-16 Thread Stefan Karpinski
This is intentional. It's more like syntactic sugar for (setindex!(foo, x, i); x). The documentation should be updated. On Aug 16, 2015, at 4:52 PM, Kenta Sato bicycle1...@gmail.com wrote: I thought that `foo[i] = x` is a syntax sugar of `setindex!(foo, x, i)` and hence the return values

Re: [julia-users] Problem building 0.4 on OSX 10.8.5 - error in signal-handling.c

2015-08-16 Thread Adrian Cuthbertson
Thanks Jameson, in fact I decided to upgrade to Yosemite 10.10.5 and (finally) got a good build. For anyone else following the same path: after upgrading to Yosemite and doing a complete reinstall of Julia 0.4, I still had problems with lcrt1.10.6.o not found during the deps openblas build. After

[julia-users] from called function, getting name in caller used as arg

2015-08-16 Thread Jeffrey Sarnoff
Writing customized exception, I want to include the name of a var used as an argument in the caller of the function generating the exception. I saw similiar access from a function once, and am unable to re-locate that. thanks. function caller(potato::Int) called(potato) end function

Re: [julia-users] Re: Creating a show method for type alias

2015-08-16 Thread Stefan Karpinski
The whole premise of an alias is that it's a different name for the same thing. On Aug 14, 2015, at 8:16 PM, Jeffrey Sarnoff jeffrey.sarn...@gmail.com wrote: Ben, much as I would like there to be a second kind of typealias, typealiased -- that let us work with the renanamings wiithout

Re: [julia-users] JuliaCon 2015 videos

2015-08-16 Thread Viral Shah
A few more: 1. Blake Johnson: Quickly building simulations of quantum systems: http://youtu.be/kogTKuytg1g?a 2. Katharine Hyatt: Quantum Statistical Simulations with Julia: http://youtu.be/QThApV3HIxc?a 3. Making GUIs with Escher jl: http://youtu.be/Sq7DEnV4dfI?a 4. John Myles White: What

Re: [julia-users] Re: ANN: JuliaGPU mailing list

2015-08-16 Thread Pontus Stenetorp
On 16 August 2015 at 17:55, Uwe Fechner uwe.fechner@gmail.com wrote: is there a reason, why only group members can read this group? The usual policy is, that everybody can read and only group members can post. No, I simply messed up the configuration. Thank you for noticing and

Re: [julia-users] Type instability?

2015-08-16 Thread Stefan Karpinski
Sorry, yes, I misread the example. They're both fine with just 0. On Aug 16, 2015, at 2:32 PM, Stefan Karpinski stefan.karpin...@gmail.com wrote: One is being returned, the other isn't. You cannot change line 8 without causing the returned type to depend on the value. On Aug 16, 2015,

[julia-users] Wanted to share some spaceflight mechanics code I wrote: SGP4.jl and Interplanetary.jl

2015-08-16 Thread chris . binz
I haven't seen a lot of contributions (yet) in this domain, but I think Julia is uniquely suited to astrodynamics problems. SGP4.jl [1] is a wrapper of the python-sgp4 package, which allows a user to propagate satellites using the Simplified General Perturbations model via two-line element

[julia-users] Re: Wanted to share some spaceflight mechanics code I wrote: SGP4.jl and Interplanetary.jl

2015-08-16 Thread Tony Kelman
Cool! You should show off the porkchop plots if they came out well, those are always neat to look at. A Lambert solver is one of those little useful pieces of code I was hoping someone would port to Julia one of these days, or would have eventually written myself if nothing came along. On