Posted 09 July 2016 - 06:45 AM
Is there a program for shrinking lua code to smaller code in computercraft?
for example this-
should become something like this-
for example this-
os.loadApi("myApi")
local var1=myApi.func1()
local var2=myApi.func2(var1)
local var3
local function do1()
var3=myApi.func3(var2,var3)
print(table.unpack(myApi.func6(var3),myApi.const5))
end
local function do2(arg1)
return myApi.func4(var3)[myApi.func5(var1)]
end
for index=1,50 do
do1()
print(do2(myApi.func2(do2(var3))))
end
return table.pack(myApi.func7(var1,var2,var3))
should become something like this-
os.loadApi("myApi")local a,b,c=myApi,table,print
local d,e,f=a.func1(),a.func2
local g,h=e(d),function()return a.func4(f)[a.func5(d)]end
for i=1,50 do
f=a.func3(g,f)c(b.unpack(a.func6(f),a.const5))c(h(e(h(f))))
end
return b.pack(a.func7(d,g,f))