<!-- MHonArc v2.4.4 --> <!--X-Subject: [MUD-Dev] Re: Scripting Design Notes --> <!--X-From-R13: Xb Rvyyba <rzvylNgurybavbhf.arj.bk.np.hx> --> <!--X-Date: Mon, 20 Jul 1998 11:19:40 -0700 --> <!--X-Message-Id: 19980720191749.11571#thelonious,new.ox.ac.uk --> <!--X-Content-Type: text/plain --> <!--X-Reference: 199807192001.OAA02027@ami-cg.GraySage.Edmonton.AB.CA --> <!--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:emily#thelonious,new.ox.ac.uk"> </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> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] <br clear=all><hr> <!--X-Body-Begin--> <!--X-User-Header--> <!--X-User-Header-End--> <!--X-TopPNI--> Date: [ <a href="msg00269.html">Previous</a> | <a href="msg00271.html">Next</a> ] Thread: [ <a href="msg00265.html">Previous</a> | <a href="msg00266.html">Next</a> ] Index: [ <A HREF="author.html#00270">Author</A> | <A HREF="#00270">Date</A> | <A HREF="thread.html#00270">Thread</A> ] <!--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>: Jo Dillon <<A HREF="mailto:emily#thelonious,new.ox.ac.uk">emily#thelonious,new.ox.ac.uk</A>></LI> <LI><em>Date</em>: Mon, 20 Jul 1998 19:17:49 +0100</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> Chris Gray (cg#ami-cg,GraySage.Edmonton.AB.CA) spake thusly: > [Mike L Kesl:] > > 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. Java does have a security manager system, which is used by applets - you could certainly prevent use of the IO stuff that way. > 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 It relies on a cross-platform class library that wraps native widgets and functionality. > 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 I think Java byte order is the same on all systems; .class files /certainly/ have the same byte order and I don't think they get swapped round in memory. > 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). My own experience is that it can be up to about 20 times slower than C without a JIT. /With/ a good JIT (like the one in IE 4) it can get to maybe 80% of native code speed. > >The most obvious security threat is that a scripter could call > >functions in the code he or she should not be. This problem is > >eliminated by the very definition of a scripting language. Avoiding > >this problem is usually the main part of the scripting language tied > >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! Java security can fix this, I think :) > -- > Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA > > -- > MUD-Dev: Advancing an unrealised future. -- Jo Harmony - the project to create an LGPL Qt clone <A HREF="http://harmony.ruhr.de">http://harmony.ruhr.de</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="00260" HREF="msg00260.html">[MUD-Dev] Re: Scripting Design Notes</A></STRONG> <UL><LI><EM>From:</EM> Chris Gray <cg#ami-cg,GraySage.Edmonton.AB.CA></LI></UL></LI> </UL></LI></UL> <!--X-References-End--> <!--X-BotPNI--> <UL> <LI>Prev by Date: <STRONG><A HREF="msg00269.html">[MUD-Dev] Re: [CODE] [LANGUAGE/PLATFORM SPECIFIC] My Event Engine</A></STRONG> </LI> <LI>Next by Date: <STRONG><A HREF="msg00271.html">[MUD-Dev] Re: DBMS in MU*'s</A></STRONG> </LI> <LI>Prev by thread: <STRONG><A HREF="msg00265.html">[MUD-Dev] Re: Scripting Design Notes</A></STRONG> </LI> <LI>Next by thread: <STRONG><A HREF="msg00266.html">[MUD-Dev] Re: Scripting Design Notes</A></STRONG> </LI> <LI>Index(es): <UL> <LI><A HREF="index.html#00270"><STRONG>Date</STRONG></A></LI> <LI><A HREF="thread.html#00270"><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> <ul compact> <ul compact> <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> </ul> <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><Possible follow-up(s)><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 <UL> <LI><strong><A NAME="00294" HREF="msg00294.html">[MUD-Dev] RE: Login and Accounts</A></strong>, Matt Chatterley <a href="mailto:matt#mpc,dyn.ml.org">matt#mpc,dyn.ml.org</a>, Wed 22 Jul 1998, 00:41 GMT <UL> <LI><strong><A NAME="00306" HREF="msg00306.html">[MUD-Dev] Re: Login and Accounts</A></strong>, Ling <a href="mailto:K.L.Lo-94#student,lboro.ac.uk">K.L.Lo-94#student,lboro.ac.uk</a>, Wed 22 Jul 1998, 13:45 GMT </LI> </UL> </LI> </UL> </LI> </UL></BLOCKQUOTE> </ul> <hr> <center> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] </center> <hr> </body> </html>