Re: Scripting System..

From: George Greer (greerga@circlemud.org)
Date: 12/02/02


On Sun, 1 Dec 2002, Patrick Dughi wrote:

>        Perl is a nice, stable language.  Even the versions for windows
>rarely tend to fail.  All the same, it's a full featured language, and it
>doesn't have things like the ability to restrict memory usage, detect
>infinite loops, or deny a user the ability to read/write arbitrary files
>owned by the mud process owner.

1) Run in separate process; use rlimit.
2) In a separate process, it's killable if it stops responding. (Could use
   rlimit CPU usage but it's going to be CPU-bound usually anyway so it'd
   end up dying prematurely.)
3) $cpt = new Safe; $cpt->deny(qw(sysopen open))

>        Aside from that, writing languages is fun.  Weren't you the one
>who got the lexxer out just a while ago?

That's a trivial language.  I meant writing something on the scale of C or
Perl because once a language is started everyone's going to want their own
pet operators and functions thrown in until it grows just as big.  Then you
have to document it all and keep interfaces relatively stable.

>        Also, the mechanism for insuring that we don't have name-space
>conflicts while at the same time allowing for persistent memory objects,
>all in embedded code is difficult.
>        I'm sure you wouldn't want a seperate persistent process for each
>unique script..

'use Safe' stuffs all variables into a separate namespace too.  Have a
separate namespace for each player and the system itself.

--
George Greer
greerga@circlemud.org

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT