Berkeley CSUA MOTD:Entry 25822
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/05/25 [General] UID:1000 Activity:popular
5/25    

2002/9/9-10 [Computer/Theory, Computer/SW/Unix] UID:25822 Activity:high
9/9     Let's say I am writing a multi-threaded email client and I want to
        allow for messages to be sorted. Problem: to sort elements I need
        all elements and if this thing is supposed to scale retrieving all
        messages when changing a sort order will not work. How do real world
        mail clients or applications in general deal with this?
        \_ you only fetch the headers and sort based on that info...
           thats how current clients do it.. you fetch the body when
           you actually want to read the message. -shac
           \_ I think he was asking "how do i sort this if I've got incoming
              email at the same time I'm sorting?".
              \_ i actually read that as "retrieving all messages every time
                 i change a sort order..." which makes more sense... all you
                 need to do is before you resort check if there are new
                 message headers, if so then add them, THEN resort. some
                 mail clients dont even do that.. you hafta tell it to check
                 for new messages, then resort by date or subject. -shac
                        \_ yup, that's it. The problem is not re-sorting but
                           (avoiding) retrieving all messages because there
                                can be a lot of them and if there are many
                                users there goes the neighborhood. I can't
                                retrieve all messages because it's a
                                web-based client with pagination (think OWA)
                                so there's a space vs time trade-off and I
                                am always fetching headers a page at a time.
                                IMAP server-side sort should solve
                                this but apparently it's still in experimental
                                stages... --OP
                           can be a lot of them and if there are many users
                           there goes the neighborhood. I can't retrieve all
                           messages because it's a web-based client with
                           pagination (think OWA) so there's a space vs time
                           trade-off and I am always fetching headers a page
                           at a time. IMAP server-side sort should solve this
                           but apparently it's still in experimental stages...
                           --OP [ reformatted - motdformatd ]
                 \_ Your bad English grammar fu is superior to mine.  I bow to
                    your superior ability to decipher non-English texts and
                    extract meaning.
        \_ no idea how commercial apps do it but as a first cut how about you
           sort what you've got and then do an insertion sort on any new mail?
           Most folks are mostly sorting on date received so you'll just end
           up sticking new mail at the front or back.  If you know what you're
           sorting on such as date you can take advantage of that fact to speed
           things up and "cheat".
2025/05/25 [General] UID:1000 Activity:popular
5/25    

You may also be interested in these entries...
2012/8/30-11/7 [Computer/SW/Apps, Computer/SW/Unix] UID:54470 Activity:nil
8/30    Is wall just dead? The wallall command dies for me, muttering
        something about /var/wall/ttys not existing.
        \_ its seen a great drop in usage, though it seems mostly functional.
            -ERic
        \_ Couldn't open wall log!: Bad file descriptor
           Could not open wall subscription directory /var/wall/ttys: No such file or directory
	...
2011/11/20-2012/2/6 [Computer/Companies/Apple, Computer/SW/Unix] UID:54237 Activity:nil
11/20   Are there tools that can justify a chunk of plain ASCII text by
        replacing words with words of similar meaning and inserting/removing
        commas into the text?  I received a 40-line plain text mail where
        all the lines are justified on left and right.  Every word and comma
        is followed by only one space, and every period is followed by two
        spaces.  The guy is my kid's karate instructor which I don't think is
	...
2011/10/26-12/6 [Computer/SW/Unix] UID:54202 Activity:nil
10/24  What's an easy way to see if say column 3 of a file matches a list of
       expressions in a file? Basically I want to combine "grep -f <file>"
       to store the patterns and awk's $3 ~ /(AAA|BBB|CCC)/ ... I realize
       I can do this with "egrep -f " and use regexp instead of strings, but
       was wondering if there was some magic way to do this.
       \_ UNIX has no magic. Make a shell script to produce the ask or egrep
	...
2010/11/21-2011/1/13 [Computer/SW/Languages/Web] UID:53988 Activity:moderate
11/21   Lifehacker's recommending Dreamhost as a personal web hosting service.
        Apart from csua, who do you guys use? --erikred
        \_ What do you want to use it for? Do you need CGI or PHP?  My
           brother worked for Dreamhost and said they are unethical. In
           fact, he sued them. This refers to their treatment of customers
           and employees both. I don't know who  or what "Lifehacker" is,
	...
2010/8/29-9/30 [Recreation/Humor, Politics/Foreign/Europe, Computer/Theory] UID:53940 Activity:nil
8/29    http://www.google.nl/trends?q=ramadan,+porno&ctab=0&geo=ma&date=all&sort=0
        Funny graph.  -- linkpusher
	...