Re: [julia-users] Re: tail active log

2016-09-16 Thread adrian_lewis
Thanks for the replies, For some reason only one chunk of data is printed even though the log is still being written to fh = open(last_sim_log) try while true print(readline(fh)) end finally close(fh) end For readavailable(fh), I getting "no method matching

[julia-users] deprecating julia v0.3 -> are there still 0.3 users?

2016-09-16 Thread Tony Kelman
Note also that as of several weeks ago, METADATA is frozen for Julia 0.3 and unless specific exceptions are requested, we're not merging any new tags of packages that support Julia 0.3. The existing tags will be left as is.

[julia-users] Re: How would you use Julia in a real world R Setup ?

2016-09-16 Thread Tsur Herman
Thank you for the time you took to answer. How do you go about debugging and inspecting? and making sure that changes you made gets compiled and that you are not accidentally running a previously imported version of a function? On Thursday, September 15, 2016 at 10:11:21 PM UTC+3, Tsur

Re: [julia-users] Tracking down type instability

2016-09-16 Thread Kristoffer Carlsson
It looks fine because for both the SSAValues with "problems" you later have: p::Array{Float64,1} = SSAValue(15) l::Array{Int64,1} = SSAValue(17) so they actually get correctly inferred. As long as your variables list and return value is ok then things are most likely ok. On Friday,

Re: [julia-users] Julia embedding -- Create Dict variable from C?

2016-09-16 Thread Harald Held
OK, thanks for the clarification and explanations! I'll go for the second option you described then. On Thursday, September 15, 2016 at 12:33:22 AM UTC+2, Yichao Yu wrote: > > On Wed, Sep 14, 2016 at 4:12 PM, Harald Held > wrote: > > I'm playing around with embedding

[julia-users] Error when assigning values to an object

2016-09-16 Thread varun7rs
Hello, I have some trouble using types in Julia. Thanks to some earlier help, I was able to define type Physical Node and save it in a file MyClasses.jl module MyClasses using DataArrays type PhyNode{T} ID::Int64 name::AbstractString x::Float64 y::Float64 inEdges::Vector{T}

[julia-users] TIOBE Headline: Julia enters top 50 for the first time

2016-09-16 Thread Jeffrey Sarnoff
> It was a matter of time until Julia would hit the top 50. This month it > did so. The Julia programming language is meant for numerical computing. It > combines functional programming paradigms with high speed. In other words, > readable and stable code that performs. Chances are high that

[julia-users] Error when assigning values to an object

2016-09-16 Thread Lutfullah Tomak
It is related to the `importall` part of code. It can be that the files are not in the same directory but I'm not sure. Also, [] creates an Array with element type of Any. Giving it a type annotation may help peeformance ei TypeofArray[].

[julia-users] Re: Error when assigning values to an object

2016-09-16 Thread varun7rs
The files are indeed in the same directory and I also added the path of these files to the variable LOAD_PATH as well. But still, I get the same error. On Friday, 16 September 2016 09:49:45 UTC+2, Lutfullah Tomak wrote: > > It is related to the `importall` part of code. It can be that the files

[julia-users] deprecating julia v0.3 -> are there still 0.3 users?

2016-09-16 Thread Andreas Lobinger
Hello colleagues, some packages have started, some are in the process to fix their requirements to julia > v0.3. My question, especially to the universities/teaching communities: are there still 0.3 users? (and maybe you provide a 'why' along that) Wishing a happy day, Andreas

Re: [julia-users] Re: Vector Field operators (gradient, divergence, curl) in Julia

2016-09-16 Thread Matjaz Licer
Thank you all! On 14 September 2016 at 00:41, Steven G. Johnson wrote: > Both ForwardDiff and ReverseDiff source solve a different problem (taking > the derivative of a user-supplied function f(x)). The Matlab and NumPy > gradient functions, instead, take an array (not a

[julia-users] julia installation broken

2016-09-16 Thread Michael Borregaard
Hi, Is this the right forum for troubleshooting / issues with my julia install? I have kept having problems with packages giving error on precompile, rendering julia unusable. I then reinstalled julia-0.5-rc4, and removed my .julia folder from my home dir to do a fresh install. Now, Julia

[julia-users] Re: Error when assigning values to an object

2016-09-16 Thread randmstring
The error I'm getting is something like ERROR: LoadError: UndefVarError: PhyNode not defined So since you used importall instead of using, you need to the qualified MyClasses.PhyNode. If you do, you'll probably get some error about ERROR: LoadError: MethodError: `convert` has no method

[julia-users] Re: 'which' functionality, similar to applicable

2016-09-16 Thread Fengyang Wang
In addition to Mauro's answer, programatically, you can do which(issymmetric, Tuple{typeof(fill(NaN, 1, 1))}), which is almost your preferred syntax.

[julia-users] Julia 0.4 cannot infer types in Val{}-function

2016-09-16 Thread Mauro
Consider immutable A a::Int b::Float64 end aa = A(4,5) f{ab}(aa, ::Val{ab}) = getfield(aa, ab) @code_warntype f(aa, Val{:b}()) In Julia 0.5 the inferred return type is Float64, however, in 0.4 it's Union{Int,Float64}. Is there a way to make this type stable in 0.4?

[julia-users] Return type of broadcast

2016-09-16 Thread Fengyang Wang
julia> foo(x) = 0 foo (generic function with 1 method) julia> foo(x::Int) = 0.0 foo (generic function with 2 methods) julia> foo.(Any[1, 2, 3]) 3-element Array{Float64,1}: 0.0 0.0 0.0 julia> foo.(Number[1, 2, 3]) 3-element Array{Number,1}: 0.0 0.0 0.0 My understanding was that the actual

[julia-users] Re: Help on building Julia with Intel MKL on Windows?

2016-09-16 Thread Zhong Pan
I completely restarted the build process from fresh (git clone). In addition to the renaming and copying .lib and .dll files, I also did some many configuration of environmental variables before the build. These are mostly based on what

[julia-users] Re: Help on building Julia with Intel MKL on Windows?

2016-09-16 Thread Tony Kelman
mic probably means xeon phi, so that's likely for cross compiling to a xeon phi device from a windows host. Based on the sizes of the .lib files, I take what I said back, those probably are static libraries. I did this many months ago and have a Make.user somewhere. Before you spend too much

[julia-users] Re: Tracking down type instability

2016-09-16 Thread Ben Ward
function distance{T<:MutationType,A<:NucleotideAlphabet}(::Type{Proportion{T}}, seqs::Vector{BioSequence{A}}) d, l = distance(Count{T}, seqs) D = Vector{Float64}(length(d)) @inbounds @simd for i in 1:length(D) D[i] = d[i] / l[i] end return D, l end *julia>

[julia-users] Re: Tracking down type instability

2016-09-16 Thread Ralph Smith
The integer vectors d and l have to be converted to floats before division. Vectorization at this point means that the compiler writes code to use wide registers to do more than one at a time (and lots of extra logic to handle alignment and stragglers). Something in the chain (LLVM front end, I

[julia-users] Re: Tracking down type instability

2016-09-16 Thread Ralph Smith
A correction: the native Haswell build does use packed conversions for 32-bit integers, and valiantly mixes unpacked conversions with packed division for 64-bit. I didn't see any of this from the pre-built binaries. On Friday, September 16, 2016 at 10:22:16 PM UTC-4, Ralph Smith wrote: > > The

[julia-users] Re: Help on building Julia with Intel MKL on Windows?

2016-09-16 Thread Zhong Pan
I saw benchmarks showing impressive speedup using Anaconda + MKL vs. open source library. For example, https://github.com/ContinuumIO/mkl-optimizations-benchmarks For my application, a representative problem would be split-step Fourier method (https://en.wikipedia.org/wiki/Split-step_method).

[julia-users] Julia NetCDF usage of subsetting with start and count

2016-09-16 Thread MLicer
Dear all, i am trying to read *one* *specific* elevation [Lat x Lon x Time] timestep in a large NetCDF file using Julia NetCDF. I've tried the syntax (along with many variations to the theme): timestep = 17 el=ncread(fname,"elevation",start=[1,1,timestep], count=[-1, -1, 1]) which returns the

Re: [julia-users] 'which' functionality, similar to applicable

2016-09-16 Thread Mauro
Do you mean @which sin(6) ? On Fri, 2016-09-16 at 03:13, Marco Cognetta wrote: > Hi all, > > I know about methods() and applicable(), but is there a way to tell, given a > multiple dispatch method name and a possible input, which method specifically > would be called (the line number and the

[julia-users] 'which' functionality, similar to applicable

2016-09-16 Thread Marco Cognetta
Hi all, I know about methods() and applicable(), but is there a way to tell, given a multiple dispatch method name and a possible input, which method specifically would be called (the line number and the parameter types/function signature)? When I was trying to determine which of a method with

[julia-users] Debuging with Juno

2016-09-16 Thread Tsur Herman
did any one managed to get that working? I am getting an error Base.active_repl not defined . However debugging somewhat works in julia shell . I personally think that the ability to comfortably step into functions, including what is considered system packages is crucial for the language to

[julia-users] keyword arguments are distinct from positional arguments?

2016-09-16 Thread Neal Becker
In read the julialang doc, I'm getting the impression that keyword arguments are entirely distinct from positional arguments? In python, all arguments can be used either positional or keyword. Julia is more restrictive here? I need to decide a-priori if an argument is one or the other?

[julia-users] Re: Error when assigning values to an object

2016-09-16 Thread 'Greg Plowman' via julia-users
Export PhyNode from MyClass module.

[julia-users] Re: Error when assigning values to an object

2016-09-16 Thread varun7rs
Oh, thanks so much! It fixed my problem. But, is there a way to just write PhyNode(blah, blah, blah) instead of the cumbersome MyClasses.PhyNode ? I tried using MyClasses and it reported the same error as well. On Friday, 16 September 2016 12:11:18 UTC+2, randm...@gmail.com wrote: > > The error

[julia-users] Re: Error when assigning values to an object

2016-09-16 Thread varun7rs
Thanks for answering all of my nooby questions. Julia is cool again! On Friday, 16 September 2016 14:20:53 UTC+2, randm...@gmail.com wrote: > > Sure, just export what you want available when using your Module -- > that's useful anyways for defining a public API. Also have a look at the > Julia

Re: [julia-users] Debuging with Juno

2016-09-16 Thread Mike Innes
We have some patches for recent changes to Gallium.jl which are very soon to be tagged, so this will all work very soon. On Fri, 16 Sep 2016, 13:29 Tsur Herman, wrote: > did any one managed to get that working? > > I am getting an error Base.active_repl not defined . >

[julia-users] Re: Error when assigning values to an object

2016-09-16 Thread randmstring
Sure, just export what you want available when using your Module -- that's useful anyways for defining a public API. Also have a look at the Julia documentation , which describes all that pretty nicely.

Re: [julia-users] keyword arguments are distinct from positional arguments?

2016-09-16 Thread Mauro
On Fri, 2016-09-16 at 13:45, Neal Becker wrote: > In read the julialang doc, I'm getting the impression that keyword arguments > are entirely distinct from positional arguments? Yes they are distinct. Also note that keyword arguments currently carry a performance penalty, although that should

[julia-users] Re: Tracking down type instability

2016-09-16 Thread Ben Ward
The code for that function not shown is rather similar to the version that is shown: function distance{T<:MutationType,A<:NucleotideAlphabet}(::Type{Proportion{T}}, seqs::Vector{BioSequence{A}}) d, l = distance(Count{T}, seqs) D = Vector{Float64}(length(d)) @inbounds for i in

[julia-users] Re: How would you use Julia in a real world R Setup ?

2016-09-16 Thread Chris Rackauckas
The tooling for debugging is still growing. Gallium.jl with Juno is nice, but I still do a lot of println debugging. As Gallium/Juno matures I use it more and more often. To make sure you're not using old versions, quit the REPL. In Juno, that's Ctrl+j Ctrl+k. You can hit that command almost

Re: [julia-users] Tracking down type instability

2016-09-16 Thread Ben Ward
I see, but I thought I'd like to try and remove the instability as I wonder if it's one of the things preventing vectorisation of the @inbounds loop in the `distance` function. On Friday, September 16, 2016 at 7:54:33 AM UTC+1, Kristoffer Carlsson wrote: > > It looks fine because for both the

Re: [julia-users] Tracking down type instability

2016-09-16 Thread Yichao Yu
On Sep 16, 2016 11:30 AM, "Ben Ward" wrote: > > I see, but I thought I'd like to try and remove the instability as I wonder if it's one of the things preventing vectorisation of the @inbounds loop in the `distance` function. Log can't be vectorized. Not yet at least. >

Re: [julia-users] Re: tail active log

2016-09-16 Thread Stefan Karpinski
You'd want something more like this: open(last_sim_log) do fh while !eof(fh) print(readline(fh)) end end This does a couple of things: 1. Use the open(...) do fh ... end construct to ensure file closing. 2. Check for stream end using eof(fh) instead of catching an error.

[julia-users] Re: wrapping a julia package

2016-09-16 Thread Páll Haraldsson
On Friday, September 16, 2016 at 4:29:33 PM UTC, Páll Haraldsson wrote: > > This is an inserting question in general, first for the specific: > Obviously "interesting" question.. Didn't mean to rely on spell check..

[julia-users] Re: julia installation broken

2016-09-16 Thread Jeffrey Sarnoff
I have had this happen, too. My suggestion is grounded in persistence rather than deep mastery of Julia's structural and file relationships. So someone else may have a more studied approach with some explaining. Until then, quit() Julia. To have an new install be really clean, first cd to

[julia-users] Re: wrapping a julia package

2016-09-16 Thread Páll Haraldsson
On Friday, September 16, 2016 at 4:29:33 PM UTC, Páll Haraldsson wrote: > `ARGB32` uses a `UInt32` representation of color, > > [I didn't see RGBA, only alpha in upper bits.. so unless I overlooked, may > not work, since bits not in the same order:] > > > " reinterpret(type, A) > >

[julia-users] Re: wrapping a julia package

2016-09-16 Thread Páll Haraldsson
This is an inserting question in general, first for the specific: A. I took a quick look at the code: https://github.com/zyedidia/SFML.jl/commit/2e6ebee0a6dca85486563ea6f99decc595e831fa type Color r::Uint8 g::Uint8 b::Uint8 a::Uint8 Then Colors.jl seemed overkill and maybe not

[julia-users] Re: Tracking down type instability

2016-09-16 Thread Kristoffer Carlsson
What if you add @simd after @inbounds? On Friday, September 16, 2016 at 5:48:00 PM UTC+2, Ben Ward wrote: > > The code for that function not shown is rather similar to the version that > is shown: > > function > distance{T<:MutationType,A<:NucleotideAlphabet}(::Type{Proportion{T}}, >

Re: [julia-users] Re: wrapping a julia package

2016-09-16 Thread Tim Holy
Yes, the idea of wrappers that reinterpret or convert makes sense. On Friday, September 16, 2016 9:29:33 AM CDT Páll Haraldsson wrote: > type Color > r::Uint8 > g::Uint8 > b::Uint8 > a::Uint8 RGBA{U8} is bitwise identical to this, so you can use reinterpret as needed. --Tim

[julia-users] Re: Help on building Julia with Intel MKL on Windows?

2016-09-16 Thread Zhong Pan
BTW I have re-installed Intel MKL in a folder without any spaces in the path name, so you may notice the location changed. Not sure if it helps, just trying.

[julia-users] Re: Idea: Julia Standard Libraries and Distributions

2016-09-16 Thread Chris Rackauckas
I think some of this I just answered here: https://github.com/JuliaLang/julia/issues/18389 . Here's a quote: I think a good way to go forward is to start making some metapackages held > by the Julia orgs. For example, FFT could move out of Base into JuliaMath, > and there can be a standard