<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Hackdiary &#187; perl</title>
	<atom:link href="http://www.hackdiary.com/category/perl/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hackdiary.com</link>
	<description></description>
	<lastBuildDate>Thu, 12 Aug 2010 08:58:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Moyles-proof code</title>
		<link>http://www.hackdiary.com/2004/04/11/moyles-proof-code/</link>
		<comments>http://www.hackdiary.com/2004/04/11/moyles-proof-code/#comments</comments>
		<pubDate>Sun, 11 Apr 2004 14:32:17 +0000</pubDate>
		<dc:creator>Matt Biddulph</dc:creator>
				<category><![CDATA[perl]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.hackdiary.com/?p=54</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>While the rest of the UK was enjoying a Good Friday lie-in, I dragged myself into Yalding House (home of <a href="http://www.bbc.co.uk/radio1/">BBC Radio 1</a>) at 7.30am. I was there to see our new text message system get its first live broadcast use on the Chris Moyles show in a preview of the  <a href="http://www.bbc.co.uk/radio1/djs/tenhour/index.shtml">Ten Hour Takeover</a>.</p>
<p><span id="more-54"></span><br />
<i>This is a long piece&#8230; <a href="#on-air">skip to the end</a> if you want to see how it went on the day.</i></p>
<h4>The project</h4>
<p>I work for the beeb at Radio and Music Interactive, in the software architecture team. We&#8217;re responsible for the behind-the-scenes plumbing, running the systems behind things like <a href="http://www.bods.me.uk/rantnrave/2003/09/26/dab_text_on_bbci_radio_stations.live">LiveText</a>, and providing toolkits for the guys on the apps team who build public services. When Radio 1 came up with the takeover day (ten hours of radio with music selected entirely by the listeners via text message and phone), they asked us to build them something to deal with the expected deluge of messages.</p>
<p>As you probably know, <a href="http://news.bbc.co.uk/1/hi/technology/3368815.stm">text messaging is huge in the UK</a> and it&#8217;s been taken up enthusiastically by the BBC&#8217;s radio networks. Radio 1&#8242;s incoming SMS provider have a web console that&#8217;s used by the broadcast assistants and DJs in the studio. It works rather like an email inbox, and like most email clients the user interface treats the incoming messages as a chronological stream of text rather than a database to be mined for information. This works for running a regular radio show, but the takeover day needs special treatment.</p>
<p>Since the web console had been enough for the networks so far, this was our department&#8217;s first project based on machine-processing of SMS.  Knowing how important text is to the radio networks, we wanted to build a foundation of components that would support future applications. As every software engineer knows, it&#8217;s hard to &#8220;<a href="http://www.amazon.co.uk/exec/obidos/ASIN/0201835959/">build one to throw away</a>&#8221; after the users have got their hands on it.</p>
<h4>The build</h4>
<p>In our team the language of choice is Python, whereas the apps team prefer Perl. Contrary to what some might expect, this mixed economy hasn&#8217;t yet given us any interop problems. We&#8217;re very keen on using abstractions such as <a href="http://www.spread.org">asynchronous messaging</a>, <a href="http://internet.conveyor.com/RESTwiki/moin.cgi/FrontPage">REST</a>ful web services and relational databases to act as language-agnostic intermediaries for our data flows.</p>
<p>My immediate thoughts about the architecture were that it should be built from a series of loosely-coupled layers. Even solving the simple problem of how to pull in a high-volume external XML feed of text messages and redistribute it to applications would show benefits later if it was simple to hook new code into. Further layers could process the data, with a web user interface layered on top of that. Working from a specification of the XML format used by the provider, Paul Clifford quickly built a gateway that collected messages and rebroadcast them over a message bus. Using asynchronous messaging as a transport gives us a good level of resilience and clusterability for free, while keeping the logic very simple. Building on this, he then started work on code to push messages sent to Radio 1 into a database and analyse their contents.</p>
<p>We wanted to provide simple, useful features to the users such as freetext search, but we thought we could do more given that the incoming texts would have a certain amount of implicit structure. The programme was going to ask people to text in &#8220;Artist &#8211; Track &#8211; Name &#8211; Dedication&#8221;, but we assumed that there would be a lot of variation in the accuracy of the texts and a lack of consistent punctuation to act as delimiters. We planned a system of &#8216;fuzzy matching&#8217; to group together texts using stopwords, sounds-alike phonetic matching and statistical analysis of text prefixes. If you see enough text strings beginning with words that sound like &#8220;Bob Dylan&#8221; then you can start to guess that Bob Dylan might be an artist, rather than a track called Dylan by a band named Bob. Paul did some great work on refining these techniques, and an on-air test a few weeks before the real broadcast showed that we could pretty accurately infer that &#8220;Weezer&#8221;, &#8220;Wheezer&#8221;, &#8220;Weazer&#8221; and &#8220;Wheeser&#8221; were all the creators of tracks called &#8220;Buddy Holly&#8221;, &#8220;Budy Holly&#8221; and &#8220;Buddy Holy&#8221;.</p>
<p>While Paul worked on the analysis, I created a Perl wrapper around the database so that the apps team could get to work on the user interface. At the same time, I passed on a few lines of sample client code to <a href="http://interconnected.org/home">Matt Webb</a> to see what he could do with it. When working on a toolkit or API, I always like to have more than one client using it, to make sure that the requirements of the main project haven&#8217;t kept the interface from being generic and useful in other contexts. He built a nice rolling graph of texts received per minute, tapping in at the message bus layer. As with any messaging system, adding a new message recipient affected neither the code providing the messages nor any other clients of the bus. Neil Slater and Conal Jones in the apps team did great work building a web interface with guidance from the Radio 1 team, and within a few weeks we were ready to go live.</p>
<h4 id="on-air">On air</h4>
<p>Chris Moyles likes to break things. He once managed to get listeners to send <a href="http://www.chrismoyles.net/mw/coranto/Radio_Reviews/Radio_Reviews-archive-8-2003.shtml#newsitemEpykpAuullxrucLuEy">14,000 texts at once</a>. When I arrived, <a href="http://www.bbc.co.uk/radio1/chrismoyles/biography/#aled">Aled the BA</a> asked me how many messages the new system could take, and told me that Chris was going to do his best to overload it. At 8.45am, Chris started trailing the feature, and the text messages started trickling in. Then flooding. I was impressed: on a UK Bank Holiday, thousands of people were not just listening but involved enough to get on their phones and interact with the programme.</p>
<p>Chris and his team did a great job of understanding our system. They caught onto the freetext search right away and used it to find interesting tracks, and messages to read out from people who requested them. We put a &#8216;quick stats&#8217; box on every screen of the app, which they used to goad on the listeners: &#8220;3000 text messages so far. That is simply not enough. I want that quadrupled!&#8221;. Once there were enough messages in the system for the pattern matching to kick in, they used it to navigate through the data and see which tracks by which artists were getting the most attention. As the listeners realised that the playlist had gone out the window and they could request anything, we got some great stuff coming in. Our system even got a little mention on air as Chris teased us for matching an Elvis Costello track to a bunch of requests for Elvis.</p>
<p>As the programme started I was sitting nervously next-door to the studio tailing logfiles and watching process tables, but as it went on and the code coped with everything they could throw at it, I relaxed and enjoyed the show. I don&#8217;t normally listen to the Radio 1 Breakfast Show but listening to this gave me new respect for the skills of a daytime DJ, sitting in a tiny room in a basement working a crowd of millions that they never see.</p>
<p>If you want to hear the show, there&#8217;s a <a href="http://www.bbc.co.uk/radio/aod/rpms/r1moylesfri.rpm">Listen Again</a> stream available from the BBC until April 16th. The request section is in the last hour. Tune into Radio 1 on Monday April 12th from 10am for the ten hour version.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hackdiary.com/2004/04/11/moyles-proof-code/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>&#8220;Most Popular Entries&#8221; sidebar</title>
		<link>http://www.hackdiary.com/2003/04/01/most-popular-entries-sidebar/</link>
		<comments>http://www.hackdiary.com/2003/04/01/most-popular-entries-sidebar/#comments</comments>
		<pubDate>Tue, 01 Apr 2003 18:23:07 +0000</pubDate>
		<dc:creator>Matt Biddulph</dc:creator>
				<category><![CDATA[perl]]></category>
		<category><![CDATA[rss]]></category>

		<guid isPermaLink="false">http://www.hackdiary.com/?p=30</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>Noticing the variety in popularity amongst the different topics that the pieces on this site cover, I added a &#8220;Most Popular Entries&#8221; sidebar to keep track of what people are reading. This is done with a simple application of <a href="http://search.cpan.org/author/AKIRA/Apache-ParseLog-1.02/">Apache::ParseLog</a>, <a href="http://search.cpan.org/author/KELLAN/XML-RSS-1.02/">XML::RSS</a>, movabletype&#8217;s XML-RPC interface and a movabletype plugin.</p>
<p><span id="more-30"></span><br />
Every night after midnight, <a href="/src/hits.txt">hits.pl</a> runs and inspects the previous day&#8217;s Apache access log. Every entry has a predictable URL of the form <code>http://www.hackdiary.com/archive/000articleID.html</code>, so the code looks for hits on those URLs and parses out the article ID. It updates a dbm file, adding the day&#8217;s hits to hits already recorded for each item.</p>
<p>After that&#8217;s finished, <a href="/src/hits2rss.txt">hits2rss.pl</a> is run and translates the dbm file into an <a href="http://www.picdiary.com/~mattb/misc/hackdiary_hits.rss">RSS file</a> by looking up the article titles via the MT XML-RPC interface. An MT <a href="/src/tophits.txt">plugin</a> parses that file when the index page is rebuilt and makes the sidebar.</p>
<p>Fun hacks like this make me wish that MT had a <a href="http://www.movabletype.org/license.shtml">license</a> that allowed distribution of modifications to its core. Although the plugin interface is flexible, it&#8217;s a dead-end in the long run without the ability to dig in and change things under the skin.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hackdiary.com/2003/04/01/most-popular-entries-sidebar/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Lightning talk on RDF and the Semantic Web</title>
		<link>http://www.hackdiary.com/2003/03/14/lightning-talk-on-rdf-and-the-semantic-web/</link>
		<comments>http://www.hackdiary.com/2003/03/14/lightning-talk-on-rdf-and-the-semantic-web/#comments</comments>
		<pubDate>Fri, 14 Mar 2003 13:51:25 +0000</pubDate>
		<dc:creator>Matt Biddulph</dc:creator>
				<category><![CDATA[perl]]></category>
		<category><![CDATA[rdf]]></category>
		<category><![CDATA[talks]]></category>

		<guid isPermaLink="false">http://www.hackdiary.com/?p=29</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>Last night I gave a <a href="http://perl.plover.com/lt/lightning-talks.html">lightning talk</a> at the <a href="http://london.pm.org/meetings/">london.pm techmeet</a> that attempted to explain as simply as possible what RDF and the Semantic Web are, and how you can start playing with them with perl.</p>
<p><span id="more-29"></span><br />
The <a href="/slides/techmeet_rdf_mattb.pdf">slides</a> (in PDF created using <a href="http://axpoint.axkit.org/">AxPoint</a>) are brief but hopefully useful. At the same meeting, <a href="http://shadowgirl.net/">Celia</a> talked about her work at the BBC on modelling <a href="http://www.bbc.co.uk/eastenders/">Eastenders</a> plots in RDF and <a href="http://www.zooleika.org.uk">Jo</a> talked about <a href="http://space.frot.org">spacenamespace, mudlondon and collaborative mapping</a>. It was great to chat to people in the pub afterwards and see a lot of enthusiasm for the ideas.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hackdiary.com/2003/03/14/lightning-talk-on-rdf-and-the-semantic-web/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Triplequerying CPAN implementation</title>
		<link>http://www.hackdiary.com/2003/01/15/triplequerying-cpan-implementation/</link>
		<comments>http://www.hackdiary.com/2003/01/15/triplequerying-cpan-implementation/#comments</comments>
		<pubDate>Wed, 15 Jan 2003 11:09:17 +0000</pubDate>
		<dc:creator>Matt Biddulph</dc:creator>
				<category><![CDATA[perl]]></category>
		<category><![CDATA[rdf]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.hackdiary.com/?p=20</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>Today I discovered that a new module, <a href="http://search.cpan.org/author/JHIVER/TripleStore-0.01/lib/TripleStore.pm">Triplestore.pm</a>, has appeared on CPAN. To my surprise, my <a href="http://www.hackdiary.com/archives/000003.html">triplequerying algorithm</a> is cited at the end of the documentation. Looking through the code, it&#8217;s not directly built on the sample code I provided. The implementation looks way cleaner, and has many more features beyond querying. I&#8217;m overjoyed to have had some part in this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hackdiary.com/2003/01/15/triplequerying-cpan-implementation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Latest from Picdiary</title>
		<link>http://www.hackdiary.com/2003/01/03/latest-from-picdiary/</link>
		<comments>http://www.hackdiary.com/2003/01/03/latest-from-picdiary/#comments</comments>
		<pubDate>Fri, 03 Jan 2003 15:27:33 +0000</pubDate>
		<dc:creator>Matt Biddulph</dc:creator>
				<category><![CDATA[perl]]></category>
		<category><![CDATA[photos]]></category>
		<category><![CDATA[rdf]]></category>
		<category><![CDATA[rss]]></category>

		<guid isPermaLink="false">http://www.hackdiary.com/?p=17</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>New in the right-hand sidebar on the <a href="/">site front page</a> is a little lineup of the 3 latest pictures from <a href="http://www.picdiary.com">picdiary</a>, my photos website. This is created by parsing the RDF in the <a href="http://www.picdiary.com/cgi-bin/latest.pl">latest photo collection RSS feed</a> and extracting rss:title, dc:date and foaf:thumbnail information via an MT plugin (<a href="/src/picdiarylatest.txt">src</a>).</p>
<p><span id="more-17"></span><br />
The code uses RDF::Core::Parser from CPAN, which is a nice simple RDF parser that works much like SAX does for XML. You register an Assert callback with the parser which gets called once for each RDF statement found in the RDF it parses.</p>
<p>A very satisfying hack. RDF and HTTP makes this stuff so easy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hackdiary.com/2003/01/03/latest-from-picdiary/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Generating RDF from Movable Type keywords</title>
		<link>http://www.hackdiary.com/2002/12/30/generating-rdf-from-movable-type-keywords/</link>
		<comments>http://www.hackdiary.com/2002/12/30/generating-rdf-from-movable-type-keywords/#comments</comments>
		<pubDate>Mon, 30 Dec 2002 03:11:21 +0000</pubDate>
		<dc:creator>Matt Biddulph</dc:creator>
				<category><![CDATA[perl]]></category>
		<category><![CDATA[rdf]]></category>
		<category><![CDATA["some unique id" .
  .]]></category>

		<guid isPermaLink="false">http://www.hackdiary.com/?p=13</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>Having created RDF summaries for each Movable Type entry, I wanted a way to add extra triples to that RDF. For a first go, it seems reasonable to make any triple that can be added to an entry have that entry as its subject, so I used a shorthand (no subject, namespace-abbreviated) syntax inspired by <a href="http://www.w3.org/TR/rdf-testcases/#ntriples">N-Triples</a> and wrote an MT global filter plugin (<a href="/src/ntriples.txt">src</a>) to transform it into RDF/XML.</p>
<p><span id="more-13"></span><br />
As an example, in this entry, I put this in my keywords:</p>
<p><code>&lt;dc:identifier&gt; "some unique id" .</code><br />
<code>&lt;rdfs:seeAlso&gt; &lt;http://www.movabletype.org&gt; .</code></p>
<p>and two extra triples get created in the <a href="/archives/000005.rdf">RDF for this entry</a>.</p>
<p>It&#8217;s used in the MT RDF template by putting <code>&lt;$MTEntryKeywords ntriples="1"$&gt;</code>. Of course any namespace prefix used in the Keywords field must be declared in the RDF template beforehand. Apart from that it should be pretty resilient against breaking because it ignores any line that doesn&#8217;t match the syntax exactly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hackdiary.com/2002/12/30/generating-rdf-from-movable-type-keywords/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple dumb RDF parser script for perl</title>
		<link>http://www.hackdiary.com/2002/09/29/simple-dumb-rdf-parser-script-for-perl/</link>
		<comments>http://www.hackdiary.com/2002/09/29/simple-dumb-rdf-parser-script-for-perl/#comments</comments>
		<pubDate>Sun, 29 Sep 2002 17:45:00 +0000</pubDate>
		<dc:creator>Matt Biddulph</dc:creator>
				<category><![CDATA[perl]]></category>
		<category><![CDATA[rdf]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.hackdiary.com/?p=7</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>As with the <a href="http://www.w3.org/2001/12/rubyrdf/intro.html">ruby rdf parser</a>, this runs XSLT over your RDF/XML to make ntriples then parses those. It spits out mysql insert statements ready for querying with my <a href="http://www.picdiary.com/triplequerying/">rdf sql query stuff</a>.</p>
<p><a href="http://www.picdiary.com/~mattb/rdf/rdfparse-perl.tar.gz">rdfparse-perl.tar.gz</a></p>
<p><span id="more-7"></span><br />
The XSLT is taken from the <a href="http://www.w3.org/2001/12/rubyrdf/xsltrdf/">rubyrdf distribution</a>. The perl code uses XML::LibXML and XML::LibXSLT.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hackdiary.com/2002/09/29/simple-dumb-rdf-parser-script-for-perl/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>To bots about gatebot</title>
		<link>http://www.hackdiary.com/2002/08/26/to-bots-about-gatebot/</link>
		<comments>http://www.hackdiary.com/2002/08/26/to-bots-about-gatebot/#comments</comments>
		<pubDate>Mon, 26 Aug 2002 14:41:05 +0000</pubDate>
		<dc:creator>Matt Biddulph</dc:creator>
				<category><![CDATA[bots]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[rest]]></category>

		<guid isPermaLink="false">http://www.hackdiary.com/?p=6</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>A mail <a href="http://london.pm.org/pipermail/bots/2002-August/000125.html">to the bots list</a> about a web-to-IRC gateway.</p>
<p><span id="more-6"></span><br />
<b>Subject: [Bots] gatebot &#8211; making bots URL-addressable</b><br />
From: Matt Biddulph<br />
<i>Date: Mon Aug 26 14:41:05 2002</i></p>
<p>I&#8217;ve put up a new experimental service that allows code to talk to IRC<br />
bots over the web without making a direct IRC connection.</p>
<p>You can try it out here via a dodgy web form interface:</p>
<p><a HREF="http://www.picdiary.com/bot/index.html">http://www.picdiary.com/bot/index.html</a></p>
<p>But it&#8217;s really meant as some kind of web API for access by code (e.g.<br />
so web apps could ask the foafbot for people-related information). It<br />
works like this:</p>
<p>POST to<br />
<a HREF="http://www.picdiary.com/bot/servlet/GatebotServlet/some.irc.server/somebotnick">http://www.picdiary.com/bot/servlet/GatebotServlet/some.irc.server/somebotnick</a><br />
with a query of &quot;say=what%20you%want%20to%say&quot;. The web service sends a<br />
proxy bot onto some.irc.server and privmsgs somebotnick with what you<br />
want to say.</p>
<p>You get back a simple HTML document, with a 201 Created status to<br />
indicate the creation of a new session URL for you to read back what is<br />
said. This session URL is given both in the HTML (for browser-based<br />
testing) and in the HTTP Location: header. Every time you hit this URL,<br />
it&#8217;ll give you a line-by-line dump of what have been privmsged back to<br />
the proxy bot (obviously this will be blank if you hit the URL quickly -<br />
if you expect an answer then poll it at some regular interval).</p>
<p>If nothing is said to the bot for 60 seconds, it leaves the IRC network<br />
but the URL remains available &#8216;indefinitely&#8217; (it&#8217;s kept in memory and<br />
will die when my webserver restarts). You should also be able to say<br />
further things to the same bot in the same session by POSTing to the<br />
session URL with &quot;say=whatever&quot;</p>
<p>Source code (perl for the bot bits, java servlet for the web bits) is<br />
here:<br />
<a HREF="http://www.picdiary.com/~mattb/bots/gatebot-0.2.tar.gz">http://www.picdiary.com/~mattb/bots/gatebot-0.2.tar.gz</a><br />
Apologies for any hard-coded paths or other cruftiness. The version of<br />
Bot::BasicBot in there is slightly modified to listen on STDIN so that<br />
the web layer can communicate with its proxy bots by spawning processes<br />
and using STDIN/STDOUT.</p>
<p>There are a couple of pieces of demo client code in the tarball.<br />
getkarma asks the infobot &#8216;robert&#8217; on #pants for karma of things via a<br />
commandline interface. There&#8217;s also an infobotkarmabot that does the<br />
same thing but with an IRC interface.</p>
<p>Here&#8217;s the IRC karma bot connecting to #bots on london.rhizomatic.net:</p>
<p>&#8211;&gt; robertpro (~<a HREF="mailto:robertpro@217.158.195.49">robertpro@217.158.195.49</a>) has joined #bots<br />
&lt;mattb&gt; robertkarma test<br />
&lt;robertpro&gt; robert says test has karma of 1</p>
<p>and the action this triggered on #gatebot (where proxy bots hang out<br />
while they&#8217;re privmsging) on the irc network where #pants lives:</p>
<p>&#8211;&gt; EUUREbot (<a HREF="mailto:tomcat4@pod-124.dolphin-server.co.uk">tomcat4@pod-124.dolphin-server.co.uk</a>) has joined #gatebot<br />
&lt;EUUREbot&gt; robert said &#8216;test has karma of 1&#8242;</p>
<p>Feel free to play with this, and flame me royally if it breaks or sucks.</p>
<p>Cheers,<br />
Matt.</p>
<hr />
<p>and a later <a href="http://london.pm.org/pipermail/bots/2002-August/000129.html">response</a> to a followup:</p>
<p>On Mon, 2002-08-26 at 17:16, Mark Fowler wrote:<br />
> Hmm.  Any reason this can&#8217;t be a GET?  Aside from the breaking of the<br />
> idempotent nature of requests I mean (pah, RFCs.)  It&#8217;d just be nice so<br />
> that you can use it with Mozilla&#8217;s bookmark keywords function (where you<br />
> can type &#8216;$keyword $foo&#8217; and it looks up a url you&#8217;ve associated with<br />
> $keyword changing &#8216;%s&#8217; for a URI encoded version of $foo.)</p>
<p>Yeah, preserving the semantics of POST seems quite important here &#8211; this<br />
is initiating an action, which causes the creation of a resource (both<br />
in the sense of the URL and the process actually forked). This resource<br />
then becomes readable in an idempotent way, its content changing as it<br />
(hopefully) interacts with the remote bot it&#8217;s talking to.</p>
<p>In order to support an application such as &#8216;return me this information&#8217;<br />
for bookmark-keywords purposes, I would rather a wrapper application<br />
were used that was truly GETtable &#8211; it would make the initial POST and<br />
poll the resulting GETtable session until it returned some useful<br />
information. Only then would it return 200 OK and some content to the<br />
client. A directly GETtable gatebot service would 99% of the time simply<br />
return a blank screen to the browser because it has no way of knowing<br />
how long to wait (if it should wait for a response at all).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hackdiary.com/2002/08/26/to-bots-about-gatebot/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Triple Querying with SQL</title>
		<link>http://www.hackdiary.com/2002/08/20/triple-querying-with-sql/</link>
		<comments>http://www.hackdiary.com/2002/08/20/triple-querying-with-sql/#comments</comments>
		<pubDate>Tue, 20 Aug 2002 20:26:00 +0000</pubDate>
		<dc:creator>Matt Biddulph</dc:creator>
				<category><![CDATA[perl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rdf]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.hackdiary.com/?p=5</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.picdiary.com/triplequerying/">A simple algorithm for translating rdfdb-style queries into SQL</a> to query a triple store with a very simple schema. A perl and a PHP implementation is provided.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hackdiary.com/2002/08/20/triple-querying-with-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
