2000Q1/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev] Embedded languages, object persistance... ack. -->
<!--X-From-R13: "Xnl Qneyfba" <abcNzvger.bet> -->
<!--X-Date: Mon, 03 Jan 2000 17:28:02 &#45;0800 -->
<!--X-Message-Id: 00d401bf5649$c1184da0$18095381@POINTSMAN -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 000c01bf51db$81f3f600$f6088d18#busy1,on.wave.home.com -->
<!--X-Reference: E124To3&#45;0005zF&#45;00#dingo,kanga.nu -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: [MUD-Dev] Embedded languages, object persistance... ack.</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:nop#mitre,org">
</head>
<body background="/backgrounds/paperback.gif" bgcolor="#ffffff"
      text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000">

  <font size="+4" color="#804040">
    <strong><em>MUD-Dev<br>mailing list archive</em></strong>
  </font>
      
<br>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg00045.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00047.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00004.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00043.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00046">Author</A>
&nbsp;|&nbsp;<A HREF="#00046">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00046">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev] Embedded languages, object persistance... ack.</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: &lt;<A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A>&gt;</LI>
<LI><em>Subject</em>: Re: [MUD-Dev] Embedded languages, object persistance... ack. </LI>
<LI><em>From</em>: "Jay Carlson" &lt;<A HREF="mailto:nop#mitre,org">nop#mitre,org</A>&gt;</LI>
<LI><em>Date</em>: Mon, 3 Jan 2000 19:22:15 -0500</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Sender</em>: <A HREF="mailto:mud-dev-admin#kanga,nu">mud-dev-admin#kanga,nu</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
On Saturday, January 01, 2000 2:03 PM
"J C Lawrence" &lt;claw#kanga,nu&gt; wrote:

&gt;   Consider a deep object heirarchy, where a large number of objects
&gt;   which are in common use in the game all inherit from a common
&gt;   shared object.  What happens if I come along and edit the methods
&gt;   and/or attributes on that shared object?  What happens if I
&gt;   totally redefine it?  What happens to all the objects that descend
&gt;   from it?  What happens to the commands people have or are issuing
&gt;   which affect the child objects?  What happens if the changes cause
&gt;   mass breakages such that few to no objects actually work any more?

Cold and MOO have reasonable, well-defined answers to those questions.

The answer to that last question is: your fellow programmers form a lynch
mob.  How is that any different than checking in a bunch of busted changes
to CVS?

&gt; For me some of the driving reasons behind internal languages are
&gt; Rapid Application Development (implementing the game world or world
&gt; features), suitability for non-professional programmer use, ability
&gt; to tailor to world building versus general programming problems,
&gt; ease of extending the language in "interesting" directions, and so
&gt; forth.

Agreed, and add "useful multiauthor security".

&gt; &gt; So in general I know this code is to be compiled since you don't
&gt; &gt; want to be executing "scripts", but is this code an object? and
&gt; &gt; then is the byte-code stored? ack.. I'm confused.
&gt;
&gt; Not so fast.  The majority of MUD servers out there with internal
&gt; scripting languages don't actually have an internal Virtual machine
&gt; (VM) to which they byte compile their internal scripting languages
&gt; (eg the Tiny-* clan).  Having a VM and building a byte code compiler
&gt; can significantly increase performance, but it is also a non-trivial
&gt; programming task that many have foundered on.

MOO got speed out of going bytecode, but the critical motivation was task
suspension.  In a straightforward tree-descent interpreter, you end up with
continuation information sprayed all over the C stack; if you want to, say,
block the currently executing method and wait for a line of input from the
user, you'd have to save the C stack and later restore it when the line was
available.  Ew.

The work involved in explicitly managing all the activation records on a new
explicit stack was probably about the same as doing the full rewrite to
bytecode.

&gt; Another distinction which needs to be made here (which most of the
&gt; object oriented servers fail to do) is between a class definition
&gt; and an object.

I think you've wandered into an old argument with both arms flailing.
Although most mainstream languages are class-based, a lot of important
languages and theoretical work are object-based.  Cardelli's page at
<A  HREF="http://www.luca.demon.co.uk/">http://www.luca.demon.co.uk/</A> has many interesting links; see in particular
<A  HREF="http://research.microsoft.com/Users/luca/Slides/PLDI96Tutorial.pdf">http://research.microsoft.com/Users/luca/Slides/PLDI96Tutorial.pdf</A> for many
of the issues outlined in one place.  Cardelli forcefully argues that
class-based systems are strictly less expressive than object-based systems.

&gt; A class definition describes and defines how
&gt; something would be and would work if it existed.  It _defines_
&gt; something, it doesn't actually create one of those things.  An
&gt; object is an "instance" of a class.  It is a created example of the
&gt; class definition.

&gt; Why is this important?  In systems which make a distinction between
&gt; classes and objects, you can compile the class definitions and store
&gt; the results with with class, and then merely have the various object
&gt; instances refer to that definition to access their defining code.

This is a red herring.  Object-based language implementations can and do
perform this kind of optimization without the model restriction required by
classes.

&gt; You can also build different systems to handle class definitions
&gt; than you use to handle objects, tailoring each system to handle its
&gt; data type (class or objects) best and not the other.

If this is being argued as an advantage of the class-based model, I think
this begs the question.

&gt; However, most current MUD servers do not define the difference
&gt; between a class definition and an object instance.  They are one and
&gt; the same.  (eg MOO, ColdC, etc).  What this means is that an object
&gt; usually also defines its class.

No.  A MOO object defines its *behavior*, often in terms of delegation to a
parent object.

(Sidetrack: MOO frobs were a little like instances of classes described by
MOO objects; Cold borrowed them.  Ben Jackson's WAIF proposal carries this
much further.)

&gt; Often programmers for such systems
&gt; try and install an artificial distinction by only doing programming
&gt; (class definitions) in objects that they never actually use
&gt; anywhere, and just inheriting children from those object when they
&gt; want to create intantiations (ie the objects players actually use).
&gt; Not making the distinction makes things simultaneously a little
&gt; messier and a little easier in implementing the system.  You now
&gt; have only one type of thing to deal with (objects), but you now also
&gt; have to deal with a mess of class heirarchies amd objected
&gt; heirarchies which are intermingled.  Depending on how you approach
&gt; things, the difference can be large or quite small.

I haven't seen many examples in the MOO world where this has been an ongoing
problem.  Singleton "real" objects (like swords and exits) frequently get
new behavior, but people tend not to create children of them.  There is a
strong distaste in some parts of the community for not following a strict
prototype/instance distinction, but it's sure come in handy from time to
time.

(For a while, some people changed their parent object to *me* on LambdaMOO.
I was asked to disallow that because it could be used for quota scamming,
and the wizards involved thought it would be a lot easier to ask me to stop
than to go bug hunting.)

&gt; &gt; Here, I'll try to demonstrate what I little I think I know from
&gt; &gt; MUSH type enviroments. A MUSH allows you to create an
&gt; &gt; object. Great. This object is unique and persistent. Ie. it will
&gt; &gt; be there when you get back if you so desire. You can assign code
&gt; &gt; to execute based upon certain defined actions on the object, or
&gt; &gt; you can create a new action for this object. Going by this model
&gt; &gt; then, does that mean every single object in these "new" muds is a
&gt; &gt; class and is inherited from a previous object? But then it's
&gt; &gt; executed how?
&gt;
&gt; See the above dinstinction between classes and objects.  MUSHes fail
&gt; to make that distinction and thus every object has the potential to
&gt; both be an object _and_ a class definition for other objects and
&gt; classes.
&gt;
&gt; Yes, it is kind of confusing if you come from a strict OO
&gt; background.

Only if your strict OO background isn't very broad.  :-)  No, I know what
you're trying to get at, but I think "mainstream OO" would be a better fit.

&gt; &gt; -doesn't require me to learn it's "own custom embedded
&gt; &gt; language"...
&gt;
&gt; Realise that no matter what language it uses, for someone it will
&gt; require learning a whole new language as they won't know it.
&gt; Doesn't really matter if its Java, Python, NetREXX, or whatever.
&gt; The advantage with chosing a generic programming language here is
&gt; that your audience of people who do know it increases, and they have
&gt; some chance of being able to exploit that skill elsewhere as well.
&gt;
&gt; Note however that once you have a language chosen, the real learning
&gt; pain is in your class heirarchy -- which is expressly NOT portable
&gt; and NOT leveragable to other systems.

Absolutely.  Here's a concrete example.  Suppose you're using a restricted
Java subset as your extension language.  You probably do *not* want to have
java.util.Vector easily available; whenever  Alice's code returns a Vector
to Bob's code, Bob can mutate it.  Gosh, I hope that wasn't a skill list....
This is patchable by adding authorization tests to the Vector class, but
then you have to teach your builders how Java-with-controlled-Vectors works,
ad infinitum.

Jay




_______________________________________________
MUD-Dev maillist  -  MUD-Dev#kanga,nu
<A  HREF="http://www.kanga.nu/lists/listinfo/mud-dev">http://www.kanga.nu/lists/listinfo/mud-dev</A>

</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00004" HREF="msg00004.html">Re: [MUD-Dev] Embedded languages, object persistance... ack.</A></STRONG>
<UL><LI><EM>From:</EM> J C Lawrence &lt;claw#kanga,nu&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00045.html">Re: [MUD-Dev] Storing tokens with flex &amp; bison</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00047.html">[MUD-Dev] For those interested in parsers and compilers</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00004.html">Re: [MUD-Dev] Embedded languages, object persistance... ack.</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00043.html">Re: [MUD-Dev] Embedded languages, object persistance... ack.</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00046"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00046"><STRONG>Thread</STRONG></A></LI>
</UL>
</LI>
</UL>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<ul><li>Thread context:
<BLOCKQUOTE><UL>
<LI><STRONG>META: List goals (was Re: [MUD-Dev] OS Inspiration)</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<LI><strong><A NAME="00119" HREF="msg00119.html">META: List goals (was Re: [MUD-Dev] OS Inspiration)</A></strong>, 
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Tue 18 Jan 2000, 08:35 GMT
</LI>
</ul>
</ul>
</LI>
<LI><strong><A NAME="00013" HREF="msg00013.html">[MUD-Dev] JavaWorld: Build an object database</A></strong>, 
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Sat 01 Jan 2000, 20:51 GMT
<LI><strong><A NAME="00012" HREF="msg00012.html">[MUD-Dev] Muq update</A></strong>, 
Cynbe ru Taren <a href="mailto:cynbe#muq,org">cynbe#muq,org</a>, Sat 01 Jan 2000, 20:14 GMT
<LI><strong><A NAME="00004" HREF="msg00004.html">Re: [MUD-Dev] Embedded languages, object persistance... ack.</A></strong>, 
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Sat 01 Jan 2000, 19:03 GMT
<UL>
<LI><strong><A NAME="00046" HREF="msg00046.html">Re: [MUD-Dev] Embedded languages, object persistance... ack.</A></strong>, 
Jay Carlson <a href="mailto:nop#mitre,org">nop#mitre,org</a>, Tue 04 Jan 2000, 01:28 GMT
</LI>
</UL>
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00043" HREF="msg00043.html">Re: [MUD-Dev] Embedded languages, object persistance... ack.</A></strong>, 
Jay Carlson <a href="mailto:nop#mitre,org">nop#mitre,org</a>, Mon 03 Jan 2000, 20:25 GMT
<UL>
<LI><strong><A NAME="00124" HREF="msg00124.html">Re: [MUD-Dev] Embedded languages, object persistance... ack.</A></strong>, 
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Tue 18 Jan 2000, 09:17 GMT
<UL>
<LI><strong><A NAME="00137" HREF="msg00137.html">Re: [MUD-Dev] Embedded languages, object persistance... ack.</A></strong>, 
icecube <a href="mailto:icecube#ihug,co.nz">icecube#ihug,co.nz</a>, Tue 18 Jan 2000, 20:52 GMT
</LI>
<LI><strong><A NAME="00144" HREF="msg00144.html">Re: [MUD-Dev] Embedded languages, object persistance... ack.</A></strong>, 
Kevin Littlejohn <a href="mailto:darius#connect,com.au">darius#connect,com.au</a>, Wed 19 Jan 2000, 02:56 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>