<?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></description><title>ActsAsFlinn</title><generator>Tumblr (3.0; @actsasflinn)</generator><link>http://actsasflinn.com/</link><item><title>Scala Stuff I'm excited about</title><description>&lt;p&gt;For around the last 5 years I&amp;#8217;ve been big into Ruby (Rails and friends).  Lately though I&amp;#8217;ve been working on a few projects in Scala.  Scala&amp;#8217;s been around for almost a decade but only recently it seems to have developed a larger community and better tools.  As I&amp;#8217;ve been working with Scala in my day to day I&amp;#8217;m getting really enthusiastic about some of the tools that I think make Scala really great to work with.&lt;/p&gt;
&lt;p&gt;So here&amp;#8217;s a quick list of what I&amp;#8217;m working with and why I like it.&lt;/p&gt;
&lt;p&gt;1. &lt;a target="_blank" href="http://scalate.fusesource.org/"&gt;Scalate&lt;/a&gt; - Scala Template Engine: like JSP without the crap but with added Scala coolness.&lt;/p&gt;
&lt;p&gt;As it states, Scalate is a template engine.  It&amp;#8217;s somewhat generic though and supports a few different dialects.  I haven&amp;#8217;t worked with it yet but it supports a Scala dialect of HAML called Scaml which looks very promising.  I&amp;#8217;m a long time user of Haml so this gets me excited.&lt;/p&gt;
&lt;p&gt;It also supports &lt;a href="http://mustache.github.com/"&gt;Mustache&lt;/a&gt; templates which is what brought me to use Scalate in the first place.  I love working with Mustache because it&amp;#8217;s a simple and logic-less approach (the right approach) to templates.&lt;/p&gt;
&lt;p&gt;2. &lt;a target="_blank" href="http://circumflex.ru/orm.html"&gt;Circumflex ORM&lt;/a&gt; - lightweight Web framework and ORM for Scala&lt;/p&gt;
&lt;p&gt;Circumflex is a larger project at it&amp;#8217;s core to provide a web framework (inspired by Ruby&amp;#8217;s Sinatra micro-framework), Markdown and &lt;a href="http://freemarker.org/"&gt;Freemaker&lt;/a&gt; template processing and ORM.  I&amp;#8217;ve been working with the ORM which is relatively new so I&amp;#8217;ve submitted a few patches where I felt like it was needed.  The ORM package is interesting in that it features a SQL-like Scala DSL.  Here&amp;#8217;s an example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
class Country extends Record[Country] {
  val code = "code" VARCHAR(2) DEFAULT("'ch'") NOT_NULL
  val name = "name" TEXT
}

object Country extends Table[Country] {
  def findByCode(code: String): Option[Country] = {
    val co = this AS "co"
    val q = SELECT (co.*) FROM co WHERE (co.code LIKE code)
    return q.unique
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Obviously a very interesting way to interface with relational databases.  It also supports generic `get` by id and `all` methods Rails style validations, query caching and some other goodies.  It&amp;#8217;s an up and coming project so obviously it&amp;#8217;s not perfect but given the choice between programming with Circumflex ORM vs JPA I think Circumflex offers a much better programming model &amp;lt;/flamebate&amp;gt;.&lt;/p&gt;
&lt;p&gt;3. &lt;a href="http://github.com/scalatra/scalatra"&gt;Scalatra&lt;/a&gt; (formerly Step) - Tiny Scala web framework, inspired by Sinatra&lt;/p&gt;
&lt;p&gt;Scalatra is a micro-framework inspired by Ruby&amp;#8217;s &lt;a href="http://www.sinatrarb.com/"&gt;Sinatra&lt;/a&gt;.  It&amp;#8217;s very simple to create named paths via HTTP verbs (GET, POST, PUT, DELETE, etc.) not unlike JAX-RS but with out all the annotations and other malarkey.  Scalatra also supports Scalate so you get Haml and Mustache style templates with only a few lines of code!&lt;/p&gt;
&lt;p&gt;Here&amp;#8217;s a quick example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
class ScalatraExample extends ScalatraServlet {
  // send a text/html content type back each time
  before {
    contentType = "text/html"
  }

  // respond to '/' with a greeting
  get("/") {
    &amp;lt;h1&amp;gt;Hello world!&amp;lt;/h1&amp;gt;
  }

  // send redirect headers
  get("/see_ya") {
    redirect("http://google.com")
  }

  // parse matching requests, saving things prefixed with ':' as params
  get("/date/:year/:month/:day") {
    &amp;lt;ul&amp;gt;
      &amp;lt;li&amp;gt;Year: {params("year")}&amp;lt;/li&amp;gt;
      &amp;lt;li&amp;gt;Month: {params("month")}&amp;lt;/li&amp;gt;
      &amp;lt;li&amp;gt;Day: {params("day")}&amp;lt;/li&amp;gt;
    &amp;lt;/ul&amp;gt;
  }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;4. &lt;a href="http://github.com/shorrockin/cascal"&gt;Cascal&lt;/a&gt; - a high-level scala based cassandra library&lt;/p&gt;
&lt;p&gt;Cascal is as it&amp;#8217;s name and description implies a Scala interface for the NoSQL database Apache &lt;a href="http://cassandra.apache.org/"&gt;Cassandra&lt;/a&gt;.  I&amp;#8217;ve been testing Cassandra as a high throughput buffer for a write intensive API and so far it live up to the hype.  Cascal seems to offer the most native Scala interface.  Of course there are several others out there, Cliff Moon&amp;#8217;s &lt;a href="http://github.com/cliffmoon/scromium"&gt;Scromium&lt;/a&gt; looks promising.&lt;/p&gt;
&lt;p&gt;And there&amp;#8217;s plenty more to come.  Coming from the Ruby world I&amp;#8217;m finding Scala to be a great middle ground between Ruby and Java.  It brings with it a vast array of high quality libraries that can sometimes be lacking in the Ruby world.  Getting into Scala has introduced me to these great tools and plenty more existing Java libraries.. &lt;a href="http://fusesource.com/forge/sites/hawtdb/"&gt;HawtDB&lt;/a&gt;, &lt;a href="http://www.playframework.org/"&gt;Play!&lt;/a&gt;, &lt;a href="http://hazelcast.com/"&gt;Hazelcast&lt;/a&gt;, etc.&lt;/p&gt;</description><link>http://actsasflinn.com/post/900487132</link><guid>http://actsasflinn.com/post/900487132</guid><pubDate>Tue, 03 Aug 2010 20:56:00 -0400</pubDate><category>scala</category><category>scalate</category><category>scalatra</category><category>circumflex</category><category>mustache</category><category>orm</category><category>cassandra</category></item><item><title>Kyoto Cabinet patch fix compatibility on Mac OSX Snow Leopard (Kyoto Cabinet 0.9.9)</title><description>&lt;p&gt;This patch will allow you to compile Kyoto Cabinet 0.9.9 on Mac OS X 10.6 (Snow Leopard).&lt;/p&gt;
&lt;script src="http://gist.github.com/352706.js?file=kyoto_cabinet_099_snow_leopard_compatibility.patch"&gt;&lt;/script&gt;</description><link>http://actsasflinn.com/post/490349789</link><guid>http://actsasflinn.com/post/490349789</guid><pubDate>Thu, 01 Apr 2010 23:23:24 -0400</pubDate><category>kyoto cabinet</category><category>tokyo cabinet</category><category>nosql</category><category>patch</category></item><item><title>Tokyo Tyrant patch fix unix sockets on Mac OSX Snow Leopard</title><description>&lt;p&gt;On Mac OSX 10.6 (Snow Leopard) I receive this warning during make:&lt;/p&gt;
&lt;blockquote&gt;ttutil.c: In function ‘ttopenservsockunix’: &lt;br/&gt;ttutil.c:190: warning: call to __builtin___snprintf_chk will always overflow destination buffer &lt;br/&gt;ttutil.c: In function ‘ttopensockunix’: &lt;br/&gt;ttutil.c:130: warning: call to __builtin___snprintf_chk will always overflow destination buffer &lt;br/&gt;&lt;/blockquote&gt;
&lt;p&gt;I then receive this error when attempting to start ttserver using a socket: &lt;/p&gt;
&lt;blockquote&gt;$ ttserver -host /tmp/ttserver.sock -port 0 worker.tct &lt;br/&gt;2010-03-13T00:46:42-05:00       SYSTEM  &amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;- logging started [18312] &amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212; &lt;br/&gt;2010-03-13T00:46:42-05:00       SYSTEM  server configuration: host=/tmp/ttserver.sock port=0 &lt;br/&gt;2010-03-13T00:46:42-05:00       SYSTEM  maximum connection: 8191 &lt;br/&gt;2010-03-13T00:46:42-05:00       SYSTEM  opening the database: worker.tct &lt;br/&gt;Abort trap &lt;br/&gt;&lt;/blockquote&gt;
&lt;p&gt;The following patch applies to Tokyo Tyrant 1.1.40 and fixes the issues and passes tests.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ve also forwarded this to Mikio Hirabayashi. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://gist.github.com/raw/348633/32561ebf6487650ce86d0184f0ca35bb8110d04c/macosx_snow_leopard_socket_fix.patch"&gt;Download&lt;/a&gt;&lt;/p&gt;
&lt;script src="http://gist.github.com/348633.js?file=macosx_snow_leopard_socket_fix.patch"&gt;&lt;/script&gt;</description><link>http://actsasflinn.com/post/482955247</link><guid>http://actsasflinn.com/post/482955247</guid><pubDate>Mon, 29 Mar 2010 21:12:00 -0400</pubDate><category>tokyo cabinet</category><category>tokyo tyrant</category><category>patch</category><category>nosql</category></item><item><title>Tokyo Cabinet patch to add B+ Tree traversal commands</title><description>&lt;p&gt;The following is a patch that adds support for two commands iterrec and iterout, for dealing with B+ Tree databases.  The commands are not currently available via misc and are not available via Tokyo Tyrant&amp;#8217;s Lua extension.  The purpose of this addition is to expose list management functions to Tokyo Tyrant via TCADB.  Adding these commands would allow you to write tcrdbmisc based functions for remote management of B+ Tree lists.&lt;/p&gt;
&lt;p&gt;The patch is meant for Tokyo Cabinet 1.4.43&lt;/p&gt;
&lt;p&gt;&lt;a href="http://gist.github.com/raw/348619/0743f66f1dbc77247de1fa5418f7f86d0e9f75d6/tcadb_misc_iterrec_iterout_for_bdb.patch"&gt;Download&lt;/a&gt;&lt;/p&gt;
&lt;script src="http://gist.github.com/348619.js?file=tcadb_misc_iterrec_iterout_for_bdb.patch"&gt;&lt;/script&gt;</description><link>http://actsasflinn.com/post/482927072</link><guid>http://actsasflinn.com/post/482927072</guid><pubDate>Mon, 29 Mar 2010 20:59:00 -0400</pubDate><category>tokyo cabinet</category><category>tokyo tyrant</category><category>patch</category><category>nosql</category></item><item><title>Versatile Storage Options With Tokyo Cabinet 



View more...</title><description>&lt;embed type="application/x-shockwave-flash" src="http://assets.tumblr.com/swf/audio_player_black.swf?audio_file=http://www.tumblr.com/audio_file/473806917/tumblr_kzvaj18eRv1qzb823&amp;color=FFFFFF" height="27" width="207" quality="best" wmode="opaque"&gt;&lt;/embed&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;strong&gt;&lt;a title="Versatile Storage Options With Tokyo Cabinet" href="http://www.slideshare.net/actsasflinn/versatile-storage-options-with-tokyo-cabinet"&gt;Versatile Storage Options With Tokyo Cabinet&lt;/a&gt;&lt;/strong&gt; 
&lt;object type="application/futuresplash" width="425" height="355"&gt;
&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=versatilestorageoptionswithtokyocabinet-100313142857-phpapp01&amp;stripped_title=versatile-storage-options-with-tokyo-cabinet"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=versatilestorageoptionswithtokyocabinet-100313142857-phpapp01&amp;stripped_title=versatile-storage-options-with-tokyo-cabinet" type="application/futuresplash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;
&lt;/p&gt;
&lt;p&gt;View more &lt;a href="http://www.slideshare.net/"&gt;presentations&lt;/a&gt; from &lt;a href="http://www.slideshare.net/actsasflinn"&gt;actsasflinn&lt;/a&gt;.&lt;/p&gt;</description><link>http://actsasflinn.com/post/473806917</link><guid>http://actsasflinn.com/post/473806917</guid><pubDate>Thu, 25 Mar 2010 22:24:00 -0400</pubDate><category>tokyo cabinet</category><category>tokyo tyrant</category><category>nosql</category><category>ruby</category></item></channel></rss>

