1998Q3/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Re: Scripting Design Notes -->
<!--X-From-R13: Quevf Uenl <ptNnzv&#45;pt.UenlEntr.Sqzbagba.OP.QO> -->
<!--X-Date: Sun, 19 Jul 1998 13:02:09 &#45;0700 -->
<!--X-Message-Id: 199807192001.OAA02027@ami&#45;cg.GraySage.Edmonton.AB.CA -->
<!--X-Content-Type: text/plain -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] Re: Scripting Design Notes</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">
</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="msg00259.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00261.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00672.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00265.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00260">Author</A>
&nbsp;|&nbsp;<A HREF="#00260">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00260">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Re: Scripting Design Notes</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>: [MUD-Dev] Re: Scripting Design Notes</LI>
<LI><em>From</em>: Chris Gray &lt;<A HREF="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</A>&gt;</LI>
<LI><em>Date</em>: Sun, 19 Jul 1998 14:01:34 -0600</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#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>
[Mike L Kesl:]

 &gt;I am considering using jPython &lt;<A  HREF="http://www.python.org">http://www.python.org</A>&gt;. The other
 &gt;consideration is to allow contributors to use java in a secure way
 &gt;using a hard coded api of appropriate scripting functions. I think
 &gt;something that is purely interpreted would be nice, but I am not sure
 &gt;if that is theoretically possible in a purely platform independent
 &gt;project, unless of course if the interpreter is written in java, which
 &gt;could mean a class library in the case of jPython, I am not sure.
 &gt;Otherwise we would have to write our own interpreter for the java
 &gt;method. This method would really only try to compile the script, making
 &gt;the java runtime environment do most of the work. More investigation of
 &gt;Java Python is necessary, and perhaps other languages.

Well, if you use Java, your scripting language *is* portable, but likely
more powerful than you want. Where will the scripted code run? Most
likely in the server, in which case things like all of 'awt' should
be disallowed. Likely also all of the IO stuff. You could take the
Java source they write and wrap it inside some special stuff that
imports a bunch of utility routines that you *do* want them to be able
to use, then compile the result. However, you are still vulnerable.

Writing a portable interpreter in C or C++ can certainly be done. The
Java interpreter itself is an example. (I doubt if Netscape has completely
different source code for different platforms - its likely a lot of
conditional compilation, etc.) You have to watch for byte-order
issues (your byte-code will likely have a fixed byte-order, and you will
have to account for that on systems where the native byte-order is
different). There are also issues of alignment - some CPUs/systems are
more strict about it than others (RISC chips are usually quite strict).
Writing an interpreter of any kind in Java will yield something that
may well be unusable slow. Java itself isn't very fast (I've heard
of it being upto 300 times slower than C/C++ code, but that is
probably an extreme case).

 &gt;The most obvious security threat is that a scripter could call
 &gt;functions in the code he or she should not be. This problem is
 &gt;eliminated by the very definition of a scripting language. Avoiding
 &gt;this problem is usually the main part of the scripting language tied
 &gt;closely together in a brawl with flexible functionality.

If you define your own scripting language, or can manage to fully block
access to "unsafe" things, its probably a good thing to do. Crashing
your MUD is one thing, but you certainly don't want people to be able
to do things like access/modify/delete files on the host system!

-- 
Chris Gray     cg#ami-cg,GraySage.Edmonton.AB.CA


</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<ul compact><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><A NAME="00270" HREF="msg00270.html">[MUD-Dev] Re: Scripting Design Notes</A></strong>
<ul compact><li><em>From:</em> Jo Dillon &lt;emily#thelonious,new.ox.ac.uk&gt;</li></ul>
<li><strong><A NAME="00265" HREF="msg00265.html">[MUD-Dev] Re: Scripting Design Notes</A></strong>
<ul compact><li><em>From:</em> Vadim Tkachenko &lt;vt#freehold,crocodile.org&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00259.html">[MUD-Dev] Re: DBMS in MU*'s</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00261.html">[MUD-Dev] Re: DBMS in MU*'s</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00672.html">[MUD-Dev] Re: DBMS in MU*'s</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00265.html">[MUD-Dev] Re: Scripting Design Notes</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00260"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00260"><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>[MUD-Dev] Re: DBMS in MU*'s</STRONG>, <EM>(continued)</EM>
<ul compact>
<LI><strong><A NAME="00274" HREF="msg00274.html">[MUD-Dev] Re: DBMS in MU*'s</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Tue 21 Jul 1998, 01:36 GMT
<UL>
<LI><strong><A NAME="00282" HREF="msg00282.html">[MUD-Dev] Re: DBMS in MU*'s</A></strong>, 
s001gmu <a href="mailto:s001gmu#nova,wright.edu">s001gmu#nova,wright.edu</a>, Tue 21 Jul 1998, 20:26 GMT
<UL>
<LI><strong><A NAME="00289" HREF="msg00289.html">[MUD-Dev] Re: DBMS in MU*'s</A></strong>, 
Adam Wiggins <a href="mailto:adam#angel,com">adam#angel,com</a>, Tue 21 Jul 1998, 22:27 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
<LI><strong><A NAME="00672" HREF="msg00672.html">[MUD-Dev] Re: DBMS in MU*'s</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Wed 12 Aug 1998, 03:48 GMT
</LI>
</ul>
</LI>
<LI><strong><A NAME="00260" HREF="msg00260.html">[MUD-Dev] Re: Scripting Design Notes</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sun 19 Jul 1998, 20:02 GMT
<UL>
<LI><strong><A NAME="00265" HREF="msg00265.html">[MUD-Dev] Re: Scripting Design Notes</A></strong>, 
Vadim Tkachenko <a href="mailto:vt#freehold,crocodile.org">vt#freehold,crocodile.org</a>, Mon 20 Jul 1998, 05:06 GMT
</LI>
<LI><strong><A NAME="00270" HREF="msg00270.html">[MUD-Dev] Re: Scripting Design Notes</A></strong>, 
Jo Dillon <a href="mailto:emily#thelonious,new.ox.ac.uk">emily#thelonious,new.ox.ac.uk</a>, Mon 20 Jul 1998, 18:19 GMT
</LI>
</UL>
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00266" HREF="msg00266.html">[MUD-Dev] Re: Scripting Design Notes</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Mon 20 Jul 1998, 06:11 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00254" HREF="msg00254.html">[MUD-Dev] Login and Accounts</A></strong>, 
Mike L Kesl <a href="mailto:mlkesl#cpinternet,com">mlkesl#cpinternet,com</a>, Sun 19 Jul 1998, 13:50 GMT
</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>