ain't afraid of no sleep,
This commit is contained in:
parent
38c9e580b9
commit
ca17b716ba
|
@ -23,14 +23,14 @@ return function(reqfunc)
|
||||||
return reqfunc(path)
|
return reqfunc(path)
|
||||||
else
|
else
|
||||||
content = file:read("*a")
|
content = file:read("*a")
|
||||||
local func,err = load(content,"import: "..filename,nil,setmetatable({
|
local f,err = load(content,"import: "..filename,nil,setmetatable({
|
||||||
require = reqfunc,
|
require = reqfunc,
|
||||||
import = import,
|
import = import,
|
||||||
},{__index = _G}))
|
},{__index = _G}))
|
||||||
if err then
|
if err then
|
||||||
error(err)
|
error("[import: "..filname.."] "..tostring(err))
|
||||||
end
|
end
|
||||||
return func()
|
return f()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return import
|
return import
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 9e6f09050f9ebecc4ffcea1234b920468254a79b
|
Subproject commit 23fcea17c2eb380b6a6b1ba848d5bc7ebdc38b05
|
|
@ -51,7 +51,7 @@ end
|
||||||
|
|
||||||
function markov.walk(self,start)
|
function markov.walk(self,start)
|
||||||
if not self.init then
|
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
|
end
|
||||||
local random = math.random(0,1e7)/1e7
|
local random = math.random(0,1e7)/1e7
|
||||||
local words = {}
|
local words = {}
|
||||||
|
@ -76,7 +76,7 @@ end
|
||||||
|
|
||||||
function markov.expand_vocabulary(self,source)
|
function markov.expand_vocabulary(self,source)
|
||||||
if not self.init then
|
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
|
end
|
||||||
self.net = register_words(source,self.net)
|
self.net = register_words(source,self.net)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue