<?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>Technitribe &#187; Programming</title>
	<atom:link href="http://blog.peopleareducks.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.peopleareducks.com</link>
	<description>not at all like a diatribe</description>
	<lastBuildDate>Sat, 27 Mar 2010 01:00:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Macports updates their Erlang version, update your load-path&#8217;s</title>
		<link>http://blog.peopleareducks.com/2010/02/03/macports-updates-their-erlang-version/</link>
		<comments>http://blog.peopleareducks.com/2010/02/03/macports-updates-their-erlang-version/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 05:08:37 +0000</pubDate>
		<dc:creator>tbielawa</dc:creator>
				<category><![CDATA[Emacs]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Erlang]]></category>
		<category><![CDATA[XMPP]]></category>

		<guid isPermaLink="false">http://blog.peopleareducks.com/?p=115</guid>
		<description><![CDATA[I&#8217;ve been working on my XMPP server pet project recently, and the need for a good Erlang XML parser has finally struck. I decided to go with Erlsom. It&#8217;s in MacPorts, so from there I installed it. Now, since I  don&#8217;t update my port tree frequently I get delightful surprises from time to time. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on my <a href="http://github.com/tbielawa/PAD-XMPP">XMPP server</a> pet project recently, and the need for a good Erlang XML parser has finally struck. I decided to go with <a href="http://erlsom.sourceforge.net/">Erlsom</a>. It&#8217;s in MacPorts, so from there I installed it. Now, since I  don&#8217;t update my port tree frequently I get delightful surprises from time to time. This time installing Erlsom triggered an update of Erlang, to the latest version!</p>
<p>Short story shorter, the update changes the path to the erlang-mode.el file so before you can M-x erlang-mode again you&#8217;ll have you fix your Emacs load-path to register the new location. (See my older post on how to initially <a href="http://blog.peopleareducks.com/2009/12/02/macports-and-erlang-setting-up-emacs-and-your-manpath/">set up Erlang and Emacs</a> from MacPorts from scratch)</p>
<p>The new load commands should be:</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> load-path <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cons</span>  <span style="color: #ff0000;">&quot;/opt/local/lib/erlang/lib/tools-2.6.5/emacs/&quot;</span> load-path<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> erlang-root-dir <span style="color: #ff0000;">&quot;/opt/local/lib/erlang&quot;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> exec-path <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cons</span> <span style="color: #ff0000;">&quot;/opt/local/bin&quot;</span> exec-path<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span>require 'erlang-start<span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>It just requires changing the tools-x.x.x to 2.6.5.</p>
<p>p.s. <a href="http://ftp.sunet.se/pub/lang/erlang/doc/man/erlang.el.html">about erlang-mode </a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.peopleareducks.com/2010/02/03/macports-updates-their-erlang-version/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Macports, and Erlang: Setting up Emacs and your $MANPATH</title>
		<link>http://blog.peopleareducks.com/2009/12/02/macports-and-erlang-setting-up-emacs-and-your-manpath/</link>
		<comments>http://blog.peopleareducks.com/2009/12/02/macports-and-erlang-setting-up-emacs-and-your-manpath/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 03:32:05 +0000</pubDate>
		<dc:creator>tbielawa</dc:creator>
				<category><![CDATA[Emacs]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Erlang]]></category>
		<category><![CDATA[Macports]]></category>
		<category><![CDATA[Manpath]]></category>

		<guid isPermaLink="false">http://blog.peopleareducks.com/?p=101</guid>
		<description><![CDATA[You may find this helpful if you should find yourself using Erlang on OS X and you&#8217;ve installed it using Macports. After a default installation you&#8217;ll need to manually configure your .emacs file for erlang-mode and set your $MANPATH variable correctly, here&#8217;s how.
If you&#8217;ve installed Erlang with Macports then you may have noticed that when [...]]]></description>
			<content:encoded><![CDATA[<p>You may find this helpful if you should find yourself using <a href="http://www.erlang.org/">Erlang</a> on OS X and you&#8217;ve installed it using <a href="http://www.macports.org">Macports</a>. After a default installation you&#8217;ll need to manually configure your .emacs file for <strong>erlang-mode</strong> and set your $MANPATH variable correctly, here&#8217;s how.</p>
<p>If you&#8217;ve installed Erlang with Macports then you may have noticed that when you edit <strong>.erl</strong> files you&#8217;re not entering into <strong>erlang-mode</strong>, nor is it available to enter into. Here&#8217;s how I got <a href="http://www.erlang.org/doc/apps/tools/erlang_mode_chapter.html">erlang-mode</a> working on my system.</p>
<p>Macports will install Erlang into /opt/local/lib/erlang by default. <a href="http://www.erlang.org/doc/apps/tools/erlang_mode_chapter.html#id2261177">The paths</a> to put in your .emacs file provided in the erlang-mode documentation only need to be tweaked a slight bit to function properly. Here&#8217;s what I put in mine:</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> load-path <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cons</span>  <span style="color: #ff0000;">&quot;/opt/local/lib/erlang/lib/tools-2.6.4/emacs/&quot;</span> load-path<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> erlang-root-dir <span style="color: #ff0000;">&quot;/opt/local/lib/erlang&quot;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> exec-path <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cons</span> <span style="color: #ff0000;">&quot;/opt/local/bin&quot;</span> exec-path<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span>require 'erlang-start<span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>Note that you may require setting &#8220;tools-2.6.4&#8243; to something else if Macports has upgraded it&#8217;s distribution of Erlang.</p>
<p>Setting up your $MANPATH variable is fairly simple as well. Just put the string &#8220;/opt/local/lib/erlang/man&#8221; in a file called &#8216;erlang&#8217; in /etc/manpaths.d/ and make sure it ends with an empty line. Test this by opening a new terminal and running: <strong>echo $MANPATH | grep erlang</strong>. If it doesn&#8217;t come back empty then you&#8217;ve done it right.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.peopleareducks.com/2009/12/02/macports-and-erlang-setting-up-emacs-and-your-manpath/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Emacs Hacking, reverse other buffer</title>
		<link>http://blog.peopleareducks.com/2009/10/18/emacs-hacking-reverse-other-buffer/</link>
		<comments>http://blog.peopleareducks.com/2009/10/18/emacs-hacking-reverse-other-buffer/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 22:39:51 +0000</pubDate>
		<dc:creator>tbielawa</dc:creator>
				<category><![CDATA[Emacs]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[lisp]]></category>

		<guid isPermaLink="false">http://blog.peopleareducks.com/?p=97</guid>
		<description><![CDATA[I started reading Writing GNU Emacs Extensions by Bob Glickstein. The first real meaty example you work through in it is making an &#8216;other-buffer&#8217; like key command that works in reverse. So here I present to the internet, my version of previous-window.

&#40;defun previous-window &#40;&#41;
  &#34;As other-buffer, except in the other-direction&#34;
  &#40;interactive&#41;
  &#40;other-window [...]]]></description>
			<content:encoded><![CDATA[<p>I started reading <em>Writing GNU Emacs Extensions</em> by Bob Glickstein. The first real meaty example you work through in it is making an &#8216;other-buffer&#8217; like key command that works in reverse. So here I present to the internet, my version of previous-window.</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">defun</span> previous-window <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
  <span style="color: #ff0000;">&quot;As other-buffer, except in the other-direction&quot;</span>
  <span style="color: #66cc66;">&#40;</span>interactive<span style="color: #66cc66;">&#41;</span>
  <span style="color: #66cc66;">&#40;</span>other-window -<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>global-set-key <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\C</span>-c<span style="color: #000099; font-weight: bold;">\o</span>&quot;</span> 'previous-window<span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>Put in your <strong>.emacs</strong> file and activate with <strong>C-c o</strong> when you have multiple frames open at once.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.peopleareducks.com/2009/10/18/emacs-hacking-reverse-other-buffer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A haiku for modulus</title>
		<link>http://blog.peopleareducks.com/2009/09/04/a-haiku-for-modulus/</link>
		<comments>http://blog.peopleareducks.com/2009/09/04/a-haiku-for-modulus/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 10:27:40 +0000</pubDate>
		<dc:creator>tbielawa</dc:creator>
				<category><![CDATA[/dev/null]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Even]]></category>
		<category><![CDATA[Haiku]]></category>
		<category><![CDATA[Modulus]]></category>
		<category><![CDATA[Odd]]></category>

		<guid isPermaLink="false">http://blog.peopleareducks.com/?p=79</guid>
		<description><![CDATA[I needed to know
Is this Even or odd, hmm?
I used modulus
This is the simplest way to quickly find out if an integer is even or odd. I&#8217;m posting this because I don&#8217;t recall my programming lab TAs or professors ever mentioning this simple way to figure that out.
May it save you many lines of code [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>I needed to know<br />
Is this Even or odd, hmm?<br />
I used modulus</p></blockquote>
<p style="text-align: left;">This is the simplest way to quickly find out if an integer is even or odd. I&#8217;m posting this because I don&#8217;t recall my programming lab TAs or professors ever mentioning this simple way to figure that out.</p>
<p style="text-align: left;">May it save you many lines of code and time!</p>
<p style="text-align: left;"><strong>Update:</strong> Suppose I should show an exampe</p>
<blockquote>
<p style="text-align: left;">if ( (your-number % 2) == 0) { echo &#8220;that&#8217;s an even number&#8221; }</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.peopleareducks.com/2009/09/04/a-haiku-for-modulus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
