Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how to use Lua 5.4 and power patches #301

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

4mmonium
Copy link
Collaborator

@4mmonium 4mmonium commented Feb 20, 2022

This commit adds documentation on how to use Lua 5.4 and documents the
power patches provided by this new release. Most of the documentation
for this comes from the readme (https://github.com/gottfriedleibniz/lua/blob/luaglm/README.md),
'as is' and the lua-users Wiki: http://lua-users.org/wiki/LuaPowerPatches#LUA_54_patches

I tried to not modify any of the documentation, only adding certain
markdown styling and some extra explanation to specific terms which may not be
known to new users.

This commit adds documentation on how to use Lua 5.4 and documents the
power patches provided by this new release. Most of the documentation
for this comes from the readme (https://github.com/gottfriedleibniz/lua/blob/luaglm/README.md),
'as is' and the lua-users Wiki: http://lua-users.org/wiki/LuaPowerPatches#LUA_54_patches
I tried to not modify any of the documentation, only adding certain
markdown styling and some extra explanation to specific terms which may not be
known to new users.
@jaymo1011
Copy link
Contributor

Currently, FiveM is compiled with a different tree of LuaGLM that does not include all of the power patches gottfriedleibniz/lua:luaglm has and not all of them are enabled either :)

@4mmonium
Copy link
Collaborator Author

Currently, FiveM is compiled with a different tree of LuaGLM that does not include all of the power patches gottfriedleibniz/lua:luaglm has and not all of them are enabled either :)

Thanks, I guess I will review this and remove any power patches that don't apply from the docs 😃


## Short Function Notation or Shorthand lambdas (5.4.2)

Syntactic sugar for writing concise anonymous functions of the form `|a, b,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing, couldn't find a reference to this

result = table.isfrozen(t)
```

## Save/restore readline history (5.4.2)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and Advanced readline support (5.4, 5.3, 5.2, 5.1, 5.0) aren't enabled, GRIT_POWER_READLINE_HISTORY isn't set in the defines.

- Remove shorthand lambda stuff (doesn't exist).
- Remove Save/restore readline history (5.4.2).
- Remove Advanced readline support (5.4, 5.3, 5.2, 5.1, 5.0).
- Remove 'Readonly' (for tables, which doesn't exist).
- Add functions for string blobs.
- Add section for nanosecond resolution timers with example code.

Thanks to @jaymo1011 for the help.
@AvarianKnight AvarianKnight added waiting for review PR needs to be reviewed draft and removed waiting for review PR needs to be reviewed labels Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants