News for hackers. Stuff that matters.
Re:Comparing Performance of Julia on CPUs vs. GPUs and Julia... by jppittma on Friday January 05, 2024 @09:30PM (#38887752)
If only they didn’t chose 1 based array indexing, like matlab. Having worked with matlab and for that reason I can’t seem to take them seriously.
Re:Comparing Performance of Julia on CPUs vs. GPUs and Julia... by baggepinnen on Saturday January 06, 2024 @01:23AM (#38888987)
But you can take Fortran seriously?
Re:Comparing Performance of Julia on CPUs vs. GPUs and Julia... by pjmlp on Saturday January 06, 2024 @03:09AM (#38889522)
Plenty of serious languages have either 1 based indexing, or allow the flexibility to set lower boundary explicitly.
Re:Comparing Performance of Julia on CPUs vs. GPUs and Julia... by marmalade2413 on Saturday January 06, 2024 @08:20AM (#38891209)
The choice of 1 based array indexing is due to Julia having it's roots in mathematics - which is a common choice for mathematics based programming languages (e.g. Fortran, Julia, MATLAB/GNU Octave, Mathematica, R and Wolfram). The reason being is that matrix notation starts at 1 and not 0.

For a comparison on array indexing in different programming languages see here: https://en.wikipedia.org/wiki/Comparison_of_programming_lang...

From personal experience, I wouldn't let something as simple as starting index getting in the way of programming for a language as you'll soon start automatically switching to thinking in 1 based and 0 based indexing depending on the programming language.

Re:Comparing Performance of Julia on CPUs vs. GPUs and Julia... by amj7e on Sunday January 07, 2024 @01:35PM (#38903802)
If you think 0 or 1 based indexing will hinder your ability to write a program, it's not the indexing, it's a skill issue.