<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-137400338062194307</atom:id><lastBuildDate>Thu, 25 Oct 2012 23:05:54 +0000</lastBuildDate><category>jmock</category><category>view conversion</category><category>pictures</category><category>education</category><category>scala</category><category>implicits</category><category>drawing</category><category>java</category><category>swing</category><category>kojo</category><category>actors</category><category>web development</category><category>games</category><category>terracotta</category><category>algorithms</category><category>immutability</category><category>concurrency</category><category>jiva</category><category>state</category><category>delegation</category><category>genetic-algorithms</category><category>tcpoly</category><category>learning to program</category><category>ui</category><category>inheritance</category><category>typeclasses</category><category>data structures</category><category>self-problem</category><category>identity</category><category>haskell</category><category>composition</category><category>design</category><category>value types</category><category>traits</category><category>collections</category><category>testing</category><category>scrisca</category><category>L-Systems</category><category>type constructor polymorphism</category><category>recursion</category><title>All Things Runnable</title><description>Lalit's technical blog; thoughts and ideas on the structure and flow of computer programs, and related matters.</description><link>http://lalitpant.blogspot.com/</link><managingEditor>noreply@blogger.com (Lalit Pant)</managingEditor><generator>Blogger</generator><openSearch:totalResults>18</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/lalitpant" /><feedburner:info uri="lalitpant" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><guid isPermaLink="false">tag:blogger.com,1999:blog-137400338062194307.post-4821717153688243681</guid><pubDate>Sun, 20 May 2012 12:54:00 +0000</pubDate><atom:updated>2012-05-21T13:00:14.691-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">kojo</category><category domain="http://www.blogger.com/atom/ns#">recursion</category><category domain="http://www.blogger.com/atom/ns#">L-Systems</category><category domain="http://www.blogger.com/atom/ns#">drawing</category><category domain="http://www.blogger.com/atom/ns#">scala</category><title>Playing with L-Systems in Kojo</title><atom:summary>
You can use the idea of L-Systems to make some great drawings in Kojo.

So what are L-Systems?

The Wikipedia article on the subject has a good explanation. For the purpose of this post, let me define the important elements of an L-System; these are:

The alphabet of the system. Some of the letters of the alphabet have a turtle graphics interpretation.
The axiom of the system (a string made out </atom:summary><link>http://feedproxy.google.com/~r/lalitpant/~3/uzwDVCs_EJo/playing-with-l-systems-in-kojo.html</link><author>noreply@blogger.com (Lalit Pant)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-PpjWiaF5pZo/T7iWxo5ZjfI/AAAAAAAAAsc/-7W07bEpQfo/s72-c/sier-wp6.png" height="72" width="72" /><thr:total>0</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/lalitpant/~4/uzwDVCs_EJo" height="1" width="1"/&gt;</description><feedburner:origLink>http://lalitpant.blogspot.com/2012/05/playing-with-l-systems-in-kojo.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-137400338062194307.post-9017976540748299102</guid><pubDate>Wed, 16 May 2012 04:33:00 +0000</pubDate><atom:updated>2012-05-15T23:33:34.154-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">kojo</category><category domain="http://www.blogger.com/atom/ns#">recursion</category><category domain="http://www.blogger.com/atom/ns#">drawing</category><category domain="http://www.blogger.com/atom/ns#">scala</category><title>Recursive Drawing with Kojo</title><atom:summary>
A few days ago, I discovered (via Hacker News) a site called recursivedrawing.com. This site contains a very interesting tool for making drawings based on the idea of recursion. And even though the site focuses on a visual exploration of this idea, I was immediately struck by the conceptual similarity of this tool to Pictures within Kojo. So, without further ado, here are some of the drawings </atom:summary><link>http://feedproxy.google.com/~r/lalitpant/~3/gNfgMStxqdY/recursive-drawing-with-kojo.html</link><author>noreply@blogger.com (Lalit Pant)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-M1PhwR6zzvk/T7EUSC2d6AI/AAAAAAAAAqw/mc4vkQ__Xfk/s72-c/recursive-circles.png" height="72" width="72" /><thr:total>0</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/lalitpant/~4/gNfgMStxqdY" height="1" width="1"/&gt;</description><feedburner:origLink>http://lalitpant.blogspot.com/2012/05/recursive-drawing-with-kojo.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-137400338062194307.post-5497454745396380280</guid><pubDate>Tue, 10 Jan 2012 05:02:00 +0000</pubDate><atom:updated>2012-01-10T10:54:29.102-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">kojo</category><category domain="http://www.blogger.com/atom/ns#">games</category><category domain="http://www.blogger.com/atom/ns#">pictures</category><category domain="http://www.blogger.com/atom/ns#">scala</category><title>A Kojo Update</title><atom:summary>
There have been some interesting new developments on the Kojo front recently. 

Some cool 2D stuff based on Staging, and a new feature called Pictures: http://kojoenv.wordpress.com/2011/12/09/kojo-version-091211-released/
Collision Detection for Pictures: http://kojoenv.wordpress.com/2011/12/30/kojo-version-291211-released/
Ability to combine Pictures, Animation, Collision Detection, Keyboard </atom:summary><link>http://feedproxy.google.com/~r/lalitpant/~3/cS9A-VnUxqQ/kojo-update.html</link><author>noreply@blogger.com (Lalit Pant)</author><thr:total>4</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/lalitpant/~4/cS9A-VnUxqQ" height="1" width="1"/&gt;</description><feedburner:origLink>http://lalitpant.blogspot.com/2012/01/kojo-update.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-137400338062194307.post-6219257045879429481</guid><pubDate>Mon, 06 Sep 2010 04:24:00 +0000</pubDate><atom:updated>2010-09-06T00:25:18.349-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">kojo</category><category domain="http://www.blogger.com/atom/ns#">web development</category><category domain="http://www.blogger.com/atom/ns#">learning to program</category><category domain="http://www.blogger.com/atom/ns#">education</category><category domain="http://www.blogger.com/atom/ns#">scala</category><title>Announcing - The Kojo Learning Environment</title><atom:summary>Time seems to be flying by. It's been almost two years since my last post! I need to make sure that I write (much) more frequently going forward.I have been busy for the past many months working on a educational tool: The Kojo Learning Environment. It's finally time to announce it on my Blog!Kojo is (hopefully) a fun and friendly graphical environment for playing with:Beginner level Computer </atom:summary><link>http://feedproxy.google.com/~r/lalitpant/~3/v-evwmRbYtY/announcing-kojo-learning-environment.html</link><author>noreply@blogger.com (Lalit Pant)</author><thr:total>5</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/lalitpant/~4/v-evwmRbYtY" height="1" width="1"/&gt;</description><feedburner:origLink>http://lalitpant.blogspot.com/2010/09/announcing-kojo-learning-environment.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-137400338062194307.post-7017656961643706083</guid><pubDate>Thu, 18 Dec 2008 15:18:00 +0000</pubDate><atom:updated>2009-01-30T11:13:07.180-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">swing</category><category domain="http://www.blogger.com/atom/ns#">ui</category><category domain="http://www.blogger.com/atom/ns#">scala</category><title>A plunge into UI programming with Scala</title><atom:summary>Over the last couple of month, I have been working part-time on a new project: Kogics. The basic idea behind Kogics is to provide educational games and tools for kids. Even in this early stage of its life, Kogics has started to be pretty useful. I am using it to help my seven year old daughter practice her arithmetic skills. I have also been using it in evening computer-fun sessions with kids in </atom:summary><link>http://feedproxy.google.com/~r/lalitpant/~3/_YcX5MojaW8/plunge-into-ui-programming-in-scala.html</link><author>noreply@blogger.com (Lalit Pant)</author><thr:total>6</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/lalitpant/~4/_YcX5MojaW8" height="1" width="1"/&gt;</description><feedburner:origLink>http://lalitpant.blogspot.com/2008/12/plunge-into-ui-programming-in-scala.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-137400338062194307.post-8161494771331352777</guid><pubDate>Thu, 28 Aug 2008 17:15:00 +0000</pubDate><atom:updated>2009-04-11T13:04:40.601-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">scrisca</category><category domain="http://www.blogger.com/atom/ns#">haskell</category><category domain="http://www.blogger.com/atom/ns#">implicits</category><category domain="http://www.blogger.com/atom/ns#">typeclasses</category><category domain="http://www.blogger.com/atom/ns#">scala</category><title>Scala Implicits: a dose of Magic | Part 2</title><atom:summary>In my previous post, I introduced implicits, mentioned some of the ways in which they can be used, and talked about one of their primary uses: view conversion.Maybe you came away from that post thinking: 'hey, this looks pretty interesting, but this is too close to magic for my liking. I want to be able to write code that is understandable and maintainable, and all this under-the-covers stuff </atom:summary><link>http://feedproxy.google.com/~r/lalitpant/~3/2MJWxRcgyXE/scala-implicits-dose-of-magic-part-2.html</link><author>noreply@blogger.com (Lalit Pant)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/pant.lalit/SLzEXrVqP0I/AAAAAAAAAXA/eixWTV_Js7M/s72-c/Scalipse.jpg" height="72" width="72" /><thr:total>0</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/lalitpant/~4/2MJWxRcgyXE" height="1" width="1"/&gt;</description><feedburner:origLink>http://lalitpant.blogspot.com/2008/08/scala-implicits-dose-of-magic-part-2.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-137400338062194307.post-8448218341682380786</guid><pubDate>Sun, 10 Aug 2008 23:12:00 +0000</pubDate><atom:updated>2009-04-11T12:53:26.133-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">view conversion</category><category domain="http://www.blogger.com/atom/ns#">implicits</category><category domain="http://www.blogger.com/atom/ns#">scala</category><title>Scala Implicits: a dose of Magic | Part 1</title><atom:summary>Implicits are an extremely powerful feature of Scala. In terms of mechanics, they are based on the following:Implicit definitions: these are method, val, or object definitions marked with the implict keyword.Implicit conversions (also called view conversions in this post): these can be further divided into: Conversions of a method call receiver: for this type of conversion, if a non-existent </atom:summary><link>http://feedproxy.google.com/~r/lalitpant/~3/euJaJGfN4-w/scala-implicits-dose-of-magic-part-1.html</link><author>noreply@blogger.com (Lalit Pant)</author><thr:total>4</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/lalitpant/~4/euJaJGfN4-w" height="1" width="1"/&gt;</description><feedburner:origLink>http://lalitpant.blogspot.com/2008/08/scala-implicits-dose-of-magic-part-1.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-137400338062194307.post-9209442406413076393</guid><pubDate>Sat, 26 Jul 2008 02:39:00 +0000</pubDate><atom:updated>2008-08-04T17:25:04.648-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">java</category><category domain="http://www.blogger.com/atom/ns#">type constructor polymorphism</category><category domain="http://www.blogger.com/atom/ns#">collections</category><category domain="http://www.blogger.com/atom/ns#">tcpoly</category><category domain="http://www.blogger.com/atom/ns#">traits</category><category domain="http://www.blogger.com/atom/ns#">scala</category><title>A Short Road to TCPoly(morphism) in Scala</title><atom:summary>In my previous post, I talked about adding rich methods to Java Collections with the help of traits. If you go back and look at that post, you will see that I stayed well away from rich methods of a certain kind: those that return a new Collection when they are applied to an existing Collection. Examples of such methods are: map, flatMap, and filter. Why did I not talk about methods of this </atom:summary><link>http://feedproxy.google.com/~r/lalitpant/~3/I1A3wPFIMZE/short-road-to-tcpolymorphism.html</link><author>noreply@blogger.com (Lalit Pant)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp2.blogger.com/_rwHoXqU5qug/SIoJbGyqS2I/AAAAAAAAAAM/Y4jNWWWYxgE/s72-c/tcpoly-4-tests.jpg" height="72" width="72" /><thr:total>0</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/lalitpant/~4/I1A3wPFIMZE" height="1" width="1"/&gt;</description><feedburner:origLink>http://lalitpant.blogspot.com/2008/07/short-road-to-tcpolymorphism.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-137400338062194307.post-4705104468346447554</guid><pubDate>Sun, 13 Jul 2008 17:09:00 +0000</pubDate><atom:updated>2008-08-04T17:17:22.233-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">self-problem</category><category domain="http://www.blogger.com/atom/ns#">inheritance</category><category domain="http://www.blogger.com/atom/ns#">composition</category><category domain="http://www.blogger.com/atom/ns#">design</category><category domain="http://www.blogger.com/atom/ns#">delegation</category><category domain="http://www.blogger.com/atom/ns#">traits</category><category domain="http://www.blogger.com/atom/ns#">scala</category><title>Traits in Scala: a Powerful Design Tool</title><atom:summary>Traits in Scala are an extremely powerful Object Oriented (OO) design tool. They also provide a powerful mechanism for code reuse by making good use of subtyping and delegation.  In terms of raw functionality, traits allow us to:        Define types by specifying the signatures of supported methods. This is similar to  how interfaces work in Java. Provide partial/full implementations that can be </atom:summary><link>http://feedproxy.google.com/~r/lalitpant/~3/acNluGB8jPY/traits-in-scala-powerful-design-tool.html</link><author>noreply@blogger.com (Lalit Pant)</author><thr:total>3</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/lalitpant/~4/acNluGB8jPY" height="1" width="1"/&gt;</description><feedburner:origLink>http://lalitpant.blogspot.com/2008/07/traits-in-scala-powerful-design-tool.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-137400338062194307.post-903901270556325057</guid><pubDate>Fri, 04 Jul 2008 00:36:00 +0000</pubDate><atom:updated>2008-07-03T21:19:58.171-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">actors</category><category domain="http://www.blogger.com/atom/ns#">terracotta</category><category domain="http://www.blogger.com/atom/ns#">scala</category><category domain="http://www.blogger.com/atom/ns#">concurrency</category><title>Parallel Folds: Sample Code</title><atom:summary>To enable easy access to the sample source code for my previous blog post on Clustered Scala Actors, I have set up a GitHub project at: http://github.com/litan/clustered-fold/tree/masterIf you don't want to mess with Git, the sample files can be downloaded (as a gzipped tarball) from: http://github.com/litan/clustered-fold/tarball/masterI have been playing with this code using Java 1.6.0_05, </atom:summary><link>http://feedproxy.google.com/~r/lalitpant/~3/UeSbfXmD0x8/parallel-folds-sample-code.html</link><author>noreply@blogger.com (Lalit Pant)</author><thr:total>0</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/lalitpant/~4/UeSbfXmD0x8" height="1" width="1"/&gt;</description><feedburner:origLink>http://lalitpant.blogspot.com/2008/07/parallel-folds-sample-code.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-137400338062194307.post-6007343301681686046</guid><pubDate>Wed, 02 Jul 2008 01:59:00 +0000</pubDate><atom:updated>2008-07-17T09:17:38.049-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">actors</category><category domain="http://www.blogger.com/atom/ns#">terracotta</category><category domain="http://www.blogger.com/atom/ns#">scala</category><category domain="http://www.blogger.com/atom/ns#">concurrency</category><title>Clustered Scala Actors</title><atom:summary>I have recently been looking at the Terracotta Integration Module (TIM) for Scala actors that was announced earlier this year by Jonas Boner. As I started playing with the TIM, I decided that I wanted to do the following: Write a simple but hopefully interesting actors based program Try to cluster it using the Scala TIM Identify the lessons learned on the wayAt this point, I needed a sample </atom:summary><link>http://feedproxy.google.com/~r/lalitpant/~3/D4aTjJpu2MM/clustered-scala-actors.html</link><author>noreply@blogger.com (Lalit Pant)</author><thr:total>3</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/lalitpant/~4/D4aTjJpu2MM" height="1" width="1"/&gt;</description><feedburner:origLink>http://lalitpant.blogspot.com/2008/07/clustered-scala-actors.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-137400338062194307.post-2377247952536353007</guid><pubDate>Mon, 28 Jan 2008 21:09:00 +0000</pubDate><atom:updated>2008-01-28T17:31:04.629-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">java</category><category domain="http://www.blogger.com/atom/ns#">value types</category><category domain="http://www.blogger.com/atom/ns#">state</category><category domain="http://www.blogger.com/atom/ns#">immutability</category><category domain="http://www.blogger.com/atom/ns#">identity</category><category domain="http://www.blogger.com/atom/ns#">scala</category><title>Object state, identity, immutability, and values</title><atom:summary>A recent discussion on the Scala mailing list got me thinking about the concepts of Object state, identity, and immutability.Let's start by  trying to define Object State. There seem to be two different ways of looking at state: From an Object Oriented (OO) perspective: the state of an object is defined by the data it contains within its fields. This state helps to distinguish it from other </atom:summary><link>http://feedproxy.google.com/~r/lalitpant/~3/PrFd3ZCN4p0/object-state-identity-immutability-and.html</link><author>noreply@blogger.com (Lalit Pant)</author><thr:total>2</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/lalitpant/~4/PrFd3ZCN4p0" height="1" width="1"/&gt;</description><feedburner:origLink>http://lalitpant.blogspot.com/2008/01/object-state-identity-immutability-and.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-137400338062194307.post-3527854542667127882</guid><pubDate>Thu, 06 Dec 2007 02:45:00 +0000</pubDate><atom:updated>2008-11-15T07:22:04.894-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">testing</category><category domain="http://www.blogger.com/atom/ns#">scala</category><category domain="http://www.blogger.com/atom/ns#">jmock</category><title>Using JMock with Scala</title><atom:summary>While working on the Java version of Jiva earlier this year, I used JMock pretty heavily to test all of the non-deterministic code that is integral to the workings of a Genetic Algorithm.When I ported Jiva to Scala, I did not really know if I could continue to use JMock for my testing needs. As it turned out, JMock worked out very well for testing Scala code.I could go in and try to explain some </atom:summary><link>http://feedproxy.google.com/~r/lalitpant/~3/ix4NSQ3sCJc/using-jmock-with-scala.html</link><author>noreply@blogger.com (Lalit Pant)</author><thr:total>8</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/lalitpant/~4/ix4NSQ3sCJc" height="1" width="1"/&gt;</description><feedburner:origLink>http://lalitpant.blogspot.com/2007/12/using-jmock-with-scala.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-137400338062194307.post-4199898817191321165</guid><pubDate>Sat, 01 Dec 2007 21:06:00 +0000</pubDate><atom:updated>2007-12-01T15:38:47.424-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">genetic-algorithms</category><category domain="http://www.blogger.com/atom/ns#">jiva</category><category domain="http://www.blogger.com/atom/ns#">scala</category><title>Announcing Jiva, a Genetic Algorithms Toolkit written in Scala</title><atom:summary>Earlier this week, I put out an initial release (version 0.1.5) of Jiva, a Genetic Algorithms (GA) toolkit that I have been working on.Jiva is hosted on Google Code:http://code.google.com/p/jiva-ng/Jiva is written in Scala, a very powerful OO/Functional hybrid language that runs on the Java Platform:http://www.scala-lang.org/Jiva started out life earlier this year as a GA toolkit written in Java.</atom:summary><link>http://feedproxy.google.com/~r/lalitpant/~3/myU0flQ2APo/announcing-jiva-genetic-algorithms.html</link><author>noreply@blogger.com (Lalit Pant)</author><thr:total>7</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/lalitpant/~4/myU0flQ2APo" height="1" width="1"/&gt;</description><feedburner:origLink>http://lalitpant.blogspot.com/2007/12/announcing-jiva-genetic-algorithms.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-137400338062194307.post-1889699938890132732</guid><pubDate>Mon, 02 Jul 2007 01:32:00 +0000</pubDate><atom:updated>2007-07-01T22:20:24.137-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">java</category><category domain="http://www.blogger.com/atom/ns#">data structures</category><category domain="http://www.blogger.com/atom/ns#">algorithms</category><category domain="http://www.blogger.com/atom/ns#">collections</category><title>Java Collections QuickRef</title><atom:summary>As of version 6.0, Java contains a large number of Collection classes. In this post, I have attempted to categorize a useful subset of these classes on the basis of general usage scenarios:   If you want to manage a Sequence of   elements, and the sequence is:         Unordered, use a     Set   If you do not need thread safety - use a   HashSet   If you need thread safety:     Use a </atom:summary><link>http://feedproxy.google.com/~r/lalitpant/~3/axAvu-wkDxo/java-collections-quickref.html</link><author>noreply@blogger.com (Lalit Pant)</author><thr:total>1</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/lalitpant/~4/axAvu-wkDxo" height="1" width="1"/&gt;</description><feedburner:origLink>http://lalitpant.blogspot.com/2007/07/java-collections-quickref.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-137400338062194307.post-4233948872997651135</guid><pubDate>Fri, 22 Jun 2007 22:20:00 +0000</pubDate><atom:updated>2008-07-14T08:07:30.967-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">java</category><category domain="http://www.blogger.com/atom/ns#">traits</category><category domain="http://www.blogger.com/atom/ns#">scala</category><title>Playing with Traits in Scala</title><atom:summary>Update: A more recent post on traits is also availableTraits in Scala provide a powerful tool for abstraction and class composition. Traits allow you to:     Define a type by specifying the signature of supported methods. This is     similar to  how interfaces work in Java.     Provide partial/full implementations that can be mixed-in to classes that     use the trait. Why is this different from </atom:summary><link>http://feedproxy.google.com/~r/lalitpant/~3/NOyaQkAD6Hs/playing-with-traits-in-scala.html</link><author>noreply@blogger.com (Lalit Pant)</author><thr:total>0</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/lalitpant/~4/NOyaQkAD6Hs" height="1" width="1"/&gt;</description><feedburner:origLink>http://lalitpant.blogspot.com/2007/06/playing-with-traits-in-scala.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-137400338062194307.post-6469597792001277717</guid><pubDate>Mon, 28 May 2007 16:04:00 +0000</pubDate><atom:updated>2007-06-13T20:22:33.133-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">java</category><category domain="http://www.blogger.com/atom/ns#">concurrency</category><title>Efficient Concurrency</title><atom:summary>There are many ways to write thread-safe code for situations where concurrent readers and writers modify a shared data-structure:     Using locks: but this is very inefficient under high read-write load,     especially because multiple readers interfere with each other.   Using read-write locks: this works better, because readers can run     concurrently while no writes are taking place.   Using </atom:summary><link>http://feedproxy.google.com/~r/lalitpant/~3/e1dRkEfa6uo/efficient-concurrency.html</link><author>noreply@blogger.com (Lalit Pant)</author><thr:total>0</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/lalitpant/~4/e1dRkEfa6uo" height="1" width="1"/&gt;</description><feedburner:origLink>http://lalitpant.blogspot.com/2007/05/efficient-concurrency.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-137400338062194307.post-1521342785722324246</guid><pubDate>Thu, 24 May 2007 14:53:00 +0000</pubDate><atom:updated>2007-06-12T22:25:39.339-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">java</category><category domain="http://www.blogger.com/atom/ns#">concurrency</category><title>A FutureResult based on FutureTask</title><atom:summary>This morning, I was looking within the java.util.concurrent package for something in the spirit of the FutureResult class in Doug Lea's util.concurrent library. Surprisingly enough, I did not find anything (did I miss something?).So I cooked up my own version:public class FutureResult&lt;V&gt; {  volatile V result;  volatile Exception problem;  final FutureTask&lt;V&gt; resultSyncer;  public FutureResult() {</atom:summary><link>http://feedproxy.google.com/~r/lalitpant/~3/CTwuMZacWk0/futureresult-class-based-on.html</link><author>noreply@blogger.com (Lalit Pant)</author><thr:total>2</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/lalitpant/~4/CTwuMZacWk0" height="1" width="1"/&gt;</description><feedburner:origLink>http://lalitpant.blogspot.com/2007/05/futureresult-class-based-on.html</feedburner:origLink></item></channel></rss>
