Re: [julia-users] Re: Nemo AcbField error

2016-10-26 Thread 'Bill Hart' via julia-users
This is probably because Git is not in your path. We still haven't switched
to libgit, which means the build script for Nemo still relies on Git being
available on your machine.

Bill.

On 26 October 2016 at 01:43, Jeffrey Sarnoff 
wrote:

> send me all the messages output, please
>
> On Tue, Oct 25, 2016 at 7:41 PM, Jeffrey Sarnoff <
> jeffrey.sarn...@gmail.com> wrote:
>
>> What happens if you restart that Julia from the windows menu (if that
>> does not launch cygwin terminal)
>> and  do >Pkg.build("Nemo") again?
>>
>> On Tue, Oct 25, 2016 at 7:37 PM, digxx  wrote:
>>
>>> Sry but I followed precisely ur steps i.e.:
>>> I installed a completely new version in D:\Julia\Julia-0.5.0 and added
>>> an environment variable JULIA_PKGDIR within D:\Julia because I didn't like
>>> the default one.
>>> I then initialized by Pkg.init()
>>> I ran Pkg.update()  (prob not needed here coz its new)
>>> I ran: Pkg.clone("https://github.com/Nemocas/Nemo.jl";)
>>> I exitted and restarted julia
>>> I ran: Pkg.build("Nemo") and stumbled across:
>>>
>>> julia> Pkg.build("Nemo")
>>> INFO: Building Nemo
>>> WARNING: `@windows` is deprecated, use `@static is_windows()` instead
>>>  in depwarn(::String, ::Symbol) at .\deprecated.jl:64
>>>  in @windows(::Any, ::Any) at .\deprecated.jl:472
>>>  in include_from_node1(::String) at .\loading.jl:488
>>>  in evalfile(::String, ::Array{String,1}) at .\loading.jl:504 (repeats 2
>>> times)
>>>  in cd(::##2#4, ::String) at .\file.jl:48
>>>  in (::##1#3)(::IOStream) at .\none:13
>>>  in open(::##1#3, ::String, ::String) at .\iostream.jl:113
>>>  in eval(::Module, ::Any) at .\boot.jl:234
>>>  in process_options(::Base.JLOptions) at .\client.jl:239
>>>  in _start() at .\client.jl:318
>>> while loading D:\Julia\v0.5\Nemo\deps\build.jl, in expression starting
>>> on line 1
>>> 
>>> ===[ ERROR: Nemo
>>> ]===
>>> 
>>>
>>> LoadError: chdir D:\Julia\v0.5\Nemo\deps\antic: no such file or
>>> directory (ENOENT)
>>> while loading D:\Julia\v0.5\Nemo\deps\build.jl, in expression starting
>>> on line 121
>>>
>>> 
>>> 
>>> 
>>> =
>>>
>>> 
>>> ==[ BUILD ERRORS
>>> ]===
>>> 
>>>
>>> WARNING: Nemo had build errors.
>>>
>>>  - packages with build errors remain installed in D:\Julia\v0.5
>>>  - build the package(s) and all dependencies with `Pkg.build("Nemo")`
>>>  - build a single package by running its `deps/build.jl` script
>>>
>>> 
>>> 
>>> 
>>> =
>>>
>>>
>>
>


Re: [julia-users] Re: Nemo AcbField error

2016-10-26 Thread Jeffrey Sarnoff
Get git here: download git installer for windows 


On Wednesday, October 26, 2016 at 3:23:36 AM UTC-4, Bill Hart wrote:
>
> This is probably because Git is not in your path. We still haven't 
> switched to libgit, which means the build script for Nemo still relies on 
> Git being available on your machine.
>
> Bill.
>
> On 26 October 2016 at 01:43, Jeffrey Sarnoff  > wrote:
>
>> send me all the messages output, please
>>
>> On Tue, Oct 25, 2016 at 7:41 PM, Jeffrey Sarnoff > > wrote:
>>
>>> What happens if you restart that Julia from the windows menu (if that 
>>> does not launch cygwin terminal)
>>> and  do >Pkg.build("Nemo") again?
>>>
>>> On Tue, Oct 25, 2016 at 7:37 PM, digxx >> > wrote:
>>>
 Sry but I followed precisely ur steps i.e.:
 I installed a completely new version in D:\Julia\Julia-0.5.0 and added 
 an environment variable JULIA_PKGDIR within D:\Julia because I didn't like 
 the default one.
 I then initialized by Pkg.init()
 I ran Pkg.update()  (prob not needed here coz its new)
 I ran: Pkg.clone("https://github.com/Nemocas/Nemo.jl";)
 I exitted and restarted julia
 I ran: Pkg.build("Nemo") and stumbled across:

 julia> Pkg.build("Nemo")
 INFO: Building Nemo
 WARNING: `@windows` is deprecated, use `@static is_windows()` instead
  in depwarn(::String, ::Symbol) at .\deprecated.jl:64
  in @windows(::Any, ::Any) at .\deprecated.jl:472
  in include_from_node1(::String) at .\loading.jl:488
  in evalfile(::String, ::Array{String,1}) at .\loading.jl:504 (repeats 
 2 times)
  in cd(::##2#4, ::String) at .\file.jl:48
  in (::##1#3)(::IOStream) at .\none:13
  in open(::##1#3, ::String, ::String) at .\iostream.jl:113
  in eval(::Module, ::Any) at .\boot.jl:234
  in process_options(::Base.JLOptions) at .\client.jl:239
  in _start() at .\client.jl:318
 while loading D:\Julia\v0.5\Nemo\deps\build.jl, in expression starting 
 on line 1
 ===[
  
 ERROR: Nemo 
 ]===

 LoadError: chdir D:\Julia\v0.5\Nemo\deps\antic: no such file or 
 directory (ENOENT)
 while loading D:\Julia\v0.5\Nemo\deps\build.jl, in expression starting 
 on line 121


 =

 ==[
  
 BUILD ERRORS 
 ]===

 WARNING: Nemo had build errors.

  - packages with build errors remain installed in D:\Julia\v0.5
  - build the package(s) and all dependencies with `Pkg.build("Nemo")`
  - build a single package by running its `deps/build.jl` script


 =


>>>
>>
>

Re: [julia-users] Re: Comprehension (generator) with statement IF and the number of true

2016-10-26 Thread Gregory Salvan
Sorry reduce was a bad idea, even if syntax is nice, it's really slow and
greedy.

V1 can take advantage of @inbounds and @simd optimizations:
http://docs.julialang.org/en/release-0.5/manual/performance-tips/#performance-annotations

I hope reduce will be optimized in future because here it expresses rightly
the problem we solve and has a nice syntax:

mapeBase_v4(A::Vector{Float64}, F::Vector{Float64}) = reduce((0.0, 0),
enumerate(A)) do result::Tuple{Float64, Int64}, current::Tuple{Int64,
Float64}
current[2] == 0.0 && return result # guard clause
result[1] + abs( 1 - F[current[1]] / current[2]), result[2] + 1
end

unfortunately it's unusable ;)


2016-10-26 8:01 GMT+02:00 Martin Florek :

> Thank you everyone. v1 is very nice, as it turned out. I was looking for
> the magic of language Julia especially for the generator.
>


Re: [julia-users] Re: Comprehension (generator) with statement IF and the number of true

2016-10-26 Thread DNF
I don't have the impression that reduce is slow. The reduce function that 
you're using is complicated and may have features that preclude 
optimizations, such as vectorization.

But perhaps more importantly, the reduce version, while probably very 
clever, is almost completely impossible to understand. I know what it's 
supposed to do, and I still cannot decipher it, while the straight loop is 
crystal clear and easy to understand. And almost as concise!

On Wednesday, October 26, 2016 at 11:56:57 AM UTC+2, Gregory Salvan wrote:
>
> Sorry reduce was a bad idea, even if syntax is nice, it's really slow and 
> greedy.
>
> V1 can take advantage of @inbounds and @simd optimizations: 
> http://docs.julialang.org/en/release-0.5/manual/performance-tips/#performance-annotations
>
> I hope reduce will be optimized in future because here it expresses 
> rightly the problem we solve and has a nice syntax:
>
> mapeBase_v4(A::Vector{Float64}, F::Vector{Float64}) = reduce((0.0, 0), 
> enumerate(A)) do result::Tuple{Float64, Int64}, current::Tuple{Int64, 
> Float64}
> current[2] == 0.0 && return result # guard clause
> result[1] + abs( 1 - F[current[1]] / current[2]), result[2] + 1
> end
>
> unfortunately it's unusable ;)
>
>
> 2016-10-26 8:01 GMT+02:00 Martin Florek  >:
>
>> Thank you everyone. v1 is very nice, as it turned out. I was looking for 
>> the magic of language Julia especially for the generator. 
>>
>
>

Re: [julia-users] Re: Comprehension (generator) with statement IF and the number of true

2016-10-26 Thread Steven G. Johnson
If you want to spend your effort on making this code cleaner, the more 
Julian thing would be to focus on making it more type-generic, so that it 
can handle arguments of more types.  For example (requires Julia 0.5):

function mapeBase{T<:Number,S<:Number}(A::AbstractArray{T}, F::AbstractArray{S})
  indices(A) != indices(F) && error("arguments must be arrays of the same 
shape")

  s = zero(float(real(promote_type(T,S
  count = 0

  for i in eachindex(A)
@inbounds if A[i] != 0
  s += abs((A[i] - F[i]) / A[i])
  count += 1
end
  end
  return s, count 

end   

There is no performance penalty to declaring more generic function argument 
types.  When you pass in Vector{Float64} arrays, a version of mapeBase is 
specialized to that type and compiled, just as if you had declared those 
types.

Note, by the way, that this way of comparing two arrays is very susceptible 
to floating-point roundoff errors — think about what happens if A[i] is 
supposed to be 0.0, but is actually 1e-15 due to roundoff.I would 
normally recommend something like vecnorm(A - F, 1) / vecnorm(A, 1) instead 
-- i.e. take the sum of the |A[i] - F[i]| and divide by the *sum* of |A[i]|.

I agree with other posters that this is a case in which a loop is much 
cleaner.  It is possible to solve this problem efficiently with reduce in 
0.5 (where higher-order functions are now fast), but it would require much 
more careful coding and the resulting code would be much more obscure and 
unmaintainable, nor would a reduce-based implementation be much shorter as 
you have seen.

Higher-order functions are great, and it is great to use them where they 
simplify your code.  But sometimes a loop is cleaner, and (unlike in other 
dynamic languages) there is no reason not to use loops in Julia.


[julia-users] Base.take deprecated

2016-10-26 Thread Bill Maier
I keep my Julia source code updated almost daily from github, and a few 
weeks ago I began receiving the error "WARNING: Base.take is deprecated" in 
some of my programs. I suspect it comes from inside some included package, 
but I'm not sure. Everything still compiles and runs correctly, but I'd 
like to fix the problem and get rid of the warning message. I've also run 
Pkg.update() regularly. Any suggestions?


[julia-users] Re: CoinOptServices

2016-10-26 Thread Frank Kampas


On Tuesday, October 25, 2016 at 9:01:29 AM UTC-4, Frank Kampas wrote:
>
> Is anybody working on fixing CoinOptServices?
>

the problem occurs when nothing else is open.  
I see on the GitHub page for CoinOptServices that the build is failing for 
Windows and Linux. 


Re: [julia-users] Base.take deprecated

2016-10-26 Thread Mauro
`take` is deprecated on Julia master but not 0.5.  Unless you have a
good reason to run Julia-master, you should use the current stable
release Julia-0.5 where `take` is not deprecated.  Also note that
packages will likely not keep up to date with Julia-master.  Thus if you
do use Julia-master expect breakages going beyond deprecation warnings.

Anyway, the deprecation warning should tell you where it was triggered.
Although sometimes that fails, then you have to narrow it down with the
usual debugging techniques.

On Wed, 2016-10-26 at 14:23, Bill Maier  wrote:
> I keep my Julia source code updated almost daily from github, and a few
> weeks ago I began receiving the error "WARNING: Base.take is deprecated" in
> some of my programs. I suspect it comes from inside some included package,
> but I'm not sure. Everything still compiles and runs correctly, but I'd
> like to fix the problem and get rid of the warning message. I've also run
> Pkg.update() regularly. Any suggestions?


[julia-users] computation on types in type definition

2016-10-26 Thread Tamas Papp
I have a type which contains two slots, and it is important that the
types of them satisfy certain constraints. I can enforce that in the
constructor: see first and second implementations below. However, if I
want to compute types directly in the definition (see third
implementation), I end up with a TypeVar object I don't know how to deal
with (even though I read the "More about types" section in the manual,
sorry). Is this even possible?

[Note: I also asked on Gitter, but did not get a solution, or an
explanation.]

# first implementation: dd1 maps values to types
# uses constructor to constrain, works

dd1(::Int) = Float64 # for the sake of example

immutable Foo1{T,S}
a::T
b::Set{S}
function Foo1{T,S}(a::T, b::Set{S})
@assert S ≡ dd1(a)
new(a, b)
end
end

Foo1{T,S}(a::T, b::Set{S}) = Foo1{T,S}(a,b)

Foo1(1, Set([9.0])) # OK
foo1(1, Set(9)) # error

# second implementation: dd2 maps types to types
# uses constructor to constrain, works

dd2(::Type{Int}) = Float64

immutable Foo2{T,S}
a::T
b::Set{S}
function Foo2{T,S}(a::T, b::Set{S})
@assert S ≡ dd2(T)
new(a, b)
end
end

Foo2{T,S}(a::T, b::Set{S}) = Foo2{T,S}(a,b)

Foo2(1, Set([9.0])) # OK
Foo2(1, Set(9)) # error

# third implementation, types to types

immutable Foo3{T,S}
a::T
b::Set{dd2(T)}
end
## ERROR: MethodError: no method matching dd2(::TypeVar)


Re: [julia-users] computation on types in type definition

2016-10-26 Thread Isaiah Norton
>
> However, if I want to compute types directly in the definition (see third
> implementation), I end up with a TypeVar object I don't know how to deal
> with (even though I read the "More about types" section in the manual,
> sorry). Is this even possible?


Not yet: https://github.com/JuliaLang/julia/issues/18466

On Wed, Oct 26, 2016 at 9:07 AM, Tamas Papp  wrote:

> I have a type which contains two slots, and it is important that the
> types of them satisfy certain constraints. I can enforce that in the
> constructor: see first and second implementations below. However, if I
> want to compute types directly in the definition (see third
> implementation), I end up with a TypeVar object I don't know how to deal
> with (even though I read the "More about types" section in the manual,
> sorry). Is this even possible?
>
> [Note: I also asked on Gitter, but did not get a solution, or an
> explanation.]
>
> # first implementation: dd1 maps values to types
> # uses constructor to constrain, works
>
> dd1(::Int) = Float64 # for the sake of example
>
> immutable Foo1{T,S}
> a::T
> b::Set{S}
> function Foo1{T,S}(a::T, b::Set{S})
> @assert S ≡ dd1(a)
> new(a, b)
> end
> end
>
> Foo1{T,S}(a::T, b::Set{S}) = Foo1{T,S}(a,b)
>
> Foo1(1, Set([9.0])) # OK
> foo1(1, Set(9)) # error
>
> # second implementation: dd2 maps types to types
> # uses constructor to constrain, works
>
> dd2(::Type{Int}) = Float64
>
> immutable Foo2{T,S}
> a::T
> b::Set{S}
> function Foo2{T,S}(a::T, b::Set{S})
> @assert S ≡ dd2(T)
> new(a, b)
> end
> end
>
> Foo2{T,S}(a::T, b::Set{S}) = Foo2{T,S}(a,b)
>
> Foo2(1, Set([9.0])) # OK
> Foo2(1, Set(9)) # error
>
> # third implementation, types to types
>
> immutable Foo3{T,S}
> a::T
> b::Set{dd2(T)}
> end
> ## ERROR: MethodError: no method matching dd2(::TypeVar)
>


[julia-users] How would you implement setindices! elegenatly?

2016-10-26 Thread Tsur Herman
What would you suggest is a fast and elegant way to achieve indexing into 
an array using a set of indices?

function setindices!(A,Values,Indices)
assert(length(Values) == size(Indices,1))
for i=1:length(Values)
setindex!(A,Values[i],(Indices[i,:]...)...)
end
end

I am currently using this function and I was wondering whether I missed 
something.



[julia-users] Re: CoinOptServices

2016-10-26 Thread Tony Kelman
Look at the actual logs. It installs fine, just has a handful of known test 
failures that are due to bugs in the upstream library. Something is preventing 
the lapack dll from being overwritten on your system. That's not a problem 
that's been seen anywhere else as far as I'm aware.

Re: [julia-users] Re: CoinOptServices

2016-10-26 Thread Isaiah Norton
>
> Something is preventing the lapack dll from being overwritten on your
> system.


Try Process Explorer (
https://technet.microsoft.com/en-us/sysinternals/processexplorer.aspx)

  "Find" menu -> "Find a Handle or DLL"

  search for "liblapack" and look at what process owns the handle.

On Wed, Oct 26, 2016 at 9:55 AM, Tony Kelman  wrote:

> Look at the actual logs. It installs fine, just has a handful of known
> test failures that are due to bugs in the upstream library. Something is
> preventing the lapack dll from being overwritten on your system. That's not
> a problem that's been seen anywhere else as far as I'm aware.


[julia-users] Re: Which data structure do you suggest for handling this data?

2016-10-26 Thread Michael Borregaard
That depends a lot on what analyses you want to do with it afterwards - you 
could have an array (of species) of an array (of points) of tuples (the x 
and y), which is the most straigthforward thing. 

For must uses I would probably use a sparse Boolean matrix, e.g.
visits = [sparse([1,4,8], [3,5,9], true), sparse([4,2],[3,5], true)]




Re: [julia-users] Re: Comprehension (generator) with statement IF and the number of true

2016-10-26 Thread Gregory Salvan
2016-10-26 13:09 GMT+02:00 DNF :

> I don't have the impression that reduce is slow. The reduce function that
> you're using is complicated and may have features that preclude
> optimizations, such as vectorization.
>

I don't know exactly why, the difference is bigger than what I was
expected. for example with A and F = rand(100_000_000) I have:

mapeBase_v1
BenchmarkTools.Trial:
  samples:  26
  evals/sample: 1
  time tolerance:   5.00%
  memory tolerance: 1.00%
  memory estimate:  32.00 bytes
  allocs estimate:  1
  minimum time: 194.51 ms (0.00% GC)
  median time:  197.77 ms (0.00% GC)
  mean time:198.77 ms (0.00% GC)
  maximum time: 220.32 ms (0.00% GC)
mapeBase_v4
BenchmarkTools.Trial:
  samples:  1
  evals/sample: 1
  time tolerance:   5.00%
  memory tolerance: 1.00%
  memory estimate:  37.25 gb
  allocs estimate:  178401
  minimum time: 58.77 s (3.04% GC)
  median time:  58.77 s (3.04% GC)
  mean time:58.77 s (3.04% GC)
  maximum time: 58.77 s (3.04% GC)


If you have tips to help me understand this huge difference and eventually
optimize (I've tried to look at llvm ir but it's quite hard for my level,
I've just noted a lot of "store" but don't understand why it's done this
way)



>
> But perhaps more importantly, the reduce version, while probably very
> clever, is almost completely impossible to understand. I know what it's
> supposed to do, and I still cannot decipher it, while the straight loop is
> crystal clear and easy to understand. And almost as concise!
>

"crystal clear"... depends on your background and habits.
V4 is more natural for me than V1, probably because when I need a single
result (sum, abs...) from a list of values my first option is always
reduce, and I assimilate for loop with kind of "repeat something for each
of these values"
Then I also avoid nested blocks and use a lot guard clauses at the point I
read them as a part of function signature (by default I would naturally
extract v1 for loop content to a function with a guard clause), so my eyes
only catch the operation used to reduce the list in the form of the
expected result.

This is not adapted to julia and I have to change these habits which is not
a problem as julia is such a pleasure to use.


[julia-users] Re: ImageView very slow

2016-10-26 Thread Josef Heinen
Using GR (for the image display) should be fast enough:

using TestImages
using GR

img = testimage("cameraman")
intensities = reshape(reshape(float(img.data[:]), 512, 512)

for i in 1:10
tic(); imshow(intensities, colormap=GR.COLORMAP_GRAY); toc() 
end


% julia img.jl 

elapsed time: 1.190862896 seconds

elapsed time: 0.007231715 seconds

elapsed time: 0.013265573 seconds

elapsed time: 0.00677057 seconds

elapsed time: 0.012534283 seconds

elapsed time: 0.010761427 seconds

elapsed time: 0.00731559 seconds

elapsed time: 0.009606974 seconds

elapsed time: 0.007050752 seconds

elapsed time: 0.008927604 seconds

The first call is slower because the window has to be set up.




On Sunday, October 16, 2016 at 6:45:00 PM UTC+2, Paul B. wrote:
>
> Hello, all.  Starting out with Julia.
>
> I need to display some pseudo-color images so I'm playing around with the 
> ImageView package.  It seems to be running very slowly.  Displaying one of 
> the images from TestImages can take nearly a minute:
> img = testimage( "cameraman" )
> Gray Images.Image with:
>   data: 512×512 Array{ColorTypes.Gray{FixedPointNumbers.UFixed{UInt8,8}},2
> }
>   properties:
> colorspace: Gray
> spatialorder:  x y
>
> julia> tic(); ImageView.view( img ); toc();
> elapsed time: 50.552471225 seconds
> Zooming and other interaction with the mouse is similarly sluggish.
>
> I didn't expect this for a 512x512 grayscale image.  I am running Julia 
> version 0.5.1-pre+2 and ImageView is running into some issues with 
> deprecated functionality and namespace conflicts.  However, the above did 
> not generate any warnings at all but still took 50 seconds to display.  
> This is all under Linux.  Any ideas why this is happening or if I could be 
> doing something wrong?
>


[julia-users] Re: How would you implement setindices! elegenatly?

2016-10-26 Thread Cedric St-Jean
A[indices] = Values

?

On Wednesday, October 26, 2016 at 9:53:17 AM UTC-4, Tsur Herman wrote:
>
> What would you suggest is a fast and elegant way to achieve indexing into 
> an array using a set of indices?
>
> function setindices!(A,Values,Indices)
> assert(length(Values) == size(Indices,1))
> for i=1:length(Values)
> setindex!(A,Values[i],(Indices[i,:]...)...)
> end
> end
>
> I am currently using this function and I was wondering whether I missed 
> something.
>
>

Re: [julia-users] Re: ImageView very slow

2016-10-26 Thread Tom Breloff
And of course you can always plot an image as well:

using Plots, TestImages
plot(testimage("cameraman"))

On Wed, Oct 26, 2016 at 11:04 AM, Josef Heinen  wrote:

> Using GR (for the image display) should be fast enough:
>
> using TestImages
> using GR
>
> img = testimage("cameraman")
> intensities = reshape(reshape(float(img.data[:]), 512, 512)
>
> for i in 1:10
> tic(); imshow(intensities, colormap=GR.COLORMAP_GRAY); toc()
> end
>
>
> % julia img.jl
>
> elapsed time: 1.190862896 seconds
>
> elapsed time: 0.007231715 seconds
>
> elapsed time: 0.013265573 seconds
>
> elapsed time: 0.00677057 seconds
>
> elapsed time: 0.012534283 seconds
>
> elapsed time: 0.010761427 seconds
>
> elapsed time: 0.00731559 seconds
>
> elapsed time: 0.009606974 seconds
>
> elapsed time: 0.007050752 seconds
>
> elapsed time: 0.008927604 seconds
>
> The first call is slower because the window has to be set up.
>
>
> 
>
>
> On Sunday, October 16, 2016 at 6:45:00 PM UTC+2, Paul B. wrote:
>>
>> Hello, all.  Starting out with Julia.
>>
>> I need to display some pseudo-color images so I'm playing around with the
>> ImageView package.  It seems to be running very slowly.  Displaying one of
>> the images from TestImages can take nearly a minute:
>> img = testimage( "cameraman" )
>> Gray Images.Image with:
>>   data: 512×512 Array{ColorTypes.Gray{FixedPointNumbers.UFixed{UInt8,8}},
>> 2}
>>   properties:
>> colorspace: Gray
>> spatialorder:  x y
>>
>> julia> tic(); ImageView.view( img ); toc();
>> elapsed time: 50.552471225 seconds
>> Zooming and other interaction with the mouse is similarly sluggish.
>>
>> I didn't expect this for a 512x512 grayscale image.  I am running Julia
>> version 0.5.1-pre+2 and ImageView is running into some issues with
>> deprecated functionality and namespace conflicts.  However, the above did
>> not generate any warnings at all but still took 50 seconds to display.
>> This is all under Linux.  Any ideas why this is happening or if I could be
>> doing something wrong?
>>
>


Re: [julia-users] Re: ImageView very slow

2016-10-26 Thread Josef Heinen
... which looks more convenient :-)

On Wednesday, October 26, 2016 at 5:21:01 PM UTC+2, Tom Breloff wrote:
>
> And of course you can always plot an image as well:
>
> using Plots, TestImages
> plot(testimage("cameraman"))
>
>

[julia-users] Re: CoinOptServices

2016-10-26 Thread Frank Kampas
Process Explorer does not indicate that lapack is being run when the 
problem occurs. 
I do have mingw installed elsewhere on my computer.


[julia-users] Using SQLBulkOperations in ODBC.jl

2016-10-26 Thread Terry Seaward
Hi,

How could one use the SQLBulkOperations function in ODBC.jl to insert a 
DataFrame into a table?

Additional ref: 
https://msdn.microsoft.com/en-us/library/ms712471(v=vs.85).aspx

- TS


Re: [julia-users] Re: CoinOptServices

2016-10-26 Thread Isaiah Norton
>
> Process Explorer does not indicate that lapack is being run when the
> problem occurs.


Does
  Find -> Find a Handle or DLL -> "liblapack"

Return any results? The goal is to look for any open handle to
"liblapack.dll", which would lead to the "Can not delete" error indicated
in the posted error log. (I would not expect "liblapack" to ever be listed
in the main Process list)

If the search does not return any results, then the "Can not delete" error
may have a different cause.

On Wed, Oct 26, 2016 at 11:39 AM, Frank Kampas  wrote:

> Process Explorer does not indicate that lapack is being run when the
> problem occurs.
> I do have mingw installed elsewhere on my computer.
>


Re: [julia-users] Using SQLBulkOperations in ODBC.jl

2016-10-26 Thread Jacob Quinn
As long as your DB table is created correctly (i.e. correct types), you can
do

ODBC.load(dsn, "table_name", df)

More docs here: http://juliadb.github.io/ODBC.jl/stable/#ODBC.load-1



On Wed, Oct 26, 2016 at 9:49 AM, Terry Seaward 
wrote:

> Hi,
>
> How could one use the SQLBulkOperations function in ODBC.jl to insert a
> DataFrame into a table?
>
> Additional ref: https://msdn.microsoft.com/en-us/library/ms712471(v=
> vs.85).aspx
>
> - TS
>


[julia-users] Re: CoinOptServices

2016-10-26 Thread Frank Kampas

Handle or Dll substring "liblapack" returned 0 matching items


[julia-users] Matlabs scatteredInterpolant for julia?

2016-10-26 Thread Markus F.
Hi,
i use matlab at the moment, but want to chance to julia (opensource...).

In one of my programms i have to grid and interpolate scattered data 
(x,y-coordinates and internisity data of an image) to a regular grid.
In matlab my code looks like:

[x,y]=meshgrid(xmin:stepy:xmax,ymin:stepy:ymax);
 F=scatteredInterpolant(pc.xdata, pc.ydata, pc.idata,'natural');
interp_image=F(x,y);

Is there any nice and easy way to do that in julia?

thanks and best regards,
Markus


[julia-users] How do the file name / module name mapping rules work?

2016-10-26 Thread mail


Using the example package https://github.com/JuliaLang/Example.jl/ I am 
wondering:


the root level name ~/Example.jl is case-insensitive and the .jl suffix is 
optional i.e. if I rename ~/Example.jl to ~/example it still works.


Changing ~/Example.jl to ~/fobar and it breaks.


However, ~/Example.jl/src/Example.jl is not case-insensitive and the .jl suffix 
is mandatory ...


And how is the source tree searched? - the docs are a bit patchy ...




[julia-users] cscope like tool

2016-10-26 Thread Ajay Mendez
Looking for a tool to grok large projects, a la cscope. 
methods(method_name) is good but insufficient. For those unfamiliar with 
cscope, it allows the following queries:

Find this C symbol:
Find this global definition:
Find functions called by this function:
Find functions calling this function:
Find this text string:
Change this text string:
Find this egrep pattern:
Find this file:
Find files #including this file:
Find assignments to this symbol:



Re: [julia-users] Re: Nemo AcbField error

2016-10-26 Thread digxx
Hey, I'm not sure what u mean, but this time (as u wanted me to) I started 
Julia directly and not via cygwin terminal (that was were I couldnt even 
build nemo)
starting julia from cygwin terminal I can build nemo. it's just that when I 
start nemo I get this error:
ERROR: error compiling ArbField: error compiling Type: could not load 
library "libarb"
when trying to use ArbField or AcbField...

Am Mittwoch, 26. Oktober 2016 01:42:51 UTC+2 schrieb Jeffrey Sarnoff:
>
> What happens if you restart that Julia from the windows menu (if that does 
> not launch cygwin terminal)
> and  do >Pkg.build("Nemo") again?
>
> On Tue, Oct 25, 2016 at 7:37 PM, digxx 
> > wrote:
>
>> Sry but I followed precisely ur steps i.e.:
>> I installed a completely new version in D:\Julia\Julia-0.5.0 and added an 
>> environment variable JULIA_PKGDIR within D:\Julia because I didn't like the 
>> default one.
>> I then initialized by Pkg.init()
>> I ran Pkg.update()  (prob not needed here coz its new)
>> I ran: Pkg.clone("https://github.com/Nemocas/Nemo.jl";)
>> I exitted and restarted julia
>> I ran: Pkg.build("Nemo") and stumbled across:
>>
>> julia> Pkg.build("Nemo")
>> INFO: Building Nemo
>> WARNING: `@windows` is deprecated, use `@static is_windows()` instead
>>  in depwarn(::String, ::Symbol) at .\deprecated.jl:64
>>  in @windows(::Any, ::Any) at .\deprecated.jl:472
>>  in include_from_node1(::String) at .\loading.jl:488
>>  in evalfile(::String, ::Array{String,1}) at .\loading.jl:504 (repeats 2 
>> times)
>>  in cd(::##2#4, ::String) at .\file.jl:48
>>  in (::##1#3)(::IOStream) at .\none:13
>>  in open(::##1#3, ::String, ::String) at .\iostream.jl:113
>>  in eval(::Module, ::Any) at .\boot.jl:234
>>  in process_options(::Base.JLOptions) at .\client.jl:239
>>  in _start() at .\client.jl:318
>> while loading D:\Julia\v0.5\Nemo\deps\build.jl, in expression starting on 
>> line 1
>> ===[
>>  
>> ERROR: Nemo 
>> ]===
>>
>> LoadError: chdir D:\Julia\v0.5\Nemo\deps\antic: no such file or directory 
>> (ENOENT)
>> while loading D:\Julia\v0.5\Nemo\deps\build.jl, in expression starting on 
>> line 121
>>
>>
>> =
>>
>> ==[
>>  
>> BUILD ERRORS 
>> ]===
>>
>> WARNING: Nemo had build errors.
>>
>>  - packages with build errors remain installed in D:\Julia\v0.5
>>  - build the package(s) and all dependencies with `Pkg.build("Nemo")`
>>  - build a single package by running its `deps/build.jl` script
>>
>>
>> =
>>
>>
>

Re: [julia-users] Re: Nemo AcbField error

2016-10-26 Thread digxx

>
>
> On 26 October 2016 at 01:43, Jeffrey Sarnoff  > wrote:
>
>> send me all the messages output, please
>>
>
that were all the messages... 


Re: [julia-users] Re: Nemo AcbField error

2016-10-26 Thread digxx


Am Mittwoch, 26. Oktober 2016 09:23:36 UTC+2 schrieb Bill Hart:
>
> This is probably because Git is not in your path. We still haven't 
> switched to libgit, which means the build script for Nemo still relies on 
> Git being available on your machine.
>
> Bill.
>

Git  in the path means Git in D:\Julia in this case?


Re: [julia-users] Re: Nemo AcbField error

2016-10-26 Thread digxx
I do have Gitbash installed for some reason, but I never used it and it's 
in c:\programs
Sorry for that stupid question but u mean put the folder with git-cmd.exe 
or git-bash.exe as an environment variable


Re: [julia-users] Re: Nemo AcbField error

2016-10-26 Thread 'Bill Hart' via julia-users
I mean as an environment variable, specifically PATH. Alternatively you can
just remove the lines from Nemo/deps/build.jl that run git. The source code
is not needed on Windows. We only download it for you to keep in the spirit
of the LGPL license, i.e. to supply you the source code for the software
you are using.

Bill.

On 26 October 2016 at 20:40, digxx  wrote:

> I do have Gitbash installed for some reason, but I never used it and it's
> in c:\programs
> Sorry for that stupid question but u mean put the folder with git-cmd.exe
> or git-bash.exe as an environment variable
>


Re: [julia-users] Re: Nemo AcbField error

2016-10-26 Thread Jeffrey Sarnoff
Your question is not at all silly.  Forget about the gitbash installation 
-- *remove it*.   
Download the new git installer from : this web page 
 and when it has downloaded, run it.
Then open a terminal window and type `git --version`.  If you see something 
meaningful, try rebuilding Nemo.  
Otherwise, add the location of git.exe to your path. (if you need help with 
that, ask).
And let us know what happens.

On Wednesday, October 26, 2016 at 2:40:48 PM UTC-4, digxx wrote:
>
> I do have Gitbash installed for some reason, but I never used it and it's 
> in c:\programs
> Sorry for that stupid question but u mean put the folder with git-cmd.exe 
> or git-bash.exe as an environment variable
>


Re: [julia-users] Re: Nemo AcbField error

2016-10-26 Thread digxx


Am Mittwoch, 26. Oktober 2016 20:51:48 UTC+2 schrieb Bill Hart:
>
> I mean as an environment variable, specifically PATH. Alternatively you 
> can just remove the lines from Nemo/deps/build.jl that run git. The source 
> code is not needed on Windows. We only download it for you to keep in the 
> spirit of the LGPL license, i.e. to supply you the source code for the 
> software you are using.
>
> Bill.
>

Hey,
So I just removed the lines:

#=
try
  run(`git clone https://github.com/wbhart/antic.git`)
catch
  cd(joinpath("$wdir", "antic"))
  run(`git pull`)
end  

cd(wdir)

# install FLINT
try
  run(`git clone https://github.com/wbhart/flint2.git`)
catch
  cd(joinpath("$wdir", "flint2"))
  run(`git pull`)
end  
=# 

#=
try
  run(`git clone https://github.com/fredrik-johansson/arb.git`)
catch
  cd(joinpath("$wdir", "arb"))
  run(`git pull`)
  cd(wdir)
end
=# 

So u mean these are not needed for the installation of Nemo on windows???
But the last one runs some arb sth...Dont I need it?
The building works now and I can run Nemo but I ask about the arb sth bcoz 
now on the new Julia version I again get the error:

julia> using Nemo

Welcome to Nemo version 0.5.1

Nemo comes with absolutely no warranty whatsoever


julia> r=ArbField(64)
Real Field with 64 bits of precision and error bounds

julia> r(1)
ERROR: error compiling ArbField: error compiling Type: could not load 
library "libarb"
t



[julia-users] a default module name?

2016-10-26 Thread Ryan Gardner
say I have code:


type foo
   a
end

module MyModule
   #how do I use foo here?
   #can I
   import .foo
   #??
end

There must be a way to use global types in modules.  Is there a name for 
the "global module" (if you will).  Thanks.



Re: [julia-users] Re: Comprehension (generator) with statement IF and the number of true

2016-10-26 Thread DNF
Actually, I see only a very marginal performance difference between your 
mapeBase_v4 (the first v4, don't know about the second v4) and the loop 
version, roughly 10%. Not sure why you're seeing a big difference.

As for the "crystal clear" thing: my background is almost 20 years of heavy 
Matlab use. Cryptic one-liners and contorted vectorizations are second 
nature to me. Quite often, reduce and generators make things easier and 
clearer, but not this time, even for me.


On Wednesday, October 26, 2016 at 4:55:45 PM UTC+2, Gregory Salvan wrote:
>
> 2016-10-26 13:09 GMT+02:00 DNF >:
>
>> I don't have the impression that reduce is slow. The reduce function that 
>> you're using is complicated and may have features that preclude 
>> optimizations, such as vectorization.
>>
>
> I don't know exactly why, the difference is bigger than what I was 
> expected. for example with A and F = rand(100_000_000) I have:
>
> mapeBase_v1
> BenchmarkTools.Trial: 
>   samples:  26
>   evals/sample: 1
>   time tolerance:   5.00%
>   memory tolerance: 1.00%
>   memory estimate:  32.00 bytes
>   allocs estimate:  1
>   minimum time: 194.51 ms (0.00% GC)
>   median time:  197.77 ms (0.00% GC)
>   mean time:198.77 ms (0.00% GC)
>   maximum time: 220.32 ms (0.00% GC)
> mapeBase_v4
> BenchmarkTools.Trial: 
>   samples:  1
>   evals/sample: 1
>   time tolerance:   5.00%
>   memory tolerance: 1.00%
>   memory estimate:  37.25 gb
>   allocs estimate:  178401
>   minimum time: 58.77 s (3.04% GC)
>   median time:  58.77 s (3.04% GC)
>   mean time:58.77 s (3.04% GC)
>   maximum time: 58.77 s (3.04% GC)
>
>
> If you have tips to help me understand this huge difference and eventually 
> optimize (I've tried to look at llvm ir but it's quite hard for my level, 
> I've just noted a lot of "store" but don't understand why it's done this 
> way)
>
>  
>
>>
>> But perhaps more importantly, the reduce version, while probably very 
>> clever, is almost completely impossible to understand. I know what it's 
>> supposed to do, and I still cannot decipher it, while the straight loop is 
>> crystal clear and easy to understand. And almost as concise!
>>
>
> "crystal clear"... depends on your background and habits.
> V4 is more natural for me than V1, probably because when I need a single 
> result (sum, abs...) from a list of values my first option is always 
> reduce, and I assimilate for loop with kind of "repeat something for each 
> of these values"
> Then I also avoid nested blocks and use a lot guard clauses at the point I 
> read them as a part of function signature (by default I would naturally 
> extract v1 for loop content to a function with a guard clause), so my eyes 
> only catch the operation used to reduce the list in the form of the 
> expected result.
>
> This is not adapted to julia and I have to change these habits which is 
> not a problem as julia is such a pleasure to use.
>
>  
>


[julia-users] Re: How do the file name / module name mapping rules work?

2016-10-26 Thread Jeffrey Sarnoff
A cleaner tack, for the moment is follow this general approach

package name: MyPackagedModule.jl  
package content on github  

repositiory: https://github.com//MyPackagedModule.jl  

files/directories  
at the top level of the repository the files  
LICENSE  
README.md  

at the top level of the repository the directories  
`src`  
`test`  


in `test`, a file named runtests.jl with the lines:   
using Base.test  
using MyPackagedModule  
# and eventually some actual tests  

in `src`, a file with the same name as the package:  
MyPackagedModule.jl  

that looks like this:  

```julia
module MyPackagedModule

# possibly
# capabilities you need to use or you need to specialize for your use
import Base: *function_name, function_name *

# and make what you create available outside of the package's inside
export MyPackgedType, MyPackagedFunction

# include your code, software that exists in separate files
# keeping this source file clean and neat
include("mytype,jl")
include("myfunction.jl")
# or better yet, but them in a subdirectory of `src`
# if that subdirectory is named `implementation`
include("implemention/mytype,jl")
include("implementation/myfunction.jl")


end # module MyPackagedModule
```

On Wednesday, October 26, 2016 at 1:44:34 PM UTC-4, ma...@maasha.dk wrote:
>
> Using the example package https://github.com/JuliaLang/Example.jl/ I am 
> wondering:
>
>
> the root level name ~/Example.jl is case-insensitive and the .jl suffix 
> is optional i.e. if I rename ~/Example.jl to ~/example it still works.
>
>
> Changing ~/Example.jl to ~/fobar and it breaks.
>
>
> However, ~/Example.jl/src/Example.jl is not case-insensitive and the .jl 
> suffix 
> is mandatory ...
>
>
> And how is the source tree searched? - the docs are a bit patchy ...
>
>
>

Re: [julia-users] Re: Nemo AcbField error

2016-10-26 Thread 'Bill Hart' via julia-users
And you are not running it inside the Cygwin shell now?

If not, then I honestly don't know why this is happening. As Jeffrey says,
it doesn't happen on his Windows. And no, you don't require the arb source
code on Windows.

There does seem to be a problem on some versions of Windows whereby the
.dll files are cached by the operating system, so that when you download
them, it just gets them from cache and not from our website. I thought we
fixed that issue, but maybe your Windows is particularly resistant to our
fix.

Try deleting all the .dll files in Nemo/local/lib and replacing them with
the following files

http://nemocas.org/binaries/w64-libflint.dll
http://nemocas.org/binaries/w64-libgmp-10.dll
http://nemocas.org/binaries/w64-libgmp-16.dll
http://nemocas.org/binaries/w64-libmpfr-4.dll
http://nemocas.org/binaries/w64-libpari.dll
http://nemocas.org/binaries/w64-libarb.dll
http://nemocas.org/binaries/w64-libwinpthread-1.dll

Note that you will have to rename them all manually. You can see what they
should be renamed to in build.jl. Of course I'm assuming you have 64 bit
Windows. Otherwise you should replace all the w64's with w32 in the above.

Bill.

On 26 October 2016 at 21:17, digxx  wrote:

>
>
> Am Mittwoch, 26. Oktober 2016 20:51:48 UTC+2 schrieb Bill Hart:
>>
>> I mean as an environment variable, specifically PATH. Alternatively you
>> can just remove the lines from Nemo/deps/build.jl that run git. The source
>> code is not needed on Windows. We only download it for you to keep in the
>> spirit of the LGPL license, i.e. to supply you the source code for the
>> software you are using.
>>
>> Bill.
>>
>
> Hey,
> So I just removed the lines:
>
> #=
> try
>   run(`git clone https://github.com/wbhart/antic.git`
> )
> catch
>   cd(joinpath("$wdir", "antic"))
>   run(`git pull`)
> end
>
> cd(wdir)
>
> # install FLINT
> try
>   run(`git clone https://github.com/wbhart/flint2.git`
> )
> catch
>   cd(joinpath("$wdir", "flint2"))
>   run(`git pull`)
> end
> =#
>
> #=
> try
>   run(`git clone https://github.com/fredrik-johansson/arb.git`
> )
> catch
>   cd(joinpath("$wdir", "arb"))
>   run(`git pull`)
>   cd(wdir)
> end
> =#
>
> So u mean these are not needed for the installation of Nemo on windows???
> But the last one runs some arb sth...Dont I need it?
> The building works now and I can run Nemo but I ask about the arb sth bcoz
> now on the new Julia version I again get the error:
>
> julia> using Nemo
>
> Welcome to Nemo version 0.5.1
>
> Nemo comes with absolutely no warranty whatsoever
>
>
> julia> r=ArbField(64)
> Real Field with 64 bits of precision and error bounds
>
> julia> r(1)
> ERROR: error compiling ArbField: error compiling Type: could not load
> library "libarb"
> t
>
>


Re: [julia-users] Re: Nemo AcbField error

2016-10-26 Thread digxx

>
>
>
> Am Mittwoch, 26. Oktober 2016 21:40:22 UTC+2 schrieb Jeffrey Sarnoff:
>>
>> you commented out too much -- try the other way
>> uncomment the Nemo build file and remove the old git-bash and install the 
>> new git -- etc.
>>
>
actually I'm doing that already atm.. 


Re: [julia-users] Re: Nemo AcbField error

2016-10-26 Thread digxx
ooops... u meant the:
cd(wdir) 
right?
I completely overlooked that..wait a sec

Am Mittwoch, 26. Oktober 2016 21:40:22 UTC+2 schrieb Jeffrey Sarnoff:
>
> you commented out too much -- try the other way
> uncomment the Nemo build file and remove the old git-bash and install the 
> new git -- etc.
>
>
> On Wed, Oct 26, 2016 at 3:17 PM, digxx 
> > wrote:
>
>>
>>
>> Am Mittwoch, 26. Oktober 2016 20:51:48 UTC+2 schrieb Bill Hart:
>>>
>>> I mean as an environment variable, specifically PATH. Alternatively you 
>>> can just remove the lines from Nemo/deps/build.jl that run git. The source 
>>> code is not needed on Windows. We only download it for you to keep in the 
>>> spirit of the LGPL license, i.e. to supply you the source code for the 
>>> software you are using.
>>>
>>> Bill.
>>>
>>
>> Hey,
>> So I just removed the lines:
>>
>> #=
>> try
>>   run(`git clone https://github.com/wbhart/antic.git` 
>> )
>> catch
>>   cd(joinpath("$wdir", "antic"))
>>   run(`git pull`)
>> end  
>>
>> cd(wdir)
>>
>> # install FLINT
>> try
>>   run(`git clone https://github.com/wbhart/flint2.git` 
>> )
>> catch
>>   cd(joinpath("$wdir", "flint2"))
>>   run(`git pull`)
>> end  
>> =# 
>>
>> #=
>> try
>>   run(`git clone https://github.com/fredrik-johansson/arb.git` 
>> )
>> catch
>>   cd(joinpath("$wdir", "arb"))
>>   run(`git pull`)
>>   cd(wdir)
>> end
>> =# 
>>
>> So u mean these are not needed for the installation of Nemo on windows???
>> But the last one runs some arb sth...Dont I need it?
>> The building works now and I can run Nemo but I ask about the arb sth 
>> bcoz now on the new Julia version I again get the error:
>>
>> julia> using Nemo
>>
>> Welcome to Nemo version 0.5.1
>>
>> Nemo comes with absolutely no warranty whatsoever
>>
>>
>> julia> r=ArbField(64)
>> Real Field with 64 bits of precision and error bounds
>>
>> julia> r(1)
>> ERROR: error compiling ArbField: error compiling Type: could not load 
>> library "libarb"
>> t 
>>
>>
>

Re: [julia-users] Re: Nemo AcbField error

2016-10-26 Thread Jeffrey Sarnoff
you commented out too much -- try the other way
uncomment the Nemo build file and remove the old git-bash and install the
new git -- etc.


On Wed, Oct 26, 2016 at 3:17 PM, digxx  wrote:

>
>
> Am Mittwoch, 26. Oktober 2016 20:51:48 UTC+2 schrieb Bill Hart:
>>
>> I mean as an environment variable, specifically PATH. Alternatively you
>> can just remove the lines from Nemo/deps/build.jl that run git. The source
>> code is not needed on Windows. We only download it for you to keep in the
>> spirit of the LGPL license, i.e. to supply you the source code for the
>> software you are using.
>>
>> Bill.
>>
>
> Hey,
> So I just removed the lines:
>
> #=
> try
>   run(`git clone https://github.com/wbhart/antic.git`
> )
> catch
>   cd(joinpath("$wdir", "antic"))
>   run(`git pull`)
> end
>
> cd(wdir)
>
> # install FLINT
> try
>   run(`git clone https://github.com/wbhart/flint2.git`
> )
> catch
>   cd(joinpath("$wdir", "flint2"))
>   run(`git pull`)
> end
> =#
>
> #=
> try
>   run(`git clone https://github.com/fredrik-johansson/arb.git`
> )
> catch
>   cd(joinpath("$wdir", "arb"))
>   run(`git pull`)
>   cd(wdir)
> end
> =#
>
> So u mean these are not needed for the installation of Nemo on windows???
> But the last one runs some arb sth...Dont I need it?
> The building works now and I can run Nemo but I ask about the arb sth bcoz
> now on the new Julia version I again get the error:
>
> julia> using Nemo
>
> Welcome to Nemo version 0.5.1
>
> Nemo comes with absolutely no warranty whatsoever
>
>
> julia> r=ArbField(64)
> Real Field with 64 bits of precision and error bounds
>
> julia> r(1)
> ERROR: error compiling ArbField: error compiling Type: could not load
> library "libarb"
> t
>
>


[julia-users] Re: a default module name?

2016-10-26 Thread Ryan Gardner
Oh, Main

import Main.foo

Thanks.

On Wednesday, October 26, 2016 at 3:27:50 PM UTC-4, Ryan Gardner wrote:
>
> say I have code:
>
>
> type foo
>a
> end
>
> module MyModule
>#how do I use foo here?
>#can I
>import .foo
>#??
> end
>
> There must be a way to use global types in modules.  Is there a name for 
> the "global module" (if you will).  Thanks.
>
>

[julia-users] Re: Binary read

2016-10-26 Thread Aleksandr Mikheev
So, to avoid the opening a new thread I will write here again. It seems I 
still have a problem which I cannot solve. I use 

a_million_floats = read(f, Float64, 1_000_000)


as it was suggested, however the numbers I get are obviously wrong (there 
are numbers like 8.68e+272, -5.39e-142, and even NaN). I am pretty that 
these are not the right numbers. Also, I am pretty sure that the type is 
correct (it should be 'double' in C/C++). Furthermore, I have i5 CPU, so it 
should be little endian as it is supposed in .dat file. What could be wrong?

Thanks in advance!


Re: [julia-users] Re: a default module name?

2016-10-26 Thread Yichao Yu
On Wed, Oct 26, 2016 at 3:46 PM, Ryan Gardner  wrote:
> Oh, Main
>
> import Main.foo


import ..foo

>
> Thanks.
>
>
> On Wednesday, October 26, 2016 at 3:27:50 PM UTC-4, Ryan Gardner wrote:
>>
>> say I have code:
>>
>>
>> type foo
>>a
>> end
>>
>> module MyModule
>>#how do I use foo here?
>>#can I
>>import .foo
>>#??
>> end
>>
>> There must be a way to use global types in modules.  Is there a name for
>> the "global module" (if you will).  Thanks.
>>
>


[julia-users] Re: How would you implement setindices! elegenatly?

2016-10-26 Thread Tsur Herman
julia> A=rand(4,4)
4×4 Array{Float64,2}:
 0.427998   0.720987  0.375013  0.432887
 0.0333443  0.602459  0.946685  0.817995
 0.402635   0.571399  0.553542  0.0234215
 0.707829   0.339795  0.451387  0.358248


julia> ind = [1 1; 2 2; 3 3]
3×2 Array{Int64,2}:
 1  1
 2  2
 3  3


julia> A[ind]
3×2 Array{Float64,2}:
 0.427998   0.427998
 0.0333443  0.0333443
 0.402635   0.402635



julia>

On Wednesday, October 26, 2016 at 6:19:45 PM UTC+3, Cedric St-Jean wrote:
>
> A[indices] = Values
>
> ?
>
> On Wednesday, October 26, 2016 at 9:53:17 AM UTC-4, Tsur Herman wrote:
>>
>> What would you suggest is a fast and elegant way to achieve indexing into 
>> an array using a set of indices?
>>
>> function setindices!(A,Values,Indices)
>> assert(length(Values) == size(Indices,1))
>> for i=1:length(Values)
>> setindex!(A,Values[i],(Indices[i,:]...)...)
>> end
>> end
>>
>> I am currently using this function and I was wondering whether I missed 
>> something.
>>
>>

Re: [julia-users] Re: Binary read

2016-10-26 Thread Stefan Karpinski
Do you have an example where you have the file and you know what the data
should be? You may want to look at the data in a hex editor and try to
figure out what's going on.

On Wed, Oct 26, 2016 at 4:06 PM, Aleksandr Mikheev 
wrote:

> So, to avoid the opening a new thread I will write here again. It seems I
> still have a problem which I cannot solve. I use
>
> a_million_floats = read(f, Float64, 1_000_000)
>
>
> as it was suggested, however the numbers I get are obviously wrong (there
> are numbers like 8.68e+272, -5.39e-142, and even NaN). I am pretty that
> these are not the right numbers. Also, I am pretty sure that the type is
> correct (it should be 'double' in C/C++). Furthermore, I have i5 CPU, so it
> should be little endian as it is supposed in .dat file. What could be wrong?
>
> Thanks in advance!
>


[julia-users] Function runs slow when called on new/different arguments?

2016-10-26 Thread Michael Wooley
Hi, I'm trying to speed up some code and have found something curious that 
I can't quite understand from the "performance tips" section. 

I understand that I shouldn't time my code on the first run because that 
will include compilation time and so forth. 

The odd thing that I can't understand is that there seems to be a lot of 
overhead every time I pass an new argument to my function. So, e.g.,

# Create two instances of type test
test1 = test()
test2 = test()
# Run to get in cache - slow (as expected)
foo!(test1)
# Run again - fast (as expected)
foo!(test1)
# Run on test2   - Slow (not expected. should be fast because foo!() in 
cache?)
@time foo!(test2)
# Run on test2 again - fast (??)
@time foo!(test2)

I have used @code_warntype to try to get rid of type instability in my code 
to no avail. 

I know that the main bottleneck in my code is a triple-nested loop over 
large arrays.

I recognize that my pseudo-example is kind of vague but thought I'd try 
this first in case this sort of behavior is indicative of a basic issue 
that I've overlooked. I can provide my full code if that would be helpful. 
Thanks in advance! 


Re: [julia-users] Re: How would you implement setindices! elegenatly?

2016-10-26 Thread Cedric St-Jean
Ah, right, I hadn't read your definition carefully.

A[[CartesianIndex(1,1), CartesianIndex(2,3)]] = [0,0]

Seems to be working correctly. So given your ind matrix, we can do

A[mapslices(s->CartesianIndex(s...), ind, 2)]

but I doubt that it'll be very performant. Could you directly output
CartesianIndex objects?

On Wed, Oct 26, 2016 at 4:11 PM, Tsur Herman  wrote:

> julia> A=rand(4,4)
> 4×4 Array{Float64,2}:
>  0.427998   0.720987  0.375013  0.432887
>  0.0333443  0.602459  0.946685  0.817995
>  0.402635   0.571399  0.553542  0.0234215
>  0.707829   0.339795  0.451387  0.358248
>
>
> julia> ind = [1 1; 2 2; 3 3]
> 3×2 Array{Int64,2}:
>  1  1
>  2  2
>  3  3
>
>
> julia> A[ind]
> 3×2 Array{Float64,2}:
>  0.427998   0.427998
>  0.0333443  0.0333443
>  0.402635   0.402635
>
>
>
> julia>
>
> On Wednesday, October 26, 2016 at 6:19:45 PM UTC+3, Cedric St-Jean wrote:
>>
>> A[indices] = Values
>>
>> ?
>>
>> On Wednesday, October 26, 2016 at 9:53:17 AM UTC-4, Tsur Herman wrote:
>>>
>>> What would you suggest is a fast and elegant way to achieve indexing
>>> into an array using a set of indices?
>>>
>>> function setindices!(A,Values,Indices)
>>> assert(length(Values) == size(Indices,1))
>>> for i=1:length(Values)
>>> setindex!(A,Values[i],(Indices[i,:]...)...)
>>> end
>>> end
>>>
>>> I am currently using this function and I was wondering whether I missed
>>> something.
>>>
>>>


Re: [julia-users] Re: Nemo AcbField error

2016-10-26 Thread digxx
So, first of all it is (unfortunately) still not working...
What I did so far is this:
I removed my old GIT and installed the new one
I then removed Nemo within Julia and subsequently manually removed every 
nemo stuff I could find in folder v0.5
I then started Julia (@Bill: This time I'm running Julia terminal directly 
not via cygwin since Jeffrey asked to do it)
I ran: Pkg.update()
Restarting Julia
then: Pkg.clone("https://github.com/Nemocas/Nemo.jl";)
Restarting Julia
Pkg.build("Nemo")
Now since it finally found GIT it downloaded the antic, flint2 and arb 
stuff and builded Nemo.
Quitting Julia and replacing the files Bill linked above by the ones 
already present in the folder Nemo/local/lib (actually libgmp-10.dll was 
missing before)
Starting Julia and "using Nemo" with all the warnings
restarting Julia and "using Nemo" again with no warnings...
but then again:


julia> using Nemo

Welcome to Nemo version 0.5.1

Nemo comes with absolutely no warranty whatsoever


julia> rr=ArbField(64)
Real Field with 64 bits of precision and error bounds

julia> rr(1)
ERROR: error compiling ArbField: error compiling Type: could not load 
library "libarb"
RN

julia>


Re: [julia-users] Re: Nemo AcbField error

2016-10-26 Thread 'Bill Hart' via julia-users
Well, I'm mystified.

What version of Julia are you using? And what version of Windows? Is it 32
or 64 bit?

Bill.

On 26 October 2016 at 22:40, digxx  wrote:

> So, first of all it is (unfortunately) still not working...
> What I did so far is this:
> I removed my old GIT and installed the new one
> I then removed Nemo within Julia and subsequently manually removed every
> nemo stuff I could find in folder v0.5
> I then started Julia (@Bill: This time I'm running Julia terminal directly
> not via cygwin since Jeffrey asked to do it)
> I ran: Pkg.update()
> Restarting Julia
> then: Pkg.clone("https://github.com/Nemocas/Nemo.jl";)
> Restarting Julia
> Pkg.build("Nemo")
> Now since it finally found GIT it downloaded the antic, flint2 and arb
> stuff and builded Nemo.
> Quitting Julia and replacing the files Bill linked above by the ones
> already present in the folder Nemo/local/lib (actually libgmp-10.dll was
> missing before)
> Starting Julia and "using Nemo" with all the warnings
> restarting Julia and "using Nemo" again with no warnings...
> but then again:
>
>
> julia> using Nemo
>
> Welcome to Nemo version 0.5.1
>
> Nemo comes with absolutely no warranty whatsoever
>
>
> julia> rr=ArbField(64)
> Real Field with 64 bits of precision and error bounds
>
> julia> rr(1)
> ERROR: error compiling ArbField: error compiling Type: could not load
> library "libarb"
> RN
>
> julia>
>


Re: [julia-users] Re: Nemo AcbField error

2016-10-26 Thread digxx
I'm running Windows 10 Home 64-Bit Version and have the newest Julia 
version i.e. v0.5.0


Re: [julia-users] Re: Nemo AcbField error

2016-10-26 Thread digxx
It's weird coz in julia 0.4.x it was running without any problems...


[julia-users] One more effort

2016-10-26 Thread Jeffrey Sarnoff
I can compare my dirs and dll names with yours and we can replay the cold 
startup -- tomorrow.  I am away.

Jeffrey Sarnoff



[julia-users] Re: Function runs slow when called on new/different arguments?

2016-10-26 Thread Andrew
What's "slow?"

foo() is cached but @time isn't. Are you sure you're not timing the @time 
macro on your 3rd run?

On Wednesday, October 26, 2016 at 4:16:55 PM UTC-4, Michael Wooley wrote:
>
> Hi, I'm trying to speed up some code and have found something curious that 
> I can't quite understand from the "performance tips" section. 
>
> I understand that I shouldn't time my code on the first run because that 
> will include compilation time and so forth. 
>
> The odd thing that I can't understand is that there seems to be a lot of 
> overhead every time I pass an new argument to my function. So, e.g.,
>
> # Create two instances of type test
> test1 = test()
> test2 = test()
> # Run to get in cache - slow (as expected)
> foo!(test1)
> # Run again - fast (as expected)
> foo!(test1)
> # Run on test2   - Slow (not expected. should be fast because foo!() in 
> cache?)
> @time foo!(test2)
> # Run on test2 again - fast (??)
> @time foo!(test2)
>
> I have used @code_warntype to try to get rid of type instability in my 
> code to no avail. 
>
> I know that the main bottleneck in my code is a triple-nested loop over 
> large arrays.
>
> I recognize that my pseudo-example is kind of vague but thought I'd try 
> this first in case this sort of behavior is indicative of a basic issue 
> that I've overlooked. I can provide my full code if that would be helpful. 
> Thanks in advance! 
>


Re: [julia-users] Re: Binary read

2016-10-26 Thread Aleksandr Mikheev
Unfortunately, I do not. However, I am most definitely sure that everything 
is okay with file since it is a training file.

среда, 26 октября 2016 г., 23:17:00 UTC+3 пользователь Stefan Karpinski 
написал:
>
> Do you have an example where you have the file and you know what the data 
> should be? You may want to look at the data in a hex editor and try to 
> figure out what's going on.
>
> On Wed, Oct 26, 2016 at 4:06 PM, Aleksandr Mikheev  > wrote:
>
>> So, to avoid the opening a new thread I will write here again. It seems I 
>> still have a problem which I cannot solve. I use 
>>
>> a_million_floats = read(f, Float64, 1_000_000)
>>
>>
>> as it was suggested, however the numbers I get are obviously wrong (there 
>> are numbers like 8.68e+272, -5.39e-142, and even NaN). I am pretty that 
>> these are not the right numbers. Also, I am pretty sure that the type is 
>> correct (it should be 'double' in C/C++). Furthermore, I have i5 CPU, so it 
>> should be little endian as it is supposed in .dat file. What could be wrong?
>>
>> Thanks in advance!
>>
>
>

[julia-users] Pkg.add("IJulia") fails

2016-10-26 Thread bker
Complete newb here. Just trying to install IJulia for Jupyter. Installed 
Anaconda first, then Julia. When I try to install the IJulia package, I get 
the output below. I've tried removing everything and re-installing but I 
get the same result. Help!

   _
   _   _ _(_)_ |  A fresh approach to technical computing
  (_) | (_) (_)|  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.5.0 (2016-09-19 18:14 UTC)
 _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
|__/   |  x86_64-w64-mingw32

ERROR: SystemError: opening file D:\emacs\.julia_history: No such file or 
direct
ory
 in #systemerror#51 at .\error.jl:34 [inlined]
 in systemerror(::String, ::Bool) at .\error.jl:34
 in open(::String, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at 
.\iostream.jl:89
 in #setup_interface#30(::Bool, ::Array{Dict{Any,Any},1}, ::Function, 
::Base.REP
L.LineEditREPL) at .\REPL.jl:769
 in run_frontend(::Base.REPL.LineEditREPL, ::Base.REPL.REPLBackendRef) at 
.\REPL
.jl:898
 in run_repl(::Base.REPL.LineEditREPL, ::Base.##932#933) at .\REPL.jl:188
 in _start() at .\client.jl:360

INFO: Disabling history file for this session.
julia> Pkg.status()
INFO: Initializing package repository D:\emacs\.julia\v0.5
INFO: Cloning METADATA from https://github.com/JuliaLang/METADATA.jl
No packages installed

julia> Pkg.resolve()
INFO: No packages to install, update or remove

julia> Pkg.add("IJulia")
INFO: Cloning cache of BinDeps from 
https://github.com/JuliaLang/BinDeps.jl.git
ERROR: Cannot clone BinDeps from 
https://github.com/JuliaLang/BinDeps.jl.git. Fa
iled to receive response: The server returned an invalid or unrecognized 
respons
e

 in prefetch(::String, ::String, ::Array{String,1}) at .\pkg\cache.jl:56
 in resolve(::Dict{String,Base.Pkg.Types.VersionSet}, 
::Dict{String,Dict{Version
Number,Base.Pkg.Types.Available}}, 
::Dict{String,Tuple{VersionNumber,Bool}}, ::D
ict{String,Base.Pkg.Types.Fixed}, ::Dict{String,VersionNumber}, 
::Set{String}) a
t .\pkg\entry.jl:512
 in resolve(::Dict{String,Base.Pkg.Types.VersionSet}, 
::Dict{String,Dict{Version
Number,Base.Pkg.Types.Available}}, 
::Dict{String,Tuple{VersionNumber,Bool}}, ::D
ict{String,Base.Pkg.Types.Fixed}) at .\pkg\entry.jl:476
 in edit(::Function, ::String, ::Base.Pkg.Types.VersionSet, 
::Vararg{Base.Pkg.Ty
pes.VersionSet,N}) at .\pkg\entry.jl:30
 in (::Base.Pkg.Entry.##2#5{String,Base.Pkg.Types.VersionSet})() at 
.\task.jl:36
0
 in sync_end() at .\task.jl:311
 in macro expansion at .\task.jl:327 [inlined]
 in add(::String, ::Base.Pkg.Types.VersionSet) at .\pkg\entry.jl:51
 in 
(::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#add,Tuple{String}})() at
.\pkg\dir.jl:31
 in 
cd(::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#add,Tuple{String}}, ::S
tring) at .\file.jl:48
 in #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, 
::Vararg{Any,N}) at
.\pkg\dir.jl:31
 in add(::String) at .\pkg\pkg.jl:100

julia> Pkg.add("IJulia")
INFO: Cloning cache of BinDeps from 
https://github.com/JuliaLang/BinDeps.jl.git
INFO: Cloning cache of BufferedStreams from 
https://github.com/BioJulia/Buffered
Streams.jl.git
INFO: Cloning cache of Compat from 
https://github.com/JuliaLang/Compat.jl.git
INFO: Cloning cache of Conda from https://github.com/JuliaPy/Conda.jl.git
INFO: Cloning cache of IJulia from 
https://github.com/JuliaLang/IJulia.jl.git
INFO: Cloning cache of JSON from https://github.com/JuliaIO/JSON.jl.git
INFO: Cloning cache of LegacyStrings from 
https://github.com/JuliaArchive/Legacy
Strings.jl.git
INFO: Cloning cache of LibExpat from 
https://github.com/amitmurthy/LibExpat.jl.g
it
INFO: Cloning cache of Libz from https://github.com/BioJulia/Libz.jl.git
INFO: Cloning cache of Nettle from 
https://github.com/staticfloat/Nettle.jl.git
INFO: Cloning cache of SHA from https://github.com/staticfloat/SHA.jl.git
INFO: Cloning cache of URIParser from 
https://github.com/JuliaWeb/URIParser.jl.g
it
INFO: Cloning cache of WinRPM from 
https://github.com/JuliaPackaging/WinRPM.jl.g
it
INFO: Cloning cache of ZMQ from https://github.com/JuliaLang/ZMQ.jl.git
INFO: Installing BinDeps v0.4.5
INFO: Installing BufferedStreams v0.2.0
INFO: Installing Compat v0.9.3
INFO: Installing Conda v0.3.2
INFO: Installing IJulia v1.3.2
INFO: Installing JSON v0.8.0
INFO: Installing LegacyStrings v0.1.1
INFO: Installing LibExpat v0.2.1
INFO: Installing Libz v0.2.0
INFO: Installing Nettle v0.2.4
INFO: Installing SHA v0.2.1
INFO: Installing URIParser v0.1.6
INFO: Installing WinRPM v0.2.2
INFO: Installing ZMQ v0.4.0
INFO: Building WinRPM
WARNING: Method definition XML_ErrorString(Any) in module LibExpat at 
D:\emacs\.
julia\v0.5\LibExpat\src\lX_common_h.jl:4 overwritten at 
D:\emacs\.julia\v0.5\Lib
Expat\src\lX_common_h.jl:4.
WARNING: could not import Base.lastidx into LegacyStrings
WARNING: Method definition 
(::Type{WinRPM.Packages})(#T<:Union{Array{LibExpat.ET
ree

Re: [julia-users] One more effort

2016-10-26 Thread Stefan Karpinski
[Please don't edit the subject on replies since this breaks the threading
and removes all context.]

On Wed, Oct 26, 2016 at 5:13 PM, Jeffrey Sarnoff 
wrote:

> I can compare my dirs and dll names with yours and we can replay the cold
> startup -- tomorrow.  I am away.
>
> Jeffrey Sarnoff
>
>


Re: [julia-users] Re: Binary read

2016-10-26 Thread Stefan Karpinski
Then you're going to have to inspect the file for things that look like
likely floating-point values since there are no specific values that you
can search for in the file. You could try posting a small initial portion
of the data here – 256 bytes or so.

On Wed, Oct 26, 2016 at 5:24 PM, Aleksandr Mikheev 
wrote:

> Unfortunately, I do not. However, I am most definitely sure that
> everything is okay with file since it is a training file.
>
> среда, 26 октября 2016 г., 23:17:00 UTC+3 пользователь Stefan Karpinski
> написал:
>>
>> Do you have an example where you have the file and you know what the data
>> should be? You may want to look at the data in a hex editor and try to
>> figure out what's going on.
>>
>> On Wed, Oct 26, 2016 at 4:06 PM, Aleksandr Mikheev 
>> wrote:
>>
>>> So, to avoid the opening a new thread I will write here again. It seems
>>> I still have a problem which I cannot solve. I use
>>>
>>> a_million_floats = read(f, Float64, 1_000_000)
>>>
>>>
>>> as it was suggested, however the numbers I get are obviously wrong
>>> (there are numbers like 8.68e+272, -5.39e-142, and even NaN). I am pretty
>>> that these are not the right numbers. Also, I am pretty sure that the type
>>> is correct (it should be 'double' in C/C++). Furthermore, I have i5 CPU, so
>>> it should be little endian as it is supposed in .dat file. What could be
>>> wrong?
>>>
>>> Thanks in advance!
>>>
>>
>>


Re: [julia-users] Re: How do the file name / module name mapping rules work?

2016-10-26 Thread Yichao Yu
FWIW I dont think this question has anything to do with naming
conventions and package organizations.

> On Wednesday, October 26, 2016 at 1:44:34 PM UTC-4, ma...@maasha.dk wrote:
>>
>> Using the example package https://github.com/JuliaLang/Example.jl/ I am
>> wondering:
>>
>>
>> the root level name ~/Example.jl is case-insensitive and the .jl suffix is
>> optional i.e. if I rename ~/Example.jl to ~/example it still works.

As I said in the closed Example.jl issue, if you are using 0.5 or
master and see any of `import`, `using`, `importall`,
`require(::Symbol)` to be case insensitive in any cases, please report
it as a bug.
This probably only happen on case-insensitive file systems so I can't
really check myself if that was the case.

>>
>>
>> Changing ~/Example.jl to ~/fobar and it breaks.

You should also be more specific about how you are loading code. I
assume you are using `import`/`using`.

>>
>>
>> However, ~/Example.jl/src/Example.jl is not case-insensitive and the .jl
>> suffix is mandatory ...
>>
>>
>> And how is the source tree searched? - the docs are a bit patchy ...

I'm not sure this is actually documented but package importing searchs
for `Module/src/Module.jl`, `Module.jl/src/Module.jl`, `Module.jl` in
the load path (including package directory). We should be doing this
in a case sensitive way even on case sensitive system (or it's a bug).
If this is not documented feel free to submit a Doc issue (or better,
pull request).

>>
>>
>


Re: [julia-users] Re: Nemo AcbField error

2016-10-26 Thread 'Bill Hart' via julia-users
The only thing I can think of to suggest is try it again from scratch in
Julia-0.4 so we can rule out the dlls being corrupted on our website
somehow.

I can't think what else could be wrong, unless something else changed in
Julia itself on Windows, between versions 0.4 and 0.5.

Jeffrey, are you using 64 bit Windows with Julia 0.5?

Bill.

On 26 October 2016 at 23:02, digxx  wrote:

> It's weird coz in julia 0.4.x it was running without any problems...
>


Re: [julia-users] Re: Nemo AcbField error

2016-10-26 Thread Jeffrey Sarnoff
Yes.

Jeffrey Sarnoff


> On Oct 26, 2016, at 8:04 PM, 'Bill Hart' via julia-users 
>  wrote:
> 
> The only thing I can think of to suggest is try it again from scratch in 
> Julia-0.4 so we can rule out the dlls being corrupted on our website somehow.
> 
> I can't think what else could be wrong, unless something else changed in 
> Julia itself on Windows, between versions 0.4 and 0.5.
> 
> Jeffrey, are you using 64 bit Windows with Julia 0.5?
> 
> Bill.
> 
>> On 26 October 2016 at 23:02, digxx  wrote:
>> It's weird coz in julia 0.4.x it was running without any problems...
> 


Re: [julia-users] Re: Nemo AcbField error

2016-10-26 Thread 'Bill Hart' via julia-users
Actually, there is one more thing you could do. Download DependencyWalker
[1] and run it on libarb.dll in place where it currently is in your
Nemo/local/lib directory. It's bound to complain a lot, and there will be
lots of yellow flags. But what we are looking for is missing dependencies
that we are responsible for.

Bill.

[1] http://www.dependencywalker.com/


On 27 October 2016 at 02:04, Bill Hart  wrote:

> The only thing I can think of to suggest is try it again from scratch in
> Julia-0.4 so we can rule out the dlls being corrupted on our website
> somehow.
>
> I can't think what else could be wrong, unless something else changed in
> Julia itself on Windows, between versions 0.4 and 0.5.
>
> Jeffrey, are you using 64 bit Windows with Julia 0.5?
>
> Bill.
>
> On 26 October 2016 at 23:02, digxx  wrote:
>
>> It's weird coz in julia 0.4.x it was running without any problems...
>>
>
>


[julia-users] Re: ANN: ParallelAccelerator v0.2 for Julia 0.5 released.

2016-10-26 Thread Todd Anderson
Okay, METADATA with ParallelAccelerator verison 0.2 has been merged so if 
you do a standard Pkg.add() or update() you should get the latest version.

For native threads, please note that we've identified some issues with 
reductions and stencils that have been fixed and we will shortly be 
released in version 0.2.1.  I will post here again when that release takes 
place.

Again, please give it a try and report back with experiences or file bugs.

thanks!

Todd


Re: [julia-users] Re: ImageView very slow

2016-10-26 Thread Paul B.
Tim:  Thank you, that works great.

Josef:  I can plot 2D matrices with GR (which is what I want) but your code 
example doesn't work.  GR looks pretty impressive, I'll have to check it 
out.  A bit disappointed there's no interface to zoom in/out with the mouse 
and for some reason the window won't close.

Tom:  Works for images but not readily clear how to plot something like 
rand(100,100) as a bitmap instead of a 100 lines.  Do I have to convert it 
to an image structure for plot to figure out that it's a bitmap?

Thanks, all!


[julia-users] Re: Matlabs scatteredInterpolant for julia?

2016-10-26 Thread Steven G. Johnson
The https://github.com/kbarbary/Dierckx.jl package can interpolate from 
unstructured sets of points.


Re: [julia-users] cscope like tool

2016-10-26 Thread Isaiah Norton
I don't think so, but Lint.jl might be of interest: https://github.com/
tonyhffong/Lint.jl

On Wed, Oct 26, 2016 at 8:56 AM, Ajay Mendez  wrote:

> Looking for a tool to grok large projects, a la cscope.
> methods(method_name) is good but insufficient. For those unfamiliar with
> cscope, it allows the following queries:
>
> Find this C symbol:
> Find this global definition:
> Find functions called by this function:
> Find functions calling this function:
> Find this text string:
> Change this text string:
> Find this egrep pattern:
> Find this file:
> Find files #including this file:
> Find assignments to this symbol:
>
>


Re: [julia-users] Re: CoinOptServices

2016-10-26 Thread Isaiah Norton
Other suggestion: try temporarily (re)moving that file (`%/liblapack.dll`).

I wonder if Julia itself is opening the dll for some reason, before WinRPM
tries to replace it. (check again with Process Explorer while Julia is
still running?)

On Wed, Oct 26, 2016 at 12:22 PM, Frank Kampas  wrote:

>
> Handle or Dll substring "liblapack" returned 0 matching items
>


[julia-users] Pkg.add("IJulia") fails

2016-10-26 Thread Tony Kelman
What version of windows are you using?

[julia-users] Re: ANN: ParallelAccelerator v0.2 for Julia 0.5 released.

2016-10-26 Thread Ralph Smith
This is great stuff.  Initial observations (under Linux/GCC) are that 
native threads are about 20% faster than OpenMP, so I surmise you are 
feeding LLVM some very tasty
code. (I tested long loops with straightforward memory access.)

On the other hand, some of the earlier posts make me think that you were 
leveraging the strong vector optimization of the Intel C compiler and its 
tight coupling to
MKL libraries.   If so, is there any prospect of getting LLVM to take 
advantage of MKL?


On Wednesday, October 26, 2016 at 8:13:38 PM UTC-4, Todd Anderson wrote:
>
> Okay, METADATA with ParallelAccelerator verison 0.2 has been merged so if 
> you do a standard Pkg.add() or update() you should get the latest version.
>
> For native threads, please note that we've identified some issues with 
> reductions and stencils that have been fixed and we will shortly be 
> released in version 0.2.1.  I will post here again when that release takes 
> place.
>
> Again, please give it a try and report back with experiences or file bugs.
>
> thanks!
>
> Todd
>


Re: [julia-users] ImageView very slow

2016-10-26 Thread Tom Breloff
You're looking for "heatmap". You should read the docs if you want to learn
more.

On Wednesday, October 26, 2016, Paul B.  wrote:

> Tim:  Thank you, that works great.
>
> Josef:  I can plot 2D matrices with GR (which is what I want) but your
> code example doesn't work.  GR looks pretty impressive, I'll have to check
> it out.  A bit disappointed there's no interface to zoom in/out with the
> mouse and for some reason the window won't close.
>
> Tom:  Works for images but not readily clear how to plot something like
> rand(100,100) as a bitmap instead of a 100 lines.  Do I have to convert it
> to an image structure for plot to figure out that it's a bitmap?
>
> Thanks, all!
>