[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [SUGGESTION] Some lfs functionality in os library, please!
- From: Steve Litt <slitt@...>
- Date: Wed, 7 Sep 2016 13:38:06 -0400
On Thu, 8 Sep 2016 00:53:52 +1000
Daurnimator <quae@daurnimator.com> wrote:
> On 8 September 2016 at 00:40, Dirk Laurie <dirk.laurie@gmail.com>
> wrote:
> > Every time I require lfs, I ask myself: why is this stuff not in the
> > os library?
>
> Everytime I see the `os` library I ask: why did this come with lua? I
> always replace it with my own variants anyway.
>
> As the python community has slowly learned: the standard libraries are
> where functions go to die. see
> http://www.leancrew.com/all-this/2012/04/where-modules-go-to-die/
Fair enough.
Then why not have a Lua community curated, approved and documented
auxiliary library, with a package naming convention such that, assuming
distros follow that naming convention, you can pick any or all of that
auxiliary library?
<personal_opinion>
I think Lua is *by far* the best language in the world. So why do I use
Python almost exclusively these days? It's because I know if I start a
project in Python, I'll be able to complete it. Python has a well
curated set of libraries so that whether my need is XML parsing, SNMP,
YAML, HTTP requests, or pretty much anything else, my language provides
the stuff too techy for me to write from scratch. With Lua, I get no
such guarantee. I might not find the needed library, or I might need to
pick among three of them that do part of the job, and kludge the final
10% that none of the libraries give me.
I understand that I'm nowhere near representative of Lua users. I have
little interest in writing games, firmware, C-Lua interfaces, and the
like. I write plain old computer applications, which is where you need
better libraries. And because I'm atypical, my needs shouldn't
determine what gets thrown on the computer when you install Lua. As one
person posted: "pulling in another library for basic file operations is
not always possible when shipping with minimal builds of Lua."
Dirk wrote the following:
==========================================================
The absence of functions so basic that even CP/M and PC-DOS
had them is the one thing that stops Lua from breaking into
the Perl/Python cartel of scripted system programming.
==========================================================
I'm a piece of anecdotal evidence to the preceding assertion. I was
firmly in the Lua fold for two years, but every time I started a
project, I had to figure out whether I could finish it in Lua, and if
not, I had to do it in Python. Eventually I just switched to the Python
part of the Perl/Python/Ruby cartel. There are probably a million more
like me.
So what's the benefit of bringing in people like me? More minds, more
coding ideas, and more (non-core) libraries. More people to identify
and fix problems. More visibility, more day jobs using Lua.
Please understand, I like the Lua language just the way it is, and
hope that in the year 2216 it will still have exactly two complex
data types: Table and Metatable. I'm not advocating a change to the
language, nor am I advocating a change in what gets installed when you
install Lua. All I'm advocating is a well named set of Lua community
curated, documented and approved auxiliary libraries that can be
installed en-masse or a-la-carte, so that the person starting a project
in Lua can finish it in Lua without resorting to crazy hacks.
</personal_opinion>
SteveT
Steve Litt
September 2016 featured book: Twenty Eight Tales of Troubleshooting
http://www.troubleshooters.com/28