<?xml version="1.0" encoding="iso-8859-1"?>
<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>[Lowerbounds, Upperbounds] &#187; Scripting</title>
	<atom:link href="http://magic.aladdin.cs.cmu.edu/category/software-tools/scripting/feed/" rel="self" type="application/rss+xml" />
	<link>http://magic.aladdin.cs.cmu.edu</link>
	<description>Algorithms are everywhere.</description>
	<lastBuildDate>Tue, 23 Dec 2008 19:58:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9-rare</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Explorer Here</title>
		<link>http://magic.aladdin.cs.cmu.edu/2006/01/06/explorer-here/</link>
		<comments>http://magic.aladdin.cs.cmu.edu/2006/01/06/explorer-here/#comments</comments>
		<pubDate>Sat, 07 Jan 2006 02:11:58 +0000</pubDate>
		<dc:creator>Maverick Woo</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://magic.aladdin.cs.cmu.edu/?p=197</guid>
		<description><![CDATA[Command Prompt Here seems to be a well-known feature among the Windows users. It lets you right-click on a folder and open a command prompt with the current working directory set to that folder.
But what about its &#8220;functional inverse&#8221;, i.e., start an explorer to explore the current directory? Well, you can execute explorer . in [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.google.com/search?as_q=%22command%20prompt%20here%22">Command Prompt Here</a> seems to be a well-known feature among the Windows users. It lets you right-click on a folder and open a command prompt with the current working directory set to that folder.</p>
<p>But what about its &#8220;functional inverse&#8221;, i.e., start an explorer to explore the current directory? Well, you can execute <code>explorer .</code> in the Command Prompt, but that will not be exactly &#8220;correct&#8221; since the tree view of folders is missing. Apparently you have to add a completely obscure argument&#8230; I put this command in a batch file on my path:</p>
<p><code>start "" explorer /e, .</code></p>
<p>Note that there cannot be a space between the &#8220;e&#8221; and the comma. Don&#8217;t ask.</p>
]]></content:encoded>
			<wfw:commentRss>http://magic.aladdin.cs.cmu.edu/2006/01/06/explorer-here/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Higher Order Perl</title>
		<link>http://magic.aladdin.cs.cmu.edu/2005/08/06/higher-order-perl/</link>
		<comments>http://magic.aladdin.cs.cmu.edu/2005/08/06/higher-order-perl/#comments</comments>
		<pubDate>Sat, 06 Aug 2005 18:34:36 +0000</pubDate>
		<dc:creator>Maverick Woo</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://magic.aladdin.cs.cmu.edu/?p=109</guid>
		<description><![CDATA[I find this recent book (sort of available online) by Mark Jason Dominus to be very CS-friendly. The reason: Closures!

The Perl Review: Why did you write Higher Order Perl?
Mark Jason Dominus: [...] But I had a few hidden agenda items as well. The book is about how to use closures, and I think there are [...]]]></description>
			<content:encoded><![CDATA[<p>I find this recent book <a href="http://hop.perl.plover.com/#free">(sort of available online)</a> by Mark Jason Dominus to be very CS-friendly. The reason: Closures!</p>
<blockquote><p>
<a href="http://www.theperlreview.com/Interviews/mjd-hop-20050407.html">The Perl Review</a>: Why did you write Higher Order Perl?</p>
<p>Mark Jason Dominus: [...] But I had a few hidden agenda items as well. The book is about how to use closures, and I think there are too many languages around that have no easy way to use closures. Java, in particular, seems to me to be a giant step back towards the languages of the 1970s.
</p></blockquote>
<p>Two interesting tidbits from the book are:</p>
<ul>
<li>The term memoization was coined in 1968 by Donald Michie.</li>
<li>Data marshalling is so named because it was first studied in 1962 by Edward Waite Marshall, then with the General Electric corporation.</li>
</ul>
<p>In a previous job, I have done a lot of programming that involves data marshalling, now the term finally makes sense!</p>
]]></content:encoded>
			<wfw:commentRss>http://magic.aladdin.cs.cmu.edu/2005/08/06/higher-order-perl/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sysinternals PsTools</title>
		<link>http://magic.aladdin.cs.cmu.edu/2005/07/01/sysinternals-pstools/</link>
		<comments>http://magic.aladdin.cs.cmu.edu/2005/07/01/sysinternals-pstools/#comments</comments>
		<pubDate>Fri, 01 Jul 2005 22:19:16 +0000</pubDate>
		<dc:creator>Maverick Woo</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://magic.aladdin.cs.cmu.edu/2005/04/29/sysinternals-pstools/</guid>
		<description><![CDATA[PsTools from Sysinternals is a collection of command line utilities that let you manipulate processes in Windows. Among the tools, I personally use pslist and pskill every single day(*). Check it out!
And if you have pslist, then put the following into a batch file, say mlist.bat. It&#8217;s very handy for nailing down memory leaks. (Note [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sysinternals.com/Utilities/PsTools.html">PsTools from Sysinternals</a> is a collection of command line utilities that let you manipulate processes in Windows. Among the tools, I personally use <code>pslist</code> and <code>pskill</code> every single day(*). Check it out!</p>
<p>And if you have <code>pslist</code>, then put the following into a batch file, say <code>mlist.bat</code>. It&#8217;s very handy for nailing down memory leaks. (Note that the <code>@</code> sign in the front of a command in a batch file suppresses the echoing of the command. That&#8217;s why many batch files start with <code>@echo off</code>.)</p>
<blockquote><p><code>@pslist | sort -n +5 | tail -n 10</code></p></blockquote>
<p>BTW, with the release of Windows XP and Windows Server 2003, Microsoft has bundled two command line tools that do similar things (<code>tasklist</code> and <code>taskkill</code>). However, their command line interface is awkward. I recommend you forget about them and stick with PsTools.</p>
<p>(*) largely because of Firefox and Acrobat</p>
]]></content:encoded>
			<wfw:commentRss>http://magic.aladdin.cs.cmu.edu/2005/07/01/sysinternals-pstools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>All but the first few lines of a file</title>
		<link>http://magic.aladdin.cs.cmu.edu/2005/06/30/all-but-the-first-few-lines-of-a-file/</link>
		<comments>http://magic.aladdin.cs.cmu.edu/2005/06/30/all-but-the-first-few-lines-of-a-file/#comments</comments>
		<pubDate>Thu, 30 Jun 2005 20:00:28 +0000</pubDate>
		<dc:creator>Maverick Woo</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Text Editing]]></category>

		<guid isPermaLink="false">http://magic.aladdin.cs.cmu.edu/?p=111</guid>
		<description><![CDATA[You would think that there must be a utility in Unix like head or tail that would chop off the first few lines of a file and output the rest. Well, I haven&#8217;t found it yet.
In any case, perl worked.
cat foo.txt &#124; perl -e "print splice @{[&#60;&#62;]}, 5"
]]></description>
			<content:encoded><![CDATA[<p>You would think that there must be a utility in Unix like <code>head</code> or <code>tail</code> that would chop off the first few lines of a file and output the rest. Well, I haven&#8217;t found it yet.</p>
<p>In any case, <code>perl</code> worked.</p>
<blockquote><p><code>cat foo.txt | perl -e "print splice @{[&lt;&gt;]}, 5"</code></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://magic.aladdin.cs.cmu.edu/2005/06/30/all-but-the-first-few-lines-of-a-file/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Perl Regular Expression Matching is NP-Hard</title>
		<link>http://magic.aladdin.cs.cmu.edu/2005/05/13/perl-regular-expression-matching-is-np-hard/</link>
		<comments>http://magic.aladdin.cs.cmu.edu/2005/05/13/perl-regular-expression-matching-is-np-hard/#comments</comments>
		<pubDate>Sat, 14 May 2005 03:27:43 +0000</pubDate>
		<dc:creator>Maverick Woo</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Theory of Computing]]></category>

		<guid isPermaLink="false">http://magic.aladdin.cs.cmu.edu/2005/04/29/perl-regular-expression-matching-is-np-hard/</guid>
		<description><![CDATA[Do you know that Perl &#8220;regular expressions&#8221; can accept NP-complete languages? 
http://perl.plover.com/NPC/
Happy backtracking!
]]></description>
			<content:encoded><![CDATA[<p>Do you know that Perl &#8220;regular expressions&#8221; can accept NP-complete languages? </p>
<p><a href="http://perl.plover.com/NPC/">http://perl.plover.com/NPC/</a></p>
<p>Happy backtracking!</p>
]]></content:encoded>
			<wfw:commentRss>http://magic.aladdin.cs.cmu.edu/2005/05/13/perl-regular-expression-matching-is-np-hard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
