Live data from Hacker News

Compact representations for arrays in Lua [pdf]

sol.sbc.org.br

1–10 of 22 posts

Re: Compact representations for arrays in Lua [pdf]

#4
post #3

Jesus christ, 40% waste in arrays that can be solved by using `__attribute__((packed))`. Irresponsible of them of not advertising this as an option in luaconf.h

Here's the rest of that paragraph for you:

"However, this attribute is a gcc extension not present in ISO C. Moreover, even in gcc it is not guaranteed to work [3]. As portability is a hallmark of Lua, this almost magical solution is a no-go."

Re: Compact representations for arrays in Lua [pdf]

#5
post #4
post #3

Jesus christ, 40% waste in arrays that can be solved by using `__attribute__((packed))`. Irresponsible of them of not advertising this as an option in luaconf.h

Here's the rest of that paragraph for you: "However, this attribute is a gcc extension not present in ISO C. Moreover, even in gcc it is not guaranteed to work [3]. As portability is a hallmark of Lua, this almost magical solution is a no-go."

[flagged]

Re: Compact representations for arrays in Lua [pdf]

#7
post #5
post #4

Earlier quoted context omitted.

Here's the rest of that paragraph for you: "However, this attribute is a gcc extension not present in ISO C. Moreover, even in gcc it is not guaranteed to work [3]. As portability is a hallmark of Lua, this almost magical solution is a no-go."

[flagged]

You have no idea what 90% of their users are using. A lot of them aren't using LLVM or GCC. I'm pretty sure Roblox and WoW, for example, aren't normally compiled with LLVM or GCC. Whether those two games account for 99% of Lua's users or 0.001% depends on how you count, but no matter how you count, you have no idea.

Re: Compact representations for arrays in Lua [pdf]

#8
post #5
post #4

Earlier quoted context omitted.

Here's the rest of that paragraph for you: "However, this attribute is a gcc extension not present in ISO C. Moreover, even in gcc it is not guaranteed to work [3]. As portability is a hallmark of Lua, this almost magical solution is a no-go."

[flagged]

Embedders of Lua are not equidistributed across platforms with the general population of programmers or with user-exposed general-purpose computers. Not even close. One of the selling points of Lua is how easy it is to run on a toaster or potato, so disproportionately many ports of Lua are in fact running on toasters and potatoes.

Re: Compact representations for arrays in Lua [pdf]

#9
post #7
post #5

Earlier quoted context omitted.

[flagged]

You have no idea what 90% of their users are using. A lot of them aren't using LLVM or GCC. I'm pretty sure Roblox and WoW, for example, aren't normally compiled with LLVM or GCC. Whether those two games account for 99% of Lua's users or 0.001% depends on how you count, but no matter how you count, you have no idea.

[flagged]

Re: Compact representations for arrays in Lua [pdf]

#10
post #7
post #5

Earlier quoted context omitted.

[flagged]

You have no idea what 90% of their users are using. A lot of them aren't using LLVM or GCC. I'm pretty sure Roblox and WoW, for example, aren't normally compiled with LLVM or GCC. Whether those two games account for 99% of Lua's users or 0.001% depends on how you count, but no matter how you count, you have no idea.

Roblox accounts for 0% of stock Lua users, they run Luau. And many uses of Lua you come up with will be using LuaJIT or pinned to an older, possibly forked, Lua release.

I'm not agreeing with the comment you replied to, just nitpicking.

Post reply on HN