Skip to content

Latest commit

 

History

History
56 lines (34 loc) · 1.21 KB

File metadata and controls

56 lines (34 loc) · 1.21 KB

Lua rc

lua -lluarocks.require
require "luarocks.require"

Pretty print/debugging

https://stackoverflow.com/questions/9168058/how-to-dump-a-table-to-console#9168316

local pp = require 'pl.pretty'
local t = { a = { b = { c = 'Hello world!', 1 }, 2, d = { 3 } } }
pp.dump(t)

String

String literals https://stackoverflow.com/questions/17202195/difference-between-and-within-lua#17202311

-- Double quotes enclosed in single quotes.
s = 'My friend said: "Hi!!"'

-- Single quotes enclosed in double quotes.
s = "My friend said: 'Hi!!'"

-- Single and double quotes enclosed in double brackets.
s = [[My friend said: "What's up?"]]

LuaRocks search

luarocks search your_rock

LuaRocks lists installed

luarocks list your_rock

LuaRocks install

luarocks install your_rock

LuaRocks install local

luarocks install --local your_rock

LuaRocks install

luarocks remove your_rock