guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A better way to run shell cmd?


From: Daniel Hartwig
Subject: Re: A better way to run shell cmd?
Date: Wed, 13 Jun 2012 18:12:52 +0800

On 13 June 2012 18:02, Nala Ginrut <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]