<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Pushing intelligence into the parser / runtime</title>
	<atom:link href="http://almaer.com/blog/pushing-intelligence-into-the-parser-runtime/feed" rel="self" type="application/rss+xml" />
	<link>http://almaer.com/blog/pushing-intelligence-into-the-parser-runtime</link>
	<description>blogging about life, the universe, and everything tech</description>
	<lastBuildDate>Sat, 08 Sep 2012 07:06:53 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jason Carreira</title>
		<link>http://almaer.com/blog/pushing-intelligence-into-the-parser-runtime/comment-page-1#comment-19129</link>
		<dc:creator>Jason Carreira</dc:creator>
		<pubDate>Tue, 15 Feb 2005 18:31:31 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog2/pushing-intelligence-into-the-parser-runtime#comment-19129</guid>
		<description>The problem with smart parsers is that there&#039;s not just one parser, there&#039;s 2. The second is the mind of the developer as he/she is developing. The &quot;smarter&quot; the parser is the more thought the developer has to give to the language constructs as opposed to the functionality they are building. I think it&#039;s like this in a lot of things. The more &quot;hacks&quot; there are, the more complicated it is to learn how things work and to write or maintain.
</description>
		<content:encoded><![CDATA[<p>The problem with smart parsers is that there&#8217;s not just one parser, there&#8217;s 2. The second is the mind of the developer as he/she is developing. The &#8220;smarter&#8221; the parser is the more thought the developer has to give to the language constructs as opposed to the functionality they are building. I think it&#8217;s like this in a lot of things. The more &#8220;hacks&#8221; there are, the more complicated it is to learn how things work and to write or maintain.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dion</title>
		<link>http://almaer.com/blog/pushing-intelligence-into-the-parser-runtime/comment-page-1#comment-19127</link>
		<dc:creator>Dion</dc:creator>
		<pubDate>Mon, 14 Feb 2005 22:43:37 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog2/pushing-intelligence-into-the-parser-runtime#comment-19127</guid>
		<description>I agree that Ruby is a good example. It also shows that they give you &#039;power&#039; not only via language constructs, but they also give you hooks (like Lisp).

This allowed the development of &quot;attr :foo&quot;. I tend to like platforms that let me get to the hooks when I really need them... that let be get in and do some heavy lifting when necessary, even if I could abuse it.

D
</description>
		<content:encoded><![CDATA[<p>I agree that Ruby is a good example. It also shows that they give you &#8216;power&#8217; not only via language constructs, but they also give you hooks (like Lisp).</p>
<p>This allowed the development of &#8220;attr :foo&#8221;. I tend to like platforms that let me get to the hooks when I really need them&#8230; that let be get in and do some heavy lifting when necessary, even if I could abuse it.</p>
<p>D</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dion</title>
		<link>http://almaer.com/blog/pushing-intelligence-into-the-parser-runtime/comment-page-1#comment-19128</link>
		<dc:creator>Dion</dc:creator>
		<pubDate>Mon, 14 Feb 2005 22:43:37 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog2/pushing-intelligence-into-the-parser-runtime#comment-19128</guid>
		<description>I agree that Ruby is a good example. It also shows that they give you &#039;power&#039; not only via language constructs, but they also give you hooks (like Lisp).

This allowed the development of &quot;attr :foo&quot;. I tend to like platforms that let me get to the hooks when I really need them... that let be get in and do some heavy lifting when necessary, even if I could abuse it.

D
</description>
		<content:encoded><![CDATA[<p>I agree that Ruby is a good example. It also shows that they give you &#8216;power&#8217; not only via language constructs, but they also give you hooks (like Lisp).</p>
<p>This allowed the development of &#8220;attr :foo&#8221;. I tend to like platforms that let me get to the hooks when I really need them&#8230; that let be get in and do some heavy lifting when necessary, even if I could abuse it.</p>
<p>D</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Spille</title>
		<link>http://almaer.com/blog/pushing-intelligence-into-the-parser-runtime/comment-page-1#comment-19126</link>
		<dc:creator>Mike Spille</dc:creator>
		<pubDate>Mon, 14 Feb 2005 22:34:56 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog2/pushing-intelligence-into-the-parser-runtime#comment-19126</guid>
		<description>Actually, Ruby isn&#039;t a bad example.  The Ruby parser isn&#039;t all that smart, it simply has explicit cases it deals with that are targetted at making certain operations easier to do.  But it deals with these special cases fairly explicitly and in a dumb manner.  The power isn&#039;t from the fact that the parser is smart, the power comes from the fact that Ruby chose a good set of functionality to &quot;condense&quot;, for lack of a better word.  In general the parser is easier, and the user&#039;s life is easier, because the designers have a very regular and consistent design.

Compare this to Groovy or Perl.  In both there is a grab bag of features bolted on in a rather frankensteinian, evolutionary manner.  A number of &quot;tricks&quot; and special cases have been thrown in to address individual small bits.  The result is horrendously complicated parsers, and code often only gurus can understand.

You see, there&#039;s different ways to try to achieve a &quot;better&quot; language.  You can look at Lisp vs. Java.  Both are very regular, but Java is slightly more complex.  Lisp is more dynamic, Java has more special cases.  You might say that Java chose the &quot;right&quot; special cases.

At the same time, you might say that while it&#039;s good that Java&#039;s regular and consistent and has good special cases, those special cases aren&#039;t good enough.  You can improve on them.

You could say, with some validity, that this kinda-sorta describes Ruby.  It&#039;s also pretty regular, but it picks a different set of special cases and for many goals you could say it&#039;s a better language.

This is one side of the coin - various languages that are all pretty regular but which look very different and achieve different goals.  But these are _very_ different from a language with a &quot;smart parser&quot;.  Those languages - in the genre of perl and Groovy - are on a very different plane.  They do not achieve their expressiveness via a consistent and regular targetted feature set, but rather by throwing stuff at the language, seeing what sticks, and then doing Stupid Parser Tricks(tm) to try to make it all work.

Take a serious look at both sides of this, Dion.  You explicitly mentioned linguistics - look at the &quot;language&quot; of Ruby/Smalltalk/Java/Lisp/C (yes, C!) and you&#039;ll find they&#039;re all pretty regular and parsers for them don&#039;t need to be all that smart.  Even though they&#039;re radically different languages, they share this trait.  Then look at the &quot;language&quot; of perl or Groovy - quite a different story.

</description>
		<content:encoded><![CDATA[<p>Actually, Ruby isn&#8217;t a bad example.  The Ruby parser isn&#8217;t all that smart, it simply has explicit cases it deals with that are targetted at making certain operations easier to do.  But it deals with these special cases fairly explicitly and in a dumb manner.  The power isn&#8217;t from the fact that the parser is smart, the power comes from the fact that Ruby chose a good set of functionality to &#8220;condense&#8221;, for lack of a better word.  In general the parser is easier, and the user&#8217;s life is easier, because the designers have a very regular and consistent design.</p>
<p>Compare this to Groovy or Perl.  In both there is a grab bag of features bolted on in a rather frankensteinian, evolutionary manner.  A number of &#8220;tricks&#8221; and special cases have been thrown in to address individual small bits.  The result is horrendously complicated parsers, and code often only gurus can understand.</p>
<p>You see, there&#8217;s different ways to try to achieve a &#8220;better&#8221; language.  You can look at Lisp vs. Java.  Both are very regular, but Java is slightly more complex.  Lisp is more dynamic, Java has more special cases.  You might say that Java chose the &#8220;right&#8221; special cases.</p>
<p>At the same time, you might say that while it&#8217;s good that Java&#8217;s regular and consistent and has good special cases, those special cases aren&#8217;t good enough.  You can improve on them.</p>
<p>You could say, with some validity, that this kinda-sorta describes Ruby.  It&#8217;s also pretty regular, but it picks a different set of special cases and for many goals you could say it&#8217;s a better language.</p>
<p>This is one side of the coin &#8211; various languages that are all pretty regular but which look very different and achieve different goals.  But these are _very_ different from a language with a &#8220;smart parser&#8221;.  Those languages &#8211; in the genre of perl and Groovy &#8211; are on a very different plane.  They do not achieve their expressiveness via a consistent and regular targetted feature set, but rather by throwing stuff at the language, seeing what sticks, and then doing Stupid Parser Tricks(tm) to try to make it all work.</p>
<p>Take a serious look at both sides of this, Dion.  You explicitly mentioned linguistics &#8211; look at the &#8220;language&#8221; of Ruby/Smalltalk/Java/Lisp/C (yes, C!) and you&#8217;ll find they&#8217;re all pretty regular and parsers for them don&#8217;t need to be all that smart.  Even though they&#8217;re radically different languages, they share this trait.  Then look at the &#8220;language&#8221; of perl or Groovy &#8211; quite a different story.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dion</title>
		<link>http://almaer.com/blog/pushing-intelligence-into-the-parser-runtime/comment-page-1#comment-19124</link>
		<dc:creator>Dion</dc:creator>
		<pubDate>Mon, 14 Feb 2005 22:21:49 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog2/pushing-intelligence-into-the-parser-runtime#comment-19124</guid>
		<description>Hi Mike -

I was waiting for you to post. I even started a &#039;book&#039; on it ;)

I do understand what you are saying, and I tried to admit to that side of thinking in my post.

All I am saying is that PERSONALLY I feel happier, and more satisfied, when I work with a language that is simple to do simple things, but allows me to express more as I get into it more.

Ruby is a good recent example. As I &quot;feel more Ruby&quot; I write very differently. This could be considered a very BAD THING as the different styles make it harder to grok what is going on, especially in large projects.

However, if you got a couple of Dave Thomas&#039; on a project, they would blow it away.

The good news is that we have many options.

D
</description>
		<content:encoded><![CDATA[<p>Hi Mike -</p>
<p>I was waiting for you to post. I even started a &#8216;book&#8217; on it ;)</p>
<p>I do understand what you are saying, and I tried to admit to that side of thinking in my post.</p>
<p>All I am saying is that PERSONALLY I feel happier, and more satisfied, when I work with a language that is simple to do simple things, but allows me to express more as I get into it more.</p>
<p>Ruby is a good recent example. As I &#8220;feel more Ruby&#8221; I write very differently. This could be considered a very BAD THING as the different styles make it harder to grok what is going on, especially in large projects.</p>
<p>However, if you got a couple of Dave Thomas&#8217; on a project, they would blow it away.</p>
<p>The good news is that we have many options.</p>
<p>D</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dion</title>
		<link>http://almaer.com/blog/pushing-intelligence-into-the-parser-runtime/comment-page-1#comment-19125</link>
		<dc:creator>Dion</dc:creator>
		<pubDate>Mon, 14 Feb 2005 22:21:49 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog2/pushing-intelligence-into-the-parser-runtime#comment-19125</guid>
		<description>Hi Mike -

I was waiting for you to post. I even started a &#039;book&#039; on it ;)

I do understand what you are saying, and I tried to admit to that side of thinking in my post.

All I am saying is that PERSONALLY I feel happier, and more satisfied, when I work with a language that is simple to do simple things, but allows me to express more as I get into it more.

Ruby is a good recent example. As I &quot;feel more Ruby&quot; I write very differently. This could be considered a very BAD THING as the different styles make it harder to grok what is going on, especially in large projects.

However, if you got a couple of Dave Thomas&#039; on a project, they would blow it away.

The good news is that we have many options.

D
</description>
		<content:encoded><![CDATA[<p>Hi Mike -</p>
<p>I was waiting for you to post. I even started a &#8216;book&#8217; on it ;)</p>
<p>I do understand what you are saying, and I tried to admit to that side of thinking in my post.</p>
<p>All I am saying is that PERSONALLY I feel happier, and more satisfied, when I work with a language that is simple to do simple things, but allows me to express more as I get into it more.</p>
<p>Ruby is a good recent example. As I &#8220;feel more Ruby&#8221; I write very differently. This could be considered a very BAD THING as the different styles make it harder to grok what is going on, especially in large projects.</p>
<p>However, if you got a couple of Dave Thomas&#8217; on a project, they would blow it away.</p>
<p>The good news is that we have many options.</p>
<p>D</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Spille</title>
		<link>http://almaer.com/blog/pushing-intelligence-into-the-parser-runtime/comment-page-1#comment-19123</link>
		<dc:creator>Mike Spille</dc:creator>
		<pubDate>Mon, 14 Feb 2005 22:12:06 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog2/pushing-intelligence-into-the-parser-runtime#comment-19123</guid>
		<description>Dion, what you&#039;re saying seems very seductive when you first approach it.  But in fact I think the approach you&#039;re talking about has been proven to be exactly the _wrong_ one.

The problem with a &quot;smart&quot; parser is that smart parsers inevitably involve deducing what you mean by the surrounding context.  This has two issues: 1) the parser will often have a funny idea of the context you are in, and will disagree with you 2) humans suck at tracking context. :-)

You see, a computer program is not a book.  A program is supposed to execute in some specific manner and do some specific thing.  When you write in english there is all sorts of amgibuity, and such ambiguity is a nightmare in code.

Now I do believe that a language can be too verbose, and that steps can be taken to reduce the verbosity.  But these steps don&#039;t have to involve a &quot;smart&quot; parser.  Often simple syntactical sugar can go a long way to make a language easier to use  but still be relatively &quot;dumb&quot;.

I think Perl and Groovy both show what happens when you try to have a &quot;smart&quot; parser: buggy, hard to read programs that are often surprisingly difficult to write as well (unless you&#039;re a guru).

I&#039;ll go with a &quot;dumb&quot; parser everytime, for the simple reason that dumb parsers rarely surprise you.  The smarter a parser is, the more likely it is to disagree with my notion of what should be happening.  And that&#039;s bad.

</description>
		<content:encoded><![CDATA[<p>Dion, what you&#8217;re saying seems very seductive when you first approach it.  But in fact I think the approach you&#8217;re talking about has been proven to be exactly the _wrong_ one.</p>
<p>The problem with a &#8220;smart&#8221; parser is that smart parsers inevitably involve deducing what you mean by the surrounding context.  This has two issues: 1) the parser will often have a funny idea of the context you are in, and will disagree with you 2) humans suck at tracking context. :-)</p>
<p>You see, a computer program is not a book.  A program is supposed to execute in some specific manner and do some specific thing.  When you write in english there is all sorts of amgibuity, and such ambiguity is a nightmare in code.</p>
<p>Now I do believe that a language can be too verbose, and that steps can be taken to reduce the verbosity.  But these steps don&#8217;t have to involve a &#8220;smart&#8221; parser.  Often simple syntactical sugar can go a long way to make a language easier to use  but still be relatively &#8220;dumb&#8221;.</p>
<p>I think Perl and Groovy both show what happens when you try to have a &#8220;smart&#8221; parser: buggy, hard to read programs that are often surprisingly difficult to write as well (unless you&#8217;re a guru).</p>
<p>I&#8217;ll go with a &#8220;dumb&#8221; parser everytime, for the simple reason that dumb parsers rarely surprise you.  The smarter a parser is, the more likely it is to disagree with my notion of what should be happening.  And that&#8217;s bad.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
