Re: [julia-users] fieldtype() for parameterised types

2016-09-19 Thread 'Greg Plowman' via julia-users
Ah, TypeVars, parameter and bound fields. Thanks Tim. This looks like what I'm after. Will investigate.

[julia-users] Re: Any serious quant finance package for Julia?

2016-09-19 Thread esproff
I've only used Convex.jl extensively, and NLopt.jl a bit, so I don't really know whether Julia's optimization ecosystem would cover all possible eventualities, I'm just speaking from experience when I say that it's rare that I'm able to rely solely on off-the-shelf packages when writing

[julia-users] Re: Any serious quant finance package for Julia?

2016-09-19 Thread Chris Rackauckas
If you implement an optimization routine for a specific type of functions, why not have that maintained with the API and structure of Optim.jl, and then use it for your specific case? What about the JuliaML interfaces / the Optim iterator interface do you find would be a limitation to a quant

[julia-users] Re: Any serious quant finance package for Julia?

2016-09-19 Thread esproff
Ok Chris I'll definitely check out Plots.jl. As for optimization packages, more than one will probably have to be used depending on the problem: disciplined convex vs numerical vs global vs etc. And, as always, some optimization algorithms will have to be custom rolled out since established

[julia-users] Re: Any serious quant finance package for Julia?

2016-09-19 Thread Chris Rackauckas
I was saying that Quantlib, not Quantlib.jl, had rudimentary numerical methods. The main reason is probably because they only implemented a few here and there, instead of focusing heavily in the numerical solvers or using available libraries. There's no reason to do this in Julia: you have

[julia-users] Re: Any serious quant finance package for Julia?

2016-09-19 Thread esproff
I'd be interested in getting involved in this, I've been writing up some portfolio optimization and visualization routines in Julia with the help of Convex.jl and Gadfly.jl, this could possibly eventually be merged into Ito.jl or QuantLib.jl or w/e we decide is the official Julia quant finance

Re: [julia-users] fieldtype() for parameterised types

2016-09-19 Thread Tim Holy
You don't have to do this in the type definition, you can do it at introspection time: fieldtype(Foo{Float64,3},:a) returns Array{T,N} fieldtype(Foo{Float64,3},:b) returns Array{Float64,3} More generally: julia> T, N = TypeVar(:T, true), TypeVar(:N, true) (T,N) julia> fieldtype(Foo{T,N},

[julia-users] fieldtype() for parameterised types

2016-09-19 Thread 'Greg Plowman' via julia-users
For a parameterised composite type, I want to distinguish between fields defined with parameters and generic fields. An example is probably best: type Foo{T,N} a::Array b::Array{T,N} end fieldtype(Foo,:a) returns Array{T,N} fieldtype(Foo,:b) returns Array{T,N} And if I use

Re: [julia-users] Does Julia 0.5 leak memory?

2016-09-19 Thread Luke Stagner
I actually ran into this issue too. I have a routine that calculates fast ion orbits that uses a lot of memory (90%). Here is the code (sorry its not very clean). I tried to run the function `make_distribution_file` in a loop

Re: [julia-users] Horn clauses

2016-09-19 Thread Cedric St-Jean
You might want to roll your own, too. It's instructive, and not particularly hard. Russell and Norvig's textbook has a good section on it. On Monday, September 19, 2016 at 5:44:04 PM UTC-4, Kevin Liu wrote: > > Thanks for the direction, Stefan. > > On Monday, September 19, 2016 at 3:10:19 PM

Re: [julia-users] Re: ANN: A potential new Discourse-based Julia forum

2016-09-19 Thread Marius Millea
+1 for Discourse, which I could have done without spamming the list with another message if this were Discourse :)

Re: [julia-users] Does Julia 0.5 leak memory?

2016-09-19 Thread K leo
The only package used (at the global level) is DataFrames. Does that not release memory? On Tuesday, September 20, 2016 at 6:05:58 AM UTC+8, K leo wrote: > > No. After myfunction() finished and I am at the REPL prompt, top shows > Julia taking 49%. And after I did gc(), it shows Julia taking

Re: [julia-users] Does Julia 0.5 leak memory?

2016-09-19 Thread K leo
No. After myfunction() finished and I am at the REPL prompt, top shows Julia taking 49%. And after I did gc(), it shows Julia taking 48%. On Tuesday, September 20, 2016 at 4:05:56 AM UTC+8, Randy Zwitch wrote: > > Does the problem go away if you run gc()? > > > > On Monday, September 19, 2016

[julia-users] Re: How to deal with methods redefinition warnings in 0.5?

2016-09-19 Thread K leo
To me, these methods redefinition warnings are pretty annoying - there are zillions of them. Why should they be there? Look, when I do a include again, I know I am overriding those methods in my file. On Monday, September 12, 2016 at 9:50:27 PM UTC+8, K leo wrote: > > After calling

Re: [julia-users] Horn clauses

2016-09-19 Thread Kevin Liu
Thanks for the direction, Stefan. On Monday, September 19, 2016 at 3:10:19 PM UTC-3, Stefan Karpinski wrote: > > You might try LilKanren.jl . > > On Mon, Sep 19, 2016 at 10:21 AM, Kevin Liu > wrote: > >> Hello. What would be the

Re: [julia-users] Does Julia 0.5 leak memory?

2016-09-19 Thread Randy Zwitch
Does the problem go away if you run gc()? On Monday, September 19, 2016 at 3:55:14 PM UTC-4, K leo wrote: > > Thanks for the suggestion about valgrind. > > Can someone please let me first understand the expected behaviour for > memory usage. > > Let's say when I first starts Julia REPL it

Re: [julia-users] Does Julia 0.5 leak memory?

2016-09-19 Thread K leo
Thanks for the suggestion about valgrind. Can someone please let me first understand the expected behaviour for memory usage. Let's say when I first starts Julia REPL it takes 5% of RAM (according to top). Then I include "myfile.jl" and run myfunction(). During the execution of

Re: [julia-users] Re: ANN: A potential new Discourse-based Julia forum

2016-09-19 Thread Jonathan Malmaud
Discourse lives! On Mon, Sep 19, 2016 at 3:01 PM Stefan Karpinski wrote: > I got the go ahead from Jeff and Viral to give this a try, then it didn't > end up panning out. It would still be worth a try, imo. > > On Sat, Sep 17, 2016 at 11:55 AM, mmh

Re: [julia-users] Re: ANN: SymEngine.jl, a symbolic manipulation library

2016-09-19 Thread Ondřej Čertík
Hi Chris, On Mon, Sep 19, 2016 at 10:23 AM, Chris Rackauckas wrote: > Is there documentation? I don't see a link in the README. Right now you have to look into the source code and tests to see what it can do:

Re: [julia-users] Re: ANN: A potential new Discourse-based Julia forum

2016-09-19 Thread Stefan Karpinski
I got the go ahead from Jeff and Viral to give this a try, then it didn't end up panning out. It would still be worth a try, imo. On Sat, Sep 17, 2016 at 11:55 AM, mmh wrote: > Hi Jonathan, > > Seems like this has kind of burnt out. Is there still an impetus on a >

[julia-users] Re: Any serious quant finance package for Julia?

2016-09-19 Thread Christopher Alexander
I had started the QuantLib.jl package, but the goal was basically a rewrite of the C++ package in Julia. I haven't given it much love lately, but I hope to pick it back up sometime soon. Anyone who wants to join in is definitely welcome! Chris On Saturday, September 17, 2016 at 11:28:36 AM

Re: [julia-users] Horn clauses

2016-09-19 Thread Stefan Karpinski
You might try LilKanren.jl . On Mon, Sep 19, 2016 at 10:21 AM, Kevin Liu wrote: > Hello. What would be the long-term solution for using Horn clauses in > Julia? Is the present solution to call Prolog from C and C from Julia? > Thanks >

Re: [julia-users] workspace allocation for function temporaries - how?

2016-09-19 Thread Yichao Yu
On Mon, Sep 19, 2016 at 1:19 PM, wrote: > Several of my functions start by allocating arrays used for intermediate > computations in the function; these are then discarded at the end of the > routine. In other words, the structure of the function is like this: > >

[julia-users] workspace allocation for function temporaries - how?

2016-09-19 Thread vavasis
Several of my functions start by allocating arrays used for intermediate computations in the function; these are then discarded at the end of the routine. In other words, the structure of the function is like this: function objective1(x) ws1 = Array(Float64, length(x)) ws2 =

Re: [julia-users] conflicts when reloading module

2016-09-19 Thread Cedric St-Jean
Any progress on that? 0.5 killed Autoreload, and I am looking for alternatives. Have you tried julia with babel? On Wednesday, February 18, 2015 at 9:27:05 AM UTC-5, Tamas Papp wrote: > > The problem with workspace() is that if I am loading a few modules, then > re-initialization time is

[julia-users] Horn clauses

2016-09-19 Thread Kevin Liu
Hello. What would be the long-term solution for using Horn clauses in Julia? Is the present solution to call Prolog from C and C from Julia? Thanks

Re: [julia-users] v0.5 deprecates :call. so how do you :call now?

2016-09-19 Thread Florian Oswald
erm... yes. sorry that was a stupid question. thanks anyway! On Monday, 19 September 2016 10:48:44 UTC+2, Bart Janssens wrote: > > > > On Mon, Sep 19, 2016 at 10:11 AM Florian Oswald > wrote: > >> >> So I read somewhere that my construction involving `eval` is bad >>

Re: [julia-users] Does Julia 0.5 leak memory?

2016-09-19 Thread Yichao Yu
On Mon, Sep 19, 2016 at 3:19 AM, Lyndon White wrote: > > On Sunday, 18 September 2016 21:36:24 UTC+8, K leo wrote: >> >> I am also wondering what information I should look into. > > > Learn to use valgrind -- it is a life skill (like knowing how to do a tax > return :-P) >

Re: [julia-users] v0.5 deprecates :call. so how do you :call now?

2016-09-19 Thread Bart Janssens
On Mon, Sep 19, 2016 at 10:11 AM Florian Oswald wrote: > > So I read somewhere that my construction involving `eval` is bad practice. > can anyone give me some guidance as to what is the proper julian way of > expressing this: > > eval(Expr(:call,f,3))? > > Just

Re: [julia-users] v0.5 deprecates :call. so how do you :call now?

2016-09-19 Thread Florian Oswald
Oh, I see! So I read somewhere that my construction involving `eval` is bad practice. can anyone give me some guidance as to what is the proper julian way of expressing this: eval(Expr(:call,f,3))? thanks! On Monday, 19 September 2016 09:46:55 UTC+2, Bart Janssens wrote: > > In 0.5-rc4 your

Re: [julia-users] v0.5 deprecates :call. so how do you :call now?

2016-09-19 Thread Bart Janssens
In 0.5-rc4 your code runs without any warnings. I think only the call function was deprecated, not the :call symbol in an expression tree: dump(:(f(3))) yields: Expr head: Symbol call args: Array{Any}((2,)) 1: Symbol f 2: Int64 3 typ: Any Cheers, Bart On Mon, Sep 19, 2016 at 9:32

[julia-users] v0.5 deprecates :call. so how do you :call now?

2016-09-19 Thread Florian Oswald
i was trying to make sense of the final outcome of the discussion here https://github.com/JuliaLang/julia/pull/13412, but no way. Also I'm not sure what to search for in the documentation (?Base.call tells me it's deprecated.) So: if up to now I programmatically evaluate a function f like

Re: [julia-users] Does Julia 0.5 leak memory?

2016-09-19 Thread Lyndon White
On Sunday, 18 September 2016 21:36:24 UTC+8, K leo wrote: > > I am also wondering what information I should look into. > Learn to use valgrind -- it is a life skill (like knowing how to do a tax return :-P) http://valgrind.org/ Julia specific instructions are at:

[julia-users] Julia lang design pattern for objects that manage their own data

2016-09-19 Thread Tsur Herman
I am pondering the question on how to achieve the following functionality elegantly in Julia: 1) I am reading camera parameters from an ini file into an object of type camera 2) I want to monitor the ini file that used to create the object for any changes .. lets say every second, and to