Releases: kurapica/PLoop
Releases · kurapica/PLoop
Imporve Reactive System
Fix reactive system errors
[2.0.3] - 2025-03-31 WangxH [email protected]
Fixed
- Fix the reactive list can't wrap the elements with the given element type.
[2.0.2] - 2025-03-26 Wangxh [email protected]
Changed
- The
environmentis registered as keyword, we can use it to declare custom environments like
env = environment([init][, parent])or call a function with custom environment
env = environment(func, [init][, parent]) watch([reactives, ]func[, environment])support custom environment to the watch function, could provide special observable features by it.
Fix Operator Subscription error
require "PLoop" (function(_ENV)
Logger.Default:AddHandler(print)
subject = Subject()
local ob
observable = Observable(function(observer)
return subject:Subscribe(observer)
end)
observable:Map("x => x ^ 2"):Dump()
subject:OnNext(1)
subject:OnNext(2)
end)For code like this, the operator(like Map)'s Subscription assignment is incorrect, will auto cancel the subscription, fixed.
reactive-watch system
- The new design reactive-watch system done.
- Range is added for range number sets with operations.
DependencyInjection Done
ENABLE_ARGUMENTS_ATTACHMENTandENABLE_RETURN_ATTACHMENTis added to the platform settings.- Method overlaod informations can be fetched when
ENABLE_ARGUMENTS_ATTACHMENTis on. - Return informations can be fetched when
ENABLE_RETURN_ATTACHMENTis on. System.DependencyInjectionis added, check the 024.dependencyinjection.md for more informations.
Cumulative patch
[1.6.33] - 2021-06-09 WangXH [email protected]
Added
- System.Date now has a property "Week" to get the week number, which the monday is the first day of the week, [0, 53].
Changed
- The "DayOfWeek" property of System.Date will return 0 - sunday, 1 - monday and etc
- The Behavior Subject can hold nil value now.
[1.6.32] - 2021-06-01 WangXH [email protected]
Added
- System.Date now support
date + secoperation, a new date will be returned, negative number can be used. - System.Collections.IDictionary has a new
ToTablemethod, it will return a raw hash table for the selected items. - System.Collections.IList has a new
ToTablemethod, it will return a raw hash table for the selected items. - System.Serialization.TargetFormat & System.Serialization.SerializeFormat is added, the attribute can be used on class, property, member to specific the target format to string or number, normally only used on the Date class, default is number, so a date object will be serialize/deserialze to a number format.
bitwise modify
- Use custom bit func instead of the bitwise in Lua5.3, since 64bit bitwise will cause bugs in features like CRC32.
- Improve the System.Net.Socket and System.Net.MQTT libs.
Imporve the Observable System & fix a major bug in DataBase
[1.6.28] - 2021-01-04 WangXH [email protected]
Changed
- Fix the data base convertor not working.
[1.6.27] - 2020-12-22 WangXH [email protected]
Added
- System.PropertyType, System.EventType is added to validate the property and event objects.
Changed
- Observable.From now support the property marked with
__Observable__attribute.
THREAD_POOL_CONTEXT_ONLY setting for OpenResty is added
[1.6.25] - 2020-11-26 WangXH [email protected]
Added
- A new platform setting
THREAD_POOL_CONTEXT_ONLYis 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 theMULTI_OS_THREADsetting is no need to be used by OpenResty.
Fix the Delegate issues
[1.6.24] - 2020-11-24 WangXH [email protected]
Changed
- Fix the Delegate invoke error if remove handler from it.