Re: [julia-users] Options for constructing a 3D surface from a point cloud

2016-02-18 Thread Igor
Chris , I'm interested in this area too. Please post here if you come up with some solution you would like. Best regards, Igor

[julia-users] Re: isapprox Fallback

2016-02-18 Thread Steven G. Johnson
It is not enough to define isapprox(string, string). To use isapprox for [1.5, "foo"] you need an isapprox method for Array{Any}. However, I would be inclined to say you should re-consider using isapprox in such cases. (What does it mean for two strings to be "approximately" equal?) Note t

Re: [julia-users] Re: ccall, dlopen when dll contains a class

2016-02-18 Thread Isaiah Norton
> > Is there any easy (or failing that, hard) way to do this? COM aside, the first issue is that this syntax isn't quite right: > ccall( ("SimpleLibrary.MyClass.MySum", "SimplyLibrary"), Float32, (1.2, > 3.1)) There are a couple things to change here: - need argument types, as a tuple, after

[julia-users] Re: ccall, dlopen when dll contains a class

2016-02-18 Thread Alex Mellnik
Sorry to reopen an old thread. I'm trying to do something similar and haven't been able to figure it out so far. Isaiah, I noticed that your COMCall.jl library is not on GitHub anymore. Is this code still floating around anywhere or is there a different suggested route? In my case, I have a

Re: [julia-users] Pkg.update() fails after installation

2016-02-18 Thread Stefan Karpinski
The permissions of these files got changed somehow. On Thu, Feb 18, 2016 at 3:52 PM, Hua Chai (Ken) wrote: > It shows five files with changed mode. (See attached screenshot) > After I do 'git checkout --filename' on each of them and do 'git diff' > again, exactly the same five files still show u

[julia-users] macro esc nested @everywhere issue

2016-02-18 Thread thr
Hi, I can't explain the behaviour of this: macro wtf1() return esc( :(begin @show a @everywhere const b = a @show b end)) end macro wtf2() return esc( :(begin @show c const d = c @show d

Re: [julia-users] Pkg.update() fails after installation

2016-02-18 Thread Hua Chai (Ken)
It shows five files with changed mode. (See attached screenshot) After I do 'git checkout --filename' on each of them and do 'git diff' again, exactly the same five files still show up. On Thu, Feb 18, 2016 at 3:42 PM, Tony Kelman wrote: > As in the "Cannot pull with rebase...?" thread, what doe

[julia-users] Re: Pkg.update() fails after installation

2016-02-18 Thread Hua Chai
I saw people posted the same issue earlier and here is what I did following some of the advice here in this mailing list: I ran 'git diff' in the folder C:\Users\Hua\.julia\v0.4\METADATA and then ran 'git checkout --' to try to restore the files. (screenshot is attached.) However the same probl

[julia-users] isapprox Fallback

2016-02-18 Thread Jared Crean
I am comparing two arrays that contain both numbers and strings using FactCheck and got an error Error :: (line:-1) data_code => roughly(data_ref,atol=1.0e-13) MethodError: `isapprox` has no method matching isapprox(::SubString{ASCIIString}, ::SubString{ASCIIString}) so I defined a new

Re: [julia-users] Re: Unitful.jl for physical units

2016-02-18 Thread Mauro
Concerning exchange rates, this is a good read: http://www.mathstat.dal.ca/~selinger/accounting/tutorial.html#4 In particular the referenced section. On Thu, 2016-02-18 at 21:30, Jeffrey Sarnoff wrote: > I am thinking about how Currencies would fit with software for handling SI > and other physic

[julia-users] Pkg.update() fails after installation

2016-02-18 Thread Tony Kelman
As in the "Cannot pull with rebase...?" thread, what does `git diff` say when run from the package directory? If you do `git checkout -- filename` on each of the files with changes, does `git diff` then show anything?

[julia-users] Re: Unitful.jl for physical units

2016-02-18 Thread Jeffrey Sarnoff
I am thinking about how Currencies would fit with software for handling SI and other physical dimensions and the usual units of measure. The following approach seems workable and (mostly) not disruptive to the working and evolving code Andrew Keller offers the community. A currency behaves as a

Re: [julia-users] ANN CustomREPLComepletions - custom string completions in function arguments (HDF5, NetCDF...)

2016-02-18 Thread Daniel Høegh
Yes it does, it uses type inference to determine the return type of a function call. This way the determination of the argument type is effect free. You could maybe hook your package into the logic in REPLCompletion.jl in base.

[julia-users] Re: Unitful.jl for physical units

2016-02-18 Thread Jeffrey Sarnoff
Kristoffer, I am glad that you said this. In the future, I will write and be respectful of that. Kind regards, Jeffrey Sarnoff On Thursday, February 18, 2016 at 12:51:19 PM UTC-5, Kristoffer Carlsson wrote: > > Just for your info, you likely exclude a lot of non native speakers (like > me)

Re: [julia-users] GIF 3D plot

2016-02-18 Thread Miguel Bazdresch
Gaston has support for 3D plots and can save them to GIF files. Take a look at the documentation here: https://bitbucket.org/mbaz/gaston/downloads/gastondoc-0.5.5.pdf I recommend using Gaston "master" instead of the latest release; it has a lot of bugfixes and improvements. The docs for 3-d plotti

[julia-users] Re: Convert a collection to an array

2016-02-18 Thread Tomas Lycken
Sorry, I misread your dimensions. vcat(ySol...) will solve the problem correctly for you :) julia> ySol = [rand(2)' for _ in 1:20] 20-element Array{Array{Float64,2},1}: 1x2 Array{Float64,2}: 0.751346 0.212002 ... 1x2 Array{Float64,2}: 0.52188 0.121669 julia> vcat(ySol...) 20x2 Array

[julia-users] Re: Convert a collection to an array

2016-02-18 Thread Tomas Lycken
If it’s not longer than that, you can easily do that with hcat: julia> ySol = [rand(2) for _ in 1:20] 20-element Array{Array{Float64,1},1}: [0.6383963589240325,0.952443724507759] [0.8543445393734637,0.5497614848396764] [0.7180883594522589,0.2699980988282249] [0.879654133666188,0.00807946

[julia-users] Convert a collection to an array

2016-02-18 Thread Chris Nabold
I have a collection ySol: julia> ySol=collect(ySol) 21-element Array{Any,1}: 1x2 Array{Float64,2}: 9000.0 0.0 1x2 Array{Float64,2}: 8998.79 -4.80427 1x2 Array{Float64,2}: 8995.29 -9.0677 1x2 Array{Float64,2}: 8989.86 -12.4678 1x2 Array{Float64,2}: 8982.97 -14.9547 1x2 Array{Float6

[julia-users] Re: Unitful.jl for physical units

2016-02-18 Thread Kristoffer Carlsson
Just for your info, you likely exclude a lot of non native speakers (like me) from understanding your point when you go 17th century poet style. Adjust your language to the audience and all that..

Re: [julia-users] ANN CustomREPLComepletions - custom string completions in function arguments (HDF5, NetCDF...)

2016-02-18 Thread Fabian Gans
Ok, I just pushed a change so that only things like literal strings, numbers and symbols get evaluated during tab-completion, no function calls. The examples mentioned above still work, except if one of the left-side function arguments is the result of a function call or macro. So h5read(g

Re: [julia-users] Bug #15077 still present

2016-02-18 Thread Jeff Bezanson
It would be great if somebody can come up with a test case for this, but so far I can't. I think the current code is correct --- albeit unintentionally. The reason is that rehashing by itself cannot cause a wrapped-around clump of keys to grow, because when rehashing keys can only move to higher in

[julia-users] Re: Unitful.jl for physical units

2016-02-18 Thread Jeffrey Sarnoff
Money (fiat value) as an econophysical dimension, with currencies the given units of measure and exchange rates the interconversion ratios with bid-asked spreads the ratios' associated uncertainties. The interconversion ratios & uncertainties are dynamic rather than internal system characteris

Re: [julia-users] ANN CustomREPLComepletions - custom string completions in function arguments (HDF5, NetCDF...)

2016-02-18 Thread Fabian Gans
Yes I was also thinking about if evaluating all other arguments is a good idea. My first thought was about performance and the conclusion was that when one does work interactively on the REPL, one wants to do this evaluation anyway. There are, of course issues with mutating functions like when

[julia-users] Growth patterns of programming languages developed at Github

2016-02-18 Thread mschauer
Hi, I made a chart for languages developed on github (https://github.com/showcases/programming-languages) contrasting the acquisition of new contributors to main github repository (GH) with new tagged questions on stackoverflow (SO). One of the tenets of the Julia community is that the "two

Re: [julia-users] ANN CustomREPLComepletions - custom string completions in function arguments (HDF5, NetCDF...)

2016-02-18 Thread Stefan Karpinski
The issue here is that you have to evaluate the expression to the left of the cursor, which could entail running arbitrary code. Which may be fine, but we haven't taken that step yet. On Thu, Feb 18, 2016 at 9:02 AM, Tom Breloff wrote: > Sounds very useful! I have a scenario that probably fits..

Re: [julia-users] Re: Unitful.jl for physical units

2016-02-18 Thread Stefan Karpinski
That requires an implementation of ΔT , which I don't think we have unless ICU has it. On Wed, Feb 17, 2016 at 8:06 AM, Scott Jones wrote: > Is there anything to convert to/from Julia's UT seconds (which are tied to > the Earth's rotation), and SI seconds?

Re: [julia-users] Bug #15077 still present

2016-02-18 Thread Stefan Karpinski
I'll forward to Jeff so he sees this. On Wed, Feb 17, 2016 at 1:59 PM, Scott Jones wrote: > I just wanted to warn people that the bug in #15077 is still present, > there is a small bug in the change #15096 that Jeff merged yesterday. > Line 536 of dict.jl: > if index - index0 > maxprobe > should

Re: [julia-users] Reading one field from a file

2016-02-18 Thread Stefan Karpinski
I would do this with a loop over each line and a regex to parse each line and then parse to interpret each field. That's the standard way to do this sort of thing in Python, Perl, Ruby, etc. On Wed, Feb 17, 2016 at 1:25 PM, Victor Liu wrote: > I have a text file of the following format: > > ---

Re: [julia-users] ANN CustomREPLComepletions - custom string completions in function arguments (HDF5, NetCDF...)

2016-02-18 Thread Fabian Gans
I forgot to mention, this is currently targeted at julia 0.5, it needs the new function types. It should work for nightlies. On Thursday, February 18, 2016 at 3:23:41 PM UTC+1, Mauro wrote: > > > Sounds very useful! I have a scenario that probably fits... When using > > PyCall I always find mys

Re: [julia-users] ANN CustomREPLComepletions - custom string completions in function arguments (HDF5, NetCDF...)

2016-02-18 Thread Mauro
> Sounds very useful! I have a scenario that probably fits... When using > PyCall I always find myself pressing tab to see what methods are defined on > a python object: > > "obj[:get_something]()["... Crap... Gotta look at the docs... > > It would be awesome if you gave a quick how-to for somethin

Re: [julia-users] ANN CustomREPLComepletions - custom string completions in function arguments (HDF5, NetCDF...)

2016-02-18 Thread Tom Breloff
Sounds very useful! I have a scenario that probably fits... When using PyCall I always find myself pressing tab to see what methods are defined on a python object: "obj[:get_something]()["... Crap... Gotta look at the docs... It would be awesome if you gave a quick how-to for something like that.

[julia-users] ANN CustomREPLComepletions - custom string completions in function arguments (HDF5, NetCDF...)

2016-02-18 Thread Fabian Gans
I want to share an (unregistered) package called CustomREPLComepletions https://github.com/meggart/CustomREPLCompletions.jl. It hooks into the REPL completion system and lets you add individual completions depending on the function surrounding the current cursor. For example, if after the foll

[julia-users] Re: Easy way to precompile all installed packages?

2016-02-18 Thread Oliver Schulz
But Base.compilecache compiles every time right, not just when necessary? So when looping over all packages after a "Pkg.update()", it would recompile everything, no matter if outdated or not? On Thursday, February 18, 2016 at 1:07:07 PM UTC+1, Tony Kelman wrote: > > Base.compilecache may be mor

[julia-users] Re: Easy way to precompile all installed packages?

2016-02-18 Thread Tony Kelman
Base.compilecache may be more reliable here. On Thursday, February 18, 2016 at 2:41:39 AM UTC-8, Oliver Schulz wrote: > > The best I've come up with so far is > > for pkg in vcat(["IJulia"], collect(keys(Pkg.installed( > if !isdefined(Symbol(pkg)) > info("Importing $(pkg)...") >

[julia-users] Re: Is the Actor model for parallelism a good paradigm for Julia

2016-02-18 Thread Oliver Schulz
Hi, in case you're interested, I'm working on a Julia task/channel based actor framework: https://github.com/daqcore/Actors.jl It's registered, but still in an early stage and doesn't support inter-proccess/inter-host actor messages yet - though I hope to add that soon. Also, it probably will

[julia-users] Re: Easy way to precompile all installed packages?

2016-02-18 Thread Oliver Schulz
The best I've come up with so far is for pkg in vcat(["IJulia"], collect(keys(Pkg.installed( if !isdefined(Symbol(pkg)) info("Importing $(pkg)...") try (@eval import $(Symbol(pkg))) catch end end end I had to manually add IJulia because it's installed site-wide (in my