Re: [julia-users] Re: Juila vs Mathematica (Wolfram language): high-level features

2014-07-22 Thread Tomas Lycken
It is only for 2-D plotting, does not do contour or density plot ( two types I tend to use the most). I am sure it will only get improved. There is, actually, some functionality for contour and density plot already, but all the nuts and bolts aren't really tightened yet, and I don't know if

Re: [julia-users] Re: Juila vs Mathematica (Wolfram language): high-level features

2014-07-22 Thread Viral Shah
On Tuesday, July 22, 2014 2:39:31 AM UTC+5:30, Zahirul ALAM wrote: I have indeed met Gadfly. I had Gadfly in mind when I wrote that. It is indeed very pretty. It is only for 2-D plotting, does not do contour or density plot ( two types I tend to use the most). I am sure it will only get

Re: [julia-users] Re: Tips on reducing intermediate garbage?

2014-07-22 Thread Viral Shah
There is also the GC improvement patch that is waiting for the 0.3 release, which should help improve the GC performance. With better escape analysis, it should be possible to reuse the garbage from vectorized expressions in a loop in the next iteration, and significantly reduce GC load. It

[julia-users] Re: MLBase v0.5 released

2014-07-22 Thread Viral Shah
Wow, better than scikit.learn? This is exciting. We should probably discuss in the roadmap issue about what infrastructure we need to support large-scale distributed machine learning problems. -viral On Monday, July 21, 2014 4:08:14 AM UTC+5:30, Dahua Lin wrote: Please see

Re: [julia-users] iterate over rows of sparse matrix and get index of nonzeros?

2014-07-22 Thread Viral Shah
Julia 0.4 will have both compressed sparse column as well as compressed sparse row sparse matrices. We should probably write some iterators to work with cases such as these too. They will be convenient to use for sure, but may not give the best performance. -viral On Monday, July 21, 2014

Re: [julia-users] iterate over rows of sparse matrix and get index of nonzeros?

2014-07-22 Thread Florian Oswald
beautiful! can't wait. cheers florian On 22 July 2014 10:25, Viral Shah vi...@mayin.org wrote: Julia 0.4 will have both compressed sparse column as well as compressed sparse row sparse matrices. We should probably write some iterators to work with cases such as these too. They will be

[julia-users] Re: How to overcome versioning issues?

2014-07-22 Thread Andreas Lobinger
Hello colleagues, On Monday, July 21, 2014 4:53:17 PM UTC+2, Tomas Lycken wrote: I think this problem must be resolved by better practices among package maintainers: in short, the goal must be that as long as you only use (the latest) tagged versions of any packages, everything should Just

[julia-users] associative property of export/include/import?

2014-07-22 Thread Andreas Lobinger
Hello colleagues, i was for some time under the impression, that the exact sequence of imports do not matter (let's say, i hoped) as the definitions of types and functions are cumulative, modules should be self contained and use require where needed. Today: lobi@maroon:~/juliarepo$

[julia-users] Re: associative property of export/include/import?

2014-07-22 Thread Ivar Nesje
The problem is that both Gtk and Gadfly exports a draw function. Internally those are scoped by module so that their name is Gadfly.draw() and Gtk.draw(), and you can call them as such in your code. We can't merge the function's method, because there is no way to know which one to call if both

[julia-users] Re: How to overcome versioning issues?

2014-07-22 Thread Tomas Lycken
I still think the best way to resolve things if you should encounter problems, is to notify the maintainers. Most people in this community respond surprisingly fast =) There is some automated testing going on already, mainly thanks to [Iain Dunning](https://github.com/IainNZ)'s amazing work

[julia-users] Re: associative property of export/include/import?

2014-07-22 Thread Tomas Lycken
Isn't it odd, though, that there is no warning Could not import Gadfly.draw into Main (or Gtk.draw, depending on order)? // T On Tuesday, July 22, 2014 12:30:55 PM UTC+2, Ivar Nesje wrote: The problem is that both Gtk and Gadfly exports a draw function. Internally those are scoped by module

[julia-users] Re: How to overcome versioning issues?

2014-07-22 Thread Tomas Lycken
Look what my RSS reader just picked up! =) http://iaindunning.com/2014/pkg-deps.html // T On Tuesday, July 22, 2014 12:37:59 PM UTC+2, Tomas Lycken wrote: I still think the best way to resolve things if you should encounter problems, is to notify the maintainers. Most people in this

[julia-users] Re: How to overcome versioning issues?

2014-07-22 Thread Iain Dunning
Hah, yeah, strangely relevant. PkgEval runs nightly (around 1am US Eastern), but obviously with so many people using Julia there is a lot of room for chaos inbetween runs. On Tuesday, July 22, 2014 7:58:46 AM UTC-4, Tomas Lycken wrote: Look what my RSS reader just picked up! =)

Re: [julia-users] Re: How to overcome versioning issues?

2014-07-22 Thread Elliot Saba
Reading your post, I'm a little confused Iain. You state: If we consider only packages with at least 1 package depending on them, we find the median to be 3 dependent packages but the mean to be 10.5. This is due to the 15 or so packages with more than 30 dependent packages. Now, I'm not the

Re: [julia-users] Re: associative property of export/include/import?

2014-07-22 Thread Mauro
I agree that there should be some means of resolving conflicts (by warning, by precedence) but just dropping a whole set of methods because they conincidentially have the same name AND at the same time advertising multiple dispatch in julia doesn't fit for me. Multiple dispatch would still

Re: [julia-users] Re: How to overcome versioning issues?

2014-07-22 Thread Ivar Nesje
According to Julia median is defined as n = length(v) if isodd(n) return middle(select!(v,div(n+1,2))) else m = select!(v, div(n,2):div(n,2)+1) return middle(m[1], m[2]) end Ivar kl. 16:03:47 UTC+2 tirsdag 22. juli 2014 skrev Elliot Saba følgende: Reading your post, I'm a

[julia-users] Using append! with types Array{Int64,1}

2014-07-22 Thread Frederico Novaes
Hi, I started using Julia last week, so newbie. Here is the issue I'm having: - I want to store a certain unknown number of elements like [1,2] ( type Array{Int64,1} ). - I first create an array to store them, using: julia c_zero = Array(Array{Int64,1},0) - But then, when I try to append! a

[julia-users] Re: Using append! with types Array{Int64,1}

2014-07-22 Thread Ivar Nesje
You must use push! Julia is very careful about the meaning of a function (partially because multiple dispatch makes it much more important than in other languages). push! : appends a single element to a collection append! : pushes all the elements of a container into another container. c_zero

[julia-users] Julia in LaTeX

2014-07-22 Thread Alan Edelman
Mike LaCroix put together a nice latex package that produces In's and Out's nicely and beautifully but this is unfinished with too much manual labor required. Just throwing it out there figuring someone will improve on it. Perhaps one should also consider minted --

Re: [julia-users] build-in function to find inverse of a matrix

2014-07-22 Thread Cameron McBride
+1 for sticky shell mode. I do like the ? - help and ?? - apropos mapping, as it's clear on the mode what the simple mapping is. But it's a minor point. Cameron On Tue, Jul 22, 2014 at 12:06 AM, Viral Shah vi...@mayin.org wrote: That’s not a crazy idea. ? could do help if there is an exact

[julia-users] NotShared Memory

2014-07-22 Thread Sebastian Vollmer
I can create shared variables like @everywhere i=1 but how do I create variables local to a worker. The only possibility is through RemoteRefs with take and put, but this seems overly complicated. What I have in mind is a problem where all the workers only need communicated with the main

[julia-users] NotShared Memory

2014-07-22 Thread Sebastian Vollmer
I would like to perform computations on the workers independently only the task assignment is scheduled from the main thread. Instead of passing each result as they come to the main thread I would like to store them on each worker on a local array. When all computations have finished I would

[julia-users] ccall :u8_charnum

2014-07-22 Thread Keith Campbell
I can ccall :u8_charnum function from Windows but get an error on Linux: Any thoughts appreciated. Win: julia x=asdf asdf julia ccall(:u8_charnum, Csize_t, (Ptr{Uint8}, Csize_t), pointer(x), 4) 0x0004 On Linux, I get ERROR: ccall: could not find function u8_charnum in anonymous at

[julia-users] Re: MLBase v0.5 released

2014-07-22 Thread Dahua Lin
On Tuesday, July 22, 2014 4:21:49 AM UTC-5, Viral Shah wrote: Wow, better than scikit.learn? This is exciting. We are not there yet. However, the work to unify our many packages for regression has already been started. If we keep our paces this won't be a too-far-away goal. We should

Re: [julia-users] Equivalent for Python 'pass' statement in Julia

2014-07-22 Thread Leah Hanson
Because Julia has begin-end blocks, you can just use an empty block. Here are some examples of what I mean: ~~~ function foo() end ~~~ ~~~ if true elseif false else end ~~~ ~~~ for i=1:10 end ~~~ Does that do what you wanted? -- Leah On Tue, Jul 22, 2014 at 3:44 PM, yaoismyh...@gmail.com

Re: [julia-users] Equivalent for Python 'pass' statement in Julia

2014-07-22 Thread yaoismyhero
Thanks Leah, that was exactly what I was looking for! On Tuesday, July 22, 2014 5:04:30 PM UTC-4, Leah Hanson wrote: Because Julia has begin-end blocks, you can just use an empty block. Here are some examples of what I mean: ~~~ function foo() end ~~~ ~~~ if true elseif false else

Re: [julia-users] ++ as string concatenation operator

2014-07-22 Thread Spencer Russell
Why is string concatenation done with * not + https://groups.google.com/d/topic/julia-users/nQg_d_n0t1Q/discussion peace, s On Tue, Jul 22, 2014 at 4:58 PM, Stefan Karpinski ste...@karpinski.org wrote: many threads: search string concatenation On Tue, Jul 22, 2014 at 1:55 PM, Ben Arthur

[julia-users] iterator construct seems incorrect?

2014-07-22 Thread vavasis
Dear Julia users, As I have mentioned in earlier posts, I am working on a 2-3 tree implementation of a sort-order dict, that is, a dict in which the (key, value) pairs can be retrieved in the sort-order of the keys. According to section 2.1.7 of the manual, for i = I; body ; end translates

Re: [julia-users] iterator construct seems incorrect?

2014-07-22 Thread Tim Holy
You seem to be attributing a general principle where I don't think there is one. For example, see the iterators in base/range.jl; there are not two calls to next. --Tim On Tuesday, July 22, 2014 02:29:12 PM vava...@uwaterloo.ca wrote: Dear Julia users, As I have mentioned in earlier posts,

Re: [julia-users] Equivalent for Python 'pass' statement in Julia

2014-07-22 Thread Matt Bauman
The ternary syntax is one place where an empty block won't suffice — there must be an expression in both branches. In such a case, you can use `nothing` (which is also what an empty block will return). That said, it's more typical to refactor these cases into short-circuiting expressions:

[julia-users] Help needed, running slow

2014-07-22 Thread Arnaud Amiel
To learn how to use Julia, I am running through the project Euler problems (I had already solved most of them using other languages) and up to now, they have all comfortably been solved under 1s without any clever algorithm, even sometimes purposely brute forced. However I am stuck on problem

[julia-users] Re: iterator construct seems incorrect?

2014-07-22 Thread vavasis
Tim, The fact that 'next' is called before the loop body rather than after means that the 'done' predicate must provide an answer to the question: if 'next' is called on the current state, then would the result be the end of the data structure? The obvious way to answer that question is to

[julia-users] Re: Help needed, running slow

2014-07-22 Thread Patrick O'Leary
I suspect you might find the profiler helpful: http://julia.readthedocs.org/en/latest/stdlib/profile/ (And the ProfileView.jl package provides a nice visualization of profiler results--you should check it out too!) On Tuesday, July 22, 2014 4:47:09 PM UTC-5, Arnaud Amiel wrote: To learn how

[julia-users] Re: NotShared Memory

2014-07-22 Thread Sebastian Vollmer
Dear Gray, thank you very much. But your answer does not quite help me. The task have quite different execution time so I have to make sure it is executed in an beneficial order. I have posted below a simplified version of the code. However, the code block below #create local variables does

Re: [julia-users] Re: How to overcome versioning issues?

2014-07-22 Thread Iain Dunning
The blog post that keeps on giving :D On Tuesday, July 22, 2014 11:46:01 AM UTC-4, Elliot Saba wrote: Ah, I was confusing it with midrange. Thanks everybody! Learn something new every day. :) -E On Tue, Jul 22, 2014 at 11:18 AM, John Myles White johnmyl...@gmail.com javascript: wrote:

[julia-users] Re: Help needed, running slow

2014-07-22 Thread Iain Dunning
For what its worth, I put everything from abundantNumbers=Array(Int,1) to result in a function, and ran that function with @time. I got elapsed time: 0.074687051 seconds elapsed time: 0.258023294 seconds (22897960 bytes allocated, 4.74% gc time) which seems right. On Tuesday, July 22, 2014

[julia-users] Re: Help needed, running slow

2014-07-22 Thread Matt Bauman
I just put all your top-level statements (except for the two helper functions) into a function of its own: julia @time main() elapsed time: 0.162065867 seconds (14434040 bytes allocated) 4179871 I don't think my 5 year old laptop could be *that* much faster than your computer. Take a look at

Re: [julia-users] Equivalent for Python 'pass' statement in Julia

2014-07-22 Thread yaoismyhero
Matt, could you elaborate? Sorry, not quite sure what the ? means -- does that mean 'or'? Also not sure about what you mean by the phrase ternary syntax. Here is loosely what I am trying to do: for i in testarray if testarray 0 do this else do nothing It seemed

Re: [julia-users] Re: Juila vs Mathematica (Wolfram language): high-level features

2014-07-22 Thread Darwin Darakananda
If it's possible, do you mind showing the function you were plotting that lead to the extra lines in Gadfly? The current master should already be using the `group` aesthetic for contour lines. On Tuesday, July 22, 2014 10:06:53 AM UTC-7, Zahirul ALAM wrote: Thanks Stefan, Tomas and Viral.

[julia-users] Checking for Undefined Reference.

2014-07-22 Thread Ben Ward
I have a type that contains references to other instances of the same type - like a doubly linked list or - as it's intended use, like a tree like structure. They contain references to a parent of the same types and an array of references to children of the same type. However a root or singly

[julia-users] Re: Checking for Undefined Reference.

2014-07-22 Thread Simon Kornblith
isdefined(myobject, :myfield) On Tuesday, July 22, 2014 6:54:00 PM UTC-4, Ben Ward wrote: I have a type that contains references to other instances of the same type - like a doubly linked list or - as it's intended use, like a tree like structure. They contain references to a parent of the

Re: [julia-users] Re: iterator construct seems incorrect?

2014-07-22 Thread Tim Holy
Thanks for clarifying. While I know exactly what you're talking about, and I wasn't around when iterators were designed, I've always assumed that the current behavior follows from two principles: (1) `done` must evaluate to a boolean, and (2) the `item` should not leak out of the scope block

Re: [julia-users] ++ as string concatenation operator

2014-07-22 Thread Stefan Karpinski
Thanks for the link, Spencer. This obviously belongs in the FAQ for now. On Tue, Jul 22, 2014 at 2:19 PM, Spencer Russell s...@mit.edu wrote: Why is string concatenation done with * not + https://groups.google.com/d/topic/julia-users/nQg_d_n0t1Q/discussion peace, s On Tue, Jul 22, 2014

[julia-users] how to properly nest modules in a package

2014-07-22 Thread ggggg
Lets say I'm making a package P.jl. Inside P I define modules A, B and C all in separate files. I'd like to use C inside of A and B, and export a function from C from P. So right now B looks like include(C.jl) module B using C B body end And A looks like include(C.jl) module A using C A body

Re: [julia-users] Re: iterator construct seems incorrect?

2014-07-22 Thread Iain Dunning
Two separate calls to next certainly aren't in general necessary, and I haven't hit any issues implementing the iterator interface before. In fact, it felt quite natural in the end. I suspect that no matter which way you do the iteration interface, you'll be able to find an example where you'd

Re: [julia-users] Re: iterator construct seems incorrect?

2014-07-22 Thread Tim Holy
The other point to make is that if you find it more natural to do your incrementing inside done, there's no rule saying that next has to do any actual work. You can cache the item somewhere and just have next fetch it. --Tim On Tuesday, July 22, 2014 06:13:25 PM Iain Dunning wrote: Two

Re: [julia-users] Re: iterator construct seems incorrect?

2014-07-22 Thread Jameson Nash
it can however to better for done() to do no work, but to have next actually compute the next+1 state: start(x) = next(x) next(x,i) = (i, next(x)) done(x,i) = (i===sentinel) this makes next somewhat more expensive to call repeatedly, but has the benefit that the user can hold onto a reference to

[julia-users] Re: Where to get the documentation for version 0.3?

2014-07-22 Thread Michael Prentiss
1. Download the source, and unzip 2. Under julia/doc its all there. 3. Run make for the details On Tuesday, July 22, 2014 10:56:56 PM UTC-5, K leo wrote:

Re: [julia-users] Re: Where to get the documentation for version 0.3?

2014-07-22 Thread Stefan Karpinski
Also online: http://docs.julialang.org/en/latest/. On Tue, Jul 22, 2014 at 9:00 PM, Michael Prentiss mcprent...@gmail.com wrote: 1. Download the source, and unzip 2. Under julia/doc its all there. 3. Run make for the details On Tuesday, July 22, 2014 10:56:56 PM UTC-5, K leo wrote:

Re: [julia-users] Re: how to properly nest modules in a package

2014-07-22 Thread ggggg
Ok I see how that works, I wasn't aware of the ..C syntax. That solves the problem asked about, but I'm left with another question. Take for example module A module B foo()=4 export foo end foo() end That doesn't work, I get ERROR: foo not defined because foo is not actually in the A