<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>Advogato blog for emk</title>
    <link>http://www.advogato.org/person/emk/</link>
    <description>Advogato blog for emk</description>
    <language>en-us</language>
    <generator>mod_virgule</generator>
    <pubDate>Fri, 24 May 2013 22:43:08 GMT</pubDate>
    <item>
      <pubDate>Tue, 27 Apr 2004 03:20:27 GMT</pubDate>
      <title>27 Apr 2004</title>
      <link>http://www.advogato.org/person/emk/diary.html?start=25</link>
      <guid>http://www.advogato.org/person/emk/diary.html?start=25</guid>
      <description>&lt;p&gt;&lt;strong&gt;Finally, a working GDB.&lt;/strong&gt;  After much pain and suffering, I've upgraded to GDB 6.1, which appears to be reasonably compatible with gcc 3.4.  No more bizarre RTTI errors, and symbol lookup is now blazingly fast.  Cool.&lt;p&gt;
&lt;strong&gt;Precompiled headers with GCC 3.4.&lt;/strong&gt;  Microsoft is still ahead here, I think--even with precompiled headers and a well-designed header layout, GCC 3.4 build times are painfully slow compared to MSVC 6.  (I'll know about MSVC.NET when port this new code over.)&lt;p&gt;
It seems that GCC does a lot of work at template instantiation time, which means that every std::map&amp;lt;T&amp;gt; in your non-precompiled headers hits you where it hurts.&lt;p&gt;
&lt;strong&gt;C++ feelings.&lt;/strong&gt;  My love-hate relationship with C++ has been leaning towards "hate" recently, as I've been doing lots of complicated data structures and learning where shared_ptr just doesn't cut it.  But I've laid the groundwork for a simple garbage collector (which I needed to write anyway, for use with the code I'm generating), and I feel about 500% better about my code base.</description>
    </item>
    <item>
      <pubDate>Mon, 19 Apr 2004 01:22:05 GMT</pubDate>
      <title>19 Apr 2004</title>
      <link>http://www.advogato.org/person/emk/diary.html?start=24</link>
      <guid>http://www.advogato.org/person/emk/diary.html?start=24</guid>
      <description>&lt;p&gt;&lt;strong&gt;Kernel 2.6 impressions.&lt;/strong&gt;  I've just upgraded my laptop from kernel 2.4 to 2.6, and finished screwing around with various configuration files.  So far, everything seems to work very nicely, including features which were hopelessly broken in 2.4.  Combined with a good hardware autoprober, this could be a pretty user-friendly kernel.&lt;p&gt;
The new scheduler has improved interactive responsiveness tremendously, too.  I can actually use my computer while exim delivers a large mail queue through expensive procmail filters.&lt;p&gt;
So far, it's a winner.  Does anybody know of a decent hardware autoprober for Debian?</description>
    </item>
    <item>
      <pubDate>Sat, 17 Apr 2004 15:36:41 GMT</pubDate>
      <title>17 Apr 2004</title>
      <link>http://www.advogato.org/person/emk/diary.html?start=23</link>
      <guid>http://www.advogato.org/person/emk/diary.html?start=23</guid>
      <description>&lt;p&gt;&lt;strong&gt;C++ Frustrations.&lt;/strong&gt; Normally, I can get some enjoyment out of programming in C++ (especially with a working STL and the &lt;a href="http://www.boost.org/" &gt;boost&lt;/a&gt; libraries), but I've been suffering a fair bit of frustration lately.&lt;p&gt;
Smart pointers are &lt;em&gt;almost&lt;/em&gt; good enough, but fail in interesting little ways just when you need them the most.  In my Type::GetResultType function, for example, I need to return &lt;em&gt;this&lt;/em&gt; for all types except function types, and there's no way to get a shared pointer to &lt;em&gt;this&lt;/em&gt;.  So I need to hack around this somehow.&lt;p&gt;
I miss &lt;a href="http://www.gwydiondylan.org/" &gt;Dylan&lt;/a&gt;.</description>
    </item>
    <item>
      <pubDate>Fri, 16 Apr 2004 21:46:33 GMT</pubDate>
      <title>16 Apr 2004</title>
      <link>http://www.advogato.org/person/emk/diary.html?start=22</link>
      <guid>http://www.advogato.org/person/emk/diary.html?start=22</guid>
      <description>&lt;p&gt;I just installed Gnome 2.6 out of Debian experimental, and I'm pleased by several things.&lt;p&gt;
&lt;strong&gt;It's faster.&lt;/strong&gt; GTK seems to be faster--menu redraws are quick, and the whole interface feels pretty good.  Most impressive, though, is Nautilus, which has gone from dog slow to downright snappy.&lt;p&gt;
&lt;strong&gt;It reminds me of the Mac.&lt;/strong&gt;  I'm an old Mac user, so I'm delighted by the "&lt;a href="http://mail.gnome.org/archives/desktop-devel-list/2003-September/msg00446.html" &gt;spatial&lt;/a&gt;" version of Nautilus.  Essentially, there's a one-to-one mapping between directories and folder windows, and folder windows have persistent properties, including location.  This was a really robust UI design, and I'm glad to see Nautilus borrowing it.  I just wish they'd simplify the screen even further, and add support for those nice Finder triangles.&lt;p&gt;
&lt;strong&gt;It has good blogging tools.&lt;/strong&gt; I'm writing this post using a &lt;a href="http://www.gnome.org/~seth/gnome-blog/" &gt;panel applet&lt;/a&gt;.  It only takes me two clicks to post to Advogato.  I've also set up the &lt;a href="http://www.nongnu.org/straw/" &gt;Straw news aggregator&lt;/a&gt;, which is thoroughly reasonable.&lt;p&gt;
All in all, the UI situation is very good in Gnome 2.6.  I'm impressed at how quickly the Linux desktop is becoming truly usable.&lt;p&gt;
(On an unrelated note, &lt;a href="http://www.blender.org/" &gt;Blender&lt;/a&gt;, &lt;a href="http://www.dedalo-3d.com/makehuman.html" &gt;MakeHuman&lt;/a&gt;, and &lt;a href="http://www.wings3d.com/" &gt;Wings3D&lt;/a&gt; make a darn sweet 3D modelling setup.  You can get better, but not without getting well into the 4-figure range.)</description>
    </item>
    <item>
      <pubDate>Fri, 16 Apr 2004 19:20:54 GMT</pubDate>
      <title>16 Apr 2004</title>
      <link>http://www.advogato.org/person/emk/diary.html?start=21</link>
      <guid>http://www.advogato.org/person/emk/diary.html?start=21</guid>
      <description>&lt;p&gt;I'm banging away on a native code generator.  Basically, we needed a bytecode interpreter, and I had written one too many bytecode VMs.  Remembering a comment by &lt;a href="http://www.google.com/url?sa=U&amp;start=1&amp;q=http://www.smallscript.org/&amp;e=7370" &gt;David Simmons&lt;/a&gt; on his SmallScript work--he argued that JITs perform 10 times better than VMs for about the same amount of work--I decided to hack up a native code generator instead.&lt;p&gt;
Sure enough, it's easy, at least once you figure out the platform's calling conventions and what a ModR/M byte actually is.&lt;p&gt;
Now, generating &lt;em&gt;good&lt;/em&gt; code is an entirely different matter.  But I'm not trying to do that. :-)</description>
    </item>
    <item>
      <pubDate>Mon, 27 Aug 2001 14:45:05 GMT</pubDate>
      <title>27 Aug 2001</title>
      <link>http://www.advogato.org/person/emk/diary.html?start=20</link>
      <guid>http://www.advogato.org/person/emk/diary.html?start=20</guid>
      <description>&lt;b&gt;Python Iterator Bug.&lt;/b&gt; Python 2.2 supports CLU-style
iterators (they call them &lt;a
href="http://www.amk.ca/python/2.2/index.html#SECTION000400000000000000000"&gt;generators&lt;/a&gt;).
They're essentially a kind of co-routine.

&lt;p&gt; But there's a subtle bug in the Python design.  Consider
tree traversal:
&lt;pre&gt;
def inorder(t):
    if (t.left != None):
        for (node in inorder(t.left)):
            yield node
    yield t
    if (t.right != None):
        for (node in inorder(t.right)):
            yield node&lt;/pre&gt;
If you study this carefully, you'll see that (unless the
optimizer intervenes), Python has turned a perfectly good
O(N) tree traversal into an O(N log N) traversal.

&lt;p&gt; &lt;b&gt;How to Fix It.&lt;/b&gt; I'm probably going to write a paper
with the details, and try to get it published, but here's
the crux of the matter.

&lt;p&gt; Python insists on performing the two subiterations manually,
and on returning their output unchanged.  But if you stack
enough of these iterations on top of each other, you can
kiss your performance goodbye (both asymptotically and
cycle-wise).

&lt;p&gt; Instead, you need to &lt;i&gt;transfer control&lt;/i&gt; to your
subiterations:
&lt;pre&gt;
def inorder(t):
    if (t.left != None):
        yield_all inorder(t.left)
    yield t
    if (t.right != None):
        yield_all inorder(t.right):
&lt;/pre&gt;
Now the compiler has a fighting change to optimize a deep
stack of iterators into reasonable code.

&lt;p&gt; It turns out that you can formulate such concepts as
self-recursive iterators, tail-called iterators, etc., and
apply optimization techniques analogous to those used by
LISP compilers to optimize function calls. What's worse, you
can actually implement all of this using a
portable C back-end to your compiler. :-)</description>
    </item>
    <item>
      <pubDate>Sun, 26 Aug 2001 19:01:54 GMT</pubDate>
      <title>26 Aug 2001</title>
      <link>http://www.advogato.org/person/emk/diary.html?start=19</link>
      <guid>http://www.advogato.org/person/emk/diary.html?start=19</guid>
      <description>&lt;b&gt;My Favorite Toy Language.&lt;/b&gt; Oh, dear.  My design
efforts have gotten too far ahead of my coding efforts,
opening me to charges of bogosity. :-/ An overview of what
I'm up to...

&lt;p&gt; &lt;p&gt; &lt;b&gt;Soft Typing.&lt;/b&gt; MFTL is &lt;a
href="http://citeseer.nj.nec.com/cartwright91soft.html"&gt;softly
typed&lt;/a&gt;.  This means that (1) everything, including
primitive types, is a subclass of Object, (2) type
declarations all default to Object and (3) downcasting is
automatic.  For example, the following program is legal:
&lt;pre&gt;
def fact_untyped (i)
  if (i &amp;lt;= 1)
    1
  else
    i * fact_untyped(i-1)
  end
end
&lt;/pre&gt;
&lt;p&gt; But if the programmer types the following, they get much
better performance and compile-time warnings about type
violations:
&lt;pre&gt;
def fact_untyped (i: int): int
  if (i &amp;lt;= 1)
    1
  else
    i * fact_untyped(i-1)
  end
end
&lt;/pre&gt;
&lt;b&gt;Everything's An Expression.&lt;/b&gt;  In the above example,
'if' is an expression, like the ternary operator in C. So
you could write:
&lt;pre&gt;
var x = if (y) 1 else 2 end
&lt;/pre&gt;
&lt;p&gt; &lt;b&gt;Newlines End Statements.&lt;/b&gt; Just like in sh, bash,
JavaScript, and Ruby, newlines in MFTL are statement
terminators.  (This is slightly funky, but it allows 'if' to
be an expression without massively cruftifying the
semicolon-placement rules.)

&lt;p&gt; &lt;p&gt; &lt;b&gt;Keyword-Based Initialization.&lt;/b&gt; Classes generally don't
need constructors:

&lt;p&gt; &lt;pre&gt;
class Sample ()
  var x, key: x
  var y = 10
end
&lt;/pre&gt;
&lt;pre&gt;
s = new(Sample, x: 5)
&lt;/pre&gt;

&lt;p&gt; &lt;p&gt; &lt;b&gt;Generic Functions.&lt;/b&gt;  You can do the equivalent of
operator-overloading at run time, not just compile time.
&lt;pre&gt;
abstract class Thing () end
class Rock (Thing) end
class Paper (Thing) end
class Scissors (Thing) end
&lt;/pre&gt;
&lt;pre&gt;
def defeats? (a: Thing, b: Thing) false end
def defeats? (a: Paper, b: Rock) true end
def defeats? (a: Rock, b: Scissors) true end
def defeats? (a: Scissors, b: Paper) true end
&lt;/pre&gt;
&lt;pre&gt;
defeats?(new(Paper), new(Scissors)) // false
defeats?(new(Rock), new(Scissors))  // true
&lt;/pre&gt;
&lt;p&gt;Yes, we know &lt;a
href="http://www.ai.mit.edu/~emk/gf-talk/"&gt;how to make this
go fast&lt;/a&gt;.

&lt;p&gt; &lt;p&gt; &lt;b&gt;Getters and Setters.&lt;/b&gt; No more endless 'getFoo' and
'setFoo' functions!  Just write:
&lt;pre&gt;
public class Example ()
  public var foo, key: foo
end
&lt;/pre&gt;
&lt;p&gt; If you later decide that you need a getter and setter
function, just write:
&lt;pre&gt;
public class Example ()
  var real_foo, key: foo
  public def get foo ()
    real_foo
  end
  public def set foo (value)
    real_foo = value
  end
end
&lt;/pre&gt;
The users of the class will never know the difference.

&lt;p&gt; &lt;p&gt; &lt;b&gt;Other Stuff.&lt;/b&gt; Things I want, but which I know will
require extra work to do right: inlineable iterators, &lt;a
href="http://www.eiffel.com/doc/manuals/technology/contract/"&gt;design
by contract&lt;/a&gt;, integrated unit tests, simple templates.

&lt;p&gt; &lt;p&gt; &lt;b&gt;Performance.&lt;/b&gt; With full type declarations, it should
be possile to compile MFTL to run at speeds approaching that
of C. Softly-typed languages are a solved problem.

&lt;p&gt; &lt;p&gt; &lt;b&gt;Implementation Status.&lt;/b&gt; The parser and the VM are
about 50% complete.  The compiler was about 2% complete
before I threw it out and started over. :-( If I had the
luxury of working on this project full-time, I could ship a
demo interpreter in about three months, and an MFTL-to-C
compiler not long after.

&lt;p&gt; &lt;p&gt; &lt;b&gt;Feedback.&lt;/b&gt; Comments, suggestions to &lt;a
href="mailto:eric.kidd@pobox.com"&gt;eric.kidd@pobox.com&lt;/a&gt;.</description>
    </item>
    <item>
      <pubDate>Tue, 3 Jul 2001 22:15:32 GMT</pubDate>
      <title>3 Jul 2001</title>
      <link>http://www.advogato.org/person/emk/diary.html?start=18</link>
      <guid>http://www.advogato.org/person/emk/diary.html?start=18</guid>
      <description>&lt;b&gt;Certification.&lt;/b&gt; I'm curious about the ongoing saga
with &lt;a href="http://www.advogato.org/person/aaronsw/" &gt;aaronsw&lt;/a&gt;'s certification.  He's proving
suprisingly hard to suck into the local web of trust.

&lt;p&gt; So... I read up on his projects, looked as his work,
reviewed the certification guidelines, and tried to give him
an appropriate certification (based on what I could quickly
learn).

&lt;p&gt; Still no change.  Very weird.

&lt;p&gt; I'm quite bewildered by this trust metric.  One very
generous (but, IMHO, undeserved) master-level certification
was enough to drag me up from observer to master.  But the
combined efforts of quite a few people aren't helping aaron
at all.

&lt;p&gt; &lt;b&gt;MFTL.&lt;/b&gt; Wow!  Between my short-term job at MIT (helping
implement a funcional programming language) and my hobby
(designing a functional/imperative/OO language), I'm
beginning to find a whole bunch of good answers to design
questions.  It's nice to work with people who are much
smarter than you are. ;-)

&lt;p&gt; Poll: Do I dare to open up port 80 on my cable-modem system,
and let people access my language design Zwiki?  Or is that
just begging for script kiddies to open fire at Zope and
various Apache modules?</description>
    </item>
    <item>
      <pubDate>Sun, 4 Feb 2001 21:10:04 GMT</pubDate>
      <title>4 Feb 2001</title>
      <link>http://www.advogato.org/person/emk/diary.html?start=17</link>
      <guid>http://www.advogato.org/person/emk/diary.html?start=17</guid>
      <description>&lt;b&gt;&lt;a
href="http://xmlrpc-c.sourceforge.net/"&gt;XML-RPC&lt;/a&gt;:&lt;/b&gt; I
finished merging the Windows patches from several
contributors; these will all go out in the next release.

&lt;p&gt; I've also started work on xml-rpc-api2cpp, which is
essentially an IDL compiler for XML-RPC. Instead of using
IDL files, however, it directly queries the remote server
for API information.

&lt;p&gt; My XML-RPC hacking time is down to a few hours here and
there. This will change in six or seven weeks. Yay!</description>
    </item>
    <item>
      <pubDate>Sat, 27 Jan 2001 05:23:46 GMT</pubDate>
      <title>27 Jan 2001</title>
      <link>http://www.advogato.org/person/emk/diary.html?start=16</link>
      <guid>http://www.advogato.org/person/emk/diary.html?start=16</guid>
      <description>&lt;b&gt;&lt;a
href="http://xmlrpc-c.sourceforge.net/"&gt;XML-RPC&lt;/a&gt;
Acceleration:&lt;/b&gt; Spent this morning hacking mod_gzip to to
understand "deflate" compression. If you drop this hack into
your webserver (and use a smart XML-RPC client), you'll
probably cut your outbound XML-RPC network traffic by a
factor of 10.

&lt;p&gt; It's very experimental--I can make it dump core--but it's
the start of something moderately nifty. Combine this with
&lt;a
href="http://www.advogato.org/person/emk/diary.html?start=15"&gt;boxcarring&lt;/a&gt;,
and you're beginning to get some decent scalabity and
throughput.

&lt;p&gt; &lt;b&gt;Binary Data:&lt;/b&gt; I also spoke with several of Flight Gear
developers (all very cool folks), and discussed the
possibility of XML-RPC without any XML. Basically, a client
and server could negotiate away the XML layer, and transmit
raw binary data structures to each other. You'd keep all the
fun features of XML-RPC (the introspection, the dynamic
data, the 750-line clients), but get enterprise-grade RPC
when you really needed it.

&lt;p&gt; The hard part of this would be the design, not the
implementation. How do you hide the funky new features from
the less-advanced clients, and how do you activate the new
protocol?

&lt;p&gt; &lt;b&gt;Introspection:&lt;/b&gt; I wrote a script called
&lt;i&gt;xml-rpc-api2txt&lt;/i&gt;. Give it the URL of a server, and it
will print out a nicely-formatted interface specification,
complete with documentation. I fixed it to play nicely with
Meerkat, too--O'Reilly was preformatting some of their
documentation strings, which was messing up Perl's
formatting commands.

&lt;p&gt; Now, who wants to hack this script to automatically generate
C++ and Java classes for a given server? :-)

&lt;p&gt; &lt;b&gt;Community:&lt;/b&gt; Yikes! Things are really starting
to move. I got piles of e-mail today, half of which
contained patches and the other half of which contained
great ideas.

&lt;p&gt; &lt;b&gt;SourceForge:&lt;/b&gt; Is full of bugs.
</description>
    </item>
  </channel>
</rss>
