July 31, 2003

The Shockwave Rider Revisited: Delphi and the Art of Fencing

Recently I was reminded of a brilliant science-fiction novel I read quite some years ago, "The Shockwave Rider" by John Brunner. You might have heard of the book because it predicted (back in the 1970s, mind you) some things that have become reality, like a world-wide data network, oddly enough called "the Web" or a network-based computer programme hunting and tracking down other programmes, called a "worm".

Another thing Brunner described was all over the news this week: the Pentagon wanted to introduce "future markets" as a means to predict terrorist attacks. Most people ranted about how tasteless the idea was or, (especially in Europe) invoking cheap anti-Americanism, dismissed it as another example of American stupidity (it comes from the Bush administration, so it must be dumb, right?). I found the idea fascinating. The very same idea is called "Delphi" in the Shockwave Rider. Brunner argues that we as a group or society are much smarter and thus more likely to make correct guesses about future events than individuals. Scientific research seems to back him.

Another thing I remembered was the game played in the book, Fencing. No, not the thing you do with swords, it's a board game. After a little bit of googleing, I found the rules to the game. It's a bit like Go with a twist. I remember a notice in the front matter of the novel where Brunner claimed copyright for the game. Rumor has it that he actually planned to turn it into a commercial shrink-wrapped game, but some smart-ass mathematician used game theory to prove that there actually is a perfect strategy for the game. I wouldn't understand the theory anyway, so I think I'll give the game a try this weekend.

Posted by jens at 11:56 PM | Comments (1)

July 30, 2003

Found on Slashdot: Modified Godwin's Law

"As a Slashdot thread on a programming language progresses, the probability of someone claiming that 'Lisp already does that' approaches unity."
This is so true, it almost hurts. But probably not only on Slashdot, but also in other places where hackers flock.
Posted by jens at 09:55 PM | Comments (2)

How not to fight spam

Challenge-response systems are as harmful as spam claims John Levine and I couldn't agree more. If there's one thing that's worse than spam, it's short-sighted ways of fighting it, be it through challenge-response systems or censoring hosts or whole IP ranges on dubious criteria. Last year, I wrote a short piece in German about the problem. If you can read this language, here's "Halte deine INBOX sauber".
[original link to John Levine's writeup via 0xDECAFBAD]
Posted by jens at 10:20 AM | Comments (2)

July 29, 2003

Atom API: A First Look

There's a page online where you can see examples of how Atom (or whatever it will be called in the future), the new API to extend RSS and XML-RPC for weblogs, will look like. If you're like me and you're too lazy to read the evolving specs, but curious what the discussion is about, this is worth a visit. [via dive into mark]
Posted by jens at 04:11 PM | Comments (1)

More on Amazon RSS feeds

I wrote somthing about it the other day, but you had to scrape the feeds from the HTML back then. Now, thanks to this nifty tool at the Bookwatch weblog, it's ready for prime-time.
Posted by jens at 10:46 AM | Comments (2)

Build your own iTunes music server

macosxhints has a nice little article on how to turn a spare Linux box into a server that can share its music library with Macs using the iTunes sharing protocol. There is nothing revolutionary new to it (not since the very cool guys at deleet.de reverse-engineered daap that is used for iTunes sharing), but I'll use it as a link list, since I really have to overcome my laziness and install something similar at my home. (BTW: I got the link via the German weblog Der Schockwellenreiter)
Posted by jens at 09:12 AM | Comments (2)

July 28, 2003

Will you get sued by the RIAA?

Over in the US of A, the Recording Industry Association of America (RIAA) recently announced that it will begin suing users of peer-to-peer (P2P) file-sharing systems "within the next few weeks". So, will you get treated as a criminal for sharing music and happiness with friends and strangers? No one knows. However, thanks to the EFF, you can prepare yourself and even lookup if your name or IP is known to the RIAA database online. The EFF is a hard-working, respected, non-profit organization for cyber-rights. One of their founders, John Gilmore, will be a speaker at the conference part of the Chaos Communication Camp in August.
Posted by jens at 02:17 PM | Comments (1)

Narrowcasting

A recent entry in Theodor Prinz's weblog (in German) on getting closer digitally made me think about the problem on how "they" see the Internet as opposed to "our" view. Publishing companies and governments still see the Web as a stranger, geekier form of the television set. They believe that people receive broadcasted programmes on their terminals and must be kept unharmed when evil things are stuffed down their throats against their will. A nice model, if only it wouldn't be so far from reality. Basically it's still stuck in the 1950s or 1960s, when we used to have just a few TV stations and arriving at work in the morning you could expect your coworkers to talk about the same news and the same quiz show from the evening before, because everybody watched the same and broadcasting still worked. The Internet is slowly changing this common frame of reference. There are parallel worlds out there, people spending their whole online life on massively multi-user online roleplaying games like "Lineage", sometimes with undesireable side-effects. The Web is all about linking. Linking great minds that think alike, that is. It isn't about making everyone think the same, but rather choosing a group that reflects your interests. It's not broadcasting any more. Let's call it narrowcasting.
Posted by jens at 12:37 PM | Comments (95)

The Secret Inside the Orange and the Elephant Game

"There was once an orange field in which an enormous orange was grown. When the orange was peeled, it was found that inside two old men were sitting facing each other, playing chess".
Chinese legend, from the book of Chinese chess game collections, "The Secret Inside the Orange" by Jinzhen Zhu, published in 1632

Like almost 100 million other players world-wide (most of them in Asian countries like China, Vietnam and Singapore), I enjoy playing the world's most popular board game, Xiang Qi or Chinese chess. Xiang Qi is similar to the variant of chess played in Western countries nowadays, but features some pieces and rules that make it quicker, more aggressive and (at least in my eyes) more fun to play. Literally translated, Xiang Qi means "Elephant game", which is a reference to one of the pieces, the elephant, a piece similar to the bishop in international chess. Known as co tuong in Vietnam and (with slightly different rules) jang gi in Korea, it sports a unique piece called the cannon (pao) that has to jump over other pieces in order to capture and fewer pawns than in Arabic-Persian-Western chess, thus making the playing experience less like untangleing a traffic jam in mid-game.

You can read about the rules of Xiang Qi in Wikipedia or at Hans Bodlaender's wonderful site on chess variants. Once you are ready to try out your Xiang Qi skills, you can play it in your browser at itsyourturn.com or with a Java applet at ClubXiangQi where you'll find some strong (mostly Vietnamese or Vietnamese-American) opponents for a battle of wits. Another valueable resource is the Xiangqi Database.

Posted by jens at 09:07 AM | Comments (1)

July 26, 2003

YAML in 5 minutes

A certain scripting language from the Far East will feature YAML support in its next stable version. But what is YAML? It solves a lot of the problems XML solves ("smart ASCII", easy data serialization, good for configuration settings etc.), but looks more appealing to non-techies due to its more readable and less noisy format. There is an excellent tutorial online which will teach you the basics of YAML in just 5 minutes. Definitively worth the time.
Posted by jens at 11:08 PM | Comments (13)

Mobile blogging via e-mail

Max seemed to have something on his mind that I've also thought about lately: We need a mobile blogging solution. He already has a hack ready that allows you to blog by mail. Cool. Very cool. But as "there's more than one way to do it" I'll keep working on my solution as well. I hope I can present something here soon.
Posted by jens at 07:50 PM | Comments (17)

Getting blog updates via AIM

This AIM bot can notify you about changes in blogs you've subscribed to. Got AIM installed or maybe use iChat? Great, in that case you can read the bot's help message with just one click.
Posted by jens at 01:49 PM | Comments (1)

A match made in heaven: Ruby and the Semantic Web

I guess I 'll have to subscribe to yet another mailing list: At the W3C they started a new list "for collaboration on Semantic Web (RDF/XML and OWL) code and APIs in the Ruby programming language".
Posted by jens at 12:12 PM | Comments (1)

July 25, 2003

Coolness: Amazon RSS feeds

Yes, it's true. Amazon offers "syndicated content", which means that you can subscribe to all kind of lists for the stuff they sell with your RSS reader. Read the details at Ben Hammersley's weblob.
Posted by jens at 11:12 PM | Comments (11)

Here come the flash mobs

Sometimes Internet culture and its memes are just amazing: We've had our fair share of badly dubbed Japanese video games, we saw people blogging for and against the war, but just when you thought you were safe from bizarre hypes it looks like you have to update your vocabulary. Describing what flash mobs are seems to be difficult, so you better find out yourself.
Posted by jens at 04:37 PM | Comments (10)

W3C Announces Workshop on Binary Interchange of XML Information Item Sets

There seems to be some activity in the field of an alternative, webservice-friendly representation of XML. I'm very much interested in the results, but I can't make up my mind whether this will be a good or bad thing. With XML we finally have "smart ASCII" and with SOAP we can (among other things) do RPC with wire dumps intelligible to mere mortals. Going back to a binary format seems like a big step backwards for me at the moment, but then I really do need more details.
Posted by jens at 12:12 PM | Comments (8)

Scraping news.google.de

Ah, Google, endless source of joy and anger! Google's German version recently launched news.google.de, a news aggregator collecting headlines from online news sources.

I'd really like to know how they do it since they claim that it works without human intervention and it does an impressive job at recognizing common subjects and clustering them. But my guess is that Google won't publish any details about their technology. The best we can hope for is a joke, like in their "explanation" of PageRank.

Another thing Google doesn't provide us with is a RSS feed for the news. However, it's easy to roll your own. I did a version in Perl on the day news.google.de started, but it can also be done in a more exotic language.

#!/usr/bin/ruby
require 'net/http'
google_s = Net::HTTP.get('news.google.de', '/news/de/de/mainlite.html')
google_re = Regexp.new('<a class=y href="(.*?)">(.*?)<\/a>.*?<\/b><br>(.*?)<br>')
puts "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
puts "<rdf:RDF"
puts "  xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\""
puts "  xmlns:dc=\"http://purl.org/dc/elements/1.1/\""
puts "  xmlns:sy=\"http://purl.org/rss/1.0/modules/syndication/\""
puts "  xmlns=\"http://purl.org/rss/1.0/\">"
puts "<channel rdf:about=\"http://news.google.de/\">"
puts "<title>news.google.de</title>"
puts "<link>http://news.google.de/</link>"
puts "<description>Schlagzeilen von Google (auf deutsch)</description>"
puts "<dc:language>de-de</dc:language>"
puts "<dc:creator></dc:creator>"
puts "</channel>"
while google_m = google_re.match(google_s)
  puts "<item>"
  puts "  <link>http://news.google.de/#{google_m[1]}</link>"
  puts "  <title>#{google_m[2]}</title>"
  puts "  <description>#{google_m[3]}</description>"
  puts "</item>"
  google_s.sub!(google_re, '')
end
puts "</rdf:RDF>"
Posted by jens at 11:40 AM | Comments (10)

July 24, 2003

XSLT Niftyness and Idea Knot

Idea Knot is a cool tool to quickly write, organize, and link ideas. I mainly use it as an outliner, for minutes of meetings and for jotting down stuff during brainstorming. It sports an option to export to XML as well.

Now, "export to XML" is as specific as saying that you'd like to have a car, preferably with four wheels. Actually, it exports a plist. Not a bad format, but there already is a standard for outlines, called OPML or Outline Processor Markup Language.

OPML is used in Radio Userland and NetNewsWire, but the application that won me over was the little XSLT magic to generate cute looking web pages from it.

Now, all I need was some piece of XSLT to transform Idea Knot's plist into OPML. Well, to make a long story short, here is what I came up with. Enjoy.

<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:template match="/">
<opml>
<head>
</head>
<body>
<outline>
<xsl:attribute name="text">
<xsl:value-of select="/plist/array/array/string"/>
</xsl:attribute>
<xsl:for-each select="/plist/array/array/array/string">
	<outline>
	<xsl:attribute name="text">
	<xsl:value-of select="." />
	</xsl:attribute>
	<xsl:attribute name="description">
	<xsl:call-template name="description">
		<xsl:with-param name="description-text" select="." />
	</xsl:call-template>
	</xsl:attribute>
	</outline>
</xsl:for-each>
</outline>
</body>
</opml>
</xsl:template>

<xsl:template name="description">
<xsl:param name="description-text" />
<xsl:for-each select="/plist/array/dict/key">
	<xsl:if test="./text() = $description-text">
		<xsl:variable name="pos" select="position()" />
		<xsl:for-each select="/plist/array/dict/string">
			<xsl:if test="position() = $pos">
				<xsl:value-of select="." />
			</xsl:if>
		</xsl:for-each>
	</xsl:if>
</xsl:for-each>
</xsl:template>

</xsl:stylesheet>

PS: Could this be the world's first "first post" on a weblog that actually contains content and no test message or "first entry" or something similar? :)

Posted by jens at 09:50 PM | Comments (24)