<?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: Why Gazelle Matters, part 2</title>
	<atom:link href="http://blog.reverberate.org/2008/07/09/why-gazelle-matters-part-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.reverberate.org/2008/07/09/why-gazelle-matters-part-2/</link>
	<description>parsing, performance, minimalism with C99</description>
	<lastBuildDate>Mon, 06 Feb 2012 23:44:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: josh</title>
		<link>http://blog.reverberate.org/2008/07/09/why-gazelle-matters-part-2/comment-page-1/#comment-952</link>
		<dc:creator>josh</dc:creator>
		<pubDate>Wed, 09 Jul 2008 22:06:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.reverberate.org/2008/07/09/why-gazelle-matters-part-2/#comment-952</guid>
		<description>Hi Don,

I&#039;m not sure that I agree that languages like Haskell are the best for compiler writing.  But then again, my project (which I intend to be very very good at it) is still partially vapor, so I can&#039;t make any grandiose claims about being better than Haskell in this problem domain.  Yet.  :)


But for your second point, you seem to be missing the N^2 vs. N+N argument I was trying to make.  Sure, of course you can write bindings.  I&#039;ll ignore for a moment the practical matters of what it means to embed Haskell into your process and just assume that bindings are a practical and compelling solution.

Even if I grant you that, writing bindings for each language pair that you want to parse from/to is madness!  It takes N^2 work.  If you do things my way, you have to write:

- a parser for C
- a parser for Haskell
- a parser for JavaScript
- Gazelle bindings for C
- Gazelle bindings for Haskell
- Gazelle bindings for JavaScript

At that point, I can parse Haskell from JavaScript, or C from Haskell, or any of the N^2 combinations, but it only took me N+N work.  If I do things your way, to get the same functionality, I have to write:

- a parser for C
- a parser for Haskell
- a parser for JavaScript
- C bindings for the C parser
- C bindings for the Haskell parser
- C bindings for the JavaScript parser
- Haskell bindings for the C parser
- Haskell bindings for the Haskell parser
- Haskell bindings for the JavaScript parser
- JavaScript bindings for the C parser
- JavaScript bindings for the Haskell parser
- JavaScript bindings for the JavaScript parser.

Bindings aren&#039;t trivial.  So at the end of the day, since no one is actually going to do the N^2 work, the Language.C person will say &quot;sure, you can use my library, all you have to do is write bindings!&quot; and the person will decide that bindings are too much work for the return you get (because they are), or they&#039;ll be partially written and sporadically maintained bindings that aren&#039;t useful to anyone else, and we&#039;ll keep having the fragmented parser landscape we have today.

Or I&#039;ll finish Gazelle and that pain will be a thing of the past.</description>
		<content:encoded><![CDATA[<p>Hi Don,</p>
<p>I&#8217;m not sure that I agree that languages like Haskell are the best for compiler writing.  But then again, my project (which I intend to be very very good at it) is still partially vapor, so I can&#8217;t make any grandiose claims about being better than Haskell in this problem domain.  Yet.  <img src='http://blog.reverberate.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>But for your second point, you seem to be missing the N^2 vs. N+N argument I was trying to make.  Sure, of course you can write bindings.  I&#8217;ll ignore for a moment the practical matters of what it means to embed Haskell into your process and just assume that bindings are a practical and compelling solution.</p>
<p>Even if I grant you that, writing bindings for each language pair that you want to parse from/to is madness!  It takes N^2 work.  If you do things my way, you have to write:</p>
<p>- a parser for C<br />
- a parser for Haskell<br />
- a parser for JavaScript<br />
- Gazelle bindings for C<br />
- Gazelle bindings for Haskell<br />
- Gazelle bindings for JavaScript</p>
<p>At that point, I can parse Haskell from JavaScript, or C from Haskell, or any of the N^2 combinations, but it only took me N+N work.  If I do things your way, to get the same functionality, I have to write:</p>
<p>- a parser for C<br />
- a parser for Haskell<br />
- a parser for JavaScript<br />
- C bindings for the C parser<br />
- C bindings for the Haskell parser<br />
- C bindings for the JavaScript parser<br />
- Haskell bindings for the C parser<br />
- Haskell bindings for the Haskell parser<br />
- Haskell bindings for the JavaScript parser<br />
- JavaScript bindings for the C parser<br />
- JavaScript bindings for the Haskell parser<br />
- JavaScript bindings for the JavaScript parser.</p>
<p>Bindings aren&#8217;t trivial.  So at the end of the day, since no one is actually going to do the N^2 work, the Language.C person will say &#8220;sure, you can use my library, all you have to do is write bindings!&#8221; and the person will decide that bindings are too much work for the return you get (because they are), or they&#8217;ll be partially written and sporadically maintained bindings that aren&#8217;t useful to anyone else, and we&#8217;ll keep having the fragmented parser landscape we have today.</p>
<p>Or I&#8217;ll finish Gazelle and that pain will be a thing of the past.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Don Stewart</title>
		<link>http://blog.reverberate.org/2008/07/09/why-gazelle-matters-part-2/comment-page-1/#comment-951</link>
		<dc:creator>Don Stewart</dc:creator>
		<pubDate>Wed, 09 Jul 2008 21:48:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.reverberate.org/2008/07/09/why-gazelle-matters-part-2/#comment-951</guid>
		<description>Of course, Language.C is done in Haskell because strongly typed,
functional languages with algebraic data types and pattern matching are
particularly well suited to the task of language processing. They&#039;re are
a sweet point for compiler writing.

That said, Haskell&#039;s perfectly interoperable with C, or Python, or
anything that understands the C calling convention, so you could just
bind to Language.C from other languages (much as others bind to CIL, yet
another C parser/analyser, this time in OCaml).</description>
		<content:encoded><![CDATA[<p>Of course, Language.C is done in Haskell because strongly typed,<br />
functional languages with algebraic data types and pattern matching are<br />
particularly well suited to the task of language processing. They&#8217;re are<br />
a sweet point for compiler writing.</p>
<p>That said, Haskell&#8217;s perfectly interoperable with C, or Python, or<br />
anything that understands the C calling convention, so you could just<br />
bind to Language.C from other languages (much as others bind to CIL, yet<br />
another C parser/analyser, this time in OCaml).</p>
]]></content:encoded>
	</item>
</channel>
</rss>

