This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Shell-style programming in Kawa
- From: Jamison Hope <jrh at theptrgroup dot com>
- To: "kawa at sourceware dot org list" <kawa at sourceware dot org>
- Date: Thu, 13 Feb 2014 17:04:46 -0500
- Subject: Re: Shell-style programming in Kawa
- Authentication-results: sourceware.org; auth=none
- References: <52C4B518 dot 5080000 at bothner dot com> <A72FB562-9459-4C69-B346-A6C94DBD22C4 at theptrgroup dot com> <52FBC89B dot 6020800 at bothner dot com>
On Feb 12, 2014, at 2:16 PM, Per Bothner <per@bothner.com> wrote:
> 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/
Excellent, thanks.
> 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.
Very cool. Is there something special about how kawa.lib.system
definitions get loaded? If I copy/paste pipe-process, %pipe-process,
and pipeProcessValidateApply into a new file with slightly changed
names (appending '2' to each), the validate-apply key gets ignored:
#|kawa:1|# (require test.test_inlining)
#|kawa:2|# (pipe-process2 "abc\ndef" &`{grep a})
java.lang.RuntimeException: %pipe-process2 called
It still fails if I point to the real pipeProcessValidateApply, too:
(define-procedure %pipe-process3
validate-apply: "kawa.lib.system:pipeProcessValidateApply"
(lambda (e1 e2)
(java.lang.RuntimeException "%pipe-process3 called")))
#|kawa:3|# (pipe-process3 "abc" &`{grep a})
java.lang.RuntimeException: %pipe-process3 called
--
Jamison Hope
The PTR Group
www.theptrgroup.com