[DFW.pm] Is Perl Like Shell Script?

Tommy Butler dfwpm at internetalias.net
Mon Oct 28 20:05:16 PDT 2013


Aaaaand for more fun I just wrote and added "dfw dictionary bot" to the
git repo.  It hits the Merriam Webster dictionary.com XML API and spits
out the first definition it finds.



69 lines of code for dictionary bot because the remote API is ...
special.  The code is up on github <https://github.com/dfwperl/dfwbot>. 
You can play with dictbot on #bot-test at irc.perl.org (at least for a
while).

--Tommy Butler

On 10/28/2013 06:40 PM, John Fields wrote:
>
> That is entirely cromulent code!
> (I just added cromulent to my phone's dictionary).
>
> Looking forward to playing with this, I think I misunderstood the
> scope of POE!
>
> On Oct 28, 2013 6:07 PM, "Tommy Butler" <dfwpm at internetalias.net
> <mailto:dfwpm at internetalias.net>> wrote:
>
>     Just for fun I turned my 22*** line IRC greeter bot into a 52 line
>     IRC spellchecker bot (screenshot below). 
>
>     This bot is currently logged into irc.perl.org
>     <http://irc.perl.org> taking requests in the #bot-test channel.
>
>     Like greeter bot, spellchecker bot is in the DFW Perl Mongers irc
>     bot repo on github.
>     <https://github.com/dfwperl/dfwbot/blob/master/dfw_spellerbot.pl>
>     /***line counts do not include comment lines/
>
>     <snip big screenshot>
>
>     --Tommy Butler
>
>     On 10/27/2013 05:21 PM, Tommy Butler wrote:
>>     So I wrote an irc bot <https://github.com/dfwperl/dfwbot>, tested
>>     it out several times, and put it up on github in all of 2 hours
>>     this afternoon.  It's built on Bot::BasicBot
>>     <https://metacpan.org/pod/Bot::BasicBot>.  Bot::BasicBot is
>>     *gasp* built on POE <https://metacpan.org/pod/POE>.  /*This bot
>>     is neat and I think this would be very fun to extend.*/
>>
>>     I would love play around with this concept together -- to use
>>     git/github to clone, fork, and hack together our own individual
>>     bots and try them out in real time together at the next meeting. 
>>     We could make them talk to each other, do spell checks, wolfram
>>     alpha lookups, shorten URLs, fetch stock performance stats, or
>>     any number of things.
>>
>>     What do you think?  Feel free to disagree.
>>
>>     --Tommy Butler
>>
>>     On 10/25/2013 03:24 PM, John Fields wrote:
>>>
>>>     Prolly POE.  And yes using an event-driven manager framework to
>>>     call a IRC module is probably over kill.
>>>
>>>     :)
>>>
>>>     On Oct 25, 2013 3:21 PM, "Stephen Wylie"
>>>     <stev-o at u.northwestern.edu <mailto:stev-o at u.northwestern.edu>>
>>>     wrote:
>>>
>>>         AOE... are you talking ATA over Ethernet?  Age of Empires?
>>>          The secret of the Alpha Phi fraternity?
>>>
>>>         Clueless & floundering on Google,
>>>         Stephen
>>>
>>>
>>>         On Fri, Oct 25, 2013 at 2:01 PM, A.J. Maurin
>>>         <coyo at darkdna.net <mailto:coyo at darkdna.net>> wrote:
>>>
>>>             Well BASHing together an IRC bot out of netcat and
>>>             quick-and-dirty oneliners of sed and awk are easy for
>>>             me, because I'm used to it.
>>>
>>>             Anything beyond a quick one-liner of Perl looks daunting
>>>             to me.
>>>
>>>             I dislike using standard libraries. To me, it's learning
>>>             how to use other people's code. Reinventing the wheel my
>>>             butt.
>>>
>>>
>>>             On 10/23/2013 12:00 PM, John Fields wrote:
>>>>
>>>>             Shaun, Net::IRC is deprecated. I KNOW!  Says try
>>>>             Bot::BasicBot
>>>>
>>>>             Alex, look at this BasicBot page and let us know how
>>>>             difficult it looks!  Not very compared to BASHing it
>>>>             out. :)
>>>>
>>>>             http://blog.rajatpandit.com/2008/02/25/writing-an-irc-bot/
>>>>
>>>>             Writing an IRC bot from scratch in the next Monger
>>>>             meeting sounds like fun.  We can review the random
>>>>             password generator code progress too. What say Ye? 
>>>>             (Futurama Bot reference... Hehehe)
>>>>
>>>>             On Oct 20, 2013 4:53 PM, "A.J. Maurin"
>>>>             <coyo at darkdna.net <mailto:coyo at darkdna.net>> wrote:
>>>>
>>>>                 ^_^
>>>>
>>>>                 I'm sad that it isn't every week, but I suppose
>>>>                 there's a lot more that at Dallas Makerspace than
>>>>                 Hump Day Mongering.
>>>>
>>>>                 Yeah, people said I was insane for writing that
>>>>                 script, a Bash shell script IRC bot that used netcat.
>>>>
>>>>                 My response was "meow." I can't believe I lost that
>>>>                 thumbdrive.
>>>>
>>>>                 On 10/20/2013 11:30 AM, Tommy Butler wrote:
>>>>
>>>>                     We hold Perl Mongers on the second Wednesday of
>>>>                     each month, so we will meet next on 11/13/13.
>>>>                     It generally works out to be somewhere around
>>>>                     the hump day of each month ;-)
>>>>
>>>>                     The IRC bot script that's being discussed
>>>>                     sounds like lots of fun!
>>>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/dfw-pm/attachments/20131028/b9d07203/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: feecbhjd.png
Type: image/png
Size: 128804 bytes
Desc: not available
URL: <http://mail.pm.org/pipermail/dfw-pm/attachments/20131028/b9d07203/attachment-0001.png>


More information about the Dfw-pm mailing list