News for hackers. Stuff that matters.
Re:Julia 1.0 by kgwgk on Thursday August 09, 2018 @10:10AM (#17724309)
> the technical reason we started counting arrays at zero is that in the mid-1960’s, you could shave a few cycles off of a program’s compilation time on an IBM 7094. The social reason is that we had to save every cycle we could, because if the job didn’t finish fast it might not finish at all and you never know when you’re getting bumped off the hardware because the President of IBM just called and fuck your thesis, it’s yacht-racing time.

http://exple.tive.org/blarg/2013/10/22/citation-needed/

Re:Julia 1.0 by romwell on Thursday August 09, 2018 @09:10PM (#17729932)
Thanks for the great article.

An unexpected takeaway: Michael Chastain's time-traveling debugging framework, which he had in 1995, and which still reads like sci-fi from the future[1].

Alas, this quote will probably stay relevant for a while:

>[We keep] finding programming constructs, ideas and approaches we call part of “modern” programming if we attempt them at all, sitting abandoned in 45-year-old demo code for dead languages.

[1]http://lwn.net/1999/0121/a/mec.html

Re:Julia 1.0 by ptx on Friday August 10, 2018 @06:23PM (#17737133)
Very strange article. The first part builds suspense for the great truth that's going to be revealed by the author's extensive research, insisting that it's not something as simple as pointer arithmetic.

Then the second parts quotes the creator of BCPL, revealing – a-HA! – what we already knew, that the array is a pointer to the first element and the index is the offset from the pointer, and that's why it's zero.

(And after that it veers of into complaining about how the papers documenting this history cost too much money, so they didn't actually read them.)

Re:Julia 1.0 by peatmoss on Thursday August 09, 2018 @10:15AM (#17724362)
Wow, I hadn’t seen this before. The history of this feud goes back before C. Thank you for a fascinating read!
Re:Julia 1.0 by jandrese on Thursday August 09, 2018 @11:06AM (#17724788)
Re:Julia 1.0 by e12e on Thursday August 09, 2018 @02:19PM (#17726913)
I've always found this a rather weak argument - he even implies that 2...12 is at least as clear (it being the starting point of the text).

I also thought I'd seen a longer text focusing more on the counting/indexing.

I still don't see the appeal of "element at zero offset" vs simply "first element".

I do agree that < vs <= etc can get messy. But outside of now fairly archaic programming languages I don't see the need. Just use a construct that handles ranges, like "for each element in collection/range/etc". (Or for math, "pattern matching" (or "for n in 1..m").

Re:Julia 1.0 by disgruntledphd2 on Thursday August 09, 2018 @03:45PM (#17727791)
I believe that may be cited in the article (but its not in an obvious place :) )
Re:Julia 1.0 by danso on Thursday August 09, 2018 @07:08PM (#17729328)
This was a fantastic (and relevant) read, thank you for sharing it.