[julia-users] Re: unpleasant docstring / macro parsing error

2015-11-06 Thread andrew cooke
https://github.com/JuliaLang/julia/issues/13905 On Friday, 6 November 2015 17:04:14 UTC-3, andrew cooke wrote: > > > is this known? am i doing something dumb? > > if not, i'll create an issue. > > andrew@laptop:/tmp> cat nasty.jl > > """this is a doc string""" > function myfunc() >

[julia-users] extracting argument symbols from function

2015-11-06 Thread Eric Jang
Is it possible to get parameter names to a function? For instance, function myfunc(x,y,z) x+y+z end given the above function, I want to recover ["x","y","z"]

[julia-users] Escher Spinner

2015-11-06 Thread Brandon Miller
Code snippet: https://gist.github.com/r2dbg/14189258e9daee2cece6 I'd like for the spinner on line 23 to spin while do_work() is running and stop after do_work returns. However, I can't seem to find a good way to do this. The form is blocking until all fields in plugsampler() are fulfilled.

Re: [julia-users] Do I have simd?

2015-11-06 Thread Seth
Hi Rob, I built it (and openblas) myself (via git clone) since I'm testing out Cxx.jl. Xcode is Version 7.1 (7B91b). Seth. On Friday, November 6, 2015 at 3:54:04 PM UTC-8, Rob J Goedman wrote: > > Seth, > > You must have built Julia 0.4.1-pre yourself. Did you use brew? > > It looks like you

Re: [julia-users] Github wiki permission

2015-11-06 Thread cormullion
issues and PRs too https://github.com/JuliaGraphics/Colors.jl/pulse

[julia-users] Re: How to correctly create custom representation of an array of a custom type?

2015-11-06 Thread Gnimuc Key
that works, thank you! 在 2015年11月6日星期五 UTC+8下午11:23:55,Matt Bauman写道: > > Whenever you define an IO method, you need to make sure that all IO > methods you call within it also use that argument. Change println("x ...") > to println(io, "x …"). > > On Friday, November 6, 2015 at 8:17:56 AM

Re: [julia-users] Github wiki permission

2015-11-06 Thread Steven G. Johnson
Wow, I didn't even know that these existed. I don't have time to babysit dozens of wikis from dozens of repos; I just went and disabled them all. I wish github disabled the wikis by default.

Re: [julia-users] Do I have simd?

2015-11-06 Thread Rob J. Goedman
Thanks Seth, That's the end of my first attempt to figure out what’s happening here. Back to the drawing board! Regards, Rob > On Nov 6, 2015, at 4:53 PM, Seth wrote: > > Hi Rob, > > I built it (and openblas) myself (via git clone) since I'm testing out > Cxx.jl.

Re: [julia-users] Do I have simd?

2015-11-06 Thread DNF
OK, wow! I tried following the advice in https://github.com/staticfloat/homebrew-julia specifically, $ brew rm gcc openblas-julia suite-sparse-julia arpack-julia $ brew install gcc openblas-julia suite-sparse-julia arpack-julia Now, there is a difference: the non-SIMD version is *much slower*

[julia-users] Re: How to correctly create custom representation of an array of a custom type?

2015-11-06 Thread Gnimuc Key
Another question: Now I know that strange whitespace comes from array's indent: julia> [Foo(1,2), Foo(1,2)] 2-element Array{Foo,1}: x ---> 1 y ---> 2 x ---> 1 y ---> 2 How can I define my own `show(io::IO, x::Array{Foo, 1})`? julia> function show(io::IO, x::Array{Foo, 1})

Re: [julia-users] extracting argument symbols from function

2015-11-06 Thread Isaiah Norton
http://stackoverflow.com/questions/32928524/julia-introspection-get-name-of-variable-passed-to-function/32936088#32936088 On Fri, Nov 6, 2015 at 4:32 PM, Eric Jang wrote: > Is it possible to get parameter names to a function? > > For instance, > > function myfunc(x,y,z)

[julia-users] force recompilation of package at update

2015-11-06 Thread Tony Kelman
I don't think there's a setting, but see the Base.compilecache function. You could define in your .juliarc.jl a wrapper around Pkg.update that calls update then recompiles any updated packages.

Re: [julia-users] Re: slice() instead of making a copy when accessing elements in a Matrix of Matrices

2015-11-06 Thread Tim Holy
On Friday, November 06, 2015 01:36:41 AM Patrick Kofod Mogensen wrote: > If I > slice(duM, 2) what I get is not the array, but the reference to the array, > correct? Correct. --Tim

Re: [julia-users] Re: Large Data Sets in Julia

2015-11-06 Thread Tim Holy
Not sure if it's as high-level as you're hoping for, but julia has great support for arrays that are much bigger than memory. See Mmap.mmap and SharedArray(filename, T, dims). --Tim On Thursday, November 05, 2015 06:33:52 PM André Lage wrote: > hi Viral, > > Do you have any news on this? > >

[julia-users] Re: slice() instead of making a copy when accessing elements in a Matrix of Matrices

2015-11-06 Thread Patrick Kofod Mogensen
Maybe I'm beginning to realize why... I had a place where I did something like copy(duM), and then changed the elements of the copy. This changed the original duM, and that was very confusing for me! The problem is, I wasn't thinking about what duM actually contains. If I slice(duM, 2) what I

[julia-users] Julia Hands-on: Introductory Tutorial for Distributed Computing

2015-11-06 Thread André Lage
Hello, I'll be giving the tutorial "Introduction to Julia for Distributed Computing" *today at 2pm (UCT-3)* at Brazilian (Northeast Region) High-performance Computing School. The tutorial will be in *Portuguese* and all the support material (IJulia Notebooks) will be in *English*. You are

[julia-users] Re: Simple bench : what I am measuring ??

2015-11-06 Thread Lionel du Peloux
Thank you for answering. I've tried to wrap my bench in

Re: [julia-users] Re: Simple bench : what I am measuring ??

2015-11-06 Thread Lionel du Peloux
Yichao, thank you for this meaningful answer. I understand points 1-4 to improve my coding. - I’ve redrawn a unique graph with your 2 benchmarking methods. - I’ve added a broadcast! version of sqrt. And two version from the MKL/VML library (with VML.jl) - I’ve finally added my first custom

[julia-users] Re: Julia Hands-on: Introductory Tutorial for Distributed Computing

2015-11-06 Thread Seth
André, Would you mind posting a link to the notebooks? (Also, if there's any possibility of an English translation for your presentation, that'd be amazing.) Thanks, S. On Friday, November 6, 2015 at 3:07:47 AM UTC-8, André Lage wrote: > > Hello, > > I'll be giving the tutorial "Introduction

[julia-users] Re: "using Gadfly" (using a package) only if needed

2015-11-06 Thread Seth
The way we do it in LightGraphs is as follows: try using GraphMatrices import GraphMatrices.CombinatorialAdjacency nothing catch end and then if isdefined(:GraphMatrices) ... conditional code here end taking advantage of the fact that :Package is defined when "Package" is

[julia-users] Re: Julia Hands-on: Introductory Tutorial for Distributed Computing

2015-11-06 Thread André Lage
IJulia Notebooks are here: https://github.com/proflage/2015-julia-hands-on André Lage. On Fri, Nov 6, 2015 at 8:07 AM, André Lage wrote: > Hello, > > I'll be giving the tutorial "Introduction to Julia for Distributed > Computing" *today at 2pm (UCT-3)* at Brazilian

[julia-users] Re: How to correctly create custom representation of an array of a custom type?

2015-11-06 Thread Matt Bauman
Whenever you define an IO method, you need to make sure that all IO methods you call within it also use that argument. Change println("x ...") to println(io, "x …"). On Friday, November 6, 2015 at 8:17:56 AM UTC-5, Gnimuc Key wrote: > > we can define a good representation of a new type by

[julia-users] Github wiki permission

2015-11-06 Thread cormullion
The wiki on [https://github.com/JuliaGraphics/Colors.jl](https://github.com/JuliaGraphics/Colors.jl/wiki) is being spammed today. The github documentation says: "By default, every user can make changes to public wikis, but you can configure this to be enabled only for collaborators on your

Re: [julia-users] Do I have simd?

2015-11-06 Thread Rob J. Goedman
Hi DNF, I get below results onJulia 0.5 (home-build) and Julia 0.4 (downloaded). A clear difference is the presence of a vector block in the output of ‘code_llvm(innersimd, Tuple{Vector{Float32},Vector{Float32}})' Regards, Rob > On Nov 6, 2015, at 3:53 AM, DNF wrote: > >

Re: [julia-users] Github wiki permission

2015-11-06 Thread Stefan Karpinski
I think just deleting the wiki and disabling it would be best. On Friday, November 6, 2015, wrote: > The wiki on [ > https://github.com/JuliaGraphics/Colors.jl](https://github.com/JuliaGraphics/Colors.jl/wiki) > is being spammed today. The github documentation says: > > "By

[julia-users] _jl_value_t setting value in C

2015-11-06 Thread Chris Cheetham
Hi there, I am currently playing with Julia calls from C. I have made some good progress insofar as calling Julia functions, boxing/unboxing etc. What I am particularly interested in however is being able to return a type which consists of a number of Float64s and being able to get/set their

[julia-users] Re: Julia Hands-on: Introductory Tutorial for Distributed Computing

2015-11-06 Thread Leandro Melo de Sales
Hi Prof. Andre Lage, Congratulations for all your efforts to the Julia community. Thank you! Best, Leandro. -- PhD. Leandro Melo de Sales Institute of Computing (IC) at Federal University of Alagoas (UFAL), Brazil Pervasive and Mobile Computing Laboratory (COMPELab.org / IC)

[julia-users] Re: Julia Hands-on: Introductory Tutorial for Distributed Computing

2015-11-06 Thread Gianluca Righetto
If you're having trouble with the original Hangout link, this is the new link I got from André: https://hangouts.google.com/call/xouxnqdhhx72vyaazxlepje7hma Em sexta-feira, 6 de novembro de 2015 13:20:02 UTC-2, André Lage escreveu: > > IJulia Notebooks are here: > >

Re: [julia-users] Re: TinySegmenter benchmark

2015-11-06 Thread Michiaki ARIGA
Finally, I compared with C++ and Go version using TinySegmenterMaker. https://github.com/shogo82148/TinySegmenterMaker/pull/10 The resulting times(in seconds for 100 loops a text file) is following: RubyC++PerlNode.jsGoPythonJulia132.9848134105.3110.50111.8511.70 After my blog post, ikawaha

Re: [julia-users] Do I have simd?

2015-11-06 Thread Giuseppe Ragusa
I am pretty sure must something specific to your installation. On my machine ``` Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; RELEASE_X86_64 x86_64 ``` running the code, I get the following timings: ``` julia> timeit(1000,1000) GFlop= 2.4503017546610866 GFlop (SIMD) =

Re: [julia-users] Re: TinySegmenter benchmark

2015-11-06 Thread Stefan Karpinski
I'm kind of surprised that C++ is so slow. I would imagine that anything you can do performance-wise in Go or Julia, you ought to be able to do in C++. Any idea what's going on there? On Fri, Nov 6, 2015 at 12:00 PM, Michiaki ARIGA wrote: > Finally, I compared with C++ and Go

Re: [julia-users] Julia vs C++ single dispatch performance comparison

2015-11-06 Thread Stefan Karpinski
I'm curious what the third timing number "yet another experiment" was for the Julia code? I would imagine quite fast. On Fri, Nov 6, 2015 at 12:37 PM, Stefan Karpinski wrote: > Looks like a reasonable benchmark of this. Nice work. There's definitely a > lot of room for

[julia-users] Re: Simple bench : what I am measuring ??

2015-11-06 Thread Keith Campbell
"If you are posting a message on performance issues, please make sure that you do not have variables in global scope in your program. Wrap all your code in a function before timing it. Also, do see the section on Performance Tips

Re: [julia-users] Re: a=[1:1:10] WARNING ? What to creat vectors in 4.0 ?

2015-11-06 Thread Ismael VC
What DNF means is that must of the time you don't need to convert a range into an array, since the range is tolerable. The only times I need to do that is if I need to slice or index the elements of the range. So what are you doing with this range? El 06/11/2015 07:54, "Paul Analyst"

Re: [julia-users] _jl_value_t setting value in C

2015-11-06 Thread Yichao Yu
On Fri, Nov 6, 2015 at 7:21 AM, Chris Cheetham wrote: > Hi there, > > I am currently playing with Julia calls from C. I have made some good > progress insofar as calling Julia functions, boxing/unboxing etc. What I am > particularly interested in however is being able to

[julia-users] Julia vs C++ single dispatch performance comparison

2015-11-06 Thread Cristóvão Duarte Sousa
Hi, I've been wondering how Julia dispatching system would compare to the C++ virtual functions dispatch one. Hence, I write a simple test in both Julia and C++ that measures the calling of a function over the elements of both an array of concrete objects and another of abstract pointers to

Re: [julia-users] Julia vs C++ single dispatch performance comparison

2015-11-06 Thread Stefan Karpinski
Looks like a reasonable benchmark of this. Nice work. There's definitely a lot of room for improvement of dynamic dispatch. We can't use classic vtables because of the multiple part of Julia's dispatch – where do you stick the vtable? Most of the time we get performance by avoiding dispatch

[julia-users] Simple bench : what I am measuring ??

2015-11-06 Thread Lionel du Peloux
Hello, I'm trying to understand how basic functions on vectors perform, regarding the size (n) of a vector. When I track the elapsed time per element (in nano sec) regarding the vector size (n), I see that I need at least 100 elements in my vector to reach half the maximum speed (at 7ns/el

Re: [julia-users] Do I have simd?

2015-11-06 Thread DNF
On Friday, November 6, 2015 at 12:20:38 PM UTC+1, Giuseppe Ragusa wrote: > > I am pretty sure must something specific to your installation. > Do you mean my Julia installation?

Re: [julia-users] Simple bench : what I am measuring ??

2015-11-06 Thread Yichao Yu
On Fri, Nov 6, 2015 at 6:53 AM, Lionel du Peloux wrote: > > Hello, > > I'm trying to understand how basic functions on vectors perform, regarding > the size (n) of a vector. > > When I track the elapsed time per element (in nano sec) regarding the > vector size (n), I

[julia-users] Re: Simple bench : what I am measuring ??

2015-11-06 Thread Lionel du Peloux
Thank you for answering. I've tried to wrap my bench in a function to avoid global scope. However I get the same results. Would you mind producing a short piece of code to explain how to bench that correctly ? Thanks again, Lionel

[julia-users] How to correctly create custom representation of an array of a custom type?

2015-11-06 Thread Gnimuc Key
we can define a good representation of a new type by overloading `Base.show(io::IO, x::Foo)`: ``` import Base: show type Foo x y end function show(io::IO, x::Foo) println("x ---> $(x.x)") println("y ---> $(x.y)") end julia> Foo(1,2) x ---> 1 y ---> 2 ``` but I don't know

[julia-users] Re: Simple bench : what I am measuring ??

2015-11-06 Thread Lionel du Peloux
Yes, I should have done that before I posted ... I apologize ... However, as said in my previous answer, wrapping my bench in a function doesn't change the results. So I still don't know if I'm doing something wrong (and what ...) : julia> using DataFrames julia> using Gadfly julia>

[julia-users] Julia Hands-on: Introductory Tutorial for Distributed Computing

2015-11-06 Thread Ismael VC
This is great news, I'll see you there on hangouts, thanks!

Re: [julia-users] Julia vs C++ single dispatch performance comparison

2015-11-06 Thread Cristóvão Duarte Sousa
Around 0.000400 seconds (but sometimes 0.001000). On Fri, Nov 6, 2015 at 5:39 PM Stefan Karpinski wrote: > I'm curious what the third timing number "yet another experiment" was for > the Julia code? I would imagine quite fast. > > > On Fri, Nov 6, 2015 at 12:37 PM,

Re: [julia-users] Re: Simple bench : what I am measuring ??

2015-11-06 Thread Yichao Yu
On Fri, Nov 6, 2015 at 12:32 PM, Lionel du Peloux wrote: > > Yichao, thank you for this meaningful answer. > > I understand points 1-4 to improve my coding. > > - I’ve redrawn a unique graph with your 2 benchmarking methods. > - I’ve added a broadcast! version of

Re: [julia-users] Julia vs C++ single dispatch performance comparison

2015-11-06 Thread Stefan Karpinski
That's not too bad. This would definitely be something to work on the performance of in the future. On Fri, Nov 6, 2015 at 12:43 PM, Cristóvão Duarte Sousa wrote: > > Around 0.000400 seconds (but sometimes 0.001000). > > > > On Fri, Nov 6, 2015 at 5:39 PM Stefan Karpinski

Re: [julia-users] Re: Simple bench : what I am measuring ??

2015-11-06 Thread Yichao Yu
On Fri, Nov 6, 2015 at 12:47 PM, Yichao Yu wrote: > > > On Fri, Nov 6, 2015 at 12:32 PM, Lionel du Peloux < > lionel.dupel...@gmail.com> wrote: > >> >> Yichao, thank you for this meaningful answer. >> >> I understand points 1-4 to improve my coding. >> >> - I’ve redrawn a

Re: [julia-users] Do I have simd?

2015-11-06 Thread DNF
Thanks for the feedback. It seems like this is not a problem for most. If anyone has even the faintest clue where I could start looking for a solution to this, I would be grateful. Perhaps there is some software I could run that would detect hardware problems, or maybe I am missing software

Re: [julia-users] Julia vs C++ single dispatch performance comparison

2015-11-06 Thread Cristóvão Duarte Sousa
These experiments were also motivated by the problem of "Scene graph operations and dispatch ", which can be more or less solved in C++ by using some tricks (e.g., the "visitor pattern"), but which can be

Re: [julia-users] Github wiki permission

2015-11-06 Thread cormullion
Looks like every wiki in JuliaGraphics is now being spammed. Needs somebody with some minor superpowers to change the permissions... :)

Re: [julia-users] Re: TinySegmenter benchmark

2015-11-06 Thread Steven G. Johnson
Note that the Go version went one step further and packed the tuples into 64-bit integers where possible. We could do the same thing, though at this point we seem to be hitting the point of diminishing returns.

Re: [julia-users] Julia vs C++ single dispatch performance comparison

2015-11-06 Thread Stefan Karpinski
Simulation is another place where this comes up – you have a heterogenous collection of event objects and you have a loop that goes through them and handles each one, choosing how to handle them by doing dynamic dispatch on each event. The main thing to do for now to optimize that is make sure

Re: [julia-users] Github wiki permission

2015-11-06 Thread Tim Holy
Superpowers activated. Thanks for the heads-up. --Tim On Friday, November 06, 2015 10:20:47 AM cormull...@mac.com wrote: > Looks like every wiki in JuliaGraphics is now being spammed. Needs somebody > with some minor superpowers to change the permissions... :)

Re: [julia-users] Re: TinySegmenter benchmark

2015-11-06 Thread Steven G. Johnson
The C++ version is basically transcribed from the JavaScript version and constructs tons of temporary strings. The key improvement we made (and Go subsequently adapted) is to use tuples of Char instead for the hash tables. I'm pretty pleased that Julia is within 10% of the Go version, and

[julia-users] CUDART and CURAND problem on running the same "do" loop twice

2015-11-06 Thread Joaquim Masset Lacombe Dias Garcia
I was playing with the GPU (in both windows and mac) libraries and I came up with the following errors: The first time I execute the do loop, every thing goes well. But If i try a second time in a row I get this invalid pointer error. I got the same error in all my do loops, any ideas? best,

[julia-users] unpleasant docstring / macro parsing error

2015-11-06 Thread andrew cooke
is this known? am i doing something dumb? if not, i'll create an issue. andrew@laptop:/tmp> cat nasty.jl """this is a doc string""" function myfunc() @doesnotexist begin end end andrew@laptop:/tmp> julia-0.4 nasty.jl ERROR: LoadError: invalid doc expression: function myfunc()

Re: [julia-users] Do I have simd?

2015-11-06 Thread Rob J. Goedman
Hi DNF, In below versioninfo’s only libopenblas appears different. You installed using brew. The first thing I would try is to execute the steps under Common Issues listed on https://github.com/staticfloat/homebrew-julia . A bit further down on

Re: [julia-users] Enums in Julia

2015-11-06 Thread Milan Bouchet-Valat
Le vendredi 30 octobre 2015 à 20:43 -0700, Eric Forgy a écrit : > Thank you Jacob. > > I've now got my Enums working following your suggestion (embarrassed > for asking), but now I am unclear whether there is any benefit to > using enums versus just creating a bunch of instances of a composite >

[julia-users] Re: Simple bench : what I am measuring ??

2015-11-06 Thread Lionel du Peloux
Here are the results