[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] hererocks 0.10.0 - Lua/LuaRocks installation script
- From: Peter Melnichenko <mpeterval@...>
- Date: Fri, 15 Jul 2016 22:02:14 +0300
On Fri, Jul 15, 2016 at 8:02 PM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> 2016-07-14 20:55 GMT+02:00 Peter Melnichenko <mpeterval@gmail.com>:
>
>> I released version 0.10.0 of hererocks, a Python script for
>> fetching and installing Lua, LuaJIT and LuaRocks:
>>
>> https://github.com/mpeterv/hererocks
>
> Apart from the chicken-and-egg issue, why is the script not in Lua?
>
> This is not an aggressive question. The answer will, I hope,
> pinpoint some areas in which Lua and its ecosystem is not yet
> ideal for system maintenance scripts.
>
There are just a few things hererocks uses that I don't see good
replacements for in Lua ecosystem, namely 'subprocess' and
'tarfile' libraries. The first one deals with command execution,
I could reimplement argument quoting easily and then use
os.execute. The second one unpacks '.tar.gz' files, I'd have to use
or copy undocumented 'luarocks.tools.tar' module for that.
For other things I could just depend on existing solutions: argparse,
lua-zip, luasocket + luasec, lua-resty-string, a JSON lib, and penlight
(sadly not maintained). So, it's possible to implement it in Lua, but
the fact that in Python all this is in standard library is its another
advantage: the script can be distributed as a single file.
(Although if not for the checked-and-egg issue I would, of course,
implement hererocks in Lua).
-- Peter