<?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"
	>

<channel>
	<title>EnigmaCurry</title>
	<atom:link href="http://www.enigmacurry.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.enigmacurry.com</link>
	<description>The Curry Enigma</description>
	<pubDate>Thu, 25 Sep 2008 01:08:44 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>Shortened URLs in Emacs using is.gd (like tinyurl)</title>
		<link>http://www.enigmacurry.com/2008/09/15/shortened-urls-in-emacs-using-isgd-like-tinyurl/</link>
		<comments>http://www.enigmacurry.com/2008/09/15/shortened-urls-in-emacs-using-isgd-like-tinyurl/#comments</comments>
		<pubDate>Mon, 15 Sep 2008 18:11:20 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
		
		<category><![CDATA[Emacs]]></category>

		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.enigmacurry.com/?p=156</guid>
		<description><![CDATA[I&#039;ve casually been teaching myself emacs lisp lately. Today I wrote a utility that shortens long urls within regions using the http://is.gd URL shortening service. There&#039;s plenty of existing code out there that is more lisp like, but this is supposed to be a learning experience for me so I did it myself. I like [...]]]></description>
			<content:encoded><![CDATA[<p>I&#039;ve casually been teaching myself emacs lisp lately. Today I wrote a utility that shortens long urls within regions using the <a href="http://is.gd">http://is.gd</a> URL shortening service. There&#039;s plenty of <a href="http://www.emacswiki.org/cgi-bin/wiki/tinyurl.el">existing code</a> out there that is more lisp like, but this is supposed to be a learning experience for me so I did it myself. I like python and so I used python for most of the heavy lifting.</p>
<p>I created a directory to hold all of my emacs specific python functions: ~/.emacs.d/ryan-pymacs-extensions</p>
<p>I wrote the following python function, shorten_url.py in that directory:</p>
<pre lang="python">
!/usr/bin/env python
# -*- coding: utf-8 -*-

__author__ = "Ryan McGuire (ryan@enigmacurry.com)"
__date__   = "Mon Sep 15 12:27:14 2008"

import doctest
import urllib2
import re

def shorten_with_is_gd(url):
    """Shorten a URL with is.gd

    >>> shorten_with_is_gd('http://www.enigmacurry.com')
    'http://is.gd/FFP'

    """
    u = urllib2.urlopen("http://is.gd/api.php?longurl="+url)
    return u.read()

def shorten_in_text(text):
    """Shorten all the urls found inside some text

    >>> shorten_in_text('Hi from http://www.enigmacurry.com')
    'Hi from http://is.gd/FFP'

    """
    replacements = {} #URL -> is.gd URL
    #Only check for urls that start with "http://" for now
    for m in re.finditer("http://[^ \n\r]*", text):
        try:
            replacements[m.group()] = shorten_with_is_gd(m.group())
        except:
            replacements[m.group()] = m.group()
    for url,replacement in replacements.items():
        text = text.replace(url, replacement)
    return text

if __name__ == '__main__':
    doctest.testmod(verbose=True)
</pre>
<p>and the following lisp makes &#034;M-x shorten-url&#034; do the rest of the replacement work:</p>
<pre lang="lisp">
;add ~/.emacs.d/ryan-python-extensions to python path
(pymacs-exec "import sys, os")
(pymacs-exec "sys.path.append(os.path.join(os.path.expanduser('~'),'.emacs.d','ryan-pymacs-extensions'))")

;;Shorten URLs with is.gd
(pymacs-exec "import shorten_url")
(defun shorten-url (start end)
  (interactive "r")
  (let ((region (buffer-substring start end)))
    (let ((rt (pymacs-eval (format "shorten_url.shorten_in_text('''%s''')" region))))
      (kill-region start end)
      (insert rt)
      )
  ))
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.enigmacurry.com/2008/09/15/shortened-urls-in-emacs-using-isgd-like-tinyurl/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Updated my Free Talk Live log</title>
		<link>http://www.enigmacurry.com/2008/08/22/updated-my-free-talk-live-log/</link>
		<comments>http://www.enigmacurry.com/2008/08/22/updated-my-free-talk-live-log/#comments</comments>
		<pubDate>Sat, 23 Aug 2008 04:30:16 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
		
		<category><![CDATA[Libertarian Rants]]></category>

		<category><![CDATA[FreeTalkLive free-talk-live podcast mp3]]></category>

		<guid isPermaLink="false">http://www.enigmacurry.com/?p=153</guid>
		<description><![CDATA[I forget if I ever mentioned this on here or not &#8212; I regularly (though not frequently) call Free Talk Live to express some of my opinions on various issues. I like to record these calls for posterity mostly so that I can, like with this blog, see where I have grown and evolved over [...]]]></description>
			<content:encoded><![CDATA[<p>I forget if I ever mentioned this on here or not &#8212; I regularly (though not frequently) call <a href="http://www.freetalklive.com">Free Talk Live</a> to express some of my opinions on various issues. I like to record these calls for posterity mostly so that I can, like with this blog, see where I have grown and evolved over the years.</p>
<p>Today I called in about Intellectual Property.</p>
<p>Check out my <a href="http://wiki.enigmacurry.com/FreeTalkLiveLog">Free Talk Live log</a></p>
<p>I need to step up the frequency of both blog posts and calls to talk shows. Both are great fun and make me feel like I&#039;ve accomplished something.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.enigmacurry.com/2008/08/22/updated-my-free-talk-live-log/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Importing foreign (non-iCal) calendars into Google Calendar</title>
		<link>http://www.enigmacurry.com/2008/08/19/importing-foreign-non-ical-calendars-into-google-calendar/</link>
		<comments>http://www.enigmacurry.com/2008/08/19/importing-foreign-non-ical-calendars-into-google-calendar/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 22:24:06 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
		
		<category><![CDATA[Free State Project]]></category>

		<category><![CDATA[Python]]></category>

		<category><![CDATA[iCal iCalendar google-calendar free-keene nh-undergroun]]></category>

		<guid isPermaLink="false">http://www.enigmacurry.com/?p=152</guid>
		<description><![CDATA[Google Calendar is highly useful. I use it to keep track of all my appointments and due dates and I get helpful reminders when dates approach via email and SMS. Not only that, but it allows me to collaborate with other people&#039;s calendars as well, and they don&#039;t even have to use Google Calendar because [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://calendar.google.com">Google Calendar</a> is highly useful. I use it to keep track of all my appointments and due dates and I get helpful reminders when dates approach via email and SMS. Not only that, but it allows me to collaborate with other people&#039;s calendars as well, and they don&#039;t even have to use Google Calendar because Google supports the industry standard <a href="http://en.wikipedia.org/wiki/ICalendar">iCalendar format</a>. Things are great.</p>
<p>Unfortunately, iCalendar format is pretty new, and not everyone is using it. </p>
<p>Because Google Calendar is so useful, it is annoying when you find a calendar that is not in iCal format. Two of note that I want to follow are</p>
<ul>
<li><a href="http://nhunderground.com/forum/index.php?action=calendar">New Hampshire Underground</a></li>
<li><a href="http://forum.freekeene.com/index.php?action=calendar">Free Keene</a></li>
</ul>
<p>Both of these calendars are running Simple Machines Forum, version 1.x which does not support iCalendar format (presumably they will in 2.0). </p>
<p>So I wrote an exporter: <a href="/blog-post-files/smf_ical_converter.2.tar.gz">Download SMF iCal exporter</a></p>
<p>The exporter scrapes the calendar page on an SMF enabled site and dumps out an iCal compatible file.</p>
<pre>
Usage: smf_ical_converter.py -u http://yourforum.com/index.php -o cal.ics

Download a SMF 1.x forum calendar and dump in iCal format

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -u URL, --url=URL     URL of forum (up to and including /index.php)
  -n Name, --name=Name  Name of the Forum / Calendar (name goes in .ics file)
  -i EXPR, --ignore-re=EXPR
                        Ignore any event containing this regular expression
                        (specify as many -i as you want)
  -o File, --output=File
                        iCal filename to write
  -v, --verbose         Be verbose about process
  --months-backward=NUM
                        Number of months to go backward
  --months-forward=NUM  Number of months to go forward
</pre>
<p>I have this tool running in a cron job to keep up to date with the two above mentioned calendars. You can import these URLs directly into your Google Calendar:</p>
<ul>
<li><a href="/external-calendars/nh-underground.ics">NHUnderground.com iCal calendar</a></li>
<p> (Includes just events, I use &#034;-i &#039;Birthdays:&#039;&#034; for this one)</p>
<li><a href="/external-calendars/free-keene.ics">FreeKeene.com iCal calendar</a></li>
</ul>
<p><strong>Update 09/16/08:</strong> I uploaded version 2 of this application. It has a better README and it now supports user specific date ranges.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.enigmacurry.com/2008/08/19/importing-foreign-non-ical-calendars-into-google-calendar/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Emacs IRC (ERC) with Noticeable Notifications</title>
		<link>http://www.enigmacurry.com/2008/08/07/emacs-irc-erc-with-noticeable-notifications/</link>
		<comments>http://www.enigmacurry.com/2008/08/07/emacs-irc-erc-with-noticeable-notifications/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 07:35:50 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
		
		<category><![CDATA[Emacs]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Lisp]]></category>

		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.enigmacurry.com/?p=151</guid>
		<description><![CDATA[I use ERC  for all my IRC chatting. I finally got fed up with not noticing someones message because I didn&#039;t have emacs focused. So I spent my evening concocting a more noticeable messaging system through Pymacs and libnotify.
Half way though implementing this, wouldn&#039;t you know it, I found ErcPageMe which does exactly what [...]]]></description>
			<content:encoded><![CDATA[<p>I use <a href="http://www.emacswiki.org/cgi-bin/wiki?action=browse;oldid=EmacsIRCClient;id=ERC">ERC </a> for all my IRC chatting. I finally got fed up with not noticing someones message because I didn&#039;t have emacs focused. So I spent my evening concocting a more noticeable messaging system through Pymacs and libnotify.</p>
<p>Half way though implementing this, wouldn&#039;t you know it, I found <a href="http://www.emacswiki.org/cgi-bin/wiki/ErcPageMe">ErcPageMe</a> which does exactly what I wanted. I figured I was learning quite a bit and I continued writing my own version. I expanded on their code and (at least for me) made some improvements. So kudos go to whoever wrote ErcPageMe <img src='http://www.enigmacurry.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The following code will pop up a message on your gnome desktop alerting you whenever you receive a personal message or when someone mentions your nickname in a channel. It also avoids notification for the same user in the same channel if they triggered a message within the last 30 seconds.</p>
<p><center> <img src="/blog-post-images/Emacs-ERC-Notification.png" alt="Emacs ERC Notification through libnotify" /></center></p>
<p>Here is my lisp and embedded python/pymacs code:</p>
<pre lang="lisp">

(defun notify-desktop (title message &#038;optional duration &#038;optional icon)
  "Pop up a message on the desktop with an optional duration (forever otherwise)"
  (pymacs-exec "import pynotify")
  (pymacs-exec "pynotify.init('Emacs')")
  (if icon
      (pymacs-exec (format "msg = pynotify.Notification('%s','%s','%s')"
                           title message icon))
    (pymacs-exec (format "msg = pynotify.Notification('%s','%s')" title message))
    )
  (if duration
      (pymacs-exec (format "msg.set_timeout(%s)" duration))
    )
  (pymacs-exec "msg.show()")
  )

;; Notify me when someone wants to talk to me.
;; Heavily based off of ErcPageMe on emacswiki.org, with some improvements.
;; I wanted to learn and I used my own notification system with pymacs
;; Delay is on a per user, per channel basis now.
(defvar erc-page-nick-alist nil
  "Alist of 'nickname|target' and last time they triggered a notification"
  )
(defun erc-notify-allowed (nick target &#038;optional delay)
  "Return true if a certain nick has waited long enough to notify"
  (unless delay (setq delay 30))
  (let ((cur-time (time-to-seconds (current-time)))
        (cur-assoc (assoc (format "%s|%s" nick target) erc-page-nick-alist))
        (last-time))
    (if cur-assoc
        (progn
          (setq last-time (cdr cur-assoc))
          (setcdr cur-assoc cur-time)
          (> (abs (- cur-time last-time)) delay))
      (push (cons (format "%s|%s" nick target) cur-time) erc-page-nick-alist)
      t)
    )
  )
(defun erc-notify-PRIVMSG (proc parsed)
  (let ((nick (car (erc-parse-user (erc-response.sender parsed))))
	(target (car (erc-response.command-args parsed)))
	(msg (erc-response.contents parsed)))
    ;;Handle true private/direct messages (non channel)
    (when (and (not (erc-is-message-ctcp-and-not-action-p msg))
               (erc-current-nick-p target)
	       (erc-notify-allowed nick target)
	       )
      ;Do actual notification
      (ding)
      (notify-desktop (format "%s - %s" nick
                              (format-time-string "%b %d %I:%M %p"))
                      msg 0 "gnome-emacs")
      )
    ;;Handle channel messages when my nick is mentioned
    (when (and (not (erc-is-message-ctcp-and-not-action-p msg))
               (string-match (erc-current-nick) msg)
               (erc-notify-allowed nick target)
	       )
      ;Do actual notification
      (ding)
      (notify-desktop (format "%s - %s" target
                              (format-time-string "%b %d %I:%M %p"))
                      (format "%s: %s" nick msg) 0 "gnome-emacs")
      )
    )

  )

(add-hook 'erc-server-PRIVMSG-functions 'erc-notify-PRIVMSG)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.enigmacurry.com/2008/08/07/emacs-irc-erc-with-noticeable-notifications/feed/</wfw:commentRss>
		</item>
		<item>
		<title>cycle_xrandr.py : dual and single displays on Ubuntu</title>
		<link>http://www.enigmacurry.com/2008/07/10/cycle_xrandrpy-dual-and-single-displays-on-ubuntu/</link>
		<comments>http://www.enigmacurry.com/2008/07/10/cycle_xrandrpy-dual-and-single-displays-on-ubuntu/#comments</comments>
		<pubDate>Thu, 10 Jul 2008 13:24:22 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.enigmacurry.com/?p=149</guid>
		<description><![CDATA[Linux power management has gotten good recently. My last two laptops (HP dv9000 and Macbook Pro) have supported hardware suspend mode out of the box. I&#039;m impressed!
Being that I hardly ever turn off the laptop (I just suspend now) I&#039;m left with an annoyance: I use two displays at work and one everywhere else. In [...]]]></description>
			<content:encoded><![CDATA[<p>Linux power management has gotten good recently. My last two laptops (HP dv9000 and Macbook Pro) have supported hardware suspend mode out of the box. I&#039;m impressed!</p>
<p>Being that I hardly ever turn off the laptop (I just suspend now) I&#039;m left with an annoyance: I use two displays at work and one everywhere else. In Ubuntu, I was easily able to setup dual and single modes such that when I boot up, Xorg detects how many displays are connected appropriately. But now that I don&#039;t turn off the machine, I want to be able to just plug in another monitor and go. I don&#039;t want to have to reboot the computer. I don&#039;t even want to have to log out. I want to plug the monitor in, leave all my apps running and in the state they are in.</p>
<p>Xrandr does this and it works great. But what if I&#039;m in dual display mode but I only actually have one monitor connected? Can I get to an open terminal to use xrandr? Easily? Probably not.</p>
<p>I wrote the following python script to take care of this. It detects all of the modes that xrandr knows about and cycles to the next size listed. I then bind this script to a <a href="http://www.howtogeek.com/howto/ubuntu/assign-custom-shortcut-keys-on-ubuntu-linux/">custom keyboard shortcut</a> so I don&#039;t have to type or even see anything on the screen:</p>
<pre lang="python">
#!/usr/bin/env python
# -*- coding: utf-8 -*-

__author__ = "Ryan McGuire (ryan@enigmacurry.com)"
__date__   = "Thu Jul 10 15:27:18 2008"

"""Cycle through all screen resolutions detected by xrandr"""

from subprocess import Popen, PIPE
import re

size_re = re.compile("^   ([0-9]*x[0-9]*)\W*[0-9]*\.[0-9]*(\*)?")

def list_sizes():
    """List all sizes detected by xrandr,
    ordered by the next resolution to cycle to"""
    p1 = Popen(['xrandr'], stdout=PIPE)
    sizes = []
    current_size_index = 0
    for line in  p1.communicate()[0].split("\n"):
        m = size_re.match(line)
        if m:
            sizes.append(m.group(1))
            if m.group(2) == "*":
                current_size_index = len(sizes) - 1
    return sizes[current_size_index+1:] + sizes[:current_size_index+1]

if __name__ == '__main__':
    Popen(['xrandr','-s',list_sizes()[0]])
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.enigmacurry.com/2008/07/10/cycle_xrandrpy-dual-and-single-displays-on-ubuntu/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Nanny state taken to ridiculous and disturbing new heights</title>
		<link>http://www.enigmacurry.com/2008/05/10/nanny-state-taken-to-ridiculous-and-disturbing-new-heights/</link>
		<comments>http://www.enigmacurry.com/2008/05/10/nanny-state-taken-to-ridiculous-and-disturbing-new-heights/#comments</comments>
		<pubDate>Sat, 10 May 2008 17:22:02 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
		
		<category><![CDATA[Libertarian Rants]]></category>

		<category><![CDATA[Stupidity]]></category>

		<guid isPermaLink="false">http://www.enigmacurry.com/?p=148</guid>
		<description><![CDATA[Man Jailed After Daughter Fails To Get GED
What has our world come to? A man gets put in jail because his daughter hasn&#039;t gotten some dumb, meaningless certificate? A man is losing his job, by dictate of the state, because his daughter, even though she&#039;s actively going to school, can&#039;t pass her math test? 
Oh, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.wcpo.com/news/local/story.aspx?content_id=28d2acca-9947-44cc-8831-9859f1f6137e">Man Jailed After Daughter Fails To Get GED</a></p>
<p>What has our world come to? A man gets put in jail because his daughter hasn&#039;t gotten some dumb, meaningless certificate? A man is losing his job, by dictate of the state, because his daughter, even though she&#039;s actively going to school, can&#039;t pass her math test? </p>
<p>Oh, but judge David Niehaus says that &#034;if she passes the test, her father could get out of jail before his six-months sentence is up.&#034; Thank you David Niehaus for your generous and fair &#8212; ZZZZTTT GOVERNMENT COMPLIANCE CIRCUITS FAILING &#8212; Nowwaitjustagoddamnminute, how is this guy supposed to help his daughter pass the test if he&#039;s in jail??</p>
<p>ZZZTTTT &#8230; This blog post is now interrupted by this Big Booming Governmental Voice: </p>
<blockquote><p>&#034;Be careful children, because Nanny Government is watching you! If you break any of our arbitrary rules you too may find your parents taken away because obviously they are very bad people and you deserve to be taken care of by the magnificent and omnipresent State. We&#039;ll make sure you get the indoctrination .. ahem .. education you need that your parents are unworthy and furthermore incapable of providing, despite their meaningless, pitifull attempts. Do not resist. You will bend to our desires. Don&#039;t worry, out of all of this, you will become a more productive and obedient citizen of our slave-driven society, we promise!&#034;</p></blockquote>
<p>ZZZZTTT &#8212; Think for yourselves People!</p>
<p>The courts are subverted. They will never serve us. They serve the desires of big government and we&#039;re only going to see more and more of this leviathan usurp our rights and lay waste to our economy and our liberties. </p>
<p>Oh, and fuck you DIS-honorable David Niehaus.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.enigmacurry.com/2008/05/10/nanny-state-taken-to-ridiculous-and-disturbing-new-heights/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Emacs as a powerful Python IDE</title>
		<link>http://www.enigmacurry.com/2008/05/09/emacs-as-a-powerful-python-ide/</link>
		<comments>http://www.enigmacurry.com/2008/05/09/emacs-as-a-powerful-python-ide/#comments</comments>
		<pubDate>Fri, 09 May 2008 22:27:37 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
		
		<category><![CDATA[Emacs]]></category>

		<category><![CDATA[Enigma Curry]]></category>

		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.enigmacurry.com/?p=146</guid>
		<description><![CDATA[Last night at the Python user group I gave a short demo on using Emacs as a Python editor/IDE. My macbook pro refused to display on the projector so I thought my demo was going to be a &#039;no go&#039;. Thankfully, sontek allowed me to use his Linux laptop. I hurriedly copied over my emacs [...]]]></description>
			<content:encoded><![CDATA[<p>Last night at the <a href="http://www.utahpython.org">Python user group</a> I gave a short demo on using Emacs as a Python editor/IDE. My macbook pro refused to display on the projector so I thought my demo was going to be a &#039;no go&#039;. Thankfully, <a href="http://blog.sontek.net/">sontek</a> allowed me to use his Linux laptop. I hurriedly copied over my emacs environment, installed a few packages and was able to present after all. I think the demo went fairly well even though I think it was a bit hurried and I forgot to cover a few things, I think I was pretty nervous at the same time because of the fact that the mac didn&#039;t work and got me flustered. Oh well, I think people enjoyed it.</p>
<h3 class="intrablog">My Emacs Environment</h3>
<p>Below are the Emacs features most applicable to Python development:</p>
<ul>
<li><a href="http://rope.sourceforge.net/ropemacs.html">Rope and Ropemacs</a><br />
    Rope is a general (non-emacs specific) Python IDE library. It has awesome support for multiple refactoring methods and code introspection. Inside Emacs, this gives us:</p>
<ul>
<li>Full (working!!) code-completion support of modules, classes, methods etc. (M-/ and M-?)</li>
<li>Instant documentation for element under the cursor (C-c d)</li>
<li>Jump to module/class/method definition of element under the cursor (C-c g). This works for any Python code it finds in your PYTHONPATH, including things from the stdlib.</li>
<li>Refactoring of code (like rename &#8212; C-c r r)</li>
<li>List all occurences of of a name in your entire project</li>
<li> <a href="http://rope.sourceforge.net/ropemacs.html">and More.</a></li>
</ul>
</li>
<li><a href="http://code.google.com/p/yasnippet/">YASnippet</a><br />
    YASnippet is a snippet tool like TextMate. You can expand user defined keywords into whole blocks of predefined code. This is especially useful for the usual boilerplate that would go into a python file like </p>
<p><code>#!/usr/bin/env python</code><br />
and<br />
<code>if __name__ == '__main__':</code></p>
<p> Granted, Python doesn&#039;t require much boilerplate, and therefore this package is much more suited to languages like Java, but I bring it up because I think its cool and if you get into the habit of using it, then a few keystrokes saved here and there will add up over time.
  </li>
<li>Subversion support with <a href="http://www.xsteve.at/prg/emacs/psvn.el">psvn.el</a><br />
    Psvn is a comprehensive subversion client for Emacs. It integrates well with ediff mode so you can use it to check changes between versions. It does all of the other boring subversion stuff well too.
  </li>
<li><a href="http://www.cua.dk/ido.html">Ido-mode</a> for buffer switching and file opening.<br />
    Emacs, to the uninitiated, can be confusing because by default there is only one view into a single file at a time. How does one get to another file? Instead of cluttering the interface with GUIness and making the user click somewhere (and thereby forcing the user to waste their time by moving their hand off of the keyboard), Emacs gives powerful ways to switch between files. Ido-mode is one of these useful ways &#8212; it makes a list of open files starting with the most frequently visted files and widdles this list down as you type part of the filename. You can have dozens of files open and only be a few keystrokes away from any one of them.
</ul>
<p>A lot of people, for whatever reason, don&#039;t feel that Emacs is an IDE at all. I don&#039;t personally care what you define it as &#8212; the fact remains &#8212; Emacs is a powerful Python environment and despite being over 32 years old has proven to be just as modern as any IDE today, and remains THE most configurable editor (operating system?) ever.</p>
<p>I&#039;ve <a href="/blog-post-files/Ryan-McGuire-Emacs-Environment-05-09-2008.tar.gz">tarred up my Emacs environment for general consumption</a>. Instructions:</p>
<ul>
<li>Install <a href="http://pymacs.progiciels-bpi.ca/">Pymacs</a></li>
<li>Install <a href="http://rope.sourceforge.net/">Rope</a> and <a href="http://rope.sourceforge.net/ropemacs.html">Ropemacs</a></li>
<li>BTW, those three packages should be the only packages other than Emacs you&#039;ll need. Everything else is self contained.
<li>Extract the tarball to your home directory. This creates a directory called ryan-emacs-env.</li>
<li>Rename &#034;ryan-emacs-env&#034; to &#034;.emacs.d&#034;</li>
<li>Symlink my dot-emacs file to your .emacs. Run &#034;ln -s .emacs.d/dot-emacs .emacs&#034;. </li>
<li>If you also want to do Java development run &#034;tar xfvz jde-2.3.5.1.tar.gz&#034;. I leave it tarred because you don&#039;t need to pollute your environment if you&#039;re not going to use Java. (Also for whatever reason, jde doesn&#039;t like to be stuck in my subversion repository so I just leave it tarred up and untar on every machine I check it out on.)</li>
</ul>
<p>Extra tips:</p>
<ul>
<li>Put your .emacs.d directory under version control. Never rely on your distros emacs packages, install all future elisp files yourself in your .emacs.d file and commit to your repository often. This way you&#039;ve got an environment that is easily transportable and synchronizable across multiple machines. This is the major reason why my emacs environment was so fast to trasnfer from my macbook pro to sontek&#039;s laptop during the demo.</li>
<li>Speaking of sontek, he brought up an excellent point in #utahpython the other day, he&#039;s not going to be using my emacs environment except for reference, instead he&#039;s starting with a clean slate. This is by far the best and most prudent thing to do. My emacs environment is a culmination of several years of plugging in and deleting various packages and writing various snippets of elisp. Your needs are always going to be different than mine and you are also going to be better off by educating yourself along the way by creating your own.</li>
</ul>
<p>Some more fun Emacs evangelism:</p>
<ul>
<li>a <a href="http://platypope.org/yada/emacs-demo/">fascinating screencast of Emacs</a> in the role of Ruby editor (many tips here apply to Python too)</li>
<li>Emacs blogs I read:
<ul>
<li><a href="http://emacslife.blogspot.com/">Emacs life</a></li>
<li><a href="http://trey-jackson.blogspot.com/">Life is too short for bad code</a></li>
<li><a href="http://emacs.wordpress.com/">Minor Emacs Wizardry</a></li>
<li><a href="http://www.emacsblog.org/">M-x all-things-emacs</a></li>
<li><a href="http://platypope.org/blog/">Platypope.org</a></li>
<li>Know of any other good ones? Let me know.</li>
</ul>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.enigmacurry.com/2008/05/09/emacs-as-a-powerful-python-ide/feed/</wfw:commentRss>
		</item>
		<item>
		<title>&#034;Libertarian&#034; Hypocrites &#8212; authoritarians in disguise.</title>
		<link>http://www.enigmacurry.com/2008/04/29/libertarian-hypocrites-authoritarians-in-disguise/</link>
		<comments>http://www.enigmacurry.com/2008/04/29/libertarian-hypocrites-authoritarians-in-disguise/#comments</comments>
		<pubDate>Wed, 30 Apr 2008 03:38:06 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
		
		<category><![CDATA[Libertarian Rants]]></category>

		<guid isPermaLink="false">http://www.enigmacurry.com/2008/04/29/libertarian-hypocrites-authoritarians-in-disguise/</guid>
		<description><![CDATA[I shredded my Libertarian Party membership card today. I&#039;ll be calling the national office tomorrow to formally rescind my membership. (Thank you Ian for the great example.)
Power corrupts. This is even true when it comes to so-called libertarians when they feel that they can champion the cause of liberty from within the political juggernaut. Instead, [...]]]></description>
			<content:encoded><![CDATA[<p>I shredded my Libertarian Party membership card today. I&#039;ll be calling the national office tomorrow to formally rescind my membership. (Thank you Ian for <a href="http://freekeene.com/2008/04/28/revoking-my-libertarian-party-life-membership-aka-politics-sucks/">the great example.</a>)</p>
<p>Power corrupts. This is even true when it comes to so-called libertarians when they feel that they can champion the cause of liberty from within the political juggernaut. Instead, they let the power consume them and they forget the very reason they fight at all. Case in point: last Friday the Libertarian party issued a <a href="http://www.lp.org/media/article_578.shtml">press release</a> &#034;calling for increased coordination and communication <em>between federal and state</em> law enforcement agencies in order to help to apprehend and convict child predators and those who engage in child pornography.&#034;</p>
<p>It&#039;s not the going after child predators part that bothers me. It&#039;s the complete reversal of the party&#039;s principal of individual voluntaryism in favor of authoritarian statism that bothers me. It used to be that the LP wanted to get RID OF the FBI and the CIA etc (completely! It was actually listed in the party platform.) Now they want to expand the relationship between federal and state agencies. Tell me, how exactly does giving the federal government control over yet another area of our lives constitute anything but an &#034;initiation of force&#034;? Not only has the LP platform been utterly compromised by this act; what they are suggesting is UNCONSTITUTIONAL!</p>
<p>Article 1, section 8 and Article 3 section 3 of the US constitution clearly lays out three crimes that are under the jurisdiction of the federal government:</p>
<ul>
<li>Piracy in international waters.</li>
<li>Counterfeiting US coins</li>
<li>Treason against the US</li>
</ul>
<p>(Source: <a href="http://www.harrybrowne.org/GLO/DrugWar.htm">Harry Browne</a>)</p>
<p>All other crimes are within the jurisdiction of the states by virtue of the 9th  and 10th amendments. (And the states are more than well equipped to handle the cases at hand.)</p>
<p>I cannot, in good conscience, give one more dime to an organization that claims to want to reduce the size and scope of government and then does the exact opposite whenever it suits them.</p>
<p>What&#039;s worse is that this seems all to just be a <a href="http://www.lewrockwell.com/blog/lewrw/archives/020742.html">power play</a> to get rid of Mary Ruwart as a candidate for president. Shameful! Mary Ruwart is about as libertarian as they get when it comes to people directly involved with the LP. She alone has brought more people to the ideas of liberty (through her <a href="http://ruwart.com/Pages/Healing/">numerous books and essays</a>) than all the officers of the LP combined. I would vote for Mary Ruwart with a clear conscience. I would never, ever, vote for what has become of the status quo LP candidates today &#8212; The likes of Bob Barr, George Phillies, Mike Gravel (!!?!?). They are all phonies. They are infiltrators. They care nothing at all for the principals of freedom and the the ideals of non initiation of force. If they ever had any desire at all to advance liberty, they must have grown tired of being all alone with their &#034;unpopular&#034; ideas and are willing to pervert their principles so as to gain acceptance by the mediocre majority. For all purposes, the LP is dead.</p>
<p>I&#039;m afraid the days of the Ron Pauls, the Harry Browns, and even the Michael Badnariks leading the LP are long gone. To take their place : unprincipled, power hungry, cronyistic, hypocritical fakes. I&#039;m outta here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.enigmacurry.com/2008/04/29/libertarian-hypocrites-authoritarians-in-disguise/feed/</wfw:commentRss>
		</item>
		<item>
		<title>New Slacker Screenlet released</title>
		<link>http://www.enigmacurry.com/2008/04/04/new-slacker-screenlet-released/</link>
		<comments>http://www.enigmacurry.com/2008/04/04/new-slacker-screenlet-released/#comments</comments>
		<pubDate>Sat, 05 Apr 2008 05:43:59 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.enigmacurry.com/2008/04/04/new-slacker-screenlet-released/</guid>
		<description><![CDATA[Check it out: I updated my Slacker Screenlet today.
New in this version:

Bug fixed where the screenlet-manager would respawn infinitely
Integrated LastSlacker support

You can read more about the original version in my previous post.
LastSlacker is a way to scrobble what you listen to on Last.FM. This lets you share a log of what you listen to with [...]]]></description>
			<content:encoded><![CDATA[<p>Check it out: I updated my <a href="http://screenlets.org/index.php/Slacker">Slacker Screenlet</a> today.</p>
<p>New in this version:</p>
<ul>
<li>Bug fixed where the screenlet-manager would respawn infinitely</li>
<li>Integrated LastSlacker support</li>
</ul>
<p>You can read more about the <a href="/2007/11/20/slacker-screenlet/">original version in my previous post.</a></p>
<p><a href="http://lastslacker.com">LastSlacker</a> is a way to scrobble what you listen to on <a href="http://last.fm">Last.FM</a>. This lets you share a log of what you listen to with friends. I&#039;ve been meaning to add this feature for a long time now, until today it&#039;s been in a sorta working state for months! It feels good to have finally gotten this project pretty much finished.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.enigmacurry.com/2008/04/04/new-slacker-screenlet-released/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Last.FM at 75MPH</title>
		<link>http://www.enigmacurry.com/2008/03/04/lastfm-at-75mph/</link>
		<comments>http://www.enigmacurry.com/2008/03/04/lastfm-at-75mph/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 06:33:52 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
		
		<category><![CDATA[Cool Stuff]]></category>

		<category><![CDATA[Geeky]]></category>

		<category><![CDATA[N800]]></category>

		<guid isPermaLink="false">http://www.enigmacurry.com/2008/03/04/lastfm-at-75mph/</guid>
		<description><![CDATA[I got a new phone today, a Samsung A737 from ATT. I signed up for their media net unlimited for an additional $15 and it gives me internet access, not only on my phone, but on my N800 too.
I have the Vagalume Last.FM client installed on my N800, and guess what? The 3G connection is [...]]]></description>
			<content:encoded><![CDATA[<p>I got a new phone today, a Samsung A737 from ATT. I signed up for their media net unlimited for an additional $15 and it gives me internet access, not only on my phone, but on my N800 too.</p>
<p>I have the <a href="http://vagalume.igalia.com/">Vagalume Last.FM client</a> installed on my N800, and guess what? The 3G connection is sufficient for streaming! <img src='http://www.enigmacurry.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I tested it out today, only a 5 mile trip on I-15 (SLC metro area). At 75 MPH, I went through about 3 songs. I advanced (skipped) the song about 5 times, and each time it went to the next song very rapidly (1-2 seconds delay). The whole time the music only cut out once when I first got onto the freeway, but only for about 2 seconds and it corrected itself.</p>
<p>I am extremely giddy at all the geeky prospects that lie ahead for me <img src='http://www.enigmacurry.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.enigmacurry.com/2008/03/04/lastfm-at-75mph/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
