Pocketlang
github.com
Pocketlang
1–10 of 63 posts
Re: Pocketlang
#2Re: Pocketlang
#3Re: Pocketlang
#4This is pretty neat. I’ve been tinkering with Lua on ARM, so I’m curious to know how it compares to LuaJIT.
Re: Pocketlang
#5Re: Pocketlang
#6Re: Pocketlang
#7What about generic algorithms like filter/map. Is it python style like map(fn, filter(...))?
Re: Pocketlang
#8Re: Pocketlang
#9Cute but pkInterpretSource() doesn't have any throttling, like the amount of instructions/nodes to execute before suspending, this would be very useful in games. You could limit NPC's ai to 50 instructions or so so that it doesn't cause rendering lag and the ai script would be run in multiple frames until it finishes.
For instance when evaluating NPC AIs it may be important that an NPC isn't left dangling in a random state at the end of a frame, but either has finished evaluating, or hasn't started yet.
https://thakeenathees.github.io/pocketlang/language-api-fibe...
Re: Pocketlang
#10[Edit]: To answer myself the API seems really clean and neat, it looks like the patterns used to implement the standard modules can be used as is - e.g. to implement a third party native module, a good pattern to start from is to observe how _fileOpen is implemented in cli/modules.c and added to module using pkModuleAddFunction