Re: Haskell-Cafe Digest, Vol 174, Issue 9

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Haskell-Cafe Digest, Vol 174, Issue 9

Doug McIlroy
Thanks for the quidk reply. Please do send info about local
arrangements. All I know is the dates.

I read your shell assignment (but haven't yet looked at your
program). It's a very good model of real life with Unix, particularly
in regard to data laundry: automate what you can, but check the
results. And that often feeds back into insight about further
automation. I was once doing just such a  job (in this case, trying
to devise pronunciation rules for a text-to-speech system) when I
got tired of using an editor to scan a dictionary that was too
big to fit. I asked Ken Thompson if he could extract the editor's
regular-expression recognizer into a free standing program. It
turned out he had already done so for his own private use. Thus
did grep make its appearance among Unix tools.

Incidentally, you suggest using sed to get rid of carriage
returns, disguised as ^M--very confusing because as a regular
expression ^M means an M at the beginning of a line. The
simplest solution I know is tr -d '\r'.

For another revealing shell exercise you may like
http://www.cs.dartmouth.edu/~doug/sieve.pdf. The shell
stuff begins on page 4. Then comes truly lovely code
in Haskell.

Doug
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.