Awesome-Lua on Hacker News

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

Awesome-Lua on Hacker News

steve donovan
https://news.ycombinator.com/item?id=8191285

Confusing for the users of the window manager, as observed.

Rather spoilt my Monday actually:

"Can we PLEASE not refer people to penlight anymore? It's half broken,
poorly documented, and poorly maintained. It drives me crazy to see it
referred to all over the place as a good example of anything."

Sigh, if one pays attention to every random guy on the Internet....

steve d.

Reply | Threaded
Open this post in threaded view
|

Re: Awesome-Lua on Hacker News

Ryan Pusztai

Steve,

I use penlight everyday and it is my one requirement for all my apps. I am not sure where that person is coming from. Please don't take it to hard. After all they could contribute to the project if it bothered them enough.

Thanks for all you do and I love penlight!
--
Regards,
Ryan

Sent from my phone

On Aug 18, 2014 5:36 AM, "steve donovan" <[hidden email]> wrote:
https://news.ycombinator.com/item?id=8191285

Confusing for the users of the window manager, as observed.

Rather spoilt my Monday actually:

"Can we PLEASE not refer people to penlight anymore? It's half broken,
poorly documented, and poorly maintained. It drives me crazy to see it
referred to all over the place as a good example of anything."

Sigh, if one pays attention to every random guy on the Internet....

steve d.

Reply | Threaded
Open this post in threaded view
|

Re: Awesome-Lua on Hacker News

steve donovan
On Mon, Aug 18, 2014 at 2:34 PM, Ryan Pusztai <[hidden email]> wrote:
> I use penlight everyday and it is my one requirement for all my apps. I am
> not sure where that person is coming from.

Thanks Ryan - never take the internet personally....

BTW, PL is always open to suggestions, bugs and PRs.  As well as any
general pointers for further directions....

Back on topic, it seems that this curated-list thing meets a need; we
were hoping that some machinery will evolve around MoonRocks so that
people could rate projects just like on Pierre's
https://lua-toolbox.com/.

steve d.

Reply | Threaded
Open this post in threaded view
|

Re: Awesome-Lua on Hacker News

Andrew Starks


On Monday, August 18, 2014, steve donovan <[hidden email]> wrote:
On Mon, Aug 18, 2014 at 2:34 PM, Ryan Pusztai <<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;rpusztai@gmail.com&#39;)">rpusztai@...> wrote:
> I use penlight everyday and it is my one requirement for all my apps. I am
> not sure where that person is coming from.

Thanks Ryan - never take the internet personally....

BTW, PL is always open to suggestions, bugs and PRs.  As well as any
general pointers for further directions....

Back on topic, it seems that this curated-list thing meets a need; we
were hoping that some machinery will evolve around MoonRocks so that
people could rate projects just like on Pierre's
https://lua-toolbox.com/.

steve d.


I echo Ryan. PL is special to me for another reason:


At the time that I was introduced to Lua, I sought out the "must have" libraries. Those don't exist, but PL seemed closest. 

As a library, it's fine and since I don't have any history with Perl, I didn't find the choices made to be at all relevant. 

The. Most. Important. Feature of PL was the documentation. It was relatively complete by FOSS standards and  the narrative portions provided a good dose of the thinking behind the design. 

Narrative / conversational prose is so often discouraged from technical manuals, in favor of sticking to only auto-generated API documentation with, if you are lucky, topic-centric, paragraph-sized sentences. Tutorials, walk-throughs, etc are for blogs. 

PL's object system does need help. It is broken, if you use class properties. I've posted issues on this, but they look more like feature requests and I think that is because:

1: the object system in PL could benefit from some breaking changes. 

2: perhaps object systems are best left hand made and ad-hoc. At most, pl might provide some common utility templates for objects, but beyond that,
Meh. 

I've posted a few suggestions (and a patch) for pretty.write. I've found that looping tables (stack overflows) can be an issue if the objects use unique metatables and I still maintain a fork that provides a mechanism to exclude certain keys, but i don't think that approach is ideal. It's probably better to make a filter factory that receives an include/exclude key list... Or something. 

Anyway, in short: documentation great. Love PL. Thanks! 

-Andrew
Reply | Threaded
Open this post in threaded view
|

Re: Awesome-Lua on Hacker News

steve donovan
On Mon, Aug 18, 2014 at 3:27 PM, Andrew Starks <[hidden email]> wrote:
> The. Most. Important. Feature of PL was the documentation. It was relatively
> complete by FOSS standards and  the narrative portions provided a good dose
> of the thinking behind the design.

Now I'm happy ;)  Exactly what the intention was.  Always room for
improvement, of course.

> 1: the object system in PL could benefit from some breaking changes.

I'd like to see how far we could push changes that would not break the
basic contracts of this object system; (1) objects have a shared
metatable containing their methods  (2) this metatable is what we mean
by the object's "class" (3) this "class" itself has a metatable which
is callable and makes it usable as a constructor  (4) inheritance
happens through copying inherited methods into the class ("fat
metatable").   But perhaps that's mixing interface with implementation
too much - I'd say that (1) and (2) are the crucial ones.

> 2: perhaps object systems are best left hand made and ad-hoc. At most, pl
> might provide some common utility templates for objects

They're useful in a lazy way, if the problem matches the OOP pattern.
Of course in Lua OOP should never be religion and often first-class
functions are the cleanest solution.

And pretty.write isn't so very pretty - we can learn from Paul K's Serpent...

steve d.

Reply | Threaded
Open this post in threaded view
|

Re: Awesome-Lua on Hacker News

Roland
In reply to this post by steve donovan
Dear Steve,

Well, I do reckon that this is quite mean. I haven't used intensively Penlight, but if I was asked to mention one of the best packages/module from which I learnt useful things, I will definitely name Penlight. I found the code extremly clean and thoroughly understandable. In some occasion, I even grabbed some part of it that I used for inspiration to implement my own utility functions. I even reused some portions of Penlight in my libraries (Moses[1] and Allen[2]). Penlight is a very nice module. Large indeed, with multiple files (which can be a problem to some people, yet thre is Microlight[3]) but definitely a great package. And it is not broken. I do not think so. All the functions I tested by myself seemed to be working as expected.

And second point to which I do not agree, Penlight is not poorly documented. Actually, there is a pretty much complete documentation for every single function and also a in-depth and extensive tutorial for Penlight generated with LDoc[4].

So, well, you are right, do not pay much attention to what people say on the Internet. In case I have a specific issue with a library I need for, I will just reach the author and submit my suggestions and rants, so that he can improve his work.

PS/ And well, Penlight got 278 stars on Github as of this writing. It just means you must have done something right in the view of approximately that amount of people :)

[1] : http://github.com/Yonaba/moses
[2] : http://github.com/Yonaba/Allen
[3] : http://github.com/stevedonovan/Microlight
[4] : http://github.com/stevedonovan/LDoc
Reply | Threaded
Open this post in threaded view
|

Re: Awesome-Lua on Hacker News

Tiago Katcipis
In reply to this post by steve donovan
Just the fact that the guy didn't pointed out what exactly is broken and what is poorly documented totally discredits his affirmations.

It is quite easy to just toss crap on others, i can just say "Lua is half broken, it is not documented, it is utter crap...bla bla bla"...quite easy :-).

I never used penlight, mainly because i found it after a lot of stuff have already been done (totally my fault of course, i should have searched for something like "lua batteries" on the beginning of the project :-). But from what i have seen it is quite well documented and i will definitely give it a try on my next Lua project :-).


On Mon, Aug 18, 2014 at 6:36 AM, steve donovan <[hidden email]> wrote:
https://news.ycombinator.com/item?id=8191285

Confusing for the users of the window manager, as observed.

Rather spoilt my Monday actually:

"Can we PLEASE not refer people to penlight anymore? It's half broken,
poorly documented, and poorly maintained. It drives me crazy to see it
referred to all over the place as a good example of anything."

Sigh, if one pays attention to every random guy on the Internet....

steve d.


Reply | Threaded
Open this post in threaded view
|

Re: Awesome-Lua on Hacker News

Hisham
In reply to this post by steve donovan
I recently ran some statistics for the first time on download numbers
for LuaRocks modules in the original server (I think I had access.log
data for the last two years or so). I don't have it here with me now
(they're somewhere in a harddrive that just woke up dead this morning)
but IIRC Penlight was the most popular rock apart from the ones that
originated at PUC (like LuaSocket, LPeg, LuaFileSystem). I don't
recall the exact rankings but I can dig it up.

Penlight is an essential project in the Lua ecosystem.

-- Hisham

On 18 August 2014 06:36, steve donovan <[hidden email]> wrote:

> https://news.ycombinator.com/item?id=8191285
>
> Confusing for the users of the window manager, as observed.
>
> Rather spoilt my Monday actually:
>
> "Can we PLEASE not refer people to penlight anymore? It's half broken,
> poorly documented, and poorly maintained. It drives me crazy to see it
> referred to all over the place as a good example of anything."
>
> Sigh, if one pays attention to every random guy on the Internet....
>
> steve d.
>