[julia-users] Re: URGENT: Google Summer of Code

2015-03-24 Thread Viral Shah
Hi Raniere, Are there specific dates mentors and students have to do this by? -viral On Tuesday, March 24, 2015 at 10:25:22 PM UTC+1, Raniere Silva wrote: > > Hi, > > there was a problem of communication > and I didn't announce that NumFOCUS, http://numfocus.org/, > was selected for Google Su

Re: [julia-users] Julia users Berlin

2015-03-24 Thread Viral Shah
How about we aim for 5pm in that case? I think I can make it by then. Does that work for others? -viral On Tuesday, March 24, 2015 at 11:07:40 AM UTC+1, Simon Danisch wrote: > > My train leaves at 9pm (at least the train station is close), so I'd > probably go there 1-2 hours early and see who

[julia-users] Re: Julia blogging and contributions

2015-03-24 Thread cdm
these twitter feeds: https://twitter.com/JuliaLanguage https://twitter.com/ProjectJupyter https://twitter.com/julialang_news in addition to searching twitter for #JuliaLang https://twitter.com/hashtag/julialang?src=hash usually yield interesting, fresh and dynamic content with

[julia-users] Re: Performance difference between running in REPL and calling a script?

2015-03-24 Thread Michael Bullman
Hi Guys, So I just went back through my code. I didn't see any global variables. I'm going to try and start using the @time macro tomorrow to try and identify the worse functions. Would writes to file significantly impact speed? I know looking on google writing to files is frowned upon, but wh

Re: [julia-users] Re: inserting an Expr into AST via macro

2015-03-24 Thread Abe Schneider
As a (hopeful) final note, I figured out the correct way to escape the expression: for rule in all_rules if typeof(rule.action) != Function dot = Expr(:(.), rule, QuoteNode(:action)) fn = Expr(:(->), Expr(:tuple, :rule, :value, :first, :last, :children), Expr(:bl

Re: [julia-users] When are files un mmap'd?

2015-03-24 Thread Tim Holy
Yes, in general you want to close `s` after calling mmap_array. The sequence a = 0 gc() should (as long as there are no other references to the original a) unmap it. On julia 0.4 you can also call `finalize` directly. --Tim On Tuesday, March 24, 2015 01:26:11 PM Sebastian Good wrote: > G

Re: [julia-users] list of keyword arguments

2015-03-24 Thread Jacob Quinn
There's an open issue: https://github.com/JuliaLang/julia/issues/2758 Feel free to voice your support for a fix! Squeaky issues get the grease. :) -Jacob On Tue, Mar 24, 2015 at 4:49 PM, Pooya wrote: > Is there a way to get a list of keyword arguments using the function name? > It does not sho

[julia-users] list of keyword arguments

2015-03-24 Thread Pooya
Is there a way to get a list of keyword arguments using the function name? It does not show up in methods(myfunc), and I am trying to see if it is defined correctly, and if yes, why do I get the undefined keyword argument message when using @debug. Thanks!

[julia-users] Re: Adding Julia to OS X Path

2015-03-24 Thread Eric S
Thanks, that worked great. Eric On Tuesday, March 24, 2015 at 4:15:30 PM UTC-5, Tomas Mikoviny wrote: > > in "Atom " -> "Open Your Init Script" add following line: > > process.env.PATH = > ["/Applications/Julia-0.3.5.app/Contents/Resources/julia/bin", > process.env.PATH].join(":") > > restart A

[julia-users] URGENT: Google Summer of Code

2015-03-24 Thread Raniere Silva
Hi, there was a problem of communication and I didn't announce that NumFOCUS, http://numfocus.org/, was selected for Google Summer of Code this year. What this means to Julia? That you can try participate at GSoC with Julia. I know that isn't much time left, and I'm very sorry about that, but the

[julia-users] Re: Adding Julia to OS X Path

2015-03-24 Thread Tomas Mikoviny
in "Atom " -> "Open Your Init Script" add following line: process.env.PATH = ["/Applications/Julia-0.3.5.app/Contents/Resources/julia/bin", process.env.PATH].join(":") restart Atom.app and it should work Tomas On Monday, March 23, 2015 at 8:43:08 PM UTC+1, Eric S wrote: > > I'm trying out At

[julia-users] Re: Saving Kernel Density Estimation Function output for later use

2015-03-24 Thread Christopher Fisher
Excellent. Thanks again. On Tuesday, March 24, 2015 at 4:48:44 PM UTC-4, Simon Byrne wrote: > > Ah. So FloatRange actually has 4 fields: you can see their names by > calling names(range) > start > step > len > divisor > > if you save all those, and pass them back to the constructor, > > FloatRa

[julia-users] Re: Saving Kernel Density Estimation Function output for later use

2015-03-24 Thread Simon Byrne
Ah. So FloatRange actually has 4 fields: you can see their names by calling names(range) start step len divisor if you save all those, and pass them back to the constructor, FloatRange(start,step,len,divisor) you should be in business. On Tuesday, 24 March 2015 21:40:41 UTC+1, Christopher Fis

[julia-users] Re: Saving Kernel Density Estimation Function output for later use

2015-03-24 Thread Christopher Fisher
Thank you. That part works. I saved the range and density to excel files and loaded them back into Julia. I realized that there does not appear to be a way to convert an Array to a Float range using convert(). As a workaround, I tried saving the FloatRange variable "range" as the min, step and

[julia-users] When are files un mmap'd?

2015-03-24 Thread Sebastian Good
Given s = open("bigdata") a = mmap_array(Int64, (a_billion, a_jillion), s) Is it safe to use a after s has been closed? The documentation isn't entirely clear about when munmap is called; is there an explicit operation we should use on a to deterministically unmap it?

Re: [julia-users] Symbol to string

2015-03-24 Thread Ivar Nesje
I'm really sorry. Seems like I should have checked that it actually worked. I think the missing method could be considered a bug, does anyone know an issue for that on Github? tirsdag 24. mars 2015 14.29.38 UTC+1 skrev verylu...@gmail.com følgende: > > `convert` does not seem to work with symbol

[julia-users] Re: Saving Kernel Density Estimation Function output for later use

2015-03-24 Thread Simon Byrne
On Tuesday, 24 March 2015 20:25:48 UTC+1, Christopher Fisher wrote: > > Thank you for your replies, Rene and Simon. Unfortunately, HDF5 would not > properly install. Simon, would you be able to show me the syntax for > extracting the Range and Array from the UnivariateKDE object? I'm not > famil

[julia-users] Re: Saving Kernel Density Estimation Function output for later use

2015-03-24 Thread Christopher Fisher
Thank you for your replies, Rene and Simon. Unfortunately, HDF5 would not properly install. Simon, would you be able to show me the syntax for extracting the Range and Array from the UnivariateKDE object? I'm not familiar with these composite objects and could not find anything in my searches o

[julia-users] builing 0.3.8 - lots of 'fatal:' error messages

2015-03-24 Thread Neal Becker
after git clone, and make OPENBLAS_TARGET_ARCH=NEHALEM I see a lot of messages like: fatal: Needed a single revision fatal: This operation must be run in a work tree fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, lik

Re: [julia-users] Re: zero-allocation reinterpretation of bytes

2015-03-24 Thread Stefan Karpinski
There's a branch in eltype, which is probably causing this difference. On Tue, Mar 24, 2015 at 7:00 PM, Sebastian Good < sebast...@palladiumconsulting.com> wrote: > Yep, that’s done it. The only difference I can see in the code I wrote > before and this code is that previously I had > > convert(P

Re: [julia-users] Re: zero-allocation reinterpretation of bytes

2015-03-24 Thread Sebastian Good
Yep, that’s done it. The only difference I can see in the code I wrote before and this code is that previously I had convert(Ptr{T}, pointer(raw, byte_number)) whereas here we have convert(Ptr{T}, pointer(raw) + byte_number - 1) The former construction seems to emit a call to a Julia-intrinsic

[julia-users] Re: Saving Kernel Density Estimation Function output for later use

2015-03-24 Thread Simon Byrne
The UnivariateKDE object is just a Range and an Array of the same length, so you could also just save that information, and recreate the object via UnivariateKDE(range,density). On Tuesday, 24 March 2015 13:32:46 UTC+1, René Donner wrote: > > You can try the jld* functions of the HDF5.jl package

Re: [julia-users] ccall interface Arrays

2015-03-24 Thread Stefan Karpinski
As pointers to the array data. There's a bunch of examples in the manual section: http://docs.julialang.org/en/release-0.3/manual/calling-c-and-fortran-code/ See the compute_dot example. On Tue, Mar 24, 2015 at 6:32 PM, Neal Becker wrote: > How are Arrays passed between julia and C? Any examp

[julia-users] ccall interface Arrays

2015-03-24 Thread Neal Becker
How are Arrays passed between julia and C? Any examples? -- Those who fail to understand recursion are doomed to repeat it

Re: [julia-users] strange behaviour of togglebuttons in Interact.jl

2015-03-24 Thread Andrei Berceanu
OK, I see. Now my problem is that, in my code, the initial value should then depend on another signal, and I have found no way of resolving this. The actual code I have is *lift(a -> togglebuttons(["Landau" => ( (n,m) -> one(Complex{Float64}), (n,m) -> one(Complex{Fl

[julia-users] Re: zero-allocation reinterpretation of bytes

2015-03-24 Thread Simon Danisch
Haha how silly of me! Don't know how I overlooked unsafe_load(ptr)... How odd, in the end I thought ::DataType and Type{T} doesn't emit different code... Guess it must have been obscured by something else. But yeah, makes sense that this specializes differently. Am Montag, 23. März 2015 20:20:09

Re: [julia-users] Re: zero-allocation reinterpretation of bytes

2015-03-24 Thread Matt Bauman
(The key is to ensure that the method gets specialized for different types with the parametric `::Type{T}` in the signature instead of `T::DataType`). On Tuesday, March 24, 2015 at 12:10:59 PM UTC-4, Stefan Karpinski wrote: > > This seems like it works fine to me (on both 0.3 and 0.4): > > immuta

[julia-users] Re: zero-allocation reinterpretation of bytes

2015-03-24 Thread Simon Danisch
There is a high chance that I simply don't understand llvmcall well enough, though ;) Am Montag, 23. März 2015 20:20:09 UTC+1 schrieb Sebastian Good: > > I'm trying to read some binary formatted data. In C, I would define an > appropriately padded struct and cast away. Is is possible to do somet

Re: [julia-users] Re: zero-allocation reinterpretation of bytes

2015-03-24 Thread Stefan Karpinski
This seems like it works fine to me (on both 0.3 and 0.4): immutable Test x::Float32 y::Int64 z::Int8 end julia> a = [Test(1,2,3)] 1-element Array{Test,1}: Test(1.0f0,2,3) julia> b = copy(reinterpret(UInt8, a)) 24-element Array{UInt8,1}: 0x00 0x00 0x80 0x3f 0x03 0x00 0x00 0x00 0x02 0x

[julia-users] Re: zero-allocation reinterpretation of bytes

2015-03-24 Thread Simon Danisch
You should try llvmcall then... I tried to come up with a solution but I ran into this issue: #8740 Am Montag, 23. März 2015 20:20:09 UTC+1 schrieb Sebastian Good: > > I'm trying to read some binary formatted data. In C, I would define an > appropri

Re: [julia-users] Re: emacs ess julia trouble

2015-03-24 Thread Ista Zahn
On Tue, Mar 24, 2015 at 5:07 AM, Boris Kheyfets wrote: >> it seems (require 'julia-mode) will interfere with ess-julia. > > wow, that sucks. Well, it cannot be otherwise as long as both julia-mode and ess-julia are major modes. Only one major mode can be active at a time. There are plans on the E

Re: [julia-users] strange behaviour of togglebuttons in Interact.jl

2015-03-24 Thread Shashi Gowda
Not a bug, if you are passing in your own input signal to widgets, you need to take care of maintaining the right initial values. It's also better to use OrderedDict from DataStructures package here to keep the ordering of the key-value pairs. On Tue, Mar 24, 2015 at 7:39 PM, Andrei Berceanu wr

Re: [julia-users] Re: zero-allocation reinterpretation of bytes

2015-03-24 Thread Sebastian Good
Thanks Simon, I’ve tried this approach, but the disassembly still indicates it calls a function julia_pointer, which is overhead I’d like to avoid if possible.  On March 23, 2015 at 6:11:08 PM, Simon Danisch (sdani...@gmail.com) wrote: unsafe_read_t(T::DataType, x::Vector{Uint8}, byte_offset::In

[julia-users] strange behaviour of togglebuttons in Interact.jl

2015-03-24 Thread Andrei Berceanu
Consider the following code *using Reactive, Interactα = Input(0)togglebuttons(["one" => 1, "two" => 2], signal=α)signal(α)*I would expect the value of *α *to change after executing the *togglebuttons*(..) line, however this is not the case. *signal(α) *on the next line shows that *α *is st

Re: [julia-users] Symbol to string

2015-03-24 Thread veryluckyxyz
`convert` does not seem to work with symbols. I get an error (same for String and UTF8String as well). Test commands: testdf = DataFrame(A = [1,2,3], B=[2,3,4]) string(names(testdf)[1]) # works convert(String, names(testdf)[1]) # throws error convert(ASCIIString, names(testdf)[1]) # throws error c

[julia-users] Re: emacs ess julia trouble

2015-03-24 Thread Boris Kheyfets
> > it seems (require 'julia-mode) will interfere with ess-julia. > wow, that sucks. I find-replaced julia-mode to ess-julia-mode in ESS/lisp/ess-julia.el seems to be working so far. On Thursday, July 31, 2014 at 5:51:02 PM UTC+4, Neal Becker wrote: > > Neal Becker wrote: > > > I am trying em

[julia-users] Re: Saving Kernel Density Estimation Function output for later use

2015-03-24 Thread René Donner
You can try the jld* functions of the HDF5.jl package, they can save custom types: https://github.com/timholy/HDF5.jl Am Dienstag, 24. März 2015 13:21:02 UTC+1 schrieb Christopher Fisher: > > I would like to save the output of a kernel density estimate function for > future use. The KernelDensit

[julia-users] Saving Kernel Density Estimation Function output for later use

2015-03-24 Thread Christopher Fisher
I would like to save the output of a kernel density estimate function for future use. The KernelDensity package returns an object of the type UnivariateKDE{FloatRange{Float64}} (constructor with 1 method). Ideally, I would like to save upwards of 1000 of these for future use because the model I

Re: [julia-users] Interpolation based on sorted but a priori unknown grid (code review?)

2015-03-24 Thread Nils Gudat
I think most important points have been raised here by the people that know much more about this than me, but let me just add a link to this little piece of code I've written that compares linear, spline and piecewise

Re: [julia-users] Julia users Berlin

2015-03-24 Thread Simon Danisch
My train leaves at 9pm (at least the train station is close), so I'd probably go there 1-2 hours early and see who drops by. Felix Schüler would come earlier as well ;) @David Higgins Do we need to call them to adjust this properly? On 24 Mar 2015 08:56, "Fabian Gans" wrote: > I will not be there

Re: [julia-users] metaprogramming for modifying expression inside anonymous function?

2015-03-24 Thread Mike Innes
Try map(f -> (x, y) -> -f(x, y), foolist) On 24 March 2015 at 09:35, Andrei Berceanu wrote: > Hi guys, > > Say I have a tuple of anonymous functions, such as: > > *foolist = ((x,y)-> exp(x*y), (x,y)-> sin(x+y))* > > and would like to (programatically) produce another tuple where every > functio

[julia-users] metaprogramming for modifying expression inside anonymous function?

2015-03-24 Thread Andrei Berceanu
Hi guys, Say I have a tuple of anonymous functions, such as: *foolist = ((x,y)-> exp(x*y), (x,y)-> sin(x+y))* and would like to (programatically) produce another tuple where every function has its overall sign changed. In my example this would be *newfoolist = ((x,y)-> -exp(x*y), (x,y)-> -si

Re: [julia-users] Julia users Berlin

2015-03-24 Thread Fabian Gans
I will not be there. 7 seems to be too late for me to get back to Jena the same day. Fabian