1999Q2/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev] Virtual machine design -->
<!--X-From-R13: Oyrk Egrjneg <evpurNpey.pbz> -->
<!--X-Date: Fri, 16 Apr 1999 21:44:26 &#45;0700 -->
<!--X-Message-Id: 199904162005.AA29883#crl5,crl.com -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 19990416195942.A1116#donut,dhis.org -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: [MUD-Dev] Virtual machine design</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:riche#crl,com">
</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="msg00057.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00059.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00088.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00065.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00058">Author</A>
&nbsp;|&nbsp;<A HREF="#00058">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00058">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev] Virtual machine design</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Subject</em>: Re: [MUD-Dev] Virtual machine design</LI>
<LI><em>From</em>: Alex Stewart &lt;<A HREF="mailto:riche#crl,com">riche#crl,com</A>&gt;</LI>
<LI><em>Date</em>: Fri, 16 Apr 1999 13:05:50 -0700 (PDT)</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>
&gt; 1) A java virtual machine, running compiled java (or java-like) code
&gt; 2) Adapt an existing virtual machine from another mud to my needs
&gt; 3) Write my own virtual machine, and make it a target for the egcs
&gt;    compiler, thus allowing it to run byte compiled C/C++ code.
&gt; 4) Write my own virtual machine, and write my own mud language.
&gt; 
&gt; Am I missing any options here?

5) Write a virtual machine independent of any source language and allow
multiple language compilers to be written for it.

This kinda falls into both 3 and 4 in some respects..  You will, of course,
need to have some basic language as a starting point, but if it's flexible
enough you don't need to be stuck with any one option foreverafter (it also
means you can develop your language or techniques for programming over time,
after seeing what works best for your situation).

&gt; The java option has some appeal, I must admit. However, sticking to the
&gt; jvm spec is both a plus and minus I guess. At least I have something to
&gt; work from, but it's also rather restrictive. On the up side, there's no
&gt; need to write a compiler. I know some people were talking about using a
&gt; jvm for the devmud vm though, so if they have any thoughts, I'd love to
&gt; hear them.

Frankly, I think you're looking at things the wrong way around here.  Writing
compilers with current tools isn't that hard, really.  What's hard is designing
a good, efficient, well-designed VM to execute the code, and that's what's most
important too, since programmers compile code once, and users run code over and
over and over again.

If you're considering taking advantage of existing solutions, the best reason
to do so, in my opinion, would be to take advantage of the existing VM
technology.  Writing your own JVM wouldn't do that.  On the other hand, linking
your MUD system to third-party JVMs might provide some advantages.

The two problems here are that 1) third-party JVMs generally still aren't that
good (especially freely-available ones) and 2) The Java VM design might end up
putting significant constraints on other aspects of your system.  The obvious
advantage, however, is that as new JVM technology becomes available you can
take advantage of it.

&gt; Adapting a virtual machine from another mud seems like the least work,
&gt; but I question how well it would work. I'd most likely have to also
&gt; adapt the language that those muds use. If I liked the availible
&gt; choices at present, I wouldn't want to make something new. So I don't
&gt; think this would be a good choice.

Well, there's more to a MUD than it's language/VM.  Admittedly, if your reason
for doing this is to have a new language/VM, then this is probably a
non-option.  The other problem is that most MUD VMs are built around various
assumptions about the rest of the system, so it'd probably be a lot more work
to convert one than it looks like from the outside.

&gt; The vm that is a target of gcc/g++ is what I'm really thinking about
&gt; doing. It would have the advantage of the same code compiling to either
&gt; byte code or native code, which appeals to me greatly. And there would
&gt; also be nothing stopping me from writing a compiler for some other
&gt; language should I decide to do so. In short, this option seems to give
&gt; the greatest flexibility for the least amount of work. And knowing that
&gt; quake3 (although not a mud) uses a similar approach (with the lcc
&gt; compiler I believe), makes me think I'm right. Or am I?

This is an interesting possibility.  The one word of warning I'd offer is to
look at whether C/C++ is really the right language for working with the other
features of your MUD's programming environment (there's more to an environment
than the language.. there's a lot of implicit assumptions about the way data is
organized, access restrictions, functionality, etc.  Depending on how the rest
of your system works, some of the assumptions in the C/C++ languages may cause
problems).  Ultimately, you probably wouldn't be able to compile the same code
to native object code without some work (either modification or thunking) as
the "internal" interface to the MUD is not going to be the same as the "behind
the scenes" interface.

&gt; The final option is probably a poor one, since the real problem with it
&gt; is (IMO) that people would rather not learn a language that's only
&gt; useful on a particular mud. They're more likely to use C/C++ which they
&gt; already know, or will be useful to them elsewhere if they learn. Thus
&gt; I'm wary of a making something that doesn't offer a "standard"
&gt; language, at least as an option (whether that be C/C++/java/whatever).

All I have to say for this is that it's worked for a lot of other systems.  As
long as the language involved isn't too arcane, I really don't think most
programmers will have too much problem with the small added investment of
becoming familiar with a slightly different language.  They'll have to become
familiar with whatever the rest of your environment is anyway, which is the
real hard part.  In fact, as I mentioned above, it may actually be easier for
people to work in a language which is properly tailored to the rest of the
environment instead of "well, it's C++, but it's not really C++ because this is
different, and this, and this, and watch out for this because..."

&gt; Any thoughts from people who have been through this? What choice did
&gt; you make and why?

Well, I haven't actually "been through it"..  I guess technically I'm going
through it with my current MUD project (except, of course, that my current MUD
project hasn't been going much of anywhere for a while).  I have worked with
several systems with their own languages and VMs, and in my current project I'm
going with basically my option 5 above (the VM is a stack-based interpreter
design intended to be language-agnostic and the basic (starting) programming
language to go with it is more or less a direct parallel to the bytecodes (sort
of an assembly language).  The system will support writing additional language
compilers in-DB, so people can do whatever they want with the end product)

-alex
-------------------------------------------------------------------------------
     Alex Stewart - riche#crl,com - Richelieu @ Diversity University MOO
                         <A  HREF="http://www.crl.com/~riche">http://www.crl.com/~riche</A>
           "For the world is hollow, and I have touched the sky."


_______________________________________________
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="00054" HREF="msg00054.html">[MUD-Dev] Virtual machine design</A></STRONG>
<UL><LI><EM>From:</EM> Shane King &lt;thandor#donut,dhis.org&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00057.html">Re: [MUD-Dev] Virtual machine design</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00059.html">Re: [MUD-Dev] Virtual machine design</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00088.html">Re: [MUD-Dev] Virtual machine design</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00065.html">Re: [MUD-Dev] Virtual machine design</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00058"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00058"><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>Re: [MUD-Dev] Virtual machine design</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<LI><strong><A NAME="00063" HREF="msg00063.html">Re: [MUD-Dev] Virtual machine design</A></strong>, 
Oliver Jowett <a href="mailto:icecube#ihug,co.nz">icecube#ihug,co.nz</a>, Sat 17 Apr 1999, 16:34 GMT
</LI>
<LI><strong><A NAME="00077" HREF="msg00077.html">Re: [MUD-Dev] Virtual machine design</A></strong>, 
Petri Virkkula <a href="mailto:pvirkkul#iki,fi">pvirkkul#iki,fi</a>, Sun 18 Apr 1999, 17:22 GMT
<UL>
<LI><strong><A NAME="00082" HREF="msg00082.html">Re: [MUD-Dev] Virtual machine design</A></strong>, 
Ben Greear <a href="mailto:greear#cyberhighway,net">greear#cyberhighway,net</a>, Mon 19 Apr 1999, 08:01 GMT
<UL>
<LI><strong><A NAME="00088" HREF="msg00088.html">Re: [MUD-Dev] Virtual machine design</A></strong>, 
Petri Virkkula <a href="mailto:pvirkkul#iki,fi">pvirkkul#iki,fi</a>, Mon 19 Apr 1999, 19:47 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</ul>
<LI><strong><A NAME="00058" HREF="msg00058.html">Re: [MUD-Dev] Virtual machine design</A></strong>, 
Alex Stewart <a href="mailto:riche#crl,com">riche#crl,com</a>, Sat 17 Apr 1999, 04:44 GMT
</LI>
<LI><strong><A NAME="00065" HREF="msg00065.html">Re: [MUD-Dev] Virtual machine design</A></strong>, 
Jo Dillon <a href="mailto:emily#thelonious,new.ox.ac.uk">emily#thelonious,new.ox.ac.uk</a>, Sat 17 Apr 1999, 16:49 GMT
</LI>
<LI><strong><A NAME="00060" HREF="msg00060.html">Re: [MUD-Dev] Virtual machine design</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sat 17 Apr 1999, 16:31 GMT
<UL>
<LI><strong><A NAME="00080" HREF="msg00080.html">Re: [MUD-Dev] Virtual machine design</A></strong>, 
claw <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Mon 19 Apr 1999, 07:52 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00064" HREF="msg00064.html">Re: [MUD-Dev] Virtual machine design</A></strong>, 
Felix A. Croes <a href="mailto:felix#dworkin,nl">felix#dworkin,nl</a>, Sat 17 Apr 1999, 16:46 GMT
</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>