help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: how to manipulate data like awk or perl when visiting a file


From: Ted Zlatanov
Subject: Re: how to manipulate data like awk or perl when visiting a file
Date: Tue, 30 Dec 2008 08:57:48 -0600
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux)

On Tue, 30 Dec 2008 00:59:28 -0600 Harry Putnam <reader@newsguy.com> wrote: 

HP> I got pretty interested reading [Xah's] comparison of perl vs elisp. 

HP> What prompted my question here was that I had no access to shell tools
HP> or perl on a specific machine I was on right then, so it got me to
HP> thinking why I never see much mention of using elisp for those kinds
HP> of jobs.

HP> Its an interesting subject but in fact I'm rarely in that situation
HP> so usually rely on shell tools awk and perl.  Those I have some small
HP> grasp of.

The biggest problem with ELisp file processing vs. Perl/awk/etc. is that
efficient line-by-line processing is not possible.  Thus you're limited
to either byte offsets or what will fit in a buffer.  This is a big
inconvenience for large files.

Also, concise one-liners are trivial with Perl and awk, while Emacs
one-liners are painfully verbose (with the one saving grace that $
doesn't show up much in ELisp code).  By the time you're on the third
screen line, you've forgotten what you needed in the first place.

Ted


reply via email to

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