[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: pipeing fucntions
- From: Michal Kottman <k0mpjut0r@...>
- Date: Mon, 25 Jun 2012 20:03:46 +0200
On 25 June 2012 19:34, <firstname.lastname@example.org> wrote:
> (Warning! Newbie ahead!)
> With UNIX systems you can build chains of cammands
> on the commandline eacht connected via stdout/stdin.
> Is it possible to chain lua-functions in a similiar way, that is:
> To create an output stream with one function which gets the
> input stream of another function?
> Is taht possible (portable...)?
You can implement this kind of chaining (source -> filter -> ... ->
filter -> sink) using this code  by Diego Nehab, which is also
extensively used in LuaSocket. It is a very interesting reading and I
suggest you read through it.