User Name
Password

Go Back   Planetarion Forums > Non Planetarion Discussions > Programming and Discussion
Register FAQ Members List Calendar Arcade Today's Posts

Reply
Thread Tools Display Modes
Unread 5 Jan 2003, 22:17   #1
Christian
Attitude
 
Join Date: Jan 2003
Location: Rich Part of Denmark
Posts: 435
Christian is infamous around these parts
Learning Perl.

Hello there,
as the title of the thread reads, im currently trying to learn perl.
Currently, Im learning it by using O'relieys 'Learning Perl 3 edi.' book.. But the programs I have to do in that book, sometimes get a little boring when I know that just right after they are done, Im going to abandon them in my home folder. So, I thought while wanting to keep on learning from the perl book, and therefore doing the small programs in it, I should run along and program something usefull on the side.
My idea is to write an IRC bot; the thing is tho, I don't have any idea on how to do this. I've spoken with several persons on various networks, but hardly anyone have been utterly helpfull. Somebody said it that a perlircbot could run from x-chat, is this true ?

Back to the questions Im trying to ask, has anyone here ever done a perlbot, and if so, how did they start ? Is there any torturials out there, any good sites for this ? And would the same people mind if I ask them stupid and newbic' questions, because I would really appciate a guiding hand here.

Thanks for your time.
__________________
Todd: Truth is like a blanket that always leaves your feet cold. You push it, stretch it, it'll never be enough. Kick at it, beat it, it'll never cover any of us. From the moment we enter crying, to the moment we leave dying, it'll just cover your face as you wail and cry and scream.
Christian is offline   Reply With Quote
Unread 5 Jan 2003, 22:31   #2
MT
/dev/zero
Retired Mod
 
MT's Avatar
 
Join Date: May 2000
Posts: 415
MT is an unknown quantity at this point
I'd continue reading the book.
__________________
#linux : Home of Genius

<idimmu> ok i was chained to a desk with this oriental dude
MT is offline   Reply With Quote
Unread 5 Jan 2003, 22:50   #3
Christian
Attitude
 
Join Date: Jan 2003
Location: Rich Part of Denmark
Posts: 435
Christian is infamous around these parts
Re: Learning Perl.

Quote:
Originally posted by Christian
So, I thought while wanting to keep on learning from the perl book, and therefore doing the small programs in it, I should run along and program something usefull on the side.
Yes ?
__________________
Todd: Truth is like a blanket that always leaves your feet cold. You push it, stretch it, it'll never be enough. Kick at it, beat it, it'll never cover any of us. From the moment we enter crying, to the moment we leave dying, it'll just cover your face as you wail and cry and scream.
Christian is offline   Reply With Quote
Unread 5 Jan 2003, 23:49   #4
MT
/dev/zero
Retired Mod
 
MT's Avatar
 
Join Date: May 2000
Posts: 415
MT is an unknown quantity at this point
No, its a good book, keep reading it until its finished.
Dont do the examples if you think they are self evident, but finish the book before you start anything else.
__________________
#linux : Home of Genius

<idimmu> ok i was chained to a desk with this oriental dude
MT is offline   Reply With Quote
Unread 6 Jan 2003, 00:25   #5
Christian
Attitude
 
Join Date: Jan 2003
Location: Rich Part of Denmark
Posts: 435
Christian is infamous around these parts
Aye captin'
__________________
Todd: Truth is like a blanket that always leaves your feet cold. You push it, stretch it, it'll never be enough. Kick at it, beat it, it'll never cover any of us. From the moment we enter crying, to the moment we leave dying, it'll just cover your face as you wail and cry and scream.
Christian is offline   Reply With Quote
Unread 6 Jan 2003, 01:13   #6
dave20
bleh
 
Join Date: Mar 2001
Posts: 11
dave20 is an unknown quantity at this point
Re: Learning Perl.

Quote:
Originally posted by Christian
Somebody said it that a perlircbot could run from x-chat, is this true?
i suppose you could, x-chat uses perl for scripting, but it'd be a bit lame tbh
dave20 is offline   Reply With Quote
Unread 6 Jan 2003, 02:10   #7
Nodrog
Registered User
 
Join Date: Jun 2000
Posts: 8,476
Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
An IRC bot is probably too big a project to do if youre new, especially if you dont have programming experience in other languages (do you?). Why not start with more basic network apps (communicating with websites and so forth) until you get the hang of it? You'll want to get some modules from CPAN if youre doing network programming in any case.

Also, make sure you get o Reilly - Programming Perl when youve finished the book youve currently got!
Nodrog is offline   Reply With Quote
Unread 6 Jan 2003, 15:08   #8
queball
Ball
 
queball's Avatar
 
Join Date: Oct 2001
Posts: 4,410
queball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so little
If you're gonna write an xchat script, take a look at http://xchat.org/cgi-bin/script_list
__________________
#linux
queball is offline   Reply With Quote
Unread 6 Jan 2003, 21:25   #9
Flayer
Wankoverable
 
Flayer's Avatar
 
Join Date: Apr 2002
Location: wherever I am
Posts: 726
Flayer is a glorious beacon of lightFlayer is a glorious beacon of lightFlayer is a glorious beacon of lightFlayer is a glorious beacon of lightFlayer is a glorious beacon of lightFlayer is a glorious beacon of light
Use the IO::Socket module (perldoc IO::Socket in ur command window for documentation)?
but i think using sockets is a bit too difficult if you're a beginner, try coding something simplier first like a guestbook, forum, .. the usual stuff
__________________
Don't worry, life is too long.
Flayer is offline   Reply With Quote
Unread 7 Jan 2003, 13:04   #10
Pariah
Guest
 
Posts: n/a
I haven't read any perl-books, but I've heard a lot of positive things about O'Reilly's. I'd suggest you read through it, and just skip the chapters you feel isn't teaching you anything new. Don't skip too much tho, or you'll fall off without knowing why :P

IO::Socket in perl is very easy. The perl man pages are also excellent. They've always solved any problems I've had with perl.

I got an irc-bot for perl. I could cut it down to size, so you'd have something to read/attempt to understand ? I would, however, advise against doing an irc-bot as first project. Start off with some simple things, f.x a guestbook, like someone suggested. Thats what I did

Xchat uses perl as scripting engine, but I wouldn't write a bot in it. Using perl and IO::Socket (or just plain Socket, which is using a more C-like syntax. (Read more about both in man perlipc, about halfway down)) is a much more robust and unbloated approach.

Btw, I find man-pages to be a lot better than perldoc, at least in the case of IO::Socket. Thats probably just a matter of taste, tho
  Reply With Quote
Unread 7 Jan 2003, 18:21   #11
Idi
Guest
 
Posts: n/a
Quote:
Originally posted by queball
If you're gonna write an xchat script, take a look at http://xchat.org/cgi-bin/script_list
i started perl by writing xchat scripts

then i moved over to writing a perl bot

now i can write really ace scripts to leach porn really fast over the internet \o/

(i can do other stuff in perl but none of it is as interesting as a script which will quickly **** off and get you 1.5gb of pr0n!)
  Reply With Quote
Unread 7 Jan 2003, 18:40   #12
MT
/dev/zero
Retired Mod
 
MT's Avatar
 
Join Date: May 2000
Posts: 415
MT is an unknown quantity at this point
Quote:
Originally posted by Nodrog
Also, make sure you get o Reilly - Programming Perl when youve finished the book youve currently got!
Erm. Bit heavy for a beginner dont you think Nod? Id go for nutshell or the cookbook next..
__________________
#linux : Home of Genius

<idimmu> ok i was chained to a desk with this oriental dude
MT is offline   Reply With Quote
Unread 7 Jan 2003, 20:08   #13
Jester
Pedantic hypocrite
 
Jester's Avatar
 
Join Date: Jan 2001
Location: Back and to the left
Posts: 1,488
Jester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond repute
Quote:
Originally posted by MT
Erm. Bit heavy for a beginner dont you think Nod? Id go for nutshell or the cookbook next..
Not at all. I went from some introductory coursework to the Camel. It carries an excellent introduction to Perl and while it does have a somewhat steep learning curve, I find that to be a bonus.

Jester
__________________
I always wanted to be a dancer, but I could never get the shit off my shoes
.......
Jester is offline   Reply With Quote
Unread 8 Jan 2003, 02:51   #14
MT
/dev/zero
Retired Mod
 
MT's Avatar
 
Join Date: May 2000
Posts: 415
MT is an unknown quantity at this point
Quote:
Originally posted by Jester667
Not at all. I went from some introductory coursework to the Camel. It carries an excellent introduction to Perl and while it does have a somewhat steep learning curve, I find that to be a bonus.

Jester
you program tho.
__________________
#linux : Home of Genius

<idimmu> ok i was chained to a desk with this oriental dude
MT is offline   Reply With Quote
Unread 8 Jan 2003, 18:02   #15
W
Gubbish
 
Join Date: Sep 2000
Location: #FoW
Posts: 2,323
W is a jewel in the roughW is a jewel in the roughW is a jewel in the rough
If you gonna code an irc bot from scratch in perl, you really should have a look at POE. There's an POE irc component that makes it pretty easy, and it's a nice framework for testing your perl skills without having to work with your socket or protocol skills at the same time.
__________________
Gubble gubble gubble gubble
W is offline   Reply With Quote
Reply



Forum Jump


All times are GMT +1. The time now is 12:58.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2018