John Belmonte

lua-users home
wiki

Difference (from prior major revision) (no other diffs)

Added: 11a12
* [scope exit hooks] (Lua 5.4 to-be-closed variables)

Changed: 13c14,17
I wrote a chapter in [Lua Programming Gems] on exceptions. I presented [Exception patterns in Lua] at the second Lua workshop, in 2006.
Presentations / publications
* article: [Structured concurrency and Lua] (2022)
* chapter: Exceptions in Lua, [Lua Programming Gems] (2008)
* presentation: [Exception patterns in Lua], second Lua workshop (2006)

Removed: 34,38d37
== PROJECT IDEAS ==
These are in order from impossible to really-impossible. I hope someone does this stuff so I don't have to.
* Lua-based build system - something like Jam [1] could be done ten times better using Lua. It would also allow programs using Lua to easily share info with the build system... a big win for managing complex program data. (See LuaBuildSystems)
* alternate implementation of Lua in D - (someone has finally attempted, see [Lua-D])


Changed: 77c76
* No scope hook metamechanism. Many applications expose scarce resources to the scripting environment such as locks; handles for files, memory, and database transactions; etc. Such resources need to be released promptly and deterministically after use, and despite any exceptional condition in the program. Of course this can be accomplished with Lua as it is, but the resulting code is hard to follow, highly error prone, and makes heavy use of protected calls-- limiting potential use of coroutines. This could be resolved if Lua provided a way to hook into scope exit events. See [Lua: Improving deterministic resource cleanup]. (Covered by Lua 5.4 "to-be-closed" variables.)
* No scope hook metamechanism. Many applications expose scarce resources to the scripting environment such as locks; handles for files, memory, and database transactions; etc. Such resources need to be released promptly and deterministically after use, and despite any exceptional condition in the program. Moreover, Python's context managers (`with` statement) demonstrate endless uses for such a feature. Of course this can be accomplished with Lua as it is, but the resulting code is hard to follow, highly error prone, and makes heavy use of protected calls-- limiting potential use of coroutines. This could be resolved if Lua provided a way to hook into scope exit events. See [Lua: Improving deterministic resource cleanup]. (Covered by Lua 5.4 "to-be-closed" variables.)

mailto:john@neggie.net

Lua-user, man behind the wiki curtain. (Challenge: say "lua-users" ten times fast.)

I've influenced Lua by successful lobbying for:

Presentations / publications

My Pages (or at least pages I started)

My posts to lua-l [1]

Favorite lua-users wiki pages

lua-users.org is...

I think Python PEP's [3] are a great source of info. Find out where Python was flawed and how it's being fixed. Learn about Python's implementations of the latest language fads.

I'd like to mention a wonderful property of (most) wiki implementations that may not be entirely obvious. They forget the past. Although an edit history is maintained for each page, it fades out over time. So deleted mistakes, unkind words, and useless material really disappear unless someone explicitly acts to revive or archive them. This is quite a different concept from the mailing list or newsgroup where, in the case of a public forum, every word may likely be archived until the end of civilization. An interesting article related to this subject is In Defense of the DELETE Key [4].

Here's how to use the unix wget command to make a static copy of this wiki for offline browsing. Of course you can't edit or search the wiki when offline, so that takes the fun out of things.

wget --mirror --html-extension --convert-links http://lua-users.org/wiki/

JOHN'S LUA WARTS

These points are serious and if not fixed eventually (I'm fairly patient) I'd consider starting a Lua derivative that implements them:

These points are ugly but tolerable:

Historical warts which have been resolved:

        a = 5
        globals().a = 5


RecentChanges · preferences
edit · history
Last edited September 17, 2022 5:47 am GMT (diff)