Working around minimalistic lua ...

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Working around minimalistic lua ...

Italo Maia
Well, it seems Lua has a strong commitment with keeping its API simple, which is not a bad thing, of course. Languages like python, have a strong sales point with its "batteries included" policy, where most commonly used libraries are packed together with the interpreter.

Maybe Lua could sap some of "batteries included" marketing power by endorsing rocks or libraries (or defining interfaces) as standard implementations of certain functionalities. Lua does not have native support for classes, per example, but it has many libraries which allows you to work with classes quite easely. The problem is that they are not always compatible with one each other.

This particular (and common) problem could be solved with a advise in the lua page. Something like: "if you need classes, use this library" or "if you're building a classes library, make sure it is compatible with this pattern/interface".

Opinions?

--
"A arrogância é a arma dos fracos."

===========================
Me. Italo Moreira Campelo Maia
Co-fundador do Grupo de Usuários Python do Ceará
Secretário ForHacker (fb.com/ForHackerSpace)
Desenvolvedor Full-Stack, Escritor, Empresário, Visionário
-----------------------------------------------------
Meu Livro, Site, Blog
===========================
Reply | Threaded
Open this post in threaded view
|

Re: Working around minimalistic lua ...

Sean Conner
It was thus said that the Great Italo Maia once stated:

> Well, it seems Lua has a strong commitment with keeping its API simple,
> which is not a bad thing, of course. Languages like python, have a strong
> sales point with its "batteries included" policy, where most commonly used
> libraries are packed together with the interpreter.
>
> Maybe Lua could sap some of "batteries included" marketing power by
> endorsing rocks or libraries (or defining interfaces) as standard
> implementations of certain functionalities. Lua does not have native
> support for classes, per example, but it has *many libraries* which allows
> you to work with classes quite easely. The problem is that they are not
> always compatible with one each other.
>
> This particular (and common) problem could be solved with a advise in the
> lua page. Something like: "if you need classes, use this library" or "if
> you're building a classes library, make sure it is compatible with this
> pattern/interface".
>
> Opinions?

  This has come up before:

http://lua-users.org/lists/lua-l/2017-03/msg00371.html
http://lua-users.org/lists/lua-l/2017-03/msg00391.html
http://lua-users.org/lists/lua-l/2017-04/msg00063.html
http://lua-users.org/lists/lua-l/2017-04/msg00133.html

and that's just *this* year.  If you are trying to reach consensus, it'll
take a long time and you might not even reach a consensus (for instance---I
have no desire for Lua to become even more object oriented).

  There is a Lua Wiki:

        http://lua-users.org/wiki/

and anyone can edit the pages ...

  -spc (


Reply | Threaded
Open this post in threaded view
|

Re: Working around minimalistic lua ...

Peter Aronoff
In reply to this post by Italo Maia
Italo Maia <[hidden email]> wrote:
> Opinions?

As you'll no doubt hear, this has come up a lot with no real forward
momentum. I just want you to be aware of the history and adjust your
expectations accordingly. You're not likely to get what you want.

There used to be a useful website called LuaToolbox. It's gone now, but
some of its functionality has been folded into LuaRocks (https://luarocks.org).

One feature you might like in particular is labels. They allow you to
search for say, yaml-, json-, or string-related modules:

https://luarocks.org/labels/yaml
https://luarocks.org/labels/json
https://luarocks.org/labels/string

>From there you can see how many downloads have been made. That's not
an ideal way to choose between options, but it's something.

@ Hisham and Pierre: In the transfer from LuaToolbox to LuaRocks, the
endorsements got lost. Is there any way to get them back? I think that
feature was useful. It's more than mere numbers of downloads.

Best, Peter

--
We have not been faced with the need to satisfy someone else's
requirements, and for this freedom we are grateful.
    Dennis Ritchie and Ken Thompson, The UNIX Time-Sharing System

Reply | Threaded
Open this post in threaded view
|

Re: Working around minimalistic lua ...

Russell Haley
In reply to this post by Italo Maia
On Mon, Jun 19, 2017 at 3:53 PM, Italo Maia <[hidden email]> wrote:

> Well, it seems Lua has a strong commitment with keeping its API simple,
> which is not a bad thing, of course. Languages like python, have a strong
> sales point with its "batteries included" policy, where most commonly used
> libraries are packed together with the interpreter.
>
> Maybe Lua could sap some of "batteries included" marketing power by
> endorsing rocks or libraries (or defining interfaces) as standard
> implementations of certain functionalities. Lua does not have native support
> for classes, per example, but it has many libraries which allows you to work
> with classes quite easely. The problem is that they are not always
> compatible with one each other.
>
> This particular (and common) problem could be solved with a advise in the
> lua page. Something like: "if you need classes, use this library" or "if
> you're building a classes library, make sure it is compatible with this
> pattern/interface".
>
> Opinions?

Hi Italo,

I love Lua. It's such an awesome little language. I often think "why
aren't more people using Lua?". But the truth I am discovering is Lua
is used all over the place. It's used to script games (Roblox,
GarysMod are the two I am most familiar with). It's used to dissect
Ethernet packets in Wireshark. I found out that OpenWRT uses Lua to
interface against all the various services it needs to expose. Lua is
EVERYWHERE! And it's used everywhere because it's fast, simple, and
does not have a bunch of "extra stuff" attached to the language.

I think the position that the Lua team has taken is the pragmatic one.
Take json parsers for example. Which parser does Lua officially
endorse? I like dkjson (a respected person suggested it and it's
worked out great). Others have other opinions for various reasons.

There has been some discussion about a "Lua Foundation" but I don't
think anyone can agree on what that would look like either. I had
suggested that LuaRocks authors have a page to endorse their favorite
projects, but in some ways that would just be petrol on the fire too.

The reason (some of us) are attracted to Lua is the build from scratch
mentality, that's why there are so many variations. And I don't think
that pattern is unsuccessful. Just look at GNU/Linux. While there are
some REALLY frustrating things about all the variations, the
variations are the reason GNU/Linux is a success. Just think, what if
someone said, "thall shalt use init V forever" or "There shall be no
other windowing system than X"?

There have been a few murmurings on the list since I've been here
about creating a new "with batteries" package (I think I even
suggested it once!) but I don't think anybody has the desire or time
to do such things. Where does it stop? What does "enough batteries"
look like?

Anyway, the source is there, it's easy to build and add things to Lua
so maybe that's a project you could initiate? You might even get some
interest from some on the list. Just remember though, that's another
Lua variant...

Cheers!
Russ

> --
> "A arrogância é a arma dos fracos."
>
> ===========================
> Me. Italo Moreira Campelo Maia
> Co-fundador do Grupo de Usuários Python do Ceará
> Secretário ForHacker (fb.com/ForHackerSpace)
> Desenvolvedor Full-Stack, Escritor, Empresário, Visionário
> -----------------------------------------------------
> Meu Livro, Site, Blog
> ===========================

Reply | Threaded
Open this post in threaded view
|

Re: Working around minimalistic lua ...

Pierre Chapuis
In reply to this post by Peter Aronoff
June 20, 2017 3:30 AM, "Peter Aronoff" <[hidden email]> wrote:

> @ Hisham and Pierre: In the transfer from LuaToolbox to LuaRocks, the
> endorsements got lost. Is there any way to get them back? I think that
> feature was useful. It's more than mere numbers of downloads.

This has already been discussed during the migrations, eventually
endorsements were turned into follows. Both Hisham and me do agree
they're not really the same thing, but it's really Leaf who maintains
the LuaRocks website (and Etiene who did the migration).

Check out the GitHub issue [1] for more details. I do think there
are still missing features which make LuaRocks not as good for that
purpose as Lua Toolbox was, but having it be a separate website was
not really viable anymore.

[1] https://github.com/luarocks/luarocks-site/pull/86#issuecomment-198058329

--
Pierre Chapuis