<?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: Parsing Text with Scala</title>
	<atom:link href="http://blog.xebia.com/2009/10/21/parsing-text-with-scala/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.xebia.com/2009/10/21/parsing-text-with-scala/</link>
	<description></description>
	<lastBuildDate>Mon, 26 Jul 2010 20:40:47 +0200</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jan Vermeir</title>
		<link>http://blog.xebia.com/2009/10/21/parsing-text-with-scala/comment-page-1/#comment-94803</link>
		<dc:creator>Jan Vermeir</dc:creator>
		<pubDate>Wed, 12 May 2010 07:17:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.xebia.com/?p=3259#comment-94803</guid>
		<description>Hi Gaurav, I didn&#039;t make any further progress. This is mainly because I do my shopping at Albert Heijn, the largest retailer in the Netherlands (www.ah.nl). They are quite ambitious and plan to offer an Iphone app that allows you to navigate through the store based on a shopping list you can create on their website. This may actually lead to me buying one of those iphone thingies. 
On the other hand, what is to stop us from doing a similar thing? The shopping list business case has enabled me to learn new stuff in the past. Would you like to work on the Scala code? Should we create an open source project and a backlog and stuff?</description>
		<content:encoded><![CDATA[<p>Hi Gaurav, I didn&#8217;t make any further progress. This is mainly because I do my shopping at Albert Heijn, the largest retailer in the Netherlands (www.ah.nl). They are quite ambitious and plan to offer an Iphone app that allows you to navigate through the store based on a shopping list you can create on their website. This may actually lead to me buying one of those iphone thingies.<br />
On the other hand, what is to stop us from doing a similar thing? The shopping list business case has enabled me to learn new stuff in the past. Would you like to work on the Scala code? Should we create an open source project and a backlog and stuff?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gaurav</title>
		<link>http://blog.xebia.com/2009/10/21/parsing-text-with-scala/comment-page-1/#comment-94794</link>
		<dc:creator>Gaurav</dc:creator>
		<pubDate>Tue, 11 May 2010 09:01:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.xebia.com/?p=3259#comment-94794</guid>
		<description>Hi Jan,

I&#039;m trying to tackle the same problem(parse text and turn it into a list of groceries). Only I&#039;m using Python instead of Scala.
I was wondering if you made any progress on this code.</description>
		<content:encoded><![CDATA[<p>Hi Jan,</p>
<p>I&#8217;m trying to tackle the same problem(parse text and turn it into a list of groceries). Only I&#8217;m using Python instead of Scala.<br />
I was wondering if you made any progress on this code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick</title>
		<link>http://blog.xebia.com/2009/10/21/parsing-text-with-scala/comment-page-1/#comment-92934</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Fri, 23 Oct 2009 18:58:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.xebia.com/?p=3259#comment-92934</guid>
		<description>Great! Thanks for posting the code.</description>
		<content:encoded><![CDATA[<p>Great! Thanks for posting the code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan Vermeir</title>
		<link>http://blog.xebia.com/2009/10/21/parsing-text-with-scala/comment-page-1/#comment-92933</link>
		<dc:creator>Jan Vermeir</dc:creator>
		<pubDate>Fri, 23 Oct 2009 18:13:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.xebia.com/?p=3259#comment-92933</guid>
		<description>Hi Patrick, you can download the sources here:

http://blog.xebia.com/wp-content/uploads/2009/10/dsl.zip</description>
		<content:encoded><![CDATA[<p>Hi Patrick, you can download the sources here:</p>
<p><a href="http://blog.xebia.com/wp-content/uploads/2009/10/dsl.zip" rel="nofollow">http://blog.xebia.com/wp-content/uploads/2009/10/dsl.zip</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick</title>
		<link>http://blog.xebia.com/2009/10/21/parsing-text-with-scala/comment-page-1/#comment-92929</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Fri, 23 Oct 2009 15:06:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.xebia.com/?p=3259#comment-92929</guid>
		<description>This was a nice read--would you care to post the complete sample code somewhere so I can see the whole thing? Would like to have a complete parser combinator example (that&#039;s not another basic-arithmetic-expression-language) to look at. Thanks!</description>
		<content:encoded><![CDATA[<p>This was a nice read&#8211;would you care to post the complete sample code somewhere so I can see the whole thing? Would like to have a complete parser combinator example (that&#8217;s not another basic-arithmetic-expression-language) to look at. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan Vermeir</title>
		<link>http://blog.xebia.com/2009/10/21/parsing-text-with-scala/comment-page-1/#comment-92913</link>
		<dc:creator>Jan Vermeir</dc:creator>
		<pubDate>Fri, 23 Oct 2009 06:18:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.xebia.com/?p=3259#comment-92913</guid>
		<description>Thanks Jesper, I didn&#039;t know expressions could be abbreviated like that. Your shorter version does eliminate a lot of redundancy (so in a way I could have thought of that myself, of course given Scala&#039;s focus on conciseness). 
Case classes have me a bit a confused still, but I&#039;ll try out your suggestion. 

@Andrew: the only version that ever worked for me is this Scala version. I lost the Drools code and I wrote it like ages ago so I don&#039;t remember the details. It did work in a limited way however.
Needless to say the 6510 assembly language version failed miserably. What did work though was writing an addition to Commodore64 Basic. It worked by extending a symbol table in the Basic interpreter. This allowed me to add custom statements to a program, much like an internal DSL. 
Another version that sort of worked was the Groovy one. I used the MethodMIssing thingy to add new methods to 
existing classes. This allowed me to chain together arbitrary words and handle their meaning in a method. This wasn&#039;t very elegant but it was fast and easy to develop. It would allow you to easily implement a internal DSL like the one Camel uses to configure routes. I guess you could do something similar in Scala, but I haven&#039;t tried.</description>
		<content:encoded><![CDATA[<p>Thanks Jesper, I didn&#8217;t know expressions could be abbreviated like that. Your shorter version does eliminate a lot of redundancy (so in a way I could have thought of that myself, of course given Scala&#8217;s focus on conciseness).<br />
Case classes have me a bit a confused still, but I&#8217;ll try out your suggestion. </p>
<p>@Andrew: the only version that ever worked for me is this Scala version. I lost the Drools code and I wrote it like ages ago so I don&#8217;t remember the details. It did work in a limited way however.<br />
Needless to say the 6510 assembly language version failed miserably. What did work though was writing an addition to Commodore64 Basic. It worked by extending a symbol table in the Basic interpreter. This allowed me to add custom statements to a program, much like an internal DSL.<br />
Another version that sort of worked was the Groovy one. I used the MethodMIssing thingy to add new methods to<br />
existing classes. This allowed me to chain together arbitrary words and handle their meaning in a method. This wasn&#8217;t very elegant but it was fast and easy to develop. It would allow you to easily implement a internal DSL like the one Camel uses to configure routes. I guess you could do something similar in Scala, but I haven&#8217;t tried.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jesper Nordenberg</title>
		<link>http://blog.xebia.com/2009/10/21/parsing-text-with-scala/comment-page-1/#comment-92898</link>
		<dc:creator>Jesper Nordenberg</dc:creator>
		<pubDate>Thu, 22 Oct 2009 11:25:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.xebia.com/?p=3259#comment-92898</guid>
		<description>Whenever you define an immutable data type, like your Amount type, you should consider making it a case class. That way you will get benefits like equals, hashCode, toString (which you of course can override) and pattern matching for free.

Also, expressions like:

&quot;name&quot; ~ ident ^^ { case &quot;name&quot; ~ name =&gt; name }

can be more concisely written:

&quot;name&quot; ~&gt; ident</description>
		<content:encoded><![CDATA[<p>Whenever you define an immutable data type, like your Amount type, you should consider making it a case class. That way you will get benefits like equals, hashCode, toString (which you of course can override) and pattern matching for free.</p>
<p>Also, expressions like:</p>
<p>&#8220;name&#8221; ~ ident ^^ { case &#8220;name&#8221; ~ name =&gt; name }</p>
<p>can be more concisely written:</p>
<p>&#8220;name&#8221; ~&gt; ident</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Phillips</title>
		<link>http://blog.xebia.com/2009/10/21/parsing-text-with-scala/comment-page-1/#comment-92893</link>
		<dc:creator>Andrew Phillips</dc:creator>
		<pubDate>Thu, 22 Oct 2009 08:34:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.xebia.com/?p=3259#comment-92893</guid>
		<description>I shouldn&#039;t have read this nice post in the morning - now I&#039;m hungry ;-) A small point: if I&#039;m not mistaken the mkString methods are defined on the &lt;tt&gt;Iterable&lt;/tt&gt; trait, so you can&#039;t call them on &lt;em&gt;everything&lt;/em&gt;. See the &lt;a href=&quot;http://www.scala-lang.org/docu/files/api/scala/Iterable.html#mkString%28String%29&quot; target=&quot;_new&quot; rel=&quot;nofollow&quot;&gt;Iterable&lt;/a&gt; documentation.

I&#039;d also be curious to hear how Scala shapes up in comparison to the other languages you&#039;ve tried this in. You know, advantages, pains-in-the-a**, that kind of thing...</description>
		<content:encoded><![CDATA[<p>I shouldn&#8217;t have read this nice post in the morning &#8211; now I&#8217;m hungry <img src='http://blog.xebia.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  A small point: if I&#8217;m not mistaken the mkString methods are defined on the <tt>Iterable</tt> trait, so you can&#8217;t call them on <em>everything</em>. See the <a href="http://www.scala-lang.org/docu/files/api/scala/Iterable.html#mkString%28String%29" target="_new" rel="nofollow">Iterable</a> documentation.</p>
<p>I&#8217;d also be curious to hear how Scala shapes up in comparison to the other languages you&#8217;ve tried this in. You know, advantages, pains-in-the-a**, that kind of thing&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
