[julia-users] Re: Good, short set of slides introducing Julia

2015-09-10 Thread Carlos Becker
Hi Andrew, my slides are here, https://sites.google.com/site/carlosbecker/a-few-notes , they are for v0.3: If you need the openoffice original let me know, I can send it to you. Cheers. El miércoles, 9 de septiembre de 2015, 14:07:36 (UTC+2), andrew cooke escribió: > > ok, thanks everyone

Re: [julia-users] REPL v0.3, matlab-like completion

2014-08-20 Thread Carlos Becker
-r shortcut though, right? --Tim On Tuesday, August 19, 2014 10:57:19 PM Carlos Becker wrote: Hi all, I think this is a typically asked question, but I don't know whether it is possible now in julia v0.3. Namely to make the up/down arrows search completion history in the REPL

[julia-users] REPL v0.3, matlab-like completion

2014-08-19 Thread Carlos Becker
Hi all, I think this is a typically asked question, but I don't know whether it is possible now in julia v0.3. Namely to make the up/down arrows search completion history in the REPL. If so, I will be happy to document it in the docs in the FAQ section. Thanks.

Re: [julia-users] Re: 0.3.0 Release Candidate 4 released

2014-08-15 Thread Carlos Becker
To keep up-to-date with the latest changes for v0.3, would it suffice to checkout branch release-0.3 periodically? Is that the one supposed to have the latest development code for v0.3? Thanks. El viernes, 15 de agosto de 2014 07:25:28 UTC+2, Elliot Saba escribió: Your packages should remain

Re: [julia-users] Typo in local variable name not detected

2014-08-14 Thread Carlos Becker
Hi all. I have been busy and not following the julia development news. are there any news wrt this topic? What I find dangerous is mistakenly referencing a global variable from a local context, when that is not intended. To me it seems worth adding a qualifier to specify that whatever is not

Re: [julia-users] A[]: Accessing array with empty index

2014-06-01 Thread Carlos Becker
30, 2014 at 11:45 PM, Steven G. Johnson stevenj@gmail.com wrote: On Friday, May 30, 2014 5:19:35 PM UTC-4, Carlos Becker wrote: HI Jacob, I get that, but which is the reasoning behind myArray[] ? why should it return a ref to the 1st element? Because you can have a 0-dimensional

[julia-users] A[]: Accessing array with empty index

2014-05-30 Thread Carlos Becker
My apologies if this is something that was addressed before, I didn't find it. Why does myArray[] return the first element of the array? is there a reasoning behind it or is it an 'unexpected language feature'? For example: a = [1,2,3,4] a[] = returns 1 Thanks.

Re: [julia-users] A[]: Accessing array with empty index

2014-05-30 Thread Carlos Becker
a definition in array.jl#244 getindex(a::Array) = arrayref(a,1) -Jacob On Fri, May 30, 2014 at 5:05 PM, Carlos Becker carlosbec...@gmail.com wrote: My apologies if this is something that was addressed before, I didn't find it. Why does myArray[] return the first element of the array

Re: [julia-users] fill! with copies

2014-05-18 Thread Carlos Becker
2014 skrev Jameson følgende: Since they are immutable, fill! did exactly what you wanted On Friday, May 16, 2014, Tim Holy tim@gmail.com wrote: Try arr = [ChannVals() for i = 1:10] On Friday, May 16, 2014 01:27:18 AM Carlos Becker wrote: Hello all, I wanted to create an array

[julia-users] tanh() speed / multi-threading

2014-05-18 Thread Carlos Becker
This is probably related to openblas, but it seems to be that tanh() is not multi-threaded, which hinders a considerable speed improvement. For example, MATLAB does multi-thread it and gets something around 3x speed-up over the single-threaded version. For example, x = rand(10,200);

[julia-users] Re: tanh() speed / multi-threading

2014-05-18 Thread Carlos Becker
NO_AFFINITY) LAPACK: libopenblas LIBM: libopenlibm El domingo, 18 de mayo de 2014 11:33:45 UTC+2, Carlos Becker escribió: This is probably related to openblas, but it seems to be that tanh() is not multi-threaded, which hinders a considerable speed improvement. For example, MATLAB does multi

[julia-users] Re: tanh() speed / multi-threading

2014-05-18 Thread Carlos Becker
, multi-threading with OpenMP? El domingo, 18 de mayo de 2014 11:34:11 UTC+2, Carlos Becker escribió: forgot to add versioninfo(): julia versioninfo() Julia Version 0.3.0-prerelease+2921 Commit ea70e4d* (2014-05-07 17:56 UTC) Platform Info: System: Linux (x86_64-linux-gnu) CPU: Intel(R

Re: [julia-users] Re: tanh() speed / multi-threading

2014-05-18 Thread Carlos Becker
function ptanh(x;numthreads=2) y = similar(x) N = length(x) parapply(tanh_core,(x,y), 1:N, numthreads=numthreads) y end Am Sonntag, 18. Mai 2014 11:40:13 UTC+2 schrieb Carlos Becker: now that I think about it, maybe openblas has nothing to do here, since @which tanh(y) leads

Re: [julia-users] Re: tanh() speed / multi-threading

2014-05-18 Thread Carlos Becker
btw, the code you just sent works as is with your pull request branch? -- Carlos On Sun, May 18, 2014 at 1:04 PM, Carlos Becker carlosbec...@gmail.comwrote: HI Tobias, I saw your pull request and have been following it closely, nice work ;) Though

Re: [julia-users] Re: tanh() speed / multi-threading

2014-05-18 Thread Carlos Becker
to be somewhere in the parser. Am Sonntag, 18. Mai 2014 14:30:49 UTC+2 schrieb Carlos Becker: btw, the code you just sent works as is with your pull request branch? -- Carlos On Sun, May 18, 2014 at 1:04 PM, Carlos Becker carlos...@gmail.comwrote: HI

Re: [julia-users] Re: tanh() speed / multi-threading

2014-05-18 Thread Carlos Becker
schrieb Tobias Knopp: Well when I started I got segfaullt all the time :-) Could you please send me a minimal code example that segfaults? This would be great! This is the only way we can get this stable. Am Sonntag, 18. Mai 2014 16:35:47 UTC+2 schrieb Carlos Becker: Sounds great! I just

[julia-users] fill! with copies

2014-05-16 Thread Carlos Becker
Hello all, I wanted to create an array of an immutable type and initialize an empty copy in each (with the default constructor). I am wondering which is the best way to do it, so far: immutable ChannVals taus::Vector{Float64} alphas::Vector{Float64} ChannVals() = new( Float64[], Float64[] )

Re: [julia-users] fill! with copies

2014-05-16 Thread Carlos Becker
* correction, 'allVals' is 'arr' in the last line of code. -- Carlos On Fri, May 16, 2014 at 10:27 AM, Carlos Becker carlosbec...@gmail.comwrote: Hello all, I wanted to create an array of an immutable type and initialize an empty copy in each

Re: [julia-users] Re: Simulating fixed-size arrays

2014-05-08 Thread Carlos Becker
://github.com/JuliaLang/julia/issues/5857. I have been using ImmutableArrays.jl which works fine. Am Mittwoch, 7. Mai 2014 17:12:04 UTC+2 schrieb Carlos Becker: Hello, I am trying to find out the best way to deal with immutables (or types) that contain fixed-size arrays, such as this: # should

[julia-users] Re: Memory allocation for vectorized operations

2014-04-29 Thread Carlos Becker
I just saw another part of your message, I am wondering also why memory consumption is so high. El martes, 29 de abril de 2014 11:31:09 UTC+2, Carlos Becker escribió: This is likely to be because Julia is creating temporaries. This is probably why you get increasing memory usage when

[julia-users] Re: Memory allocation for vectorized operations

2014-04-29 Thread Carlos Becker
to 800 bytes, it could explain part of it. I wonder if there is a way within julia to know the 'real' size of a julia object. El martes, 29 de abril de 2014 11:32:21 UTC+2, Carlos Becker escribió: I just saw another part of your message, I am wondering also why memory consumption is so high

Re: [julia-users] Re: Help me optimize Stochastic Gradient Descent of Least Squares Error

2014-04-27 Thread Carlos Becker
I agree with Elliot, take a look at the performance tips. Also, you may want to move the tic(), toc() out of the function, make sure you compile it first, and then use @time function calll to time it. you may also get a considerable boost by using @simd in your for loops (together with

[julia-users] yet another julia presentation

2014-04-07 Thread Carlos Becker
Hi all, just to let you know that I gave a presentation two weeks ago about Julia, and the slides are available online herehttps://sites.google.com/site/carlosbecker/a-few-notes/julia-intro.pdf?attredirects=0d=1 , together with an ijulia

Re: [julia-users] Re: yet another julia presentation

2014-04-07 Thread Carlos Becker
Hi John, thanks! On Mon, Apr 7, 2014 at 10:42 PM, John Eric Humphries johnerichumphr...@gmail.com wrote: Thanks Carlos, This is pretty interesting and I enjoyed reading through your ensemble code. I also really like the side-by-side comparisons. A site which could provide many of these with

Re: [julia-users] Overriding type promotion

2014-04-04 Thread Carlos Becker
case of dividing by 2, an even better choice is b[i] = A[i] 1. --Tim On Friday, April 04, 2014 02:09:24 AM Carlos Becker wrote: I've seen previous posts in this list about this, but either I missed some of them or this particular issue is not addressed. I apologize if it is the former

Re: [julia-users] Overriding type promotion

2014-04-04 Thread Carlos Becker
, the operator for truncated integer division is div; the operator for floored integer division is fld. On Fri, Apr 4, 2014 at 5:09 AM, Carlos Becker carlosbec...@gmail.comwrote: I've seen previous posts in this list about this, but either I missed some of them or this particular issue

[julia-users] show non-local function variables

2014-03-13 Thread Carlos Becker
Hello, When writing functions, it can happen that one can accidentally refer to a global variable 'by mistake', for example function test( x1, y1 ) return x2 + y1 # typo, x2 instead of x1, tries to locate global var x2 end so if x2 exists as a global variable, the typo will go unnoticed and

Re: [julia-users] Re: show non-local function variables

2014-03-13 Thread Carlos Becker
On Thu, Mar 13, 2014 at 9:55 AM, Ivar Nesje iva...@gmail.com wrote: This has been discussed in https://groups.google.com/forum/#!searchin/julia-users/typecheck/julia-users/hTQ2KI1aaTc/fqjq-1n_ax8J Thanks, I totally missed it, I will follow that thread instead. Cheers.

Re: [julia-users] Re: norm() strangeness

2014-03-04 Thread Carlos Becker
, 2014 at 7:22 PM, Carlos Becker carlosbec...@gmail.comwrote: My mistake there, I meant the L1 norm, re-typed: - X= [[1 2 3],[4 5 6]] # now, X[1,:] is 1x3 array, containing 1 2 3 # but let's peek at its L1-norm: norm( X[1,:], 1 ) # -- we get 3, where I would

Re: [julia-users] Re: norm() strangeness

2014-03-04 Thread Carlos Becker
On Tue, Mar 4, 2014 at 11:02 AM, Andreas Noack Jensen andreasnoackjen...@gmail.com wrote: makes really good sense. The distinction between arrays and and matrices in Numpy has been confusing to me, but actually it appear that Numpy agrees with how Julia is doing it right now In [1]: import

Re: [julia-users] Re: norm() strangeness

2014-03-04 Thread Carlos Becker
. -- mb On Mon, Mar 3, 2014 at 7:22 PM, Carlos Becker carlos...@gmail.comwrote: My mistake there, I meant the L1 norm, re-typed: - X= [[1 2 3],[4 5 6]] # now, X[1,:] is 1x3 array, containing 1 2 3 # but let's peek at its L1-norm: norm( X[1,:], 1 ) # -- we

Re: [julia-users] Re: norm() strangeness

2014-03-03 Thread Carlos Becker
, Carlos Becker wrote: Hello all, today I fought for an hour with a very simple piece of code, of the kind: - X= [[1 2 3],[4 5 6]] # now, X[1,:] is 1x3 array, containing 1 2 3 # but let's peek at its L1-norm: norm( X[1,:] ) # -- we get 3, where I would expect

[julia-users] Creating array from array type

2014-02-21 Thread Carlos Becker
Hello, this looks like a naive question, but I cannot get my way through I defined a typealias, like typealias IdxListType Array{Int64,1} which I want to initialize empty, and then add elements with push!(). My question is: how do I create an empty array of type IdxListType ? I know I can

Re: [julia-users] Re: Returning julia objects with ccall

2014-02-10 Thread Carlos Becker
(if I get that right) How can one use this pointer if the length is unknown? Am Sonntag, 9. Februar 2014 12:46:24 UTC+1 schrieb Carlos Becker: I think I finally made it work, close to what I wanted. This could be good for future reference for anyone trying to do something similar. The code

Re: [julia-users] Re: Returning julia objects with ccall

2014-02-10 Thread Carlos Becker
is compatible with C. Cheers Tobi Am Montag, 10. Februar 2014 12:24:27 UTC+1 schrieb Carlos Becker: Hi Tobias, I want to be able to return different types from ccall(), according to what happens inside my C/C++ code, without the need for telling julia what I want to return, its size, etc

Re: [julia-users] Re: Returning julia objects with ccall

2014-02-10 Thread Carlos Becker
this could help Julia newcomers when wrapping their C/C++ libraries. Thanks. -- Carlos On Mon, Feb 10, 2014 at 5:20 PM, Tobias Knopp tobias.kn...@googlemail.comwrote: Am Montag, 10. Februar 2014 14:17:02 UTC+1 schrieb Carlos Becker: model = SQBMatrixTrain

Re: [julia-users] Re: Returning julia objects with ccall

2014-02-10 Thread Carlos Becker
could push your c++ wrapper into the main Julia source code! Cheers, Tobi Am Montag, 10. Februar 2014 17:35:38 UTC+1 schrieb Carlos Becker: Hi Tobias, model = SQBMatrixTrain( featureMatrix, labelVector, maxIters, options ) That is how the matlab call looks like, so it is very

[julia-users] Returning julia objects with ccall

2014-02-08 Thread Carlos Becker
Hello everyone, I just got started with Julia, and I wanted to try to wrap a C/C++ library to Julia to check whether it would work out for my purposes. I tried out many ways of passing arrays and other objects from C back to Julia. So far it seems that it takes a lot of extra code if I want

Re: [julia-users] Returning julia objects with ccall

2014-02-08 Thread Carlos Becker
On Sat, Feb 8, 2014 at 2:21 PM, Carlos Becker carlos...@gmail.comjavascript: wrote: Hello everyone, I just got started with Julia, and I wanted to try to wrap a C/C++ library to Julia to check whether it would work out for my purposes. I tried out many ways of passing

Re: [julia-users] Returning julia objects with ccall

2014-02-08 Thread Carlos Becker
() needs the module pointer, which is not available as a linking symbol sin this would come from an external module (let's say called MyModule). Is there a function to lookup the pointer of a module given its string name? Thanks. El sábado, 8 de febrero de 2014 21:10:11 UTC+1, Carlos Becker escribió

[julia-users] Re: Returning julia objects with ccall

2014-02-08 Thread Carlos Becker
Hi Steven, I tried that before, I know it is possible, but if the size is unknown to julia, it must be returned as another variable, which makes coding more difficult if many of such return arrays are needed. That is why I think it would be interesting to see the julia-api side of it, to see