lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Nice article.

Want to note that to compile lua on fresh box you need to execute

  sudo apt-get install build-essential libreadline6 libreadline6-dev

Also hope you will not dive to deep in obscure metatable tricks. Even
ability to return function that uses closure values is great for me.

  local data_types =
    {
      'boolean',
      'function',
      'nil',
      'number',
      'string',
      'table',
      'thread',
      'userdata',
    }
  for k, type_name in ipairs(data_types) do
    _G['is_' .. type_name] = function(a) return (type(a) == type_name) end
  end


On 16-06-09 12:56 PM, Tyler Neylon wrote:
> I've started creating some Lua-focused content for O'Reilly, a
> publisher of many popular software books. This article, coming out in
> 3 parts, introduces Lua to coders already familiar with JavaScript:
> 
> https://www.oreilly.com/learning/learn-lua-from-javascript-part-1-an-introduction-to-lua