17 Mar, 2009, Scandum wrote in the 61st comment:
Votes: 0
kingdomsofahln.com:7777 joined the club.

I uploaded an update to mth (v1.2) that adds broken packet patching and a function to automatically parse the telnet table and send out support announcements.

It's available here: http://www.mudbytes.net/index.php?a=file...

I'll look into plug 'n play do will don't won't support for the next release.
17 Mar, 2009, David Haley wrote in the 62nd comment:
Votes: 0
cat_sprintf(buffer, "%c%s%c%s", MSSP_VAR, "CODEBASE", MSSP_VAL, "MTP 1.0");
cat_sprintf(buffer, "%c%s%c%s", MSSP_VAR, "CONTACT", MSSP_VAL, "pumpkin@bubba.com");
cat_sprintf(buffer, "%c%s%c%s", MSSP_VAR, "CREATED", MSSP_VAL, "2009");
cat_sprintf(buffer, "%c%s%c%s", MSSP_VAR, "FAMILY", MSSP_VAL, "DikuMUD");

It's unfortunate that you didn't take Elanthis's advice into consideration. That's just one example of nasty stuff in that snippet :sad:

BTW I still don't understand why you consider that stuff more legible than the very simple state machine implementation. (Considering that telnet is a, um, state machine protocol.)
17 Mar, 2009, Scandum wrote in the 63rd comment:
Votes: 0
Looks perfectly fine to me, just need to watch that you correctly use %s or %d.

I'm also not calling it less legible, it's just a different kind of implementation. A simple state machine takes at least twice the amount of lines of code to do the exact same thing.
17 Mar, 2009, David Haley wrote in the 64th comment:
Votes: 0
Have you tested it against sending characters one byte at a time?
17 Mar, 2009, Scandum wrote in the 65th comment:
Votes: 0
Just as a fragmented packet, when executing ./mth - but one byte at a time with a slight improvement to the debugger:
– sending IAC DO MSSP as a broken packet:

D0@internal RCVD IAC ?
D0@internal RCVD IAC DO ?
D0@internal RCVD IAC DO MSSP
17 Mar, 2009, Scandum wrote in the 66th comment:
Votes: 0
The tintin crawler now automatically sets the numeric IP if the server gives a blank IP value or omits it.
18 Mar, 2009, Cratylus wrote in the 67th comment:
Votes: 0
The TMC thread gave me occasion to review the MSSP keys and values and I
noticed there's nothing much along the lines of roleplaying types. I find roleplaying
gross myself, but for some people it's important.

What kinds of stuff do RPers look for in a listing? The MSSP keys seem to
focus pretty tightly on Dikurivative games…what do MUSHers, MOOers
(are there any?), etc look for?

-Crat
http://lpmuds.net
18 Mar, 2009, quixadhal wrote in the 68th comment:
Votes: 0
Scandum said:
Looks perfectly fine to me, just need to watch that you correctly use %s or %d.

I'm also not calling it less legible, it's just a different kind of implementation. A simple state machine takes at least twice the amount of lines of code to do the exact same thing.


You serious think
Quote
cat_sprintf(buffer, "%c%s%c%s", MSSP_VAR, "CONTACT", MSSP_VAL, "pumpkin@bubba.com");

is just as legible as
Quote
mssp_str("CONTACT", "pumpkin@bubba.com");

Seriously???? Oh well.

I really don't think ANYONE cares how many lines of code something takes, as long as it works and doesn't have to be fiddled with. This isn't 1992, and if a properly written module takes 50K of RAM vs. 10K for a poorly written one…. I think I can spare the extra 40K out of the 3GB I have installed. I suspect most others wouldn't have a problem with it either.

I'm not saying your approach doesn't work properly, BTW. I'm just saying that not using a state machine because it takes a bit more code is a silly reason. The whole point of this is to make it dead simple for people to just drop this into their code with a minimal amount of fuss. If they already have a fully working telnet state machine, this just requires they add states to handle the new opcodes. If they don't, hacking their code to put a proper state machine (which could be provided!) is not that much harder than hacking it to add more duct tape and chicken wire.
18 Mar, 2009, kiasyn wrote in the 69th comment:
Votes: 0
I entirely agree with what quixadhal says. But I also want to be silly and say this;

quixadhal said:
You serious think
Quote
cat_sprintf(buffer, "%c%s%c%s", MSSP_VAR, "CONTACT", MSSP_VAL, "pumpkin@bubba.com");

is just as legible as
Quote
mssp_str("CONTACT", "pumpkin@bubba.com");


#define mssp_str(var,val) cat_sprintf( buffer, "%c%s%c%s", MSSP_VAR, (var), MSSP_VAL, (val) )


wooo, go state machines.
18 Mar, 2009, Scandum wrote in the 70th comment:
Votes: 0
quixadhal said:
I really don't think ANYONE cares how many lines of code something takes, as long as it works and doesn't have to be fiddled with. This isn't 1992, and if a properly written module takes 50K of RAM vs. 10K for a poorly written one…. I think I can spare the extra 40K out of the 3GB I have installed. I suspect most others wouldn't have a problem with it either.

Most people like to know what they add, so someone might add a 700 line snippet while shying away from a 3000 line one.

It's hard to say what people want, so choice is always good. I wrote the snippet primarily to give people an easier time adding MSSP, if you add MSSP to libtelnet I'll link it, I honestly don't care, as long as it works.

Update: Prettied up the crawler page, and removed the tintin header that, thinking back on it, really had no business there.
18 Mar, 2009, elanthis wrote in the 71st comment:
Votes: 0
Smaller code is not "easier to know" code. If it was then the easiest code to read would be found in IOCCC entries.

p.s. Your NAWS handling is broken. The * 255 should be * 256, or even better, << 8.

p.p.s. What's with all the != IAC checks in the NAWS code? I can't even begin to figure out what that is supposed to accomplish.

p.p.p.s. mth's core code files (tables.c and telopt.c) are actually LARGER than libtelnet even though mth has absolutely no meaningful comments, not even where they're sorely needed, like say a description of your interpreter algorithm.

/* my code for calculating the steering coefficient for an autonymous AI-controlled vehicle.
* it only handles circular track environments of a specific diameter, but it's a lot smaller and easier
* to understand than that 4000 line monster the nerds in the AI lab cooked up. who cares if theirs
* can navigate arbitrary environments, everyone knows that the test course is just a race track.
* – Coder Master 2005-09-23
*
* I can't figure out why the constant .7 is used. Mr. Master didn't document this at all and he's not
* with the company any more! what diameter track was this supposed to work on? I can't figure out
* what's going on here. anyone else working on this code that can explain it to me?
* – New Guy 2009-03-17
*/
double steercoef (void) {
return 0.7;
}
18 Mar, 2009, Grimble wrote in the 72nd comment:
Votes: 0
Cratylus said:
What kinds of stuff do RPers look for in a listing? The MSSP keys seem to
focus pretty tightly on Dikurivative games…what do MUSHers, MOOers
(are there any?), etc look for?

Maybe look at the descriptions for games like Castle Marrach (sp?) and see if anything pops out. Things like "mystery", "space opera", and "high fantasy" tend to imply role-playing variants, at least to me.
18 Mar, 2009, Scandum wrote in the 73rd comment:
Votes: 0
elanthis said:
p.s. Your NAWS handling is broken. The * 255 should be * 256, or even better, << 8.

p.p.s. What's with all the != IAC checks in the NAWS code? I can't even begin to figure out what that is supposed to accomplish.

Fixed the 255 thing, thanks. The way NAWS works a screenwidth of 255 would be printed as IAC IAC. My code supports any screenwidth except those containing 255, it's a bit lazy, mainly because in practice nobody gets anywhere close to a 255 screen width.

Is David going to haunt me now till I fix it? :cry:

elanthis said:
p.p.p.s. mth's core code files (tables.c and telopt.c) are actually LARGER than libtelnet even though mth has absolutely no meaningful comments, not even where they're sorely needed, like say a description of your interpreter algorithm.

Most of the content of tables.c is likely in a header file in your implementation, and my programming style seems a bit more spacious, aside from the comments. Guess we can do a line count once you're finished.
18 Mar, 2009, David Haley wrote in the 74th comment:
Votes: 0
Scandum, it's just that you make such a fuss about "elite" programming, and so on, and then you go out implementing code that is wrong but unlikely to break in the near future. It's kind of like somebody who willingly uses bad bitwise math because, well, in practice everybody has 16-bit ints…

Scandum said:
Most of the content of tables.c is likely in a header file in your implementation, and my programming style seems a bit more spacious, aside from the comments. Guess we can do a line count once you're finished.

It has little to do with line counts. Elanthis's code reuses routines intelligently; yours repeats things when it's unnecessary. For instance, you have several functions whose only purpose in life is to send the string "yes I'll do features XYZ", instead of having a common function that takes XYZ as a parameter.
18 Mar, 2009, Scandum wrote in the 75th comment:
Votes: 0
What can I say, I guess I'm lazy when it comes to implementing things that are unneeded.

And yes, those functions are obsolete now with the announce_support function.
18 Mar, 2009, Cratylus wrote in the 76th comment:
Votes: 0
Scandum said:
What can I say, I guess I'm lazy when it comes to implementing things that are unneeded.


I'm afraid I cannot agree with this.

;)
18 Mar, 2009, Scandum wrote in the 77th comment:
Votes: 0
Cratylus said:
Scandum said:
What can I say, I guess I'm lazy when it comes to implementing things that are unneeded.

I'm afraid I cannot agree with this.

You think I'm not lazy? How nice of you.

MTH wise I thinkered for some minutes and wrote a pretty elegant telnet compliant NAWS parser.

I updated my MSSP crawler to sort the INTERMUD result as a FILO list and printing it comma separated most important value first.

I noticed only a few issues with the listing: Azereth provides a 16x16 icon while the spec asks for 32x32. I think it's important to get this right because zmud uses 32x32 icons.

Also the WORLD variable should be set to 1 for most Muds out there. The value 0 should be used for muds with no notable Virtual world, and the way I envisioned things it could be set to higher values for time travel and plane shifting muds.
18 Mar, 2009, Zeno wrote in the 78th comment:
Votes: 0
I still don't understand world. Okay, so like Smaug should be 1.

But if my MUD has 2 time eras you can travel between, is that 2 worlds?
18 Mar, 2009, Scandum wrote in the 79th comment:
Votes: 0
Zeno said:
But if my MUD has 2 time eras you can travel between, is that 2 worlds?

If they're implemented as two entirely different worlds, definitely. If they're part of a generic theme like the two planes in Bleach you could think of it as still the same universe

Perhaps the variable should be dropped? The idea was mainly to give timetravel muds some kind of variable to make up for the inflexible categorization, but having given it more thought timetravel becomes the subgenre in those cases. And if you properly implement two different worlds you basically have two muds.

If everyone is okay with it I'll drop the variable from the spec.
18 Mar, 2009, Zeno wrote in the 80th comment:
Votes: 0
So I do pretty much have 2 worlds then. But I don't really care about mentioning that or not.

I'd drop it, unless someone else out there wants to speak up of how they find it useful for their MUD.
60.0/292