<?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:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0' version='2.0'><channel><atom:id>tag:blogger.com,1999:blog-5326958204958381964</atom:id><lastBuildDate>Mon, 15 Apr 2013 18:25:10 +0000</lastBuildDate><title>CFruhwirth's Weblog</title><description></description><link>http://blog.clemens.endorphin.org/</link><managingEditor>noreply@blogger.com (Clemens Fruhwirth)</managingEditor><generator>Blogger</generator><openSearch:totalResults>42</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5326958204958381964.post-537698016737933037</guid><pubDate>Thu, 07 Oct 2010 18:16:00 +0000</pubDate><atom:updated>2010-10-07T11:26:56.441-07:00</atom:updated><title>Sandboxing Skype</title><description>I am in the unfortunate position to have read &lt;a href="http://www.secdev.org/conf/skype_BHEU06.handout.pdf"&gt;Silver Needle in the Skype&lt;/a&gt; up to PDF page 21, where a successful heap overflow attack makes skype drop to a shell. Since then I decided that I either have to stop using Skype or sandbox it. Since about a year I have been doing the latter, with some bumps in the road, as new versions of Skype needed more files and more sandboxing. However, it worked for me most of the time, and it is time to share the gory details with the world. &lt;br /&gt;&lt;br /&gt;The sandbox script can be found at &lt;a href="http://gist.github.com/615366"&gt;http://gist.github.com/615366&lt;/a&gt;, where you can also edit the script.&lt;br /&gt;&lt;br /&gt;You need to have PulseAudio server running and listening to TCP traffic so that sound can break out of the sandbox. Verify that you have&lt;br /&gt;&lt;pre&gt;load-module module-native-protocol-tcp&lt;/pre&gt;in your PulseAudio config. Please review the variable settings to ensure that it fits your setup (DIR,XAUTHORITY,PULSECOOKIE). The sandbox is created for the user invoking the script.  This user must have sudo capabilities to call the script. Please note that I have not reviewed the script with respect to security, so do not supply it to untrusted users.&lt;br /&gt;&lt;br /&gt;Happy sandboxing.&lt;br /&gt;&lt;br /&gt;(Thanks to geheimdienst@#haskell-blah for pointing me to gist.github.com)</description><link>http://blog.clemens.endorphin.org/2010/10/sandboxing-skype.html</link><author>noreply@blogger.com (Clemens Fruhwirth)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5326958204958381964.post-6185110836412120307</guid><pubDate>Mon, 08 Mar 2010 08:30:00 +0000</pubDate><atom:updated>2010-03-08T00:30:10.454-08:00</atom:updated><title>Using Wave to collaborate on Latex documents</title><description>This blog post is a copy of &lt;a href="http://clemens.endorphin.org/wave-collaboration.pdf"&gt;a much nicer PDF version&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I found that Wave could be used as collaborative editor on Latex documents by using a &lt;a href="http://blog.clemens.endorphin.org/2010/02/working-wave-export-bot.html"&gt;modified export bot&lt;/a&gt; and a simple shell script. The exporty2 bot (living at exporty2@appspot.com) allows you to access a wave using access tokens instead of cookie based logins making it easier to fetch those waves using curl. Also the exporty2 bot allows you to export only the text of a Wave using the ``raw'' template.&lt;br /&gt;&lt;br /&gt;The raw URL given by the exporty2 bot is pasted into the shell script below. It serves as master wave as it is the document that is latex-ed. Additionally it also lists other resources using the special %FETCHURL tag. These resources are pairs of &lt;i&gt;local name&lt;/i&gt; and URL. Curl fetchs these resources and stores it under their local name before the shell scripts runs the usual combination of latex/bibtex/latex. I usually put those %FETCHURL tags below \documentclass. &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;#!/bin/sh&lt;br /&gt;TITLE="wave-collaboration"&lt;br /&gt;&lt;br /&gt;curl -o $TITLE.tex "http://exporty2.appspot.com/export?waveId=googlewave.com!w%252BlRomqcgHA&amp;accesstoken=c64e13d340009da7&amp;template=raw"&lt;br /&gt;&lt;br /&gt;DELIMITER="DELIMITER"&lt;br /&gt;FETCHURL=$(grep %FETCHURL $TITLE.tex | sed -e "s/ /$DELIMITER/g")&lt;br /&gt;for i in $FETCHURL&lt;br /&gt;do&lt;br /&gt;  URL=$(echo $i | awk -F$DELIMITER '{ print $3 }')&lt;br /&gt;  FILENAME=$(echo $i | awk -F$DELIMITER '{ print $2 }')&lt;br /&gt;  curl -z $FILENAME -o $FILENAME $URL&lt;br /&gt;done&lt;br /&gt;latex $TITLE.tex&lt;br /&gt;bibtex $TITLE&lt;br /&gt;latex $TITLE.tex&lt;br /&gt;dvipdf $TITLE.dvi&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The nice thing about the exporty bot is that it ignores any blips except the root blip. Thereby you could add replies to the latex document and have inline discussions that are automatically filtered from the export. Also the exporty bot ignores the first line of the wave, so you can name the Wave properly.&lt;br /&gt;&lt;br /&gt;The PDF version of this blog post contains examples how to use external graphics and bibliography waves. You can also get the &lt;a href="http://exporty2.appspot.com/export?waveId=googlewave.com!w%252BlRomqcgHA&amp;accesstoken=c64e13d340009da7&amp;template=raw"&gt;latex source of the PDF&lt;/a&gt;.</description><link>http://blog.clemens.endorphin.org/2010/03/using-wave-to-collaborate-on-latex.html</link><author>noreply@blogger.com (Clemens Fruhwirth)</author><thr:total>5</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5326958204958381964.post-5930495204716784069</guid><pubDate>Sun, 28 Feb 2010 09:37:00 +0000</pubDate><atom:updated>2010-02-28T01:37:06.821-08:00</atom:updated><title>A working wave export bot</title><description>The original Wave &lt;a href="http://wave-samples-gallery.appspot.com/about_app?app_id=75018"&gt;exporty bot&lt;/a&gt; doesn't work for me. Wave uses user@wavesandbox.com or user@googlewave.com as user identifier, while appengine, the thing that powers bots, gives the bot the regular google account identifiers (their emails). If you don't happen to use foobar@wavesandbox.com with foobar@gmail.com -- for which the exporty bot contains an ugly hack -- exporty won't work for you as the participants check fails and exporty will deny access.&lt;br /&gt;&lt;br /&gt;That is why I rewrote exporty not to care for user ids too much but use access tokens. It is pretty simple, the bot when added to a wave, writes the link of the export http://mybot.appspot.com/export?waveId=yourwaveId into the wave as the original bot does, but also appends to that accessToken=&amp;lt;a random generated string&amp;gt;. Everyone observing the link in the wave, usually the participants, can click on the link and get the export without being bother by the google account signup. The participants check is replaced by an access token check. I found this version to be much more useful, as the URL provided by this bot can be used in scripts more easily. &lt;br /&gt;&lt;br /&gt;I also added the feature that you can export your wave raw, without any HTML or XML annotations. Try it, exporty2@appspot.com. It hosts its source: &lt;a href="http://exporty2.appspot.com/static/exporty2.tar.bz2"&gt;http://exporty2.appspot.com/static/exporty2.tar.bz2&lt;/a&gt;</description><link>http://blog.clemens.endorphin.org/2010/02/working-wave-export-bot.html</link><author>noreply@blogger.com (Clemens Fruhwirth)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5326958204958381964.post-2957078227757254324</guid><pubDate>Thu, 30 Jul 2009 07:57:00 +0000</pubDate><atom:updated>2009-07-30T03:41:06.413-07:00</atom:updated><title>Static Analysis of Imperative Languages</title><description>Last year, I got the assignment to work through &lt;a href="http://www.google.com/search?q=the+calculus+of+computation"&gt;The Calculus of Computation by Bradley &amp; Manna&lt;/a&gt;. The result is — in my humble opinion — a neat introduction to static reasoning for imperative languages. If you are new to that, but know a bit about predicate logic, then it might be a short and hopefully nice read to you.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://clemens.endorphin.org/Heuristics Methods for Inductive Invariant Generation in Pi.pdf"&gt;Heuristics Methods for Inductive Invariant Generation in Pi&lt;/a&gt; explains the basics such as weakest precondition and strongest postcondition, why it is important to have inductive assertions for loops, why they are hard to find (hard as in undecidably-hard), and further what heuristics we could apply to simple standard cases to generate inductive assertions automatically. &lt;br /&gt;&lt;br /&gt;If you enjoy it (or hate it), leave me a comment. Now, I finally found the blogger.com option to notify me, when new comments come in, so that I have a chance to reply.</description><link>http://blog.clemens.endorphin.org/2009/07/static-analysis-of-imperative-languages.html</link><author>noreply@blogger.com (Clemens Fruhwirth)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5326958204958381964.post-6156461553520175074</guid><pubDate>Wed, 25 Mar 2009 11:05:00 +0000</pubDate><atom:updated>2009-03-25T04:05:18.774-07:00</atom:updated><title>Patching for broken SD card readers</title><description>I had the pleasure to buy a broken SD card reader. It reports 2GB cards as 1GB cards. Here is a fix that allows you to force capacities onto the scsi disk kernel subsystem of the Linux kernel: &lt;a href="http://clemens.endorphin.org/scsi-capacity-setter.patch"&gt;scsi-capacity-setter.patch&lt;/a&gt;. The respective user space program is here &lt;a href="http://clemens.endorphin.org/capacity.c"&gt;capacity.c&lt;/a&gt;. You might want to use it in conjunction with some udev rules.</description><link>http://blog.clemens.endorphin.org/2009/03/patching-for-broken-sd-card-readers.html</link><author>noreply@blogger.com (Clemens Fruhwirth)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5326958204958381964.post-8247594047141156194</guid><pubDate>Fri, 09 Jan 2009 22:17:00 +0000</pubDate><atom:updated>2009-01-09T14:28:23.103-08:00</atom:updated><title>Liskell standalone</title><description>Some time has passed since I last blogged about Liskell. It is not dead nor have I changed my mind that Haskell needs a proper meta-programming facility not to mention a better syntax.&lt;br /&gt;&lt;br /&gt;Liskell was a branch of GHC once. Now it sits on top of the GHC API, or I should rather say sneaks behind its back as it creates its own API as the original one is not suitable for the stunts I'm interested in. If Liskell sticks with GHC as its soil, I will definitely send patches upstream to refine the GHC API in the areas where it needs more flexibility for Liskell. However for the moment, my main target was to get something out that compiles with a stable version of GHC.&lt;br /&gt;&lt;br /&gt;You can grab it with the usual&lt;br /&gt;&lt;pre&gt;darcs get http://code.haskell.org/liskell/&lt;/pre&gt;&lt;br /&gt;This version has been tested with ghc 6.10.1 and should install like&lt;br /&gt;&lt;pre&gt;./Setup.lhs configure&lt;br /&gt;./Setup.lhs build&lt;br /&gt;./Setup.lhs install&lt;br /&gt;cd LskPrelude&lt;br /&gt;make install-inplace&lt;br /&gt;&lt;/pre&gt;Optionally you can run &lt;tt&gt;make tests&lt;/tt&gt; in the testsuite subdirectory. Thanks to community.haskell.org for darcs hosting!</description><link>http://blog.clemens.endorphin.org/2009/01/liskell-standalone.html</link><author>noreply@blogger.com (Clemens Fruhwirth)</author><thr:total>15</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5326958204958381964.post-3971125872128490273</guid><pubDate>Mon, 08 Dec 2008 16:41:00 +0000</pubDate><atom:updated>2008-12-08T08:44:44.871-08:00</atom:updated><title>LUKS on-disk-format revision 1.1.1</title><description>Today, I published a new minor revision of the LUKS on-disk-format specification. It contains clarifications with respect to IV/tweak reference points. Thanks to Michael Gorven for the suggestion.&lt;br /&gt;&lt;br /&gt;It is available at new home of cryptsetup/LUKS at Google Code &lt;a href="http://code.google.com/p/cryptsetup/wiki/Specification"&gt;http://code.google.com/p/cryptsetup/wiki/Specification&lt;/a&gt;.</description><link>http://blog.clemens.endorphin.org/2008/12/luks-on-disk-format-revision-111.html</link><author>noreply@blogger.com (Clemens Fruhwirth)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5326958204958381964.post-4602591125700102822</guid><pubDate>Mon, 01 Dec 2008 08:23:00 +0000</pubDate><atom:updated>2008-11-30T15:28:50.987-08:00</atom:updated><title>XMonad GridSelect</title><description>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_Ez5R0yiWluM/STMha6HKiuI/AAAAAAAAAP8/P3OrhtdmtUM/s1600-h/gridselect.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 256px;" src="http://3.bp.blogspot.com/_Ez5R0yiWluM/STMha6HKiuI/AAAAAAAAAP8/P3OrhtdmtUM/s320/gridselect.png" alt="" id="BLOGGER_PHOTO_ID_5274596334740605666" border="0" /&gt;&lt;/a&gt;Personally, I not just need a window manager, I need a focus manager. I tend to think of windows as TODO items, and as there are many TODOs in life there are many windows on my workspaces. Usually a fraction of that can't be closed or worked on immediately, so they linger around on my desktop, cluttering my workspace.&lt;br /&gt;&lt;br /&gt;I used to use the Tabbed layout. But Tabbed isn't the answer when you are a guy who reports bugs such as "XMonad 0.6 with Tabbed dies when firefox-session-restore slams 40 windows at once on the desktop". In other words, I use a lot of windows. The workspaces concept isn't particularly useful to me either. My mind just doesn't work with mental boxes. So the result is, that I have too few workspaces with too much windows on them, so that Tabbed has trouble displaying useful window titles, and navigating through them is slow and cumbersome (mostly because tab switching generates a lot of useless X Expose events).&lt;br /&gt;&lt;br /&gt;GridSelect is my answer to that. It brings up a 2D grid of windows in the center of the screen, and I can select a window with cursors keys. The window is delivered back to the caller of GridSelect, and for the moment the most useful thing it does for me is to raise and focus the selected window. The advantage over the presentation of Tabbed is that there is much more space for window titles, that are now not forced into a single row at the top of the screen, but can occupy multiple rows. Also navigating a 2D grid is also much faster than navigating a linear 1D structure.&lt;br /&gt;&lt;br /&gt;GridSelect colorizes the cells according to the window class of displayed window. So, all windows with the same class get the same color, and after a while I start to remember which window class has which color. E.g., when I want my xchat window, I just have to search for light green, or if I want an emacs windows, I have to focus on dark violet.&lt;br /&gt;&lt;br /&gt;Although GridSelect wasn't meant for inclusion into xmonad-contrib, dons was quick to merge it into the darcs repo. ATM I'm using the following key binding fragment:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;((modMask, xK_f     ), (gridselect defaultGSConfig) &gt;&gt;= (\w -&gt; case w of&lt;br /&gt;                         Just w -&gt; windows (bringWindow w) &gt;&gt; focus w &gt;&gt; windows W.shiftMaster&lt;br /&gt;                         Nothing -&gt; return ())&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h2&gt;Ideas&lt;/h2&gt;There are a few ideas that I haven't found time to toy with. First I like the window arrangement to be more static. At the moment, the windows are sorted (by XMonad) according to its last use and GridSelect arranges them spiraling outwards in a diamond like pattern. Mentally, I can only keep track of the last two to three windows, so that I can blindly select them. For everything else, I have to read titles. It would be more helpful to give fixed spots to windows. Of course, windows get deleted and new windows pop up all the time, so probably it would be good to defragment and resort according to display time with a special key.&lt;br /&gt;&lt;br /&gt;Substring search on window titles is another idea. As GridSelect uses cursors keys for the moment, the rest of the keyboard could be used to enter the string used in searching. GridSelect should then gray out the windows that do not contain the search term.&lt;br /&gt;&lt;br /&gt;I guess I won't hack on these ideas immediately as GridSelect ATM does what it should do, namely lower the time that I spend searching for windows significantly.</description><link>http://blog.clemens.endorphin.org/2008/11/xmonad-gridselect.html</link><author>noreply@blogger.com (Clemens Fruhwirth)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_Ez5R0yiWluM/STMha6HKiuI/AAAAAAAAAP8/P3OrhtdmtUM/s72-c/gridselect.png' height='72' width='72'/><thr:total>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5326958204958381964.post-7198482594669075202</guid><pubDate>Sat, 15 Nov 2008 12:04:00 +0000</pubDate><atom:updated>2008-11-15T04:34:34.799-08:00</atom:updated><title>"A workaround for Bittorrent traffic shaping" or "bashing my ISP"</title><description>Recently, I found out that my ISP does traffic shaping with respect to Bittorrent traffic. After my clients sends the Bittorrent handshake, all packets from the respective TCP conversation were dropped, so the remote peer sees nothing of the following. That's not just a minor issue in quality of service, right? That's a breach of contract with respect to universal IP service agreements.&lt;br /&gt;&lt;br /&gt;If you are subscribed to UPC in Vienna, &lt;a href="http://clemens.endorphin.org/ChelloTrafficShaping.pdf"&gt;this letter to my ISP&lt;/a&gt; might be interesting to you. Next to regular rhetoric that they should immediately stop that practice, they are also warned that otherwise I will get them in front of the national conciliation body for telecommunication (http://rtr.at/en).&lt;br /&gt;&lt;br /&gt;If you are unlucky to be subscribed such brain dead ISPs, you can use Azureus to work around that.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Find out your public IP and ensure that there is some open/forwarded port in your firewall/router or whatever you may have.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Get and setup up &lt;a href="http://www.torproject.org/"&gt;http://www.torproject.org/&lt;/a&gt; and Azureus.&lt;/li&gt;&lt;li&gt;Run TOR with its Socks proxy.&lt;/li&gt;&lt;li&gt;Launch Azureus&lt;/li&gt;&lt;li&gt;Azureus-Options-Connection: Enter the public port from before as Incoming TCP/UDP listen port.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Azureus-Options-Connection-Proxy Options: Tick "Enable proxying of tracker communication&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Azureus-Options-Connection-Proxy Options: Tick "I have a SOCKS proxy", and enter the host/port combination of your Tor Socks proxy (most likely localhost:9050)&lt;/li&gt;&lt;li&gt;Azureus-Options-Connection-Transport Encryption: "Require encrypted transport" with Minimum encryption level "RC4"&lt;/li&gt;&lt;li&gt;Azureus-Options-Tracker-Client: Enter your public IP/port in the "Override Options".&lt;/li&gt;&lt;/ul&gt;That's it. You are ready to go, and override ANY bittorrent traffic shaping (at least the one that listens for bittorrent signature). The drawback is that your only able to communicate with other Bittorrent clients that know encryption. But that's better than no connection at all.</description><link>http://blog.clemens.endorphin.org/2008/11/workaround-for-bittorrent-traffic.html</link><author>noreply@blogger.com (Clemens Fruhwirth)</author><thr:total>5</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5326958204958381964.post-4216810060279448334</guid><pubDate>Wed, 24 Sep 2008 15:11:00 +0000</pubDate><atom:updated>2008-09-24T08:24:40.124-07:00</atom:updated><title>I love the lolcat meme</title><description>From last year :)&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_Ez5R0yiWluM/SNpZXqopnZI/AAAAAAAAAOU/DbPSLWbSUpg/s1600-h/TypeSystem.jpeg"&gt;&lt;img style="display:block; margin:0px auto 10px; cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_Ez5R0yiWluM/SNpZXqopnZI/AAAAAAAAAOU/DbPSLWbSUpg/s320/TypeSystem.jpeg" border="0" alt=""id="BLOGGER_PHOTO_ID_5249606578770386322" /&gt;&lt;/a&gt;</description><link>http://blog.clemens.endorphin.org/2008/09/i-love-lolcat-meme.html</link><author>noreply@blogger.com (Clemens Fruhwirth)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_Ez5R0yiWluM/SNpZXqopnZI/AAAAAAAAAOU/DbPSLWbSUpg/s72-c/TypeSystem.jpeg' height='72' width='72'/><thr:total>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5326958204958381964.post-232268947364181656</guid><pubDate>Mon, 22 Sep 2008 17:20:00 +0000</pubDate><atom:updated>2008-09-25T02:25:53.621-07:00</atom:updated><title>Counter-steganography research?</title><description>In the context of a national research fund, I recently stumbled across a project that deals with counter-&lt;a href="http://en.wikipedia.org/wiki/Steganography"&gt;steganography&lt;/a&gt; research. From an academic point of view, it is healthy to have security technology research and research trying to break these technologies. But when I had a closer look what kind of counter-steganography they were actually working on, I got worried.&lt;br /&gt;&lt;br /&gt;The most common security breach in telecommunications is eavesdropping. Steganography and cryptography applied to telecommunication would both prevent that, the first by hiding the information, the second by talking in a language unknown to a third party listening. However, steganography is obviously more bandwidth demanding than cryptography, so why would anyone  favour steganography over cryptography, when both achieve the same goals? Steganography has advantage that you can deny the existence of a hide message. Cryptographers call that plausible denial or &lt;a href="http://en.wikipedia.org/wiki/Deniable_encryption"&gt;deniable encryption&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;StegIT (&lt;a href="http://www.fh-stpoelten.ac.at/forschung/projekte/stegit"&gt;german&lt;/a&gt;) is a project that aims to prevent steganography in telecommunications (they aim for GSM/UMTS/VoIP). It works by mixing inauditable white noise into the conversation, so these "low bit" channels become unavailable for encoding hidden messages. StegIt does not aim to detect steganography, but its approach is to add this white noise to all conversations by installing equipment at your phone carrier. (To the german-speaking reader: Notice the wording they use in the project description. They speak of "steganographic attacks", and preventing these "attacks". Do they just desperately try to get funding or do they actually believe that?)&lt;br /&gt;&lt;br /&gt;My initial reaction to StegIT was: "Why should I bother to use the low bandwidth channels at all? I would just drop those inaudible parts from my data channel and use regular encryption". I would loose the plausible denial property though, but is there is scenario where I would need that property? Yes, when encryption itself is outlawed (or made useless by laws for on-demand decryption).&lt;br /&gt;&lt;br /&gt;This would only serve the purpose that eavesdropping is always available to law enforcement. But the idea to outlaw encryption sounded to remote to me... until I started googling that topic. Legislation concerning encryption is far from uncommon, see &lt;a href="http://rechten.uvt.nl/koops/cryptolaw/index.htm"&gt;Crypto Law Survey&lt;/a&gt; by Bert-Japp Koops, who also provides us with &lt;a href="http://rechten.uvt.nl/koops/cryptolaw/cls-sum.htm"&gt;some nice graphics&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Do I want my national security research fund to support a project that only make scene in a scenario where the right to encrypt -- your own personal guarantee for privacy -- is restricted? Definitely not.</description><link>http://blog.clemens.endorphin.org/2008/09/counter-steganography-research.html</link><author>noreply@blogger.com (Clemens Fruhwirth)</author><thr:total>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5326958204958381964.post-2162493044323680714</guid><pubDate>Sat, 22 Dec 2007 10:22:00 +0000</pubDate><atom:updated>2008-08-12T09:13:16.026-07:00</atom:updated><title>Removing CHS based access from windows boot loaders</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;Recently, I had troubles to migrate my Windows installation from VMWare to &lt;a href="http://virtualbox.org/"&gt;VirtualBox&lt;/a&gt;. When booting the vmware created partition in virtualbox, I got "NTLDR not found". So I sharpened the knives and got down to business with vmware's gdb interface and virtualbox's internal debugger. Tracing the execution showed that the BIOSes of the two products reported different geometries on the INT 13h interface. The generic method contained in the boot loader to read a sector from disk is "clever" as it checks whether the sector is below the maximum sector index that is reachable with the CHS geometry reported by the BIOS. If not, it uses the LBA interface of the BIOS. If yes, the cleverness of the boot loader suddenly vanishes. Instead of using the BIOS reported geometry to break the absolute sector down into its CHS components, the boot loader uses a geometry stored in the so called BIOS parameter block. That's a section of the first sector embedded into the boot loader that hard codes such values as head per cylinder and sectors per heads into the boot loader. If the hard coded values are different from the ones used by the BIOS, the calculation produces wrong values. So, if you move your partition to a BIOS that exposes a different geometry to the boot loader than is hard coded in the boot loader the whole thing blows up. Brilliant Microsoft design, as ever.&lt;br /&gt;&lt;br /&gt;My solution is to override the check in the boot loader, so that LBA based access is always used and the CHS code is never touch. This way I'm able to use my partition under vmware (which uses heads=15) and virtualbox (which uses heads=255) simultaneously. Here is my boot loader patcher for FAT32 and NTFS based boot loaders: &lt;a href="http://clemens.endorphin.org/killchs.c"&gt;killchs.c&lt;/a&gt;. Use on your own risk. Chances are good that you can restore you boot loader with &lt;a href="http://www.sysint.no/nedlasting/mbrfix.htm"&gt;mbrfix&lt;/a&gt; if it breaks your boot loader.&lt;br /&gt;&lt;br /&gt;Btw: &lt;a href="http://virtualbox.org/"&gt;VirtualBox&lt;/a&gt; is available under the GPL, and not only this makes it much more sexy to work with, it is also much faster than VMWare, at least that's my impression. There is also a commercial distribution of VirtualBox.&lt;/div&gt;</description><link>http://blog.clemens.endorphin.org/2007/12/removing-chs-based-access-from-windows_3170.html</link><author>noreply@blogger.com (Clemens Fruhwirth)</author><thr:total>3</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5326958204958381964.post-247287005663494609</guid><pubDate>Thu, 15 Nov 2007 20:38:00 +0000</pubDate><atom:updated>2008-07-28T12:40:01.596-07:00</atom:updated><title>X11-xft, also for XMonad</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;Haskell bindings for Xft are on their way. They don't cover 100% of the API yet, because some of the API relies on the only briefly covered Xrender and FreeType APIs. But the whole thing is sufficiently usable to get nice FreeType rendered fonts in xmonad! Here is the &lt;a href="http://clemens.endorphin.org/xmonad-on-xft.png"&gt;pr0n&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;For the moment my Xft patch for xmonad only covers Tabbed.hs, so you get Xft fonts in tab rendering. A few more pieces are missing in Prompt.hs, but I'm sure this will be covered soon.&lt;br /&gt;&lt;pre&gt;darcs get http://clemens.endorphin.org/X11-xft/&lt;/pre&gt;Enjoy.&lt;/div&gt;</description><link>http://blog.clemens.endorphin.org/2007/11/x11-xft-also-for-xmonad.html</link><author>noreply@blogger.com (Clemens Fruhwirth)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5326958204958381964.post-1267725505646138100</guid><pubDate>Sun, 30 Sep 2007 20:28:00 +0000</pubDate><atom:updated>2008-07-27T03:10:24.210-07:00</atom:updated><title>Depressing</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;After the most expensive car check and maintenance in my car owner history few weeks ago, my car died. Right in the middle of nowhere. And even worse, on my way to ICFP07. &lt;br /&gt;&lt;br /&gt;Unfortunately, most of my planning rests on having a car, as my accommodation is not within Freiburg. Taking a plane/train to Freiburg and renting a hotel is simply way over my budget. I hope to have a working car by tomorrow, so I can make at least 50% use of my registration. Otherwise the registration fee will become a write-off in my books.&lt;br /&gt;&lt;br /&gt;As I got home (from the middle of nowhere -- story on its own), I was so frustrated that I started to hack C. Here is an updated &lt;a href="http://clemens.endorphin.org/patches/xft-for-20070927.diff"&gt;XFT patch&lt;/a&gt; (aka anti-aliasing support) for ion-3rc-20070927. Check the changes the patch does to your system.mk.&lt;br /&gt;&lt;br /&gt;Yes, yes, I will switch to XMonad soon.&lt;/div&gt;</description><link>http://blog.clemens.endorphin.org/2007/09/depressing_4979.html</link><author>noreply@blogger.com (Clemens Fruhwirth)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5326958204958381964.post-1445299191596367559</guid><pubDate>Tue, 25 Sep 2007 18:54:00 +0000</pubDate><atom:updated>2008-07-28T10:11:01.515-07:00</atom:updated><title>Stabilizing Firefox for beta quality plugins (Flash)</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;Using the recent Adobe Flash plugin in Firefox is a two edged sword. On one hand, it gives you the never ending joy of useless YouTube videos, but on the other hand it crashes your browser every 24h on average (only if you are also using &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/433"&gt;Flashblocker &lt;/a&gt;which reduces flash content activation by 80%, namely all the annoying ads).&lt;br /&gt;&lt;br /&gt;Presumably because of Flash, &lt;a href="http://gwenole.beauchesne.info/en/projects/nspluginwrapper"&gt;nspluginwrapper &lt;/a&gt;was invented to wrap up software of vendors that are incapable of producing 64-bit version of their product. nspluginwrapper works by providing a proxy to Firefox that acts as regular plugin, but actually spawns off a separate process that runs in 32-bit mode that links in the shared object of the plugin. We can use this construction to remove Flash from the intimate &lt;tt&gt;dlopen&lt;/tt&gt; embracement of Firefox and move all negative side effects of beta quality software into a subprocess. The following trick works for all 32-bit browsers, whether the rest of your distro is amd64 based or native i386. If you are&lt;br /&gt;using a 64-bit browser, it's likely that you know nspluginwrapper anyway, so this blog entry is about 32-bit to 32-bit.&lt;br /&gt;&lt;br /&gt;Grab a copy &lt;a href="http://gwenole.beauchesne.info/en/projects/nspluginwrapper#downloads"&gt;nspluginwrapper&lt;/a&gt; (at least 0.9.91.5). Untar it. Compile it under an i386 environment. If you don't have this at your disposal, here is it precompiled from my local Gentoo installation: &lt;a href="http://clemens.endorphin.org/nspluginwrapper-0.9.91.5.tbz2"&gt;nspluginwrapper-0.9.91.5.tbz2&lt;/a&gt;. This is compiled for the amd64 arch layout of Gentoo. Under native i386, just create a link from &lt;tt&gt;lib32&lt;/tt&gt; to &lt;tt&gt;lib&lt;/tt&gt; in &lt;tt&gt;/usr&lt;/tt&gt;.&lt;br /&gt;&lt;br /&gt;Now grab a copy of libflashplayer.so. Drop it into a directory that is not part of your default Firefox plugin path and that does not contain the substring 'netscape' in its absolute path.  So,&lt;br /&gt;&lt;tt&gt;/opt/netscape/plugins/libflashplayer.so&lt;/tt&gt; is wrong twice, &lt;tt&gt;/usr/lib32/nsbrowser/plugins libflashplayer.so&lt;/tt&gt; is wrong only with respect to the default plugin path, and &lt;tt&gt;/usr/lib32/nsbrowser/wrapped-plugins/libflashplayer.so&lt;/tt&gt; is correct.&lt;br /&gt;&lt;br /&gt;The reason why the path must not contain 'netscape' is that libflashplayer.so presumes its part of a netscape installation when it sees 'netscape' in its path and malfunctions for Flash movies as on YouTube and Google Video under nspluginwrapper and Opera.&lt;br /&gt;&lt;br /&gt;Invoke &lt;tt&gt;/usr/lib32/nspluginwrapper/i386/linux/npconfig -i /usr/lib32/nsbrowser/wrapped-plugins/libflashplayer.so&lt;/tt&gt;. As super user, this creates &lt;tt&gt;npwrapper.libflashplayer.so&lt;/tt&gt; in &lt;tt&gt;/usr/lib32/nsbrowser/plugins&lt;/tt&gt;. Invoking this as normal user drops this file into &lt;tt&gt;~/.mozilla/plugins&lt;/tt&gt;. You are now read to go with your new shielded Firefox. Check that it contains a Section 'Shockwave Flash' under &lt;a href="about:plugins"&gt;about:plugins&lt;/a&gt; referring to the npwrapper.libflashplayer.so file. If it refers to &lt;tt&gt;libflashplayer.so&lt;/tt&gt; directly, you have a copy of &lt;tt&gt;libflashplayer.so&lt;/tt&gt; laying around in a plugin path.&lt;br /&gt;&lt;br /&gt;Flash might still cause lock ups in this setting. I presume Flash is getting stuck in an endless loop keeping Firefox busy even through the proxy. However, when that happens just kill the nspluginwrapper subprocess called npviewer. After that Firefox should refresh and you can just hit reload on Flash sites (instead of killing firefox and reloading all websites). Good luck.&lt;br /&gt;&lt;/div&gt;</description><link>http://blog.clemens.endorphin.org/2007/09/stabilizing-firefox-for-beta-quality.html</link><author>noreply@blogger.com (Clemens Fruhwirth)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5326958204958381964.post-2661037265414745152</guid><pubDate>Tue, 11 Sep 2007 13:31:00 +0000</pubDate><atom:updated>2008-08-12T01:53:32.844-07:00</atom:updated><title>QT RLE hits ffmpeg SVN</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;My last drive-by-software-hacking turned out to be useful at the end. I hacked up a basic QT RLE (aka Animation) encoder for ffmpeg, sent the patch to ffmpeg-devel but without further intentions to work on merging. Thanks go to Alexis Ballier for stepping up and refining my patch until it was polished enough.&lt;br /&gt;&lt;br /&gt;With recent version of ffmpeg, you can create a 1280x1024 screencast for your running X session at display :0.0 with&lt;br /&gt;&lt;tt&gt;ffmpeg -f x11grab -s 1280x1024 -i :0.0 -f oss -i /dev/dsp -vcodec qtrle /tmp/lala.mov&lt;br /&gt;&lt;/tt&gt;after running configure&lt;br /&gt;&lt;tt&gt;./configure --enable-gpl --enable-x11grab --enable-libfaad --enable-libfaac&lt;/tt&gt;&lt;br /&gt;Unfortunately rgb555 encoding was removed, so you are only able to create videos rgb32 video streams (aka 24-bit color depth).&lt;br /&gt;&lt;/div&gt;</description><link>http://blog.clemens.endorphin.org/2007/09/qt-rle-hits-ffmpeg-svn.html</link><author>noreply@blogger.com (Clemens Fruhwirth)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5326958204958381964.post-2422850491446861541</guid><pubDate>Fri, 18 May 2007 08:53:00 +0000</pubDate><atom:updated>2008-07-29T04:02:53.880-07:00</atom:updated><title>Lisplab.at dies</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;a href="http://www.lisplab.at/"&gt;lisplab.at&lt;/a&gt; dies in 3 days. I can't justify spending 25 EURs on extending the domain subscription, as nobody of my co-developers showed any partical interested in fueling this social attractor.&lt;br /&gt;&lt;br /&gt;If anyone is interested in reviving a Common Lisp developer group in Austria, feel free to contact me (preferably before the 21th of May).&lt;/div&gt;</description><link>http://blog.clemens.endorphin.org/2007/05/lisplabat-dies.html</link><author>noreply@blogger.com (Clemens Fruhwirth)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5326958204958381964.post-2225016797483557850</guid><pubDate>Thu, 17 May 2007 18:05:00 +0000</pubDate><atom:updated>2008-07-29T04:04:35.294-07:00</atom:updated><title>Liskell at the International Lisp Conference 2007, Cambridge, UK</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;It's been over a month since I returned from Cambridge and still I have not found time to blog an epilogue for this trip.&lt;br /&gt;&lt;br /&gt;First, here is the material:&lt;br /&gt;&lt;a href="http://clemens.endorphin.org/Liskell%20presentation-ILC%202007.mov.torrent"&gt;Liskell presentation-ILC 2007.mov.torrent&lt;/a&gt;.&lt;br /&gt;This is a screencast of my talk at the &lt;a href="http://www.international-lisp-conference.org/2007/index"&gt;International Lisp Conference 2007&lt;/a&gt;; one of the two presentations I have given in Cambridge. Notice that this talk was prepared for a Lisp audience, so my job was to highlight the features of Haskell.  The other talk in Cambridge was at Microsoft Research and I plan to make this talk available in a similar style (but with the objective to sell Lisp ideas to a Haskell audience).&lt;br /&gt;&lt;br /&gt;A few remarks:&lt;br /&gt;&lt;ul&gt;&lt;li style="list-style-type: disc; list-style-image: none; list-style-position: outside;"&gt;The implementation of cond as defmacro is a pedagogical code mock-up. It operates on the wrong data structure. The &lt;a href="http://clemens.endorphin.org/ILC07-Liskell-draft.pdf"&gt;Liskell paper&lt;/a&gt; has a correct implementation of cond as defmacro.&lt;/li&gt;&lt;br /&gt;&lt;li style="list-style-type: disc; list-style-image: none; list-style-position: outside;"&gt;There are a few errors in the codec stream for qtrle. For some reasons, my recent sync with ffmpeg subversion HEAD caused this trouble. There are only 3-4 errors, and they are usually corrected in a few seconds with the next Pframe in the stream.&lt;/li&gt;&lt;br /&gt;&lt;li style="list-style-type: disc; list-style-image: none; list-style-position: outside;"&gt;&lt;a href="http://www.gigavox.com/levelator"&gt;Levelator&lt;/a&gt; rox. I spent about 2 hours finding suitable settings for mastering my voice track in Audacity with no useful results at all. The first try with Levelator was a perfect  astering. Lovely.&lt;/li&gt;&lt;br /&gt;&lt;li style="list-style-type: disc; list-style-image: none; list-style-position: outside;"&gt;The liskell-mode you see in this video is just a tiny minor mode wrapping haskell-mode with scheme indention. A video on how to set up this development environment is also on my todo list. Grab &lt;a href="http://liskell.org/emacs/liskell-mode.el"&gt;liskell-mode.el&lt;/a&gt;.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;a href="http://www.international-lisp-conference.org/2007/speakers#fruhwirth_clemens"&gt;Audio&lt;/a&gt; and &lt;a href="http://video.google.com/videoplay?docid=-3068792936936576299"&gt;video&lt;/a&gt; recordings of the original session are available. But unfortunately, the video is incomplete and the quality is insufficient for reading anything from the projection, also the background noise of the audio recording is quite high. I recommend to download the screencast above. The slides and source code files are available &lt;a href="http://clemens.endorphin.org/ilc-talk/"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;And finally a few photos in &lt;a href="http://flickr.com/groups/ilc07/pool/7669802@N02/"&gt;my semi-private flickr stream&lt;/a&gt;.&lt;br /&gt;&lt;/div&gt;</description><link>http://blog.clemens.endorphin.org/2007/05/liskell-at-international-lisp.html</link><author>noreply@blogger.com (Clemens Fruhwirth)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5326958204958381964.post-1835795431288931703</guid><pubDate>Mon, 14 May 2007 11:47:00 +0000</pubDate><atom:updated>2008-07-29T06:04:41.408-07:00</atom:updated><title>liskell.org</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;br /&gt;Liskell — my favorite Lisp+Haskell pet — has a new website, namely &lt;a href="http://liskell.org/"&gt;http://liskell.org&lt;/a&gt;. There you will find a new branch of Liskell based on GHC-6.6 and a new Liskell development mailing list&lt;a href="http://hwi.endorphin.org/mailman/listinfo/liskell-devel"&gt; liskell-devel@liskell.org&lt;/a&gt;.&lt;br /&gt;&lt;/div&gt;</description><link>http://blog.clemens.endorphin.org/2007/05/liskellorg.html</link><author>noreply@blogger.com (Clemens Fruhwirth)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5326958204958381964.post-1706231268263551554</guid><pubDate>Mon, 07 May 2007 07:55:00 +0000</pubDate><atom:updated>2008-07-29T06:06:02.239-07:00</atom:updated><title>Happy Birthday LUKS!</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;br /&gt;Two years ago on the 25th of March 2005, I bumped the version of cryptsetup-luks to 1.0. With the release of &lt;a href="http://luks.endorphin.org/"&gt;cryptsetup-luks 1.0.5&lt;/a&gt;, the LUKS reference implementation -- and arguably LUKS itself -- is more than 2 years old! With this release, the LUKS branch of cryptsetup is relabelled (in accordance with &lt;a href="http://www.saout.de/misc/dm-crypt/"&gt;Christophe Saout&lt;/a&gt;) and cryptsetup-luks becomes the original cryptsetup.&lt;br /&gt;&lt;br /&gt;Number one hit on Google for "LUKS" was once the American painter &lt;a href="http://www.artnet.com/artist/674843/george-benjamin-luks.html"&gt;George Luks&lt;/a&gt;. I'm sorry George, but we have taken over. The term "LUKS" is now a synonym for "Linux Unified Key Setup". LUKS is now part of any major distribution, Debian includes it with their installation suite, Gnome can talk to it via a HAL module. I am quite satisfied with my first free software project, although my recent addiction to Lisp/Haskell/&lt;a href="http://liskell.org/"&gt;Liskell&lt;/a&gt; makes it a bit harder for me to code C.&lt;br /&gt;&lt;br /&gt;It's interesting, how live changes in just two years. It's interesting how your personal interests change in just two years. I shifted my attention from capital markets, to Lisp, to Genetic Programming, to Typing, to Haskell, to &lt;a href="http://liskell.org/"&gt;Liskell&lt;/a&gt;, to static reasoning about programs in a non-turing complete language. "Making good cookies" and "world domination" are the next on my list.&lt;br /&gt;&lt;/div&gt;</description><link>http://blog.clemens.endorphin.org/2007/05/happy-birthday-luks.html</link><author>noreply@blogger.com (Clemens Fruhwirth)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5326958204958381964.post-8941844847067128825</guid><pubDate>Thu, 22 Feb 2007 12:23:00 +0000</pubDate><atom:updated>2008-07-29T06:07:20.842-07:00</atom:updated><title>Liskell docs, finally</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;br /&gt;As the ACM SIGPLAN template gave my Latex document much more space, I decided — instead of writing a separate piece of documentation — to enrich my ILC07 submission with more interesting chapters about meta-programming and the Liskell prelude. This paper is much richer in content as the original (about half the content is new) and it finally starts to explain the mechanisms behind &lt;tt&gt;defmacro&lt;/tt&gt; and how you can use them in the Haskell/Liskell world. So if you are interested in &lt;a href="http://clemens.endorphin.org/liskell"&gt;Liskell&lt;/a&gt;, &lt;a href="http://www.blogger.com/ILC07-Liskell-draft.pdf"&gt;the revised paper&lt;/a&gt; certainly deserves a second look.&lt;br /&gt;&lt;/div&gt;</description><link>http://blog.clemens.endorphin.org/2007/02/liskell-docs-finally.html</link><author>noreply@blogger.com (Clemens Fruhwirth)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5326958204958381964.post-8883126199676290968</guid><pubDate>Tue, 13 Feb 2007 10:40:00 +0000</pubDate><atom:updated>2008-07-29T12:10:55.170-07:00</atom:updated><title>Pattern guards in Liskell</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;Yes, I'm working on documentation this very moment, but after seeing &lt;a href="http://neilmitchell.blogspot.com/2007/02/missing-haskell-feature.html"&gt;A missing Haskell feature&lt;/a&gt; on Planet Haskell, I was unable to resist. I need my daily dosage of coding.&lt;br /&gt;&lt;br /&gt;Here is working &lt;a href="http://clemens.endorphin.org/liskell"&gt;Liskell&lt;/a&gt; syntax sugar for pattern guards as described by Neil Mitchell.&lt;br /&gt;&lt;pre&gt;(defmacro (~= pts)&lt;br /&gt; `(let (((comp ,pts) True)&lt;br /&gt;        ((comp _) False))&lt;br /&gt;    comp))&lt;br /&gt;&lt;/pre&gt;It can be used right-away as in:&lt;br /&gt;&lt;pre&gt;(all (~= Star _) ([] (Star "x") (Atom)))       -&amp;gt; False&lt;br /&gt;(all (~= Star _) ([] (Star "x") (Star "foo"))) -&amp;gt; True&lt;br /&gt;&lt;/pre&gt;To give you a brief idea why this works: The function body of &lt;tt&gt;defmacro&lt;/tt&gt; is called with a list (called pts) that is bound to &lt;tt&gt;([] (PSym "Star") (PSym "_"))&lt;/tt&gt; which is equivalent to &lt;tt&gt;[PSym "Star", PSym "_"]&lt;/tt&gt; written in Haskell syntax. This parse tree part is substituted into the backquoted code template at &lt;tt&gt;,pts&lt;/tt&gt;, resulting in the parse tree:&lt;br /&gt;&lt;pre&gt;(let (((comp (Star _) True))          | let comp (Star _) = True&lt;br /&gt;     ((comp _)       False))         |     comp _        = False&lt;br /&gt; comp)                               | in comp&lt;br /&gt;&lt;/pre&gt;The Haskell equivalent of the generated Liskell parse tree is shown on the right hand side for our Planet Haskell readers. This generated parse tree is the result of the compile-time &lt;tt&gt;"~="&lt;/tt&gt; macro transformation, and instead of the original &lt;tt&gt;(~= Star _)&lt;/tt&gt; expression the generated parse tree is compiled to object code.&lt;br /&gt;&lt;br /&gt;You can compile &lt;a href="http://clemens.endorphin.org/testsuite-liskell/tests/liskell/testprogs/Star.lsk"&gt;Star.lsk &lt;/a&gt;with &lt;tt&gt;"ghc Star.lsk -o Star -main-is Star -package LskPrelude"&lt;/tt&gt;.&lt;br /&gt;&lt;br /&gt;(For those who already have a local Liskell branch, please pull the latest changes and redo ./darcs-all get. I moved the LskPrelude into a separate new core package. Also I vastly simplified the parse tree type, so the Liskell paper is not correct anymore wrt this.)&lt;br /&gt;&lt;/div&gt;</description><link>http://blog.clemens.endorphin.org/2007/02/pattern-guards-in-liskell.html</link><author>noreply@blogger.com (Clemens Fruhwirth)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5326958204958381964.post-1520155222386236892</guid><pubDate>Wed, 31 Jan 2007 10:21:00 +0000</pubDate><atom:updated>2008-08-13T00:10:52.602-07:00</atom:updated><title>Macros for Haskell? Done.</title><description>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Why is Lisp special? Because of macros. This changes today.&lt;br /&gt;&lt;br /&gt;For the last three month, I have been working on Liskell, a language extension for GHC. Some people might be tempted to call it a new language because of documents talking about language definition. But in fact, it is just a new dress for something we already embosomed: Haskell.&lt;br /&gt;&lt;br /&gt;Liskell brings symbolic expression (aka Lisp syntax) to Haskell. This is no Lisp interpreter written in Haskell, but GHC itself becomes the part that processes Lisp like syntax. After parsing, the Liskell extension transforms this sexp parse tree into a regular Haskell parse tree, as it would result from any regular Haskell file. From then it takes the regular path through type inference, desugaring, compiling core. So, if there was not another important thing, this would just be a new syntax for Haskell.&lt;br /&gt;&lt;br /&gt;Within Liskell, we get parse tree transformers, a generalization of macros. Before the conversion to the Haskell parse tree takes place, you are free to do any arbitrary manipulation to the Lisp-styled parse tree of sexps by injecting your own parse tree transformers into the compiler. The possibilities with such a facility ranges from minor syntactic sugar transformations such as field syntax, 'deriving' syntax or another do-notation expansion, to more grave extensions to Liskell, such as embedded sub-languages. An example for the latter is my embedded Prolog version, that can be seen in a little appetizer (Flash Video, 99mb, &lt;a href='http://clemens.endorphin.org/PrologDemo.flv'&gt;direct&lt;/a&gt;, &lt;a href='http://clemens.endorphin.org/PrologDemo.flv.torrent'&gt;torrent (preferred)&lt;/a&gt;. To play &lt;a href='http://www.mplayerhq.hu/design7/dload.html'&gt;mplayer&lt;/a&gt;, for Windows especially: &lt;a href='http://www.download.com/FLV-Player/3000-2139_4-10467081.html'&gt;FLV Player&lt;/a&gt;.).&lt;br /&gt;&lt;br /&gt;The official page is &lt;a href='http://clemens.endorphin.org/liskell'&gt;http://clemens.endorphin.org/liskell&lt;/a&gt;. The material I release for the moment is my darcs repository of GHC containing Liskell and a modified testsuite containing a small set of regression tests and the Liskell Prelude. The Liskell Prelude defines a lot of syntax sugar, so this might be the first place to look for reasonable first-steps examples into meta-programming. But before jumping into meta-programming, you might want to look at the basic language first. The Liskell page contains a draft for a Liskell paper submitted for ILC07 and it also features a 15 minute tour of Liskell&lt;br /&gt;syntax.&lt;br /&gt;&lt;br /&gt;How fast the documentation grows, depends on the community reaction and your feedback. For the moment, please be content with the basics, I hope to introduce you to meta-programming in a more systematic way next week.&lt;br /&gt;&lt;/div&gt;</description><link>http://blog.clemens.endorphin.org/2007/01/macros-for-haskell-done.html</link><author>noreply@blogger.com (Clemens Fruhwirth)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5326958204958381964.post-8539464020027011225</guid><pubDate>Tue, 09 Jan 2007 07:57:00 +0000</pubDate><atom:updated>2008-08-13T00:11:20.314-07:00</atom:updated><title>hoogle.el</title><description>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;br /&gt;Here comes a short emacs helper for Haskell coders. It allows you to hoogle lookup the symbol currently under your cursor. Drop &lt;a href='/patches/hoogle.el'&gt;hoogle.el&lt;/a&gt; into your &lt;tt&gt;~/(x)emacs&lt;/tt&gt; dir, and add&lt;pre&gt;&lt;br /&gt;(require 'hoogle)&lt;br /&gt;(define-key haskell-mode-map [?\C-c ?h] 'hoogle-lookup)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;to your &lt;tt&gt;init.el&lt;/tt&gt;. For educational purposes, here is the function that does all the (pretty-simple) magic.&lt;pre&gt;&lt;br /&gt;(defun hoogle-lookup (p)&lt;br /&gt;  (interactive "p")  &lt;br /&gt;  (let ((symbol-name (thing-at-point 'symbol)))&lt;br /&gt;    (unless (and (= 1 p) (stringp symbol-name))&lt;br /&gt;      (setq symbol-name (read-from-minibuffer "Hoogle lookup name: " "" &lt;br /&gt;           nil nil 'hoogle-history)))&lt;br /&gt;    (browse-url (concat hoogle-url-base symbol-name))))&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://blog.clemens.endorphin.org/2007/01/hoogleel.html</link><author>noreply@blogger.com (Clemens Fruhwirth)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5326958204958381964.post-1495140424628068423</guid><pubDate>Wed, 20 Dec 2006 09:31:00 +0000</pubDate><atom:updated>2008-08-12T01:06:08.562-07:00</atom:updated><title>x11grab in ffmpeg svn</title><description>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;br /&gt;Edouard Gomez did a great job on pushing my x11grab patch into ffmpeg. He smoothed all rough edges ranging from my blunt ignorance of the ffmpeg coding guidelines to obvious hacks without any remorse. &lt;br /&gt;&lt;br /&gt;The patch series hit ffmpeg svn on 20061212. Get it from &lt;a href='http://ffmpeg.mplayerhq.hu/download.html'&gt;here&lt;/a&gt;. You have to run configure with &lt;code&gt;--enable-gpl&lt;/code&gt; to get the GPL-ed x11grab implementation. &lt;br /&gt;&lt;br /&gt;To actually start grabbing, run&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;ffmpeg -vcodec mpeg4 -qscale 2 -r 10 -vd x11:0+0,0 -s 1280x1024 whatever.avi&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;You might replace 1280x1024 by your actual screen resolution.&lt;br /&gt;&lt;/div&gt;</description><link>http://blog.clemens.endorphin.org/2006/12/x11grab-in-ffmpeg-svn.html</link><author>noreply@blogger.com (Clemens Fruhwirth)</author><thr:total>0</thr:total></item></channel></rss>