<?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>What's In Peter's Head &#187; Programming</title>
	<atom:link href="http://www.pchristensen.com/blog/articles/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pchristensen.com/blog</link>
	<description>Peter Christensen's Blog</description>
	<lastBuildDate>Thu, 24 Jun 2010 13:09:35 +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>Hey Language Snobs: Don&#8217;t Pinch Pennies</title>
		<link>http://www.pchristensen.com/blog/articles/hey-language-snobs-dont-pinch-pennies/</link>
		<comments>http://www.pchristensen.com/blog/articles/hey-language-snobs-dont-pinch-pennies/#comments</comments>
		<pubDate>Wed, 04 Jun 2008 15:57:04 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Startups]]></category>

		<guid isPermaLink="false">http://www.pchristensen.com/blog/?p=271</guid>
		<description><![CDATA[Programming language snobs are penny pinchers.  That&#8217;s a tough sentence to write for some that just finished holding a workshop to help people learn Lisp of all languages.  Why would I make such a bold, inflammatory statement?  (No, not to troll.  Most of the criticisms in this article are aimed at [...]]]></description>
			<content:encoded><![CDATA[<p>Programming language snobs are penny pinchers.  That&#8217;s a tough sentence to write for some that just finished holding a <a href="http://www.pchristensen.com/blog/articles/recap-of-intro-to-lisp-workshop/">workshop to help people learn <em>Lisp</em></a> of all languages.  Why would I make such a bold, inflammatory statement?  (No, not to troll.  Most of the criticisms in this article are aimed at myself, based on my own actions over the last few years.)  I had an unpleasant realization after listening to two excellent talks that developed this idea planted in my head  <a href="http://weblog.raganwald.com/2008/03/drive-and-determination-can-most-often.html" target="_blank">by Raganwald</a> with <a href="http://prog21.dadgum.com/21.html" target="_blank">this post he quoted</a> a few months ago:</p>
<blockquote><p>&#8220;&#8230;you can count the number of games written in a purely functional style on one hand. Is it that language tinkerers are less concerned about writing real applications? That they know you can solve any problem with focused grunt work, but it&#8217;s not interesting to them? That the spark and newness of a different language is its own reward? Either way, the BASIC programmers win when it comes down to getting projects finished.&#8221;</p>
<p>—James Hague, <a href="http://prog21.dadgum.com/21.html" target="_blank">Slumming with BASIC Programmers</a></p></blockquote>
<p>The gist of the post is that uber-languages like Lisp, Erlang, Ruby, and even C are worlds ahead of BASIC, but somehow a group of Neanderthals put down their clubs and wiped away their drool long enough to write a slew of various and impressive computer games using BASIC.   OK, he didn&#8217;t say that, his exact words were &#8220;&#8230;largely written by people with minimal programming background.&#8221;  I was just translating for the language snobs out there.  But then, mid-gloat, he hits them, you (even me) with that damning quote above about <em>getting projects finished</em>.</p>
<p><span id="more-271"></span></p>
<p>Ouch.  I was looking back at what I&#8217;ve produced over the last few years (both personally and professionally) and the list is pretty short.  Maybe it&#8217;s a byproduct of too much school, or not being able to <a href="http://www.pchristensen.com/blog/articles/beautiful-guts-dissecting-a-first-generation-ipod-nano/">take things apart</a> as a kid, but I tend to default to waterfall mode.  Research, plan, gather as much knowledge as possible to build a mental model so complete that the perfect solution will fly from my fingertips like a glorious winged Viking ship sailing off to enjoy another toasty Greenland winter.  Alas, I usually just end up learning enough useful knowledge about a subject to write and converse about it but not enough to work with it.  Hence my dusty portfolio.</p>
<p>Take my involvement with Lisp, for instance.  I&#8217;ve become a slightly respected name in the (admittedly small) Lisp community because of what I&#8217;ve written about <a href="http://www.pchristensen.com/blog/articles/lisp-the-golden-age-isnt-coming-back-lets-welcome-a-bright-future/">history</a>, <a href="http://www.pchristensen.com/blog/articles/public-beta-open-for-ultimate-n00b-slimeemacs-cheat-sheet/">Emacs</a> and <a href="http://www.pchristensen.com/blog/articles/reference-for-the-slimelispemacs-screencast/">SLIME</a>, <a href="http://www.pchristensen.com/blog/articles/how-to-learn-lisp/">how to learn Lisp</a>, <a href="http://www.pchristensen.com/blog/articles/installing-clisp-emacs-and-slime-on-windows-xp/">how to setup</a> <a href="http://www.pchristensen.com/blog/articles/installing-sbcl-emacs-and-slime-on-windows-xp/">an environment</a>, <a href="http://www.pchristensen.com/blog/articles/setting-up-and-using-emacs-infomode/">access documentation</a>, and the r<a href="http://www.pchristensen.com/blog/articles/lisp-basics-and-idioms-presentation-from-intro-to-lisp-workshop/">ight mindset for developing in Lisp</a>.  Heck, I even organized a <a href="http://www.pchristensen.com/blog/articles/recap-of-intro-to-lisp-workshop/">workshop to help <em>other people</em> learn Lisp</a>!  Notice all the working software on that list? [Cricket, cricket, cricket...].  What does all that have in common?  It&#8217;s all <em>preparation</em> for the day when I&#8217;m going to write all this great software in Lisp.  Oops.</p>
<p>So why, when I&#8217;ve been using C# and .Net at work for 5 years now, am I so worried about having the perfect Lisp environment and knowledge of how to use it?   So that when I finally get around to writing something, I will be able to do it quickly because of all the power at my disposal.  That&#8217;s right, I don&#8217;t have a lot of time to spend, so I&#8217;m very, very, very gradually building up my ability to write software quickly.   That certainly makes more sense than writing a little software at a time, right?</p>
<p>Where was I?  Oh yeah, OOPSLA.</p>
<p><strong>OOPSLA</strong></p>
<p>The <a href="http://www.oopsla.org/oopsla2008/about.html" target="_blank">ACM SIGPLAN Conference on Object Oriented Programming, Systems, Languages, and Applications</a> (OOPSLA) is one of the premier conferences on software development, and despite the title, doesn&#8217;t have much to do with object-oriented programming anymore.  Twenty years or so when it started, OO was hot, cutting edge stuff, and as time marched on, the conference people decided that rather than stick with objects, they would stick with the hot, cutting edge.  For the <a href="http://dlweinreb.wordpress.com/2007/10/28/3/" target="_blank">highly regarded 2007 conference</a>, they recorded their <a href="http://www.oopsla.org/oopsla2007/index.php?page=podcasts/" target="_blank">keynote speeches</a> and made a podcast out of them.  What outstanding marketing!  (The <a href="http://www.singinst.org/media/singularitysummit2007" target="_blank">Singularity Summit</a> did this too.)  I was interested in OOPSLA because of what Dan W. and others had written about it, but getting to hear the actual speeches put this year&#8217;s conference in Nashville at the top of my wishlist.</p>
<p>[Note: if anyone is looking for a way to feel really good about themselves, why not sponsor my trip to OOPSLA 2008?  No, really, please!  I promise to take pretty pictures and write lots about it.]</p>
<p>Two of those keynotes made a huge impression on me, to the point where I&#8217;m scared what will happen if I listen to the 5 remaining talks.  First, in <a href="http://www.oopsla.org/oopsla2007/index.php?page=sub/&amp;id=190" target="_blank">Second Life: The World&#8217;s Biggest Programming Environment</a> (<a href="http://www.oopsla.org/oopsla2007/podcasts/invited-talks/keynote0103-second-life.mp3">download 40.5 MB mp3</a>), two Second Life employees gave a similar argument to Hague&#8217;s above.  They started out by <em>trashing</em> the Second Life scripting language (LSL) and sharing details of its sordid past.  For instance, all scripts have to run in a 16K virtual machine.  This virtual machine was written in one week, replacing the first version that was written in one night.  There is no IDE, no debugging, no tracing &#8211; all editing happens in-world.  Most appealing language features are missing, and the language isn&#8217;t even pretty. Bleak, huh?  Well, there are hundreds of thousands (millions?) of people writing scripts in LSL, with over 2 million simultaneous scripted objects and over 2.5 <em>billion</em> lines of code in this terrible language.  Why do people put up with it?</p>
<p>Because the <em>payoff</em> is so rewarding &#8211; there is a whole world full of animated objects scripted by participants.  People love to write in it since there&#8217;s immediate, tangible feedback for doing so &#8211; you literally change the world your character lives in!</p>
<p>The second talk was by Kathy Sierra, called (no surprise) <a href="http://www.oopsla.org/oopsla2007/index.php?page=sub/&amp;id=351" target="_blank">Creating Passionate Users</a> (<a href="http://www.oopsla.org/oopsla2007/podcasts/invited-talks/keynote0102-kathy-sierra.mp3">download 38 MB mp3</a>).  I&#8217;m a <a href="http://www.pchristensen.com/blog/articles/top-story-of-2007-kathy-sierra/">confessed Kathy Sierra fan</a>, so I looked forward to getting reacquainted with old Kathy.  Her remarks enlightened and expanded the points made by the Second Life people &#8211; people want high bandwidth experiences, they want feedback, <em>they want their effort to produce results</em>!  Why was that such a revelation to me?  I mean, I got it, but I didn&#8217;t get it until I heard her say it.  There are so many examples of this principle:</p>
<ul>
<li>people use PHP because it&#8217;s installed on every web host in the multiverse, so they don&#8217;t have to muck around much with deployment</li>
<li>people use Ruby on Rails because they can make a blog in 15 minutes</li>
<li>people use Agile because they always have working software and can see changes immediately</li>
<li>people <em>don&#8217;t</em> use Lisp because there&#8217;s <a href="http://www.lispcast.com/drupal/node/29" target="_blank">no easy download</a></li>
<li>and people use BASIC and LSL because they want to <em>get stuff done</em></li>
</ul>
<p>That brings me to the two parts of my inflammatory title:</p>
<p><strong>Language Snobs</strong></p>
<p>Language Snobs stress the superiority of one programming language over others.  Some languages are extremely guilty of this (Lisp, SmallTalk, Python, Ruby, Scala, Haskell, etc) while others aren&#8217;t (Java, C#, VB, BASIC, PHP, Perl, C, etc).  The snob languages talk about why they&#8217;re so great, and the other languages just point to what has been written in them as proof that they&#8217;re great (or at least good enough).  Granted, this definition isn&#8217;t perfect; Lisp has everything on my <a href="http://www.pchristensen.com/blog/lisp-companies/">Lisp Companies</a> page to brag about, but it seems small in comparison to the hot air that gets circulated (including by me) in its favor.  I think Ruby is crossing over into the non-snob category, based on the massive popularity of Rails and all of the sites written in it.</p>
<p>The important point is that the language snobs <em>aren&#8217;t wrong</em>!  There is no denying that abstractions are useful, that more powerful tools help, and that a sharp, well-trained mind can accomplish things that a simple one can&#8217;t.  The dearth of machine language and assembly written nowadays is proof of that.  But the language snobs are working in the realm of what&#8217;s theoretically possible, what can be accomplished in the best possible conditions.  This could be in small startups founded on the best principles, or on large companies like Google and ITA that have kept that environment as they&#8217;ve grown.  But most people and most business don&#8217;t operate anywhere near that theoretical maximum, so the bulk of the software gets written by the competent mean, by the bulge in the middle of the standard distribution.  Language snobs are also working in the future, since advanced topics tend to trickle down over time (hence the rebranding of OOPSLA).</p>
<p><strong>Penny Pinchers</strong></p>
<p>A penny pincher is someone who is frugal, who &#8220;knows the cost of everything and the value of nothing&#8221;.  Language snobs know what languages are most powerful, so they are loath to use anything less than the best.  They don&#8217;t want to endure the cost of code duplication, cut-and-paste, reading un-refactored code, leaky abstractions, etc.  Everything has to be perfect, and when you add up those little bits of perfection, you get something great.</p>
<p>But life, business, and software are full of trade-offs.  If you can accept a little imperfection here, some cruft there, and sloppy duplication there, they you can hire from a bigger pool of employees, deploy to a wider range of platforms, hit more markets more frequently.  The key point that the penny pinchers miss is that while using inferior tools has a cost associated with it, so does <em>not</em> using those tools.  The important thing is to <a href="http://www.codinghorror.com/blog/archives/000809.html" target="_blank">Always Be Shipping</a>.</p>
<p><strong>Wasabi</strong></p>
<p>It&#8217;s not only language snobs that are guilty of penny pinching.  A classic example of the non-snob language fans pinching was in reaction to Fog Creek&#8217;s Wasabi programming language.  For anyone who missed it, here&#8217;s the <a href="http://www.joelonsoftware.com/items/2006/09/01.html" target="_blank">first mention</a>:</p>
<blockquote><p><a href="http://www.fogcreek.com/FogBugz" target="_blank">FogBugz</a> is written in Wasabi, a very advanced, functional-programming dialect of Basic with closures and lambdas and Rails-like active records that can be compiled down to VBScript, JavaScript, PHP4 or PHP5. Wasabi is a private, in-house language written by one of our best developers that is optimized specifically for developing FogBugz; the Wasabi compiler itself is written in C#.</p></blockquote>
<p>This simple comment set off a <a href="http://damienkatz.net/2006/09/has-joel-spolsk.html" target="_blank">crazed</a> <a href="http://www.zedshaw.com/rants/fortune_favors_big_turds.html" target="_blank">irrational</a> <a href="http://imranontech.com/2006/09/13/what-would-you-do-in-a-wasabi-situation/" target="_blank">firestorm</a> of <a href="http://www.codinghorror.com/blog/archives/000679.html" target="_blank">criticism</a>, cataloged <a href="http://james.newtonking.com/archive/2006/09/02/How-to-increase-traffic-to-your-blog-_2D00_-the-Spolsky-way.aspx" target="_blank">here</a>.  People even <a href="http://discuss.joelonsoftware.com/default.asp?joel.3.383346.13" target="_blank">thought it was a joke</a>!  These people were pinching pennies because they didn&#8217;t realize that writing a compiler where you control both the input and the output isn&#8217;t that hard if you have smart people working for you.  Joel wrote a <a href="http://www.joelonsoftware.com/items/2006/09/01b.html" target="_blank">response to the Wasabi firestorm</a> explaining all this:</p>
<blockquote><p>Since we are not blub programmers, we like closures, active records, lambdas, embedded SQL a la LINQ, etc. etc. and so those are the kinds of features we put into Wasabi&#8230;</p>
<p>Most people don&#8217;t realize that writing a compiler like this is only about 2 months work for one talented person who read <a href="http://www.amazon.com/o/asin/0321486811/pchristensen-20" target="_blank">the Dragon book</a>. Since the compiler only has one body of code to compile, it is much easier to write. It doesn&#8217;t have to be a general-purpose compiler. It doesn&#8217;t have a math library, for example&#8230;</p>
<p>And we have the ability to add any feature to the language that we want easily&#8230; this is the same power Paul Graham talks about in <a href="http://www.paulgraham.com/onlisptext.html" target="_blank">On Lisp</a>, the power to invent new language features that suit your exact application domain. Lisp does this through a mechanism called macros&#8230;</p></blockquote>
<p>He also explains the very sound business reason for it, balancing the cost of developing the Wasabi language and compiler (smaller than people think) against the support cost of setting client servers up with .Net, Mono, or PHP on Windows (larger than people think) and the <a href="http://www.joelonsoftware.com/items/2007/12/06.html" target="_blank">lost opportunity cost</a> of people that won&#8217;t even consider buying your product because they don&#8217;t support your language (MUCH larger than people think).  37signals at least <a href="http://www.37signals.com/svn/posts/724-ask-37signals-installable-software" target="_blank">acknowledges this foregone opportunity</a>, but 37signals has WAY more business savvy than people give them credit for.  And despite the bashing Joel gets for writing &#8220;a crappy bug-tracking program for stupid windows programmers&#8221; or something like that, he has managed to <a href="http://news.ycombinator.com/item?id=207317" target="_blank">increase his revenue by 17x</a> since <a href="http://www.joelonsoftware.com/articles/BionicOffice.html" target="_blank">September 2003</a>.  There&#8217;s a very important lesson to be learned from two very successful companies &#8211; make balanced strategic decisions, but make sure you understand the consequences of doing so.</p>
<p><strong>Conclusion</strong></p>
<p>It turns out that this wasn&#8217;t much about languages at all; languages was just the topic that springboarded the idea.  The real message is about people, passion, results, business, and most importantly, balance.  If you find yourself focusing too much on one single aspect of your product or your business, there had better be a good reason.  If you love your language because you can mold it (Lisp), or because strict functionality and a strong typing system prevent errors (Haskell, OCaml), those features had better be extremely important to the problem you&#8217;re trying to solve.  If you&#8217;re running a software business and all you do is code, you&#8217;d better be getting your first version ready to r<a href="http://www.paulgraham.com/start.html" target="_blank">elease as soon as possible</a>.  All successful companies are <a href="http://www.instigatorblog.com/launching-a-startup-is-barely-step-one/2008/02/06/" target="_blank">balanced</a> <a href="http://www.instigatorblog.com/technology-to-sales-the-evolution-of-a-software-startup/2008/05/06/" target="_blank">companies</a>.  If you&#8217;re too focused on one area, you&#8217;re guilty of premature optimization and unless you are ready to make some painful adjustments, you should get comfy on your local maximum.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p><strong>UPDATE</strong>: Joel and Jeff at the stackoverflow podcast had a strikingly similar discussion in <a href="http://blog.stackoverflow.com/index.php/2008/06/podcast-8/" target="_blank">Episode #8</a>.  Joel said that for the niche tools (that&#8217;s how he characterized what I called &#8220;snob languages&#8221;), there are two reactions to the pain that the limitations (documentation, fewer programmers, less mature tools, etc) cause: admitting that your platform just isn&#8217;t that good yet, or convincing yourself that your platform is so good that it&#8217;s worth the pain because it makes you so much more productive.  Choosing the first option causes jarring cognitive dissonance whereas the second choice feels good, so these niche languages and platforms have vocal, fanatic followers who have convinced themselves that they are using the Good Lord&#8217;s Own tools.  If you&#8217;re using a snob language but still think you&#8217;re rational and open-minded, listen to it or <a href="https://stackoverflow.fogbugz.com/default.asp?W6080" target="_blank">read the transcript</a> (not finished yet but will be soon).  It&#8217;s between 6:57 and 16:56.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pchristensen.com/blog/articles/hey-language-snobs-dont-pinch-pennies/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
<enclosure url="http://www.oopsla.org/oopsla2007/podcasts/invited-talks/keynote0103-second-life.mp3" length="42500838" type="audio/mpeg" />
<enclosure url="http://www.oopsla.org/oopsla2007/podcasts/invited-talks/keynote0102-kathy-sierra.mp3" length="39553599" type="audio/mpeg" />
		</item>
		<item>
		<title>Installing SBCL, Emacs, and SLIME on Windows XP</title>
		<link>http://www.pchristensen.com/blog/articles/installing-sbcl-emacs-and-slime-on-windows-xp/</link>
		<comments>http://www.pchristensen.com/blog/articles/installing-sbcl-emacs-and-slime-on-windows-xp/#comments</comments>
		<pubDate>Fri, 30 May 2008 19:04:00 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Lisp]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.pchristensen.com/blog/?p=261</guid>
		<description><![CDATA[My recent install guide for CLISP, Emacs, and SLIME on Windows XP was a big hit &#8211; it has had about 2000 hits and 5 sincere thanks in the comments (it even got praise from a troll!).  In it I promised a similar guide for SBCL, and here it is.
The nice thing is that [...]]]></description>
			<content:encoded><![CDATA[<p>My recent <a href="http://www.pchristensen.com/blog/articles/installing-clisp-emacs-and-slime-on-windows-xp/">install guide for CLISP, Emacs, and SLIME on Windows XP</a> was a big hit &#8211; it has had about 2000 hits and 5 sincere thanks in the comments (it even got <a href="http://www.pchristensen.com/blog/articles/installing-clisp-emacs-and-slime-on-windows-xp/#comment-478">praise from a troll!</a>).  In it I promised a similar guide for SBCL, and here it is.</p>
<p>The nice thing is that swapping out Common Lisp implementations within an Emacs/SLIME setup is easy, so maybe 3/4 of this guide is identical to the CLISP guide.  I&#8217;ll put a disclaimer at the beginning of each section saying whether there&#8217;s anything new or whether you can skip it.</p>
<p><span id="more-261"></span></p>
<p><strong>0. Files to Download</strong> [<strong>DIFF</strong>: The only difference is the link to the SBCL installer instead of the CLisp installer]</p>
<p>If you want to get started on downloading the setup files, here are the links:</p>
<ul>
<li><a href="http://www.7-zip.org/" target="_blank">7-zip</a> (<a href="http://downloads.sourceforge.net/sevenzip/7z457.exe">download v4.57</a> &#8211; 840K) &#8211; for unpacking .tar and .tar.gz files commonly used in *nix.</li>
<li><a href="http://www.gnu.org/software/emacs/" target="_blank">Emacs</a> (<a href="http://ftp.gnu.org/pub/gnu/emacs/windows/emacs-22.2-bin-i386.zip">download v22.2</a> &#8211; 37MB)</li>
<li><a href="http://www.sbcl.org/" target="_blank">SBCL</a> (<a href="http://downloads.sourceforge.net/sbcl/sbcl-1.0.13-x86-windows-binary.msi">download v1.0.13</a> &#8211; 9.8 MB)</li>
<li><a href="http://common-lisp.net/project/slime/" target="_blank">SLIME</a> (<a href="http://common-lisp.net/cgi-bin/viewcvs.cgi/root.tar.gz?root=slime&amp;view=tar">download CVS snapshot</a> &#8211; 700K) &#8211; apparently the SLIME 2.0 release is ancient and not worth using</li>
</ul>
<p><strong>1. Setup Directories </strong>[<strong>NO DIFF</strong>: skip if you've completed the CLisp guide]</p>
<p>Windows XP loves extremely long pathnames like C:\Documents and Settings\Username\Application Data. This is okay if for GUI-driven apps, but in Emacs, you’re not clicking, you’re typing, and you want short path names. Also, much (most?) of the open source Common Lisp tools are developed on *nix, so there’s less impedance mismatch when using stuff off the net if you have a *nix-ish folder structure.</p>
<p>Start with a root folder. In the pathnames in the rest of this guide, I’ll refer to it as [HOME]. I used C:\home\ to match the *nix convention of having user files be in /home/username/. You also need a username directory &#8211; I called mine peter and I’ll refer to it as [USR]. So in my case, [HOME]/[USR] would be C:\home\peter\.</p>
<p><strong>Emacs NOTE #1:</strong> One important point about filenames in Emacs is that they CAN be entered with ‘/’, but if you prefer to use ‘\’, you have to escape it with another back slash, so in Emacs buffers and files, you would enter “C:/home/” or “C:\\home\\” but never “C:\home\”. The trailing slash is also important because it indicates that it’s a directory. Now that you have chosen your [ROOT] and [USR] values, these are the folders you should setup:</p>
<ul>
<li>[HOME]\[USR]\</li>
<li>[HOME]\[USR]\site\</li>
<li>[HOME]\[USR]\docs\</li>
<li>[HOME]\[USR]\lisp\</li>
<li>[HOME]\[USR]\info\</li>
<li>[HOME]\bin\</li>
</ul>
<p><strong>2. Setup Emacs </strong>[<strong>NO DIFF</strong>: skip if you've completed the CLisp guide]</p>
<p>Emacs does not need to be “installed” like most Windows apps &#8211; it just runs from its directory. Extract it to [HOME]\bin\. I changed the folder name from emacs-22.2 to just emacs, so my path was c:\home\bin\emacs\. You run emacs by running the file [HOME]\bin\emacs\bin\runemacs.exe.</p>
<p>Emacs settings are stored in a configuration file called “.emacs”. On Windows, the default working folder and .emacs location is C:\Documents and Settings\Username\Application Data, but that’s too painful to type and it’s a hidden folder so it’s not even easy to get through with the GUI. To have Emacs work in a different folder, create a file called site-start.el in the emacs\site-lisp folder. In that folder, put the following line (but change the path to match yours):</p>
<blockquote><p>(setenv “HOME” “[HOME]/[USR]/”)</p></blockquote>
<p>(<a href="http://groups.google.com/group/comp.lang.lisp/msg/44e7f62088460aa7" target="_blank">Thanks Nathaniel!</a> This was probably the biggest annoyance of mine that made me put off finishing setup for so long.)</p>
<p><strong>Emacs NOTE #2:</strong> Emacs has lots (and lots and lots) of keyboard shortcuts, many more than there are letters in the alphabet. Many of them require multiple keys or a sequence of keys called a “chord”. The two modifier keys used are Control and Alt (also called Meta). The common way to write chords is to use C- and M- for Control and Meta, so to run the command to close Emacs, you hold down Control and X, then let go, then hold down Control and C. This is written as C-x C-c. Sometimes a chord is followed by another letter or the name of a command. For instance, to undo, you hold Control and x, then let go and hit u. This is written as C-x u. Dashes mean press at the same time, space means let go. Easy! I made a <a href="../articles/public-beta-open-for-ultimate-n00b-slimeemacs-cheat-sheet/">cheat sheet for common commands in Emacs and SLIME</a>.</p>
<p>Now it’s time to create your .emacs file. Run emacs and hit C-x C-f. This is the find command, which is used to create or open a file. At the prompt “Find file: “, type “~/.emacs” (without quotes). Right now just put a ; (that’s the comment marker in Emacs Lisp files) and save it by hitting C-x C-s. There’s a world of stuff you can put in a .emacs file, but that’s too much to bite off now.</p>
<p><strong>3. Install SBCL</strong> [<strong>DIFF</strong>: This section is completely different]</p>
<p>Although the Windows port of SBCL is still experimental, there is a Windows installer (.msi) file for v1.0.13 (highest version as of now is v1.0.17).  Just run the installer, and install it to the directory:</p>
<p style="padding-left: 30px;">[HOME]\bin\sbcl-1013\</p>
<p>Then just finish the install wizard.  But you&#8217;re not finished yet.</p>
<p>Robert Zubek wrote a post about 2 months ago about how to <a href="http://robert.zubek.net/blog/2008/04/09/sbcl-emacs-windows-vista/" target="_blank">setup SBCL/Emacs/SLIME on Vista</a>, but it doesn&#8217;t work exactly right on Windows XP.  If you use the .emacs settings from his post, you get this error when you start SLIME (instead of using the .emacs settings in step 4):</p>
<p style="padding-left: 30px;">fatal error encountered in SBCL pid XXXX:</p>
<p style="padding-left: 30px;">can&#8217;t find core file at /user/local/lib/sbcl//sbcl.core</p>
<p style="padding-left: 30px;">Process inferior-lisp exited abnormally with code 1</p>
<p>If you use the settings in step 4, you&#8217;ll get a different error message:</p>
<p style="padding-left: 30px;">Searching for program: no such file or directory, sbcl</p>
<p>If you SBCL looks in the environment variable PATH to find the executable and core file.  The default directories are *nixy, so it won&#8217;t find your sbcl directory on accident.  But why should it look for the directory if you entered it into the install wizard?</p>
<p>Apparently <a href="http://www.helpwithwindows.com/WindowsXP/howto-04.html" target="_blank">Windows XP doesn&#8217;t update system environment variables until the system reboots</a>.  So right after you install SBCL, you have the user environment variables PATH and SBCL_Home but SBCL looks in the system variables.  I couldn&#8217;t find out a way to fix that without rebooting, but the good news is that a reboot solves the problem.</p>
<p>So <strong>reboot your computer now</strong>.</p>
<p><strong>4. Setup SLIME</strong> [<strong>DIFF</strong>: This section has some differences - links and .emacs setup]</p>
<p>Apparently the SLIME 2.0 is very old; several people recommend ignoring it and going straight to the CVS snapshot, so that&#8217;s what I linked to above.</p>
<p>Extract the SLIME folder to [HOME]\bin\emacs\site-lisp. (Here’s a tip about <a href="http://groups.google.com/group/comp.lang.lisp/msg/5fce0960ef4e27be" target="_blank">putting emacs code in site-lisp</a>).</p>
<p>Now in Emacs, open your .emacs file (C-x C-f, ~/.emacs) and enter the following (<a href="http://common-lisp.net/project/slime/doc/html/Installation.html" target="_blank">general SLIME instructions</a>, <a href="http://common-lisp.net/pipermail/slime-devel/2008-May/007331.html" target="_blank">SBCL specific setup</a>), changing your pathnames as usual.  The good news is that because SBCL looks in the environment variables, you don&#8217;t need any of the command line parameters in the inferior-lisp-program variable:</p>
<blockquote><p>(setq inferior-lisp-program “sbcl”)<br />
(add-to-list ‘load-path “[HOME]/bin/emacs/site-lisp/slime/”)<br />
(require ’slime)<br />
(slime-setup)</p></blockquote>
<p>Save the .emacs file (C-x C-s), then run the eval-buffer command (M-x eval-buffer). This will run the code that you just entered and tell Emacs how to run SLIME.</p>
<p>Now, you start slime with M-x slime and you’re ready to go!</p>
<p>NOTE: This is a basic SBCL setup &#8211; I&#8217;ve found some more advanced setup links that I&#8217;ll write guides for later:</p>
<ul>
<li><a href="http://robert.zubek.net/blog/2008/04/09/sbcl-emacs-windows-vista/#comment-5" target="_blank">Setup ASDF-Install/SBCL on Windows</a></li>
<li><a href="http://brainrack.wordpress.com/2008/05/29/running-sbcl-on-windows/" target="_blank">Running SBCL on Windows</a> &#8211; this is again for Vista, with the newest (v1.0.16 and v1.0.17) versions of SBCL.  It also includes configuring shell commands, etc.</li>
</ul>
<p>Additional comments at <a href="http://groups.google.com/group/comp.lang.lisp/browse_thread/thread/9d8e78f7c53a7c4f?hl=en" target="_blank">comp.lang.lisp</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pchristensen.com/blog/articles/installing-sbcl-emacs-and-slime-on-windows-xp/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Setting Up and Using Emacs InfoMode</title>
		<link>http://www.pchristensen.com/blog/articles/setting-up-and-using-emacs-infomode/</link>
		<comments>http://www.pchristensen.com/blog/articles/setting-up-and-using-emacs-infomode/#comments</comments>
		<pubDate>Sun, 25 May 2008 15:25:28 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Lisp]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.pchristensen.com/blog/?p=254</guid>
		<description><![CDATA[Emacs has an ancient (predating hypertext), simple, powerful documentation program called Info.  It&#8217;s very difficult to find info about it online (try searching for &#8220;Info&#8221;), so here&#8217;s my beginner&#8217;s guide.
Info is an output format for the Texinfo typesetting syntax.  Texinfo is used for writing documentation that can be output in multiple print and [...]]]></description>
			<content:encoded><![CDATA[<p>Emacs has an ancient (predating hypertext), simple, powerful documentation program called Info.  It&#8217;s very difficult to find info about it online (try searching for &#8220;Info&#8221;), so here&#8217;s my beginner&#8217;s guide.</p>
<p>Info is an output format for the Texinfo typesetting syntax.  <a href="http://www.gnu.org/software/texinfo/" target="_blank">Texinfo</a> is used for writing documentation that can be output in multiple print and digital formats and is the official documentation format of the GNU project.  Info files are strongly associated with Emacs &#8211; Emacs is the primary reader for Info files, but there is also a standalone reader.  Manuals are organized into a tree of nodes, with a variety of ways to navigate between those nodes.</p>
<p>Info files can technically be written by hand, but it is much more common for them to be compiled from Texinfo.  Many Linux/Unix distros come bundled with the TeX toolchain necessary to compile Texinfo, but Windows does not.  The TeX/LaTex/Texinfo on Windows post is coming in the near future.  For now, stick to precompiled .info files or go dive into TeX yourself.</p>
<p>Emacs ships with several Info manuals &#8211; they&#8217;re in the emacs/info folder.  You can also create your own Info directory, add new manuals to the directory, and create your own manuals.  This guide will walk you through the steps needed to get Emacs to find your info directory, add manuals in your directory to the main directory list, and use Info from within Emacs.</p>
<p>[NOTE: This guide assumes you're following the directory conventions I laid out in my previous post <a href="http://www.pchristensen.com/blog/articles/installing-clisp-emacs-and-slime-on-windows-xp/">Installing CLISP, Emacs, and SLIME on Windows XP</a>.  It also gives you the baseline level of familiarity with Emacs to follow along here.]</p>
<p><span id="more-254"></span></p>
<p><strong>1) Setup Emacs to recognize your info directory</strong></p>
<p>You should already have an info directory.  Mine is C:\home\peter\info, and from emacs the path is ~/info/.  To make this the first directory Emacs looks in when compiling the directory, <a href="http://www.gnu.org/software/hello/manual/texinfo/Other-Info-Directories.html" target="_blank">add this to your .emacs file</a> (feel free to indent better than WordPress allows):</p>
<p style="padding-left: 30px;">(require &#8216;info)<br />
(setq Info-directory-list<br />
(cons (expand-file-name &#8220;[HOME]/info&#8221;)<br />
Info-default-directory-list))</p>
<p><strong>2) Create a dir file in [HOME]/info/</strong></p>
<p><a href="http://www.amazon.com/exec/obidos/ASIN/0262011530/pchristensen-20"><img style="float:right;margin-left:4px;border:0px;" src="http://ecx.images-amazon.com/images/I/41CPGEDXMDL._SL160_.jpg" alt="Structure and Interpretation of Computer Programs - 2nd Edition (MIT Electrical Engineering and Computer Science)" width="110" height="160" /></a></p>
<p>When Emacs is looking in directories for info files, it only looks for a file called &#8220;dir&#8221; in each directory.  This dir file is a special kind of Info file that points to the other Info files in the directory and lists and orders them.  In order to make your own dir file, you first need a .info file to link to.  I recommend the <a href="http://www.neilvandyke.org/sicp-texi/" target="_blank">Structure and Interpretation of Computer Programs in Texinfo</a> manual (download precompiled 400K <a href="http://www.neilvandyke.org/sicp-texi/sicp.info.gz">sicp.info.gz</a> file here).  There is a whole syntax for defining nodes, but this is the bare minimum you need to get your manual into the directory.</p>
<p>First, start with the characters &#8220;^_&#8221;. That doesn&#8217;t actually work when you type it in directly, so you need to copy it from Emacs&#8217; info/dir.  I looked at that file in a hex editor and it had the value 1F (<a href="http://www.asciitable.com/" target="_blank">US &#8211; unit separator</a>) &#8211; the ASCII values for ^_ are 5E 5F.  I had to open the emacs/info/dir file and kill/yank it into my dir file.  Kill/yank is Emacs&#8217; version of cut/paste.  Like all things Emacs, it&#8217;s similar, not exactly the same, and much more powerful.  Here are the steps (free Emacs tutorial included):</p>
<ol>
<li>Open the Emacs info dir file with: C-x C-f [HOME]/bin/emacs/info/dir</li>
<li>Select the ^_ characters
<ol>
<li>Put the cursor at the beginning and set the beginning of the region to cut (C-SPC)</li>
<li>Move down to the beginning of the next line and cut to the end of the region (C-W)</li>
<li>Yank it back into the file with C-y</li>
<li>Save the file with C-x C-s</li>
</ol>
</li>
<li>Create your dir file with find file (C-x C-f) at ~/info/dir</li>
<li>Yank (paste) the text into the file with C-y</li>
</ol>
<p>That should work, but there&#8217;s still more to add to the file.  Next is the Tree info &#8211; at least your file and node names.  This works for your personal dir file:</p>
<p><code>File: dir    Node: Top    This is the top of the INFO tree</code></p>
<p>You can put a header if you like (&#8220;My Info Manuals&#8221;), then on a new line, put:</p>
<p>* Menu:</p>
<p>After that, you can add links to your manuals.  The format is:</p>
<p style="padding-left: 30px;">* TITLE: (filename w/o .info). Summary</p>
<p>For the SICP manual, it would look like this:</p>
<p style="padding-left: 30px;">* SICP: (sicp). Structure and Interpretation of Computer Programs</p>
<p>You can put a footer after that to separate the manuals in your directory from those in others.  The final dir file ends up looking something like this:<br />
<code><br />
^_<br />
File: dir    Node: Top    This is the top of the INFO tree</code></p>
<p>Peter&#8217;s Info Directory<br />
**********************</p>
<p>* Menu:</p>
<p>* SICP: (sicp). Structure and Interpretation of Computer Programs</p>
<p>&#8212;- User&#8217;s &#8216;dir&#8217; ends here &#8212;-</p>
<p>[Now that you did all that, feel free to download <a href="http://www.pchristensen.com/blog/wp-content/uploads/2008/05/dir" target="_blank">my dir file</a> and change the labels as you see fit.  ]</p>
<p><strong>3) Using Info</strong></p>
<p>Info has a similar structure to HTML, where there can be links within and between nodes, but there&#8217;s also an explicit tree structure with its own structured navigation.  Here&#8217;s a pretty complete set of commands, with shorter descriptions and better grouping than the Info help shows.</p>
<p><span style="text-decoration: underline;">Basics</span><br />
C-h i &#8211; start Info<br />
q &#8211; quit info<br />
? &#8211; info commands<br />
SPC &#8211; returns from commands screen</p>
<p><span style="text-decoration: underline;">Node Navigation</span><br />
p, n &#8211; previous/next node in subtree<br />
[, ] &#8211; previous/next node in tree traversal<br />
l, r &#8211; back/forward in node nagivation history<br />
u &#8211; Move up<br />
space &#8211; pagedown or next node<br />
del &#8211; pageup or previous node<br />
b &#8211; go to beginning of node</p>
<p><span style="text-decoration: underline;">Links</span><br />
M-TAB/TAB &#8211; previous/next cross-reference or menu item<br />
m &#8211; type name of menu item and go to that node</p>
<p><span style="text-decoration: underline;">Jump</span><br />
d &#8211; return to Info directory<br />
t &#8211; return to file root<br />
L &#8211; go to menu of visited nodes<br />
T &#8211; go to table of contents of the current Info file</p>
<p><span style="text-decoration: underline;">Search</span><br />
s &#8211; regex search, move to node where next match is found<br />
S &#8211; regex search, case sensitive<br />
M-x Info-search-next &#8211; repeat previous regex search<br />
i &#8211; search for and jump to index topic<br />
, &#8211; repeat previous i search<br />
g &#8211; move to node specified by name &#8211; to filename by searching for (FILENAME)NODENAME<br />
1..9 &#8211; jump to 1st-9th item in node&#8217;s menu<br />
w &#8211; put name of current node into kill ring<br />
M-n &#8211; clone Info buffer to new window</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>That&#8217;s all for Info &#8211; it only takes 10 minutes to go through the Info on Info tutorial and it&#8217;s easy to use.  This is just one of the many things that takes a couple hours to muscle through the setup and online docs, then it makes things so much easier EVERY SINGLE TIME you use it afterwards.  My goal is to take these 2-3 hour research tasks and turn them into a 10 minutes guide.  Hopefully by lowering the barriers to competence, more people will seek out and invest in learning the great tools out there that Windows developers tend to miss out on.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pchristensen.com/blog/articles/setting-up-and-using-emacs-infomode/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Installing CLISP, Emacs, and SLIME on Windows XP</title>
		<link>http://www.pchristensen.com/blog/articles/installing-clisp-emacs-and-slime-on-windows-xp/</link>
		<comments>http://www.pchristensen.com/blog/articles/installing-clisp-emacs-and-slime-on-windows-xp/#comments</comments>
		<pubDate>Fri, 16 May 2008 15:48:40 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Lisp]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.pchristensen.com/blog/?p=237</guid>
		<description><![CDATA[Until this week, I had been putting off setting up a CL/Emacs/SLIME environment from scratch ever since I had trouble getting ASDF to work with Lispbox.  Every time I tried, I ran into some will-sapping problem like needing to find a good Windows program for .tar.gz files, or finding the command line flags to [...]]]></description>
			<content:encoded><![CDATA[<p>Until this week, I had been putting off setting up a CL/Emacs/SLIME environment from scratch ever since I had <a href="http://www.pchristensen.com/blog/articles/sleeping-too-much-and-fighting-with-emacs-and-asdf/" target="_self">trouble getting ASDF to work</a> with <a href="http://www.gigamonkeys.com/book/lispbox" target="_blank">Lispbox</a>.  Every time I tried, I ran into some will-sapping problem like needing to find a good Windows program for .tar.gz files, or finding the command line flags to get CLISP to run right, or figuring out the best way to setup a folder structure that matches the Unix folders used by most Lispers.  Every time I fixed one problem, I ran into another.  For someone out there trying to do a setup like this, there are lots of good resources, but they are either incomplete or outdated.</p>
<p>For instance, the Common Lisp Cookbook has a very thorough page on <a href="http://cl-cookbook.sourceforge.net/windows.html" target="_blank">Setting Up an IDE with Emacs on Windows or Max OSX</a>, but as far as I can tell, it&#8217;s from 2004 or earlier because it doesn&#8217;t mention SBCL or SLIME, two of the most popular pieces of CL development software today.  Or when you run into a specific problem, it&#8217;s usually not too hard to find an answer, but it might not match the setup you&#8217;re using.  That&#8217;s why I had to quit using Lispbox, because no one had any clue how it was configured, especially not on Windows.  n00bs didn&#8217;t know the answers and the wizards had a traditional setup.</p>
<p>Here are some of the variables that contribute to the combinatorial explosion of configuration, in order or pain caused:</p>
<ul>
<li>Operating system: Linux (many flavors), Mac, Windows, Cygwin</li>
<li>CL implementation: most common are SBCL, CMUCL, Allegro, LispWorks, CLISP</li>
<li>CL implementation version (I ran into a problem here)</li>
<li>SLIME version (stable 2.0 release or CVS snapshot)</li>
<li>Emacs version (I didn&#8217;t run across any problems with this)</li>
<li>I almost forgot, now there&#8217;s <a href="http://bitfauna.com/projects/cusp/" target="_blank">Cusp</a>/Eclipse if you don&#8217;t want to use Emacs/SLIME, but right now Cusp is only tested on SBCL.</li>
</ul>
<p>Maybe someday someone will try out all of those combinations and report, but for today, I did exactly one:  Windows XP, CLISP 2.44, SLIME CVS, and Emacs 22.2  Why CLISP?  After reading lots of internet, I came to the conclusion that (aside from the commercial CLs), CLISP is the best implementation for Windows users.  The knocks against it are that it&#8217;s slow because it&#8217;s byte-code compiled, it doesn&#8217;t have threads, and on some points, it&#8217;s ideologically different from CL and other implementations.</p>
<p>Well, the performance isn&#8217;t a big concern for me (plus as I went to press, <a href="http://groups.google.com/group/comp.lang.lisp/browse_thread/thread/188acc89e1d90cbe?hl=en" target="_blank">2.45 was released with experimental JIT compilation</a>), the threads also aren&#8217;t a big deal right now, and I think the differences will help me be aware of the considerations for writing portable code.  Also regarding the SBCL windows port, it&#8217;s still considered experimental (currently v1.013 for Windows) but people are saying <a href="http://groups.google.com/group/comp.lang.lisp/msg/0cc76370e8e6d5a8" target="_blank">it&#8217;s stable and everything works except the threads</a>.  There&#8217;s even an msi installer for the Windows version.  One of my next projects will be to dive into the SBCL documentation and mailing lists to get a better feel for it.</p>
<p>As far as the philosophy behind this (and future) setup guides, I want them to be a) thorough and b) instructive.  Instructive?  If you just want to take my word for everything, that&#8217;s fine, but I want you to know where I got my info from, so I&#8217;ve tried to include links to references for each step.  On to the setup guide!</p>
<p><span id="more-237"></span></p>
<p><strong>0. Files to Download</strong></p>
<p>If you want to get started on downloading the setup files, here are the links:</p>
<ul>
<li><a href="http://www.7-zip.org/" target="_blank">7-zip</a> (<a href="http://downloads.sourceforge.net/sevenzip/7z457.exe">download v4.57</a> &#8211; 840K) &#8211; for unpacking .tar and .tar.gz files commonly used in *nix.</li>
<li><a href="http://www.gnu.org/software/emacs/" target="_blank">Emacs</a> (<a href="http://ftp.gnu.org/pub/gnu/emacs/windows/emacs-22.2-bin-i386.zip">download v22.2</a> &#8211; 37MB)</li>
<li><a href="http://clisp.cons.org/" target="_blank">CLISP</a> (<a href="http://downloads.sourceforge.net/clisp/clisp-2.44-win32-mingw-big-install.exe">download v2.44</a> &#8211; 4MB)</li>
<li><a href="http://common-lisp.net/project/slime/" target="_blank">SLIME</a> (<a href="http://common-lisp.net/cgi-bin/viewcvs.cgi/root.tar.gz?root=slime&amp;view=tar">download CVS snapshot</a> &#8211; 700K) &#8211; CLISP recently removed a function used in the 2.0 version of SLIME, but the SLIME CVS snapshot has that fixed</li>
</ul>
<p><strong>1. Setup Directories</strong></p>
<p>Windows XP loves extremely long pathnames like C:\Documents and Settings\Username\Application Data.  This is okay if for GUI-driven apps, but in Emacs, you&#8217;re not clicking, you&#8217;re typing, and you want short path names.  Also, much (most?) of the open source Common Lisp tools are developed on *nix, so there&#8217;s less impedance mismatch when using stuff off the net if you have a *nix-ish folder structure.</p>
<p>Start with a root folder.  In the pathnames in the rest of this guide, I&#8217;ll refer to it as [HOME].  I used C:\home\ to match the *nix convention of having user files be in /home/username/. You also need a username directory &#8211; I called mine peter and I&#8217;ll refer to it as [USR].  So in my case, [HOME]/[USR] would be C:\home\peter\.</p>
<p><strong>Emacs NOTE #1:</strong> One important point about filenames in Emacs is that they CAN be entered with &#8216;/&#8217;, but if you prefer to use &#8216;\&#8217;, you have to escape it with another back slash, so in Emacs buffers and files, you would enter &#8220;C:/home/&#8221; or &#8220;C:\\home\\&#8221; but never &#8220;C:\home\&#8221;.  The trailing slash is also important because it indicates that it&#8217;s a directory.  Now that you have chosen your [ROOT] and [USR] values, these are the folders you should setup:</p>
<ul>
<li>[HOME]\[USR]\</li>
<li>[HOME]\[USR]\site\</li>
<li>[HOME]\[USR]\docs\</li>
<li>[HOME]\[USR]\lisp\</li>
<li>[HOME]\[USR]\info\</li>
<li>[HOME]\bin\</li>
</ul>
<p><strong>2. Setup Emacs</strong></p>
<p>Emacs does not need to be &#8220;installed&#8221; like most Windows apps &#8211; it just runs from its directory. Extract it to [HOME]\bin\.  I changed the folder name from emacs-22.2 to just emacs, so my path was c:\home\bin\emacs\.  You run emacs by running the file [HOME]\bin\emacs\bin\runemacs.exe.</p>
<p>Emacs settings are stored in a configuration file called &#8220;.emacs&#8221;.  On Windows, the default working folder and .emacs location is C:\Documents and Settings\Username\Application Data, but that&#8217;s too painful to type and it&#8217;s a hidden folder so it&#8217;s not even easy to get through with the GUI.  To have Emacs work in a different folder, create a file called site-start.el in the emacs\site-lisp folder.  In that folder, put the following line (but change the path to match yours):</p>
<pre>(setenv "HOME" "[HOME]/[USR]/")</pre>
<p>(<a href="http://groups.google.com/group/comp.lang.lisp/msg/44e7f62088460aa7" target="_blank">Thanks Nathaniel!</a> This was probably the biggest annoyance of mine that made me put off finishing setup for so long.)</p>
<p><strong>Emacs NOTE #2:</strong> Emacs has lots (and lots and lots) of keyboard shortcuts, many more than there are letters in the alphabet. Many of them require multiple keys or a sequence of keys called a &#8220;chord&#8221;.  The two modifier keys used are Control and Alt (also called Meta).  The common way to write chords is to use C- and M- for Control and Meta, so to run the command to close Emacs, you hold down Control and X, then let go, then hold down Control and C.  This is written as C-x C-c.  Sometimes a chord is followed by another letter or the name of a command.  For instance, to undo, you hold Control and x, then let go and hit u.  This is written as C-x u.  Dashes mean press at the same time, space means let go.  Easy!  I made a <a href="http://www.pchristensen.com/blog/articles/public-beta-open-for-ultimate-n00b-slimeemacs-cheat-sheet/">cheat sheet for common commands in Emacs and SLIME</a>.</p>
<p>Now it&#8217;s time to create your .emacs file.  Run emacs and hit C-x C-f.  This is the find command, which is used to create or open a file.  At the prompt &#8220;Find file: &#8220;, type &#8220;~/.emacs&#8221; (without quotes).  Right now just put a ; (that&#8217;s the comment marker in Emacs Lisp files) and save it by hitting C-x C-s.  There&#8217;s a world of stuff you can put in a .emacs file, but that&#8217;s too much to bite off now.</p>
<p><strong>3. Install CLISP</strong></p>
<p>This is easy if you download the install package (that&#8217;s the one I linked to).  Run the installer and choose [HOME]\bin\clisp\ as the install directory.  That&#8217;s it!</p>
<p><strong>4. Setup SLIME</strong></p>
<p>CLISP changed recently (around version 2.44 &#8211; not sure exactly) and broke compatibility with the SLIME 2.0 release.  This was fixed in development and the CVS snapshot works.  If you try to use the 2.0 release, you&#8217;ll get an error that looks like this:</p>
<blockquote><p>INTERN(&#8220;FRAME-UP-1&#8243;): #&lt;PACKAGE SYSTEM&gt; is locked</p></blockquote>
<p>So use the CVS snapshot (which I linked to) and you should be fine.</p>
<p>Extract the SLIME folder to [HOME]\bin\emacs\site-lisp. (Here&#8217;s a tip about <a href="http://groups.google.com/group/comp.lang.lisp/msg/5fce0960ef4e27be" target="_blank">putting emacs code in site-lisp</a>).</p>
<p>Now in Emacs, open your .emacs file (C-x C-f, ~/.emacs) and enter the following (<a href="http://common-lisp.net/project/slime/doc/html/Installation.html" target="_blank">general SLIME instructions</a>, <a href="http://groups.google.com/group/comp.lang.lisp/msg/261cf5c37b8f9257" target="_blank">CLISP specific parameters</a>), changing your pathnames as usual:</p>
<blockquote><p>(setq inferior-lisp-program &#8220;[HOME]/bin/clisp/full/lisp.exe<br />
-B [HOME]/bin/clisp/full<br />
-M [HOME]/bin/clisp/full/lispinit.mem<br />
-ansi -q&#8221;)<br />
(add-to-list &#8216;load-path &#8220;[HOME]/bin/emacs/site-lisp/slime/&#8221;)<br />
(require &#8217;slime)<br />
(slime-setup)</p></blockquote>
<p>Save the .emacs file (C-x C-s), then run the eval-buffer command (M-x eval-buffer).  This will run the code that you just entered and tell Emacs how to run SLIME.</p>
<p>Now, you start slime with M-x slime and you&#8217;re ready to go!</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>I hope this works for you &#8211; I ran through it on another computer and it worked the first time, so if you use exactly these parts you should be OK.  Please <a href="http://www.pchristensen.com/blog/contact-me/">let me know</a> if you run into problems so I can incorporate the fix into my doc.  Many thanks to everyone who I linked to, since they did the coding, testing, and writeups that I used to get here.  More resources to come &#8211; tell me what you&#8217;d like to see.  If it&#8217;s something I was planning on doing anyway, I&#8217;ll move it up my queue.</p>
<p>The next guide will probably be setting up your built-in documentation (Hyperspec, etc).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pchristensen.com/blog/articles/installing-clisp-emacs-and-slime-on-windows-xp/feed/</wfw:commentRss>
		<slash:comments>44</slash:comments>
		</item>
		<item>
		<title>Music Operates Directly On Your Abstract Syntax Tree</title>
		<link>http://www.pchristensen.com/blog/articles/music-operates-directly-on-your-abstract-syntax-tree/</link>
		<comments>http://www.pchristensen.com/blog/articles/music-operates-directly-on-your-abstract-syntax-tree/#comments</comments>
		<pubDate>Fri, 09 May 2008 20:24:32 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.pchristensen.com/blog/?p=230</guid>
		<description><![CDATA[I mentioned music in each of the last two posts as a digitizable creation that people enjoy enough to pay for.  So what is it about music that is so great?  I&#8217;ve been asking myself this question for years, and now seems like the time to try and tackle it.
I&#8217;ve always enjoyed music [...]]]></description>
			<content:encoded><![CDATA[<p>I mentioned music in each of the last <a href="http://www.pchristensen.com/blog/articles/what-kind-of-software-would-people-actually-pay-for/">two</a> <a href="http://www.pchristensen.com/blog/articles/the-value-is-in-the-experience/">posts</a> as a digitizable creation that people enjoy enough to pay for.  So what is it about music that is so great?  I&#8217;ve been asking myself this question for years, and now seems like the time to try and tackle it.</p>
<p>I&#8217;ve always enjoyed music &#8211; from playing the trumpet in elementary school, owning a $230 portable CD player in 1993, to being an <a href="http://www.amazon.com/o/asin/B0012JNQYK/pchristensen-20" target="_blank">iPod man</a> today.  Practically every spare dollar I earned between the ages of 13 and 17 was spent on CDs.  I love and appreciate all kinds of music &#8211; classical, rap, rock, alternative, opera, techno,  Hawai&#8217;ian (especially Hawai&#8217;ian), even country (Claire from 9th grade, if you&#8217;re reading this (which I&#8217;m pretty darn sure you&#8217;re not), it took over 15 years and I&#8217;m still not a fan, but I can say now that I appreciate country music).  But now I don&#8217;t listen to music very often.  In fact hardly at all.  I have my iPod running most of the day, but I listen to podcasts, sweet delicious podcasts of all stripes that keep me informed and help me learn new things.  What&#8217;s the difference between me now and when I was in high school (besides the notably reduced mental redardation and 70 extra pounds)?</p>
<p><strong>Music and the Brain</strong></p>
<p><a href="http://www.amazon.com/exec/obidos/ASIN/0805074562/pchristensen-20"><img style="float:right;margin-left:4px;border:0px;" src="http://ecx.images-amazon.com/images/I/41QXSP190PL._SL160_.jpg" alt="On Intelligence" width="106" height="160" /></a></p>
<p>My answer has come from my interest in neuroscience and artificial intelligence.  Jeff Hawkins&#8217; book <a href="http://www.amazon.com/o/asin/0805074562/pchristensen-20" target="_blank">On Intelligence</a> (God bless him for writing it) stresses the temporal nature of the brain &#8211; how learning, memory, even sensory perceptions like vision and hearing only work on data that changes through time.  Our brain works by processing related events connected by the sequence they occur in &#8211; kind of like musical notes!  Music speaks our brain&#8217;s native language!  No compiling, no byte code, etc &#8211; it operates directly on our abstract syntax tree (that&#8217;s my analogy, don&#8217;t hold it against Jeff).  That is why it&#8217;s easier to remember song lyrics than the words of a speech &#8211; the lyrics are attached to a musical sequence that burns into your mind.</p>
<p><span id="more-230"></span></p>
<p>[Someday I'm going to give On Intelligence a proper writeup, but I don't have it in me right now.  It is definitely <em>the most exciting </em>book I've read in the last couple years.  Whoops, gotta stop talking about it - my pulse is starting to race.]</p>
<p><a href="http://www.amazon.com/exec/obidos/ASIN/0525949690/pchristensen-20"><img style="float:left;margin-right:4px;border:0px;" src="http://ecx.images-amazon.com/images/I/51RBMD235NL._SL160_.jpg" alt="This Is Your Brain on Music: The Science of a Human Obsession" width="106" height="160" /></a></p>
<p><a href="http://dlweinreb.wordpress.com/" target="_blank">Dan Weinreb</a> recently wrote a <a href="http://dlweinreb.wordpress.com/2008/04/30/this-is-your-brain-on-music/" target="_blank">review</a> of a book called &#8220;<a href="http://www.amazon.com/o/asin/0525949690/pchristensen-20" target="_blank">This is Your Brain on Music</a>&#8221; that I haven&#8217;t read but am dying to based on his review.  Please read his entire review (and the book too!) but check out these nuggets on how entwined music is in your brain:</p>
<p>-When you hear a musical tone, there are neurons in your brain that send electrical pulses at <em>exactly the same frequency as the note<br />
</em></p>
<p>-most people can recreate the exact tempo of a song they know, to within a few percent, even if they&#8217;re not musically trained</p>
<p>-your brain can distinguish between musical consonance and dissonance before your neocortex (higher, human level thinking) gets involved</p>
<p>I find all of that ridiculously fantastic, and if you&#8217;re at all interested in thought and music enough to keep listening (er, reading) to me, then you should check out those two books.</p>
<p>Example time!  Look at the following sentence:</p>
<blockquote><p>Janet owned a baby sheep.</p></blockquote>
<p>Just a normal sentence that&#8217;s super easy to forget.  Now look at this slightly different wording, set to music:</p>
<blockquote><p><img class="alignnone size-full wp-image-229" title="marylamb" src="http://www.pchristensen.com/blog/wp-content/uploads/2008/05/marylamb.jpg" alt="\" width="167" height="64" /></p></blockquote>
<p>The words form a sequence (same as in the first sentence), the musical notes form a sequence, and each note links to its word, so even if you couldn&#8217;t say the sentence exactly by itself, you can fill in missing words if you sing it.  It&#8217;s a heavily connected graph.</p>
<p><strong>Emotional Amplifier</strong></p>
<p>That&#8217;s the mechanics of why music works on our brains, but most people listening to music aren&#8217;t trying to accurately remember sentences.  What&#8217;s more important is that since music talks directly to our brains, it can cause our brains to affect our emotions, hormones, and all of the other chemical goodness that our brain does without us asking it to.  So music can affect your mood, and usually, no matter what mood you&#8217;re in, you want more of it.  When I&#8217;m discouraged or wistful, <a href="http://www.amazon.com/o/asin/B000002H2H/pchristensen-20" target="_blank">Fade to Black</a> by Metallica captures my mood perfectly.  When I&#8217;m exceptionally grateful and loving, <a href="http://www.amazon.com/o/asin/B0000041OG/pchristensen-20" target="_blank">Con Te Partiro</a> by Andrea Bocelli amplifies it (I almost cried with joy and love for my family when I heard him <a href="http://youtube.com/watch?v=lv38j4lPzd0" target="_blank">sing a lullaby version of it to Elmo</a> on Sesame Street).  When I&#8217;m frustrated and stubborn and need to unlock the power of my brain to triumph over a knotty problem, <a href="http://www.youtube.com/watch?v=v2E8bhDHESk" target="_blank">Beethoven&#8217;s Egmont Overture</a> is the key &#8211; rarely can I get through the whole 9 minutes without figuring out how to triumph over what was impeding me, or at least get in the frame of mind to solve the problem shortly thereafter.  Regardless of what you&#8217;re feeling, if you find a song that matches that feeling, it&#8217;s like having your best friend there to pour your heart out to.  It listens to your heart, understands you, encourages you, and celebrates with you.  Because it is directly in your brain, it is also directly in your heart in a way that few people on earth can be.</p>
<p>That&#8217;s the difference between the high school me and the modern me.  My teenage hormones gave my mood and feelings much more control over me than my rational, hard working life as an employee, father, and husband currently allows.  I also feel that I have much more control over my life at this point so I don&#8217;t succumb to the powerlessness that is such a big part of being a teenager.  I know my purpose now, so music isn&#8217;t as necessary as an outlet for unchecked emotions.</p>
<p>Music is a emotional amplifier and an emotional determinant.  Since the human experience is largely an effort to either make ourselves feel a certain way or wallow in the fact that circumstance has made us feel a certain way, then it&#8217;s no wonder that music is so powerful that poor people will pay for it and honest people will steal it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pchristensen.com/blog/articles/music-operates-directly-on-your-abstract-syntax-tree/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Hacker vs Engineer &#8211; Know The Difference!</title>
		<link>http://www.pchristensen.com/blog/articles/hacker-vs-engineer-know-the-difference/</link>
		<comments>http://www.pchristensen.com/blog/articles/hacker-vs-engineer-know-the-difference/#comments</comments>
		<pubDate>Thu, 06 Mar 2008 17:59:49 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Startups]]></category>

		<guid isPermaLink="false">http://www.pchristensen.com/blog/articles/hacker-vs-engineer-know-the-difference/</guid>
		<description><![CDATA[Some of the most commonly used terms are often the most misunderstood and least agreed upon.  One example of this is the difference between a startup and a business.  Now I&#8217;m no expert (having run neither of them), but I do read a lot and I pay $8 a month for hosting, so [...]]]></description>
			<content:encoded><![CDATA[<p>Some of the most commonly used terms are often the most misunderstood and least agreed upon.  One example of this is the difference between a startup and a business.  Now I&#8217;m no expert (having run neither of them), but I do read a lot and I pay $8 a month for hosting, so I can pretend to be!  Here are my definitions for startup and business (again lifted from a Hacker News <a href="http://news.ycombinator.com/item?id=129797" target="_blank">comment</a> I made):</p>
<p><strong>Startup</strong>:  This is when your revenues can&#8217;t support the company and its employees at a standard they would expect.  This could mean a lot of things, for instance</p>
<ul>
<li>You&#8217;re self funding but doing the ramen/living on a friend&#8217;s couch/wifi-freeloading super cheapo route.  Maybe you&#8217;re making a profit but you don&#8217;t want to live like this forever.</li>
<li>You&#8217;re living off of investment money unrelated to what your startup is producing:  angel/VC money, cash from a prior successful exit, student loans, day job money, etc.</li>
</ul>
<p>The key thing is that your idea and execution are currently unproven.  You should be getting noticeably better each day as you improve your technology, your product, your marketing, your brand, your sales cycle, etc, (all these things create wealth but not necessarily money), trying to find the right combination of those things that lead to market acceptance and self-sustaining revenues.  Or your goal might not be self-sustaining revenues but to create a product or technology or business that will be bought by another, larger company.</p>
<p><strong>Business</strong>: A business is funded by its customers and revenues, and it has found a successful niche in the market.  Once you get to this point, some of the pressure is off, although your niche and success is a moving target and you need to continue working and executing in order to get knocked out of it.  There are completely different skills and personalities needed to nurture and grow a successful business/product as opposed to developing a new one and finding a market for it.</p>
<p><span id="more-205"></span>One edge case is a successful, profitable business that has taken VC or other aggressive investment.  The profits might be good enough for the business size, but the expectation by investors of a big exit is like a huge debt obligation that must be met.  $10 million in annual revenue won&#8217;t cut it if you&#8217;re valued at $1B.  In that case, you&#8217;re still a startup.</p>
<p>So  by this definition, pretty much all YCombinator companies are startups (I don&#8217;t know of any that have real revenue &#8211; Octopart maybe).  Facebook is a startup &#8211; a huge and wildly successful one, but until they find their killer revenue model, they&#8217;re living off of investment money.  37signals is not a startup &#8211; they were profitable from web design consulting while they developed Basecamp, Rails, etc, and now their products fund their business without outside investment.  Fog Creek was a startup (living off of Joel&#8217;s MSFT cash) until FogBugz took off, and now revenue from that product runs their business.  Google is a business, but until they perfected AdWords and Adsense (2002? 2003?), they were like Facebook is now, a really big successful startup.  YouTube went from startup to acquisition and never was a business.  You&#8217;re welcome (nay, encouraged!) to adopt these definitions and spread them, since I think it would clear up a lot of things.</p>
<p>A similar misconception comes from the titles that people who program computers are given (or give themselves): hacker, programmer, software engineer, solution developer, web programmer, code monkey, software architect, etc (I&#8217;ve had several of those at times).  I&#8217;m going to look at two of them &#8211; hacker and (software) engineer &#8211; since they correspond pretty well to the definitions of startup and business above.</p>
<p><strong>Hacker</strong>: Always trying new things, trying to stretch the limits of what&#8217;s possible or what exists.  This could be from the perspective of science (Einstein, Tesla, Michio Kaku, etc), the environment (<a href="http://www.pchristensen.com/blog/articles/worlds-best-primer-on-energy-competitiveness/" target="_blank">Amory Lovins</a>, <a href="http://www.pchristensen.com/blog/articles/the-ecology-of-commerce-by-paul-hawken/" target="_blank">Paul Hawken</a>), in addition to the more common usage in computers.  Linus Torvalds is a great example of a hacker &#8211; he had two giant ideas that few thought were possible &#8211; writing a free operating system and doing it with a worldwide collection of volunteers (GNU/FSF fans, I&#8217;m not forgetting you, I&#8217;m just citing the most prominent example).  Once something is functional and successful, the hacker moves on to another hard problem, like a serial entrepreneur.</p>
<p><strong>Engineer</strong>: All of the definitions of engineering that I&#8217;ve found were too complicated and missed the point, so I propose this: An engineer is someone who takes something that is known to be <em>possible</em>, and makes it fit within a given, limiting set of criteria.  Some common criteria are:</p>
<ul>
<li>within a fixed budget</li>
<li>meet a performance benchmark</li>
<li>exceed certain reliability requirements</li>
<li>make it aesthetically pleasing</li>
<li>must include a certain capacity</li>
<li>meet arbitrary regulations (accessibility, environmental, paying living wages, etc)</li>
</ul>
<p>Note that this doesn&#8217;t mean that an engineer is any less creative than a hacker.  On the contrary, the constraints provided by the engineering problem can provoke more creative and original thinking than that of the original invention.  For example, Ikea has furniture that looks like designer furniture that&#8217;s many times more expensive, but it has to 1) be inexpensive, 2) be made of parts that fit in a flat box, 3) be easily assembled by non-technical people, 4) use the common bin of Ikea parts, and 5) be durable enough that people will continue to buy Ikea furniture.  So the hacker is the one figuring out how pretty furniture should look, and the engineer is the one doing trial and error with the flat box and the alan wrench.  Who&#8217;s got more problems to solve?  Hard to say.  They&#8217;re different kinds of problems.</p>
<p>I think a great example of the hacker vs engineer mentality happened when Paul Graham <a href="http://www.paulgraham.com/arc0.html" target="_blank">released the first version of Arc with no Unicode support</a>.  There was a <a href="http://www.lispcast.com/2008/02/the-arc-debate/" target="_blank">big brouhaha</a> on <a href="http://xkcd.com/386/" target="_blank">the internet</a> with people basically that Paul eats babies and <a href="http://dilbert.com/comics/dilbert/archive/dilbert-20080223.html" target="_blank">respects Satan&#8217;s no-nonsense approach to discipline</a>.  Well, pg is also on record in saying that the initial users of a language shape its future and Arc is intended to be a language for hackers.  While I believe his reason for not including Unicode (he didn&#8217;t want to spend time thinking about character sets), I think that he <em>deliberately</em> mentioned it in his release notes (and in a defiant way) so that <em>engineers wouldn&#8217;t want to use Arc</em>.  Someone who can&#8217;t live without Unicode support is clearly not doing the explorative, rapid development that pg is trying to promote.  So with one paragraph (and by ignoring a zillion trolling flame posts), he scared off the audience he didn&#8217;t want.  He understands the difference between a hacker and an engineer and used it to his advantage.</p>
<p>So what&#8217;s better?  As with Ikea, there&#8217;s no answer to that question.  Hackers and startups/entrepreneurs get more favorable ink, and have more outstanding success stories, but engineers make good money, get challenged in their jobs, are generally respected, and their solutions get used by happy clients.  Indeed, if you need an engineer, you have clients!  Right now I&#8217;m a software engineer (really, it says it on my business card!) and it has been good to me.  I get unusual technical challenges that  I wouldn&#8217;t have come across in my own projects, and unlike the &#8220;friend&#8217;s couch and ramen&#8221; startup life, I can feeds myself and my family and live comfortably.  But that doesn&#8217;t mean the sparkle of hackerdom and entrepreneurship isn&#8217;t gleaming in my eye.  That&#8217;s where my passion goes and I think the time I spend hacking at night on my own projects helps me engineer better solutions in my day job.</p>
<p>The important thing is to understand the difference and know when you need to hack, and when you need to engineer.  Unlike the previous examples where it was all one or all the other, most development work requires you to assume both of these roles at different times.  When debugging or scaling, you&#8217;ll probably need to put on your engineer hat, while if you&#8217;re designing a new feature, rewriting, or doing a greenfield project, you&#8217;ll hack more.  There can&#8217;t be a divide between the two, whether on a team or different roles for an individual.  A scaling problem might require big-picture experimentation to overcome a serious limitation.  While hacking a new site, you might need to iterate over a <a href="http://www.37signals.com/svn/posts/898-design-decisions-adding-the-calendar-strip-to-the-backpack-newsroom" target="_blank">small, important area of a page</a> in order to hit your sweet spot in the market.  Do both, and know when to do which.</p>
<p>What do you think of these definitions?</p>
<p><strong>UPDATE</strong>:  Apparently I didn&#8217;t explain well that I see this as a continuum.  So lets say that pure, exploratory hacking is at x=0, and extremely demanding hard engineering (building bridges, medical devices, rocket boosters, etc) is at x=100, then software engineering might  be in the 20s &#8211; still imprecise and flexible (by comparison), but constrained by cost, time, and flexibility.  Also, just because some types of engineering have severe safety constraints, others may need long term reliability (car parts) or low cost (manufacturing a toothbrush).  Those are engineering too, so maybe it makes sense to compare software engineering to business-related engineering.</p>
<p><strong>UPDATE #2</strong>: Found a great <a href="http://news.ycombinator.com/item?id=314034" target="_blank">new definition</a> on HN:</p>
<ul>
<li><span class="comment"><span style="color: #000000;">Technicians implement others&#8217; designs using skills</span></span></li>
<li><span style="color: #000000;">Engineers create new designs using knowledge</span></li>
<li><span style="color: #000000;">Scientists create new knowledge</span></li>
</ul>
<p><span class="comment"><span style="color: #000000;">&#8220;Pure&#8221; programmers are technicians. Computer scientists are engineers or scientists.</span></p>
<p>Thanks wwalker3!</p>
<p></span></p>
<p>Follow the comments on <a href="http://news.ycombinator.com/item?id=130757" target="_blank">Hacker News</a>,  <a href="http://reddit.com/info/6b5hd/comments/" target="_blank">reddit</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pchristensen.com/blog/articles/hacker-vs-engineer-know-the-difference/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Sleeping Too Much and Fighting With Emacs and ASDF</title>
		<link>http://www.pchristensen.com/blog/articles/sleeping-too-much-and-fighting-with-emacs-and-asdf/</link>
		<comments>http://www.pchristensen.com/blog/articles/sleeping-too-much-and-fighting-with-emacs-and-asdf/#comments</comments>
		<pubDate>Sat, 01 Mar 2008 05:12:46 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Polyphasic]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.pchristensen.com/blog/articles/sleeping-too-much-and-fighting-with-emacs-and-asdf/</guid>
		<description><![CDATA[So it has been a while since I wrote something useful.  I have either an excuse or an explanation, (depending on how you value excuses).  Two weekends ago, I got sick and, long story short, I got better but I had to sleep a lot to do it.  Ergo, no polyphasic sleep [...]]]></description>
			<content:encoded><![CDATA[<p>So it has been a while since I wrote something useful.  I have either an excuse or an explanation, (depending on how you value excuses).  Two weekends ago, I got sick and, long story short, I got better but I had to sleep a lot to do it.  Ergo, no polyphasic sleep during that time.  I&#8217;ve been sleeping like a normal person, except my wife has had trouble sleeping so I&#8217;ve been sleeping for maybe 6-7 hours, with a 30-60 minute interruption somewhere in the middle.  What did this do to me?  It made me really, really tired!  I&#8217;ve been sleeping too much and doing a bad job at it, and I&#8217;m sick of it.  I&#8217;m taking one last night sleep tonight and then tomorrow I&#8217;ll start taking my naps and staying up at night.  And I&#8217;m very much looking forward to getting that time back.</p>
<p>So with 5 fewer hours a day to work, what did I cut out and what did I keep?  Well, I haven&#8217;t a) written quality blog material, b) done housework chores, c) programmed as much, or d) made all the great improvements people suggested to my <a href="http://www.pchristensen.com/blog/articles/public-beta-open-for-ultimate-n00b-slimeemacs-cheat-sheet/" target="_blank">SLIME/Emacs cheat sheet</a>.  I decided that if I only had a little time, I should spend it on what&#8217;s most important, which right now is sharpening my Lisp skills.  I&#8217;m trying to get to a point where I can work on programming for my startup without referring to documentation for every single thing I try to do.  That consists of 3 things:</p>
<ol>
<li>get better at Lisp (currently working through <a href="http://www.gigamonkeys.com/book/" target="_blank">Practical Common Lisp</a>)</li>
<li>learn to use ASDF (so I don&#8217;t have to only use one file)</li>
<li>customize Emacs and learn more commands</li>
</ol>
<p>#1 is going nicely.  Unfortunately, #2 and #3 pose a bit of a problem.  I&#8217;m currently using the Allegro-bundled <a href="http://www.gigamonkeys.com/book/lispbox/" target="_blank">LispBox</a> for Windows from the PCL website.  It&#8217;s been great for getting started, getting comfortable with basic commands, and getting familiar with SLIME and Emacs.  However, it&#8217;s not conducive at all to customization.  I&#8217;m not saying that it can&#8217;t be customized, just that it is a minor distribution for new users, so there&#8217;s not a lot of documentation out there for working with it.  Three big strikes: (Windows, LispBox, Allegro) means that there are very few users, very few comments, and very little help.</p>
<p>For instance, ASDF is included and configured correctly, with the code from PCL already setup and easy to load.  However, I tried for (too long) to get ASDF to load my code.  I wrote my own packages.lisp and .asd files, I tried pushing values for my directory to the asdf:*central-registry* so I didn&#8217;t have to make a zillion shortcut files, etc.  Long story short, it didn&#8217;t work and nowhere on the Google did anyone have specific advice for my setup.  Ditto with .emacs customization with Lispbox (for anyone who&#8217;s wondering, I think it&#8217;s at C:\Program Files\acl81-express\misc\dot-emacs.el, but I couldn&#8217;t get the settings to load.  YMMV).  It&#8217;s just too obscure and I don&#8217;t have the time to figure out everything on my own, so I&#8217;m moving to a more mainstream setup.</p>
<p>So I put development and practice mostly on hold so I could get a more common setup that will make it easier to get help with when (not if) I have issues.  I&#8217;m still working on the setup, becuase I spent a lot of time researching recommendations and best practices.  I want to get it right (or at least mostly right) the first time so I don&#8217;t have to go back and re-do everything again.  Tweaking is fine and I plan to keep doing that forever, but no more redos.  I&#8217;ll put out another n00b type giude (along with rationales) when I get my own setup working, but here&#8217;s what I&#8217;ve come up with:</p>
<ul>
<li>Emacs 22.1</li>
<li>SLIME 2.0</li>
<li>CLisp</li>
<li>Cygwin(?) &#8211; I&#8217;m trying to limit the number of tools I have to deal with so I wanted to leave out Cygwin.  Can anyone give advice on whether it will make my life easier or harder in the short term?</li>
</ul>
<p>Thanks to everyone who has expressed interest in the meantime.  Keep your eyes out for more guides and an update to the cheat sheet.  That&#8217;s my motto, helping the n00b in all of us!</p>
<p>UPDATE:  I wrote this on Thursday but haven&#8217;t been able to post until Friday night.  I&#8217;ve taken two naps, planning on staying up at night, and I feel great!  I&#8217;m already happy to be back on a polyphasic schedule!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pchristensen.com/blog/articles/sleeping-too-much-and-fighting-with-emacs-and-asdf/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Public Beta Open For &#8220;Ultimate N00b SLIME/Emacs Cheat Sheet&#8221;</title>
		<link>http://www.pchristensen.com/blog/articles/public-beta-open-for-ultimate-n00b-slimeemacs-cheat-sheet/</link>
		<comments>http://www.pchristensen.com/blog/articles/public-beta-open-for-ultimate-n00b-slimeemacs-cheat-sheet/#comments</comments>
		<pubDate>Thu, 14 Feb 2008 16:54:34 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Lisp]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.pchristensen.com/blog/articles/public-beta-open-for-ultimate-n00b-slimeemacs-cheat-sheet/</guid>
		<description><![CDATA[On this Valentine&#8217;s Day, give the gift people really want &#8211; complex key chords!
In other news, I&#8217;ve got fans!
Well, at least one anyway.  A lot of the feedback I&#8217;ve received on this site so far has been from experienced Lispers who appreciate my enthusiasm and contributions for new users.  Yesterday, I got the [...]]]></description>
			<content:encoded><![CDATA[<p>On this Valentine&#8217;s Day, give the gift people really want &#8211; complex key chords!</p>
<p>In other news, I&#8217;ve got fans!</p>
<p>Well, at least one anyway.  A lot of the feedback I&#8217;ve received on this site so far has been from experienced Lispers who appreciate my enthusiasm and contributions for new users.  Yesterday, I got the first (I think) comment and reply from another new Lisper who&#8217;s actually getting some use out of my stuff.  <a href="http://www.aaronfeng.com/" target="_blank">Aaron Feng</a> <a href="http://www.aaronfeng.com/articles/2008/02/14/slime-video-and-transcript" target="_blank">wrote up</a> my <a href="http://www.pchristensen.com/blog/articles/reference-for-the-slimelispemacs-screencast/" target="_blank">SLIME movie reference</a>, and he even caught my <a href="http://www.pchristensen.com/blog/articles/tooting-my-own-horn/" target="_blank">later reference</a> to my upcoming &#8220;Ultimate N00b SLIME/Emacs Cheat Sheet&#8221;.  Well Aaron, wait no more!</p>
<p>I&#8217;ve been using it for a week or so, and I&#8217;m sort of pleased with it.  First the positives:</p>
<ul>
<li>It includes all of the SLIME commands from the SLIME manual</li>
<li>It includes all of the Emacs commands from the built in tutorial</li>
<li>It includes the main Emacs help keys</li>
<li>The commands are sorted and grouped by functional area</li>
<li>It&#8217;s all fits on one page</li>
</ul>
<p>Here are some of the things I&#8217;m not so pleased with:</p>
<ul>
<li>It has very few Emacs commands, relative to what&#8217;s available</li>
<li>It doesn&#8217;t include any advanced text manipulation options</li>
<li>It doesn&#8217;t have the sexp-based manipulation commands.  I couldn&#8217;t find standard bindings for these and I&#8217;m not up to Emacs tweaking yet.  Adding a key for the slime-selector was enough for me at this point.</li>
<li>It&#8217;s pretty crowded (~100 commands and descriptions on one page)</li>
</ul>
<p>The Emacs section is weak mainly because I haven&#8217;t dived into Emacs the way I have into Lisp/SLIME.  I figure for now I can use it as a standard, powerful IDE for writing, testing, and debugging Lisp, and I can add <a href="http://emacs.wordpress.com/" target="_blank">Emacs wizardry</a> later.  I think I hit the point of diminishing returns where focusing on my tools will help me learn to code in Lisp.  Now I need to get my coding up to par with my tools!  I need to improve to the point where it&#8217;s worth getting a copy of <a href="http://www.amazon.com/o/asin/0596006489/pchristensen-20/" target="_blank">Learning GNU Emacs</a>.</p>
<p>So without further ado, here is my unfinished yet eminently usable cheat sheet:</p>
<p><a href="http://www.pchristensen.com/slimecommands.pdf" target="_blank">Ultimate N00b SLIME/Emacs Cheat Sheet (pdf)</a></p>
<p>or customize your own!</p>
<p><a href="http://www.pchristensen.com/slimecommands.xls" target="_blank">Ultimate N00b SLIME/Emacs Cheat Sheet (xls)</a></p>
<p>Enjoy!  As usual, feedback is appreciated.  If you&#8217;ve got an Emacs trick that you use a jillion times a day that you think a new user could use, this is a great way to share!</p>
<p>(PS I hope it goes without saying but there isn&#8217;t any kind of beta process.  Just that I consider it a work in progress and that it will definitely change in the future, hopefully in response to useful criticism.)</p>
<p>Follow the discussion at:  <a href="http://news.ycombinator.com/item?id=115909" target="_blank">Hacker News</a>, <a href="http://reddit.com/info/68r3t/comments/" target="_blank">programming.reddit.com</a>, <a href="http://groups.google.com/group/comp.lang.lisp/browse_thread/thread/fbace269004c078d/b4246320dd49e10f" target="_blank">comp.lang.lisp</a>, <a href="http://groups.google.com/group/comp.emacs/browse_thread/thread/ea4a1df585ef7ac2" target="_blank">comp.emacs</a></p>
<p><hints id="hah_hints"></hints></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pchristensen.com/blog/articles/public-beta-open-for-ultimate-n00b-slimeemacs-cheat-sheet/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
	</channel>
</rss>
