lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


It was thus said that the Great Jim once stated:
> On 5/10/19, Sean Conner <sean@conman.org> wrote:
> > There are at least three modules providing regex in Lua available via
> > LuaRocks: Lrexlib-POSIX, Lrexlib-PCRE (most popular) and Lrexlib-PCRE2.
> > There's also at least two POSIX modules: lposix and luaposix (most popular).
> > There *is* a solution, it's just not a built-in one.
> 
> see ? this is exactly the problem, Sir.
> everybody reinvents the wheel again and again instead of combining
> efforts and put a decent solution into the Lua std lib for FREE,
> i. e. add such functionality to the "os" table where it in fact belongs.

  You might find it interesting to read this thread from September of 2016:

	http://lua-users.org/lists/lua-l/2016-09/msg00088.html

Some hightlights:  I go over potential difficulties in just enumerating
entries in a directory:

	http://lua-users.org/lists/lua-l/2016-09/msg00107.html

Some follow-up messages to that include the difficulties of enumerating
directories in Android and iOS (both systems Lua can run on):

	http://lua-users.org/lists/lua-l/2016-09/msg00123.html

or the lack of directories on Nucleus OS:

	http://lua-users.org/lists/lua-l/2016-09/msg00106.html

In this message:

	http://lua-users.org/lists/lua-l/2016-09/msg00089.html

Daurnimator links to this page:
	
	http://www.leancrew.com/all-this/2012/04/where-modules-go-to-die/

which is about Python's standard libraries and how they've stagnated. Steve
Litt suggested people step up and do a community curated, approved and
documented library:

	http://lua-users.org/lists/lua-l/2016-09/msg00099.html

but alas, no one stepped up (and this has been suggested several times in
fact).

  But the final word comes from Roberto:

	These are two sides of the same coin. They are left out because we
	find that an extra bother because they are not part of ISO C. Not
	being part of the standard makes them more bother to implement, more
	bother to test, more bother from people asking for new platforms,
	more bother for people asking for platform-specific options [see the
	list right now], etc. ISO C gives us a clear line where to stop.

	http://lua-users.org/lists/lua-l/2016-09/msg00115.html

  So my proposal follows Steve Litt's---come up with the missing functions,
package them up into a module and *SHOVE THEM DOWN THE COMMUNITY'S THROAT TO
USE THEM TO THE EXCLUSION OF ALL OTHER MODULES* and maybe then we can have
only one way to do it.  While making sure it works for not only POSIX but
Windows as well (and screw the other systems Lua runs on because they don't
count, right?)

  -spc ("All abstractions leak."  -- Joel Spolsky)