<?xml version="1.0"?>
<rss version="2.0.">
  <channel>
    <title>Advogato blog for redi</title>
    <link>http://www.advogato.org/person/redi/</link>
    <description>Advogato blog for redi</description>
    <language>en-us</language>
    <generator>mod_virgule</generator>
    <pubDate>Thu, 24 Jul 2008 06:30:14 GMT</pubDate>
    <item>
      <pubDate>Thu, 17 Jul 2008 14:50:02 GMT</pubDate>
      <title>17 Jul 2008</title>
      <link>http://www.advogato.org/person/redi/diary.html?start=148</link>
      <guid>http://www.advogato.org/person/redi/diary.html?start=148</guid>
      <description>I agree with &lt;a href="" 'http://www.advogato.org/person/lkcl/diary/473.html'&gt;lkcl&lt;/a&gt;&#xD;
that you can avoid being marked as a spammer by taking 30&#xD;
seconds to say what your involvement is in open-source&#xD;
software.  Linking to a brand new Wordpress account that has&#xD;
no content doesn't convince me you're doing anything except&#xD;
preparing to spam (see one of today's new accounts.)&#xD;
&#xD;
&lt;p&gt; &lt;a href="" 'http://advogato.org/acct/new.html'&gt;Create a new&#xD;
account&lt;/a&gt; could recommend being more descriptive, to&#xD;
protect against the trigger-happy spam police (I include&#xD;
myself in that category.)</description>
    </item>
    <item>
      <pubDate>Fri, 11 Jul 2008 12:43:25 GMT</pubDate>
      <title>11 Jul 2008</title>
      <link>http://www.advogato.org/person/redi/diary.html?start=147</link>
      <guid>http://www.advogato.org/person/redi/diary.html?start=147</guid>
      <description>&lt;a href="" 'http://advogato.org/person/ncm/diary/275.html'&gt;ncm&lt;/a&gt;,&#xD;
yep, I only mentioned the one that most annoyed me, as I'd&#xD;
already done one hatchet job on it in the #cplusplus channel&#xD;
at work.  There are a few sensible rules, though they tend&#xD;
to be in the blindingly-obvious category, rather than useful&#xD;
e.g. "Use the C++ keyword &lt;tt&gt;explicit&lt;/tt&gt; for constructors&#xD;
with&#xD;
one argument" - not really a style tip, more like "remember&#xD;
to tie your laces when you put your shoes on."&#xD;
&#xD;
&lt;p&gt; &lt;strong&gt;Update:&lt;/strong&gt; I hadn't noticed they require ALL_CAPS&#xD;
for enumerator names. Epic fail. &#xD;
</description>
    </item>
    <item>
      <pubDate>Thu, 10 Jul 2008 16:41:28 GMT</pubDate>
      <title>10 Jul 2008</title>
      <link>http://www.advogato.org/person/redi/diary.html?start=146</link>
      <guid>http://www.advogato.org/person/redi/diary.html?start=146</guid>
      <description>Having read the &lt;a href="" 'http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml'&gt;Google&#xD;
C++ Style Guide&lt;/a&gt; I can&#xD;
safely say I would never work for Google. Any style guide&#xD;
that recommends 2-stage construction "if at all possible" is&#xD;
shit. That style is, as Stroustrup said &lt;i&gt;eight years&#xD;
ago&lt;/i&gt;, a relic of pre-exception C++.</description>
    </item>
    <item>
      <pubDate>Thu, 10 Jul 2008 15:44:24 GMT</pubDate>
      <title>10 Jul 2008</title>
      <link>http://www.advogato.org/person/redi/diary.html?start=145</link>
      <guid>http://www.advogato.org/person/redi/diary.html?start=145</guid>
      <description>Dear Advogato,&#xD;
&#xD;
&lt;p&gt; I've been too busy to read you recently, except for a few&#xD;
people's diaries that I watch for updates. I hope you don't&#xD;
mind.&#xD;
&#xD;
&lt;p&gt; I thought you might like to know I released a new version of&#xD;
&lt;a href="http://www.advogato.org/proj/PStreams/" &gt;PStreams&lt;/a&gt; yesterday, but you probably don't care.&#xD;
I've also resumed porting &lt;a href="" 'http://stlsoft.org/'&gt;STLsoft&lt;/a&gt; and &lt;a href="" 'http://pantheios.sourceforge.net/'&gt;Pantheios&lt;/a&gt; to&#xD;
Solaris, and made my biggest change yet to&#xD;
&lt;a href="http://www.advogato.org/proj/GCC:%20GNU%20Compiler%20Collection/" &gt;GCC: GNU Compiler Collection&lt;/a&gt;, fixing something I&#xD;
helped break back in February this year. &#xD;
&#xD;
&lt;p&gt; Until next time.</description>
    </item>
    <item>
      <pubDate>Tue, 22 Apr 2008 05:07:36 GMT</pubDate>
      <title>22 Apr 2008</title>
      <link>http://www.advogato.org/person/redi/diary.html?start=144</link>
      <guid>http://www.advogato.org/person/redi/diary.html?start=144</guid>
      <description>&lt;a href="" 'http://www.advogato.org/person/movement/diary/186.html'&gt;movement&lt;/a&gt;,&#xD;
brilliant!  Humm, Pastor Roger Byrd ... "Roger" is so&#xD;
close to "Roget" I think he may be a thesaurus and therefore&#xD;
doesn't recognise &lt;a href="" 'http://thesaurus.reference.com/browse/god'&gt;god&lt;/a&gt;.&#xD;
&#xD;
&lt;p&gt; &lt;a href="" 'http://www.advogato.org/person/ncm/diary/256.html'&gt;ncm&lt;/a&gt;,&#xD;
thanks for sharing that. As an ex-physicist who is very&#xD;
skeptical of the entire astronomy/cosmology field I think&#xD;
the poster's explanation for the behaviour makes a lot of&#xD;
sense. </description>
    </item>
    <item>
      <pubDate>Thu, 17 Apr 2008 12:05:27 GMT</pubDate>
      <title>17 Apr 2008</title>
      <link>http://www.advogato.org/person/redi/diary.html?start=143</link>
      <guid>http://www.advogato.org/person/redi/diary.html?start=143</guid>
      <description>&lt;strong&gt;First there is a mountain, then there is no mountain,&#xD;
then there is a mountain.&lt;/strong&gt;&#xD;
&#xD;
&lt;p&gt; &lt;a href="" 'http://blog.gardeviance.org/2008/04/three-stages-of-expertise.html'&gt;&#xD;
The three stages of expertise&lt;/a&gt;&#xD;
&#xD;
&lt;p&gt; &lt;strong&gt;Ruby is a cult.&lt;/strong&gt;&#xD;
&#xD;
&lt;p&gt; You can ignore one or two fanboys who want to teach you why&#xD;
they're right and you're wrong, but after the hundredth&#xD;
one raving about Ruby's &lt;a href="" 'http://www.rubytips.org/2008/04/07/10-unique-ruby-language-features/'&gt;unique&#xD;
features&lt;/a&gt; it just gets laughable.&#xD;
&#xD;
&lt;p&gt; Hint: Smalltalk. C'mon, kids, try to explain&#xD;
why Ruby is good without the rhetoric,&#xD;
you're just exposing your ignorance.</description>
    </item>
    <item>
      <pubDate>Tue, 1 Apr 2008 17:55:11 GMT</pubDate>
      <title>1 Apr 2008</title>
      <link>http://www.advogato.org/person/redi/diary.html?start=142</link>
      <guid>http://www.advogato.org/person/redi/diary.html?start=142</guid>
      <description>I'm off to the &lt;a href="" 'http://accu.org/index.php/conferences/accu_conference_2008'&gt;ACCU&#xD;
conference&lt;/a&gt; tomorrow and have just bought an Asus Eee on&#xD;
which I plan to install &lt;a href="" 'http://haskell.org/ghc/'&gt;GHC&lt;/a&gt; in time for Simon&#xD;
Peyton-Jones' talk.  I'm pretty impressed with it so far -&#xD;
it meets all my criteria for a convenient way to ssh to my&#xD;
home PC (cheap, lightweight, wireless, *nix, proper&#xD;
keyboard, fits in my larger pockets.)&#xD;
&#xD;
&lt;p&gt; Over the past week I've been porting &lt;a href="" 'http://stlsoft.org'&gt;STLsoft&lt;/a&gt; to Sun's compilers and&#xD;
Solaris.  &lt;a href="" 'http://pantheios.sourceforge.net/'&gt;Pantheios&lt;/a&gt; now&#xD;
works with Sun compilers on Linux or Solaris. Once I submit&#xD;
those patches my next step is&#xD;
to get it working with GCC on Solaris.  I must say, Solaris&#xD;
system headers are a lot nicer to read than GNU ones. &#xD;
Solving a &lt;a href="" 'http://bugzilla.redhat.com/show_bug.cgi?id=439693'&gt;glibc&#xD;
include-order bug&lt;/a&gt; happened in spite of having access to the&#xD;
full source code, not because of it!</description>
    </item>
    <item>
      <pubDate>Wed, 19 Mar 2008 17:34:26 GMT</pubDate>
      <title>19 Mar 2008</title>
      <link>http://www.advogato.org/person/redi/diary.html?start=141</link>
      <guid>http://www.advogato.org/person/redi/diary.html?start=141</guid>
      <description>Hank Paulson, who I had assumed to be a fairly well-educated&#xD;
man, said yesterday the US economy is in a "downcline".  This is&#xD;
rather conturbing information, and a matter of real discern.&#xD;
We must keep our crongers fissed that it does not become a&#xD;
more serious deturn, I suppose.&#xD;
&#xD;
&lt;p&gt; Thinking about that stupid word make me regret recently&#xD;
coining the term "deducerator" for C++ functions such as&#xD;
&lt;tt&gt;std::back_inserter&lt;/tt&gt; and &lt;tt&gt;std::make_pair&lt;/tt&gt;. &#xD;
Although it was suggested as a joke, I do think it's more&#xD;
memorable than &lt;a href="" 'http://www.boost.org/more/generic_programming.html#object_generator'&gt;Object&#xD;
Generator&lt;/a&gt;, or the less specific "creator function" used by&#xD;
Matthew Wilson in his books.  I think functional languages&#xD;
call them constructors, but that would obviously be&#xD;
confusing in C++.&#xD;
&#xD;
&lt;p&gt; &lt;a href="http://www.advogato.org/person/jtauber/" &gt;jtauber&lt;/a&gt;, &lt;a href="" '/person/jtauber/diary/119.html'&gt;that&lt;/a&gt;'s due to&#xD;
&lt;a href="http://www.advogato.org/proj/GNU%20bash/" &gt;GNU bash&lt;/a&gt;.&#xD;
Bash remembers that you changed dir via the symlink, and&#xD;
preserves that information in your pwd, which is why bash's&#xD;
&lt;tt&gt;pwd&lt;/tt&gt; command has a &lt;tt&gt;-P&lt;/tt&gt; option to see the&#xD;
physical pwd, not symbolic one.</description>
    </item>
    <item>
      <pubDate>Wed, 20 Feb 2008 15:26:50 GMT</pubDate>
      <title>20 Feb 2008</title>
      <link>http://www.advogato.org/person/redi/diary.html?start=140</link>
      <guid>http://www.advogato.org/person/redi/diary.html?start=140</guid>
      <description>&lt;a href="http://www.advogato.org/person/cannam/" &gt;cannam&lt;/a&gt;, to uncertify someone just certify them as&#xD;
Observer.  You make a very good point otherwise, making it&#xD;
optional would be an improvement.</description>
    </item>
    <item>
      <pubDate>Sat, 9 Feb 2008 17:56:23 GMT</pubDate>
      <title>9 Feb 2008</title>
      <link>http://www.advogato.org/person/redi/diary.html?start=139</link>
      <guid>http://www.advogato.org/person/redi/diary.html?start=139</guid>
      <description>&lt;strong&gt;f*** logging: a dead horse&lt;/strong&gt;&#xD;
&#xD;
&lt;p&gt; (disclaimer: I'm suffering from a chronic&#xD;
case of&#xD;
man flu&#xD;
and have been cooped up indoors for 48&#xD;
hours, this is a rant.)&#xD;
&#xD;
&lt;p&gt; I find the subject of logging as dull as&#xD;
ditchwater,&#xD;
so I&#xD;
don't want to do it myself, but I wish someone would write a&#xD;
decent, free logging framework for C++.&#xD;
&#xD;
&lt;p&gt; Please don't tell me about the "Boost" &lt;a href="" 'http://torjo.com/log2'&gt;logging lib&lt;/a&gt; - it's been&#xD;
rejected from Boost at least once (twice I think.) &#xD;
You'd be forgiven for thinking it was part of Boost from the&#xD;
documentation or the author's cringe-worthy self-promotional&#xD;
&lt;a href="" ''http://torjo.com'&gt;website&lt;/a&gt; ('hey, doc, is there&#xD;
a cure for me?' no, you'll probably always be like that.)  &#xD;
&#xD;
&lt;p&gt; The good thing about the non-boost lib is it&#xD;
tries&#xD;
to be a&#xD;
natural fit for C++, whereas the popular C++ logging&#xD;
libs are ports of log4j. And I guess being written by a&#xD;
raving egomaniac works well for some software projects! &#xD;
Let's see how its current boost review goes.&#xD;
&#xD;
&lt;p&gt; &lt;a href="" 'http://log4cpp.sourceforge.net/'&gt;log4cpp&lt;/a&gt;&#xD;
&amp;amp; &lt;a href="" 'http://log4cplus.sourceforge.net/'&gt;log4cplus&lt;/a&gt; are&#xD;
OK, as&#xD;
ports of log4j they have pretty stable and mature APIs, but both&#xD;
have some pretty hairy (and inefficient) aspects of their&#xD;
implementation.  I checked &lt;a href="http://www.advogato.org/proj/Log4cxx/" &gt;Log4cxx&lt;/a&gt; out from&#xD;
subversion to have a look at that one.  The INSTALL file&#xD;
says "Apache&#xD;
log4cxx is a C++ transliteration of Apache log4j" which is a&#xD;
bad start - C++ and Java have enough differences that&#xD;
porting from Java to C++ is not as simple as replacing&#xD;
&lt;tt&gt;Integer&lt;/tt&gt; with &lt;tt&gt;int&lt;/tt&gt;, the whole design should be&#xD;
evaluated and idioms native to the target language should be&#xD;
used.  (Xerces/C is another project from Apache that&#xD;
makes the same mistake, as &lt;a href="http://www.advogato.org/person/ncm/" &gt;ncm&lt;/a&gt;&#xD;
has mentioned once&#xD;
or twice here.)  The&#xD;
transliteration shows itself immediately in terms of broken&#xD;
const-correctness, which is easily explained when you see:&#xD;
&lt;pre&gt;&#xD;
template&amp;lt;typename T&amp;gt;&#xD;
class ObjectPtrT {&#xD;
public:&#xD;
    // ...&#xD;
    T* operator-&amp;gt;() const {return &lt;em&gt;(T*)&lt;/em&gt; p; }&#xD;
    T&amp;amp; operator*() const {return &lt;em&gt;(T&amp;amp;)&lt;/em&gt; *p; }&#xD;
    operator T*() const {return &lt;em&gt;(T*)&lt;/em&gt; p; }&#xD;
private:&#xD;
    T* p;&#xD;
};&#xD;
&lt;/pre&gt;&#xD;
I'll hazard a guess and say those casts were put there by&#xD;
someone who simply doesn't understand &lt;tt&gt;const&lt;/tt&gt; in C++:&#xD;
&lt;tt&gt;p&lt;/tt&gt; isn't being modified, so there's no need to cast&#xD;
away the &lt;tt&gt;const&lt;/tt&gt; (in the context of those member&#xD;
functions,&#xD;
&lt;tt&gt;p&lt;/tt&gt; has type &lt;tt&gt;T * const&lt;/tt&gt; i.e. &lt;i&gt;const pointer&#xD;
to non-const T&lt;/i&gt;)&#xD;
&#xD;
&lt;p&gt; &lt;p&gt; &lt;p&gt; &lt;p&gt; &lt;p&gt; &lt;p&gt; Well, I thought, this is open-source&#xD;
software&#xD;
and I'm no&#xD;
stranger to writing&#xD;
reference-counted smart pointers in C++. It won't take me&#xD;
long to knock that smart pointer into shape, then I can&#xD;
continue evaluating the rest of the library. Even if I&#xD;
decide not to use it, the project will benefit from a better&#xD;
smart pointer.  So I tried to build it. The project offers a&#xD;
GNU autotools build&#xD;
system which fails due to missing files in the svn repo,&#xD;
and an ant-based build system which requires a jar from &lt;a href="" 'http://ant-contrib.sourceforge.net'&gt;ant-contrib&lt;/a&gt; &#xD;
which isn't included in the Fedora package, or the latest&#xD;
download on sourceforge.  Harrumph.  I've&#xD;
subscribed to the log4cxx mailing list to ask if I'm being&#xD;
dumb and&#xD;
am proceeding by compiling the code in my head (the&#xD;
project page says it's been tested with GCC 3.3, which&#xD;
handled templates in a &#xD;
non-standard way - the process of adding&#xD;
missing &lt;tt&gt;typename&lt;/tt&gt; keywords and re-compiling is much&#xD;
quicker using a virtual compiler in my head! ;-)&#xD;
&#xD;
&lt;p&gt; &lt;p&gt; &lt;p&gt; &lt;p&gt; &lt;p&gt; &lt;p&gt; There are various other things that would&#xD;
prevent me&#xD;
from&#xD;
using it for the moment, such as the function for atomic&#xD;
exchange&#xD;
of a pointer value being non-atomic on 64-bit systems (but&#xD;
hey, who uses them? oh, hang on, I do.)&#xD;
&#xD;
&lt;p&gt; &lt;p&gt; &lt;p&gt; &lt;p&gt; &lt;p&gt; &lt;p&gt; Although I haven't given up on fixing&#xD;
log4cxx, it&#xD;
might be a&#xD;
slow process, and it's not an itch I &lt;i&gt;want&lt;/i&gt; to scratch.&#xD;
Someone, please write a logging framework that doesn't&#xD;
suck.  Or if you've done it already, publicise it better!&#xD;
&#xD;
&lt;p&gt; &lt;strong&gt;Update:&lt;/strong&gt; following my email to the list the build&#xD;
system has been fixed within hours - that's a good sign! I'm&#xD;
continuing to review it, reassured it's an active and&#xD;
responsive project.</description>
    </item>
  </channel>
</rss>
