← Home ← Back to /g/

Thread 105755205

19 posts 6 images /g/
Anonymous No.105755205 [Report] >>105755288 >>105755437 >>105755524 >>105759378 >>105760218 >>105761588 >>105761771
NEW LUA RELEASE
Lua 5.5 beta was released!

source: https://www.lua.org/work/lua-5.5.0-beta.tar.gz
documentation: https://www.lua.org/work/doc

Changes:
>declarations for global variables
>for-loop variables are read only
>floats are printed in decimal with enough digits to be read back correctly.
>more levels for constructors
>table.create
>utf8.offset returns also final position of character
>external strings (that use memory not managed by Lua)
>new functions luaL_openselectedlibs and luaL_makeseed
>major collections done incrementally
>more compact arrays (large arrays use about 60% less memory)
>lua.c loads 'readline' dynamically
>static (fixed) binaries (when loading a binary chunk in memory, Lua can reuse its original memory in some of the internal structures)
>dump and undump reuse all strings
>auxiliary buffer reuses buffer when it creates final string

What is your favourite new feature? most hated?
Anonymous No.105755237 [Report] >>105761748 >>105761783
X = 1 -- Ok, global by default
do
global Y -- voids implicit initial declaration
Y = 1 -- Ok, Y declared as global
X = 1 -- ERROR, X not declared
end
X = 2 -- Ok, global by default again


Not too sure how to feel about this one honestly... I can't think of where i'd use this. Maybe just me adding `global _` at the top of every file to disable all globals?
Anonymous No.105755288 [Report] >>105755315
>>105755205 (OP)
Useless since everyone uses luajit
Anonymous No.105755315 [Report] >>105755437
>>105755288
I can't embed LuaJIT into a webpage, but I can embed PUC lua
Anonymous No.105755437 [Report] >>105755468
>>105755205 (OP)
The work on memory is all good stuff, and the external strings is a "finally moment", but the rest of this is like... why?
>declarations for global variables
Thanks, I hate it.

>>105755315
Yes you can. Disable JIT. But also
>embed into a webpage
I don't want to run software in a fucking document viewer, thank you very much.
Anonymous No.105755468 [Report]
>>105755437
>>Yes you can. Disable JIT. But also
Nope, the interpreter still can't run because dynasm doesn't have a wasm target
Anonymous No.105755524 [Report]
>>105755205 (OP)
WoW still uses a subset of 5.1 for their addon api, fuck these lazy ass niggas
Anonymous No.105757747 [Report]
>dump and undump
Anonymous No.105759378 [Report]
>>105755205 (OP)
>luaL_makeseed
I've plenty of seed for all...
Anonymous No.105760218 [Report] >>105761726 >>105761730
>>105755205 (OP)
>>table.create
Finally. Nice.
This is pretty nice. Thanks anon.
Anonymous No.105761588 [Report]
>>105755205 (OP)
>for-loop variables are read only
INTO THE TRASH IT GOES
Anonymous No.105761714 [Report]
>declarations for global variables
Useless bloat unless they make implicit declaration local by default
No balls. Lua peaked at 5.1
Anonymous No.105761726 [Report]
>>105760218
>finally
I'm glad we have a standard library function for function table.create(...) return {...} end that now
Typing that myself would be too difficult, useless boilerplate fr
Anonymous No.105761730 [Report]
>>105760218
>finally
I'm glad we have a standard library function for function table.create(...) return {...} end now
Typing that myself would be too difficult, useless boilerplate fr
Anonymous No.105761733 [Report]
ugly ass language, truly.
Anonymous No.105761748 [Report]
>>105755237
Yeah it's confusing and non-intuitive, I don't know what happened
Anonymous No.105761771 [Report] >>105761797
>>105755205 (OP)
How is lua useful beyond providing mod support for games?
Anonymous No.105761783 [Report]
>>105755237
What terrible design.
Anonymous No.105761797 [Report]
>>105761771
Providing configuration or scripting support for software