<?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>Perfect Storm &#187; programming</title>
	<atom:link href="http://tiago.org/ps/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://tiago.org/ps</link>
	<description>Computational Biology, Epidemiology, Infectious diseases, Open Science</description>
	<lastBuildDate>Mon, 26 Jul 2010 09:31:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>DSL tactics in Groovy (1/many)</title>
		<link>http://tiago.org/ps/2008/02/25/dsl-tactics-in-groovy-1many/</link>
		<comments>http://tiago.org/ps/2008/02/25/dsl-tactics-in-groovy-1many/#comments</comments>
		<pubDate>Mon, 25 Feb 2008 11:52:49 +0000</pubDate>
		<dc:creator>tiago</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[groovy]]></category>

		<guid isPermaLink="false">http://tiago.org/ps/2008/02/25/dsl-tactics-in-groovy-1many/</guid>
		<description><![CDATA[I am learning Groovy during the process of implementing a DSL to study malaria resistance. This is a first post, of hopefully many, where I layout some tactics on implementing DSLs in Groovy. Take my suggestions with a grain of salt, as I am nothing more than a newbie. I will address small issues with [...]]]></description>
			<content:encoded><![CDATA[<p>I am learning Groovy during the process of implementing a DSL to study malaria resistance. This is a first post, of hopefully many, where I layout some tactics on implementing  DSLs in Groovy. Take my suggestions with a grain of salt, as I am nothing more than a newbie. I will address small issues with each post. Expect a strong technical leaning discussing picky details&#8230;</p>
<p>Most of what you read is actually not my creation or ideas, but they come from the extremely helpful Groovy users mailing list, especially from Guillaume Laforge.</p>
<h1>Numbers, script name space and named parameters</h1>
<p>Our first objective is very simple: to model a drug compound (to treat malaria), say:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="groovy" style="font-family:monospace;">Ronald.<span style="color: #006600;">init</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
cq <span style="color: #66cc66;">=</span> compound<span style="color: #66cc66;">&#40;</span>name: <span style="color: #ff0000;">&quot;Chloroquine&quot;</span>, abbreviation: <span style="color: #ff0000;">&quot;cq&quot;</span>, halfLife: 83.<span style="color: #006600;">h</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #808080; font-style: italic;">//I am not sure about 83 hours at all</span></pre></td></tr></table></div>

<p>Lets start with the compound half life parameter (the time that takes to eliminate half of the drug concentration from the body). Notice the 83.h? Meaning 83 hours. How do we do this, considering that numbers are not time? A first implementation used Categories (an option you might want to explore), but my current one uses the ExpandoMetaClass:</p>

<div class="wp_syntax"><div class="code"><pre class="groovy" style="font-family:monospace;"><span style="color: #aaaadd; font-weight: bold;">Integer</span>.<span style="color: #006600;">metaClass</span>.<span style="color: #006600;">getH</span> <span style="color: #66cc66;">&lt;&lt;</span> <span style="color: #66cc66;">&#123;</span>
  <span style="color: #66cc66;">-&gt;</span>
    <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #aaaadd; font-weight: bold;">Time</span> <span style="color: #66cc66;">&#40;</span>delegate, <span style="color: #aaaadd; font-weight: bold;">Time</span>.<span style="color: #006600;">HOURS</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>There are several details worth noticing:</p>
<ol>
<li>First, we are adding a new method to the Integer class, i.e., the Integer class will be changed in behavior, a pretty nuclear change eh&#8230;
<li>We are adding a getter method, so, when you do 4.h Groovy will call the getter method getH, using the typical Java naming convention.
<li>Notice that we don&#8217;t return an Integer but a Time object (a vanilla object defined elsewhere). For me this caused a click in my mind: Calling an integer to get something else.
<li>Notice the delegate word, a way to access the object being manipulated.
<li>On the clumsy side, you will probably will have to do the same thing for the BigDecimal meta class if you want to support floats. Numbers off all kinds don&#8217;t have a common ancestor (they are actually Java classes), I suppose for performance reasons.
</ol>
<p>Now, lets go back to line 1 of the first code snippet, the initialization. One of the things init does is changing Integer and BigDecimal, but it is not the only thing it does: It also changes what is available on the script name space. There are actually a few ways of doing that, but the two others recommended but Guillaume required to have some boot up code in Java, and for now, in prototype phase, I am too lazy to do that. Just for information google for CompilerConfigurate#setScriptBaseClass() or check the Groovy Java-side Binding class. As for me, I just passed the script environment to the init function:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="groovy" style="font-family:monospace;">    <span style="color: #000000; font-weight: bold;">static</span> init<span style="color: #66cc66;">&#40;</span>env<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        env.<span style="color: #006600;">compound</span> <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#123;</span><span style="color: #aaaadd; font-weight: bold;">Map</span> args <span style="color: #66cc66;">-&gt;</span>
            Compound c <span style="color: #66cc66;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Compound<span style="color: #66cc66;">&#40;</span>args<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'name'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>
            c.<span style="color: #006600;">abbreviation</span> <span style="color: #66cc66;">=</span> args<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'abbreviation'</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">?</span>: <span style="color: #000000; font-weight: bold;">null</span>
            c.<span style="color: #006600;">halfLife</span> <span style="color: #66cc66;">=</span> args<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'halfLife'</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">?</span>: <span style="color: #000000; font-weight: bold;">null</span>
            <span style="color: #000000; font-weight: bold;">return</span> c
        <span style="color: #66cc66;">&#125;</span>
        <span style="color: #808080; font-style: italic;">//...</span>
    <span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>So, we just added a closure with name compound (a function, eh) to the script name space. The closure simply creates a new Compound. Nice syntatic sugar&#8230;</p>
<p>By the way, do you notice on line 2 that Map thingy? Lets talk a bit about named and optional parameters (and how, in my view, they suck in Groovy). Lets get a more explicit example:</p>

<div class="wp_syntax"><div class="code"><pre class="groovy" style="font-family:monospace;">writeFile <span style="color: #66cc66;">&#40;</span>file: <span style="color: #ff0000;">'out.txt'</span>, mode: <span style="color: #ff0000;">'append'</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>Now, the way writeFile is supposed to be written is quite strange</p>

<div class="wp_syntax"><div class="code"><pre class="groovy" style="font-family:monospace;"><span style="color: #993333;">void</span> writeFile <span style="color: #66cc66;">&#40;</span><span style="color: #aaaadd; font-weight: bold;">Map</span> args<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    file <span style="color: #66cc66;">=</span> args<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'map'</span><span style="color: #66cc66;">&#93;</span>
    <span style="color: #808080; font-style: italic;">//...</span></pre></div></div>

<p>Am I doing some kind of newbie mistake here? This is a strange way of attaining the result. Typing information is completely lost from the function signature (that is bad for smart IDEs, automated code tools and introspection). What is wrong with the ye old way of Python (where you list all parameters in the signature, assigning default values to optional parameters)?</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Ftiago.org%2Fps%2F2008%2F02%2F25%2Fdsl-tactics-in-groovy-1many%2F&amp;title=DSL%20tactics%20in%20Groovy%20%281%2Fmany%29&amp;bodytext=I%20am%20learning%20Groovy%20during%20the%20process%20of%20implementing%20a%20DSL%20to%20study%20malaria%20resistance.%20This%20is%20a%20first%20post%2C%20of%20hopefully%20many%2C%20where%20I%20layout%20some%20tactics%20on%20implementing%20%20DSLs%20in%20Groovy.%20Take%20my%20suggestions%20with%20a%20grain%20of%20salt%2C%20as%20I%20am%20nothing" title="Digg"><img src="http://tiago.org/ps/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Ftiago.org%2Fps%2F2008%2F02%2F25%2Fdsl-tactics-in-groovy-1many%2F&amp;title=DSL%20tactics%20in%20Groovy%20%281%2Fmany%29&amp;notes=I%20am%20learning%20Groovy%20during%20the%20process%20of%20implementing%20a%20DSL%20to%20study%20malaria%20resistance.%20This%20is%20a%20first%20post%2C%20of%20hopefully%20many%2C%20where%20I%20layout%20some%20tactics%20on%20implementing%20%20DSLs%20in%20Groovy.%20Take%20my%20suggestions%20with%20a%20grain%20of%20salt%2C%20as%20I%20am%20nothing" title="del.icio.us"><img src="http://tiago.org/ps/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://www.facebook.com/share.php?u=http%3A%2F%2Ftiago.org%2Fps%2F2008%2F02%2F25%2Fdsl-tactics-in-groovy-1many%2F&amp;t=DSL%20tactics%20in%20Groovy%20%281%2Fmany%29" title="Facebook"><img src="http://tiago.org/ps/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%2Ftiago.org%2Fps%2F2008%2F02%2F25%2Fdsl-tactics-in-groovy-1many%2F&amp;title=DSL%20tactics%20in%20Groovy%20%281%2Fmany%29&amp;annotation=I%20am%20learning%20Groovy%20during%20the%20process%20of%20implementing%20a%20DSL%20to%20study%20malaria%20resistance.%20This%20is%20a%20first%20post%2C%20of%20hopefully%20many%2C%20where%20I%20layout%20some%20tactics%20on%20implementing%20%20DSLs%20in%20Groovy.%20Take%20my%20suggestions%20with%20a%20grain%20of%20salt%2C%20as%20I%20am%20nothing" title="Google Bookmarks"><img src="http://tiago.org/ps/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.connotea.org/addpopup?continue=confirm&amp;uri=http%3A%2F%2Ftiago.org%2Fps%2F2008%2F02%2F25%2Fdsl-tactics-in-groovy-1many%2F&amp;title=DSL%20tactics%20in%20Groovy%20%281%2Fmany%29&amp;description=I%20am%20learning%20Groovy%20during%20the%20process%20of%20implementing%20a%20DSL%20to%20study%20malaria%20resistance.%20This%20is%20a%20first%20post%2C%20of%20hopefully%20many%2C%20where%20I%20layout%20some%20tactics%20on%20implementing%20%20DSLs%20in%20Groovy.%20Take%20my%20suggestions%20with%20a%20grain%20of%20salt%2C%20as%20I%20am%20nothing" title="connotea"><img src="http://tiago.org/ps/wp-content/plugins/sociable/images/connotea.png" title="connotea" alt="connotea" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Ftiago.org%2Fps%2F2008%2F02%2F25%2Fdsl-tactics-in-groovy-1many%2F&amp;title=DSL%20tactics%20in%20Groovy%20%281%2Fmany%29" title="DZone"><img src="http://tiago.org/ps/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Ftiago.org%2Fps%2F2008%2F02%2F25%2Fdsl-tactics-in-groovy-1many%2F&amp;title=DSL%20tactics%20in%20Groovy%20%281%2Fmany%29" title="Reddit"><img src="http://tiago.org/ps/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://slashdot.org/bookmark.pl?title=DSL%20tactics%20in%20Groovy%20%281%2Fmany%29&amp;url=http%3A%2F%2Ftiago.org%2Fps%2F2008%2F02%2F25%2Fdsl-tactics-in-groovy-1many%2F" title="Slashdot"><img src="http://tiago.org/ps/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftiago.org%2Fps%2F2008%2F02%2F25%2Fdsl-tactics-in-groovy-1many%2F&amp;title=DSL%20tactics%20in%20Groovy%20%281%2Fmany%29" title="StumbleUpon"><img src="http://tiago.org/ps/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Ftiago.org%2Fps%2F2008%2F02%2F25%2Fdsl-tactics-in-groovy-1many%2F" title="Technorati"><img src="http://tiago.org/ps/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://tiago.org/ps/2008/02/25/dsl-tactics-in-groovy-1many/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Groovy/Scala/Ruby/Python on JVM</title>
		<link>http://tiago.org/ps/2008/02/24/groovyscalarubypython-on-jvm/</link>
		<comments>http://tiago.org/ps/2008/02/24/groovyscalarubypython-on-jvm/#comments</comments>
		<pubDate>Sun, 24 Feb 2008 01:11:16 +0000</pubDate>
		<dc:creator>tiago</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Scala]]></category>

		<guid isPermaLink="false">http://tiago.org/ps/2008/02/24/groovyscalarubypython-on-jvm/</guid>
		<description><![CDATA[There seems to be some competition in the field that can be vaguely defined as &#8220;The next Java&#8221;(TM). I don&#8217;t know if there will be a &#8220;next Java&#8221; to start with. Things seem to shape up in way where the JVM is our common interoperability platform and on top of it we have a an [...]]]></description>
			<content:encoded><![CDATA[<p>There seems to be some competition in the field that can be vaguely defined as &#8220;The next Java&#8221;(TM).</p>
<p>I don&#8217;t know if there will be a &#8220;next Java&#8221; to start with. Things seem to shape up in way where the JVM is our common interoperability platform and on top of it we have a an ecology of JVM based languages.</p>
<p>I have used Jython quite a lot but have several doubts about it, not only on the current status of Jython (lags a bit behind CPython) but I also deslike Python (when compared with the other languages dicussed here). As such I decided to evaluate the other Scala, Ruby and Groovy.</p>
<p>I have done a couple of small projects in Scala (A prototype DSL for modeling malaria resistance is available <a href="http://popgen.eu/ronald">here</a>) and JRuby. I am now starting with Groovy, and I think I&#8217;ve found my new love. Here I will try to explain why, among Groovy, Scala and JRuby, I have chosen Groovy. To preempt any religious war idea, I would like to say I have full respect for Scala, Ruby, which are, with Caml and Prolog among my favorite languages (for a true crusade and flame ask me for my opinion about Perl or Visual Basic 6 <img src='http://tiago.org/ps/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ).</p>
<p>Steven Devijver <a href="http://groovy.dzone.com/news/groovy-will-replace-java-langu"> suggests</a> that Groovy is the language with more syntatic similarities with Java. I would say that, not only that, but on the semantics and everything, Groovy is the closest language to Java. And that is a good thing. The world (both in programming languages and all the rest) is never revolutionary. Revolutions, when they rarely happen, are either a disgrace or are not that much of big change below the surface. People normally prefer (for good and bad reasons) the path of least short term pain. Groovy delivers that: almost 0 cost in starting to code coming from a Java background. Most importantly Groovy does that but still delivers most of the new goodies. This is actually the cornerstone of my argument: path of least pain while delivering the good stuff (in some cases better than the competition, as we will see).</p>
<p>Let me start with the fundamental reasons why I dismiss JRuby (which is, nonetheless, my second option after Groovy). First, I would like to say, very honestly, that the work of the JRuby guys is nothing short of outstanding! But I have 3 problems:</p>
<ol>
<li>One, by definition, JRuby is based on Ruby, a language from outside the JVM. That means semantic hurdles, coupling issues between the two worlds (think, e.g., libraries)
<li>Most importantly (but connected with the first point): Typing. I am a bit far away from computing issues currently (I work with Malaria currently, so excuse me if I mess strong/explicit typing and such) but clearly the typing system of Ruby make like hard for IDEs (think IDEs to neded to tame those over engineered Java APIs) and automated tools around code. Debugging without explicit typing is also a pain in a big program (I actually suffered my first debug nightmare with typing systems with Caml, arguably the mother of Scala). Some might say that Scala type inference and Groovy duck typing also are problematic in this respect; while the argument might be correct both languages have mechanisms to support typical Java explicit/strong typing and as such profit from IDEs and automated analysis tools.
<li>Ugly perlisms. Although I have read somewhere that those might be deprecated in the future.
</ol>
<p>Ah&#8230; Scala&#8230; Mats Henricson <a href="http://groovy.dzone.com/news/groovy-and-ruby-only-solves-ha">argues</a> that Scala is the only option because of elegance regarding multicore computing. I fundamentally disagree with his point &#8211; multicore programming is fundamental but Scala is not really a good solution, but before we get there, lets talk about other Scala issues.</p>
<p>Type inference. I have some experience with the &#8220;mother&#8221; of Scala, Caml. Type inference in Caml is really elegant: I don&#8217;t remember a single case of it failing and requiring the programmers&#8217; help in discovering the type of a parameter. That is not the case with Scala, several times the compiler seems to be &#8220;lost in translation&#8221;. Some might say that this is because of JVM imposed constraints, but if that is the case then it would raise the argument of bringing a language with a foreign semantics to the JVM and the ugliness attached to the process.</p>
<p>My biggest peeve? Metaprogramming. I won&#8217;t give you my opinion about it because it <a href="http://scala.sygneca.com/future/metaprogramming">really doesn&#8217;t exist</a>. It is on the Scala wiki in the section &#8220;future&#8221;. I am sorry, but a 21st century language where meta programming is absent can only be called in &#8220;beta stage&#8221;. As a side note, there seems to be something lost in the ML branch of functional programming from Lisp in this regard (no introspection and such), that is a shame (How is Haskell in that respect?).</p>
<p>Ok, multicore computing. This is an area where I have some experience in the JVM: [Shameless plug] I invite you to have a look at my Java Web Start, Jython based, multicore aware evolutionary biology workbench  <a href="http://popgen.eu/soft/lositan">LOSITAN</a>. Furthermore I have written tutorials for the multicore paradigm and bioinformatics:</p>
<p><a href="http://tiago.org/ps/2007/07/06/bioinformatics-multi-core-cpus-and-grid-computing-introduction-14/">Bioinformatics, multi-core CPUs and grid computing: Introduction (1/4)</a></p>
<p><a href="http://tiago.org/ps/2007/07/17/bioinformatics-multi-core-cpus-and-grid-computing-user-perspective-24/"><br />
Bioinformatics, multi-core CPUs and grid computing: User perspective (2/4)</a></p>
<p>Most importantly in this context: <a href="http://tiago.org/ps/2007/07/31/bioinformatics-multi-core-cpus-and-grid-computing-developer-perspective-34/">Bioinformatics, multi-core CPUs and grid computing: developer perspective (3/4)</a></p>
<p>Mats argues that Scala Actors and immutable data types provide a simple and elegant solution to the extremely complex problem (I am calling it extremely complex, because I think it really is) of concurrent programming. Immutable data types&#8230; Does anyone believe that the hordes of existing Java developers/programmers are ready and willing to do radical conceptual jump to immutable data types? The change from C++ to Java was minor in terms of semantics, even the change from C to C++ was much less radical that a change requiring to &#8220;get rid of all variables&#8221;. How do you think the majority of programmers will react when you say: &#8220;Forget variables&#8221;? More, as Scala allows for imperative type of programming, what do you think most programmers idiom wil be: Imperative or functional? To makes things worse, in Scala a immutable is called a &#8220;val&#8221; and the mutable a &#8220;var&#8221;. Am I the only only picturing hordes of developers, with tight deadlines just swapping L&#8217;s for R&#8217;s?</p>
<p>I speak for myself here: in spite of having probably more experience with &#8220;immutable&#8221; languages (Prolog a lot, Caml a bit) than most developers, when I wrote Scala code, my reasoning was so tainted by &#8220;real world&#8221; imperative languages that it was really hard to write in a functional dialect. I have the background, enough free time, and the motivation to write functional code, but it was hard to get back in that mindset.</p>
<p>Scala only apparently solves the multi core problem. Give it to a typical developer and he will write imperative code, unless you put a functional zealot behind him (and give the said zealot a strong, resistant whip).</p>
<p>How to address the multicore issue? Clearly we have a problem here. A few ideas:</p>
<ul>
<li>In many applications there is no big need to go multicore. In some cases lets not try to solve a problem that doesn&#8217;t exist in the first place.
<li>Many multicore applications can survive very well with simple concurrency management. Not all applications require a PhD in concurrent programming.
<li>Scala and the like. For those who can and are willing to go functional, why not? I have nothing against that. My only argument is that it won&#8217;t be mainstream.
<li>The way of PAIN. Most developers will continue to use old languages and paradigms and SUFFER with it. Only after much suffering there will be motivation to try out new things and, say, endure the pain of learning a new paradigm. That suffering still hasn&#8217;t happen, only <i>after</i> this becomes a big problem, there will be interest in accepting new solutions.
<li>A silver bullet that can be attached to the current programming paradigm. Sometimes it happens. Don&#8217;t misunderestimate (silly Bushism intended) the power of a &#8220;Black Swan&#8221; (A reference to Taleb&#8217;s book where he discusses the impact of the unexpected important events).
</ul>
<p>To finalize, I would like to say that I am not sticking with Groovy out of being conservative. Groovy seems to beat the competition in many areas (the biggest example is metaprogramming) and strikes a very good balance between being a &#8220;small evolutionary step&#8221; and delivering the goodies.</p>
<p>To really finalize, a caveat: my Groovy knowledge is still limited, one of these days you might read a post where I apologize for having written this <img src='http://tiago.org/ps/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://digg.com/submit?phase=2&amp;url=http%3A%2F%2Ftiago.org%2Fps%2F2008%2F02%2F24%2Fgroovyscalarubypython-on-jvm%2F&amp;title=Groovy%2FScala%2FRuby%2FPython%20on%20JVM&amp;bodytext=There%20seems%20to%20be%20some%20competition%20in%20the%20field%20that%20can%20be%20vaguely%20defined%20as%20%22The%20next%20Java%22%28TM%29.%0D%0A%0D%0AI%20don%27t%20know%20if%20there%20will%20be%20a%20%22next%20Java%22%20to%20start%20with.%20Things%20seem%20to%20shape%20up%20in%20way%20where%20the%20JVM%20is%20our%20common%20interoperability%20platform%20and" title="Digg"><img src="http://tiago.org/ps/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Ftiago.org%2Fps%2F2008%2F02%2F24%2Fgroovyscalarubypython-on-jvm%2F&amp;title=Groovy%2FScala%2FRuby%2FPython%20on%20JVM&amp;notes=There%20seems%20to%20be%20some%20competition%20in%20the%20field%20that%20can%20be%20vaguely%20defined%20as%20%22The%20next%20Java%22%28TM%29.%0D%0A%0D%0AI%20don%27t%20know%20if%20there%20will%20be%20a%20%22next%20Java%22%20to%20start%20with.%20Things%20seem%20to%20shape%20up%20in%20way%20where%20the%20JVM%20is%20our%20common%20interoperability%20platform%20and" title="del.icio.us"><img src="http://tiago.org/ps/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://www.facebook.com/share.php?u=http%3A%2F%2Ftiago.org%2Fps%2F2008%2F02%2F24%2Fgroovyscalarubypython-on-jvm%2F&amp;t=Groovy%2FScala%2FRuby%2FPython%20on%20JVM" title="Facebook"><img src="http://tiago.org/ps/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%2Ftiago.org%2Fps%2F2008%2F02%2F24%2Fgroovyscalarubypython-on-jvm%2F&amp;title=Groovy%2FScala%2FRuby%2FPython%20on%20JVM&amp;annotation=There%20seems%20to%20be%20some%20competition%20in%20the%20field%20that%20can%20be%20vaguely%20defined%20as%20%22The%20next%20Java%22%28TM%29.%0D%0A%0D%0AI%20don%27t%20know%20if%20there%20will%20be%20a%20%22next%20Java%22%20to%20start%20with.%20Things%20seem%20to%20shape%20up%20in%20way%20where%20the%20JVM%20is%20our%20common%20interoperability%20platform%20and" title="Google Bookmarks"><img src="http://tiago.org/ps/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.connotea.org/addpopup?continue=confirm&amp;uri=http%3A%2F%2Ftiago.org%2Fps%2F2008%2F02%2F24%2Fgroovyscalarubypython-on-jvm%2F&amp;title=Groovy%2FScala%2FRuby%2FPython%20on%20JVM&amp;description=There%20seems%20to%20be%20some%20competition%20in%20the%20field%20that%20can%20be%20vaguely%20defined%20as%20%22The%20next%20Java%22%28TM%29.%0D%0A%0D%0AI%20don%27t%20know%20if%20there%20will%20be%20a%20%22next%20Java%22%20to%20start%20with.%20Things%20seem%20to%20shape%20up%20in%20way%20where%20the%20JVM%20is%20our%20common%20interoperability%20platform%20and" title="connotea"><img src="http://tiago.org/ps/wp-content/plugins/sociable/images/connotea.png" title="connotea" alt="connotea" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Ftiago.org%2Fps%2F2008%2F02%2F24%2Fgroovyscalarubypython-on-jvm%2F&amp;title=Groovy%2FScala%2FRuby%2FPython%20on%20JVM" title="DZone"><img src="http://tiago.org/ps/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Ftiago.org%2Fps%2F2008%2F02%2F24%2Fgroovyscalarubypython-on-jvm%2F&amp;title=Groovy%2FScala%2FRuby%2FPython%20on%20JVM" title="Reddit"><img src="http://tiago.org/ps/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://slashdot.org/bookmark.pl?title=Groovy%2FScala%2FRuby%2FPython%20on%20JVM&amp;url=http%3A%2F%2Ftiago.org%2Fps%2F2008%2F02%2F24%2Fgroovyscalarubypython-on-jvm%2F" title="Slashdot"><img src="http://tiago.org/ps/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftiago.org%2Fps%2F2008%2F02%2F24%2Fgroovyscalarubypython-on-jvm%2F&amp;title=Groovy%2FScala%2FRuby%2FPython%20on%20JVM" title="StumbleUpon"><img src="http://tiago.org/ps/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Ftiago.org%2Fps%2F2008%2F02%2F24%2Fgroovyscalarubypython-on-jvm%2F" title="Technorati"><img src="http://tiago.org/ps/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://tiago.org/ps/2008/02/24/groovyscalarubypython-on-jvm/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
