home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!ub4b!news.cs.kuleuven.ac.be!blekul11!frmop11!barilvm!vms.huji.ac.il!wisipc.weizmann.ac.il!menora.weizmann.ac.il
- dov
- Newsgroups: alt.sources
- Subject: Re: med -- expression evaluator and stream-based math processor
- Message-ID: <1992Nov18.131601.6986@wisipc.weizmann.ac.il>
- From: dov@menora.weizmann.ac.il (Dov Grobgeld)
- Date: Wed, 18 Nov 1992 13:16:01 GMT
- Sender: news@wisipc.weizmann.ac.il
- References: <1992Nov16.160145.7707@athena.mit.edu>
- Organization: Weizmann Institute of Science, Computation Center.
- Lines: 29
-
- scs@adam.mit.edu (Steve Summit) writes:
- :
- : It will be noted that med is an awful lot like awk, much less
- : flexible in general, but optimized for performing arithmetic on
- : columns of numbers. Purists will claim that med is superfluous
- : and unnecessary, because it can't do anything awk can't do; they
- : are in fact correct. (med was originally a throwaway, I brought
- : it to its current, mostly "finished" state only because I was
- : doing a lot of manipulation of data files on some MS-DOS machines
- : lacking awk.)
- :
- [Lot's of stuff and source deleted.]
-
- But MS-Dos has got Perl. Here's my Perl variant of the same program:
-
- perl -ne 's/^\s+//; @c=split; print $c[2] . " " . sqrt($c[0]^2+$c[1]^2)' in.dat
-
- I make these kind of filters all of the time to do coordinate
- transformations in my research.
-
- Why reinvent the wheel when the wheel is a swiss motor chain-saw?
- --
- ___ ___
- / o \ o \
- Dov Grobgeld ( o o ) o |
- The Weizmann Institute of Science, Israel \ o /o o /
- "Where the tree of wisdom carries oranges" | | | |
- _| |_ _| |_
-
-