[julia-users] ANN: node-julia

2014-09-18 Thread Jeff Waller
It's usable enough now, so it's time to announce this. node-julia https://github.com/waTeim/node-julia is a portal from node.js to Julia. It's purpose is partly to allow the node-HTTP-javascript guys access to the excellence that is Julia, and visa versa the Julia guys access to the HTTP

[julia-users] Re: LaTeX labels in Winston

2014-09-18 Thread Alex
Hi Pawel, AFAIK the rendering of the labels is actually handled by Cairo.jl (look for tex2pango in Cairo.jl https://github.com/JuliaLang/Cairo.jl/blob/master/src/Cairo.jl). There some TeX commands (\it, \rm, _, ^, etc) are translated into Pango markup format

Re: [julia-users] Re: ANN: VideoIO.jl wrapper for ffmpeg/libav

2014-09-18 Thread Max Suster
Hi Kevin, Thanks a lot for your feedback. Indeed, I have test run Simon´s wonderful GLPlot/Reactive script for realtime image acquisition and filtering. His example was very valuable to get started and for display. However, I found it to be a bit unstable on my Mac OSX (crashes when

[julia-users] Re: LaTeX labels in Winston

2014-09-18 Thread Paweł Biernat
Well, the PGFPlot certainly produces nicer plots but I can't use them in REPL properly. The function plot() works and displays a plot, but I cannot add any annotations (Axis,Title etc.). Maybe I am missing something from the tutorial you linked to. W dniu czwartek, 18 września 2014 00:01:25

[julia-users] Re: LaTeX labels in Winston

2014-09-18 Thread Paweł Biernat
Thanks, this is missing from the documentation of the Winston package. Maybe someone should add a short info on the typesetting options, so people won't have to go to the mailing list to figure it out. As for Pango rendering MathML there is an example at the end of the script gallery [1].

[julia-users] Re: LaTeX labels in Winston

2014-09-18 Thread Andreas Lobinger
Hello colleague, on one of these rainy sunday afternoons i sat there and thought: Hey, this can't be that complicated... Math type setting (still) seems to be some black art and an awful of heuristics are put into code and only there. So there is no material in algorithmic form available that

[julia-users] Make a Copy of an Immutable with Specific Fields Changed

2014-09-18 Thread Pontus Stenetorp
Everyone, As a former Python addict, I recently found myself wanting to generate a copy of an immutable object with only a single or a few values changed. I tried to find an answer to this question but either my search query skills or my lack of energy towards the end of my workday hindered me.

Re: [julia-users] Make a Copy of an Immutable with Specific Fields Changed

2014-09-18 Thread Rafael Fourquet
I think the idiomatic way remains to be designed: https://github.com/JuliaLang/julia/issues/5333.

[julia-users] Re: LaTeX labels in Winston

2014-09-18 Thread Andreas Lobinger
It's there in fine print: The typesetting of MathML is done via a component of firefox and then rendered via Cairo/Pango.

Re: [julia-users] Re: Article on `@simd`

2014-09-18 Thread Gunnar Farnebäck
There are still three arguments to max in the last of those examples. Actually it's not clear that you can make an equivalent expression with min and max. Functionally (with intended use) x[i] = max(a, min(b, x[i])) does the same thing as the earlier examples but it expands to x[i] =

[julia-users] unexpected domain error for ^(float,float)

2014-09-18 Thread Florian Oswald
# define a variable gamma: gamma = 1.4 mgamma = 1.0-gamma julia mgamma -0.3999 # this works: julia -0.3999^2.5 -0.10119288512475567 # this doesn't: julia mgamma^2.5 ERROR: DomainError in ^ at math.jl:252

[julia-users] Re: unexpected domain error for ^(float,float)

2014-09-18 Thread Ivar Nesje
This doesn't work either julia (-0.3999)^2.5 ERROR: DomainError in ^ at math.jl:262 try to convert one (or both) of the arguments to complex numbers julia complex(mgamma)^2.5 julia mgamma^complex(2.5) julia complex(mgamma)^complex(2.5) Which all results in: 3.0981385716323084e-17 +

Re: [julia-users] dispatch based on expression head

2014-09-18 Thread Tony Fong
Actually, having dispatch based on expression head can really help lint Lint itself. One thing that keeps bugging me is that currently I can never be sure I have covered all possible Expr head types. For example, the other day @pao pointed out bitstype 8 MyBitsType doesn't lint. I have never

[julia-users] Moving/stepen average without loop ? Is posible ?any command ?

2014-09-18 Thread paul analyst
I have a vector x = int (randbool (100)) a / how quickly (without the loop?) receive 10 vectors of length 10, in each field the average of the next 10 fields of the vector x (moving/stepen average of 10 values ​​at step = 10)? b / how to receive the 99 vectors of length 10 of the next 10

Re: [julia-users] Re: ANN: VideoIO.jl wrapper for ffmpeg/libav

2014-09-18 Thread Tim Holy
Glad to hear that you're getting some success with ImageView. Being able to install Gtk.jl automatically on the Mac is brand-new, and some hiccups are expected---there were many such hiccups in the early days of Tk.jl. Hopefully your installation problems can be resolved; please do work on

Re: [julia-users] Re: LaTeX labels in Winston

2014-09-18 Thread Tim Holy
Paweł, there's no one better than you to do that! Everyone here is a volunteer, and contributing documentation is a terrific way to help out. If you just grep for latex in the Winston source, that should help you find all the relevant information. Best, --Tim On Thursday, September 18, 2014

Re: [julia-users] unexpected domain error for ^(float,float)

2014-09-18 Thread Tim Holy
http://docs.julialang.org/en/latest/manual/faq/#why-does-julia-give-a-domainerror-for-certain-seemingly-sensible-operations On Thursday, September 18, 2014 03:24:00 AM Florian Oswald wrote: # define a variable gamma: gamma = 1.4 mgamma = 1.0-gamma julia mgamma -0.3999 #

Re: [julia-users] Re: ANN: VideoIO.jl wrapper for ffmpeg/libav

2014-09-18 Thread Max Suster
Thanks for the thoughtful reply Tim. I have nothing against moving to Gtk immediately - in fact I have been testing it this morning with X11 to figure out how I can replace the Tk code I wrote with Gtk. I agree that using Gtk should not be any harder than using Tk. There is no special

Re: [julia-users] Lint.jl status update

2014-09-18 Thread Patrick O'Leary
It was shockingly easy once I figured out how to get the bleepin regex to work. And how to use rx syntax. On Thursday, September 18, 2014 12:29:46 AM UTC-5, Tony Fong wrote: This is so cool. On Thursday, September 18, 2014 11:43:38 AM UTC+7, Patrick O'Leary wrote: On Sunday, September 14,

Re: [julia-users] unexpected domain error for ^(float,float)

2014-09-18 Thread Patrick O'Leary
Seems like the literal -0.4^2.5 should throw the same error, though? On Thursday, September 18, 2014 6:42:56 AM UTC-5, Tim Holy wrote: http://docs.julialang.org/en/latest/manual/faq/#why-does-julia-give-a-domainerror-for-certain-seemingly-sensible-operations On Thursday, September 18,

Re: [julia-users] unexpected domain error for ^(float,float)

2014-09-18 Thread Andreas Noack
because it parses as -(0.4^2.5) Med venlig hilsen Andreas Noack 2014-09-18 8:54 GMT-04:00 Florian Oswald florian.osw...@gmail.com: yes - not sure why -0.4 and (-0.4) are any different. On 18 September 2014 13:52, Patrick O'Leary patrick.ole...@gmail.com wrote: Seems like the literal

Re: [julia-users] unexpected domain error for ^(float,float)

2014-09-18 Thread Ivar Nesje
Operator precedence makes them parse very different. *julia **:(-0.4^-2.5)* *:(-(0.4^-2.5))* kl. 14:54:26 UTC+2 torsdag 18. september 2014 skrev Florian Oswald følgende: yes - not sure why -0.4 and (-0.4) are any different. On 18 September 2014 13:52, Patrick O'Leary patrick...@gmail.com

Re: [julia-users] unexpected domain error for ^(float,float)

2014-09-18 Thread Jutho
because it is not recognized/parsed as literal but as the application of a unary minus, which has lower precedence than ^ I guess it is not possible to give binary minus a lower precedence than ^ and unary minus of higher precedence, since these are just different methods of the same

Re: [julia-users] Re: ANN: ApproxFun v0.0.3 with general linear PDE solving on rectangles

2014-09-18 Thread Sheehan Olver
Just pushed an update so that the below is possible, for automatically approximating a function with a singularity. This seems like the same vein as what you were suggesting. Fun(x-exp(x)/sqrt(1-x.^2),JacobiWeightSpace(-.5,-.5)) On Monday, September 15, 2014 8:11:18 PM UTC+10, Gabriel

Re: [julia-users] unexpected domain error for ^(float,float)

2014-09-18 Thread Patrick O'Leary
Haha, yeah, forgot about that. On Thursday, September 18, 2014 8:00:13 AM UTC-5, Ivar Nesje wrote: Operator precedence makes them parse very different. *julia **:(-0.4^-2.5)* *:(-(0.4^-2.5))* kl. 14:54:26 UTC+2 torsdag 18. september 2014 skrev Florian Oswald følgende: yes - not sure

Re: [julia-users] unexpected domain error for ^(float,float)

2014-09-18 Thread Florian Oswald
i see! *julia **:(-0.4^-2.5)* *:(-(0.4^-2.5))* is good to know! didnt' think of this at all so far. On 18 September 2014 14:01, Jutho juthohaege...@gmail.com wrote: because it is not recognized/parsed as literal but as the application of a unary minus, which has lower precedence than ^ I

[julia-users] Cell indexing

2014-09-18 Thread nils . gudat
I'm sure this is an extremely trivial question, but I can't seem to find an answer anywhere. I'm trying to store a couple of matrices of different size in a cell object. In Matlab, I'd do the following: A = cell(1, 10); for i = 1:10 A{i} = matrix(:, :, i); end However, I can't figure

Re: [julia-users] Cell indexing

2014-09-18 Thread John Myles White
Hi Nils, Try something like: A = Array(Any, 10) for i in 1:10 A[i] = randn(1, 10) end On Sep 18, 2014, at 6:47 AM, nils.gu...@gmail.com wrote: I'm sure this is an extremely trivial question, but I can't seem to find an answer anywhere. I'm trying to store a couple of matrices of

Re: [julia-users] unexpected domain error for ^(float,float)

2014-09-18 Thread Gunnar Farnebäck
It's not like Julia is doing anything strange or uncommon here. Most people would be really surprised if -10² meant positive 100. Den torsdagen den 18:e september 2014 kl. 15:01:44 UTC+2 skrev Jutho: because it is not recognized/parsed as literal but as the application of a unary minus,

Re: [julia-users] unexpected domain error for ^(float,float)

2014-09-18 Thread Florian Oswald
well, I guess most computer scientists would be surprised. writing on a piece of paper -10^2 and -(10^2) I think most people are going to say the first expression is 100 and the second is -100. I take the point that what I did was a bit stupid and Julia is not making any mistake here. On 18

[julia-users] Re: ANN: VideoIO.jl wrapper for ffmpeg/libav

2014-09-18 Thread Simon Danisch
Applying various filters needs to be done by hand right now, but it could be easy to implement, depending on your demands ;) Right now, I don't really have much time to do much myself, but feel free to ask me anything that might come up! Can you report the stability issues? I guess you're doing

Re: [julia-users] Re: Article on `@simd`

2014-09-18 Thread Arch Robison
Thanks for pointing out the problems, particularly the ab issue. I've reworked that section. On Thu, Sep 18, 2014 at 4:57 AM, Gunnar Farnebäck gun...@lysator.liu.se wrote: There are still three arguments to max in the last of those examples. Actually it's not clear that you can make an

[julia-users] Have Julia send an email (or sound) when code is done

2014-09-18 Thread Alex
Hi Everyone, Does anyone know of code that would have julia send an email or text at a certain point in a script. I'm sending some big projects of to a digital ocean droplet and I think this would be a nice thing to add so I can stop obsessively checking my code all day. Here's the stata code

Re: [julia-users] Re: Article on `@simd`

2014-09-18 Thread Arch Robison
ISPC is not only a an explicit vectorization language, but has some novel semantics, particularly for structures. Not only SOA vs. AOS, but the whole notion of uniform vs. varying fields of a structure is a new thing. A macro-based imitation might be plausible. On Wed, Sep 17, 2014 at 7:58 PM,

[julia-users] Incrementing integer slow?

2014-09-18 Thread G. Patrick Mauroy
Profiling shows incrementing integers by 1 (i += 1) being the bottleneck. Within the same loop are other statements that do take much less time. In my performance optimizing zeal, I over typed the hell out of everything to attempt squeezing performance to the last once. Some of this zeal did

Re: [julia-users] Incrementing integer slow?

2014-09-18 Thread John Myles White
1 has type Int. If you add it to something with a different type, you might be causing type instability. What happens if you replace the literal 1 with one(T) for the type you're working with? -- John On Sep 18, 2014, at 9:56 AM, G. Patrick Mauroy gpmau...@gmail.com wrote: Profiling shows

Re: [julia-users] unexpected domain error for ^(float,float)

2014-09-18 Thread Steven G. Johnson
On Thursday, September 18, 2014 12:00:32 PM UTC-4, Florian Oswald wrote: well, I guess most computer scientists would be surprised. writing on a piece of paper -10^2 and -(10^2) I think most people are going to say the first expression is 100 and the second is -100. I take the

Re: [julia-users] unexpected domain error for ^(float,float)

2014-09-18 Thread John Myles White
I think that was a typo for not surprised. -- John On Sep 18, 2014, at 9:59 AM, Steven G. Johnson stevenj@gmail.com wrote: On Thursday, September 18, 2014 12:00:32 PM UTC-4, Florian Oswald wrote: well, I guess most computer scientists would be surprised. writing on a piece of paper

Re: [julia-users] unexpected domain error for ^(float,float)

2014-09-18 Thread Steven G. Johnson
On Thursday, September 18, 2014 12:59:10 PM UTC-4, Steven G. Johnson wrote: Note that in Fortran, Python, Matlab, and Mathematica, the exponentiation operator has higher precedence than unary -, similar to Julia. -10^2 in WolframAlpha (http://www.wolframalpha.com/input/?i=-10%5E2) gives

Re: [julia-users] unexpected domain error for ^(float,float)

2014-09-18 Thread Jameson Nash
I'm not sure about most people, but given the first expression, I would have handed the paper back and told the author to clarify the ambiguity. On Thursday, September 18, 2014, Florian Oswald florian.osw...@gmail.com wrote: well, I guess most computer scientists would be surprised. writing on

Re: [julia-users] unexpected domain error for ^(float,float)

2014-09-18 Thread Florian Oswald
ok guys i won't dig myself a deeper hole here - you win. (savored my 3 seconds of fame before steven corrected that typo tough!) On 18 September 2014 18:21, Jameson Nash vtjn...@gmail.com wrote: I'm not sure about most people, but given the first expression, I would have handed the paper back

Re: [julia-users] Re: LaTeX labels in Winston

2014-09-18 Thread Paweł Biernat
I have added a pull request: https://github.com/nolta/Winston.jl/pull/174, if you have any further suggestions of what should I include feel free to send them there. Best, Paweł W dniu czwartek, 18 września 2014 13:37:44 UTC+2 użytkownik Tim Holy napisał: Paweł, there's no one better than

Re: [julia-users] Incrementing integer slow?

2014-09-18 Thread G. Patrick Mauroy
No change. I over typed everything to avoid such type mismatches, particularly when experimenting with other integer types. So unless I missed something somewhere, it should not be the case. I suspect something like the compiler does not recognize the incrementing variables should be

[julia-users] Re: Have Julia send an email (or sound) when code is done

2014-09-18 Thread Jake Bolewski
Yo.jl On Thursday, September 18, 2014 12:46:03 PM UTC-4, Alex wrote: Hi Everyone, Does anyone know of code that would have julia send an email or text at a certain point in a script. I'm sending some big projects of to a digital ocean droplet and I think this would be a nice thing to

Re: [julia-users] Re: LaTeX labels in Winston

2014-09-18 Thread Tim Holy
Thanks for a great contribution! --Tim On Thursday, September 18, 2014 10:26:58 AM Paweł Biernat wrote: I have added a pull request: https://github.com/nolta/Winston.jl/pull/174, if you have any further suggestions of what should I include feel free to send them there. Best, Paweł W

[julia-users] Re: ANN: ApproxFun v0.0.3 with general linear PDE solving on rectangles

2014-09-18 Thread SrM@br
This is really great idea Sheehan! I love the idea of Chebfun and extending it to Julia, specially aiming at a general and powerful PDE solver sounds really good. Certainly it will be very useful. Thanks again!! On Wednesday, September 10, 2014 7:22:36 PM UTC-3, Sheehan Olver wrote: This

Re: [julia-users] Incrementing integer slow?

2014-09-18 Thread Tim Holy
Try running with --track-allocation=user and see if it's allocating memory on that line. If so, you have a type problem. http://docs.julialang.org/en/latest/manual/performance-tips/ (2nd and 3rd sections) --Tim On Thursday, September 18, 2014 10:44:58 AM G. Patrick Mauroy wrote: No change. I

Re: [julia-users] Incrementing integer slow?

2014-09-18 Thread G. Patrick Mauroy
Ah ah, this is it, I found the culprit! Pre-declaring the type of my increment variables slowed down by a factor of at least 2 if not 3 -- I will profile tonight when I can be on Linux, I cannot now from Windows. i::IdType = zeroIdType # Slow increment in the loop i = zeroIdType # Much faster

[julia-users] Re: Have Julia send an email (or sound) when code is done

2014-09-18 Thread Ivar Nesje
Yo.jl is not in METADATA.jl https://github.com/JuliaLang/METADATA.jl/pull/1093 You can use the twitter APIs tough, and there is a lot of online APIs that can send notifications. There is also the ancient *print(\x07)* for your amusement, if you happen to be within reach of a BELL. Regards

Re: [julia-users] Re: Have Julia send an email (or sound) when code is done

2014-09-18 Thread Cameron McBride
On Thu, Sep 18, 2014 at 1:44 PM, Jake Bolewski jakebolew...@gmail.com wrote: Yo.jl I thought this was a joke, but naturally, it does exist: https://github.com/dichika/Yo.jl Also, not really a julia question -- the stata trick should work just as well on julia (or anything that goes before the

Re: [julia-users] Incrementing integer slow?

2014-09-18 Thread Ivar Nesje
Type instabilities is often solved with the `const` keyword on some global variable. I would try const IdType = Int Seems like Julia is not smart enough to guess that i::IdType will always ensure that i is a Int64 when IdType might change. Regards Ivar kl. 19:58:02 UTC+2 torsdag 18.

Re: [julia-users] Re: Have Julia send an email (or sound) when code is done

2014-09-18 Thread Iain Dunning
For emails, check out https://github.com/JuliaWeb/SMTPClient.jl On Thursday, September 18, 2014 2:31:48 PM UTC-4, Cameron McBride wrote: On Thu, Sep 18, 2014 at 1:44 PM, Jake Bolewski jakebo...@gmail.com javascript: wrote: Yo.jl I thought this was a joke, but naturally, it does exist:

[julia-users] Matlab bench in Julia

2014-09-18 Thread Stephan Buchert
I have installed julia 0.3 from http://copr.fedoraproject.org/coprs/nalimilan/julia/ on my i7 Haswell 2.4 GHz laptop with updated Fedora 20. Then I translated the first two parts of the Matlab bench script to julia: # Transscript of the Matlab bench, # only LU and FFT # Transscript of the

Re: [julia-users] Matlab bench in Julia

2014-09-18 Thread Elliot Saba
The first thing you should do is run your code once to warm up the JIT, and then run it again to measure the actual run time, rather than compile time + run time. A convenient way to do this is to put your benchmark code inside a function, run the function once, then run it again using the @time

Re: [julia-users] Have Julia send an email (or sound) when code is done

2014-09-18 Thread Mike Nolta
On Thu, Sep 18, 2014 at 12:46 PM, Alex hollina...@gmail.com wrote: Hi Everyone, Does anyone know of code that would have julia send an email or text at a certain point in a script. I'm sending some big projects of to a digital ocean droplet and I think this would be a nice thing to add so I

[julia-users] Why does map allocate so much more than a list comprehension?

2014-09-18 Thread Johan Sigfrids
So I was looking at allocations in some code and I noticed I sped things up significantly by changing map to a list comprehension. Doing some microbenchmarking I noticed that map allocates far more memory than a list comprehension. Shouldn't they essentially be doing the same thing? data =

[julia-users] Re: Matlab bench in Julia

2014-09-18 Thread Jason Riedy
And Elliot Saba writes: The first thing you should do is run your code once to warm up the JIT, and then run it again to measure the actual run time, rather than compile time + run time. To be fair, he seems to be timing MATLAB in the same way, so he's comparing systems appropriately at that

Re: [julia-users] Moving/stepen average without loop ? Is posible ?any command ?

2014-09-18 Thread Paul Analyst
No idea ? W dniu 2014-09-18 o 13:26, paul analyst pisze: I have a vector x = int (randbool (100)) a / how quickly (without the loop?) receive 10 vectors of length 10, in each field the average of the next 10 fields of the vector x (moving/stepen average of 10 values ​​at step = 10)? b / how

Re: [julia-users] Re: Matlab bench in Julia

2014-09-18 Thread Andreas Noack
In addition our lu calculates a partially pivoted lu and returns the L and U matrices and the vector of permutations. To get something comparable in MATLAB you'll have to write [L,,U,p] = lu(A,'vector') On my old Mac where Julia is compiled with OpenBLAS the timings are MATLAB: tic();for i =

[julia-users] Re: LaTeX labels in Winston

2014-09-18 Thread Alex
Hi Andreas, From time to time I was also thinking that the equation rendering should be doable somehow... In the end, this usually led me to the conclusion that it is probably not so easy. For instance, Searching for MathML rendering doesn't give very many hits (GtkMathView seems to use Pango

Re: [julia-users] Re: Matlab bench in Julia

2014-09-18 Thread Stefan Karpinski
I'm slightly confused – does that mean Julia is 2.4x faster in this case? On Thu, Sep 18, 2014 at 3:53 PM, Andreas Noack andreasnoackjen...@gmail.com wrote: In addition our lu calculates a partially pivoted lu and returns the L and U matrices and the vector of permutations. To get something

Re: [julia-users] Re: Matlab bench in Julia

2014-09-18 Thread Andreas Noack
Yes. It appears so on my Mac. I just redid the timings with the same result. Med venlig hilsen Andreas Noack 2014-09-18 15:55 GMT-04:00 Stefan Karpinski ste...@karpinski.org: I'm slightly confused – does that mean Julia is 2.4x faster in this case? On Thu, Sep 18, 2014 at 3:53 PM, Andreas

Re: [julia-users] Incrementing integer slow?

2014-09-18 Thread Stefan Karpinski
On Thu, Sep 18, 2014 at 2:33 PM, Ivar Nesje iva...@gmail.com wrote: Seems like Julia is not smart enough to guess that i::IdType will always ensure that i is a Int64 when IdType might change. Since IdType is not constant, it can change at any time – generating code on the premise that it

Re: [julia-users] Re: Matlab bench in Julia

2014-09-18 Thread Stefan Karpinski
Nice :-) On Thu, Sep 18, 2014 at 4:20 PM, Andreas Noack andreasnoackjen...@gmail.com wrote: Yes. It appears so on my Mac. I just redid the timings with the same result. Med venlig hilsen Andreas Noack 2014-09-18 15:55 GMT-04:00 Stefan Karpinski ste...@karpinski.org: I'm slightly

Re: [julia-users] Moving/stepen average without loop ? Is posible ?any command ?

2014-09-18 Thread Stefan Karpinski
This seems like a general programming problem rather than a Julia question. On Thu, Sep 18, 2014 at 3:36 PM, Paul Analyst paul.anal...@mail.com wrote: No idea ? W dniu 2014-09-18 o 13:26, paul analyst pisze: I have a vector x = int (randbool (100)) a / how quickly (without the loop?)

Re: [julia-users] Re: Matlab bench in Julia

2014-09-18 Thread Andreas Noack
I knew something was not right. I typed qr, not lu. Hence in that case, MATLAB did pivoting and Julia didn't. Sorry for that. Here are the right timings for lu which are as expected. MKL is slightly faster than OpenBLAS. MATLAB: tic();for i = 1:10 [L,U,p] = lu(A, 'vector'); end;toc()/10 ans =

Re: [julia-users] Matlab bench in Julia

2014-09-18 Thread Milan Bouchet-Valat
Le jeudi 18 septembre 2014 à 15:12 -0400, Andreas Noack a écrit : You are not using a fast BLAS, but the slow reference BLAS which unfortunately is the default on Linux. An option is to build Julia from source. Usually it is just to download the source and write make. Then you'll have Julia

[julia-users] Re: Why does map allocate so much more than a list comprehension?

2014-09-18 Thread Patrick O'Leary
On Thursday, September 18, 2014 2:31:14 PM UTC-5, Johan Sigfrids wrote: So I was looking at allocations in some code and I noticed I sped things up significantly by changing map to a list comprehension. Doing some microbenchmarking I noticed that map allocates far more memory than a list

Re: [julia-users] Matlab bench in Julia

2014-09-18 Thread Andreas Noack
Ok I see. Good to hear that the package uses OpenBLAS. I have replied to a couple of linux users who have complained about the slow linear algebra in Julia. Elliot is probably the right person to answer the question about the linking. Med venlig hilsen Andreas Noack 2014-09-18 16:35 GMT-04:00

[julia-users] Re: LaTeX labels in Winston

2014-09-18 Thread Steven G. Johnson
On Thursday, September 18, 2014 3:55:41 PM UTC-4, Alex wrote: Maybe one could have a look at matplotlib to get an idea how they do this? Matplotlib implemented its own LaTeX parser and renderer (about 3000 lines of code):

Re: [julia-users] Matlab bench in Julia

2014-09-18 Thread Milan Bouchet-Valat
Le jeudi 18 septembre 2014 à 16:44 -0400, Andreas Noack a écrit : Ok I see. Good to hear that the package uses OpenBLAS. I have replied to a couple of linux users who have complained about the slow linear algebra in Julia. What distributions did they use? We should try to improve these

Re: [julia-users] Moving/stepen average without loop ? Is posible ?any command ?

2014-09-18 Thread Douglas Bates
On Thursday, September 18, 2014 2:36:53 PM UTC-5, paul analyst wrote: No idea ? W dniu 2014-09-18 o 13:26, paul analyst pisze: I have a vector x = int (randbool (100)) a / how quickly (without the loop?) receive 10 vectors of length 10, in each field the average of the next 10 fields

Re: [julia-users] Matlab bench in Julia

2014-09-18 Thread Douglas Bates
Part of the problem is the definition of benchmark. If all you are doing is solving a linear system or evaluating a decomposition then you are just benchmarking the BLAS/LAPACK implementation. It doesn't really matter if user-facing language is Matlab or Octave or R or Julia. They are just a

[julia-users] Re: Matlab bench in Julia

2014-09-18 Thread Stephan Buchert
Thanks for the tips. I have now compiled julia on my laptop, and the results are: julia versioninfo() Julia Version 0.3.0+6 Commit 7681878* (2014-08-20 20:43 UTC) Platform Info: System: Linux (x86_64-redhat-linux) CPU: Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz WORD_SIZE: 64 BLAS:

[julia-users] vi mode in julia

2014-09-18 Thread thr
Hello all, somewhere I read that GNU-readline was dropped for parsing user input, because this was implemented in Julia itself. Consequently setting editing-mode to vi doesn't work with Julia. I hate that. Is there a way to use standard readline as command line parser?

[julia-users] Is there a way to use readline as command line interpreter

2014-09-18 Thread thr
Hello all, Somewhere I read that Julia dropped (GNU) readline as command line interpreter and now setting editing mode to vi doesn't work any more. :( I wonder if there is a way to achieve similar behaviour within the Julia command line. Greetings, Johannes

[julia-users] Re: Matlab bench in Julia

2014-09-18 Thread Peter Simon
I have found that I get better performance from some openblas routines by setting the number of blas threads to the number of physical CPU cores (half the number returned by CPU_CORES when hyperthreading is enabled): Base.blas_set_num_threads(div(CPU_CORES,2)) --Peter On Thursday, September

Re: [julia-users] Re: Matlab bench in Julia

2014-09-18 Thread Andreas Noack
As Douglas Bates wrote, these benchmarks mainly measures the speed of the underlying libraries. MATLAB uses MKL from Intel which is often the fastest library. However, the speed of OpenBLAS can be very different on different architectures and sometimes it can be faster than MKL. I just tried the

[julia-users] Compiling julia on Red Hat 4.4.6-4 with gcc 4.4.7

2014-09-18 Thread Alberto Torres Barrán
When trying to compile Julia from source on RHEL 4.4.6 I get the following error: lvm[4]: Compiling Valgrind.cpp for Release build /scratch/gaa/local/src/julia-v0.3.0/deps/llvm-3.3/lib/Support/Valgrind.cpp:20:31: warning: valgrind/valgrind.h: No such file or directory

Re: [julia-users] Why does map allocate so much more than a list comprehension?

2014-09-18 Thread Tim Holy
If you use the FastAnonymous package then they should be much closer: julia using FastAnonymous julia fsin = @anon x-sin(x) ##7954 (constructor with 2 methods) julia fsin(0.3) 0.29552020666133955 julia @time map(fsin, data); elapsed time: 0.285690205 seconds (80324156 bytes allocated) julia

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

2014-09-18 Thread Isaiah Norton
See MEMDEBUG in options.h On Sep 18, 2014 8:28 PM, Erik Schnetter schnet...@gmail.com wrote: I have a Julia application that uses MPI to communicate between several processes. Each process uses many tasks, and they send functions to remote locations to be executed. If I use a large number of

Re: [julia-users] Make a Copy of an Immutable with Specific Fields Changed

2014-09-18 Thread Pontus Stenetorp
On 18 September 2014 18:22, Rafael Fourquet fourquet.raf...@gmail.com wrote: I think the idiomatic way remains to be designed: https://github.com/JuliaLang/julia/issues/5333. Thanks a bundle Rafael, I did indeed miss that issue. There also seems to be a pull-request from @nolta implementing

[julia-users] Is there an inverse of `sparse`?

2014-09-18 Thread DumpsterDoofus
Given column vectors I, J, and V, one can construct a sparse matrix using the following syntax: sparse(I, J, V) How about the reverse? I.e., given a sparse matrix S, is there a function which returns the column vectors I, J, and V that define S? One can obtain the list of nonzero values V

[julia-users] Re: Moving/stepen average without loop ? Is posible ?any command ?

2014-09-18 Thread DumpsterDoofus
I'm not entirely sure what you're looking for, but if you have a long list of data and want to compute a moving average, then it suffices to convolve your data with a box function. The Fourier convolution theorem says that you can do this using Fourier transforms, so if you really want to avoid

Re: [julia-users] Is there an inverse of `sparse`?

2014-09-18 Thread John Myles White
Try findnz. This seems to not be documented in the sparse section of the manual, but I would think it should be. — John On Sep 18, 2014, at 6:58 PM, DumpsterDoofus peter.richter@gmail.com wrote: Given column vectors I, J, and V, one can construct a sparse matrix using the following

[julia-users] Re: ANN: ApproxFun v0.0.3 with general linear PDE solving on rectangles

2014-09-18 Thread DumpsterDoofus
Haha, I remember reading through your paper A fast and well-conditioned spectral method last year and feeling like my head was spinning afterwards. I vaguely recall that it views differential equations in GegenbauerC space, a basis choice which has a bunch of super convenient properties, all

[julia-users] ANN: QuantEcon.jl

2014-09-18 Thread Spencer Lyon
New package QuantEcon.jl https://github.com/QuantEcon/QuantEcon.jl. This package collects code for quantitative economic modeling. It is currently comprised of two main parts: 1. A toolbox of routines useful when doing economics 2. Implementations of types and solution

Re: [julia-users] Is there an inverse of `sparse`?

2014-09-18 Thread DumpsterDoofus
Thanks, that's what I was looking for! I forked a copy of the documentation on my GitHub account and added in the following entry to the sparse matrix section: .. function:: findnz(A) Returns a tuple (I, J, V) containing the column indices, row indices, and nonzero values. The I, J,

Re: [julia-users] Is there an inverse of `sparse`?

2014-09-18 Thread John Myles White
Submit a pull request? One point: I think you may have flipped column indices and row indices in your description. — John On Sep 18, 2014, at 7:45 PM, DumpsterDoofus peter.richter@gmail.com wrote: Thanks, that's what I was looking for! I forked a copy of the documentation on my GitHub

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

2014-09-18 Thread Gray Calhoun
That's very exciting! I can't wait to see the new notes. On Thursday, September 18, 2014 9:14:22 PM UTC-5, Spencer Lyon wrote: New package QuantEcon.jl https://github.com/QuantEcon/QuantEcon.jl. This package collects code for quantitative economic modeling. It is currently comprised of two

[julia-users] Is there a way to use readline as command line interpreter

2014-09-18 Thread Ivar Nesje
Ref: https://github.com/JuliaLang/julia/issues/6774

[julia-users] Is there a way to use readline as command line interpreter

2014-09-18 Thread Ivar Nesje
Ref: https://github.com/JuliaLang/julia/issues/6774

[julia-users] Schurfact ordered eigenvalues

2014-09-18 Thread Chase Coleman
Hi, The function (`?gges`) being called in `schurfact` from LAPACK accepts an argument for sorting the eigenvalues according to a logical/boolean function. I am currently working on some code that would be valuable for me to sort eigenvalues into explosive and nonexplosive (modulus bounded by