<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Gábor's blog</title>
  <link rel="alternate" type="text/html" href="http://www.nekomancer.net"/>
  <link rel="self" type="application/atom+xml" href="http://www.nekomancer.net/atom/feed"/>
  <id>http://www.nekomancer.net/atom/feed</id>
  <updated>2008-03-28T18:46:28-05:00</updated>
  <entry>
    <title>What i don&#039;t like about Arc</title>
    <link rel="alternate" type="text/html" href="http://www.nekomancer.net/blog/2008/05/15/arc-problem" />
    <id>http://www.nekomancer.net/blog/2008/05/15/arc-problem</id>
    <published>2008-05-15T06:19:53-05:00</published>
    <updated>2008-05-15T06:33:56-05:00</updated>
    <author>
      <name>gabor</name>
    </author>
    <category term="lisp" />
    <category term="programming" />
    <summary type="html"><![CDATA[<p>Today i have found an article about <a href="http://en.wikipedia.org/wiki/Arc_(programming_language)">Arc</a> on <a href="http://reddit.com/r/programming/info/6jgnp/comments/">programming.reddit.com</a>. While reading the article, i remembered the thing that i do not like about Arc.  People often talk about problems like fragmenting the lisp-users even more, or about using lisp1 or lisp2, or hygienic macros etc. My issue is different:</p>

<p><em>Arc does not behave like an open-source project</em></p>

<p>that&#8217;s it. for example:</p>

<ul>
<li>what (open-source or free-software) license does the code use?</li>
<li>where is the version-controlled repository for the project?</li>
<li>where is the bug-tracker?</li>
</ul>

<p>The answer to all this is probably that the project is too young, and all this is still in flux, and it will be clarified when the language becomes more &#8216;final&#8217;. I think it should be the opposite way. Paul Graham should have specified the license from the start. They should also open up the version-control-system they use to develop Arc, and if they don&#8217;t use one, they should.</p>

<p>If i got something wrong, please tell me. I&#8217;d love to be corrected on these.</p>

<p>p.s: if you&#8217;d like to try out a lisp that&#8217;s usable currently, there are a lot of them. here are some to start with: <a href="http://en.wikipedia.org/wiki/Mzscheme">mzScheme</a> from the scheme family and <a href="http://en.wikipedia.org/wiki/SBCL">SBCL</a> from the common-lisp family. Or, if you would prefer to try out something different, something new, try <a href="http://en.wikipedia.org/wiki/Clojure">Clojure</a>. It runs on the <a href="http://en.wikipedia.org/wiki/Jvm">JVM</a>, so you also have access to all java libraries.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>Today i have found an article about <a href="http://en.wikipedia.org/wiki/Arc_(programming_language)">Arc</a> on <a href="http://reddit.com/r/programming/info/6jgnp/comments/">programming.reddit.com</a>. While reading the article, i remembered the thing that i do not like about Arc.  People often talk about problems like fragmenting the lisp-users even more, or about using lisp1 or lisp2, or hygienic macros etc. My issue is different:</p>

<p><em>Arc does not behave like an open-source project</em></p>

<p>that&#8217;s it. for example:</p>

<ul>
<li>what (open-source or free-software) license does the code use?</li>
<li>where is the version-controlled repository for the project?</li>
<li>where is the bug-tracker?</li>
</ul>

<p>The answer to all this is probably that the project is too young, and all this is still in flux, and it will be clarified when the language becomes more &#8216;final&#8217;. I think it should be the opposite way. Paul Graham should have specified the license from the start. They should also open up the version-control-system they use to develop Arc, and if they don&#8217;t use one, they should.</p>

<p>If i got something wrong, please tell me. I&#8217;d love to be corrected on these.</p>

<p>p.s: if you&#8217;d like to try out a lisp that&#8217;s usable currently, there are a lot of them. here are some to start with: <a href="http://en.wikipedia.org/wiki/Mzscheme">mzScheme</a> from the scheme family and <a href="http://en.wikipedia.org/wiki/SBCL">SBCL</a> from the common-lisp family. Or, if you would prefer to try out something different, something new, try <a href="http://en.wikipedia.org/wiki/Clojure">Clojure</a>. It runs on the <a href="http://en.wikipedia.org/wiki/Jvm">JVM</a>, so you also have access to all java libraries.</p>
    ]]></content>
  </entry>
  <entry>
    <title>GitHub and ads</title>
    <link rel="alternate" type="text/html" href="http://www.nekomancer.net/blog/2008/04/24/github-ads" />
    <id>http://www.nekomancer.net/blog/2008/04/24/github-ads</id>
    <published>2008-04-24T00:15:53-05:00</published>
    <updated>2008-04-24T00:17:01-05:00</updated>
    <author>
      <name>gabor</name>
    </author>
    <summary type="html"><![CDATA[<p><a href="http://www.rubyonrails.org/">Ruby on Rails</a> recently <a href="http://weblog.rubyonrails.org/2008/4/15/rails-and-family-on-lighthouse">started to use Lighthouse for ticket-tracking and GitHub for source-code-management</a>. Both of these products/services are closed-source. i personally wonder if this is a good move (to base your infrastructure on closed-source). Well, for GitHub, the underlying technology is <a href="http://git.or.cz/">Git</a>, so if they later decide to migrate somewhere else, it should be ok. Let&#8217;s hope that <a href="http://www.lighthouseapp.com/">Lighhouse</a> has some nice export-all-content functionality :)</p>

<p>while both of these services (GitHub, LightHouse) are closed-source, i somehow assumed that they at least &#8216;understand&#8217; how open-source/free-software works. but then, yesterday i found out that <a href="http://github.com/site/terms">GitHub Terms of Service forbids free-account-users to block ads</a>. hmmm&#8230;maybe they should also forbid free-account-users to open <a href="http://www.selenic.com/mercurial/wiki/">Mercurial</a>&#8217;s web page in their browser, while GitHub is open in any other window/tab.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p><a href="http://www.rubyonrails.org/">Ruby on Rails</a> recently <a href="http://weblog.rubyonrails.org/2008/4/15/rails-and-family-on-lighthouse">started to use Lighthouse for ticket-tracking and GitHub for source-code-management</a>. Both of these products/services are closed-source. i personally wonder if this is a good move (to base your infrastructure on closed-source). Well, for GitHub, the underlying technology is <a href="http://git.or.cz/">Git</a>, so if they later decide to migrate somewhere else, it should be ok. Let&#8217;s hope that <a href="http://www.lighthouseapp.com/">Lighhouse</a> has some nice export-all-content functionality :)</p>

<p>while both of these services (GitHub, LightHouse) are closed-source, i somehow assumed that they at least &#8216;understand&#8217; how open-source/free-software works. but then, yesterday i found out that <a href="http://github.com/site/terms">GitHub Terms of Service forbids free-account-users to block ads</a>. hmmm&#8230;maybe they should also forbid free-account-users to open <a href="http://www.selenic.com/mercurial/wiki/">Mercurial</a>&#8217;s web page in their browser, while GitHub is open in any other window/tab.</p>
    ]]></content>
  </entry>
  <entry>
    <title>google app engine: from sql to excel</title>
    <link rel="alternate" type="text/html" href="http://www.nekomancer.net/blog/2008/04/13/google-appengine-sql-excel" />
    <id>http://www.nekomancer.net/blog/2008/04/13/google-appengine-sql-excel</id>
    <published>2008-04-13T15:52:12-05:00</published>
    <updated>2008-05-14T13:54:18-05:00</updated>
    <author>
      <name>gabor</name>
    </author>
    <category term="python" />
    <category term="programming" />
    <summary type="html"><![CDATA[<p>As many other people, i also got my google app account (even crateated a <a href="http://viewrequest.appspot.com">stupid test application</a>. it&#8217;s fun to try out such a radically different hosting-environment.</p>

<p>but there is an issue with it seems many do not realize:</p>

<p>the &#8220;database&#8221; backend of google-app-engine (i will call it <a href="http://en.wikipedia.org/wiki/Bigtable">BigTable</a> in the following text) is not a relational (read &#8220;SQL&#8221;) store, and it will never be. for example, it does not support SQL JOINs. but it&#8217;s worse than that. because of it&#8217;s architecture, JOINS will never be fast there. BigTable is essentially a collection of spreadsheet-tables, where you can do some basic searches, that&#8217;s all. oh, and transactions.</p>

<p>for this reason, there probably never will be a BigTable django-ORM wrapper. of course technically it&#8217;s possible to implement in python all the missing features, but it&#8217;s performance characteristics will not be the same as of a relational-database.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>As many other people, i also got my google app account (even crateated a <a href="http://viewrequest.appspot.com">stupid test application</a>. it&#8217;s fun to try out such a radically different hosting-environment.</p>

<p>but there is an issue with it seems many do not realize:</p>

<p>the &#8220;database&#8221; backend of google-app-engine (i will call it <a href="http://en.wikipedia.org/wiki/Bigtable">BigTable</a> in the following text) is not a relational (read &#8220;SQL&#8221;) store, and it will never be. for example, it does not support SQL JOINs. but it&#8217;s worse than that. because of it&#8217;s architecture, JOINS will never be fast there. BigTable is essentially a collection of spreadsheet-tables, where you can do some basic searches, that&#8217;s all. oh, and transactions.</p>

<p>for this reason, there probably never will be a BigTable django-ORM wrapper. of course technically it&#8217;s possible to implement in python all the missing features, but it&#8217;s performance characteristics will not be the same as of a relational-database. so you will not be able to simply take your mysql/postgresql-optimized application, and deploy on it, and all is fine. you will have to restructure your application.</p>

<p>and if you have to restructure your app anyway, why do you need the django-ORM? you can as well write google-app-engine-specific code.</p>

<p>(on the other hand, maybe there could be a more stupid django-orm, that does not assume a relational-db-backend, and it could work with the various non-relational databases like <a href="http://en.wikipedia.org/wiki/Bigtable">BigTable</a> or <a href="http://hadoop.apache.org/hbase/">hBase</a> or other <a href="http://en.wikipedia.org/wiki/Column-oriented_DBMS">column-oriented databases</a>&#8230;)</p>

<p>the basic idea when writing BigTable code is that read-operations will happen much more often than write-operations. so do more at write-time, and less at read-time. denormalize tables.</p>

<p>for example, take a simple forum-application. it stores discussions. a discussion has comments.
now let&#8217;s see how we could implement 2 basic features: &#8220;add comment&#8221; and &#8220;list discussion-names with comment-count&#8221;.</p>

<p>SQL:</p>

<ul>
<li>&#8220;add comment&#8221;: store a new comment-entry, which contains a link (a foreign-key) to it&#8217;s discussion</li>
<li>&#8220;list discussion-names with comment-count&#8221;: do an SQL query like: <span class="geshifilter"><code class="geshifilter-text">SELECT discussion.name,count(1) from discussion LEFT OUTER JOIN comment GROUP BY comment.discussion_id;</code></span> (let&#8217;s not discuss right now if it&#8217;s inner or outer join etc. it&#8217;s quite late at night here, so maybe it&#8217;s not 100% correct. but it should be enough to demonstrate the situation)</li>
</ul>

<p>BigTable (one possible solution):</p>

<ul>
<li>&#8220;add comment&#8221;: store a new comment entry, which contains a link to it&#8217;s discussion. also, count the number of comments for this discussion, and store this value in the discussion-table</li>
<li>&#8220;list discussion-names with comment-count&#8221;: <span class="geshifilter"><code class="geshifilter-text">select * from discussion</code></span></li>
</ul>

<p>of course the whole denormalize-your-database-if-you-want-performance mantra is nothing new. if i remember correctly, Flickr also does this. but still, for most developers, (also for me), it&#8217;s just painful to give up our nice, clean, normalized db-tables.</p>

<p>p.s: please note, that all the info is not based on my own performance-benchmarks. it&#8217;s more a summary of what i&#8217;ve read in the the google-appengine documentation and the <a href="http://groups.google.com/group/google-appengine">google-appengine mailing list</a>.</p>
    ]]></content>
  </entry>
  <entry>
    <title>yahtzee</title>
    <link rel="alternate" type="text/html" href="http://www.nekomancer.net/blog/2008/04/10/yahtzee" />
    <id>http://www.nekomancer.net/blog/2008/04/10/yahtzee</id>
    <published>2008-04-10T12:46:07-05:00</published>
    <updated>2008-04-10T13:13:44-05:00</updated>
    <author>
      <name>gabor</name>
    </author>
    <category term="games" />
    <summary type="html"><![CDATA[<p><a href="http://www.escapistmagazine.com/articles/view/editorials/zeropunctuation/3554-Zero-Punctuation-No-More-Heroes">http://www.escapistmagazine.com/articles/view/editorials/zeropunctuation/3554-Zero-Punctuation-No-More-Heroes</a></p>

<p>it&#8217;s a review of the <a href="http://en.wikipedia.org/wiki/No_More_Heroes_(video_game)">No More Heroes video game</a> in an unique, unforgettable way. it&#8217;s full of ideas/opinions/experiences&#8230; full of content.</p>

<p>for the best review-ending of my life watch the ending starting from 3:20. awesome.</p>

<p>also be sure to watch <a href="http://www.escapistmagazine.com/articles/view/editorials/zeropunctuation">all the reviews</a>, and subscribe to the <a href="http://www.escapistmagazine.com/rss/articles/editorials/zeropunctuation">RSS feed</a></p>
    ]]></summary>
    <content type="html"><![CDATA[<p><a href="http://www.escapistmagazine.com/articles/view/editorials/zeropunctuation/3554-Zero-Punctuation-No-More-Heroes">http://www.escapistmagazine.com/articles/view/editorials/zeropunctuation/3554-Zero-Punctuation-No-More-Heroes</a></p>

<p>it&#8217;s a review of the <a href="http://en.wikipedia.org/wiki/No_More_Heroes_(video_game)">No More Heroes video game</a> in an unique, unforgettable way. it&#8217;s full of ideas/opinions/experiences&#8230; full of content.</p>

<p>for the best review-ending of my life watch the ending starting from 3:20. awesome.</p>

<p>also be sure to watch <a href="http://www.escapistmagazine.com/articles/view/editorials/zeropunctuation">all the reviews</a>, and subscribe to the <a href="http://www.escapistmagazine.com/rss/articles/editorials/zeropunctuation">RSS feed</a></p>
    ]]></content>
  </entry>
  <entry>
    <title>Collect 4 stones</title>
    <link rel="alternate" type="text/html" href="http://www.nekomancer.net/blog/2008/04/05/collect-4-stones" />
    <id>http://www.nekomancer.net/blog/2008/04/05/collect-4-stones</id>
    <published>2008-04-05T15:47:12-05:00</published>
    <updated>2008-04-05T15:53:52-05:00</updated>
    <author>
      <name>gabor</name>
    </author>
    <category term="rant" />
    <category term="games" />
    <summary type="html"><![CDATA[<p>I&#8217;ve played a lot of <a href="http://en.wikipedia.org/wiki/Computer_role-playing_game">RPGs</a>&#8230; the last one i played for a longer time was <a href="http://en.wikipedia.org/wiki/Rogue_galaxy">Rogue Galaxy</a>&#8230; i&#8217;m currently at roughly 40% of the game, and currently i have to go and collect 3 items in 3 separate dungeons.</p>

<p>and that was the point where i stopped playing the game (ok, not exactly, i went into one of the three dungeons and then stopped there).</p>

<p>i just cannot help it. for me it seems incredibly boring, that now the story will not move on until i do all 3 dungeons, which will probably involve nothing except going-through-the-dungeon, and fighting-the-boss. three times. i have the feeling that authors usually do this when they are simply out of ideas. now, it might be that actually in Rogue Galaxy, those 3 places (dungeons, whatever) are filled with fantastic story, but i don&#8217;t think so :)</p>

<p>the same happened in <a href="http://en.wikipedia.org/wiki/Neverwinter_nights">Neverwinter Nights</a>, except that there you had to collect 4 items (4 stones if i remember correctly). and i hated it there too.</p>

<p>somehow this reminds me of <a href="http://www.thenoobcomic.com/index.php?pos=19">Clichequest</a></p>
    ]]></summary>
    <content type="html"><![CDATA[<p>I&#8217;ve played a lot of <a href="http://en.wikipedia.org/wiki/Computer_role-playing_game">RPGs</a>&#8230; the last one i played for a longer time was <a href="http://en.wikipedia.org/wiki/Rogue_galaxy">Rogue Galaxy</a>&#8230; i&#8217;m currently at roughly 40% of the game, and currently i have to go and collect 3 items in 3 separate dungeons.</p>

<p>and that was the point where i stopped playing the game (ok, not exactly, i went into one of the three dungeons and then stopped there).</p>

<p>i just cannot help it. for me it seems incredibly boring, that now the story will not move on until i do all 3 dungeons, which will probably involve nothing except going-through-the-dungeon, and fighting-the-boss. three times. i have the feeling that authors usually do this when they are simply out of ideas. now, it might be that actually in Rogue Galaxy, those 3 places (dungeons, whatever) are filled with fantastic story, but i don&#8217;t think so :)</p>

<p>the same happened in <a href="http://en.wikipedia.org/wiki/Neverwinter_nights">Neverwinter Nights</a>, except that there you had to collect 4 items (4 stones if i remember correctly). and i hated it there too.</p>

<p>somehow this reminds me of <a href="http://www.thenoobcomic.com/index.php?pos=19">Clichequest</a></p>
    ]]></content>
  </entry>
  <entry>
    <title>RIP ISO</title>
    <link rel="alternate" type="text/html" href="http://www.nekomancer.net/blog/2008/04/02/rip-iso" />
    <id>http://www.nekomancer.net/blog/2008/04/02/rip-iso</id>
    <published>2008-04-02T06:27:45-05:00</published>
    <updated>2008-05-14T13:53:17-05:00</updated>
    <author>
      <name>gabor</name>
    </author>
    <category term="computers" />
    <summary type="html"><![CDATA[<p>Today <a href="http://www.iso.org">ISO</a> approved the Open Office XML format as an ISO standard.</p>

<p>It&#8217;s always sad when i have to cut out an entry from my &#8216;respected authorities&#8217; list, and this time i have to do it with ISO. Now that i think about it, i never really followed whether ISO is a respectable authority or not,  but somehow, by default assumed it is. Maybe it never was.</p>

<p>There are several reasons why i don&#8217;t like Open Office XML, i will describe here some of them. please note, that i was unable to download the final version, that was accepted by ISO. all i could get was the one accepted by ECMA, and i assume they are similar. if not, please correct me in the comments.</p>

<ul>
<li>the spec contains attributes like autoSpaceLikeWord95 (section 2.15.3.6), which basically means that you have to do some formatting the same way as Word 95 does it.it is not specified how it should be done. so if someone wants to implement it, he should try it in Word 95?</li>
</ul>
    ]]></summary>
    <content type="html"><![CDATA[<p>Today <a href="http://www.iso.org">ISO</a> approved the Open Office XML format as an ISO standard.</p>

<p>It&#8217;s always sad when i have to cut out an entry from my &#8216;respected authorities&#8217; list, and this time i have to do it with ISO. Now that i think about it, i never really followed whether ISO is a respectable authority or not,  but somehow, by default assumed it is. Maybe it never was.</p>

<p>There are several reasons why i don&#8217;t like Open Office XML, i will describe here some of them. please note, that i was unable to download the final version, that was accepted by ISO. all i could get was the one accepted by ECMA, and i assume they are similar. if not, please correct me in the comments.</p>

<ul>
<li><p>the spec contains attributes like autoSpaceLikeWord95 (section 2.15.3.6), which basically means that you have to do some formatting the same way as Word 95 does it.it is not specified how it should be done. so if someone wants to implement it, he should try it in Word 95? in other words, only the company which has the source code for Word 95 can implement this feature correctly. OOXML proponents will probably point out, that the spec says that this attribute is deprecated and should not be used in new document. this is true. but, on the other hand, why is it in the spec at all? and even if it is deprecated, here is what will happen: Microsoft&#8217;s implementation will be able to read/write this correctly, and other implementations will not. and the customer will only see that in Microsoft&#8217;s program it works, but in an other program it does not work. that simple.</p></li>
<li><p>the spec is very inconsistent. uses different tags/namespaces/attributes for the same thing in different document-types. for example, see how to make the text bold and aligned to right in the various document-types (<a href="http://www.robweir.com/blog/2008/03/disharmony-of-ooxml.html">source</a>):</p></li>
</ul>

<table class="datagrid">
  <tbody>
      <tr><th>Format</th><th>Text Color</th><th>Text Alignment</th></tr>
      <tr><td>OOXML Text</td><td>&lt;w:color w:val=&#8221;FF0000&#8221;/&gt;</td><td>&lt;w:jc w:val=&#8221;right&#8221;/&gt;</td></tr>
      <tr><td>OOXML Sheet</td><td>&lt;color rgb=&#8221;FFFF0000&#8221;/&gt;</td><td>&lt;alignment horizontal=&#8221;right&#8221;/&gt;</td></tr>
      <tr><td>OOXML Presentation</td><td>&lt;a:srgbClr val=&#8221;FF0000&#8221;/&gt;</td><td>&lt;a:pPr algn=&#8221;r&#8221;/&gt;</td></tr>
      <tr>
        <td>ODF Text</td><td>&lt;style:text-properties fo:color=&#8221;#FF0000&#8221;/&gt;</td>
        <td>&lt;style:paragraph-properties fo:text-align=&#8221;end&#8221; /&gt;</td>
      </tr>
      <tr>
        <td>ODF Sheet</td><td>&lt;style:text-properties fo:color=&#8221;#FF0000&#8221;/&gt;</td>
        <td>&lt;style:paragraph-properties fo:text-align=&#8221;end&#8221;/&gt;</td>
      </tr>
      <tr>
        <td>ODF Presentation</td>
        <td>&lt;style:text-properties fo:color=&#8221;#FF0000&#8221;/&gt;</td>
        <td>&lt;style:paragraph-properties fo:text-align=&#8221;end&#8221;/&gt;</td>
      </tr>
    </tbody>
  </table>

<p>to clarify: i&#8217;m not sad because of the file-format. while the format is not perfect, imho it&#8217;s still much more open, than their binary-formats. the problem is ISO, not Microsoft. the fact that ISO accepted such a mess as a standard.</p>

<p>to read more, try <a href="http://www.noooxml.org/">http://www.noooxml.org/</a> or just google for <a href="http://www.google.sk/search?&amp;q=OOXML">OOXML</a> or for <a href="http://www.google.sk/search?&amp;q=autoSpaceLikeWord95">autoSpaceLikeWord95</a>.</p>
    ]]></content>
  </entry>
  <entry>
    <title>MySQL homepage vs. PostgreSQL homepage</title>
    <link rel="alternate" type="text/html" href="http://www.nekomancer.net/blog/2008/03/30/mysql-vs-postgresql-homepage" />
    <id>http://www.nekomancer.net/blog/2008/03/30/mysql-vs-postgresql-homepage</id>
    <published>2008-03-30T16:37:14-05:00</published>
    <updated>2008-03-30T16:53:40-05:00</updated>
    <author>
      <name>gabor</name>
    </author>
    <category term="computers" />
    <summary type="html"><![CDATA[<p>I always used PostgreSQL, never MySQL. The reason was simply that at work first i had to work with PostgreSQL, and later i simply saw no reason to switch to MySQL. For me they both seem to offer pretty much the same functionality/performance these days.</p>

<p>But what i&#8217;d like to talk about here, is their home pages: <a href="http://www.mysql.com/">MySQL</a> and <a href="http://www.postgresql.org/">PostgreSQL</a>.</p>

<p>Most of time i work with open-source/free software, and i got used to the way their home pages are created/behave. and let me tell you this: if i would have to choose today between MySQL and PostgreSQL purely based on their home pages, i would never ever choose MySQL. Their  web page is just similar to the  usual full-of-bullshit commercial-product web pages, which i learned to hate. The only missing thing is the photo of some happy-guy-in-a-suit holding a copy of MySQL.</p>

<p>Or, let&#8217;s try a simple test: How fast can you find the download-link for the latest version of MySQL?</p>

<ul>
<li>with Postgresql, it&#8217;s right there on the home page, on the right side of the page.</li>
<li>with MySQL, the first download-like-thing you find is some 30-day-trial&#8230; (WHAT? A TRIAL? ISN&#8217;T THIS GPL???) . below i can either DISCOVER it, or TEST DRIVE it or LEARN it or read the WHAT&#8217;S NEW section&#8230; but no DOWNLOAD. well, but if you check more, you can find the small &#8216;download&#8217; link in the TEST DRIVE section. now you get to a new page, where they try very much to persuade me to buy a commercial version. but, if i prefer to do everything by myself, and accept that there will be no binary builds after every update/bugfix, i can download the free version</li>
</ul>

<p>i understand the reason for the piece-of-shit web page. MySQL is dual-licensed, there is a commercial version, and there is a company behind it that is trying to sell it. but the problem is that because of this, the &#8220;free&#8221; version is basically shown as a worse version. and that&#8217;s not the best way to look good to programmers using free/open-source software.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>I always used PostgreSQL, never MySQL. The reason was simply that at work first i had to work with PostgreSQL, and later i simply saw no reason to switch to MySQL. For me they both seem to offer pretty much the same functionality/performance these days.</p>

<p>But what i&#8217;d like to talk about here, is their home pages: <a href="http://www.mysql.com/">MySQL</a> and <a href="http://www.postgresql.org/">PostgreSQL</a>.</p>

<p>Most of time i work with open-source/free software, and i got used to the way their home pages are created/behave. and let me tell you this: if i would have to choose today between MySQL and PostgreSQL purely based on their home pages, i would never ever choose MySQL. Their  web page is just similar to the  usual full-of-bullshit commercial-product web pages, which i learned to hate. The only missing thing is the photo of some happy-guy-in-a-suit holding a copy of MySQL.</p>

<p>Or, let&#8217;s try a simple test: How fast can you find the download-link for the latest version of MySQL?</p>

<ul>
<li>with Postgresql, it&#8217;s right there on the home page, on the right side of the page.</li>
<li>with MySQL, the first download-like-thing you find is some 30-day-trial&#8230; (WHAT? A TRIAL? ISN&#8217;T THIS GPL???) . below i can either DISCOVER it, or TEST DRIVE it or LEARN it or read the WHAT&#8217;S NEW section&#8230; but no DOWNLOAD. well, but if you check more, you can find the small &#8216;download&#8217; link in the TEST DRIVE section. now you get to a new page, where they try very much to persuade me to buy a commercial version. but, if i prefer to do everything by myself, and accept that there will be no binary builds after every update/bugfix, i can download the free version</li>
</ul>

<p>i understand the reason for the piece-of-shit web page. MySQL is dual-licensed, there is a commercial version, and there is a company behind it that is trying to sell it. but the problem is that because of this, the &#8220;free&#8221; version is basically shown as a worse version. and that&#8217;s not the best way to look good to programmers using free/open-source software.</p>
    ]]></content>
  </entry>
  <entry>
    <title>python web-application using generators</title>
    <link rel="alternate" type="text/html" href="http://www.nekomancer.net/blog/archives/python-web-app-using-generators" />
    <id>http://www.nekomancer.net/blog/archives/python-web-app-using-generators</id>
    <published>2008-03-01T17:16:16-06:00</published>
    <updated>2008-06-27T03:41:12-05:00</updated>
    <author>
      <name>gabor</name>
    </author>
    <category term="python" />
    <category term="programming" />
    <summary type="html"><![CDATA[<p>Probably many of you have heard already about <a href="http://www.seaside.st/">Seaside</a>. It&#8217;s a smalltalk web framework, where you can write a web-app in a linear style:</p>

<p>let&#8217;s say you want to create a web-app which:</p>

<ul>
<li>shows a form to the user, where he can enter a number and submit it</li>
<li>then you show him a second form, where the user can enter a second number and submit it</li>
<li>then you show the user a page which displays the sum of those 2 submitted numbers</li>
</ul>
    ]]></summary>
    <content type="html"><![CDATA[<p>Probably many of you have heard already about <a href="http://www.seaside.st/">Seaside</a>. It&#8217;s a smalltalk web framework, where you can write a web-app in a linear style:</p>

<p>let&#8217;s say you want to create a web-app which:</p>

<ul>
<li>shows a form to the user, where he can enter a number and submit it</li>
<li>then you show him a second form, where the user can enter a second number and submit it</li>
<li>then you show the user a page which displays the sum of those 2 submitted numbers
<!--break-->
in Seaside, you can implement it in something like this:
(pseudocode)</li>
</ul>

<div class="geshifilter"><pre class="geshifilter-python">first_num = get_number<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
second_num = get_number<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
display<span style="color: black;">&#40;</span>first_num + second_num<span style="color: black;">&#41;</span></pre></div>

<p>my language of choice is python, so i was curious if it&#8217;s possible to achieve something similar in that language. seside uses <a href="http://en.wikipedia.org/wiki/Continuation">continuations</a> to achieve this, so i turned to <a href="http://docs.python.org/ref/yield.html">python generators</a>. they allowed me to write this:</p>

<div class="geshifilter"><pre class="geshifilter-python"><span style="color: #ff7700;font-weight:bold;">def</span> sum_two_numbers<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
    first_num = <span style="color: #ff7700;font-weight:bold;">yield</span> InputPage<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;enter first number:&quot;</span><span style="color: black;">&#41;</span>
    second_num = <span style="color: #ff7700;font-weight:bold;">yield</span> InputPage<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;enter second number:&quot;</span><span style="color: black;">&#41;</span>
    <span style="color: #008000;">sum</span> = <span style="color: #008000;">int</span><span style="color: black;">&#40;</span>first_num<span style="color: black;">&#41;</span> + <span style="color: #008000;">int</span><span style="color: black;">&#40;</span>second_num<span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">yield</span> TextPage<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;the sum isresult is: %s&quot;</span> <span style="color: #66cc66;">%</span> <span style="color: #008000;">sum</span><span style="color: black;">&#41;</span></pre></div>

<p>the full code is below, but first some notes about it:</p>

<ul>
<li>it requires python 2.5 or higher, because i use the <a href="http://docs.python.org/whatsnew/pep-342.html">&#8220;advanced&#8221; version of yield</a>, which appeared in python2.5</li>
<li>this is only proof-of-concept code, and i know that it uses global-variables, ugly names, get-where-it-should-do-post etc.</li>
<li>i know Seaside does much much more (backbutton-support etc.)</li>
</ul>

<p>the code:</p>

<div class="geshifilter"><pre class="geshifilter-python"><span style="color: #808080; font-style: italic;">#!/usr/bin/env python2.5</span>
<span style="color: #ff7700;font-weight:bold;">from</span> wsgiref.<span style="color: black;">simple_server</span> <span style="color: #ff7700;font-weight:bold;">import</span> make_server
<span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">cgi</span> <span style="color: #ff7700;font-weight:bold;">import</span> parse_qs
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> TextPage<span style="color: black;">&#40;</span><span style="color: #008000;">object</span><span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__init__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>,text<span style="color: black;">&#41;</span>:
        <span style="color: #008000;">self</span>.<span style="color: black;">text</span> = text
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> get_response_content<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #483d8b;">'&lt;html&gt;&lt;body&gt;%s&lt;/body&gt;&lt;/html&gt;'</span> <span style="color: #66cc66;">%</span> <span style="color: #008000;">self</span>.<span style="color: black;">text</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> get_request_data<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>,environ<span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">None</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> InputPage<span style="color: black;">&#40;</span>TextPage<span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">def</span> get_response_content<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #483d8b;">&quot;&quot;</span><span style="color: #483d8b;">&quot;&lt;html&gt;&lt;body&gt;%s
            &lt;form method=&quot;</span>get<span style="color: #483d8b;">&quot; action=&quot;</span>.<span style="color: #483d8b;">&quot;&gt;
            &lt;input type=&quot;</span>text<span style="color: #483d8b;">&quot; name=&quot;</span>data<span style="color: #483d8b;">&quot; value=&quot;</span><span style="color: #483d8b;">&quot;/&gt;
            &lt;/form&gt;
            &lt;/body&gt;&lt;/html&gt;&quot;</span><span style="color: #483d8b;">&quot;&quot;</span> <span style="color: #66cc66;">%</span> <span style="color: #008000;">self</span>.<span style="color: black;">text</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> get_request_data<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, environ<span style="color: black;">&#41;</span>:
        get_req_dict = parse_qs<span style="color: black;">&#40;</span>environ<span style="color: black;">&#91;</span><span style="color: #483d8b;">'QUERY_STRING'</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">return</span> get_req_dict<span style="color: black;">&#91;</span><span style="color: #483d8b;">'data'</span><span style="color: black;">&#93;</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> sum_two_numbers<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
    first_num = <span style="color: #ff7700;font-weight:bold;">yield</span> InputPage<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;enter first number:&quot;</span><span style="color: black;">&#41;</span>
    second_num = <span style="color: #ff7700;font-weight:bold;">yield</span> InputPage<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;enter second number:&quot;</span><span style="color: black;">&#41;</span>
    <span style="color: #008000;">sum</span> = <span style="color: #008000;">int</span><span style="color: black;">&#40;</span>first_num<span style="color: black;">&#41;</span> + <span style="color: #008000;">int</span><span style="color: black;">&#40;</span>second_num<span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">yield</span> TextPage<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;the sum isresult is: %s&quot;</span> <span style="color: #66cc66;">%</span> <span style="color: #008000;">sum</span><span style="color: black;">&#41;</span>
&nbsp;
s = sum_two_numbers<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
cur_item = <span style="color: #008000;">None</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> simple_app<span style="color: black;">&#40;</span>environ, start_response<span style="color: black;">&#41;</span>:
    status = <span style="color: #483d8b;">'200 OK'</span>
    response_headers = <span style="color: black;">&#91;</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'Content-type'</span>,<span style="color: #483d8b;">'text/html'</span><span style="color: black;">&#41;</span><span style="color: black;">&#93;</span>
    start_response<span style="color: black;">&#40;</span>status, response_headers<span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">global</span> cur_item
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #ff7700;font-weight:bold;">not</span> cur_item:
        cur_item = s.<span style="color: black;">next</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">else</span>:
        cur_item = s.<span style="color: black;">send</span><span style="color: black;">&#40;</span>cur_item.<span style="color: black;">get_request_data</span><span style="color: black;">&#40;</span>environ<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: black;">&#91;</span>cur_item.<span style="color: black;">get_response_content</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#93;</span>
&nbsp;
&nbsp;
httpd = make_server<span style="color: black;">&#40;</span><span style="color: #483d8b;">''</span>, <span style="color: #ff4500;">8000</span>, simple_app<span style="color: black;">&#41;</span>
httpd.<span style="color: black;">serve_forever</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div>

<p>i did a quick google-check about this topic (&#8220;python web framework continuations&#8221;), and only found <a href="http://twistedmatrix.com/pipermail/twisted-web/2004-November/000863.html">Nevow with Wolf</a>, which uses a less-elegant approach, probably because when it was implemented, python2.5 was not yet available. if anyone knows about other python web-frameworks that use generators, leave me a comment.</p>
    ]]></content>
  </entry>
  <entry>
    <title>scm in programming language development</title>
    <link rel="alternate" type="text/html" href="http://www.nekomancer.net/blog/archives/scm-in-prog-lang-devel" />
    <id>http://www.nekomancer.net/blog/archives/scm-in-prog-lang-devel</id>
    <published>2008-02-24T15:38:50-06:00</published>
    <updated>2008-03-28T18:46:28-05:00</updated>
    <author>
      <name>gabor</name>
    </author>
    <category term="scm" />
    <category term="programming" />
    <summary type="html"><![CDATA[<p>i did a quick check about what source-code-management systems are used by the programming languages that i find important/interesting,
and here is what i found:</p>

<table class="simpleblog">
<tr><td><a href="http://www.python.org/dev/faq/#subversion-svn">python</a></td><td>subversion</td></tr>
<tr><td><a href="http://www.ruby-lang.org/en/community/ruby-core/#following-ruby">ruby</a></td><td>subversion</td></tr>
<tr><td><a href="http://gcc.gnu.org/svn.html">gcc</a></td><td>subversion</td></tr>
<tr><td><a href="http://sourceforge.net/cvs/?group_id=1373">sbcl (lisp)</a></td><td>cvs</td></tr>
<tr><td><a href="http://www.factorcode.org/development.fhtml">factor</a></td><td>git</td></tr>
<tr><td><a href="http://hackage.haskell.org/trac/ghc/wiki/Building/GettingTheSources">ghc (haskell)</a></td><td>darcs</td></tr>
<tr><td><a href="http://hg.openjdk.java.net/jdk7/jdk7">openjdk (java)</a></td><td>mercurial</td></tr>
<tr><td>lua</td><td>no public repo</td></tr>
</table>
    ]]></summary>
    <content type="html"><![CDATA[<p>i did a quick check about what source-code-management systems are used by the programming languages that i find important/interesting,
and here is what i found:</p>

<table class="simpleblog">
<tr><td><a href="http://www.python.org/dev/faq/#subversion-svn">python</a></td><td>subversion</td></tr>
<tr><td><a href="http://www.ruby-lang.org/en/community/ruby-core/#following-ruby">ruby</a></td><td>subversion</td></tr>
<tr><td><a href="http://gcc.gnu.org/svn.html">gcc</a></td><td>subversion</td></tr>
<tr><td><a href="http://sourceforge.net/cvs/?group_id=1373">sbcl (lisp)</a></td><td>cvs</td></tr>
<tr><td><a href="http://www.factorcode.org/development.fhtml">factor</a></td><td>git</td></tr>
<tr><td><a href="http://hackage.haskell.org/trac/ghc/wiki/Building/GettingTheSources">ghc (haskell)</a></td><td>darcs</td></tr>
<tr><td><a href="http://hg.openjdk.java.net/jdk7/jdk7">openjdk (java)</a></td><td>mercurial</td></tr>
<tr><td>lua</td><td>no public repo</td></tr>
</table>
    ]]></content>
  </entry>
  <entry>
    <title>php-upgrade fixed</title>
    <link rel="alternate" type="text/html" href="http://www.nekomancer.net/blog/archives/php-upgrade-fixed" />
    <id>http://www.nekomancer.net/blog/archives/php-upgrade-fixed</id>
    <published>2007-11-19T06:35:03-06:00</published>
    <updated>2008-03-28T18:46:28-05:00</updated>
    <author>
      <name>gabor</name>
    </author>
    <category term="42" />
    <summary type="html"><![CDATA[<p>ok, i fixed the issue (had to download the newest version of the <a href="http://michelf.com/projects/php-markdown/">php markdown plugin</a>)</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>ok, i fixed the issue (had to download the newest version of the <a href="http://michelf.com/projects/php-markdown/">php markdown plugin</a>)</p>
    ]]></content>
  </entry>
  <entry>
    <title>php-upgrade problems</title>
    <link rel="alternate" type="text/html" href="http://www.nekomancer.net/blog/archives/php-upgrade-problems" />
    <id>http://www.nekomancer.net/blog/archives/php-upgrade-problems</id>
    <published>2007-11-19T06:19:00-06:00</published>
    <updated>2008-03-28T18:46:28-05:00</updated>
    <author>
      <name>gabor</name>
    </author>
    <category term="42" />
    <summary type="html"><![CDATA[<p>sorry for the strange look of the articles.</p>

<p>because of a php-upgrade some things got broken, i&#8217;m working on fixing it.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>sorry for the strange look of the articles.</p>

<p>because of a php-upgrade some things got broken, i&#8217;m working on fixing it.</p>
    ]]></content>
  </entry>
  <entry>
    <title>short games in a busy age</title>
    <link rel="alternate" type="text/html" href="http://www.nekomancer.net/blog/archives/short-games" />
    <id>http://www.nekomancer.net/blog/archives/short-games</id>
    <published>2007-11-13T17:52:34-06:00</published>
    <updated>2008-03-28T18:46:28-05:00</updated>
    <author>
      <name>gabor</name>
    </author>
    <category term="games" />
    <summary type="html"><![CDATA[<p>In september, a new game was released for the Playstation 3: <a href="http://en.wikipedia.org/wiki/Heavenly_sword">Heavenly Sword</a>. The reviews noted that it takes roughly 6 hours to finish this game. What a bad game, i thought, and moved on. I thought that everyone thinks so.</p>

<p>But apparently not. Last week i&#8217;ve read a meta-review (a summary of other reviews) of the game <a href="http://en.wikipedia.org/wiki/Call_of_duty_4">Call of Duty 4</a> on <a href="http://www.joystiq.com/2007/11/06/nega-review-call-of-duty-4/">www.joystiq.com</a>, where the review mentions that</p>

<blockquote>
  <p>while everyone agreed that the game was short, many saw this a a positive in this busy day and age.</p>
</blockquote>

<p>the final drop in the glass was the video-review of <a href="http://en.wikipedia.org/wiki/Assassin%27s_creed">Assassin&#8217;s Creed</a> on <a href="http://www.gametrailers.com/player/27754.html">www.gametrailers.com</a>, where they mention (around at 4:10):</p>

<blockquote>
  <p>&#8230; Assassin&#8217;s Creed will last you a good 12 to 15 hours depending on your skill level, which is pretty beefy by today&#8217;s standards&#8230;</p>
</blockquote>

<p>(let&#8217;s stop for a second. i&#8217;m not a native speaker of english. the following of the post depends on the assumption that &#8220;beefy&#8221; means something positive here. it&#8217;s possible that i got this incorrectly, if that&#8217;s the case, feel free to correct me in the comments).</p>

<p>so, why is it GOOD that a game only takes 12-15 hours to complete?</p>

<p>i remember playing <a href="http://en.wikipedia.org/wiki/Baldur%27s_Gate_2">baldur&#8217;s gate 2</a>, and it was a long game. i do not remember anymore how long it took, but various review sites said things like <a href="http://www.gamespot.com/pc/rpg/baldursgate2shadowsofamn/player_review.html?id=496179">&#8220;the story is absolutely epic in length and you can expect several 10&#8217;s of hours just to complete the main quest, not to mention the literally hundreds of side-quests.&#8221;</a> or <a href="http://pc.ign.com/articles/163/163437p1.html">&#8220;The number I keep hearing from PR people and Bioware/Black Isle designers is 200 hours, but I&#8217;ve got a feeling it will be much more than that for your average player.&#8221;</a>.</p>

<p>from some of the games i played more recently,  <a href="http://en.wikipedia.org/wiki/Final_fantasy_7">Final Fantasy 7</a> took around 35 hours to complete, and <a href="http://en.wikipedia.org/wiki/Final_fantasy_12">Final Fantasy 12</a> around 65 hours (and i did do all the optional quests).</p>

<p>yes, there were also shorter games, like [http://en.wikipedia.org/wiki/Dirge_of_Cerberus:_Final_Fantasy_VII] (lately i&#8217;m trying to catch up with the not-yet-played Final Fantasy games ..), which took around 15 hours to complete, but i would never say that it&#8217;s length was adequate. it&#8217;s story was great, but the length was absolutely too short.</p>

<p>i await from a game at least 25-30 hours of gameplay. otherwise how could i enjoy playing it for weeks? otherwise how could it fill my free time, and make me submerged in an other world every evening?</p>

<p>or such things are not needed anymore?</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>In september, a new game was released for the Playstation 3: <a href="http://en.wikipedia.org/wiki/Heavenly_sword">Heavenly Sword</a>. The reviews noted that it takes roughly 6 hours to finish this game. What a bad game, i thought, and moved on. I thought that everyone thinks so.</p>

<p>But apparently not. Last week i&#8217;ve read a meta-review (a summary of other reviews) of the game <a href="http://en.wikipedia.org/wiki/Call_of_duty_4">Call of Duty 4</a> on <a href="http://www.joystiq.com/2007/11/06/nega-review-call-of-duty-4/">www.joystiq.com</a>, where the review mentions that</p>

<blockquote>
  <p>while everyone agreed that the game was short, many saw this a a positive in this busy day and age.</p>
</blockquote>

<p>the final drop in the glass was the video-review of <a href="http://en.wikipedia.org/wiki/Assassin%27s_creed">Assassin&#8217;s Creed</a> on <a href="http://www.gametrailers.com/player/27754.html">www.gametrailers.com</a>, where they mention (around at 4:10):</p>

<blockquote>
  <p>&#8230; Assassin&#8217;s Creed will last you a good 12 to 15 hours depending on your skill level, which is pretty beefy by today&#8217;s standards&#8230;</p>
</blockquote>

<p>(let&#8217;s stop for a second. i&#8217;m not a native speaker of english. the following of the post depends on the assumption that &#8220;beefy&#8221; means something positive here. it&#8217;s possible that i got this incorrectly, if that&#8217;s the case, feel free to correct me in the comments).</p>

<p>so, why is it GOOD that a game only takes 12-15 hours to complete?</p>

<p>i remember playing <a href="http://en.wikipedia.org/wiki/Baldur%27s_Gate_2">baldur&#8217;s gate 2</a>, and it was a long game. i do not remember anymore how long it took, but various review sites said things like <a href="http://www.gamespot.com/pc/rpg/baldursgate2shadowsofamn/player_review.html?id=496179">&#8220;the story is absolutely epic in length and you can expect several 10&#8217;s of hours just to complete the main quest, not to mention the literally hundreds of side-quests.&#8221;</a> or <a href="http://pc.ign.com/articles/163/163437p1.html">&#8220;The number I keep hearing from PR people and Bioware/Black Isle designers is 200 hours, but I&#8217;ve got a feeling it will be much more than that for your average player.&#8221;</a>.</p>

<p>from some of the games i played more recently,  <a href="http://en.wikipedia.org/wiki/Final_fantasy_7">Final Fantasy 7</a> took around 35 hours to complete, and <a href="http://en.wikipedia.org/wiki/Final_fantasy_12">Final Fantasy 12</a> around 65 hours (and i did do all the optional quests).</p>

<p>yes, there were also shorter games, like [http://en.wikipedia.org/wiki/Dirge_of_Cerberus:_Final_Fantasy_VII] (lately i&#8217;m trying to catch up with the not-yet-played Final Fantasy games ..), which took around 15 hours to complete, but i would never say that it&#8217;s length was adequate. it&#8217;s story was great, but the length was absolutely too short.</p>

<p>i await from a game at least 25-30 hours of gameplay. otherwise how could i enjoy playing it for weeks? otherwise how could it fill my free time, and make me submerged in an other world every evening?</p>

<p>or such things are not needed anymore?</p>
    ]]></content>
  </entry>
  <entry>
    <title>why i did not choose Git</title>
    <link rel="alternate" type="text/html" href="http://www.nekomancer.net/blog/archives/why-i-did-not-choose-git" />
    <id>http://www.nekomancer.net/blog/archives/why-i-did-not-choose-git</id>
    <published>2007-08-11T06:26:01-05:00</published>
    <updated>2008-06-23T00:11:01-05:00</updated>
    <author>
      <name>gabor</name>
    </author>
    <category term="scm" />
    <category term="programming" />
    <summary type="html"><![CDATA[<p>[EDIT (2008/06/23): (based on the first commenter&#8217;s message, it seems the issue i complained about here has been addressed in Git)</p>

<p>i am very interested in distributed version control systems, so i follow the mailing lists of several of them (<a href="http://bazaar-vcs.org/">bzr</a>, <a href="http://git.or.cz/">git</a>, <a href="http://selenic.com/mercurial">hg</a>)&#8230;</p>

<p>currently my favourite is mercurial btw&#8230;</p>

<p>but this post is not about why i chose mercurial.</p>

<p>also not about why distributed version controls are much better than centralised ones (<a href="http://subversion.tigris.org/">svn</a>, <a href="http://www.nongnu.org/cvs/">cvs</a>, etc.) (probably will write about this a post at a later point, but not now)</p>

<p>this is about why git is not suitable for me.</p>

<p>intro:</p>

<p>in short, git was created when the kernel developers needed a version control system after the <a href="http://en.wikipedia.org/wiki/Git_%28software%29#Early_history">BitKeeper problems</a>, so Linus wrote Git.</p>

<p>it&#8217;s a very powerful, and extremely fast version control system. i think, if i would have to decide purely on the features, probably Git would be the winner.</p>

<p>the problem:</p>

<p>but the problem with git is the ..hmmm.. mentality?</p>

<p>it was written (primarily) for the kernel developers originally, and somehow what&#8217;s user-friendly for them is not always user-friendly for me.</p>

<p>let&#8217;s take a recent example, which i think nicely characterizes the issue:</p>

<p>( <a href="http://article.gmane.org/gmane.comp.version-control.git/54446">the discussion on the git mailing-list</a> )</p>

<p>when you use git, anytime you can do &#8220;git diff&#8221; which shows you what changed since the last commit, and &#8220;git stat&#8221; which shows you which files changed since the last commit (this is not an exact definition, but it&#8217;s more&amp;less like that).</p>

<p>someone found out, that if he just re-saves a file in the repository without changing it (or in unix-speak: &#8220;touch myfile&#8221;),
then:</p>

<ol>
<li>&#8220;git diff&#8221; will mention the file, but show an empty diff</li>
<li>&#8220;git status&#8221; will not list the given file</li>
<li>if he does &#8220;git diff&#8221; again (after the &#8220;git status&#8221;), then it will not even mention the file</li>
</ol>

<p>so in short, &#8220;git diff&#8221; behaves differently before &#8220;git status&#8221; and after &#8220;git status&#8221;.</p>

<p>when he asked on the mailing list, he was informed that this is not a bug, because for performance reasons &#8220;git status&#8221; does some things to the repository, which cause that the touched-file does not show up at the second &#8220;git diff&#8221;.</p>

<p>when he argued that &#8220;git status&#8221; should be a read-only operation (so that doing it should not affect the behavior of the other commands), he was told that &#8220;git status&#8221; is not a read-only operation, because in reality it does some internal things in the repository, and also that if this would be read-only, then some things might become slower, etc.</p>

<p>then he argued that while it can be true, that &#8220;git status&#8221; is not read-only from the implementation point of view, it still should be read-only from the user&#8217;s point of view</p>

<p>(for example imagine a simple form of caching of anything.. when you first request some data, they are retrieved, cached and given to you, but when you request it next time, they arrive from the cache. so from the implementation point of view, the retrieval-operation is not read-only, because it writes to the cache, but from the user&#8217;s point of view it&#8217;s a read-only operation (because to the world outside of the implementation, it behaves as read-only))</p>

<p>but somehow his argument did not get through&#8230;</p>

<p>so currently i am not sure if the problem is that:</p>

<ul>
<li>the git-developers are not able to understand this distinction between being read-only from the implementation point of view and being read-only from the user&#8217;s point of view</li>
</ul>

<p>or</p>

<ul>
<li>the git-developers think that this property of &#8220;git status&#8221; is not important enough to maybe sacrifice a little performance for it</li>
</ul>

<p>but whichever is the reason, it just proves for me that git is suitable not for me.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>[EDIT (2008/06/23): (based on the first commenter&#8217;s message, it seems the issue i complained about here has been addressed in Git)</p>

<p>i am very interested in distributed version control systems, so i follow the mailing lists of several of them (<a href="http://bazaar-vcs.org/">bzr</a>, <a href="http://git.or.cz/">git</a>, <a href="http://selenic.com/mercurial">hg</a>)&#8230;</p>

<p>currently my favourite is mercurial btw&#8230;</p>

<p>but this post is not about why i chose mercurial.</p>

<p>also not about why distributed version controls are much better than centralised ones (<a href="http://subversion.tigris.org/">svn</a>, <a href="http://www.nongnu.org/cvs/">cvs</a>, etc.) (probably will write about this a post at a later point, but not now)</p>

<p>this is about why git is not suitable for me.</p>

<p>intro:</p>

<p>in short, git was created when the kernel developers needed a version control system after the <a href="http://en.wikipedia.org/wiki/Git_%28software%29#Early_history">BitKeeper problems</a>, so Linus wrote Git.</p>

<p>it&#8217;s a very powerful, and extremely fast version control system. i think, if i would have to decide purely on the features, probably Git would be the winner.</p>

<p>the problem:</p>

<p>but the problem with git is the ..hmmm.. mentality?</p>

<p>it was written (primarily) for the kernel developers originally, and somehow what&#8217;s user-friendly for them is not always user-friendly for me.</p>

<p>let&#8217;s take a recent example, which i think nicely characterizes the issue:</p>

<p>( <a href="http://article.gmane.org/gmane.comp.version-control.git/54446">the discussion on the git mailing-list</a> )</p>

<p>when you use git, anytime you can do &#8220;git diff&#8221; which shows you what changed since the last commit, and &#8220;git stat&#8221; which shows you which files changed since the last commit (this is not an exact definition, but it&#8217;s more&amp;less like that).</p>

<p>someone found out, that if he just re-saves a file in the repository without changing it (or in unix-speak: &#8220;touch myfile&#8221;),
then:</p>

<ol>
<li>&#8220;git diff&#8221; will mention the file, but show an empty diff</li>
<li>&#8220;git status&#8221; will not list the given file</li>
<li>if he does &#8220;git diff&#8221; again (after the &#8220;git status&#8221;), then it will not even mention the file</li>
</ol>

<p>so in short, &#8220;git diff&#8221; behaves differently before &#8220;git status&#8221; and after &#8220;git status&#8221;.</p>

<p>when he asked on the mailing list, he was informed that this is not a bug, because for performance reasons &#8220;git status&#8221; does some things to the repository, which cause that the touched-file does not show up at the second &#8220;git diff&#8221;.</p>

<p>when he argued that &#8220;git status&#8221; should be a read-only operation (so that doing it should not affect the behavior of the other commands), he was told that &#8220;git status&#8221; is not a read-only operation, because in reality it does some internal things in the repository, and also that if this would be read-only, then some things might become slower, etc.</p>

<p>then he argued that while it can be true, that &#8220;git status&#8221; is not read-only from the implementation point of view, it still should be read-only from the user&#8217;s point of view</p>

<p>(for example imagine a simple form of caching of anything.. when you first request some data, they are retrieved, cached and given to you, but when you request it next time, they arrive from the cache. so from the implementation point of view, the retrieval-operation is not read-only, because it writes to the cache, but from the user&#8217;s point of view it&#8217;s a read-only operation (because to the world outside of the implementation, it behaves as read-only))</p>

<p>but somehow his argument did not get through&#8230;</p>

<p>so currently i am not sure if the problem is that:</p>

<ul>
<li>the git-developers are not able to understand this distinction between being read-only from the implementation point of view and being read-only from the user&#8217;s point of view</li>
</ul>

<p>or</p>

<ul>
<li>the git-developers think that this property of &#8220;git status&#8221; is not important enough to maybe sacrifice a little performance for it</li>
</ul>

<p>but whichever is the reason, it just proves for me that git is suitable not for me.</p>
    ]]></content>
  </entry>
  <entry>
    <title>switched to wp-syntax</title>
    <link rel="alternate" type="text/html" href="http://www.nekomancer.net/blog/archives/switched-to-wp-syntax" />
    <id>http://www.nekomancer.net/blog/archives/switched-to-wp-syntax</id>
    <published>2007-08-09T03:37:29-05:00</published>
    <updated>2008-03-28T18:46:28-05:00</updated>
    <author>
      <name>gabor</name>
    </author>
    <category term="42" />
    <summary type="html"><![CDATA[<p>until now i was using <a href="http://indyjt.com/software/">SyntHihol</a> for source-code syntax-highlighting, but i always had problems with having it play nicely with <a href="http://daringfireball.net/projects/markdown/">markdown</a> (i&#8217;m using the <a href="http://www.michelf.com/projects/php-markdown/">wordpress markdown plugin</a> to write my posts).</p>

<p>the problem is/was that the way to tell SynthHihol to syntax-highlight a given part of the post. you have to put that part between
<span class="geshifilter"><span class="geshifilter"><code class="geshifilter-text">&amp;amp;lt;pre lang=&amp;quot;language-name&amp;quot;&amp;amp;gt;</code></span></span> and <span class="geshifilter"><span class="geshifilter"><code class="geshifilter-text">&amp;amp;lt;/pre&amp;amp;gt;</code></span></span> this is quite reasonable, but the problem is that markdown&#8217;s <span class="geshifilter"><span class="geshifilter"><code class="geshifilter-text">&amp;amp;lt;pre&amp;amp;gt;</code></span></span> is not customizable, so there&#8217;s no way to add a language-attribute to it.</p>

<p>later, when i was searching for an alternative syntax-highlighting plugin for wordpress, i found wp-syntax. unfortunately it had the same problem. but then i asked about my problem on the wordpress-forums, and got an <a href="http://wordpress.org/support/topic/129389?replies=3#post-600139">answer</a> .and it works.</p>

<p>while the answer is for wp-syntax, probably the same thing would work also for SyntHihol.</p>

<p>i also switched from SyntHihol to wp-syntax, because it seems to be better maintained.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>until now i was using <a href="http://indyjt.com/software/">SyntHihol</a> for source-code syntax-highlighting, but i always had problems with having it play nicely with <a href="http://daringfireball.net/projects/markdown/">markdown</a> (i&#8217;m using the <a href="http://www.michelf.com/projects/php-markdown/">wordpress markdown plugin</a> to write my posts).</p>

<p>the problem is/was that the way to tell SynthHihol to syntax-highlight a given part of the post. you have to put that part between
<span class="geshifilter"><code class="geshifilter-text">&amp;lt;pre lang=&quot;language-name&quot;&amp;gt;</code></span> and <span class="geshifilter"><code class="geshifilter-text">&amp;lt;/pre&amp;gt;</code></span> this is quite reasonable, but the problem is that markdown&#8217;s <span class="geshifilter"><code class="geshifilter-text">&amp;lt;pre&amp;gt;</code></span> is not customizable, so there&#8217;s no way to add a language-attribute to it.</p>

<p>later, when i was searching for an alternative syntax-highlighting plugin for wordpress, i found wp-syntax. unfortunately it had the same problem. but then i asked about my problem on the wordpress-forums, and got an <a href="http://wordpress.org/support/topic/129389?replies=3#post-600139">answer</a> .and it works.</p>

<p>while the answer is for wp-syntax, probably the same thing would work also for SyntHihol.</p>

<p>i also switched from SyntHihol to wp-syntax, because it seems to be better maintained.</p>
    ]]></content>
  </entry>
  <entry>
    <title>Java/C++ generics/templates</title>
    <link rel="alternate" type="text/html" href="http://www.nekomancer.net/blog/archives/java-cpp-generics-templates" />
    <id>http://www.nekomancer.net/blog/archives/java-cpp-generics-templates</id>
    <published>2006-12-06T02:40:13-06:00</published>
    <updated>2008-03-28T19:36:04-05:00</updated>
    <author>
      <name>gabor</name>
    </author>
    <category term="java" />
    <category term="programming" />
    <summary type="html"><![CDATA[<p>I&#8217;ve read today this <a href="http://www.peerbox.com:8668/space/start/2006-12-04/1#Java_vs_C++_Performance">blog entry about java/c++ performance</a> .</p>

<p>i agree with most of his arguments, but the generics one&#8230;</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>I&#8217;ve read today this <a href="http://www.peerbox.com:8668/space/start/2006-12-04/1#Java_vs_C++_Performance">blog entry about java/c++ performance</a> .</p>

<p>i agree with most of his arguments, but the generics one&#8230; well&#8230;</p>

<p>i wanted to post a comment on his blog, but it kept asking me to login when i wanted to post a comment, and i couldn&#8217;t find a way to register, so i am posting my &#8220;reply&#8221; here:</p>

<p>where he argues about java/c++ generics/templates, he says that the java ones are basically better.
while it might be true, that there are certain enhancements in the way java does templates,
we must not forget, that there are certain very useful things one can do with templates, but cannot with generics.</p>

<p>example</p>

<div class="geshifilter"><pre class="geshifilter-cpp"><span style="color: #339900;">#include &lt;iostream&gt;</span>
<span style="color: #339900;">#include &lt;string&gt;</span>
&nbsp;
<span style="color: #0000ff;">using</span> <span style="color: #0000ff;">namespace</span> std;
&nbsp;
<span style="color: #0000ff;">class</span> Clazz1
<span style="color: #008000;">&#123;</span>
    <span style="color: #0000ff;">public</span><span style="color: #008080;">:</span>
    string get_hello_message<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>;
<span style="color: #008000;">&#125;</span>;
&nbsp;
string Clazz1<span style="color: #008080;">::</span><span style="color: #00eeff;">get_hello_message</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    <span style="color: #0000ff;">return</span> string<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;Clazz1.hello&quot;</span><span style="color: #008000;">&#41;</span>;
<span style="color: #008000;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #0000ff;">class</span> Clazz2
<span style="color: #008000;">&#123;</span>
    <span style="color: #0000ff;">public</span><span style="color: #008080;">:</span>
    string get_hello_message<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>;
<span style="color: #008000;">&#125;</span>;
&nbsp;
string Clazz2<span style="color: #008080;">::</span><span style="color: #00eeff;">get_hello_message</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    <span style="color: #0000ff;">return</span> string<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;Clazz2.hello&quot;</span><span style="color: #008000;">&#41;</span>;
<span style="color: #008000;">&#125;</span>
&nbsp;
&nbsp;
&nbsp;
<span style="color: #0000ff;">template</span> <span style="color: #000080;">&lt;</span><span style="color: #0000ff;">class</span> T<span style="color: #000080;">&gt;</span>
T say_hello<span style="color: #008000;">&#40;</span>T obj<span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    <span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;</span> <span style="color: #000080;">&lt;</span> obj.<span style="color: #00eeff;">get_hello_message</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #000080;">&lt;&lt;</span> endl;
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #0000ff;">int</span> main<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
Clazz1 c1;
Clazz2 c2;
say_hello<span style="color: #008000;">&#40;</span>c1<span style="color: #008000;">&#41;</span>;
say_hello<span style="color: #008000;">&#40;</span>c2<span style="color: #008000;">&#41;</span>;
&nbsp;
<span style="color: #0000ff;">return</span> <span style="color: #0000dd;">0</span>;
<span style="color: #008000;">&#125;</span></pre></div>

<p>in this C++ program i define 2 classes, both have a method called get&#95;hello&#95;message, but the two classes are not related to each other.
then i define a function, that takes an object of any type (and calls it&#8217;s get&#95;hello&#95;message method.</p>

<p>try this in java :)</p>
    ]]></content>
  </entry>
  <entry>
    <title>check if your site validates using your google sitemap</title>
    <link rel="alternate" type="text/html" href="http://www.nekomancer.net/blog/archives/validate-using-sitemap" />
    <id>http://www.nekomancer.net/blog/archives/validate-using-sitemap</id>
    <published>2006-11-26T15:27:42-06:00</published>
    <updated>2008-03-28T19:34:54-05:00</updated>
    <author>
      <name>gabor</name>
    </author>
    <category term="django" />
    <category term="42" />
    <category term="computers" />
    <summary type="html"><![CDATA[<p>i was playing with the google sitemap (means i was activating the google sitemap support in <a href="http://www.djangoproject.com">django</a> :)</p>

<p>and then i had an idea&#8230; this sitemap basically describes all the urls of a site. with this, i could simply check all my urls on the w3 validator. automatically. every night, for example.</p>

<p>but this requires to be able to get some kind of machine-readable output from the w3 validator.</p>

<p>as it turns out, there are 2 ways:</p>

<ul>
<li>the normal validating url looks like : http://validator.w3.org/check?uri=[escaped url] .</li>
</ul>
    ]]></summary>
    <content type="html"><![CDATA[<p>i was playing with the google sitemap (means i was activating the google sitemap support in <a href="http://www.djangoproject.com">django</a> :)</p>

<p>and then i had an idea&#8230; this sitemap basically describes all the urls of a site. with this, i could simply check all my urls on the w3 validator. automatically. every night, for example.</p>

<p>but this requires to be able to get some kind of machine-readable output from the w3 validator.</p>

<p>as it turns out, there are 2 ways:</p>

<ul>
<li>the normal validating url looks like : http://validator.w3.org/check?uri=[escaped url] . if you add &#8220;&amp;output=soap12&#8221; to it, then it returns an xml file, which describes the validation results</li>
<li>regardless of the output-method (human-readable html, or machine-readable xml), the validator adds several custom headers to the http response. one of them is &#8220;x-w3c-validator-errors&#8221;, which returns the number of validation errors. if there are no errors, it&#8217;s zero.</li>
</ul>

<p>i decided to use the second approach, mostly because it&#8217;s simpler.</p>

<p>so i wrote a simple python script, that:</p>

<ol>
<li>fetches the sitemap file</li>
<li>submits every url in it to the validator, and extracts the validation-error-count.</li>
</ol>

<p>the script turned out to be very simple:</p>

<div class="geshifilter"><pre class="geshifilter-python"><span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">urllib2</span> <span style="color: #ff7700;font-weight:bold;">import</span> urlopen
<span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">httplib</span> <span style="color: #ff7700;font-weight:bold;">import</span> HTTPConnection
<span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">urllib</span> <span style="color: #ff7700;font-weight:bold;">import</span> quote
<span style="color: #ff7700;font-weight:bold;">from</span> elementtree <span style="color: #ff7700;font-weight:bold;">import</span> ElementTree
<span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">time</span> <span style="color: #ff7700;font-weight:bold;">import</span> sleep
&nbsp;
SITEMAP_URL = <span style="color: #483d8b;">'http://nekomancer.net/sitemap.xml'</span>
VALIDATOR_URL = <span style="color: #483d8b;">'validator.w3.org'</span>
&nbsp;
LOC_LOCATION = <span style="color: #483d8b;">'{http://www.google.com/schemas/sitemap/0.84}url/{http://www.google.com/schemas/sitemap/0.84}loc'</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> get_urls<span style="color: black;">&#40;</span>sitemap_url<span style="color: black;">&#41;</span>:
    c = urlopen<span style="color: black;">&#40;</span>sitemap_url<span style="color: black;">&#41;</span>
    data = c.<span style="color: black;">read</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    c.<span style="color: black;">close</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    tree = ElementTree.<span style="color: black;">fromstring</span><span style="color: black;">&#40;</span>data<span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: black;">&#91;</span>loc.<span style="color: black;">text</span>.<span style="color: black;">strip</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">for</span> loc <span style="color: #ff7700;font-weight:bold;">in</span> tree.<span style="color: black;">findall</span><span style="color: black;">&#40;</span>LOC_LOCATION<span style="color: black;">&#41;</span><span style="color: black;">&#93;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> get_error_count<span style="color: black;">&#40;</span>url<span style="color: black;">&#41;</span>:
    c = HTTPConnection<span style="color: black;">&#40;</span>VALIDATOR_URL<span style="color: black;">&#41;</span>
    c.<span style="color: black;">request</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'HEAD'</span>,<span style="color: #483d8b;">'/check?uri=%s'</span> <span style="color: #66cc66;">%</span> quote<span style="color: black;">&#40;</span>url<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
    r = c.<span style="color: black;">getresponse</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    c.<span style="color: black;">close</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">int</span><span style="color: black;">&#40;</span>r.<span style="color: black;">getheader</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'x-w3c-validator-errors'</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
urls = get_urls<span style="color: black;">&#40;</span>SITEMAP_URL<span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">for</span> url <span style="color: #ff7700;font-weight:bold;">in</span> urls:
    <span style="color: #ff7700;font-weight:bold;">print</span> get_error_count<span style="color: black;">&#40;</span>url<span style="color: black;">&#41;</span>,url
    sleep<span style="color: black;">&#40;</span><span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span></pre></div>

<p>to parse the sitemap.xml i chose to use ElementTree, but i could have used also regular expressions, to match the <code>&lt;loc&gt;URL&lt;/loc&gt;</code> parts</p>
    ]]></content>
  </entry>
  <entry>
    <title>reasons to learn c</title>
    <link rel="alternate" type="text/html" href="http://www.nekomancer.net/blog/archives/reasons-to-learn-c" />
    <id>http://www.nekomancer.net/blog/archives/reasons-to-learn-c</id>
    <published>2006-11-26T09:37:37-06:00</published>
    <updated>2008-03-28T18:46:28-05:00</updated>
    <author>
      <name>gabor</name>
    </author>
    <category term="computers" />
    <summary type="html"><![CDATA[<p>i found an <a href="http://www.jubling.com/ten-reasons-why-every-programmer-should-learn-c.html">article</a> using Digg, which gives ten reasons, why every programmer should learn C.</p>

<p>i personally think, that a programmer should learn C. it&#8217;s used in many areas, so it comes handy on such cases. but there&#8217;s no need to learn a lot of it. there&#8217;s no need imho to learn how to write complex programs in it. just learn the basic stuff (hello world, fibonacci, read/write files, basic string-manipulation, etc.).</p>

<p>but the arguments proposed in the article seem wrong/incomplete for me. well, some of them are mostly correct, some are half-correct, and some are plain wrong. generally the problem with it is that the author seems to have come from a C/C++/Java/C# world, so he completely ignores the rest (ruby, python, smalltalk, lisp, haskell, ocaml, erlang etc.)</p>

<p>so let&#8217;s look at the arguments:</p>

<blockquote>
  <p>1) C is lower level then other programming languages (C++, Java). Programming at a lower level allows you
  to further your understanding of computers, as a whole.</p>
</blockquote>

<p>this is correct, but if it is so, why don&#8217;t you learn assembler? it&#8217;s even lower lever than C.</p>

<p>></p>

<blockquote>
  <p>2) Device drivers and operating systems are written exclusively in C. Now, you may never write a device driver
  or an operating system, but what if you are ever required to modify one?</p>
</blockquote>

<p>while it&#8217;s correct that most of the operating systems are written in C, not all of them  (for example, <a href="http://programatica.cs.pdx.edu/House/">House</a> is an operating system written in haskell).</p>

<p>also, for a programmer there are usually a plenty of new technologies he can learn about, so he should always think about if it pays off or not.
and, well, for me, writing op-systems and device drivers does not seem that interesting.</p>

<p>></p>

<blockquote>
  <p>3) What if you ever want to get a job programming microcontrollers? They are programmed in C. Are you going
   to limit your possible list of jobs because you didn&#8217;t want to learn a new language?</p>
</blockquote>

<p>again, the same as #2. it depends on whether you&#8217;d like to program microcontrollers or not.</p>

<p>></p>

<blockquote>
  <p>4) C programs are smaller and faster then any other program created in a different language. Sometimes your program
   needs that speed boost that only C can give it.</p>
</blockquote>

<p>not true.</p>

<ul>
<li>if we follow his analogy (lower-level language means faster programs), then we can also say that Assembler is faster than C</li>
<li>on the other hand, the optimizers for higher-level languages are becoming faster and faster&#8230; like java&#8217;s Just In Time Compiler etc.
check for example <a href="http://shootout.alioth.debian.org/">The Computer Language Shootout</a>. you will see that the C solution is not
always the fastest (sometimes java is faster for example). of course, the C version is always very fast, no question there. but saying
that it&#8217;s always THE FASTEST, is wrong.</li>
</ul>

<p>></p>

<blockquote>
  <p>5) If you have learned C, you can learn any modern programming language. The reason behind this is that
  all modern programming languages are based on C (Java, C++, C#, etc).</p>
</blockquote>

<p>somehow the author of the article does not realise that using phrases with &#8220;all&#8221; is very dangerous. did he really check all the
obscure, niche programming languages and made sure that they are all based on C?</p>

<p>for example, i&#8217;m pretty sure <a href="http://en.wikipedia.org/wiki/Brainfuck">Brainfuck</a> is not. but to come back to &#8220;more mainstream&#8221; languages,
most of the functional ones (like <a href="http://shootout.alioth.debian.org/gp4/benchmark.php?test=binarytrees&amp;lang=ocaml&amp;id=4">OCaml</a>, <a href="http://shootout.alioth.debian.org/gp4/benchmark.php?test=binarytrees&amp;lang=ghc&amp;id=2">Haskell</a> or <a href="http://shootout.alioth.debian.org/gp4/benchmark.php?test=binarytrees&amp;lang=sbcl&amp;id=2">Lisp</a> do not look like C programs at all (just btw: all 3 of the linked programs were <a href="http://shootout.alioth.debian.org/gp4/benchmark.php?test=binarytrees&amp;lang=all_">faster</a>  in the binaryTree test than the C version :)</p>

<p>></p>

<blockquote>
  <p>6) Because C has been around for many years, it has a large community and collective code base.
  This allows you to quickly and efficiently implement new algorithms or functions that have been programmed before.</p>
</blockquote>

<p>ok</p>

<p>></p>

<blockquote>
  <p>7) C is the language of the Open Source community. The Open Source poster child, Linux, was coded in C.
  If you know C, you can participate in and contribute to numerous Open Source communities like Source Forge.</p>
</blockquote>

<p>all what he says here is true.
but, check this <a href="http://www.cs.berkeley.edu/~flab/languages.html">Source Forge statistics</a>:</p>

<p>the most used language on SF is (at least was at the point where it was measued in 2006) Java, followed by C++, followed by C. (and btw. check the &#8220;popularity&#8221; of C in the graph. see the sinking blue line? :)</p>

<p>in other words: while it&#8217;s true, that there are many C projects on SF, there are more java projects there.
so if you base your decision purely on SF-popularity, Java is a better choice.</p>

<blockquote>
  <p>8) C is the only language that teaches you what pointers really are. C# and Java skip the subject completely.
  It is pointers that give C its power.</p>
</blockquote>

<p>true.
but using this argument, i could say, that if you don&#8217;t use C, you don&#8217;t need to have/use/understand it&#8217;s power. so why bother with pointers?</p>

<p>for some strange reason, many people think that pointers are the most important concept in programming.
there are many other hard (imho much harder than pointers) areas in programming, like concurrency or distributed-programming.</p>

<p>></p>

<blockquote>
  <p>9) C is still the most commonly required language for programming jobs.
  It is well worth your time to get C under your belt.</p>
</blockquote>

<p>hmm.. i would like to see the statistics&#8230; i also cannot dig up a statistics currently, but if i remember correctly, visual-basic was also quite popular&#8230;
></p>

<blockquote>
  <p>10) Anything that has a microprocessor in it has support for C. From your microwave to your cell phone,
  C powers technology.</p>
</blockquote>

<p>how is this different from #3?</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>i found an <a href="http://www.jubling.com/ten-reasons-why-every-programmer-should-learn-c.html">article</a> using Digg, which gives ten reasons, why every programmer should learn C.</p>

<p>i personally think, that a programmer should learn C. it&#8217;s used in many areas, so it comes handy on such cases. but there&#8217;s no need to learn a lot of it. there&#8217;s no need imho to learn how to write complex programs in it. just learn the basic stuff (hello world, fibonacci, read/write files, basic string-manipulation, etc.).</p>

<p>but the arguments proposed in the article seem wrong/incomplete for me. well, some of them are mostly correct, some are half-correct, and some are plain wrong. generally the problem with it is that the author seems to have come from a C/C++/Java/C# world, so he completely ignores the rest (ruby, python, smalltalk, lisp, haskell, ocaml, erlang etc.)</p>

<p>so let&#8217;s look at the arguments:</p>

<blockquote>
  <p>1) C is lower level then other programming languages (C++, Java). Programming at a lower level allows you
  to further your understanding of computers, as a whole.</p>
</blockquote>

<p>this is correct, but if it is so, why don&#8217;t you learn assembler? it&#8217;s even lower lever than C.</p>

<p>></p>

<blockquote>
  <p>2) Device drivers and operating systems are written exclusively in C. Now, you may never write a device driver
  or an operating system, but what if you are ever required to modify one?</p>
</blockquote>

<p>while it&#8217;s correct that most of the operating systems are written in C, not all of them  (for example, <a href="http://programatica.cs.pdx.edu/House/">House</a> is an operating system written in haskell).</p>

<p>also, for a programmer there are usually a plenty of new technologies he can learn about, so he should always think about if it pays off or not.
and, well, for me, writing op-systems and device drivers does not seem that interesting.</p>

<p>></p>

<blockquote>
  <p>3) What if you ever want to get a job programming microcontrollers? They are programmed in C. Are you going
   to limit your possible list of jobs because you didn&#8217;t want to learn a new language?</p>
</blockquote>

<p>again, the same as #2. it depends on whether you&#8217;d like to program microcontrollers or not.</p>

<p>></p>

<blockquote>
  <p>4) C programs are smaller and faster then any other program created in a different language. Sometimes your program
   needs that speed boost that only C can give it.</p>
</blockquote>

<p>not true.</p>

<ul>
<li>if we follow his analogy (lower-level language means faster programs), then we can also say that Assembler is faster than C</li>
<li>on the other hand, the optimizers for higher-level languages are becoming faster and faster&#8230; like java&#8217;s Just In Time Compiler etc.
check for example <a href="http://shootout.alioth.debian.org/">The Computer Language Shootout</a>. you will see that the C solution is not
always the fastest (sometimes java is faster for example). of course, the C version is always very fast, no question there. but saying
that it&#8217;s always THE FASTEST, is wrong.</li>
</ul>

<p>></p>

<blockquote>
  <p>5) If you have learned C, you can learn any modern programming language. The reason behind this is that
  all modern programming languages are based on C (Java, C++, C#, etc).</p>
</blockquote>

<p>somehow the author of the article does not realise that using phrases with &#8220;all&#8221; is very dangerous. did he really check all the
obscure, niche programming languages and made sure that they are all based on C?</p>

<p>for example, i&#8217;m pretty sure <a href="http://en.wikipedia.org/wiki/Brainfuck">Brainfuck</a> is not. but to come back to &#8220;more mainstream&#8221; languages,
most of the functional ones (like <a href="http://shootout.alioth.debian.org/gp4/benchmark.php?test=binarytrees&amp;lang=ocaml&amp;id=4">OCaml</a>, <a href="http://shootout.alioth.debian.org/gp4/benchmark.php?test=binarytrees&amp;lang=ghc&amp;id=2">Haskell</a> or <a href="http://shootout.alioth.debian.org/gp4/benchmark.php?test=binarytrees&amp;lang=sbcl&amp;id=2">Lisp</a> do not look like C programs at all (just btw: all 3 of the linked programs were <a href="http://shootout.alioth.debian.org/gp4/benchmark.php?test=binarytrees&amp;lang=all_">faster</a>  in the binaryTree test than the C version :)</p>

<p>></p>

<blockquote>
  <p>6) Because C has been around for many years, it has a large community and collective code base.
  This allows you to quickly and efficiently implement new algorithms or functions that have been programmed before.</p>
</blockquote>

<p>ok</p>

<p>></p>

<blockquote>
  <p>7) C is the language of the Open Source community. The Open Source poster child, Linux, was coded in C.
  If you know C, you can participate in and contribute to numerous Open Source communities like Source Forge.</p>
</blockquote>

<p>all what he says here is true.
but, check this <a href="http://www.cs.berkeley.edu/~flab/languages.html">Source Forge statistics</a>:</p>

<p>the most used language on SF is (at least was at the point where it was measued in 2006) Java, followed by C++, followed by C. (and btw. check the &#8220;popularity&#8221; of C in the graph. see the sinking blue line? :)</p>

<p>in other words: while it&#8217;s true, that there are many C projects on SF, there are more java projects there.
so if you base your decision purely on SF-popularity, Java is a better choice.</p>

<blockquote>
  <p>8) C is the only language that teaches you what pointers really are. C# and Java skip the subject completely.
  It is pointers that give C its power.</p>
</blockquote>

<p>true.
but using this argument, i could say, that if you don&#8217;t use C, you don&#8217;t need to have/use/understand it&#8217;s power. so why bother with pointers?</p>

<p>for some strange reason, many people think that pointers are the most important concept in programming.
there are many other hard (imho much harder than pointers) areas in programming, like concurrency or distributed-programming.</p>

<p>></p>

<blockquote>
  <p>9) C is still the most commonly required language for programming jobs.
  It is well worth your time to get C under your belt.</p>
</blockquote>

<p>hmm.. i would like to see the statistics&#8230; i also cannot dig up a statistics currently, but if i remember correctly, visual-basic was also quite popular&#8230;
></p>

<blockquote>
  <p>10) Anything that has a microprocessor in it has support for C. From your microwave to your cell phone,
  C powers technology.</p>
</blockquote>

<p>how is this different from #3?</p>
    ]]></content>
  </entry>
  <entry>
    <title>xkcd</title>
    <link rel="alternate" type="text/html" href="http://www.nekomancer.net/blog/archives/xkcd" />
    <id>http://www.nekomancer.net/blog/archives/xkcd</id>
    <published>2006-11-26T06:26:03-06:00</published>
    <updated>2008-03-28T18:46:28-05:00</updated>
    <author>
      <name>gabor</name>
    </author>
    <category term="42" />
    <summary type="html"><![CDATA[<p>today i found a <a href="http://www.xkcd.com">very funny web-comic-like-thing</a> &#8230;. some of my favorite strips:</p>

<p><img src="http://imgs.xkcd.com/comics/mispronouncing.png" alt="example webcomic image" /></p>

<p>&nbsp;</p>

<p><img src="http://imgs.xkcd.com/comics/schrodinger.jpg" alt="example webcomic image" /></p>

<p>&nbsp;</p>

<p><img src="http://imgs.xkcd.com/comics/donald_knuth.png" alt="example webcomic image" /></p>
    ]]></summary>
    <content type="html"><![CDATA[<p>today i found a <a href="http://www.xkcd.com">very funny web-comic-like-thing</a> &#8230;. some of my favorite strips:</p>

<p><img src="http://imgs.xkcd.com/comics/mispronouncing.png" alt="example webcomic image" /></p>

<p>&nbsp;</p>

<p><img src="http://imgs.xkcd.com/comics/schrodinger.jpg" alt="example webcomic image" /></p>

<p>&nbsp;</p>

<p><img src="http://imgs.xkcd.com/comics/donald_knuth.png" alt="example webcomic image" /></p>
    ]]></content>
  </entry>
  <entry>
    <title>java kiss</title>
    <link rel="alternate" type="text/html" href="http://www.nekomancer.net/blog/archives/java-kiss" />
    <id>http://www.nekomancer.net/blog/archives/java-kiss</id>
    <published>2006-11-21T15:42:49-06:00</published>
    <updated>2008-03-28T18:46:28-05:00</updated>
    <author>
      <name>gabor</name>
    </author>
    <category term="computers" />
    <summary type="html"><![CDATA[<p>there&#8217;s a certain intrinsic beauty in simple solutions. it&#8217;s also known as the <a href="http://en.wikipedia.org/wiki/KISS_principle">KISS (Keep It Simple, Stupid)  principle</a>.</p>

<p>let me present you java, the programming language:</p>

<ul>
<li>the subversion repository is at: https://openjdk.dev.java.net/svn/openjdk/trunk , username guest, no password.</li>
<li>the license is GPLv2.</li>
</ul>

<p>enjoy.</p>

<p>ps1: to be fair, there are still some (hopefully temporary) <a href="http://www.sun.com/software/opensource/java/faq.jsp#h">blurry parts</a>. but the rest is simple. i do not develop in java anymore (switched to python), but i can only admire the elegance of how SUN managed to open-source java. no tricky licenses, no obscure ways to get the code. i&#8217;m sure for the visual-C++ developing slaves of the microsoft world this seems alien and discomforting. but for the rest of us, it&#8217;s a piece of elegance.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>there&#8217;s a certain intrinsic beauty in simple solutions. it&#8217;s also known as the <a href="http://en.wikipedia.org/wiki/KISS_principle">KISS (Keep It Simple, Stupid)  principle</a>.</p>

<p>let me present you java, the programming language:</p>

<ul>
<li>the subversion repository is at: https://openjdk.dev.java.net/svn/openjdk/trunk , username guest, no password.</li>
<li>the license is GPLv2.</li>
</ul>

<p>enjoy.</p>

<p>ps1: to be fair, there are still some (hopefully temporary) <a href="http://www.sun.com/software/opensource/java/faq.jsp#h">blurry parts</a>. but the rest is simple. i do not develop in java anymore (switched to python), but i can only admire the elegance of how SUN managed to open-source java. no tricky licenses, no obscure ways to get the code. i&#8217;m sure for the visual-C++ developing slaves of the microsoft world this seems alien and discomforting. but for the rest of us, it&#8217;s a piece of elegance.</p>
    ]]></content>
  </entry>
  <entry>
    <title>back from dreamhost</title>
    <link rel="alternate" type="text/html" href="http://www.nekomancer.net/blog/archives/back-from-dreamhost" />
    <id>http://www.nekomancer.net/blog/archives/back-from-dreamhost</id>
    <published>2006-11-17T15:48:38-06:00</published>
    <updated>2008-03-28T18:46:28-05:00</updated>
    <author>
      <name>gabor</name>
    </author>
    <category term="computers" />
    <summary type="html"><![CDATA[<p>in an <a href="/blog/archives/switching-to-dreamhost">older post</a> i wrote that i switched to dreamhost for my website.</p>

<p>and ..hmmm&#8230;, now i&#8217;m back :)</p>

<p>why? it&#8217;s hard to say&#8230; first thing is&#8230; you have to understand, is that this whole domain-moving is more like playing/experimenting&#8230; because currently i am not using any extra features&#8230;so all the argumens pro/contra the hosting-change are in the &#8220;what if&#8221; category.</p>

<p>so, i&#8217;m back to my old hosting for now. it does not mean i close my dreamhost account.. it&#8217;s still valid for some months&#8230; so ..who knows :)</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>in an <a href="/blog/archives/switching-to-dreamhost">older post</a> i wrote that i switched to dreamhost for my website.</p>

<p>and ..hmmm&#8230;, now i&#8217;m back :)</p>

<p>why? it&#8217;s hard to say&#8230; first thing is&#8230; you have to understand, is that this whole domain-moving is more like playing/experimenting&#8230; because currently i am not using any extra features&#8230;so all the argumens pro/contra the hosting-change are in the &#8220;what if&#8221; category.</p>

<p>so, i&#8217;m back to my old hosting for now. it does not mean i close my dreamhost account.. it&#8217;s still valid for some months&#8230; so ..who knows :)</p>
    ]]></content>
  </entry>
  <entry>
    <title>semantic porn?</title>
    <link rel="alternate" type="text/html" href="http://www.nekomancer.net/blog/archives/semantic-porn" />
    <id>http://www.nekomancer.net/blog/archives/semantic-porn</id>
    <published>2006-11-14T17:12:19-06:00</published>
    <updated>2008-03-28T18:46:28-05:00</updated>
    <author>
      <name>gabor</name>
    </author>
    <category term="computers" />
    <summary type="html"><![CDATA[<p>the <a href="http://en.wikipedia.org/wiki/Semantic_web">semantic web</a> always interested me. i&#8217;ve read the tutorials on RDF and N3, i even bought a book about it.</p>

<p>but somehow i cannot see how it could help me currently. don&#8217;t get me wrong, i understand it&#8217;s benefits (making the web machine-readable). but i don&#8217;t see any PRACTICAL applications of this technology currently. nevertheless, i&#8217;m always willing to try out new toys in this field.</p>

<p>today i&#8217;ve read a <a href="http://fgiasson.com/blog/index.php/2006/11/14/how_to_participate_to_the_web_3_0_using">blog post about using semantic-web-stuff on your blog</a>. so i immediately decided to try it out.</p>

<p>there was a wordpress plugin recommended, which i installed.</p>

<p>the plugin simply generates some machine-readable about your blog posts in <a href="http://sioc-project.org/">SIOC</a> format.</p>

<p>additionally, after you have set it up, and so you have SIOC data available about your blog, you can notify about your blog posts the <a href="http://pingthesemanticweb.com/">Ping the Semantic Web</a> service, which seems to be a semantic-data indexing/searching system. (this notification can happen automatically by wordpress, if you decide so).</p>

<p>on the <a href="http://pingthesemanticweb.com/">Ping the Semantic Web</a> site, they list the recently updated RDF documents.</p>

<p>and what did i find there? <a href="http://galleries.penthouse.com/labels.rdf">http://galleries.penthouse.com/labels.rdf</a> :)</p>

<p>yes, a link to an RDF document at Penthouse&#8217;s website. i must admit, i was surprised. what do they have to do with RDF? so i went to http://galleries.penthouse.com, which redirected me to http://www.penthouse.com. by checking the source code of the page, i found that they indeed link to an rdf document</p>

<pre></pre>

<p>.</p>

<p>ICRA seems to be a content-rating organization. they have a <a href="http://www.icra.org/label/generator/">web-based questionnaire</a>, which supposedly (info from wikipedia) generates an RDF file, which then describes the rating of the site&#8217;s content, which you can link from your website. the rating seems to be focused on the parental-control aspect.</p>

<p>it was certainly surprising/refreshing to see that one of the early-adopters of the semantic-web technology is a porn site :)</p>

<p>(maybe these porn sites must include some kind of rating/parental-control stuff, i don&#8217;t know. i checked www.playboy.com, and they did not link to any rdf documents&#8230;. )</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>the <a href="http://en.wikipedia.org/wiki/Semantic_web">semantic web</a> always interested me. i&#8217;ve read the tutorials on RDF and N3, i even bought a book about it.</p>

<p>but somehow i cannot see how it could help me currently. don&#8217;t get me wrong, i understand it&#8217;s benefits (making the web machine-readable). but i don&#8217;t see any PRACTICAL applications of this technology currently. nevertheless, i&#8217;m always willing to try out new toys in this field.</p>

<p>today i&#8217;ve read a <a href="http://fgiasson.com/blog/index.php/2006/11/14/how_to_participate_to_the_web_3_0_using">blog post about using semantic-web-stuff on your blog</a>. so i immediately decided to try it out.</p>

<p>there was a wordpress plugin recommended, which i installed.</p>

<p>the plugin simply generates some machine-readable about your blog posts in <a href="http://sioc-project.org/">SIOC</a> format.</p>

<p>additionally, after you have set it up, and so you have SIOC data available about your blog, you can notify about your blog posts the <a href="http://pingthesemanticweb.com/">Ping the Semantic Web</a> service, which seems to be a semantic-data indexing/searching system. (this notification can happen automatically by wordpress, if you decide so).</p>

<p>on the <a href="http://pingthesemanticweb.com/">Ping the Semantic Web</a> site, they list the recently updated RDF documents.</p>

<p>and what did i find there? <a href="http://galleries.penthouse.com/labels.rdf">http://galleries.penthouse.com/labels.rdf</a> :)</p>

<p>yes, a link to an RDF document at Penthouse&#8217;s website. i must admit, i was surprised. what do they have to do with RDF? so i went to http://galleries.penthouse.com, which redirected me to http://www.penthouse.com. by checking the source code of the page, i found that they indeed link to an rdf document</p>

<pre></pre>

<p>.</p>

<p>ICRA seems to be a content-rating organization. they have a <a href="http://www.icra.org/label/generator/">web-based questionnaire</a>, which supposedly (info from wikipedia) generates an RDF file, which then describes the rating of the site&#8217;s content, which you can link from your website. the rating seems to be focused on the parental-control aspect.</p>

<p>it was certainly surprising/refreshing to see that one of the early-adopters of the semantic-web technology is a porn site :)</p>

<p>(maybe these porn sites must include some kind of rating/parental-control stuff, i don&#8217;t know. i checked www.playboy.com, and they did not link to any rdf documents&#8230;. )</p>
    ]]></content>
  </entry>
  <entry>
    <title>switching to dreamhost</title>
    <link rel="alternate" type="text/html" href="http://www.nekomancer.net/blog/archives/switching-to-dreamhost" />
    <id>http://www.nekomancer.net/blog/archives/switching-to-dreamhost</id>
    <published>2006-11-12T07:53:50-06:00</published>
    <updated>2008-03-28T18:46:28-05:00</updated>
    <author>
      <name>gabor</name>
    </author>
    <category term="computers" />
    <summary type="html"><![CDATA[<p>i&#8217;m currently in the middle of switching to <a href="http://www.dreamhost.com">dreamhost</a>.</p>

<p>currently i&#8217;m waiting for the DNS servers to update their data, but basically: if you see this post, then you are seeing my blog already on dreamhost.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>i&#8217;m currently in the middle of switching to <a href="http://www.dreamhost.com">dreamhost</a>.</p>

<p>currently i&#8217;m waiting for the DNS servers to update their data, but basically: if you see this post, then you are seeing my blog already on dreamhost.</p>
    ]]></content>
  </entry>
  <entry>
    <title>wa and ga</title>
    <link rel="alternate" type="text/html" href="http://www.nekomancer.net/blog/archives/wa-ga" />
    <id>http://www.nekomancer.net/blog/archives/wa-ga</id>
    <published>2006-11-05T18:23:06-06:00</published>
    <updated>2008-03-28T18:46:28-05:00</updated>
    <author>
      <name>gabor</name>
    </author>
    <category term="japanese" />
    <summary type="html"><![CDATA[<p>some time ago, i wrote about <a href="http://www.nekomancer.net/blog/archives/tama-nees-long-legs">using WA/GA</a>, and how an article helped me to understand it.</p>

<p>after reading some more about the subject,
it seems that it&#8217;s a bit more complicated.</p>

<p><em>now, i am really, really not that good in japanese, so the following is only how i understood the rules. they might be completely wrong.</em>
the examples were taken from <a href="http://groups.google.com/group/sci.lang.japan">sci.lang.japan</a></p>

<p>generally it seems that you do</p>

<ul>
<li>[interesting] GA [something]</li>
<li>[something] WA [interesting]</li>
</ul>

<p>so, for example, in the following dialogue:</p>

<p>&gt;A: What is Bob?
&gt;B: Bob is an idiot.</p>

<p>the second line is translated using WA:</p>

<p>&gt;B: Bobu WA baka desu.</p>

<p>but in this dialogue:</p>

<p>&gt;A: Who is an idiot?
&gt;B: Bob is an idiot.</p>

<p>GA is used:</p>

<p>&gt;B: Bobu GA baka desu</p>

<p>for this reason, when there is a longer conversation,
it&#8217;s usually started with GA, and continued with WA.</p>

<p>some more examples:</p>

<p>&gt;Inu ga heya ni haitte kimashita.
&gt;Inu wa boku no gohan o tabete shimaimashita.</p>

<p>&nbsp;</p>

<p>&gt;A: Hora, asoko mite. Tanaka-san ga iru. Kare wa eigo no sensei janaika?
&gt;B: Tanakasan wa gakusei-da. Tainakasan ga sensei da.</p>

<p>to learn more, <a href="http://groups.google.com/group/sci.lang.japan/search?group=sci.lang.japan&amp;q=WA+GA">search for &#8220;WA GA&#8221; on the sci.lang.japan group</a></p>
    ]]></summary>
    <content type="html"><![CDATA[<p>some time ago, i wrote about <a href="http://www.nekomancer.net/blog/archives/tama-nees-long-legs">using WA/GA</a>, and how an article helped me to understand it.</p>

<p>after reading some more about the subject,
it seems that it&#8217;s a bit more complicated.</p>

<p><em>now, i am really, really not that good in japanese, so the following is only how i understood the rules. they might be completely wrong.</em>
the examples were taken from <a href="http://groups.google.com/group/sci.lang.japan">sci.lang.japan</a></p>

<p>generally it seems that you do</p>

<ul>
<li>[interesting] GA [something]</li>
<li>[something] WA [interesting]</li>
</ul>

<p>so, for example, in the following dialogue:</p>

<p>&gt;A: What is Bob?
&gt;B: Bob is an idiot.</p>

<p>the second line is translated using WA:</p>

<p>&gt;B: Bobu WA baka desu.</p>

<p>but in this dialogue:</p>

<p>&gt;A: Who is an idiot?
&gt;B: Bob is an idiot.</p>

<p>GA is used:</p>

<p>&gt;B: Bobu GA baka desu</p>

<p>for this reason, when there is a longer conversation,
it&#8217;s usually started with GA, and continued with WA.</p>

<p>some more examples:</p>

<p>&gt;Inu ga heya ni haitte kimashita.
&gt;Inu wa boku no gohan o tabete shimaimashita.</p>

<p>&nbsp;</p>

<p>&gt;A: Hora, asoko mite. Tanaka-san ga iru. Kare wa eigo no sensei janaika?
&gt;B: Tanakasan wa gakusei-da. Tainakasan ga sensei da.</p>

<p>to learn more, <a href="http://groups.google.com/group/sci.lang.japan/search?group=sci.lang.japan&amp;q=WA+GA">search for &#8220;WA GA&#8221; on the sci.lang.japan group</a></p>
    ]]></content>
  </entry>
  <entry>
    <title>blog updates</title>
    <link rel="alternate" type="text/html" href="http://www.nekomancer.net/blog/archives/blog-updates" />
    <id>http://www.nekomancer.net/blog/archives/blog-updates</id>
    <published>2006-11-03T18:31:03-06:00</published>
    <updated>2008-03-28T18:46:28-05:00</updated>
    <author>
      <name>gabor</name>
    </author>
    <category term="computers" />
    <summary type="html"><![CDATA[<p>i changed some things on my blog, i hope it works better now:</p>

<ul>
<li>i upgraded my spam-filter ( <a href="http://www.homelandstupidity.us/software/bad-behavior/">Bad Behavior</a> ) to it&#8217;s newest version.

<ul>
<li>the reason was that suddenly i was unable to log-in to my blog-admin. i got an error 412 (Precondition failed). phew, i had no idea what that error means (i still don&#8217;t have :-), but after some googling i found out that it&#8217;s Bad Behavior&#8217;s fault. after an upgrade, it works fine.</li>
<li>btw. if someone cares to comment&#8230; which wordpress smap-filter-plugins are usable? Akismet?</li>
</ul></li>
<li>disabled the page-caching in wordpress (wp-cache). the caching itself worked fine, but it removed a lot of response-headers (Content-type, for example).

<ul>
<li>this is how a respone looks like without wp-cache:</li>
</ul></li>
</ul>

<pre>
    HTTP/1.1 200 OK
    Date: Sat, 04 Nov 2006 00:21:35 GMT
    Server: Apache
    X-Powered-By: PHP/4.4.4-pl6-gentoo with Hardening-Patch
    X-Pingback: http://www.nekomancer.net/blog/xmlrpc.php
    ETag: "ebbfe181885d8db233d59464b69d0389"
    Set-Cookie: bb2_screener_=1162599696+217.67.16.60; path=/blog/
    Last-Modified: Wed, 01 Nov 2006 23:50:08 GMT
    Content-Type: application/atom+xml; charset=UTF-8
    </pre>

<ul>
<li>and this is a response using wp-cache:</li>
</ul>

<pre>
    HTTP/1.1 200 OK
    Date: Sat, 04 Nov 2006 00:22:15 GMT
    Server: Apache
    X-Powered-By: PHP/4.4.4-pl6-gentoo with Hardening-Patch
    Content-Type: text/html
    </pre>

<ul>
<li>the comments can now be previewed using a nice ajax-using plugin ( <a href="http://blog.chweng.idv.tw/wordpress/ajaxified-comment-preview/">Ajaxified Comment Preview</a> )</li>
</ul>
    ]]></summary>
    <content type="html"><![CDATA[<p>i changed some things on my blog, i hope it works better now:</p>

<ul>
<li>i upgraded my spam-filter ( <a href="http://www.homelandstupidity.us/software/bad-behavior/">Bad Behavior</a> ) to it&#8217;s newest version.

<ul>
<li>the reason was that suddenly i was unable to log-in to my blog-admin. i got an error 412 (Precondition failed). phew, i had no idea what that error means (i still don&#8217;t have :-), but after some googling i found out that it&#8217;s Bad Behavior&#8217;s fault. after an upgrade, it works fine.</li>
<li>btw. if someone cares to comment&#8230; which wordpress smap-filter-plugins are usable? Akismet?</li>
</ul></li>
<li>disabled the page-caching in wordpress (wp-cache). the caching itself worked fine, but it removed a lot of response-headers (Content-type, for example).

<ul>
<li>this is how a respone looks like without wp-cache:</li>
</ul></li>
</ul>

<pre>
    HTTP/1.1 200 OK
    Date: Sat, 04 Nov 2006 00:21:35 GMT
    Server: Apache
    X-Powered-By: PHP/4.4.4-pl6-gentoo with Hardening-Patch
    X-Pingback: http://www.nekomancer.net/blog/xmlrpc.php
    ETag: "ebbfe181885d8db233d59464b69d0389"
    Set-Cookie: bb2_screener_=1162599696+217.67.16.60; path=/blog/
    Last-Modified: Wed, 01 Nov 2006 23:50:08 GMT
    Content-Type: application/atom+xml; charset=UTF-8
    </pre>

<ul>
<li>and this is a response using wp-cache:</li>
</ul>

<pre>
    HTTP/1.1 200 OK
    Date: Sat, 04 Nov 2006 00:22:15 GMT
    Server: Apache
    X-Powered-By: PHP/4.4.4-pl6-gentoo with Hardening-Patch
    Content-Type: text/html
    </pre>

<ul>
<li>the comments can now be previewed using a nice ajax-using plugin ( <a href="http://blog.chweng.idv.tw/wordpress/ajaxified-comment-preview/">Ajaxified Comment Preview</a> )</li>
</ul>
    ]]></content>
  </entry>
  <entry>
    <title>feeds and time</title>
    <link rel="alternate" type="text/html" href="http://www.nekomancer.net/blog/archives/feeds-and-time" />
    <id>http://www.nekomancer.net/blog/archives/feeds-and-time</id>
    <published>2006-11-01T17:50:08-06:00</published>
    <updated>2008-03-28T19:31:30-05:00</updated>
    <author>
      <name>gabor</name>
    </author>
    <category term="django" />
    <category term="computers" />
    <summary type="html"><![CDATA[<p>i use a lot of rss/atom feeds. by use i mean that i am reading many news-sites, blogs, etc. using their feeds.</p>

<p>for some reason those feeds always contain the last <em>n</em> entries, where <em>n</em> is a fixed number.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>i use a lot of rss/atom feeds. by use i mean that i am reading many news-sites, blogs, etc. using their feeds.</p>

<p>for some reason those feeds always contain the last <em>n</em> entries, where <em>n</em> is a fixed number. so a feed contains let&#8217;s say the last 10 entries.</p>

<p>this is fine as long as the page (which is represented in the feed) does not get updated too often.</p>

<p>otherwise the following scenario might happen:</p>

<ul>
<li>let&#8217;s say the feed contains the last 10 entries</li>
<li>and you fetch the feed once a day using your feed-reader program</li>
<li>now, for some reason, one day there will be 11 new entries</li>
<li>when you fetch the feed next day, only the last 10 entries will be in the feed</li>
<li>so you missed one article on that website</li>
</ul>

<p>the problem is, that these feeds do not provide any guarantees about their &#8220;completeness&#8221;.</p>

<p>(this is not an &#8220;in theory only&#8221; problem. once i had this exact problem.a website&#8217;s feed only contained the last x (50, iirc) entries, and much more arrived daily. so i kept missing them, and if i wanted to be sure that i saw all of them, i had to manually go through the entries on the site. kind of defeats the purpose of the feed. nowadays i&#8217;m using <a href="http://www.bloglines.com">bloglines</a>, which is fetching the feeds a lot more often than i did, so i do not have the problem with that site anymore)</p>

<p>what i would like to see, is feeds that contain all the entries for a specified timeframe.for example for the last 48 hours. they can contain of course more entries, but they would have to guarantee, that they contain at least all the entries for the last 48 hours. which would mean, that if you fetch the feed daily, you will not miss any entries.</p>

<p>for example, let&#8217;s do it in <a href="http://www.djangoproject.com">django</a>:</p>

<p>django contains a complete feed-framework, with documentation, so first go and <a href="http://www.djangoproject.com/documentation/syndication/">read the documentation</a></p>

<p>as you see, the whole issue of &#8220;showing the last n entries&#8221; is being handled in the <a href="http://www.djangoproject.com/documentation/syndication/#feed-classes">items() method</a>:</p>

<p>(the example from the documentation)</p>

<div class="geshifilter"><pre class="geshifilter-python"><span style="color: #ff7700;font-weight:bold;">def</span> items<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">return</span> NewsItem.<span style="color: black;">objects</span>.<span style="color: black;">order_by</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'-pub_date'</span><span style="color: black;">&#41;</span><span style="color: black;">&#91;</span>:<span style="color: #ff4500;">5</span><span style="color: black;">&#93;</span></pre></div>

<p>we want to return at least 10 entries, and we want to make sure that we return all the entries for the last 48 hours.</p>

<p>so we could use something like this:</p>

<div class="geshifilter"><pre class="geshifilter-python"><span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">datetime</span> <span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">datetime</span>, timedelta
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> items<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
    entries = NewsItem.<span style="color: black;">objects</span>.<span style="color: black;">order_by</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'-pub_date'</span><span style="color: black;">&#41;</span>
    two_days_ago = <span style="color: #dc143c;">datetime</span>.<span style="color: black;">now</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> - timedelta<span style="color: black;">&#40;</span>days=<span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span>
    last_entries = entries.<span style="color: #008000;">filter</span><span style="color: black;">&#40;</span>pub_date__gte = two_days_ago<span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">if</span> last_entries.<span style="color: black;">count</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> <span style="color: #66cc66;">&amp;</span>gt<span style="color: #66cc66;">;</span>= <span style="color: #ff4500;">10</span>:
        <span style="color: #ff7700;font-weight:bold;">return</span> last_entries
    <span style="color: #ff7700;font-weight:bold;">else</span>:
        <span style="color: #ff7700;font-weight:bold;">return</span> entries<span style="color: black;">&#91;</span>:<span style="color: #ff4500;">10</span><span style="color: black;">&#93;</span></pre></div>

<p>and we&#8217;re done.</p>

<p>now if only i could find out how to do it in wordpress (this blog is running on it)</p>

<p>P.S: the code i showed here was not tested extensively, so it might contain bugs. but the basic idea should work.</p>
    ]]></content>
  </entry>
  <entry>
    <title>tama-nee’s long legs</title>
    <link rel="alternate" type="text/html" href="http://www.nekomancer.net/blog/archives/tama-nees-long-legs" />
    <id>http://www.nekomancer.net/blog/archives/tama-nees-long-legs</id>
    <published>2006-11-01T16:42:52-06:00</published>
    <updated>2008-03-28T18:46:28-05:00</updated>
    <author>
      <name>gabor</name>
    </author>
    <category term="anime" />
    <category term="japanese" />
    <summary type="html"><![CDATA[<p>i have been learning japanese for 2-3 years (with bigger/smaller breaks), and the mistery of when to use WA and when GA, and what&#8217;s the difference between them kept eluding me. i&#8217;ve read a lot of examples, and i had a vague feeling about what it should mean and how it should work, but never had a clear understanding of it.</p>

<p>until today, when i have read <a href="http://www.darkmirage.com/2006/07/14/beginners-japanese-chapter-ii-sentences/">part 2 of darkmirage&#8217;s japanese lessons</a>.</p>

<p>generally darkmirage&#8217;s japanese lessons are very unique, because he approaches the japanese language from an anime-centric point of view. his example sentences and explanations all use terms that are known to an anime fan. so it&#8217;s always interesting to read his lessons, even if you already know the topic the lesson is about.</p>

<p>now back to WA/GA.</p>

<p>these 2 dialogues from the mentioned blog post made it clear for me:</p>

<p>&gt; Person A: “tama-nee wa kami ga akakute nagai desu” (Tama-nee has red long hair)
&gt; Person B: “ashi ga nagai desu” (Her legs are long)
&gt; Me: “mune ga ookii desu!” (Her……nevermind)</p>

<p>&nbsp;</p>

<p>&gt; Person A: “doraemon wa ashi ga hikui desu” (Doraemon’s legs are short)
&gt; Person B: “konomi-chan mo hikui desu” (Konomi-chan’s legs are short too)
&gt; Me: “tama-nee wa nagai desu” (Tama-nee’s legs are long)</p>

<p>make sure to read the <a href="http://www.darkmirage.com/2006/07/14/beginners-japanese-chapter-ii-sentences/">whole article</a>, and also the <a href="http://www.darkmirage.com/beginners-japanese-lessons-by-darkmirage/">other lessons</a></p>

<p>EDIT: it seems this topic is a <a href="http://www.nekomancer.net/blog/archives/wa-ga">lot more complicated</a></p>
    ]]></summary>
    <content type="html"><![CDATA[<p>i have been learning japanese for 2-3 years (with bigger/smaller breaks), and the mistery of when to use WA and when GA, and what&#8217;s the difference between them kept eluding me. i&#8217;ve read a lot of examples, and i had a vague feeling about what it should mean and how it should work, but never had a clear understanding of it.</p>

<p>until today, when i have read <a href="http://www.darkmirage.com/2006/07/14/beginners-japanese-chapter-ii-sentences/">part 2 of darkmirage&#8217;s japanese lessons</a>.</p>

<p>generally darkmirage&#8217;s japanese lessons are very unique, because he approaches the japanese language from an anime-centric point of view. his example sentences and explanations all use terms that are known to an anime fan. so it&#8217;s always interesting to read his lessons, even if you already know the topic the lesson is about.</p>

<p>now back to WA/GA.</p>

<p>these 2 dialogues from the mentioned blog post made it clear for me:</p>

<p>&gt; Person A: “tama-nee wa kami ga akakute nagai desu” (Tama-nee has red long hair)
&gt; Person B: “ashi ga nagai desu” (Her legs are long)
&gt; Me: “mune ga ookii desu!” (Her……nevermind)</p>

<p>&nbsp;</p>

<p>&gt; Person A: “doraemon wa ashi ga hikui desu” (Doraemon’s legs are short)
&gt; Person B: “konomi-chan mo hikui desu” (Konomi-chan’s legs are short too)
&gt; Me: “tama-nee wa nagai desu” (Tama-nee’s legs are long)</p>

<p>make sure to read the <a href="http://www.darkmirage.com/2006/07/14/beginners-japanese-chapter-ii-sentences/">whole article</a>, and also the <a href="http://www.darkmirage.com/beginners-japanese-lessons-by-darkmirage/">other lessons</a></p>

<p>EDIT: it seems this topic is a <a href="http://www.nekomancer.net/blog/archives/wa-ga">lot more complicated</a></p>
    ]]></content>
  </entry>
  <entry>
    <title>Manipulators and raw_id_admin</title>
    <link rel="alternate" type="text/html" href="http://www.nekomancer.net/blog/archives/manipulators-and-raw_id_admin" />
    <id>http://www.nekomancer.net/blog/archives/manipulators-and-raw_id_admin</id>
    <published>2006-09-03T17:38:33-05:00</published>
    <updated>2008-03-28T18:46:28-05:00</updated>
    <author>
      <name>gabor</name>
    </author>
    <category term="django" />
    <category term="computers" />
    <summary type="html"><![CDATA[<p>for all Django users&#8230;</p>

<p>please, please, pretty please use <em>raw&#95;id&#95;admin</em> &#40;<a href="http://www.djangoproject.com/documentation/model_api/">django model docs</a>&#41;.</p>

<p>because, when you have a model that contains a ForeignKey (and people usually have ForeignKeys),
then when you use an automatic manipulator for the given model,
it will load in ALL THE DATA FROM ALL THE RELATED MODELS. for example,
if you have 20.000 entries in the related table, then it will load in all those 20.000 entries.</p>

<p>except, if you use <em>raw_id_admin</em>. it&#8217;s an attribute of the ForeignKey, and <a href="http://www.djangoproject.com/documentation/model_api/">contrary to the documentation</a>, it&#8217;s effect is not restricted to the admin-framework.</p>

<p>Joseph Heck made <a href="http://www.rhonabwy.com/wp/2006/08/31/a-subtle-django-performance-hit/">some speed-tests</a> regarding this issue</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>for all Django users&#8230;</p>

<p>please, please, pretty please use <em>raw&#95;id&#95;admin</em> &#40;<a href="http://www.djangoproject.com/documentation/model_api/">django model docs</a>&#41;.</p>

<p>because, when you have a model that contains a ForeignKey (and people usually have ForeignKeys),
then when you use an automatic manipulator for the given model,
it will load in ALL THE DATA FROM ALL THE RELATED MODELS. for example,
if you have 20.000 entries in the related table, then it will load in all those 20.000 entries.</p>

<p>except, if you use <em>raw_id_admin</em>. it&#8217;s an attribute of the ForeignKey, and <a href="http://www.djangoproject.com/documentation/model_api/">contrary to the documentation</a>, it&#8217;s effect is not restricted to the admin-framework.</p>

<p>Joseph Heck made <a href="http://www.rhonabwy.com/wp/2006/08/31/a-subtle-django-performance-hit/">some speed-tests</a> regarding this issue</p>
    ]]></content>
  </entry>
  <entry>
    <title>casual sex in anime vs. american tv</title>
    <link rel="alternate" type="text/html" href="http://www.nekomancer.net/blog/archives/casual-sex-in-anime-vs-american-tv" />
    <id>http://www.nekomancer.net/blog/archives/casual-sex-in-anime-vs-american-tv</id>
    <published>2006-07-20T01:20:00-05:00</published>
    <updated>2008-03-28T18:46:28-05:00</updated>
    <author>
      <name>gabor</name>
    </author>
    <category term="anime" />
    <summary type="html"><![CDATA[<p>this completely describes my opinion:</p>

<p><a href="http://anime.miao.us/archives/2006/01/29/568/">http://anime.miao.us/archives/2006/01/29/568/</a></p>
    ]]></summary>
    <content type="html"><![CDATA[<p>this completely describes my opinion:</p>

<p><a href="http://anime.miao.us/archives/2006/01/29/568/">http://anime.miao.us/archives/2006/01/29/568/</a></p>
    ]]></content>
  </entry>
  <entry>
    <title>europython 2006 slides</title>
    <link rel="alternate" type="text/html" href="http://www.nekomancer.net/blog/archives/europython-2006-slides" />
    <id>http://www.nekomancer.net/blog/archives/europython-2006-slides</id>
    <published>2006-07-10T01:40:39-05:00</published>
    <updated>2008-03-28T18:46:28-05:00</updated>
    <author>
      <name>gabor</name>
    </author>
    <category term="computers" />
    <summary type="html"><![CDATA[<p>if you&#8217;re one of those unluckies (like me), who couldn&#8217;t go to europython-2006, check out the <a href="http://indico.cern.ch/conferenceTimeTable.py?confId=44&amp;detailLevel=contribution&amp;viewMode=room">slides</a></p>
    ]]></summary>
    <content type="html"><![CDATA[<p>if you&#8217;re one of those unluckies (like me), who couldn&#8217;t go to europython-2006, check out the <a href="http://indico.cern.ch/conferenceTimeTable.py?confId=44&amp;detailLevel=contribution&amp;viewMode=room">slides</a></p>
    ]]></content>
  </entry>
  <entry>
    <title>simple file encryption</title>
    <link rel="alternate" type="text/html" href="http://www.nekomancer.net/blog/archives/simple-file-encryption" />
    <id>http://www.nekomancer.net/blog/archives/simple-file-encryption</id>
    <published>2006-06-27T16:33:01-05:00</published>
    <updated>2008-03-28T18:46:28-05:00</updated>
    <author>
      <name>gabor</name>
    </author>
    <category term="computers" />
    <summary type="html"><![CDATA[<p>(this might be old news for the more encryption-oriented readers, but it was very useful for me, so i thought i&#8217;ll just share the info)</p>

<p>for a long time i have been searching for a simple way to encrypt files. my needs were very simple. i needed to encrypt only one file, but the encryption had to be strong. a typical scenario was that i had to transfer a file between two places by uploading to a public place and the downloading from there.</p>

<p>and then i found <a href="http://www.gnupg.org/">gnupg</a>.</p>

<p>it should be available on any linux system. for osx use <a href="http://fink.sourceforge.net/">fink</a> or <a href="http://darwinports.opendarwin.org/">darwinports</a>. (for windows, switch to linux)</p>

<p>let&#8217;s say i have fakatona.mp3.</p>

<p>encryption:</p>

<ul>
<li><span class="geshifilter"><span class="geshifilter"><code class="geshifilter-text">gpg -c fakatona.mp3</code></span></span></li>
<li>this will

<ul>
<li>ask for the password</li>
<li>twice</li>
<li>and encrypt the file into <span class="geshifilter"><span class="geshifilter"><code class="geshifilter-text">fakatona.mp3.gpg</code></span></span></li>
</ul></li>
</ul>

<p>decryption:</p>

<ul>
<li><span class="geshifilter"><span class="geshifilter"><code class="geshifilter-text">gpg fakatona.mp3.gpg</code></span></span></li>
<li>this will

<ul>
<li>ask for the password</li>
<li>decrypt the file</li>
</ul></li>
</ul>

<p>for extra <a href="http://en.wikipedia.org/wiki/Security_through_obscurity">security through obscurity</a> you can rename the encrypted file to basically anything. gpg will figure out the original filename by the decryption.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>(this might be old news for the more encryption-oriented readers, but it was very useful for me, so i thought i&#8217;ll just share the info)</p>

<p>for a long time i have been searching for a simple way to encrypt files. my needs were very simple. i needed to encrypt only one file, but the encryption had to be strong. a typical scenario was that i had to transfer a file between two places by uploading to a public place and the downloading from there.</p>

<p>and then i found <a href="http://www.gnupg.org/">gnupg</a>.</p>

<p>it should be available on any linux system. for osx use <a href="http://fink.sourceforge.net/">fink</a> or <a href="http://darwinports.opendarwin.org/">darwinports</a>. (for windows, switch to linux)</p>

<p>let&#8217;s say i have fakatona.mp3.</p>

<p>encryption:</p>

<ul>
<li><span class="geshifilter"><code class="geshifilter-text">gpg -c fakatona.mp3</code></span></li>
<li>this will

<ul>
<li>ask for the password</li>
<li>twice</li>
<li>and encrypt the file into <span class="geshifilter"><code class="geshifilter-text">fakatona.mp3.gpg</code></span></li>
</ul></li>
</ul>

<p>decryption:</p>

<ul>
<li><span class="geshifilter"><code class="geshifilter-text">gpg fakatona.mp3.gpg</code></span></li>
<li>this will

<ul>
<li>ask for the password</li>
<li>decrypt the file</li>
</ul></li>
</ul>

<p>for extra <a href="http://en.wikipedia.org/wiki/Security_through_obscurity">security through obscurity</a> you can rename the encrypted file to basically anything. gpg will figure out the original filename by the decryption.</p>
    ]]></content>
  </entry>
</feed>
