ain't afraid of no sleep,

This commit is contained in:
Yessiest 2022-05-20 22:20:49 +04:00
parent 38c9e580b9
commit ca17b716ba
9 changed files with 481 additions and 481 deletions

View File

@ -2,7 +2,7 @@
--That is, unability to load core modules from the files that were required
return function(reqfunc)
local function import(path)
local paths = { }
local paths = {}
package.path:gsub("[^;]+",function(path)
table.insert(paths,path)
end)
@ -23,14 +23,14 @@ return function(reqfunc)
return reqfunc(path)
else
content = file:read("*a")
local func,err = load(content,"import: "..filename,nil,setmetatable({
local f,err = load(content,"import: "..filename,nil,setmetatable({
require = reqfunc,
import = import,
},{__index = _G}))
if err then
error(err)
error("[import: "..filname.."] "..tostring(err))
end
return func()
return f()
end
end
return import

@ -1 +1 @@
Subproject commit 9e6f09050f9ebecc4ffcea1234b920468254a79b
Subproject commit 23fcea17c2eb380b6a6b1ba848d5bc7ebdc38b05

View File

@ -51,7 +51,7 @@ end
function markov.walk(self,start)
if not self.init then
error("Attempted to use an instance method on an uninitialized instance")
error("Attempted to use method on uninitialized instances")
end
local random = math.random(0,1e7)/1e7
local words = {}
@ -76,7 +76,7 @@ end
function markov.expand_vocabulary(self,source)
if not self.init then
error("Attempted to use an instance method on an uninitialized instance")
error("Attempted to use method on uninitialized instances")
end
self.net = register_words(source,self.net)
end