<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>BlackBox &#187; groovy</title>
	<atom:link href="http://www.warneronstine.com/tag/groovy/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.warneronstine.com</link>
	<description>Where technology and art disappear</description>
	<lastBuildDate>Tue, 17 Nov 2009 00:05:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Crazy? Working on CouchDB Grails OR plugin</title>
		<link>http://www.warneronstine.com/2009/09/16/crazy-working-on-couchdb-grails-or-plugin/</link>
		<comments>http://www.warneronstine.com/2009/09/16/crazy-working-on-couchdb-grails-or-plugin/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 23:09:27 +0000</pubDate>
		<dc:creator>Warner Onstine</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[couchdb]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[groovy]]></category>

		<guid isPermaLink="false">http://www.warneronstine.com/2009/09/16/crazy-working-on-couchdb-grails-or-plugin/</guid>
		<description><![CDATA[Not sure if I&#8217;m crazy or not but after getting an initial setup with jcouchdb I am getting tired of manually mapping my class fields with the Couch fields so I&#8217;m starting to work on a gorm-couchdb plugin.
Pouring over Grails code (and the gorm-jpa plugin code). Chime in if you&#8217;re interested in helping as this [...]]]></description>
			<content:encoded><![CDATA[<p>Not sure if I&#8217;m crazy or not but after getting an initial setup with jcouchdb I am getting tired of manually mapping my class fields with the Couch fields so I&#8217;m starting to work on a gorm-couchdb plugin.</p>
<p>Pouring over Grails code (and the gorm-jpa plugin code). Chime in if you&#8217;re interested in helping as this is secondary to what I want to get done. I&#8217;ll throw some code up to github soon (maybe tomorrow with an early, early version).</p>
<p style="font-size: 10px;">  <a href="http://posterous.com">Posted via web</a>   from <a href="http://blackboxpost.posterous.com/crazy-working-on-couchdb-grails-or-plugin">BlackBox Post</a>  </p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.warneronstine.com%2F2009%2F09%2F16%2Fcrazy-working-on-couchdb-grails-or-plugin%2F&amp;partner=sociable" title="Print"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.warneronstine.com%2F2009%2F09%2F16%2Fcrazy-working-on-couchdb-grails-or-plugin%2F&amp;title=Crazy%3F%20Working%20on%20CouchDB%20Grails%20OR%20plugin&amp;bodytext=Not%20sure%20if%20I%27m%20crazy%20or%20not%20but%20after%20getting%20an%20initial%20setup%20with%20jcouchdb%20I%20am%20getting%20tired%20of%20manually%20mapping%20my%20class%20fields%20with%20the%20Couch%20fields%20so%20I%27m%20starting%20to%20work%20on%20a%20gorm-couchdb%20plugin.%20%20Pouring%20over%20Grails%20code%20%28and%20the%20gorm-jpa%20p" title="Digg"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fwww.warneronstine.com%2F2009%2F09%2F16%2Fcrazy-working-on-couchdb-grails-or-plugin%2F&amp;title=Crazy%3F%20Working%20on%20CouchDB%20Grails%20OR%20plugin" title="Reddit"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.warneronstine.com%2F2009%2F09%2F16%2Fcrazy-working-on-couchdb-grails-or-plugin%2F&amp;title=Crazy%3F%20Working%20on%20CouchDB%20Grails%20OR%20plugin&amp;notes=Not%20sure%20if%20I%27m%20crazy%20or%20not%20but%20after%20getting%20an%20initial%20setup%20with%20jcouchdb%20I%20am%20getting%20tired%20of%20manually%20mapping%20my%20class%20fields%20with%20the%20Couch%20fields%20so%20I%27m%20starting%20to%20work%20on%20a%20gorm-couchdb%20plugin.%20%20Pouring%20over%20Grails%20code%20%28and%20the%20gorm-jpa%20p" title="del.icio.us"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://twitter.com/home?status=Crazy%3F%20Working%20on%20CouchDB%20Grails%20OR%20plugin%20-%20http%3A%2F%2Fwww.warneronstine.com%2F2009%2F09%2F16%2Fcrazy-working-on-couchdb-grails-or-plugin%2F" title="Twitter"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.warneronstine.com%2F2009%2F09%2F16%2Fcrazy-working-on-couchdb-grails-or-plugin%2F&amp;t=Crazy%3F%20Working%20on%20CouchDB%20Grails%20OR%20plugin" title="Facebook"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.warneronstine.com%2F2009%2F09%2F16%2Fcrazy-working-on-couchdb-grails-or-plugin%2F&amp;title=Crazy%3F%20Working%20on%20CouchDB%20Grails%20OR%20plugin&amp;annotation=Not%20sure%20if%20I%27m%20crazy%20or%20not%20but%20after%20getting%20an%20initial%20setup%20with%20jcouchdb%20I%20am%20getting%20tired%20of%20manually%20mapping%20my%20class%20fields%20with%20the%20Couch%20fields%20so%20I%27m%20starting%20to%20work%20on%20a%20gorm-couchdb%20plugin.%20%20Pouring%20over%20Grails%20code%20%28and%20the%20gorm-jpa%20p" title="Google Bookmarks"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.warneronstine.com%2F2009%2F09%2F16%2Fcrazy-working-on-couchdb-grails-or-plugin%2F&amp;title=Crazy%3F%20Working%20on%20CouchDB%20Grails%20OR%20plugin" title="DZone"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.warneronstine.com/2009/09/16/crazy-working-on-couchdb-grails-or-plugin/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Is Maven going away?</title>
		<link>http://www.warneronstine.com/2008/07/06/is-maven-going-away/</link>
		<comments>http://www.warneronstine.com/2008/07/06/is-maven-going-away/#comments</comments>
		<pubDate>Sun, 06 Jul 2008 13:49:33 +0000</pubDate>
		<dc:creator>Warner Onstine</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[polyglot]]></category>
		<category><![CDATA[scala]]></category>

		<guid isPermaLink="false">urn:uuid:{a.guid}</guid>
		<description><![CDATA[First, let me say, I like Maven &#8211; a lot. I’ve liked the idea, if not the execution, since 1.0 (yes, I know there is some serious bad blood for the implementation of 1.0, and yes I still liked it). But I’ve recently run into some irritating problems with Maven that would again, I think, [...]]]></description>
			<content:encoded><![CDATA[<p>First, let me say, I like <a href="http://maven.apache.org">Maven</a> &#8211; a lot. I’ve liked the idea, if not the execution, since 1.0 (yes, I know there is some serious bad blood for the implementation of 1.0, and yes I still liked it). But I’ve recently run into some irritating problems with Maven that would again, I think, require a major reworking of what it does.</p>
<p>Here is the main issue Maven is designed to handle one language only for its compilation &#8211; primarily Java. This is rapidly starting to fall apart now that the JVM has some serious contenders besides Java, namely <a href="http://groovy.apache.org">Groovy</a>, <a href="http://jruby.codehaus.org/">JRuby</a>, <a href="http://www.jython.org/">Jython</a>, and <a href="http://www.scala-lang.org/">Scala</a>. There are some hackish things for getting Maven to deal with these, however it still only has one “true” source directory for compilation. A case in point is a mixed Java/Groovy project &#8211; trying to get <a href="http://www.jetbrains.com/idea/">IntelliJ</a> to respect the fact that I want not one, but two main source directories is a pain in the ass as I have to either tell it not to sync everytime I launch or I have to refix the source directories each time I update the project.</p>
<p>This is what triggered this post &#8211; what happens when I want to do some <a href="http://labs.adobe.com/technologies/flex/">Flex</a> programming with some Java, ActionScript and MXML, all of these are true source files (and in Maven specfic directories). I’m sure some Mavenite is going to say that these should be separate projects, but in alot of cases they aren’t and it doesn’t make sense to actually separate them into sub-projects. And I’m equally as sure that some Ant-ite is going to come along and tell me to use <a href="http://ant.apache.org/">Ant</a> &#8211; I won’t. Ant is stuck in the past and I won’t use it unless I absolutely have to. I like the “imposed” structure that Maven offers. I can walk up to any project and know where  to find stuff instead of blindly hunting around for hours trying to piece it together like some giant source-code jigsaw puzzle, blech.</p>
<p>So, I’m at cross-roads, what should I do? There is <a href="http://ant.apache.org/ivy/">Ivy</a> (for dependency management -which they got from Maven natch), but that requires Ant, blech. There’s also <a href="http://gant.codehaus.org/">Gant</a>, ok, this is better, but still Ant. <a href="http://groovy.codehaus.org/GMaven">GMaven</a>, but I’m right back where I started.</p>
<p>Enter, <a href="http://www.gradle.org/">Gradle</a>, a new Groovy-based build system that offers alot of the benefits of Maven without locking you in and the flexibility of Ant. I’m not 100% sold on it yet, but I’m going to give it a shot for a relatively complex project that will have a fair amount of Java, Groovy and other fun resource files. It looks interesting in that all the build files are actually Groovy scripts that are a DSL (like Gant files). Here’s a short example with some dependencies (taken directly from their examples in the download).</p>
<pre><code>import org.gradle.api.tasks.util.FileSet

usePlugin('groovy')

group = 'org.gradle'
version = '1.0'

sourceCompatibility = 1.5
targetCompatibility = 1.5

dependencies {
   clientModule(['groovy'], ":groovy-all:1.6-beta-1") {
       dependency(":commons-cli:1.0")
   }
   compile project(':groovycDetector')
   testCompile ":junit:4.4"
}

compile {
   exclude('**/Exclude.java')
   groovyExclude('**/ExcludeGroovy.groovy')
   groovyJavaExclude('**/ExcludeGroovyJava.java')
}

manifest.mainAttributes(myprop: 'myvalue')
metaInf &lt;&lt; new FileSet(new File(srcRoot, 'metaInfFiles'))

test.options.systemProperties['org.gradle.integtest.buildDir'] = buildDir.absolutePath
</code></pre>
<p>I will try and keep everyone up to date as I continue to investigate this new build system. They also state that they are going to be supporting polyglot programming in the near future which I’m looking forward to.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.warneronstine.com%2F2008%2F07%2F06%2Fis-maven-going-away%2F&amp;partner=sociable" title="Print"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.warneronstine.com%2F2008%2F07%2F06%2Fis-maven-going-away%2F&amp;title=Is%20Maven%20going%20away%3F&amp;bodytext=First%2C%20let%20me%20say%2C%20I%20like%20Maven%20-%20a%20lot.%20I%E2%80%99ve%20liked%20the%20idea%2C%20if%20not%20the%20execution%2C%20since%201.0%20%28yes%2C%20I%20know%20there%20is%20some%20serious%20bad%20blood%20for%20the%20implementation%20of%201.0%2C%20and%20yes%20I%20still%20liked%20it%29.%20But%20I%E2%80%99ve%20recently%20run%20into%20some%20irritating%20proble" title="Digg"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fwww.warneronstine.com%2F2008%2F07%2F06%2Fis-maven-going-away%2F&amp;title=Is%20Maven%20going%20away%3F" title="Reddit"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.warneronstine.com%2F2008%2F07%2F06%2Fis-maven-going-away%2F&amp;title=Is%20Maven%20going%20away%3F&amp;notes=First%2C%20let%20me%20say%2C%20I%20like%20Maven%20-%20a%20lot.%20I%E2%80%99ve%20liked%20the%20idea%2C%20if%20not%20the%20execution%2C%20since%201.0%20%28yes%2C%20I%20know%20there%20is%20some%20serious%20bad%20blood%20for%20the%20implementation%20of%201.0%2C%20and%20yes%20I%20still%20liked%20it%29.%20But%20I%E2%80%99ve%20recently%20run%20into%20some%20irritating%20proble" title="del.icio.us"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://twitter.com/home?status=Is%20Maven%20going%20away%3F%20-%20http%3A%2F%2Fwww.warneronstine.com%2F2008%2F07%2F06%2Fis-maven-going-away%2F" title="Twitter"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.warneronstine.com%2F2008%2F07%2F06%2Fis-maven-going-away%2F&amp;t=Is%20Maven%20going%20away%3F" title="Facebook"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.warneronstine.com%2F2008%2F07%2F06%2Fis-maven-going-away%2F&amp;title=Is%20Maven%20going%20away%3F&amp;annotation=First%2C%20let%20me%20say%2C%20I%20like%20Maven%20-%20a%20lot.%20I%E2%80%99ve%20liked%20the%20idea%2C%20if%20not%20the%20execution%2C%20since%201.0%20%28yes%2C%20I%20know%20there%20is%20some%20serious%20bad%20blood%20for%20the%20implementation%20of%201.0%2C%20and%20yes%20I%20still%20liked%20it%29.%20But%20I%E2%80%99ve%20recently%20run%20into%20some%20irritating%20proble" title="Google Bookmarks"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.warneronstine.com%2F2008%2F07%2F06%2Fis-maven-going-away%2F&amp;title=Is%20Maven%20going%20away%3F" title="DZone"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.warneronstine.com/2008/07/06/is-maven-going-away/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Groovy DSL roundup</title>
		<link>http://www.warneronstine.com/2008/04/24/groovy-dsl-roundup/</link>
		<comments>http://www.warneronstine.com/2008/04/24/groovy-dsl-roundup/#comments</comments>
		<pubDate>Thu, 24 Apr 2008 15:50:00 +0000</pubDate>
		<dc:creator>Warner Onstine</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[dsl]]></category>
		<category><![CDATA[groovy]]></category>

		<guid isPermaLink="false">urn:uuid:{a.guid}</guid>
		<description><![CDATA[This is my first attempt at categorizing some of the DSLs I’ve run across into some kind of logical grouping. First I’ll list out some Groovy DSL examples (sound off in the comments for those I’m not aware of, the more the better). I’ll go through the DSLs first and then look at the possible [...]]]></description>
			<content:encoded><![CDATA[<p>This is my first attempt at categorizing some of the DSLs I’ve run across into some kind of logical grouping. First I’ll list out some Groovy DSL examples (sound off in the comments for those I’m not aware of, the more the better). I’ll go through the DSLs first and then look at the possible categories after the break. And the first two are mine that I created</p>
<ul>
<li><a href="http://www.warneronstine.com/blog/articles/2007/04/27/my-groovy-hom-take-2">Groovy Higher Order Messaging (HOM)</a></li>
<li>Math DSL <a href="http://www.warneronstine.com/blog/articles/2007/11/23/math-dsl-beginning">Part 1</a> and <a href="http://www.warneronstine.com/blog/articles/2007/11/26/math-dsl-part-deux-elementary-row-operations-eros">Part 2</a></li>
<li><a href="http://groovy.codehaus.org/GroovyLab">GroovyLab</a></li>
<li><a href="http://json-lib.sourceforge.net/groovy.html">Json-lib with Groovy</a></li>
<li><a href="http://grails.org/doc/1.0.x/guide/14.%20Grails%20and%20Spring.html#14.3%20Runtime%20Spring%20with%20the%20Beans%20DSL">Grails’ Spring Bean DSL</a></li>
<li><a href="http://grails.org/doc/1.0.x/guide/5.%20Object%20Relational%20Mapping%20%28GORM%29.html#5.4.1%20Dynamic%20Finders">Grails’ Dynamic Finders</a></li>
<li><a href="http://grails.org/doc/1.0.x/guide/5.%20Object%20Relational%20Mapping%20%28GORM%29.html#5.4.2%20Criteria">Grails’ Criteria DSL</a></li>
<li><a href="http://grails.org/Validation+Reference">Grails’ Domain Class Validation DSL</a></li>
<li><a href="http://jparsec.codehaus.org/Groovy+Parser">JParsec’s Groovy interface</a></li>
<li><a href="http://glaforge.free.fr/weblog/index.php?itemid=233">Guillaume’s Unit Manipulation DSL</a></li>
<li><a href="http://docs.codehaus.org/display/GROOVY/Using+Ant+from+Groovy">AntBuilder</a> (as well as XMLBuilder, SwingBuilder, etc. &#8211; builders, essentially)</li>
<li><a href="http://kenbarclay.blogspot.com/">Ken Barclay’s GParsec</a></li>
<li>Human readable date manipulation such as in <a href="http://glaforge.free.fr/weblog/index.php?itemid=187">Guillaume’s example</a></li>
<li><a href="http://tiago.org/ps/2008/02/25/dsl-tactics-in-groovy-1many/">Tiago Antão’s Malaria Drug DSL</a></li>
<li><a href="http://codeforfun.wordpress.com/2007/04/09/gspec-for-java-bdd/">GSpec Behavior Driven Development</a></li>
</ul>
<p>I know there are more out there but this is a good starting point for sure.</p>
<p>Now, on to the actual categories of DSL “types”</p>
<p>I have been paying attention to Martin Fowler’s new <a href="http://www.martinfowler.com/dslwip/">DSL book</a> in which he specifies several types of Internal DSLs. I’m not 100% on board with all of these yet, but here they are (of course these may change as this is a work in progress, so if he changes them it isn’t my fault <img src='http://www.warneronstine.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> ):</p>
<ul>
<li><a href="http://www.martinfowler.com/dslwip/ExpressionBuilder.html">Expression Builder</a>: A layer that provides a fluent interface over a regular API</li>
<li><a href="http://www.martinfowler.com/dslwip/FunctionSequence.html">Function Sequence</a>: A combination of function calls as a sequence of statements.</li>
<li><a href="http://www.martinfowler.com/dslwip/NestedFunction.html">Nested Function</a>: Compose functions by nesting function calls as arguments of of other calls.</li>
<li><a href="http://www.martinfowler.com/dslwip/MethodChaining.html">Method Chaining</a>: Make modifier methods return the host object so that multiple modifiers can be invoked in a single expression.</li>
<li><a href="http://www.martinfowler.com/dslwip/ObjectScoping.html">Object Scoping</a>: Put DSL code in a subclass of a class that provdes the DSL vocabulary.</li>
<li><a href="http://www.martinfowler.com/dslwip/Closure.html">Closure</a>:
<ul>
<li><a href="http://www.martinfowler.com/dslwip/NestedClosure.html">Nested Closure</a>: Express statement sub-elements of a function call by putting them into a closure in an argument.</li>
</ul>
</li>
<li><a href="http://www.martinfowler.com/dslwip/LiteralCollection.html">Literal Collection Expression</a>: Form language expressions using literal collection syntax</li>
<li>Dynamic Reception: Handle messages without defining them in the code</li>
<li>Annotation: Data about program elements, such as classes and methods, which can be processed during compilation or execution.</li>
<li>Macro: Define DSL expressions as macro definitions</li>
<li>Parse Tree Manipulation: Capture the parse tree of a code fragment to manipulate it with DSL processing code.</li>
</ul>
<p>Ok, so these are the basic categories as Martin has defined them. How do these map up to the tools and techniques we have in Groovy?</p>
<ul>
<li>Method/Property Missing &#8211; a special method that is called when a method can not be found allowing a developer to intercept the call
<ul>
<li>Maps to Dynamic Reception fairly well</li>
</ul>
</li>
<li>Categories &#8211; allows new methods to be added to any class at runtime
<ul>
<li>Could fit into Object Scoping or maybe a new one, Duck Typing? &#8211; not sure</li>
</ul>
</li>
<li>ExpandoMetaClass &#8211; a dynamically expandable bean
<ul>
<li>Again Dynamic Reception</li>
</ul>
</li>
<li>Closures/Nested Closures
<ul>
<li>Closures/Nested Closures</li>
</ul>
</li>
<li>Relaxed rules on the use of parentheses
<ul>
<li>Hmm, not sure where this would fit</li>
</ul>
</li>
<li>Built-in list and map syntax
<ul>
<li>I believe this is Literal Collection Expression</li>
</ul>
</li>
<li>Ability to dynamically add methods to an interface and have concrete classes also have the methods
<ul>
<li>Again, this sounds like Dynamic Reception</li>
</ul>
</li>
<li>Operator overloading
<ul>
<li>Hmm, again I’m not sure where this fits</li>
</ul>
</li>
<li>Annotations
<ul>
<li>Annotation</li>
</ul>
</li>
</ul>
<p>First up we have our builders (AntBuilder, XMLBuilder, Criteria Builder, etc.) these essentially mimic some other existing structure (an Ant build file, XML file, or SQL syntax). What patterns do these use? Just off the top of my head I think I see:</p>
<ul>
<li>Expression Builder</li>
<li>Nested Closures</li>
<li>Dynamic Reception</li>
<li>Literal Collection Expression</li>
</ul>
<p>JSON-lib’s Groovy interface has the following:</p>
<ul>
<li>Literal Collection Expression</li>
<li>Dynamic Reception</li>
<li>Operator Overloading (<code>as</code>)</li>
</ul>
<p>My Groovy Higher Order Messaging DSL has:</p>
<ul>
<li>Dynamic Reception</li>
<li>Nested Closures</li>
</ul>
<p>My Groovy Math DSL has:</p>
<ul>
<li>Dynamic Reception</li>
<li>Nested Closures (or possibly what would be considered Function Sequence in some cases, even though they aren’t functions but it might fit)</li>
<li>Operator Overloading</li>
</ul>
<p>GroovyLab has:</p>
<ul>
<li>Expression Builder</li>
<li>Probably has more just don’t have time to dig into the code &#8211; I’m just looking at the quick examples)</li>
<li>Operator Overloading</li>
</ul>
<p>Guillaume’s Unit Manipulation DSL has:</p>
<ul>
<li>Expression Builder</li>
<li>Dynamic Reception</li>
<li>Closure/Nested Closure</li>
<li>Operator Overloading</li>
</ul>
<p>Ken Barclay’s GParsec has:</p>
<ul>
<li>Dynamic Reception</li>
<li>Parse Tree Manipulation? (not sure if this qualifies for this or not)</li>
</ul>
<p>GroovyRestlet DSL has:</p>
<ul>
<li>Literal Collection Expression</li>
<li>Closure/Nested Closure</li>
<li>Function Sequence</li>
</ul>
<p>GSpec has:</p>
<ul>
<li>Closure/Nested Closure</li>
<li>Function Sequence</li>
<li>Dynamic Reception</li>
</ul>
<p>Grails’ Domain Class Validation DSL has:</p>
<ul>
<li>Literal Colleciton Expression</li>
<li>Closure</li>
<li>Macros?</li>
</ul>
<p>Tiago Antão’s Malaria Drug DSL has:</p>
<ul>
<li>Object Scoping</li>
<li>Dynamic Reception</li>
</ul>
<p>Human readable date modification has:</p>
<ul>
<li>Object Scoping</li>
<li>Operator Overloading</li>
</ul>
<p>Now, one of the big things that I think Fowler is missing here (and one that you can see several DSLs take advantage of) is Operator Overloading/Overriding. This, I think, is a key technique in DSLs and one that can make a DSL go from good to great. It’s all about letting the user think in the context they are in &#8211; be it math matrices, sql queries, file and string manipulation (overriding the <code>&lt;&lt;</code> or <code>&gt;&gt;</code> operators). It’s all about the user’s context and making it easy for them to “think” in their domain and not have to worry about the language implementation (I use it quite heavily in my Math DSL to implement matrix operators for example).</p>
<p>I know I didn’t hit on all the DSLs I mentioned, but will try and come up with a wiki or something that people can contribute back to. In the mean time sound off in the comments if you have a DSL that I didn’t mention, or you feel my categorization is wrong (and why). I’m also curious if there are examples of some of the ones I didn’t touch on such as Annotations. This is an initial stab at this and as I said earlier I’m not 100% on board with how Fowler has organized things but I think it’s a good start.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.warneronstine.com%2F2008%2F04%2F24%2Fgroovy-dsl-roundup%2F&amp;partner=sociable" title="Print"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.warneronstine.com%2F2008%2F04%2F24%2Fgroovy-dsl-roundup%2F&amp;title=Groovy%20DSL%20roundup&amp;bodytext=This%20is%20my%20first%20attempt%20at%20categorizing%20some%20of%20the%20DSLs%20I%E2%80%99ve%20run%20across%20into%20some%20kind%20of%20logical%20grouping.%20First%20I%E2%80%99ll%20list%20out%20some%20Groovy%20DSL%20examples%20%28sound%20off%20in%20the%20comments%20for%20those%20I%E2%80%99m%20not%20aware%20of%2C%20the%20more%20the%20better%29.%20I%E2%80%99ll%20go%20th" title="Digg"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fwww.warneronstine.com%2F2008%2F04%2F24%2Fgroovy-dsl-roundup%2F&amp;title=Groovy%20DSL%20roundup" title="Reddit"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.warneronstine.com%2F2008%2F04%2F24%2Fgroovy-dsl-roundup%2F&amp;title=Groovy%20DSL%20roundup&amp;notes=This%20is%20my%20first%20attempt%20at%20categorizing%20some%20of%20the%20DSLs%20I%E2%80%99ve%20run%20across%20into%20some%20kind%20of%20logical%20grouping.%20First%20I%E2%80%99ll%20list%20out%20some%20Groovy%20DSL%20examples%20%28sound%20off%20in%20the%20comments%20for%20those%20I%E2%80%99m%20not%20aware%20of%2C%20the%20more%20the%20better%29.%20I%E2%80%99ll%20go%20th" title="del.icio.us"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://twitter.com/home?status=Groovy%20DSL%20roundup%20-%20http%3A%2F%2Fwww.warneronstine.com%2F2008%2F04%2F24%2Fgroovy-dsl-roundup%2F" title="Twitter"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.warneronstine.com%2F2008%2F04%2F24%2Fgroovy-dsl-roundup%2F&amp;t=Groovy%20DSL%20roundup" title="Facebook"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.warneronstine.com%2F2008%2F04%2F24%2Fgroovy-dsl-roundup%2F&amp;title=Groovy%20DSL%20roundup&amp;annotation=This%20is%20my%20first%20attempt%20at%20categorizing%20some%20of%20the%20DSLs%20I%E2%80%99ve%20run%20across%20into%20some%20kind%20of%20logical%20grouping.%20First%20I%E2%80%99ll%20list%20out%20some%20Groovy%20DSL%20examples%20%28sound%20off%20in%20the%20comments%20for%20those%20I%E2%80%99m%20not%20aware%20of%2C%20the%20more%20the%20better%29.%20I%E2%80%99ll%20go%20th" title="Google Bookmarks"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.warneronstine.com%2F2008%2F04%2F24%2Fgroovy-dsl-roundup%2F&amp;title=Groovy%20DSL%20roundup" title="DZone"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.warneronstine.com/2008/04/24/groovy-dsl-roundup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thinking about picking the Groovy DSL book up again</title>
		<link>http://www.warneronstine.com/2008/03/26/thinking-about-picking-the-dsl-book-up-again/</link>
		<comments>http://www.warneronstine.com/2008/03/26/thinking-about-picking-the-dsl-book-up-again/#comments</comments>
		<pubDate>Wed, 26 Mar 2008 16:30:00 +0000</pubDate>
		<dc:creator>Warner Onstine</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[dsl]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[writings]]></category>

		<guid isPermaLink="false">urn:uuid:{a.guid}</guid>
		<description><![CDATA[But before I do I thought I’d ask everyone out there (who are interested in such a book), what would you like to see in it?
One possibility I’ve been tossing around is to turn it into a techniques or cookbook-style book. I’ve been reading through “Designing Interfaces” by Jennifer Tidwell. In this book she organizes [...]]]></description>
			<content:encoded><![CDATA[<p>But before I do I thought I’d ask everyone out there (who are interested in such a book), what would you like to see in it?</p>
<p>One possibility I’ve been tossing around is to turn it into a techniques or cookbook-style book. I’ve been reading through <a href="http://www.amazon.com/gp/product/0596008031?ie=UTF8&amp;tag=warneronstinecom&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0596008031">“Designing Interfaces”</a> by Jennifer Tidwell. In this book she organizes the interface solutions into different sections and goes through each one with an example and what it solves and when to use it. I really like this idea (but others might not). Originally my book was a “How do I get started designing DSLs?” and “What in the world are they and why should I care?”.</p>
<p>Another thing I’ve been thinking about is ditching the Java part and making it Groovy only. This appeals to me because I feel that Groovy is much cleaner to implement an Internal DSL than Java is. Can you do DSLs in Java? Of course you can, but I’m not sure that I can give it the best treatment because it isn’t what I’m passionate about.</p>
<p>So, sound off in the comments, let me know what topics you’d like to see covered, what challenges have you faced in writing a DSL (or API/Framework) that you would have liked someone to trailblaze for you to show the dead-ends first?</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.warneronstine.com%2F2008%2F03%2F26%2Fthinking-about-picking-the-dsl-book-up-again%2F&amp;partner=sociable" title="Print"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.warneronstine.com%2F2008%2F03%2F26%2Fthinking-about-picking-the-dsl-book-up-again%2F&amp;title=Thinking%20about%20picking%20the%20Groovy%20DSL%20book%20up%20again&amp;bodytext=But%20before%20I%20do%20I%20thought%20I%E2%80%99d%20ask%20everyone%20out%20there%20%28who%20are%20interested%20in%20such%20a%20book%29%2C%20what%20would%20you%20like%20to%20see%20in%20it%3F%0D%0A%0D%0AOne%20possibility%20I%E2%80%99ve%20been%20tossing%20around%20is%20to%20turn%20it%20into%20a%20techniques%20or%20cookbook-style%20book.%20I%E2%80%99ve%20been%20reading%20th" title="Digg"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fwww.warneronstine.com%2F2008%2F03%2F26%2Fthinking-about-picking-the-dsl-book-up-again%2F&amp;title=Thinking%20about%20picking%20the%20Groovy%20DSL%20book%20up%20again" title="Reddit"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.warneronstine.com%2F2008%2F03%2F26%2Fthinking-about-picking-the-dsl-book-up-again%2F&amp;title=Thinking%20about%20picking%20the%20Groovy%20DSL%20book%20up%20again&amp;notes=But%20before%20I%20do%20I%20thought%20I%E2%80%99d%20ask%20everyone%20out%20there%20%28who%20are%20interested%20in%20such%20a%20book%29%2C%20what%20would%20you%20like%20to%20see%20in%20it%3F%0D%0A%0D%0AOne%20possibility%20I%E2%80%99ve%20been%20tossing%20around%20is%20to%20turn%20it%20into%20a%20techniques%20or%20cookbook-style%20book.%20I%E2%80%99ve%20been%20reading%20th" title="del.icio.us"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://twitter.com/home?status=Thinking%20about%20picking%20the%20Groovy%20DSL%20book%20up%20again%20-%20http%3A%2F%2Fwww.warneronstine.com%2F2008%2F03%2F26%2Fthinking-about-picking-the-dsl-book-up-again%2F" title="Twitter"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.warneronstine.com%2F2008%2F03%2F26%2Fthinking-about-picking-the-dsl-book-up-again%2F&amp;t=Thinking%20about%20picking%20the%20Groovy%20DSL%20book%20up%20again" title="Facebook"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.warneronstine.com%2F2008%2F03%2F26%2Fthinking-about-picking-the-dsl-book-up-again%2F&amp;title=Thinking%20about%20picking%20the%20Groovy%20DSL%20book%20up%20again&amp;annotation=But%20before%20I%20do%20I%20thought%20I%E2%80%99d%20ask%20everyone%20out%20there%20%28who%20are%20interested%20in%20such%20a%20book%29%2C%20what%20would%20you%20like%20to%20see%20in%20it%3F%0D%0A%0D%0AOne%20possibility%20I%E2%80%99ve%20been%20tossing%20around%20is%20to%20turn%20it%20into%20a%20techniques%20or%20cookbook-style%20book.%20I%E2%80%99ve%20been%20reading%20th" title="Google Bookmarks"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.warneronstine.com%2F2008%2F03%2F26%2Fthinking-about-picking-the-dsl-book-up-again%2F&amp;title=Thinking%20about%20picking%20the%20Groovy%20DSL%20book%20up%20again" title="DZone"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.warneronstine.com/2008/03/26/thinking-about-picking-the-dsl-book-up-again/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Groovy Roadmap</title>
		<link>http://www.warneronstine.com/2007/12/20/groovy-roadmap/</link>
		<comments>http://www.warneronstine.com/2007/12/20/groovy-roadmap/#comments</comments>
		<pubDate>Thu, 20 Dec 2007 22:36:36 +0000</pubDate>
		<dc:creator>Warner Onstine</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[news]]></category>

		<guid isPermaLink="false">urn:uuid:{a.guid}</guid>
		<description><![CDATA[So Guillaume posted the current road map to the list a couple of days ago and I put in my .02 for fixing the (in my eyes) broken operator overloading. And the bug I really wanted is now marked to be fixed in 1.6!
I honestly can’t say how happy I am at this and will [...]]]></description>
			<content:encoded><![CDATA[<p>So Guillaume posted the <a href="http://www.nabble.com/Tentative-Roadmap-to14368039.html#a14368039">current road map</a> to the list a couple of days ago and I <a href="http://www.nabble.com/Tentative-Roadmap-to14368039.html#a14383653">put in my .02</a> for fixing the (in my eyes) broken operator overloading. And the bug I really wanted is now marked to be fixed in 1.6!</p>
<p>I honestly can’t say how happy I am at this and will definitely test this functionality out with my <a href="http://warneronstine.com/groovymath">Math DSL</a> that I am working on.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F12%2F20%2Fgroovy-roadmap%2F&amp;partner=sociable" title="Print"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F12%2F20%2Fgroovy-roadmap%2F&amp;title=Groovy%20Roadmap&amp;bodytext=So%20Guillaume%20posted%20the%20current%20road%20map%20to%20the%20list%20a%20couple%20of%20days%20ago%20and%20I%20put%20in%20my%20.02%20for%20fixing%20the%20%28in%20my%20eyes%29%20broken%20operator%20overloading.%20And%20the%20bug%20I%20really%20wanted%20is%20now%20marked%20to%20be%20fixed%20in%201.6%21%0D%0A%0D%0AI%20honestly%20can%E2%80%99t%20say%20how%20happy%20I" title="Digg"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F12%2F20%2Fgroovy-roadmap%2F&amp;title=Groovy%20Roadmap" title="Reddit"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F12%2F20%2Fgroovy-roadmap%2F&amp;title=Groovy%20Roadmap&amp;notes=So%20Guillaume%20posted%20the%20current%20road%20map%20to%20the%20list%20a%20couple%20of%20days%20ago%20and%20I%20put%20in%20my%20.02%20for%20fixing%20the%20%28in%20my%20eyes%29%20broken%20operator%20overloading.%20And%20the%20bug%20I%20really%20wanted%20is%20now%20marked%20to%20be%20fixed%20in%201.6%21%0D%0A%0D%0AI%20honestly%20can%E2%80%99t%20say%20how%20happy%20I" title="del.icio.us"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://twitter.com/home?status=Groovy%20Roadmap%20-%20http%3A%2F%2Fwww.warneronstine.com%2F2007%2F12%2F20%2Fgroovy-roadmap%2F" title="Twitter"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F12%2F20%2Fgroovy-roadmap%2F&amp;t=Groovy%20Roadmap" title="Facebook"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F12%2F20%2Fgroovy-roadmap%2F&amp;title=Groovy%20Roadmap&amp;annotation=So%20Guillaume%20posted%20the%20current%20road%20map%20to%20the%20list%20a%20couple%20of%20days%20ago%20and%20I%20put%20in%20my%20.02%20for%20fixing%20the%20%28in%20my%20eyes%29%20broken%20operator%20overloading.%20And%20the%20bug%20I%20really%20wanted%20is%20now%20marked%20to%20be%20fixed%20in%201.6%21%0D%0A%0D%0AI%20honestly%20can%E2%80%99t%20say%20how%20happy%20I" title="Google Bookmarks"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F12%2F20%2Fgroovy-roadmap%2F&amp;title=Groovy%20Roadmap" title="DZone"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.warneronstine.com/2007/12/20/groovy-roadmap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Overriding the &#8216;as&#8217; operator</title>
		<link>http://www.warneronstine.com/2007/12/06/overriding-the-as-operator/</link>
		<comments>http://www.warneronstine.com/2007/12/06/overriding-the-as-operator/#comments</comments>
		<pubDate>Thu, 06 Dec 2007 15:40:25 +0000</pubDate>
		<dc:creator>Warner Onstine</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[dsl]]></category>
		<category><![CDATA[groovy]]></category>

		<guid isPermaLink="false">urn:uuid:{a.guid}</guid>
		<description><![CDATA[A friend of mine sent me a link to Charles Nutter’s blog on implementing interfaces using the as operator. While I was explaining how it worked to him I remembered that like many operators you can also override this one using asType(). This got us to thinking when would you use this functionality?
I have one [...]]]></description>
			<content:encoded><![CDATA[<p>A friend of mine sent me a link to Charles Nutter’s blog on <a href="http://headius.blogspot.com/2007/12/groovy-in-ruby-implement-interface-with.html">implementing interfaces using the <code>as</code> operator</a>. While I was explaining how it worked to him I remembered that like many operators you can also override this one using <code>asType()</code>. This got us to thinking when would you use this functionality?</p>
<p>I have one project I’m working on right now (not ready to talk yet about as I want more code in place before I unveil it, <img src='http://www.warneronstine.com/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> ) but this might be useful. Say that you wanted to duck-type your object for specific class instances. Overriding <code>as</code> may be one place to do it.</p>
<p>When would this make sense? Personally I think something like this makes the most sense in a library that provides some kind of functionality to a bunch of classes (rather than a one-off case). But I’m curious to see how others have used this functionality, would help to shed some light on other uses I hadn’t thought of.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F12%2F06%2Foverriding-the-as-operator%2F&amp;partner=sociable" title="Print"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F12%2F06%2Foverriding-the-as-operator%2F&amp;title=Overriding%20the%20%27as%27%20operator&amp;bodytext=A%20friend%20of%20mine%20sent%20me%20a%20link%20to%20Charles%20Nutter%E2%80%99s%20blog%20on%20implementing%20interfaces%20using%20the%20as%20operator.%20While%20I%20was%20explaining%20how%20it%20worked%20to%20him%20I%20remembered%20that%20like%20many%20operators%20you%20can%20also%20override%20this%20one%20using%20asType%28%29.%20This%20got%20us%20" title="Digg"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F12%2F06%2Foverriding-the-as-operator%2F&amp;title=Overriding%20the%20%27as%27%20operator" title="Reddit"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F12%2F06%2Foverriding-the-as-operator%2F&amp;title=Overriding%20the%20%27as%27%20operator&amp;notes=A%20friend%20of%20mine%20sent%20me%20a%20link%20to%20Charles%20Nutter%E2%80%99s%20blog%20on%20implementing%20interfaces%20using%20the%20as%20operator.%20While%20I%20was%20explaining%20how%20it%20worked%20to%20him%20I%20remembered%20that%20like%20many%20operators%20you%20can%20also%20override%20this%20one%20using%20asType%28%29.%20This%20got%20us%20" title="del.icio.us"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://twitter.com/home?status=Overriding%20the%20%27as%27%20operator%20-%20http%3A%2F%2Fwww.warneronstine.com%2F2007%2F12%2F06%2Foverriding-the-as-operator%2F" title="Twitter"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F12%2F06%2Foverriding-the-as-operator%2F&amp;t=Overriding%20the%20%27as%27%20operator" title="Facebook"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F12%2F06%2Foverriding-the-as-operator%2F&amp;title=Overriding%20the%20%27as%27%20operator&amp;annotation=A%20friend%20of%20mine%20sent%20me%20a%20link%20to%20Charles%20Nutter%E2%80%99s%20blog%20on%20implementing%20interfaces%20using%20the%20as%20operator.%20While%20I%20was%20explaining%20how%20it%20worked%20to%20him%20I%20remembered%20that%20like%20many%20operators%20you%20can%20also%20override%20this%20one%20using%20asType%28%29.%20This%20got%20us%20" title="Google Bookmarks"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F12%2F06%2Foverriding-the-as-operator%2F&amp;title=Overriding%20the%20%27as%27%20operator" title="DZone"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.warneronstine.com/2007/12/06/overriding-the-as-operator/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Math DSL Part Deux &#8211; Elementary Row Operations (EROs)</title>
		<link>http://www.warneronstine.com/2007/11/26/math-dsl-part-deux-elementary-row-operations-eros/</link>
		<comments>http://www.warneronstine.com/2007/11/26/math-dsl-part-deux-elementary-row-operations-eros/#comments</comments>
		<pubDate>Mon, 26 Nov 2007 17:59:24 +0000</pubDate>
		<dc:creator>Warner Onstine</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[dsl]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[linear_algebra]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[matrix]]></category>

		<guid isPermaLink="false">urn:uuid:{a.guid}</guid>
		<description><![CDATA[After sending out my query to the groovy user list I got back some ideas (no offense to Yann, just something I need to tackle on my own, so I didn’t look at your solution). What I ended up doing was two-fold:

Create a new MetaClass using ExpandoMetaClass
Define a new class that understood what row and [...]]]></description>
			<content:encoded><![CDATA[<p>After sending out my query to the groovy user list I got back some ideas (no offense to Yann, just something I need to tackle on my own, so I didn’t look at your solution). What I ended up doing was two-fold:</p>
<ul>
<li>Create a new MetaClass using ExpandoMetaClass</li>
<li>Define a new class that understood what row and matrix it was going to operate on (so it can have its own operator overloading)</li>
</ul>
<p>Yes it was a little bit of extra work, but worth it. I also implemented my <code>or</code> operator overloading so that I can specify augmented matrices in three formats:</p>
<ul>
<li><code>A|I</code> for the identity matrix (only works on square matrices)</li>
<li><code>A|0</code> for the zero column, used for solving the set of linear equations</li>
<li><code>A|b</code> for a vector column, also used for solving the set of linear equations</li>
</ul>
<p>As always it helps to learn from others’ mistakes (and oddities) so I’ll share mine along the road:</p>
<ul>
<li>When dealing with EMC (ExpandoMetaClass) watch out for the use of the <code>this</code> keyword</li>
<li>Closure delegates don’t always act the way you would hope when extending <code>GroovyObjectSupport</code> (at least I couldn’t get it to work right which is one reason why I switched to EMC)</li>
<li>Overriding the <code>or</code> operator works fine until you get to an object that has overridden the <code>equals</code> operator. In this case Groovy kept trying to find out if my <code>Matrix</code> was equal to my <code>MatrixColumn</code>. Once I figured this out I just returned false if the <code>MatrixColumn</code> was being compared against a <code>Matrix</code> then it worked as expected.</li>
</ul>
<p>The next part I want to add is the ability to track the EROs through Elementary Matrices. These are matrices that start out as 1s along the diagonal and they get the same EROs applied to them (this will be useful further down the line for other operations).</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F11%2F26%2Fmath-dsl-part-deux-elementary-row-operations-eros%2F&amp;partner=sociable" title="Print"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F11%2F26%2Fmath-dsl-part-deux-elementary-row-operations-eros%2F&amp;title=Math%20DSL%20Part%20Deux%20-%20Elementary%20Row%20Operations%20%28EROs%29&amp;bodytext=After%20sending%20out%20my%20query%20to%20the%20groovy%20user%20list%20I%20got%20back%20some%20ideas%20%28no%20offense%20to%20Yann%2C%20just%20something%20I%20need%20to%20tackle%20on%20my%20own%2C%20so%20I%20didn%E2%80%99t%20look%20at%20your%20solution%29.%20What%20I%20ended%20up%20doing%20was%20two-fold%3A%0D%0A%0D%0A%09Create%20a%20new%20MetaClass%20using%20Expand" title="Digg"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F11%2F26%2Fmath-dsl-part-deux-elementary-row-operations-eros%2F&amp;title=Math%20DSL%20Part%20Deux%20-%20Elementary%20Row%20Operations%20%28EROs%29" title="Reddit"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F11%2F26%2Fmath-dsl-part-deux-elementary-row-operations-eros%2F&amp;title=Math%20DSL%20Part%20Deux%20-%20Elementary%20Row%20Operations%20%28EROs%29&amp;notes=After%20sending%20out%20my%20query%20to%20the%20groovy%20user%20list%20I%20got%20back%20some%20ideas%20%28no%20offense%20to%20Yann%2C%20just%20something%20I%20need%20to%20tackle%20on%20my%20own%2C%20so%20I%20didn%E2%80%99t%20look%20at%20your%20solution%29.%20What%20I%20ended%20up%20doing%20was%20two-fold%3A%0D%0A%0D%0A%09Create%20a%20new%20MetaClass%20using%20Expand" title="del.icio.us"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://twitter.com/home?status=Math%20DSL%20Part%20Deux%20-%20Elementary%20Row%20Operations%20%28EROs%29%20-%20http%3A%2F%2Fwww.warneronstine.com%2F2007%2F11%2F26%2Fmath-dsl-part-deux-elementary-row-operations-eros%2F" title="Twitter"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F11%2F26%2Fmath-dsl-part-deux-elementary-row-operations-eros%2F&amp;t=Math%20DSL%20Part%20Deux%20-%20Elementary%20Row%20Operations%20%28EROs%29" title="Facebook"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F11%2F26%2Fmath-dsl-part-deux-elementary-row-operations-eros%2F&amp;title=Math%20DSL%20Part%20Deux%20-%20Elementary%20Row%20Operations%20%28EROs%29&amp;annotation=After%20sending%20out%20my%20query%20to%20the%20groovy%20user%20list%20I%20got%20back%20some%20ideas%20%28no%20offense%20to%20Yann%2C%20just%20something%20I%20need%20to%20tackle%20on%20my%20own%2C%20so%20I%20didn%E2%80%99t%20look%20at%20your%20solution%29.%20What%20I%20ended%20up%20doing%20was%20two-fold%3A%0D%0A%0D%0A%09Create%20a%20new%20MetaClass%20using%20Expand" title="Google Bookmarks"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F11%2F26%2Fmath-dsl-part-deux-elementary-row-operations-eros%2F&amp;title=Math%20DSL%20Part%20Deux%20-%20Elementary%20Row%20Operations%20%28EROs%29" title="DZone"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.warneronstine.com/2007/11/26/math-dsl-part-deux-elementary-row-operations-eros/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Math DSL beginning</title>
		<link>http://www.warneronstine.com/2007/11/23/math-dsl-beginning/</link>
		<comments>http://www.warneronstine.com/2007/11/23/math-dsl-beginning/#comments</comments>
		<pubDate>Sat, 24 Nov 2007 00:11:12 +0000</pubDate>
		<dc:creator>Warner Onstine</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[dsl]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[linear_algebra]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[matrix]]></category>

		<guid isPermaLink="false">urn:uuid:{a.guid}</guid>
		<description><![CDATA[I decided to start working on this taking one of the examples I worked out for the book for math Sets (partially incomplete due to Groovy’s inability to directly override lessThan, lessThanEquals, greaterThan, greaterThanEquals) and to put into code some of the techniques I was learning in my Linear Algebra class.
So far I’ve implemented the [...]]]></description>
			<content:encoded><![CDATA[<p>I decided to start working on this taking one of the examples I worked out for the book for math Sets (partially incomplete due to Groovy’s inability to directly override <code>lessThan</code>, <code>lessThanEquals</code>, <code>greaterThan</code>, <code>greaterThanEquals</code>) and to put into code some of the techniques I was learning in my Linear Algebra class.</p>
<p>So far I’ve implemented the following into my matrix math DSL:</p>
<ul>
<li>Matrix/Row equality &#8211; allows you to test if two matrices or rows are equal (i.e. &#8211; contain the same ordered set of numbers)</li>
<li>Matrix addition/subtraction &#8211; You can add two matrices together if they are the same dimensions (2&#215;2, 2&#215;3, whatever, as long as the match in row and columns)</li>
<li>Matrix/Row scalar multiplication &#8211; You can multiply a scalar value against a row or matrix</li>
<li>Matrix multiplication &#8211; You can multiply two matrices together if the first matrix A’s (say 2&#215;3) columns match B’s  rows of the matrix you are multiplying against (say 3&#215;2) which will produce a 2&#215;2 matrix. If you did BxA then you would end up with a new matrix of 3&#215;3</li>
<li>Matrix powers &#8211; If the matrix is square (say 3&#215;3) you can multiply it by itself to get the power of the matrix</li>
<li>Left-shift operation &#8211; be able to dynamically create a Row or Matrix by adding new elements to the end</li>
</ul>
<p>I still have a lot of work which is laid out on my Trac site for <a href="http://warneronstine.com/groovymath/roadmap">GroovyMath</a> which leads me to my next conundrum.</p>
<p>When dealing with matrices you need to do a lot of Reduced Echelon Form (REF) or Row Reduced Echelon Form (RREF) this consists of taking one of two Elementary Row Operations (EROs) and applying it to a row to get a matrix in the form of a diagonal (all 1s down the upper-left to lower-right diagonal with 0s everywhere else) or getting it into an upper-diagonal form (0s below the diagonal and integers everywhere else). The two EROs that you can consist of a) row interchange, where you can exchange one row with another; and b) row addition, where you can add one row to another multiplying that row by a scalar. What I would like to be able to do is something like this:</p>
<pre><code>def A = new Matrix(//rows go in here)
A.r1 + A.r2*2 //which will add 2 times the second row and add it to the first and replace it
A.r1 % A.r2 //which will exchange rows 1 and 2 with each other
</code></pre>
<p>Another thought I had was to do this in some kind of “rowOperations” closure:</p>
<pre><code>def A = new Matrix(//rows go in here)
A.rowOperations {
    r1 + r2*2
    r1 % r2
}
</code></pre>
<p>Which definitely reads better than the first (and of course that’s all part of a DSL how well does it translate the native tongue into code). But the issue that I have with either of these approaches (maybe, still ironing out the second in my head) is that the properties r1 and r2 don’t exist. These property accessors will need to be intercepted. Ok, not a big deal. But if I choose to implement this in MatrixRow (i.e. &#8211; actually return the row itself) it doesn’t allow me to modify the originating matrix (A in this case) only change the row. For the addition problem I think I can get around it as it is executing in a closure, but the row interchange is an issue. The individual rows don’t know they’re a part of a matrix and I’m not sure that knowing it allows them to do anything.</p>
<p>Anyways, just wrestling with this concept right now as it is key to moving on to the more advanced functionality in my matrix math. Any suggestions are more than welcome. One new feature that I really like will be overriding the <code>or</code> operator to provide Augmented Matrices (another key part). Normally you define an augmented matrix in one of three ways:</p>
<ul>
<li><code>A|0</code> &#8211; add a column of all zeros</li>
<li><code>A|b</code> &#8211; add a vector as the augmented matrix</li>
<li><code>A|I</code> &#8211; add an Identity matrix</li>
</ul>
<p>The first two are used to solve the set of linear equations and a bunch of other things. The second is used to find the inverse of the matrix as you transform through EROs the matrix <code>A</code> so that it equals <code>I</code> (the identity matrix) and then the side that “I” was on now equals the inverse of <code>A</code>. I would say stop me if I’m boring you but it’s probably too late for that. I just wanted to point out how cool it was I can override the <code>or</code> operator to do something completely different that makes perfect sense in my given domain.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F11%2F23%2Fmath-dsl-beginning%2F&amp;partner=sociable" title="Print"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F11%2F23%2Fmath-dsl-beginning%2F&amp;title=Math%20DSL%20beginning&amp;bodytext=I%20decided%20to%20start%20working%20on%20this%20taking%20one%20of%20the%20examples%20I%20worked%20out%20for%20the%20book%20for%20math%20Sets%20%28partially%20incomplete%20due%20to%20Groovy%E2%80%99s%20inability%20to%20directly%20override%20lessThan%2C%20lessThanEquals%2C%20greaterThan%2C%20greaterThanEquals%29%20and%20to%20put%20into%20cod" title="Digg"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F11%2F23%2Fmath-dsl-beginning%2F&amp;title=Math%20DSL%20beginning" title="Reddit"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F11%2F23%2Fmath-dsl-beginning%2F&amp;title=Math%20DSL%20beginning&amp;notes=I%20decided%20to%20start%20working%20on%20this%20taking%20one%20of%20the%20examples%20I%20worked%20out%20for%20the%20book%20for%20math%20Sets%20%28partially%20incomplete%20due%20to%20Groovy%E2%80%99s%20inability%20to%20directly%20override%20lessThan%2C%20lessThanEquals%2C%20greaterThan%2C%20greaterThanEquals%29%20and%20to%20put%20into%20cod" title="del.icio.us"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://twitter.com/home?status=Math%20DSL%20beginning%20-%20http%3A%2F%2Fwww.warneronstine.com%2F2007%2F11%2F23%2Fmath-dsl-beginning%2F" title="Twitter"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F11%2F23%2Fmath-dsl-beginning%2F&amp;t=Math%20DSL%20beginning" title="Facebook"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F11%2F23%2Fmath-dsl-beginning%2F&amp;title=Math%20DSL%20beginning&amp;annotation=I%20decided%20to%20start%20working%20on%20this%20taking%20one%20of%20the%20examples%20I%20worked%20out%20for%20the%20book%20for%20math%20Sets%20%28partially%20incomplete%20due%20to%20Groovy%E2%80%99s%20inability%20to%20directly%20override%20lessThan%2C%20lessThanEquals%2C%20greaterThan%2C%20greaterThanEquals%29%20and%20to%20put%20into%20cod" title="Google Bookmarks"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F11%2F23%2Fmath-dsl-beginning%2F&amp;title=Math%20DSL%20beginning" title="DZone"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.warneronstine.com/2007/11/23/math-dsl-beginning/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>DSL book on hold&#8230;unfortunately</title>
		<link>http://www.warneronstine.com/2007/10/30/dsl-book-on-hold-unfortunately/</link>
		<comments>http://www.warneronstine.com/2007/10/30/dsl-book-on-hold-unfortunately/#comments</comments>
		<pubDate>Tue, 30 Oct 2007 16:20:44 +0000</pubDate>
		<dc:creator>Warner Onstine</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[dsl]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[writings]]></category>

		<guid isPermaLink="false">urn:uuid:{a.guid}</guid>
		<description><![CDATA[Well we got the first round of reviews back from the technical reviewers and there’s a lot of work to be done. So much so that we’ve decided to put the book on hold while we regroup and figure out if/how we are going to address the issues that the reviewers found with the book. [...]]]></description>
			<content:encoded><![CDATA[<p>Well we got the first round of reviews back from the technical reviewers and there’s a lot of work to be done. So much so that we’ve decided to put the book on hold while we regroup and figure out if/how we are going to address the issues that the reviewers found with the book. In a lot of cases it is going to require a complete rewrite of the example (and hence the chapter itself). Personally I feel the core is there, but maybe the examples weren’t as fleshed out as they could have been.</p>
<p>Now of course I’m a little embarrassed that I announced the book before it was done, but that’s what happens sometimes. Not sure at this point whether or not the book will continue, taking some time to regroup/rethink things and see if it is something that I want to push forward with.</p>
<p>I will keep everyone up to date here on the progress of things once I’ve decided what to do. In the meantime I am going to get back to some of my back-burner projects (a few of which have some DSLs in them <img src='http://www.warneronstine.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F10%2F30%2Fdsl-book-on-hold-unfortunately%2F&amp;partner=sociable" title="Print"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F10%2F30%2Fdsl-book-on-hold-unfortunately%2F&amp;title=DSL%20book%20on%20hold...unfortunately&amp;bodytext=Well%20we%20got%20the%20first%20round%20of%20reviews%20back%20from%20the%20technical%20reviewers%20and%20there%E2%80%99s%20a%20lot%20of%20work%20to%20be%20done.%20So%20much%20so%20that%20we%E2%80%99ve%20decided%20to%20put%20the%20book%20on%20hold%20while%20we%20regroup%20and%20figure%20out%20if%2Fhow%20we%20are%20going%20to%20address%20the%20issues%20that%20th" title="Digg"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F10%2F30%2Fdsl-book-on-hold-unfortunately%2F&amp;title=DSL%20book%20on%20hold...unfortunately" title="Reddit"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F10%2F30%2Fdsl-book-on-hold-unfortunately%2F&amp;title=DSL%20book%20on%20hold...unfortunately&amp;notes=Well%20we%20got%20the%20first%20round%20of%20reviews%20back%20from%20the%20technical%20reviewers%20and%20there%E2%80%99s%20a%20lot%20of%20work%20to%20be%20done.%20So%20much%20so%20that%20we%E2%80%99ve%20decided%20to%20put%20the%20book%20on%20hold%20while%20we%20regroup%20and%20figure%20out%20if%2Fhow%20we%20are%20going%20to%20address%20the%20issues%20that%20th" title="del.icio.us"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://twitter.com/home?status=DSL%20book%20on%20hold...unfortunately%20-%20http%3A%2F%2Fwww.warneronstine.com%2F2007%2F10%2F30%2Fdsl-book-on-hold-unfortunately%2F" title="Twitter"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F10%2F30%2Fdsl-book-on-hold-unfortunately%2F&amp;t=DSL%20book%20on%20hold...unfortunately" title="Facebook"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F10%2F30%2Fdsl-book-on-hold-unfortunately%2F&amp;title=DSL%20book%20on%20hold...unfortunately&amp;annotation=Well%20we%20got%20the%20first%20round%20of%20reviews%20back%20from%20the%20technical%20reviewers%20and%20there%E2%80%99s%20a%20lot%20of%20work%20to%20be%20done.%20So%20much%20so%20that%20we%E2%80%99ve%20decided%20to%20put%20the%20book%20on%20hold%20while%20we%20regroup%20and%20figure%20out%20if%2Fhow%20we%20are%20going%20to%20address%20the%20issues%20that%20th" title="Google Bookmarks"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F10%2F30%2Fdsl-book-on-hold-unfortunately%2F&amp;title=DSL%20book%20on%20hold...unfortunately" title="DZone"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.warneronstine.com/2007/10/30/dsl-book-on-hold-unfortunately/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DSL book in progress</title>
		<link>http://www.warneronstine.com/2007/10/10/dsl-book-in-progress/</link>
		<comments>http://www.warneronstine.com/2007/10/10/dsl-book-in-progress/#comments</comments>
		<pubDate>Wed, 10 Oct 2007 15:44:00 +0000</pubDate>
		<dc:creator>Warner Onstine</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[dsl]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[writings]]></category>

		<guid isPermaLink="false">urn:uuid:{a.guid}</guid>
		<description><![CDATA[Now that things feel a little bit more final to me I thought I would take this opportunity to announce the book that’s been keeping me from blogging. The tentative title is Creating DSLs using Java and Groovy and it will be published by Pragmatic Programmers. I started working on this idea after last years [...]]]></description>
			<content:encoded><![CDATA[<p>Now that things feel a little bit more final to me I thought I would take this opportunity to announce the book that’s been keeping me from blogging. The tentative title is Creating DSLs using Java and Groovy and it will be published by <a href="http://www.pragprog.com/">Pragmatic Programmers</a>. I started working on this idea after last years <a href="http://nofluffjuststuff.com">No Fluff Just Stuff</a> where I saw <a href="http://www.nealford.com/">Neal Ford</a> speak on DSLs and I talked to him briefly about a project I was working on. His talk inspired me to push forward with using DSLs for code generation specifically using Groovy.</p>
<p>The book will cover both Java and Groovy techniques for writing DSLs, as well as have some general guidelines for writing DSLs. We also have a chapter on <a href="http://antlr.org">ANTLR</a> and <a href="https://javacc.dev.java.net/">JavaCC</a> for writing external DSLs using Java. I tried to cover as much as I could of Groovy meta-programming and some of the additional capabilities of Groovy that make it a good language to write an internal DSL on top of, but there’s only so much space <img src='http://www.warneronstine.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
<p>We just sent off the book for peer review, which means its about half-way finished, maybe a little more. We are currently shooting for a release date sometime early next year, which looks very doable at this point, but I expect a ton of edits to come back from this first review.</p>
<p>On a final note I just want to say what a pleasure it has been working with the PragProg crew. I love, love, love their <a href="http://www.pragprog.com/write-for-us">book build system</a> and my editor Susannah rocks. I have had a blast working with them so far on this book and am looking forward to finishing this up and getting it published.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F10%2F10%2Fdsl-book-in-progress%2F&amp;partner=sociable" title="Print"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F10%2F10%2Fdsl-book-in-progress%2F&amp;title=DSL%20book%20in%20progress&amp;bodytext=Now%20that%20things%20feel%20a%20little%20bit%20more%20final%20to%20me%20I%20thought%20I%20would%20take%20this%20opportunity%20to%20announce%20the%20book%20that%E2%80%99s%20been%20keeping%20me%20from%20blogging.%20The%20tentative%20title%20is%20Creating%20DSLs%20using%20Java%20and%20Groovy%20and%20it%20will%20be%20published%20by%20Pragmatic%20P" title="Digg"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F10%2F10%2Fdsl-book-in-progress%2F&amp;title=DSL%20book%20in%20progress" title="Reddit"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F10%2F10%2Fdsl-book-in-progress%2F&amp;title=DSL%20book%20in%20progress&amp;notes=Now%20that%20things%20feel%20a%20little%20bit%20more%20final%20to%20me%20I%20thought%20I%20would%20take%20this%20opportunity%20to%20announce%20the%20book%20that%E2%80%99s%20been%20keeping%20me%20from%20blogging.%20The%20tentative%20title%20is%20Creating%20DSLs%20using%20Java%20and%20Groovy%20and%20it%20will%20be%20published%20by%20Pragmatic%20P" title="del.icio.us"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://twitter.com/home?status=DSL%20book%20in%20progress%20-%20http%3A%2F%2Fwww.warneronstine.com%2F2007%2F10%2F10%2Fdsl-book-in-progress%2F" title="Twitter"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F10%2F10%2Fdsl-book-in-progress%2F&amp;t=DSL%20book%20in%20progress" title="Facebook"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F10%2F10%2Fdsl-book-in-progress%2F&amp;title=DSL%20book%20in%20progress&amp;annotation=Now%20that%20things%20feel%20a%20little%20bit%20more%20final%20to%20me%20I%20thought%20I%20would%20take%20this%20opportunity%20to%20announce%20the%20book%20that%E2%80%99s%20been%20keeping%20me%20from%20blogging.%20The%20tentative%20title%20is%20Creating%20DSLs%20using%20Java%20and%20Groovy%20and%20it%20will%20be%20published%20by%20Pragmatic%20P" title="Google Bookmarks"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.warneronstine.com%2F2007%2F10%2F10%2Fdsl-book-in-progress%2F&amp;title=DSL%20book%20in%20progress" title="DZone"><img src="http://www.warneronstine.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.warneronstine.com/2007/10/10/dsl-book-in-progress/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
