News for hackers. Stuff that matters.

vaughan0

Re:A Field Guide to Lua Coroutines on Monday July 01, 2013 @02:32PM (#5972646)
> "The main limitation of Lua coroutines is that, since they are implemented with setjmp(3) and longjmp(3), you cannot use them to call from Lua into C code that calls back into Lua that calls back into C, because the nested longjmp will clobber the C function’s stack frames. (This is detected at runtime, rather than failing silently.)"

Lua 5.2 provides a mechanism to help with this: http://www.lua.org/manual/5.2/manual.html#4.7

Re:Write More Classes on Tuesday February 12, 2013 @08:36AM (#5206634)
Personally I find myself avoiding writing in a functional style in Python because of it's lack of good anonymous function literals and poor handling of closures in nested functions.

Edit: when I say "poor handling of closures in nested functions" I'm referring to having to use nonlocal in order to modify variables in the parent function's scope.