Re: [julia-users] Matlab bench in Julia

2014-09-20 Thread Keith Campbell
Milan -- Thank you for your diligence! >

[julia-users] Re: select all code inside a function in emacs

2014-09-20 Thread Patrick O'Leary
On Friday, September 19, 2014 11:42:58 PM UTC-5, Kuba Roth wrote: > > Could someone please advise me the best strategy to select a function > (block of code) in emacs? > I'm trying to come up with a tool to select whole body of a function from > any point within that code which belongs to that fu

Re: [julia-users] Re: #JuliaLang anime character design spec.

2014-09-20 Thread Takeshi Kimura
Hi there, I received the draft image of "Julia-tan", Julialang anime character. Yes, Ninja-style. may be hair color, or other properties will change in future fixed images. Karpi

[julia-users] Re: a good IDE for Julia ? (Julia Studio does not work with Julia v 0.3.0)

2014-09-20 Thread colintbowers
My favourite of the IDE options is the Sublime-IJulia package: https://github.com/quinnj/Sublime-IJulia Cheers, Colin On Friday, September 19, 2014 9:25:14 PM UTC+10, Ján Dolinský wrote: > > Thanks a lot for the tip. I'll compile from the source then. > > Regards, > Jan > > Dňa piatok, 19. sep

[julia-users] select all code inside a function in emacs

2014-09-20 Thread Mike Innes
Defining a "starting line" as a non-blank line which isn't preceded by whitespace and isn't just "end", what you want to do is to scan up from the current cursor position to the first starting line. Then scan back down to the first non-blank line before the next starting line, *or* the first end

[julia-users] some Python / Julia comparisons

2014-09-20 Thread Jason Trenouth
Hi, I converted some Python programs to Julia recently. The (probably incorrect) ramblings are here: http://a-coda.tumblr.com/post/93907978846/julia-dream http://a-coda.tumblr.com/post/97973293291/a-recurring-dream tl;dr - similar in style, but Julia can be a lot faster __Jason

[julia-users] Re: some Python / Julia comparisons

2014-09-20 Thread stonebig34
Hi Jason, Could it be possible for you to create a Julia program to compare it with the famous Jake Vanderplas post ? http://jakevdp.github.io/blog/2013/06/15/numba-vs-cython-take-2/ Under which type of problem Julia fly much higher or easily than cython/pypy/numba ? ("much" = x3 in my mind) L

[julia-users] Re: some Python / Julia comparisons

2014-09-20 Thread Jason Merrill
One thing that's really nice about Julia is that it's often straightforward to transliterate python code (or matlab code) in a fairly literal way and end up with working code that has similar, or sometimes better performance. But another nice thing about Julia is that it allows you to fairly smo

Re: [julia-users] Re: #JuliaLang anime character design spec.

2014-09-20 Thread Stefan Karpinski
I'm not sure there ought to be any official anime character for Julia, but I'm happy for there to be unofficial characters like these. You can use elements of the Julia logo for non-commercial purposes and these kinds of usages certainly seem to qualify as fair use. As a matter of personal taste, I

[julia-users] randomly sample from dataframe

2014-09-20 Thread Arshak Navruzyan
I'd like to pull a 10% random sample from a dataframe with multiple columns (and maintain column to column relationships). Looks like the statsbase sample method expects a 1D array. Thanks!

Re: [julia-users] randomly sample from dataframe

2014-09-20 Thread John Myles White
Here’s a 20% sample: { julia> using DataFrames julia> using StatsBase julia> df = DataFrame(A = 1:10, B = 2:2:20) 10x2 DataFrame |-||| | Row | A | B | | 1 | 1 | 2 | | 2 | 2 | 4 | | 3 | 3 | 6 | | 4 | 4 | 8 | | 5 | 5 | 10 | | 6 | 6 | 12 | | 7 | 7 | 14 | | 8

Re: [julia-users] Debugging a segfault (memory allocation?)

2014-09-20 Thread Erik Schnetter
The MEMDEBUG option leads to a bootstrap failure, so this doesn't help me at the moment ... Do you have other pointers? -erik On Thu, Sep 18, 2014 at 8:44 PM, Isaiah Norton wrote: > See MEMDEBUG in options.h > > On Sep 18, 2014 8:28 PM, "Erik Schne

Re: [julia-users] Debugging a segfault (memory allocation?)

2014-09-20 Thread Isaiah Norton
Yeah, I saw that but didn't get a chance to investigate. Will look when I get home or hopefully Jameson/Keno/Jeff will see. If you want to debug the bootstrap issue you can run (in base/): gdb ../julia --build ../usr/lib/julia/sys0 sysimg.jl On Saturday, September 20, 2014, Erik Schnetter wrote:

Re: [julia-users] Re: #JuliaLang anime character design spec.

2014-09-20 Thread Takeshi Kimura
Karpinski-san: Thank you for your reply, Karpinski-san. I am sure it is not official character for Julia, and I grad to accept your proposal. I'd like to put the CC BY-NC-SA license to Julia-tan, but I'd like to remain the means of commercial-use, So I put this character under the following dua

[julia-users] Difficulty with DisjointSets from DataStructures

2014-09-20 Thread Ed Scheinerman
I ran into the following problem creating partitions of objects of varying types. I'm using the DisjointSets structure found in the DataStructures module. This code runs fine: using DataStructures elements = ["alpha", "beta", "gamma", "delta"] parts = DisjointSets{ASCIIString}(elements)#

Re: [julia-users] Difficulty with DisjointSets from DataStructures

2014-09-20 Thread Tim Holy
On Saturday, September 20, 2014 02:20:36 PM Ed Scheinerman wrote: > Is it necessary for union! to check/assert the types of its 2nd and 3rd > arguments?? Seems unlikely. How about changing it and seeing if the tests pass? If so, please submit as a pull request. --Tim

[julia-users] Necessary to rebuild Julia after modifying Base?

2014-09-20 Thread Erik Schnetter
I am trying to add "info" calls to Base functions to debug an issue. These don't make it to my screen, and I don't know whether they are getting lost somewhere or whether Julia is ignoring my modifications. Do I need to re-build and re-install Julia after modifying files in Base? If so: Can I a

Re: [julia-users] Necessary to rebuild Julia after modifying Base?

2014-09-20 Thread John Myles White
If you change Base, you do need to regenerate the system image. I always do this by running make clean and make, but it might be possible to do things faster than that process. — John On Sep 20, 2014, at 2:57 PM, Erik Schnetter wrote: > I am trying to add "info" calls to Base functions to de

Re: [julia-users] Necessary to rebuild Julia after modifying Base?

2014-09-20 Thread Tim Holy
make clean is usually necessary only when something in src changes. Just saying "make" (without the "clean") can save you 1 round of building. But yes, even a 1-character source code change to base requires rebuilding julia. --Tim On Saturday, September 20, 2014 03:01:27 PM John Myles White wr

Re: [julia-users] Necessary to rebuild Julia after modifying Base?

2014-09-20 Thread Jake Bolewski
Depending where you are placing the debug statements, various output functionality might not be defined yet when building the system image. You can get around that by using the static show functions defined at the top of sysimg.jl On Saturday, September 20, 2014 6:09:39 PM UTC-4, Tim Holy wrot

Re: [julia-users] How to print a StatsBase.CoefTable / other table object to latex?

2014-09-20 Thread John Myles White
I’m not aware of any methods to do this, but it shouldn’t be too hard. — John On Sep 19, 2014, at 3:19 AM, Florian Oswald wrote: > just wondering if anyone has a way to print for example a GLM regression > output table to tex? I think I'm looking for something like > [http://cran.r-project.o

[julia-users] Problem assigning submatrices

2014-09-20 Thread Clemens Heitzinger
[I am reposting this from julia-dev, where it was suggested to try here.] Dear all: I am seeing a curious problem when assigning submatrices, e.g., in R[k:m, :] = P * R[k:m, :] I was implementing QR factorization and here is the code. == function bug(A) (m, n) = size(A) Q = eye(

Re: [julia-users] Necessary to rebuild Julia after modifying Base?

2014-09-20 Thread Elliot Saba
Note that Jake's advice here is meant for if you want to see debugging output while precompiling the system image. If you're just trying to modify functions in Base for normal execution, you don't need to worry about that. -E On Sat, Sep 20, 2014 at 3:49 PM, Jake Bolewski wrote: > Depending whe

Re: [julia-users] Problem assigning submatrices

2014-09-20 Thread Andreas Noack
It is easier to help you if you provide an example that can actually run. What is A when you get the error. A guess could be that it is something like a Matrix{Int} and therefore R = copy(A) is also Matrix{Int}. Hence, the line R[k:m, :] = P * R[k:m, :] fails as the right hand side consists of fl

Re: [julia-users] Problem assigning submatrices

2014-09-20 Thread Clemens Heitzinger
Excellent point, and that's indeed the solution. Thanks! It works with R = float64(A) instead of R = copy(A). == *julia> **A = [17 24 1 8 15* * 23 5 7 14 16* * 4 6 13 20 22* * 10 12 19 21 3* * 11 18 25 2 9]* *5x5 Array{Int64,2}:* * 17

Re: [julia-users] Necessary to rebuild Julia after modifying Base?

2014-09-20 Thread Erik Schnetter
Thanks for the pointers. I'm only changing Julia code at the moment, so I'll go with "make install". And luckily I'm not debugging the bootstrap process yet, but I'll keep the static show function in mind. -erik On Sat, Sep 20, 2014 at 8:27 PM, Elliot Saba wrote: > Note that Jake's advice here i

[julia-users] De-serialization and thread-safety?

2014-09-20 Thread Erik Schnetter
I am trying to track down a segfault in a Julia application. Currently I am zooming in on "deserialize", as avoiding calling it seems to reliably cure the problem, while calling it (even if not using the result) seems to reliably trigger the segfault. I am using many threads (tasks), and deseri

[julia-users] How to convert a cell type to array type?

2014-09-20 Thread Staro Pickle
I define a matrix using cell, like: A = cell(2,2) b = ones(2,2) A[1,1] = b A[1,2] = b A[2,1] = b A[2,2] = b Then I want to make A a 4*4 2-D array: 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 How to do this?

[julia-users] Re: How to convert a cell type to array type?

2014-09-20 Thread Don MacMillen
short answer is hvcat((2,2), A...) but make certain it is doing the concatenation in the order you really want, else call it out specifically as hvcat((2,2), A[2,1], A[1,1], A[2,2], A[1,2]) for example. On Saturday, September 20, 2014 8:34:32 PM UTC-7, Staro Pickle wrote: > > I define a matrix u

[julia-users] Re: How to convert a cell type to array type?

2014-09-20 Thread Staro Pickle
There is no automatic way, like the "cell2mat" command in matlab? On Sunday, September 21, 2014 12:42:44 PM UTC+8, Don MacMillen wrote: > > short answer is hvcat((2,2), A...) but make certain it is doing the > concatenation in the order you really want, else call it out specifically > as hvcat((

[julia-users] Re: How to convert a cell type to array type?

2014-09-20 Thread Don MacMillen
I haven't seen it, but that doesn't mean it's not there. Maybe time to hit readthedocs? On Saturday, September 20, 2014 9:48:02 PM UTC-7, Staro Pickle wrote: > > There is no automatic way, like the "cell2mat" command in matlab? > > > On Sunday, September 21, 2014 12:42:44 PM UTC+8, Don MacMillen

Re: [julia-users] Necessary to rebuild Julia after modifying Base?

2014-09-20 Thread Ivar Nesje
There is one trick that you might try when you're modifying methods in Base. You can define a new method on the same function. Eg, you can paste the modified method in your terminal: function Base.sin(x::Float64) x == 0 && error() sqrt(1-cos(x)^2) end Note that julia might have inline