<?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"
	>

<channel>
	<title>Pithyless</title>
	<atom:link href="http://pithyless.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://pithyless.com/blog</link>
	<description>Barren, destitute, devoid of pith.</description>
	<pubDate>Fri, 13 Jun 2008 12:21:04 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>hback - darcs repo</title>
		<link>http://pithyless.com/blog/2008/06/13/hback-darcs-repo/</link>
		<comments>http://pithyless.com/blog/2008/06/13/hback-darcs-repo/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 12:21:04 +0000</pubDate>
		<dc:creator>Norbert</dc:creator>
		
		<category><![CDATA[Haskell]]></category>

		<category><![CDATA[hback]]></category>

		<guid isPermaLink="false">http://pithyless.com/blog/?p=19</guid>
		<description><![CDATA[Thanks to the generous folks at community.haskell.org, hback now has a public darcs repo!
The hback googlecode page has been updated to reflect this. Google&#8217;s SVN is no longer officially supported, so do update your sources.
Checkout the source:
darcs get --partial http://code.haskell.org/hback/
In other news, I&#8217;m still swamped with school work, but will be back to working on [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to the generous folks at community.haskell.org, hback now has a public darcs repo!</p>
<p>The hback <a href="http://code.google.com/p/hback/wiki/checkout">googlecode page</a> has been updated to reflect this. Google&#8217;s SVN is no longer officially supported, so do update your sources.</p>
<p>Checkout the source:</p>
<p><code>darcs get --partial http://code.haskell.org/hback/</code></p>
<p>In other news, I&#8217;m still swamped with school work, but will be back to working on hback by the end of next week. Stay tuned!</p>
<p>Also, if you haven&#8217;t recently checked the comments from the <a href="http://pithyless.com/blog/2008/05/18/hback-haskell-n-back-memory-game/#comments">original post</a>, you really ought to! The readers have raised some questions and made quite a few good arguments about protocols and limitations of dual n-back tests.</p>
]]></content:encoded>
			<wfw:commentRss>http://pithyless.com/blog/2008/06/13/hback-darcs-repo/feed/</wfw:commentRss>
		</item>
		<item>
		<title>hback on google-code</title>
		<link>http://pithyless.com/blog/2008/06/07/hback-on-google-code/</link>
		<comments>http://pithyless.com/blog/2008/06/07/hback-on-google-code/#comments</comments>
		<pubDate>Sat, 07 Jun 2008 20:50:35 +0000</pubDate>
		<dc:creator>Norbert</dc:creator>
		
		<category><![CDATA[Haskell]]></category>

		<category><![CDATA[hback]]></category>

		<guid isPermaLink="false">http://pithyless.com/blog/?p=18</guid>
		<description><![CDATA[It&#8217;s a bit unofficial for now, but since people keep asking, I&#8217;ve started an hback project on google-code:
http://code.google.com/p/hback/
The source checkout includes the latest development version of the game. Eventually, I would like to host a public darcs repo for the project, but for now this will have to do.
If you are currently using or considering [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s a bit unofficial for now, but since people keep asking, I&#8217;ve started an hback project on google-code:</p>
<p><a href="http://code.google.com/p/hback/">http://code.google.com/p/hback/</a></p>
<p>The <a href="http://code.google.com/p/hback/wiki/checkout">source checkout</a> includes the latest development version of the game. Eventually, I would like to host a public darcs repo for the project, but for now this will have to do.</p>
<p>If you are currently using or considering playing with hback, I highly recommend you checkout the latest  trunk. It&#8217;s a much-improved version over 0.0.2 since it duplicates the protocol as described in <a href="http://www.pnas.org/cgi/content/abstract/0801268105v1">the paper</a>. If you spot any deviations, please do let me know. As soon as the most important tickets are fixed, this will be the basis for the much-revised 0.0.3 version. Additionally, I would like to explore building a win32 executable based on this trunk.</p>
<p>Do check out the code and post any tickets or comments! Better to fix them now than after the release :)</p>
]]></content:encoded>
			<wfw:commentRss>http://pithyless.com/blog/2008/06/07/hback-on-google-code/feed/</wfw:commentRss>
		</item>
		<item>
		<title>hback - 0.0.2</title>
		<link>http://pithyless.com/blog/2008/05/30/hback-0_0_2/</link>
		<comments>http://pithyless.com/blog/2008/05/30/hback-0_0_2/#comments</comments>
		<pubDate>Fri, 30 May 2008 17:04:50 +0000</pubDate>
		<dc:creator>Norbert</dc:creator>
		
		<category><![CDATA[Haskell]]></category>

		<category><![CDATA[hback]]></category>

		<guid isPermaLink="false">http://pithyless.com/blog/?p=17</guid>
		<description><![CDATA[This is an update to my hback memory game. You can always grab the latest version from hback-latest.tar.gz. 
Based on feedback (kudos James and Joseph) I&#8217;ve refactored a lot of the code and added the following feature requests:

Left and right arrows toggle the buttons on/off. Joseph&#8217;s suggestion worked fine, but on my setup it only [...]]]></description>
			<content:encoded><![CDATA[<p>This is an update to my <a href="http://pithyless.com/blog/2008/05/18/hback-haskell-n-back-memory-game/">hback memory game</a>. You can always grab the latest version from <a href="http://pithyless.com/code/hback-latest.tar.gz">hback-latest.tar.gz</a>. </p>
<p>Based on feedback (kudos James and Joseph) I&#8217;ve refactored a lot of the code and added the following feature requests:</p>
<ul>
<li>Left and right arrows toggle the buttons on/off. Joseph&#8217;s suggestion worked fine, but on my setup it only highlighted the correct button. This seems a little counterintuitive to me since the API calls it an &#8220;activation&#8221;; my version looks for key events and automatically toggle the buttons.</li>
<li>Game has a Pause mode which can be toggled on/off with <code>'p'</code></li>
<li>Added <em>some</em> comments ;-)</li>
<li>Added a score logger which I think would be cool for eventually analyzing lots of data (eg. pretty graphs of user improvement over time). This can be disabled with <code>turnOffLogging=True</code> in hback.hs, although I don&#8217;t see why you would want to: I&#8217;m not sending your data over the wire to analyze average IQs of Haskell hackers (yet).</li>
</ul>
<p>I think the biggest changes are under the hood: I refactored the widgets and state data structures and, as a consequence, a lot of the remaining code. Hopefully the code is a <em>little</em> clearer on what it&#8217;s doing and why. Send in all your feedback and ideas! (I do try to get around to implementing them, eventually.)</p>
<p>Per user requests, here are some of the liberties I took with the original paper:<br />
<span id="more-17"></span><br />
The number of graphics were chosen to be 9 different boxes (this is how I understood the paper&#8217;s description). I&#8217;ve been considering adding color variations (eg. with two colors, we would have 18 different graphics) - would this be a good idea?</p>
<p>The paper only stated alphabet letters were chosen for the sounds. This is consistent with what I learned about easy memory encodings in my psychology courses in college. ;-) What I am not sure about is the number of different sounds used. I decided to keep the number of unique sounds equal to the number of graphics (just to minimize unnecessary variations).</p>
<p>The pseudorandom generator was originally free-for-all, but I found the chance of a True Negative was unfairly high (especially at higher levels of play). In other words, with increasing levels of difficulty, it was much safer to guess that the stimuli did not repeat. Since the user could easily &#8220;win&#8221; the game by not doing anything, it clearly went against the primary objective of the game as defined in the paper: to keep the user challenged at all times.  After several different iterations of pseudorandom generators, I settled on the current version: there is a 50% chance that the stimuli is in fact the same as n-th previous turn and a 50% chance it is one of the other stimuli (randomly generated with equal probabilities). I feel this most clearly follows in the spirit of the game, which is to ensure that game consistently keeps the user mentally challenged (too easy or too difficult means the user loses concentration and no learning takes place).</p>
<p>With the same primary goal, the next-level choice is decided: with a naive score currently calculated as ((true positive + true negative) / total), the game level difficulty will decrease at 35% or lower, increase at 75% or higher, and otherwise remain the same. These boundaries were arbitrarily chosen by me and I am waiting for feedback to find out if they do in fact deliver a &#8220;consistently challenging&#8221; environment.</p>
]]></content:encoded>
			<wfw:commentRss>http://pithyless.com/blog/2008/05/30/hback-0_0_2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Planet-Friendly Benz: The Mercedes Hybrid</title>
		<link>http://pithyless.com/blog/2008/05/26/planet-friendly-mercedes-benz-hybrid/</link>
		<comments>http://pithyless.com/blog/2008/05/26/planet-friendly-mercedes-benz-hybrid/#comments</comments>
		<pubDate>Mon, 26 May 2008 19:48:40 +0000</pubDate>
		<dc:creator>Norbert</dc:creator>
		
		<category><![CDATA[misc]]></category>

		<guid isPermaLink="false">http://pithyless.com/blog/?p=15</guid>
		<description><![CDATA[I had an opportunity to ride around in on a Mercedes Hybrid this weekend. Who ever said Benz drivers are inconsiderate to the environment as they blast along in their AMG&#8217;s and S600&#8217;s? When they finally do arrive at their destination, they have no problem joining the greenies at their peace-loving rallies; and what better [...]]]></description>
			<content:encoded><![CDATA[<p>I had an opportunity to ride around <strike>in</strike> on a Mercedes Hybrid this weekend. Who ever said Benz drivers are inconsiderate to the environment as they blast along in their AMG&#8217;s and S600&#8217;s? When they finally do arrive at their destination, they have no problem joining the greenies at their peace-loving rallies; and what better way to spread the earth-love than on a brand new bike?</p>
<p>Except, of course, this is Mercedes-Benz we&#8217;re talking about: among the first of car makers to introduce crumple zones, disc brakes, ABS, air bags, and electronic traction control systems. So forget everything you know about the bicycle! Welcome to the new age: with the help of alien technology the user can now pedal less and enjoy the scenery more. Let&#8217;s get down to the brass tacks; all of us here are technically-minded, Haskell and Lisp are not alien technologies, so why should a bicycle be? The motor is a 24V 300 watt DC Motor with a 20 cell 24V 5amp/hour Nickel Cadmium battery. For the less technically inclined that means we can go 19 miles at a nice cruising speed of 15 mph.</p>
<p><img src="http://pithyless.com/img/blog/2008/05/merc_hybrid_s.jpg" alt="Mercedes Hybrid Bike" /></p>
<p><span id="more-15"></span></p>
<p>But the fun doesn&#8217;t stop there! All the best ideas were laughed at and disregarded at first; if anything, Mercedes should consider this post as a compliment that they are doing something right and on the path to a bicycle revolution. Riding the bike is in fact an enjoyable experience: with the motor on and draining the precious battery life, I can push the pedal just a little and feel a large torque swell up and kick the rear-wheel drive vehicle quickly up a steep hill. It really is a god-send: considering the weight of the bike, if the motor was drained I doubt I could actually get up the hill. But the problems start once you&#8217;re on level-ground (or dare-say, going downhill). The lawyers must have gotten to the designers before the AMG team showed up, because the bike is speed capped at roughly 15mph. That means you will get everywhere in comfort, but walking would probably be faster. And you will have to suffer the shame of having all the other bikers pass you by (or be forced to pedal furiously to keep your heavy bike in pace with all the low-tech bikes around you).</p>
<p><img src="http://pithyless.com/img/blog/2008/05/merc_hybrid2_s.jpg" alt="Mercedes Hybrid Bike" /></p>
<p>While we&#8217;re on the subject of the other bikers, I&#8217;m already hearing complaints about the slow integration of new innovations. And I agree; but where is the innovation? Most motorized bicycles fall into one of two groups: motor-powered scooters where the pedals are really just there for emergencies and decoration, and motorized bicycles which can help you go a lot faster and pedal less. This bike clearly falls into the latter category (excluding the speed boost). The first motorized electric bicycles were already showing up in the 1890s: it&#8217;s a good thing Mercedes decided to instead develop the <em>Hybrid</em> Bicycle, or this would be ancient history.</p>
<p><img src="http://pithyless.com/img/blog/2008/05/merc_hybrid3_s.jpg" alt="Mercedes Hybrid Bike" /></p>
<p>All things considered, Mercedes-Benz feels we should wait and charge a battery for 3 hours (recommended full charge 5.5 hours) to ride 20 miles with a limiter capping us to a little over walking speed. I feel this may be a marketing scheme to prove to us once and for all bicycles are useless aside from the leisurely Sunday stroll and we should go and buy that SLK 55 AMG or S600 when we actually want to <em>go</em> somewhere.</p>
]]></content:encoded>
			<wfw:commentRss>http://pithyless.com/blog/2008/05/26/planet-friendly-mercedes-benz-hybrid/feed/</wfw:commentRss>
		</item>
		<item>
		<title>hback - A Haskell N-Back Memory Game</title>
		<link>http://pithyless.com/blog/2008/05/18/hback-haskell-n-back-memory-game/</link>
		<comments>http://pithyless.com/blog/2008/05/18/hback-haskell-n-back-memory-game/#comments</comments>
		<pubDate>Sun, 18 May 2008 10:07:42 +0000</pubDate>
		<dc:creator>Norbert</dc:creator>
		
		<category><![CDATA[Haskell]]></category>

		<category><![CDATA[hback]]></category>

		<guid isPermaLink="false">http://pithyless.com/blog/?p=14</guid>
		<description><![CDATA[hback-0.0.tar.gz
Update: Released hback-0.0.2
Download Latest: hback-latest.tar.gz
Based on a recent research paper that claims fluid intelligence could be improved by training working memory, I wrote up a dual n-back test memory game in Haskell and gtk2hs. This is an alpha release: all comments are most welcome.
Gameplay
The n-back memory game tests whether the player can remember if the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://pithyless.com/code/hback-0.0.tar.gz"><strike>hback-0.0.tar.gz</strike></a><br />
Update: <a href="http://pithyless.com/blog/2008/05/30/hback-0_0_2/">Released hback-0.0.2</a><br />
Download Latest: <a href="http://pithyless.com/code/hback-latest.tar.gz">hback-latest.tar.gz</a></p>
<p>Based on a recent <a href="http://www.pnas.org/cgi/content/abstract/0801268105v1">research paper</a> that claims fluid intelligence could be improved by training working memory, I wrote up a dual n-back test memory game in Haskell and gtk2hs. This is an alpha release: all comments are most welcome.</p>
<h2>Gameplay</h2>
<p>The n-back memory game tests whether the player can remember if the nth previous turn matches the current one. The dual n-back test will measure how well the player can remember both visual and graphic stimuli simultaneously.</p>
<p><span id="more-14"></span></p>
<p>Given a difficulty level n, the player is expected to remember on each turn whether the nth previous sound or graphic (or both) matches the current one, and toggle the appropriate button(s). The graphic flashes for 500ms and the player has another 2.5 seconds to answer.</p>
<p><img src="http://pithyless.com/img/blog/2008/05/hback-diag1.png" alt="hback gameplay 1" /><br />
<img src="http://pithyless.com/img/blog/2008/05/hback-diag2.png" alt="hback gameplay 2" /></p>
<p>The training game consists of b block iterations, where each block will present (20+n) visual and audio stimuli. After each iteration, the difficulty of the n-back test may increase or decrease, depending on the performance of the player: the goal is to constantly keep the player at peak concentration.</p>
<h2>Installation</h2>
<p><a href="http://pithyless.com/code/hback-latest.tar.gz">Download hback-latest.tar.gz</a></p>
<pre><code> % tar -xzf hback-0.0.tar.gz
 % cd hback-0.0
</code></pre>
<p>Game can be played without system-wide installation:</p>
<pre><code> % make trial
 % ./hback
</code></pre>
<p>If you like what you see, feel free to install it:</p>
<pre><code> % make build
 % make install    # you may need root privileges for this
 % rehash
 % hback
</code></pre>
<p>hback takes two optional arguments:</p>
<pre><code> % ./hback b n
     - b determines the number of block iterations (eg. try 20 for an effective daily workout)
     - n determines the initial level (defaults to 1)
</code></pre>
<h2>Errata</h2>
<ul>
<li>Playing sounds currently through mplayer. If mplayer is not installed or you prefer a different player (all the sound files are .wav), currently the user needs to edit <code>hback.hs</code> (function <code>playSound :: Audio -> IO ()</code>) and recompile. This will be fixed as soon as I think of a good cross-platform solution; any suggestions?</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://pithyless.com/blog/2008/05/18/hback-haskell-n-back-memory-game/feed/</wfw:commentRss>
		</item>
		<item>
		<title>hlean 0.1.2</title>
		<link>http://pithyless.com/blog/2008/05/07/hlean-012/</link>
		<comments>http://pithyless.com/blog/2008/05/07/hlean-012/#comments</comments>
		<pubDate>Wed, 07 May 2008 18:18:26 +0000</pubDate>
		<dc:creator>Norbert</dc:creator>
		
		<category><![CDATA[Haskell]]></category>

		<category><![CDATA[hlean]]></category>

		<guid isPermaLink="false">http://pithyless.com/blog/?p=13</guid>
		<description><![CDATA[I&#8217;ve updated the hlean program. Aside from some cosmetic changes, documentation, and cabal package options, the main change is the segmentation fault fix. The program now correctly builds as a cabal package and runs. See hlean for a full description and usage details. You can download hlean 0.1.12 here. See the included README.txt for installation [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve updated the <a href="http://pithyless.com/blog/2008/05/06/hlean-011/">hlean</a> program. Aside from some cosmetic changes, documentation, and cabal package options, the main change is the segmentation fault fix. The program now correctly builds as a cabal package and runs. See <a href="http://pithyless.com/blog/2008/05/06/hlean-011/">hlean</a> for a full description and usage details. You can download <a href="http://pithyless.com/code/hlean-0.1.2.tar.gz">hlean 0.1.12 here.</a> See the included README.txt for installation instructions.</p>
]]></content:encoded>
			<wfw:commentRss>http://pithyless.com/blog/2008/05/07/hlean-012/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ghc, readline, and buffering woes</title>
		<link>http://pithyless.com/blog/2008/05/07/ghc-readline-buffering-woes/</link>
		<comments>http://pithyless.com/blog/2008/05/07/ghc-readline-buffering-woes/#comments</comments>
		<pubDate>Wed, 07 May 2008 16:49:49 +0000</pubDate>
		<dc:creator>Norbert</dc:creator>
		
		<category><![CDATA[Haskell]]></category>

		<guid isPermaLink="false">http://pithyless.com/blog/?p=12</guid>
		<description><![CDATA[Here&#8217;s a very simple Haskell program:
import System.Console.Readline

main :: IO ()
main = do
  putStr "Key: "
  k &#60;-  readKey
  putStrLn [k]

Looks pretty innocent, right? And it runs just fine with runhaskell. But as soon as you try to compile it with ghc and run it, Segmentation Faults occur. This was a bug [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a very simple Haskell program:</p>
<pre><code>import System.Console.Readline

main :: IO ()
main = do
  putStr "Key: "
  k &lt;-  readKey
  putStrLn [k]
</code></pre>
<p>Looks pretty innocent, right? And it runs just fine with <code>runhaskell</code>. But as soon as you try to compile it with <code>ghc</code> and run it, Segmentation Faults occur. This was a bug that recently bit me with my <a href="http://pithyless.com/blog/2008/05/06/hlean-011/">hlean</a> program.</p>
<p><span id="more-12"></span></p>
<p>What is the difference between the two? <code>runhaskell</code> invokes <code>ghci</code>, which makes additional readline initializations before handing it off to your main. The documentation is non-existent, so here is what you need to do in case you come across the same problem:</p>
<pre><code>import System.Console.Readline

main :: IO ()
main = do
  initialize     -- System.Console.Readline.initialize :: IO ()
  putStr "Key: "
  k &lt;-  readKey
  putStrLn [k]
</code></pre>
<p>Again, you test it using <code>runhaskell</code> and everything works fine. Except when you build and run it, the prompt just sits there - no matter how many times you hit that key - until you hit the carriage return (for the younger generation, that&#8217;s [Enter]). Turns out that initializing Readline is not enough, <code>ghc</code> and <code>ghci</code> have different buffering modes. After even more struggling which you now don&#8217;t have to suffer through, here&#8217;s the final solution:</p>
<pre><code>import System.Console.Readline
import System.IO

main :: IO ()
main = do
  initialize     -- System.Console.Readline.initialize :: IO ()
  hSetBuffering stdin NoBuffering   -- System.IO
  hSetBuffering stdout NoBuffering  -- System.IO
  putStr "Key: "
  k &lt;-  readKey
  putStrLn [k]
</code></pre>
<p>Hope I saved some poor googler some time and stress - I know I would have appreciated finding a post like this earlier. Kudos to pejo and dcoutts on #haskell irc for helping me sort this out.</p>
]]></content:encoded>
			<wfw:commentRss>http://pithyless.com/blog/2008/05/07/ghc-readline-buffering-woes/feed/</wfw:commentRss>
		</item>
		<item>
		<title>hlean 0.1.1</title>
		<link>http://pithyless.com/blog/2008/05/06/hlean-011/</link>
		<comments>http://pithyless.com/blog/2008/05/06/hlean-011/#comments</comments>
		<pubDate>Tue, 06 May 2008 18:34:35 +0000</pubDate>
		<dc:creator>Norbert</dc:creator>
		
		<category><![CDATA[Haskell]]></category>

		<category><![CDATA[hlean]]></category>

		<guid isPermaLink="false">http://pithyless.com/blog/?p=11</guid>
		<description><![CDATA[UPDATE: hlean 0.1.2 available
I needed a program to find duplicate files in my constantly growing jungle, commonly referred to as a $HOME directory. I also needed a real motivation to sit down and write something in Haskell. After several cups of tea, I realized I could kill both birds with one heavy laser-targetting sniper rifle. [...]]]></description>
			<content:encoded><![CDATA[<p>UPDATE: <a href="http://pithyless.com/blog/2008/05/07/hlean-012/">hlean 0.1.2 available</a></p>
<p>I needed a program to find duplicate files in my constantly growing jungle, commonly referred to as a $HOME directory. I also needed a real motivation to sit down and write something in Haskell. After several cups of tea, I realized I could kill both birds with one heavy laser-targetting sniper rifle. After all, isn&#8217;t that what they say about Haskell: once you can get it to compile, you&#8217;re almost done?</p>
<p><a href="http://pithyless.com/code/hlean.hs">hlean.hs</a> is a command line program that takes any number of directories passed as arguments, recursively find all files, hashes them (defaults to sha256), and asks what to do with any duplicate sets found. It works fine for me, but since this is the first release, there are certainly some rough edges and caveats. Additionally, only you are responsible for your data; use this at your own risk: I cannot be held responsible if your computer blows up in a freak fire accident and coincidentally all the monkeys escape from the zoo.</p>
<p><span id="more-11"></span></p>
<p>Rough edges:</p>
<ul>
<li>All the Haskell hash function libraries I&#8217;ve tried are either too slow or don&#8217;t handle large files very well, hence I was currently forced to use an external command line hashing function.</li>
<li>sha256 is the default command line hash. If you are not running FreeBSD, you will most likely need to modify two functions: hashCommand and hashCommandParse.</li>
<li>Eventually, I will either find a suitable Haskell library or make a more user-friendly configuration setup.</li>
<li>The &#8220;move file&#8221; action does not give the user a nice shell-like directory tab autocomplete. It would be nice to find a Readline prompt that does.</li>
</ul>
<p>Ugliness:</p>
<ul>
<li><strike>I&#8217;ve made a cabal package, but currently the ghc compiled version seg faults. The runhaskell version works perfectly fine, which has left me very confused. I will look into this more when I have the time, but I&#8217;ve uploaded both versions in case someone would like to help me debug the issue.</strike> Fixed in <a href="http://pithyless.com/code/hlean-0.1.2.tar.gz">hlean 0.1.2</a></li>
</ul>
<p>Haskell: <a href="http://pithyless.com/code/hlean.hs">hlean.hs</a><br />
Cabal Package: <a href="http://pithyless.com/code/hlean-0.1.1.tar.gz">hlean-0.1.1.tar.gz</a></p>
<p>Usage:<br />
<code>runhaskell hlean.hs [dirs]</code></p>
<p>Feel free to leave any comments, bug reports, or feature requests.</p>
]]></content:encoded>
			<wfw:commentRss>http://pithyless.com/blog/2008/05/06/hlean-011/feed/</wfw:commentRss>
		</item>
		<item>
		<title>FreeBSD 7.x Installation - Part 2</title>
		<link>http://pithyless.com/blog/2008/05/06/freebsd-7x-installation-part-2/</link>
		<comments>http://pithyless.com/blog/2008/05/06/freebsd-7x-installation-part-2/#comments</comments>
		<pubDate>Tue, 06 May 2008 16:18:05 +0000</pubDate>
		<dc:creator>Norbert</dc:creator>
		
		<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://pithyless.com/blog/?p=8</guid>
		<description><![CDATA[This is the second installment of getting FreeBSD up and running with minimum hassle. Do check out the first part.
In this installment we will setup the firewall, Xorg, and basic multimedia and development ports: all the basic essentials to make use of your desktop machine. The ports list is very skimp on purpose: since there [...]]]></description>
			<content:encoded><![CDATA[<p>This is the second installment of getting FreeBSD up and running with minimum hassle. Do check out the <a href="/blog/2008/05/05/freebsd-7x-installation-part-1/">first part</a>.</p>
<p>In this installment we will setup the firewall, Xorg, and basic multimedia and development ports: all the basic essentials to make use of your desktop machine. The ports list is very skimp on purpose: since there is no way I can think of everything most of us use daily, I&#8217;m not even going to try. But if you can follow along and get this much setup, you will have absolutely no problem finding and installing all the actual applications you can&#8217;t live without.</p>
<p><span id="more-8"></span></p>
<h2>Firewall</h2>
<p>Setup a firewall. I prefer the OpenBSD firewall pf which is also ported to FreeBSD. See also:</p>
<ul>
<li>http://home.nyc.rr.com/computertaijutsu/pf.html</li>
<li>http://www.bgnett.no/~peter/pf/en/long-firewall.html</li>
<li>http://www.openbsd.org/faq/pf/index.html</li>
</ul>
<pre><code>
# vi /etc/rc.conf
  &gt;&gt; pf_enable="YES"                 # Enable PF (load module if required)
  &gt;&gt; pf_rules="/etc/pf.conf"         # rules definition file for pf
  &gt;&gt; pf_flags=""                     # additional flags for pfctl startup
  &gt;&gt; pflog_enable="YES"              # start pflogd(8)
  &gt;&gt; pflog_logfile="/var/log/pflog"  # where pflogd should store the logfile
  &gt;&gt; pflog_flags=""                  # additional flags for pflogd startup

# cp /usr/share/examples/pf/pf.conf $LOCALROOT/etc/
# ln -s $LOCALROOT/etc/pf.conf /etc/
# vi /etc/pf.conf
# /etc/rc.d/pf start
# /etc/rc.d/pflog start
# pfctl -f /etc/pf.conf
</code></pre>
<h2>Xorg</h2>
<p>Install ports:</p>
<ul>
<li>x11/xorg</li>
<li>graphics/dri</li>
<li>graphics/mesa-demos</li>
<li>x11-fonts/urwfonts-ttf</li>
<li>x11/kde3 or x11/gnome2 or x11/xmonad/ or &#8230;</li>
</ul>
<pre><code>
# Xorg -configure
# mv -i /root/xorg.conf.new /etc/X11/xorg.conf
# vi /etc/X11/xorg.conf
  &gt;&gt; Load "freetype"
  &gt;&gt; FontPath     "/usr/X11R6/lib/X11/fonts/urwfonts-ttf"
  &gt;&gt; FontPath     "/usr/local/share/apps/konsole/fonts"
  &gt;&gt; FontPath     "/usr/local/share/fonts/ampspsfont/type1"
  &gt;&gt; FontPath     "/usr/local/share/fonts/cmpsfont/type1"
# vi /usr/local/etc/fonts/local.conf
  &gt;&gt; &lt;dir&gt;/usr/local/share/apps/konsole/fonts&lt;/dir&gt;

# fc-cache -f
# cd /usr/ports/x11-fonts/webfonts
# make WITH_MSLICENSE="YES" install
# make clean
# vi /etc/X11/xorg.conf:
  &gt;&gt; FontPath "/usr/local/lib/X11/fonts/webfonts/"
</code></pre>
<h2>Post-Install</h2>
<p>If you are easily corrupted by power, add yourself to the wheel group.</p>
<pre><code># pw groupmod wheel -m $USER
</code></pre>
<p>Make sure you have the following entry in <code>/etc/fstab</code>:</p>
<pre><code># linproc /compat/linux/proc linprocfs rw 0 0
</code></pre>
<p>For some reason, FreeBSD does not have a cron job to update the locate database. I tend to use this a lot, so I setup a cronjob to run updatedb daily at 4:05:</p>
<pre><code># crontab -e
  &gt;&gt; 5 4 * * * /usr/libexec/locate.updatedb
</code></pre>
<h2>Additional Ports</h2>
<p>Multimedia:</p>
<ul>
<li>audio/amarok</li>
<li>multimedia/mplayer</li>
<li>multimedia/win32-codecs</li>
<li>net-p2p/ktorrent</li>
</ul>
<p>Utilities:</p>
<ul>
<li>security/sudo</li>
<li>sysutils/htop</li>
<li>archivers/unrar</li>
<li>archivers/unzip</li>
</ul>
<p>Development:</p>
<ul>
<li>editors/emacs-devel</li>
<li>lang/python</li>
<li>lang/ghc</li>
<li>devel/darcs</li>
</ul>
<p>Databases:</p>
<ul>
<li>database/postgresql83-server</li>
</ul>
<h2>Comments</h2>
<p>Are there additional steps you like to take with new installations?<br />
Perhaps I&#8217;ve missed something important?</p>
]]></content:encoded>
			<wfw:commentRss>http://pithyless.com/blog/2008/05/06/freebsd-7x-installation-part-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>FreeBSD 7.x Installation - Part 1</title>
		<link>http://pithyless.com/blog/2008/05/05/freebsd-7x-installation-part-1/</link>
		<comments>http://pithyless.com/blog/2008/05/05/freebsd-7x-installation-part-1/#comments</comments>
		<pubDate>Mon, 05 May 2008 12:19:38 +0000</pubDate>
		<dc:creator>Norbert</dc:creator>
		
		<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://pithyless.com/blog/?p=7</guid>
		<description><![CDATA[This will be a quick walk through for installation of a FreeBSD 7.x system.  The idea is to install a minimal system, recompile the base system with optimizations specific to the architecture, and then install all remaining software from ports (ala Gentoo Linux, except you get a stable BSD system :). This is more [...]]]></description>
			<content:encoded><![CDATA[<p>This will be a quick walk through for installation of a FreeBSD 7.x system.  The idea is to install a minimal system, recompile the base system with optimizations specific to the architecture, and then install all remaining software from ports (ala Gentoo Linux, except you get a stable BSD system :). This is more of a checklist for future reference and does not replace the <a href="http://www.freebsd.org/doc/en/books/handbook/">FreeBSD Handbook</a> and relevant man pages.  Without further adieu&#8230; </p>
<p><span id="more-7"></span></p>
<h2>Installation</h2>
<p>Download the latest boot-only iso, md5 checksum the image, and burn to a CD.</p>
<pre><code>ftp://ftp3.freebsd.org/pub/FreeBSD/ISO-IMAGES-i386/
</code></pre>
<p>Booting the installation disk, we will follow the standard installation routine. The installation is fairly straight forward; the only hickup for Linux users may be the partition layout. Linux &#8220;partitions&#8221; are FreeBSD &#8220;slices&#8221;, where the FreeBSD slice is then divided into &#8220;partitions&#8221;. An example partition layout:</p>
<pre><code>/          256 MB
/swap      2048 MB
/usr       *
/var       1000 MB
</code></pre>
<p>If you are stringent with disk space, feel free to ignore the /var partition. It will install under /root and over time you can move large /var/* directories to /usr and symbolically link them back to /var/.</p>
<p>Install the MINIMAL set and avoid installing the ports tree. Reboot the computer, you now have a minimal FreeBSD installation.</p>
<p>Install your favorite shell. You&#8217;re going to be here a while, why suffer?</p>
<pre><code># pkg_add -r zsh
# chsh
</code></pre>
<h2>Base System</h2>
<p>I like to keep all my locally modified files under a separate directory for easy reference and backup. </p>
<pre><code># mkdir /root/local
# export LOCALROOT="/root/local/"
# mkdir $LOCALROOT/etc
# mkdir $LOCALROOT/etc/cvsup
# cp /usr/share/examples/cvsup/stable-supfile $LOCALROOT/etc/cvsup/
# vi $LOCALROOT/etc/cvsup/stable-supfile
    &gt;&gt; *default host=ftp4.freebsd.org
</code></pre>
<p>Tune the make.conf to your system settings.</p>
<pre><code># cp /usr/share/examples/etc/make.conf $LOCALROOT/etc/
# ln -s $LOCALROOT/etc/make.conf /etc/
# vi /etc/make.conf
    &gt;&gt; cputype=pentium4m
    &gt;&gt; cflags= -O2 -fno-strict-aliasing -pipe
    &gt;&gt; coptflags= -O -pipe
</code></pre>
<p>Configure the kernel for the system. Anyone who has had to recompile the Linux kernel will find the FreeBSD process a real treat. It is common practice to use the hostname (all caps), in this example DALI, as the kernel config file.</p>
<pre><code># cd /usr/src
# csup /usr/local/etc/cvsup/stable-supfile
# mkdir /root/kernels
# cp /usr/src/sys/i386/conf/GENERIC /root/kernels/DALI
# ln -s /root/kernels/DALI /usr/src/sys/i386/conf/
# vi /root/kernels/DALI
</code></pre>
<p>See the FreeBSD handbook for <a href="http://www.freebsd.org/doc/en/books/handbook/kernelconfig-config.html">kernel configuration options</a>. Now we can build and install the kernel and base system.</p>
<pre><code># make buildworld
# make buildkernel KERNCONF=DALI
# make installkernel KERNCONF=DALI
# reboot

# mergemaster -p
# make installworld
# mergemaster -iU
# reboot
</code></pre>
<h2>Ports</h2>
<p>Now we will install the ports tree&#8230;</p>
<pre><code> # portsnap fetch
 # portsnap extract
</code></pre>
<p>&#8230; and some essential tools.</p>
<pre><code> # cd /usr/ports/ports-mgmt/portaudit
 # make install clean
 # rehash
 # portaudit -Fda
 # cd /usr/ports/ports-mgmt/portmaster
 # make install clean
 # rehash
</code></pre>
<p>Use <code>portmaster -d pkg_name</code> to install any additional ports. As usual, see the manpage for more info.</p>
<p>You now have a FreeBSD 7.x compiled and tuned for your architecture. In <a href="http://pithyless.com/blog/2008/05/06/freebsd-7x-installation-part-2/">Part 2</a> we will install various ports found on common desktop systems so you can actually get some work done.</p>
]]></content:encoded>
			<wfw:commentRss>http://pithyless.com/blog/2008/05/05/freebsd-7x-installation-part-1/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
