[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua as replacement for Bash scripting
- From: Alexander Gladysh <agladysh@...>
- Date: Tue, 13 Jul 2010 01:41:03 +0400
On Tue, Jul 13, 2010 at 01:37, Hisham <hisham.hm@gmail.com> wrote:
> On Mon, Jul 12, 2010 at 6:27 PM, Alexander Gladysh <agladysh@gmail.com> wrote:
>> BTW. Perhaps I've missed it in the earlier discussion, but why do we
>> write calls in reverse?
>> Isn't this better? It would allow some fancier chaining if we need one:
>> if sh.find("/etc", {name="*rc", ctime="+30"}).ok() then ...
> This would take over the entire namespace of sh.*.
Perhaps it is OK? A bit non-orthodoxal, but what if we keep other,
utility APIs in other namespace?
> Also, if we ever
> manage to implement piping like grep().sort(), special functions in
> the end like ok() could clash with program names.
sh. find("/etc", {name="*rc", ctime="+30"}) .I. sort ().out
(That is capital "I", not vertical slash.)
Starts to look a bit perlish though...
Alexander.
- References:
- Lua as replacement for Bash scripting, Alexander Gladysh
- Re: Lua as replacement for Bash scripting, Jerome Vuarand
- Re: Lua as replacement for Bash scripting, Alexander Gladysh
- Re: Lua as replacement for Bash scripting, Jerome Vuarand
- Re: Lua as replacement for Bash scripting, Hisham
- Re: Lua as replacement for Bash scripting, Alexander Gladysh
- Re: Lua as replacement for Bash scripting, Florian Weimer
- Re: Lua as replacement for Bash scripting, Javier Guerra Giraldez
- Re: Lua as replacement for Bash scripting, Alexander Gladysh
- Re: Lua as replacement for Bash scripting, Hisham
- Re: Lua as replacement for Bash scripting, Alexander Gladysh
- Re: Lua as replacement for Bash scripting, Hisham