This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local n, v = "serpent", "0.303" -- (C) 2012-18 Paul Kulchenko; MIT License | |
local c, d = "Paul Kulchenko", "Lua serializer and pretty printer" | |
local snum = {[tostring(1/0)]='1/0 --[[math.huge]]',[tostring(-1/0)]='-1/0 --[[-math.huge]]',[tostring(0/0)]='0/0'} | |
local badtype = {thread = true, userdata = true, cdata = true} | |
local getmetatable = debug and debug.getmetatable or getmetatable | |
local pairs = function(t) return next, t end -- avoid using __pairs in Lua 5.2+ | |
local keyword, globals, G = {}, {}, (_G or _ENV) | |
for _,k in ipairs({'and', 'break', 'do', 'else', 'elseif', 'end', 'false', | |
'for', 'function', 'goto', 'if', 'in', 'local', 'nil', 'not', 'or', 'repeat', | |
'return', 'then', 'true', 'until', 'while'}) do keyword[k] = true end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- lume | |
-- | |
-- Copyright (c) 2020 rxi | |
-- | |
-- Permission is hereby granted, free of charge, to any person obtaining a copy of | |
-- this software and associated documentation files (the "Software"), to deal in | |
-- the Software without restriction, including without limitation the rights to | |
-- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | |
-- of the Software, and to permit persons to whom the Software is furnished to do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- log.lua | |
-- | |
-- Copyright (c) 2016 rxi | |
-- | |
-- This library is free software; you can redistribute it and/or modify it | |
-- under the terms of the MIT license. See LICENSE for details. | |
-- | |
local log = { _version = "0.1.0" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local lume = require "lume" | |
local messages = {} | |
messages.version = "0.1.1" | |
messages.list = {} | |
messages.defaulttimeout = 3000 | |
messages.x, messages.y = 0, 0 | |
messages.update = function(dt) | |
if lume.count(messages.list) == 0 then return end | |
lume.each(messages.list, function(msg) |