lua notes #73

Open
daurnimator opened this Issue Dec 29, 2016 · 0 comments

Projects

None yet

1 participant

@daurnimator
  • strings: there is [[ (and [=[, [==[, etc) syntax
  • pad: use string.format
  • number to string: coercion format is undefined. try to use string.format where possible
  • split: use string.gmatch
  • length: use # operator
  • current unix epoch: use os.time
  • get date parts: use os.date
  • build date/time from parts: Use os.time
  • library path environment variable: mention LUA_CPATH
  • namespace declaration: module is deprecated

The lua bit seems to be written mainly for 5.1 (an old version), things to update:

  • integer division is //
  • integer overflow: wraparound
  • bit operators
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment