On 13 June 2012 18:02, Nala Ginrut <[email protected]> wrote:
> hi Daniel, thanks for reply!
> I tried guile-lib just now, it's nice. I'll use it.

Yes, guile-lib has lots of great code in it. :-)

>
> Besides, do you think pipe is the proper way to implement "sed" function?
> Or it's better to implement a module with pure Guile?

This depends on how often you use it, and on how much data.

On the one hand, sed is very powerful, already written, and works
well.  On the other hand, opening the pipe has some overhead, but you
won't notice this unless you are processing lots of very short strings
individually.

The main thing I have used pipes for is compressing data.  This is
done once per file, and the files are relatively large.  In this case
the overhead for creating each pipe is tiny, much less than writing
and debugging my own version of gzip in Scheme.

Regards

Reply via email to