<?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.homecloud.ca/~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-5540692173523218501</atom:id><lastBuildDate>Wed, 28 Nov 2012 09:41:57 +0000</lastBuildDate><category>monads</category><category>scala</category><category>functional programming</category><title>HomeCloud</title><description>Razie's tech blog</description><link>http://blog.homecloud.ca/</link><managingEditor>noreply@blogger.com (Razie)</managingEditor><generator>Blogger</generator><openSearch:totalResults>12</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.homecloud.ca/Homecloud" /><feedburner:info uri="homecloud" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:browserFriendly></feedburner:browserFriendly><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5540692173523218501.post-9187252013323716378</guid><pubDate>Mon, 19 Nov 2012 18:35:00 +0000</pubDate><atom:updated>2012-11-19T19:45:19.207-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">monads</category><category domain="http://www.blogger.com/atom/ns#">functional programming</category><category domain="http://www.blogger.com/atom/ns#">scala</category><title>Monads, shmonads and functional programming</title><description>&lt;br /&gt;
I will be&amp;nbsp;necessarily&amp;nbsp;somewhat long, somewhat wrong and mostly fuzzy, given my own level of understanding, but I am not one to shy away from making a fool of oneself, in the quest for knowledge.&lt;br /&gt;
&lt;br /&gt;
Monads (and related concepts from category theory, like Functor, Applicative etc) are the next level of abstraction in Functional Programming, beyond functions.&lt;br /&gt;
&lt;h3&gt;
Functions&lt;/h3&gt;
Functions &lt;b&gt;&lt;span style="background-color: black; color: red; font-family: Courier New, Courier, monospace;"&gt;f : A =&amp;gt; B&lt;/span&gt;&lt;/b&gt; allow you to think and program a certain way. Once you get used to this &lt;b&gt;functional programming&lt;/b&gt;, you can move on to higher types, higher functions and from there to monads.&lt;br /&gt;
&lt;br /&gt;
A function is basically a transformation: it turns an A into a B. In functional programming, one can take it and do stuff with it.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Functors&lt;/h3&gt;
Functors&amp;nbsp;&lt;b&gt;&lt;span style="background-color: black; color: red; font-family: Courier New, Courier, monospace;"&gt;F[A]&lt;/span&gt;&lt;/b&gt;&amp;nbsp;lift a &amp;nbsp;simple function to something more - the signature tells you their secret:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: red; font-family: Courier New, Courier, monospace;"&gt;&lt;b style="background-color: black;"&gt;map[B] (f : A =&amp;gt; B) : F[A] =&amp;gt; F[B]&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
... they essentially gobble up your function f and return something higher level - pause and reflect on this for a second.&lt;br /&gt;
&lt;br /&gt;
This map or fmap, you could think of it as taking a simple unix command like "wc -l" and apply it to something, as in "find *.txt | wc -l"&lt;br /&gt;
&lt;br /&gt;
In scala, you are used to a slightly different version of the same idea:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="background-color: black; color: red; font-family: Courier New, Courier, monospace;"&gt;List(1,2,3) map (_ + 4)&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Why are they useful? Many reasons&lt;br /&gt;
&lt;br /&gt;
For instance – you are normally ‘forbidden’ from using state between two calls to f – you should know that by now. However, &lt;b&gt;&lt;i&gt;inside a functor&lt;/i&gt;&lt;/b&gt;&amp;nbsp;you could, for the duration of the entire transformation &lt;b&gt;&lt;span style="color: red;"&gt;F[A] =&amp;gt; F[B]&lt;/span&gt;&lt;/b&gt;… you could have some state there… this is the beauty of an &lt;b&gt;&lt;i&gt;internalized iterator&lt;/i&gt;&lt;/b&gt; versus the one you’re used to. That state would be &lt;b&gt;well encapsulated&lt;/b&gt; there in that transformation, so it could be used.&lt;br /&gt;
&lt;br /&gt;
How that transformation is executed, is up to the specific functor you use. Some can optimize it, some can be dumb while some can use state (like cache a DB connection between calls or whatever).&lt;br /&gt;
&lt;br /&gt;
Let’s have a quick random example: I could have my own functor, working on lists, which keeps the elements sorted. If I apply a random function to it, the result has to be also sorted. You can see the problem? my functor will keep it sorted while an externalized loop may or may not keep it sorted, depending on the programmer.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="color: red; font-family: Courier New, Courier, monospace;"&gt;MySortedList (1,2,3) map (rand(_))&lt;/span&gt;&lt;/b&gt;will always be sorted, while &lt;b&gt;&lt;span style="color: red; font-family: Courier New, Courier, monospace;"&gt;List (1,2,3) map (rand(_))&lt;/span&gt;&lt;/b&gt;&amp;nbsp;is not…&lt;br /&gt;
&lt;br /&gt;
Without functions and functors, there is no way you could express and enforce that idea – I don’t think…&lt;br /&gt;
&lt;h3&gt;
Monads&lt;/h3&gt;
Monads go even further. Monads have certain laws which give them certain properties which are very useful once you get used to thinking in those terms.&lt;br /&gt;
&lt;br /&gt;
Monads use flatMap rather than map, with a signature&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="background-color: black; color: red; font-family: Courier New, Courier, monospace;"&gt;flatMap (f : A =&amp;gt; M[B]) : M[A] =&amp;gt; M[B]&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, they also return a transformation, but a yet higher level one, which includes flattening. But because it &lt;i&gt;includes &lt;/i&gt;flattening, it can do it in whichever way it wants.&lt;br /&gt;
&lt;br /&gt;
Why monads are more useful than functors – look at the gobble-able: it’s an&lt;span style="font-family: Courier New, Courier, monospace;"&gt; &lt;b&gt;&lt;span style="background-color: black; color: red;"&gt;f : A =&amp;gt; M[B]&lt;/span&gt;&lt;/b&gt;&lt;/span&gt; rather than &lt;span style="color: red; font-family: Courier New, Courier, monospace;"&gt;&lt;b&gt;f : A =&amp;gt; B&lt;/b&gt;&lt;/span&gt; – the functors limit you to the shape of the functor, sort of speak – basically if you start with a list of ID’s you will end up with a list of Johns of the same size (or more or less, if the functor is cheating).&lt;br /&gt;
&lt;br /&gt;
Monads are one better, you can start with a list of 5 student ID’s and end up with either 45 grades in a school year or 2 missing registrations… yes,&lt;b&gt;&lt;span style="color: red; font-family: Courier New, Courier, monospace;"&gt; f : A =&amp;gt; B&lt;/span&gt;&lt;/b&gt; has to return exactly one and the same B for an A, while an &lt;span style="color: red; font-family: Courier New, Courier, monospace;"&gt;&lt;b&gt;f : A =&amp;gt; M[B]&lt;/b&gt;&lt;/span&gt; could return for instance empty (called unit) he he…&lt;br /&gt;
&lt;h3&gt;
Keep reading&lt;/h3&gt;
There’s a lot more to it, as others are trying to convey – try to read as much as you can – there’s no one angle that makes it easy to jump to monad abstractions…&lt;br /&gt;
&lt;br /&gt;
If you are confused by the signatures I used above, it’s ok – no, you don’t have to learn Haskell – there’s an entire series of blog posts to explain the gap...&lt;br /&gt;
&lt;br /&gt;
Note that the random sample above is not kosher, since rand() is not a pure function: it never returns the same B for a given A... but it makes a good point.&lt;div class="blogger-post-footer"&gt;You can read the &lt;a href="wiki.homecloud.ca"&gt;wiki&lt;/a&gt;. Cheers!&lt;/div&gt;</description><link>http://blog.homecloud.ca/2012/11/monads-shmonads-and-functional.html</link><author>noreply@blogger.com (Razvan)</author><thr:total>4</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5540692173523218501.post-2398310704257541867</guid><pubDate>Sat, 29 Sep 2012 13:16:00 +0000</pubDate><atom:updated>2012-11-19T10:36:06.813-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">scala</category><title>OMG, scala is a complex language!</title><description>This was originally posted in Oct 2011 on the blog.coolscala.com &lt;br /&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;I keep seeing this and, maybe it’s true. Let’s chase this complexity for a bit and go through some of the biggest scala differentiators (from Java or C++, as major OO languages).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;&lt;strong&gt;&lt;span style="color: orange;"&gt;Smart compiler infers types&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;The compiler can infer the types for the most part, so people have to type a lot less repetitive information, which they used to type in both Java and C++. For instance, since “john” is obviously a String, the type of the variable is inferred by the compiler to be String so I don’t have to type it again:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;val someone = “John”&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;I have seen this feature both praised and held against the language as “added complexity”, so I don’t know what to say. I just love typing less and feeling less stupid, every time I declare a value or variable.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;&lt;strong&gt;&lt;span style="color: orange;"&gt;Simplified class definitions&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;Since OO is all about defining classes, scala made do with a bunch of stuff in one go, so that my domain models are dead-simple:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;class Person (val firstName:String, val lastName:String)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;This, in Java and C++ takes about one page of code: with constructors, getters, setters etc. Scala observed that people don’t need to type one page to inform a stupid compiler that they want a person with a first and last names, so it’s all condensed in this one line, much like a table would look in SQL.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;Is this added complexity? Well, I do need to worry about overriding the generated getters/setters ONLY if I need to, so I don’t really know if it’s more complex.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;Me? I love this particular feature so much, that honestly, I don’t care what you think &lt;/span&gt;&lt;span style="font-family: Wingdings;"&gt;J&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;&lt;strong&gt;&lt;span style="color: orange;"&gt;Unifying methods and operators&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;All programming languages I know discriminate between methods with names like “&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;append&lt;/span&gt;” and operators like “&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;+=&lt;/span&gt;”. Some do not even allow re-definition of some hardcoded operators (Java) while some allow infix notation only for operators (C++).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;Scala simply makes do with ALL these restrictions and states that the name of a method can be pretty much anything and all can use the infix notation, so I can have:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;ListBuffer(1,2,3) append 4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;As well as&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;ListBuffer(1,2,3) += 4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;The only difference would be the precedence rules, which are customary in all languages.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;Some people obviously would see this as “more complex” than both Java and C++ since they can now do whatever they can… but I see it as “simpler” than both. Operators have been held against C++ before so it really is not surprising that they are held against scala as well.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;This is, after all, what makes scala such as perfect DSL framework, allowing natural language such as:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;“Mary” with “a purse” and “red shoes” should look “nice”&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;&lt;strong&gt;&lt;span style="color: orange;"&gt;Types – variance&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;In both Java and C++, the generics have certain hard-coded and limited behavior (i.e. non-variance) and allow only a few constructs (like &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;List&amp;lt;T extends Person&amp;gt;&lt;/span&gt;).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;In scala, there is a default behavior, where List[Person] is non-variant, but everything is customizable. If you want co-variance, just tell the compiler &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;List[+Person]&lt;/span&gt; or &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;List[-Person]&lt;/span&gt; for contra-variance. Just like Java, I can use &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;List[T &amp;lt;: Person]&lt;/span&gt; but I can use the reverse just as well: &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;List [T &amp;gt;: Person]&lt;/span&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;Since scala supports implicits (with finer control than C++), another construct is available: &lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;List[T &amp;lt;% Person].&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;Is this more complicated? Well, just like the operators – it lifts certain limitations of other languages, so it’s both more complicated, since there’s more stuff to learn and simpler, since there’s less rules to live by.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;I personally enjoy the extra control… do I actually use it? Not on a daily basis, the defaults are good enough.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;&lt;strong&gt;&lt;span style="color: orange;"&gt;Constructors only?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;Most languages only allow data types (objects) to be constructed. This is normal in Java and C++.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;Well, there’s the flipside, where I can de-construct an object and I don’t mean de-allocating its memory. Consider this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span style="font-size: x-small;"&gt;someone match {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span style="font-size: x-small;"&gt;  case Person(first,last) =&amp;gt; println (“ name is “ + first + ” “ + last)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span style="font-size: x-small;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;You can see what I mean by de-constructing: took an already created object, someone, and de-constructed into its components. I know this looks foreign to most OO personnel, but trust you me, it is insanely cool and useful. Think what you would have to type in either Java or C++ to achieve the same thing, with if (instanceof) and then type cast and assign two variables and whatnot.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;Is this more complex? Well, this is totally new functionality so I guess it is. But I love having it! Trust me, you will, too!&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;By the way, the match/case construct is way more powerful than your regular switch/case which can only handle constants… we can de-construct types, match constants, match types… and more! Check this out:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span style="font-size: x-small;"&gt;someone match {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span style="font-size: x-small;"&gt;  case Person(first,last) =&amp;gt; println (“ name is “ + first + ” “ + last)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span style="font-size: x-small;"&gt;  case “John” |”Mary” =&amp;gt; println (“hello, “ + someone)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span style="font-size: x-small;"&gt;  case s:String =&amp;gt; println (“name is “ + s)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span style="font-size: x-small;"&gt;  case _ =&amp;gt; println (“don’t know what this is…”)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span style="font-size: x-small;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;Is this more complex? I don’t know… in Java or C++ this is between one and two pages of code. This looks simpler and more intuitive to me… granted, I got used to it but so can you!&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;&lt;strong&gt;&lt;span style="color: orange;"&gt;Conclusion&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;There’s more areas of the language, but these are some of the major differences I have time for right now. If you have others, post up and I’ll get into those as well.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;I did not get into the functional areas of the language, since that would require comparing with other functional languages and I’m not an FP guy. C++ comes close by allowing passing pointers to methods to other functions while Java 8 I think has some proposed lambda syntax.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;Is it more complex? Well, there’s two ways to look at it:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;&lt;strong&gt;Yes,&lt;/strong&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;There are more symbols and features that one can use&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Calibri;"&gt;There’s more computer science I need to learn (contra-variance, pattern matching, lambdas, closures etc)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;&lt;strong&gt;No,&lt;o:p&gt;&lt;/o:p&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;The real-world problems to solve are the same and&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Calibri;"&gt;To do the same in either Java or C++ is either impossible or takes many times more code… and uglier code at that&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;What do I think? I don’t really care. To me it was cool to learn these concepts that I had forgotten since university and my new vocabulary allows me to solve the usual problems in just a few lines of code and head for an early lunch, while my mates are still writing some getter or setter…&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;What do you think?&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Calibri;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="margin: 0px;"&gt;
P.S. This is a great detaiked discussion of complex vs complicated: &lt;a href="http://lamp.epfl.ch/~odersky/blogs/isscalacomplex.html"&gt;http://lamp.epfl.ch/~odersky/blogs/isscalacomplex.html&lt;/a&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="margin: 0px;"&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;You can read the &lt;a href="wiki.homecloud.ca"&gt;wiki&lt;/a&gt;. Cheers!&lt;/div&gt;</description><link>http://blog.homecloud.ca/2012/09/omg-scala-is-complex-language.html</link><author>noreply@blogger.com (Razvan)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5540692173523218501.post-1443757056896878861</guid><pubDate>Sat, 29 Sep 2012 13:15:00 +0000</pubDate><atom:updated>2012-11-19T10:36:22.059-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">scala</category><title>Quick scala – step 1: setup</title><description>This was originally posted in Oct 2011, on the blog.coolscala.com which I'm removing.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="font-family: Calibri;"&gt;If you just want to play with scala quickly – you can use one of the few online interpreters, like &lt;/span&gt;&lt;a href="http://www.simplyscala.com/"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;http://www.simplyscala.com/&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;or &lt;/span&gt;&lt;a href="http://www.tryscala.org/"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;http://www.tryscala.org&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt; - these let you run small bits of code interactively. Otherwise, continue reading, to complete a local setup for scala development. You need these:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt 36pt; mso-list: l4 level1 lfo4; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;1.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Java&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 36pt; mso-list: l4 level1 lfo4; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;2.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Scala (command line)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 10pt 36pt; mso-list: l4 level1 lfo4; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;3.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Eclipse with the scala plugin&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="font-family: Calibri;"&gt;Installing Java:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt 36pt; mso-list: l5 level1 lfo2; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;1.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Download and install a 1.6 JDK from &lt;/span&gt;&lt;a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;http://www.oracle.com/technetwork/java/javase/downloads/index.html&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="mso-spacerun: yes;"&gt; &lt;/span&gt;. Do not use a 1.7 for this exercise and make sure you install the JDK not just the JRE. The exact link I use is: &lt;/span&gt;&lt;a href="http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u27-download-440405.html"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u27-download-440405.html&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 72pt; mso-add-space: auto; mso-list: l5 level2 lfo2; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;a.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;I recommend you use a 64 bit version, so you can allocate more memory to it&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 36pt; mso-list: l5 level1 lfo2; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;2.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Run and install somewhere, let’s say C:\bin\jdk1.6.0_27\&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 72pt; mso-add-space: auto; mso-list: l5 level2 lfo2; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;a.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;I found it a good practice to keep my development tools in c:/bin&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 72pt; mso-add-space: auto; mso-list: l5 level2 lfo2; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;b.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Make sure to check the “change destination folder” checkbox before letting the installer run…&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 36pt; mso-list: l5 level1 lfo2; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;3.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Make sure the path to java.exe is in the PATH&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 72pt; mso-add-space: auto; mso-list: l5 level2 lfo2; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;a.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Add C:\bin\jdk1.6.0_27\bin to the PATH system variable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 72pt; mso-add-space: auto; mso-list: l5 level2 lfo2; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;b.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Define a variable called JAVA_HOME with the value “C:\bin\jdk1.6.0_27\”.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 10pt 36pt; mso-list: l5 level1 lfo2; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;4.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Test it by opening a command line window and typing “java”. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="font-family: Calibri;"&gt;Installing scala command line:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt 36pt; mso-list: l1 level1 lfo3; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;1.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Download a distribution from &lt;/span&gt;&lt;a href="http://www.scala-lang.org/downloads"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;http://www.scala-lang.org/downloads&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 36pt; mso-list: l1 level1 lfo3; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;2.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Unpack it in a folder, let’s say C:/bin/scala&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 36pt; mso-list: l1 level1 lfo3; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;3.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Make sure the path to scala.bat is in your PATH&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 72pt; mso-add-space: auto; mso-list: l1 level2 lfo3; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;a.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Add C:/bin/scala/bin to the PATH system variable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 10pt 36pt; mso-list: l1 level1 lfo3; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;4.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Test it by opening a command line window and typing “scala”. You should get the scala interpreter prompt and then type“exit” to exit the interpreter.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="font-family: Calibri;"&gt;Installing Eclipse:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt 36pt; mso-list: l0 level1 lfo1; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;1.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Download &lt;span class="title4"&gt;&lt;span lang="EN" style="font-size: 12pt; line-height: 115%; mso-ansi-language: EN;"&gt;&lt;strong&gt;Eclipse Classic &lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;from the download site: &lt;/span&gt;&lt;a href="http://www.eclipse.org/downloads/packages/release/indigo/r"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;http://www.eclipse.org/downloads/packages/release/indigo/r&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 36pt; mso-list: l0 level1 lfo1; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;2.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Install it (unzip it) in C:/bin/eclipsescala&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 36pt; mso-list: l0 level1 lfo1; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;3.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;To make sure it uses the JDK you just installed (if you went that route) modify your eclipsescala/eclipse.ini and add this line:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 72pt; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;a.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;&lt;span style="background: rgb(26, 26, 26); color: #555555; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; line-height: 115%; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-theme-font: minor-bidi;"&gt;-vm&lt;/span&gt;&lt;/em&gt;&lt;i&gt;&lt;span style="background: rgb(26, 26, 26); color: #555555; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; line-height: 115%;"&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-theme-font: minor-bidi;"&gt;C:\bin\jdk1.6.0_27\bin&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 36pt; mso-list: l0 level1 lfo1; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;4.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Start it up (eclipsescala/bin/eclipse.exe)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 36pt; mso-list: l0 level1 lfo1; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;5.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Install the scala plugin&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 72pt; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;a.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Go to Help/Install new software&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 72pt; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;b.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Click on Add&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 72pt; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;c.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Type in name “scala291” and the url: &lt;/span&gt;&lt;a href="http://download.scala-ide.org/releases-29/2.0.0-beta"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;http://download.scala-ide.org/releases-29/2.0.0-beta&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 72pt; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;d.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;You can see if there is a newer version at &lt;/span&gt;&lt;a href="http://www.scala-ide.org/"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;http://www.scala-ide.org/&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 72pt; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;e.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Select this source in the drop-down&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 72pt; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;f.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Click “Select All” to select the three features&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 72pt; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;g.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Go ahead with the installation&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 36pt; mso-list: l0 level1 lfo1; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;6.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Restart Eclipse&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 36pt; mso-list: l0 level1 lfo1; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;7.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Read the detailed setups at &lt;/span&gt;&lt;a href="http://www.assembla.com/spaces/scala-ide/wiki/Setup"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;http://www.assembla.com/spaces/scala-ide/wiki/Setup&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;It is a good idea to allocate Eclipse at least 1G – I use 2G.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 10pt 36pt; mso-list: l0 level1 lfo1; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;8.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;If you changed any settings, restart Eclipse&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="font-family: Calibri;"&gt;To test your eclipse installation, select File/New/Project and see if “Scala Project” is in the list. You’ll use it for the “Hello World”exercise. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="font-family: Calibri;"&gt;Check that the sources for the scala library are setup properly:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt 36pt; mso-list: l2 level1 lfo6; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;1.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Open your project&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 36pt; mso-list: l2 level1 lfo6; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;2.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;CTRL+SHIFT+T to find types and type ‘List’&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 36pt; mso-list: l2 level1 lfo6; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;3.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Scroll down the list to find the List from scala.collection.immutable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 36pt; mso-list: l2 level1 lfo6; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;4.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Click enter – you should now see the nicely formatted source code for List&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 10pt 36pt; mso-list: l2 level1 lfo6; text-indent: -18pt;"&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;5.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;You can take a quick look but don’t despair if that code looks foreign – we’ll get there soon enough.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="font-family: Calibri;"&gt;Spruce up your Eclipse – my favorite plugins include:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt 36pt; mso-list: l3 level1 lfo5; text-indent: -18pt;"&gt;
&lt;span style="mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri; mso-hansi-font-family: Calibri;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;-&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;The GOTO plugin from, &lt;/span&gt;&lt;a href="http://muermann.org/gotofile/"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;http://muermann.org/gotofile/&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 36pt; mso-list: l3 level1 lfo5; text-indent: -18pt;"&gt;
&lt;span style="mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri; mso-hansi-font-family: Calibri;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;-&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;The Color themes plugin, from &lt;/span&gt;&lt;a href="http://www.eclipsecolorthemes.org/"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;http://www.eclipsecolorthemes.org/&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 10pt 36pt; mso-list: l3 level1 lfo5; text-indent: -18pt;"&gt;
&lt;span style="mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri; mso-hansi-font-family: Calibri;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;-&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;The VI plugin, from &lt;/span&gt;&lt;a href="http://www.viplugin.com/viplugin/"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;http://www.viplugin.com/viplugin/&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="font-family: Calibri;"&gt;Cheers – you are now setup to play with scala.&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;You can read the &lt;a href="wiki.homecloud.ca"&gt;wiki&lt;/a&gt;. Cheers!&lt;/div&gt;</description><link>http://blog.homecloud.ca/2012/09/quick-scala-step-1-setup.html</link><author>noreply@blogger.com (Razvan)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5540692173523218501.post-5146585702370175393</guid><pubDate>Fri, 24 Aug 2012 17:19:00 +0000</pubDate><atom:updated>2012-08-24T10:19:56.366-07:00</atom:updated><title>Racer kidz and wiki clubs - update</title><description>My little R&amp;amp;D into wiki domains at &lt;a href="http://www.racerkidz.com/"&gt;http://www.racerkidz.com&lt;/a&gt; seems to work fine - I add a feature evry now and then.&lt;br /&gt;
&lt;br /&gt;
You can register a &lt;a href="http://www.racerkidz.com/wiki/Category:Club"&gt;club&lt;/a&gt;, describe a &lt;a href="http://www.racerkidz.com/wiki/Category:Series"&gt;racing schedule&lt;/a&gt;, then racers can add it to their profile and automatically, via the magic of wiki xpath, see the racing calendar and the map...&lt;br /&gt;
&lt;br /&gt;
You can give it a try without an account from the home page.&lt;br /&gt;
&lt;br /&gt;
I also experimentally used it to create simple &lt;a href="http://www.racerkidz.com/wiki/Category:Blog"&gt;blogs&lt;/a&gt;, like this &lt;a href="http://www.racerkidz.com/wiki/Blog:Razie's_Enduro_School"&gt;enduro school&lt;/a&gt;. A blog has posts and that's that, see its domain definition.&lt;br /&gt;
&lt;br /&gt;
Cheers!&lt;div class="blogger-post-footer"&gt;You can read the &lt;a href="wiki.homecloud.ca"&gt;wiki&lt;/a&gt;. Cheers!&lt;/div&gt;</description><link>http://blog.homecloud.ca/2012/08/racer-kidz-and-wiki-clubs-update.html</link><author>noreply@blogger.com (Razvan)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5540692173523218501.post-3997905166229052297</guid><pubDate>Mon, 29 Mar 2010 00:23:00 +0000</pubDate><atom:updated>2010-03-28T20:11:19.861-07:00</atom:updated><title>Killing an annoying warning</title><description>The most annoying warning ever has been haunting me for a while.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;    [javac] /home/razvanc/workspace7u6/razxml/src/razie/base/data/RiXmlUtils.java:160: warning: com.sun.org.apache.xpath.internal.objects.XObject is Sun proprietary API and may be removed in a future release&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I refuse to include and move around large unnecessary libraries to deal with XML and XPATH just because Sun considers themselves the center of the universe and their internal libraries somehow more important then mine. In short, they figured there should be no way to remove this warning, although, in this case, they copied code from apache into their own libraries.&lt;br /&gt;&lt;br /&gt;Well, the solution is rather simple. Most likely everyone has specific XML wrappers. Just put them in their own project, disable the java/scala builders.  Then, build it manually, create a jar file and check it in.&lt;br /&gt;&lt;br /&gt;Then, in all the other projects, use this jar directly. Since the jar is already compiled, the annoying warning is no more.&lt;br /&gt;&lt;br /&gt;See for instance my xml utilities, at &lt;a href="http://github.com/razie/razxml"&gt;http://github.com/razie/razxml&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;What's more, I don't actually use the XML stuff directly. I wrapped it all in pretty much one single class, using XPATH for access. It's simple, fast enough and makes for very simple code: &lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;Reg.doc(MediaConfig.MEDIA_CONFIG).xpa(&lt;br /&gt;  "/config/storage/host[@name='" + Agents.me().name + "']/media/@localdir"&lt;br /&gt;)&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;For all xml data access, you should limit yourself to the xpe/xpl/xpa methods described in an earlier post (&lt;a href="http://blog.homecloud.ca/2010/02/one-xpath-to-rule-them-all.html"&gt;http://blog.homecloud.ca/2010/02/one-xpath-to-rule-them-all.html&lt;/a&gt;). So, use something like this instead: &lt;a href="http://github.com/razie/razxml/blob/master/src/razie/base/data/XmlDoc.java"&gt;http://github.com/razie/razxml/blob/master/src/razie/base/data/XmlDoc.java&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Cheers.&lt;div class="blogger-post-footer"&gt;You can read the &lt;a href="wiki.homecloud.ca"&gt;wiki&lt;/a&gt;. Cheers!&lt;/div&gt;</description><link>http://blog.homecloud.ca/2010/03/killing-annoying-warning.html</link><author>noreply@blogger.com (Razie)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5540692173523218501.post-5184369829578346258</guid><pubDate>Sun, 14 Mar 2010 01:00:00 +0000</pubDate><atom:updated>2012-11-19T10:36:50.731-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">monads</category><category domain="http://www.blogger.com/atom/ns#">scala</category><title>The Option monad pattern thing</title><description>Having options is cool...even scala's Option[A]... :)&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
One way to use Option is plain:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;code&gt;&lt;/code&gt;&lt;br /&gt;
&lt;div&gt;
&lt;code&gt;addressMap.get("John") match {&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code&gt;case Some(addr) =&amp;gt; popupMap (addr)&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code&gt;case None =&amp;gt; logError(...)&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
or "java style" (synonym with "plain ugly"):&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code&gt;&lt;/code&gt;&lt;/div&gt;
&lt;code&gt;&lt;/code&gt;&lt;br /&gt;
&lt;div&gt;
&lt;code&gt;x = addressMap.get("John").getOrElse (null)&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code&gt;if (x != null) {&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code&gt;popupMap (x)&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code&gt;} else {&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code&gt;logError(...)&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;code&gt;&lt;/code&gt;&lt;br /&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
As you use scala more, you understand why &lt;a href="http://james-iry.blogspot.com/2007/09/monads-are-elephants-part-1.html"&gt;monads are elephants&lt;/a&gt; and start doing it nice:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;code&gt;&lt;/code&gt;&lt;/div&gt;
&lt;code&gt;&lt;/code&gt;&lt;br /&gt;
&lt;div&gt;
&lt;code&gt;addressMap.foreach (popupMap(_))&lt;/code&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;code&gt;&lt;/code&gt;&lt;br /&gt;
&lt;div&gt;
&lt;code&gt;addressMap.map (_.city)&lt;/code&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;code&gt;&lt;/code&gt;&lt;br /&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
And then you start to understand it as a pattern, basically you understand there's a range of problems were options apply. Say you create a small scripting framework (the same applies to say a command pattern framework). A script's execution may return successfully and with a value, or give a syntax error or a bunch of other &lt;i&gt;options&lt;/i&gt;.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;code&gt;&lt;/code&gt;&lt;/div&gt;
&lt;code&gt;&lt;/code&gt;&lt;br /&gt;
&lt;div&gt;
&lt;code&gt;// the result of running a smart script&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;code&gt;&lt;/code&gt;&lt;br /&gt;
&lt;div&gt;
&lt;code&gt;&lt;/code&gt;&lt;br /&gt;
&lt;div&gt;
&lt;code&gt;&lt;/code&gt;&lt;br /&gt;
&lt;div&gt;
&lt;code&gt;class RSResult { &lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code&gt;def foreach (f:Any=&amp;gt;Unit) {}&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code&gt;def map (f:Any=&amp;gt;RSResult) : RSResult = RSUnsupported &lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code&gt;def getOrElse (f: =&amp;gt; Any) :Any = f&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code&gt;def jgetOrElse (f:Any) :Any = getOrElse(f)&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code&gt;case class RSSucc (res:Any) extends RSResult { &lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code&gt;override def foreach (f:Any=&amp;gt;Unit) { f(res) }&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code&gt;override def map (f:Any=&amp;gt;RSResult): RSResult = f(res)&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code&gt;override def getOrElse (f: =&amp;gt; Any) : Any = res&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code&gt;case class RSError (err:String) extends RSResult&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code&gt;object RSIncomplete  extends RSResult   // expression is incomplete...&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code&gt;object RSUnsupported extends RSResult // interactive mode unsupported&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code&gt;object RSSuccNoValue extends RSResult // successful, but no value returned&lt;/code&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;code&gt;&lt;/code&gt;&lt;br /&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
And then, of course, the methods returning these:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;code&gt;&lt;/code&gt;&lt;/div&gt;
&lt;code&gt;&lt;/code&gt;&lt;br /&gt;
&lt;div&gt;
&lt;code&gt;&lt;br /&gt;&lt;/code&gt;
&lt;script src="http://gist.github.com/335293.js?file=gistfile1.scala"&gt;&lt;/script&gt;&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
I used Any instead of [A] for simplicity, but there you have it.  The Option monad pattern thing. Pretty cool!&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;You can read the &lt;a href="wiki.homecloud.ca"&gt;wiki&lt;/a&gt;. Cheers!&lt;/div&gt;</description><link>http://blog.homecloud.ca/2010/03/option-monad-pattern-thing.html</link><author>noreply@blogger.com (Razie)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5540692173523218501.post-3974074058967684811</guid><pubDate>Tue, 02 Mar 2010 01:59:00 +0000</pubDate><atom:updated>2012-11-19T10:37:03.090-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">scala</category><title>Scripster - interactive scala REPL using telnet, http etc</title><description>As mentioned before, I think that all apps must alllow scripted/programatic access to their objects.&lt;br /&gt;
&lt;br /&gt;
I created a simple interactive gate to acces the scala REPL in any scala process. It only uses one port and supports telnet, http and swing:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://1.bp.blogspot.com/_AgcP7L_T8ZQ/S4xx55u3NyI/AAAAAAAAAFc/4zZX4Kq19S8/s1600-h/scalap.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5443851289147946786" src="http://1.bp.blogspot.com/_AgcP7L_T8ZQ/S4xx55u3NyI/AAAAAAAAAFc/4zZX4Kq19S8/s400/scalap.png" style="cursor: hand; cursor: pointer; display: block; height: 263px; margin: 0px auto 10px; text-align: center; width: 400px;" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The graphics are based on my &lt;a href="http://wiki.github.com/razie/20widgets/widgets"&gt;20widgets&lt;/a&gt; project, with the addition of a ScriptPad widget.&lt;br /&gt;
&lt;br /&gt;
Content assist is only available in the telnet version (sic!). I will work to find some nice syntax-colored controls for the web version. Switch to character mode ("mode character" on ubuntu or default on windows) and use TAB to see a list of options. Right now it's a demo only, I need to find the parser's APIs to get the real content assist options ;)&lt;br /&gt;
&lt;br /&gt;
You can download the single scripster-dist.jar file from my razpub project download, at &lt;a href="http://code.google.com/p/razpub/"&gt;http://code.google.com/p/razpub/&lt;/a&gt; and run the example with this command line (replace /host/bin/scala with your $SCALA_HOME) :&lt;br /&gt;
&lt;blockquote&gt;
&lt;br /&gt;
java -classpath ./scripster-dist.jar:/host/bin/scala/lib/scala-library.jar:/host/bin/scala/lib/scala-compiler.jar:/host/bin/scala/lib/scala-swing.jar razie.scripster.JScalapSwing&lt;/blockquote&gt;
&lt;br /&gt;
&lt;br /&gt;
To use it in your process, put these jars in your classpath and use this:&lt;br /&gt;
&lt;blockquote&gt;
razie.scripster.Scripster.create(4445)&lt;/blockquote&gt;
where 4445 is the port you want to use, see the razie.scripster.MainScripster for an example. To enable the swing version, use the swing jars as well and see the razie.scripster.MainSwingScripster class for an example.&lt;br /&gt;
&lt;br /&gt;
For further tweaking, look at the code yourself, at &lt;a href="http://github.com/razie/scripster/tree/master/src/razie/scripster/"&gt;http://github.com/razie/scripster/tree/master/src/razie/scripster/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
If you want to keep in touch with the evolution of scripster or my other related endeavours, subscribe to the &lt;a href="http://feeds.razie.com/RazvanTech"&gt;RSS feed&lt;/a&gt; or &lt;a href="http://twitter.com/razie"&gt;twitter/razie&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
Scripster's main page, kept up-to-date, is at &lt;a href="http://wiki.homecloud.ca/scripster"&gt;http://wiki.homecloud.ca/scripster&lt;/a&gt;. There's also an online live demo at &lt;a href="http://scripster.codewitter.com/"&gt;http://scripster.codewitter.com&lt;/a&gt;.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
Enjoy!&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;You can read the &lt;a href="wiki.homecloud.ca"&gt;wiki&lt;/a&gt;. Cheers!&lt;/div&gt;</description><link>http://blog.homecloud.ca/2010/03/scripster-interactive-scala-repl-using.html</link><author>noreply@blogger.com (Razie)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_AgcP7L_T8ZQ/S4xx55u3NyI/AAAAAAAAAFc/4zZX4Kq19S8/s72-c/scalap.png" height="72" width="72" /><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5540692173523218501.post-4385896714738405748</guid><pubDate>Sat, 06 Feb 2010 17:32:00 +0000</pubDate><atom:updated>2010-04-20T19:03:11.192-07:00</atom:updated><title>One XPath to rule them all!</title><description>&lt;div&gt;ABSTRACT: there's a million ways to access (data, objects, tables etc) these days and probably new ones are created every milisecond. What if we can figure out one that can be used anywhere?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Think about it!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;/Universe/Planets/Planet[@name=='earth']/@position&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;XPath was created as a natural way to address elements in an XML document. One specifies the path - starting from the root node - to the element you are addressing. Conditions help you select the right nodes from many (lists) and you can address nodes or their attributes.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Extending it to addressing trees is strait-forward, so we can apply the same paradigm to any tree-structure, like Java beans...see for instance this Apache library: &lt;a href="http://commons.apache.org/jxpath/"&gt;http://commons.apache.org/jxpath/&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Come to think about it, all direct acyclical graphs fit in the same category...of course, with small differences: selecting an edge from among many possible types and lack of a root...so, some extensions are in order:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;/Person[@name='John']/{hasFriends}Person&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What hapens here is that the node of type Person that meets the criteria was selected as the start node and then the graph walk begins. From the many relationships tying humans together, the ones of type "hasFriends" are followed and not "hasChildren". &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Yeah, you got it - even cycles are handled this way simply because as the path is walked, it reaches an end...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And... yeah, you got it again: UML domain model of classes with associations...it can describe any model you may use internally or present to clients...so we can handle pretty much any domain model described in an UML class diagram.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I found myself needing four basic operations: &lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;xpe  : T            - /** find one element */&lt;/li&gt;&lt;li&gt;xpl  : List[T]      - /** find a list of elements */&lt;/li&gt;&lt;li&gt;xpa  : String       - /** find one attribute */&lt;/li&gt;&lt;li&gt;xpla : List[String] - /** find a list of attributes */&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For the sake of being concise, I will represent this new "data access interface"as either of the versions below (with explicit type and start node or implicit):&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;val me = XP[Person] xpe ("/Person[@areGroovy=='yeah, baby!']") from john&lt;/div&gt;&lt;div&gt;val minime = xpe ("/Person[@areGroovy=='yeah, baby!']")&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So, why would this be useful?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Frankly, I'm growing old(er) and tired of all the non-sensical APIs that pop-up all the time everywhere: My application is unique! My domain model is complex! Everything could be an Object, but so what? I'm smarter! I know better!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;My answer is: nope, your application's domain model is a class diagram and your actual objects thus form a graph. I don't need you to inven new ways to interact with your objects, over a million protocols and a million forms, when we can unify it all.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It's a very simple pattern. All it requires is that users understand basic modelling and the application's domain. The same expressions would be used by everyone...if not, at least the same pattern. No more gazillion interfaces and gazillion models.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Think about communication. Can be done in 2 ways:&lt;/div&gt;&lt;div&gt; 1) blah blah blah can blah blah when blah blah and then some more blah blah&lt;/div&gt;&lt;div&gt; 2) UML&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You give me your domain model and, since you implement this simple no non-sense path-based model access, that's all I need to know. What you should focus on is documenting what the actual objects in your model: what they mean and what I can do with them once I have them.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This also enables generic graphical software creation. All I need is to have your domain model and then I can use a generic path composition tool (pick a node from a tree if you want).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It interactively explores the domain model, picking elements on the way.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In my integration work, I would love it if I didn't have to waste time writing stupidifying code over a miriad protocols just to get to what I needed.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you're wondering how exactly the data should be accessed, we'll cover that in one of the next posts on this subject, in the mean time, take JOSH to heart: JSON, OSGI, Scala, Http...thank you, Gray Lens Man!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Enough for now - will continue soon...if you're interested and impatient, you can play with my prototype at &lt;a href="http://github.com/razie/razbase/blob/master/src/razie/XP.scala"&gt;http://github.com/razie/razbase/blob/master/src/razie/XP.scala&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;You can read the &lt;a href="wiki.homecloud.ca"&gt;wiki&lt;/a&gt;. Cheers!&lt;/div&gt;</description><link>http://blog.homecloud.ca/2010/02/one-xpath-to-rule-them-all.html</link><author>noreply@blogger.com (Razie)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5540692173523218501.post-1668700720393618477</guid><pubDate>Tue, 15 Dec 2009 21:56:00 +0000</pubDate><atom:updated>2009-12-15T13:58:55.913-08:00</atom:updated><title>Counting the lines of code in a project</title><description>cd ~/src&lt;br /&gt;find . -name "*.java" -exec wc -l {} \; | awk '{ SUM += $1} END { print SUM }'&lt;br /&gt;&lt;br /&gt;this is cool...&lt;div class="blogger-post-footer"&gt;You can read the &lt;a href="wiki.homecloud.ca"&gt;wiki&lt;/a&gt;. Cheers!&lt;/div&gt;</description><link>http://blog.homecloud.ca/2009/12/counting-lines-of-code-in-project.html</link><author>noreply@blogger.com (Razie)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5540692173523218501.post-7834532526134423886</guid><pubDate>Tue, 03 Nov 2009 17:54:00 +0000</pubDate><atom:updated>2010-09-08T07:57:57.441-07:00</atom:updated><title>One Person</title><description>Abstract: You are one person, using multiple devices - why shouldn't your stuff follow YOU rather than the device? Since we don't like depending on a 3rd party, the "home" cloud is the answer?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--------- Issue&lt;br /&gt;&lt;br /&gt;Most programs today are isolated islands of functionality. The Web 2.0 transforms that, allowing you to mesh together pieces of functionality and information. The same is not true on personal computing platforms i.e. your laptop.&lt;br /&gt;&lt;br /&gt;The bookmarks you store on your laptop can't be accessed when you're on the desktop at home and vice-versa. Same for your notes and pretty much anything, unless you manually copy them etc.&lt;br /&gt;&lt;br /&gt;Option 1: store information on the web (centralised location). The one benefit of this is the ability to use that information from anywhere and any device. The drawbacks include big-brother and relying on a 3rd party for availability (including backup etc). Of course, the need to be online...although smart solutions can use local caches.&lt;br /&gt;&lt;br /&gt;The big brother issue is getting worse. As much as you trust ALL levels of government of ALL countries that may have a claim on you or your property AND all their agencies, there are more and more corporations that mine all kinds of data about your person, for different reasons. Some as benign as offering you a new credit card and some as bad as credit recovery, setting insurance premiums etc. Let's not forget identity theft.&lt;br /&gt;&lt;br /&gt;Option 2: use a home server. Basically, almost everyone has by now a server at home, which is constantly connected to the big Cloud, whether you're downloading movies or host your own blog. Why not use that instead of a 3rd party, to serve other stuff.&lt;br /&gt;&lt;br /&gt;There are many a solutions to host your own stuff and access/share from/with the world. There's lots of software to serve security camera feeds, TV programs from your home, the Windows Home Server etc...the trend is already in place.&lt;br /&gt;&lt;br /&gt;Having resolved (somewhat) the big brother and 3rd party dependency problem, there's still the issue of needing to be online.&lt;br /&gt;&lt;br /&gt;Option 3: fully distributed and synchronised personal cloud. Store information locally, on the device that creates it (like on the work desktop where you save a favourite) and synchronise all devices (peer-to-peer or properly distributed solution). The only drawback is lack of on-demand availability of the information from other devices, until the sync occurs. This can be solved however by connecting your own PC to the net...or combining with option 1 or rather 2.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;------------- Vision&lt;br /&gt;&lt;br /&gt;The vision is that of you and your information following you. In fact it's not following you...it's just "there" for you to use. Whatever computer in your "home" cloud you use, your information is there.&lt;br /&gt;I mean, will you upload ALL your favourites on facebook, just so you have them available in the living room, when you get home? I don't think so!&lt;br /&gt;&lt;br /&gt;The solution is the logical conclusion of the same debate of distributed vs. centralised that's been raging for the past few decades. All those "in the know" know that it's a wave function. Now we may be heading towards the climax of centralised internet based clouds, but, as more PERSONAL processing power becomes more online, split between more types of personal devices and connected, the trend in the other way is just a matter of time...wave, right?&lt;br /&gt;&lt;br /&gt;So, I dream of many agents, running on many personal devices, connected in your "personal" or "home" cloud, sharing all kinds of information and cooperating.&lt;br /&gt;&lt;br /&gt;So, when you mark a "favourite" on your work desktop, it automatically gets replicated on your laptop, your home desktop (the cloud's gateway) and all the computers in the house, including the one in the living-room. There's nothing left to do but, when you get home, sit down and enjoy it on the big screen!&lt;br /&gt;&lt;br /&gt;No 3rd party knows you enjoy that hardcore woodworking show or that you're trying to fix the toilet seat, no insurance company can mine that you once watched 3 illegal races on youtube etc...all usually available on your facebook or whathaveyou.&lt;br /&gt;&lt;br /&gt;-------------- The social aspect&lt;br /&gt;&lt;br /&gt;Today, no application is complete without considering the social aspect. You could obviously push some of your favourites to facebook, or share with friends in "friend" clouds.&lt;br /&gt;&lt;br /&gt;-------------- Flexibility, customisation&lt;br /&gt;&lt;br /&gt;Probably the biggest gain from a "central" cloud, like gmail etc is flexibility and customisability. Gmail is gmail is gmail. That's exactly what it does and, while you may change it's fonts and even access it remotely via an IMAP or http API (thank you, Google) that's still exactly what it does.&lt;br /&gt;&lt;br /&gt;A personal cloud, though, can be customised. You decide what it does and how it does it.&lt;br /&gt;&lt;br /&gt;-------------- try it&lt;br /&gt;&lt;br /&gt;If you want to play with such an agent, try a preview of mine, at &lt;a href="http://razpub.googlecode.com/downloads"&gt;http://razpub.googlecode.com/downloads&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Read more about it at &lt;a href="http://wiki.homecloud.ca"&gt;http://wiki.homecloud.ca&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can even try the remote favourites sharing prototype...follow this link after you downloaded, installed it and started it on several computers: http://localhost:4444/mutant/capture.html - After capturing, go to another computer in your home cloud and see the links at: http://localhost:4444/mutant/asset/Link&lt;br /&gt;&lt;br /&gt;This is written as of version 0.x so the links may change - the use case however will be maintained up-to-date in the wiki, at &lt;a href="http://wiki.homecloud.ca/savedlink"&gt;http://wiki.homecloud.ca/savedlink&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;You can read the &lt;a href="wiki.homecloud.ca"&gt;wiki&lt;/a&gt;. Cheers!&lt;/div&gt;</description><link>http://blog.homecloud.ca/2009/11/one-person.html</link><author>noreply@blogger.com (Razie)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5540692173523218501.post-6779949381507811765</guid><pubDate>Fri, 02 Oct 2009 12:53:00 +0000</pubDate><atom:updated>2009-10-02T06:00:14.706-07:00</atom:updated><title>Modern Applications</title><description>ABSTRACT: today it is unacceptable to have any application built as an independent islands of functionality. It is necessary to expose functionality via simple protocols (http).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Really, it is unacceptable today to have any application built as an independent piece of functionality. No application is or should be complex enough to do EVERYTHING. Thus, since we do not view our users as the mandatory human servers of the omnipotent computer -- with the noble lifetime goal of clicking through the menus, dialogs, wizards and buttons that the all-mighty programmer has imposed on them -- all application components NEED TO OFFER API-based access to a basic set of services/functions/objects/whathaveyou.&lt;br /&gt;&lt;br /&gt;These span a large number of functional areas, from controlling the application remotely, scripting its behavior, input/output/logging etc, so we'll take them one-by-one in future posts.&lt;br /&gt;&lt;br /&gt;Point being that applications become interoperable and subject to automation. There's no other way really to automatically turn down the volume of the DVD player because you answered a call on skype! OR have a tweet on your cellphone when the torrent has finished donwloading the latest CBC show.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--- Interoperability == standardisation?&lt;br /&gt;&lt;br /&gt;This thinking is normal to any Unix hacker, since they allways did "find|grep|cut|wc|sort" but it seems too complicated for anybody else to comprehend, especially window-heads.&lt;br /&gt;&lt;br /&gt;With physical devices, standardisation is, granted, not easy. Standards arise from a need which is already fulfilled by existing devices, cables and plugs. Then the plugs get standardised and devices become interoperable.&lt;br /&gt;&lt;br /&gt;The same was true in the software world (find|grep), but it's been false for a long time, especially since the advent of the stupidifying mouse and the un-parseable pixel.&lt;br /&gt;&lt;br /&gt;Command lines have always been around and http has also been around for a long time. There really is no reason not to combine both, when all you want is users to use the functionality your code has to offer.&lt;br /&gt;&lt;br /&gt;Ideally, all applications would be certified as "open" and "interoperable" and we will get there, in time. DLNA/UPNP is an example of such an interoperable framework, including certification. So is OSS/J (a set of telecom APIs) and others.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--- using http at rest to describe and interact with the object-oriented world&lt;br /&gt;&lt;br /&gt;So, what should ideally happen? We'd have unified protocols for access and interoperability. HTTP, telnet, command lines come to mind. Formats are also an obvious need: HTML/XML/JSON/text. Let REST dictate how things work, but only a modicum of human intervention can be mandated.&lt;br /&gt;&lt;br /&gt;Beyond the needs, there's the wants. We'd like that each would expose their internal models (objects, services, methods, actions, functionality) in a standard way, parseable and understandable by others.&lt;br /&gt;&lt;br /&gt;If you extend that to the interoperable web, you get the semantic web. Well, almost, since that's been designed by DBAs - they'd like to call it the "data web" and hide logic in a view that offers more data :). Sorry, couldn't help it!&lt;br /&gt;&lt;br /&gt;I live in a world surrounded by objects I'm interacting with. Data/information has a very important role to play, but it's not the end-all. My newspaper can not only filter for me the latest developments on that accident, but can also manage my account and micro-payments. Having knowledge of an intermediary PayPal only serves to confuse me and keep my mind busy with concepts I don't care about, since i already told my "gate keeper" that I trust my newspaper somewhat...&lt;br /&gt;&lt;br /&gt;The semantic web guys have it right, though. Exposing standardized schemas of the applications's objects and functionalities is the way to go. Scoping these (my "train" is different than your "train") makes obvious sense (think namespaces).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;---- So, vat do you vant?&lt;br /&gt;&lt;br /&gt;In the B2B universe (now turned SOA) there's lots of WS-based standards, including security, identity exchange etc. These don't bode well on the web, though. Why write things twice? It has to be simple-over-http. PERIOD, dumby.&lt;br /&gt;&lt;br /&gt;So, each modern application has:&lt;br /&gt;- embedded http server&lt;br /&gt;- exposing functionality/internal models etc&lt;br /&gt;- designed to be interoperable&lt;br /&gt;&lt;br /&gt;I would like everyone to stop buying and using any application that doesn't meet these criteria. Harsh, but then i'm in a bad mood today...&lt;br /&gt;&lt;br /&gt;------ So, what's a developer to do?&lt;br /&gt;&lt;br /&gt;Embed an http server. In case you need a small, lightweight embedded web server, checkout my public project at http://razpub.googlecode.com . There's lots of others out there - actually I recommend you get one that supports the servlet standard and you do servlets.&lt;br /&gt;&lt;br /&gt;Think about and define your business model, spell out your domain entities. Use less services and more objects when defining your API and bode nicely with REST.&lt;br /&gt;&lt;br /&gt;Define your model in whatever format you want - just make sure it's an xml file :). We'll deal with these in a future post, but for now it must be objcet-oriented: each 'class' has 'attributes' and 'methods'. The methods have a name and a list of arguments. Keep all types to String for now...assume all interaction is via URLs, which can't marshal bytecode - that's something we'll have to deal with.&lt;br /&gt;&lt;br /&gt;Offer access to the entire business model via http, including content (values) and control (invoked methods).&lt;br /&gt;&lt;br /&gt;Document all this very nicely in an embedded set of html pages. No smarts neccessary. Simple solutions always work better than complex ones.&lt;br /&gt;&lt;br /&gt;If you're looking for an asset/modelling/http object interface framework, checkout the &lt;a href="http://code.google.com/p/razpub/source/browse/trunk/razpub/src/com/razie/pub/assets/package-info.java"&gt;com.razie.pub.assets&lt;/a&gt; package of my razpub project.&lt;br /&gt;&lt;br /&gt;Stick to the REST principles for now, until my "REST is bad" post is posted.&lt;br /&gt;&lt;br /&gt;Modularity - allow extensions of functionality. Since the future is OSGi, may I suggest an OSGi compliant server - mine will be but it's not.&lt;br /&gt;&lt;br /&gt;And generally, don't forget to have fun!&lt;br /&gt;&lt;br /&gt;P.S. Just to give a concrete example, the VLC player is a great one. It has several interfaces, including telnet and http and you start whichever you want...&lt;div class="blogger-post-footer"&gt;You can read the &lt;a href="wiki.homecloud.ca"&gt;wiki&lt;/a&gt;. Cheers!&lt;/div&gt;</description><link>http://blog.homecloud.ca/2009/10/modern-applications.html</link><author>noreply@blogger.com (Razie)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5540692173523218501.post-1295961565210807797</guid><pubDate>Thu, 04 Jun 2009 15:58:00 +0000</pubDate><atom:updated>2009-06-04T09:07:53.586-07:00</atom:updated><title>What's up with the home cloud?</title><description>&lt;p&gt;ABSTRACT: An abstract description of what I'm up to here.&lt;br /&gt;&lt;br /&gt;I am generally frustrated with the state of software - and have been, for a long time. People love to reinvent the wheel all the time, make life miserable for the users that don't stick to base use cases etc.&lt;br /&gt;&lt;br /&gt;I have some suggestions on how applications should be written and how the (software) world should look like. This is of course just one of the directions in which we could evolve but it's the one that seems to me to make the most sense.&lt;br /&gt;&lt;br /&gt;There are quite a few components to this picture so you'll have to bear with me over the course of several separate blogs on related topics and, at the end, we'll put everything together.&lt;br /&gt;&lt;br /&gt;There will be three different levels of this new "architecture", bottoms up:&lt;br /&gt;&lt;br /&gt;1. The basic idea is that there are certain things that are necessary to include in ANY software component of any kind, for instance exposing an API to access and manage the internal objects, data and functionality.&lt;br /&gt;&lt;br /&gt;2. A generic distributed application support framework will then use these to generate the "home cloud" - a cloud of interacting devices and objects under your personal, direct and total control.&lt;br /&gt;&lt;br /&gt;3. From here, moving to the web, you can have clusters of clouds of different functionalities, completely removing the necessity for centralized software.&lt;br /&gt;&lt;br /&gt;4. On top of these, there are different functionalities and specific use cases, such as "using identities", synchronizing files etc. I am not happy with the way these are handled by existing software, so you'll get a chance to hear my opinion.&lt;br /&gt;&lt;br /&gt;It will take me a while to put each into words and sample code. I'm not just blogging here, I'm also putting together a framework to test all these concepts, hopefully good enough that it will be used by others. You can get a glimpse and keep tabs on that here &lt;a href="http://razpub.googlecode.com/"&gt;http://razpub.googlecode.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I will try to blog at least once a month, so a somewhat complete picture will form this year, but don't hold either your breath or me to it.&lt;br /&gt;&lt;br /&gt;Intended audience: mixed. The blogs are individually searchable, so a personal review of the "Windows Live Sync" for instance will benefit anyone searching for that kind of stuff. I will try to categorize each blog, to benefit the followers.&lt;br /&gt;&lt;br /&gt;I tend to be terse, so be ready to fire up your brain and read between the words. Non software-development professionals may have a hard time with my terseness and techie wor(d) games...they'll figure it out fast and stop reading.&lt;br /&gt;&lt;br /&gt;I think that's all for now - I'll end this here and start working on the next month's blog.&lt;br /&gt;&lt;br /&gt;Have fun! &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;You can read the &lt;a href="wiki.homecloud.ca"&gt;wiki&lt;/a&gt;. Cheers!&lt;/div&gt;</description><link>http://blog.homecloud.ca/2009/06/whats-up-with-home-cloud.html</link><author>noreply@blogger.com (Razie)</author><thr:total>0</thr:total></item></channel></rss>
