[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 th

[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 t

[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 ti

[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 i

[julia-users] Re: chol() more strict in v0.5?

2016-08-07 Thread David van Leeuwen
I ran into the same problems. In order to keep compatible with 0.4 I had to wrap the call to `chol()` into forcesymmetric(c::Matrix) = full(Symmetric(c)) On Wednesday, August 3, 2016 at 3:02:52 PM UTC+2, Andreas Noack wrote: > > Yes. We are stricter now. LAPACK doesn't check for symmetry at all

[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 val

[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 a

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

2016-06-21 Thread David van Leeuwen
hich we currently express with the somewhat > awkward open(readstring, "file.txt") idiom. > > On Tue, Jun 21, 2016 at 11:25 AM, David van Leeuwen > 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
that local functions (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, .

[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 linebyline

[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 unde

[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 l

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

2016-05-30 Thread David van Leeuwen
jld for an 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 L

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

[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 be

[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 `N

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

2016-05-02 Thread David van Leeuwen
int from the ones provided by Julia?? > > On Mon, May 2, 2016 at 10:13 AM, David van Leeuwen > 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 running into problems >

[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 xμTΛxμ!(::Ar

[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] leaky if semantics

2016-02-08 Thread David van Leeuwen
is not kept between iterations of the for see > http://docs.julialang.org/en/release-0.4/manual/variables-and-scoping/#for-loops-and-comprehensions > That explains this behaviour, indeed. Thanks, ---david > Am 08.02.2016 um 12:41 schrieb David van Leeuwen: > > Hello, >

[julia-users] leaky if semantics

2016-02-08 Thread David van Leeuwen
Hello, According to http://docs.julialang.org/en/release-0.4/manual/control-flow/#man-conditional-evaluation variables in if blocks do not introduce lexical scope, and hence are available afterwards. This makes sense and is what I need. However, it seems afterwards relates to position in

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 > > https://github.com/JuliaParallel/DistributedArrays

[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 Compose.

[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 abo

[julia-users] Re: suppress deprecation warnings

2015-09-28 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 w

[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: > > https://github.com/tbrelof

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 the

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
n' as a variable and overload `minimum', even though they have 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, Davi

[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 wa

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 wrot

[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 adaptatio

[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-sensi

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

[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] Start julia with REPL, loading script, and passing arguments

2015-02-16 Thread David van Leeuwen
Hello, On Sunday, February 15, 2015 at 8:31:50 PM UTC+1, Stefan Karpinski wrote: > > I'm not sure that we support this at the moment. The part that's not > supported seems to be passing command-line arguments in interactive mode. > > The command line args seem to be read all right, and seem to b

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 >> some

[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

[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 te

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

2015-01-22 Thread David van Leeuwen
tting language >>> seems to be awfully complicated. >>> By the way, I totally forgot to mention, that I want to turn GLPlot more >>> into a meta package, offering different plotting interfaces, since I'm >>> generalizing more and more of the render code an

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

2015-01-22 Thread David van Leeuwen
ling how I can overload a `plot()` without `using` a specific plotting module like Winston, PGFSPlots in my 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, >> &

[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 (Receiver Operating Characteristic). It is mostly ab

[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

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

2015-01-22 Thread David van Leeuwen
had to - install texlive 2014 (from mactex, old version was 2009) - update / upgrade brew - install pdf2svg (using `brew homebrew/x11/pdf2svg`) which all in all took several hours on my old laptop (2010), and a system crash. Cheers, ---david On Wednesday, January 21, 2015 at 5:21:46 A

[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 > for making publication-quality graphics. > >1. TikzPictures.jl . B

[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 othe

[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

[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 th

Re: [julia-users] Optional import mechanism

2014-12-22 Thread David van Leeuwen
> You'll need xvfb installed, of course. > > --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

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

[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 locat

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 = > Triangular{Float64,Matrix{Float64},:U,false}[chol(sigm

[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 "

[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 compil

[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
is in order to understand the implications for NamedArrays. ---david > --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, > > > >

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

2014-12-05 Thread David van Leeuwen
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 and whether I can use > them directly in BLAS calls (e.g. gemv() etc.). In addition,

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-05 Thread David van Leeuwen
license to a more Julia-friendly one. Cheers, ---david On Thursday, December 4, 2014 1:24:03 AM UTC+1, David van Leeuwen wrote: > > Hello Milan, > > I just uploaded a new version of NamedArrays to github. I've > reimplemented the getindex() mess---the never ending chain o

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
e: > > Le mercredi 26 novembre 2014 à 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, >

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 > , > and has been since I read it the first time 1.5 years ago. > > I don't think i

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
, but didn't realize 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 Davi

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: &

[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 acc

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
be arbitrary >> hashable & equality-comparable instances, including integers, strings, >> symbols, among many other things. >> >> A multi-dimensional associative map can be considered as a >> multi-dimensional generalization of dictionaries, which can be easily >&g

[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 , > inspired by the C++ Deep Learning framework Caffe > . Since

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

2014-11-13 Thread David van Leeuwen
x > multiplication functions. > > 2014-11-13 6:11 GMT-05:00 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 < >

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 > wrote: > >> Does anybody know if `a' * b` is translated to a single BLAS call with >> the correct transposition

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
On Monday, November 10, 2014 10:07:46 PM UTC+1, Milan Bouchet-Valat wrote: > > Le lundi 10 novembre 2014 à 10:07 -0800, David van Leeuwen a écrit : > > Hello, > > > > On Monday, November 10, 2014 11:01:59 AM UTC+1, Milan Bouchet-Valat > wrote: > > Le

[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 < v"0.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 > @Compat.

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: > > Named

[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-09 Thread David van Leeuwen
be considered as a >> multi-dimensional generalization of dictionaries, which can be easily >> implemented via an multidimensional array and several dictionaries, each >> for one dimension, to map user-side indexes to integer indexes. >> >> - Dahua >> >>

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

2014-11-09 Thread David van Leeuwen
gt; in a per-column fashion (instead of per-row). > > > - Dahua > > > On Sunday, November 9, 2014 7:22:56 PM UTC+8, David van Leeuwen wrote: >> >> Hi, >> >> On Sunday, November 9, 2014 5:34:46 AM UTC+1, Erik Schnetter wrote: >>> >>> How lar

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 n

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
I would vote for calling such a function `table()`, to get even closer to R's table(). And I can't wait for such functionality to be included in METADATA... ---david On Sunday, November 9, 2014 4:26:45 PM UTC+1, Milan Bouchet-Valat wrote: > > Le jeudi 06 novembre 2014 à 11:17 -0800, Conrad St

[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"

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

2014-11-09 Thread David van Leeuwen
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 >>> wrote: >>> > No, the problem is not opt

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

2014-11-09 Thread David van Leeuwen
, or does 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 > > wrote: > > No, the problem is not optimizing th

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

2014-11-08 Thread David van Leeuwen
*x[i] > end > s > end > > This leads 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 inn

[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

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

2014-11-05 Thread David van Leeuwen
n private weight (the responsibility of the mixture for the data point). ---david > > 2014-11-05 17:10 GMT-05:00 David van Leeuwen >: > >> Hello again, >> >> I am having great fun with optimizing the inner loop in my code for full >> covariance matrices

[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 ` Δ * Δ' ` con

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)

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

2014-11-05 Thread David van Leeuwen
definiteness >> > > (Cholesky). However, the Bunch-Kaufman factorization preserves >> symmetry >> > > and >> > > hence the result is positive definite. In contrast, when doing inv(pd) >> > > Julia has no idea that pd is positive

[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 matr

Re: [julia-users] Union in composite type

2014-10-28 Thread David van Leeuwen
; kind{T}(g::GMM{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

[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:

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 op

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

[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] BLAS a' * b

2014-10-21 Thread David van Leeuwen
Simon 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

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 s

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 > wrote: > >> Does anybody know if `a' * b` is translated to a single BLAS call with >> the correct transposition options set, or

[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 differenc

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

2014-10-14 Thread David van Leeuwen
al display. Cheers, ---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,

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] default display/print/show/summary in REPL?

2014-10-11 Thread David van Leeuwen
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 function signature I need to overload in order to display my type in the REPL. In 0.2-0.3 I

  1   2   >