[DFW.pm] IRC bots in Perl tomorrow!
Stuart A Johnston
saj at thecommune.net
Thu Nov 14 16:21:11 PST 2013
Generally speaking, you'd want to call srand after the fork. I don't
know what would be the POE equivalent of that though.
http://perldoc.perl.org/functions/srand.html
Another option would be to use one of the Random modules on cpan.
On 11/14/2013 05:09 PM, John Dexter wrote:
> So, I've been a long time lurker on the DFW.pm mailing list and decided
> to go ahead and get active by attending last night's meeting. Of
> course, at the last minute I got saddled with an emergency database
> restore for work, so I was unable to attend.
>
> I did want to join in on the IRC bot fun, so I whipped up a little
> plugin of my own, that I call "Discuss". Hate sitting in a dead IRC
> channel? This will let you ask the bot for discussion topics based on
> blog posts at blogs.perl.org <http://blogs.perl.org>.
>
> I'm running into an issue though. I'm using the rand() function to let
> the bot pick random posts and random return phrases, but it doesn't seem
> to be changing after the initial request. My guess is that this is an
> issue with POE and the rand numbers are only generated once at compile
> time, so subsequent calls to the subroutine do not produce different
> results. Anyone know how to get around that? Or if that is even the issue?
>
> https://github.com/PsyDefect/dfwbot/blob/master/DFWpm/BotPlugin/Discuss.pm
>
> Sincerely,
>
> John Dexter
>
>
> On Tue, Nov 12, 2013 at 7:29 PM, Coyo <coyo at darkdna.net
> <mailto:coyo at darkdna.net>> wrote:
>
> I can't believe it's my birthday already.
>
> I feel so oooooooooooooold.
>
> My birthday is tomorrow, the 13th. A hump day.
>
> I hope that's an omen.
>
>
>
> On 11/12/2013 04:42 PM, John Fields wrote:
>>
>> 2nd Wed is huuuummmpppddaaaayyy. :)
>>
>> We will be running some home made bots and covering different ways
>> to run them under Linux. Maybe add a stats page, or a tabulated
>> log of results? Bring your ideas and "what ifs".
>>
>> As usual it is at the dallasmakerspace.org
>> <http://dallasmakerspace.org> at 7pm. Some food afterwards at a
>> local eatery.
>>
>>
>
>
> _______________________________________________
> Dfw-pm mailing list
> Dfw-pm at pm.org <mailto:Dfw-pm at pm.org>
> http://mail.pm.org/mailman/listinfo/dfw-pm
>
>
>
>
> _______________________________________________
> Dfw-pm mailing list
> Dfw-pm at pm.org
> http://mail.pm.org/mailman/listinfo/dfw-pm
>
More information about the Dfw-pm
mailing list