THE CYBERIX NETWORK

The sophisticated man's creative playground

this forum is only for serious quad damage discussion if you discuss any other powerup in this forum then you have shitty taste in powerups

Lua-related technology

SHARE · Back to threads · Report thread

Anonymous · original post · 2026-07-19 17:20:01

>>25453
It's actually not even 1-based indexing. Because Lua doesn't actually have arrays.
It only has bool/string/number primitives, an associate hashmap object that it calls a 'table,' and a hacky add-on on top of that which mix-and-matches features of Symbol and Proxy in JS - which it refers to as meta-tables.

It doesn't actually have arrays. Arrays are just a convention expressed through part of its standard library, for iterating over numeric looking table keys. The standard library functions expect iteration to start at 1, but it doesn't have to. It could start at 0 as well. Or at 5. Or at 42. Or, if you're a particularly crafty fucker publishing code modules as a third-party, who wants to fuck with people: -1.

Report · Quote

Anonymous · reply · 2026-07-19 20:35:59

>>25484
>Method vs non-method function calls are also caller controlled, meaning whether or not you get passed the proper 'this' is up to caller responsibility,
This happens in every programming language tho

Report · Quote

Anonymous · reply · 2026-07-19 20:46:44

>>25482
>Lua is slower than the fastest and most mature scripting runtime in the world, therefore it's a failure
ok

Report · Quote

Anonymous · reply · 2026-07-19 21:07:13

Redpill me on brazilians

Report · Quote

Anonymous · reply · 2026-07-19 21:09:39

>>25488

Report · Quote

Anonymous · reply · 2026-07-19 21:56:26

>>25489
what

Report · Quote

Anonymous · reply · 2026-07-20 03:30:39

>>25469
maidsexo

Report · Quote

Anonymous · reply · 2026-07-20 04:09:18

>>25482
and V8 is 50MB of slop while LuaJIT is like 2MB

Report · Quote

Anonymous · reply · 2026-07-20 04:38:21

I love Lua-tan

Report · Quote

Anonymous · reply · 2026-07-20 07:29:20

>>25285
oh, lua is brazilian?

Report · Quote

Anonymous · reply · 2026-07-20 07:31:52

i'm a bit interested because of neovim
i haven't migrated my vimscript config properly

Report · Quote

Anonymous · reply · 2026-07-20 13:04:51

>>25493
We need more Lua-tan art.

Report · Quote

Anonymous · reply · 2026-07-20 15:32:52

>>25494
Correct
>>25495
Take the plunge

Report · Quote

Anonymous · reply · 2026-07-20 16:40:43

>>25496
I will make the logo

Report · Quote

Anonymous · reply · 2026-07-20 17:42:01

>>25494
Hue

Report · Quote

Anonymous · reply · 2026-07-20 17:45:34

>>25495
It'a pretty meh for config; it's fine either way.
But as a scriptable interface, it's leagues better than the "run sequential ex commands to change your buffer" language that is Vimscript.
t. tried writing plugins in pure Vimscript and got frustrated at how autoload imposes a strict directory structure on you with terrible cross-submodule support

Report · Quote

Anonymous · reply · 2026-07-20 21:16:50

>>25492
>V8 is 50MB of slop while LuaJIT is like 2MB
brutal

Report · Quote

Anonymous · reply · 2026-07-20 21:25:30

>>25482
>Actually- performance-wise Lua is utter shite.
I can write real time software in Prolog for modern computers. PUC-RIO Lua is perfectly fine.

Report · Quote

Anonymous · reply · 2026-07-21 01:08:18

HNiggas talking about Lua rn
https://news.ycombinator.com/item?id=48982011

Report · Quote

Anonymous · reply · 2026-07-21 01:33:22

>>25503
Why are users on this website such insufferable faggots?
It's like reading linkedin, r*ddit, and lesswrong all at the same time.

Report · Quote

Anonymous · reply · 2026-07-21 01:45:41

>>25402
>loukamb
Liu Kang?

Report · Quote

Anonymous · reply · 2026-07-21 01:49:43

>>25498
We're waiting on the logo before we start with the project.

Report · Quote

Anonymous · reply · 2026-07-21 01:52:18

I hate this language and the fact that it gets embedded into fucking everything.

Report · Quote

Anonymous · reply · 2026-07-21 01:59:25

>>25507
>I dislike that the popular language designed for embedding is frequently embedded into applications

Report · Quote

Anonymous · reply · 2026-07-21 02:04:52

>>25508
Yes.

Report · Quote

Anonymous · reply · 2026-07-21 02:10:16

>>25504
There are some based channers posting there though

Report · Quote

Anonymous · reply · 2026-07-21 02:26:50

>>25510
>based channers
Lmao. Please leave this website.

Report · Quote

Verification not required. · reply · 2026-07-21 02:40:03

>>25285
use case?

Report · Quote

Anonymous · reply · 2026-07-21 05:19:17

>>25510
Like who?

Report · Quote

Anonymous · reply · 2026-07-21 07:13:49

>>25512
customizing behavior of stuff without recompiling said stuff.

Report · Quote

Anonymous · reply · 2026-07-21 12:24:53

>>25514
ok nice usecase

Report · Quote

Anonymous · reply · 2026-07-21 15:32:57

>>25513
https://news.ycombinator.com/user?id=moot

Report · Quote

Anonymous · reply · 2026-07-21 15:40:02

>>25516
Unexpected, top kek

Report · Quote

Anonymous · reply · 2026-07-21 15:42:10

>>25516

Report · Quote

Anonymous · reply · 2026-07-21 20:12:07

>>25476
>terralang
heh

Report · Quote

Anonymous · reply · 2026-07-21 21:16:06

>>25396
>the superior alternative is being able to specify the bounds of the array on allocation
>you can start from 0 or 1 or -50 or whatever you want to
>t. fortran
why the fuck would you want this

Report · Quote

Anonymous · reply · 2026-07-22 00:24:11

>>25520
Can you really see no use for this?
I guess it requires having 115 IQ at minimum to realize the numeric value associated with a data point along an axis (something you'd use a list data structure like an array for) isn't always the same value as the data point's position relative to the list in the program's memory. But you are so cnile that your brain can't even separate those two concepts at all, even though they're very different things... I feel bad for you, it's like having a mental illness.

Report · Quote

Anonymous · reply · 2026-07-22 00:40:25

>>25521
>you are so cnile that your brain can't even separate those two concepts at all
...even though programming in C necessitates that I do exactly that?

Report · Quote

Anonymous · reply · 2026-07-22 00:49:58

>>25439
yes
refer to the included image

Report · Quote

Anonymous · reply · 2026-07-22 00:53:13

1-based indices actually have a property that starts at 0, that being the length. If I have 5 apples, I label them 1, 2, 3, 4, and 5, but if I don't have any apples, I have 0 apples (aka the length of the list is 0). So the number 0 isn't wasted in the case of a 1-based array.
Whether it makes sense to start from 0 depends on the question you're asking, for example if you ask "how far away from me is the closest object?" a valid answer would be that it's 0 meters away from you. But if you ask how many objects there are, notice there HAS to be at least 1 object, otherwise the question of how far away the closest object is doesn't make any sense.
The reason you index from 0 in C is because indexing an array with value n is asking "what is the nth repetition of this object?" which is closer to the question of distance. arr[4] in C is asking "give me the 4th repeated value" which happens to be the 5th value. The reason it's framed this way is because it's how you think about memory allocation (an array of type t and length n allocates sizeof(t)*n memory, and the index is a multiplication of sizeof(t)) but it's totally arbitrary.

Report · Quote

Anonymous · reply · 2026-07-22 00:56:39

>>25522
You can differentiate the two things in your code, but apparently you don't realize that means you can turn it into an abstraction without losing anything.
Just like when typing a string, you type "hello world" instead of "104 101 108 108 111 32 119 111 114 108 100".

Report · Quote

Anonymous · reply · 2026-07-22 00:58:48

>>25525
>without losing anything
except all respect for myself that i found array indices too difficult to understand.

Report · Quote

Anonymous · reply · 2026-07-22 01:02:49

>>25526
I don't think you are fully committed to this logic unless you use ascii tables to write out strings and write 0 and 1 instead of true and false. In fact, you are probably stupid if you even so much as use indices, every value above 0 is an abstraction so it doesn't reflect the real data. You should be casting array+size+index to a pointer and dereferencing it directly, otherwise you're too stupid to understand pointers.

Report · Quote

Anonymous · reply · 2026-07-22 01:04:41

>>25523
What does Haskell look like?

Report · Quote

Anonymous · reply · 2026-07-22 01:17:21

>>25527
the amount of autism in this post...

Report · Quote

Anonymous · reply · 2026-07-22 01:35:01

>>25529
It's exactly what you sound like kek

Report · Quote

Anonymous · reply · 2026-07-22 04:07:42

>>25520
you get rid of annoying conversion steps where you have to shift indices and can instead just insert directly at that index
you also reduce the chances of off by one errors and can use your mental energy on other stuff

Report · Quote

Anonymous · reply · 2026-07-22 09:22:26

>>25529
>autism
?

Report · Quote

Anonymous · reply · 2026-07-22 13:54:51

>>25528
Purely functional (and useless).

Report · Quote

Anonymous · reply · 2026-07-22 14:56:10

>>25531
>you get rid of annoying conversion steps
you didn't get rid of shit. you just hid it and now the computer has to do it for you, reducing your performance because you're a lazy fuck.

Report · Quote

‹ Newer posts Page 5 of 6 Older posts ›

Reply to this thread

Posting requires a durable account or a TripPass. Reading remains available.

Sign in or create or attach a TripPass to post. Browsing is open.