Re: Suitability of Lua as a userland-programming language?

From: Bertrand Petit <freebsd-hackers_at_phoe.frmug.org>
Date: Thu, 05 Sep 2024 16:13:24 UTC
On Thu, Sep 05, 2024 at 02:18:17PM +0000, Bridger Dyson-Smith wrote:
> 
> Do you think incorporating a third-party Lua module would be acceptable?
> E.g. https://github.com/lunarmodules/Penlight

	That looks promising, it is modelled after Python batteries, that is a
good thing. When evaluating such libraries, after glancing at the range of
tackled problems and the interfaces proposed to solve them, because it is a
difficult problem, I always focus on date and time handling. It is not rosy,
see [1]. Right now I can't pronounce myself for or against the bulk of the
library, one must actually use it to forge an opinion, I can only say that the
documentation is not par to my expectations--the output of a doxygen-like tool
is never good enough IMHO.

	The only Lua code I have is running in kernel as a set of ZFS channel
programs, an environment where one can't import libraries, this make testing
Penlight difficult for me. Testing must await for a medium size project not
requiring network access which I should write in Lua instead of Python.


[1] https://github.com/lunarmodules/Penlight/issues/285

-- 
%!PS -- Bertrand Petit
/D{def}def/E{exch}D/G{get}D/I{2 div}D/U{dup}D/L{roll}D/Y{setgray}D/N{newpath}D
/O{N 0 0 moveto}D/P{pop}D/T{translate}D currentpagedevice/PageSize G U 0 G/w E
D 1 G /h E D w I h I T 0 Y 1 setlinewidth 0 1 2 { P 120 rotate 2 4 w U mul h U
mul add sqrt I 50 add {N 50 0 3 2 L 0 360 arc stroke}for}for/s{O true charpath
pathbbox exch 4 -1 L E sub I 3 1 L sub I} D /l(bp)D 0.94 Y /Helvetica findfont
22 scalefont setfont l s P(x)s exch P T O l show showpage