<?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>leoboiko’s computing log</title>
	<atom:link href="http://namakajiri.net/complog/feed/" rel="self" type="application/rss+xml" />
	<link>http://namakajiri.net/complog</link>
	<description>experiences with computers.  updated infrequently.</description>
	<lastBuildDate>Thu, 24 Jun 2010 13:14:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>What a sysadmin does</title>
		<link>http://namakajiri.net/complog/what-a-sysadmin-does/</link>
		<comments>http://namakajiri.net/complog/what-a-sysadmin-does/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 12:39:32 +0000</pubDate>
		<dc:creator>leoboiko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://namakajiri.net/complog/?p=81</guid>
		<description><![CDATA[Being into Humanities now, people often ask me what exactly I do at work.  The best way I found to explain it is through the following Socratic dialog:

— Well, what exactly do you do?

— I make computers work.

— (?) …How do you mean?

— You have used computers, right?

— Yes.

— They often don’t work, right?

— [...]]]></description>
			<content:encoded><![CDATA[<p>Being into Humanities now, people often ask me what exactly I do at work.  The best way I found to explain it is through the following Socratic dialog:</p>

<p>— Well, what exactly do you <em>do</em>?</p>

<p>— I make computers work.</p>

<p>— (?) …How do you mean?</p>

<p>— You have used computers, right?</p>

<p>— Yes.</p>

<p>— They often don’t work, right?</p>

<p>— …Yes.</p>

<p>— Now try to picture what happens when you have about a thousand of those.</p>

<p>— …Oh.</p>
]]></content:encoded>
			<wfw:commentRss>http://namakajiri.net/complog/what-a-sysadmin-does/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Not your teacher’s definition of «layer independence»</title>
		<link>http://namakajiri.net/complog/layer-independence/</link>
		<comments>http://namakajiri.net/complog/layer-independence/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 13:57:11 +0000</pubDate>
		<dc:creator>leoboiko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://namakajiri.net/complog/?p=79</guid>
		<description><![CDATA[
  Even when working at Layer 2, ExtremeWare takes
  advantage of information available at other layers to
  establish and enforce QoS and access control policies.
  Layer-independence means that when an Extreme Networks
  product is routing or switching packets, QoS and access
  control decisions can still be made using criteria [...]]]></description>
			<content:encoded><![CDATA[<blockquote>
  <p>Even when working at Layer 2, ExtremeWare takes
  advantage of information available at other layers to
  establish and enforce QoS and access control policies.
  Layer-independence means that when an Extreme Networks
  product is routing or switching packets, QoS and access
  control decisions can still be made using criteria pulled from
  Layers 1–4 or from other sources.</p>
</blockquote>

<p>(Source: «Extreme Networks Technical Brief: ExtremeWare Operating System»)</p>
]]></content:encoded>
			<wfw:commentRss>http://namakajiri.net/complog/layer-independence/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wanderlust and imapfilter</title>
		<link>http://namakajiri.net/complog/wanderlust-and-imapfilter/</link>
		<comments>http://namakajiri.net/complog/wanderlust-and-imapfilter/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 12:57:15 +0000</pubDate>
		<dc:creator>leoboiko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://namakajiri.net/complog/?p=71</guid>
		<description><![CDATA[Wanderlust (wl) is the best IMAP MUA I’ve ever found.  However, it takes too long to filter (“refile”) server-side messages.  I wonder if it tries to download them to search?

This problem is even more annoying because wl is an Emacs application, and the Emacs OS lacks multitasking (they tell me that’s because it [...]]]></description>
			<content:encoded><![CDATA[<p>Wanderlust (wl) is the best IMAP MUA I’ve ever found.  However, it takes too long to filter (“refile”) server-side messages.  I wonder if it tries to download them to search?</p>

<p>This problem is even more annoying because wl is an Emacs application, and the Emacs OS lacks multitasking (they tell me that’s because it lacks closures, and <em>that</em> is because its flavour of Lisp uses dynamic scoping, and that’s hard to change).  So your whole OS stays blocked while wl filter your messages.</p>

<p>This same issue killed any hope of a pure-Emacs web browser (like w3).  People have circumvented it by calling external, non-Emacs applications, which can run asynchronously thanks to the host OS (like w3m-el).</p>

<p>You can do the same to organize IMAP mailboxes with this nifty little program called <a href="http://imapfilter.hellug.gr/">imapfilter</a>.  It uses Lua for configuration and knows how to filter efficiently, by asking the <em>server</em> to match patterns and move messages.  It only deals with message IDs.  The thing is so fast, it’s usually done almost instantaneously.</p>

<p>Here’s how to hook up imapfilter to wl:</p>

<pre><code>  ;; on your wl configuration file, or wherever you keep this stuff
  (when (and (file-readable-p "~/.imapfilter/config.lua")
             (executable-find "imapfilter"))
    (eval-after-load 'wl
      '(add-to-list 'wl-folder-check-entity-pre-hook
                    (lambda ()
                      (message "calling imapfilter…")
                      (if (eq (call-process "imapfilter") 0)
                          (message "imapfilter ran fine.")
                        (message "error running imapfilter!"))))))
</code></pre>

<p>I use the <code>when</code> condition for robustness, because I copy my emacs conffiles to several machines.  The <code>eval-after-load</code> prevents startup delay.  The meat of it is the <code>add-to-list</code> hook, which will cause imapfilter to be called whenever you synchronize folders (key <code>s</code> on folder view).</p>
]]></content:encoded>
			<wfw:commentRss>http://namakajiri.net/complog/wanderlust-and-imapfilter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A couple things you should never do in technical writing</title>
		<link>http://namakajiri.net/complog/a-couple-things-you-should-never-do-in-technical-writing/</link>
		<comments>http://namakajiri.net/complog/a-couple-things-you-should-never-do-in-technical-writing/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 16:42:49 +0000</pubDate>
		<dc:creator>leoboiko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://namakajiri.net/complog/?p=58</guid>
		<description><![CDATA[
Be condescending.
Be self-congratulatory.


Condescension

A typical software example is “The System can frobnicate, twiddle, and twirl, but don’t worry, you can do it all very easily with the new System Icons!”  When you say “we made it easy” what you really mean is “We think you users are stupid, so in Our infinite wisdom we graced [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li>Be condescending.</li>
<li>Be self-congratulatory.</li>
</ol>

<h4>Condescension</h4>

<p>A typical software example is “<em>The System can frobnicate, twiddle, and twirl, but don’t worry, you can do it all very easily with the new System Icons!</em>”  When you say “we made it easy” what you really mean is “We think you users are stupid, so in Our infinite wisdom we graced thee with operations so simple even a caveman would understand”.  Another example of condescension are most uses of the words  “trivial”, “obvious” and “clearly” in math texts.</p>

<p>There is such a thing as natural complexity, but bad writing and bad design are much more common.  Don’t blame the readers for your bad writing, and don’t blame the users for your bad design.  If you can afford, hire a real editor and a real UI designer to fix them.  If you can’t, well, then <em>don’t blame your clients</em>!</p>

<h4>Self-congratulation</h4>

<p>“<em>The System was brought to you by the Department of Systemic Systematization, under the kind patronage of the University of Systems Research.  It is provided free of charge to the public in the USR’s mission to help education as part of our social responsibility program that</em>” etc. etc. etc.  Self-congratulation is not offensive like condescension, but it’s still annoying and useless.  It violates the first commandment of technical writing: Thou Shall Not Waste Words.  The reader opened your manual to learn how to use the system, not to learn how amazing you are.</p>

<p>Often self-congratulatory sections are written against the will of the author, due to some kind of political pressure.  If you’re a writer in this situation, see if you can tuck it politely out of the way, in the last section or as small print.</p>
]]></content:encoded>
			<wfw:commentRss>http://namakajiri.net/complog/a-couple-things-you-should-never-do-in-technical-writing/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>A manifesto for natural webdesign</title>
		<link>http://namakajiri.net/complog/a-manifesto-for-natural-webdesign/</link>
		<comments>http://namakajiri.net/complog/a-manifesto-for-natural-webdesign/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 16:43:14 +0000</pubDate>
		<dc:creator>leoboiko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://namakajiri.net/complog/?p=55</guid>
		<description><![CDATA[A new version of my webdesign manifesto is out.  This is an attempt to document my design approach (also, it’s in itself an example of it).
]]></description>
			<content:encoded><![CDATA[<p><a href="http://namakajiri.net/writings/webdesign-manifesto">A new version of my webdesign manifesto is out</a>.  This is an attempt to document my design approach (also, it’s in itself an example of it).</p>
]]></content:encoded>
			<wfw:commentRss>http://namakajiri.net/complog/a-manifesto-for-natural-webdesign/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>XHTML vs. HTML vs. MSIE; or, content-negotiation woes</title>
		<link>http://namakajiri.net/complog/xhtml-vs-html-vs-msie/</link>
		<comments>http://namakajiri.net/complog/xhtml-vs-html-vs-msie/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 17:02:02 +0000</pubDate>
		<dc:creator>leoboiko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://namakajiri.net/complog/?p=41</guid>
		<description><![CDATA[&#8220;See, I like mah HTML in the raw.  No sissy &#8216;editors&#8217; or fancy-ass &#8216;templates&#8217; for me, no sir.  Gimme good old Emacs&#8217; with an nxml-mode on the rocks like God wanted it.  I write proper Appendix C–compliant XHTML 1.0  and the redfaces serve it and all is well.&#8221;

&#8220;Ah, but you see, [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;See, I like mah HTML in the raw.  No sissy &#8216;editors&#8217; or fancy-ass &#8216;templates&#8217; for me, no sir.  Gimme good old Emacs&#8217; with an nxml-mode on the rocks like God wanted it.  I write proper <a href="http://www.w3.org/TR/xhtml1/#guidelines">Appendix C</a>–compliant XHTML 1.0  and the redfaces serve it and all is well.&#8221;</p>

<p>&#8220;Ah, but you see, friend, <a href="http://hixie.ch/advocacy/xhtml">Appendix C sucks</a>.  Verily I say, if thou sendest them XHTMLs as <code>text/html</code>, then they&#8217;ll be tag-souped, so there&#8217;s no point.  Thou might as well write the plainest HTML.&#8221;</p>

<p>Word.  And further, I hate composing Appendix C code! I hate having to duplicate <code>id</code> and <code>name</code> and <code>lang</code> and <code>xml:lang</code> and I hate those lame spaces before slashes.  It just defeats the purpose of choosing XHTML as the shorter format.</p>

<p>Way back then, when I still thought XML was a good idea, I decided to solve this with content negotiation and XSL.  I wrote <a href="http://namakajiri.net/code/xhtml2html.xsl">this stylesheet</a> to convert XHTML 1.1 to HTML 4.01.</p>

<p><span id="more-41"></span></p>

<pre><code>sabcmd xhtml2html.xsl eatsquaredonuts.xhtml eatsquaredonuts.html
</code></pre>

<p>With some help from <code>make(1)</code>, I can write pretty, succinct, non-appendixized XHTML 1.1 and automatically create HTML from it.</p>

<p>Now what? Well, I gotta tell Apache to send XHTML to browsers that support it, and HTML to others.  A first attempt could go</p>

<pre><code>Options +MultiViews
AddType application/xhtml+xml;charset=UTF-8 .xhtml
AddType text/html;charset=UTF-8 .html
</code></pre>

<p>Then, instead of making links to <code>/eatsquaredonuts.html</code> or <code>.xhtml</code>, you simply use the URI <code>/eatsquaredonuts</code>.  Each request, Apache will have a seat with the browser and they&#8217;ll decide politely what version (&#8220;representation&#8221;) to send.</p>

<p>Looks great, but when I try a stock, run-of-the-mill Firefox, I get the HTML version.  That&#8217;s not so bad, but you know, the XHTML version is <em>sexier</em>.  I&#8217;m using this for my resume, for devil&#8217;s sake; how am I supposed to impress the guys at Canonical with boring old HTML? I need a job, Firefox.  Just what <em>are</em> you asking Apache in those private conversations, don Firefox?</p>

<pre><code>Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
</code></pre>

<p>Ah, see, Firefox say it will accept HTML and XHTML equally well.  If neither is available, it will take <code>application/xml</code>, and if even that isn&#8217;t in the menu it will make do with anything (<code>*/*</code>).  The order is controlled by the <code>q</code> parameter; it&#8217;s an implied 1 if omitted, so Firefox is leaving the choice to Apache, and Apache chooses HTML (perhaps because Firefox mentioned it earlier —I guess old Apache is a lazy man).</p>

<p>Is there a way to tell Apache to prefer XHTML in case of ties? It&#8217;s not clear from the docs, but turns out there is:</p>

<pre><code>AddType application/xhtml+xml;charset=UTF-8;qs=1 .xhtml
AddType text/html;charset=UTF-8;qs=0.99 .html
</code></pre>

<p>Now Firefox does get my beautiful, precious XHTML, and non-XHTML browsers shouldn&#8217;t even see it (since it won&#8217;t be in their Accept headers).  You know just <em>who</em> am I talking about, right? Let&#8217;s test:</p>

<blockquote>
  <p><strong>Internet Explorer can&#8217;t download blahblahblah.</strong></p>
  
  <p>Internet Explorer could not open this site blahblablah not available or could not be found blahblahblah.</p>
</blockquote>

<p>wat.</p>

<p>I get it, this message means HUURRR IM A BROWZZARR WHATS THIS XML THINGIE HUUURRR.  But why is Apache sending XHTML in the first place? What is the browser asking Apache?</p>

<pre><code>Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*
</code></pre>

<p style="text-align: center;">*&nbsp;*&nbsp;*</p>

<p>There&#8217;s no <code>text/html</code>.</p>

<p>This is a web browser, and there is no <code>text/html</code>.</p>

<p>It relies in the order to decide content instead of <code>q</code> parameters, and has a <code>*/*</code> at the end, and <em>there is no <code>text/html</code></em>.</p>

<p style="text-align: center;">*&nbsp;*&nbsp;*</p>

<p>MSIE, the Bane of the Internet.  MSIE, the Breaker of Standards.  MSIE, the Blight of Developers.</p>

<p style="text-align: center;">*&nbsp;*&nbsp;*</p>

<p>Because of MSIE, even our first attempt isn&#8217;t safe.  We&#8217;re forced to tell Apache to resolve ties in HTML&#8217;s favor:</p>

<pre><code>AddType application/xhtml+xml;charset=UTF-8;qs=0.99 .xhtml
AddType text/html;charset=UTF-8;qs=1 .html
</code></pre>

<p>As far as I can tell, the only way to get Firefox to see XHTML without choking MSIE would be some very convoluted new configuration option to Apache.  I&#8217;d have to tell Apache, &#8220;if <code>text/html</code> and <code>application/xhtml+xml</code> tie, then choose XHTML, <strong>except</strong> if they&#8217;re tying in a <code>*/*</code> because the browser didn&#8217;t even ask for HTML, in which case you should send HTML&#8221;.  I&#8217;m not sure I even want to ask this feature.  I wouldn&#8217;t know what to call it.</p>

<p style="text-align: center;">*&nbsp;*&nbsp;*</p>

<p>The solution, I guess, will be to wait for HTML 5 to turn this dispute academic.  See you in 2022…</p>
]]></content:encoded>
			<wfw:commentRss>http://namakajiri.net/complog/xhtml-vs-html-vs-msie/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Geotag your photos easily from the shell</title>
		<link>http://namakajiri.net/complog/geotag-your-photos/</link>
		<comments>http://namakajiri.net/complog/geotag-your-photos/#comments</comments>
		<pubDate>Tue, 05 Aug 2008 21:42:17 +0000</pubDate>
		<dc:creator>leoboiko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://namakajiri.net/complog/geotag-your-photos-easily-from-the-shell/</guid>
		<description><![CDATA[http://namakajiri.net/code/geotag-exif

This is a simple wrapper over exiftool (debian/ubuntu: in package libimage-exiftool-perl) to make it easy to set EXIF geographic information (GPS tags).  It is able to understand the decimal format for latitude/longitude that you can get from google maps, wikimapia etc.

With exiftool:

  exiftool \
      -GPSLatitudeRef=South \
   [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://namakajiri.net/code/geotag-exif">http://namakajiri.net/code/geotag-exif</a></p>

<p>This is a simple wrapper over exiftool (debian/ubuntu: in package <samp>libimage-exiftool-perl</samp>) to make it easy to set EXIF geographic information (GPS tags).  It is able to understand the decimal format for latitude/longitude that you can get from <a href="http://maps.google.com">google maps</a>, <a href="http://wikimapia.org">wikimapia</a> etc.</p>

<p>With <kbd>exiftool</kbd>:</p>

<pre><kbd>  exiftool \
      -GPSLatitudeRef=South \
      -GPSLatitude=23.88 \
      -GPSLongitudeRef=West \
      -GPSLongitude=49.81 \
      pic.jpeg</kbd></pre>

<p>With <kbd>geotag-exif</kbd>:</p>

<pre><kbd>  geotag-exif pic.jpeg -23.88 -49.81</kbd></pre>

<p>It won’t touch your EXIF tags other than the GPS tags and the <samp>FileLastModified</samp> timestamp.</p>
]]></content:encoded>
			<wfw:commentRss>http://namakajiri.net/complog/geotag-your-photos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My entry for the Rubygame Weekend Contest #2: a roguelike in Scheme</title>
		<link>http://namakajiri.net/complog/rubygame-weekend-contest-2/</link>
		<comments>http://namakajiri.net/complog/rubygame-weekend-contest-2/#comments</comments>
		<pubDate>Mon, 28 Jul 2008 18:31:52 +0000</pubDate>
		<dc:creator>leoboiko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://namakajiri.net/complog/my-entry-for-the-rubygame-weekend-contest-2-a-roguelike-in-scheme/</guid>
		<description><![CDATA[Joining the contest was a lot of fun, and I highly recommend these weekend events to anyone who wants to learn how to write games.  With the trick of a short time span to motivate yourself and lots of experienced guys on IRC focused in much the same tasks as you, this was more [...]]]></description>
			<content:encoded><![CDATA[<p>Joining <a href="http://www.rubygameforums.com/viewtopic.php?f=10&amp;t=51&amp;sid=d3252e4c1d993848312b8883536c6d91">the contest</a> was a lot of fun, and I highly recommend these weekend events to anyone who wants to learn how to write games.  With the trick of a short time span to motivate yourself and lots of experienced guys on IRC focused in much the same tasks as you, this was more educative than months of reading tutorials.</p>

<p>The theme was “opposites”, and I’m interested in simulations, so my game idea was of an alien world with two complementary species.  When pranjos die they create plants that are the source of food for bluos, and vice-versa.  But these animals are not very adept at surviving, and their populations are threatened: oranjos are lazy and don’t explore much, so they starve to death without finding food; and bluos are timid and breed too seldom.  As a space biologist, it’s your task to throw oranjos and bluos around to increase their numbers.</p>

<p>At least that was the idea.</p>

<p>[feed readers: continue to postmortem and screenshots…]
<span id="more-35"></span></p>

<h4>Structured procrastination rules</h4>

<p>For some reason, working in this game made me <em>very</em> motivated to act on another idea I had for ages: a <a href="http://en.wikipedia.org/wiki/Console_application">console</a> <a href="http://en.wikipedia.org/wiki/Roguelike">roguelike</a> using Japanese kanji and other Unicode characters.  I made a few attempts at writing games in the past, but all came to naught.  It’s hard to admit, but looking back, I think I simply lacked the experience and knowledge to finish one.  I had no idea of how to write the essential basics, like how to model game objects and the world and where exactly to put their attributes and methods (should an object’s position be stored in the object itself, or in the world object? Who handles collision detection? Sight? Viewport scrolling reactions to object-induced events?).  My math and geometry skills are rusty, and you need them like ALL THE TIME — even in 2D or console games — for such basic tasks as collision detection, proximity, line of sight, and so on.  Trying to write games without paying enough attention to these topics confused me, and I’d interpret that feeling as “laziness” and stop coding.</p>

<p>So getting Maggaworld to do something was amazing, even if the “something” I did is only a bunch of oranjos walking over a single screen, getting older, breeding, and starving to death (which would be much more interesting had I draw more than three frames of animation).  I didn’t make no plants, no bluos, no player, no real world with scrolling and uneven terrain.  I actually only worked in Friday night and through the Saturday afternoon; then I got an irresistible urge to hack Makai・Jukai (the roguelike) — which I did in perfect flow until some ~800 lines of scheme mid-Monday, when I grudgingly teared myself away from home to, you know, work.</p>

<p><img src="/pics/screenshots/maggaworld.png" width="640" height="480" title="a world without food sucks…" alt="screenshot of early maggaworld" style="border: thin dashed black;" /></p>

<h4>Maggaworld postmortem and links</h4>

<p>The most costly decision was to use <a href="http://www.slembcke.net/photos/v/programming/chipmunk">Chipmunk</a>, that amazing 2D physics simulation library which IMHO indie developers don’t pay enough attention to.  The demos are so cool, and I though I’d avoid calculating collision detection and gravity, but boy what a price to pay.  80% of the time I spent with Maggaworld wasn’t on the game itself, it was getting my head around the most basic principles of Chipmunk — it’s way too powerful for what I had in mind.  In fact, I often had to learn concepts only to disable them, like setting the angular momentum of bodies to infinity to prevent rotation.  In my first few attempts, I made the Shape definitions all wrong and the oranjos would just fall through the floor =D I ended up coding a <a href="http://namakajiri.net/code/falling_squares.rb">falling squares demo</a> to teach myself, and only then managed to get Maggaworld working.  I documented the demo and hope it’ll be useful for other Gosu + Chipmunk users.  If you’re also new to game coding and want to use Chipmunk in a weekend contest, I suggest writing some demos yourself <em>before</em> the start!</p>

<p><img src="/pics/screenshots/falling-squares.png" width="640" height="480" title="greenness represent elasticity! bounce, falling squares!" alt="screenshot of falling squares ruby+chipmunk demo" style="border: thin dashed black;" /></p>

<p>If Chipmunk’s complex (by necessity), Gosu is a pleasure.  It’s a very ruby-like, convenient high-level library that <em>makes sense</em>; it’s how I wished SDL was when I first tried it.  A shame neither Gosu nor Chipmunk are packaged in Debian yet (or in rubygems, for that matter).</p>

<p>Writing games is a lot of work! I seriously overestimated how much I could chew; the art alone took several hours (yes, those three 32&#215;32 childlike sprites took all that time!).  I stated that my goal with the contest was not winning but finishing <em>something</em>; at the end of the weekend I failed, but in another sense it was a big personal success — my ideas for how to code Makai・Jukai are coming to reality nicely, and I haven’t given up Maggaworld either (though I’ll probably add the missing elements at a leisure pace).  I even forced myself to come out of the closet this time: there’s a <a href="http://rubyforge.org/projects/maggaworld">rubyforge page for Maggaworld</a> now, and a git repository for Makai・Jukai is available in my site at <code>http://namakajiri.net/code/git/makai</code>.  I welcome input from anyone interested, and thanks all the people who kept up with my questions in freenode =D I’m totally joining the next contest!</p>

<p><img src="/pics/screenshots/makai.png" width="640" height="480" title="I’m coding scheme♪" alt="screenshot of early makaijukai" style="border: thin dashed black;" /></p>
]]></content:encoded>
			<wfw:commentRss>http://namakajiri.net/complog/rubygame-weekend-contest-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Python irclib’s privmsg isn’t actually privmsg</title>
		<link>http://namakajiri.net/complog/python-irclibs-privmsg-isnt-actually-privmsg/</link>
		<comments>http://namakajiri.net/complog/python-irclibs-privmsg-isnt-actually-privmsg/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 18:21:49 +0000</pubDate>
		<dc:creator>leoboiko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://namakajiri.net/complog/python-irclib%e2%80%99s-privmsg-isn%e2%80%99t-actually-privmsg/</guid>
		<description><![CDATA[I guess irclib is kinda green, but anyway.  I was writing a bot and was very confused with its AddPrivMsgRoute and AddPubMsgRoute methods.  I’m noob to IRC, so I had to browse the RFC to be sure: in IRC, “privmsg” is the command to send messages to users and channels.  And in [...]]]></description>
			<content:encoded><![CDATA[<p>I guess <a href="http://python-irclib.sourceforge.net/">irclib</a> is kinda green, but anyway.  I was writing a bot and was very confused with its <code>AddPrivMsgRoute</code> and <code>AddPubMsgRoute</code> methods.  I’m noob to IRC, so I had to browse the RFC to be sure: in IRC, “privmsg” is the command to send messages to users <em>and</em> channels.  And in IRC, there’s no “pubmsg”.  In irclib, a “privmsg” is a message destined to you (the bot user), and a “pubmsg” is a message destined to the channel in which you’re on. So, irc.privmsg = { irclib.privmsg, irclib.pubmsg }.  The distinction irclib wants to make is useful, but the choice of terminology confused the hell out of me :D</p>

<p>While I’m at it: to respect the RFC, make sure your bots send messages with <code>client.connection.notice</code> and not <code>client.connection.privmsg</code> like many do.  <code>/notice</code> is the same as <code>/privmsg</code> (aka <code>/msg</code> in most clients), only  automated citizens ignore it.  That prevents infinite loops, like the one I often trap myself with when talking to bitlbee’s root user:</p>

<pre><code>   &lt;leoboiko&gt; root: yes
   &lt;root&gt; Did I ask you something?
   &lt;leoboiko&gt; root: yes
   &lt;root&gt; Did I ask you something?
   &lt;leoboiko&gt; root: yes
   &lt;root&gt; Did I ask you something?
   &lt;leoboiko&gt; root: yes
   &lt;root&gt; Did I ask you something?
   &lt;leoboiko&gt; root: yes
   &lt;root&gt; Did I ask you something?
   […]
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://namakajiri.net/complog/python-irclibs-privmsg-isnt-actually-privmsg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to learn computing^W^W^W Ten books I like</title>
		<link>http://namakajiri.net/complog/ten-books-i-like/</link>
		<comments>http://namakajiri.net/complog/ten-books-i-like/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 12:07:15 +0000</pubDate>
		<dc:creator>leoboiko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://namakajiri.net/complog/how-to-learn-computingwww-ten-books-i-like/</guid>
		<description><![CDATA[Meme du jour: ten books about computing.  I think the meme’s name is misleading.  To “learn computing” one has to keep in mind that:


It takes ten years.  For real.
Books are necessary but not sufficient.  You have to program, to read good programs, and to read bad programs.
Computing ≠ computers ≠ programming. [...]]]></description>
			<content:encoded><![CDATA[<p>Meme du jour: <a href="http://www.ricbit.com/2008/06/como-aprender-computao.html" hreflang="pt-br">ten books about computing</a>.  I think the meme’s name is misleading.  To “learn computing” one has to keep in mind that:</p>

<ul>
<li><a href="http://norvig.com/21-days.html">It takes ten years</a>.  For real.</li>
<li>Books are necessary but not sufficient.  You have to program, to read good programs, and to read bad programs.</li>
<li>Computing ≠ computers ≠ programming. </li>
</ul>

<p>But, FWIW, my ten books:</p>

<ul>
<li><a href="http://books.google.com/books?id=aFcsnUEewLkC&amp;dq=godel+escher+bach&amp;ei=6m1gSMGPIYHAigHU0fmXDA">GEB</a>, for the same reason ricbit suggested: if you don’t like reading it, you won’t like computing (good one ricbit!)</li>
<li><a href="http://openbookproject.net/thinkCSpy/index.xhtml" hreflang="en">How to think like a computer scientist: Learning with Python</a>.  If needed, google for python tutorials to help.</li>
<li><a href="http://www.brpreiss.com/books/opus7/">Data Structures and Algorithms in Python</a> or any other algorithms book.  Being python, this one has the advantage of succinctness.</li>
<li><a href="http://mitpress.mit.edu/sicp/full-text/book/book.html">Structure and Interpretation of Computer Programs</a> as the first computing book for adults.  Ask help ;)  Related reading: <a href="http://www.ccs.neu.edu/home/matthias/BTLS/">The little schemer</a> &amp; <a href="http://www.ccs.neu.edu/home/matthias/BTSS">The reasoned schemer</a>.</li>
<li><a href="http://www.amazon.com/Concrete-Mathematics-Foundation-Computer-Science/dp/0201558025">Concrete mathematics</a>: now we’re talking seriously.  If I have to choose one math book for computer scientists, this gotta be the one.</li>
<li><a href="http://www.amazon.com/Computer-Architecture-Quantitative-Approach-Kaufmann/dp/1558605967">Computer architecture: a quantitative approach</a>.  It’s good to know a bit about computers.</li>
<li><a href="http://cm.bell-labs.com/cm/cs/cbook/">The C Programming Language</a>, by the authors of C.  This wonderfully-written little book is the antidote to Java and C++ behemots.  Read with the architecture book to learn to deal with memory.</li>
<li><a href="http://aima.cs.berkeley.edu/">Artificial Intelligence: A Modern Approach</a>: Best intro to AI evar.  AI techniques will do wonders to enlarge your horizons as a computing guy, and then you can enlarge them even more with…</li>
<li><a href="http://www.amazon.com/Probability-Computing-Randomized-Algorithms-Probabilistic/dp/0521835402/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1214394135&amp;sr=1-1">Probability and Computing: Randomized Algorithms and Probabilistic Analysis</a>.  Who said the best algorithms are deterministic?</li>
<li>And <a href="http://www.amazon.com/Practice-Programming-Addison-Wesley-Professional-Computing/dp/020161586X/ref=pd_sim_b_2">The practice of programming</a>, to polish your <a href="http://paulgraham.com/taste.html">taste</a>.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://namakajiri.net/complog/ten-books-i-like/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sometimes I do it too</title>
		<link>http://namakajiri.net/complog/sometimes-i-do-it-too/</link>
		<comments>http://namakajiri.net/complog/sometimes-i-do-it-too/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 19:19:43 +0000</pubDate>
		<dc:creator>leoboiko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://namakajiri.net/complog/sometimes-i-do-it-too/</guid>
		<description><![CDATA[
  &#60;jtg&#62; Stupid python doesn&#8217;t have &#8220;resume&#8221; or whatever it&#8217;s called in ruby during a try&#8230;except clause.
  &#60;shc_&#62; sigh
  &#60;leoboiko-onduty&#62; implement it with continuations
  &#60;leoboiko-onduty&#62; OH WAIT IT DOESN&#8217;T HAVE THEM EITHER
  &#60;leoboiko-onduty&#62; &#60;/troll&#62;

]]></description>
			<content:encoded><![CDATA[<blockquote>
  <p>&lt;jtg&gt; Stupid python doesn&#8217;t have &#8220;resume&#8221; or whatever it&#8217;s called in ruby during a try&#8230;except clause.<br />
  &lt;shc_&gt; sigh<br />
  &lt;leoboiko-onduty&gt; implement it with continuations<br />
  &lt;leoboiko-onduty&gt; OH WAIT IT DOESN&#8217;T HAVE THEM EITHER<br />
  &lt;leoboiko-onduty&gt; &lt;/troll&gt;</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://namakajiri.net/complog/sometimes-i-do-it-too/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>watch-encomenda.sh: hack feio pra automatizar tracking de encomendas dos correios</title>
		<link>http://namakajiri.net/complog/watch-encomenda-sh/</link>
		<comments>http://namakajiri.net/complog/watch-encomenda-sh/#comments</comments>
		<pubDate>Mon, 02 Jun 2008 21:15:55 +0000</pubDate>
		<dc:creator>leoboiko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://namakajiri.net/complog/watch-encomendash-hack-feio-pra-automatizar-tracking-the-encomendas-dos-correios/</guid>
		<description><![CDATA[
Irritado que o tracking dos correios não tem feed?
Amargo porque acha que nunca vão fazer um?
Cansado de apertar Ctrl+R no Firefox e dizer que sim, você quer reenviar os dados POST?
Seus pobremas acabaram!!
watch-encomenda.sh
]]></description>
			<content:encoded><![CDATA[<div lang="pt-br" xml:lang="pt-br">
<p>Irritado que o tracking dos correios não tem feed?</p>
<p>Amargo porque acha que nunca vão fazer um?</p>
<p>Cansado de apertar Ctrl+R no Firefox e dizer que sim, você quer reenviar os dados POST?</p>
<p>Seus pobremas acabaram!!</p>
<p><a href="/code/watch-encomenda.sh">watch-encomenda.sh</a></p>
<p><img src="/pics/nonfree/new.png" width="186" height=115" alt="now slower and with more bugs!" title=""/><strong>New:</strong> suporte experimental a encomendas internacionals! (thx ademar)
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://namakajiri.net/complog/watch-encomenda-sh/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Of interest to UI designers:</title>
		<link>http://namakajiri.net/complog/of-interest-to-ui-designers/</link>
		<comments>http://namakajiri.net/complog/of-interest-to-ui-designers/#comments</comments>
		<pubDate>Tue, 20 May 2008 02:17:45 +0000</pubDate>
		<dc:creator>leoboiko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://namakajiri.net/complog/of-interest-to-ui-designers/</guid>
		<description><![CDATA[
  Why do variable resistors come with nonlinear tapers? Well, as it turns out,
  human physiology has a weird way of perceiving changes in signal intensity, such as
  sound and light intensities. For example, you may think that if you doubled the
  intensity of sound or light, you would perceive a [...]]]></description>
			<content:encoded><![CDATA[<blockquote>
  <p>Why do variable resistors come with nonlinear tapers? Well, as it turns out,
  human physiology has a weird way of perceiving changes in signal intensity, such as
  sound and light intensities. For example, you may think that if you doubled the
  intensity of sound or light, you would perceive a doubling in sound and light. Unfortunately—at least in terms of intuition (not in terms of safety control for our brains)—humans do not work this way. In fact, our perceptions of sight and sound work as
  follows: Perceived loudness/brightness is proportional to log<sub>10</sub> (actual intensity measured with a nonhuman instrument). Thus, if you are building an amplifier for a set
  of speakers or building a home light-dimming circuit, it would be wise to use a variable resistor with a nonlinear taper.</p>
</blockquote>

<p>(From: <em>Practical Electronics for Inventors</em>, Paul Schers)</p>
]]></content:encoded>
			<wfw:commentRss>http://namakajiri.net/complog/of-interest-to-ui-designers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>In the Land of vexcorp.com Where the Shadows Lie</title>
		<link>http://namakajiri.net/complog/in-the-land-of-vexcorpcom-where-the-shadows-lie/</link>
		<comments>http://namakajiri.net/complog/in-the-land-of-vexcorpcom-where-the-shadows-lie/#comments</comments>
		<pubDate>Sun, 20 Apr 2008 13:52:27 +0000</pubDate>
		<dc:creator>leoboiko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[lotr]]></category>
		<category><![CDATA[vex]]></category>

		<guid isPermaLink="false">http://namakajiri.net/complog/in-the-land-of-vexcorpcom-where-the-shadows-lie/</guid>
		<description><![CDATA[ping secure.vexcorp.com
    PING smeagol.vexcorp.com (200.160.255.84) 56(84) bytes of data.


Wait.

&#62; PING smeagol.vexcorp.com (200.160.255.84)
&#62; smeagol.vexcorp.com
&#62; smeagol


Oooh!

for i in aragorn gandalf frodo sam sauron melkor morgoth eru saruman balrog nazgul gollum; do
  host $i.vexcorp.com
  done&#124;grep -v 'not found'
    gandalf.vexcorp.com has address 200.187.151.90
    sauron.vexcorp.com has address 200.160.255.100
  [...]]]></description>
			<content:encoded><![CDATA[<pre><code>ping secure.vexcorp.com
    PING smeagol.vexcorp.com (200.160.255.84) 56(84) bytes of data.
</code></pre>

<p>Wait.</p>

<pre><code>&gt; PING smeagol.vexcorp.com (200.160.255.84)
&gt; smeagol.vexcorp.com
&gt; smeagol
</code></pre>

<p>Oooh!</p>

<pre><code>for i in aragorn gandalf frodo sam sauron melkor morgoth eru saruman balrog nazgul gollum; do
  host $i.vexcorp.com
  done|grep -v 'not found'
    gandalf.vexcorp.com has address 200.187.151.90
    sauron.vexcorp.com has address 200.160.255.100
    morgoth.vexcorp.com has address 200.160.255.101
    balrog.vexcorp.com has address 200.160.255.86
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://namakajiri.net/complog/in-the-land-of-vexcorpcom-where-the-shadows-lie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What’s the difference between /var/log/messages and /var/log/syslog?</title>
		<link>http://namakajiri.net/complog/the-difference-between-messages-and-syslog/</link>
		<comments>http://namakajiri.net/complog/the-difference-between-messages-and-syslog/#comments</comments>
		<pubDate>Sat, 19 Apr 2008 17:41:32 +0000</pubDate>
		<dc:creator>leoboiko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[syslog]]></category>

		<guid isPermaLink="false">http://namakajiri.net/complog/the-difference-between-messages-and-syslog/</guid>
		<description><![CDATA[This is very embarrassing, but to this day I’ve never payed attention to the semantics of these two files.  When I wanted to look at something, I’d just grep /var/log/*.

Turns out the log files are just a convention spelled out in /etc/syslog.conf (read syslog(3) and syslog.conf(5) if you don’t know syslog).  These are [...]]]></description>
			<content:encoded><![CDATA[<p>This is very embarrassing, but to this day I’ve never payed attention to the semantics of these two files.  When I wanted to look at something, I’d just grep <code>/var/log/*</code>.</p>

<p>Turns out the log files are just a convention spelled out in <code>/etc/syslog.conf</code> (read <code>syslog(3)</code> and <code>syslog.conf(5)</code> if you don’t know syslog).  These are the relevant lines in Debian defaults:</p>

<pre><code>*.*;auth,authpriv.none      -/var/log/syslog

*.=info;*.=notice;*.=warn;\
    auth,authpriv.none;\
    cron,daemon.none;\
    mail,news.none      -/var/log/messages
</code></pre>

<p>The first line means: send all classes of messages (“facilities”) to <code>/var/log/syslog</code>, <em>except</em> the auth and authpriv facilities — these are sent to <code>/var/log/auth.log</code> instead (“auth” is just the deprecated name of “authpriv”).</p>

<p>The second line means: send all messages exactly at the levels of “info”, “notice”, and “warn” to <code>/var/log/messages</code>, <em>except</em> those from the listed facilities.</p>

<p>So <code>/var/log/messages</code> ⊂ <code>/var/log/syslog</code>; and, further, <code>messages</code> only contains generic non-critical messages.  I have no idea why people use that, but there you go.  If you want a complete log, you should look at <code>/var/log/syslog</code> and <code>/var/log/auth.log</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://namakajiri.net/complog/the-difference-between-messages-and-syslog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IM activity patterns</title>
		<link>http://namakajiri.net/complog/im-activity-patterns/</link>
		<comments>http://namakajiri.net/complog/im-activity-patterns/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 18:18:51 +0000</pubDate>
		<dc:creator>leoboiko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[badanalogies]]></category>
		<category><![CDATA[im]]></category>
		<category><![CDATA[travel]]></category>

		<guid isPermaLink="false">http://namakajiri.net/complog/im-activity-patterns/</guid>
		<description><![CDATA[One thing I noticed in my first international trip is that people who hang in Google Talk, ICQ, MSN, or IRQ have activity patterns based on the time of the day, just like animals.  Some are diurnal, or officecular; some are nocturnal, or even caffeiners (extreme nocturnals); some are crepuscular, that is, before-and-after-officecular; dialupers [...]]]></description>
			<content:encoded><![CDATA[<p>One thing I noticed in my first international trip is that people who hang in Google Talk, ICQ, MSN, or IRQ have activity patterns based on the time of the day, just like animals.  Some are diurnal, or officecular; some are nocturnal, or even caffeiners (extreme nocturnals); some are crepuscular, that is, before-and-after-officecular; dialupers only appear after midnight, and schoolers after lunch, etc.  Thus, if you undergo a timezone shift (real or figurative), your IM contact list landscape will surprise you as much as when you hike at night for the first time.</p>
]]></content:encoded>
			<wfw:commentRss>http://namakajiri.net/complog/im-activity-patterns/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
