<?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>Sleestacks - The Rant &#187; Tech</title>
	<atom:link href="http://www.sleestacks.com/category/tech/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sleestacks.com</link>
	<description>No Shirt, No Shoes, No Sleestacks</description>
	<lastBuildDate>Fri, 25 Jun 2010 05:29:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Can AT&amp;T hear me now?</title>
		<link>http://www.sleestacks.com/2009/12/21/can-att-hear-me-now/</link>
		<comments>http://www.sleestacks.com/2009/12/21/can-att-hear-me-now/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 04:28:39 +0000</pubDate>
		<dc:creator>Greg</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[AT&T]]></category>
		<category><![CDATA[Exclusivity]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Verizon]]></category>

		<guid isPermaLink="false">http://www.sleestacks.com/?p=133</guid>
		<description><![CDATA[AT&#038;T&#8217;s 3 year exclusive contract with Apple&#8217;s iPhone ends in roughly 190 days. That means, in about 191 days, AT&#038;T will be a few million customers short. I cannot wait until I can give them the finger. So what if my contract isn&#8217;t up yet? I will gladly pay the early termination fee if it [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sleestacks.com/wp-content/uploads/2009/12/p_408_350_06524AFD-9460-4426-A696-1A86B39D39C7.jpeg"><img src="http://www.sleestacks.com/wp-content/uploads/2009/12/p_408_350_06524AFD-9460-4426-A696-1A86B39D39C7-150x150.jpg" alt="Verizon iPhone" title="Verizon iPhone" width="150" height="150" class="alignright size-thumbnail wp-image-132" /></a>AT&#038;T&#8217;s 3 year exclusive contract with Apple&#8217;s iPhone ends in roughly 190 days.   That means, in about 191 days, AT&#038;T will be a few million customers short. I cannot wait until I can give them the finger. So what if my contract isn&#8217;t up yet?  I will <em>gladly</em> pay the early termination fee if it means I get a new iPhone that uses the Verizon/Sprint network. I&#8217;m sure AT&#038;T will continue their absurd ad campaign asserting that Edge is really 3G and it can compete with CDMA EVDO Rev. A.  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.sleestacks.com/2009/12/21/can-att-hear-me-now/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>TexLege for iPhone Released!</title>
		<link>http://www.sleestacks.com/2009/08/24/texlege-released/</link>
		<comments>http://www.sleestacks.com/2009/08/24/texlege-released/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 15:44:15 +0000</pubDate>
		<dc:creator>Greg</dc:creator>
				<category><![CDATA[Politics]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.sleestacks.com/?p=125</guid>
		<description><![CDATA[Finally! I&#8217;ve successfully linked my passion of politics and gadgets! My iPhone application for the Texas Legislature is released and available for public consumption from iTunes. Please head over to my TexLege site for screenshots, feature listings, or for questions and support. Also, if you&#8217;re a government student in college, I will happily send you [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.texlege.com"><img src="http://www.sleestacks.com/wp-content/uploads/2009/08/Icon_512-150x150.png" alt="TexLege Icon" title="TexLege Icon" width="150" height="150" class="alignright size-thumbnail wp-image-126" /></a><br />
Finally!  I&#8217;ve successfully linked my passion of politics and gadgets! My iPhone application for the Texas Legislature is released and available for public consumption from <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=326478866&#038;mt=8">iTunes</a>.  Please head over to my <a href="http://www.texlege.com">TexLege</a> site for screenshots, feature listings, or for questions and support.  Also, if you&#8217;re a government student in college, I will happily send you an iTunes coupon to download it for free (although Apple limits me to 50 coupons).  Nevertheless, even without the coupon, its only $2.99.   </p>
]]></content:encoded>
			<wfw:commentRss>http://www.sleestacks.com/2009/08/24/texlege-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Trouble With Regular Expressions</title>
		<link>http://www.sleestacks.com/2009/05/25/the-trouble-with-regular-expressions/</link>
		<comments>http://www.sleestacks.com/2009/05/25/the-trouble-with-regular-expressions/#comments</comments>
		<pubDate>Tue, 26 May 2009 05:04:39 +0000</pubDate>
		<dc:creator>Greg</dc:creator>
				<category><![CDATA[Humor]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.sleestacks.com/?p=81</guid>
		<description><![CDATA[I have this problem with regular expressions. They&#8217;re too handy for their own good.  You say you don&#8217;t know what a regular expression is?  Well, let me just tell you, you don&#8217;t know what you&#8217;re missing out on.  Think of it like a really super-duper complicated way of searching for something real specific when it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>I have this problem with regular expressions.  They&#8217;re too handy for their own good.  You say you don&#8217;t know what a regular expression is?  Well, let me just tell you, you don&#8217;t know what you&#8217;re missing out on.  Think of it like a really super-duper complicated way of searching for something real specific when it&#8217;s slapped in the middle of a whole back of other crap you don&#8217;t want to even mess with.  But it&#8217;s not even just searching for something, you can search and replace really complicated text that&#8217;s just too big to do by hand.</p>
<div id="attachment_82" class="wp-caption alignright" style="width: 190px"><img class="size-medium wp-image-82" title="Regular Expressions" src="http://www.sleestacks.com/wp-content/uploads/2009/05/regexp-180x300.jpg" alt="Regular Expressions Book" width="180" height="300" /><p class="wp-caption-text">Regular Expressions Book</p></div>
<p>More than that, it&#8217;s not like you just want to find every reference to the name &#8220;Meg&#8221; on your computer and change it to &#8220;Poop&#8221; &#8230; you can use regular expressions to transform Huge Text File (A) into just the  little sub-sections of important stuff &#8230; or you can convert (A) from one textual format to another, like from HTML to Whiskey, or whatever the hell new-fangled nonsense is going on out there in web junky land.</p>
<p>There are plenty of programs out there that make use of regular expressions and you don&#8217;t even know about it.  I first started playing around with them way back in 1995 or so, not long after Rich Siegel started selling BBEdit for Macintosh, and I&#8217;ve been using them since.  Here&#8217;s an example &#8230; say you have a text file that looks like this:<br />
<code>Jimmy Jack Johnson sells 43 seashells to Yo Momma. She paid about three-fiddy.</code><br />
You can do a regular expression find/replace on that text, which would look something like this:<br />
<code>'s/^(J.*)\ J.*\ (J.*)\ (s)...s\ ([0-9]+).*\r/\1\ sucks\ \4\ \2\3\.\r/g'</code><br />
Which would now make that first text look something like this:<br />
<code>Jimmy sucks 43 Johnsons.</code></p>
<p>This sort of thing would be great for pranking your frienemies, but I have yet to hear of such a thing catching on.  Which brings us to my current dilemma.  I&#8217;ve come to rely on regular expressions so much that I believe they can do anything.  Unfortunately, I think I&#8217;m demanding too much, or at least my computer is unwilling to give me everything it&#8217;s got in order to accomplish this task.  I have a  text file, freshly spit out from Excel, that has 43 columns of textual data over 160 some-odd rows &#8230; not that big of a file, it&#8217;s only got about 43,000 characters.  It&#8217;s tab-delimited, meaning that in the text file, there&#8217;s a unprinted tab character (\t) between each section of the data, to separate out each of the cells.  What I wanted to do was churn this tabbed text file into an XML .plist, or Property List file.  I&#8217;m sure there&#8217;s a more elegant way of doing this (without having to do it by hand, obviously), but I chose to create a regular expression &#8230; here&#8217;s what the &#8220;Search For&#8221; string looks like:</p>
<p><code>^(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)\r</code></p>
<p>And here&#8217;s what the &#8220;Replace With&#8221; string looked like:</p>
<p><code>legislatorID\r\1\rlegtype_name\r\2\rlegtype\r\3\rlastname\r\4\rfirstname\r\5\rmiddlename\r\6\rnickname\r\7\rsuffix\r\8\rparty_name\r\9\rparty_id\r\10\rdistrict\r\11\rtenure\r\12\rpartisan_index\r\13\rphoto_name\r\14\rbio_url\r\15\rnotes\r\16\rgallery_desk\r\17\rcap_office\r\18\rstaff\r\19\rcap_phone\r\20\rcap_fax\r\21\rcap_phone2_name\r\22\rcap_phone2\r\23\rdist1_street\r\24\rdist1_city\r\25\rdist1_zip\r\26\rdist1_phone\r\27\rdist1_fax\r\28\rdist2_street\r\29\rdist2_city\r\30\rdist2_zip\r\31\rdist2_phone\r\32\rdist2_fax\r\33\rdist3_street\r\34\rdist3_city\r\35\rdist3_zip\r\36\rdist3_phone1\r\37\rdist3_fax\r\38\rdist4_street\r\39\rdist4_city\r\40\rdist4_zip\r\41\rdist4_phone1\r\42\rdist4_fax\r\43\r\r</code></p>
<p>Needless to say, it did not go over well.  BBEdit died after ten minutes of churning.  Perl sucked up 2 Gigs of RAM before I had to kill it.  Sure I could process the file little bits at a time, but wouldn&#8217;t that be taking the fun out of regular expressions?</p>
<h2>EDIT / Update: </h2>
<p>Yeah, about all that. With a tiny bit of touching up, a demo version of <a rel="nofollow" href="http://macromates.com/">TextMate</a> processed the whole file in about 6 seconds. Sounds like someone’s going to actually have to pay for a software registration when the demo expires. Nothing like knocking my socks off and shaming a few industry leaders to earn your keep. Nice job there buddy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sleestacks.com/2009/05/25/the-trouble-with-regular-expressions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
