Home | Networks | Community | Need Help? 

 
 Quick search

 
 
 RegisterRegister   Log inLog in 

Can it be done?
Goto page 1, 2, 3, 4  Next
 
Post new topic   Reply to topic    SearchIRC Forum Index -> Chat
Author Message
W-Unit
Newbie
Newbie


Joined: 29 Jul 2004
Posts: 83

PostPosted: Oct 16, 2004 8:18am    Post subject: Can it be done? Reply with quote

Since I am having NO LUCK in programming C or C++ on my Windows computer (absolutely refuses to compile), do you think it would be possible to code an IRCd in C# or Perl and if not, why?
Back to top
EviL_SmUrF
Lurker
Lurker


Joined: 23 Feb 2004
Posts: 219

PostPosted: Oct 16, 2004 9:34am    Post subject: Reply with quote

anything is possible. ive seen ircd's coded in mirc script.

however the question you need to be asking is, "is it worthit?"
Back to top
upinsmoke
Newbie
Newbie


Joined: 01 Mar 2004
Posts: 59
Location: pennsylvania

PostPosted: Oct 16, 2004 3:47pm    Post subject: Reply with quote

http://sourceforge.net/projects/pircd/ an ircd written in perl

http://cvs.sourceforge.net/viewcvs.py/waveircd/v0.1/ the start of an ircd written in php
Back to top
katsklaw
Guru
Guru


Joined: 28 Jun 2004
Posts: 1614
Location: Somewhere you're not.

PostPosted: Oct 16, 2004 4:02pm    Post subject: Re: Can it be done? Reply with quote

W-Unit wrote:
do you think it would be possible to code an IRCd in C# or Perl and if not, why?


If you have to ask this question, then it's obvious that you don't know enough about these languages either.
Back to top
W-Unit
Newbie
Newbie


Joined: 29 Jul 2004
Posts: 83

PostPosted: Oct 17, 2004 12:40pm    Post subject: Re: Can it be done? Reply with quote

katsklaw wrote:
If you have to ask this question, then it's obvious that you don't know enough about these languages either.


Heh. I knew that from the beginning, but this is how you learn, no?
I know I can at least get it started, and from there I will ask on perlmonks.com when I need help.

I was just wondering if there was any specific reason that I couldn't find an IRCd coded in anything but C, save a couple that were C++. Other than that, I couldn't find any other languages.
Back to top
chrishogben
Lurker
Lurker


Joined: 09 Sep 2003
Posts: 216
Location: UK

PostPosted: Oct 17, 2004 2:19pm    Post subject: Reply with quote

Wow, someone managed to dig up my old project of WaveIRCD. I would just like to say, that after some memory tests with PHP, it has been decided that it is simply not worth it.

For every client that connects, another 4KB of memory is used by PHP, but never freed, therefore eventually PHP will crash from memory exahaustion.

But yes, If you do have the tools, and the persiverence, anything is possible. Smile
Back to top
katsklaw
Guru
Guru


Joined: 28 Jun 2004
Posts: 1614
Location: Somewhere you're not.

PostPosted: Oct 17, 2004 2:23pm    Post subject: Re: Can it be done? Reply with quote

W-Unit wrote:
katsklaw wrote:
If you have to ask this question, then it's obvious that you don't know enough about these languages either.


Heh. I knew that from the beginning, but this is how you learn, no?
I know I can at least get it started, and from there I will ask on perlmonks.com when I need help.

I was just wondering if there was any specific reason that I couldn't find an IRCd coded in anything but C, save a couple that were C++. Other than that, I couldn't find any other languages.


Then go for it Smile
Back to top
w00t
Eleet
Eleet


Joined: 09 Jun 2004
Posts: 698
Location: Nowra, Australia

PostPosted: Oct 17, 2004 10:20pm    Post subject: Reply with quote

chrishogben wrote:
For every client that connects, another 4KB of memory is used by PHP, but never freed, therefore eventually PHP will crash from memory exahaustion.


Were you using the standard fsock stuff?
Back to top
aquanight
Lurker
Lurker


Joined: 14 Jun 2004
Posts: 116
Location: Boise, ID

PostPosted: Oct 17, 2004 10:28pm    Post subject: Re: Can it be done? Reply with quote

W-Unit wrote:
I was just wondering if there was any specific reason that I couldn't find an IRCd coded in anything but C, save a couple that were C++. Other than that, I couldn't find any other languages.


w00t found a (crappy) VB IRCd. Razz Google "site:sourceforge.net fastvbircd"
Back to top
w00t
Eleet
Eleet


Joined: 09 Jun 2004
Posts: 698
Location: Nowra, Australia

PostPosted: Oct 17, 2004 11:54pm    Post subject: Reply with quote

And made it much better, hopefully... one of these days, i had really better try get it finished :p
Back to top
EviL_SmUrF
Lurker
Lurker


Joined: 23 Feb 2004
Posts: 219

PostPosted: Oct 17, 2004 11:54pm    Post subject: Reply with quote

yeah, i know the guy who coded vbircd. use to talk to him all the time :p

its actually quite interesting
Back to top
Snerf
Newbie
Newbie


Joined: 15 Sep 2004
Posts: 76
Location: IRC

PostPosted: Nov 23, 2004 4:56pm    Post subject: Reply with quote

Writing an IRCd in C# would be rather interesting to do.

Since the Mono Project is going rather well, and as long as you dont want to run WinForms, the code should run Cross Platform.

Of course, writing an IRCd to begin with, is no easy task. But I am sure someone would have some fun coding it.

my 2cents
Back to top
codemastr
Idler
Idler


Joined: 05 Feb 2004
Posts: 345

PostPosted: Nov 23, 2004 10:22pm    Post subject: Reply with quote

Quote:
I was just wondering if there was any specific reason that I couldn't find an IRCd coded in anything but C, save a couple that were C++. Other than that, I couldn't find any other languages.


There are two main reasons for this. First, the original IRCd was written in the 1980s. Back then there was no C# or even a standard C++. The only powerful language you had that could do the stuff necessary for an IRCd was C. Today, most IRCds out there are still based on this original. Probably 80+% of the code is different, but it was originally based off of it, so it is still in C.

The second reason is performance. Yes, you can write an IRCd in Perl, in PHP, in VB, or in most any other language. But, it might be significantly slower. Out of all high-level languages out there, C is the fastest. So when you want to serve thousands and thousands of clients, it makes sense. C++ is not quite as fast as C, but it is close, and it also provides several other benefits that make it significantly easier to use, so some chose C++. Plus, the close relationship between C and C++ makes switching very easy. Things like Java or C# are also good choices, but they are generally slower. Java uses byte code and C# uses CIL, this will, most of the time, make them slower. But, they provide significantly safer code which, with today's fast machines, is often more valuable than speed.

In short, making an IRCd in C# would be fine. Perl would probably be borderline. It is an interpreted language, but the way it works makes it OK for an IRCd (hybrid language implementation). But something like PHP, I wouldn't recommend that.
Back to top
W-Unit
Newbie
Newbie


Joined: 29 Jul 2004
Posts: 83

PostPosted: Nov 26, 2004 9:58am    Post subject: Reply with quote

I don't know much about other languages, but isn't PHP intended primarily for programming web sites? It seems pointless to me to try to program an IRCd in something like that.

While we're on the topic, I've heard people say that PHP is similar to the mIRC programming language. If there's any truth to that then its going to waste a lot of space, even if it didn't cause memory crashes.
Back to top
codemastr
Idler
Idler


Joined: 05 Feb 2004
Posts: 345

PostPosted: Nov 26, 2004 12:53pm    Post subject: Reply with quote

Quote:
I don't know much about other languages, but isn't PHP intended primarily for programming web sites? It seems pointless to me to try to program an IRCd in something like that.

Yeah, well Perl was designed for, as it's name says "practical extraction and reporting" not making an IRCd. But, languages evolve. PHP is used in much more than just websites now.

Quote:
While we're on the topic, I've heard people say that PHP is similar to the mIRC programming language. If there's any truth to that then its going to waste a lot of space, even if it didn't cause memory crashes.

Umm, there is absolutely NO relation between the two. Anyone who says that has never even seen PHP. PHP is an object oriented language based on the Zend scripting engine. mIRC script is an imperative language based on a custom script engine. PHP and mIRC are no more similar than Perl and C. The syntax might be a bit the same, but the languages are completely different.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    SearchIRC Forum Index -> Chat All times are GMT - 6 Hours
Goto page 1, 2, 3, 4  Next
Page 1 of 4

 
 
Forum powered by phpBB
 
 © 2000 - 2008 EverythingIRC, Inc. All rights reserved. Please read our disclaimer