This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Shell-style programming in Kawa


On 01/22/2014 04:01 PM, Jamison Hope wrote:
However, the syntax can get awfully verbose, especially setting up
a pipeline with more than two stages.

$ a | b

becoming

&`[in: &`{a}]{b}

isn't too bad, but

$ a | b | c | d | e

becoming

&`[in: &`[in: &`[in: &`[in: &`{a}]{b}]{c}]{d}]{e}

is kind of unwieldy.

I checked in a new 'pipe-process' macro.  I updated the blog page
(search for the "Pipe-lines" section):
http://per.bothner.com/blog/2014/Kawa-shell-programming/

You might also find interesting the implementation: It's
my first macro/function combination where the "validate"
handler is written in Scheme.  See kawa/lib/system.scm.
It's a little klunky, but not too bad.
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]