[julia-users] Re: Cross-correlation: rfft() VS fft() VS xcorr() performances

2016-04-08 Thread DNF
The xcorr function calls the conv function, which again uses fft. If you know the general structure and length of your signals ahead of time, you can probably gain some performance by planning the ffts beforehand. I don't know why it doesn't work for you, but you could have a look in at conv in

Re: [julia-users] state of Winston

2016-04-08 Thread harven
Le jeudi 7 avril 2016 21:37:47 UTC+2, Mauro a écrit : > > https://github.com/tbreloff/Plots.jl wraps many of the plotting packages > and thus allows to use all of them with a single syntax. Maybe you > should give that a spin? > > I will have a look. Thanks.

[julia-users] Opinion on Plots.jl -- exclamation marks

2016-04-08 Thread Daniel Carrera
Hello, I was looking through the API for Plots.jl http://plots.readthedocs.org/en/latest/#api Maybe I'm the only one, but I think all those exclamation marks are a bit extraneous and feel like syntactic noise. I have been following Plots.jl because I'm interested in plotting. My use of Julia

Re: [julia-users] How to initialize a Matrix{T}?

2016-04-08 Thread Mauro
On Thu, 2016-04-07 at 21:27, Lucas de Almeida Carotta wrote: > How I make this code works? > > function read_matrix( data::DataType=Any, spacing=" " ) > local line::Vector{ data } = Array( data, 1 ) > local matrix::Matix{ data } = Array( Array{ data, 1 }, 1 ) > > while !eof( STDIN ) >

[julia-users] Re: MXNet setting workspace, Convolutional layers, kernels etc

2016-04-08 Thread Valentin Churavy
Also take a look at https://github.com/dmlc/MXNet.jl/pull/73 where I implemented debug_str in Julia so that you can test your network on its space requirements. On Friday, 8 April 2016 15:54:06 UTC+9, Valentin Churavy wrote: > > What happens if you set the batch_size to 1? Also take a look at >

[julia-users] Re: Cross-correlation: rfft() VS fft() VS xcorr() performances

2016-04-08 Thread CrocoDuck O'Ducks
Oh cool, thanks for the tips. I'll dive in and be back! On Friday, 8 April 2016 08:18:17 UTC+1, DNF wrote: > > The xcorr function calls the conv function, which again uses fft. If you > know the general structure and length of your signals ahead of time, you > can probably gain some performance

Re: [julia-users] Opinion on Plots.jl -- exclamation marks

2016-04-08 Thread Tamas Papp
Hi, IMO an extra ! is a small price to pay for consistency --- you are after all modifying an existing object. Avoiding globals is also a good strategy. The lure of terser syntax for common use cases is always there, but I like to remind myself that I will be the person reading this code in 6 mon

Re: [julia-users] What is the correct way to use the type alias Vector and Matrix in multiple dispatch?

2016-04-08 Thread Eric Forgy
julia> foo{T}(A::Vector{Matrix{T}}) = 1 This says: foo is a function with parameter "T" that takes an argument of type "Vector{Matrix{T}}". No problem. julia> bar(A::Vector{Matrix}) = 1 This says: bar is a function with no parameters that takes an argument of type "Vector{Matrix}". However

[julia-users] Re: MXNet setting workspace, Convolutional layers, kernels etc

2016-04-08 Thread kleinsplash
Hi, I reduced the workspace to 1024 and batch_size to 1 - I get the memory error same as before. I went back to using the whole batch and its running again. Thx for the other stuff will look into that now.. On Friday, 8 April 2016 09:53:18 UTC+2, Valentin Churavy wrote: > > Also take a loo

[julia-users] Re: MXNet setting workspace, Convolutional layers, kernels etc

2016-04-08 Thread kleinsplash
Getting `ERROR: LoadError: UndefVarError: @mxcall not defined` which is odd.. On Friday, 8 April 2016 10:18:03 UTC+2, kleinsplash wrote: > > Hi, > > I reduced the workspace to 1024 and batch_size to 1 - I get the memory > error same as before. I went back to using the whole batch and its runnin

[julia-users] Getting the name of the running program

2016-04-08 Thread Ferran Mazzanti
Hi folks, probably a most stupid question here :) Is there a way to get a string with the name of the Julia program one is running? I ask because I usually write output files starting with a header stating something like "# Results generated by the program " followed by the program name. So ho

Re: [julia-users] state of Winston

2016-04-08 Thread jonathan . bieler
Gadfly is probably the best solution for a native implementation, but is has serious performance issues, specially if you want interactivity (which you can get with https://github.com/JuliaGraphics/Immerse.jl).

[julia-users] Re: How to initialize a Matrix{T}?

2016-04-08 Thread Sisyphuss
I have a related question: How to initialize an array of fixed shape except one dimension, such as `m * n * 0`. And I would like to dynamically increase the last dimension later.

[julia-users] Re: diagm for an (n x 1) Array{T, 2}

2016-04-08 Thread Sisyphuss
IMHO, It would also make sense to extend `diagm` to (n x 1 x 1), (n x 1 x 1 x 1), (1 x n x 1) ... arrays. But, if we check the dimension in the function body, it may decrease the performance (IMHO). Note that you can always write `diagm(vec(a))` to transform it to a vector. On Friday, Apri

[julia-users] Re: Cross-correlation: rfft() VS fft() VS xcorr() performances

2016-04-08 Thread DNF
Hmm. Thinking a bit more about it, it might be hard to beat the FFT with when your signals are *that* long. FFT is O(N*logN), while time domain is O(L*logN) where L is the number of lags. log2(60*48000) is less than 22(!) so the FFT will be *very* beneficial. Here you can have a look at a discu

[julia-users] Re: Cross-correlation: rfft() VS fft() VS xcorr() performances

2016-04-08 Thread DNF
On Friday, April 8, 2016 at 1:31:54 PM UTC+2, DNF wrote: > > FFT is O(N*logN), while time domain is O(L*logN) where L is the number of > lags. > I meant, of course, that the time domain xcorr is O(L*N).

[julia-users] Re: Getting the name of the running program

2016-04-08 Thread Andrea Pagnani
If with name of the program you mean the name of the file where the function is defined println(@__FILE__) makes the job. On Friday, April 8, 2016 at 10:53:14 AM UTC+2, Ferran Mazzanti wrote: > > Hi folks, > > probably a most stupid question here :) Is there a way to get a string > with the n

Re: [julia-users] state of Winston

2016-04-08 Thread Tom Breloff
Plots.jl is by far the best option ;) I'm happy to help get you started if you run into any trouble.

[julia-users] Re: How to initialize a Matrix{T}?

2016-04-08 Thread 'Greg Plowman' via julia-users
Maybe something like: x = Array{Int}(3,4,0) x = vec(x) append!(x, 1:12) x = reshape(x,3,4,1) x = vec(x) append!(x, 13:24) x = reshape(x,3,4,2) Of course you could wrap it into a more convenient function. On Friday, April 8, 2016 at 7:31:30 PM UTC+10, Sisyphuss wrote: > I have a related quest

[julia-users] Re: Fast multiprecision integers?

2016-04-08 Thread Jeffrey Sarnoff
Julia has functions for checked integer arithmetic on the base integer types which raise an OverflowError(). using Base.Checked # now these functions are available for use: # checked_neg, checked_abs, checked_add, checked_sub, checked_mul # checked_div, checked_rem, checked_fld, checked_mod,

Re: [julia-users] Creating a subtype of IO that wraps an IOBuffer

2016-04-08 Thread Daniel Arndt
Hi Kevin, That's definitely a useful reference, they are doing a lot of similar things. Thanks! Cheers, Dan On Wednesday, 6 April 2016 12:44:30 UTC-3, Kevin Squire wrote: > > Have you seen https://github.com/BioJulia/BufferedStreams.jl? Is that > close to what you're trying to do? > > Cheers,

Re: [julia-users] Fast multiprecision integers?

2016-04-08 Thread Erik Schnetter
Laurent I'm afraid you can't use `reinterpret` with a type such as `BigInt`. I think what you want is an extension of `Nullable`: A nullable type represents an object of a particular type that might or might not be there; there's hope that this would be done efficiently, e.g. via an additional bi

Re: [julia-users] Opinion on Plots.jl -- exclamation marks

2016-04-08 Thread Tom Breloff
On Fri, Apr 8, 2016 at 3:44 AM, Daniel Carrera wrote: > Hello, > > I was looking through the API for Plots.jl > > http://plots.readthedocs.org/en/latest/#api > If you look just above that, note that I put a big warning that this section of the docs need updating. Personally, I hardly ever use t

Re: [julia-users] Cross-correlation: rfft() VS fft() VS xcorr() performances

2016-04-08 Thread Stefan Karpinski
Would it make sense to have a maxlag keyword option on xcorr to limit how big the lags it considers are? On Friday, April 8, 2016, DNF wrote: > The xcorr function calls the conv function, which again uses fft. If you > know the general structure and length of your signals ahead of time, you > ca

Re: [julia-users] Fast multiprecision integers?

2016-04-08 Thread Stefan Karpinski
This is possible but requires significant cooperation from the garbage collector, which is not possible without a lot of work. This is work that it planned, however: efficient bigints are definitely in our sights. On Friday, April 8, 2016, Erik Schnetter wrote: > Laurent > > I'm afraid you can't

Re: [julia-users] Cross-correlation: rfft() VS fft() VS xcorr() performances

2016-04-08 Thread CrocoDuck O'Ducks
I think so. MATLAB xcorr implementation accepts a maxlag argument, which is probably handy for many people. I don't think I will write my xcorr version. I will probably take a dirty shortcut: calculate the cross correlation only on windowed s

Re: [julia-users] Opinion on Plots.jl -- exclamation marks

2016-04-08 Thread Daniel Carrera
Hello, On 8 April 2016 at 15:07, Tom Breloff wrote: > > It modifies a plot, and so follows Julia convention. Anything else is > likely to induce confusion. > I do see your point of view, and of course it's your library. I also don't want to diss your work. I think the convention is about modif

[julia-users] Re: Error installing hydrogen for Atom

2016-04-08 Thread Achu
That's unfortunate. I was excited about hydrogen. On Friday, 8 April 2016 00:14:02 UTC-5, Jeffrey Sarnoff wrote: > > I have experienced this too. Hydrogen has never been a load-and-go > proposition for Julia on Windows. Before this, there were other hang-ups > and some have had their roots in

Re: [julia-users] Fast multiprecision integers?

2016-04-08 Thread Scott Jones
I like very much the idea of a discriminated union - that would help enormously with some of the stuff I work on. On Friday, April 8, 2016 at 8:47:59 AM UTC-4, Erik Schnetter wrote: > > Laurent > > I'm afraid you can't use `reinterpret` with a type such as `BigInt`. > > I think what you want is

Re: [julia-users] Fast multiprecision integers?

2016-04-08 Thread Stefan Karpinski
This could help if both parts of the union were plain old data like Int64 and Float64, but in the case of Int and BigInt, one of them is a more complex type, which would currently force the whole thing to be boxed and live in the heap anyway. What's needed here is the ability to stack-allocate obje

Re: [julia-users] Fast multiprecision integers?

2016-04-08 Thread Laurent Bartholdi
I understand my sketch is very specific... if memory efficiency is at issue, it's important to treat pointers as 61-bit and to accept working with 63-bit signints if discriminated unions are to exist at no memory cost. (In the computer algebra applications I have in mind, losing 50% speed is fine,

Re: [julia-users] Opinion on Plots.jl -- exclamation marks

2016-04-08 Thread Daniel Carrera
Hello, Here is an example use case for me. I have several directories with data. I want to step through each directory, do some work, and plot some result; all in the same figure: for dir in directories ... do some work ... plot(result) end Clearly it would be inconvenient if every time

[julia-users] eigenvalues for Matrix-Free problem

2016-04-08 Thread Steven G. Johnson
You need to define a type to hold your data, and then define a * operator to multiply your type by a vector.

[julia-users] Re: Getting the name of the running program

2016-04-08 Thread Steven G. Johnson
In addition to getting the current file via @__FILE__, in Julia 0.5 you can get the name of the currently running script (e.g. "foo.jl" when you run "julia foo.jl") via PROGRAM_FILE: https://github.com/JuliaLang/julia/pull/14114

[julia-users] Defining Python classes from Julia

2016-04-08 Thread Steven G. Johnson
Just FYI, cstjean has implemented a really cool new feature in PyCall (https://github.com/stevengj/PyCall.jl/pull/250 ... requires PyCall master at the moment): you can now define new Python classes easily from Julia, via a natural syntax: @pyimport numpy.polynomial as P @pydef type Doubler <

Re: [julia-users] Opinion on Plots.jl -- exclamation marks

2016-04-08 Thread Steven G. Johnson
On Friday, April 8, 2016 at 4:00:47 AM UTC-4, Tamas Papp wrote: > > IMO an extra ! is a small price to pay for consistency --- you are after > all modifying an existing object. Avoiding globals is also a good > strategy. > Actually, it doesn't seem entirely consistent with Julia conventions.

Re: [julia-users] Opinion on Plots.jl -- exclamation marks

2016-04-08 Thread Tom Breloff
> > >> > Actually, it doesn't seem entirely consistent with Julia conventions. > > The standard Julia convention (borrowed from Lisp/Scheme) is that a ! > suffix means that a function modifies *one of its arguments*. > The `plot!` command is primarily `plot!(plt::AbstractPlot, args...; kw...)`.

Re: [julia-users] Opinion on Plots.jl -- exclamation marks

2016-04-08 Thread Daniel Carrera
On 9 April 2016 at 00:09, Tom Breloff wrote: > > The `plot!` command is primarily `plot!(plt::AbstractPlot, args...; > kw...)`. In this case it holds to convention. > > I have a convenience `current()` which stores the most recently updated > AbstractPlot object in a global, so that any plotting

Re: [julia-users] Opinion on Plots.jl -- exclamation marks

2016-04-08 Thread Kristoffer Carlsson
I like the ! in Plots.

Re: [julia-users] Opinion on Plots.jl -- exclamation marks

2016-04-08 Thread ben
I also like the ! in Plots a lot. Ben!

Re: [julia-users] Opinion on Plots.jl -- exclamation marks

2016-04-08 Thread Tom Breloff
> > I understand that to you this seems intuitive, but to me it is completely > counter-intuitive. The function that I'm calling is not changing any of its > inputs. Telling me that behind the scenes it calls "plots!" is describing > an implementation detail that can change and should have no b

Re: [julia-users] Opinion on Plots.jl -- exclamation marks

2016-04-08 Thread Daniel Carrera
Looks like I'm out-numbered. On 9 April 2016 at 02:20, ben wrote: > I also like the ! in Plots a lot. > > Ben!

Re: [julia-users] Opinion on Plots.jl -- exclamation marks

2016-04-08 Thread Daniel Carrera
Ok. Thanks for the explanation. Cheers, Daniel. On 9 April 2016 at 02:30, Tom Breloff wrote: > I understand that to you this seems intuitive, but to me it is completely >> counter-intuitive. The function that I'm calling is not changing any of its >> inputs. Telling me that behind the scenes it

[julia-users] JuliaCon 2016: Keynote speakers

2016-04-08 Thread Andreas Noack
JuliaCon 2016 June 21 - 25, 2016 Massachusetts Institute of Technology, Cambridge, Massachusetts, USA. http://juliacon.org/ On behalf of the JuliaCon 2016 committee, I am happy to announce the following keynote speakers: *Timothy E. Holy, Thomas J. Sargent, *and* Guy L. Steele Jr.* *Timothy E.

RE: [julia-users] JuliaCon 2016: Keynote speakers

2016-04-08 Thread David Anthoff
Wow, that is a FANTASTIC lineup, well done!! Cheers, David From: julia-users@googlegroups.com [mailto:julia-users@googlegroups.com] On Behalf Of Andreas Noack Sent: Friday, April 8, 2016 6:43 PM To: julia-users Subject: [julia-users] JuliaCon 2016: Keynote speakers JuliaCon 2016 June 21 -

Re: [julia-users] Re: custom ctags for Julia

2016-04-08 Thread El suisse
Sorry for the noise, which it is the right way to generate the file tags? in .julia/ ? with the command: `ctags -R .` 2016-03-16 10:38 GMT-03:00 Christof Stocker : > Makes sense. I don't use C-], I use the CtrlP plugin to jump around in a > project. I included the first parameter, so that CtrlP

[julia-users] Is there a way to convert function name to a string?

2016-04-08 Thread K leo
Say a function is named FuncA. I hope to get this name into a string like "FuncA". Is there a way to do that?

Re: [julia-users] Re: custom ctags for Julia

2016-04-08 Thread Christof Stocker
To be blunt I never really bothered to investigate the "right way" to use ctags. I simply looked for a way that works for my use case. That being said, I can tell you how I use ctags. Some page somewhere (I found it again, see the end of my post) suggested to use the .git directory of a projec

Re: [julia-users] Opinion on Plots.jl -- exclamation marks

2016-04-08 Thread Christof Stocker
I also prefer the ! so I know it modifies an existing plot. If I don't use a ! then I expect to create a new one On 2016-04-09 02:52, Daniel Carrera wrote: Ok. Thanks for the explanation. Cheers, Daniel. On 9 April 2016 at 02:30, Tom Breloff > wrote: I under

Re: [julia-users] Is there a way to convert function name to a string?

2016-04-08 Thread Tamas Papp
julia> functionname(f)=string(f.env.name) functionname (generic function with 1 method) julia> foo(x)=1 foo (generic function with 1 method) julia> functionname(foo) "foo" But be aware that this may change and is unlikely to be a good solution unless you really, really know what you are doing. P

Re: [julia-users] Is there a way to convert function name to a string?

2016-04-08 Thread K leo
Thanks. I have an array for functions like funcArray=[FuncA, FuncB, FuncC], and as I run them through a loop, I want to be able to tell which function is running. So perhaps just simply string(FuncA) would serve my need. On Saturday, April 9, 2016 at 12:01:34 PM UTC+5:30, Tamas Papp wrote: >