Prototype Lua object-oriented program system and frameworks.
A new reactive & watch system is added to simple the usages of the reactivex.
require "PLoop" (function(_ENV)
switcher = reactive(false)
data = reactive{
on = "Go",
off = "Stop"
}
info = reactive{
label = watch(function(_ENV) return switcher and data.on or data.off end)
}
watch(function(_ENV) print("Info is " .. info.label) end) -- Info is Stop
switcher.Value = true -- Info is Go
data.on = "Continue" -- Info is Continue
end)
ENABLE_ARGUMENTS_ATTACHMENT
and ENABLE_RETURN_ATTACHMENT
is added to the platform settings.ENABLE_ARGUMENTS_ATTACHMENT
is on.ENABLE_RETURN_ATTACHMENT
is on.System.DependencyInjection
is added, check the 024.dependencyinjection.md for more informations.date + sec
operation, a new date will be returned, negative number can be used.ToTable
method, it will return a raw hash table for the selected items.ToTable
method, it will return a raw hash table for the selected items.__Observable__
attribute.THREAD_POOL_CONTEXT_ONLY
is added, to be used in servers, so each context use its own thread pool, the default pool is disabled. Platform like OpenResty should turn on it, and the MULTI_OS_THREAD
setting is no need to be used by OpenResty.TemplateString
system is added in System.Text, it provided a new string generator.PLOOP_PLATFORM_SETTINGS.DATA_CACHE_USE_FAKE_ENTITY
setting is added, so the data cache system will use fake cahe value to avoid cache penetration automatically, default true.PLOOP_PLATFORM_SETTINGS.DATA_CACHE_FAKE_ENTITY_TIMEOUT
setting is added, it's the timeout for the fake values of the data cache, default 3600(second).struct { Number }
and struct { [String] = Number }
will be auto sealed and unique, so the system won't generate multi struct types for the same types.lshift,rshift,band,bor,bnot,bxor
api is added in the System.Toolset
, they are generated based on the platform.__AutoCache__
attribute for multi thread platform, the result may only be cached when the code processe in the same context and the debug.getgetlocal API is provided.__AutoCache__
attribute can be used on method or functions, so the results will be cached for arguments, the func will return the cached value with the same arguments.Improve the web framework, __FileView__
added to use view as download file.
THREAD_SAFE_ITERATOR option added for platform like Openresty.
Modify the chain method behaviors of the list and dictionary.