<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>hjkl</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/hjkl/" />
    <link rel="self" type="application/atom+xml" href="http://blogs.perl.org/users/hjkl/atom.xml" />
    <id>tag:blogs.perl.org,2009-11-03:/users/hjkl//1295</id>
    <updated>2013-05-17T23:21:47Z</updated>
    <subtitle>A blog about the Perl programming language</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Pro 4.38</generator>

<entry>
    <title>WWW::KrispyKreme::Hotlight  - first release</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/hjkl/2013/05/wwwkrispykremehotlight---first-release.html" />
    <id>tag:blogs.perl.org,2013:/users/hjkl//1295.4688</id>

    <published>2013-05-17T23:01:45Z</published>
    <updated>2013-05-17T23:21:47Z</updated>

    <summary>I have uploaded the first version of WWW::KrispyKreme::Hotlight. This is basically a Perl wrapper that interfaces with Krispy Kreme&apos;s location search page Creating a new object like this: # only supports geo right now my $donuts = WWW::KrispyKreme::Hotlight-&gt;new(where =&gt; [34.170833,-118.25]);...</summary>
    <author>
        <name>curtis</name>
        <uri>http://github.com/aggrolite</uri>
    </author>
    
    <category term="krispykremedonutsperlscrape" label="krispy kreme donuts perl scrape" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/hjkl/">
        <![CDATA[<p>I have uploaded the first version of <a href="https://metacpan.org/release/WWW-KrispyKreme-Hotlight">WWW::KrispyKreme::Hotlight</a>.  This is basically a Perl wrapper that interfaces with Krispy Kreme's <a href="http://locations.krispykreme.com/">location search page</a></p>

<p><strong>Creating a new object like this:</strong></p>

<pre>
# only supports geo right now
my $donuts = 
    WWW::KrispyKreme::Hotlight->new(where => [34.170833,-118.25]);
</pre>

<p><strong>and calling the locations method like this:</strong></p>

<pre>
my $locations = $donuts->locations;
</pre>

<p><strong>will return a structure like this:</strong></p>

<pre>
[   {   'storeHours2' => '',
        'locationId'  => '993',
        'hotLightOn'  => '0',
        'storeHours1' => '',
        'phone'       => '818-955-9015',
        'zipcode'     => '91504',
        'state'       => 'CA',
        'city'        => 'Burbank',
        'geoLocation' => '34.190000,-118.330000',
        'url'         => 'http://kkre.me/oXMuQQ',
        'title'       => 'Burbank',
        'address'     => '1521 North Victory Place'
    },
    {   'storeHours2' => '',
        'locationId'  => '985',
        'hotLightOn'  => '0',
        'storeHours1' => '',
        'phone'       => '323-291-4133',
        'zipcode'     => '90008',
        'state'       => 'CA',
        'city'        => 'Los Angeles',
        'geoLocation' => '34.010000,-118.340000',
        'url'         => 'http://kkre.me/pF3cuI',
        'title'       => 'Los Angeles',
        'address'     => '4034 Crenshaw Boulevard'
    },
...
]
</pre>

<p>Notice there is a boolean value for <strong>'hotLightOn'</strong> which can be handy for finding fresh donuts!</p>

<p>CPAN: <a href="https://metacpan.org/module/WWW::KrispyKreme::Hotlight">https://metacpan.org/module/WWW::KrispyKreme::Hotlight</a><br />
Github: <a href="https://metacpan.org/module/WWW::KrispyKreme::Hotlight">https://github.com/aggrolite/WWW-KrispyKreme-HotLight</a></p>]]>
        
    </content>
</entry>

<entry>
    <title>POE::Component::IRC::Plugin::WWW::Reddit::TIL first release</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/hjkl/2013/04/poecomponentircpluginwwwreddittil-first-release.html" />
    <id>tag:blogs.perl.org,2013:/users/hjkl//1295.4617</id>

    <published>2013-04-27T06:21:27Z</published>
    <updated>2013-04-27T06:38:55Z</updated>

    <summary>Hi all, Yesterday I released another IRC plugin for POE::Component::IRC: POE::Component::IRC::Plugin::WWW::Reddit::TIL The plugin simply fetches a random title and link from the front page of Reddit&apos;s TodayILearned subreddit. I used WWW::Shorten::Simple to return bitly links, and Mojo::JSON to decode reddit&apos;s...</summary>
    <author>
        <name>curtis</name>
        <uri>http://github.com/aggrolite</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/hjkl/">
        <![CDATA[<p>Hi all,</p>

<p>Yesterday I released another IRC plugin for POE::Component::IRC: <a href="https://metacpan.org/module/POE::Component::IRC::Plugin::WWW::Reddit::TIL">POE::Component::IRC::Plugin::WWW::Reddit::TIL</a></p>

<p>The plugin simply fetches a random title and link from the front page of Reddit's <a href="http://www.reddit.com/r/todayilearned">TodayILearned</a> subreddit.</p>

<p>I used WWW::Shorten::Simple to return bitly links, and Mojo::JSON to decode reddit's <a href="http://www.reddit.com/r/todayilearned.json">API.</a></p>

<p>example:</p>

<p><strong>curtis:</strong> !TIL<br />
<strong>ircbot:</strong> curtis: TIL that the fighter squadron with the highest number of kills in the Battle of Britain during WWII were actually from Poland, and showed up two months after the battle had begun. http://bit.ly/ZN0qdB</p>

<p>links:</p>

<p><a href="http://search.cpan.org/~curtis/POE-Component-IRC-Plugin-WWW-Reddit-TIL-0.001/">CPAN</a><br />
<a href="https://github.com/aggrolite/POE-Component-IRC-Plugin-WWW-Reddit-TIL">Github</a></p>]]>
        
    </content>
</entry>

<entry>
    <title>POE::Component::IRC::Plugin::Vim::Tips v0.02 released</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/hjkl/2013/01/poecomponentircpluginvimtips-v002-released.html" />
    <id>tag:blogs.perl.org,2013:/users/hjkl//1295.4244</id>

    <published>2013-01-31T18:27:12Z</published>
    <updated>2013-01-31T18:49:04Z</updated>

    <summary>Hello Perl bloggers, I have released my first module: POE::Component::IRC::Plugin::Vim::Tips, a plugin for the IRC client module POE::Component::IRC. When a user types !vimtip (or !vimtips) in a channel that your bot has joined, my plugin will scrape the first page...</summary>
    <author>
        <name>curtis</name>
        <uri>http://github.com/aggrolite</uri>
    </author>
    
    <category term="irc" label="irc" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="perl" label="perl" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="twitter" label="twitter" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="vim" label="vim" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/hjkl/">
        <![CDATA[<p>Hello Perl bloggers,</p>

<p>I have released my first module: POE::Component::IRC::Plugin::Vim::Tips, a plugin for the IRC client module POE::Component::IRC.</p>

<p>When a user types !vimtip (or !vimtips) in a channel that your bot has joined, my plugin will scrape the first page of tweets from the <a href="http://twitter.com/vimtips">Vim Tips Twitter feed</a> and reply back with a "random" tip from that list.</p>

<p>Example:</p>

<p><strong>curtis</strong> !vimtip<br />
<strong>vimbot</strong> curtis: ggguG will lower case the entire file (also known as the Jerry Yang treatment). http://is.gd/4xZW</p>

<p>A lesson learned from v0.01: Don't forget to list dependencies in Makefile.PL!</p>

<p>Links:<br />
<a href="http://search.cpan.org/~curtis/POE-Component-IRC-Plugin-Vim-Tips-0.02/lib/POE/Component/IRC/Plugin/Vim/Tips.pm">CPAN</a><br />
<a href="https://github.com/aggrolite/POE-Component-IRC-Plugin-Vim-Tips">Github</a></p>]]>
        
    </content>
</entry>

<entry>
    <title>[FB]izzBuzz in Perl</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/hjkl/2012/12/fbizzbuzz-in-perl.html" />
    <id>tag:blogs.perl.org,2012:/users/hjkl//1295.4125</id>

    <published>2012-12-13T06:28:48Z</published>
    <updated>2012-12-13T06:58:23Z</updated>

    <summary>I finally sat down and organized my unsorted bookmarks in Firefox. In doing so I came across Jeff Atwood&apos;s blog post describing the FizzBuzz test: Write a program that prints the numbers from 1 to 100. But for multiples of...</summary>
    <author>
        <name>curtis</name>
        <uri>http://github.com/aggrolite</uri>
    </author>
    
    <category term="fizzbuzzbizzbuzz" label="fizzbuzz bizzbuzz" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/hjkl/">
        <![CDATA[<p>I finally sat down and organized my unsorted bookmarks in Firefox.  In doing so I came across Jeff Atwood's <a href="http://www.codinghorror.com/blog/2007/02/why-cant-programmers-program.html">blog post</a> describing the FizzBuzz test:</p>

<blockquote>Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz".</blockquote>

<p>I must have bookmarked the link while preparing for interviews before graduation.  After skimming over the material I was curious to know the smallest amount of Perl code I could use to write a solution.</p>

<p>Here's my attempt:</p>

<p><script src="https://gist.github.com/4274561.js"></script></p>

<p>Any shorter solutions?  I suppose I could just use print if I wanted a one-liner...</p>]]>
        
    </content>
</entry>

</feed>
