<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' version='2.0'><channel><atom:id>tag:blogger.com,1999:blog-9101292118679422945</atom:id><lastBuildDate>Wed, 14 Oct 2009 21:15:04 +0000</lastBuildDate><title>blog.kfish.org</title><description></description><link>http://blog.kfish.org/</link><managingEditor>noreply@blogger.com (Conrad Parker)</managingEditor><generator>Blogger</generator><openSearch:totalResults>68</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-9101292118679422945.post-2496842291455876554</guid><pubDate>Wed, 15 Jul 2009 03:53:00 +0000</pubDate><atom:updated>2009-07-15T12:58:02.983+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>linux.conf.au</category><category domain='http://www.blogger.com/atom/ns#'>haskell</category><title>CFFPP: linux.conf.au 2010</title><description>&lt;p&gt;
The &lt;a href="http://www.lca2010.org.nz/programme/papers_info"&gt;call for
papers for linux.conf.au 2010&lt;/a&gt; has been open for a few
weeks, and closes soon (July 24).
&lt;/p&gt;
&lt;p&gt;
I really want to encourage some talks about functional programming!
The conference has a pretty strong developer focus, and most talks are
about a practical topic. More importantly, we're looking for talks
that inspire people to try new techniques, to approach design and
troubleshooting with clarity and vigor (yarr!), to boldly consider
that they should perhaps spend some time honing their craft before
writing yet another application that inexplicably fails at runtime --
all in a friendly and entirely non-condescending environment of
hackers having fun hacking.
&lt;/p&gt;
&lt;p&gt;
Here's some suggestions for the kind of talks that I think could be interesting:
&lt;ul&gt;
&lt;li&gt;systems programming in Haskell/OCaml/whatever: how you wrote an
interface to some hardware, handled lots of IO, controlled a robot,
whatever&lt;/li&gt;
&lt;li&gt;functional programming for kernel development: verification, security etc.&lt;/li&gt;
&lt;li&gt;game programming: higher order design for 3D, AI etc.&lt;/li&gt;
&lt;li&gt;proof vs. testing: (can anyone do a tutorial on proof without
greek letters? not that
&lt;a href="http://lca2007.linux.org.au/talk/215.html"&gt;Patryk Zadarnowski's talk about the Curry-Howard
Isomorphism&lt;/a&gt; a few years ago wasn't *awesome*, but as a result of that
people are clamoring (clamoring!) for some advice about how to prove
their programs have no bugs).&lt;/li&gt;
&lt;li&gt;some ... other ... practical benefit of functional programming!&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;
&lt;p&gt;
The conference is in Wellington in January. January! it'll be windy,
and it's in New Zealand!
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9101292118679422945-2496842291455876554?l=blog.kfish.org'/&gt;&lt;/div&gt;</description><link>http://blog.kfish.org/2009/07/cffpp-linuxconfau-2010.html</link><author>noreply@blogger.com (Conrad Parker)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-9101292118679422945.post-4896825084619695864</guid><pubDate>Tue, 07 Apr 2009 22:48:00 +0000</pubDate><atom:updated>2009-04-08T07:56:53.994+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>ogg</category><category domain='http://www.blogger.com/atom/ns#'>fishsound</category><title>Release: libfishsound 0.9.2</title><description>Fishsound has moved to Xiph.org! The new home page is at
&lt;a href="http://www.xiph.org/fishsound/"&gt;http://www.xiph.org/fishsound/&lt;/a&gt;.

&lt;h2&gt;New in this release&lt;/h2&gt;
&lt;p&gt;
This release contains security and other bugfixes:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Security fixes related to Mozilla bugs 468293, 480014, 480521, 481601.&lt;/li&gt;
&lt;li&gt;Fix bounds checking of mode in Speex header&lt;/li&gt;
&lt;li&gt;Handle allocation failures throughout due to out of memory&lt;/li&gt;
&lt;li&gt;Added support for libFLAC 1.1.3&lt;/li&gt;
&lt;li&gt;Add conditional support for speex_lib_get_mode() from libspeex 1.1.7
          If available, this function is used in place of static mode
          definitions. For ticket:419&lt;/li&gt;
&lt;li&gt;Check for Vorbis libs via pkgconfig, required for MacPorts etc.&lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9101292118679422945-4896825084619695864?l=blog.kfish.org'/&gt;&lt;/div&gt;</description><link>http://blog.kfish.org/2009/04/release-libfishsound-092.html</link><author>noreply@blogger.com (Conrad Parker)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-9101292118679422945.post-2096642853208898969</guid><pubDate>Tue, 07 Apr 2009 16:32:00 +0000</pubDate><atom:updated>2009-04-08T01:44:06.927+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>annodex</category><category domain='http://www.blogger.com/atom/ns#'>ogg</category><category domain='http://www.blogger.com/atom/ns#'>fragments</category><title>A proposal for generalizing the byte-range referral HTTP Response header</title><description>&lt;p&gt;Re: the &lt;a href="http://www.w3.org/2008/WebVideo/Fragments/WD-media-fragments-reqs/#retrieving-fragment"&gt;Media Fragments WD&lt;/a&gt;. Here I am using the term "byte-range referral" for multiple concatenated HTTP requests, for the purpose of improving cacheability; this is called a "4-way handshake" in the current working draft.
&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Shortcomings of the existing byte-range referral scheme&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;
The above WD, and the
&lt;a href="http://www.annodex.net/TR/draft-pfeiffer-temporal-fragments-03.html"&gt;current Annodex scheme&lt;/a&gt;,
are specified to allow sharing of non-header data between different temporal views of
media resources. They limit the positioning of custom data to the media headers.
different segments to have different headers, which is useful for Ogg but not necessarily so
for other formats.
&lt;/p&gt;
&lt;p&gt;
Even for Ogg, it could be useful to refer to the codebooks separately from the Skeleton for more finely-grained data re-use. Then a client can locally cache the codebooks and know not to bother retrieving
them over and over; but to get the updated skeleton and keyframe data for temporal segment requests.
&lt;/p&gt;
&lt;p&gt;
Hence, I am proposing that we should specify an ordered list of tuples of (URI, byte range)
which the concatenation of is byte-wise identical to the byte contents of the requested URI
&lt;/p&gt;
&lt;p&gt;
This response can also contain data,
so if you want to refer to this response you can include a tuple of (this, range)
where &lt;tt&gt;this&lt;/tt&gt; is the literal string "this", and refers to the body of the current response.
&lt;/p&gt;
&lt;p&gt;
This syntax then allows the server to include parts from many different URLs. The custom data
is then centralized in this response, and can be used for any parts of construction of the
response so that it can be used for tail data (such as ID3 tags, divx seek tables etc.)
&lt;/p&gt;
&lt;p&gt;&lt;b&gt;List and tuple separator characters&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;
The list separator should be commas, as this then allows the list to be separated over
HTTP response lines (without re-ordering).
&lt;/p&gt;
&lt;p&gt;
Hence the tuple separator should not be commas; it can simply be whitespace:
&lt;/p&gt;
&lt;p&gt;
&lt;blockquote&gt;&lt;pre&gt;
Range-Referral: http://www.example.com/video.ogv?headers 0-1280
Range-Referral: http://content1.example.com/video.ogv 5380-48204
Range-Referral: this 0-950
Range-Referral: http://content1.example.com/video.ogv 60880-238382
&lt;/pre&gt;&lt;/blockquote&gt;
&lt;/p&gt;
&lt;p&gt;
By comma replacement, this set of headers is equivalent to the single header:
&lt;/p&gt;
&lt;p&gt;
&lt;blockquote&gt;&lt;pre&gt;
Range-Referral: http://www.example.com/video.ogv?headers 0-1280, http://content1.example.com/video.ogv
5380-48204, this 0-950, http://content1.example.com/video.ogv 60880-238382
&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;
&lt;p&gt;&lt;b&gt;Interpretation of other response headers&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;
The body of this request is simply all the custom parts for this view, concatenated bytewise. The
Range-Referral header explains how to use this data.
&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;&lt;tt&gt;Content-Length&lt;/tt&gt;&lt;/b&gt;: is the length of the body.
&lt;/p&gt;
&lt;p&gt;
A &lt;b&gt;&lt;tt&gt;Range&lt;/tt&gt;&lt;/b&gt; request is made relative to the body. So for example a client could just do a HEAD request
to get the Range-Referral headers, and then do multiple Range requests to retrieve the reqired parts
in sequence (rather than locally caching all the data for tailers etc.). Coherence of the concatenated
responses can be assured by the use of existing HTTP/1.1 caching identifiers.
&lt;/p&gt;
&lt;p&gt;
So, this constructed response is only special in that a user agent knows how to use it in conjuction
with other URI response data to display a media segment. Otherwise it is standard HTTP, and can
have caching headers/tags attached, be cached by intermediate proxies, and itself be the subject of
range requests.
&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Generalization to other segment types&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;
This mechanism allows a complex sequence of byte-ranges to be specified.
It explicitly marks data ranges which are re-usable, allowing them to be cached.
It generalizes so that any complex data subview can be served, where re-usable data is
keyed canonically and can be cached on the network.
&lt;/p&gt;
&lt;p&gt;
For example, it may be useful for specifying the data for a spatial subrange of video.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9101292118679422945-2096642853208898969?l=blog.kfish.org'/&gt;&lt;/div&gt;</description><link>http://blog.kfish.org/2009/04/proposal-for-generalizing-byte-range.html</link><author>noreply@blogger.com (Conrad Parker)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-9101292118679422945.post-8810016699917049469</guid><pubDate>Fri, 03 Apr 2009 06:13:00 +0000</pubDate><atom:updated>2009-04-03T15:17:52.836+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>annodex</category><category domain='http://www.blogger.com/atom/ns#'>ogg</category><category domain='http://www.blogger.com/atom/ns#'>xiph</category><title>liboggplay, liboggz, libfishsound migrated to git.xiph.org</title><description>&lt;p&gt;
The source repositories for some Ogg libraries developed as part of the Annodex project
have moved from from svn.annodex.net to git.xiph.org. These libraries are:
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;liboggplay, an Ogg Theora playback library used by Mozilla Firefox;&lt;/li&gt;

&lt;li&gt;libfishsound, a simplified API for using audio codecs, used by liboggplay and
the by the DirectShow Oggcodecs; and&lt;/li&gt;

&lt;li&gt;liboggz, a library for seeking, reading and writing Ogg (used by liboggplay),
and tools for managing Ogg streams. This includes oggz-chop, which is used by various sites
including the Internet Archive to serve Ogg files.&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;b&gt;Reasons for the migration&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;
Xiph.org, which develops free codecs (Ogg Vorbis, Theora, Dirac, Speex, CELT, FLAC),
already provided the hosting for Annodex.net projects. The move to the xiph.org
domain reflects that these libraries are recommended for general use by projects requiring
Ogg support.
&lt;/p&gt;
&lt;p&gt;
The move from Subversion to Git allows for distributed development, letting developers without
write access to the central Subversion repository develop code using a version control system,
and making it easier for developers and packagers to track multiple independent changes.
Among distributed version control systems, Git was chosen for its flexibility and popularity.
It is already used within Xiph.org for Speex, the ultra-low latency, high quality audio codec
CELT, and the experimental text overlay codec Kate.
&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Checking out the sources&lt;/b&gt;&lt;p&gt;

To do a fresh checkout of the code, make a new git repository
This assumes that you begin with an empty working directory:

&lt;blockquote&gt;&lt;pre&gt;
$ git clone git://git.xiph.org/liboggz.git
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;&lt;b&gt;Adding a remote to an existing git-svn checkout&lt;/b&gt;&lt;/p&gt;

Many developers already used git-svn to access the previous svn repositories.
In this case you will already have a local git clone of the sources, perhaps with your
own local changes. In that case, simply add a new remote to your existing
repository, eg.:

&lt;blockquote&gt;&lt;pre&gt;
$ git remote add xiph git://git.xiph.org/liboggz.git
&lt;/pre&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9101292118679422945-8810016699917049469?l=blog.kfish.org'/&gt;&lt;/div&gt;</description><link>http://blog.kfish.org/2009/04/liboggplay-liboggz-libfishsound.html</link><author>noreply@blogger.com (Conrad Parker)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-9101292118679422945.post-6879809504064613783</guid><pubDate>Wed, 01 Apr 2009 06:56:00 +0000</pubDate><atom:updated>2009-04-01T16:04:27.837+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>http</category><category domain='http://www.blogger.com/atom/ns#'>annodex</category><category domain='http://www.blogger.com/atom/ns#'>ogg</category><title>Discovery and fallback for media segment addressing over HTTP</title><description>&lt;p&gt;
This post concerns the use of queries or fragments in the URI specification for accessing
segments of media over HTTP. We outline the user-visible differences between the two
approaches, including the form of the URIs seen by users in each scenario and the consequent
user interface activity, and then explain the HTTP request and response mechanisms that
result. The purpose of this analysis is to better understand the trade-offs in
usability and the impact on network performance, with reference to existing implementations
rather than hypothetical scenarios.
&lt;/p&gt;
&lt;p&gt;
I will make the case that the user-visible differences between the two syntaxes are
immaterial, and that a more important distinction is that they induce different protocols.
I will also claim that the use of the fragment syntax introduces unnecessary complexity
in that it lacks a discovery mechanism and has no useful fallback to existing HTTP.
&lt;/p&gt;
&lt;p&gt;&lt;b&gt;User-visible differences&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;
We are constructing a URI syntax for addressing segments of media data. Taking the simple
case of addressing some video content beginning at an offset of 10 seconds, we consider the
two forms:
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Query syntax:&lt;/b&gt; &lt;tt&gt;http://www.example.com/media.ogv?t=10&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Fragment syntax:&lt;/b&gt; &lt;tt&gt;http://www.example.com/media.ogv#t=10&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;
&lt;p&gt;
For simplicity here we are using a shortened segment identifier &lt;tt&gt;t=10&lt;/tt&gt;; I touched on
the topic of segment identifiers in a recent article about
&lt;a href="http://blog.kfish.org/"&gt;pretty printing durations&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Regarding the direct HTTP semantics of these two forms, if the user is already viewing
the specified &lt;tt&gt;media.ogv&lt;/tt&gt;, the query syntax reloads the portion from 10 seconds as
a new resource, whereas the fragment syntax modifies the view of the current resource.
&lt;/p&gt;
&lt;p&gt;
Although developers are rightly wary of a page refresh due to the time required to
render complex HTML, in practice no visible change occurs when reloading a video.
The query syntax has been used to control video seeking in JavaScript (using the
Java cortado video player plugin, or an earlier Oggplay plugin), and also natively
in the current Firefox 3.5 implementation.
&lt;/p&gt;
&lt;p&gt;
In any case, this distinction is only user-visible if the video is the top-level resource.
In the common case of a web page that embeds a video, the user-visible resource is the
HTML page. In this case, the mechanism for controlling video is under the control of the
embedding web page via JavaScript.
&lt;/p&gt;
&lt;p&gt;
For example, URIs to YouTube pages allow a time segment to be appended using a fragment
syntax. However, this fragment is used by JavaScript to control the embedded Flash video
player; the mechanism for then retrieving video data is then managed by the Flash player.
Similarly, in HTML5 Ogg &amp;lt;video&amp;gt; implementations, a fragment identifier appended
to the HTML page may be interpreted by JavaScript to control seeking in the &amp;lt;video&amp;gt;
source using a non-fragment mechanism, like query syntax.
&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Differences in request mechanisms&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;
Either way we introduce a new behaviour that user agents can use to retrieve
media segments over HTTP.
&lt;/p&gt;
&lt;p&gt;
When handling a media segment which is specified by a query, the user agent initiates
a standard HTTP request. It connects to port 80 on the specified host, and uses the
entire path, including the query specifer, in the GET request. The server
then begins transferring the required data representing that segment of the media.
&lt;/p&gt;
&lt;p&gt;
To retrieve the URI &lt;tt&gt;http://www.example.com/media.ogv?t=10&lt;/tt&gt;:
&lt;/p&gt;
&lt;p&gt;
&lt;blockquote&gt;&lt;pre&gt;
GET /media.ogv?t=10 HTTP/1.1
Host: example.com
&lt;/pre&gt;&lt;/blockquote&gt;
&lt;/p&gt;
&lt;p&gt;
However the
&lt;a href="http://www.w3.org/2008/WebVideo/Fragments/wiki/HTTP_implementation"&gt;proposed&lt;/a&gt; request mechanism for handling a segment specified by a fragment
is not standard HTTP. In conventional HTTP, a fragment specifier is stripped by the
user agent and not sent to the server at all; rather, the server sends the
requested response (representing the entire resource), and after retrieval, the
user-agent uses the fragment specifier to select the view shown to the user.
&lt;/p&gt;
&lt;p&gt;
A recently proposed behaviour for handling media segments involves placing the
segment specifier into the Range HTTP Request header, with a new units of seconds.
&lt;/p&gt;
&lt;p&gt;
To retrieve the URI &lt;tt&gt;http://www.example.com/media.ogv#t=10&lt;/tt&gt;:
&lt;/p&gt;
&lt;p&gt;
&lt;blockquote&gt;&lt;pre&gt;
GET /media.ogv?t=10 HTTP/1.1
Host: example.com
Range: seconds=10-
&lt;/pre&gt;&lt;/blockquote&gt;
&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Response mechanism: byte-range redirection&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;
The byte-range redirection response mechanism involves 
identifying parts of the segment view which are byte-wise identical to the original resource,
and specifying redirections to those.
&lt;/p&gt;

&lt;p&gt;&lt;b&gt;How discovery works&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;
A user-agent will only receive a byte-range redirection response if it has indicated that
it is capable of interpreting that, by including an extra HTTP request header. For example,
here using a media segment URL specified with a query parameter:
&lt;/p&gt;
&lt;p&gt;
&lt;blockquote&gt;&lt;pre&gt;
GET /media.ogv?t=10 HTTP/1.1
Host: example.com
X-Accept-Range-Redirect: bytes
&lt;/pre&gt;&lt;/blockquote&gt;
&lt;/p&gt;
&lt;p&gt;
If the server is capable of handling the byte-range redirection mechanism, it will do so
and indicate that it has done so explicitly in its response headers.
&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Query syntax has a sensible fallback to standard HTTP&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;
However if the extra request header is not present, the server will simply send an entire
response corresponding to the requested segment. Similarly if
the header is present but the server is not capable of this new mechanism, it will simply
continue with a standard HTTP response. The client can tell if the response is a segment
response or not by the presence of an acknowledging response header.
&lt;/p&gt;
&lt;p&gt;
If either client or server does not understand the byte-range redirection protocol, the
request falls back to standard HTTP and the required segment is correctly returned.
The cost of this fallback, compared to the case where both client and server understand the
new request/response headers, is a loss of cacheability for subsequent overlapping segment
requests.
&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Fragment syntax has a high cost of failure&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;
The mechanism involving the fragment specifier does not have a fallback to standard HTTP:
if the client does not understand that it should add the Range header with newly defined units,
then it will end up simply requesting the entire resource.
Similarly, if the server does not understand the new header then it will simply respond with
the entire resource. If the cost of failure is to download some number of hours of extra video,
as it would be in the case of &lt;a href="http://www.metavid.org/"&gt;MetaVid&lt;/a&gt;'s congress
proceedings, that is a prohibitive cost.
&lt;/p&gt;

&lt;b&gt;Summary&lt;/b&gt;
&lt;p&gt;
&lt;ul&gt;
&lt;li&gt;The distinction is one of protocol mechanism&lt;/li&gt;
&lt;li&gt;For the common case of video displayed in HTML, the distinction is not user-visible&lt;/li&gt;
&lt;li&gt;The use of fragment specifiers do not have a fallback to standard HTTP&lt;/li&gt;
&lt;li&gt;The cost of discovery failure for fragments is high (retrieval of entire resource)&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;

&lt;b&gt;Actions&lt;/b&gt;
&lt;p&gt;
&lt;ul&gt;
&lt;li&gt;To clarify within the Media Fragments WG how queries can be used effectively, for both
considered user scenarios.&lt;/li&gt;
&lt;li&gt;To consider how the byte-range redirection mechanism can be generalized for other
segment specifiers, such as spatial regions.&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9101292118679422945-6879809504064613783?l=blog.kfish.org'/&gt;&lt;/div&gt;</description><link>http://blog.kfish.org/2009/04/discovery-and-fallback-for-media.html</link><author>noreply@blogger.com (Conrad Parker)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-9101292118679422945.post-2903851638392149278</guid><pubDate>Sun, 08 Mar 2009 23:59:00 +0000</pubDate><atom:updated>2009-03-09T10:40:27.319+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>spam</category><category domain='http://www.blogger.com/atom/ns#'>twitter</category><title>The economics of Twitter spam</title><description>&lt;p&gt;
Recently more and more people have reported that they are being followed by spammers on Twitter. It's easy to track this problem: just search for
&lt;a href="http://search.twitter.com/search?q=%23spam"&gt;#spam&lt;/a&gt;.
Being followed by a Twitter spammer isn't like being stalked by a murderer; actually in the current environment, these guys are a fairly benign parasite that can work in your favor. So let's look at the economics of Twitter spam.
&lt;/p&gt;
&lt;p&gt;
The upside for spammers is the usual obvious SEO shite: you've got something useless to peddle (yourself, your scam, your
illegitimate business selling poor copies of pretentious luxury goods, your legitimate business selling enhancement placebos to
suckers); you spend your time trying to defile fine and upstanding web pages with links to your pathetic piece of virtual real
estate; Twitter comes along and your primitive brain realizes it can post its links there. You follow people so that they get a
notification in their email pointing to your Twitter feed. Maybe they read it, maybe they click the tinyurl-obscured link. You cream yourself if they choose to follow you, because then they'll get all your spam, and you'll look more legit by having actual followers (like, real people from outside your cluster of bots and morons).
&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Now, what's the upside for normal humans in being followed by these scum?&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;
Knowledge is work, a means for putting food on the table; information is power, a means for taking food from others.
&lt;/p&gt;
&lt;p&gt;
Following as many people as you can on Twitter is a useful way to stay in front of your game: you know what people are up
to, you see trends evolve, you get notice of articles before they're syndicated, you watch news unfold in your little niche
of the world. And of course, the more people that follow you, the further your own message spreads: how great you are, how
you're beating the system, how your &lt;strike&gt;pretentious&lt;/strike&gt; beautiful designs and products can uplift and empower.
&lt;/p&gt;
&lt;p&gt;
So there's an incentive to increase both the number of people you follow and the number of people who follow you. The first
is easy; you just find people and press their button. The second is more difficult: you need to say something worthwhile in
your tweets. Sometimes, not always, people will reciprocate when you follow them -- (SEO tip here!:) it helps if your own
tweets are interesting.
&lt;/p&gt;
&lt;p&gt;
However, there is a
&lt;a href="http://blog.twitter.com/2008/08/making-progress-on-spam.html"&gt;2000 following limit&lt;/a&gt;: you can't follow more than 2000 people until you have 2000
followers. So, if you want to expand your reach into the info-verse, every follower counts -- even those spambots. So, now,
these guys have evolved a little symbiotic, parasitic relationship with their hosts (you). You feel the first bite when they
follow, but it feeds your ego. All you need is followers! no-one's going to do background checks on your popularity!
&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;Relevance ranking anyone?&lt;/b&gt;
&lt;/p&gt;
&lt;p&gt;
There's more to it though: Twitter search is currently being rolled out across the default user interface, and various bloggers
are describing Twitter as a "search engine" (apparently that's the appropriate noun to describe someone that collects ideas).
Twitter search is currently a realtime feed of query matches (&lt;i&gt;the zeigeist!&lt;/i&gt; *fap* *fap* *fap*) with no relevance
ranking. As the search feature gains usage, people will want relevant results to more complex queries. An obviously useful
ranking input is the number of followers that a Twit has. These spambots will make you appear relevant!
&lt;/p&gt;
&lt;p&gt;
We can follow this down silly paths -- eg. the more you tweet, the more spambot-followers you get, the more ranking relevance
you have. The spammers introduce an incentive to posting often, and that mechanism has positive feedback.
&lt;/p&gt;
&lt;p&gt;
More useful ranking mechanisms are things like reply frequency and analysis of re-tweets. Re-tweets are interesting to
track because you can find the users who originate popular ideas: give them the microphone, dammit.
&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;Action items&lt;/b&gt;
&lt;/p&gt;
&lt;p&gt;
So there's an imbalance in the Twitter economy. Spammers are using Twitter and the environment encourages it.
&lt;/p&gt;
&lt;p&gt;
Wishlist for Twitter:
&lt;/p&gt;
&lt;p&gt;
&lt;ul&gt;
&lt;li&gt;Track how often users are blocked, warn against and auto-ban them.&lt;/li&gt;
&lt;li&gt;Add user-initiated "Report spammer" buttons.&lt;/li&gt;
&lt;li&gt;Implement detection of spammer clusters and auto-ban them.&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;
&lt;p&gt;
Action items for Twitter users:
&lt;/p&gt;
&lt;p&gt;
&lt;ul&gt;
&lt;li&gt;Block spammers on Twitter.&lt;/li&gt;
&lt;li&gt;Block spammers on Twitter.&lt;/li&gt;
&lt;li&gt;Block spammers on Twitter.&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;
&lt;p&gt;
Please rant about how much you love the symbiotic parasitic relationship with your spambot-followers!
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9101292118679422945-2903851638392149278?l=blog.kfish.org'/&gt;&lt;/div&gt;</description><link>http://blog.kfish.org/2009/03/economics-of-twitter-spam.html</link><author>noreply@blogger.com (Conrad Parker)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-9101292118679422945.post-5619791254494874975</guid><pubDate>Sun, 01 Mar 2009 03:13:00 +0000</pubDate><atom:updated>2009-03-03T23:03:18.796+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>annodex</category><category domain='http://www.blogger.com/atom/ns#'>haskell</category><title>Random code: Pretty printing durations in Haskell</title><description>&lt;p&gt;
&lt;i&gt;Recently I've really enjoyed reading blog posts which just explain a little bit of code, so that's
what this is. I had this code lying around from a few months ago so I added some context and links.
It combines two of my favourite things: Annodex and Haskell!&lt;/i&gt;
&lt;/p&gt;

&lt;p&gt;&lt;b&gt;YouTube's video offset syntax&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;
Some time last year, YouTube introduced a feature which allows you to specify a hyperlink that
plays a video from a given time offset.
If you used the syntax on a random video site, it would look like this:
&lt;/p&gt;
&lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
http://www.example.com/player.html#t=3m54s
&lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
&lt;p&gt;
That syntax for this is very close to that which we use in Annodex for
&lt;a href="http://www.annodex.net/TR/draft-pfeiffer-temporal-fragments-03.html"&gt;Temporal URIs&lt;/a&gt;,
now running on Archive.org (and soon on Wikipedia):
&lt;blockquote&gt;&lt;pre&gt;
http://www.example.com/video.ogv?t=3:54
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;&lt;b&gt;Two differences:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;
1. YouTube uses a fragment instead of a query parameter.
&lt;/p&gt;
&lt;p&gt;
A fragment is something starting with '#' that tells the client to jump to a particular
offset in the document -- in general the fragment text is never seen by the server.
In the case of YouTube the HTML page contains JavaScript that tells the embedded
Flash video player to seek to the offset in the video.
&lt;/p&gt;
&lt;p&gt;
Fragments are useful in this use case, where you are instructing the embedding web page to
play the video from a given time offset. How it actually retrieves the video from
the network is not specified, but importantly there is no requirement for the embedding
web page to be reloaded.
&lt;/p&gt;
&lt;p&gt;
(This distinction between fragments and queries is part of the W3 Media Fragments WG
discussion on
&lt;a href="http://www.w3.org/2008/WebVideo/Fragments/wiki/Syntax"&gt;syntax&lt;/a&gt;).
&lt;/p&gt;

&lt;p&gt;
2. The syntax uses unit markers &lt;tt&gt;h&lt;/tt&gt;, &lt;tt&gt;m&lt;/tt&gt;, &lt;tt&gt;s&lt;/tt&gt; to separate the
parts of time, whereas our specification uses the kind of specifiers common in
industrial equipment (and clock radios).
&lt;/p&gt;
&lt;p&gt;
Perhaps one advantage of the format YouTube have chosen is readability:
sometimes it is difficult to read times such as 03:36:14.
&lt;/p&gt;
&lt;blockquote&gt;&lt;pre&gt;
http://www.example.com/video.ogv?t=3:54
http://www.example.com/video.ogv?t=00:03:54.000
http://www.example.com/video.ogv?t=npt:00:03:54.000
http://www.example.com/video.ogv?t=smpte-25:00:03:54::0
&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;
We had a recent discussion about these issues in the Media Fragments WG:
&lt;a href="http://lists.w3.org/Archives/Public/public-media-fragment/2009Feb/0013.html"&gt;
Action-28: updated syntax document with time formats&lt;/a&gt;.
I'm pretty happy with the syntax we have settled on, allowing for both readable short
timestamps and more accurate long ones.
&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Pretty printing of durations&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;
Anyway, I was bored so I hacked up a sweet fold to display the format used by YouTube.
&lt;/p&gt;
&lt;p&gt;
Haskell hackers use folds like C programmers use for loops;
the Haskell wiki page &lt;i&gt;&lt;a href="http://www.haskell.org/haskellwiki/Fold"&gt;Fold&lt;/a&gt;&lt;/i&gt;
is a beautiful introduction to the topic.
My favourite Web 1.0 interactive visualization of a left fold is at &lt;a href="http://foldl.com/"&gt;foldl.com&lt;/a&gt;
(and also be sure to check out its companion site for right folds, &lt;a href="http://foldr.com/"&gt;foldr.com&lt;/a&gt;).
&lt;/p&gt;
&lt;p&gt;
Here's a concise fold that gets us most of the way to the right syntax:
&lt;/p&gt;

&lt;blockquote&gt;&lt;pre&gt;
&amp;gt; ts = [("ms", 1000), ("s", 60), ("m", 60), ("d", 24), ("y", 365)]
&amp;gt;
&amp;gt; duz ms = ss
&amp;gt;   where (ss, _) = foldl (\(ss, x) (s, y) -&gt; (show (rem x y) ++ s ++ ss, quot x y)) ("", ms) ts
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;
Yeah, concise. Read it slow! if it was in C or Python, that one-liner would be a 10 or 5 line loop.
&lt;/p&gt;
&lt;p&gt;
You might say that you use the fold function to iterate through a list of time units,
and at each step of the iteration you do an integer division by the unit, label the remainder,
and pass the quotient on to the next step of the iteration.
A real Haskell programmer, however, might say something like
"you &lt;i&gt;fold&lt;/i&gt; the duration quotiently through the units, labelling into the syntax!", with
much wringing of hands and wishful glances for
&lt;a href="http://www.reddit.com/r/haskell/comments/7zfwd/cabal_update_cabal_install_pony_rehash/"&gt;abstract
ponies&lt;/a&gt;.
Fold is a verb, because functions are alive! Quotiently is not a word.
&lt;/p&gt;
&lt;p&gt;
A problem with &lt;tt&gt;duz&lt;/tt&gt; (apart from the crappy name) is that it shows times like &lt;tt&gt;0y0h3m54s0ms&lt;/tt&gt;.
The next implementation of &lt;tt&gt;duration&lt;/tt&gt; strips the leading and trailing zeroes:
&lt;/p&gt;

&lt;p&gt;
&lt;pre&gt;
&amp;gt; dur ms = years:rest
&amp;gt;   where (rest, years) = foldl (\(ds, x) y -&gt; ((rem x y):ds, quot x y)) ([], ms) [1000, 60, 60, 24, 365]
&amp;gt;
&amp;gt; duration ms = concat $ map (\(n, s) -&gt; show n ++ s) (takeWhile (not . zero) $ dropWhile zero labelled)
&amp;gt;   where labelled = zip (dur ms) ["y", "d", "h", "m", "s", "ms"]
&amp;gt;         zero (n, _) = (n==0)
&lt;/pre&gt;
&lt;/p&gt;
&lt;p&gt;
eg. to display the duration of 2^32 milliseconds:
&lt;/p&gt;
&lt;p&gt;
&lt;pre&gt;
*Main&amp;gt; duration (2^32)
"49d17h2m47s296ms"

*Main&amp;gt; duration 3600000
"1h"
&lt;/pre&gt;
&lt;/p&gt;
&lt;p&gt;
Fold is a generic list processing device; if you want to limit the amount of the list that is processed,
you can use functions like &lt;tt&gt;takeWhile&lt;/tt&gt; and &lt;tt&gt;dropWhile&lt;/tt&gt;.
These will take, or drop, elements from the list as long as some criterion is satisfied;
you can use them both together to trim both the start and end of the list.
Of course you can use these on the input list to limit what data is processed; but because Haskell evaluates
lazily, you can also use these on the output list to limit how much of the processing is actually done (like in &lt;tt&gt;duration&lt;/tt&gt; above).
The bits of the evaluation that don't really need to get done, aren't: the idea of doing them is
written down (on a "thunk") and thrown away. Burn your todo lists! Be lazy lazy lazy! Haskell rules.
Do you like verbs?
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9101292118679422945-5619791254494874975?l=blog.kfish.org'/&gt;&lt;/div&gt;</description><link>http://blog.kfish.org/2009/03/random-code-pretty-printing-durations.html</link><author>noreply@blogger.com (Conrad Parker)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-9101292118679422945.post-3437104379920295152</guid><pubDate>Tue, 24 Feb 2009 10:37:00 +0000</pubDate><atom:updated>2009-02-25T15:47:17.115+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>openmax</category><category domain='http://www.blogger.com/atom/ns#'>ogg</category><title>Is OpenMAX important for Free Software?</title><description>&lt;p&gt;
Much as OpenGL gives you access to 3D hardware,
&lt;a href="http://www.khronos.org/openmax/"&gt;OpenMAX&lt;/a&gt;
allows you to take advantage of hardware codecs.
This is a brief overview introducing what OpenMAX is, explaining
why it is useful for the open source community, and outlining steps for integration
with free codecs, and open source multimedia frameworks and applications.
&lt;/p&gt;

&lt;p&gt;&lt;b&gt;What is OpenMAX?&lt;/b&gt;&lt;/p&gt;
OpenMAX is a set of C APIs specified by the Khronos Group
(who also co-ordinate standards like OpenGL and OpenAL).
Whereas media frameworks like GStreamer and DirectShow are quite generic, providing all
capabilities from codec integration through to synchronization of playback and recording
and network access, OpenMAX more strictly defines three layers of operation:
&lt;ul&gt;
&lt;li&gt;OpenMAX IL (Integration Layer) is an interface to multimedia codecs implemented in
hardware or software.
It does not provide any interfaces for synchronized capture or playback of video
and audio.
&lt;/li&gt;
&lt;li&gt;OpenMAX DL (Development Layer) APIs "specify audio, video and imaging functions that can
be implemented and optimized on new CPUs, hardware engines, and DSPs and then used for
a wide range of accelerated codec functionality such as MPEG-4, H.264, MP3, AAC and JPEG."
&lt;/li&gt;
&lt;li&gt;OpenMAX AL (Application Layer) provides acceleration of capture and presentation of audio,
video, and images.
&lt;/li&gt;
&lt;/ul&gt;
The significance of this layering is that it allows hardware and software
developers to implement conformance to a particular layer, so that device manufacturers
can more reliably integrate components from each.
This creates a free market for media components as commodities; and of course open source
businesses are well suited to operating in such an environment.
&lt;/p&gt;
&lt;p&gt;
OpenMAX is already availabile in generally open source platforms like Maemo and Android.
As part of my work with Renesas I've been developing OpenMAX IL components for the
video encoding and decoding hardware on the
&lt;a href="http://www.renesas.com/fmwk.jsp?cnt=sh_mobile_family_landing.jsp&amp;fp=/products/mpumcu/sh_mobile/"&gt;SH-Mobile&lt;/a&gt;
processor series.
(However, this post does not necessarily reflect the views of my employer).
&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Open Source implementations&lt;/b&gt;&lt;/p&gt;
OpenMAX components implement a specific C API.
All components need to manage their ports and synchronize access to their input and output data
buffers, so implementations generally include a shared library for the IL core, as well as
some OpenMAX components required to pass Khronos conformance tests.
There are (at least) three open source implementations of OpenMAX IL:
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://omxil.sourceforge.net/"&gt;Bellagio&lt;/a&gt;, developed mainly by STMicroelectronics and Nokia.&lt;/li&gt;
&lt;li&gt;TI have an implementation of
&lt;a href="https://omapzoom.org/gf/project/openmax/wiki/"&gt;OpenMAX for OMAP&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;OpenCore, the multimedia framework used by the Android platform, includes an open source implementation of OpenMAX IL.
&lt;a href="http://android.git.kernel.org/?p=platform/external/opencore.git;a=tree;f=codecs_v2;h=233305583312df4bf15cf984d8c8ee914bef05a8;hb=HEAD"&gt;[gitweb]&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
So far I've been working with Bellagio, which has an active open source community.
It has a good balance between commercial concerns like manufacturer deadlines and conformance testing, and
openness to the community by encouraging and integrating development forks, and having a
responsive mailing list and bug tracker.
&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Xiph OpenMAX&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;
I haven't mentioned specific codecs yet; OpenMAX currently encourages use of non-free
codecs like MP3, MPEG-4 and H.264. This in itself is not good for the aims of Free Software, but
I think that the API standardization that OpenMAX offers can simplify the productization of
hardware implementations of free codecs.
&lt;p&gt;
&lt;a href="http://www.xiph.org/"&gt;Xiph.org&lt;/a&gt; develops free codecs (Ogg Vorbis, Theora, Dirac, Speex, CELT, FLAC).
Ogg Vorbis is required by the OpenMAX IL specification, but there are not yet
any other OpenMAX IL implementations of the other codecs.
Developing software OpenMAX IL components will allow application
developers to implement Ogg support ahead of hardware support.
It would also give hardware manufacturers a set of specific, well-defined goals for
implementing Ogg support, with the understanding that the hardware components, when shipped with
these software control APIs,
will work in a variety of open source applications with minimal modifications.
&lt;/p&gt;
&lt;p&gt;
There were a few Xiph.org people at
&lt;a href="http://www.foms-workshop.org/foms2009/"&gt;FOMS 2009&lt;/a&gt;, so I introduced what we'd need to do to
implement OpenMAX IL components for Xiph.org codecs:
&lt;ul&gt;
&lt;li&gt;Choose an OpenMAX IL framework&lt;/li&gt;
&lt;li&gt;Implement generic Ogg mux/demux components (instead of single Ogg Vorbis component)&lt;/li&gt;
&lt;li&gt;Implement IL components for each codec (Theora, Dirac, Speex, CELT, FLAC)&lt;/li&gt;
&lt;li&gt;Implement GStreamer OpenMAX plugins for each codec&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;
&lt;p&gt;
A recent thread,
&lt;a href="http://lists.xiph.org/pipermail/flac-dev/2009-February/002632.html"&gt;[Flac-dev] FLAC support
for Android?&lt;/a&gt;,
discusses requirements for implementing OpenMAX IL component for the lossless audio codec
&lt;a href="http://flac.sourceforge.net/"&gt;FLAC&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Free Software application support&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;In order to make use of OpenMAX components, applications need to either use the OpenMAX APIs
directly or use a framework which does.
For example, there is already an OpenMAX-GStreamer project which implements GStreamer plugin
wrappers for Bellagio OpenMAX IL components.
This allows any GStreamer application to take advantage of hardware codecs
when they are available, or fall back to software implementations otherwise.
This fits well with the GStreamer project's stated aim of of not implementing codecs,
but providing routing, discovery and synchronization.
&lt;/p&gt;
&lt;p&gt;
Other applications will need to use OpenMAX directly; good candidates would be applications that target mobile/embedded systems like Gnash, Fennec, WebKit and VoIP clients, as well as server-side transcoding or rendering software that needs high throughput.
&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Remember this:&lt;/b&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Mobile processors increasingly have hardware units for video encoding and decoding, as well as
audio and image processing&lt;/li&gt;
&lt;li&gt;OpenMAX gives you access to hardware codecs (audio/video, image processing etc.)&lt;/li&gt;
&lt;li&gt;Implementing OpenMAX components for free codecs will give manufacturers a clear path to hardware
implementation&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;
&lt;p&gt;
At some point in the near future it'd be great to get a few open source OpenMAX implementers together
at a conference, ideally at a more general multimedia workshop like FOMS to discuss application
integration. Perhaps at FOMS 2010, or FOMS Europe? In any case it'd be good to get some more
discussion going: do you think OpenMAX is important for Open Source, and for Free Software?
What other barriers do you think there are to hardware support for free codecs?
And would you be interested in helping out with developing and testing OpenMAX support for your
favourite codecs, and in your favourite applications?
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9101292118679422945-3437104379920295152?l=blog.kfish.org'/&gt;&lt;/div&gt;</description><link>http://blog.kfish.org/2009/02/is-openmax-important-for-free-software.html</link><author>noreply@blogger.com (Conrad Parker)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-9101292118679422945.post-7469929628834402056</guid><pubDate>Sat, 21 Feb 2009 02:24:00 +0000</pubDate><atom:updated>2009-02-21T13:09:31.792+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>linux.conf.au</category><category domain='http://www.blogger.com/atom/ns#'>productivity</category><category domain='http://www.blogger.com/atom/ns#'>life</category><category domain='http://www.blogger.com/atom/ns#'>foms</category><title>A month of Mondays</title><description>&lt;p&gt;
The last month or so has been fairly busy.
I'll write more about each of these activities, but here's a quick summary of
what I was up to (from about mid-January to mid-February):
&lt;/p&gt;&lt;p&gt;

&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;Attended the
&lt;a href="http://foms-workshop.org/"&gt;Foundations of Open Media Software&lt;/a&gt; developer workshop,
which was again held during the week before linux.conf.au in Hobart, Tasmania. I had helped organize
the workshop (what little I could do from Japan), gave an update on the state
of liboggz and an introduction to
&lt;a href="http://www.khronos.org/openmax/"&gt;OpenMAX&lt;/a&gt;.&lt;/li&gt;

&lt;li&gt;Participated in the
&lt;a href="http://annodex.org/wiki/AGM/minutes/20090116"&gt;Annodex Association AGM&lt;/a&gt;
(and I got to announce the results of the election of the 2009 committee!)&lt;/li&gt;

&lt;li&gt;Gave a talk at the
&lt;a href="http://www.open-mobile.info/"&gt;LCA OpenMobile&lt;/a&gt; miniconf about my work with Renesas:
developing software APIs for managing the hardware codecs of the SHMobile processor
series, and OpenMAX IL support.&lt;/li&gt;

&lt;li&gt;Chaired the
&lt;a href="http://annodex.org/events/lca2009_mmm/"&gt;LCA Multimedia&lt;/a&gt; miniconf, which I'd organized together with Silvia Pfeiffer&lt;/li&gt;

&lt;li&gt;Gave a presentation at linux.conf.au,
&lt;a href="http://linux.conf.au/programme/schedule/view_talk/178?day=friday"&gt;Ogg Chopping: Techniques for Programming Correctness and Efficiency&lt;/a&gt;, mainly about functional programming.&lt;/li&gt;

&lt;li&gt;Was invited to join the
&lt;a href="http://www.w3.org/2008/WebVideo/Fragments/"&gt;W3C Media Fragments Working Group&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;Got confirmation of Mozilla's funding, contracted through Wikimedia,
for work on Firefox's Ogg seeking and server negotiation.
Michael Dale and I were interviewed by Rodney Gedda of Computerworld:
&lt;a href="http://www.computerworld.com.au/article/274174/wikipedia_video_gets_boost_100_000_mozilla_grant"&gt;Wikipedia video gets boost with $100,000 Mozilla grant&lt;/a&gt;.
&lt;/li&gt;

&lt;li&gt;Prepared and held my PhD intermediate thesis defence.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
Somewhere in there I also managed to fit in a few days skiing in Hokkaido, and some time
in the office in Tokyo.
I've spent the last week relaxing back home in Kyoto and taking stock before getting back
into things.
&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;Break's over! onwards and upwards.&lt;/b&gt;
&lt;/p&gt;
&lt;p&gt;
I love Mondays!
Over the last two years I've learned a lot about how to get multiple tasks done in parallel --
a mix of GTD and some other techniques I've been developing.
Unfortunately it sometimes means making sacrifices, like getting up in the wee hours of
the morning to get work done on a ski trip; but every few months I also need a reset;
I tend to go a bit crazy whenever I visit friends back in Sydney ;-)
&lt;/p&gt;
&lt;p&gt;
If you've got any advice or words of encouragement please share them in the comments!
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9101292118679422945-7469929628834402056?l=blog.kfish.org'/&gt;&lt;/div&gt;</description><link>http://blog.kfish.org/2009/02/month-of-mondays.html</link><author>noreply@blogger.com (Conrad Parker)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-9101292118679422945.post-8580433799664346480</guid><pubDate>Tue, 23 Dec 2008 23:56:00 +0000</pubDate><atom:updated>2008-12-24T09:23:07.013+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>tractorgen</category><title>Tractorgen on github</title><description>&lt;p&gt;&lt;a href="http://www.kfish.org/software/tractorgen/"&gt;Tractorgen&lt;/a&gt; is now on github:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://github.com/kfish/tractorgen/"&gt;http://github.com/kfish/tractorgen/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;REPOSITORIAL&lt;/h4&gt;

&lt;pre&gt;
The contents of this revision controlled document repository are a computer
source code implementation of TRACTORGEN, being a model of ASCII tractor
mechanics.

It is recommended that one study these documents closely in order to better
understand the finer details of the subject at hand. The authors firmly
believe that only through such preparation, preferably during the course of
one's daily study regimen, can a deeper appreciation of the theory be
attained.

As a side note, it has been noted by correspondents that it is possible to
derive a computer readable binary executable from these documents through
the use of sophisticated compiler technology. On the off chance that any
readers would wish to pursue this path, we include the apparent preparation
for doing so herein, as quoted:

$ automake -a
$ autoreconf

Upon completion of this procedure, which we expect should take on the
order of one to two weeks (of course the actual time depends on the
staffing resources of your local computer centre), a new document shall
be generated _as though from nought!_ [emphasis added]. The name of
this document is expected to be "configure", and it may itself be
executed thus:

$ ./configure

We recommend scheduling a vacation!

Upon your return, type "make", then "make install", and prepare your
experimental apparati forthwith:

$ tractorgen

Generates ASCII tractors.
&lt;/pre&gt;

&lt;h4&gt;Commit messages&lt;/h4&gt;

&lt;p&gt;
One must eschew the typically terse and perfunctory style of commit messages
that are common in software projects, and ensure that the purpose, significance,
and experimental procedure for each incremental change are appropriately
recorded.
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Subscribe to the &lt;a href="http://github.com/feeds/kfish/commits/tractorgen/master"&gt;tractorgen commit feed&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
Obviously, commit messages are a good place to store source code for important tools:
&lt;a href="http://github.com/kfish/tractorgen/commit/9112c05d755091231818aba8c3ce46524e1100a5"&gt;9112c05&lt;/a&gt;.
&lt;/p&gt;

&lt;pre&gt;
         r-------
        _|
       / |_______\_    \\
      |          |o|----\\
      |_____________\_--_\\
     (O)_O_O_O_O_O_(O)    \\
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9101292118679422945-8580433799664346480?l=blog.kfish.org'/&gt;&lt;/div&gt;</description><link>http://blog.kfish.org/2008/12/tractorgen-on-github.html</link><author>noreply@blogger.com (Conrad Parker)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-9101292118679422945.post-1552488937746398247</guid><pubDate>Tue, 23 Dec 2008 07:34:00 +0000</pubDate><atom:updated>2008-12-23T17:59:55.500+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>haskell</category><category domain='http://www.blogger.com/atom/ns#'>ogg</category><title>Release: HOgg 0.4.1</title><description>&lt;p&gt;A new release of HOgg, on Hackage:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/hogg-0.4.1"&gt;hogg-0.4.1&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
This contains updates to work with Hackage, the Haskell source package system; and also a new
&lt;tt&gt;hogg man&lt;/tt&gt; subcommand to generate man pages for subcommands.
&lt;/p&gt;

&lt;h4&gt;Updated for Hackage&lt;/h4&gt;

&lt;p&gt;
&lt;a href="http://hackage.haskell.org/trac/hackage/"&gt;Hackage&lt;/a&gt; is Haskell's source packaging
system. It makes it very easy to keep up to date with bleeding-edge releases.
&lt;/p&gt;&lt;p&gt;
You'll need the &lt;tt&gt;cabal&lt;/tt&gt;
command. This is already in Gentoo (&lt;tt&gt;emerge cabal&lt;/tt&gt;) and Arch Linux (&lt;tt&gt;pacman -S cabal-install&lt;/tt&gt;).
If you're on a system where cabal is not already packaged, you'll first need to
&lt;a href="http://book.realworldhaskell.org/read/installing-ghc-and-haskell-libraries.html"&gt;install GHC&lt;/a&gt;
(eg. &lt;tt&gt;apt-get install ghc6&lt;/tt&gt; on Ubuntu 8.10 or Debian Lenny systems), then:
&lt;/p&gt;

&lt;pre&gt;
$ wget http://hackage.haskell.org/packages/archive/cabal-install/0.6.0/cabal-install-0.6.0.tar.gz
$ tar zxf cabal-install-0.6.0.tar.gz
$ cd cabal-install-0.6.0
$ chmod +x bootstrap.sh
$ ./bootstrap.sh
&lt;/pre&gt;

&lt;p&gt;
This will download and build the packages required to set up cabal. From there, a new Haskell
package like &lt;tt&gt;hogg&lt;/tt&gt; can be installed by simply doing:
&lt;/p&gt;

&lt;pre&gt;
$ cabal update
$ cabal install hogg
&lt;/pre&gt;
&lt;p&gt;
This will build and install &lt;tt&gt;hogg&lt;/tt&gt; into &lt;tt&gt;$HOME/.cabal/bin&lt;/tt&gt; (which of course you
should add to your $PATH if you actually want to use anything you install via cabal :-)
&lt;/p&gt;

&lt;h4&gt;man page output of self-documentation&lt;/h4&gt;

&lt;p&gt;
&lt;tt&gt;hogg&lt;/tt&gt; already generated its own help text, with runtime
&lt;a href="http://blog.kfish.org/2008/03/release-hogg-040.html"&gt;checking of example syntax&lt;/a&gt;.
This release adds a &lt;tt&gt;hogg man&lt;/tt&gt; subcommand which generates the same help text in
Unix man page format:
&lt;/p&gt;

&lt;pre&gt;
$ hogg man man

.TH HOGG 1 "December 2008" "hogg" "Annodex"
.SH SYNOPSIS

.B hogg
.RI man
[
.I OPTIONS
]


.SH DESCRIPTION
Generate Unix man page for a specific subcommand (eg. "hogg man chop")

.SH OPTIONS
  -h, -?  --help     Display this help and exit
  -V      --version  Output version information and exit

.SH EXAMPLES
.PP
Generate a man page for the "hogg chop" subcommand:
.PP
.RS
\f(CWhogg man chop\fP
.RE
.SH AUTHORS

hogg was written by Conrad Parker

This manual page was autogenerated by
.B hogg man man.

Please report bugs to &amp;lt;ogg-dev@xiph.org&amp;gt;
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9101292118679422945-1552488937746398247?l=blog.kfish.org'/&gt;&lt;/div&gt;</description><link>http://blog.kfish.org/2008/12/release-hogg-041.html</link><author>noreply@blogger.com (Conrad Parker)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-9101292118679422945.post-6269366164970335104</guid><pubDate>Fri, 04 Jul 2008 10:03:00 +0000</pubDate><atom:updated>2008-07-04T19:44:14.590+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>ogg</category><title>Release: liboggz 0.9.8</title><description>&lt;a href="http://lists.xiph.org/pipermail/ogg-dev/2008-July/001082.html"&gt;liboggz 0.9.8&lt;/a&gt;
includes the first release of &lt;tt&gt;oggz-chop&lt;/tt&gt;, as well as support for the new karaoke
codec &lt;a href="http://wiki.xiph.org/index.php/OggKate"&gt;OggKate&lt;/a&gt;.

&lt;p&gt;
&lt;tt&gt;oggz-chop&lt;/tt&gt; can be used to serve time ranges of Ogg media
over HTTP by any web server that supports CGI. The oggz-chop binary simply checks if it
is being run as a CGI script by checking some environment variables, and if so acts
based on the CGI query parameter &lt;tt&gt;t=&lt;/tt&gt;, much like &lt;tt&gt;mod_annodex&lt;/tt&gt;.
It accepts all the time specifications that
&lt;tt&gt;mod_annodex&lt;/tt&gt; accepts (&lt;tt&gt;npt&lt;/tt&gt; and various &lt;tt&gt;smpte&lt;/tt&gt; framerates),
and start and end times separated by a /.
&lt;/p&gt;
&lt;p&gt;
All you need to do is set up the following Apache config:
&lt;/p&gt;
&lt;blockquote&gt;&lt;tt&gt;
  ScriptAlias /oggz-chop /usr/bin/oggz-chop
  Action application/ogg /oggz-chop
&lt;/tt&gt;&lt;/blockquote&gt;
&lt;p&gt;
, and all your Ogg files will be handled with &lt;tt&gt;oggz-chop&lt;/tt&gt;, which means that you can
put a time range on the end, like:

&lt;blockquote&gt;
&lt;tt&gt;http://www.example.com/candidate_speech.ogv?t=00:23/00:26&lt;/tt&gt;
&lt;/blockquote&gt;

&lt;p&gt;
The minimal amount of data required to play the section between 23 and 26 seconds will
be sent to you, such that it plays back immediately from the time requested.
As for caching, it generates &lt;tt&gt;Last-Modified&lt;/tt&gt; HTTP headers, and responds correctly to
&lt;tt&gt;If-Modified-Since&lt;/tt&gt; conditional GET requests.
&lt;/p&gt;

&lt;p&gt;
It implements the same chopping algorithm as the Haskell version &lt;tt&gt;hogg chop&lt;/tt&gt;,
released in &lt;a href="http://blog.kfish.org/2007/12/release-hogg-030.html"&gt;HOgg 0.3.0&lt;/a&gt;,
so it will insert an
&lt;a href="http://wiki.xiph.org/OggSkeleton"&gt;Ogg Skeleton&lt;/a&gt;
track which can give players hints about what time the in-sync
audio and video data should start being rendered, and if any of the input files include
Skeleton information that will be preserved, and the output will contain only one Skeleton
track.
&lt;/p&gt;

&lt;p&gt;
Many thanks to Michael Dale, j^ and John Ferlito for testing out &lt;tt&gt;oggz-chop&lt;/tt&gt;
during its development.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9101292118679422945-6269366164970335104?l=blog.kfish.org'/&gt;&lt;/div&gt;</description><link>http://blog.kfish.org/2008/07/release-liboggz-098.html</link><author>noreply@blogger.com (Conrad Parker)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-9101292118679422945.post-8408668104925942601</guid><pubDate>Mon, 30 Jun 2008 11:10:00 +0000</pubDate><atom:updated>2008-06-30T20:43:04.684+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>foms</category><title>FOMS 2009 CFP</title><description>&lt;p&gt;We recently opened the
&lt;a href="http://www.foms-workshop.org/foms2009/pmwiki.php/Main/CFP"&gt;FOMS 2009 Call for Participation&lt;/a&gt;. FOMS &amp;mdash; Foundations of Open Media Software &amp;mdash; is a developer workshop "to widen cooperation and interoperability among open source media projects". It will be held a few days before &lt;a href="http://linux.conf.au/"&gt;linux.conf.au&lt;/a&gt;, in Hobart, Tasmania.
&lt;/p&gt;
&lt;p&gt;
This year's FOMS had a large emphasis on
&lt;a href="http://blog.kfish.org/2008/02/foms-lca-2008-roundup.html"&gt;free codecs&lt;/a&gt;, with many of the Xiph.Org developers in attendance.
In 2009 we really hope to expand the participation to include people from projects with alternate technical viewpoints, such as those of
&lt;a href="http://www.mplayerhq.hu"&gt;MPlayer&lt;/a&gt; and &lt;a href="http://nut-container.org/"&gt;NUT&lt;/a&gt;. It would also be good to get some exposure to projects like
&lt;a href="http://openbossa.indt.org/canola/"&gt;Canola2&lt;/a&gt; and
&lt;a href="http://omxil.sourceforge.net/"&gt;Bellagio&lt;/a&gt;, in order to deal with the issues of mobile multimedia. If you're involved in development of those or similar projects and would be interested in attending FOMS 2009, please respond to the CFP; there will be some travel grants available to help get you to Tasmania.
&lt;/p&gt;

&lt;b&gt;Related conferences&lt;/b&gt;

&lt;ul&gt;
&lt;li&gt;I'll be at &lt;a href="http://linuxplumbersconf.org/"&gt;Linux Plumbers Conference&lt;/a&gt; 2008 in Portland, Oregon, specifically for the "Audio" microconf.&lt;/li&gt;
&lt;li&gt;We hope to run a Multimedia Miniconf at LCA 2009 :-)&lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9101292118679422945-8408668104925942601?l=blog.kfish.org'/&gt;&lt;/div&gt;</description><link>http://blog.kfish.org/2008/06/foms-2009-cfp.html</link><author>noreply@blogger.com (Conrad Parker)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-9101292118679422945.post-8373941523429907668</guid><pubDate>Thu, 17 Apr 2008 14:45:00 +0000</pubDate><atom:updated>2008-04-18T00:30:28.061+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>firefox</category><category domain='http://www.blogger.com/atom/ns#'>vimperator</category><category domain='http://www.blogger.com/atom/ns#'>rikaichan</category><title>:rikaichan for Vimperator</title><description>&lt;p&gt;
Some of my favourite Firefox plugins are:
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.polarcloud.com/rikaichan/"&gt;Rikaichan&lt;/a&gt;, a Japanese dictionary, which adds instant translation popups when you mouse over a word;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://vimperator.mozdev.org/"&gt;Vimperator&lt;/a&gt;, which provides &lt;tt&gt;vi&lt;/tt&gt;-like user interface;&lt;/li&gt;
&lt;li&gt;and &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/1337"&gt;Hide Tab Bar&lt;/a&gt;, because Vimperator's buffer list is more useful.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Vimperator hides the menu bar by default. &lt;b&gt;Tools-&gt;Toggle Rikaichan&lt;/b&gt; has no default keybinding, and the keybindings to navigate the menubar are not available if the menubar is not visible, so Rikaichan can no longer be activated.
&lt;/p&gt;
&lt;p&gt;
The following adds a vimperator command &lt;tt&gt;:rikaichan&lt;/tt&gt;; save it to &lt;tt&gt;.vimperator/plugin/toggleRikaichan.js&lt;/tt&gt;:

&lt;blockquote&gt;&lt;pre&gt;
(function(){
    vimperator.commands.add(new vimperator.Command(
        ['rikaichan', 'rikai'],
        function(){
            rcxMain.inlineToggle();
        }
    ))
}) ();
&lt;/pre&gt;&lt;/blockquote&gt;
&lt;/p&gt;
&lt;p&gt;
It is aliased to &lt;tt&gt;:rikai&lt;/tt&gt; for short, but unfortunately vimperator won't recognize &lt;tt&gt;:理解&lt;/tt&gt;.
Thanks to ktsukagoshi for the explanation of how to write a vimperator plugin (&lt;a href="http://d.hatena.ne.jp/ktsukagoshi/20080305/1204730962"&gt;vimperatorのプラグインの作成&lt;/a&gt;).
&lt;/p&gt;
&lt;p&gt;
&lt;i&gt;Remember, &lt;a href="http://www.vergenet.net/~conrad/syre/"&gt;the interface is inside your mind&lt;/a&gt;.&lt;/i&gt;
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9101292118679422945-8373941523429907668?l=blog.kfish.org'/&gt;&lt;/div&gt;</description><link>http://blog.kfish.org/2008/04/rikaichan-for-vimperator.html</link><author>noreply@blogger.com (Conrad Parker)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-9101292118679422945.post-8478267578838678327</guid><pubDate>Mon, 14 Apr 2008 07:30:00 +0000</pubDate><atom:updated>2008-04-14T17:10:56.059+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>continuation fest</category><category domain='http://www.blogger.com/atom/ns#'>haskell</category><title>Continuation Fest 2008: Continuations for video decoding and scrubbing</title><description>&lt;p&gt;
Yesterday was &lt;a href="http://logic.cs.tsukuba.ac.jp/Continuation/"&gt;Continuation Fest 2008&lt;/a&gt;,
at the University of Tokyo's campus in Akihabara (a very nice venue!).
It was very well attended; latecomers overflowed to a second room and participated by video conference. It was a little strange to see so many people interested in such an
&lt;strike&gt;obscure, troublesome and malignant&lt;/strike&gt; expressively powerful
programming construct; the breadth of talks made for a very inspiring and practical introduction to the theory, applications and implementation of continuations in many different languages.
&lt;/p&gt;
&lt;p&gt;
I recommend reading
&lt;a href="http://pllab.is.ocha.ac.jp/~asai/"&gt;Kenichi Asai&lt;/a&gt;'s
introduction to delimited continuations
(&lt;a href="http://pllab.is.ocha.ac.jp/~asai/papers/contfest08slide.pdf"&gt;slides&lt;/a&gt; [PDF]).
He introduced the &lt;tt&gt;shift&lt;/tt&gt; and &lt;tt&gt;reset&lt;/tt&gt; operators
through the problem of expressing exceptional control flow, and
then explained how to use these to type (ie. determine a concrete type for)
&lt;tt&gt;printf&lt;/tt&gt;. The main point was that
&lt;tt&gt;shift/reset&lt;/tt&gt; provide a high-level abstraction over control flow, with minimal impact
on the implementation of your existing functions.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://okmij.org/ftp/"&gt;Oleg Kiselyov&lt;/a&gt; demonstrated some new code for transactional
web applications, using delimited continuations for explicit state sharing between parallel connections. The result is that the user has a consistent view across multiple tabs are open on the same site, and the state is transactional so that there is no need for warnings like "Do not press the BUY button more than once!". He said that everyone already understands delimited continuations, they just don't realize it.
&lt;/p&gt;
&lt;p&gt;
The topic of my presentation at Continuation Fest was
&lt;b&gt;Continuations for video decoding and scrubbing&lt;/b&gt;:
&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;
Playback of encoded video involves scheduling the decoding of audio and video frames and synchronizing their playback. "Scrubbing" is the ability to quickly seek to and display an arbitrary frame, and is a common user interface requirement for a video editor. The implementation of playback and scrubbing is complicated by data dependencies in compressed video formats, which require setup and manipulation of decoder state.
&lt;/p&gt;&lt;p&gt;
We present the preliminary design of a continuation-based system for video decoding, reified as a cursor into a stream of decoded video frames. Frames are decoded lazily, and decoder states are recreated or restored when seeking. To reduce space requirements, a sequence of decoded frames can be replaced after use by the continuation which created them.
&lt;strike&gt;We outline implementations in Haskell and C.&lt;/strike&gt;
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://seq.kfish.org/~conrad/static/continuation-fest-2008/continuations-for-video.pdf"&gt;Slides&lt;/a&gt; [383KB PDF]&lt;/li&gt;
&lt;li&gt;&lt;a href="http://seq.kfish.org/~conrad/static/continuation-fest-2008/continuations-for-video.article.pdf"&gt;Article&lt;/a&gt; [215KB PDF]&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;

&lt;p&gt;I'll be introducing the code for this over the next few months.
Whereas in my presentation about
&lt;a href="http://blog.kfish.org/2008/03/bossa-2008-video-player-internals.html"&gt;video player internals&lt;/a&gt; at BOSSA I outlined the problem space in designing a multimedia architecture,
at Continuation Fest I tried to break it down into subproblems and considered
useful data structures and programming techniques for dealing with them.
&lt;/p&gt;
&lt;p&gt;
I got a lot of great feedback, and I think I succeeded in my mission to introduce this problem space to some really smart people.
Thanks particularly to
&lt;a href="http://www.cs.rutgers.edu/~ccshan"&gt;Chung-chieh Shan&lt;/a&gt; for some insightful ideas
about how to deal with existing stateful codec implementations. It was also very interesting to
talk with
&lt;a href="http://www.ie.u-ryukyu.ac.jp/~kono/index-e.html"&gt;Shinji Kono&lt;/a&gt; about
&lt;a href="http://sourceforge.jp/projects/cbc/"&gt;Continuation-based C (cBc)&lt;/a&gt;
(&lt;a href="http://www.ie.u-ryukyu.ac.jp/~kono/tmp/cf08-kono.tgz"&gt;slides&lt;/a&gt; [HTML tarball]),
a C-like language capable of expressing continuations, non-local jumps, multiple function entry-points, and assorted other ways to shoot yourself in the foot. He suggested that it was designed for exactly the kind of thing I'm doing, and I'll be interested to try it
out. It is implemented in a modifed GCC 4.x as an RTL code generator, so should now be (fairly)
architecture-independent.
&lt;/p&gt;
&lt;p&gt;
Thanks to the organizers of Continuation Fest 2008 for putting together such a useful and interesting event. I look forward to implementing just some of the things I learned :-)
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9101292118679422945-8478267578838678327?l=blog.kfish.org'/&gt;&lt;/div&gt;</description><link>http://blog.kfish.org/2008/04/continuation-fest-2008-continuations.html</link><author>noreply@blogger.com (Conrad Parker)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-9101292118679422945.post-6484626782594667327</guid><pubDate>Fri, 11 Apr 2008 21:43:00 +0000</pubDate><atom:updated>2008-04-12T06:50:09.367+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>sweep</category><category domain='http://www.blogger.com/atom/ns#'>security</category><title>Release: Sweep 0.9.3</title><description>This is a bugfix release of &lt;a href="http://www.metadecks.org/software/sweep/"&gt;Sweep&lt;/a&gt;,
addressing &lt;a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-1686"&gt;CVE-2008-1686&lt;/a&gt;.
For details, see my earlier post about
&lt;a href="http://blog.kfish.org/2008/04/release-libfishsound-091.html"&gt;libfishsound 0.9.1&lt;/a&gt;.
Thanks to Peter Shorthose for managing this release.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9101292118679422945-6484626782594667327?l=blog.kfish.org'/&gt;&lt;/div&gt;</description><link>http://blog.kfish.org/2008/04/release-sweep-093.html</link><author>noreply@blogger.com (Conrad Parker)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-9101292118679422945.post-4753778705188094077</guid><pubDate>Mon, 07 Apr 2008 01:08:00 +0000</pubDate><atom:updated>2008-04-07T12:29:34.660+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>ogg</category><category domain='http://www.blogger.com/atom/ns#'>fishsound</category><category domain='http://www.blogger.com/atom/ns#'>security</category><title>Release: libfishsound 0.9.1</title><description>&lt;p&gt;
This is a maintenance release, fixing a security vulnerability in Speex header processing as outlined in &lt;a href="http://www.ocert.org/advisories/ocert-2008-2.html"&gt;oCERT 2008-02&lt;/a&gt;.
When used in a client for web video content, as in the
&lt;a href="http://www.annodex.net/"&gt;OggPlay Firefox Plugin&lt;/a&gt; or the
&lt;a href="http://www.illiminable.com/ogg/"&gt;Ogg DirectShow filters&lt;/a&gt;, a specially crafted Ogg Speex stream hosted on a server could be used to allow an attacker to execute arbitrary code on the client system. The OggPlay plugin binaries available from &lt;a href="http://www.annodex.net/"&gt;www.annodex.net&lt;/a&gt; have already been updated.
&lt;/p&gt;
&lt;h4&gt;Details&lt;/h4&gt;
&lt;p&gt;
The &lt;a href="http://wiki.xiph.org/OggSpeex"&gt;Speex header&lt;/a&gt; contains a 32-bit &lt;tt&gt;modeID&lt;/tt&gt; field, interpreted by libspeex as a signed int (&lt;tt&gt;spx_int32_t&lt;/tt&gt;)
The normal way to use this is to index into a global mode list to retrieve a SpeexMode *:
&lt;blockquote&gt;&lt;pre&gt;
mode = (SpeexMode *)speex_mode_list[modeID];
&lt;/pre&gt;&lt;/blockquote&gt;

and then use that to set up a decoder:
&lt;blockquote&gt;&lt;pre&gt;
st = speex_decoder_init(mode);
&lt;/pre&gt;&lt;/blockquote&gt;

This calls &lt;tt&gt;speex_decoder_init()&lt;/tt&gt; in libspeex, which looks like:

&lt;blockquote&gt;&lt;pre&gt;
void *speex_decoder_init(const SpeexMode *mode)
{
   return mode-&gt;dec_init(mode);
}
&lt;/pre&gt;&lt;/blockquote&gt;

So if you don't check that the &lt;tt&gt;modeID&lt;/tt&gt; given in the stream header is within the bounds of &lt;tt&gt;speex_mode_list[]&lt;/tt&gt;, arbitrary code can be executed.
&lt;tt&gt;libfishsound&lt;/tt&gt; was checking the upper bound (&lt;tt&gt;modeID &amp;lt; SPEEX_NB_MODES&lt;/tt&gt;) but was not checking against negative values.
&lt;/p&gt;
&lt;h4&gt;Discussion&lt;/h4&gt;
&lt;p&gt;
This header processing is all boilerplate, and a reference implementation is given in
&lt;a href="http://svn.xiph.org/trunk/speex/src/speexdec.c"&gt;speexdec.c&lt;/a&gt;.
I took a copy of that about 7 years ago for
&lt;a href="http://www.metadecks.org/software/sweep/"&gt;Sweep&lt;/a&gt;, which I then adapted for libfishsound. The current reference speexdec.c does not have this bug.
&lt;/p&gt;
&lt;p&gt;
For the Symbian port of Speex we created a function which returns the desired mode given a modeID, rather than having application code index into a global mode list.
I wrote and committed &lt;a href="https://trac.xiph.org/changeset/7511"&gt;speex_get_mode()&lt;/a&gt;
to libspeex in September 2004, and it does the correct bounds checking.
So if I'd been using that function in libfishsound then today's problem would never have happened. As it turns out, the libfishsound svn trunk version of
&lt;a href="http://svn.annodex.net/libfishsound/trunk/src/libfishsound/speex.c"&gt;speex.c&lt;/a&gt;
does use that function. As far as I am aware, the OggPlay plugin binaries have always been built against the libfishsound svn trunk, so they were never vulnerable in the first place. However, recent tarball releases of libfishsound have been coming of a separate branch, so the advisory is valid for applications linked against those releases.
&lt;/p&gt;  
&lt;p&gt;
Finally, I sent a patch to 
&lt;a href="http://people.xiph.org/~jm/"&gt;Jean-Marc Valin&lt;/a&gt; yesterday which entirely removes the possibility of this bug happening again by bounding the mode values returned by &lt;tt&gt;speex_packet_to_header()&lt;/tt&gt; in libspeex. It will be available very soon in a libspeex release.
&lt;/p&gt;
&lt;h4&gt;Acknowledgements&lt;/h4&gt;
&lt;p&gt;
Thanks to the team at &lt;a href="http://www.ocert.org/"&gt;oCERT&lt;/a&gt; for the efficient reporting of this advisory, and to the anonymous submitter for the details.
I was able to patch the offending branches, which allowed 
&lt;a href="http://v2v.cc/~j/"&gt;j^&lt;/a&gt; to build and upload new OggPlay plugin binaries (within 24 hours of contact by oCERT).
&lt;/p&gt;
&lt;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://lists.xiph.org/pipermail/speex-dev/2008-April/006636.html"&gt;libfishsound 0.9.1 release notes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ocert.org/advisories/ocert-2008-2.html"&gt;oCERT 2008-02&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9101292118679422945-4753778705188094077?l=blog.kfish.org'/&gt;&lt;/div&gt;</description><link>http://blog.kfish.org/2008/04/release-libfishsound-091.html</link><author>noreply@blogger.com (Conrad Parker)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-9101292118679422945.post-8395424576443155275</guid><pubDate>Mon, 24 Mar 2008 18:23:00 +0000</pubDate><atom:updated>2008-03-25T05:22:20.038+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>haskell</category><category domain='http://www.blogger.com/atom/ns#'>ogg</category><title>Release: HOgg 0.4.0</title><description>&lt;p&gt;
&lt;a href="http://www.vergenet.net/~conrad/software/hogg/"&gt;HOgg&lt;/a&gt;
is a Haskell library and commandline tool for manipulating Ogg files.
This release contains a bunch of code written during &lt;a href="http://blog.kfish.org/2008/02/foms-lca-2008-roundup.html"&gt;FOMS and LCA 2008&lt;/a&gt;, including
a new sort subcommand and proper handling of Skeleton when merging and ripping files. Full details are in the
&lt;a href="http://www.vergenet.net/~conrad/software/hogg/release_notes/hogg-0.4.0.txt"&gt;release notes&lt;/a&gt;.
&lt;/p&gt;

&lt;h3&gt;sort implementation&lt;/h3&gt;
&lt;p&gt;
My favourite part is the implementation of the new &lt;tt&gt;sort&lt;/tt&gt; subcommand:
&lt;blockquote&gt;
&lt;pre&gt;
sort :: [OggPage] -&gt; [OggPage]
sort = sortHeaders . listMerge . demux
&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/p&gt;
&lt;p&gt;
This is somewhat shorter than the equivalent C implementation,
&lt;a href="http://svn.annodex.net/liboggz/trunk/src/tools/oggz-sort.c"&gt;oggz-sort.c&lt;/a&gt; &amp;mdash;
&lt;b&gt;Haskell affords abstraction whereas in C it's a trade-off&lt;/b&gt;.
&lt;tt&gt;sortHeaders&lt;/tt&gt; is a long (21 line) function that re-orders header pages according to
the Theora and Skeleton specifications, and &lt;tt&gt;listMerge&lt;/tt&gt; is a generic list merging function, also used in the &lt;tt&gt;merge&lt;/tt&gt; subcommand. &lt;tt&gt;demux&lt;/tt&gt; is tiny:
&lt;blockquote&gt;
&lt;pre&gt;
demux :: (Serialled a) =&gt; [a] -&gt; [[a]]
demux = classify serialEq
&lt;/pre&gt;
&lt;/blockquote&gt;
You can read that as "demux is classification by serial number": &lt;tt&gt;classify&lt;/tt&gt; is a generic list function, classifying list elements according to some criterion you give it. Here, for example, the list of pages:
&lt;blockquote&gt;
&lt;tt&gt;[Video0, Audio0, Video1, Audio1, Audio2, Audio3, Video2, Audio4, Video3, ...]&lt;/tt&gt;
&lt;/blockquote&gt;
will get classified into two separate lists:
&lt;blockquote&gt;
&lt;pre&gt;
[[Video0, Video1, Video2, Video3, ...],
 [Audio0, Audio1, Audio2, Audio3, Audio4, ...]]
&lt;/pre&gt;
&lt;/blockquote&gt;
This is done lazily, meaning that the processing is done on the fly and big intermediate lists are not constructed in memory. &lt;tt&gt;Video0&lt;/tt&gt;, &lt;tt&gt;Audio0&lt;/tt&gt; will be passed through &lt;tt&gt;listMerge&lt;/tt&gt; and &lt;tt&gt;sortHeaders&lt;/tt&gt; and written to disk by the consumer of &lt;tt&gt;sort&lt;/tt&gt; well before &lt;tt&gt;Video103&lt;/tt&gt; and &lt;tt&gt;Audio5007&lt;/tt&gt; are seen.
&lt;/p&gt;

&lt;h3&gt;Documentation improvements and self-checking&lt;/h3&gt;
&lt;p&gt;
The help for each subcommand now contains long descriptions, mostly similar to the man pages of the
&lt;a href="http://www.annodex.net/software/liboggz/index.html"&gt;&lt;tt&gt;Oggz&lt;/tt&gt;&lt;/a&gt; tools.
The descriptions also have explicit sections describing how Theora, Skeleton and chained files are handled.
The example commandlines for each subcommand use the
&lt;a href="http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions"&gt;Ogg MIME types and file extensions&lt;/a&gt; that we are now recommending in Xiph.Org.
&lt;/p&gt;
&lt;p&gt;
The best bit though is &lt;tt&gt;hogg selfcheck&lt;/tt&gt;, which checks that the help examples are valid.
It checks that all the example commandlines pass through getOpt without errors, and that all file extensions used in options are valid. This is the kind of nice touch which would have been a pain to code up in C, but fell out cleanly in the Haskell implementation. As it is fairly cheap to run (and printing help text is hardly a performance-critical operation), this option is also silently run after printing out any help output at all, so that such errors are more likely to be found
and reported. The same commit that introduced &lt;tt&gt;hogg selfcheck&lt;/tt&gt; also fixed two such documentation errors which were found by this option :-)
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9101292118679422945-8395424576443155275?l=blog.kfish.org'/&gt;&lt;/div&gt;</description><link>http://blog.kfish.org/2008/03/release-hogg-040.html</link><author>noreply@blogger.com (Conrad Parker)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-9101292118679422945.post-2394818974149938437</guid><pubDate>Mon, 24 Mar 2008 18:17:00 +0000</pubDate><atom:updated>2008-03-25T05:16:49.585+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>xsel</category><title>Release: xsel 1.2.0</title><description>&lt;p&gt;
&lt;a href="http://www.kfish.org/software/xsel/"&gt;XSel&lt;/a&gt; is a command-line tool for manipulating the X selection.
This is a maintenance release, improving argument handling, documentation and X11 library detection.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.vergenet.net/~conrad/software/xsel/download/xsel-1.2.0.tar.gz"&gt;xsel-1.2.0.tar.gz&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://svn.kfish.org/xsel/trunk/release_notes/xsel-1.2.0.txt"&gt;Release notes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9101292118679422945-2394818974149938437?l=blog.kfish.org'/&gt;&lt;/div&gt;</description><link>http://blog.kfish.org/2008/03/release-xsel-120.html</link><author>noreply@blogger.com (Conrad Parker)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-9101292118679422945.post-3484153005411885323</guid><pubDate>Mon, 24 Mar 2008 17:29:00 +0000</pubDate><atom:updated>2008-03-25T03:15:30.394+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>bossa</category><title>BOSSA 2008: Video Player Internals</title><description>&lt;p&gt;Last week I attended
&lt;a href="http://www.bossaconference.indt.org/"&gt;BOSSA&lt;/a&gt;, a conference on open source software
for mobile embedded platforms, organized by &lt;a href="http://www.indt.org.br/"&gt;INdT&lt;/a&gt;. It was held in the town of Porto de Galinhas, Brazil.
Since then I have been hanging out in the INdT labs in Recife, hacking on xine, catching up with friends and exploring the old city.
&lt;/p&gt;&lt;p&gt;
The topic of my presentation at BOSSA was &lt;b&gt;Video Player Internals&lt;/b&gt;:
&lt;blockquote&gt;
Embedded platforms put demands on latency and memory use. Video playback
makes these difficult to guarantee. This presentation discusses the
architecture of video players, and the problems imposed on them by the
design of video codecs and their containers. To explain these problems
we look at both proprietary and open source formats (MPEG, Ogg, Theora,
Dirac, etc.) and evaluate open source video players in this context.
We particularly examine xine and GStreamer, and introduce the minimal
architecture of OggPlay.
&lt;/blockquote&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://seq.kfish.org/~conrad/static/bossa-2008/video-player-internals.pdf"&gt;Slides&lt;/a&gt; [613KB PDF]&lt;/li&gt;
&lt;li&gt;&lt;a href="http://seq.kfish.org/~conrad/static/bossa-2008/video-player-internals.article.pdf"&gt;Article&lt;/a&gt; [330KB PDF]&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;
&lt;p&gt;
I'm very grateful to INdT for the opportunity to attend, it was an awesome conference in a very beautiful part of the world.
&lt;/p&gt;
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9101292118679422945-3484153005411885323?l=blog.kfish.org'/&gt;&lt;/div&gt;</description><link>http://blog.kfish.org/2008/03/bossa-2008-video-player-internals.html</link><author>noreply@blogger.com (Conrad Parker)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-9101292118679422945.post-4341732321478649420</guid><pubDate>Fri, 15 Feb 2008 08:54:00 +0000</pubDate><atom:updated>2008-02-15T18:24:33.429+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>ogg</category><title>Release: liboggz 0.9.7</title><description>&lt;p&gt;
There's been a whole bunch of work on
&lt;a href="http://www.annodex.net/software/liboggz/index.html"&gt;liboggz&lt;/a&gt; recently; it deserves a few more weeks of
shaking out and perhaps some updated Win32/MacOS support before it gets 1.0 slapped on it.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://lists.xiph.org/pipermail/ogg-dev/2008-February/000847.html"&gt;liboggz 0.9.7&lt;/a&gt;
includes a new tool called oggz-sort, which addresses a problem with some encoders that
Shane Stephens brought up at
&lt;a href="http://www.annodex.org/events/foms2008/pmwiki.php/Main/Proceedings"&gt;FOMS&lt;/a&gt;. The
discussion was going around in circles, so my response was to write this C code. It implements a function that Shane has written but not yet released in his OCaml implementation of Ogg
(&lt;a href="http://svn.annodex.net/oogg/trunk/"&gt;oogg&lt;/a&gt;), and
which I've written but not yet released in my Haskell implementation (&lt;a href="http://www.kfish.org/software/hogg/"&gt;HOgg&lt;/a&gt;). Of course, people will take this version more seriously because it's written in C.
&lt;/p&gt;
&lt;p&gt;
From &lt;tt&gt;&lt;b&gt;oggz-sort (1)&lt;/b&gt;&lt;/tt&gt;:
&lt;blockquote&gt;
&lt;p&gt;
&lt;b&gt;oggz-sort&lt;/b&gt; sorts an Ogg file, interleaving pages in order  of  presentation  time.  It  correctly  interprets the granulepos timestamps of Ogg
Vorbis, Speex, FLAC and Theora bitstreams, and all bitstreams  of  Annodex files.
&lt;/p&gt;&lt;p&gt;
Some  encoders produce files with incorrect page ordering; for example,
some audio and video pages may occur out of order. Although these files
are  usually  playable, it can be difficult to accurately seek or scrub
on them, increasing the likelihood of glitches during playback. Players
may  also need to use more memory in order to buffer the audio and
video data for synchronized playback, which can be a problem  when  the
files are viewed on low-memory devices.
&lt;/p&gt;&lt;p&gt;
The  tool  &lt;b&gt;oggz-validate&lt;/b&gt;  can be used to check the relative ordering of
packets in a file. If out of order packets are reported, use &lt;b&gt;oggz-sort&lt;/b&gt;
to fix the problem.
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/p&gt;
&lt;p&gt;
This release also adds support for the experimental
&lt;a href="http://lists.xiph.org/pipermail/ogg-dev/2007-December/000706.html"&gt;CELT&lt;/a&gt; audio codec, which is being developed
by Jean-Marc Valin (the primary author of &lt;a href="http://www.speex.org/"&gt;Speex&lt;/a&gt;). CELT is
designed as a low-latency codec for high-quality audio. When wiretapping conversations
encoded in CELT, we recommend that you record using the Ogg container format. You can then use oggz-tools to help with your analysis.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9101292118679422945-4341732321478649420?l=blog.kfish.org'/&gt;&lt;/div&gt;</description><link>http://blog.kfish.org/2008/02/release-liboggz-097.html</link><author>noreply@blogger.com (Conrad Parker)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-9101292118679422945.post-7742603208750161824</guid><pubDate>Sat, 09 Feb 2008 23:30:00 +0000</pubDate><atom:updated>2008-02-10T10:55:09.111+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>xsel</category><title>Release: xsel 1.1.0</title><description>&lt;p&gt;
This is a story about the meaning of "version 1.0".
A few weeks ago I released
&lt;a href="http://blog.kfish.org/2008/01/release-xsel-100.html"&gt;version 1.0 of xsel&lt;/a&gt;, a simple commandline utility
for manipulating the X selection and clipboard.
I chose to call it 1.0 after recalling a discussion with
&lt;a href="http://www.algorithm.com.au/"&gt;Andr&amp;eacute; Pang&lt;/a&gt;,
about how the meaning of version numbers in open source software tends to differ from that in other software communities. For example, it is often advised not to buy the first version of a proprietary software product as it is sure to be buggy and incomplete; open source projects on the other hand often aspire to 1.0 being a major milestone, bug-free and fully-functional. The Windows and Mac freeware and shareware communities tend to follow a middle ground, content to release a useful but incomplete version 1.0, but thereafter avoiding the quick version creep that afflicts companies with marketing departments (and version-limited support contracts).
&lt;/p&gt;
&lt;p&gt;
I'll argue that that middle way makes for more meaningful version numbers. Putting the label "1.0" on a release should be your way of saying that it's the first version that:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;won't hose a user's system, and&lt;/li&gt;
&lt;li&gt;hopefully does something useful.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Any version number less than 1.0 is sending out a signal that the software isn't quite ready yet; perhaps that you could lose or damage data by using it. Many people intuitively wait for version 1.0 before trying out some software, and this is fair enough. In fact, we &lt;i&gt;need&lt;/i&gt; a way of warning that a project isn't ready for widespread adoption, that it could damage data, that the tarball is only out there so that other people can grab the code and help fix bugs. That's what version numbers less than 1.0 mean.
&lt;/p&gt;
&lt;p&gt;
After 1.0, you can keep adding features and bumping the version number, working towards version 2.0 which perhaps does useful things in a different way. And from 2.0, onwards to 3.0 and beyond; integers are cheap. The important thing is not fall into the trap of thinking of 1.0 as some kind of asymptotic upper bound representing the perfect release.
&lt;/p&gt;
&lt;p&gt;
Back to xsel. At first I wrote up release notes as version 0.9.7, but then
then remembered that discussion with Andr&amp;eacute; and realized that it should really
just be 1.0.
More to the point the previous release (in July 2001, which went five years without a bug report or patch) should have been 1.0. So yeah, it was a good feeling to just write "1.0" and send it out.
&lt;/p&gt;
&lt;p&gt;
The morning after releasing 1.0 I got a report from someone who couldn't get
it to compile -- turns out they didn't have the X11 development libraries
installed, and for some reason I had commented out the checks for that
in &lt;tt&gt;configure.ac&lt;/tt&gt; while testing something or other a while ago.
As a result, the configure script wasn't check for its only dependency.
I considered doing a canonical 1.0.1 (LOL) release. Within the next day, though,
I got a report about how to fix handling of COMPOUND_TEXT, an archaic way of
handling international text (since superceded by UTF8_STRING). And there follows
the next lesson (as berated by &lt;a href="http://www.rasterman.com/"&gt;Raster&lt;/a&gt;): random
bug reports stream in &lt;emph&gt;after&lt;/emph&gt; a release, not before.
&lt;a href="http://www.mega-nerd.com/"&gt;Erik de Castro Lopo&lt;/a&gt; is up to his 20th
pre-release of libsndfile 1.0.18; each pre-release he gets bombarded with reports.
&lt;/p&gt;
&lt;p&gt;
Anyway, the post-1.0 bug reports have died down, so today I'm releasing version 1.1.0 of
&lt;a href="http://www.vergenet.net/~conrad/software/xsel"&gt;xsel&lt;/a&gt;.
&lt;i&gt;"This release adds basic support for COMPOUND_TEXT and fixes a configuration bug"&lt;/i&gt;.
And I'm still waiting to hear good uses of &lt;b&gt;&lt;tt&gt;xsel --append&lt;/tt&gt;&lt;/b&gt; and
&lt;b&gt;&lt;tt&gt;xsel --follow&lt;/tt&gt;&lt;/b&gt;.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9101292118679422945-7742603208750161824?l=blog.kfish.org'/&gt;&lt;/div&gt;</description><link>http://blog.kfish.org/2008/02/release-xsel-110.html</link><author>noreply@blogger.com (Conrad Parker)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-9101292118679422945.post-663768690450268455</guid><pubDate>Fri, 08 Feb 2008 05:58:00 +0000</pubDate><atom:updated>2008-02-08T16:49:39.606+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>linux.conf.au</category><category domain='http://www.blogger.com/atom/ns#'>foms</category><title>FOMS, LCA Multimedia 2008: Videos</title><description>&lt;p&gt;
I arrived back in Japan after a few awesome weeks in Australia for
&lt;a href="http://www.annodex.org/events/foms2008/pmwiki.php/Main/HomePage"&gt;FOMS&lt;/a&gt; and &lt;a href="http://linux.conf.au/"&gt;LCA&lt;/a&gt;. The weather in Melbourne was great, and the food was fantastic.
&lt;/p&gt;
&lt;p&gt;
Between FOMS and LCA, dozens of free multimedia software developers were in town. It was the first time that developers of Dirac, Speex, Theora, Vorbis, Ogg, and most of the Annodex crew were all in the same place, so we spent most of the week of LCA holed up in a room designing content description and packaging formats. One immediate outcome will be finalization of the Dirac mapping into the Ogg container.
&lt;/p&gt;
&lt;p&gt;
I organised the multimedia miniconf on the Monday of LCA, which was jam-packed with excellent presentations and lightning talks. Thanks to everyone who came, and talked, and video recorded. There were plenty of comments along the lines of it being "pretty hardcore for a miniconf".
If you are interested in helping with next year's LCA Multimedia, or have friends in Hobart who might be able to help, let's start throwing around ideas. In particular, quite a few people asked what happened to the audio miniconf parties from a few years ago, and it might be a good chance to revive those ...
&lt;/p&gt;
&lt;h4&gt;Videos&lt;/h4&gt;
&lt;p&gt;
The following pages contain embedded videos of the presentations from these events, and the multimedia-related presentations from LCA:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.annodex.org/events/foms2008/pmwiki.php/Main/Proceedings"&gt;FOMS Proceedings&lt;/a&gt;: introductions by the participants&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.annodex.org/events/lca2008_mmm/pmwiki.php/Main/Schedule"&gt;LCA Multimedia&lt;/a&gt;: Dirac, Xiph, EngageMedia, FFADO and many others&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.annodex.org/events/lca2008_mmm/pmwiki.php/Main/LCA"&gt;Multimedia talks @LCA&lt;/a&gt;: PulseAudio, Ogg, Theora, Telepathy, Farsight ...&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;
The videos on these pages are embedded with &lt;a href="http://metavid.ucsc.edu/wiki/index.php/Mv_embed"&gt;mv_embed&lt;/a&gt;, which supports playback via the &lt;a href="http://www.annodex.net/"&gt;OggPlay plugin for Firefox&lt;/a&gt;, vlc-plugin or generic application/ogg.
mv_embed is a JavaScript library by Michael Dale of &lt;a href="http://metavid.org/"&gt;MetaVid&lt;/a&gt;. It is really easy to use, you just include that library (&lt;tt&gt;&amp;lt;script src="..."&amp;gt;&lt;/tt&gt;) and then write &lt;tt&gt;&amp;lt;video src="..."&amp;gt;&lt;/tt&gt; anywhere in your page. No need to wait for native HTML5 support in your browser :-)
&lt;/p&gt;
&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9101292118679422945-663768690450268455?l=blog.kfish.org'/&gt;&lt;/div&gt;</description><link>http://blog.kfish.org/2008/02/foms-lca-2008-roundup.html</link><author>noreply@blogger.com (Conrad Parker)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-9101292118679422945.post-1253829388926355286</guid><pubDate>Sun, 13 Jan 2008 05:11:00 +0000</pubDate><atom:updated>2008-01-13T14:54:16.500+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>ogg</category><title>Release: liboggz 0.9.6</title><description>&lt;p&gt;
This release of
&lt;a href="http://lists.xiph.org/pipermail/ogg-dev/2008-January/000717.html"&gt;Oggz 0.9.6&lt;/a&gt; contains a new tool, &lt;b&gt;&lt;tt&gt;oggz-comment&lt;/tt&gt;&lt;/b&gt;, which can be used to edit the basic metadata (title, producer, copyright etc.) of Ogg Theora files.
The library also has some pretty major improvements to the way it works out timestamps and does seeking, mostly the work of Shane Stephens.
&lt;/p&gt;
&lt;p&gt;
In media files, timing and synchronization is extremely important. If the image and audio start to go out of sync, it is very noticeable and the video quickly becomes unwatchable. When you scan through a file you often need to decode a lot more data than you actually display. This is particularly the case when you jump backwards, which is common in a user interface that supports scrubbing. As video frames are stored as a difference relative to earlier (or later) frames, you end up needing to secretly jump further back in the file to the previous keyframe, and then decode many frames up to the one you actually want to show. For a smooth user experience you need to do this as quickly as possible.
&lt;/p&gt;
&lt;p&gt;
Ogg has some interesting framing properties. Given that timing is so important, you might expect that every packet has its precise timing information associated with it. In Ogg, it turns out not to be so. Packets are stored in pages, and there is only one timestamp per page. It is common for many audio packets to be crammed onto one page; the timing information for all the rest is not stored in the file. On the other hand, the encoded data for video keyframes is usually much larger, and spans multiple pages. Only the last packet on a page has its timestamp recorded, so if the keyframe is followed by an a much smaller packet of frame data in the same page, the timestamp for the keyframe will be lost. For these reasons I tend to refer to Ogg as a "lossy" container.
&lt;/p&gt;
&lt;p&gt;
In order to minimize these problems, liboggz now inspects the encoded data in order reconstruct the expected granulepos (corresponding to a timestamp) for every packet in an Ogg stream. This allows applications to use reliable timestamps, even though these are only sparsely recorded in most Ogg streams.
This is not as easy as it sounds, particularly for Ogg Vorbis.
To get a flavour of what's involved, read Shane's rant in the comments, explaining how to 
&lt;a href="http://trac.annodex.net/browser/liboggz/trunk/src/liboggz/oggz_auto.c#L468"&gt;calculate Vorbis timestamps&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
For an in-depth discussion, come to Ralph Giles' talk at linux.conf.au,
&lt;a href="http://linux.conf.au/programme/detail?TalkID=68"&gt;Seeking is hard: Ogg design internals&lt;/a&gt;.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9101292118679422945-1253829388926355286?l=blog.kfish.org'/&gt;&lt;/div&gt;</description><link>http://blog.kfish.org/2008/01/release-liboggz-096.html</link><author>noreply@blogger.com (Conrad Parker)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-9101292118679422945.post-2578249400119137180</guid><pubDate>Sat, 12 Jan 2008 15:53:00 +0000</pubDate><atom:updated>2008-01-13T01:29:18.168+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>xsel</category><title>Release: xsel 1.0.0</title><description>&lt;p&gt;
&lt;a href="http://www.vergenet.net/~conrad/software/xsel/"&gt;XSel&lt;/a&gt; is a command-line program for getting and setting the contents of the X selection. You can use &lt;tt&gt;xsel &lt;/tt&gt;in shell scripts and desktop keybindings, so that the contents of the X selection are available to command arguments:
&lt;/p&gt;

&lt;blockquote&gt;
&lt;b&gt;&lt;tt&gt;mozilla --remote "openurl(`xsel`)"&lt;/tt&gt;&lt;/b&gt;
&lt;/blockquote&gt;

&lt;p&gt;
This release adds UTF-8 support and fixes various bugs. The last version of XSel was 0.9.6, released sometime around 2001. It may have been the first version also. For some reason a bunch of patches came in recently, and I've had the joy of revisiting this project.
&lt;/p&gt;
&lt;p&gt;
For old time's sake, my
&lt;a href="http://lists.slug.org.au/archives/slug-chat/2001/July/msg00054.html"&gt;thoughts on ICCCM&lt;/a&gt;. (Warning: explicit language).
Back then I made a point of implementing as much of that crack as possible. You can even tell applications to delete their selected text:
&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;To delete the contents of the selection: &lt;b&gt;&lt;tt&gt;xsel --delete&lt;/tt&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;
(This really works, you can try it on &lt;tt&gt;xedit&lt;/tt&gt; to remotely delete text in the editor window).
&lt;/p&gt;

&lt;/p&gt;
&lt;p&gt;
This time around, of course, nothing does what the docs say anymore.
So we ignore the details in the 2001 proposal for Inter-Client
Exchange of Unicode Text and just grunt atoms at the selection owner
until they yield all their secrets. And now, finally, &lt;tt&gt;xsel&lt;/tt&gt; works on
Japanese.
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;People have come up with some interesting uses for &lt;tt&gt;xsel&lt;/tt&gt; over the years, but nobody has yet come up with a nifty use for the following options:&lt;/em&gt;
&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;To append to the X selection: &lt;b&gt;&lt;tt&gt;xsel --append &amp;lt; file&lt;/tt&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;To follow a growing file: &lt;b&gt;&lt;tt&gt;xsel --follow &amp;lt; file&lt;/tt&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;
Any ideas?
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9101292118679422945-2578249400119137180?l=blog.kfish.org'/&gt;&lt;/div&gt;</description><link>http://blog.kfish.org/2008/01/release-xsel-100.html</link><author>noreply@blogger.com (Conrad Parker)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item></channel></rss>