<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>

  var _gaq = _gaq || [];
  _gaq.push([‘_setAccount’, ‘UA-23488216-1’]);
  _gaq.push([‘_setDomainName’, ‘.erikbryn.com’]);
  _gaq.push([‘_trackPageview’]);

  (function() {
    var ga = document.createElement(‘script’); ga.type = ‘text/javascript’; ga.async = true;
    ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘.google-analytics.com/ga.js’;
    var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(ga, s);
  })();</description><title>i'm erik.</title><generator>Tumblr (3.0; @ebryn)</generator><link>http://erikbryn.com/</link><item><title>Tips for using CoffeeScript with SproutCore</title><description>&lt;p&gt;CoffeeScript is all the rage these days. SproutCore is one of the prominent client-side JS frameworks (and my favorite). Here&amp;#8217;s how to use them together.&lt;/p&gt;

&lt;ol&gt;&lt;li&gt;&lt;p&gt;Create a SproutCore app&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sc-init Todos --template
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Get the sproutcore-coffeescript gem and add settings to your Buildfile.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;begin
  gem "sproutcore-coffeescript", "~&amp;gt; 0.1.4"
  require "sproutcore-coffeescript"
rescue LoadError
  puts "sproutcore-coffeescript not installed, please run:\n\n  gem install sproutcore coffeescript\n\n"
  exit
end
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Rename todos.js to todos.coffee&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Modify the SC boilerplate code to be CoffeeScript-compliant&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Get hacking!&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;CoffeeScript syntax tips:&lt;/p&gt;

&lt;p&gt;SproutCore&amp;#8217;s computed property definitions require you to call .property on a function object. This is the best way I&amp;#8217;ve figured out how to do this with CoffeeScript:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;( -&amp;gt; contents of function ).property('dependent properties')
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You just need to wrap the function declaration in parenthesis in order to call the property function on it. The parenthesis can span multiple lines too:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;( -&amp;gt;
  multiple()
  lines()
  ofCode()
).property('dependent properties')
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Hope that helps!&lt;/p&gt;</description><link>http://erikbryn.com/post/5671454066</link><guid>http://erikbryn.com/post/5671454066</guid><pubDate>Fri, 20 May 2011 14:23:00 -0400</pubDate></item><item><title>I’ve got a borrowed Nexus S. I’ll be reviewing...</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_ll1t2cIeF21qbqkdjo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;I’ve got a borrowed Nexus S. I’ll be reviewing Android soon.&lt;/p&gt;</description><link>http://erikbryn.com/post/5398683162</link><guid>http://erikbryn.com/post/5398683162</guid><pubDate>Wed, 11 May 2011 16:32:36 -0400</pubDate></item></channel></rss>

