Hello my dear /mm
A few days ago I figured out I could not continue my work without Lua embeded into the bellies of my code.
And now I know:
- how the modding planning makes developer's lives worse
- how the embedded scripting language makes developer's lives better
- what embedding of scripting language makes with developer's lives
- what is Lua
- how to embed Lua into C#
- how to work with Luainterface lib
- the basics of Lua programming
- how easily data could be transformed into algorithms and back with Lua*
- how easily Lua script could be abused and screw everything up
- how to prevent certain part of Lua script from creating of global variables
- how Lua works from the inside (_G, metatables and stuff)
- how to run Lua scripts from the sandbox
- the difference Lua 5.2 made compared to 5.1
- how Luainterface works with Lua 5.1 and not with Lua 5.2
- how easily developers could abandon their work
- how to embed Lua with C# without Luainterface lib
- what is the NLua
- how to download with Git and build with CMake
- what is KeraLua and KopiLua
- what relations NLua has with KeraLua and KopiLua
- how to embed Lua with C# without Luainterface or NLua libs
- what is the NuGet
- how to download NuGet packages with NuGet
- how NuGet works with VS2012 and not with VS2010
- what is the NuGet packages
- the basics of NuGet API
- how to download NuGet packages without NuGet
"You really alive only while you learning something new everyday"
Still have no good solution to my problem. Well, tomorrow will be another day of learning, I guess.
*For these who would like to know what I'm talking about, run this code into
Lua demo:
print("let's see, do we have some of these global variables?")
print('x1=', x1)
print('x2=', x2)
print('x3=', x3)
print('x4=', x4)
print('x5=', x5)
print("nope, we don't have them")
--let's write some functions then
function make_some_vars(var_amount)
local code = ''
i = 0
v = 0
while i < var_amount do
i = i+1
v = 2*i
code = code..'x'..i..'='..v..' '
end
code = code..'print("the generated code is:","'..code..'")'
return code
end
print("and here things gone places")
assert(loadstring(make_some_vars(5)))()
print("and now?")
print('x1=', x1)
print('x2=', x2)
print('x3=', x3)
print('x4=', x4)
print('x5=', x5)
print("yes, we have them now!")
Now imagine there could be thousands of huge arrays allocated and how it would clog the system. The funny part, even with sandbox I still could not prevent this, I could only ensure there wouldn't be some file spamming/deleting and the script would not litter with global variables.