[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Recommendations on my upcoming Lua presentation?
- From: Steve Litt <slitt@...>
- Date: Tue, 1 Feb 2011 18:54:15 -0500
On Tuesday 01 February 2011 17:50:49 Chris Babcock wrote:
> On Tue, Feb 1, 2011 at 5:50 AM, Steve Litt <email@example.com>
> > I don't think I have to get them to understand coroutines, if I can get
> > them to salivate about them. How could I, within 5 minutes, demonstrate a
> > wonderful benefit of coroutines?
> My personal favorite... filters:
Why use filters in Lua coroutines when you could do:
grep -v .jpg$ access_log | grep -v .gif$ | grep -v .class$ | \
calculate.lua | add_hdrs_and_footers.lua | \
sort | report.lua > traffic_report.txt
The preceding uses code pieces tested over and over again throughout the
years, and it either uses several of your processors or if you have two few it
uses tried and true Linux multitasking. Seems to me with that available it
makes no sense to debug your own coroutines.