Hi folks,

I would like to use an external program to process some text, and the
<process-stream> word seems to be the right choice, but I can't get it
working. I wrote this, for example:

"sort" ascii <process-stream> [ "a\nc\nb\n" write flush 1000 read ] with-stream

...hoping that it would leave a string of sorted lines on the top of
the stack. But it fails with a broken-pipe error.

In other languages, I'd flush and close the input descriptor before
trying to read from the output descriptor, and I suspect that's what's
wrong here, but don't know how to do that on a duplex stream. Any
suggestions?

Thanks,
Graham

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to