Re: [NEWBIE] Stacking

From: George Greer (greerga@circlemud.org)
Date: 04/06/99


On Wed, 7 Apr 1999, Starfleet MUD97 wrote:

>1. write_to_output *drumm*rolls* yes, what business has a function
>fiddling around with my text I'm passing to it, it should do what it's
>supposed to and write_to_output as _I_ send it (no nannying me).

That's what layers are supposed to do, fiddle with the text to make it
displayable.

>Maybe I've been taught to heavily in network and computer system designs
>about layering, but it seems to me that the responsibility of the data in
>the output is that of the function generating it, not the function used
>to transport it.  And it can also be said in the same breath, what if I
>don't want some data stacked this way...

All depends on the use.  Color codes for instance are handled by the
third-party patches in a manner that relieves the output to something else.
The current socket code even takes care of buffering, formatting, snooping,
and prompts.  If you were doing lowlevel stuff, perhaps, but it's a whole
lot easier on yourself later if you abtract these things where they belong
instead of making every function call "intelligent."  Then later you have
to change every single "intelligent" function when you change behavior.

>2. isn't this just a touch inefficeint, the only analogy I can think of
>right now (4:20am) is it's like purifying a whole resevoirs worth of
>water, to find out you only need a glass full.  You generate all this data
>to be sent out, allocating resources etc. for it, then it gets cut down at
>the final hurdle on the way out of the machine, why waste the resources in
>transit?

Because then every single little function in CircleMUD doesn't have to have
the logic to check for multiple messages.  To take your example of code in
the inventory list.  Now what do you do if you want the combat messages to
be stacked also?  Put the code there?  Or if you'd like people who spam
with 20 tells to be stacked? Though I think my code would require a delay,
except for slow connections, it is much more possible.

>I think my point is from a sensible design point of view those patches are
>a Bad Idea TM...

And you're going to be horribly duplicating code all over to match the
potential.[1]

Which is the entire point behind C++, ye olde black box.

--
George Greer
greerga@circlemud.org

[1] - I should note that the patches are proof of concept mostly.  I never
did polish them up enough to be "pretty" but they were installed in my own
MUD and worked quite well, once I taught it various things it shouldn't
stack, like \r\n.


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST