1. Shlomi Fish
  2. perl-begin

Commits

shl...@13c2ddb8-3aa7-4284-800b-8db07c650eef  committed 6213760

Add more.

  • Participants
  • Parent commits 95463dc
  • Branches default

Comments (0)

Files changed (3)

File TODO

View file
 
 * Add http://rosettacode.org/wiki/Main_Page .
 
+* Further work on src/uses/chat-scripting/index.html.wml .
+    - Maybe trim the introduction.
+
+* Maybe a page on «What's next "after" perl?».
+
 Long Term:
 ----------
 

File lib/MyNavData.pm

View file
                     title => "Using Perl for Bio-Informatics",
                 },
                 {
+                    text => "Chat Bots and Scripting",
+                    url => "uses/chat-scripting/",
+                    title => "Writing chat (IRC, Jabber and other IM) bots in Perl and general chat scripting",
+                },
+                {
                     text => "Databases",
                     url => "uses/databases/",
                     title => "Working with Databases (SQL, etc.) Using Perl",

File src/uses/chat-scripting/index.html.wml

View file
+#include '../template.wml'
+
+<latemp_subject "Perl for Writing Chat Robots and Scripts (IRC, Jabber, etc.)" />
+
+<h2 id="intro">Introduction</h2>
+
+<p>
+Since the advent of the <a href="$(ROOT)/irc/">IRC - the Internet Relay
+Chat protocol</a>, people have been automating it by writing dedicated
+robots or "bots", which are computer programs that sit an Internet host 
+somewhere and perform various functions. Examples for that are chat bots,
+which are used for amusement, infobots, which are used to collect various 
+and handily recall commonly used factoids, mathbots which can perform
+mathematical operations, and evalbots which are used to evaluate code in
+certain programming languages, but there are many others including many
+multi-purpose bots.
+</p>
+
+<p>
+While IRC used to be considered a place for people who either wanted
+to waste time or were web low-life, it more recently gained much more
+mainstream acceptance among open-source users and contributors and to some
+extent some more Internet users who are more laymen computer-wise. And
+even more recently, there has been some proliferation of different protocols
+for instant messaging or chat, such as the open-source 
+<a href="http://en.wikipedia.org/wiki/Extensible_Messaging_and_Presence_Protocol">Jabber/XMPP protocol</a>, which has gained some further popularity after
+it has been supported by providers such as Google Talk / Google Chat and
+Facebook.com. 
+</p>
+
+<p>
+So <b>what about Perl?</b> Perl allows one to write such robots and other
+forms of chat scripting (such as progrmaming special IRC or Jabber client 
+commands) with ease, and many active Perl programmers and contributors have
+got their feet wet in Perl after using it to write a simple bot or a chat
+script.
+</p>
+
+<h2 id="irc">For IRC</h2>
+
+<p>
+If you want to write something for IRC, take these recommendations to heart:
+</p>
+
+<ol>
+
+<li>
+Don't parse the IRC protocol directly (using regular expressions or whatever).
+Use a module.
+</li>
+
+<li>
+<b>Don't use Net-IRC</b> which is very limited, broken, and is unmaintained.
+</li>
+
+</ol>
+
+<p>
+There are many bad examples doing that on the web, and you should not follow
+them if you want to write your own robot or script from scratch. If you want
+to contribute to an existing codebase that uses these legacy methods, please
+make it a priority to convert it to a more modern IRC framework.
+</p>
+
+<h2 id="POE-Component-IRC"><a href="http://search.cpan.org/dist/POE-Component-IRC/">POE-Component-IRC</a></h2>
+
+<p>
+POE-Component-IRC (or PoCoIrc for short) has been the first successuful
+attempt at providing a decent IRC framework for Perl based on
+<a href="$(ROOT)/uses/multitasking/#poe">the POE networking and
+multi-tasking framework for Perl</a>.
+</p>
+
+<p>
+Especially of note is
+<a href="http://search.cpan.org/dist/Bot-BasicBot/">Bot-BasicBot</a> which is
+a layer above POE-Component-IRC that is more user-friendly and straightfoward
+for writing a bot.
+</p>