<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>My name is Emanuel Carnevale, I write about software and technology, I also keep another tumblelog An onigiri a day and take pictures.
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

var pageTracker = _gat._getTracker("UA-5711858-1");
pageTracker._trackPageview();
</description><title>Emanuel Carnevale's Blog</title><generator>Tumblr (3.0; @emanuelcarnevale)</generator><link>http://blog.emanuelcarnevale.com/</link><item><title>"Because CouchDB is aimed squarely at the line between the desktop and the cloud, Couch disrupts a..."</title><description>“Because CouchDB is aimed squarely at the line between the desktop and the cloud, Couch disrupts a lot of the web-physics we’re accustomed too. […] In a CouchDB-enabled web, data-flows don’t have to be centralized, which means friends can communicate without going through a fixed domain. This makes the web more efficient. It also means I can make data available to my social network without relying on 3rd-party services.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;a href="http://jchrisa.net/drl/_design/sofa/_show/post/What-CouchDB-brings-to-HTML5"&gt;What CouchDB brings to HTML5 : Daytime Running Lights&lt;/a&gt;&lt;/em&gt;</description><link>http://blog.emanuelcarnevale.com/post/325282631</link><guid>http://blog.emanuelcarnevale.com/post/325282631</guid><pubDate>Sat, 09 Jan 2010 11:37:02 -0500</pubDate></item><item><title>"I hear people saying “JSON is great, XML is over”, but I don’t hear XML partisans saying anything..."</title><description>“I hear people saying “JSON is great, XML is over”, but I don’t hear XML partisans saying anything bad about JSON. There are two arguments that are over, though. It seems to me that the great thing about JSON is that it exists for one purpose: to put structs on the wire. With XML, on the other hand, it’s assumed that you might want to stream it in by the gigabyte, or load it into one of a many different in-memory data structures, or run a full-text indexer over the contents, or render it for human consumption, or, well, anything.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;a href="http://www.tbray.org/ongoing/When/200x/2006/12/21/JSON"&gt;ongoing · JSON and XML&lt;/a&gt;&lt;/em&gt;</description><link>http://blog.emanuelcarnevale.com/post/170350738</link><guid>http://blog.emanuelcarnevale.com/post/170350738</guid><pubDate>Mon, 24 Aug 2009 06:29:55 -0400</pubDate></item><item><title>CocoaDev: NSZombieEnabled</title><description>&lt;a href="http://cocoadev.com/index.pl?NSZombieEnabled"&gt;CocoaDev: NSZombieEnabled&lt;/a&gt;: &lt;p&gt;NSZombieEnabled is an environment variable which controls whether the Foundation runtime will use zombies. When zombies are enabled, a deallocated object’s class is dynamically changed to be _NSZombie, and by default, the memory region is never marked as free, although this can be controlled separately.
The end result is that, with zombies enabled, messages to deallocated objects will no longer behave strangely or crash in difficult-to-understand ways, but will instead log a message and die in a predictable and debugger-breakpointable way. This is the tool to use when trying to track down over-releases and premature releases.&lt;/p&gt;</description><link>http://blog.emanuelcarnevale.com/post/111096428</link><guid>http://blog.emanuelcarnevale.com/post/111096428</guid><pubDate>Thu, 21 May 2009 15:24:47 -0400</pubDate></item><item><title>"A pass through the MRI source code reveals that the the Array.sort! is implemented via quicksort...."</title><description>“A pass through the MRI source code reveals that the the Array.sort! is implemented via quicksort. And while the benchmarks do show a four times performance hit when compared to the raw C++ version sorting an array of integers, you have to remember that an equivalent implementation in Ruby is operating on array of integer objects! In other words, native Array.sort! is a highly optimized piece of code: use it, embrace it, and don’t worry about it!”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;p&gt;&lt;a href="http://www.igvita.com/2009/03/26/ruby-algorithms-sorting-trie-heaps/"&gt;Ruby Algorithms: Sorting, Trie &amp; Heaps - igvita.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A recommended reading.&lt;/p&gt;&lt;/em&gt;</description><link>http://blog.emanuelcarnevale.com/post/90353477</link><guid>http://blog.emanuelcarnevale.com/post/90353477</guid><pubDate>Fri, 27 Mar 2009 10:42:43 -0400</pubDate></item><item><title>Simple rate-limiting algorithm?</title><description>&lt;p&gt;&lt;a href="http://www.marco.org/85838404"&gt;marco&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;But I can’t figure out a way to do a rolling 60-second period without storing every hit and its timestamp within the rolling window. Is there a good algorithm for doing that in constant space and time (maybe a trick using averages?), or am I pretty much stuck with the fixed calendar-window method?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;My proposed solution:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;public function allow_hit($id, $limit_per_minute)
{
    $min = idate('i');
    $sec  = idate('s');
    $key = md5($id) . ($min-1) . $sec;
    $count = intval(Cache::get('rate-limiter', $key));
    if($count == 0) { $key = md5($id) . $min . $sec; }
    elseif ($count &gt; $limit_per_minute) return false;
    Cache::set('rate-limiter', $key, $count + 1, /* ttl */ 60);
    return true;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;code&gt;($min-1)&lt;/code&gt; it doesn’t always work since it’s not modulo 60. I know it, but solving that is trivial, so I didn’t bother implementing it.
Hope this helps.&lt;/p&gt;</description><link>http://blog.emanuelcarnevale.com/post/85889194</link><guid>http://blog.emanuelcarnevale.com/post/85889194</guid><pubDate>Thu, 12 Mar 2009 15:06:44 -0400</pubDate></item><item><title>GreaseMonkey? I Hardly Know Her</title><description>&lt;p&gt;I really like all the works by &lt;a href="http://jstn.cc"&gt;Justin&lt;/a&gt;, from Muxtape to his amazing shots at chromogenic.net, including his own window on the flickrverse: &lt;a href="http://ihardlyknowher.com"&gt;I hardly Know Her&lt;/a&gt; and I share a passion for minimalist design.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://gist.github.com/76890"&gt;Here&lt;/a&gt; there is a quick GreaseMonkey script that subtly redirects you to the IHKH equivalent of the flickr page you are looking at, &lt;em&gt;provided the owner authorised its publishing&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Anyway, it’s easier to try than to explain, especially while I’m squeezing the writing of the script and this post in my lunch break ;)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;
To install it easily, just click &lt;a href="http://gist.github.com/raw/76890/dab003f90bb733c44ead8b04793930b7b255d687/ihardlyknowher.user.js"&gt;here&lt;/a&gt; within Firefox.&lt;/p&gt;

&lt;p&gt;&lt;br/&gt;&lt;script src="http://gist.github.com/76890.js"&gt;&lt;/script&gt;&lt;/p&gt;</description><link>http://blog.emanuelcarnevale.com/post/85200318</link><guid>http://blog.emanuelcarnevale.com/post/85200318</guid><pubDate>Tue, 10 Mar 2009 09:46:00 -0400</pubDate></item><item><title>instapaper:

I’ve also consolidated some terminology to be more...</title><description>&lt;img src="http://28.media.tumblr.com/M1Uu3MXnGkjz6413SqMgSKU8o1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://blog.instapaper.com/post/82648498"&gt;instapaper&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;I’ve also consolidated some terminology to be more consistent everywhere: “Archive” is gone and has been replaced by “Deleted”. You can still permanently delete articles so that they don’t even show up in the “Deleted” section — just find them in the Deleted section and hit the red “×” button again.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;No no no… call it archive, please! Not delete.
Except this, great to see the birth of the starred category!&lt;/p&gt;</description><link>http://blog.emanuelcarnevale.com/post/82823179</link><guid>http://blog.emanuelcarnevale.com/post/82823179</guid><pubDate>Mon, 02 Mar 2009 10:06:55 -0500</pubDate></item><item><title>Tumblerette is now the official Tumblr iPhone App!  (and it's free!)</title><description>&lt;a href="http://staff.tumblr.com/post/81463386/iphone-app"&gt;Tumblerette is now the official Tumblr iPhone App!  (and it's free!)&lt;/a&gt;: &lt;p&gt;I bet I’ll be the only one absolutely not thrilled about this news, but really sad instead.
Tumblerette’s and Tumblr API main drawback was the lack of API for accessing to a Dashboard, so I made a parser and was writing my own iPhone Dashboard app.&lt;/p&gt;

&lt;p&gt;This idea grew from a major itch I had: not being able to read and properly follow my dashboard &lt;em&gt;on the road&lt;/em&gt;: MobileSafari memory management flakiness was too much to bear while reading new posts.&lt;/p&gt;

&lt;p&gt;But now with a &lt;em&gt;free&lt;/em&gt; and &lt;em&gt;officially&lt;/em&gt; backed by Tumblr app, my app is nowhere to go, or at least for the meanwhile. I’d better start considering new apps to develop.&lt;/p&gt;

&lt;p&gt;Last month hacking nights are not completely wasted since I learned a lot, but still…
Anyway, congratulations to everyone and at least I’ll have a great app to use.&lt;/p&gt;</description><link>http://blog.emanuelcarnevale.com/post/81488086</link><guid>http://blog.emanuelcarnevale.com/post/81488086</guid><pubDate>Wed, 25 Feb 2009 15:54:52 -0500</pubDate></item><item><title>Get Pinyin readings from Chinese Ideograms with Ubiquity</title><description>&lt;p&gt;Mozilla’s &lt;a href="http://ubiquity.mozilla.com"&gt;Ubiquity&lt;/a&gt; is a wonderful thing, especially for an avid Quicksilver user as I am. Nowadays I live in the browser and having this tool across &lt;em&gt;all&lt;/em&gt; the platforms I use it’s priceless.&lt;/p&gt;

&lt;p&gt;Since the first version I wanted to contribute with some code for the engine or with some commands, but I got overwhelmed and only recently I caved in.&lt;/p&gt;

&lt;p&gt;I actually wrote my first Ubiquity command almost a month ago, but I never got around to post a blog post to &lt;em&gt;publish&lt;/em&gt; it. It queries my &lt;a href="http://blog.emanuelcarnevale.com/post/51710085/json-and-chinese-characters"&gt;json-zh service&lt;/a&gt; for the pinyin character of the selected chinese text and gives you 3 way to deal with the result putting it in the&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;clipboard,&lt;/li&gt;
&lt;li&gt;replacing the &lt;strong&gt;selected text&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;or in a &lt;strong&gt;displayed message&lt;/strong&gt; using Ubiquity’s notification method.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The code is really simple and using the embedded editor is amazing, except that I’d love some debugging facilities.&lt;/p&gt;

&lt;p&gt;Working with optional arguments led me thinking about concatenated commands and a way to solve the problem of chaining them. Material for another post or (finally) a message in the ML: guys, you write too much and I barely keep the pace just reading the subjects ;)&lt;/p&gt;

&lt;p&gt;&lt;a href="http://gist.github.com/53394"&gt;Here&lt;/a&gt;’s the code, I hope someone will benefit from it.&lt;/p&gt;

&lt;script src="http://gist.github.com/53394.js"&gt;&lt;/script&gt;</description><link>http://blog.emanuelcarnevale.com/post/80074655</link><guid>http://blog.emanuelcarnevale.com/post/80074655</guid><pubDate>Fri, 20 Feb 2009 17:25:00 -0500</pubDate></item><item><title>Sliding Frames à la Normative</title><description>&lt;a href="http://gist.github.com/66000"&gt;Sliding Frames à la Normative&lt;/a&gt;: &lt;p&gt;Thanks!
&lt;em&gt;(and a way too cool URL ;) )&lt;/em&gt;&lt;/p&gt;</description><link>http://blog.emanuelcarnevale.com/post/79174871</link><guid>http://blog.emanuelcarnevale.com/post/79174871</guid><pubDate>Tue, 17 Feb 2009 17:19:10 -0500</pubDate></item><item><title>"Imagine it’s the year 3000 and you’ve just done a Google search and you turn up a 1997 PowerPoint..."</title><description>“Imagine it’s the year 3000 and you’ve just done a Google search and you turn up a 1997 PowerPoint file, and you’re running Windows 3000. The question is, does it know how to interpret the PowerPoint file? The answer is probably no. I visited the library of Alexandria in January this year in Egypt, and inside that library are manuscripts that are over a thousand years old; they are still fully accessible. If we don’t do the same, what will our descendants wonder about us and the 21 century; we’ll just be a big pile of rotten bits to them.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;a href="http://www.readwriteweb.com/archives/vint_cerf_despite_its_age_the.php"&gt;Vint Cerf&lt;/a&gt; (via &lt;a href="http://azspot.net/"&gt;azspot&lt;/a&gt;)&lt;/em&gt;</description><link>http://blog.emanuelcarnevale.com/post/78788064</link><guid>http://blog.emanuelcarnevale.com/post/78788064</guid><pubDate>Mon, 16 Feb 2009 09:51:16 -0500</pubDate></item><item><title>"My point of view: When you buy a book, you’re also buying the right to read it aloud, have it..."</title><description>“My point of view: When you buy a book, you’re also buying the right to read it aloud, have it read to you by anyone, read it to your children on long car trips, record yourself reading it and send that to your girlfriend etc. This is the same kind of thing, only without the ability to do the voices properly, and no-one’s going to confuse it with an audiobook. And that any authors’ societies or publishers who are thinking of spending money on fighting a fundamentally pointless legal case would be much better off taking that money and advertising and promoting what audio books are and what’s good about them with it.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;p&gt;&lt;a href="http://journal.neilgaiman.com/2009/02/quick-argument-summary.html"&gt;Neil Gaiman’s Journal: Quick argument summary&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is why I love Neil Gaiman and this is also basically a manifesto against DRM.&lt;/p&gt;&lt;/em&gt;</description><link>http://blog.emanuelcarnevale.com/post/77769607</link><guid>http://blog.emanuelcarnevale.com/post/77769607</guid><pubDate>Thu, 12 Feb 2009 11:16:09 -0500</pubDate></item><item><title>"When I use your library, deploy your app, or run your tests I may not want to use rubygems. When you..."</title><description>“When I use your library, deploy your app, or run your tests I may not want to use rubygems. When you “require ‘rubygems’” in your code, you remove my ability to make that decision. I cannot unrequire rubygems, but you can not require it in the first place.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;p&gt;&lt;a href="http://gist.github.com/54177"&gt;RTomayko: Why You Shouldn’t Force Rubygems On People&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Good points: I never thought about the issue and I’m definitely guilty on the same behaviour. Seems &lt;a href="http://github.com/mislav/coral/tree/master"&gt;Coral&lt;/a&gt; proposes itself as a possible solution, but I yet have to check whether it’s a viable one.&lt;/p&gt;&lt;/em&gt;</description><link>http://blog.emanuelcarnevale.com/post/76849613</link><guid>http://blog.emanuelcarnevale.com/post/76849613</guid><pubDate>Mon, 09 Feb 2009 05:36:28 -0500</pubDate></item><item><title>Read Later API</title><description>&lt;a href="http://blog.instapaper.com/post/73123968/read-later-api"&gt;Read Later API&lt;/a&gt;: &lt;p&gt;Instapaper’s Read Later API is out. Great news, I’m already mustering something I wanted for ages, let’s see if it’s feasible…&lt;/p&gt;</description><link>http://blog.emanuelcarnevale.com/post/73442545</link><guid>http://blog.emanuelcarnevale.com/post/73442545</guid><pubDate>Tue, 27 Jan 2009 03:21:22 -0500</pubDate></item><item><title>I am in love</title><description>&lt;p&gt;In love with &lt;a href="http://github.com/bmizerany/sinatra"&gt;Sinatra&lt;/a&gt; the tiny web framework.&lt;/p&gt;

&lt;p&gt;I started playing with it and creating little apps. I think writing little apps to scratch our own itches is the new equivalent of the old &lt;em&gt;writing shell scripts&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I’ll put some on github soon.&lt;/p&gt;</description><link>http://blog.emanuelcarnevale.com/post/59029058</link><guid>http://blog.emanuelcarnevale.com/post/59029058</guid><pubDate>Mon, 10 Nov 2008 17:13:53 -0500</pubDate></item><item><title>"It struck me at that time, though, how incredibly specific so many of these pieces are. With all of..."</title><description>“It struck me at that time, though, how incredibly specific so many of these pieces are. With all of those sets in your possession, you could build a secret agent headquarters with a boulder trap that crushes angry battle-axe-wielding dwarves as they drive by in Martian exploration buggies. Which themelves are adorned with flower beds and creeper vines. And you could do all that in under 10 LEGO bricks! (Or, maybe a few more than that.)”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;p&gt;&lt;a href="http://weblog.jamisbuck.org/2008/11/9/legos-play-doh-and-programming"&gt;the { buckblogs :here }: LEGOs, Play-Doh, and Programming&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Oh, finally someone that thinks like me…&lt;/p&gt;&lt;/em&gt;</description><link>http://blog.emanuelcarnevale.com/post/58777481</link><guid>http://blog.emanuelcarnevale.com/post/58777481</guid><pubDate>Sun, 09 Nov 2008 06:56:19 -0500</pubDate></item><item><title>Google Earth now available for the iPhone</title><description>&lt;a href="http://googlemobile.blogspot.com/2008/10/google-earth-now-available-for-iphone.html"&gt;Google Earth now available for the iPhone&lt;/a&gt;: &lt;p&gt;I discovered it &lt;a href="http://twitter.com/onigiri/status/977209406"&gt;early on today&lt;/a&gt;, but I just had the opportunity to play with it and go through the features, especially considering now I’m using it on wifi and not on edge.&lt;/p&gt;

&lt;p&gt;The app is simply awesome, at Google they really know how to do a mobile app, it caches everything correctly and the user interface is slick as ever. It cleverly shows you options for the &lt;em&gt;Near me&lt;/em&gt; results and it goes trough the Address Book localities.&lt;/p&gt;

&lt;p&gt;But the best touch for me is the two fingers map &lt;em&gt;rotation&lt;/em&gt;.&lt;/p&gt;</description><link>http://blog.emanuelcarnevale.com/post/56643740</link><guid>http://blog.emanuelcarnevale.com/post/56643740</guid><pubDate>Mon, 27 Oct 2008 18:24:57 -0400</pubDate></item><item><title>Android and its perceived openess</title><description>&lt;a href="http://laforge.gnumonks.org/weblog/2008/10/23/"&gt;Android and its perceived openess&lt;/a&gt;: &lt;p&gt;It seems those things are in order when big telcos are involved.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;thanks to &lt;a href="http://twitter.com/al3x/status/974255217"&gt;Alex Payne&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;</description><link>http://blog.emanuelcarnevale.com/post/56283839</link><guid>http://blog.emanuelcarnevale.com/post/56283839</guid><pubDate>Sat, 25 Oct 2008 10:11:25 -0400</pubDate></item><item><title>Favorites</title><description>&lt;a href="http://instinctivecode.com/favorites/"&gt;Favorites&lt;/a&gt;: &lt;p&gt;A gorgeous and polished iPhone app by Matt Gemmel.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If it were possible to call it by a double click of the Home Button, its usage’d be perfect. But this is an iPhone’s fault, not Favorite’s.&lt;/em&gt;&lt;/p&gt;</description><link>http://blog.emanuelcarnevale.com/post/56278087</link><guid>http://blog.emanuelcarnevale.com/post/56278087</guid><pubDate>Sat, 25 Oct 2008 09:05:20 -0400</pubDate></item><item><title>I came back from the Google Developers Day in Milan with so many ideas, I don’t know where to...</title><description>&lt;p&gt;I came back from the Google Developers Day in Milan with so many ideas, I don’t know where to start with…&lt;/p&gt;

&lt;p&gt;Ajax tricks, Open Web Foundation and more…&lt;/p&gt;</description><link>http://blog.emanuelcarnevale.com/post/56032656</link><guid>http://blog.emanuelcarnevale.com/post/56032656</guid><pubDate>Thu, 23 Oct 2008 18:37:51 -0400</pubDate></item></channel></rss>
