cosmopolitan/third_party/lua
Justine Tunney 281a0f2730 Implement raw system call for redbean lua code
You can now call functions like fork() from Lua and it'll work across
all supported platforms, including Windows. This gives you a level of
control of the system that Lua traditionally hasn't been able to have
due to its focus on old portable stdio rather modern POSIX APIs. Demo
code has been added to redbean-demo.com to show how it works.

This change also modifies Lua so that integer literals with a leading
zero will be interpreted as octal. That should help avoid shooting in
the foot with POSIX APIs that frequently use octal mode bits.

This change fixes a bug in opendir(".") on New Technology.

Lastly, redbean will now serve crash reports to private network IPs.
This is consistent with other frameworks. However that isn't served
to public IPs unless the -E flag is passed to redbean at startup.
2022-04-13 08:53:24 -07:00
..
test Fix upstream Lua test breakage due to Linenoise 2021-08-19 09:34:24 -07:00
cosmo.h Import C++ Standard Template Library 2022-03-22 06:41:54 -07:00
escapeluastring.c Trim down redbean a little bit 2022-03-21 19:32:30 -07:00
lapi.c Make exciting improvements 2022-03-18 03:02:00 -07:00
lapi.h Get Lua to build with all tests passing 2021-03-07 13:31:09 -08:00
lauxlib.c Import some Lua documentation 2021-08-22 15:03:04 -07:00
lauxlib.h Upgrade Lua to 5.4.3 (#217) 2021-07-28 09:26:35 -07:00
lbaselib.c Revert adding lua array per discussion in #222 (#229) 2021-08-07 15:20:33 -07:00
lcode.c Upgrade Lua to 5.4.3 (#217) 2021-07-28 09:26:35 -07:00
lcode.h Get Lua to build with all tests passing 2021-03-07 13:31:09 -08:00
lcorolib.c Upgrade Lua to 5.4.3 (#217) 2021-07-28 09:26:35 -07:00
lctype.c Get Lua to build with all tests passing 2021-03-07 13:31:09 -08:00
lctype.h Get Lua to build with all tests passing 2021-03-07 13:31:09 -08:00
ldblib.c Upgrade Lua to 5.4.3 (#217) 2021-07-28 09:26:35 -07:00
ldebug.c Revert adding lua array per discussion in #222 (#229) 2021-08-07 15:20:33 -07:00
ldebug.h Get Lua to build with all tests passing 2021-03-07 13:31:09 -08:00
ldo.c Upgrade Lua to 5.4.3 (#217) 2021-07-28 09:26:35 -07:00
ldo.h Upgrade Lua to 5.4.3 (#217) 2021-07-28 09:26:35 -07:00
ldump.c Get Lua to build with all tests passing 2021-03-07 13:31:09 -08:00
lfunc.c Add Lua compiler 2021-08-09 13:09:14 -07:00
lfunc.h Get Lua to build with all tests passing 2021-03-07 13:31:09 -08:00
lgc.c Revert adding lua array per discussion in #222 (#229) 2021-08-07 15:20:33 -07:00
lgc.h Get Lua to build with all tests passing 2021-03-07 13:31:09 -08:00
linit.c Get Lua to build with all tests passing 2021-03-07 13:31:09 -08:00
liolib.c Upgrade Lua to 5.4.3 (#217) 2021-07-28 09:26:35 -07:00
ljumptab.inc Get Lua to build with all tests passing 2021-03-07 13:31:09 -08:00
llex.c Implement raw system call for redbean lua code 2022-04-13 08:53:24 -07:00
llex.h Get Lua to build with all tests passing 2021-03-07 13:31:09 -08:00
llimits.h Upgrade Lua to 5.4.3 (#217) 2021-07-28 09:26:35 -07:00
lmathlib.c Upgrade Lua to 5.4.3 (#217) 2021-07-28 09:26:35 -07:00
lmem.c Upgrade Lua to 5.4.3 (#217) 2021-07-28 09:26:35 -07:00
lmem.h Get Lua to build with all tests passing 2021-03-07 13:31:09 -08:00
loadlib.c Fix bugs and make improvements to redbean 2021-08-06 14:18:34 -07:00
lobject.c Implement raw system call for redbean lua code 2022-04-13 08:53:24 -07:00
lobject.h Add Lua compiler 2021-08-09 13:09:14 -07:00
lopcodes.c Get Lua to build with all tests passing 2021-03-07 13:31:09 -08:00
lopcodes.h Upgrade Lua to 5.4.3 (#217) 2021-07-28 09:26:35 -07:00
lopnames.inc Get Lua to build with all tests passing 2021-03-07 13:31:09 -08:00
loslib.c Upgrade Lua to 5.4.3 (#217) 2021-07-28 09:26:35 -07:00
lparser.c Revert adding lua array per discussion in #222 (#229) 2021-08-07 15:20:33 -07:00
lparser.h Get Lua to build with all tests passing 2021-03-07 13:31:09 -08:00
lprefix.h Add Lua 2021-03-07 12:50:34 -08:00
lstate.c Import some Lua documentation 2021-08-22 15:03:04 -07:00
lstate.h Add Lua compiler 2021-08-09 13:09:14 -07:00
lstring.c Upgrade Lua to 5.4.3 (#217) 2021-07-28 09:26:35 -07:00
lstring.h Get Lua to build with all tests passing 2021-03-07 13:31:09 -08:00
lstrlib.c Upgrade Lua to 5.4.3 (#217) 2021-07-28 09:26:35 -07:00
ltable.c Revert adding lua array per discussion in #222 (#229) 2021-08-07 15:20:33 -07:00
ltable.h Get Lua to build with all tests passing 2021-03-07 13:31:09 -08:00
ltablib.c Revert adding lua array per discussion in #222 (#229) 2021-08-07 15:20:33 -07:00
ltests.c Fix regression in _gclongjmp() 2021-08-19 09:34:24 -07:00
ltests.h Get Lua to build with all tests passing 2021-03-07 13:31:09 -08:00
ltm.c Revert adding lua array per discussion in #222 (#229) 2021-08-07 15:20:33 -07:00
ltm.h Add Lua compiler 2021-08-09 13:09:14 -07:00
lua.h Revert adding lua array per discussion in #222 (#229) 2021-08-07 15:20:33 -07:00
lua.main.c Change the default command prompts 2022-04-06 06:56:11 -07:00
lua.mk Add support for symbol table in .com files 2022-03-23 06:34:46 -07:00
luac.main.c Add Lua compiler 2021-08-09 13:09:14 -07:00
luacallwithtrace.c Trim down redbean a little bit 2022-03-21 19:32:30 -07:00
luaconf.h Improve ZIP filesystem and change its prefix 2021-08-22 01:11:53 -07:00
luaencodejsondata.c Trim down redbean a little bit 2022-03-21 19:32:30 -07:00
luaencodeluadata.c Trim down redbean a little bit 2022-03-21 19:32:30 -07:00
luaencodeurl.c Fix Redbean EncodeUrl params w/o values (#376) 2022-03-27 22:36:43 -07:00
luaformatstack.c Import C++ Standard Template Library 2022-03-22 06:41:54 -07:00
lualib.h Get Lua to build with all tests passing 2021-03-07 13:31:09 -08:00
luaparseurl.c Trim down redbean a little bit 2022-03-21 19:32:30 -07:00
luapushheader.c Trim down redbean a little bit 2022-03-21 19:32:30 -07:00
luapushheaders.c Trim down redbean a little bit 2022-03-21 19:32:30 -07:00
luapushlatin1.c Trim down redbean a little bit 2022-03-21 19:32:30 -07:00
luapushurlparams.c Trim down redbean a little bit 2022-03-21 19:32:30 -07:00
lundump.c Get Lua to build with all tests passing 2021-03-07 13:31:09 -08:00
lundump.h Get Lua to build with all tests passing 2021-03-07 13:31:09 -08:00
lutf8lib.c Get Lua to build with all tests passing 2021-03-07 13:31:09 -08:00
lvm.c Revert adding lua array per discussion in #222 (#229) 2021-08-07 15:20:33 -07:00
lvm.h Revert adding lua array per discussion in #222 (#229) 2021-08-07 15:20:33 -07:00
lzio.c Get Lua to build with all tests passing 2021-03-07 13:31:09 -08:00
lzio.h Get Lua to build with all tests passing 2021-03-07 13:31:09 -08:00
README.cosmo Implement raw system call for redbean lua code 2022-04-13 08:53:24 -07:00
tms.h Add Lua compiler 2021-08-09 13:09:14 -07:00

DESCRIPTION

  Lua is a language designed for embedded use in native applications. It
  has an impossibly elegant C API and the Lua language itself feels more
  like Python compared to alternatives like Tcl except it's a great deal
  faster and doesn't have strong opinions about character encoding.

PROVENANCE

  https://github.com/lua/lua/

  commit e7803f7dbcdc966ab1f9db143424ee811ab1a398
  Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
  Date:   Wed Mar 3 09:44:20 2021 -0300

      New release number (5.4.3)

  luac.c needed to be sourced from:
  https://www.lua.org/ftp/lua-5.4.3.tar.gz

LOCAL MODIFICATIONS

  Integer literals such as `033` will now be interpreted as octal.

  The `\e` string literal escape sequence has been added, which is
  equivalent to `\27` (the Lua version of `\033`) or the ASCII ESC
  character. It may be used for teletypewriter control like having
  bold text, which can be encoded elegantly as `\e[1mHELLO\e[0m`.