Re: [julia-users] Singular Spectrum Analysis in Julia?

2014-04-09 Thread Fabian Gans
Thanks Stefan, yes, it was the little subtleties I was afraid of. I did have a look at the R implementation, which is actually a C implementation and thereby not that easy to read (for me). However, I will try to implement a basic version of the method over the next weekend. Fabian On

[julia-users] Implementing Gillespie's Stochastic Simulation Algorithm

2014-04-09 Thread Simon Frost
Dear All, I'm implementing Gillespie's direct method for stochastic simulation: http://en.wikipedia.org/wiki/Gillespie_algorithm I'm loosely following the API for the now-orphaned R package GillespieSSA: http://www.jstatsoft.org/v25/i12

[julia-users] Events.jl

2014-04-09 Thread Simon Danisch
Hello, I published a new package. Hope you can give me some feedback on the implementation and the design. SimonDanisch/Events.jl https://github.com/SimonDanisch/Events.jl Best, Simon

[julia-users] MethodError(Array{T,N} on using end in array of array

2014-04-09 Thread John Drummond
using 0.2.1 running the code in a script (it doesn't work in the REPL either) a = {[1,2,3],1,3,[1,2,3,4]} println(a[4][3]) println(a[4][end -1]) gives 3 LoadError(N:/test/test2.jl,7,MethodError(Array{T,N},([1,2,3,4],1,2))) = I.e referencing using *end* doesn't seem to work on lower levels. =

[julia-users] (preconditioned) conjugate gradient method availability

2014-04-09 Thread Alexander Samoilov
Hello All, I failed to find an PCG implementation in standard Julia distribution for Symmetric Positive Definite (SPD) matrices. Conducted a search for the topic in the group and found a similar thread - even wider - GMRES implementation in Julia programming language (i.e. for non-symmetric):

[julia-users] Online Database + IDE for Julia

2014-04-09 Thread Jannis Eichborn
Hi, As previously announced by Simon Danisch, I want to present our online library concept for Julia. It's an online library based on a graph-database, that is supposed to enable a very rich feature set including uploading and versioning of code, search for code and documentation,

[julia-users] Re: Online Database + IDE for Julia

2014-04-09 Thread Jacques Rioux
Did I miss a link in your post? Is there any place to interact with or see your progress online now? Good luck in your endeavour

[julia-users] Re: How to use GLPK.exact ?

2014-04-09 Thread Stéphane Laurent
Hello guys, I hope you'll enjoy this article on my bloghttp://stla.github.io/stlapblog/posts/KantorovichWithJulia.html . If you're able to use GNU MP on your machine, would you be able to find *3/28* ? Any other comment is welcomed !

[julia-users] Wrappers for boost

2014-04-09 Thread Simon Byrne
I would like to call a small number of boost functions from julia for the purposes of comparison, in particular the incomplete gamma functions: http://www.boost.org/doc/libs/1_55_0/libs/math/doc/html/math_toolkit/sf_gamma/igamma.html As I understand from previous discussions, the template-heavy

Re: [julia-users] MethodError(Array{T,N} on using end in array of array

2014-04-09 Thread Jameson Nash
Please file a bugreport on GitHub A[1,1] returns the element at index (1,1) of a 2d matrix On Wednesday, April 9, 2014, John Drummond john...@gmail.com wrote: using 0.2.1 running the code in a script (it doesn't work in the REPL either) a = {[1,2,3],1,3,[1,2,3,4]} println(a[4][3])

Re: [julia-users] Re: Online Database + IDE for Julia

2014-04-09 Thread Kevin Squire
I think he's referring to this original post: https://groups.google.com/d/topic/julia-users/8NohK0nJaGc/discussion which links to SimonDanisch/Events.jl https://github.com/SimonDanisch/Events.jl I was going to suggest to Simon that he add a short explanation, as the original post was pretty

Re: [julia-users] Wrappers for boost

2014-04-09 Thread Kevin Squire
This might get you started: http://stackoverflow.com/questions/7929905/how-to-write-c-wrapper-around-c-code-to-expose-class-methods Cheers, Kevin On Wed, Apr 9, 2014 at 10:24 AM, Simon Byrne simonby...@gmail.com wrote: I would like to call a small number of boost functions from julia for the

Re: [julia-users] Wrappers for boost

2014-04-09 Thread Isaiah Norton
try this: #include boost/math/special_functions/gamma.hpp extern C { double bst_gamma_p_dbl_dbl(double a, double z) { return boost::math::gamma_p(a, z) } } compile with: g++ -shared -fPIC test.cpp -o test -lboost_math_... (whichever version you have). and then call from Julia with ccall(

Re: [julia-users] Re: Online Database + IDE for Julia

2014-04-09 Thread Jacques Rioux
I did see that post after but I still fail to see the connection between the two.

Re: [julia-users] Re: Online Database + IDE for Julia

2014-04-09 Thread Kevin Squire
You're right. The message talking about this was actually on julia-dev. https://groups.google.com/d/msg/julia-dev/LJqyYmGFS1M/1TOKOWX-x8IJ Cheers! Kevin On Wed, Apr 9, 2014 at 11:00 AM, Jacques Rioux jacques.ri...@gmail.comwrote: I did see that post after but I still fail to see the

[julia-users] Re: How to use GLPK.exact ?

2014-04-09 Thread Ivar Nesje
You might be exited when you find out that you can use μ, ν, M₁ and M₂ as variable names in Julia, because we support UTF-8. Sometimes it might give more readable code, when you compare it to the math texts. Ivar kl. 19:08:19 UTC+2 onsdag 9. april 2014 skrev Stéphane Laurent følgende:

Re: [julia-users] Re: Online Database + IDE for Julia

2014-04-09 Thread Jacques Rioux
Ah! Ok, now I get it. I was starting to wonder Am I really that thick? I may be but we will have to wait a lttle longer for confirmation... ;-) Thanks

[julia-users] TensorOperations.jl

2014-04-09 Thread Jutho
Dear Julia users, I would like to present TensorOperations.jl v0.0.1, a package for performing tensor contractions, traces and related operations. It can be found here: https://github.com/Jutho/TensorOperations.jl and can now be installed using Pkg.add(TensorOperations) Before creating an

[julia-users] Interfacing with a C struct

2014-04-09 Thread Dominique Orban
Hi, I gather this is a often-discussed topic but I've not been able to find a sufficiently explicit example to get me going. I'm looking to interact with a C library. I'm able to make simple ccall() calls but in order to set things up, I need to be able to read from and write to the main data

[julia-users] Re: How to use GLPK.exact ?

2014-04-09 Thread Carlo Baldassi
Hi Stéphane, nice post! I have a number of comments and suggestions which you may find useful. I accompanied these comments with some demo code, you can find here https://gist.github.com/carlobaldassi/10312215. A) Generic to Julia A.1) as Ivar said, you can use Unicode characters if you want;

[julia-users] Re: 1st JuliaConference: June 26th-28th, Chicago

2014-04-09 Thread Tracy Wadleigh
Would it be possible to provide a few more specifics at this point so that folks can start to consider travel and accommodations? For instance, has an address for the meeting location been decided upon? Will a block of hotel rooms be reserved? ...

Re: [julia-users] Events.jl

2014-04-09 Thread Elliot Saba
Hey Simon, I think you might have better success with this if you ask more specific questions, as it's hard to ask for feedback to such a large group without giving us some idea of what you want critiqued, and looking over the entire codebase is probably too big a job for most of us. -E On Wed,

Re: [julia-users] Wrappers for boost

2014-04-09 Thread Simon Byrne
Fantastic, thanks! Works great. I also found the clearly semicolon: clearly you're getting too used to julia... simon On Wednesday, 9 April 2014 19:00:55 UTC+1, Isaiah wrote: try this: #include boost/math/special_functions/gamma.hpp extern C { double bst_gamma_p_dbl_dbl(double a,

Re: [julia-users] Wrappers for boost

2014-04-09 Thread Simon Byrne
*missing* semicolon. clearly I'm not used to proofreading. On Wednesday, 9 April 2014 22:21:23 UTC+1, Simon Byrne wrote: Fantastic, thanks! Works great. I also found the clearly semicolon: clearly you're getting too used to julia... simon On Wednesday, 9 April 2014 19:00:55 UTC+1,

Re: [julia-users] Re: How to use GLPK.exact ?

2014-04-09 Thread Carlo Baldassi
About GLPK.exact it is not possible to get the rational number 3/28 instead of a decimal approximation ? No, unfortunately. Also, for that to happen/make sense, you'd also need to be able to pass all the *inputs* as exact rational values, i.e. as 1//7 instead of 1/7. This would be possible if

[julia-users] Re: Strange llvm code generated

2014-04-09 Thread Rak Rok
Excellent! Thanks guys, this is a TON better! I find it a little bit strange that it fetches the value of 0 from some area in memory instead of just say xor RAX, RAX. I'm guessing it doesn't know that the value is actually numeric 0? Is that because zero(T) isn't being inlined fully perhaps?

Re: [julia-users] Re: 1st JuliaConference: June 26th-28th, Chicago

2014-04-09 Thread Evan Miller
We haven't made a decision about a block of hotel rooms, but the venue will be the University of Chicago's Gleacher Center downtown: https://www.google.com/maps/place/University+of+Chicago:+Gleacher+Center/@41.889666,-87.66,16z/data=!4m2!3m1!1s0x880e26623550ffd7:0x2de5428703b98337 On Wed,

Re: [julia-users] Re: How to use GLPK.exact ?

2014-04-09 Thread Iain Dunning
Todo: right generic simplex implementation - it'd be so easy in Julia! On Wednesday, April 9, 2014 6:18:26 PM UTC-4, Carlo Baldassi wrote: About GLPK.exact it is not possible to get the rational number 3/28 instead of a decimal approximation ? No, unfortunately. Also, for that to

[julia-users] Re: Interfacing with a C struct

2014-04-09 Thread Dominique Orban
Oh, and some struct members are function pointers that I'd like to call...

Re: [julia-users] Re: Strange llvm code generated

2014-04-09 Thread Rak Rok
I think the following code is more illustrative of the issue: julia function foo() result::Int = 0 result end foo (generic function with 1 method) julia code_native(foo, ()) .section __TEXT,__text,regular,pure_instructions Filename: none Source line: 2 push

Re: [julia-users] Re: Interfacing with a C struct

2014-04-09 Thread Keno Fischer
You need to mirror all fields up to and including the one you want to access, but it's fine to replace arbitrary pointers by Ptr{Void}. Also note that you currently should not attempt to pass structs to C by value since that probably won't work (pointers are fine though). On Wed, Apr 9, 2014 at

Re: [julia-users] Re: Strange llvm code generated

2014-04-09 Thread Keno Fischer
The reason is fairly straightforward (though of course it should be properly optimized). Assignments always yield the RHS so `foo2` is equivalent to function foo3() result::Int = 0 return 0 end To see this you can do: julia @code_typed foo2() 1-element Array{Any,1}: :($(Expr(:lambda,

Re: [julia-users] Re: Strange llvm code generated

2014-04-09 Thread Rak Rok
Hey Keno, Thanks - that's correct. I was just remarking that those 2 functions should generate the same code but they don't. Hopefully this small test case will be an easy way to figure out why julia is still generating the slightly suboptimal code for my original f() method by loading up that

Re: [julia-users] Re: Interfacing with a C struct

2014-04-09 Thread Dominique Orban
Thanks for the reply. Is there an example I could look at? So far I've completely mirrored the struct. I can grab a Ptr to the main data structure but it's not clear to me how to access its members. On Wednesday, April 9, 2014 4:09:48 PM UTC-7, Keno Fischer wrote: You need to mirror all

Re: [julia-users] Re: How to use GLPK.exact ?

2014-04-09 Thread Miles Lubin
When we have a simplex solver (either in Julia or external) that supports rational inputs, we could consider making this work with JuMP, but for now JuMP stores all data as floating-point as well. Stephane, nice work. LP definitely needs more exposure in the probability community. Please

Re: [julia-users] I noticed there is no do while loop

2014-04-09 Thread David Moon
On Tuesday, April 8, 2014 7:17:18 PM UTC-4, Cameron McBride wrote: I've long enjoyed ruby's `loop` keyword for exactly this type of use. Too bad Julia doesn't have (full featured) macros so you could write loop yourself and just use it without first convincing a whole lot of people it's a

Re: [julia-users] Re: Interfacing with a C struct

2014-04-09 Thread Isaiah Norton
Some good examples (look at unsafe_load and unsafe_store): https://github.com/staticfloat/Nettle.jl/blob/master/src/hash.jl https://github.com/JuliaAstro/WCSLIB.jl/blob/master/src/WCSLIB.jl On Wed, Apr 9, 2014 at 7:27 PM, Dominique Orban dominique.or...@gmail.comwrote: Thanks for the reply.

Re: [julia-users] I noticed there is no do while loop

2014-04-09 Thread Stefan Karpinski
You can do `@loop begin ... end` – of course, that's not any shorter than `while true ... end`. On Wed, Apr 9, 2014 at 7:31 PM, David Moon dave_m...@alum.mit.edu wrote: On Tuesday, April 8, 2014 7:17:18 PM UTC-4, Cameron McBride wrote: I've long enjoyed ruby's `loop` keyword for exactly this

Re: [julia-users] Re: multi-taper F-test and Slepian sequences

2014-04-09 Thread Kevin Squire
Hi Simon, I noticed that you removed windows.jl from FrequencyDomainAnalysis.jl (now Synchrony.jl). Are they by chance available elsewhere? Cheers, Kevin On Fri, Sep 20, 2013 at 8:05 AM, Simon Kornblith si...@simonster.comwrote: I have some code for this here:

[julia-users] bit-twiddling micro benchmark

2014-04-09 Thread andrew cooke
The fastest routine at https://github.com/andrewcooke/CRC.jl/blob/master/test/speed.jl is 2.6x slower than C code. I've tried to isolate things so it's easy to hack and experiment with. If anyone can beat my best code (which - credit to Julia - is also the simplest; anything I try to make

Re: [julia-users] Re: How to use GLPK.exact ?

2014-04-09 Thread Tony Kelman
Another semi-hacky option here is using a conventional double-precision LP solver to tell you the active set at the solution the solver considered optimal (up to whatever its tolerance was set to). Then you can take that active set and solve the arbitrary-precision version of the constraint

[julia-users] Re: [julia-dev] Re: 1st JuliaConference: June 26th-28th, Chicago

2014-04-09 Thread Pulkit Bhuwalka
This is awesome. I really hope to be able to make it. On Wed, Apr 9, 2014 at 5:00 PM, Tracy Wadleigh tracy.wadle...@gmail.comwrote: Would it be possible to provide a few more specifics at this point so that folks can start to consider travel and accommodations? For instance, has an address

[julia-users] Re: (preconditioned) conjugate gradient method availability

2014-04-09 Thread Tony Kelman
Have a look at the IterativeSolvers package: https://github.com/JuliaLang/IterativeSolvers.jl It hasn't seen much development in the last couple months, but it does contain CG and GMRES implementations that can take preconditioners. On Wednesday, April 9, 2014 8:53:02 AM UTC-7, Alexander

[julia-users] Re: (preconditioned) conjugate gradient method availability

2014-04-09 Thread Alexander Samoilov
Thanks a lot for the link! Sure, I will try the package. On Thursday, April 10, 2014 5:12:29 AM UTC+4, Tony Kelman wrote: Have a look at the IterativeSolvers package: https://github.com/JuliaLang/IterativeSolvers.jl It hasn't seen much development in the last couple months, but it does