<?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>Tom Lokhorst&#039;s blog &#187; Libraries</title>
	<atom:link href="http://tom.lokhorst.eu/category/libraries/feed" rel="self" type="application/rss+xml" />
	<link>http://tom.lokhorst.eu</link>
	<description>Writings from a happy Haskell coder.</description>
	<lastBuildDate>Thu, 23 Sep 2010 13:11:26 +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>AwesomePrelude presentation (video)</title>
		<link>http://tom.lokhorst.eu/2010/02/awesomeprelude-presentation-video</link>
		<comments>http://tom.lokhorst.eu/2010/02/awesomeprelude-presentation-video#comments</comments>
		<pubDate>Wed, 10 Feb 2010 21:37:23 +0000</pubDate>
		<dc:creator>Tom Lokhorst</dc:creator>
				<category><![CDATA[DSLs]]></category>
		<category><![CDATA[Haskell]]></category>
		<category><![CDATA[Libraries]]></category>

		<guid isPermaLink="false">http://tom.lokhorst.eu/?p=258</guid>
		<description><![CDATA[Last monday (February 8, 2010) Sebastiaan Visser and I presented our ongoing work on the AwesomePrelude at the Dutch Haskell User Group meeting. In a previous post &#8220;Deeply embedded DSLs in Haskell&#8221;, I introduced the AwesomePrelude. While the ideas behind that post haven&#8217;t changed, the implementation of the AwesomePrelude is radically different now. The AwesomePrelude [...]]]></description>
			<content:encoded><![CDATA[<p>Last monday (February 8, 2010) Sebastiaan Visser and I presented our ongoing work on the <a href="http://github.com/tomlokhorst/AwesomePrelude">AwesomePrelude</a> at the <a href="http://haskell.org/haskellwiki/Dutch_HUG">Dutch Haskell User Group</a> meeting.</p>

<p>In a previous post &#8220;<a href="http://tom.lokhorst.eu/2009/09/deeply-embedded-dsls">Deeply embedded DSLs in Haskell</a>&#8221;, I introduced the AwesomePrelude. While the ideas behind that post haven&#8217;t changed, the implementation of the AwesomePrelude is radically different now.</p>

<p>The AwesomePrelude is reimplementation of the Haskell prelude in which all data types have been replaced with type classes. Embedded Domain Specific Languages (DSLs) can implement these type classes to get access to the functions defined in terms of the type classes. For example: by implementing the <code>BoolC</code> type class, a DSL gets to use the <code>(&amp;&amp;)</code>, <code>(||)</code> and <code>not</code> functions.</p>

<p>Here&#8217;s a <a href="http://vimeo.com/9351844">recording</a> of our presentation:</p>

<p><iframe src="http://player.vimeo.com/video/9351844" width="640" height="360" frameborder="0"></iframe></p>

<p>The <a href="http://tom.lokhorst.eu/media/presentation-awesomeprelude-dhug-feb-2010.pdf">slides</a> are online, and the code <a href="http://github.com/tomlokhorst/AwesomePrelude">is available</a> on github. <br />
The <a href="http://sp2o.org/~sebas/frp-js/www/main.html">reactive javascript example</a> Sebastiaan mentions in the talk doesn&#8217;t use the AwesomePrelude per se, but is based on the same ideas.</p>]]></content:encoded>
			<wfw:commentRss>http://tom.lokhorst.eu/2010/02/awesomeprelude-presentation-video/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Waking on LAN</title>
		<link>http://tom.lokhorst.eu/2009/07/waking-on-lan</link>
		<comments>http://tom.lokhorst.eu/2009/07/waking-on-lan#comments</comments>
		<pubDate>Wed, 22 Jul 2009 06:29:07 +0000</pubDate>
		<dc:creator>Tom Lokhorst</dc:creator>
				<category><![CDATA[Haskell]]></category>
		<category><![CDATA[Libraries]]></category>

		<guid isPermaLink="false">http://tom.lokhorst.eu/?p=208</guid>
		<description><![CDATA[Computers are really nice machines, they have amazing processing power and can be used for all sorts of noble purposes, such as storing your movie collection family photos. Unfortunately, they also have the downside of generating heat and noise, so that&#8217;s why I keep one of mine at a friend&#8217;s house (also because he has [...]]]></description>
			<content:encoded><![CDATA[<p>Computers are really nice machines, they have amazing processing power and can be used for all sorts of noble purposes, such as storing your <del>movie collection</del> <ins>family photos</ins>.</p>

<p>Unfortunately, they also have the downside of generating heat and noise, so that&#8217;s why I keep one of mine at a friend&#8217;s house (also because he has a <em>very fast</em> internet connection). Strangely though, it seems he also isn&#8217;t to fond of all that heat and noise and turns the machine off when he thinks I&#8217;m not using it. So that&#8217;s why I needed a way to send a <a href="http://en.wikipedia.org/wiki/Wake-on-LAN">Wake on LAN</a> signal, known as a <a href="http://en.wikipedia.org/wiki/Wake-on-LAN#Magic_Packet">magic packet</a>, to remotely start the machine.</p>

<p>Yesterday I wrote a small Haskell program called <a href="/wol">wol</a> (available on <a href="http://hackage.haskell.org/package/wol">Hackage</a>) to send the &#8220;magic packet&#8221; to his router. We had to flash his router with new firmware to be able to have it memorize the internal ip address/mac address/port combination, but now it&#8217;s working!</p>

<p>I must say, it took me an embarrassing amount of time to write this program. For some time, I was stuck on why the <a href="http://hackage.haskell.org/packages/archive/network/latest/doc/html/Network-Socket.html">socket</a> wasn&#8217;t working. Then I <a href="http://haskell.org/pipermail/haskell-cafe/2008-March/040301.html">found out</a> I shouldn&#8217;t use the <code>PortNum</code> constructor to construct <code>PortNumber</code>s, because the endianess doesn&#8217;t match on my machine. It turns out your supposed to use the <code>Num</code> instance of <code>PortNumber</code> and use functions like <code>fromIntegral</code>. I&#8217;m happy to <a href="http://haskell.org/pipermail/haskell-cafe/2009-June/063232.html">see</a> other people also noticed how annoying this is, and are discussing a revamped <code>network</code> package.</p>

<p>Anyway, now you can all start starting your machine remotely with <a href="/wol">wol</a> (which, to be honest, is just a Haskell port of some PHP script I found online&#8230;).</p>
]]></content:encoded>
			<wfw:commentRss>http://tom.lokhorst.eu/2009/07/waking-on-lan/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hackage on Twitter</title>
		<link>http://tom.lokhorst.eu/2009/05/hackage-on-twitter</link>
		<comments>http://tom.lokhorst.eu/2009/05/hackage-on-twitter#comments</comments>
		<pubDate>Thu, 21 May 2009 18:51:44 +0000</pubDate>
		<dc:creator>Tom Lokhorst</dc:creator>
				<category><![CDATA[Haskell]]></category>
		<category><![CDATA[Libraries]]></category>

		<guid isPermaLink="false">http://tom.lokhorst.eu/?p=79</guid>
		<description><![CDATA[The Haskell community is very active. New packages are released to the central Hackage server each day. If your like me, and like to keep up on all the different new packages, you can now follow Hackage on Twitter. But be warned! There&#8217;s a lot happening, in the 3 days Hackage has been online, it [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/media/twitter-hackage.png" alt="" class="right" />The Haskell community is very active. New  packages are released to the central <a href="http://hackage.haskell.org/">Hackage</a> server each day.</p>

<p>If your like me, and like to keep up on all the different new packages, you can now follow <a href="http://twitter.com/Hackage">Hackage</a> on Twitter.</p>

<p>But be warned! There&#8217;s a lot happening, in the 3 days <a href="http://twitter.com/Hackage">Hackage</a> has been online, it has already tweeted more than 70 new releases.</p>

<p>The Twitter account is running a tool called <a href="/hackage2twitter">hackage2twitter</a>, build on top of the <a href="/feed2twitter">feed2twitter</a> library for tweeting posts from a RSS or Atom feed.</p>

<p>If you want to pipe your own feed to Twitter, you can use the <a href="/feed2twitter">feed2twitter</a> library or executable.</p>
]]></content:encoded>
			<wfw:commentRss>http://tom.lokhorst.eu/2009/05/hackage-on-twitter/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>bool-extras released</title>
		<link>http://tom.lokhorst.eu/2009/05/bool-extras-released</link>
		<comments>http://tom.lokhorst.eu/2009/05/bool-extras-released#comments</comments>
		<pubDate>Wed, 13 May 2009 08:25:10 +0000</pubDate>
		<dc:creator>Tom Lokhorst</dc:creator>
				<category><![CDATA[Haskell]]></category>
		<category><![CDATA[Libraries]]></category>

		<guid isPermaLink="false">http://tom.lokhorst.eu/?p=68</guid>
		<description><![CDATA[Ever found yourself in need of a if-then-else replacement that can be partially applied? Something you can pass to higher order functions? In short, ever needed this function? bool :: a -&#62; a -&#62; Bool -&#62; a bool x _ False = x bool _ y True = y Well, I did. So I&#8217;m very [...]]]></description>
			<content:encoded><![CDATA[<p>Ever found yourself in need of a <code>if-then-else</code> replacement that can be partially applied? Something you can pass to higher order functions? In short, ever needed this function?</p>

<pre><code>bool :: a -&gt; a -&gt; Bool -&gt; a
bool x _ False = x
bool _ y True  = y
</code></pre>

<p>Well, I did. So I&#8217;m very happy to announce my first public Haskell library: <a href="/bool-extras">bool-extras</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://tom.lokhorst.eu/2009/05/bool-extras-released/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

