[julia-users] Re: [ANN] julia-repl, an Emacs minor mode for running a Julia REPL

2016-11-02 Thread David van Leeuwen
Hi, On Wednesday, November 2, 2016 at 2:51:54 PM UTC+1, Tamas Papp wrote: > > Hi Julia & Emacs users, > > I wrote a minor mode for starting and interacting with a Julia REPL from > Emacs. It basically uses term, and defers to the Julia REPL for almost > everything. The main reason for using

[julia-users] stop reading input from script

2016-10-25 Thread David van Leeuwen
Hello, is there a way in Julia for a file that is `include`d to signal that the rest of the file should be ignored? Something like `\endinput` in TeX. I could use this in running testing scripts, putting such and `endinput` further to the back while debugging the script. Currently I wrap

[julia-users] Dictionary type inference

2016-10-13 Thread David van Leeuwen
Hello, I have stumbled across the following type inference issue for `Dict`s in julia-v0.5: julia> typeof(Dict(sin => sin, cos => cos)) Dict{Any,Any} julia> typeof(Dict(x => x for x in [sin, cos])) Dict{Function,Function} In Julia-0.5, functions got their own type. I was surprised to see

[julia-users] Re: travis with dependency on scipy?

2016-10-10 Thread David van Leeuwen
Hello Steven, Thanks, this helped me out, including the PS's. On Friday, October 7, 2016 at 10:24:36 PM UTC+2, Steven G. Johnson wrote: > > > > On Friday, October 7, 2016 at 9:10:44 AM UTC-4, David van Leeuwen wrote: >> >> Hello, >> >> For a tiny pa

[julia-users] travis with dependency on scipy?

2016-10-07 Thread David van Leeuwen
Hello, For a tiny package that depends on PyCall and python's scipy.spatial I am trying to engineer a `.travis.yml`, but I get an error in travis that `spatial.ConvexHull` is not known. This

[julia-users] Re: Calculating pi using parallel computing

2016-07-18 Thread David van Leeuwen
Hello Arundhyoti, This is probably the answer you were looking for, but a while ago I collected several algorithms for computing π. I just updated these to Julia-0.4 here . On Monday, July 18, 2016 at 6:52:25 AM UTC+2, Arundhyoti Sarkar wrote: > > The

[julia-users] mkpath() race condition on cluster?

2016-06-24 Thread David van Leeuwen
Hello, I am experiencing strange errors related to code that tries to ensure a directory is there: dir = dirname(dest) if isfile(dir) warn("Directory is file: ", dir) continue else mkpath(dir) end However, while running this script parallel on a cluster, I regularly get

[julia-users] Re: Parse Array of Bytes

2016-06-22 Thread David van Leeuwen
Probably just reinterpret(Float32, block) ---david On Wednesday, June 22, 2016 at 2:56:46 PM UTC+2, jw3126 wrote: > > I have an array containing 4n bytes (::Array{UInt8,1}) and I want to parse > it into an array of n Float32. What is a sane way of doing this? >

[julia-users] Re: ERROR: syntax: "±" is not a unary operator

2016-06-22 Thread David van Leeuwen
It probably is defined as an operator, but without definition. julia> ±(a,b) = (a+b, a-b) ± (generic function with 1 method) julia> 3±4 (7,-1) your assignment probably overrides the default operator. ---david On Wednesday, June 22, 2016 at 2:08:21 PM UTC+2, Kaj Wiik wrote: > > > I have

Re: [julia-users] Re: scope of do block, generalization to for block

2016-06-21 Thread David van Leeuwen
ly express with the somewhat > awkward open(readstring, "file.txt") idiom. > > On Tue, Jun 21, 2016 at 11:25 AM, David van Leeuwen <david.va...@gmail.com > > wrote: > >> Hello, >> >> On Monday, June 20, 2016 at 5:38:04 PM UTC+2, Stefan Karpinski wrote

Re: [julia-users] Re: scope of do block, generalization to for block

2016-06-21 Thread David van Leeuwen
s (do blocks) shouldn't modify their parent >> scope either. Here are other ways of writing the code you quoted: >> >> local a, b >> open(file) do fd >> a = read(fd, ...) # will modify a and b in the parent scope >> b = read(fd, ...) >> end >>

[julia-users] @task as generator, macro weirdness

2016-06-21 Thread David van Leeuwen
Hello, I think I want to use the `@task` idiom for a generator, but I can't wrap my head around macros, so I don't understand where this goes wrong: linebyline(file::IO) = @task while !eof(file) produce(readline(file)) end linebyline(file::AbstractString) = open(file) do fd

[julia-users] scope of do block, generalization to for block

2016-06-20 Thread David van Leeuwen
Hello, I regularly make the mistake described here https://groups.google.com/d/msg/julia-users/UyCSm5Shyww/Udt67boT3CsJ, i.e., i write open(file) do fd a = read(fd, ...) b = read(fd, ...) end ## a and b undefined. I get that the solution is a, b = open(file) do fd ... Great. I

[julia-users] Re: how to set the maximal waiting time for ClusterManagers.addprocs_sge()?

2016-06-01 Thread David van Leeuwen
Could this be related to this ? On Wednesday, June 1, 2016 at 7:26:50 PM UTC+2, Florian Oswald wrote: > > i'm having a problem on a cluster where setting up the connections via > ClusterManagers.addprocs_sge() takes

Re: [julia-users] Re: ANN: FileIO.jl, for loading and saving formatted files

2016-05-31 Thread David van Leeuwen
IO object. Does anyone know how I could get this done? Thanks, ---david On Wednesday, September 30, 2015 at 11:35:20 AM UTC+2, Tim Holy wrote: > > Probably best as an issue over at FileIO. > > --Tim > > On Wednesday, September 30, 2015 01:24:25 AM David van Leeuwen wro

Re: [julia-users] Re: following down the chain of dispatch

2016-05-14 Thread David van Leeuwen
Hello, On Saturday, May 14, 2016 at 10:57:18 AM UTC+2, Tim Holy wrote: > > On Saturday, May 14, 2016 01:05:39 AM David van Leeuwen wrote: > > Which version of Julia should I use? My 0.4.5 complains on install > "Gallium > > can't be installed because it has no v

[julia-users] Re: following down the chain of dispatch

2016-05-14 Thread David van Leeuwen
Thanks, On Wednesday, May 11, 2016 at 11:21:48 PM UTC+2, Kristoffer Carlsson wrote: > > If you get Gallium https://github.com/Keno/Gallium.jl working you can > simply step through the functions. Which version of Julia should I use? My 0.4.5 complains on install "Gallium can't be installed

[julia-users] following down the chain of dispatch

2016-05-11 Thread David van Leeuwen
Hello, I'd like to study how the implementation is for a particular function in Base. Is there an easy way of following the sequence of functions that are dispatched when I call the function with a particular type? For instance, I want to see how `display(::Array{T,N})` is implemented for

Re: [julia-users] It is getting harder to match function prototypes

2016-05-02 Thread David van Leeuwen
he ones provided by Julia?? > > On Mon, May 2, 2016 at 10:13 AM, David van Leeuwen <david.va...@gmail.com > > wrote: > >> Hello, >> >> I am trying to get GaussianMixtuers.jl to pass the tests in >> julia-0.5.0-dev+3476 . I am more and more often runni

[julia-users] It is getting harder to match function prototypes

2016-05-02 Thread David van Leeuwen
Hello, I am trying to get GaussianMixtuers.jl to pass the tests in julia-0.5.0-dev+3476 . I am more and more often running into problems related to not being able to find any function to dispatch to, it seems. This time, I am stuck with the error MethodError: no method matching

[julia-users] Re: convention for unspecified argument (R's NULL and FALSE, Common Lisp nil)

2016-02-14 Thread David van Leeuwen
Hello, You can use any convention you'd like. A more type-stable solution is to use, e.g., the value `-1` for `something`, but you don't think that is elegant. There is `nothing` (of type Void) but I am not sure that the intended use of that is to use as a default in function prototypes.

Re: [julia-users] Re: Implementing mapreduce parallel model (not general multi-threading) ? easy and enough ?

2015-10-06 Thread David van Leeuwen
See also an earlier discussion on a similar topic, for an out-of-core approach. ---david On Tuesday, October 6, 2015 at 10:29:52 PM UTC+2, Tim Holy wrote: > > There's > >

[julia-users] Re: function form of using/import

2015-10-01 Thread David van Leeuwen
Would this work for you? pkg = symbol("NamedArrays") ## for example eval(:($(Expr(:import, pkg ---david On Thursday, October 1, 2015 at 10:36:07 AM UTC+2, Andreas Lobinger wrote: > > Hello colleagues, > > i just stumbled across > > julia> using Compose > INFO: Precompiling module

[julia-users] Re: ANN: FileIO.jl, for loading and saving formatted files

2015-09-30 Thread David van Leeuwen
Hello Tim and Simon, I'd be very interested in this, for MFCCs.jl and perhaps GaussianMixtures.jl. They currently use HDF5 and JLD, respectively, and I don't think I've put in any magic. - is it wise to put in magic, even with container formats such as HDF5? - do you prefer questions

[julia-users] Re: suppress deprecation warnings

2015-09-29 Thread David van Leeuwen
Hello, On Thursday, September 17, 2015 at 7:28:10 PM UTC+2, Michael Francis wrote: > > How can I suppress the printing of deprecation warnings in 0.4? I need to > temporarily suppress these so that I can see the wood for the trees. > I think I have the same request: is there a way to disable

[julia-users] Re: [ANN] Plots.jl, a plotting interface

2015-09-13 Thread David van Leeuwen
Hello, On Thursday, September 10, 2015 at 10:26:35 PM UTC+2, Tom Breloff wrote: > > This may be a slightly premature announcement, but I wanted to put it out > there so that people that have strong opinions have a chance to give their > thoughts. Here's the link: > >

Re: [julia-users] pmap - version to return reduced result only

2015-09-02 Thread David van Leeuwen
Hi Greg, On Friday, August 28, 2015 at 6:40:33 AM UTC+2, Greg Plowman wrote: > > Firstly, I hope it's OK to revive this thread. > > @parallel doesn't do dynamic load balancing. > So I'm still interested in a pmap_reduce() or equivalent which does > dynamic allocation to workers AND reduces on

Re: [julia-users] How to build Julia in a portable way (for compute farm deployment)?

2015-08-03 Thread David van Leeuwen
Hello Jameson, I have more/less the same issue as Glen H---I need to build a single Julia for a large cluster with a varied set of x86_64 architectures. My strategy would be to build on the newest arch (to get maximum dynamic openblas support) but with restricted ARCH/MARCH setting, x86_64 /

Re: [julia-users] Re: Overloading Base functions or creating new ones?

2015-03-19 Thread David van Leeuwen
the corresponding semantics. ---david On Monday, March 16, 2015 at 4:15:22 PM UTC+1, Patrick O'Leary wrote: On Monday, March 16, 2015 at 10:09:40 AM UTC-5, David van Leeuwen wrote: Related to this question: what if you want to use the name of a base function for your type, where

Re: [julia-users] Re: indexing with non Integer Reals is deprecated

2015-03-18 Thread David van Leeuwen
On a somewhat related note: if you really require non-integer indices, you can always try NamedArrays: using NamedArrays m = NamedArray(rand(4), ([1//1, 1//2, 1//3, 1//4],), (weird,)) m[1//1] m[1//2] == m[2//4] m[1//4] == m[4] ---david On Monday, March 16, 2015 at 8:50:13 AM UTC+1, Mauro

[julia-users] Re: Overloading Base functions or creating new ones?

2015-03-18 Thread David van Leeuwen
I'd be interested to know a case where confusion could arise. ---david On Monday, March 16, 2015 at 4:15:22 PM UTC+1, Patrick O'Leary wrote: On Monday, March 16, 2015 at 10:09:40 AM UTC-5, David van Leeuwen wrote: Related to this question: what if you want to use the name of a base

[julia-users] Re: Overloading Base functions or creating new ones?

2015-03-16 Thread David van Leeuwen
Related to this question: what if you want to use the name of a base function for your type, where the meaning is _not_ related, but there is no sensible function that would have that meaning for your type? E.g., in GaussianMixtures, I used `map(::GMM, ...)` for maximum-a-posteriori

[julia-users] Re: Strange behaviour

2015-03-10 Thread David van Leeuwen
Hello, On Friday, March 6, 2015 at 2:22:42 AM UTC+1, Tony Kelman wrote: I suppose this is related to + and - being unary operators? Ding ding. Unfortunately space being the horizontal concatenation operator means some operations parse very differently and in highly whitespace-sensitive

Re: [julia-users] Re: Informal Call for a Julia π - day challenge

2015-03-09 Thread David van Leeuwen
Intriguing... searches seem to refer to this as a Spigot algorithm, but I find no references to droplet. ---david On Monday, March 9, 2015 at 11:46:52 AM UTC+1, Hans W Borchers wrote: The following function is an implementation of the famous droplet algorithm of Rabinowitz and Wagon for

[julia-users] Re: statistical accumulator

2015-02-16 Thread David van Leeuwen
Alternatively, there still is https://github.com/davidavdav/BigData.jl which has some infrastructure for storing large data on disc, and there is a stats() function that doesthe accumulation for you. ---david On Thursday, February 12, 2015 at 6:26:03 PM UTC+1, Christian Peel wrote: Perfect!

Re: [julia-users] Various questions about Int(), int(), and 0.4

2015-02-10 Thread David van Leeuwen
Hi, On Tuesday, February 10, 2015 at 1:41:22 AM UTC+1, Seth wrote: On Monday, February 9, 2015 at 4:24:57 PM UTC-8, Ivar Nesje wrote: I definitely agree that the info message has some confusing aspects. Please open an issue (or a PR) with Lint.jl so that the info reads something like.

[julia-users] Re: A juliarc file that is specific to a project/directory/repository

2015-02-08 Thread David van Leeuwen
I tend to call this file .juliarc.jl as well, with my ~/.juliarc.jl having the excerpt: ## give a local .juliarc.jl a chance if chomp(readall(`pwd`)) != ENV[HOME] if isfile(.juliarc.jl) require(.juliarc.jl) end end The `require` (rather than `include`) and the test for

[julia-users] Re: workflow recommendation/tutorial

2015-01-26 Thread David van Leeuwen
Hi, Everyone seems to agree on the same workflow, so I'll just mention my workflow as an alternative. Pros: - don't need any Julia REPL restarts - don't need to prepend module name in (interactive) code. - variables, data structures etc all are retained during development. Cons: - in

[julia-users] Plotting-package-independent API

2015-01-22 Thread David van Leeuwen
Hello, I've just read up on most recent conversations mentioning plotting, after I went through a similar install-and-try-out cycle for the various plotting packages. I am busy with a package named ROC https://github.com/davidavdav/ROC (Receiver Operating Characteristic). It is mostly

[julia-users] Re: Finally, a plotting package that just works !

2015-01-22 Thread David van Leeuwen
On Thursday, July 25, 2013 at 4:05:33 PM UTC+2, Billou Bielour wrote: Ok, this is a joke. But since it's so hard to get graphics working, I just made two functions that makes basic ascii plots, it kind of works and the results are not so horrible :) The first picture of the Mandelbrot set

[julia-users] Re: Plotting-package-independent API

2015-01-22 Thread David van Leeuwen
module---because I want to leave that choice to the user. ---david Am Donnerstag, 22. Januar 2015 16:42:37 UTC+1 schrieb David van Leeuwen: Hello, I've just read up on most recent conversations mentioning plotting, after I went through a similar install-and-try-out cycle for the various

[julia-users] Re: ANN: PGF/TikZ packages

2015-01-21 Thread David van Leeuwen
Hello, On Thursday, August 21, 2014 at 11:05:08 PM UTC+2, Mykel Kochenderfer wrote: There are three new Julia packages for interfacing with PGF/TikZ http://www.ctan.org/pkg/pgf for making publication-quality graphics. 1. TikzPictures.jl https://github.com/sisl/TikzPictures.jl. Basic

[julia-users] Re: Error: zeros(UTF8String, 5)

2015-01-18 Thread David van Leeuwen
On Friday, January 16, 2015 at 2:44:51 PM UTC+1, Steven G. Johnson wrote: On Friday, January 16, 2015 at 6:59:19 AM UTC-5, K leo wrote: I want the array to be initialized with every element being . Can't say about 0.3.4, but it definitely worked under 0.3.3. Are there any other easy

[julia-users] Re: idiom for seamlessly ignoring possible additional return values

2015-01-15 Thread David van Leeuwen
Hi On Thursday, January 15, 2015 at 3:51:08 PM UTC+1, Tamas Papp wrote: Hi, Is there an idiom for ignoring possible multiple values? For example, if I have a function foo() that may or may not return multiple values where values after the first one provide some extra information (eg a

[julia-users] Re: DataFrame vcat stack overflow

2014-12-25 Thread David van Leeuwen
Hello Guillome, On Monday, December 22, 2014 9:09:16 PM UTC+1, Guillaume Guy wrote: Dear Julia users: Coming from a R background, I like to work with list of dataframes which i can reduce by doing do.call('rbind',list_of_df) After ~10 years of using R, I only recently leaned of the

Re: [julia-users] Optional import mechanism

2014-12-22 Thread David van Leeuwen
Hello, I've read some of the discussion related to conditional / optional module loading, and I am not sure what the status of https://github.com/JuliaLang/julia/pull/6884---I guess it still is open for merge. I'm also not sure if it would address the following. I'm in the situation where

Re: [julia-users] Optional import mechanism

2014-12-22 Thread David van Leeuwen
. --Tim On Monday, December 22, 2014 02:54:49 AM David van Leeuwen wrote: Hello, I've read some of the discussion related to conditional / optional module loading, and I am not sure what the status of https://github.com/JuliaLang/julia/pull/6884---I guess it still is open

Re: [julia-users] Random Draw from Gaussian Mixture

2014-12-19 Thread David van Leeuwen
Hi, Did you look into GaussianMixtures? This has a random sampling function. ---david On Friday, December 19, 2014 1:42:38 PM UTC+1, Andreas Noack wrote: Hi Bradley I was able to construct an GMM instance with julia Σnew =

[julia-users] Re: Package development - best practices

2014-12-19 Thread David van Leeuwen
Hi, On Wednesday, December 17, 2014 11:21:44 PM UTC+1, Seth wrote: I'm wondering whether folks are actually basing their repos in ~/.julia and doing their development and commits from there, or whether there's some other process that allows development to happen in a more standard location

[julia-users] Re: DataFrames and NamedArrays: are they suitable for heavier computations ?

2014-12-09 Thread David van Leeuwen
Hello Ján, On Monday, December 8, 2014 11:04:08 AM UTC+1, Ján Dolinský wrote: Hi, Thanks for the explanation. Suppose I have a named array X with 3 columns x1, x2 and x3 and I do prod(X, 2). Will the resulting array (a single columns in this case) have a sensible name like x1x2x3 ? Or

[julia-users] Re: Difference between {T:AbstractType} and just x::AbstractType

2014-12-08 Thread David van Leeuwen
Good question, I would be interested in the answer myself. If the tips indicate the explicit type dependency is preferred, then I guess that for the first form the compiler compiles a new instance of the function specifically for the concrete type `T`, while in the second, it presumably

[julia-users] Re: How to find index in Array{AbstractString,1}

2014-12-07 Thread David van Leeuwen
Hi, On Thursday, December 4, 2014 8:53:00 PM UTC+1, Steven G. Johnson wrote: help(findin) will tell you that the 2nd argument of findin should be a collection, not a single element. So you want findin(suo2, [a]) It is strange that for an array of Int Paul's approach works fine: julia

Re: [julia-users] Re: DataFrames and NamedArrays: are they suitable for heavier computations ?

2014-12-05 Thread David van Leeuwen
--Tim On Friday, December 05, 2014 04:18:08 AM David van Leeuwen wrote: Hi, On Friday, December 5, 2014 8:47:22 AM UTC+1, Ján Dolinský wrote: Hi, I am exploring DataFrames and NamedArrays packages and I would like to ask whether their are suitable for heavier computations

Re: [julia-users] Re: what's the best way to do R table() in julia? (why does StatsBase.count(x,k) need k?)

2014-12-03 Thread David van Leeuwen
Hi, On Tuesday, December 2, 2014 6:50:33 PM UTC+1, Ivar Nesje wrote: It's not the obvious choice to me either, but it is in the docs http://docs.julialang.org/en/latest/stdlib/base/#associative-collections, and has been since I read it the first time 1.5 years ago. I don't think is says

Re: [julia-users] Re: what's the best way to do R table() in julia? (why does StatsBase.count(x,k) need k?)

2014-12-03 Thread David van Leeuwen
à 09:30 -0800, David van Leeuwen a écrit : Hello again, The idea is that any type could be used instead of a Dict, as long as it can be indexed with a key and return the index. For small NamedArrays, doing a linear search on an array is faster than using a Dict. And when computing

Re: [julia-users] Re: what's the best way to do R table() in julia? (why does StatsBase.count(x,k) need k?)

2014-12-02 Thread David van Leeuwen
Hi, On Sunday, November 30, 2014 11:22:39 AM UTC+1, Milan Bouchet-Valat wrote: Le mercredi 26 novembre 2014 à 09:30 -0800, David van Leeuwen a écrit : Hello again, I worked hard on NamedArrays.jl to solve the problems indicated below: On Monday, November 10, 2014 1:43:57 AM

Re: [julia-users] Re: what's the best way to do R table() in julia? (why does StatsBase.count(x,k) need k?)

2014-12-02 Thread David van Leeuwen
Associative fit into this pattern (I can't even find Associative in my copy of the documentation). I could try to replace all the references to Dict by Associative, then, and see what happens. ---david kl. 14:29:39 UTC+1 tirsdag 2. desember 2014 skrev David van Leeuwen følgende: Hi

[julia-users] Re: map to each row of a 2d array, returning 2d array

2014-12-01 Thread David van Leeuwen
Hi Mike, One way of obtaining what you want, using your own construction, is: *vcat(map(row-a[row,:]+1, 1:size(a)[1])...)* another way would be to use mapslices(), or write a loop, or use matrix calculations, all depending a bit on what your operation on the row is. (It may be faster to

Re: [julia-users] Re: what's the best way to do R table() in julia? (why does StatsBase.count(x,k) need k?)

2014-11-26 Thread David van Leeuwen
implemented via an multidimensional array and several dictionaries, each for one dimension, to map user-side indexes to integer indexes. - Dahua On Monday, November 10, 2014 8:12:54 AM UTC+8, David van Leeuwen wrote: Hi, On Sunday, November 9, 2014 5:10:19 PM UTC+1, Milan Bouchet

[julia-users] Re: [ANN, x-post julia-stats] Mocha.jl Deep Learning Library for Julia

2014-11-24 Thread David van Leeuwen
Very cool! ---david On Friday, November 21, 2014 3:00:42 AM UTC+1, Chiyuan Zhang wrote: https://github.com/pluskid/Mocha.jl Mocha is a Deep Learning framework for Julia http://julialang.org/, inspired by the C++ Deep Learning framework Caffe http://caffe.berkeleyvision.org/. Since this is

Re: [julia-users] BLAS a' * b

2014-11-13 Thread David van Leeuwen
On a related note, On Tuesday, October 21, 2014 10:20:25 PM UTC+2, Stefan Karpinski wrote: On Tue, Oct 21, 2014 at 4:13 PM, David van Leeuwen david.va...@gmail.com javascript: wrote: Does anybody know if `a' * b` is translated to a single BLAS call with the correct transposition options

Re: [julia-users] BLAS a' * b

2014-11-13 Thread David van Leeuwen
6:11 GMT-05:00 David van Leeuwen david.va...@gmail.com javascript:: On a related note, On Tuesday, October 21, 2014 10:20:25 PM UTC+2, Stefan Karpinski wrote: On Tue, Oct 21, 2014 at 4:13 PM, David van Leeuwen david.va...@gmail.com wrote: Does anybody know if `a' * b` is translated

[julia-users] Re: ANN: Compat.jl

2014-11-10 Thread David van Leeuwen
Hello, I didn't realize NamedArrays was broken on release-0.3, because of my lack of travis skills. I had a different 0.4 incompatibility: (Dict{K,V})(ks::AbstractArray{K},vs::AbstractArray{V}) is deprecated, use (Dict{K,V})(zip(ks,vs)) instead. Foolishly I replace my construct Dict(keys,

Re: [julia-users] Re: what's the best way to do R table() in julia? (why does StatsBase.count(x,k) need k?)

2014-11-10 Thread David van Leeuwen
Hello, On Monday, November 10, 2014 11:01:59 AM UTC+1, Milan Bouchet-Valat wrote: Le dimanche 09 novembre 2014 à 23:48 -0800, David van Leeuwen a écrit : Hello, On Monday, November 10, 2014 1:43:57 AM UTC+1, Dahua Lin wrote: NamedArrays.jl generally goes along this way

[julia-users] Re: ANN: Compat.jl

2014-11-10 Thread David van Leeuwen
Hi Nils, My current work around is ## temporary compatibility hack if VERSION v0.4.0-dev Base.Dict(z::Base.Zip2) = Dict(z.a, z.b) end On Monday, November 10, 2014 12:04:14 PM UTC+1, Nils Gudat wrote: Hi David, shouldnt it be @Compat Dict(zip(keys, values)) instead of

Re: [julia-users] Re: strange speed reduction when using external function in inner loop

2014-11-09 Thread David van Leeuwen
BLAS.dot() need to do a whole load of admin to figure out the correct approach? What BLAS implementation is providing sum_sq? -erik On Sat, Nov 8, 2014 at 6:22 PM, David van Leeuwen david.va...@gmail.com javascript: wrote: No, the problem is not optimizing the inner loop---I understand

Re: [julia-users] Re: strange speed reduction when using external function in inner loop

2014-11-09 Thread David van Leeuwen
is short, it uses naive for-loop; when x is long it calls BLAS. Best, Dahua On Sunday, November 9, 2014 12:34:46 PM UTC+8, Erik Schnetter wrote: How large is length(x)? What BLAS implementation is providing sum_sq? -erik On Sat, Nov 8, 2014 at 6:22 PM, David van Leeuwen david.va

[julia-users] Re: iJulia notebooks, in a few clicks ...

2014-11-09 Thread David van Leeuwen
This looks nice, On Sunday, November 9, 2014 5:35:49 AM UTC+1, cdm wrote: point a browser to https://tmpnb.org/ click the New Notebook button in the upper right area of the page. use the drop down menu in the upper right to change the kernel from Python to Julia ... run some

Re: [julia-users] Re: what's the best way to do R table() in julia? (why does StatsBase.count(x,k) need k?)

2014-11-09 Thread David van Leeuwen
Hi, On Sunday, November 9, 2014 5:10:19 PM UTC+1, Milan Bouchet-Valat wrot Actually I didn't do it because NamedArrays.jl didn't work well on 0.3 when I first worked on the package. Now I see the tests are still failing. Do you know what is needed to make them work? What is exactly not

Re: [julia-users] Re: strange speed reduction when using external function in inner loop

2014-11-09 Thread David van Leeuwen
PM UTC+8, David van Leeuwen wrote: Hi, On Sunday, November 9, 2014 5:34:46 AM UTC+1, Erik Schnetter wrote: How large is length(x)? in the example on the gist, size(x) = 1, 60. So the sumsq() needs to be performed over 60 values, admittedly not a lot. What are the overheads

Re: [julia-users] Re: what's the best way to do R table() in julia? (why does StatsBase.count(x,k) need k?)

2014-11-09 Thread David van Leeuwen
:54 AM UTC+8, David van Leeuwen wrote: Hi, On Sunday, November 9, 2014 5:10:19 PM UTC+1, Milan Bouchet-Valat wrot Actually I didn't do it because NamedArrays.jl didn't work well on 0.3 when I first worked on the package. Now I see the tests are still failing. Do you know what is needed

[julia-users] strange speed reduction when using external function in inner loop

2014-11-08 Thread David van Leeuwen
Hello, I had a lot of fun optimizing some inner loops in the couple of few days. Generally, I was able to churn out a last little bit of performance by writing out broadcast!()s that appeared in the inner loop. However, when I tried to replace a final inner-loop vector operation by a BLAS

[julia-users] Re: strange speed reduction when using external function in inner loop

2014-11-08 Thread David van Leeuwen
to the same timing on my machine. Is that what you're looking for? Am Samstag, 8. November 2014 10:20:39 UTC+1 schrieb David van Leeuwen: Hello, I had a lot of fun optimizing some inner loops in the couple of few days. Generally, I was able to churn out a last little bit of performance

Re: [julia-users] inv(::Symmetric), slow

2014-11-05 Thread David van Leeuwen
will return false. Hope it made sense. I'll probably have to write a section in the documentation about this soon. 2014-11-03 18:53 GMT-05:00 David van Leeuwen david.va...@gmail.com javascript:: Hello, I am struggling with the fact that covariance matrices computed from

Re: [julia-users] How Julia do math operations

2014-11-05 Thread David van Leeuwen
I couldn't resist this after my cholfact() revelation... On Wednesday, November 5, 2014 11:23:03 AM UTC+1, Stefan Karpinski wrote: Well, I'm not sure what the intention was, but this fact is true: for floating-point values x and y of the same type, x == y is true if and only if string(x) ==

[julia-users] More on ::Symmetric and speed

2014-11-05 Thread David van Leeuwen
Hello again, I am having great fun with optimizing the inner loop in my code for full covariance matrices in variational Bayes GMMs. The right call to BLAS wrappers at critical points makes all the difference. For building the covariance matrices, one ends up summing a lot of ` Δ * Δ' `

Re: [julia-users] More on ::Symmetric and speed

2014-11-05 Thread David van Leeuwen
2014-11-05 17:10 GMT-05:00 David van Leeuwen david.va...@gmail.com javascript:: Hello again, I am having great fun with optimizing the inner loop in my code for full covariance matrices in variational Bayes GMMs. The right call to BLAS wrappers at critical points makes all the difference

[julia-users] inv(::Symmetric), slow

2014-11-03 Thread David van Leeuwen
Hello, I am struggling with the fact that covariance matrices computed from a precision matrix aren't positive definite, according to `isposdef()` (they should be according to the maths). It looks like the culprit is `inv(pd::Matrix)` which does not always result in a positive definite

[julia-users] Union in composite type

2014-10-28 Thread David van Leeuwen
Hello, For a long lime I've been having a bad feeling for having a Union in a composite type, as in type GMM{T:FloatingPoint} ... kind::Symbol μ::Matrix{T} Σ::Union(Matrix{T},Vector{Matrix{T}}) ... end where the choice in `Σ` depends on whether `kind==:diag` or `kind==:full`. I have the

Re: [julia-users] Union in composite type

2014-10-28 Thread David van Leeuwen
{T,Matrix{T}}) = :diag kind{T}(g::GMM{T,Vector{Matrix{T}}}) = :full See the FAQ for more info about containers with abstract fields (especially the part about inner constructors). --Tim On Tuesday, October 28, 2014 02:03:57 AM David van Leeuwen wrote: Hello, For a long

[julia-users] Re: How to assign names of a RArray object in Rif.jl?

2014-10-27 Thread David van Leeuwen
Hi, There is a package NamedArray that attempts to make it possible to work with named indices and dimensions in native Julia arrays, just like you are used to in R. There is no interface to Rif.jl, though. Would this be a useful extension? ---david On Sunday, October 26, 2014 11:01:51 PM

Re: [julia-users] julia upgrade to 0.3.2

2014-10-27 Thread David van Leeuwen
Related to this: On Sunday, October 26, 2014 8:17:16 PM UTC+1, Stefan Karpinski wrote: If you do `git checkout release-0.3` then you will be on the `release-0.3` branch instead of `master`; you can then proceed exactly as you used to but will only get the relatively conservative changes on

Re: [julia-users] Confusion about dimensions

2014-10-27 Thread David van Leeuwen
It took me a long time to understand R's dimension indication, coming myself from octave before R. I think I never really got used to it, I always need to think twice in R. My way of remembering the R semantics is that the dimensions indicate the dimensions that you are left with after the

Re: [julia-users] BLAS a' * b

2014-10-22 Thread David van Leeuwen
Kornblith wrote: On Tuesday, October 21, 2014 6:41:24 PM UTC-4, David van Leeuwen wrote: I replaced the `γ = broadcast()` with the lines below that. No globals, but perhaps the field type gmm.μ is spoiling things. I am not sure if this is a case of an abstractly typed field type GMM

[julia-users] BLAS a' * b

2014-10-21 Thread David van Leeuwen
Hi, In optimizing an inner-loop statistics computation with fairly large matrices (matmul's of 1024x10.000 * 10.000x60 are not uncommon) I have to decide where to put some last unavoidable transpositions. In timing I have noticed that cutting out an intermediate result makes quite a

Re: [julia-users] BLAS a' * b

2014-10-21 Thread David van Leeuwen
Hi On Tuesday, October 21, 2014 10:20:25 PM UTC+2, Stefan Karpinski wrote: On Tue, Oct 21, 2014 at 4:13 PM, David van Leeuwen david.va...@gmail.com javascript: wrote: Does anybody know if `a' * b` is translated to a single BLAS call with the correct transposition options set

Re: [julia-users] BLAS a' * b

2014-10-21 Thread David van Leeuwen
Hi, thanks for the explanation. On Wednesday, October 22, 2014 12:15:40 AM UTC+2, Stefan Karpinski wrote: However, I really needed to assert the type in all involved arrays before using them in the for-loops, or I would loose a factor 10 or thereabouts in speed. This should only

[julia-users] Re: default display/print/show/summary in REPL?

2014-10-14 Thread David van Leeuwen
, ---david On Saturday, October 11, 2014 9:20:34 PM UTC+2, David van Leeuwen wrote: Hello, I am trying to get my package NamedArrays compatible again with v0.4 and beyond. I am running into the same problem I seem to be having over and over again, and that is that I don't know which

Re: [julia-users] Adding remote nodes using qsub

2014-10-11 Thread David van Leeuwen
ClusterManagers works well, and quite transparantly w.r.t. parallel execution in Julia. My only problems is that you can't specify the SGE queue name, so my jobs get killed if they last too long (the default queue has a 1h limit in our setup). ---david On Saturday, October 11, 2014 7:05:15

[julia-users] more implementations of convert()

2014-10-10 Thread David van Leeuwen
Hi, I seem to need convert() a lot, and especially for arrays this is somewhat of a nuisance. E.g., convert(Float32, rand(2,3)) does not work out of the box. Luckily, for the numeric types there are the functions float64(), float32() etc that can operate on arrays. This is all good, but

[julia-users] returning an #undef

2014-10-09 Thread David van Leeuwen
Hi, I am trying to implement type of Array where the values are indexed, i.e., the value of `a[i]` is `a.value[a.array[i]]`, with `a.value` the discrete set of values and `a.array` the indices. In the end it should look like the element type of `a` is just the element type of `a.value`.

Re: [julia-users] Re: returning an #undef

2014-10-09 Thread David van Leeuwen
Hi, On Thursday, October 9, 2014 5:02:06 PM UTC+2, Stefan Karpinski wrote: On Thu, Oct 9, 2014 at 8:50 AM, Ivar Nesje iva...@gmail.com javascript: wrote: How can I return #undef from a function? You will have to modify the internals of Julia so that *#undef* becomes a value that

[julia-users] Re: working HMM

2014-10-07 Thread David van Leeuwen
Hi, I have a plain GMM package under development at https://github.com/davidavdav/GMMs.git . I see now that I need to update the Readme.md a bit, I've split off some stuff that was too specific for automatic speaker recognition. The GMMs can now also be full covariance. There is support

[julia-users] type matching Array{Tuple}

2014-07-14 Thread David van Leeuwen
Hello, Somewhere in the last 150 days the value of Array{(Float64,Float64)} : Array{Tuple} changed from true to false. There may be good reasons for that, I can't tell. I would like to specify as a function argument something of the type Array{Tuple}, but I can't get that matched any

[julia-users] synchronous loading and asynchronous execution, elegantly?

2014-04-11 Thread David van Leeuwen
Hello, I need to compute aggregate statistics---say, the mean over columns, but later these will become more computationally intensive---for a large collection of matrices. These matrices vary in the number of rows, but have the same number of columns. I am looking for a general scheme

Re: [julia-users] ANN / RFC: SGEArray iterator

2014-03-24 Thread David van Leeuwen
of code---if anybody form ClusterManagers is willing to integrate it---by all means. ---david Thanks, Jiahao Chen Staff Research Scientist MIT Computer Science and Artificial Intelligence Laboratory On Thu, Mar 13, 2014 at 4:07 AM, David van Leeuwen david.va...@gmail.com

[julia-users] ANN / RFC: SGEArray iterator

2014-03-13 Thread David van Leeuwen
Hello, I've got a tiny package that makes certain Sun Grid Engine array processing jobs easier with Julia. I've put it up at Pkg.clone(https://github.com/davidavdav/SGEArrays.jl.git;) The premise is that your main Julia script needs to process a large number of files, which are given as a

Re: [julia-users] Converting a column of a DataFrame to a string

2014-03-13 Thread David van Leeuwen
Hi, I've run into this and similar things many times, and somehow each time it takes me a lot of time to come up with such a solution again. Don't ask me why I can't remember this, I must be getting old. Would it make sense to define a string(da::DataArray) to do just that, within

[julia-users] pmap and top level variables

2014-02-23 Thread David van Leeuwen
Hello, I noticed that directly from the REPL the scope for pmap() is different than from within a function. The following gives a a unknown error in the worker processes addprocs(2) a=1 pmap(x-a+x, 1:2) However, if this is wrapped in a function, everything works as expected: f(a,r) =

[julia-users] addprocs_sge and queue name

2014-02-15 Thread David van Leeuwen
Hello, I am using addprocs_sge form ClusterManagers, and this seem to work fine. However, I am running out of CPU time on the default queue in our computing environment. Does anybody know if it is possible to specify an alternative queue where addprocs_sge should schedule its workers?

  1   2   >