[julia-users] Re: How do I print the name of the passed argument in a macro when it is an anonymous function

2015-01-24 Thread Kirill Ignatiev
On Saturday, 24 January 2015 02:22:20 UTC-5, Ivar Nesje wrote: > > No, using eval inside a macro is (almost) never what you want. > > A macro is a function that transform one expression to another expression. > You should return an expression that print the string version of the input, > not pri

[julia-users] Are there macros that expand to file name, function name and line numbers like in C?

2015-01-24 Thread Ivar Nesje
There is http://docs.julialang.org/en/latest/stdlib/file/?highlight=file#Base.@__FILE__, but the others are not yet implemented.

Re: [julia-users] Re: How do I print the name of the passed argument in a macro when it is an anonymous function

2015-01-24 Thread Jameson Nash
Using eval in a macro tends to indicate you are using the wrong tool for the job. If you want to deal with an object (such as a function reference), then use a function. On Sat Jan 24 2015 at 3:15:43 AM Kirill Ignatiev wrote: > On Saturday, 24 January 2015 02:22:20 UTC-5, Ivar Nesje wrote: >> >>

Re: [julia-users] Re: workflow recommendation/tutorial

2015-01-24 Thread Tracy Wadleigh
One extra trick I like: I put * isfile("_init.jl") && require("_init.jl")* in my .juliarc.jl file. Then I just put a _init.jl file with the repetitive initialization stuff in my working directory for my project. It really only saves a couple of keystrokes when restarting the REPL, but I find en

[julia-users] PASC15 in Zurich, Switzerland June 1-3

2015-01-24 Thread Lars Ruthotto
Hi everybody, I am planning to attend PASC 15 in Zurich this year and am organizing a mini symposium about Julia and large-scale applications that use Julia. Is anybody interested in giving a talk? So far, I have three talks (including myself) on geophysical inverse problems, PDE constrained op

Re: [julia-users] Re: Progress of 0.4-projects ?

2015-01-24 Thread Tobias Knopp
Hi Tony, well I do not demand a feature freeze. But my opinion is that we should have a more defined release cycle. I once had proposed 6 month dev cycle and 3 month stabilizing. Currently its pretty much unpredictable when 0.4 lands. Cheers, Tobi Am Freitag, 23. Januar 2015 20:36:30 UTC+1 s

Re: [julia-users] Re: workflow recommendation/tutorial

2015-01-24 Thread Viral Shah
How about in the FAQ and also in the manual? I will get to it next week, if someone doesn't beat me to it. -viral On Wed, Jan 21, 2015 at 5:58 PM, Tim Holy wrote: > Sure, want to add it to the FAQ? > > --Tim > > On Tuesday, January 20, 2015 08:27:06 PM Viral Shah wrote: > > Should we capture th

Re: [julia-users] Ways to avoid programmer mistakes with array broadcasting

2015-01-24 Thread Milan Bouchet-Valat
The post wasn't about this, but I must say I love to see support for Cox models coming to Julia! Regards Le vendredi 23 janvier 2015 à 14:37 -0800, Ben Kuhn a écrit : > Hi Julia folks, > > > Trying to get a feel for Julia, I decided to write a basic Cox > proportional hazards model. While I wa

Re: [julia-users] Why are macro's arguments treated as tuples despite having no parentheses around them?

2015-01-24 Thread Erik Schnetter
On Jan 24, 2015, at 2:53 , Ivar Nesje wrote: > > See also > > @test(1, 2, 3, 4) ... and compare this to @test (1, 2, 3, 4) (with white space before the parenthesis). That's a part of Julia's syntax that I don't like. On the other hand, the ability to pass whitespace-separated arguments to m

Re: [julia-users] Re: Progress of 0.4-projects ?

2015-01-24 Thread Stefan Karpinski
Tobias, that is exactly the plan. On Sat, Jan 24, 2015 at 9:29 AM, Tobias Knopp wrote: > Hi Tony, > > well I do not demand a feature freeze. But my opinion is that we should > have a more defined release cycle. I once had proposed 6 month dev cycle > and 3 month stabilizing. Currently its pretty

Re: [julia-users] Re: workflow recommendation/tutorial

2015-01-24 Thread Tracy Wadleigh
I created a pull request to get this process started. I'm hoping everybody chips in to share their hard-earned wisdom. On Sat, Jan 24, 2015 at 9:47 AM, Viral Shah wrote: > How about in the FAQ and also in the manual? I will get to it next week, >

Re: [julia-users] Why are macro's arguments treated as tuples despite having no parentheses around them?

2015-01-24 Thread Ivar Nesje
See also #7232 where the suggestion is to disallow space before the parenthesis in function definitions and function calls. That will at least make julia code more consistent in that functions and macros work more similarly. lørdag 24. januar 201

Re: [julia-users] Why are macro's arguments treated as tuples despite having no parentheses around them?

2015-01-24 Thread Erik Schnetter
... and then we can also allow functions calls with white-space syntax? y = sqrt x -erik > On Jan 24, 2015, at 15:48 , Ivar Nesje wrote: > > See also #7232 where the suggestion is to disallow space before the > parenthesis in function definitions and function calls. That will at least > make

Re: [julia-users] Ways to avoid programmer mistakes with array broadcasting

2015-01-24 Thread Ben Kuhn
On Saturday, January 24, 2015 at 7:24:32 AM UTC-8, Milan Bouchet-Valat wrote: > > The post wasn't about this, but I must say I love to see support for Cox > models coming to Julia! > Thanks! Although it's only in the very loosest possible sense of "support"... though if people are actually int

Re: [julia-users] Re: Progress of 0.4-projects ?

2015-01-24 Thread Tobias Knopp
Thanks Stefan, this is great! So this would mean a feature freeze by end of February and a release at the end of May. In my opinion package precompilation is one "must have" for 0.4. Hopefully this is doable in that time frame. Because Uwe explicitly asked about field overloading: This had no

[julia-users] Re: What is the syntax for quoting a symbol inside a quote?

2015-01-24 Thread Peter Brady
I'm not 100% sure I understand what you want to do but QuoteNode might be what you are looking for (the capitalization may be wrong). On Friday, January 23, 2015 at 10:40:30 PM UTC-7, Kirill Ignatiev wrote: > > Sorry, forgot to add: it seems the gensym doesn't survive a function > definition: >

Re: [julia-users] Re: RFC Display of markdown sections in terminal

2015-01-24 Thread andy hayden
One last question, holding back merging this, is behaviour of multiline sections, see https://github.com/JuliaLang/julia/pull/9853#discussion_r23497681 Currently the PR underlines to match the length of the last line. Another option is to do 1/2 or 2/3 of the screen. Perhaps there's a better on

[julia-users] Is there an equivalent sort functionality to the matlab option [B,I] = sort(___)

2015-01-24 Thread samuel . huberman
See the sort functionality in Matlab; the fourth usage case [B,I] = sort(___ ) http://www.mathworks.com/help/matlab/ref/sort.html#bt83dd_-1 Is there a julia version or julia way?

[julia-users] Re: Google Summer of Code: Your Project Suggestions

2015-01-24 Thread Robert Gates
I second the need for PetSc :) I think GLPlot's pretty good at 3D plotting btw. On Friday, January 23, 2015 at 8:21:27 AM UTC+1, anonymousnoobie wrote: > > ability to rotate and manipulate 3D plots would be nice > > On Tuesday, January 20, 2015 at 8:38:42 AM UTC-8, cormu...@mac.com wrote: >> >> J

[julia-users] Re: What is the syntax for quoting a symbol inside a quote?

2015-01-24 Thread Kirill Ignatiev
On Saturday, 24 January 2015 17:17:47 UTC-5, Peter Brady wrote: > > I'm not 100% sure I understand what you want to do but QuoteNode might be > what you are looking for (the capitalization may be wrong). > Informally, I'm trying to make @gensym var quote isdefined($var) end work. I found this w

[julia-users] Re: Is there an equivalent sort functionality to the matlab option [B,I] = sort(___)

2015-01-24 Thread Kirill Ignatiev
On Saturday, 24 January 2015 19:00:14 UTC-5, samuel@gmail.com wrote: > > See the sort functionality in Matlab; the fourth usage case [B,I] = sort( > ___) > > http://www.mathworks.com/help/matlab/ref/sort.html#bt83dd_-1 > > Is there a julia version or julia way? > sortperm seems to do approxima

[julia-users] Re: Is there an equivalent sort functionality to the matlab option [B,I] = sort(___)

2015-01-24 Thread Kirill Ignatiev
On Saturday, 24 January 2015 19:00:14 UTC-5, samuel@gmail.com wrote: > > See the sort functionality in Matlab; the fourth usage case [B,I] = sort( > ___) > > http://www.mathworks.com/help/matlab/ref/sort.html#bt83dd_-1 > > Is there a julia version or julia way? > sortperm seems to do approxi

Re: [julia-users] Why are macro's arguments treated as tuples despite having no parentheses around them?

2015-01-24 Thread elextr
On Sunday, January 25, 2015 at 6:50:31 AM UTC+10, Erik Schnetter wrote: > > ... and then we can also allow functions calls with white-space syntax? > > y = sqrt x > Adds more ambiguities though, is sqrt x+y sqrt(x)+y or sqrt(x+y) ? Cheers Lex > > -erik > > > On Jan 24, 2015, at 15:48 , Iv

[julia-users] Re: Is there an equivalent sort functionality to the matlab option [B,I] = sort(___)

2015-01-24 Thread samuel . huberman
Anything that will sort matrices? Maybe I'm not asking the right question: I want to sort some eigenvalues, and keep the eigenvectors mapped accordingly. On Saturday, January 24, 2015 at 7:34:08 PM UTC-5, Kirill Ignatiev wrote: > > > > On Saturday, 24 January 2015 19:00:14 UTC-5, samuel@gmai

Re: [julia-users] Re: Is there an equivalent sort functionality to the matlab option [B,I] = sort(___)

2015-01-24 Thread Andreas Noack
Use p = sortperm(values) values = values[p] vectors = vectors[:,p] but the values should already be sorted by the solver if your problem is Hermitian. 2015-01-24 19:55 GMT-05:00 : > Anything that will sort matrices? Maybe I'm not asking the right question: > I want to sort some eigenvalues, and

[julia-users] Julia-Mode vs ESS-Mode

2015-01-24 Thread Christoph Ortner
I have mostly been using the standard Julia mode until now, but I am thinking of switching to ESS-mode. This has some obvious advantages, but I cannot insert unicode symbols from latex anymore. I thought I'd notice other things, but nothing else so far that really bugged me. * Has anybody f

Re: [julia-users] Julia-Mode vs ESS-Mode

2015-01-24 Thread Ista Zahn
For Unicode input see https://github.com/vspinu/company-math. It works well for me (and not just in julia-mode). Best, Ista On Jan 24, 2015 8:50 PM, "Christoph Ortner" wrote: > > > I have mostly been using the standard Julia mode until now, but I am > thinking of switching to ESS-mode. This has

Re: [julia-users] Why are macro's arguments treated as tuples despite having no parentheses around them?

2015-01-24 Thread Erik Schnetter
On Jan 24, 2015, at 19:45 , ele...@gmail.com wrote: > > On Sunday, January 25, 2015 at 6:50:31 AM UTC+10, Erik Schnetter wrote: > ... and then we can also allow functions calls with white-space syntax? > > y = sqrt x > > Adds more ambiguities though, is sqrt x+y sqrt(x)+y or sqrt(x+y) ? No it d