Re: [julia-users] Circular parametric types

2016-01-27 Thread Bryan Rivera
Are circular type trees supposed to work? We can't even join types: *abstract A* *abstract B* *type D <: Union{A, B} # Fail* *end*

RE: [julia-users] Re: Julia Benchmarks Feedback

2016-01-27 Thread David Anthoff
+1 These benchmarks seem to test the performance of specific algorithms, implemented in different languages. Including start up or compile time doesn’t make any sense to me in that case. From: julia-users@googlegroups.com [mailto:julia-users@googlegroups.com] On Behalf Of Stefan

Re: [julia-users] Create local function variables programmatically from a dictionnary

2016-01-27 Thread Yichao Yu
On Wed, Jan 27, 2016 at 7:41 PM, Fady Shoukry wrote: > Hi everyone, > > As the title suggests, I am trying to create local variables to a function > for a supplied dictionary argument. The Dict would be of type {Symbol, Any} > and the goal is to create a variable for each

Re: [julia-users] Re: Julia Benchmarks Feedback

2016-01-27 Thread Stefan Karpinski
It's true. However interpreters don't take much time to start up – an interpreter is the lowest latency way to get from source code to running program (compared to AOT or JIT compilation). There's an argument to be made for including all of the things that take time when benchmarking. However, we

[julia-users] Programmatically creating variables from a dictionary

2016-01-27 Thread Fady Shoukry
Hey everyone, As the subject line suggests, I am trying to programmatically create variables from a supplied dictionary in a function. I am aware that I can use eval() but eval will generate global variables which is something I am trying to avoid for its performance disadvantages. Here is an

[julia-users] Create local function variables programmatically from a dictionnary

2016-01-27 Thread Fady Shoukry
Hi everyone, As the title suggests, I am trying to create local variables to a function for a supplied dictionary argument. The Dict would be of type {Symbol, Any} and the goal is to create a variable for each symbol that has the corresponding value. I am aware that I could use eval in

Re: [julia-users] Circular parametric types

2016-01-27 Thread Bryan Rivera
*typealias D Union{A,B}* *julia> **D <: Union{A,B}* *true* *;) thanks*

Re: [julia-users] Circular parametric types

2016-01-27 Thread Bryan Rivera
Whoops. Can I get editing permission for my own posts?

[julia-users] Re: Julia Vector declare/load confusion

2016-01-27 Thread Christopher Alexander
Try something like this: adjCloseMuVec = Vector{Float32}(nFullYears) or adjCloseMuVec = zeros(Float32, nFullYears) This will init a vector of the proper size. I think zeros is slightly faster, but someone can correct me if that is not the case. Chris On Thursday, January 28, 2016 at 1:26:09

Re: [julia-users] Circular parametric types

2016-01-27 Thread Stefan Karpinski
"even" On Wed, Jan 27, 2016 at 8:43 PM, Bryan Rivera wrote: > Are circular type trees supposed to work? > > We can't even join types: > > *abstract A* > > *abstract B* > > *type D <: Union{A, B} # Fail* > > *end* >

[julia-users] Re: Programmatically creating variables from a dictionary

2016-01-27 Thread Ethan Anderes
This isn't exactly what you want... but you can always can splat `Dict{Symbol, T}` into named function argument like this ``` julia> function f(;a = 0, b = 0, c = 0) println("a = $a, b = $b, c = $c") end f (generic function with 1 method) julia> dic = Dict(:a => 1, :b => 2, :c

[julia-users] Julia Vector declare/load confusion

2016-01-27 Thread Michael Landis
I am trying to compute some historical means and volatilities with Julia, but I've been having some difficulty getting the declarations and/or assignments right... When I try a declaration, like either of these: adjCloseMuVec::Vector{Float32}; # or...

Re: [julia-users] Create local function variables programmatically from a dictionnary

2016-01-27 Thread Yichao Yu
On Wed, Jan 27, 2016 at 9:47 PM, Fady Shoukry wrote: > >> >> Depending on what API JuMP provide and what API you want to provide, I >> think you should either keep the dict (if JuMP can handle it) or use >> meta programing to construct an AST/function based on the user

Re: [julia-users] Circular parametric types

2016-01-27 Thread Bryan Rivera
*typealias D Union{A,B}* *julia> **D <: Union{A,B}* *true* *Is this what you meant?* *So if the example code is a bug, does this mean Julia should have a recursive type tree?*

[julia-users] Re: Julia Vector declare/load confusion

2016-01-27 Thread Michael Landis
Correction: a fixed size Vector of Float32 On Wednesday, January 27, 2016 at 10:26:09 PM UTC-8, Michael Landis wrote: > > I am trying to compute some historical means and volatilities with Julia, > but I've been having some difficulty getting the declarations and/or > assignments right... > >

Re: [julia-users] Create local function variables programmatically from a dictionnary

2016-01-27 Thread Fady Shoukry
> > Depending on what API JuMP provide and what API you want to provide, I > think you should either keep the dict (if JuMP can handle it) or use > meta programing to construct an AST/function based on the user input > and evaluate that. > Thanks for the quick reply. Could you elaborate on

[julia-users] Circular parametric types

2016-01-27 Thread Tommy Hofmann
I am trying to define two parametric types with circular dependency as follows. abstract abstest type t1{A <: abstest, B} x::A y::B end type t2{C, B} <: abstest x::C y::t1{t2{C, B}, B} end Unfortunately it doesn't work: ERROR: TypeError: t1: in A, expected A<:abstest, got

[julia-users] Re: Julia vs Clojure for Distributed Scientific Simulations

2016-01-27 Thread Ismael Venegas Castelló
Correction, none of those videos are dated "dated", they are from the las JuliaCon, I removed the old videos from the list but forgot to remove the comment of some being dated. Also check out the Julia package ecosystem, there are lots of scientific computing libraries: *

[julia-users] Re: Julia vs Clojure for Distributed Scientific Simulations

2016-01-27 Thread Ismael Venegas Castelló
How are you benchmarking the Julia code? If you share the microbenchmarks you are doing, we can help you with that, the final decision is yours. Julia es actually a lot like lisp but with "normal" syntax, support for unicode (lots of mathematical symbols also) see: *

Re: [julia-users] Usability issues

2016-01-27 Thread Stefan Karpinski
You may want to have your students try out http://juliabox.org/ which avoids these sorts of software installation issues and lets students get working immediately. There's not much we can do about Apple's (annoying) XCode license prompt, unfortunately. I would generally recommend getting Julia

Re: [julia-users] Circular parametric types

2016-01-27 Thread Yichao Yu
On Wed, Jan 27, 2016 at 10:35 AM, Tommy Hofmann wrote: > I am trying to define two parametric types with circular dependency as > follows. > > abstract abstest > > type t1{A <: abstest, B} > x::A > y::B > end > > type t2{C, B} <: abstest > x::C > y::t1{t2{C, B}, B} > end

Re: [julia-users] Julia vs Clojure for Distributed Scientific Simulations

2016-01-27 Thread Mike Innes
With Clojure you're likely to get much better deployment / networking support, as well as the general robustness and tooling of the JVM. It's also really expressive for data manipulation (though not necessarily fast). Julia loses out on that but will blow Clojure out of the water for anything more

Re: [julia-users] how to i get number of arguments of a function?

2016-01-27 Thread Jon Norberg
Wow, thanks a lot, That one I would never had a chance to figure out.

[julia-users] Re: Using Interpolations.jl How to define the behavior when out of bounds?

2016-01-27 Thread argel . ramirez
Thanks!

[julia-users] Re: Great read as Julia's package ecosystem grows ("a la npm" nested dependencies)

2016-01-27 Thread max
Thanks for the interesting comments. Two additional thoughts: (1) Certainly the concept of nested dependencies does not imply the actual npm implementation with nested folders on the filesystem. All future package managers interested in nested dependencies will certainly learn from npm's

Re: [julia-users] Usability issues

2016-01-27 Thread Sébastien Loisel
Hi Stefan, Thanks for your response. You said: If you have any good ideas about what would be more helpful (aside from always succeeding at building software), we're all ears. I think my idea was exactly your proposed solution; completely fail at installing the package. If you're trying to

Re: [julia-users] Julia vs Clojure for Distributed Scientific Simulations

2016-01-27 Thread Ismael VC
I dont know if you can call Julia from Java, but you can call Java from Julia, see: * https://github.com/aviks/JavaCall.jl * https://github.com/aviks/JavaCall.jl Ismael Venegas Castelló *Data Analyst* Cel. 044 55 6434 0229 ivene...@richit.com.mx Cerro San Francisco 357, C.P. 04200 Campestre

Re: [julia-users] Re: Great read as Julia's package ecosystem grows ("a la npm" nested dependencies)

2016-01-27 Thread Tom Breloff
I agree that there are some missing tools in the Julia package dependency structure. One is conditional modules, partially solved with the Requires package (though not perfectly, especially considering that the conditional code won't be properly included in the precompilation step AFAIK, and

[julia-users] Re: Julia Benchmarks Feedback

2016-01-27 Thread Ismael Venegas Castelló
Native in this context means it's apure Julia implementation, ie. it's not calling an underliying C/Fortran library, see: * https://github.com/kostya/benchmarks/blob/master/matmul/matmul-native.jl It seems the author has updated the code to use @time, but it's still timing the JIT. I'll send

Re: [julia-users] Julia vs Clojure for Distributed Scientific Simulations

2016-01-27 Thread Joshua Ballanco
Last I checked, I think the only real option for calling Julia from Java is via JNA to the Julia C API. Not impossible, but not as convenient as JavaCall.jl. As for Julia vs Clojure, I had a go at implementing a simple OCR nearest-neighbors algorithm in both Julia and Clojure. The Clojure code

Re: [julia-users] Julia vs Clojure for Distributed Scientific Simulations

2016-01-27 Thread Mauro
On Wed, 2016-01-27 at 20:34, Joshua Ballanco wrote: > One last point (something I’ve been meaning to look at but haven’t had > the time): reading CSV files off disk was about 10x faster in Clojure > than Julia. Something else to consider. I think this package makes this much

Re: [julia-users] Re: Julia Benchmarks Feedback

2016-01-27 Thread Stefan Karpinski
Except that appears to be using Julia's * operator for Float64 arrays which would call BLAS, no? On Wed, Jan 27, 2016 at 2:29 PM, Ismael Venegas Castelló < ismael.vc1...@gmail.com> wrote: > Native in this context means it's apure Julia implementation, ie. it's not > calling an underliying

Re: [julia-users] Re: Julia Benchmarks Feedback

2016-01-27 Thread Ismael Venegas Castelló
I haven't really paid attention to the code, but I just subbmited a simple test funtion for his benchmarks in order to avoid timing the JIT, nothing cientific, but more accurate though: * https://github.com/kostya/benchmarks/pull/79 function test() for i in 1:2# First time it's also JIT

[julia-users] Re: Requests.jl with HTTP Basic Authentication

2016-01-27 Thread Josef Sachs
> On Tue, 26 Jan 2016 08:07:30 -0500, Josef Sachs said: > Is there a way to use Requests.jl with HTTP Basic Authentication > when the password contains a slash? > julia> using Requests > julia> get("https://user:pass/w...@google.com;) > ERROR: Port must be numeric (decimal) > in

[julia-users] Re: Julia Benchmarks Feedback

2016-01-27 Thread Ismael Venegas Castelló
but then again the benchmarks are flawed because other implementations are also timing the interpreters startup time. El martes, 26 de enero de 2016, 22:07:54 (UTC-6), George escribió: > > I was surprised to se the results on the following benchmarks: > https://github.com/kostya/benchmarks > >

[julia-users] ANN: PolSAR.jl - Polarimetric Synthetic Aperture Radar (SAR) image processing in Julia

2016-01-27 Thread Rivo Sarmento
Hi all, I've written a project to enable Polarimetric SAR images to be visualized and manipulated in Julia, available here: https://github.com/RSarmento/PolSAR.jl And I'd like someone else to try using it and give me some feedback. Thanks,

[julia-users] Re: Weird problem when I call a C function from a DLL library inside a loop

2016-01-27 Thread Júlio Dias
Following your second suggestion, Isaiah, I tested other Visual C++ compiler options for DLL calling convention and I found out the correct one that fixed my problem. (cdecl) It's working well now. Thank you!!!

[julia-users] Re: Julia Benchmarks Feedback

2016-01-27 Thread Sisyphuss
In the Matmul benchmark, "Julia Native" ranks 1st. What is Julia Native? On Wednesday, January 27, 2016 at 7:02:51 AM UTC+1, Nitin Arora wrote: > > Check out this thread. There seems to be discussion on this matter > already. Looks like the code used for these benchmarks was not well >

[julia-users] Usability issues

2016-01-27 Thread Sébastien Loisel
Hi, I convinced one of my students to do his undergrad project using Julia. The project is on multiprecision arithmetic, but this is not important. I suggested we use IJulia; for me it seems like the best environment. My student's laptop computer is a Mac, like mine. The student was able to