Re: Roberto Interview

jure bagic <[email protected]> Tue, 4 Aug 2026 12:17:37 +0200
Newsgroups gmane.comp.lang.lua.general
Message-ID <CAOmpovqDGp+O-NrBrhvjaXtKbtBjtgbre1-ibgaCLA84MsC=Bw@mail.gmail.com>
--000000000000b5c012065835f74a
Content-Type: text/plain; charset="UTF-8"

Right, even simpler, how can "first" element index be "zero".

In C there is no indexing or actual arrays with elements, it is just a
block of memory and "indexing" is syntax sugar for pointer arithmetics. For
C the index means the offset in a particular direction from the pointer
(and the eventual dereference); here 0 as index is necessity not a feature.

In languages such as Lua, indexing is an actual instruction, supported by
specific set of objects. However, everything copied C and so programmers
expect 0 as the "first" element.

I am also guilty of this, my scripting language has lists and the first
element is at index 0, oopsie. Not only this, because the language is based
off of Lua, in the C API interface the first stack value is also at index
0, hehe (subject to change).

-- Jure

On Tue, Aug 4, 2026, 11:35 Luau Project <[email protected]> wrote:

> Indeed. I am a mathematician and it would make more sense to me due how
> natural numbers are conceptually constructed in set theory.
>
> Little comment: without going in too much details, in set theory, we have
> 0 = the empty set, 1 = { 0 }, 2 = { 0, 1 }, 3 = { 0, 1, 2 } and so on.
>
> However, when I first saw 0-based indexing in languages derived from C
> years ago, I felt really intimidated. After years dealing with memory, it
> starts to make sense, but like Roberto said, it is unnatural for people out
> of the computer science umbrella.
>
> Em ter., 4 de ago. de 2026, 06:16, jure bagic <[email protected]>
> escreveu:
>
>> Banger, the 1-indexing crashout was legendary but also valid.
>>
>> -- Jure
>>
>> On Tue, Aug 4, 2026, 04:29 David Sicilia <[email protected]> wrote:
>>
>>> Title: "Creator of Lua: Scripting, Programming Languages, Predictions |
>>> Roberto Ierusalimschy"
>>> Host: Ryan Peterman
>>>
>>> https://www.youtube.com/watch?v=jCZnFKk6M9A
>>>
>>> (I'm not affiliated with the channel, just putting it out there)
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "lua-l" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion visit
>>> https://groups.google.com/d/msgid/lua-l/CAGW0ud1EKoxDfsoTcVkYxovogjaMfr%2BV5DBG%2BGp4K8asVNyWbg%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/lua-l/CAGW0ud1EKoxDfsoTcVkYxovogjaMfr%2BV5DBG%2BGp4K8asVNyWbg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "lua-l" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion visit
>> https://groups.google.com/d/msgid/lua-l/CAOmpovojRMzhY0w1qyWUhQR6n8ciCgsiJdq%3DjX3aezz86tupAg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/lua-l/CAOmpovojRMzhY0w1qyWUhQR6n8ciCgsiJdq%3DjX3aezz86tupAg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "lua-l" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion visit
> https://groups.google.com/d/msgid/lua-l/CAL--n410vsMUAFGJTkXJtJdp2_3-sW8ezCW%3D9KYfkFn%2Bf5Yv4A%40mail.gmail.com
> <https://groups.google.com/d/msgid/lua-l/CAL--n410vsMUAFGJTkXJtJdp2_3-sW8ezCW%3D9KYfkFn%2Bf5Yv4A%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups "lua-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/lua-l/CAOmpovqDGp%2BO-NrBrhvjaXtKbtBjtgbre1-ibgaCLA84MsC%3DBw%40mail.gmail.com.

--000000000000b5c012065835f74a
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto">Right, even simpler, how can &quot;first&quot; element in=
dex be &quot;zero&quot;.<div dir=3D"auto"><br></div><div dir=3D"auto">In C =
there is no indexing or actual arrays with elements, it is just a block of =
memory and &quot;indexing&quot; is syntax sugar for pointer arithmetics. Fo=
r C the index means the offset in a particular direction from the pointer (=
and the eventual dereference); here 0 as index is necessity not a feature.<=
/div><div dir=3D"auto"><br></div><div dir=3D"auto">In languages such as Lua=
, indexing is an actual instruction, supported by specific set of objects. =
However, everything copied C and so programmers expect 0 as the &quot;first=
&quot; element.</div><div dir=3D"auto"><br></div><div dir=3D"auto">I am als=
o guilty of this, my scripting language has lists and the first element is =
at index 0, oopsie. Not only this, because the language is based off of Lua=
, in the C API interface the first stack value is also at index 0, hehe (su=
bject to change).</div><div dir=3D"auto"><br></div><div dir=3D"auto">-- Jur=
e</div></div><br><div class=3D"gmail_quote gmail_quote_container"><div dir=
=3D"ltr" class=3D"gmail_attr">On Tue, Aug 4, 2026, 11:35 Luau Project &lt;<=
a href=3D"mailto:[email protected]">[email protected]</a>&gt; wro=
te:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;b=
order-left:1px #ccc solid;padding-left:1ex"><div dir=3D"auto">Indeed. I am =
a mathematician and it would make more sense to me due how natural numbers =
are conceptually constructed in set theory.<div dir=3D"auto"><br></div><div=
 dir=3D"auto">Little comment: without going in too much details, in set the=
ory, we have 0 =3D the empty set, 1 =3D { 0 }, 2 =3D { 0, 1 }, 3 =3D { 0, 1=
, 2 } and so on.</div><div dir=3D"auto"><br></div><div dir=3D"auto">However=
, when I first saw 0-based indexing in languages derived from C years ago, =
I felt really intimidated. After years dealing with memory, it starts to ma=
ke sense, but like Roberto said, it is unnatural for people out of the comp=
uter science umbrella.</div></div><br><div class=3D"gmail_quote"><div dir=
=3D"ltr" class=3D"gmail_attr">Em ter., 4 de ago. de 2026, 06:16, jure bagic=
 &lt;<a href=3D"mailto:[email protected]" target=3D"_blank" rel=3D"nore=
ferrer">[email protected]</a>&gt; escreveu:<br></div><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex"><div dir=3D"auto">Banger, the 1-indexing crashout was legenda=
ry but also valid.<div dir=3D"auto"><br></div><div dir=3D"auto">-- Jure</di=
v></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr=
">On Tue, Aug 4, 2026, 04:29 David Sicilia &lt;<a href=3D"mailto:dpsicilia@=
gmail.com" rel=3D"noreferrer noreferrer" target=3D"_blank">dpsicilia@gmail.=
com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"marg=
in:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"=
>Title: &quot;Creator of Lua: Scripting, Programming Languages, Predictions=
 | Roberto Ierusalimschy&quot;<br>Host: Ryan Peterman<br><br><a href=3D"htt=
ps://www.youtube.com/watch?v=3DjCZnFKk6M9A" rel=3D"noreferrer noreferrer no=
referrer" target=3D"_blank">https://www.youtube.com/watch?v=3DjCZnFKk6M9A</=
a><br><br>(I&#39;m not affiliated with=C2=A0the channel, just putting it ou=
t there)</div>

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;lua-l&quot; group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]" rel=3D"norefe=
rrer noreferrer noreferrer" target=3D"_blank">lua-l+unsubscribe@googlegroup=
s.com</a>.<br>
To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/=
lua-l/CAGW0ud1EKoxDfsoTcVkYxovogjaMfr%2BV5DBG%2BGp4K8asVNyWbg%40mail.gmail.=
com?utm_medium=3Demail&amp;utm_source=3Dfooter" rel=3D"noreferrer noreferre=
r noreferrer" target=3D"_blank">https://groups.google.com/d/msgid/lua-l/CAG=
W0ud1EKoxDfsoTcVkYxovogjaMfr%2BV5DBG%2BGp4K8asVNyWbg%40mail.gmail.com</a>.<=
br>
</blockquote></div>

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;lua-l&quot; group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]" rel=3D"norefe=
rrer noreferrer" target=3D"_blank">[email protected]</a>.<=
br>
To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/=
lua-l/CAOmpovojRMzhY0w1qyWUhQR6n8ciCgsiJdq%3DjX3aezz86tupAg%40mail.gmail.co=
m?utm_medium=3Demail&amp;utm_source=3Dfooter" rel=3D"noreferrer noreferrer"=
 target=3D"_blank">https://groups.google.com/d/msgid/lua-l/CAOmpovojRMzhY0w=
1qyWUhQR6n8ciCgsiJdq%3DjX3aezz86tupAg%40mail.gmail.com</a>.<br>
</blockquote></div>

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;lua-l&quot; group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]" target=3D"_bl=
ank" rel=3D"noreferrer">[email protected]</a>.<br>
To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/=
lua-l/CAL--n410vsMUAFGJTkXJtJdp2_3-sW8ezCW%3D9KYfkFn%2Bf5Yv4A%40mail.gmail.=
com?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank" rel=3D"no=
referrer">https://groups.google.com/d/msgid/lua-l/CAL--n410vsMUAFGJTkXJtJdp=
2_3-sW8ezCW%3D9KYfkFn%2Bf5Yv4A%40mail.gmail.com</a>.<br>
</blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;lua-l&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]">lua-l+unsubsc=
[email protected]</a>.<br />
To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/=
lua-l/CAOmpovqDGp%2BO-NrBrhvjaXtKbtBjtgbre1-ibgaCLA84MsC%3DBw%40mail.gmail.=
com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msg=
id/lua-l/CAOmpovqDGp%2BO-NrBrhvjaXtKbtBjtgbre1-ibgaCLA84MsC%3DBw%40mail.gma=
il.com</a>.<br />

--000000000000b5c012065835f74a--