Armageddon General Discussion Board

General => Code Discussion => Topic started by: MorganChaos on January 24, 2006, 07:21:22 PM

Title: quick question
Post by: MorganChaos on January 24, 2006, 07:21:22 PM
I tried a search on this but couldn't find it. What code is arm written in? Like, the language? And is it anywhere close to Java? It's just that recently I've been thinking abotu the code and I'm wondering how off my mindset is for it.

(also considering creating her own MUD in Java, but that's another topic altogether.)
Title: quick question
Post by: Moofassa on January 24, 2006, 07:24:24 PM
I believe it's C++, or that's what I would guess, it's what I would use.
Title: quick question
Post by: amoeba on January 24, 2006, 07:36:01 PM
The codebase is Diku I believe.  C based. Look here for more info: http://www.dikumud.com/family.aspx
Title: quick question
Post by: Xygax on January 24, 2006, 07:40:27 PM
No, it's all K&R-style C-code (though we don't use the old-school parameter definition style, thankfully).

Because ginka's C-compiler is relatively old, we do not have the luxury of late-declaring variables (C-99), and our usage of C++ is limited to a very few modules which mostly have made use of it at this point as a proof-of-concept or proof-of-technology, if you like.

Over the last couple of years, though, I have done a lot of work resolving bugs/syntax errors in preparation for an eventual shift to C++.  If you have it in your head that "C++ is a superset of C", you're wrong:  I have had to change something like 7,000 lines of code to support C++ while still building cleanly with our current compiler (we build without warnings on both Ginka's old C compiler and gcc-3.4 (using both gcc and g++ compilers).  Eventually, when ginka is ready for an OS upgrade, we'll shift to using C++ more (that is, we'll build exclusively with a C++ compiler, and in a staged fashion begin to roll in C++ concepts like classes, templates, etc. -- best of all, std::string).  The OS upgrade is required because gcc-3.4 is not binary (ABI) compatible with our older libraries.

Likely, though, the code will never look anything like Java (which is different from JavaScript, which is what most of our newer interactive scripts are written in).  I'm not a huge fan of Java, and especially not of its extreme verbosity.  I like to be able to convey my intent in a line of code without a lot of conversions and machination.

-- X
Title: quick question
Post by: Xygax on January 24, 2006, 07:46:24 PM
Oh, it's worth mentioning that a lot of the administrative/building/external tools we use to administer the mud, maintain its history and documentation, and collaborate with one another are written in other languages entirely; php, perl, etc.
Title: quick question
Post by: Tamarin on January 24, 2006, 08:21:33 PM
Switching...to C++...

I just had an instant nightmare.  Of ginka exploding in a burst of fiery brimstone and stray bits of code.  I hope you guys know what you're doing.  I'm sure you do.  I hope.  Oy.
Title: quick question
Post by: Agent_137 on January 24, 2006, 08:29:24 PM
Damn. I knew it was bad, but I didn't know it was that bad.

good luck, have fun.
Title: quick question
Post by: MorganChaos on January 24, 2006, 09:33:36 PM
Okay...I've kinda understood that C++ is similar to Java, that if you know one you'll have little trouble with the other. Am I incorrect?

Personally, I kinda like how Java works. Yeah, conversions can get a little annoying, but code is clearer, or seems that way to me, than in other languages I've looked at code for. (This, granted, is limited...brief snatches here and there, and I had little to do with programming a robot in what I thought was C, but I think now was probably C++. I could find out.)
Title: quick question
Post by: Aldiel on January 25, 2006, 12:42:10 AM
Quote from: "MorganChaos"(also considering creating her own MUD in Java, but that's another topic altogether.)

Go climb into a box and wait a few weeks.  Creating your own MUD is -not- easy.  It seems like a fun idea now, but do you have the stamina to be building and coding ten years from now?  I've tried, but, lucky, in the midst of it,  I found Armageddon, which already had everything I wanted.

If you can't beat 'em, join 'em.   :wink:
Title: quick question
Post by: James de Monet on January 25, 2006, 01:59:08 AM
Quote from: "Aldiel"If you can't beat 'em, join 'em.   :wink:

Or, more appropriately to the topic at hand:

if(beatThem>0)
{
 joinThem = 0;
}
else
{
 joinThem++;
}
Title: quick question
Post by: Jarod550 on January 25, 2006, 02:14:37 AM
Quote from: "James de Monet"
Quote from: "Aldiel"If you can't beat 'em, join 'em.   :wink:

Or, more appropriately to the topic at hand:

if(beatThem>0)
{
 joinThem = 0;
}
else
{
 joinThem++;
}

James you just rated a 500 on my dork-o-meter with that joke...

Meh,

Jarod
Title: quick question
Post by: Agent_137 on January 25, 2006, 03:29:43 AM
lawl cl_utch 1, james.
Title: quick question
Post by: MorganChaos on January 26, 2006, 12:27:20 AM
Quote from: "Aldiel"Go climb into a box and wait a few weeks.  Creating your own MUD is -not- easy.  It seems like a fun idea now, but do you have the stamina to be building and coding ten years from now?  I've tried, but, lucky, in the midst of it,  I found Armageddon, which already had everything I wanted.

If you can't beat 'em, join 'em.   :wink:

Yeah, the more I think, the bigger an undertaking it seems. But it'd make a good hobby, no?
Title: quick question
Post by: Nusku on January 26, 2006, 02:19:46 AM
Quote from: "Thunder Lord"
Quote from: "Xygax"best of all, std::string

That sounds dangerious. Good thing I am not allergic to Latex.

But are you allergic to LaTeX?