Lua Notes

nelua wishlist
Login

nelua wishlist

cli/api libraries

  1. streaming gzip deflation
  2. http requests
  3. serialization (nelua-batteries 'json' is useful but doesn't work with integral keys)

ponies

  1. saml2 negotiation (for single-sign-on restricted access to webpages)
  2. a source2image template for containerized nelua applications on https://www.okd.io/

documentation

  1. for Lua to be aware of nldoc-style inline documentation and be able to produce it for a symbol
  2. (alternately) for a cli tool leveraging nldoc to find specific documentation on the fly
  3. 'lings'

POC for #1:

local M = @record{}
global M.a = '???'
-- very important variable

function M.f()
-- requires 'a' variable. invisibly. intangibly
  return 1
end

##[[
function help(sym)
  if sym.ftype then
    local src = string.sub(sym.defnode.src.content, sym.defnode.pos, sym.defnode.endpos)
    print(string.match(src, '\n(-- [^\n]+)'))
  else
    local src = string.sub(sym.node.src.content, sym.node.endpos)
    print(string.match(src, '^[^\n]+\n(-- [^\n]+)'))
  end
end
]]

return M

usage:

$ nelua -i 'local m = require("n61") ## help(m.value.metafields.f)'
-- requires 'a' variable. invisibly. intangibly
$ nelua -i 'local m = require("n61") ## help(m.value.metafields.a)'
-- very important variable