<?xml version="1.0"?>
<!-- name="generator" content="blosxom/2.0" -->
<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">

<rss version="0.91">
  <channel>
    <title>Stefan Bodewig's Weblog   </title>
    <link>http://stefan.samaflost.de/blog</link>
    <description>Mixed Content</description>
    <language>en</language>

<item>
  <title>Lazy Sequence of Directory Descendants in C#</title>
  <link>http://stefan.samaflost.de/blog/en/dotNet/lazy_directory_listing.html</link>
  <description>
&lt;p&gt;Chris Sells &lt;a
href=&quot;http://www.sellsbrothers.com/news/showTopic.aspx?ixTopic=2334&quot;&gt;translated&lt;/a&gt;
a Clojure &lt;em&gt;&lt;a href=&quot;http://www.pluralsight-training.net/community/blogs/craig/archive/2010/03/09/creating-a-lazy-sequence-of-directory-descendants-in-clojure.aspx&quot;&gt;implementation of a function that descends
into a directory in a &quot;lazy&quot; manner&lt;/a&gt;&lt;/em&gt; by Craig Andera into C#
but his solution is so C# 2.0 ;-).&lt;/p&gt;

&lt;p&gt;Here's my take&lt;/p&gt;

&lt;pre class=&quot;code&quot;&gt;
    static IEnumerable&amp;lt;string&gt; GetDirectoryDescendants(string path) {
        return Directory.GetFiles(path)
            .Concat(Directory.GetDirectories(path)
                .SelectMany&amp;lt;string, string&gt;(GetDirectoryDescendants)
            );
    }
&lt;/pre&gt;

&lt;p&gt;where I'd hope C# 4.0's compiler will be able to deduce the types
for the &lt;code&gt;SelectMany&lt;/code&gt; itself.  Interestingly the C# 3.0
compiler does fine when I use a lambda expression instead:

&lt;pre class=&quot;code&quot;&gt;
    static IEnumerable&amp;lt;string&gt; GetDirectoryDescendants(string path) {
        return Directory.GetFiles(path)
            .Concat(Directory.GetDirectories(path)
                .SelectMany(dir =&gt; GetDirectoryDescendants(dir))
            );
    }
&lt;/pre&gt;</description>
</item>
<item>
  <title>How to detect Ant 1.8.0 (or later)</title>
  <link>http://stefan.samaflost.de/blog/en/Apache/Ant/how_to_detect_180.html</link>
  <description>
&lt;p&gt;So Apache Ant 1.8.0 is out and I'm supposed to follow a tradition I
started with &lt;a
href=&quot;http://stefan.samaflost.de/blog/2004/10/07#how_to_detect_162.html&quot;&gt;Ant
1.6.2&lt;/a&gt;.  If you can be sure that you are at least using Ant 1.7.0
then the built-in &amp;lt;antversion&amp;gt; task/condition will do:

&lt;pre class=&quot;code&quot;&gt;
  &amp;lt;antversion property=&quot;Ant-1.8.0-or-later&quot;
              atleast=&quot;1.8.0&quot;/&gt;
&lt;/pre&gt;

&lt;p&gt;otherwise the trick of checking for a class that has been
introduced with Ant 1.8.0 can always be used:&lt;/p&gt;

&lt;pre class=&quot;code&quot;&gt;
  &amp;lt;available property=&quot;Ant-1.8.0-or-later&quot;
             classname=&quot;org.apache.tools.ant.types.resources.MappedResource&quot;/&gt;
&lt;/pre&gt;
</description>
</item>
<item>
  <title>What's New in Ant 1.8.0?</title>
  <link>http://stefan.samaflost.de/blog/en/Apache/Ant/whats_new_in_180.html</link>
  <description>
&lt;p&gt;Antoine Levy-Lambert has recently built the first release candidate
  for Ant 1.8.0
  and &lt;a href=&quot;http://mail-archives.apache.org/mod_mbox/ant-dev/201001.mbox/%3C4B43C4A5.8070103@gmx.de%3E&quot;&gt;called
  for a vote&lt;/a&gt;, so we should be close to the first Ant release since
  eighteen months.  This release mostly brings enhancements and bug
  fixes to many tasks and types (this is the real strength of Ant
  IMHO) but there also are a few core changes, the full list
  is &lt;a href=&quot;http://svn.apache.org/repos/asf/ant/core/tags/ANT_180_RC1/WHATSNEW&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;My personal top five changes (I know there are six items, but the
  first one doesn't count ;-):&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://issues.apache.org/bugzilla/buglist.cgi?query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=CLOSED&amp;component=Build%20Process&amp;component=Core&amp;component=Core%20tasks&amp;component=Documentation&amp;component=Optional%20SCM%20tasks&amp;component=Optional%20Tasks&amp;component=Other&amp;component=Wrapper%20scripts&amp;resolution=FIXED&amp;target_milestone=1.8.0&amp;product=Ant&quot;&gt;More
      than 275&lt;/a&gt; fixed Bugzilla issues.&lt;/li&gt;

  &lt;li&gt;Lexically scoped local properties, i.e. properties that are only
    defined inside a target, sequential block or similar environment.
    This is very useful inside of &lt;code&gt;&amp;lt;macrodef&amp;gt;&lt;/code&gt;s where
    a macro can now define a temporary property that will disappear
    once the task has finished.&lt;/li&gt;

  &lt;li&gt;&lt;code&gt;&amp;lt;import&amp;gt;&lt;/code&gt; can now import from any file- or
    URL-providing resource - this
    includes &lt;code&gt;&amp;lt;javaresource&amp;gt;&lt;/code&gt;.  This
    means &lt;code&gt;&amp;lt;import&amp;gt;&lt;/code&gt; can read build file snippets
    from JARs or fixed server URLs.  There are several other
    improvements in the area of import.&lt;/li&gt;

  &lt;li&gt;Various improvements to the directory scanning code that help
    with symbolic link cycles (as can be found on MacOS X Java
    installations for example) and improve scanning performance.  For
    big directory trees the improvement
    is &lt;a href=&quot;http://mail-archives.apache.org/mod_mbox/ant-dev/200809.mbox/%3Cy1u4p48li29.fsf@v30161.1blu.de%3E&quot;&gt;dramatic&lt;/a&gt;.&lt;/li&gt;

  &lt;li&gt;The way developers can extend Ant's property expansion algorithm
    has been rewritten (breaking the older API) to be easier to use a
    be more powerful.  The whole local properties mechanism is
    implemented using that API and could be implemented in a separate
    library without changes in Ant's core.  Things like the
    yet-to-be-released &lt;a href=&quot;http://ant.apache.org/antlibs/props/index.html&quot;&gt;props
    Antlib&lt;/a&gt; can now provide often required &quot;scripty&quot; fuctions
    without touching Ant itself.

    &lt;br/&gt;

    At the same time the if and unless attributes have been rewritten
    to do the expected thing if applied to a property expansion
    (i.e. &lt;code&gt;if=&quot;${foo}&quot;&lt;/code&gt; will mean &quot;yes, do it&quot;
    if &lt;code&gt;${foo}&lt;/code&gt; expands to true, in Ant 1.7.1 it would mean
    &quot;no&quot; unless a property named &quot;true&quot; existed).  This adds &quot;testing
    conditions&quot; as a new use-case to property expansion.&lt;/li&gt;

  &lt;li&gt;A new top-level element &lt;code&gt;&amp;lt;extension-point&amp;gt;&lt;/code&gt;
  assists in writing re-usable build files that are meant to be
  imported.  &lt;code&gt;&amp;lt;extension-point&amp;gt;&lt;/code&gt; has a name and a
  dependency-list like &lt;code&gt;&amp;lt;target&amp;gt;&lt;/code&gt; and can be used like a
    &lt;code&gt;&amp;lt;target&amp;gt;&lt;/code&gt; from the command line or
    a dependy-list but the importing build file can add targets to
    the &lt;code&gt;&amp;lt;extension-point&amp;gt;&lt;/code&gt;'s depends list.

    &lt;br/&gt;
    In Ant 1.7.1 one would use something like
&lt;pre class=&quot;code&quot;&gt;
imported.xml:
&amp;lt;project name=&quot;imported&quot;...&amp;gt;
  ...
  &amp;lt;target name=&quot;setup&quot;&amp;gt;
    ...
  &amp;lt;/target&amp;gt;
  &amp;lt;target name=&quot;compile&quot; depends=&quot;setup&quot;&amp;gt;
    ...
  &amp;lt;/target&amp;gt;
&amp;lt;/project&amp;gt;

importing.xml
&amp;lt;project ...&amp;gt;
  ...
  &amp;lt;import file=&quot;imported.xml&quot;&amp;gt;
  &amp;lt;target name=&quot;setup&quot; depends=&quot;imported.setup&quot;&amp;gt;
    ... stuff that should happen before compile ...
  &amp;lt;/target&amp;gt;
&amp;lt;/project&amp;gt;
&lt;/pre&gt;
    to define a pre-compilation stage by target overriding.  With
    some planning it can be improved to
&lt;pre class=&quot;code&quot;&gt;
imported.xml:
&amp;lt;project name=&quot;imported&quot;...&amp;gt;
  ...
  &amp;lt;target name=&quot;setup&quot;&amp;gt;
    ...
  &amp;lt;/target&amp;gt;
  &amp;lt;target name=&quot;ready-to-compile&quot; depends=&quot;setup&quot;/&amp;gt;
  &amp;lt;target name=&quot;compile&quot; depends=&quot;ready-to-compile&quot;&amp;gt;
    ...
  &amp;lt;/target&amp;gt;
&amp;lt;/project&amp;gt;

importing.xml
&amp;lt;project ...&amp;gt;
  ...
  &amp;lt;import file=&quot;imported.xml&quot;&amp;gt;
  &amp;lt;target name=&quot;ready-to-compile&quot; depends=&quot;imported.ready-to-compile&quot;&amp;gt;
    ... stuff that should happen before compile ...
  &amp;lt;/target&amp;gt;
&amp;lt;/project&amp;gt;
&lt;/pre&gt;
    In Ant 1.8.0 one would write this as
&lt;pre class=&quot;code&quot;&gt;
imported.xml:
&amp;lt;project name=&quot;imported&quot;...&amp;gt;
  ...
  &amp;lt;target name=&quot;setup&quot;&amp;gt;
    ...
  &amp;lt;/target&amp;gt;
  &amp;lt;extension-point name=&quot;ready-to-compile&quot; depends=&quot;setup&quot;/&amp;gt;
  &amp;lt;target name=&quot;compile&quot; depends=&quot;ready-to-compile&quot;&amp;gt;
    ...
  &amp;lt;/target&amp;gt;
&amp;lt;/project&amp;gt;

importing.xml
&amp;lt;project ...&amp;gt;
  ...
  &amp;lt;import file=&quot;imported.xml&quot;&amp;gt;
  &amp;lt;target name=&quot;pre-compile&quot; extensionOf=&quot;ready-to-compile&quot;&amp;gt;
    ... stuff that should happen before compile ...
  &amp;lt;/target&amp;gt;
&amp;lt;/project&amp;gt;
  &lt;/pre&gt;

    and the &lt;code&gt;pre-compile&lt;/code&gt; target was added
    to &lt;code&gt;ready-to-compile&lt;/code&gt; dependeny-list.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;extension-point&lt;/code&gt; and some changes
  in &lt;code&gt;import&lt;/code&gt; and its new cousin &lt;code&gt;include&lt;/code&gt; have
  been inspired by &lt;a href=&quot;http://www.easyant.org/trac&quot;&gt;Easyant&lt;/a&gt;
  which can now use an un-patched version of Ant together with a
  custom &lt;code&gt;ProjectHelper&lt;/code&gt; to create a build system quite
  different from Ant's original ideas.  &lt;code&gt;ProjectHelper&lt;/code&gt; is the mechanism that allowed
  me
  to &lt;a href=&quot;http://stefan.samaflost.de/blog/en/Apache/Ant/ant_javafront.html&quot;&gt;sketch&lt;/a&gt;
  &lt;a href=&quot;http://svn.apache.org/repos/asf/ant/sandbox/javafront/&quot;&gt;JavaFront&lt;/a&gt;
  or Nicolas Lalev&amp;#xe9;e to
  write &lt;a href=&quot;http://svn.apache.org/repos/asf/ant/sandbox/groovyfront/&quot;&gt;GroovyFront&lt;/a&gt;
  which lets you write build files in Groovy.&lt;/p&gt;</description>
</item>
<item>
  <title>Uncle Stefan</title>
  <link>http://stefan.samaflost.de/blog/en/personal/family/uncle_stefan.html</link>
  <description>
&lt;p&gt;When my Mum called us this morning to tell us that my brother's
first daughter was born my kids celebrated &quot;finally I'm a cousin&quot;.&lt;/p&gt;

&lt;p&gt;Welcome Carina - being born on 11/11 will not always be easy in the
rhine area - and congratulations Claudia and Maik.&lt;/p&gt;</description>
</item>
<item>
  <title>PGP-Key Signing am OpenMonday der ruhrJUG am 16.3.2009</title>
  <link>http://stefan.samaflost.de/blog/de/ruhrjug/pgp_keysigning_openmonday_20090316.html</link>
  <description>
&lt;table&gt;
  &lt;tr&gt;
    &lt;th&gt;Wo&lt;/th&gt;
    &lt;td&gt;Im Wintergarten
      des &lt;a href=&quot;http://www.unperfekthaus.de/&quot;&gt;Unperfekthaus&lt;/a&gt; in
      Essen&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;th&gt;Wann&lt;/th&gt;
    &lt;td&gt;16. M&amp;#xe4;rz 2009, gegen 18:30 Uhr&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;Nachdem es zumindest ein paar Interessierte gibt, werden wir eine
  &quot;Key-Signing-Party&quot; im Rahmen des OpenMonday einfach mal
  ausprobieren.  Der OpenMonday ist offen f&amp;#xfc;r alle, somit auch das
  Key-Signing, allerdings kostet der Eintritt in das Unperfekthaus
  5,50&amp;nbsp;&amp;euro; - daf&amp;#xfc;r sind alkoholfreie Getr&amp;#xe4;nke im Eintritt
  enthalten.&lt;/p&gt;

&lt;h3&gt;Wie geht das?&lt;/h3&gt;

&lt;p&gt;Ziel des Ganzen ist, dass Menschen mit OpenPGP Schl&amp;#xfc;sseln sich
  treffen und sich gegenseitig &amp;#xfc;berzeugen, die jeweiligen
  Inhaber(innen) ihrer Schl&amp;#xfc;ssel zu sein.  Sp&amp;#xe4;ter - nicht im Rahmen
  der &quot;Party&quot; - unterzeichnet jede(r) die Schl&amp;#xfc;ssel, von denen sie/er
  &amp;#xfc;berzeugt werden konnte.&lt;/p&gt;

&lt;h4&gt;Vorbereitung&lt;/h4&gt;

&lt;p&gt;Wenn Du an der &quot;Key-Signing-Party&quot; teilnehmen m&amp;#xf6;chtest, dann
  schicke mir Deinen Schl&amp;#xfc;ssel (den Schl&amp;#xfc;ssel, nicht die ID, ich werde
  nicht selber auf Jagd nach Schl&amp;#xfc;sseln gehen)
  an &lt;code&gt;keys-openmonday-20091603@stefan.samaflost.de&lt;/code&gt; - mehr
  ist nich n&amp;#xf6;tig.  Du solltest innerhalb weniger Tage eine R&amp;#xfc;ckmeldung
  von mir bekommen.&lt;/p&gt;

&lt;p&gt;Da ich noch ein wenig Vorbereitung ben&amp;#xf6;tigen werde, sollten die
  Schl&amp;#xfc;ssel sp&amp;#xe4;testens am 15. M&amp;#xe4;rz angekommen sein.&lt;/p&gt;

&lt;h4&gt;Die &quot;Party&quot;&lt;/h4&gt;

&lt;p&gt;Ich werde eine Liste mit allen Schl&amp;#xfc;sseln, die ich bekommen habe,
  ausdrucken und f&amp;#xfc;r jeden Teilnehmer mitbringen.  Diese Liste enth&amp;#xe4;lt
  die Key-IDs und Fingerprints.&lt;/p&gt;

&lt;p&gt;Im ersten Schritt pr&amp;#xfc;ft jeder seinen eigenen Eintrag auf der Liste
  - wir wollen ja vermeiden, dass ich irgendwem meinen eigenen
  Schl&amp;#xfc;ssel unterschiebe.&lt;/p&gt;

&lt;p&gt;Dar&amp;#xfc;ber hinaus werde ich aus allen Keys einen Keyring herstellen,
  den ich zum Download anbiete und ggf. per Email versende (mal sehen,
  wie viele Teilnehmner wir haben werden).&lt;/p&gt;

&lt;p&gt;Anschlie&amp;#xdf;end greift sich jede(r) einen Stift und alles, was sie/er
  ben&amp;#xf6;tigt, um die anderen von der eigenen Echtheit zu &amp;#xfc;berzeugen, und
  wir verwenden so eine Art doppelk&amp;#xf6;pfige Schlange, damit jede(r)
  Teilnehmer(in) allen anderen begegnet.&lt;/p&gt;

&lt;p&gt;Wie Ihr den/die Andere(n) &amp;#xfc;berzeugt, bleibt Euch &amp;#xfc;berlassen - und
  vor allem dem/derjenigen, die/der &amp;#xfc;berzeugt werden soll.  Es wird
  Leute geben, die Ausweise sehen wollen, also bringt besser einen
  mit.  Andere m&amp;#xf6;gen mit Euch ein &quot;Geheimwort&quot; absprechen, das Ihr
  sp&amp;#xe4;ter in eine Email steckt und PGP-signiert versendet.  Es gibt
  keine Regeln.&lt;/p&gt;

&lt;p&gt;Wenn alle einander begegnet sind, ist die &quot;Party&quot; schon vorbei, und
  wir kehren zum hoffentlich gut besuchten OpenMonday zur&amp;#xfc;ck.&lt;/p&gt;

&lt;h4&gt;Das Signieren&lt;/h4&gt;

&lt;p&gt;Wirklich signiert werden die Schl&amp;#xfc;ssel w&amp;#xe4;hrend der &quot;Party&quot; eher
  nicht.  Zwar hat das Unperfekthaus Internetzugang, aber die
  wenigsten d&amp;#xfc;rften ihre privaten Schl&amp;#xfc;ssel, die man zum Signieren
  ben&amp;#xf6;tigt, dabeihaben.&lt;/p&gt;

&lt;p&gt;Statt dessen signiert Ihr sp&amp;#xe4;ter die Schl&amp;#xfc;ssel, von denen Ihr
  &amp;#xfc;berzeugt wurdet, exportiert sie und sendet sie an die jeweiligen
  Inhaber(inner).&lt;/p&gt;
</description>
</item>
  </channel>
</rss>