summaryrefslogtreecommitdiff
path: root/indra/newview/scripts
AgeCommit message (Collapse)Author
2024-03-19search xml file in the lib, if path is not full; add test lua floater scriptsMnikolenko Productengine
2024-03-14Add preliminary Lua viewer API modules, with test scripts.Nat Goodspeed
2024-03-14Fix a bug in leap.generate().Nat Goodspeed
We weren't passing the WaitForReqid instance to WaitForReqid:wait(). Also remove 'reqid' from responses returned by leap.request() and generate().
2024-03-13util.join() is unnecessary: luau provides table.concat().Nat Goodspeed
2024-03-13Fix minor bugs. Sprinkle in commented-out diagnostic output.Nat Goodspeed
2024-03-13Introduce a resume() wrapper to surface coroutine errors.Nat Goodspeed
2024-03-13Make a coro.resume() wrapper and use in coro.launch(), coro.yield().Nat Goodspeed
coro.resume() checks the ok boolean returned by coroutine.resume() and, if not ok, propagates the error. This avoids coroutine errors getting swallowed.
2024-03-11Add coro.lua to aggregate created coroutines.Nat Goodspeed
2024-03-11Lua already has a conventional cheap test for empty table.Nat Goodspeed
2024-03-11Polish up leap.lua to make it pass tests.Nat Goodspeed
Add usage comments at the top. Add leap.done() function. Make leap.process() honor leap.done(), also recognize an incoming nil from the viewer to mean it's all done. Support leap.WaitFor with nil priority to mean "don't self-enable." This obviates leap.WaitForReqid:enable() and disable() overrides that do nothing. Add diagnostic logging.
2024-03-11Make WaitQueue:_wait_waiters() skip dead coroutines.Nat Goodspeed
That is, skip coroutines that have gone dead since they decided to wait on Dequeue().
2024-03-07Finish adding leap.WaitFor and WaitForReqid. Untested.Nat Goodspeed
2024-03-07Finish WaitQueue, ErrorQueue; add util.count(), join(); extend qtest.Nat Goodspeed
For WaitQueue, nail down the mechanism for declaring a subclass and for calling a base-class method from a subclass override. Break out new _wake_waiters() method from Enqueue(): we need to do the same from close(), in case there are waiting consumers. Also, in Lua, 0 is not false. Instead of bundling a normal/error flag with every queued value, make ErrorQueue overload its _closed attribute. Once you call ErrorQueue:Error(), every subsequent Dequeue() call by any consumer will re-raise the same error. util.count() literally counts entries in a table, since #t is documented to be unreliable. (If you create a list with 5 entries and delete the middle one, #t might return 2 or it might return 5, but it won't return 4.) util.join() fixes a curious omission from Luau's string library: like Python's str.join(), it concatenates all the strings from a list with an optional separator. We assume that incrementally building a list of strings and then doing a single allocation for the desired result string is cheaper than reallocating each of a sequence of partial concatenated results. Add qtest test that posts individual items to a WaitQueue, waking waiting consumers to retrieve the next available result. Add test proving that calling ErrorQueue:Error() propagates the error to all consumers.
2024-03-06WIP: Unfinished Queue.lua, WaitQueue.lua, ErrorQueue.lua, leap.lua.Nat Goodspeed
Also qtest.lua to exercise the queue classes and inspect.lua (from https://github.com/kikito/inspect.lua) for debugging.
2024-02-29Fix wonky Unicode chars from web pasteNat Goodspeed
2024-02-29Add Queue.lua from roblox.com documentation.Nat Goodspeed
2024-02-29Clarify that the print output from testmod.lua is load-time.Nat Goodspeed
2024-02-29Add indra/newview/scripts/lua directory, copied into viewer image.Nat Goodspeed