<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <author>
    <name>Henning Hasemann</name>
  </author>
  <title>Leetless Coding Blog</title>
  <link href="http://leetless.de/" />
  <id>http://leetless.de</id>
  <updated>2012-12-25T15:42:43.301808</updated>
  <entry>
    <title>Path Finding in Grail</title>
    <link href="http://leetless.de/article-pathfinding.html"/>
    <id>http://leetless.de/article-pathfinding.html</id>
    <updated>2012-07-15T00:22:00</updated>
    <content type="html">&lt;!-- .. image:: images/pathfinding/rover.png --&gt;
&lt;img alt=&#34;images/pathfinding/pathfinder.png&#34; class=&#34;float-right&#34; src=&#34;images/pathfinding/pathfinder.png&#34; /&gt;
&lt;p&gt;A topic thats using up my (rare) Grail-time lately is the topic of how to
define where an actor is allowed to walk and how it will find its way
there. I found this question quite fun to work on, as it poses an interesting mix
of theoretical (geometry) and practical (coding) considerations.&lt;/p&gt;
&lt;p&gt;So what is the problem exactly? The answer is: A combination of things:&lt;/p&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;&lt;strong&gt;Restrict the actors movement&lt;/strong&gt; to a certain area that will be defined by
the game programmer, I call this the &lt;em&gt;walkable area&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Come up with a mechanism that allows the actor to &lt;strong&gt;walk&lt;/strong&gt; from one
point in the walkable area to another one. Thereby the actor should
stay in the walkable area at all times, so a path inside the area has to be
found.&lt;/li&gt;
&lt;li&gt;When the user requests to walk to a point &lt;strong&gt;outside the walkable area&lt;/strong&gt;, the
actor should instead walk to some &lt;em&gt;near&lt;/em&gt; point inside the walkable
area, whereas &lt;em&gt;near&lt;/em&gt; is not exactly defined.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It turned out I had to go through a number of idea-implementation iterations
before coming up with something that works really well. Let me give you a
short intro on what we did with respect to the first two points:&lt;/p&gt;
&lt;div class=&#34;section&#34; id=&#34;discarded-approaches-why&#34;&gt;
&lt;h2&gt;Discarded approaches (&amp;amp; why)&lt;/h2&gt;
&lt;div class=&#34;section&#34; id=&#34;pixels&#34;&gt;
&lt;h3&gt;Pixels&lt;/h3&gt;
&lt;p&gt;A pretty intuitive idea to describe areas in a 2D game is always by just
noting the pixels which belong to the area and those who don&#39;t (for example
you could save them as a black/white image). This approach has the nice
practical advantage that its awesomely easy to find out for any given point
whether or not it is in the walkable area.
There is of course no principal necessity of those pixels to be the same size
as the actual displayed pixels.&lt;/p&gt;
&lt;!-- In Grail, we have a coordinate system
resolution that is potentially much
larger than that of the users display. --&gt;
&lt;p&gt;But how large should those pixels be?
If we choose the pixel size too big, the walkable area
will have stair-shaped edges and, even worse, walking along these blocks will
look awkward as the actor will seemingly walk a zig-zag style when being
requested to walk angular lines.
If we choose smaller pixels however, path finding inside the walkable area will
be drastically more expensive (even though, techniques like
&lt;a class=&#34;reference external&#34; href=&#34;https://en.wikipedia.org/wiki/A*&#34;&gt;A*&lt;/a&gt; are applicable).&lt;/p&gt;
&lt;p&gt;So even though there might be a sweet-spot for some situations it always feels
a little dodgy working with these virtual pixels. After all, one of the aims of
Grail is to provide an adventure game engine that scales well with the users
screen resolution.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;walls&#34;&gt;
&lt;h3&gt;Walls&lt;/h3&gt;
&lt;!-- .. figure:: images/pathfinding/walkable_area_01.png --&gt;
&lt;img alt=&#34;images/pathfinding/corner.png&#34; class=&#34;float-left&#34; src=&#34;images/pathfinding/corner.png&#34; /&gt;
&lt;p&gt;The next idea that came to mind was: Just define a number
of walls (in forms of lines) the actor is not allowed to cross.
If we just ensure the walls define a closed shape
(e.g. by obtaining them from the edges of a polygon), there should be no
chance of escape for the actor.
Indeed, that is the case, at least if you have a keen eye on the corner cases
of line intersection calculations.&lt;/p&gt;
&lt;p&gt;However, path finding inside the walkable area again is a little more problematic.
Take for example the picture to the left: The shortest path inside the
walkable area that connects the two given points (red) goes directly
along some of the edges of the polygon. That implies, that if we send the
actor along that path it will walk directly &lt;strong&gt;along&lt;/strong&gt; some of the walls. In
the case shown here, where the target point is well inside the polygon that
isn&#39;t a big problem: We can just &amp;quot;turn off&amp;quot; the wall-crossing detection for as
long as the actor walks its path and turn it back on afterwards.&lt;/p&gt;
&lt;p&gt;The problem occurs however when the target point lies on an edge or a corner
of our polygon or the walk is interrupted halfway through because the user
meanwhile chose a different target:
In that case the actor will stop on a point directly on a
wall and it will depend on rounding whether the character is considered to
be inside or outside the walkable area.
Worse, if the walkable area contains a hole (like P2 or P3 in the figures
below), we might end up in a situation where we don&#39;t even know which of the
two adjacent polygons (the hole and the surrounding polygon) is the walkable area the actor should return to.&lt;/p&gt;
&lt;p&gt;Concluding, two things are missing in this approach:&lt;/p&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;A way to &lt;strong&gt;identify which polygons actually belong to the walkable area&lt;/strong&gt; and
which not to avoid getting trapped &lt;em&gt;outside&lt;/em&gt; of the walkable area if we
leave it for some reason&lt;/li&gt;
&lt;li&gt;For positions near the border of the walkable area we also need a mechanism
that can &lt;strong&gt;bring back the actor&lt;/strong&gt; to a point that is guaranteed to be inside the WA.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;the-working-approach&#34;&gt;
&lt;h2&gt;The working approach&lt;/h2&gt;
&lt;div class=&#34;section&#34; id=&#34;components&#34;&gt;
&lt;h3&gt;Components&lt;/h3&gt;
&lt;img alt=&#34;images/pathfinding/walkable_area_03.png&#34; class=&#34;float-right&#34; src=&#34;images/pathfinding/walkable_area_03.png&#34; /&gt;
&lt;img alt=&#34;images/pathfinding/walkable_area_tree.png&#34; class=&#34;float-right&#34; src=&#34;images/pathfinding/walkable_area_tree.png&#34; /&gt;
&lt;p&gt;In order to tackle the first problem, we define the walkable area by a set of
nested polygons. As those polygons are never overlapping we can represent them
by a tree in which polygon A is a child of polygon B if it is contained in B
completely.
See for example the walkable area figure and the according tree.
This way, we can easily check whether or not any polygon is to be considered
walkable area: The outermost polygon (= root of the tree) is
assumed to be walkable, everything outside of that of course is assumed not to
be walkable.&lt;/p&gt;
&lt;p&gt;Any nested polygons inside the outermost polygon are considered holes, i.e. not
walkable (see P2 and P3). Polygons inside holes are again
walkable areas, and so on. In the tree view that means: If the root is
considered to be at level 0, all polygons on even levels are walkable and all uneven are
not.&lt;/p&gt;
&lt;!-- Where am I?
==================
.. figure:: images/pathfinding/walkable_area_02.png --&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;where-am-i&#34;&gt;
&lt;h3&gt;Where am I?&lt;/h3&gt;
&lt;img alt=&#34;images/pathfinding/walkable_area_02.png&#34; class=&#34;float-right&#34; src=&#34;images/pathfinding/walkable_area_02.png&#34; /&gt;
&lt;p&gt;For actually finding a path given this tree of polygons, we first have to find
out, in which polygon of the tree we actually are. Assume, the actor is
located at the red dot in the figure. We lay a horizontal line through that
position and count the number of intersections with all polygons.
If the line intersects a polygon an uneven number of times on both sides, we can be
sure that the point is located in the interior of that polygon.
However, as there are holes, it might also be in a nested polygon.
Given our polygon tree we thus conduct a binary search for the innermost
polygon that contains the given point (see figure, here P4).&lt;/p&gt;
&lt;p&gt;Having found the polygon we are navigating in, we create a map (as shown in the
figure in &lt;em&gt;Components&lt;/em&gt; for P1), that connects all area corners that can reach
each other. We also connect the start and target positions accordingly (not
shown in the picture). Based on that map we can conduct a &lt;a class=&#34;reference external&#34; href=&#34;http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm&#34;&gt;Dijkstra search&lt;/a&gt; for
the shortest path &lt;a class=&#34;footnote-reference&#34; href=&#34;#id2&#34; id=&#34;id1&#34;&gt;[1]&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;don-t-you-escape&#34;&gt;
&lt;h3&gt;Don&#39;t you escape!&lt;/h3&gt;
&lt;img alt=&#34;images/pathfinding/no_escape.png&#34; class=&#34;float-left&#34; src=&#34;images/pathfinding/no_escape.png&#34; /&gt;
&lt;p&gt;That still leaves one problem open: What do we do when the actor is located
slightly outside of a walkable polygon (e.g. in P3)? (See above for when&amp;amp;why this
might happen).
As we know we are only slightly off and Grail is designed to work with
discrete (although more fine granular than screen resolution) positions, we
can basically just check all of the near positions until we found one that is
located inside the walkable area and gently shift the actor there.&lt;/p&gt;
&lt;p&gt;We do this by simply checking the positions on a spiral around the actors
current position until we found a position that is located inside a walkable
area. To avoid a very long or even endless search in case the application programmer deliberately
put us into non-walkable area, we limit our efforts to a certain
amount of points that are to be tested.&lt;/p&gt;
&lt;p&gt;A possible optimization (that is not yet implemented but should be a total
no-brainer), is to not check every virtual pixel, but make larger steps (e.g.
10 virtual pixels) on the spiral to save computing time (on my machine the
delay for this mechanism is not noticeable even with a pixel-wise spiral
though).&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;conclusion&#34;&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;Seems this post has become one of the somewhat longer ones,
hope you enjoyed it anyway and got a little insight on what
is currently happening in grail development, stay tuned!&lt;/p&gt;
&lt;table class=&#34;docutils footnote&#34; frame=&#34;void&#34; id=&#34;id2&#34; rules=&#34;none&#34;&gt;
&lt;colgroup&gt;&lt;col class=&#34;label&#34; /&gt;&lt;col /&gt;&lt;/colgroup&gt;
&lt;tbody valign=&#34;top&#34;&gt;
&lt;tr&gt;&lt;td class=&#34;label&#34;&gt;&lt;a class=&#34;fn-backref&#34; href=&#34;#id1&#34;&gt;[1]&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Theoretically it might be possible to use &lt;a class=&#34;reference external&#34; href=&#34;http://en.wikipedia.org/wiki/A*&#34;&gt;A*&lt;/a&gt; or similar
approaches here to speed up the search for a lot of nodes, however I doubt
any game will ever construct maps complex enough that
Dijkstra will be considered too slow (if it is at one point, we can
still easily replace Dijkstra with A*).&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
</content>
  </entry>
  <entry>
    <title>Coming up with a Backup/Synchronization Strategy: Subgoals and Tools</title>
    <link href="http://leetless.de/article-backup-tools.html"/>
    <id>http://leetless.de/article-backup-tools.html</id>
    <updated>2012-05-20T21:48:00</updated>
    <content type="html">&lt;p&gt;In my &lt;a class=&#34;reference external&#34; href=&#34;article-backup-strategy.html&#34;&gt;previous post&lt;/a&gt; I stated a little what I would want/need of a nice
backup/synchronization strategy. Now lets structure these into more precisely
defined features and see which programs out there cover them.
As a disclaimer upfront: Of course I only know a certain subset of backup
software. If you have a noteworthy candidate in mind that I didn&#39;t mention,
please don&#39;t hesitate to comment.&lt;/p&gt;
&lt;div class=&#34;section&#34; id=&#34;features-of-backup-synchronization-solutions&#34;&gt;
&lt;h2&gt;Features of backup/synchronization solutions&lt;/h2&gt;
&lt;table border=&#34;1&#34; class=&#34;docutils&#34;&gt;
&lt;colgroup&gt;
&lt;col width=&#34;33%&#34; /&gt;
&lt;col width=&#34;2%&#34; /&gt;
&lt;col width=&#34;2%&#34; /&gt;
&lt;col width=&#34;2%&#34; /&gt;
&lt;col width=&#34;4%&#34; /&gt;
&lt;col width=&#34;3%&#34; /&gt;
&lt;col width=&#34;20%&#34; /&gt;
&lt;col width=&#34;7%&#34; /&gt;
&lt;col width=&#34;20%&#34; /&gt;
&lt;col width=&#34;4%&#34; /&gt;
&lt;col width=&#34;2%&#34; /&gt;
&lt;/colgroup&gt;
&lt;thead valign=&#34;bottom&#34;&gt;
&lt;tr&gt;&lt;th class=&#34;head&#34;&gt;Tool&lt;/th&gt;
&lt;th class=&#34;head&#34;&gt;GUI&lt;/th&gt;
&lt;th class=&#34;head&#34;&gt;Remote&lt;/th&gt;
&lt;th class=&#34;head&#34;&gt;2-Way&lt;/th&gt;
&lt;th class=&#34;head&#34;&gt;Versioning&lt;/th&gt;
&lt;th class=&#34;head&#34;&gt;Auto-Add&lt;/th&gt;
&lt;th class=&#34;head&#34;&gt;Incremental Storage&lt;/th&gt;
&lt;th class=&#34;head&#34;&gt;Rotation&lt;/th&gt;
&lt;th class=&#34;head&#34;&gt;Direct Access&lt;/th&gt;
&lt;th class=&#34;head&#34;&gt;Meta-Sync&lt;/th&gt;
&lt;th class=&#34;head&#34;&gt;Crypto&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody valign=&#34;top&#34;&gt;
&lt;tr&gt;&lt;td&gt;&lt;a class=&#34;reference external&#34; href=&#34;http://duplicity.nongnu.org/&#34;&gt;Duplicity&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;?&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;a class=&#34;reference external&#34; href=&#34;http://rsnapshot.org&#34;&gt;rsnapshot&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt; (file-level)&lt;/td&gt;
&lt;td&gt;Count&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;a class=&#34;reference external&#34; href=&#34;http://www.nongnu.org/rdiff-backup/&#34;&gt;rdiff-backup&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;?&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt; (only latest)&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;a class=&#34;reference external&#34; href=&#34;https://github.com/apenwarr/bup&#34;&gt;bup&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;, Git&lt;/td&gt;
&lt;td&gt;?&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;?&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;a class=&#34;reference external&#34; href=&#34;http://backintime.le-web.org&#34;&gt;Back In Time&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt; (file-level)&lt;/td&gt;
&lt;td&gt;Various conditions&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;a class=&#34;reference external&#34; href=&#34;http://www.cis.upenn.edu/~bcpierce/unison/&#34;&gt;Unison&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;a class=&#34;reference external&#34; href=&#34;http://git-scm.com/&#34;&gt;Git&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;a class=&#34;reference external&#34; href=&#34;http://git-annex.branchable.com/&#34;&gt;Git-Annex&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;?&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;a class=&#34;reference external&#34; href=&#34;http://dropbox.com/&#34;&gt;Dropbox&lt;/a&gt;, &lt;a class=&#34;reference external&#34; href=&#34;https://one.ubuntu.com/&#34;&gt;Ubuntu One&lt;/a&gt;, etc...&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;, auto&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;yes&#34; src=&#34;images/yes.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;?&lt;/td&gt;
&lt;td&gt;?&lt;/td&gt;
&lt;td&gt;?&lt;/td&gt;
&lt;td&gt;&lt;img alt=&#34;no&#34; src=&#34;images/no.png&#34; /&gt;&lt;/td&gt;
&lt;td&gt;?&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;!-- `Flyback &lt;http://www.flyback-project.org/&gt;`__
http://www.readwriteweb.com/cloud/2011/05/4-ways-to-build-your-own-dropbox.php --&gt;
&lt;dl class=&#34;docutils&#34;&gt;
&lt;dt&gt;&lt;strong&gt;GUI&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;Tool comes with a graphical user interface.&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;2-Way&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;Tool allows 2 (or more)-Way sync between two machines, i.e.: Changes happened
on both sides, and $tool is able to bring both sides to the same state somehow
(possibly with some user interaction).&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;Versioning&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;This term refers to the usual commit/merge mechanics of revision control
systems. I.e.: The system at hand will be able to record diffent states of
a number of files and allow going back to any of them. Additionally it
will track a hierarchy of these states that allow branches and all that
good jazz. Usually those systems allow for easy merging of text-based
files one way or the other.&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;Auto-add&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;Files in a certain directory will be automatically tracked, this works not
only for editing but also for adding/deleting files. Useful if file
changes are happening very often and informing the system manually is
considered a tedious task.
Note: No arguing here that &amp;quot;Auto-add&amp;quot; is not always something desirable
(e.g. there are good reasons why this &amp;quot;feature&amp;quot; is not enabled/available
by default for revision control systems usually).&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;Incremental Storage&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;Backups based on older backups avoid storing data redundantly (i.e.
re-using the data that is common for multiple versions of the backup)&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;Rotation&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;For tools that do incremental backups this describes how rotation of backups is done.
I.e. will it keep the latest $count backups, or keep backups until
the harddisk is full, etc...&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;Direct Access&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;For systems with incremental storage it sometimes is the case that data
must be compiled from various diff&#39;s before it can be accessed. With
&amp;quot;direct access&amp;quot; I mean: The system allows accessing older versions of the
data easily without any time-intensive precomputation.&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;Meta-Sync&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;Some systems (here: one) allow to communicate not all the files or patches between the files
directly but only the information about which file is where in which state
and then giving the user a way to synchronize certain file version from remote
on-demand, I call this feature &amp;quot;meta-sync&amp;quot; here for brevity.&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;Crypto&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;Does the tool (by itself) support encrypted storage? Note: Even if not for most tools
it should of course be possible to use an encrypted filesystem or similar underneath.&lt;/dd&gt;
&lt;/dl&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;conclusions&#34;&gt;
&lt;h2&gt;Conclusions&lt;/h2&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;&lt;strong&gt;Back In Time&lt;/strong&gt; seems to be a promising candidate for handling protection against dumb things as well
as protection against hardware failures. What I especially like is that there is a notification in the
systray whenever it does something and the various ways of specificing conditions for when
to remove old backups. This way the tool is (I assume) much less annoying in terms of
sudden surprise i/o, full harddisks or unnecessarily rotated backups (than e.g. rsnapshot).
I&#39;ll definitely give this one a try :)&lt;/li&gt;
&lt;li&gt;2-Way syncing, especially concerning the &lt;strong&gt;MP3-problem&lt;/strong&gt; mentioned in the previous post is still an
enigma to me. I found no tool that would handle MP3s in a special/smart way. E.g.:
I rename a MP3 file &lt;em&gt;and&lt;/em&gt; change its id3 tags, the tool should handle that as a rename only,
i.e. I don&#39;t want to end up with 2 versions of the same file at the other end,
neither do I want to have to explicetely tell the tool what happened.&lt;/li&gt;
&lt;li&gt;Independently of the MP3 problem, concerning &lt;strong&gt;2-Way sync&lt;/strong&gt; I&#39;m still not sure which approach is best:
Unison tends to get slow which lots of data, the Git-based approaches seem to
all require too much manual intervention. And I don&#39;t like the idea of syncing my private or
semi-private data through a commercial third-party hoster.
I found &lt;a class=&#34;reference external&#34; href=&#34;http://www.readwriteweb.com/cloud/2011/05/4-ways-to-build-your-own-dropbox.php&#34;&gt;a list of Dropbox alternatives&lt;/a&gt;
though, which sounds promising (especially the git-based tool SparkleShare),
maybe I&#39;ll give that approach a try.&lt;/li&gt;
&lt;li&gt;For &lt;strong&gt;syncing config-files&lt;/strong&gt; I&#39;ll definitely stay with git for the time being, as
for that use case I really want the safety and expliciteness of git.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;
It turned out BackInTimes GUI just tricked me into believing it can do remote backups,
it seems that is not the case. I&#39;ll continue my search a little and keep you guys posted when I have found something cool.&lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
  <entry>
    <title>Coming up with a Backup/Synchronization Strategy: Problem Statement</title>
    <link href="http://leetless.de/article-backup-strategy.html"/>
    <id>http://leetless.de/article-backup-strategy.html</id>
    <updated>2012-04-16T17:18:00</updated>
    <content type="html">&lt;p&gt;For years now I&#39;m constantly changing my backup plans, always a little
unsatisfied with the current solution. So let me try to write down what I
actually want first and &lt;em&gt;then&lt;/em&gt; see what options are there.
I know there are plenty of tools to deal with those (I know e.g. unison, git
for config files, bup, etc..), the thing is: Without a little planning the
best tool won&#39;t help anything.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;&lt;strong&gt;Synchronization of config files.&lt;/strong&gt; I.e. dotfiles in my home directory.
As I work on multiple computers and regularly change things, this is a
quite essential element. Versioning/diff-/mergemechanics would be nice, but is not a must.
The mechanism used here should not automatically include all sorts of files
as some are machine-specific and beyond the dot-directories there are lots
of caches etc... which I don&#39;t want to explicetely exclude, rather I&#39;d like
to include a certain subset of my config files for syncing.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Synchronization of data files.&lt;/strong&gt; I.e. presentations, wallpapers, papers,
all that stuff. No need to do versioning here, as I&#39;ll practically never
want to go back to an earlier version of those files (as I more or less
horde them anyway). It will quite often happen though that these files move
or are being renamed
(as they are sorted automatically). For those files, everything under a
certain subdirectory should always be included in the syncing process,
manually adding things here would get quite tedious.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Synchronization of music.&lt;/strong&gt; This is a tough one as my music collection is
quite large (e.g. its infeasible to sync with unison).
To make things harder: My music player automatically sorts my music by
artist, etc... and these change from time to time as I discover some files
that are not or not correctly tagged. Having to tel a synchronization
program that a file has moved and changed every time i correct a track name
in my player is certainly not a thing I want to do.
On the other hand I don&#39;t want/need the same state on all machines
(it probably wouldn&#39;t hurt, but my internet connection at home is not the
fastest). I wouldn&#39;t mind carrying a usb disk back and forth between
home/work for syncing my music, however I do not want to manually select
files for syncing, a high degree of automatism is a must here.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Protection against dumb things.&lt;/strong&gt; Especially premature deletions of
files. This even holds for checked-out repositories in the ideal case (when
deleting a changed file accidentially that is not yet checked in).
Ideally a mechanism to achieve this would allow going back a selection of
time intervals (e.g. like rsnapshot does). However: Say I&#39;m on vacation for
the longest time interval and come back, then discover I accidentially deleted file X
the day before I left, but in the oldest backup version its still gone. So the solution here
should not do anything if files didn&#39;t change.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Protection against hardware failures.&lt;/strong&gt; Assume my laptop explodes and
the harddisk is completely destroyed. In this scenario there should be a
backup somewhere off-site that is not more than a week old. However I
&lt;strong&gt;don&#39;t&lt;/strong&gt; want an automated network sync that I can&#39;t see or immediately
abort (I might be sitting in a train and be connected via GSM or simple
need every bit of the bandwidth for something urgent).&lt;/li&gt;
&lt;li&gt;The sum of the solutions should be maintainable. I.e. it would be nice not
to have 5 different tools running for solving these problems.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;In my &lt;a class=&#34;reference external&#34; href=&#34;article-backup-tools.html&#34;&gt;next post&lt;/a&gt; about this topic I&#39;ll list a few tools I know/use up to now and
maybe say a few words on how well they solve some of these problems.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Quick Update</title>
    <link href="http://leetless.de/article-quick_update.html"/>
    <id>http://leetless.de/article-quick_update.html</id>
    <updated>2012-02-14T11:20:00</updated>
    <content type="html">&lt;p&gt;Hey guys,
as I should be working at this time of the day, I&#39;ll keep this update &lt;em&gt;very&lt;/em&gt;
brief.&lt;/p&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;At beginning of the month I was at the &lt;a class=&#34;reference external&#34; href=&#34;http://fosdem.org/2012/&#34;&gt;FOSDEM 2012&lt;/a&gt;
which was quite interesting. Beyond others I heard a
&lt;a class=&#34;reference external&#34; href=&#34;http://fosdem.org/2012/schedule/event/game_entities&#34;&gt;talk about Data-Driven and Component-Based Game-Entities&lt;/a&gt;
which was quite interesting&lt;/li&gt;
&lt;li&gt;As you might have noticed, there is some activity recently on github. Thanks
to &lt;a class=&#34;reference external&#34; href=&#34;http://www.feedelli.org/&#34;&gt;feedelli&lt;/a&gt; who started working on the dialog
system, we now have a &lt;a class=&#34;reference external&#34; href=&#34;https://github.com/Droggelbecher/Grail/issues?milestone=1&#34;&gt;plan for 0.1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;There where some problems for I don&#39;t know how long with commenting on
articles, it should work again now, if not please drop me a mail.&lt;/li&gt;
&lt;/ul&gt;
</content>
  </entry>
  <entry>
    <title>Tiny Fonts</title>
    <link href="http://leetless.de/article-tiny-fonts.html"/>
    <id>http://leetless.de/article-tiny-fonts.html</id>
    <updated>2011-08-21T21:25:00</updated>
    <content type="html">&lt;p&gt;Most recently, I fell for the idea of having a real tiny font for my working
environment. Some observations immediately popping up were:&lt;/p&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;Almost unecessary to mention that only monospaced fonts are candidates.&lt;/li&gt;
&lt;li&gt;Pixel-oriented / Bitmapped fonts have the advantage of using space more
efficently while still being easy to read (because there is no need for
antialiasing so things don&#39;t get &amp;quot;blurry&amp;quot;).&lt;/li&gt;
&lt;li&gt;Especially with such small fonts it is important to be able to easily
distinguish letters, eg. lowercase &amp;quot;L&amp;quot; vs. capital &amp;quot;I&amp;quot; vs. the number &amp;quot;1&amp;quot;.&lt;/li&gt;
&lt;li&gt;I want the same font in my &lt;a class=&#34;reference external&#34; href=&#34;http://software.schmorp.de/pkg/rxvt-unicode.html&#34;&gt;URxvt terminal emulator&lt;/a&gt; as in &lt;a class=&#34;reference external&#34; href=&#34;http://www.vim.org/&#34;&gt;GVim&lt;/a&gt;. That is noteworthy as I experienced some fonts didn&#39;t
seem to work equally well in both these environments (especially considering
the following point).&lt;/li&gt;
&lt;li&gt;I need normal and bold font weight in GVim as well as in URxvt, and of
course it should still be readable and not look &amp;quot;blurry&amp;quot;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Before I bore you to death with a detailed story of my findings, here is a
summary of my results. The screenshots are a GVim with the &lt;a class=&#34;reference external&#34; href=&#34;http://www.vim.org/scripts/script.php?script_id=1492&#34;&gt;Pyte colorscheme&lt;/a&gt; as this uses as well
bold as italic font styles. Note the different sizes of the screenshots resulting from
the different space usage of the fonts.&lt;/p&gt;
&lt;p&gt;Don&#39;t spoil yourself by jumping to the &lt;a class=&#34;reference internal&#34; href=&#34;#conclusion&#34;&gt;Conclusion&lt;/a&gt; ;)&lt;/p&gt;
&lt;div class=&#34;section&#34; id=&#34;fonts&#34;&gt;
&lt;h2&gt;Fonts&lt;/h2&gt;
&lt;div class=&#34;contents local topic&#34; id=&#34;contents&#34;&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;&lt;a class=&#34;reference internal&#34; href=&#34;#dejavu-sans-mono-7&#34; id=&#34;id1&#34;&gt;DejaVu Sans Mono 7&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;reference internal&#34; href=&#34;#dejavu-sans-mono-8&#34; id=&#34;id2&#34;&gt;DejaVu Sans Mono 8&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;reference internal&#34; href=&#34;#fixed-8&#34; id=&#34;id3&#34;&gt;Fixed 8&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;reference internal&#34; href=&#34;#fixed-9&#34; id=&#34;id4&#34;&gt;Fixed 9&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;reference internal&#34; href=&#34;#fixed-10&#34; id=&#34;id5&#34;&gt;Fixed 10&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;reference internal&#34; href=&#34;#gohu&#34; id=&#34;id6&#34;&gt;Gohu&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;reference internal&#34; href=&#34;#erus&#34; id=&#34;id7&#34;&gt;Erus&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;reference internal&#34; href=&#34;#montecarlo&#34; id=&#34;id8&#34;&gt;Montecarlo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;reference internal&#34; href=&#34;#proggyfonts&#34; id=&#34;id9&#34;&gt;Proggyfonts&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;reference internal&#34; href=&#34;#proggyclean&#34; id=&#34;id10&#34;&gt;ProggyClean&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;reference internal&#34; href=&#34;#proggysquare&#34; id=&#34;id11&#34;&gt;ProggySquare&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;reference internal&#34; href=&#34;#proggytiny&#34; id=&#34;id12&#34;&gt;ProggyTiny&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;reference internal&#34; href=&#34;#terminus&#34; id=&#34;id13&#34;&gt;Terminus&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;dejavu-sans-mono-7&#34;&gt;
&lt;h3&gt;&lt;a class=&#34;toc-backref&#34; href=&#34;#id1&#34;&gt;DejaVu Sans Mono 7&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img alt=&#34;images/fonts/gvim-freemono7.png&#34; src=&#34;images/fonts/gvim-freemono7.png&#34; /&gt;
&lt;/div&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;Antialiased font, still astonishingly clear and
readable&lt;/li&gt;
&lt;li&gt;Very small, thus does not come with bold variant&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt;&lt;/p&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;I advertised this as &amp;quot;FreeMono&amp;quot; in the first version of this article, the correct name of the
font is &amp;quot;DejaVu Sans Mono&amp;quot; though, probably available for your distro.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;dejavu-sans-mono-8&#34;&gt;
&lt;h3&gt;&lt;a class=&#34;toc-backref&#34; href=&#34;#id2&#34;&gt;DejaVu Sans Mono 8&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img alt=&#34;images/fonts/gvim-freemono8.png&#34; src=&#34;images/fonts/gvim-freemono8.png&#34; /&gt;
&lt;/div&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;A surprising amount larger than DejaVu Sans Mono 7&lt;/li&gt;
&lt;li&gt;Looks very nice, but wastes pixels with antialiasing&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;fixed-8&#34;&gt;
&lt;h3&gt;&lt;a class=&#34;toc-backref&#34; href=&#34;#id3&#34;&gt;Fixed 8&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img alt=&#34;images/fonts/gvim-fixed8.png&#34; src=&#34;images/fonts/gvim-fixed8.png&#34; /&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p class=&#34;first&#34;&gt;Should be available in most distros&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&#34;first&#34;&gt;Letter &amp;quot;O&amp;quot; and number &amp;quot;0&amp;quot; too similar, captial lettel &amp;quot;I&amp;quot; and lowercase letter &amp;quot;l&amp;quot; too&lt;/p&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img alt=&#34;images/fonts/gvim-fixed8-illegal.png&#34; src=&#34;images/fonts/gvim-fixed8-illegal.png&#34; /&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;fixed-9&#34;&gt;
&lt;h3&gt;&lt;a class=&#34;toc-backref&#34; href=&#34;#id4&#34;&gt;Fixed 9&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img alt=&#34;images/fonts/gvim-fixed9.png&#34; src=&#34;images/fonts/gvim-fixed9.png&#34; /&gt;
&lt;/div&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;Letter &amp;quot;O&amp;quot; and number &amp;quot;0&amp;quot; too similar, captial lettel &amp;quot;I&amp;quot; and lowercase letter &amp;quot;l&amp;quot; too (similar to size=8 case)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;fixed-10&#34;&gt;
&lt;h3&gt;&lt;a class=&#34;toc-backref&#34; href=&#34;#id5&#34;&gt;Fixed 10&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img alt=&#34;images/fonts/gvim-fixed10.png&#34; src=&#34;images/fonts/gvim-fixed10.png&#34; /&gt;
&lt;/div&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;Too large for my taste&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;gohu&#34;&gt;
&lt;h3&gt;&lt;a class=&#34;toc-backref&#34; href=&#34;#id6&#34;&gt;Gohu&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img alt=&#34;images/fonts/gvim-gohufont.png&#34; src=&#34;images/fonts/gvim-gohufont.png&#34; /&gt;
&lt;/div&gt;
&lt;p&gt;URL: &lt;a class=&#34;reference external&#34; href=&#34;http://font.gohu.eu&#34;&gt;http://font.gohu.eu&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p class=&#34;first&#34;&gt;Captial letters are a little higher than in Montecarlo.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&#34;first&#34;&gt;&amp;quot;D&amp;quot; and &amp;quot;O&amp;quot; look very similar:&lt;/p&gt;
&lt;blockquote&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img alt=&#34;images/fonts/gvim-gohu-dodo.png&#34; src=&#34;images/fonts/gvim-gohu-dodo.png&#34; /&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;erus&#34;&gt;
&lt;h3&gt;&lt;a class=&#34;toc-backref&#34; href=&#34;#id7&#34;&gt;Erus&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img alt=&#34;images/fonts/gvim-erusfont.png&#34; src=&#34;images/fonts/gvim-erusfont.png&#34; /&gt;
&lt;/div&gt;
&lt;p&gt;URL: &lt;a class=&#34;reference external&#34; href=&#34;http://aur.archlinux.org/packages.php?ID=37946&#34;&gt;http://aur.archlinux.org/packages.php?ID=37946&lt;/a&gt;&lt;/p&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;Only a slight variation on Gohu&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;montecarlo&#34;&gt;
&lt;h3&gt;&lt;a class=&#34;toc-backref&#34; href=&#34;#id8&#34;&gt;Montecarlo&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img alt=&#34;images/fonts/gvim-montecarlo.png&#34; src=&#34;images/fonts/gvim-montecarlo.png&#34; /&gt;
&lt;/div&gt;
&lt;p&gt;URL: &lt;a class=&#34;reference external&#34; href=&#34;http://www.bok.net/MonteCarlo/&#34;&gt;http://www.bok.net/MonteCarlo/&lt;/a&gt;&lt;/p&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;The &amp;quot;l&amp;quot; (ell) looks a little weird&lt;/li&gt;
&lt;li&gt;Lowercase &amp;quot;A&amp;quot; and lowercase &amp;quot;O&amp;quot; look very similar&lt;/li&gt;
&lt;li&gt;Less squilles than Gohu/Erus, thus looks clearer to the eye&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;proggyfonts&#34;&gt;
&lt;h3&gt;&lt;a class=&#34;toc-backref&#34; href=&#34;#id9&#34;&gt;Proggyfonts&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;URL: &lt;a class=&#34;reference external&#34; href=&#34;http://www.proggyfonts.com/&#34;&gt;http://www.proggyfonts.com/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is a nice collection of bitmap fonts for programming and similar uses,
I&#39;ll only look into a few of them here, check out their site for more.&lt;/p&gt;
&lt;p&gt;Note that I only look at the true type versions of the fonts here, as I had problems
with getting the bitmap versions with bold typeface support running in GVim
(not sure if proggys or archlinux&#39;s/packagers or maybe even my own fault though).&lt;/p&gt;
&lt;div class=&#34;section&#34; id=&#34;proggyclean&#34;&gt;
&lt;h4&gt;&lt;a class=&#34;toc-backref&#34; href=&#34;#id10&#34;&gt;ProggyClean&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img alt=&#34;images/fonts/gvim-proggycleantt.png&#34; src=&#34;images/fonts/gvim-proggycleantt.png&#34; /&gt;
&lt;/div&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;The bold parts look ugly/blurred, thats because the font engine generates the bold font from the truetype font.
As noted above, this probably is only a configuration or packaging issue, with bitmap versions (tested in urxvt) it looks fine.&lt;/li&gt;
&lt;li&gt;I like the style of proggy, just before deciding to go for a really small font, I used this one for coding, for what I want now, this is too large.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;proggysquare&#34;&gt;
&lt;h4&gt;&lt;a class=&#34;toc-backref&#34; href=&#34;#id11&#34;&gt;ProggySquare&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img alt=&#34;images/fonts/gvim-proggysquarett.png&#34; src=&#34;images/fonts/gvim-proggysquarett.png&#34; /&gt;
&lt;/div&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;Not much to say about this, a little smaller than proggyclean&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;proggytiny&#34;&gt;
&lt;h4&gt;&lt;a class=&#34;toc-backref&#34; href=&#34;#id12&#34;&gt;ProggyTiny&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img alt=&#34;images/fonts/gvim-proggytinytt.png&#34; src=&#34;images/fonts/gvim-proggytinytt.png&#34; /&gt;
&lt;/div&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;A very good candidate, especially very clean (similar to MonteCarlo)&lt;/li&gt;
&lt;li&gt;The bold-issue was a no-go though and I didn&#39;t care to try very hard to fix it yet (if somebody has, please comment)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;terminus&#34;&gt;
&lt;h3&gt;&lt;a class=&#34;toc-backref&#34; href=&#34;#id13&#34;&gt;Terminus&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img alt=&#34;images/fonts/gvim-terminus.png&#34; src=&#34;images/fonts/gvim-terminus.png&#34; /&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p class=&#34;first&#34;&gt;Didn&#39;t get bold version to work at all :(&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&#34;first&#34;&gt;A little larger (too large for what I&#39;m looking for currently)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&#34;first&#34;&gt;Very readable, clean font though, although &amp;quot;I&amp;quot;, &amp;quot;l&amp;quot; and &amp;quot;1&amp;quot; could be a little more different:&lt;/p&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img alt=&#34;images/fonts/gvim-terminus-illegal.png&#34; src=&#34;images/fonts/gvim-terminus-illegal.png&#34; /&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;conclusion&#34;&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Currently, I prefer using Gohufont, as the D/O problem rarely matters (in contrast to the a/o problem with montecarlo).
There are some interesting alternatives listed here which would be worth trying for a longer time too.
And of course theres a lots more such fonts on the web which I didn&#39;t test here.&lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
  <entry>
    <title>Twitter feed</title>
    <link href="http://leetless.de/article-twitter_feed.html"/>
    <id>http://leetless.de/article-twitter_feed.html</id>
    <updated>2011-06-29T18:28:00</updated>
    <content type="html">&lt;p&gt;There is now an &amp;quot;inofficial&amp;quot; &lt;a class=&#34;reference external&#34; href=&#34;http://twitter.com/#!/LeetlessRSS&#34;&gt;twitter bot&lt;/a&gt; for
this blog in order to keep you updated on my (far too few) postings. Thanks
dear anonymous creator ;)&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Background Music</title>
    <link href="http://leetless.de/article-background_music.html"/>
    <id>http://leetless.de/article-background_music.html</id>
    <updated>2011-05-09T20:02:00</updated>
    <content type="html">&lt;div class=&#34;section&#34; id=&#34;background-music&#34;&gt;
&lt;h2&gt;Background Music&lt;/h2&gt;
&lt;p&gt;As I&#39;m still mostly focusing on my job currently rather than coding for these
spare time projects, I still cannot announce any remarkable progress on those.
However I&#39;ve come to finally find some cool music that is suited for
programming/working (I&#39;ve searched for that for like ever).
Here is a list for you:&lt;/p&gt;
&lt;div class=&#34;section&#34; id=&#34;some-little-distraction-cool-sound&#34;&gt;
&lt;h3&gt;Some (little) distraction, cool sound&lt;/h3&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;Beats Antique - (Mostly) text/voice-less, draws some (little) attention to
the listener, a slight oriental touch, some very cool songs&lt;/li&gt;
&lt;li&gt;Daft Punk in general&lt;/li&gt;
&lt;li&gt;The tron legacy soundtrack by Daft Punk - Electronic, nearly distractionless&lt;/li&gt;
&lt;li&gt;Dub FX - Contains text/voice but still suited for background, very nice
beat/sound (try &lt;tt class=&#34;docutils literal&#34;&gt;Love Someone&lt;/tt&gt; or &lt;tt class=&#34;docutils literal&#34;&gt;Society Gates&lt;/tt&gt;)&lt;/li&gt;
&lt;li&gt;RMB - Mostly a little heavy and towards rave for working, although e.g. &lt;tt class=&#34;docutils literal&#34;&gt;Unreality&lt;/tt&gt; is perfect for that task&lt;/li&gt;
&lt;li&gt;The Animatrix soundtrack&lt;/li&gt;
&lt;li&gt;The Starcraft II Soundtrack&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;reference external&#34; href=&#34;http://kohina.com&#34;&gt;http://kohina.com&lt;/a&gt; - Chiptunes radio stream, I love the sound but can be
pretty distracting after some time&lt;/li&gt;
&lt;li&gt;last-fm tag &lt;tt class=&#34;docutils literal&#34;&gt;chiptunes&lt;/tt&gt; - See kohina above&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;reference external&#34; href=&#34;http://feeds.feedburner.com/GroovetekElectronicaMusic&#34;&gt;http://feeds.feedburner.com/GroovetekElectronicaMusic&lt;/a&gt; - Electronic music
podcast&lt;/li&gt;
&lt;li&gt;Muse - The cool songs are somewhat distracting, but I think not too much&lt;/li&gt;
&lt;li&gt;last-fm tag &lt;tt class=&#34;docutils literal&#34;&gt;the presets&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;last-fm artist &lt;tt class=&#34;docutils literal&#34;&gt;boards of canada&lt;/tt&gt; nice not-too-distracting electronic
music&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;chilly-soft-ambient-music-zero-distraction&#34;&gt;
&lt;h3&gt;Chilly/Soft ambient music, zero distraction&lt;/h3&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;Blind Foley&lt;/li&gt;
&lt;li&gt;Brian Eno&lt;/li&gt;
&lt;li&gt;Portishead - With text, but very chilly, beautiful voice&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;reference external&#34; href=&#34;http://cloudcycle.net/log/feed/podcast&#34;&gt;http://cloudcycle.net/log/feed/podcast&lt;/a&gt; - Chillout music podcast&lt;/li&gt;
&lt;li&gt;last-fm tag &lt;tt class=&#34;docutils literal&#34;&gt;lounge&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;varying-degree-of-distraction-from-song-to-song&#34;&gt;
&lt;h3&gt;Varying degree of distraction (from song to song)&lt;/h3&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;Maxstack (Singularity Soundtrack) - Cool electronic background music&lt;/li&gt;
&lt;li&gt;Pink floyd - Degree of distraction actually can vary within a song very
much, you have to find the right songs. &lt;tt class=&#34;docutils literal&#34;&gt;Echoes&lt;/tt&gt; and &lt;tt class=&#34;docutils literal&#34;&gt;Shine on you crazy
diamond&lt;/tt&gt; are cool for example.&lt;/li&gt;
&lt;li&gt;The Portal 1 and Portal 2 Soundtracks - Most of those are pretty
not-distracting, although naturally there are phases in the game when the
soundtrack tries to support some more action&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;reference external&#34; href=&#34;http://di.fm&#34;&gt;http://di.fm&lt;/a&gt; - Internet radio with stations of differing degree of
electronicness and distractionlessness&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;reference external&#34; href=&#34;http://www.stereomood.com/&#34;&gt;http://www.stereomood.com/&lt;/a&gt; - HTML5-browser playlist-based radio with
stations sorted by the mood/activity of the music (mostly chilly)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Some general notes:&lt;/p&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;Its not easy to categorize music like this on the fly, so don&#39;t rely on
those captions too hard&lt;/li&gt;
&lt;li&gt;I found (included in the gtk2 based music player &lt;tt class=&#34;docutils literal&#34;&gt;banshee&lt;/tt&gt; - which is very
cool btw.), &lt;a class=&#34;reference external&#34; href=&#34;http://www.miroguide.com/&#34;&gt;http://www.miroguide.com/&lt;/a&gt; which is an index of music and video
podcasts (also the source of the podcasts I presented here), definitely
worth a look if you are looking for some special kind of music&lt;/li&gt;
&lt;li&gt;All radios where I didn&#39;t say anything else are real streams and thus can be
played with mplayer/vlc/almost any music player&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;some-status-updates&#34;&gt;
&lt;h2&gt;Some status updates&lt;/h2&gt;
&lt;div class=&#34;section&#34; id=&#34;scala&#34;&gt;
&lt;h3&gt;Scala&lt;/h3&gt;
&lt;p&gt;Oh and btw. I already played around a little with scala (and read a good part
of the book) - The impression so far: Its a really cool language, however
seems the amount of work you save by not having to worry about threading and
locks (when coding the immutable style) is just about as much as the amount of
work you need to invest when designing your stuff in an immutable style.
However that was one single (simulation-) application I coded, so don&#39;t put
too much weight in these early impressions yet, more to come.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;grail&#34;&gt;
&lt;h3&gt;Grail&lt;/h3&gt;
&lt;p&gt;I hope to squeeze in a little more work on grail into my spare time in the
future, however the job always has precedence. As always, if you care to
contribute, you are more than welcome.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
</content>
  </entry>
  <entry>
    <title>The hunt for the perfect programming language (ppl)</title>
    <link href="http://leetless.de/article-ppl.html"/>
    <id>http://leetless.de/article-ppl.html</id>
    <updated>2010-09-11T16:07:00</updated>
    <content type="html">&lt;p&gt;Basically since I started programming, I&#39;m kinda looking for a programming
language that is perfect in a way.
First problem with that is that I don&#39;t even have a precise definition of what
perfect in this context exactly means, but it should go along those lines (in
no particular order):&lt;/p&gt;
&lt;div class=&#34;section&#34; id=&#34;type-system&#34;&gt;
&lt;h2&gt;Type system&lt;/h2&gt;
&lt;p&gt;Take popular object oriented programming
languages like Java or C++. Why on earth are &amp;quot;primitive&amp;quot; types treated so
way differently than object oriented types? Why would a number not be an
object? In most popular programming languages its also clumsy to really
abstract types. E.g. in C++ you can use Templates to express things like &amp;quot;This
is a list of arbitrary element type&amp;quot; but its lots harder to express things
like &amp;quot;If B is a subtype of A than a List&amp;lt;B&amp;gt; is a subtype of a List&amp;lt;A&amp;gt;&amp;quot;.
(We will come to programming languages which allow such things and much
more)&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;community-support&#34;&gt;
&lt;h2&gt;Community support&lt;/h2&gt;
&lt;p&gt;Not necessarily as huge as that of C++ or
alike but productive, helpful and able to fix bugs and port
compilers/runtime environments. Naturally this includes the availability of
libraries for all kind of stuff. I had this problem with &lt;a class=&#34;reference external&#34; href=&#34;http://digitalmars.com/d/&#34;&gt;D&lt;/a&gt; (a programming
language I really like for lots of other aspects) where there was a window
when there would be no D-compiler which compiled my (according to the spec
correct) code on my 64 bit Linux. Not to mention that compiling under
Windows was somewhat inconvenient too when linking to lots of different libraries.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;multiprocessing&#34;&gt;
&lt;h2&gt;Multiprocessing&lt;/h2&gt;
&lt;p&gt;Note that I didn&#39;t say
&amp;quot;multithreading&amp;quot;. Multithreading is fine but I really don&#39;t want to worry
about complicated locking mechanisms for every damn variably access like a
caveman. A lot more scalable idea is to spawn multiple processes (e.g. one
per CPU) and have a good way of communicating between them.
If this is implemented nicely, you can even spawn the processes on different
machines and have communication between them run via network. This is really
what you want when you code a scalable app. Again: Not to say that threads
would be useless or so in any way, they have their uses and places, but I want a
language that can do multiprocessing (or something similar).&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;not-too-verbose&#34;&gt;
&lt;h2&gt;Not too verbose&lt;/h2&gt;
&lt;p&gt;And/or has absurd restrictions. E.g. write a
hello world program in Java and compare the result to a minimal hello world
program in python. Point taken, most of your programs will be more complex
than hello world anyway, but you get the picture.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;not-too-many-ways-to-do-the-same-thing&#34;&gt;
&lt;h2&gt;Not too many ways to do the same thing&lt;/h2&gt;
&lt;p&gt;Imagine a
programming language that allows to write the same simple thing in a functional
style or an imperative object oriented style or a logical style or whatever
and its not at all obvious which one is better in this situation.
What you end up with is either only one style prevails or you have very
mixed programs and projects that are hard to understand.
Naturally this is only sensible to a certain degree: Its OK (and for most
programming models unavoidable anyway) to be able to write the factor
function recursively or with an iterative loop.
But having functional variants, structs/records, and object oriented classes
as different concepts that do basically the same thing is redundant.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;cool-syntax&#34;&gt;
&lt;h2&gt;Cool syntax&lt;/h2&gt;
&lt;p&gt;Obviously we&#39;re now deep in the
matter-of-taste region, but anyway: I never tried LISP. Why? Not because its
so old or whatever, just because I was afraid of the ugly syntax.
I&#39;d really like something that is in between the C++&#39;ish brace-style and
the python&#39;ish indentation style, i.e. a programming language that will
understand your indentation but allows braces or whatever for clarification.
Needless to say the syntax should be at least &lt;a class=&#34;reference external&#34; href=&#34;http://yosefk.com/c++fqa/defective.html#defect-2&#34;&gt;decidable&lt;/a&gt; so people have a
chance to write usable tools for it.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;no-preprocessor&#34;&gt;
&lt;h2&gt;No preprocessor&lt;/h2&gt;
&lt;p&gt;At least not in the C++ sense that doesn&#39;t
understand the syntax at all. Syntactic macros are OK, but in general the
language itself should be flexible enough to just let you do whatever you
want without that additional step.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;performance&#34;&gt;
&lt;h2&gt;Performance&lt;/h2&gt;
&lt;p&gt;In terms of short
run times of the programs, low memory footprint, etc...) is naturally
desirable. Not for every application but the language wouldn&#39;t be &amp;quot;perfect&amp;quot; if
it would produce darn slow programs.&lt;/p&gt;
&lt;p&gt;Thats what I can think of off the top of my head right now. I&#39;ll write more
about this topic in the future. E.g. I&#39;ll try to take a look at programming
languages like &lt;a class=&#34;reference external&#34; href=&#34;http://www.scala-lang.org/&#34;&gt;Scala&lt;/a&gt;, &lt;a class=&#34;reference external&#34; href=&#34;http://caml.inria.fr/&#34;&gt;Ocaml&lt;/a&gt;,
&lt;a class=&#34;reference external&#34; href=&#34;http://python.org&#34;&gt;Python&lt;/a&gt;, &lt;a class=&#34;reference external&#34; href=&#34;http://opendylan.org&#34;&gt;Dylan&lt;/a&gt; and some
others. I don&#39;t know yet if I will really say anything about C++ and/or Java
as you probably know enough about them anyway, but we&#39;ll see.&lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
  <entry>
    <title>Keepalive</title>
    <link href="http://leetless.de/article-keepalive.html"/>
    <id>http://leetless.de/article-keepalive.html</id>
    <updated>2010-09-07T09:52:00</updated>
    <content type="html">&lt;p&gt;Hey guys.&lt;/p&gt;
&lt;p&gt;I know it was very quiet here in the past 2 months. Good news for me is that I
really like my new job. Bad news for grail is that I don&#39;t have much time for
it at the moment. That does not mean its dead though. For my part, the commit
rate hos &amp;quot;only&amp;quot; slowed down remarkably.&lt;/p&gt;
&lt;p&gt;&lt;a class=&#34;reference external&#34; href=&#34;http://github.com/zdctb&#34;&gt;zdctb&lt;/a&gt; also mentioned that he might have some
more time to work on grail in the near future. However we&#39;d prefer a more
regular stream of updates. So if you&#39;re a C++ developer who always wanted to
participate in an adventure game engine (or you know of one), don&#39;t hesitate
to contact us!&lt;/p&gt;
&lt;p&gt;For the holy grail!&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>IRC Channel</title>
    <link href="http://leetless.de/article-irc_channel.html"/>
    <id>http://leetless.de/article-irc_channel.html</id>
    <updated>2010-07-03T17:45:00</updated>
    <content type="html">&lt;p&gt;Just got over it in my previous post: There is an IRC channel for Grail on
&lt;a class=&#34;reference external&#34; href=&#34;http://freenode.net/&#34;&gt;Freenode&lt;/a&gt; now, its called
&lt;a class=&#34;reference external&#34; href=&#34;irc://chat.freenode.net/#grail&#34;&gt;#grail&lt;/a&gt; (creative, eh?).
Feel free to join there for any questions/suggestions regarding grail or any
other stuff related to me or this site.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Site updates</title>
    <link href="http://leetless.de/article-site_updates.html"/>
    <id>http://leetless.de/article-site_updates.html</id>
    <updated>2010-07-03T17:24:00</updated>
    <content type="html">&lt;p&gt;Hey guys. I&#39;m glad to announce that I finished my diploma thesis a few weeks
ago and am now working at the &lt;a class=&#34;reference external&#34; href=&#34;http://www.tu-bs.de&#34;&gt;TU Braunschweig&lt;/a&gt; as PhD
student.&lt;/p&gt;
&lt;p&gt;As I&#39;m not sure yet how the regulations regarding publication are, I will not
publish my thesis here yet (probably its not of much interest to any usual
leetless reader anyways).&lt;/p&gt;
&lt;p&gt;There are also some changes in the &lt;a class=&#34;reference external&#34; href=&#34;/vim.html&#34;&gt;VIM Section&lt;/a&gt;: I removed lots of the older themes in order
to focus on the real good ones. Also I&#39;m proud to present a new theme, called
&lt;em&gt;PhD&lt;/em&gt;, hopefully its useful to someone.&lt;/p&gt;
&lt;p&gt;Another thing, which I neglected to post for months now is that the
&lt;a class=&#34;reference external&#34; href=&#34;http://gmansion2.wordpress.com/&#34;&gt;Giga Mansion 2&lt;/a&gt; adventure game project is
dead. They used the Indiana engine (the predecessor of &lt;a class=&#34;reference external&#34; href=&#34;/grail.html&#34;&gt;Grail&lt;/a&gt;)
which I developed in parallel to the game.
At first I wanted to wait until they announce the end of the project
themselves which seemingly never happened. Nevertheless it had been fun
working with these guys and really pushed the adventure game engine stuff
forwards a lot.&lt;/p&gt;
&lt;p&gt;And while I&#39;m at it: Because of the diploma thesis there was some pause, but I
managed to include &lt;a class=&#34;reference external&#34; href=&#34;http://www.opengl.org/&#34;&gt;OpenGL&lt;/a&gt; into Grail, which makes
it run about 10 times faster (at least on my machine).
Check out the &lt;a class=&#34;reference external&#34; href=&#34;http://github.com/Droggelbecher/Grail/tree/opengl&#34;&gt;OpenGL Branch&lt;/a&gt;
if you want to try it. If during compiling there is no OpenGL found,
the engine will be compiled with plain old SDL, so this can not come
to anyones disadvantage.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Going to github</title>
    <link href="http://leetless.de/article-github.html"/>
    <id>http://leetless.de/article-github.html</id>
    <updated>2010-05-03T16:15:00</updated>
    <content type="html">&lt;p&gt;Currently data is being pushed to &lt;a class=&#34;reference external&#34; href=&#34;http://github.com&#34;&gt;GitHub&lt;/a&gt;. I plan to
let this run in parallel to the current self-hosted solution for a while and
if it is good I&#39;ll shot down the self hosted git repository.&lt;/p&gt;
&lt;p&gt;Reasons for github in favor of hosting the repository myself:&lt;/p&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;Wider audience&lt;/li&gt;
&lt;li&gt;Integrated issue tracking system&lt;/li&gt;
&lt;li&gt;My git web CSS is broken and I&#39;m too lazy to fix it ;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Check it out at &lt;a class=&#34;reference external&#34; href=&#34;http://github.com/Droggelbecher/Grail/commits/master&#34;&gt;The grail github repository&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Oh by the way, you may have noticed the latest commit is already a few days
ago. That&#39;s because I&#39;m currently very busy with university stuff. But don&#39;t
you be afraid, I have no intent to give up this project. If you want to
contribute though, it will probably advance somewhat faster :)&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>First Grail screenshot</title>
    <link href="http://leetless.de/article-first_screenshots.html"/>
    <id>http://leetless.de/article-first_screenshots.html</id>
    <updated>2010-02-16T19:09:00</updated>
    <content type="html">&lt;img alt=&#34;images/screenshots/grail001.jpg&#34; src=&#34;images/screenshots/grail001.jpg&#34; /&gt;
&lt;p&gt;Whats new:&lt;/p&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;Parallax scrolling of background/foreground layers&lt;/li&gt;
&lt;li&gt;Animations don&#39;t require annoying to produce &amp;quot;stripe&amp;quot; format anymore,
additionaly theres a script now that extracts layers from an xcf (Gimp
format) file into a directory so its useable by grail.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;Edit:&lt;/em&gt; I substituted the .png with a .jpg so the page load times should be lots
less annoying.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>First steps</title>
    <link href="http://leetless.de/article-first_steps.html"/>
    <id>http://leetless.de/article-first_steps.html</id>
    <updated>2010-02-02T22:13:00</updated>
    <content type="html">&lt;p&gt;&lt;a class=&#34;reference external&#34; href=&#34;http://www.rasterbar.com/products/luabind.html&#34;&gt;Luabind&lt;/a&gt; is so cool.
Wrapping really is the easy part now, so I finally focus
on implementing stuff again. The main character already can walk around on the
screen, now I&#39;m concentrating on a user interface and then on interactions
with other scene actors.&lt;/p&gt;
&lt;p&gt;Thats sounds like the biggest part but keep in mind, theres still a lot to do:&lt;/p&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;User interface already is a big topic (buttons, inventory display, etc...)&lt;/li&gt;
&lt;li&gt;Loading/Saving (will hopefully be easy due to boosts serialization lib)&lt;/li&gt;
&lt;li&gt;Scene/walkpath stuff (the &amp;quot;algorithmic&amp;quot; corner yay)&lt;/li&gt;
&lt;li&gt;Loading scenes directly from atlantis files&lt;/li&gt;
&lt;li&gt;Dialogs (talking)&lt;/li&gt;
&lt;li&gt;Sound/Music/Voice output&lt;/li&gt;
&lt;li&gt;From time to time try to get the stuff to compile &amp;amp; run under windows ;)&lt;/li&gt;
&lt;/ul&gt;
</content>
  </entry>
  <entry>
    <title>Feed problems</title>
    <link href="http://leetless.de/article-feed_problems.html"/>
    <id>http://leetless.de/article-feed_problems.html</id>
    <updated>2010-01-18T16:20:00</updated>
    <content type="html">&lt;p&gt;Sorry for the feed problems lately (wrong urls, complete feed gets pulled twice
etc...).
Should now be fixed.&lt;/p&gt;
&lt;p&gt;In general: When you discover something doesn&#39;t work well/correctly, please
report, I can only keep the site up with proper feedback.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Good bye NIH, hello luabind &amp; boost!</title>
    <link href="http://leetless.de/article-luabind_boost.html"/>
    <id>http://leetless.de/article-luabind_boost.html</id>
    <updated>2010-01-18T15:45:00</updated>
    <content type="html">&lt;p&gt;I have to confess something.
To you all.&lt;/p&gt;
&lt;p&gt;I am ill. What I have is called the &lt;a class=&#34;reference external&#34; href=&#34;http://en.wikipedia.org/wiki/Not_Invented_Here&#34;&gt;NIH&lt;/a&gt; syndrome.
For those of you who never heard of it: It means preferring to code stuff
yourself instead of learning how to use a library somebody else wrote.
So its all about reinventing the wheel. &lt;a class=&#34;footnote-reference&#34; href=&#34;#id2&#34; id=&#34;id1&#34;&gt;[1]&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For example I was inventing a &lt;a class=&#34;reference external&#34; href=&#34;http://en.wikipedia.org/wiki/Domain-specific_language&#34;&gt;DSL&lt;/a&gt;
for describing c++/lua bindings together with a handcrafted (and ugly) parser
which generated c++ code from that DSL etc...
although I knew there was &lt;a class=&#34;reference external&#34; href=&#34;http://www.rasterbar.com/products/luabind.html&#34;&gt;luabind&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Now that I tried it, let me say: luabind rocks. Don&#39;t dare to invent something
yourself until you tried that one.&lt;/p&gt;
&lt;p&gt;Same goes for &lt;a class=&#34;reference external&#34; href=&#34;http://www.boost.org/doc/libs/1_41_0/libs/smart_ptr/shared_ptr.htm&#34;&gt;boost::shared_ptr&lt;/a&gt;.
It is fun to invent a reference counting mechanism, but seriously: Use
shared_ptr, its really cool, luabind supports it already and it simply makes
your life so much easier.&lt;/p&gt;
&lt;p&gt;I also plan to use/learn more parts of &lt;a class=&#34;reference external&#34; href=&#34;http://www.boost.org/&#34;&gt;boost&lt;/a&gt; such
as the serialization library which seems to be even more flexible than
the &lt;a class=&#34;reference external&#34; href=&#34;http://leetless.de/gitweb?p=indiana-game-engine.git;a=tree;f=lib/indiana_lib/s11n;h=c768ac21abd266ee78180f5b4c3325ec564c2062;hb=HEAD&#34;&gt;serialization stuff in D&lt;/a&gt;
I wrote and was kinda proud of.&lt;/p&gt;
&lt;p&gt;Stay tuned for more.&lt;/p&gt;
&lt;table class=&#34;docutils footnote&#34; frame=&#34;void&#34; id=&#34;id2&#34; rules=&#34;none&#34;&gt;
&lt;colgroup&gt;&lt;col class=&#34;label&#34; /&gt;&lt;col /&gt;&lt;/colgroup&gt;
&lt;tbody valign=&#34;top&#34;&gt;
&lt;tr&gt;&lt;td class=&#34;label&#34;&gt;&lt;a class=&#34;fn-backref&#34; href=&#34;#id1&#34;&gt;[1]&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;p class=&#34;first&#34;&gt;Note that this &lt;em&gt;can&lt;/em&gt; be a good idea actually. Say you decide to use
$big_library and it works quite well. You save valuable time in your early
project phases by not having to write all that stuff yourself.&lt;/p&gt;
&lt;p class=&#34;last&#34;&gt;But then, as you project evolves you have more special needs and demands to
that library.  Depending on how its designed and what it is about you might
have to actually patch the library which suddenly requires a huge amount of
time, because you have to learn the internals of $big_library for just one
little change.&lt;/p&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
</content>
  </entry>
  <entry>
    <title>libregamewiki.org linking</title>
    <link href="http://leetless.de/article-libre_game_wiki.html"/>
    <id>http://leetless.de/article-libre_game_wiki.html</id>
    <updated>2009-12-12T18:57:00</updated>
    <content type="html">&lt;p&gt;Grail is now findable on the &lt;a class=&#34;reference external&#34; href=&#34;http://libregamewiki.org/Main_Page&#34;&gt;Libregamewiki&lt;/a&gt;
thanks to BAM, so another reason for me to spend more time on grail in the
future.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Somebody feel like making CSS?</title>
    <link href="http://leetless.de/article-gitweb_css.html"/>
    <id>http://leetless.de/article-gitweb_css.html</id>
    <updated>2009-12-10T13:38:00</updated>
    <content type="html">&lt;p&gt;My current &lt;a class=&#34;reference external&#34; href=&#34;http://leetless.de/gitweb&#34;&gt;gitweb&lt;/a&gt; CSS looks terrible, the standard stuff doesn&#39;t fit very well
into the rest of the page so I started this but I didn&#39;t really finish and
now lost fun on it ;)&lt;/p&gt;
&lt;p&gt;So if somebody feels like making the existing CSS more pretty/useable (or, if you prefer,
creating a complete new set of CSS rules for the gitweb area) your help is
very welcome, just drop me a mail.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>A few thoughts on memory management in grail</title>
    <link href="http://leetless.de/article-memory_management.html"/>
    <id>http://leetless.de/article-memory_management.html</id>
    <updated>2009-12-10T09:42:00</updated>
    <content type="html">&lt;p&gt;In D we had a garbage collector that made things really easy: Just allocate an
object and never think about what happens to the memory of that object again,
the gc does it for you.
In C++ there is no garbage collector built in so you have to delete old
objects yourself.
That per se is not so much a problem as long as the question of &lt;strong&gt;ownership&lt;/strong&gt;
is always cleared.&lt;/p&gt;
&lt;p&gt;Ownership means: Object &lt;tt class=&#34;docutils literal&#34;&gt;a&lt;/tt&gt; has a reference to object &lt;tt class=&#34;docutils literal&#34;&gt;b&lt;/tt&gt; and is
responsible for deleting it. Normally with a little thought its easy to say
which object should own which one(s). However, if you let the user allocate
and play around with objects in lua, things can get a little more complicated.&lt;/p&gt;
&lt;div class=&#34;section&#34; id=&#34;current-non-solution&#34;&gt;
&lt;h2&gt;Current non-solution&lt;/h2&gt;
&lt;p&gt;Currently I&#39;m using a thingy I call &amp;quot;registry&amp;quot;. This holds references to all
objects allocated in lua and destroys them when they aren&#39;t useful anymore.
To find out when that is, you tell it to the registry. There are two possible
scopes: CHAPTER and APPLICATION. Objects with CHAPTER scope exist until the
current chapter runs. This is most useful for scenes and the actors running
around in them.&lt;/p&gt;
&lt;p&gt;The APPLICATION scope holds objects as long as the program runs. This can be
useful for the main menu or other user interface stuff.&lt;/p&gt;
&lt;p&gt;However this approach now leads to some Problems:&lt;/p&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;Currently it can happen that a Scene &amp;quot;s&amp;quot; holds an actor &amp;quot;a&amp;quot; and its not in
general known if &amp;quot;a&amp;quot; is in the registry.
In this case its not known if the scene should destroy &amp;quot;a&amp;quot; when its
destroyed itself or if the registry would do it. Also it might be that the
user wants a longer lifetime for &amp;quot;a&amp;quot; than &amp;quot;s&amp;quot; has.&lt;/li&gt;
&lt;li&gt;The user has a lot of ways to fuck up everything when creating an object
with chapter scope. For example what happens when a chapter-scope object is
created outside of any running chapter? What if the user by accident holds a
reference to a chapter-object after the object has been destroyed?&lt;/li&gt;
&lt;li&gt;Its annoying to always have to write &amp;quot;chapter&amp;quot; or &amp;quot;application&amp;quot; for each
object you create.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;possible-solution-1-register-everything&#34;&gt;
&lt;h2&gt;Possible solution 1: Register everything&lt;/h2&gt;
&lt;p&gt;Just force everything to be in the registry for example by giving the user no
way to create an object without registering it. Especially when objects internally
create other objects, put them in the registry too, &amp;quot;inheriting&amp;quot; scope from
the parent object. Then no object would ever use &lt;tt class=&#34;docutils literal&#34;&gt;delete&lt;/tt&gt;, that would
completely be &lt;tt class=&#34;docutils literal&#34;&gt;Registry&lt;/tt&gt; s job.&lt;/p&gt;
&lt;p&gt;Problem: This still allows the user to reference objects beyond their lifetime
and to produce similar fuckups. And its still annoying to always tell the
scope when creating an object.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;possible-solution-2-register-only-certain-object-types&#34;&gt;
&lt;h2&gt;Possible solution 2: Register only certain object types&lt;/h2&gt;
&lt;p&gt;We could only register &lt;tt class=&#34;docutils literal&#34;&gt;Scene&lt;/tt&gt; s and let them have ownership for things like
actors etc... However there is no guarantee that the user doesn&#39;t try to use
the same image in two different scenes and there we have the double free
corruption again.
So this one is really a no-go&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;possible-solution-3-use-reference-counting&#34;&gt;
&lt;h2&gt;Possible solution 3: Use reference counting&lt;/h2&gt;
&lt;p&gt;Build a simple reference counting mechanism so each object knows how many
places reference to it. This would mostly make the registry unecessary, except
maybe for holding scenes for the current chapter and giving names to objects
for the user.
The only problem with reference counting is that it can&#39;t handle reference
circles well (ie A has a pointer to B and B has a pointer to A), so I have to
think about the whole structure a little more to guarantee there won&#39;t be such
circles (although I&#39;m already pretty sure there won&#39;t).&lt;/p&gt;
&lt;p&gt;Below is a little examplary code. I didn&#39;t even try to compile it so forgive
me if its not correct, it should just illustrate the idea.&lt;/p&gt;
&lt;div class=&#34;codeblock c++&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre&gt;&lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;ReferenceCounted&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
  &lt;span class=&#34;k&#34;&gt;public&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt;
    &lt;span class=&#34;kt&#34;&gt;unsigned&lt;/span&gt; &lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;referenceCount&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;

    &lt;span class=&#34;n&#34;&gt;ReferenceCounted&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;referenceCount&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;

&lt;span class=&#34;k&#34;&gt;template&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;typename&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;T&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;Reference&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
    &lt;span class=&#34;n&#34;&gt;T&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;obj&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;

    &lt;span class=&#34;c1&#34;&gt;// Forbid copying of references&lt;/span&gt;
    &lt;span class=&#34;n&#34;&gt;Reference&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Reference&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;T&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&amp;amp;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;other&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
    &lt;span class=&#34;n&#34;&gt;Reference&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;T&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;operator&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Reference&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;T&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&amp;amp;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;other&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;

  &lt;span class=&#34;k&#34;&gt;public&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt;
    &lt;span class=&#34;n&#34;&gt;Reference&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;obj&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;

    &lt;span class=&#34;n&#34;&gt;Reference&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;T&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;obj&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;obj&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;obj&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;obj&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;referenceCount&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;++&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;

    &lt;span class=&#34;k&#34;&gt;virtual&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;~&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Reference&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
      &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;obj&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
        &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;obj&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;referenceCount&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;--&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
        &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;obj&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;referenceCount&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
          &lt;span class=&#34;k&#34;&gt;delete&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;obj&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
        &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;

    &lt;span class=&#34;kt&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ref&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;T&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;o&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
      &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;obj&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
        &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;obj&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;referenceCount&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;--&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
        &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;obj&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;referenceCount&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
          &lt;span class=&#34;k&#34;&gt;delete&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;obj&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
        &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
      &lt;span class=&#34;n&#34;&gt;obj&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;o&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;obj&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;referenceCount&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;++&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;

    &lt;span class=&#34;n&#34;&gt;T&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;operator&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;obj&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
    &lt;span class=&#34;n&#34;&gt;T&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;operator&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;obj&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;

&lt;span class=&#34;c1&#34;&gt;// Usage:&lt;/span&gt;

&lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;Foo&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;public&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ReferenceCounted&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
  &lt;span class=&#34;k&#34;&gt;public&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt;
    &lt;span class=&#34;kt&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;foo&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;...&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;

&lt;span class=&#34;kt&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
  &lt;span class=&#34;n&#34;&gt;Reference&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Foo&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;r&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;

  &lt;span class=&#34;n&#34;&gt;r&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ref&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Foo&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;());&lt;/span&gt;
  &lt;span class=&#34;n&#34;&gt;r&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;foo&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;

&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;// &amp;quot;r&amp;quot; is removed from the stack here&lt;/span&gt;
&lt;span class=&#34;c1&#34;&gt;// that reduces the reference count for the Foo&lt;/span&gt;
&lt;span class=&#34;c1&#34;&gt;// object and thus deletes it! Nice isn&amp;#39;t it?&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;/div&gt;
</content>
  </entry>
  <entry>
    <title>Compiles under Windows!</title>
    <link href="http://leetless.de/article-windows_compile.html"/>
    <id>http://leetless.de/article-windows_compile.html</id>
    <updated>2009-12-05T10:48:00</updated>
    <content type="html">&lt;p&gt;BAM reported yesterday that he managed to make Grail compile under windows,
good work BAM :)&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Gas gas gas</title>
    <link href="http://leetless.de/article-gasgasgas.html"/>
    <id>http://leetless.de/article-gasgasgas.html</id>
    <updated>2009-12-04T19:59:00</updated>
    <content type="html">&lt;p&gt;I have been a little lazy regarding Grail in the past week (8 days without a
commit! Thats near a desaster!). Ill accelerate development as good as I can
in the next time, promised.&lt;/p&gt;
&lt;p&gt;To give you an update, currently a friend of mine which I&#39;ll only call &amp;quot;BAM&amp;quot;
here is working on compiling grail under windows with CMake and MingW. I wish
I had more such tasks that one can delegate a little but except for the build
system currently I don&#39;t think there is much to do than port the ole Indiana
code. I think that&#39;ll change once all classes are basically ported so there is
a structure with only holes that need to be filled.&lt;/p&gt;
&lt;p&gt;By the way we already have an animated sprite that walks around depending on
where you click, so there is at least something already ;)&lt;/p&gt;
&lt;p&gt;Stay tuned!&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>What kind of GUI-Editor for grail?</title>
    <link href="http://leetless.de/article-grail_gui.html"/>
    <id>http://leetless.de/article-grail_gui.html</id>
    <updated>2009-11-27T14:13:00</updated>
    <content type="html">&lt;p&gt;I&#39;m currently thinking about how the future GUI for grail will look.
Basically there are 2 approaches that I would say are worth considering at the
moment:&lt;/p&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;Step-by-step fix Atlantis to become the new grail editor. The first step
would be to have it generate lua code instead of D code, in the future it
would be extended with a lua editor component etc...&lt;/li&gt;
&lt;li&gt;As grail is basically starting from scratch this would be the perfect
opportunity to include some editor capabilities directly into grail.&lt;ul&gt;
&lt;li&gt;(-) There would never be a code-editing component, I would keep the additional
GUI elements to a bare minimum.
I guess the control would be over a one-line shell-like command line at
the bottom where you enter commands like &amp;quot;create polygon&amp;quot; or something. No
checkboxes, no dialogs.&lt;/li&gt;
&lt;li&gt;(+) Having the editor directly combined with the engine allows some
interesting things like running parts of the game while working on it.
Although I must confess this point is very weak: Due to the lua scripting
engine one could realise similar behaviour by sending lua commands to the
runtime via a network socket or similar approaches.&lt;/li&gt;
&lt;li&gt;(+) Another good thing would be: Having a command line and the
capabilities for displaying polygons etc... inside the engine allows for
advanced debugging utilities, that could be really cool.&lt;/li&gt;
&lt;li&gt;(-) Probably this approach would mean more work :(&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Comments welcome!&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>&#34;Relaunch&#34;</title>
    <link href="http://leetless.de/article-relaunch.html"/>
    <id>http://leetless.de/article-relaunch.html</id>
    <updated>2009-11-21T14:24:00</updated>
    <content type="html">&lt;p&gt;I dunno why but I hate the word &amp;quot;relaunch&amp;quot;. Maybe it&#39;s because it makes more
fuss about the thing than its worth it.&lt;/p&gt;
&lt;p&gt;Nevertheless, you might have already noticed some of the changes. To sum up:&lt;/p&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;Everything on the page except for the comment function is now static html,
ie I post with creating text files in my git repository and running a html
generation script, which I think is very cool/geeky.&lt;/li&gt;
&lt;li&gt;I tried a new style, hope this one looks a little more
serious/professional/friendly.&lt;/li&gt;
&lt;li&gt;I cleaned up a bit, since I&#39;m now moving towards &amp;quot;Grail&amp;quot; instead of
&amp;quot;Indiana&amp;quot; (see previous post).
So things like the indiana screenshots etc... are missing now partly
because of lazyness and partly for a reason: I want to avoid yielding more
confusion about Grail vs. Indiana then necessary.
Some blog posts are missing too because I was to lazy to convert them, if
you really miss something lemme know, but I think the most important ones
should be there.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So that&#39;s it for now, stay tuned!&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>The thing with D</title>
    <link href="http://leetless.de/article-thethingwithd.html"/>
    <id>http://leetless.de/article-thethingwithd.html</id>
    <updated>2009-11-21T10:31:00</updated>
    <content type="html">&lt;div class=&#34;section&#34; id=&#34;suddenly&#34;&gt;
&lt;h2&gt;Suddenly...&lt;/h2&gt;
&lt;p&gt;Some of you might already know, I experienced some severe/general problems with D compilers lately, namingly I ran into a situation where I was not able to find a D compiler(version) that would have no compiler bugs that influenced indiana and would run with phobos/d1. Another constraint was that we need one compiler on windows and one on linux (preferrably x86_64), both naturally being able to compile &amp;amp; link the same code.&lt;/p&gt;
&lt;p&gt;I wont get in any further detail here, I just say: I really tried for about 2 full days and at least 8 compiler versions on 3 different platforms and I came to the conclusion that these were my options:&lt;/p&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;An old version of gdc I used until then had only one compiler bug that nulled a pointer in some circumstances, rendering &amp;quot;only&amp;quot; the serialization module (and thus the whole savegame system) unusable. I could have tried to stick with the old version and ship the code around the bug.&lt;/li&gt;
&lt;li&gt;llvmdc would have been interesting to try, unfortunately it doesn&#39;t seem to support phobos, so for this maybe-solution a switch to tango or at least tangobos would have been necessary.&lt;/li&gt;
&lt;li&gt;Take the newest available gdc/dmd and fix indiana that seemed to actually lay behind the current D1.0 &amp;quot;stable&amp;quot; language definition so the compilers would work with it. Note that the most current gdc releases (from sourceforge/goshaw) both couldnt even build phobos correctly (at least that day).&lt;/li&gt;
&lt;li&gt;Do a complete rewrite in a different language with more stable toolchain.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I decided for the last one for a lot of reasons:&lt;/p&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;The incident that GDC didn&#39;t receive updates for at least a year (or so) while DMD did shows that the D community is not yet &amp;quot;mature&amp;quot;/&amp;quot;stable&amp;quot;/&amp;quot;big&amp;quot; whatever you wanna call it. I wouldn&#39;t call the D community &amp;quot;unreliable&amp;quot;, but at least for gdc you never know what you get.&lt;/li&gt;
&lt;li&gt;A complete rewrite offers some interesting opportunities of restructuring the code, kicking some old mistakes that werent worth the effort to do it up to now.&lt;/li&gt;
&lt;li&gt;When I started with indiana in D, I didn&#39;t plan the lua part from the beginning, now when rewriting I can keep it in mind and/or do it on the way.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;so-which-language-did-i-choose&#34;&gt;
&lt;h2&gt;So which language did I choose?&lt;/h2&gt;
&lt;p&gt;Well it had to be a language that runs at least on windows and linux, allowed relatively easy usage of SDL and lua on those platforms, could somehow produce binaries for easy distribution on windows and needless to say that I&#39;m now looking for a big community.&lt;/p&gt;
&lt;p&gt;This, and my knowledge of languages in mind (learning a complete new one would cost lots of additional time), there weren&#39;t many options:&lt;/p&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;&lt;strong&gt;C#/other .NET stuff&lt;/strong&gt;, possible, but I&#39;m really not experienced with it, nor do I have knowledge about how reliable the linux toolchain is, how easy you can bind to SDL etc...&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Java&lt;/strong&gt;: No wai. For a &amp;quot;dynamic&amp;quot; language the syntax is way too clumsy, distribution of small binaries isnt possible (at least not that I know of), performance can be a problem. Plus a personal dislike + lacking experience ;)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Python&lt;/strong&gt;: Confessed, I like python. Naturally with python I wouldn&#39;t have built a lua interface, I&#39;d just have the games be written in python. The windows executable would be made with py2exe, which afaik just stuffs the complete python interpreter and all libraries into one big exe file. All in all, a good candidate, development speed has been always fast in python (at least for me), but definetely we would run into performance problems sooner or later and thus would need to have some parts in C/pyrex/whatever.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;C++&lt;/strong&gt;: There you are. Long time I ran around and told people: The only reason for choosing C++ over D is popularity/interfacing with existing code. I still believe so (except for some little language parts maybe), but this is all about community, so no need to lie to myself here. Also it might not be too hard to find a few helpers when I feel I need them.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;so-what-happens-next&#34;&gt;
&lt;h2&gt;So what happens next?&lt;/h2&gt;
&lt;p&gt;At the moment I&#39;m coding what I will call &amp;quot;grail&amp;quot; (you know, the holy grail from indiana jones III / last crusade) in C++ right along with lua support. I&#39;m not sure yet what I will do about the gui part (ie if I just alter atlantis to generate lua-code, if I extend it to be a more full-fledged editor, or if I build something new).&lt;/p&gt;
&lt;p&gt;But one way or another in the end there will be&lt;/p&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;libgrail - Similar to what indiana is now, just in C++. This will theoretically allow you to build your adventure games directly in C++ without using/linking lua at all, although regarding documentation and &amp;quot;making it easy/fun to use&amp;quot;, I&#39;ll focus on the runtime first as I think most game developers will rather use lua than C++.&lt;/li&gt;
&lt;li&gt;grail-runtime - A binary application that takes a game as input and runs it. Where a game is a directory full of lua code, graphics, sounds, etc... Naturally later on it will be possible to stuff the game into a zipfile and append it to the grail-runtime so you can distribute you game in a single binary. Also I&#39;m thinking about an open lua interface that developers can enable, so you (or the gui) can control the engine while it is running allowing cool debugging/testing things.&lt;/li&gt;
&lt;li&gt;The GUI, as said, I&#39;m not sure yet what it will be. Maybe not much more than atlantis is now (for first at least), just that it generates lua code. Maybe a full-fledged visionaire/wintermute - like editing system that does most of the work you have to do.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Later, I&#39;ll put up my grail git directory, don&#39;t judge me for the code yet, it has been a while since I did real c++ coding. And naturally at this state you can&#39;t expect something to look at really. When I have it that far that a character can walk around again, I&#39;ll post some screenies and inform you!&lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
  <entry>
    <title>It&#39;s a trap - Multilingual web applications</title>
    <link href="http://leetless.de/article-trap_multilingual.html"/>
    <id>http://leetless.de/article-trap_multilingual.html</id>
    <updated>2009-11-21T10:26:00</updated>
    <content type="html">&lt;p&gt;Say you&#39;re designing a multilingual web application. Where would you put the language information?&lt;/p&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;Carry it over with each request (generate hidden inputs)&lt;/li&gt;
&lt;li&gt;Into the users session&lt;/li&gt;
&lt;li&gt;Into the URL&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The first approach is obviously quite tedious and more or less just included for completeness. No doubt you don&#39;t wanna do this except for a really small app or some rather unusual constraints (no cookies, framework that has hard constraints on URL scheme).&lt;/p&gt;
&lt;p&gt;The second one looks like a really good idea:&lt;/p&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;You don&#39;t need to find out the users language with each request with url parsing or similar things,&lt;/li&gt;
&lt;li&gt;You can freely choose your URLs after whatever scheme you like, language doesn&#39;t have to be a part of it.&lt;/li&gt;
&lt;li&gt;You URLs can be exchanged between users of different languages, they will be displayed in each users favourite language to them.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So wheres the TRAP? Here a hint: Think of search engines.&lt;/p&gt;
&lt;p&gt;Still don&#39;t see it?&lt;/p&gt;
&lt;p&gt;Well took me some time, too. The problem is: If a search engine from some country indexes your page its bot will most probably not emulate/have cookie support. So all search engines in all countries will see and thus index the page in its default language (that one that appears when a user has no cookies enabled). This way the search engines won&#39;t find your site when the users enter keywords in their own language. What a crap.&lt;/p&gt;
&lt;p&gt;So the answer is obvious: Put that information into your url. Or if you want detect it from the domain name (if you have one domain for each country/language &amp;lt;- distinguish carefully btw!)&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>It&#39;s a trap - Python object construction / reference semantics</title>
    <link href="http://leetless.de/article-trap_python_objects.html"/>
    <id>http://leetless.de/article-trap_python_objects.html</id>
    <updated>2009-11-21T10:21:00</updated>
    <content type="html">&lt;p&gt;I guess this is a common trap. I personally am python coder for years now and still, from time to time I run into it.
As the syntax for it is very concise you might sometimes be tempted to give default values for members in a classes definition.
Code says more then thousand words. This works fine:&lt;/p&gt;
&lt;div class=&#34;codeblock python&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre&gt;&lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;Foo&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;object&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
  &lt;span class=&#34;n&#34;&gt;x&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;7&lt;/span&gt;

&lt;span class=&#34;n&#34;&gt;f1&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Foo&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;
&lt;span class=&#34;n&#34;&gt;f2&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Foo&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;

&lt;span class=&#34;n&#34;&gt;f2&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;x&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;42&lt;/span&gt;

&lt;span class=&#34;k&#34;&gt;print&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;f1&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;x&lt;/span&gt; &lt;span class=&#34;c&#34;&gt;# prints 7&lt;/span&gt;
&lt;span class=&#34;k&#34;&gt;print&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;f2&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;x&lt;/span&gt; &lt;span class=&#34;c&#34;&gt;# prints 42&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;Now say we have something else for x, say it will contain a list most of the time and thus by default it should be the empty list:&lt;/p&gt;
&lt;div class=&#34;codeblock python&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre&gt;&lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;Foo&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;object&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
  &lt;span class=&#34;n&#34;&gt;x&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[]&lt;/span&gt;

  &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;append&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;bp&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;y&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt; &lt;span class=&#34;bp&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;x&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;append&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;y&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;

&lt;span class=&#34;n&#34;&gt;f1&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Foo&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;
&lt;span class=&#34;n&#34;&gt;f2&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Foo&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;

&lt;span class=&#34;n&#34;&gt;f1&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;append&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;Take evasive action!&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;

&lt;span class=&#34;k&#34;&gt;print&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;f1&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;x&lt;/span&gt; &lt;span class=&#34;c&#34;&gt;# prints [&amp;quot;Take evasive action!&amp;quot;]&lt;/span&gt;
&lt;span class=&#34;k&#34;&gt;print&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;f2&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;x&lt;/span&gt; &lt;span class=&#34;c&#34;&gt;# prints [&amp;quot;Take evasive action!&amp;quot;] &amp;lt;- WTF?&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;The somewhat experienced programmer immediately sees what happens. Let&#39;s look at this step by step.&lt;/p&gt;
&lt;div class=&#34;section&#34; id=&#34;what-does-python-do-when-you-access-f1-x&#34;&gt;
&lt;h2&gt;What does python do when you access f1.x?&lt;/h2&gt;
&lt;p&gt;It first looks if the object has a member x, if it can not find any, it accesses the class member x.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;so-what-exactly-happens-in-the-first-example&#34;&gt;
&lt;h2&gt;So what exactly happens in the first example?&lt;/h2&gt;
&lt;p&gt;Directly after construction the objects f1 and f2 point both to Foo.x that is at the same x. Thes with f2.x = 42 we add a member x to the object f2 so that we have a situation like the following:&lt;/p&gt;
&lt;ul class=&#34;simple&#34;&gt;
&lt;li&gt;Foo.x points to the value 7&lt;/li&gt;
&lt;li&gt;f1 does not have a member x, so access to f1.x will be redirected to Foo.x&lt;/li&gt;
&lt;li&gt;f2.x points to the value 42&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note that you never &amp;quot;change&amp;quot; an integer in python, you can only reference a different integer, ie integers are immutable.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;what-exactly-happens-in-the-second-example&#34;&gt;
&lt;h2&gt;What exactly happens in the second example?&lt;/h2&gt;
&lt;p&gt;As in the first example, after construction, both f1 and f2 don&#39;t even have a member x, they just redirect to Foo.x. Whats different here is that in this example we don&#39;t ever create an x-member in one of the objects!&lt;/p&gt;
&lt;p&gt;Instead of integers, lists are mutable. In our append call, we actually change Foo.x instead of creating a new member. As both f1 and f2 still pass through to Foo.x, we see the change on both objects.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;yet-another-trap&#34;&gt;
&lt;h2&gt;Yet another trap!&lt;/h2&gt;
&lt;p&gt;Now you might think &amp;quot;Okay, then I do it like this:&amp;quot;&lt;/p&gt;
&lt;div class=&#34;codeblock python&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre&gt;&lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;Foo&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;object&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
  &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;__init__&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;bp&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;x&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[]):&lt;/span&gt;
    &lt;span class=&#34;bp&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;x&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;x&lt;/span&gt;

&lt;span class=&#34;n&#34;&gt;f1&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Foo&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;
&lt;span class=&#34;n&#34;&gt;f2&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Foo&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;But this is basically the same problem, with a slightly different background. The default value for x you type there is only created once. So what you do here would be creating members f1.x and f2.x but still having them point to the same object which leads to the same unwanted result.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;section&#34; id=&#34;so-what-should-i-do&#34;&gt;
&lt;h2&gt;So what should I do?&lt;/h2&gt;
&lt;p&gt;Don&#39;t use this as a way for giving default values for object members. Instead do something like:&lt;/p&gt;
&lt;div class=&#34;codeblock python&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre&gt;&lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;Foo&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;object&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
  &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;__init__&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;bp&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;**&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;kwargs&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
    &lt;span class=&#34;bp&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;x&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;kwargs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;get&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#39;x&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[])&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;This way you have the default value defined inside __init__, which guarantees that each defaultly-initialized object gets a different &amp;quot;[]&amp;quot;.&lt;/p&gt;
&lt;p&gt;Depending on your actual needs you might also do something like:&lt;/p&gt;
&lt;div class=&#34;codeblock python&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre&gt;&lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;Foo&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;object&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
  &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;__init__&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;bp&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;x&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;bp&#34;&gt;None&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
    &lt;span class=&#34;bp&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;x&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;x&lt;/span&gt;
    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;bp&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;x&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;is&lt;/span&gt; &lt;span class=&#34;bp&#34;&gt;None&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;bp&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;x&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[]&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;Or you could copy every received value:&lt;/p&gt;
&lt;div class=&#34;codeblock python&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre&gt;&lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;Foo&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;object&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
  &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;__init__&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;bp&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;x&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[]):&lt;/span&gt;
    &lt;span class=&#34;bp&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;x&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;x&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[:]&lt;/span&gt; &lt;span class=&#34;c&#34;&gt;# assumes, passed x is always a list!&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;For those of you that are still very new to python: Try to always keep one eye on what references what. Be aware that everything in python has reference semantics although for immutable values that can&#39;t lead to this problem (and in lots of situations this &amp;quot;feels&amp;quot; like value semantic). Also note that my approaches are far from perfect too. And: Don&#39;t use any of that code if you do not fully understand it, play around with everything in the python interpreter, you can learn a lot of things there.&lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
  <entry>
    <title>It&#39;s a trap!</title>
    <link href="http://leetless.de/article-trap.html"/>
    <id>http://leetless.de/article-trap.html</id>
    <updated>2009-11-21T10:16:00</updated>
    <content type="html">&lt;p&gt;I&#39;m hereby creating a new kind of postings on this site: I want to post about common programming traps, you know that kind of stuff you think at first &amp;quot;Obviously it works this way&amp;quot; and later on you feel... trapped!&lt;/p&gt;
&lt;p&gt;For general reference to this topic see:&lt;/p&gt;
&lt;p&gt;&lt;a class=&#34;reference external&#34; href=&#34;http://www.youtube.com/watch?v=dddAi8FF3F4&#34;&gt;Admiral Ackbar&lt;/a&gt;,
&lt;a class=&#34;reference external&#34; href=&#34;http://www.youtube.com/watch?v=mdMaZlWkK8o&#34;&gt;Sheldon&lt;/a&gt; and/or
&lt;a class=&#34;reference external&#34; href=&#34;http://www.youtube.com/watch?v=hQbtBfPmjJk&#34;&gt;Captain Picard&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Traps ahead, be prepared!&lt;/p&gt;
</content>
  </entry>
</feed>