PDA

View Full Version : C++ IRC Bot



solarwind
May 7th, 2008, 03:37 AM
Hey all, does anyone know of a c++ IRC bot other than bobot++ (it's horribly written)? Or a framework. I'm trying to make one and I don't want to start from scratch.

Kadrus
May 7th, 2008, 08:50 AM
mm..I suggest creating an IRC bot using Perl...Link (http://wholok.com/irc/)

solarwind
May 7th, 2008, 09:44 PM
I need to do it in C++

Wybiral
May 8th, 2008, 12:57 AM
I need to do it in C++

Why?

LaRoza
May 8th, 2008, 02:13 AM
I need to do it in C++

"need"? Homework?

solarwind
May 8th, 2008, 02:31 AM
"need"? Homework?

That sounds like a very ignorant assumption. I do not take computer science class. I need to do it in c++ because I want to. I like it. Also because I feel that C++ has very little overhead compared to most other interpreted languages and that it's better suited for this job. Also, I like c++, did I mention that?

LaRoza
May 8th, 2008, 02:48 AM
That sounds like a very ignorant assumption. I do not take computer science class. I need to do it in c++ because I want to. I like it. Also because I feel that C++ has very little overhead compared to most other interpreted languages and that it's better suited for this job. Also, I like c++, did I mention that?

Does it sound ignorant? Or does it sound like I have seen too many homework questions on this forum?

I was asking, not accusing. If you want to accuse me of being ignorant, at least have evidence of it.

Homework questions would have been moved if I were to believe it to be homework.

If you want to do it in C++, you don't "need". C++ may have less overhead, but development time will be substantially increased. Whose time is more important, yours or a processors? There is nothing wrong with doing it in C++, it is your choice, however, without clarification of why you "needed" to do it in C++, I doubt anyone would answer.

Note I wasn't the first one to suspect something afoot, perhaps he is ignorant too?

solarwind
May 8th, 2008, 03:12 AM
Perhaps.


If you want to do it in C++, you don't "need". C++ may have less overhead, but development time will be substantially increased. Whose time is more important, yours or a processors?

Processor's.

LaRoza
May 8th, 2008, 03:17 AM
Processor's.
This may help: http://www.governmentsecurity.org/archive/t10881.html

It gives advise which may help also. It seems to use C or C++.

As for the processor's time being more important, I doubt the CPU will be the bottleneck.

solarwind
May 8th, 2008, 03:21 AM
This may help: http://www.governmentsecurity.org/archive/t10881.html

It gives advise which may help also. It seems to use C or C++.

As for the processor's time being more important, I doubt the CPU will be the bottleneck.

Thanks. I appreciate you searching that up for me. However, prior to posting, I did a lot of research and came across many sites (including that one) which were no use to me. The best I could find was bobot++, a poorly written c++ fork of bobot. It's horribly written. I'd fix it up, but I'd much rather be writing my own custom stuff and use a framework.

I see your point about the CPU being the bottleneck. I do agree, but I'd much rather have a native application than having to fire up a vm to interpret my code. Also, this stuff will be running on BSD machines that do not have perl, python or java. Trust me, my best languages are Java and Python. For this kind of stuff, I would generally use Python and Java, but in this case, I'd much rather do it in c++ anyway.

LaRoza
May 8th, 2008, 03:24 AM
Thanks. I appreciate you searching that up for me. However, prior to posting, I did a lot of research and came across many sites (including that one) which were no use to me. The best I could find was bobot++, a poorly written c++ fork of bobot. It's horribly written. I'd fix it up, but I'd much rather be writing my own custom stuff and use a framework.

I doubt I could find anything more that would be useful.

If the existing frameworks are not usable, it would seem the best solution is to write your own.

Using bobot and its fork as examples, perhaps you could write something even better.

I found this, in C: http://www.dryfish.org/cbot/download.html

solarwind
May 8th, 2008, 03:29 AM
I doubt I could find anything more that would be useful.

If the existing frameworks are not usable, it would seem the best solution is to write your own.

Using bobot and its fork as examples, perhaps you could write something even better.

I found this, in C: http://www.dryfish.org/cbot/download.html

Thanks. I came across that earlier as well. Thanks again!

Wybiral
May 8th, 2008, 04:25 AM
Also because I feel that C++ has very little overhead compared to most other interpreted languages and that it's better suited for this job.

Why not use C? It has even less overhead than C++. But, you do know that the bottleneck in this program will be the network, which has nothing to do with the language... Right? What makes C++ more suited for this job than, say, Python/Lisp/Ruby/Perl? C++ has terrible facilities for handling strings and built-in support for parsing data, etc... The things that would make a language "suited" for an IRC bot.

But, you'll see... Have fun! (some people live for pain)

solarwind
May 8th, 2008, 04:36 AM
Why not use C? It has even less overhead than C++. But, you do know that the bottleneck in this program will be the network, which has nothing to do with the language... Right? What makes C++ more suited for this job than, say, Python/Lisp/Ruby/Perl? C++ has terrible facilities for handling strings and built-in support for parsing data, etc... The things that would make a language "suited" for an IRC bot.

But, you'll see... Have fun! (some people live for pain)

I'll be sure to keep your prophecy in mind when I'm writhing in pain writing C++ code, mighty Dumbledore.

ZylGadis
May 8th, 2008, 04:40 AM
That sounds like a very ignorant assumption. I do not take computer science class. I need to do it in c++ because I want to. I like it. Also because I feel that C++ has very little overhead compared to most other interpreted languages and that it's better suited for this job. Also, I like c++, did I mention that?

C++ is not an interpreted language. Besides, given your priorities, I'd use machine code (in hex, because I think binary is too low level).

Wybiral
May 8th, 2008, 04:53 AM
I'll be sure to keep your prophecy in mind when I'm writhing in pain writing C++ code, mighty Dumbledore.

Well, I'm sure it doesn't seem painful when that's all you know, just like I'm sure higher-level languages seem pointless right now. Read (http://www.paulgraham.com/avg.html).

solarwind
May 8th, 2008, 05:23 AM
C++ is not an interpreted language. Besides, given your priorities, I'd use machine code (in hex, because I think binary is too low level).

Haha! I see what you did there! Funny man!

solarwind
May 8th, 2008, 05:24 AM
Well, I'm sure it doesn't seem painful when that's all you know, just like I'm sure higher-level languages seem pointless right now. Read (http://www.paulgraham.com/avg.html).

Well, I know C, C++, Java, Python, PHP, PIC micro assembler, 8086 assembler, so... I know what I'm doing...

Whatever, this thread is getting pointless. People like to argue about stupid things, even if they haven't the slightest clue on what they're talking about. I will find my way. I give thanks to all who humbly tried to answer, without posting wise a$$ remarks (I'm looking at you, ZylGadis, it's not cool, you phale). I'm half way done writing a bot in c++. Thanks again!

Over and out.

Wybiral
May 8th, 2008, 05:35 AM
People like to argue about stupid things, even if they haven't the slightest clue on what they're talking about.

Yes, they sure do.

(did you see what I did there?)

Wybiral
May 8th, 2008, 05:42 AM
Well, I know C, C++, Java, Python, PHP, PIC micro assembler, 8086 assembler, so... I know what I'm doing...

So, of course, you know that something as trivial as an IRC bot could be written in a few lines of Python or Lisp code? Doing it in C++ when you could do it in Python seems like a terrible waste of typing time.

LaRoza
May 8th, 2008, 06:11 AM
So, of course, you know that something as trivial as an IRC bot could be written in a few lines of Python or Lisp code? Doing it in C++ when you could do it in Python seems like a terrible waste of typing time.

I think the earlier post of the OP stating that the machine this is going to run on explains the reason for C++ (or any compiled language I imagine).

slavik
May 8th, 2008, 06:13 AM
Does it sound ignorant? Or does it sound like I have seen too many homework questions on this forum?

I was asking, not accusing. If you want to accuse me of being ignorant, at least have evidence of it.

Homework questions would have been moved if I were to believe it to be homework.

If you want to do it in C++, you don't "need". C++ may have less overhead, but development time will be substantially increased. Whose time is more important, yours or a processors? There is nothing wrong with doing it in C++, it is your choice, however, without clarification of why you "needed" to do it in C++, I doubt anyone would answer.

Note I wasn't the first one to suspect something afoot, perhaps he is ignorant too?

to extend this a bit:
1. LaRoza, you killed JFK and Lincoln!!! :P
2. Writing an IRC bot in a language that is better suited for text processing (Perl, Ruby, Python, many others) would be simpler than C++ (depending on what you need the bot to actually do).

(NOTE: PRP = "Perl, Ruby, Python")

extending #2:
connecting to a computer in PRP will take 5 lines, in C++ (like in C) 30.
if you want to do any kind of a response to a loosely worded question you will need to use a regex, meaning PRP is simpler.

There is nothing wrong with C++ and if you continue on with using C++, you will learn a lot about the system and even appreciate PRP should you move on to them.

but in one sentece, my point is "you win either way." :)

Wybiral
May 8th, 2008, 06:20 AM
I think the earlier post of the OP stating that the machine this is going to run on explains the reason for C++ (or any compiled language I imagine).

Yeah, it was post #6 that I was responding to (where it wasn't so clear that it was for a special machine, mostly by phrases like "I like C++" that make my head explode a little).

slavik
May 8th, 2008, 06:23 AM
Yeah, it was post #6 that I was responding to (where it wasn't so clear that it was for a special machine, mostly by phrases like "I like C++" that make my head explode a little).

NASA has had probes which ran on interpreted code (I don't remember what language this was) (it was lost because one of the variables in a comparison was misspelled).

Wybiral
May 8th, 2008, 06:25 AM
NASA has had probes which ran on interpreted code (I don't remember what language this was) (it was lost because one of the variables in a comparison was misspelled).

lol, so NASA doesn't use unit tests?

slavik
May 8th, 2008, 06:26 AM
lol, so NASA doesn't use unit tests?
this was way back in the day ... 80s or such I think.

EDIT:
I was incorrect, it was in the 60s, and they used FORTRAN, here's the wikipedia link: http://en.wikipedia.org/wiki/Mariner_1

LaRoza
May 8th, 2008, 06:49 AM
NASA has had probes which ran on interpreted code (I don't remember what language this was) (it was lost because one of the variables in a comparison was misspelled).

Ada has resulted in the destruction of very expensive hardware, and Lisp has allowed the success of a mission.



An even more impressive instance of remote debugging occurred on NASA's 1998 Deep Space 1 mission. A half year after the space craft launched, a bit of Lisp code was going to control the spacecraft for two days while conducting a sequence of experiments. Unfortunately, a subtle race condition in the code had escaped detection during ground testing and was already in space. When the bug manifested in the wild--100 million miles away from Earth--the team was able to diagnose and fix the running code, allowing the experiments to complete.14 One of the programmers described it as follows:
Debugging a program running on a $100M piece of hardware that is 100 million miles away is an interesting experience. Having a read-eval-print loop running on the spacecraft proved invaluable in finding and fixing the problem.

WitchCraft
March 4th, 2010, 02:36 PM
Ada has resulted in the destruction of very expensive hardware, and Lisp has allowed the success of a mission.

No, Ada wasn't the fault, the fault was that the ballistic data was not updated for Arianne5, it used the Arianne4 data...
Would have resulted in the same catastrophe if LISP was used, unless LISP's errors would have compensated for the garbage data.

WitchCraft
March 4th, 2010, 02:39 PM
lol, so NASA doesn't use unit tests?

I can safely say this: NASA does.
But the *censored* ESA management decided that they needed to safe money, since Arianne5 was too expensive.
Oh and BTW, the management wasn't the entity being fired for this...

cariboo
March 4th, 2010, 10:25 PM
This thread is 2 years old, there is no need to reopen it. If you want to comment on the subject please start a new thread. Closed.