Re: [julia-users] 4D interpolation from scattered points

2015-05-14 Thread René Donner
> ExtremelyRandomizedTrees.jl: Might be really good, but errored a lot on > version 4. Sorry, the fixes for 0.4 were only in master - I tagged a new version (0.0.11) just now. I use it mostly on 0.4, actually - if you find any issues please let me know!

Re: [julia-users] Re: Type produced by a comprehension

2015-05-14 Thread Milan Bouchet-Valat
Le mercredi 13 mai 2015 à 12:52 -0700, David Gold a écrit : > You're welcome. My (incomplete and entirely heuristic) understanding > is that type inference on global variables is difficult because there > aren't clearly defined "boundaries" without which the variable cannot > be referenced. On the

Re: [julia-users] Re: verbs for immutable collections

2015-05-14 Thread Tomas Lycken
I'd like to raise a voice against using these immutable forms altogether. If the set S is immutable, then we aren't actually going to delete anything from anything by calling delete(S, x) - we're going to return a new set S' which has all the elements of S except x. Thus, a better name might be

Re: [julia-users] Packing and Unpacking several Matrixes into flat vectors

2015-05-14 Thread Tim Holy
Some Optim algorithms, like cg, already allow you to optimize a matrix. --Tim On Wednesday, May 13, 2015 11:50:00 PM Lyndon White wrote: > Hi all, > I've been trinking about this for a while. > > Numerical Optimistation Libraries, eg > NLopt(https://github.com/JuliaOpt/NLopt.jl) and Optim > (htt

Re: [julia-users] Re: Trouble getting tests to pass on v0.3.8 with icc/mkl

2015-05-14 Thread Jim Garrison
Thanks! That fixes the mod2pi issue. Mysteriously enough, the linalg4 tests are all passing now for me too. (I have no idea how this happened, as I've started from a clean build each time and none of the other commits to release-0.3 since v0.3.8 seem to be related; also my Make.user is ident

[julia-users] (Faster?) interactive image overlays with PyPlot and Interact

2015-05-14 Thread Andrew Gibb
I'd like to create an interactive tool which draws a circle over an image. Sliders will enable the radius and centre position of the circle to be set. The following code works, but is very slow: using PyPlot, Interact, PyCall, Images, TestImages @pyimport matplotlib.patches as patch myim = test

Re: [julia-users] Re: Trouble getting tests to pass on v0.3.8 with icc/mkl

2015-05-14 Thread Tony Kelman
I think the logdet problem has the same underlying cause as the mod2pi issue I just backported the fix for, see https://github.com/JuliaLang/julia/issues/10188 for some more background. On Thursday, May 14, 2015 at 2:21:07 AM UTC-7, Jim Garrison wrote: > > Thanks! That fixes the mod2pi issue

Re: [julia-users] Re: verbs for immutable collections

2015-05-14 Thread Michael Francis
@Tomas, thank you, I had briefly started down this path but thought perhaps it was the wrong direction ( when I looked at what * or + should mean ). Now you point it out again I'm thinking that following the notions that these are sets might be the correct thing, so # {} is not a syntax for im

[julia-users] Example of imread from an imagemagick stream

2015-05-14 Thread Yakir Gagnon
Can someone please post a simple example of reading an image stream from imagemagick? So something like this (though this doesn't work): cmd = `convert img.png -compress none ppm:-` I = imread(readall(cmd),Images.PPMBinary) I'm trying to avoid writing the image imagemagick created to disk and

Re: [julia-users] Re: verbs for immutable collections

2015-05-14 Thread Tom Breloff
Would it be possible for an external library to "add" a method to Base? My question is if there are 2 independent packages that want to define functionality on a verb, but that verb doesn't yet exist in Base. What would happen if they both defined a verb that they think naturally belongs in B

Re: [julia-users] Re: verbs for immutable collections

2015-05-14 Thread Michael Francis
This doesn't work at preset you can 'extend' existing verbs in other modules to your hearts content, but you can't add a new one. On Thursday, May 14, 2015 at 9:21:44 AM UTC-4, Tom Breloff wrote: > > Would it be possible for an external library to "add" a method to Base? > My question is if th

Re: [julia-users] Re: verbs for immutable collections

2015-05-14 Thread Tom Breloff
Yes. I was wondering if it *should* be allowed. Would this potentially clear up some of the merging woes that have been discussed in other threads? What are the pitfalls? On Thursday, May 14, 2015 at 9:33:19 AM UTC-4, Michael Francis wrote: > > This doesn't work at preset you can 'extend' exi

Re: [julia-users] Packing and Unpacking several Matrixes into flat vectors

2015-05-14 Thread John Myles White
In the long-term, the best way to do this will be to use SubArray and ReshapeArray. You'll allocate enough space for all parameters, then unpack them into separate objects when that helps. -- John On Thursday, May 14, 2015 at 2:03:27 AM UTC-7, Tim Holy wrote: > > Some Optim algorithms, like cg

Re: [julia-users] Re: Construct range with custom type

2015-05-14 Thread Josh Langsfeld
If you do decide to keep it as a FloatingPoint subtype, you should probably go the other route of just making sure it interacts natively with the standard core operators, promote, convert, etc... Then the colon syntax should work automatically, returning a FloatRange{JDate} (which can become an Arr

Re: [julia-users] Is it possible to imread indexed images?

2015-05-14 Thread Tim Holy
I'm not sure myself how hard this would be to add. http://www.imagemagick.org/api/magick-image.php#MagickExportImagePixels does not obviously provide a mechanism to retrieve the index. But I haven't looked extensively. In the longer-term, there will be multiple readers supported, so the answer to

Re: [julia-users] Example of imread from an imagemagick stream

2015-05-14 Thread Tim Holy
If you dig through the commit history of Images.jl, at some point you'll find the commit that switched from using Cmd to the C api for interacting with ImageMagick. That should have quite a few examples. --Tim On Thursday, May 14, 2015 05:25:19 AM Yakir Gagnon wrote: > Can someone please post a

Re: [julia-users] Biggest Julia program so far?

2015-05-14 Thread Stefan Karpinski
I've seen a few proprietary code bases that are 2-3x that big, which is not huge, but pretty substantial. I suspect that not many Julia code bases have had time to grow much larger than that. I think that this is large enough to be confident that nothing horrible happens when the code base gets lar

[julia-users] Re: Mysterious errors due to new Tuple{S,V}

2015-05-14 Thread David P. Sanders
El miércoles, 13 de mayo de 2015, 23:51:33 (UTC-5), Sheehan Olver escribió: > > This is for latest build of 0.4 on Mac OS X Yosemite > > On Thursday, May 14, 2015 at 2:51:07 PM UTC+10, Sheehan Olver wrote: >> >> >> I get the error message below, and cannot find any sign of the cause. >> With d

Re: [julia-users] Re: Mysterious errors due to new Tuple{S,V}

2015-05-14 Thread Yichao Yu
On Thu, May 14, 2015 at 11:02 AM, David P. Sanders wrote: > > > El miércoles, 13 de mayo de 2015, 23:51:33 (UTC-5), Sheehan Olver escribió: >> >> This is for latest build of 0.4 on Mac OS X Yosemite >> >> On Thursday, May 14, 2015 at 2:51:07 PM UTC+10, Sheehan Olver wrote: >>> >>> >>> I get the er

[julia-users] ploting a line in a 3D surface

2015-05-14 Thread augusto carillo ferrari
Hi, I'm trying to plot a line segment between the points [1,1] and [0,0] in Z function x^2 + y^2, i've already plotted f with: using PyPlot using Distributions function f(x) return (x[1]^2 + x[2]^2) #return sin(x[1]) + cos(x[2]) end n = 100 x = linspace(-1, 1, n) y = linspace(-1,1,n)

[julia-users] problem with bigfloat precision

2015-05-14 Thread harven
There is something I don't understand with bigfloat precision. I have some task where I need to compute exactly with a thousand significant digit. I wrote a small benchmark, just by taking a power of two and its logarithm. julia> with_bigfloat_precision(10_000) do l

[julia-users] error compiling fill!: box: argument not of a primitive type

2015-05-14 Thread andrew cooke
Hi, I'm returning to Julia after a long break (a year?) and am trying to get some old code I had lying around compiling. When I try to run tests for https://github.com/andrewcooke/IntModN.jl (at 4bc2734b80a15108ff66fd61705681e9d50a94c1) I see the error: andrew@laptop:~/project/IntModN> julia

Re: [julia-users] problem with bigfloat precision

2015-05-14 Thread Stefan Karpinski
Using the log2 function does what you expect: julia> log2(big(2)^100) 1e+02 with 256 bits of precision log(b,x) is defined as log(x)./log(b) whereas log2 makes a direct call to the mpfr_log2 funct

Re: [julia-users] Determine if an array is memory-mapped?

2015-05-14 Thread Isaiah Norton
As far as I can tell, we don't store this information [1] -- mmap_array simply calls pointer_to_array [2] on the address returned by mmap, and at that point the array is just like any other created from a pointer. Your idea to to try writing to the array may actually be the least heavy-handed poss

Re: [julia-users] problem with bigfloat precision

2015-05-14 Thread harven
Thanks for the answer. I understand now. So log(2,x) is log(x)/log(2) and the denominator is a Float64 so we don't get the desired precision. So I can just write julia> with_bigfloat_precision(10_000) do log(big(2)^10_000)/log(big(2)) end 1e+04 with 1000

Re: [julia-users] problem with bigfloat precision

2015-05-14 Thread Stefan Karpinski
Yes, I do think that's a good solution. On Thu, May 14, 2015 at 2:32 PM, harven wrote: > Thanks for the answer. I understand now. So log(2,x) is log(x)/log(2) and > the denominator is a Float64 so we don't get the desired precision. So I > can just write > > julia> with_bigfloat_precision(

Re: [julia-users] Nonlinear system solution with Julia's Sundial.jl package and `Kinsol` warning

2015-05-14 Thread Mauro
Have a look at the description in https://computation.llnl.gov/casc/sundials/documentation/kin_guide/node5.html On Wed, 2015-05-13 at 23:04, Pileas wrote: > Hello all, > > I'm trying to solve a system of equations using the Sundials package for > Julia. > > The code is the following: > > #=

[julia-users] Re: error compiling fill!: box: argument not of a primitive type

2015-05-14 Thread andrew cooke
Well, this all works fine with 0.3, so I'm going to chalk this up to weirdness in git trunk 0.4 (the above was with git as of an hour or so before posting). Andrew

[julia-users] Re: problem with bigfloat precision

2015-05-14 Thread Pablo Zubieta
I would think it is even more robust a definition like mylog(b, x) = (promote(b, x); log(x) ./ log(b)) in case someone wants to write mylog(2.1, 2). Stefan, should this be the definition in Base?

Re: [julia-users] Re: verbs for immutable collections

2015-05-14 Thread Toivo Henningsson
I don't think it should be allowed. What if two packages try to add functions with the same name to Base that do completely different things? And what if they are both applicable to some of the same argument types? Beyond that, I think being able to add definitions to a module from the outside

[julia-users] Re: problem with bigfloat precision

2015-05-14 Thread Pablo Zubieta
Nevermind I saw your PR.

Re: [julia-users] error compiling fill!: box: argument not of a primitive type

2015-05-14 Thread Kevin Squire
Hi Andrew, could you file an issue? Cheers, Kevin On Thursday, May 14, 2015, andrew cooke wrote: > Well, this all works fine with 0.3, so I'm going to chalk this up to > weirdness in git trunk 0.4 (the above was with git as of an hour or so > before posting). > > Andrew > >

Re: [julia-users] Re: problem with bigfloat precision

2015-05-14 Thread Stefan Karpinski
Just waiting for CI to pass: https://github.com/JuliaLang/julia/pull/11269. On Thu, May 14, 2015 at 3:14 PM, Pablo Zubieta wrote: > Nevermind I saw your PR. >

Re: [julia-users] Determine if an array is memory-mapped?

2015-05-14 Thread Tim Holy
I've intermittently wondered whether one should wrap a mmapped array in a type; certainly, you could bypass the high-level code and write your own implementation of `mmap_array` that does so. Best, --Tim On Thursday, May 14, 2015 02:01:26 PM Isaiah Norton wrote: > As far as I can tell, we don't

Re: [julia-users] use dictionary as named arguments for function

2015-05-14 Thread Edward Chen
To whom it may concern: I am having trouble adding elements to my dictionary and then passing it into a function: function f(;kw...) for (k,v) in kw println(k,",",v) end end d = {:a => 1, :b => "c"} # this works # d = Dict() # but this line # d["d"] = 2 # with this fails f(;d...

Re: [julia-users] error compiling fill!: box: argument not of a primitive type

2015-05-14 Thread andrew cooke
i started to file one, and then tried to check my results with the latest code, and now everything works. so i'm trying to triangulate what on earth the error was as far as i know all i did was change the type of an exception or two...

Re: [julia-users] error compiling fill!: box: argument not of a primitive type

2015-05-14 Thread andrew cooke
ah. no - https://github.com/JuliaLang/julia/issues/11270 also, https://github.com/JuliaLang/julia/issues/11271 On Thursday, 14 May 2015 16:29:09 UTC-3, andrew cooke wrote: > > i started to file one, and then tried to check my results with the latest > code, and now everything works. so i'm tryi

Re: [julia-users] problem with bigfloat precision

2015-05-14 Thread Steven G. Johnson
On Thursday, May 14, 2015 at 1:25:44 PM UTC-4, Stefan Karpinski wrote: > > Using the log2 function does what you expect: > > julia> log2(big(2)^100) > 1e+02 with 256 bits of precision > > > log(b,x) is defined as log(x)./log(b) >

Re: [julia-users] problem with bigfloat precision

2015-05-14 Thread Stefan Karpinski
On Thu, May 14, 2015 at 3:43 PM, Steven G. Johnson wrote: > I think the right thing would be for log(b,x) to first promote its > arguments to the same type. Otherwise, you run into the problem here > where you have a spurious loss of accuracy. I'll file a PR. Is this different than what my P

Re: [julia-users] use dictionary as named arguments for function

2015-05-14 Thread Peter Brady
I believe you want d[:d] = 2 Peter. On Thursday, May 14, 2015 at 1:25:58 PM UTC-6, Edward Chen wrote: > > To whom it may concern: > > I am having trouble adding elements to my dictionary and then passing it > into a function: > > function f(;kw...) > for (k,v) in kw > println(k,",",

Re: [julia-users] use dictionary as named arguments for function

2015-05-14 Thread Edward Chen
Ah yeah that works! The wikibooks documentation is wrong then, maybe i'll correct it: http://en.wikibooks.org/wiki/Introducing_Julia/Dictionaries_and_sets On Thursday, May 14, 2015 at 4:08:45 PM UTC-4, Peter Brady wrote: > > I believe you want > > d[:d] = 2 > > Peter. > > On Thursday, May 14, 20

Re: [julia-users] problem with bigfloat precision

2015-05-14 Thread Steven G. Johnson
On Thursday, May 14, 2015 at 3:46:25 PM UTC-4, Stefan Karpinski wrote: > > On Thu, May 14, 2015 at 3:43 PM, Steven G. Johnson > wrote: > >> I think the right thing would be for log(b,x) to first promote its >> arguments to the same type. Otherwise, you run into the problem here >> where you

[julia-users] Re: Julia will always be open source

2015-05-14 Thread Jim Garrison
Here is a related question: Who will own and operate the julialang.org domain? Would you be willing to transfer it to NumFocus or a similar nonprofit, community entity? On Monday, May 11, 2015 at 10:55:00 AM UTC-7, Brian Granger wrote: > > Congrats on Julia Computing stuff! We (IPython/Jupyter)

[julia-users] 0.3 prereleases should not be tagged.

2015-05-14 Thread andrew cooke
please can someone explain to me what the subject means, in the conversation here - https://github.com/JuliaLang/METADATA.jl/pull/2589 i understand waiting for travis - there was some warning i shouldn't have clicked through - but i have no idea what prerelease is referring to. thanks, i'd just

Re: [julia-users] Re: verbs for immutable collections

2015-05-14 Thread elextr
The ability for a user of two packages to tell Julia to merge is being investigated in https://groups.google.com/forum/?hl=en#!topic/julia-users/sxXuTiOrA_M which would obviate the need for "verbs in base". This does not change the OPs question about what are the "standard" verbs that a typ

Re: [julia-users] Re: Mysterious errors due to new Tuple{S,V}

2015-05-14 Thread Sheehan Olver
I’ve narrowed the bug a bit further. But it still doesn’t make any sense. The offending function is actually adaptiveqr{T<:Operator}(B::Vector{T},v::Array,tol::Real,N) = adaptiveqr!(AlmostBandedOperator(B),convertvec(B[end],v),tol,N) #May need to copy v in the future But calling th

Re: [julia-users] 0.3 prereleases should not be tagged.

2015-05-14 Thread Elliot Saba
No problem; what he's referring to is the fact that the version number you've put there, `julia 0.3-` doesn't actually refer to julia 0.3; it refers to a version of Julia that is *before* Julia 0.3, e.g. a 0.3 prerelease. You should get rid of the minus sign, and all will be okay. -E On Thu, May

Re: [julia-users] Re: Julia will always be open source

2015-05-14 Thread Stefan Karpinski
Currently I own the domain, but transferring it to NumFocus would be fine if they do that (which I can find out). On Thu, May 14, 2015 at 6:55 PM, Jim Garrison wrote: > Here is a related question: Who will own and operate the julialang.org > domain? Would you be willing to transfer it to NumFoc

Re: [julia-users] Example of imread from an imagemagick stream

2015-05-14 Thread Yakir Gagnon
Thanks! OK, I finally found the commit you were talking about (commit 7ba0d6093c093acfc5c1d71fa3cad1ff33bccdfc). I managed to find an example for the stuff I wanted: cmd = `convert $filename -depth $bitdepth $colorspace:-` stream, _ = readsfrom(cmd) nchannels = length(colorspace) data = read(str

Re: [julia-users] Re: Mysterious errors due to new Tuple{S,V}

2015-05-14 Thread Sheehan Olver
Found it!!The following definition was not updated. It seems very weird that this triggered an error message while compiling a completely unrelated routine... immutable KroneckerOperator{S,V,DS,RS,T}<: BivariateOperator{T} ops::(S,V) domainspace::DS rangespace::RS end

Re: [julia-users] 0.3 prereleases should not be tagged.

2015-05-14 Thread andrew cooke
thanks, fixed. On Thursday, 14 May 2015 21:05:42 UTC-3, Elliot Saba wrote: > > No problem; what he's referring to is the fact that the version number > you've put there, `julia 0.3-` doesn't actually refer to julia 0.3; it > refers to a version of Julia that is *before* Julia 0.3, e.g. a 0.3 >

Re: [julia-users] Re: Julia will always be open source

2015-05-14 Thread Viral Shah
As much as I would like to do so, I also want to have enough funding for the "Julia foundation" (NumFocus) in place before transferring over community resources. We look at everything closely so that things don't fall through the cracks. For someone else to do that, we need an organisational struc

[julia-users] how to create a command with an unquoted backslash in it?

2015-05-14 Thread Yakir Gagnon
I'm trying to run an external imagemagick command. As such, it needs to include some escaped parenthesis. In shell it would look like this: convert img.png \( -clone 0 -crop 450x+450+0 -dither None -remap colormap1.png \) \( -clone 0 -crop 450x+951+0 -dither None -remap colormap2.png \) -dele

Re: [julia-users] Julia will always be open source

2015-05-14 Thread Jameson Nash
I am one of the more recent people to join Julia Computing, so that I am now able to work full-time on Julia. It's been a great way to merge a mutual hobby – of contributing to the open-source Julia project – with day-to-day responsibilities. On Wed, May 13, 2015 at 10:55 AM Scott Jones wrote:

Re: [julia-users] Re: Julia will always be open source

2015-05-14 Thread Jim Garrison
Hi Viral and Stefan, Thanks for the replies. To be clear, I have no opposition to a third party organization (e.g. Julia Computing) hosting the web site as an in-kind donation to Julia (the community project). The GNOME website, for instance, is currently hosted by Canonical, and it has been