News for hackers. Stuff that matters.
Re:PyTorch: Where we are headed and why it looks a lot like ... by freemint on Saturday November 27, 2021 @07:31AM (#29359678)
You can turn any 1 based array into a 0 based array using a wrapper type that just gets inlined away.

Also have a look at https://github.com/giordano/StarWarsArrays.jl

Re:PyTorch: Where we are headed and why it looks a lot like ... by cookieater on Saturday November 27, 2021 @10:37AM (#29360933)
Mose Giordano hit the nail on the head with this one. Who cares about 1 vs 0 based indices? If anything its a silly and minor design decision.

I worry about someones ability to solve real problems in any language if they can't get their head around an +1/-1 when indexing into an array.

Re:PyTorch: Where we are headed and why it looks a lot like ... by hpcjoe on Saturday November 27, 2021 @04:11PM (#29363553)
> I worry about someones ability to solve real problems in any language if they can't get their head around an +1/-1 when indexing into an array.

This. Think about what this signals to employers and interviewers if someone throws a hissyfit over this.