From ... Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed1.e.nsc.no!nsc.no!nextra.com!uio.no!nntp.uio.no!not-for-mail From: Erik Naggum Newsgroups: comp.lang.lisp Subject: Re: XML->sexpr ideas Date: 20 Jan 2004 04:08:55 +0000 Organization: Naggum Software, Oslo, Norway Lines: 50 Message-ID: <3283560535880752KL2065E@naggum.no> References: <3283503882585065KL2065E_-_@naggum.no> <60VOb.229245$0P1.199252@twister.nyc.rr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: readme.uio.no 1074571736 13227 129.240.65.210 (20 Jan 2004 04:08:56 GMT) X-Complaints-To: abuse@uio.no NNTP-Posting-Date: Tue, 20 Jan 2004 04:08:56 +0000 (UTC) Mail-Copies-To: never User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Xref: archiver1.google.com comp.lang.lisp:10342 * Kenny Tilton | First, thx, <>s are nice. Heh. My absence from news shows. Over here in Europe, «» are the proper quotation marks, instead of the various versions of " that are not in ISO 8859-1. The « and » are not integral to the name of the type, it's just "quad". | I was thinking about compiling some XML-alternative syntax into | internal Lisp structures (which is why I was wondering why I even need | someone else's proposal, I can just write the internal structures out | as READable forms). You always have to consider how much information you want to retain from the parsing process. The sexpr contains just enough information for its uses, but the only navigation you ever do with sexprs is to go down the CAR or CDR. | I see <> are something that allow one to navigate the structure | itself, and that this is useful if one does not want to gobble up the | whole of the structure. Hm, I think it makes most sense when you do want to gobble up the whole of the structure. The point about storing pointers to entity fragments using quads, too, was that contents usually dwarfs the markup in volume. When end-tags make up 25% of the volume of the document, however, the start-tags make up another 25%, and when I designed the quad and its various implementations in Common Lisp and in special languages, the strong desire was to be able to load large documents into memory. | I'll keep <>s in mind if I ever want a random-access markup | store. That seems like you decided on their utility before trying them out, while I have really tried to build a system as useful for XML-like data as the cons cell is for Lisp-like data. Instead of inventing the array and regarding cons cells as random access into the list, we just use lists made up cons cells because that affords the navigation we need when processing them. Likewise, the quad affords the navigation we need when processing XML-like structures. When I suggest that an implementation that does not provide the ability to add native types use a two-dimensional array, it is not because it makes random access into the document possible but because it saves a lot of memory. -- Erik Naggum | Oslo, Norway Act from reason, and failure makes you rethink and study harder. Act from faith, and failure makes you blame someone and push harder.