<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
<head>
  <title>the all-thing</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <link rel="stylesheet" href="/static/style.css" type="text/css" />
  <link rel="alternate" type="application/rss+xml" title="the all-thing RSS feed" href="/index.rss" />
  <link rel="alternate" type="text/plain" title="the all-thing in plain text" href="/index.txt" />
  <script type="text/javascript" src="/static/mootools.js"></script>
  <script type="text/javascript" src="http://music.masanjin.net:9292/waxiest.js"></script>
</head>
<body>

<div id="main">
  <div id="header">
    <h1><a  href="/">the all-thing</a></h1>
    
  </div>
  <div id="sidebar">
    <h3>Recent comments</h3>

    <ul class="sidebar-list">
    
    <li><b><a  href="/whisper-0.5#58174069c046a78e55f02ef81da81e74">Dominique Julia</a></b>
        <i><a  href="/whisper-0.5">Whisper 0.5 released</a></i>
           one week ago
    </li>
    
    <li><b><a  href="/ruby-ncurses-and-thread-blocking#8fa2a0f392d7c0562d630e4936407c11">William Morgan</a></b>
        <i><a  href="/ruby-ncurses-and-thread-blocking">Ruby, Ncurses and blocked threads</a></i>
           three months ago
    </li>
    
    <li><b><a  href="/git-wtf-bf06ab7-released#533654a7a229569e27a6d0afd716c444">William Morgan</a></b>
        <i><a  href="/git-wtf-bf06ab7-released">git wtf bf06ab7 released</a></i>
           three months ago
    </li>
    
    <li><b><a  href="/git-wtf-bf06ab7-released#b7b7a905477674eb6985b34a964a0dca">Joao Nelas</a></b>
        <i><a  href="/git-wtf-bf06ab7-released">git wtf bf06ab7 released</a></i>
           three months ago
    </li>
    
    <li><b><a  href="/ruby-ncurses-and-thread-blocking#b00001114360ac152f87d4ac2a6e0c5b">Ollivier Robert</a></b>
        <i><a  href="/ruby-ncurses-and-thread-blocking">Ruby, Ncurses and blocked threads</a></i>
           three months ago
    </li>
    
    </ul>

    <h3>Authors</h3>
    <ul class="sidebar-list">
    
      <li><a class="author" href="/by/William+Morgan/">William&nbsp;Morgan</a>&nbsp;(65) </li>
    
    </ul>

    <h3>Tags</h3>
    <ul class="sidebar-list">
    
      <li><a class="label" href="/label/releases/">releases</a>&nbsp;(15) </li>
    
      <li><a class="label" href="/label/whisper/">whisper</a>&nbsp;(13) </li>
    
      <li><a class="label" href="/label/git/">git</a>&nbsp;(9) </li>
    
      <li><a class="label" href="/label/stats/">stats</a>&nbsp;(8) </li>
    
      <li><a class="label" href="/label/trollop/">trollop</a>&nbsp;(6) </li>
    
      <li><a class="label" href="/label/ruby/">ruby</a>&nbsp;(6) </li>
    
      <li><a class="label" href="/label/sup/">sup</a>&nbsp;(6) </li>
    
      <li><a class="label" href="/label/git-wtf/">git-wtf</a>&nbsp;(4) </li>
    
      <li><a class="label" href="/label/vm/">vm</a>&nbsp;(4) </li>
    
      <li><a class="label" href="/label/mathml/">mathml</a>&nbsp;(3) </li>
    
      <li><a class="label" href="/label/continuations/">continuations</a>&nbsp;(3) </li>
    
      <li><a class="label" href="/label/ditz/">ditz</a>&nbsp;(3) </li>
    
      <li><a class="label" href="/label/proglang/">proglang</a>&nbsp;(2) </li>
    
      <li><a class="label" href="/label/optimization/">optimization</a>&nbsp;(2) </li>
    
      <li><a class="label" href="/label/benchmarks/">benchmarks</a>&nbsp;(2) </li>
    
      <li><a class="label" href="/label/rubinius/">rubinius</a>&nbsp;(2) </li>
    
      <li><a class="label" href="/label/inlining/">inlining</a>&nbsp;(2) </li>
    
      <li><a class="label" href="/label/ubuntu/">ubuntu</a>&nbsp;(2) </li>
    
      <li><a class="label" href="/label/fibers/">fibers</a>&nbsp;(2) </li>
    
      <li><a class="label" href="/label/ritex/">ritex</a>&nbsp;(2) </li>
    
      <li><a class="label" href="/label/ruby1.9/">ruby1.9</a>&nbsp;(2) </li>
    
      <li><a class="label" href="/label/ncurses/">ncurses</a>&nbsp;(1) </li>
    
      <li><a class="label" href="/label/javascript/">javascript</a>&nbsp;(1) </li>
    
      <li><a class="label" href="/label/media/">media</a>&nbsp;(1) </li>
    
      <li><a class="label" href="/label/vim/">vim</a>&nbsp;(1) </li>
    
      <li><a class="label" href="/label/classification/">classification</a>&nbsp;(1) </li>
    
      <li><a class="label" href="/label/massachusetts/">massachusetts</a>&nbsp;(1) </li>
    
      <li><a class="label" href="/label/greasemonkey/">greasemonkey</a>&nbsp;(1) </li>
    
      <li><a class="label" href="/label/wine/">wine</a>&nbsp;(1) </li>
    
      <li><a class="label" href="/label/readme/">readme</a>&nbsp;(1) </li>
    
      <li><a class="label" href="/label/ancient-greek/">ancient-greek</a>&nbsp;(1) </li>
    
      <li><a class="label" href="/label/web/">web</a>&nbsp;(1) </li>
    
      <li><a class="label" href="/label/current+events/">current&nbsp;events</a>&nbsp;(1) </li>
    
    </ul>

    <h3>Other formats</h3>
    <ul class="sidebar-list">
    <li><a href="/index.rss"><img src="/static/rss-badge.png"/></a></li>
    <li><a href="/index.txt">plain text version</a></li>
    </ul>

    <h3 class="waxiest.author.original">Who is this man?</h3>
    <h3 class="waxiest.author.beautiful" style="display:none">I must find out more about this beautiful creature</h3>
    <h3 class="waxiest.author.beautifulbig" style="display:none">I MUST FIND OUT MORE ABOUT THIS BEAUTIFUL CREATURE</h3>
    <h3 class="waxiest.author.originalbig" style="display:none">WHO IS THIS MAN?</h3>

    <script type="text/javascript">
      var w = waxiest();
      w.optimizeHTMLSection("author", ["original", "beautiful", "beautifulbig", "originalbig"]);
    </script>

    <a href="http://masanjin.net" onClick="w.goalReached('greeting')">William Morgan</a>
  </div>
  <div id="content">
    <h2><a  href="/suck-eggs">Teaching your grandmother to suck eggs</a></h2>

<div class="byline">
  <a  href="/by/William+Morgan/">William Morgan</a>,
  <span title="10 months ago">May  6, 2009  1:31pm</span>
</div>

  <div class="labels"><span class='label'><a  href="/label/ancient-greek/">ancient-greek</a></span> <span class='label'><a  href="/label/whisper/">whisper</a></span> <span class='label'><a  href="/label/ubuntu/">ubuntu</a></span> </div>


<p class='first'>If you&#8217;re reading <a href="http://scienceblogs.com/goodmath/2006/11/the_c_is_efficient_language_fa.php">a random diatribe on whether C and C++ are good for
numerical
computing</a>
and happen to come across the curious expression &#8220;teaching your grandmother to
suck eggs&#8221;, and decide to learn more about it, you&#8217;ll quickly find references
to early usages in the 1749 Henry Fielding novel, <cite><a href="http://en.wikipedia.org/wiki/The_History_of_Tom_Jones,_a_Foundling">Tom
Jones</a></cite>, in
which the protagonist recounts:</p>
<blockquote>
<p>I remember my old schoolmaster, who was a prodigious great scholar, used
often to say, Polly matete cry town is my daskalon. The English of which, he
told us, was, That a child may sometimes teach his grandmother to suck eggs.</p>
</blockquote>
<p>And if you then think to yourself, what the heck is &#8220;Polly matete cry town is
my daskalon&#8221;? you need only grab your handy copy of William Shepard Walsh&#8217;s
1909 <a href="http://books.google.com/books?id=hrJkAAAAMAAJ">Handy-book of literary curiosities</a>, look up &#8220;Polly
matete&#8221; in the index, and find that it&#8217;s the transliteration (transphoneticization?) of:</p>
<blockquote>
<p>πολλοι μαθηται κρειττονες διδασκαλον</p>
</blockquote>
<p>which is the last line of a Greek epigram attributed &#8220;sometimes to Phillippus of Thessalonica, sometimes to Lucilius (both of whom lived in the early days of the Roman Empire)&#8221;, translated as:</p>
<p><div class='poem-title'>On a Stolen Statue of Mercury</div><pre class='poem'>Hermes, the volatile, Arcady's president,
  Lacquey of deities, robber of herds,
In this gymnasium constantly resident,
  Light-fingered Aulus bore off with these words:
Many a scholar, by travelling faster
On learning's high-road, runs away with his master.</pre></p>
<p>So there you go. And if you&#8217;re wondering what the original phrase means, Walsh
provides this helpful explanatory rhyme:</p>
<p><pre class='poem'>Teach not a parent's mother to extract
  The embryo juices of an egg by suction:
The good old lady can the feat enact
  Quite irrespective of your kind instruction.</pre></p>
<p>As a side note, <a href="http://masanjin.net/whisper/">Whisper</a> now supports
poems, and I just learned how to type Greek in Ubuntu.</p>

<h4>Discussion</h4>
<a name="comments"></a>

<ul class="comment-tree">

  <li>
  
  <a name="b1f25d1e3b59cddff03167afb2d2e1f5"></a>
  <div class="comment-body">
    <table class="comment-byline">
      <tr><td class="comment-author"><a href="http://www.club.cc.cmu.edu/~mds2">Mike Schuresko</a></td>
          <td class="comment-date" title="7 months ago"><a href="#b1f25d1e3b59cddff03167afb2d2e1f5">July 18, 2009  1:13am</a></td>
    </tr></table>
    <p>William Morgan wrote:</p><div class='comment-quote'>
<p class='first'>If you&#8217;re reading <a href="http://scienceblogs.com/goodmath/2006/11/the_c_is_efficient_language_fa.php">a random diatribe on whether C and C++ are good for
numerical
computing</a>
and happen to come across the curious expression &#8220;teaching your grandmother to
suck eggs&#8221;, and decide to learn more about it, you&#8217;ll quickly find references
to early usages in the 1749 Henry Fielding novel, <cite><a href="http://en.wikipedia.org/wiki/The_History_of_Tom_Jones,_a_Foundling">Tom
Jones</a></cite>, in
which the protagonist recounts:
bq. I remember my old schoolmaster, who was a prodigious great scholar, used
often to say, Polly matete cry town is my daskalon. The English of which, he
told us, was, That a child may sometimes teach his grandmother to suck eggs.
And if you then think to yourself, what the heck is &#8220;Polly matete cry town is
my daskalon&#8221;? you need only grab your handy copy of William Shepard Walsh&#8217;s
1909 <a href="http://books.google.com/books?id=hrJkAAAAMAAJ">Handy-book of literary curiosities</a>, look up &#8220;Polly
matete&#8221; in the index, and find that it&#8217;s the transliteration (transphoneticization?) of:
bq. <cite>?</cite><cite>?</cite>?? <cite>?</cite><cite>?</cite>?<cite>? ?</cite><cite>?</cite><cite>?</cite><cite>?</cite>?? <cite>?</cite><cite>?</cite><cite>?</cite><cite>?</cite>
which is the last line of a Greek epigram attributed &#8220;sometimes to Phillippus of Thessalonica, sometimes to Lucilius (both of whom lived in the early days of the Roman Empire)&#8221;, translated as:
<div class='poem-title'>On a Stolen Statue of Mercury</div><pre class='poem'>Hermes, the volatile, Arcady's president,
Lacquey of deities, robber of herds,
In this gymnasium constantly resident,
Light-fingered Aulus bore off with these words:
Many a scholar, by travelling faster
On learning's high-road, runs away with his master.</pre>
So there you go. And if you&#8217;re wondering what the original phrase means, Walsh
provides this helpful explanatory rhyme:
<pre class='poem'>Teach not a parent's mother to extract
The embryo juices of an egg by suction:
The good old lady can the feat enact
Quite irrespective of your kind instruction.</pre>
As a side note, <a href="http://masanjin.net/whisper/">Whisper</a> now supports
poems, and I just learned how to type Greek in Ubuntu.</p>
</div><p class='first'>I notice that the guy who wrote said random diatribe, despite quoting the
oft repeated sadistic about <span class="caps">FORTRAN</span> compiling to faster code than C, 
doesn&#8217;t actually include a <span class="caps">FORTRAN</span> timing result in his series of numbers.</p>
<p>I was under the impression that modern C++ compilers, proper use of
templates (and avoidance of overusage of C++&#8217;s inheritance based 
polymorphism) could create numerical code &#8220;on par with&#8221; <span class="caps">FORTRAN</span>.</p>
<p>For what its worth, comparing C/C++ to <span class="caps">FORTRAN</span> for numerical code (or 
&#8220;codes&#8221; if you are a Fortran programmer) is a subtle and tricky issue.
It is true that using most implementations of the <span class="caps">BLAS</span> library will beat
hand-coded matrix operations in C.  But <span class="caps">BLAS</span> isn&#8217;t written in <span class="caps">FORTRAN</span>.
Last I checked ,the best <span class="caps">BLAS</span> implementations were still hand-coded in 
assembler by some 
Japanese
guy with the ironic last name of &#8220;Goto&#8221;.
<span class="caps">BLAS</span> also has C bindings in addition to <span class="caps">FORTRAN</span> bindings, and will 
probably make your numerical code execute much faster than either pure C
or, for that matter, pure <span class="caps">FORTRAN</span> with any compiler I&#8217;ve used.</p>
<p>The rest of his numbers match my experience, with two caveats
1) I can&#8217;t comment on the OCaml number
2) His C++ number makes me suspicious of his C++ coding style.
3) Any &#8220;foo is bar times as fast as C code&#8221; statement should be viewed 
with suspicion.  I&#8217;ve written C code thats many times slower than 
equivalent C code in the past.</p>
<p>Ironically, just as word might be finally getting around that &#8220;Hey, 
<span class="caps">FORTRAN</span> is no great shakes, even for numerical code(s)&#8221; we are reaching a
future where C is equally ridiculous for reasons of parallelism.</p>
<p>Personally I&#8217;d be quite happy if all the numerical programmers in the 
world switched to OCaml : my stance on the &#8220;C++ vs. <span class="caps">FORTRAN</span> for numerics&#8221; 
debate is &#8220;anti-<span class="caps">FORTRAN</span>&#8221; rather than &#8220;pro-C&#8221;.  In particular, FORTRAN77 is 
an abominable language.  Unless you spend more time waiting for your code
(&#8220;codes&#8221; if you&#8217;re a physicist) to run than you do debugging it, 
there is no way that any hypothetical difference in speed justifies F77.</p>
<p>Also : Dear physicists,
please stop copying your coding style from those 
&#8220;numerical recipes in <span class="caps">XXX</span>&#8221; books.
Thanks.</p>
<p>See Also:
<a href='http://users.soe.ucsc.edu/~mds/numerical_packages.html'>http://users.soe.ucsc.edu/~mds/numerical_packages.html</a>
http://www.oonumerics.org/blitz/</p>
    <div class="reply-to-outer">
      <div class="reply-to-header"><a href="#" class="reply-to-link">reply</a></div>
      <div class="reply-to-box" id="reply-to-suck-eggs-b1f25d1e3b59cddff03167afb2d2e1f5" >
        <span class="comment-instructions">To reply, enter your email address. A copy of the comment will be sent to you via email.</span>
        <form id='comment-form-suck-eggs-b1f25d1e3b59cddff03167afb2d2e1f5' action='/comment/suck-eggs' method='post' class='comment-form'>
          <input type='text' name='email' id='textfield-email'/>
          <input type='submit' value='email me' id='submit-email me'/>
        <input type='hidden' name='comment-id' value='b1f25d1e3b59cddff03167afb2d2e1f5'/>
  <span class="form-result" id="form-result-suck-eggs-b1f25d1e3b59cddff03167afb2d2e1f5"><!-- spanna --></span>
</form>

      </div>
    </div>
  </div>

  </li>
  
</ul>

<p class="comment-instructions">To leave a new comment, enter your email
address. A copy of the article will be sent to you via email.</p>
<form id='comment-form-suck-eggs' action='/comment/suck-eggs' method='post' class='comment-form'>
  <input type='text' name='email' id='textfield-email'/>
  <input type='submit' value='email me' id='submit-email me'/>
  <span class="form-result" id="form-result-suck-eggs"><!-- spanna --></span>
</form>


<script type="text/javascript">
/* <![CDATA[ */
$$('.comment-form').addEvent('submit', function(e) {
  e.stop();
  var el = this.getElement('.form-result');
  var result = el.empty().addClass('ajax-loading');
  this.set('send', {
    method: 'post',
    onComplete: function(response) { 
      result.removeClass('ajax-loading');
      result.set('html', response);
    },
  });
  this.send();
});
/* ]]> */
</script>


<script type="text/javascript">
/* <![CDATA[ */
$$('.reply-to-link').each(function(link, i) {
  var box = link.getParent().getParent().getElement('.reply-to-box');
  var oldHeight = box.getStyle("height");
  box.setStyle("height", 0);
  box.setStyle("opacity", 0);
  link.addEvent('click', function(e) {
    e.stop();
    box.setStyle("opacity", 1);
    box.setStyle("height", oldHeight);
    box.getElement("input").focus();
  });
});
/* ]]> */
</script>

  </div>

  <div id="footer" style="margin: 0px;">
    Served up by <a href="http://masanjin.net/whisper/">Whisper</a>. Yes!
  </div>
</div>
</body>
</html>
