<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: LMX 1.0 released</title>
	<atom:link href="http://boredzo.org/blog/archives/2007-03-03/lmx-10-released/feed" rel="self" type="application/rss+xml" />
	<link>http://boredzo.org/blog/archives/2007-03-03/lmx-10-released</link>
	<description>The personal weblog of Peter Hosey.</description>
	<lastBuildDate>Thu, 04 Mar 2010 07:09:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jason</title>
		<link>http://boredzo.org/blog/archives/2007-03-03/lmx-10-released/comment-page-1#comment-16140</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Thu, 29 Mar 2007 00:33:11 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/archives/2007-03-03/lmx-10-released#comment-16140</guid>
		<description>Wow, everyone but Simon seems unnecessarily negative about this.  Anyways, thank you for making this available, it&#039;s a very useful idea.</description>
		<content:encoded><![CDATA[<p>Wow, everyone but Simon seems unnecessarily negative about this.  Anyways, thank you for making this available, it's a very useful idea.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Hosey</title>
		<link>http://boredzo.org/blog/archives/2007-03-03/lmx-10-released/comment-page-1#comment-12090</link>
		<dc:creator>Peter Hosey</dc:creator>
		<pubDate>Thu, 15 Mar 2007 06:06:51 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/archives/2007-03-03/lmx-10-released#comment-12090</guid>
		<description>Yeah, I&#039;ve seen a couple of other LMXen on Google since releasing 1.0 (I didn&#039;t look previously—oops). Here&#039;s hoping that nobody makes a beef about it.</description>
		<content:encoded><![CDATA[<p>Yeah, I've seen a couple of other LMXen on Google since releasing 1.0 (I didn't look previously—oops). Here's hoping that nobody makes a beef about it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alastair</title>
		<link>http://boredzo.org/blog/archives/2007-03-03/lmx-10-released/comment-page-1#comment-12068</link>
		<dc:creator>Alastair</dc:creator>
		<pubDate>Thu, 15 Mar 2007 00:38:24 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/archives/2007-03-03/lmx-10-released#comment-12068</guid>
		<description>Interesting choice for name.  Did you know that there is already another application called &lt;a href=&quot;http://www.tech-know-ware.com/lmx/&quot; rel=&quot;nofollow&quot;&gt;LMX&lt;/a&gt;?  It is used for code generation and reading/writing in an XML Beans fashion.  Was somewhat confusing for me as we actually use &lt;a href=&quot;http://www.tech-know-ware.com/lmx/&quot; rel=&quot;nofollow&quot;&gt;LMX&lt;/a&gt; in our development (not this particular LMX that is).</description>
		<content:encoded><![CDATA[<p>Interesting choice for name.  Did you know that there is already another application called <a href="http://www.tech-know-ware.com/lmx/" rel="nofollow">LMX</a>?  It is used for code generation and reading/writing in an XML Beans fashion.  Was somewhat confusing for me as we actually use <a href="http://www.tech-know-ware.com/lmx/" rel="nofollow">LMX</a> in our development (not this particular LMX that is).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dethe Elza</title>
		<link>http://boredzo.org/blog/archives/2007-03-03/lmx-10-released/comment-page-1#comment-12060</link>
		<dc:creator>Dethe Elza</dc:creator>
		<pubDate>Wed, 14 Mar 2007 22:04:07 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/archives/2007-03-03/lmx-10-released#comment-12060</guid>
		<description>What I&#039;ve done in similar circumstance is to put each XML snippet on its own line and use standard line-oriented tools (tail in the shell, for instance) to trim off the ones I&#039;m interested in.  For parsing snippets of XML you can use two approaches.  The first is to wrap them in a single tag before passing them to your parser.  The second is useful when you want to get the whole list but don&#039;t want to have an end-tag (so you can keep appending to the file): add the starting tag, omit the end tag, use the SAX api for parsing and simply catch the error about the missing end tag.  Either way its pretty easy to get last-N messages.</description>
		<content:encoded><![CDATA[<p>What I've done in similar circumstance is to put each XML snippet on its own line and use standard line-oriented tools (tail in the shell, for instance) to trim off the ones I'm interested in.  For parsing snippets of XML you can use two approaches.  The first is to wrap them in a single tag before passing them to your parser.  The second is useful when you want to get the whole list but don't want to have an end-tag (so you can keep appending to the file): add the starting tag, omit the end tag, use the SAX api for parsing and simply catch the error about the missing end tag.  Either way its pretty easy to get last-N messages.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Hosey</title>
		<link>http://boredzo.org/blog/archives/2007-03-03/lmx-10-released/comment-page-1#comment-11961</link>
		<dc:creator>Peter Hosey</dc:creator>
		<pubDate>Mon, 12 Mar 2007 20:09:44 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/archives/2007-03-03/lmx-10-released#comment-11961</guid>
		<description>Neither POSIX nor File Manager nor NSFileHandle has an insert mode, regardless of underlying file-system. I don&#039;t know about any other operating systems&#039; file I/O APIs.</description>
		<content:encoded><![CDATA[<p>Neither POSIX nor File Manager nor NSFileHandle has an insert mode, regardless of underlying file-system. I don't know about any other operating systems' file I/O APIs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Håkan W</title>
		<link>http://boredzo.org/blog/archives/2007-03-03/lmx-10-released/comment-page-1#comment-11955</link>
		<dc:creator>Håkan W</dc:creator>
		<pubDate>Mon, 12 Mar 2007 19:29:02 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/archives/2007-03-03/lmx-10-released#comment-11955</guid>
		<description>Oh, that&#039;s interesting. Offtopic random question: do you know if this is something HFS+-specific, or is the problem a general disk one? Are there file systems that do have a &quot;prepend&quot; mode? I admit my knowledge in that kind of territory is not the strongest.</description>
		<content:encoded><![CDATA[<p>Oh, that's interesting. Offtopic random question: do you know if this is something HFS+-specific, or is the problem a general disk one? Are there file systems that do have a "prepend" mode? I admit my knowledge in that kind of territory is not the strongest.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Hosey</title>
		<link>http://boredzo.org/blog/archives/2007-03-03/lmx-10-released/comment-page-1#comment-11928</link>
		<dc:creator>Peter Hosey</dc:creator>
		<pubDate>Mon, 12 Mar 2007 05:18:58 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/archives/2007-03-03/lmx-10-released#comment-11928</guid>
		<description>No, because then we would need to rewrite all the previously-written files every time (file I/O does not have an insert mode, only overwrite). This would get very expensive for very long logs, and some people leave the chat open all the time.</description>
		<content:encoded><![CDATA[<p>No, because then we would need to rewrite all the previously-written files every time (file I/O does not have an insert mode, only overwrite). This would get very expensive for very long logs, and some people leave the chat open all the time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Håkan W</title>
		<link>http://boredzo.org/blog/archives/2007-03-03/lmx-10-released/comment-page-1#comment-11910</link>
		<dc:creator>Håkan W</dc:creator>
		<pubDate>Sun, 11 Mar 2007 16:35:45 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/archives/2007-03-03/lmx-10-released#comment-11910</guid>
		<description>Can&#039;t you just add every new message to the beginning of the file, putting them in newest-first order?</description>
		<content:encoded><![CDATA[<p>Can't you just add every new message to the beginning of the file, putting them in newest-first order?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Hosey</title>
		<link>http://boredzo.org/blog/archives/2007-03-03/lmx-10-released/comment-page-1#comment-11698</link>
		<dc:creator>Peter Hosey</dc:creator>
		<pubDate>Sat, 10 Mar 2007 17:24:03 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/archives/2007-03-03/lmx-10-released#comment-11698</guid>
		<description>Because the XML format satisfies all the requirements on our &lt;a href=&quot;http://trac.adiumx.com/wiki/LogFormatIdeas&quot; rel=&quot;nofollow&quot;&gt;LogFormatIdeas&lt;/a&gt; page.</description>
		<content:encoded><![CDATA[<p>Because the XML format satisfies all the requirements on our <a href="http://trac.adiumx.com/wiki/LogFormatIdeas" rel="nofollow">LogFormatIdeas</a> page.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eugene Morozov</title>
		<link>http://boredzo.org/blog/archives/2007-03-03/lmx-10-released/comment-page-1#comment-11674</link>
		<dc:creator>Eugene Morozov</dc:creator>
		<pubDate>Sat, 10 Mar 2007 14:49:41 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/archives/2007-03-03/lmx-10-released#comment-11674</guid>
		<description>Why use XML at all in this case? I&#039;d say that using XML for logs and then writing another parser for it, is like creating problem out of nothing and spending significant effort to solve it.

There&#039;re plenty ways to store logs that wouldn&#039;t require backwards XML parser or XML parser at all.</description>
		<content:encoded><![CDATA[<p>Why use XML at all in this case? I'd say that using XML for logs and then writing another parser for it, is like creating problem out of nothing and spending significant effort to solve it.</p>
<p>There're plenty ways to store logs that wouldn't require backwards XML parser or XML parser at all.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Hosey</title>
		<link>http://boredzo.org/blog/archives/2007-03-03/lmx-10-released/comment-page-1#comment-10489</link>
		<dc:creator>Peter Hosey</dc:creator>
		<pubDate>Tue, 06 Mar 2007 06:12:01 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/archives/2007-03-03/lmx-10-released#comment-10489</guid>
		<description>Ah—the email just came in. Guess it got held up for some reason.</description>
		<content:encoded><![CDATA[<p>Ah—the email just came in. Guess it got held up for some reason.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Hosey</title>
		<link>http://boredzo.org/blog/archives/2007-03-03/lmx-10-released/comment-page-1#comment-10448</link>
		<dc:creator>Peter Hosey</dc:creator>
		<pubDate>Mon, 05 Mar 2007 22:00:43 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/archives/2007-03-03/lmx-10-released#comment-10448</guid>
		<description>Matt Thomas: (building on Joshua Gooden&#039;s comment) It&#039;s theoretically possible that an implementation of XSL could do the job lazily (as lazily as it can, after analyzing the style-sheet to find out how lazy that is), but I don&#039;t know if any such implementations exist. Besides, I don&#039;t think any of us thought of using XSL for this. :)

(Also, interestingly, your comment didn&#039;t get emailed to me. I wonder how that happened.)

Joshua Gooden: Yes, LMX is lazy. It reports start and end tags and character-runs as it finds them, and the parser allows any such callback to pause the parse and resume it later. Adium takes advantage of this by pausing the parse after &lt;var&gt;n&lt;/var&gt; messages, and then releasing the parser (never resuming it). This is subtly guaranteed by the API (see comment for -pause in LMXParser.h).

Simon Rolfe: Well, LMX is a library, not a tool unto itself, but yes, LMX could definitely be used to create such a tool. :)</description>
		<content:encoded><![CDATA[<p>Matt Thomas: (building on Joshua Gooden's comment) It's theoretically possible that an implementation of XSL could do the job lazily (as lazily as it can, after analyzing the style-sheet to find out how lazy that is), but I don't know if any such implementations exist. Besides, I don't think any of us thought of using XSL for this. :)</p>
<p>(Also, interestingly, your comment didn't get emailed to me. I wonder how that happened.)</p>
<p>Joshua Gooden: Yes, LMX is lazy. It reports start and end tags and character-runs as it finds them, and the parser allows any such callback to pause the parse and resume it later. Adium takes advantage of this by pausing the parse after <var>n</var> messages, and then releasing the parser (never resuming it). This is subtly guaranteed by the API (see comment for -pause in LMXParser.h).</p>
<p>Simon Rolfe: Well, LMX is a library, not a tool unto itself, but yes, LMX could definitely be used to create such a tool. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon Rolfe</title>
		<link>http://boredzo.org/blog/archives/2007-03-03/lmx-10-released/comment-page-1#comment-10447</link>
		<dc:creator>Simon Rolfe</dc:creator>
		<pubDate>Mon, 05 Mar 2007 21:27:34 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/archives/2007-03-03/lmx-10-released#comment-10447</guid>
		<description>This could be hugely useful as a tail replacement for XML-formatted log files of any sort - seeing as more and more services are logging to XMLish structures, I can see LMX becoming a really handy tool.</description>
		<content:encoded><![CDATA[<p>This could be hugely useful as a tail replacement for XML-formatted log files of any sort - seeing as more and more services are logging to XMLish structures, I can see LMX becoming a really handy tool.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joshua Gooden</title>
		<link>http://boredzo.org/blog/archives/2007-03-03/lmx-10-released/comment-page-1#comment-10443</link>
		<dc:creator>Joshua Gooden</dc:creator>
		<pubDate>Mon, 05 Mar 2007 20:39:23 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/archives/2007-03-03/lmx-10-released#comment-10443</guid>
		<description>That solution still requires that a DOM tree be built and parsed in order to re-order the elements. DOM trees are hugely memory hungry beasts, and though I haven&#039;t looked at the LMX source, I would imagine that it lazy parses the XML doc, saving hugely on memory and CPU requirements.</description>
		<content:encoded><![CDATA[<p>That solution still requires that a DOM tree be built and parsed in order to re-order the elements. DOM trees are hugely memory hungry beasts, and though I haven't looked at the LMX source, I would imagine that it lazy parses the XML doc, saving hugely on memory and CPU requirements.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Thomas</title>
		<link>http://boredzo.org/blog/archives/2007-03-03/lmx-10-released/comment-page-1#comment-10442</link>
		<dc:creator>Matt Thomas</dc:creator>
		<pubDate>Mon, 05 Mar 2007 20:35:51 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/archives/2007-03-03/lmx-10-released#comment-10442</guid>
		<description>Another solution could be to run it through xslt. The syntax would go something like this:
&lt;code&gt;
&lt;xsl:for-each select=&quot;message&quot;&gt;
    &lt;xsl:sort select=&quot;position()&quot; order=&quot;descending&quot; data-type=&quot;number&quot; /&gt;
    &lt;xsl:apply-templates select=&quot;.&quot;/&gt;
&lt;/xsl:for-each&gt;
&lt;/code&gt;
&lt;i&gt;(hopefully wordpress will render this correctly)&lt;/i&gt;</description>
		<content:encoded><![CDATA[<p>Another solution could be to run it through xslt. The syntax would go something like this:<br />
<code><br />
&lt;xsl:for-each select="message"&gt;<br />
    &lt;xsl:sort select="position()" order="descending" data-type="number" /&gt;<br />
    &lt;xsl:apply-templates select="."/&gt;<br />
&lt;/xsl:for-each&gt;<br />
</code><br />
<i>(hopefully wordpress will render this correctly)</i></p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.781 seconds -->
