<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Clowns In My Coffee &#187; Atom/AtomPub</title>
	<atom:link href="http://clownsinmycoffee.net/category/atomatompub/feed/" rel="self" type="application/rss+xml" />
	<link>http://clownsinmycoffee.net</link>
	<description>Inanity of the most cogent sort you can find.</description>
	<pubDate>Thu, 02 Oct 2008 11:41:56 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<item>
		<title>Regular Expressions are Good For You</title>
		<link>http://clownsinmycoffee.net/2007/03/16/called-out/</link>
		<comments>http://clownsinmycoffee.net/2007/03/16/called-out/#comments</comments>
		<pubDate>Fri, 16 Mar 2007 04:19:29 +0000</pubDate>
		<dc:creator>adam</dc:creator>
		
		<category><![CDATA[Atom/AtomPub]]></category>

		<category><![CDATA[nerdination]]></category>

		<guid isPermaLink="false">http://clownsinmycoffee.net/2007/03/16/called-out/</guid>
		<description><![CDATA[ Or: what good is folly if you&#8217;re not going to persist in it?
So, in a discussion on the Atom protocol list, I asserted (paraphrasing myself) that any language one would want to implement the protocol in would have first-class support for regular expressions.  The response I got referred to three things: C, C++, [...]]]></description>
			<content:encoded><![CDATA[<p> Or: what good is folly if you&#8217;re not going to persist in it?</p>
<p>So, in a discussion on the Atom protocol list, I asserted (paraphrasing myself) that any language one would want to implement the protocol in would have first-class support for regular expressions.  The response I got referred to three things: C, C++, and the fact that Java did not have first class support for regexes until version 1.4.</p>
<p>The context of my comment, by the way, is microparsing XML &#8212; that is, XML formats that hide semantically significant information in the text content of an element, instead of using elements or attributes to represent the data; such situations should be avoided.  It&#8217;s made even more abstract by the fact that I imagined a situation where APP <em>required</em> the use of regular expressions.  That&#8217;s slightly silly as a rhetorical starting place, but really, I was just off-put by an opening salvo that suggested that it would be expecting too much of APP implementors to have to understand regular expressions.</p>
<p>Here&#8217;s a more defensible proposition: if you work with user-submitted content on the web, it behooves you to know how to use regular expressions; if your favoured language doesn&#8217;t have first class support for them, then it behooves you to find a library that lets you use them.  Not every text-processing problem is a nail, but there are an awful lot of nails about nonetheless.   I&#8217;ve been known to use regexes to parse dates now and again, not that I recommend it as a practice (you don&#8217;t know a programming language until you know how to use a good portion of its standard libraries; learn those libraries, folks).</p>
<p>I was of course being slightly provocative with the &#8220;first-class&#8221; aspect of it, but I don&#8217;t feel a need to back off from that too much.  I can also back <em>very slightly</em> off of &#8220;regular expressions,&#8221; since what I really believe is that any language worth using &#8220;on the web,&#8221; where there is lots of text to be processed, should have standard <em>or readily available</em> powerful text  query and manipulation capabilities.  What that amounts to, for practical purposes, is that you need regular expressions.  Sure, there are other ways to match and process text, but in general they&#8217;re more verbose and less powerful than regexes (quick: extract the longest sequence of digits from a user-submitted string without using regular expressions).  If there&#8217;s anything close to a <i>lingua franca</i> of general text manipulation and extraction, it&#8217;s Perl-style regular expression.  Yeah, you heard me.  Perl.</p>
<p>To fend off one misinterpretation, I am not suggesting that regexes should be used to parse HTML or XML, but there&#8217;s a whole world of information inside attribute values and element text; if you&#8217;re not going to treat such stuff as unstructured blobs, you&#8217;ll want a way to muck with it.  Depending on what type of information you&#8217;re interested in, your need to do so might be somewhat minimal, but it would be prudent to have access to the power of regular expressions.</p>
<p>So, where does that leave my slightly-less-emboldened claim with respect to that list of programming languages?  Well, let&#8217;s take it in reverse order.  It has been <em>five years</em> since J2SE 1.4 [<a href="#regex-note1"><sup>1</sup></a> ] was released unto the world.   It&#8217;s not a <em>new</em> feature of the language; two major revisions of the language have come out since 1.4.  There are, I understand, people out there who are stuck with pre-1.4 JDKs (<a href="http://java.sun.com/j2se/1.3/download.html" title="Sun JDK 1.3 download page with end-of-life notification">tick-tock</a>) .  I am genuinely unaware how many of them would want to run APP servers or clients.  If they&#8217;re really stuck, there are several high quality regular expression packages available for the platform.</p>
<p>I suppose I could snark off and suggest one wouldn&#8217;t want to use C or C++.  After all, the popularity of C and C++ as <em>web development languages</em> lag significantly behind that of (to pick a few examples) PHP, Perl, Ruby, and Java.  That&#8217;s a pretty thin reed, though: I doubt that regular expression support has much, if anything, to do with the explanation for this fact.  But suppose you&#8217;re embarking on a web-related project and you&#8217;ve chosen C or C++?  Would you want to do it without regexes?  Perhaps so, but why are you foregoing the power they bring to the table?  Your reluctance is beginning to seem a little &#8230; pathological.  Use PCRE or Boost.   Join us.</p>
<p>[ <a name="regex-note1"><sup>1</sup></a> ] One is permitted, should one so wish, to note that pre-1.4 Java lacked standard  library support for one of those execrable markup languages the kids are on about today.</p>
]]></content:encoded>
			<wfw:commentRss>http://clownsinmycoffee.net/2007/03/16/called-out/feed/</wfw:commentRss>
		</item>
		<item>
		<title>It May Even be &#8230; Atomic</title>
		<link>http://clownsinmycoffee.net/2007/01/28/it-may-even-be-atomic/</link>
		<comments>http://clownsinmycoffee.net/2007/01/28/it-may-even-be-atomic/#comments</comments>
		<pubDate>Sun, 28 Jan 2007 00:00:02 +0000</pubDate>
		<dc:creator>adam</dc:creator>
		
		<category><![CDATA[Atom/AtomPub]]></category>

		<guid isPermaLink="false">http://clownsinmycoffee.net/2007/01/28/it-may-even-be-atomic/</guid>
		<description><![CDATA[The recent foofaraw concerning Wordpress&#8217; laggardly progress towards providing Atom 1.0 support out of the box reminded me that I should update Ben Smedberg&#8217;s plugin, at least until I get around to installing &#8220;2.1.1&#8221; hereabouts.
Work continues on the Atom Publishing Protocol, and on implementations thereof.  Sylvain Hellegouarch started a list of APP implementations.  [...]]]></description>
			<content:encoded><![CDATA[<p>The recent foofaraw concerning Wordpress&#8217; laggardly progress towards providing Atom 1.0 support out of the box reminded me that I should update <a href="http://benjamin.smedbergs.us/wordpress-atom-1.0/">Ben Smedberg&#8217;s plugin</a>, at least until I get around to installing &#8220;<a href="http://bitworking.org/news/104/Good-news-on-Atom-1-0-in-WordPress">2.1.1</a>&#8221; hereabouts.</p>
<p>Work continues on the Atom Publishing Protocol, and on implementations thereof.  Sylvain Hellegouarch started a list of <a href="http://www.intertwingly.net/wiki/pie/Implementations">APP implementations</a>.  Since it also looks like APP support will be added to Wordpress, it looks like we may be at or within a watershed moment for APP.  Or maybe we passed one a while ago, and I just noticed.  I&#8217;ll add to the above an informal listing of projects that are either nascent or about which I don&#8217;t know much:</p>
<ul>
<li><a href="http://rollerweblogger.org/roller/entry/good_news">Dave Johnson</a> brings <a title="ROME " href="https://rome.dev.java.net/servlets/ReadMsg?list=dev&#038;msgNo=2282">news</a> that an implementation based on <a title="ROME project home page" href="https://rome.dev.java.net">ROME</a> is in the works, which is all to the good.</li>
<li>It seems that Python and Java hackers have taken the lead on APP, but there are what I hope are more than <a title="atomapp project page on RubyForge" href="http://rubyforge.org/projects/atompp/">rumblings</a> on RubyForge and</li>
<li>&#8230; <a title="XML::Atom::Client" href="http://search.cpan.org/~miyagawa/XML-Atom-0.25/lib/XML/Atom/Client.pm">chatter</a> on CPAN &#8230;</li>
</ul>
<p>Out of all of these, I have only really used <a href="http://incubator.apache.org/abdera">Apache Abdera</a> so far.  Although the API is in a bit of flux (early days yet), the fact that it&#8217;s currently implemented around <a title="Introduction to AXIOM on java.net" href="http://today.java.net/pub/a/today/2005/05/10/axiom.html">AXIOM</a> disposes me toward it favorably if you&#8217;re working entirely with Atom feeds and the APP and you&#8217;re going to process large feed documents.  ROME is bound to JDOM, which means the whole XML document (including the overhead) has to be read into memory.  OTOH, using ROME gives you the ability to transform your Atom feeds into other formats, and maybe your application would benefit from having the whole document in front of it.</p>
<p>The availability of in-browser implementations, such as <a href="http://www.yulup.org/en/about.html">Yulup</a>, carries the promise of being able to quickly post to a lot of different blogs (or other content management systems) without having to visit a whole bunch of different web pages &#8212; at least when server-side APP support becomes widespread (on the Firefox extension front, see also <a title="Firefox extension for blog posting" href="http://performancing.com/firefox">Performancing</a>, which is not APP-specific).</p>
]]></content:encoded>
			<wfw:commentRss>http://clownsinmycoffee.net/2007/01/28/it-may-even-be-atomic/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
