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

implementation of lua 5.3 features #103

Open
zaxebo1 opened this issue Jul 12, 2015 · 5 comments
Open

implementation of lua 5.3 features #103

zaxebo1 opened this issue Jul 12, 2015 · 5 comments
Labels

Comments

@zaxebo1
Copy link

zaxebo1 commented Jul 12, 2015

http://www.moonsharp.org/about.html mentions that moonsharp implements 99% of "lua 5.2"

Is there any timeline to implement lua 5.3 features ( see http://www.lua.org/manual/5.3/readme.html ) in moonsharp, esp. see the "main changes" , "language" and "library" section mentioned there in the lua 5.3 readme.

@xanathar
Copy link
Member

The plan is to get to a very stable implementation with the current feature set and mark it 1.0 before thinking of supporting any more of the 5.3.

Anyway, as I'm going to keep this thread open for the future:

Main changes

  • integers (64-bit by default) : interesting feature but with a very high cost at the moment. Might get in, however.
  • official support for 32-bit numbers : TBA
  • bitwise operators : doesn't make sense until integers are implemented. Also, not extremely useful given bit32 lib.
  • basic utf-8 support : parts of it already supported. Other parts will not, as MoonSharp is UTF-16 internally (strings are a major difference between the twos).
  • functions for packing and unpacking values : TBA

Language

  • userdata can have any Lua value as uservalue : not sure, but it might already be supported
  • integer division : TBA
  • more flexible rules for some metamethods : TBA

Libraries

  • ipairs and the table library respect metamethods : nice in theory.. in practice Lua 5.1 metamethods rules are much more efficient. 5.2 strikes in the middle. TBA
  • strip option in string.dump : TBA. string.dump in MoonSharp is compliant with Lua 5.2 documentation, not with 5.2 implementation which is correctly documented in 5.3 (ouch)
  • new function table.move : TBA. Interesting function, likely to be implemented soon.
  • new function string.pack : TBA
  • new function string.unpack : TBA
  • new function string.packsize : TBA

@zaxebo1
Copy link
Author

zaxebo1 commented Jul 13, 2015

(also add this from the same url)

Lua standalone interpreter

  • can be used as calculator; no need to prefix with '='
  • arg table available to all code

@kernighan
Copy link

This has been open for over 4 years, and Lua 5.4 is just around the corner. Should it just be assumed that Moonsharp has no intention of staying current?

@LimpingNinja
Copy link
Contributor

@kernighan We've moved Moonsharp into a Github org and have two new maintainers added; we are working through bugs first while working on ideas for the next release. Whether any or all of the above is included will be one of those decisions. We are happily accepting PR's through Github so if you have any of the above implemented, feel free to share.

@R-033
Copy link

R-033 commented Dec 18, 2024

I've implemented bitwise operators and floor division as a half measure to have some Lua 5.3 scripts working:
#334
This change doesn't add integer type however, instead working with normal numbers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants