Feb 11, 2023 4:15 PM
repsac
84083
900
26
twitter
foreigntrolldetector
*MATLAB noises*
giraffpappa
She's coding in Pascal. I get it.
seenunseen
qPRdxH4UXm36HS9rJgLA
captainnewbi
Matlab agrees
NomeAK
Option base 1
dixxienormus
She's easily pleased.
BlindGardener
Off by 1 count error
torquedsk
zero based array?
CptCaboose
Hey, in VBA, arrays are zero based, while collections are one based...
Immgoohr
Well, he might be programming in LUA and thus romantic.
tomojeimie
Or Matlab...*shudders*.
aintaer
In C, where "arrays" are just a pointer to a block of memory, you advance the pointer by steps to access elements. Hence 0 steps is first.
This convention persisted in every subsequent C-like language
pleurniecherie
she might be Julia
dmd3eorg
Maybe she’s a Matlab user
dogVoter
Haha..what?..haha
arthurvanhoudt
Depends on the programming language though! Some start at 1 some at 0
ThatDudeRich
Keep it up and she might become NULL
pip1
!
IknowWhoYouAre
Only if she is a pointer, better make her a reference to be sure though.
AladdinSarsippiusSulemanagicJacksontheThird
Or Undefined.
WhatzitTooya
Careful now, you gonna end up with a dangling pointer.
VikingHobbit
amp99
Pheehelm
Smayds
hunter2
Trelis
The programming language will often decide that, not the programmer.
Yes, but who wrote the languages? ;) https://en.wikipedia.org/wiki/Comparison_of_programming_languages_(array)#Array_dimensions
O4180170069
bash?
Hulser
*array in ascending order by priority
Dear downvoter: You don’t actually think an array is necessarily in any specific order, do you?
Awmph
for you friends, [1] is the second item in an array. The first being [0]
narwhalsalesman
Thanks for explaining this to me. You’re the real MVP.
Mithi
A programming chat-friend once wrote: "I really would like to have an F0-key on my keyboard." :-D
NotoriousDoubleDipper
He’s a vba programmer
CrunchBangPopFizz
#Matlab #Lua - ordinal vs. offset
(and fortran... fogetaboudit)
ModusPonens
For this reason, especially when I talk to students, I refer to items 0–3 as the zeroth, oneth, twoth, and threeth elements.
procax
Way to give the joke away
his wife assured me she doesn't visit imgur
Wusl0n
Unless youre on Matlab. Fuck Matlab
thatackwardguythatnevertalks
I was looking for this comment....XD
TanithRosenbaum
Depends on the language. In most C-descendant languages that is true. But for instance in Fortran it isn't, indices start at 1 there.
ZackWester
isn´t there one where you when you delcare the array if 0 or 1 is the start?
JetsterDajet
You save this for if she ever figures it out. Babe, my metaphorical code life is actually one-based-indexed!
MathiasTolerain
Unless you’re programming in R. Then the first row is 1 - sensible, there is no 0th data point. Under the hood, the 0th might be col names.
UmAcshually
It might be sensible, but 0-index is convenient. It's the amount of offset from the start of the array. Of course it's more convenient the >
IFuckingLovePaintJobs
How is it more sensible it's 2^0 -> 2^1 etc. in binary as well. Changing it to 1 is absolute lunacy. Java SB fs web dev though so I'm a .
lower your abstraction level is (the memory location for item is [start_of_array]+[index*space_single_item_takes]) and largely a leftover >
from older times. But when iterating an array you are as likely to need the "number of previously completed iterations" as the alternative.
Same in Fortran. Both R and Fortran have been made for Data/Math while C is for general systems programming, where index 0 makes sense.
Higure
R is built on top of Fortran. Same with MATLAB. So those aren't independent instances of this decision.
And as a mathematician, zero indexing makes sense a lot of the time. So the math background is not really a good argument.
MufinMcFlufin
For many but not all programming languages.
yuikol14
You're THAT guy at the party
Shaking my head at Lua
florpglorp
And MATLAB
And maxscript (3ds Max)
FishAreSUS
Also, elementat vs inserts, vs array.length, not even consistant in own languages. Still funny as hell. Only 10 types of PPL, 1 will get it
GrosseChung
For the ones that matter
MornieAlantie
And also cobol. Your bank account (likely) appreciates cobol
aslum
For the [0]s that matter.
Fortran, MATLAB and R are somewhat important.
gvnwst
"somewhat" fortran underlies a huge amount of computational software distributions (including matlab), matlab rules programming for R&D
Orangeracecar
Cobol
Targe0
Clearly not to Sslvek Parenica.
Sure. But mattering to him and mattering, period, are two very different things.
throwaway12345432
Not to me.
Almost no programming languages are important to you. How many are you actively using? 2? 3?
zebrains
I feel like these are all just about as antiquated as they get. Index zero is very important for a lot of base level math.
People still write in C. Antiquated does not mean anything.
foreigntrolldetector
*MATLAB noises*
giraffpappa
She's coding in Pascal. I get it.
seenunseen
qPRdxH4UXm36HS9rJgLA
captainnewbi
Matlab agrees
NomeAK
Option base 1
dixxienormus
She's easily pleased.
BlindGardener
Off by 1 count error
torquedsk
zero based array?
CptCaboose
Hey, in VBA, arrays are zero based, while collections are one based...
Immgoohr
Well, he might be programming in LUA and thus romantic.
tomojeimie
Or Matlab...*shudders*.
aintaer
In C, where "arrays" are just a pointer to a block of memory, you advance the pointer by steps to access elements. Hence 0 steps is first.
aintaer
This convention persisted in every subsequent C-like language
pleurniecherie
she might be Julia
dmd3eorg
Maybe she’s a Matlab user
dogVoter
Haha..what?..haha
arthurvanhoudt
Depends on the programming language though! Some start at 1 some at 0
ThatDudeRich
Keep it up and she might become NULL
pip1
!
IknowWhoYouAre
Only if she is a pointer, better make her a reference to be sure though.
AladdinSarsippiusSulemanagicJacksontheThird
Or Undefined.
WhatzitTooya
Careful now, you gonna end up with a dangling pointer.
VikingHobbit
amp99
Pheehelm
Smayds
hunter2
amp99
Trelis
The programming language will often decide that, not the programmer.
amp99
Yes, but who wrote the languages? ;) https://en.wikipedia.org/wiki/Comparison_of_programming_languages_(array)#Array_dimensions
O4180170069
bash?
amp99
Hulser
*array in ascending order by priority
Hulser
Dear downvoter: You don’t actually think an array is necessarily in any specific order, do you?
Awmph
for you friends, [1] is the second item in an array. The first being [0]
narwhalsalesman
Thanks for explaining this to me. You’re the real MVP.
Mithi
A programming chat-friend once wrote: "I really would like to have an F0-key on my keyboard." :-D
NotoriousDoubleDipper
He’s a vba programmer
CrunchBangPopFizz
#Matlab #Lua - ordinal vs. offset
CrunchBangPopFizz
(and fortran... fogetaboudit)
ModusPonens
For this reason, especially when I talk to students, I refer to items 0–3 as the zeroth, oneth, twoth, and threeth elements.
procax
Way to give the joke away
Awmph
his wife assured me she doesn't visit imgur
Wusl0n
Unless youre on Matlab. Fuck Matlab
thatackwardguythatnevertalks
I was looking for this comment....XD
TanithRosenbaum
Depends on the language. In most C-descendant languages that is true. But for instance in Fortran it isn't, indices start at 1 there.
ZackWester
isn´t there one where you when you delcare the array if 0 or 1 is the start?
JetsterDajet
You save this for if she ever figures it out. Babe, my metaphorical code life is actually one-based-indexed!
MathiasTolerain
Unless you’re programming in R. Then the first row is 1 - sensible, there is no 0th data point. Under the hood, the 0th might be col names.
UmAcshually
It might be sensible, but 0-index is convenient. It's the amount of offset from the start of the array. Of course it's more convenient the >
IFuckingLovePaintJobs
How is it more sensible it's 2^0 -> 2^1 etc. in binary as well. Changing it to 1 is absolute lunacy. Java SB fs web dev though so I'm a .
UmAcshually
lower your abstraction level is (the memory location for item is [start_of_array]+[index*space_single_item_takes]) and largely a leftover >
UmAcshually
from older times. But when iterating an array you are as likely to need the "number of previously completed iterations" as the alternative.
TanithRosenbaum
Same in Fortran. Both R and Fortran have been made for Data/Math while C is for general systems programming, where index 0 makes sense.
Higure
R is built on top of Fortran. Same with MATLAB. So those aren't independent instances of this decision.
Higure
And as a mathematician, zero indexing makes sense a lot of the time. So the math background is not really a good argument.
MufinMcFlufin
For many but not all programming languages.
yuikol14
You're THAT guy at the party
ModusPonens
Shaking my head at Lua
florpglorp
And MATLAB
repsac
And maxscript (3ds Max)
FishAreSUS
Also, elementat vs inserts, vs array.length, not even consistant in own languages. Still funny as hell. Only 10 types of PPL, 1 will get it
GrosseChung
For the ones that matter
MornieAlantie
And also cobol. Your bank account (likely) appreciates cobol
aslum
For the [0]s that matter.
Higure
Fortran, MATLAB and R are somewhat important.
gvnwst
"somewhat" fortran underlies a huge amount of computational software distributions (including matlab), matlab rules programming for R&D
Orangeracecar
Cobol
Orangeracecar
Cobol
Targe0
Clearly not to Sslvek Parenica.
Higure
Sure. But mattering to him and mattering, period, are two very different things.
throwaway12345432
Not to me.
Higure
Almost no programming languages are important to you. How many are you actively using? 2? 3?
zebrains
I feel like these are all just about as antiquated as they get. Index zero is very important for a lot of base level math.
Higure
People still write in C. Antiquated does not mean anything.