Re: mailing list stuff in progress
Erik Enge <[email protected]> Wed, 16 Jul 2003 18:05:16 -0400
| Newsgroups | gmane.lisp.clump |
|---|---|
| Organization | Professional Reviews Inc. |
| Message-ID | <[email protected]> |
Miles Egan <[email protected]> writes: > All the message parsing stuff is pretty hacky. I'm hoping to dump it > all in favor of a standard library. Maybe once yours is ready? Last night I finished adding unit tests for the date parsing. It works pretty ok. My realization last night was that my approach will not scale very well. I decided to use CLOS to represent the various fields and parts of a message and the regex scanning plus the overhead of creating CLOS instances (as opposed to keeping just lists of strings) makes this approach not ideal for very-high volume use-cases. That said, I'll probably end up providing an alist-type implementation too where there are no CLOS instances and a message represation is basically as simple as: ((:header (:subject "Hey!") (:from "Erik Enge <[email protected]")) (:body "How's life?")) Which I bet would be much more efficient. /That/ said, my regexes can be optimized a thousand times by someone more proficient with them than me. I need to add code for the Keywords, Return and Received headers and the message class needs to be told about how many of the various fields it can legally keep. The reason this has taken me a bit of time is that I decided to do it with regexes and I'm only half-way into Jeffrey Friedl's book, being the regex-newbie that I am. Erik.