<?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>Tudor Barbu&#039;s professional blog &#187; perl</title>
	<atom:link href="http://blog.motane.lu/tag/perl/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.motane.lu</link>
	<description>Ramblings about software development</description>
	<lastBuildDate>Thu, 02 Feb 2012 17:38:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>NERD_Tree &amp; Ack</title>
		<link>http://blog.motane.lu/2010/12/10/nerd_tree-ack/</link>
		<comments>http://blog.motane.lu/2010/12/10/nerd_tree-ack/#comments</comments>
		<pubDate>Fri, 10 Dec 2010 18:12:02 +0000</pubDate>
		<dc:creator>Tudor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ack]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://blog.motane.lu/?p=1433</guid>
		<description><![CDATA[I started using ack some time ago and I can say it&#8217;s much better than grep. Faster, more intuitive, much, much faster And I wanted to integrated with my vim environment. I use NERD_Tree and I couldn&#8217;t find any suitable module that will add ack functionality to it, so I decided to write my own. [...]]]></description>
			<content:encoded><![CDATA[<p>I started using ack some time ago and I can say it&#8217;s much better than grep. Faster, more intuitive, much, much faster <img src='http://blog.motane.lu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  And I wanted to integrated with my vim environment. I use NERD_Tree and I couldn&#8217;t find any suitable module that will add ack functionality to it, so I decided to write my own. So, voila, my <a href="http://www.vim.org/scripts/script.php?script_id=3357" class="outgoing" title="NERD_Tree_Ack plugin">first vim plugin</a>.</p>
<h2><span>Installation:</span></h2>
<p>Install NERD_Tree first. Then download this module to ~/.vim/plugin/ or the appropriate location on your system and&#8230;you&#8217;re done. </p>
<p>Install ack (see details at <a href="http://betterthangrep.com" title="ack homepage" class="outgoing">betterthangrep.com</a> ). Depending on your operating system, you need to type something like &#8220;<em>sudo apt-get install ack-grep</em>&#8220;, &#8220;<em>brew install ack</em>&#8221; or other. Most of the installers will add ack to your $PATH, so NERD_Tree_Ack.vim won&#8217;t require additional configuration. If you&#8217;re weird and don&#8217;t want to add ack to your $PATH, just add the following line to your .vimrc file: </p>
<pre class="brush: plain; title: ; notranslate">
let g:path_to_search_app = &quot;/full/path/to/ack&quot;
</pre>
<h2><span>Using it</span></h2>
<p>Open NERD_Tree and point it to your project folder, by typing <em>:NERDtree /path/to/project</em> or by using bookmarks. Place the cursor on a folder and type the letter <em>m</em>. In the menu that will pop up you will have the option &#8220;(s)earch directory&#8221;. Select it by pressing <em>s</em> and type your pattern. If your search will yield results, you will see a window in the lower part of your screen, with all the results. Navigate with the keys and press <CR> to jump to a result. The file will be opened in the last working window.</p>
<p>Don&#8217;t forget to rate it if you like it <img src='http://blog.motane.lu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.motane.lu/2010/12/10/nerd_tree-ack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Limit a script&#8217;s execution time</title>
		<link>http://blog.motane.lu/2009/07/13/limit-a-scripts-execution-time/</link>
		<comments>http://blog.motane.lu/2009/07/13/limit-a-scripts-execution-time/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 04:41:53 +0000</pubDate>
		<dc:creator>Tudor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://blog.motane.lu/?p=914</guid>
		<description><![CDATA[Sometimes you might want to limit a script&#8217;s maximum execution time, so that if it&#8217;s not done in X seconds, you&#8217;ll discard any results you&#8217;ve got so far and move on. And if you&#8217;re lazy and don&#8217;t want to implement threading and semaphores and so on, or you just need a quick way to achieve [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you might want to limit a script&#8217;s maximum execution time, so that if it&#8217;s not done in X seconds, you&#8217;ll discard any results you&#8217;ve got so far and move on. And if you&#8217;re lazy and don&#8217;t want to implement threading and semaphores and so on, or you just need a quick way to achieve this limitation and you&#8217;re okay with killing the script after a certain number of seconds &#8211; note that you will lose any unsaved data when you kill the program &#8211; then this Perl one liner might just do the trick for you:</p>
<pre class="brush: perl; title: ; notranslate">
perl -e '$s = shift; $SIG{ALRM} = sub { print STDERR &quot;Timeout!\n&quot;; kill INT =&gt; $p }; exec(@ARGV) unless $p = fork; alarm $s; waitpid $p, 0' {max. execution time in seconds} {/path/to/script}
</pre>
<p>Don&#8217;t try to read it&#8230;just go with it <img src='http://blog.motane.lu/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  It works and that all that matters.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.motane.lu/2009/07/13/limit-a-scripts-execution-time/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Perl vs PHP</title>
		<link>http://blog.motane.lu/2009/02/08/perl-vs-php/</link>
		<comments>http://blog.motane.lu/2009/02/08/perl-vs-php/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 08:28:35 +0000</pubDate>
		<dc:creator>Tudor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[career]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[recommendations]]></category>
		<category><![CDATA[versus]]></category>

		<guid isPermaLink="false">http://blog.motane.lu/?p=405</guid>
		<description><![CDATA[I&#8217;ve read this article that debates the differences between perl and PHP in a childish way &#8211; sort of like the kindergarten debates on whether Batman can kick Spiderman&#8217;s ass. Since I haven&#8217;t ever coded a single line in perl, I can prove to the world that I&#8217;m a mature person that doesn&#8217;t plunge into [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve read this <a href="http://tnx.nl/php.html" title="PHP in contrast to perl" class="outgoing">article</a> that debates the differences between perl and PHP in a childish way &#8211; sort of like the kindergarten debates on whether Batman can kick Spiderman&#8217;s ass. Since I haven&#8217;t ever coded a single line in perl, I can prove to the world that I&#8217;m a mature person that doesn&#8217;t plunge into &#8220;my operator in better than yours&#8221; debates, because if I would have any perl experience, I would be right there in the middle of it <img src='http://blog.motane.lu/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  .</p>
<p>They may be right on some of the statements they make, but when they claim that a career in perl in better than one in PHP they&#8217;re wrong. Dead wrong. PHP has a bright future ahead it whereas PERL does not. Because, in the end, arguments such as “perl has better naming conventions” don’t matter. In a world where nearly all programmers have access to speedy <a href="http://www.o2.co.uk/">O2 broadband packages</a> or other reliable internet connections, both systems can be (and usually are) widely in use on a number of hugely popular sites. Decisions on what technologies should be used, especially on large projects where loads of money are involved, aren’t taken by geeks in dark rooms over a game of AD&#038;D, but by CEOs over a game of golf or in really expensive restaurants. </p>
<p>If you go on <a href="http://www.zend.com" title="the php company" class="outgoing">Zend</a>&#8216;s website, you find things like <em>improve productivity</em>, <em>maximize IT investments</em>. This is music to a manager&#8217;s ears. CEOs like pie charts more than they like pie. If you go on perl&#8217;s website, what do you see? Well, <em>perl 5</em>, <em>perl 6</em>, <em>CPAN ratings</em>, <em>Annotated CPAN</em>, <em>mailing lists</em>. Why do you think that there are so many products being developed on Microsoft technologies? Do you think C# in better than perl or PHP? Or that ASP (not ASP.NET, the original ASP) was better? No, this is just Microsoft&#8217;s image at work.</p>
<p>PHP is quite big on its own, but compared to perl, it&#8217;s huge. PHP in on <a href="http://www.oracle.com/technology/tech/php/index.html" title="Oracle's PHP Developer Center" class="outgoing">Oracle&#8217;s site</a>. PHP is on <a href="http://www.adobe.com/devnet/flex/flex_php.html" title="Learn Flex and PHP" class="outgoing">Adobe&#8217;s site</a>. Wikipedia is built on PHP, WordPress is built in PHP and the examples go on and on. Perl is not even in the debate, it&#8217;s seen as an esoteric language used by CLI geeks. I doubt (I haven&#8217;t checked so feel free to prove me wrong) that there is a single project with a budget over 200.000 euros being developed on perl.</p>
<p>These factors aren&#8217;t exactly &#8220;programming related&#8221;, so why are they so important in the day by day life of the average programmer? Well, they create jobs, pay money, give you the ability to pay the rent, buy a car, go on vacation and so on. If you come across a career decision between perl and PHP, don&#8217;t waste time wandering if perl&#8217;s naming standard is better than php&#8217;s or which language has less string comparison functions. But instead ask yourself, which technology will allow you to find a better job? Look on a local jobbing site and see how many PHP are available and compare that number to the number of perl jobs available &#8211; if any. </p>
<p>&#8230;just my 2 cents. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.motane.lu/2009/02/08/perl-vs-php/feed/</wfw:commentRss>
		<slash:comments>56</slash:comments>
		</item>
	</channel>
</rss>

