<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sketchpad - Dan Sketcher's personal blog &#187; gems</title>
	<atom:link href="http://www.dansketcher.com/category/gems/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dansketcher.com</link>
	<description>Dan Sketcher on Rails, computers, and other junk</description>
	<lastBuildDate>Wed, 17 Mar 2010 05:42:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Thinking-Sphinx :with =&gt; @geodist returns no results</title>
		<link>http://www.dansketcher.com/2010/01/01/thinking-sphinx-with-geodist-returns-no-results/</link>
		<comments>http://www.dansketcher.com/2010/01/01/thinking-sphinx-with-geodist-returns-no-results/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 06:06:11 +0000</pubDate>
		<dc:creator>dansketcher</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[gems]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://www.dansketcher.com/?p=111</guid>
		<description><![CDATA[Having just recently started using Thinking Sphinx, I&#8217;ve been toying with the geograhical search that it provides to simply do distance-based searches while querying other information. The Geo-searching part of the manual shows how to do searches limiting distance:

# Searching for places within 10km
Place.search "pancakes", :geo => [@lat, @lng],
  :with => {"@geodist" => 0..10_000}
# [...]]]></description>
			<content:encoded><![CDATA[<p>Having just recently started using Thinking Sphinx, I&#8217;ve been toying with the geograhical search that it provides to simply do distance-based searches while querying other information. The <a href="http://freelancing-god.github.com/ts/en/geosearching.html" onClick="javascript:urchinTracker ('/outbound/article/freelancing-god.github.com');">Geo-searching part of the manual</a> shows how to do searches limiting distance:</p>
<pre>
# Searching for places within 10km
Place.search "pancakes", :geo => [@lat, @lng],
  :with => {"@geodist" => 0..10_000}
# Searching for places sorted by closest first
Place.search "pancakes", :geo => [@lat, @lng],
  :order => "@geodist ASC, @relevance DESC"
</pre>
<p>Unfortunately, the first style of query where @geodist is limited in range &#8211; when used as-is &#8211; does not work I found in my testing that I could order by @geodist as per the second query but when I added the :with range, I had no results.</p>
<p>The solution was actually simple, but really annoying. You have to use Floats instead of Integers for the range numbers! So changing the first query to:</p>
<pre>
Place.search "pancakes", :geo => [@lat, @lng],
  :with => {"@geodist" => 0.0..10_000.0}

# or more neatly

Place.search "pancakes", :geo => [@lat, @lng],
  :with => {"@geodist" => Range.new(0.0, 10_000.0)}
</pre>
<p>makes it all work. Now to get someone to update those docs!<br />
<strong>Update</strong>: <a href="http://freelancing-god.github.com/ts/en/geosearching.html" onClick="javascript:urchinTracker ('/outbound/article/freelancing-god.github.com');">Updated!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dansketcher.com/2010/01/01/thinking-sphinx-with-geodist-returns-no-results/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Workling support for Synchronous AMQP RabbitMQ Clients and Amazon SQS Queues</title>
		<link>http://www.dansketcher.com/2009/11/16/workling-support-for-synchronous-amqp-rabbitmq-clients-and-amazon-sqs-queues/</link>
		<comments>http://www.dansketcher.com/2009/11/16/workling-support-for-synchronous-amqp-rabbitmq-clients-and-amazon-sqs-queues/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 01:45:35 +0000</pubDate>
		<dc:creator>dansketcher</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[gems]]></category>
		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://www.dansketcher.com/?p=92</guid>
		<description><![CDATA[As a part of contracting work I have been doing for TouchLocal, I have just opensourced some code I wrote to support new Workling clients. As you may know, Workling is a Rails-oriented system for performing asynchronous processing and optionally returning data from these background workers. However, because of the implementation of the original AMQP [...]]]></description>
			<content:encoded><![CDATA[<p>As a part of contracting work I have been doing for TouchLocal, I have just opensourced some code I wrote to support new Workling clients. As you may know, Workling is a Rails-oriented system for performing asynchronous processing and optionally returning data from these background workers. However, because of the implementation of the original AMQP client, you could not use RabbitMQ queues from non-evented Mongrel or Phusion Passenger servers (only evented Mongrel or Thin).</p>
<p>Building on the work of <a href="http://github.com/celldee/bunny" onClick="javascript:urchinTracker ('/outbound/article/github.com');">celdee-bunny</a> and <a href="http://github.com/famoseagle/carrot" onClick="javascript:urchinTracker ('/outbound/article/github.com');">famoseagle-carrot</a>, I implemented a RabbitMQ workling client that <em>could</em> be used from within Phusion Passenger and Mongrel. The <a href="http://github.com/touchlocal/workling" onClick="javascript:urchinTracker ('/outbound/article/github.com');">Synchronous AMQP Workling client</a> allows RabbitMQ to be used from Workling without requiring complicated changes to deployment scenarios. Also, I implemented the Return Store functionality, so that RabbitMQ users can get data back from the workers, just like when using Starling.</p>
<p>Additionally, it was useful at the time to add support for an <a href="http://github.com/touchlocal/workling" onClick="javascript:urchinTracker ('/outbound/article/github.com');">Amazon SQS Workling client</a>, more as an exercise in testing its performance than anything else. As with the SyncAmqpClient, support for the Return Store is present. One of the discoveries in working with Amazon SQS (via the <a href="http://rightaws.rubyforge.org/" onClick="javascript:urchinTracker ('/outbound/article/rightaws.rubyforge.org');">RightAws</a> gem) was the discovery that the default key structure for Workling (which uses colon characters for segment delimiters) is not supported by Amazon. As a result, if you define the keys used for AWS configuration, even if you don&#8217;t use them, they will change the Workling key structure. This is not a problem for new implementations, but for existing deployments adding this will mean that Workling cannot see the old queues and you may not be able to access them without removing the AWS configuration&#8230; not a deal breaker, but something to be aware of.</p>
<p>So, the <a href="http://github.com/touchlocal/workling" onClick="javascript:urchinTracker ('/outbound/article/github.com');">TouchLocal github account</a> holds the version of Workling that has these two implementation for now, at least until my pull request to the main branch is accepted :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dansketcher.com/2009/11/16/workling-support-for-synchronous-amqp-rabbitmq-clients-and-amazon-sqs-queues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>touchlocal-openx gem released</title>
		<link>http://www.dansketcher.com/2009/11/04/touchlocal-openx-gem-released/</link>
		<comments>http://www.dansketcher.com/2009/11/04/touchlocal-openx-gem-released/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 23:11:02 +0000</pubDate>
		<dc:creator>dansketcher</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[gems]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://www.dansketcher.com/?p=77</guid>
		<description><![CDATA[After the last post, I spent a bit of time integrating my work (along with other upgrades) into a fork of the openx code on github and have released a gem version of it on GemCuttter.org
As you may or may not know, GemCutter.org will be the new default gem source by becoming rubygems.org. This is [...]]]></description>
			<content:encoded><![CDATA[<p>After the <a href="/2009/09/29/minimum-openx-xmlrpc-ruby-client/">last post</a>, I spent a bit of time integrating my work (<a href="http://github.com/touchlocal/openx/commit/22b5ebf5cbc27d68fd9c8c54b4c1fe461b9eaa3a" onClick="javascript:urchinTracker ('/outbound/article/github.com');">along with</a> <a href="http://github.com/touchlocal/openx/commit/b5cff44bfe3cdcac039201c7b65e5cdaba1a8904" onClick="javascript:urchinTracker ('/outbound/article/github.com');">other</a> <a href="http://github.com/touchlocal/openx/commit/496cb64ab66c1342f8eb8eed732205e22780f176" onClick="javascript:urchinTracker ('/outbound/article/github.com');">upgrades</a>) into a <a href="http://github.com/touchlocal/openx" onClick="javascript:urchinTracker ('/outbound/article/github.com');">fork of the openx code on github</a> and have released a gem version of it on <a href="http://gemcutter.org/" onClick="javascript:urchinTracker ('/outbound/article/gemcutter.org');">GemCuttter.org</a></p>
<p>As you may or may not know, <a href="http://update.gemcutter.org/2009/10/26/transition.html" onClick="javascript:urchinTracker ('/outbound/article/update.gemcutter.org');">GemCutter.org will be the new default gem source</a> by becoming rubygems.org. This is pretty exciting, because previously you had to have you project registered on rubygems.org in order to publish to it, or use the non-standard github gem host. Good stuff.</p>
<p>In any case, the new OpenX gem can be installed now by executing</p>
<pre>
sudo gem install touchlocal-openx --source "http://gemcutter.org"

# Load it using
require 'rubygems'
gem 'touchlocal-openx'
require 'openx'
</pre>
<p>In Rails, include it like this in your Rails::Initializer block:</p>
<pre>
  config.gem "touchlocal-openx", :lib => "openx", :source => "http://gemcutter.org"
</pre>
<p>I&#8217;m a proud parent!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dansketcher.com/2009/11/04/touchlocal-openx-gem-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.191 seconds -->
