[Top][All Lists]

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

Re: suggestion about nameing MU_STREAM_READ/WRITE...

From: Alain Magloire
Subject: Re: suggestion about nameing MU_STREAM_READ/WRITE...
Date: Sun, 3 Jun 2001 22:57:15 -0400 (EDT)

  Still heavy rain here, last post.

> for i in `searchmsg --header=Subject "matching string"`
> do
>   datehdr=`msgproperties --print-header=Date $i`
>   datehdr=`datetosec $datehdr`
>   datehdr=`date -s '+%Y.%m.%d'
>   max=`msgproperties --print-attachment-count $i`
>   for d = 1, d < $max;
>     # ACK! my shell programming is good enough for day to day
>     # stuff, but incrementing a counter through a loop is where
>     # I usually drop into perl.
>     # and you need to get the mime attripute for file name out
>     # of a header, maybe with sed, and...
>   readmsg $i > `date '+%Y.%m.%d'`
> done

We can almost do this with GNU date, GNU mailutils frm.

for i in `searchmsg --header=Subject "matching string"`
 # mailutils frm does not take argument to print a single message .. yet.
 ## datehdr=`frm --field=Date $i`
 # so we cope with grep/sed.
 datehdr=`frm --field=Date -n |grep -E "^$i" | sed -e "s/^$i//"`
 datehdr=`date --date $datehdr +%Y.%m%d`

 max=`msgproperties --print-attachment-count $i`
 while [ $d -ne $max ];
   readmsg $i > $datehdr
   d=`exprt $i + 1`

> And it starts to be almost as complex as the C code...

Na .. sure it will be slower.

> Anyhow, you either have to provide utilities with command lines
> complex enough they become a language in themselves (a la "find"),
> or do lots of work in the shell.

Or provide lots of small utilities that can do specialize tasks
and glue them with the shell.

Remember MH (Mail Handler).  One thing on my todo list is to port it.

> All of which is fine if you need to write in sh, but
> given the choice between sh and perl...

I choose ... java.

> > > I could have done it with perl, but
> > 
> > aaarrgg!!.  Arrie`re, arrie`re de'mon!!
> Je ne comprende pas. (Et Je veux apprendre les phrases pour
"[not] at all"
[pas] du tout.

"a little"
un peu.

la plupart du temps.

> And a few 10's of thousands of other french words...)

You just have to remember one, "oui".  And one onomatopoeia
"ooh la la" ..

> I'm really torn on this. C and C++ are truly general purpose
> programming languages, they're used for so many kinds of things
> I think it would have been hard to get any agreement.
> What frustrates me is that nobody manages to get an equivalent
> of CPAN for C++. There are a dozen perl packages on
> CPAN for dealing with mail and mime, they weren't designed
> by committee, or standardized, they just got written, and
> since they're useful they get used and extended.

I remember in interview Bjarne Stroustrup, saying the same thing
not the same manner though, he was using the Java classes/packages
as an example.
> What I'd like to see is the FSF and other open-source groups
> committing energy to developing C apis, like mailutils. Some
> projects, like gzip, have library versions, but what about
> tar? What about find? Mailutils is an example of how I
> think things should be all the time.

If it still raining on your side of the world(it is here)
I'm working on inetutils.  The idea is to break it into
small libs that can be quickly use. For example,
ftp --> libftp.a
tftp --> libtftp.a
etc ..

> And an MTA that delivers to local mailboxes with a /sbin/sendmail
> compatible interface, that queues mail for remote delivery,
> and acts as an SMTP client. I think this would be easy using
> the mailutils API. If I ever get sieve working that's what
> I think I want to do next.


> nullmailer is ok, but it doesn't deliver locally.

au revoir, alain
Aussi haut que l'on soit assis, on est toujours assis que sur son cul !!!

reply via email to

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