<?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/"
	xmlns:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>rob's cryptic life &#187; Programming</title>
	<atom:link href="http://crypticlife.net/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://crypticlife.net</link>
	<description>infrequently updated... like my mind</description>
	<lastBuildDate>Sun, 25 Apr 2010 18:00:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Emacs As An External Editor On Mac OS X</title>
		<link>http://crypticlife.net/2009/08/20/emacs-as-an-external-editor-on-mac-os-x/</link>
		<comments>http://crypticlife.net/2009/08/20/emacs-as-an-external-editor-on-mac-os-x/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 15:00:26 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Emacs]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[OSX]]></category>

		<guid isPermaLink="false">http://crypticlife.net/?p=70</guid>
		<description><![CDATA[For many years, Emacs has had client-server support so that you can leave it running all the time while allowing external applications to open files in it as needed. But that doesn&#8217;t work with GUI applications on the Mac, since they generally don&#8217;t know how to call an editor using the shell. Instead, most Mac [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>For many years, Emacs has had client-server support so that you can leave it running all the time while allowing external applications to open files in it as needed.  But that doesn&#8217;t work with GUI applications on the Mac, since they generally don&#8217;t know how to call an editor using the shell.  Instead, most Mac apps that support external text editors use the <a href="http://www.barebones.com/support/develop/odbsuite.html">ODB Editor Suite</a> created by Bare Bones Software, which extends the normal Mac &#8220;open file&#8221; event with the ability for the editor to tell the calling app when it&#8217;s done.</p>

<p>Support for the ODB protocol isn&#8217;t built into Emacs, but it&#8217;s basically the same as using <code>emacsclient</code> from the shell.  So without further ado, here is &#8220;EditorClient&#8221;, a small shim application which acts like an ODB editor but actually opens files in Emacs.  All it does is intercept the &#8220;open file&#8221; event and call <code>emacsclient</code>.  When you&#8217;re done editing the file (<code>C-x #</code> or <code>server-edit</code> in Emacs) it responds to the ODB client application which can then update its contents.   If you use a non-Mac port of Emacs for some reason, you can probably also associate files with it in the Finder to make for easier double-click editing.  (The Mac ports of Emacs can do that themselves; they just don&#8217;t have the special handling for ODB events.)</p>

<p>This is really sort of a quick and dirty hack; it&#8217;s only for Leopard and the <code>emacsclient</code> call is hard-coded to use the one in the <code>/Applications/Emacs.app</code> bundle.  I&#8217;ll try to improve it later, but I&#8217;m posting it now in case anyone else out there is looking for something like this.</p>

<p>Download it here: <a rel="nofollow" title="Download version 0.1 of EditorClient.zip" onclick="if (window.urchinTracker) urchinTracker ('http://crypticlife.net/files/EditorClient.zip');" href="http://crypticlife.net/files/EditorClient.zip">EditorClient.zip</a> (20.98 KB)</p>
<div id="mainphotoarea"></div>]]></content:encoded>
			<wfw:commentRss>http://crypticlife.net/2009/08/20/emacs-as-an-external-editor-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>I (heart) Rails</title>
		<link>http://crypticlife.net/2005/06/21/i-heart-rails/</link>
		<comments>http://crypticlife.net/2005/06/21/i-heart-rails/#comments</comments>
		<pubDate>Wed, 22 Jun 2005 01:20:03 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://crypticlife.net/2005/06/21/i-heart-rails/</guid>
		<description><![CDATA[I hadn&#8217;t expected my first substantial Ruby on Rails project to be for someone else, but that&#8217;s how it turned out. For the last couple of months I have been working on a Rails-based update of The Gadgeteer (note: if the site you see is blue and white with small fonts and table-based layout, the [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I hadn&#8217;t expected my first substantial <a href="http://www.rubyonrails.com/">Ruby on Rails</a> project to be for someone else, but that&#8217;s how it turned out.  For the last couple of months I have been working on a Rails-based update of <a href="http://www.the-gadgeteer.com/">The Gadgeteer</a> (note: if the site you see is blue and white with small fonts and table-based layout, the DNS change hasn&#8217;t propagated yet; try <a href="http://new.the-gadgeteer.com/">this link</a> instead, but please don&#8217;t bookmark anything using that URL) and it rolled out tonight. Full disclosure: I didn&#8217;t do the visual stuff, because I&#8217;m not really very good at that; another designer created the new look, and I converted it to templates in my Rails application.  More full disclosure: it&#8217;s not really <em>done</em>, and any rough edges will be smoothed in the next week or so.</p>

<p>This is an interesting project for me, because it is essentially a custom-built content management system which is a little bit like a &#8220;real&#8221; CMS, a little bit like a blog, and a little bit like nothing else.  The original Gadgeteer site was managed with custom PHP which has, over the years it has been running, accumulated a lot of cruft.  At the same time, the data model and features of the site, and the way its owners are used to working, have grown in ways that don&#8217;t quite fit the usual CMS or weblog models.  This redesign is an opportunity to start from scratch, with the benefit of all of that accumulated knowledge.</p>

<p>Based on the time I have spent developing the new site so far, I think I can safely say that it was <em>easier</em> to code a custom CMS in Rails, in this case, than it would have been to hammer a prepackaged CMS into shape to do things the same way.  I am not prepared to claim that this has any larger meaning at all, of course &#8212; this project was made easier by the fact that the public face of the site is not interactive and the back end will only ever be used by two specific people.  But I wonder how many other site ideas fall in the nebulous space wherein a weblog application isn&#8217;t enough, but a full CMS is too much &#8212; it is <em>so</em> easy to develop in Rails that, in cases like this, there may not be any point in trying to mash an idea into the mold provided by existing software.</p>

<p>In the long run, this means more knowledge of Rails for me and better support for Rails on <a href="http://www.nyip.net/">NYIP</a>, both of which mean I&#8217;ll probably start programming for pleasure again.  First up: a custom CMS-ish thing for online writing, hopefully ready in time for <a href="http://www.nanowrimo.org/">NaNoWriMo</a> 2005.  Or maybe a meta-journal/writing app/blog client/personal information repository.  Or an AJAX-based web app for tracking my video game collection.  Hmm, perhaps I better decide where to start&#8230;</p>
<div id="mainphotoarea"></div>]]></content:encoded>
			<wfw:commentRss>http://crypticlife.net/2005/06/21/i-heart-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Red and Sparkly</title>
		<link>http://crypticlife.net/2005/03/05/red-and-sparkly/</link>
		<comments>http://crypticlife.net/2005/03/05/red-and-sparkly/#comments</comments>
		<pubDate>Sun, 06 Mar 2005 03:26:02 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://crypticlife.net/2005/03/05/red-and-sparkly/</guid>
		<description><![CDATA[Although I generally try to avoid anything in direct proportion to how much hype and attention it receives, I have decided to ignore that policy in the case of Ruby on Rails, the new web framework that is gaining mindshare as a killer app for the Ruby programming language. I&#8217;ve got a Ruby book, installed [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Although I generally try to avoid anything in direct proportion to how much hype and attention it receives, I have decided to ignore that policy in the case of <a href="http://www.rubyonrails.com/">Ruby on Rails</a>, the new web framework that is gaining mindshare as a killer app for the <a href="http://www.ruby-lang.org/">Ruby</a> programming language.  I&#8217;ve got a Ruby book, installed every Debian package with &#8220;ruby&#8221; in the name, and started working on my first Rails application.  Or perhaps I should say&#8230; written a mostly-working Rails application in one day that I can now tweak to perfection.  So far, I am impressed enough that I plan to use Ruby for future personal projects, perhaps instead of Python.</p>

<p><span id="more-9"></span>
Ruby on Rails is, in essence, the <a href="http://developer.apple.com/cocoa/">Cocoa</a> of web applications.  Cocoa provides scaffolding for GUI apps with default behavior that is configured declaratively &#8212; that is, you build an interface and it does, as much as possible, the right thing, leaving you to develop only your application-specific code.  Rails does the same for database-backed web applications.  The comparison extends deeper, in my opinion, because both Cocoa and Rails &#8212; despite not being the most popular, buzzword-compliant option &#8212; take ease of development to a level not equalled by most of the competition.  It&#8217;s the small details, the tight integration between all parts of the system, the subtle ways it always seems to do the intuitive thing.</p>

<p>Mind you, I don&#8217;t believe some of the hype, specifically that Rails couldn&#8217;t have been done in any language except Ruby.  In particular, I think an equally easy to use web framework could be done in Python &#8212; but it hasn&#8217;t, yet, and I don&#8217;t really want to wait.  (In a lot of ways, Rails resembles the sort of framework I was building piece by piece out of a combination of Quixote and my own code.  But I gave up on that, because I really don&#8217;t enjoy having to build infrastructure when it is in the way of my end result.  What can I say, I&#8217;m lazy.)</p>

<p>My first Rails application is tentatively titled &#8220;NovelSpace&#8221;, and it will be a replacement for my current (private) story archive, but with eventual support for multiple users and collaboration.  It is essentially a special-purpose content management system, organizing its content into &#8220;books&#8221; that contain chapters that can be edited individually.  Its security model will allow for password protected accounts for writers and readers, it will track revisions, and it will use Textile and Markdown to convert plain, easy-to-write text to HTML for viewing or printing.  In a lot of ways, it is an online version of Pyrite Writer, my personal writing tool &#8212; and in fact, I will probably integrate the two using a web service, so that when I save something I am working on, it gets posted automatically.</p>

<p>I&#8217;m shooting for an actual release of both of these things by <a href="http://www.nanowrimo.org/">NaNoWriMo</a> 2005, and at the rate I&#8217;m going right now I could make it with six months to spare&#8230;</p>
<div id="mainphotoarea"></div>]]></content:encoded>
			<wfw:commentRss>http://crypticlife.net/2005/03/05/red-and-sparkly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
