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

<channel>
	<title>Bluehorn's Blog &#187; Uncategorized</title>
	<atom:link href="http://www.landschoff.net/blog/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.landschoff.net/blog</link>
	<description>Ramblings of Torsten Landschoff</description>
	<lastBuildDate>Sun, 07 Nov 2010 18:24:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Fun with my Sony PRS-600 eBook reader</title>
		<link>http://www.landschoff.net/blog/2010/10/fun-with-my-sony-prs-600-ebook-reader/</link>
		<comments>http://www.landschoff.net/blog/2010/10/fun-with-my-sony-prs-600-ebook-reader/#comments</comments>
		<pubDate>Tue, 19 Oct 2010 19:18:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[drm]]></category>
		<category><![CDATA[ebooks]]></category>

		<guid isPermaLink="false">http://www.landschoff.net/blog/?p=216</guid>
		<description><![CDATA[I finally bought myself an eBook reader. To be precise, I got the Sony PRS-600 Reader Touch Edition. Two reasons: I bought a lot of technical literature in digital (PDF) format and want to read it without looking at a CRT while on a train. The idea of having a lot of reference material with [...]]]></description>
			<content:encoded><![CDATA[<p>I finally bought myself an eBook reader. To be precise, I got the <a href="http://www.sonystyle.com/webapp/wcs/stores/servlet/ProductDisplay?storeId=10151&#038;catalogId=10551&#038;langId=-1&#038;productId=8198552921665921180">Sony PRS-600 Reader Touch Edition</a>. Two reasons:</p>
<ul>
<li>I bought a lot of technical literature in digital (PDF) format and want to read it without looking at a CRT while on a train.
<li>The idea of having a lot of reference material with me appeals me.
<li>Many of my books are read only once (especially Star Trek etc.) and I don&#8217;t want to waste paper and the energy for shipping.
</ul>
<p>First of all, the display is only really great with a powerful light source. The reflection is a bit of a nuisance but I can live with it. What I don&#8217;t like is the PDF support of the device. Viewing a normal page, the font faces are so tiny that it is not readable in any way. The zoom feature works around that, but you can&#8217;t switch pages from there. Instead you have to unzoom, go to the next page and zoom again. Crappy! There is also the reflow option, which does not mix with source code figures in my books.</p>
<p>I am glad that most of my electronic books are from <a href="http://pragprog.com/">The Pragmatic Bookshelf</a>, which means that I can download them in Epub as well, all without DRM. Thanks, guys!</p>
<p>For the PDFs I would like to carry, I googled a while and stumbled across <a href="http://www.charlietanksley.net/philtex/reading-pdfs-on-portables/">this blog post</a>. The example to work with source documents worked fine for <a href="http://greenteapress.com/semaphores/">The Little Book of Semaphores</a> at least. But even with <a href="http://sourceforge.net/projects/briss/">BRISS</a> I did not (yet) manage to crop books I bought from <a href="http://apress.com/">APress</a>. Most likely I will try doing it via a bit of python scripting and the poppler bindings for python.</p>
<p>I also bought my first DRM content: <a href="http://www.ebooks.com/ebooks/book_details.asp?IID=235007">Star Trek Vanguard: Harbinger</a>. I really enjoyed the book, but the download was a PITA. After buying, you only get a link to a ASCM file, which is not useful by itself. One needs Adobe Digital Editions to download it. So I installed it into a virtual machine which has XP installed. After that, I was able to read it on the PC, which wasn&#8217;t the goal of the exercise. To put it on the reader, one needs to authorize it from the same Windows software and upload the file.</p>
<p>All that stuff took almost an hour and of course the digital edition of the book is more expensive than getting it from amazon germany. But at least I did not have to wait for delivery. Having finished the book I wanted to buy the <a href="http://www.ebooks.com/ebooks/book_details.asp?IID=262044">second part</a>, but of course it is only available for canadian residents on ebooks.com. I researched a number of ebook sites which mostly sell it only in the US. Funny enough, the first hits when searching where pirated versions of the book in full text. Why do they make it so hard to get stuff legally? *sigh*</p>
]]></content:encoded>
			<wfw:commentRss>http://www.landschoff.net/blog/2010/10/fun-with-my-sony-prs-600-ebook-reader/feed/</wfw:commentRss>
		<slash:comments>63</slash:comments>
		</item>
		<item>
		<title>Watching TV with vlc on Linux via T-Home Entertain</title>
		<link>http://www.landschoff.net/blog/2010/02/watching-tv-with-vlc-on-linux-via-t-home-entertain/</link>
		<comments>http://www.landschoff.net/blog/2010/02/watching-tv-with-vlc-on-linux-via-t-home-entertain/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 22:25:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.landschoff.net/blog/?p=159</guid>
		<description><![CDATA[For quite a while we are receiving TV via Internet. The original reason is that I got at most 2 MBit/s via ADSL due to line noise, but VDSL supports 25 MBit/s on the same line. Of course, you couldn&#8217;t order the DSL line without also getting a phone flat rate and IPTV. Most of [...]]]></description>
			<content:encoded><![CDATA[<p>For quite a while we are receiving TV via Internet. The original reason is that I got at most 2 MBit/s via ADSL due to line noise, but VDSL supports 25 MBit/s on the same line. Of course, you couldn&#8217;t order the DSL line without also getting a phone flat rate and IPTV.</p>
<p>Most of the channels are encrypted and can only be received with the original &#8220;Media Receiver&#8221;, which is a proprietary (and Microsoft) solution. But at least, I can watch the public service broadcasts using <a href="http://www.ard-digital.de/index.php?id=14028&#038;languageid=1">these playlists</a> for VLC or mplayer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.landschoff.net/blog/2010/02/watching-tv-with-vlc-on-linux-via-t-home-entertain/feed/</wfw:commentRss>
		<slash:comments>106</slash:comments>
		</item>
		<item>
		<title>Extra commas are allowed in debian/control</title>
		<link>http://www.landschoff.net/blog/2009/11/extra-commas-are-allowed-in-debiancontrol/</link>
		<comments>http://www.landschoff.net/blog/2009/11/extra-commas-are-allowed-in-debiancontrol/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 12:31:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Debian]]></category>

		<guid isPermaLink="false">http://www.landschoff.net/blog/?p=69</guid>
		<description><![CDATA[Today the question came up at work if it is allowed to have extra commas in debian/control dependency fields as in Depends: ${misc:Depends}, ${shlib:Depends} The substitution misc:Depends may well be empty. So is this allowed? It actually is as Tollef Fog Heen quickly replied on IRC (thanks). It is also covered by a test case [...]]]></description>
			<content:encoded><![CDATA[<p>Today the question came up at work if it is allowed to have extra commas in <tt>debian/control</tt> dependency fields as in</p>
<pre>Depends: ${misc:Depends}, ${shlib:Depends}</pre>
<p>The substitution <var>misc:Depends</var> may well be empty. So is this allowed?</p>
<p>It actually is as <a href="http://err.no/personal/blog">Tollef Fog Heen</a> quickly replied on IRC (thanks). It is also covered by a test case in the <a href="http://git.debian.org/?p=dpkg/dpkg.git;a=blob;f=scripts/t/400_Dpkg_Deps.t;h=9e0d33fcca3db2548772834106df8305765c6565;hb=bd907201ef5f4577344f6662485497fc318741bd#l23">dpkg source tree</a>, so it is unlikely to go away.</p>
<p>There seems to be no documentation about it though (neither policy nor manual pages cover this). Maybe I will send a patch.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.landschoff.net/blog/2009/11/extra-commas-are-allowed-in-debiancontrol/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vodafone software for Linux!?</title>
		<link>http://www.landschoff.net/blog/2009/11/vodafone-software-for-linux/</link>
		<comments>http://www.landschoff.net/blog/2009/11/vodafone-software-for-linux/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 21:42:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Free software]]></category>
		<category><![CDATA[mobile internet]]></category>

		<guid isPermaLink="false">http://www.landschoff.net/blog/?p=66</guid>
		<description><![CDATA[While researching the UMTS stick to buy for our Acer Aspire One netbook, I stumbled across some postings about using the Vodafone UMTS stick with Linux (see here (german)). That forum discussion contains a link to https://forge.betavine.net/projects/vodafonemobilec/ where you can find &#8220;Vodafone Mobile Connect Card driver for Linux is a GPRS/UMTS/HSDPA device manager written in [...]]]></description>
			<content:encoded><![CDATA[<p>While researching the UMTS stick to buy for our Acer Aspire One netbook, I stumbled across some postings about using the Vodafone UMTS stick with Linux (<a href="http://forum.ubuntuusers.de/topic/vodafone-datenstick-unter-linux/">see here (german)</a>).</p>
<p>That forum discussion contains a link to <a href="https://forge.betavine.net/projects/vodafonemobilec/">https://forge.betavine.net/projects/vodafonemobilec/</a> where you can find <em>&#8220;Vodafone Mobile Connect Card driver for Linux is a GPRS/UMTS/HSDPA device manager written in Python, licensed under the GPL&#8221;</em>. I am impressed and just ordered two of these sticks.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.landschoff.net/blog/2009/11/vodafone-software-for-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Emacs: Marking lines in source code</title>
		<link>http://www.landschoff.net/blog/2009/10/emacs-marking-lines-in-source-code/</link>
		<comments>http://www.landschoff.net/blog/2009/10/emacs-marking-lines-in-source-code/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 14:08:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[lisp]]></category>

		<guid isPermaLink="false">http://www.landschoff.net/blog/?p=60</guid>
		<description><![CDATA[Today I ported some code to a new API. What I really like about that API upgrade: They changed a structure of the interface to a completely new structure, which basically had the same contents with a few new fields. Of course, the order has changed as well and the field names were revised. Comparing [...]]]></description>
			<content:encoded><![CDATA[<p>Today I ported some code to a new API. What I really like about that API upgrade: They changed a structure of the interface to a completely new structure, which basically had the same contents with a few new fields. Of course, the order has changed as well and the field names were revised.</p>
<p>Comparing those structure definitions is really no joy, I wished I were able to mark what I dealt with in the header files. With Emacs, that was really a trivial task:</p>
<pre lang="lisp">
(defun mark-overlay ()
  "Marks the region using a special background color."
  (interactive)
  (let ((ovl (make-overlay (point) (mark))))
    (overlay-put ovl 'face '(:background "light green"))))

(global-set-key [?\C-+] 'mark-overlay)
</pre>
<p>That was easy. Simple hitting <tt>^+</tt> with the region I dealt with now notes that by adding a green background.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.landschoff.net/blog/2009/10/emacs-marking-lines-in-source-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Passing optparse results as keyword arguments</title>
		<link>http://www.landschoff.net/blog/2009/10/passing-optparse-results-as-keyword-arguments/</link>
		<comments>http://www.landschoff.net/blog/2009/10/passing-optparse-results-as-keyword-arguments/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 14:12:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.landschoff.net/blog/?p=50</guid>
		<description><![CDATA[The python optparse package is really handy for parsing command line arguments. When combining this with an extra main function idiom (to allow interactive usage or use as a module), I ran into a small problem &#8211; the following code does not run: def main(foo, bar): print("foo: %s, bar: %s\n" % (foo, bar)) if __name__ [...]]]></description>
			<content:encoded><![CDATA[<p>The python <a href="http://docs.python.org/2.6/library/optparse.html">optparse package</a> is really handy for parsing command line arguments. When combining this with an <a href="http://docs.python.org/2.6/library/__main__.html">extra <tt>main</tt> function</a> idiom (to allow interactive usage or use as a module), I ran into a small problem &#8211; the following code does not run:</p>
<pre lang="python">
def main(foo, bar):
    print("foo: %s, bar: %s\n" % (foo, bar))
if __name__ == "__main__":
    from optparse import OptionParser
    parser = OptionParser()
    parser.add_option("--foo", dest="foo")
    parser.add_option("--bar", dest="bar")
    (options, args) = parser.parse_args()
    main(**options)
</pre>
<p>This is the error message:</p>
<pre>
Traceback (most recent call last):
  File "foobar.py", line 9, in <module>
    main(**options)
TypeError: main() argument after ** must be a dictionary
</pre>
<p>The problem here is that the options result from OptionParser is instead of type <tt>optparse.Values</tt>, which is not derived from dict (huh?!). Quoting the <a href="http://docs.python.org/2.6/reference/expressions.html#calls">Python language reference</a>:<br />
<blockquote>If the syntax **expression appears in the function call, expression must evaluate to a mapping, the contents of which are treated as additional keyword arguments.</p></blockquote>
<p>Here are two ways to fix the problem:</p>
<pre lang="python">
#   ...
    (options, args) = parser.parse_args()
    main(foo=options.foo, bar=options.bar)  # Fix (a)
    main(**options.__dict__)                # Fix (b)
</pre>
<p>I know I prefer (b), especially if there are many options to pass on. Another work around is used by the <a href="http://pylit.berlios.de/examples/pylit.py.html#optionvalues">pylit</a> project (extending the <tt>optparse.Values<tt> class).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.landschoff.net/blog/2009/10/passing-optparse-results-as-keyword-arguments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reading an arbitrary file as python module source</title>
		<link>http://www.landschoff.net/blog/2009/02/reading-an-arbitrary-file-as-python-module-source/</link>
		<comments>http://www.landschoff.net/blog/2009/02/reading-an-arbitrary-file-as-python-module-source/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 16:34:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.landschoff.net/blog/?p=20</guid>
		<description><![CDATA[Not sure if anybody will ever need this. I just found out because I did not accept that I can&#8217;t load my Subversion pre-commit hook as a module. Of course it is actually quite simple: import imp hook = imp.load_source("hook", "pre-commit") It&#8217;s that easy. Now I can test the internal functions from ipython before letting [...]]]></description>
			<content:encoded><![CDATA[<p>Not sure if anybody will ever need this. I just found out because I did not accept that I can&#8217;t load my Subversion <tt>pre-commit</tt> hook as a module.</p>
<p>Of course it is actually quite simple:</p>
<pre>
import imp
hook = imp.load_source("hook", "pre-commit")
</pre>
<p>It&#8217;s that easy. Now I can test the internal functions from ipython before letting it wreck our repository. <img src='http://www.landschoff.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.landschoff.net/blog/2009/02/reading-an-arbitrary-file-as-python-module-source/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using JFreeChart from Rhino</title>
		<link>http://www.landschoff.net/blog/2008/07/using-jfreechart-from-rhino/</link>
		<comments>http://www.landschoff.net/blog/2008/07/using-jfreechart-from-rhino/#comments</comments>
		<pubDate>Mon, 21 Jul 2008 23:50:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.landschoff.net/blog/?p=12</guid>
		<description><![CDATA[Today I wanted to play around with JFreeChart a bit. As I did not want to repeat the edit-compile-link cycle all the time, I decided that it would be fun to use the Rhino scripting engine for playing around. Unfortunately, this did not seem to work at first: torsten@pulsar:~$ rhino Rhino 1.7 release 1 2008 [...]]]></description>
			<content:encoded><![CDATA[<p>Today I wanted to play around with <a href="http://www.jfree.org/jfreechart/">JFreeChart</a> a bit. As I did not want to repeat the edit-compile-link cycle all the time, I decided that it would be fun to use the <a href="http://www.mozilla.org/rhino/">Rhino</a> scripting engine for playing around.</p>
<p>Unfortunately, this did not seem to work at first:</p>
<pre>torsten@pulsar:~$ rhino
Rhino 1.7 release 1 2008 03 22
js&gt; importClass(org.jfree.chart.JFreeChart)
js: "&lt;stdin&gt;", line 2: Function importClass must be called with a class;
had "[JavaPackage org.jfree.chart.JFreeChart]" instead. at &lt;stdin&gt;:2</pre>
<p>Basically, this error tells us that Rhino could not find the JFreeChart classes. The error message is not really helpful though&#8230;</p>
<p>Anyway, after a bit of looking around, I stumbled across a remark in the older <a href="http://www.mozilla.org/rhino/scriptjava.html">&#8220;scripting Java&#8221;</a> treatment:</p>
<blockquote><p>[...] simply use the command</p>
<pre>java -jar js.jar</pre>
<p>Unfortunately the -jar option to java will overwrite your existing classpath.</p></blockquote>
<p>It turns out that <tt>/usr/bin/rhino</tt> contains just that command. So to start Rhino with most libraries available, you can just run</p>
<pre>export CLASSPATH=`echo /usr/share/java/*.jar|tr ' ' :`
torsten@pulsar:~$ java org.mozilla.javascript.tools.shell.Main
Rhino 1.7 release 1 2008 03 22
js&gt; importClass(org.jfree.chart.JFreeChart)</pre>
<p>The first command will define the Java class path to contain all the installed <tt>.jar</tt> files in <tt>/usr/share/java</tt>. The second command starts the Rhino shell, which has gained lots of power now. Look at the following example:</p>
<div style="float:right"><a href="http://www.landschoff.net/blog/uploads/2008/07/rhino_plot.png"><img class="size-medium wp-image-13" title="rhino_plot" src="http://www.landschoff.net/blog/uploads/2008/07/rhino_plot-300x236.png" alt="JFreeChart plot created in Rhino" width="150" height="118" /></a></div>
<p><code>importPackage(org.jfree.chart);<br />
importPackage(org.jfree.data.xy);<br />
importPackage(org.jfree.chart.plot);<br />
importPackage(javax.swing);</code></p>
<p>series = new XYSeries(&#8220;First&#8221;);<br />
for (i = 0; i &lt; 100; i++)<br />
series.add(i, i*i);<br />
dataset=new XYSeriesCollection();<br />
dataset.addSeries(series);</p>
<p>chart = ChartFactory.createXYLineChart(&#8220;Line chart&#8221;,<br />
&#8220;X&#8221;, &#8220;Y&#8221;, dataset, PlotOrientation.VERTICAL, true, true, false);<br />
frame = new JFrame(&#8220;Plot&#8221;);</p>
<p>chartpanel = new ChartPanel(chart);<br />
frame.add(chartpanel);<br />
frame.pack();<br />
frame.show();</p>
]]></content:encoded>
			<wfw:commentRss>http://www.landschoff.net/blog/2008/07/using-jfreechart-from-rhino/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello World!</title>
		<link>http://www.landschoff.net/blog/2008/07/hello-world/</link>
		<comments>http://www.landschoff.net/blog/2008/07/hello-world/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 17:36:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://localhost:8800/blog/?p=3</guid>
		<description><![CDATA[Finally I got around to put something up on http://www.landschoff.net. Often I wanted to get something done &#8220;at the weekend&#8221;. I always spent the time to look around for good solutions, which would have to be secure, portable, etc. &#8211; so I never did it. For a change I now installed WordPress, even though I [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.landschoff.net/blog/uploads/2008/07/xing_torsten.jpeg"><img class="alignright size-thumbnail wp-image-9" title="xing_torsten" src="http://www.landschoff.net/blog/uploads/2008/07/xing_torsten-140x150.jpg" alt="" width="140" height="150" /></a>Finally I got around to put something up on <a title="my webserver" href="http://www.landschoff.net" target="_self">http://www.landschoff.net</a>. Often I wanted to get something done &#8220;at the weekend&#8221;. I always spent the time to look around for good solutions, which would have to be secure, portable, etc. &#8211; so I never did it.</p>
<p>For a change I now installed WordPress, even though I don&#8217;t really trust it to be secure. Let&#8217;s see how this works out, at least it looks great and is a charm to install.</p>
<p>Of course I still did it the hard way, so this web server is running on Debian unstable of today, inside an OpenVZ virtual environment. Guess, I&#8217;ll set up a Wiki for more permanent content next.</p>
<p>Thanks to the OpenVZ and WordPress developers for creating this cool software, and kudos to my fellow Debian developers for the base.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.landschoff.net/blog/2008/07/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

