Earlier quoted context omitted.
So does: APL, AWK, COBOL, Fortran, Lua, Mathematica, MATLAB, R, Smalltalk, Wolfram Because it is Mathmatics and have 1 be based on 0 makes no sense, you then have to switch between the two and it is easy to make a mistake. This is why I don't use Python and Pandas. I got burnt once and that was enough and switched to R. Sadly we are stuck with 0 based array in programming and due to a historical issue.
0 based arrays is objectively the preferred way for me and not for historical reasons. I write a lot of low level graphics algorithm stuff, and 1-based arrays would complicate index arithmetic. like now with everything 0 based having something like: arr[offset1 * 32 + offset2] would be the following if all my offsets would be 1-based and arrays would be 1-based: arr[(offset1 -1) * 32 + offset2] which is pretty arbitr…
Julia Language Co-Creators Win James H. Wilkinson Prize for Numerical Software
101–110 of 249 posts
Re: Julia Language Co-Creators Win James H. Wilkinson Prize for Numerical Software
#102Earlier quoted context omitted.
> as we do in all other aspects of life You mean like elevators? You may be surprised to learn that elevators in America are 1-indexed (ground floor == floor 1), but in Europe they are 0-indexed (ground floor == floor 0).
As a European I'm not really surprised, but it's not exactly the same thing. It's not like the ground level is considered "the 0th floor" and thus we use 0-based indexing. In most European countries the ground floor is not considered the same thing as the others. As Wikipedia puts it: "In most of Europe, the "first floor" is the first level above ground level". We consider and count as floors the "layers" above the g…
Re: Julia Language Co-Creators Win James H. Wilkinson Prize for Numerical Software
#103If anyone is interested, I was snooping around and found one of the co-creator's PHD thesis that explains in detailed terms some of the ideology behind Julia: https://dspace.mit.edu/handle/1721.1/99811#files-area
For a shorter read with many of the same highlights, this is a paper about the design and implementation of Julia (PDF):
https://julialang.org/publications/julia-fresh-approach-BEKS...
Re: Julia Language Co-Creators Win James H. Wilkinson Prize for Numerical Software
#104Earlier quoted context omitted.
So does: APL, AWK, COBOL, Fortran, Lua, Mathematica, MATLAB, R, Smalltalk, Wolfram Because it is Mathmatics and have 1 be based on 0 makes no sense, you then have to switch between the two and it is easy to make a mistake. This is why I don't use Python and Pandas. I got burnt once and that was enough and switched to R. Sadly we are stuck with 0 based array in programming and due to a historical issue.
For what it's worth mathematics is more than flexible enough to handle both 0 and 1 based indexing. Using 1 based just looks neater since you can count x_1, ..., x_n rather than x_0, ..., x_{n-1}. Sometimes both are used at the same time e.g. if you add an extra coefficient at the start rather than at the end, this happens particularly when dealing with wedge products where the parity of the new index matters. Also i…
There is an interesting note in the Wikipedia page for "Dartmouth BASIC" which says the second edition "also allowed arrays to begin as subscript 0 instead of 1. This was especially useful for representing polynomials."
Re: Julia Language Co-Creators Win James H. Wilkinson Prize for Numerical Software
#105what good is philosophy if you choose arrays based on 1? https://groups.google.com/forum/?hl=en#!topic/julia-dev/tNN7...
Can't reply anymore to flagged-to-death sibling, but wrt "1-based array indexing": I've actually found behaviour of "zero-avoidance" a good battle-tested heuristics to coding. A lot of numeric spaces can be mapped as to be >0 or >0 Arithmetic is much safer without 0.
if you have array [a,b,c,d] array[0] is a which in computer is logical. why? because it stored in memory 'abcd' (forgetting endianness for sake of argument...) and the offset from the base pointer to a is 0. so it makes perfect sense for arrays to start at 0, as there is no offset from the base... there is not 1 item offset from the base :s if you find it confusing i would say learn how computers actually operate instead of arguing from some theoretical frame of mind which has nothing to do with how computers work. a computer isn't mathematics or some arithmetic machine.
just because arithmetic is safer without 0 doesn't mean it's logical for a computer to suddenly have different array indexing. array indexing on a computer has nothing to do with maths. just memory layout and pointers...
#addsfueltofire
Re: Julia Language Co-Creators Win James H. Wilkinson Prize for Numerical Software
#106If anyone is interested, I was snooping around and found one of the co-creator's PHD thesis that explains in detailed terms some of the ideology behind Julia: https://dspace.mit.edu/handle/1721.1/99811#files-area
Can be downloaded here (PDF): https://github.com/JeffBezanson/phdthesis/raw/master/main.pd... For a shorter read with many of the same highlights, this is a paper about the design and implementation of Julia (PDF): https://julialang.org/publications/julia-fresh-approach-BEKS...
Re: Julia Language Co-Creators Win James H. Wilkinson Prize for Numerical Software
#107Earlier quoted context omitted.
I had a job about 7 years ago doing Coldfusion and Flash. Coldfusion is 1 indexed and Actionscript is 0 indexed...this threw me off enough to the point of having a near-religious aversion towards explicit indexing, and while I've largely drunk the functional Kool-aid where I almost exclusively use maps and filters and reduce. I really do with the 1 indexing had stayed around, since I feel like it's more natural to sa…
>> I really do with the 1 indexing had stayed around, since I feel like it's more natural to say the 1st element, instead of the 0th. It's not the 0th element. It is the 1st element and has an offset of 0 from the beginning of the array. Not saying it's better or worse, but that if you change the words you use to describe it, you may find it easier to use. To my surprise, I just learned that ranges in Rust don't incl…
This is why I think the terminology should be "indexed arrays" and "offset arrays" (and variables perhaps even called index/idx/i or offset/ofst/o as appropriate) instead of using the terms "0-indexed" or "1-indexed."
But I have a hard enough time getting out of the habit myself, and some people are going to hate using o as a variable, so....
Re: Julia Language Co-Creators Win James H. Wilkinson Prize for Numerical Software
#108Earlier quoted context omitted.
In a nutshell: it combines the modern language features a CS person expects with the numerical excellence of Matlab. Is it a better language, from a pure CS perspective, than Python/Scheme/pickyourfavorite? No, not really. If your job is writing web pages, Julia will be fine but it won't excel. But if your job is writing trajectory planning routines for robots or climate simulations or so on, you aren't coming from t…
> Is it a better language, from a pure CS perspective, than Python/Scheme/pickyourfavorite? No, not really. Could you be thinking more of a "pure developer perspective" than "pure CS perspective" perhaps? Because if anything I find Julia's type system a lot more interesting from a computer science point of view than Python or Scheme. If I want to get things done, I'd stick to Python for now though due to sheer moment…
Yes, sure. Julia is an interesting language, CS-wise. My only point, inasmuch as I had one, was that there are other languages out there that have those same features.
"If I want to get things done, I'd stick to Python for now though due to sheer momentum."
I tried python, because you're right, it has the momentum and is the obvious first choice for numerical computing after you've had your fill of Matlab. Unfortunately, for a lot of the code I write, speed matters. In large part I'm prototyping my own numerical methods, not totally relying on numpy/scipy. The last time I tried python for numerical code development I ended up with a routine that was two orders of magnitude slower than it needed to be. I rewrote the entire thing in Julia, with little to no effort towards optimizing it, and it was immediately 50x faster than python and within a factor of two of what I needed. I put a couple of days of effort into optimization and I got it down to 2-3x faster than required.
You could argue that I should have gotten better at optimizing python, and maybe you'd be right. I'm no python expert. But in my limited interaction with the python community, the answer to faster python seems to be, at the end of the day, to write the parts of the code you really need to be fast in C and call them with the python FFI. Which is what numpy does, if I understand correctly. Whereas I can write that same code directly in Julia and it's generally fast enough.
For a lot of use cases speed doesn't really matter. But for robotics (my field) or self driving cars or machine vision or a lot of other embedded applications, it does matter.
Re: Julia Language Co-Creators Win James H. Wilkinson Prize for Numerical Software
#109Earlier quoted context omitted.
I thought Tim Holy's Trait Tick was considered the de facto way to use traits in Julia? https://github.com/mauro3/SimpleTraits.jl
Maybe it works great, but the syntax doesn't feel native to me, and I don't see it used in the standard library, which means that it's not embraced by the language developers.