[julia-users] suggestions: end statement, indentention, case statement, ...

2014-04-03 Thread klimaheld
Hi Julia users, Maybe you want to support me with my wish list. Here it is: - end statement: remove it (ala python) and use indentation, the code will be shorter and cleaner - case/switch: include it (missing in python) - array indexing: introduce with negative number -1,-2,... (instead of or

Re: [julia-users] suggestions: end statement, indentention, case statement, ...

2014-04-03 Thread Leah Hanson
Hi Friedrich, I'm glad you like Julia. I'll respond briefly to your suggestions; for some of them, I think they've been suggested before on this mailing list with more detailed answers than I've written here. Minor syntax changes between languages can be annoying, but if you use Julia more, you w

Re: [julia-users] suggestions: end statement, indentention, case statement, ...

2014-04-03 Thread Jacob Quinn
Hi Friedrich, Sounds like you like Python! In addition to what Leah said, there is an open issue about adding divmod (and a few related functions). See: https://github.com/JuliaLang/julia/issues/4437 It's usually a good practice to do a few quick searches in the google group/mailing list in addi

Re: [julia-users] suggestions: end statement, indentention, case statement, ...

2014-04-03 Thread klimaheld
Hi Leah, I fully understand that syntax changes are difficult. Nevertheless, I want to encourage to do those, which I think are in the spirit of the Julia philosophy (http://julialang.org/blog/2012/02/why-we-created-julia/): - "we want the language to be simple and clean" Still Julia is a quite

Re: [julia-users] suggestions: end statement, indentention, case statement, ...

2014-04-05 Thread klimaheld
Sorry, the dot makes it not clear, but even more confusing. Actually, ".*" reads like dot (.) product (*). E.g. in Python/Numpy and IDL +,-,*,/ are used for element-wise operation. Moreover, julia> [1 2 3] + [1 2 3] 1x3 Array{Int64,2}: 2 4 6 julia> [1 2 3] * [1 2 3] DimensionMismatch("*") The

Re: [julia-users] suggestions: end statement, indentention, case statement, ...

2014-04-05 Thread Cristóvão Duarte Sousa
Friedrich, Julia does not only use ideas from Python but also from other languages, like Matlab, Lisp, ... (and of course it has it own state of the art, unique and amazing techniques). Since julia aims at technical problems, with lots of linear algebra, it makes some sense to use * for matrix

Re: [julia-users] suggestions: end statement, indentention, case statement, ...

2014-04-06 Thread Mikael Simberg
On Sat, Apr 5, 2014, at 15:45, [1]klimah...@googlemail.com wrote: Sorry, the dot makes it not clear, but even more confusing. Actually, ".*" reads like dot (.) product (*). E.g. in Python/Numpy and IDL +,-,*,/ are used for element-wise operation. Moreover, julia> [1 2 3] + [1 2 3] 1x3 Array

Re: [julia-users] suggestions: end statement, indentention, case statement, ...

2014-04-06 Thread Tony Kelman
Whole-array inequalities between matrices can have context-dependent meanings. For example, you can define a very useful ordering among the set of positive semidefinite symmetric matrices - this is used in constrained optimization (semidefinite programming) since the space of positive semidefin

Re: [julia-users] suggestions: end statement, indentention, case statement, ...

2014-04-07 Thread Toivo Henningsson
I agree that there are just too many different popular definitions of < between vectors/matrices/arrays to just pick one arbitrarily. Also, another reason not to define A < B as elementwise: <, when it is implemented, is expected to correspond to at least a partial order. In particular, it is e

Re: [julia-users] suggestions: end statement, indentention, case statement, ...

2014-04-13 Thread klimaheld
Hi again, Am Sonntag, 6. April 2014 01:33:16 UTC+2 schrieb Cristóvão Duarte Sousa: Since julia aims at technical problems, with lots of linear algebra, it > makes some sense to use * for matrix multiplication (everyday linear > algebra) and use something else (.* borrowed from Matlab) to the le

Re: [julia-users] suggestions: end statement, indentention, case statement, ...

2014-04-13 Thread andrew cooke
On Sunday, 13 April 2014 19:18:31 UTC-3, klim...@googlemail.com wrote: > > (Also note that division does not look like the inverse operation of > multiplication, since e.g. A=[1 2 3]; B=[1, 2, 4]; A*B/B == A returns > false.) > what would you expect to happen here? you're taking a scalar pro

Re: [julia-users] suggestions: end statement, indentention, case statement, ...

2014-04-13 Thread klimaheld
Sure. This was just a side note. I would expect that a "notation" A*B/B == A to be always true (except for division by zero of course), since division the inverse process of multiplication, like for scalar values (a*b/b == a or A.*B./B .== A). Am Montag, 14. April 2014 00:38:57 UTC+2 schrieb

Re: [julia-users] suggestions: end statement, indentention, case statement, ...

2014-04-13 Thread Stefan Karpinski
On Sun, Apr 13, 2014 at 6:18 PM, wrote: > Am Freitag, 4. April 2014 00:45:37 UTC+2 schrieb klim...@googlemail.com:Hi >> Julia users, >> >> - array indexing: introduce with negative number -1,-2,... (instead of or >> additionally to end, end-1) >> > No comments on that? > > Negative indexing is a

Re: [julia-users] suggestions: end statement, indentention, case statement, ...

2014-04-13 Thread Stefan Karpinski
Multiplication is not generally invertible. This is true of real numbers at zero and true of floating-point numbers at many non-zero values. For vectors and matrices, multiplication is highly non-invertible. Given this feature of reality, I'm not sure what else we can do. On Sun, Apr 13, 2014 at

Re: [julia-users] suggestions: end statement, indentention, case statement, ...

2014-04-14 Thread Tony Kelman
This conversation is reminding me of a post from John D Cook a couple years ago (www.johndcook.com/blog/2012/04/02/why-scipy/) where he said he would "rather do math in a general-purpose language than try to do general-purpose programming in a math language." He has a point, for example interfa