1997Q1/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: Execution -->
<!--X-From-R13: @nguna Kbfcr <lbfcrNunjnvv.rqh> -->
<!--X-Date: from fabius.globecomm.net [207.51.48.6] by mx4.ibm.net id 859270455.87266&#45;1 Tue Mar 25 06:14:15 1997 -->
<!--X-Message-Id: Pine.GSO.3.95q.970324180932.13639A&#45;100000@uhunix2 -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 199703250344.DAA07340#out2,ibm.net -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: Execution</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:yospe#hawaii,edu">
</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="msg00201.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00203.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00199.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00192.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00202">Author</A>
&nbsp;|&nbsp;<A HREF="#00202">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00202">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: Execution</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: Multiple Recipients of MUD Design Mailing List &lt;<A HREF="mailto:mud-dev#null,net">mud-dev#null,net</A>&gt;</LI>
<LI><em>Subject</em>: Re: Execution</LI>
<LI><em>From</em>: Nathan Yospe &lt;<A HREF="mailto:yospe#hawaii,edu">yospe#hawaii,edu</A>&gt;</LI>
<LI><em>Date</em>: Mon, 24 Mar 1997 20:19:06 -1000</LI>
<LI><em>Reply-To</em>: Nathan Yospe &lt;<A HREF="mailto:yospe#hawaii,edu">yospe#hawaii,edu</A>&gt;</LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
On Sun, 23 Mar 1997, Chris Gray wrote:

:[Nathan Y:]
:
:[C++ extract for dynamic execution deleted.]
:
:My C++ is sketchy, but I think I followed that. In the basics, it is
:pretty similar to mine, although my implementation looks a lot uglier.
:I think all schemes that allow mixing of native and interpreted code
:are going to have some basic similarities.
:
:I have some questions about your example script, however:
:
:- what is the difference between 'parent' and 'master'? I imagine 'master'
:    to be the PC who started it all with 'hunt', but what is 'parent'?
:    I imagine it to be the PC or the drone which caused this one to be
:    created, but if so, how does a message from a deep descendant get
:    back to the master? Hmm. I guess this was just meant as an example,
:    given that 'drone:parent()' is being used after it has already been
:    verified to be null. Ooops.

Huh? Can't find an example of a null drone:parent() that hasn't stopped
execution. Parent is, it would appear, the drone that spawned this one, if
any. 

Yeah, I guess so... I'm having a tough time with this myself... looks like
the semicompile scripting language from Physmud++ v.2... I'm not sure if I
still have a copy of that around. I've gotten into this habit of scrapping
functional codebases and starting over as my programming skills increase..
one hazard of a sharp learning curve. Um. Well, it looks like it was an
example... probably.

:- how does it stop? Does 'exits' return all of the exits of the room?
:    Is it something to do with the 'addlevel(-1)'?

No. The addlevel thing was probably a counter to restrict the size of a
search path. Umm. I wonder... I'll post up an example from my current
language at some point. My new version is OO... a nice improvement. It
also has inheritance, and much cleaner function definition. The exits()
thing was almost certainly a call to the room to get all of the exits.
Hmmm. OK, I'm starting to get this. Here you go:

:- are drones actual NPC's? If so, does 'terminate' delete the NPC or
:    just stop this execution of its script?

Drones seem to have been NPCs. Terminate stops execution.

:Anyway, thanks for the example - I always like to see snippets of other
:people's stuff, just to get the flavour of it.

I'll try to translate it. Its a little obsolete, but...

/*
&gt; hunt           // the 'hunt' program

expect
  character ch   // acting character
  string input   // input string
  bool override  // override of 'instincts'
  short mode     // skill based failure mode
end expect

begin
*/

// The above is essentially equivalent to what is now:

void &lt;area&gt;:hunt(Character ch, String input, bool override, short mode){

// Where &lt;area&gt; is equivalent to a Java package, and all arguments are
// passed similarly to Java references. 

/*
                 // parse the string
string parseword = input:extract()
                 // search through all backpacks, etc for a drone
character drone = ch:getcharfromcontents("drone")
                                         ^^^
// This seems to be the only existant mistake. Should be "skills:drone".
*/

// this merely calls a method of the String class to get the first word
// off of the input String. The second line grabs the drone character,
// which the player should be carrying around....

/*
if(drone == null)
  // this will only happen if something goes wrong. There should be a
  // check for these drones in the skill that launches this command.
  ch:show("You don't have any hunting drones to deploy.\r\n")
  terminate
end if
*/

// If the drone doesn't exist (the skillcheck should have spotted this...)
// bail out.

/*
drone:moveto(ch:room())
ch:show("You deploy a hunting drone."\r\n)
*/

// extract the drone from inventory and deploy it. This part is patently
// impossible now. Instead, a call would have been made to the drone's
// location, using drone:exit(), which only works because there is only
// one exit, hopefully, from the location. Better would have been
// drone.exit(drone.local().exits());

/*
drone:execute(hunt2, parseword)
*/

// executes another homebrew program. Used for any program added to an
// already existant class.

/*
terminate
&amp;
*/

// essentially translated - return; }

The other program is similar. There are still holdovers in my current
language. The new language is a bit easier to translate into C++ when the
code is stable... meaning I can have it autotranslated and added in as a
hardcoded feature next time around with no coding.

   __    _   __  _   _   ,  ,  , ,  
  /_  / / ) /_  /_) / ) /| /| / /\            First Light of a Nova Dawn
 /   / / \ /_  /_) / \ /-|/ |/ /_/            Final Night of a World Gone
Nathan F. Yospe - University of Hawaii Dept of Physics - yospe#hawaii,edu


</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00201.html">Re: Resets and repops</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00203.html">Re: Resets and repops (a really short post)</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00199.html">Execution</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00192.html">Mixture</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00202"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00202"><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: Resets and repops (a really short post)</STRONG>, <EM>(continued)</EM>
<ul compact>
<LI><strong><A NAME="00248" HREF="msg00248.html">Re: Resets and repops (a really short post)</A></strong>, 
Nathan Yospe <a href="mailto:yospe#hawaii,edu">yospe#hawaii,edu</a>, Sat 29 Mar 1997, 04:09 GMT
</LI>
<LI><strong><A NAME="00252" HREF="msg00252.html">Re: Resets and repops (a really short post)</A></strong>, 
Nathan Yospe <a href="mailto:yospe#hawaii,edu">yospe#hawaii,edu</a>, Sat 29 Mar 1997, 08:32 GMT
</LI>
<LI><strong><A NAME="00258" HREF="msg00258.html">Re: Resets and repops (a really short post)</A></strong>, 
claw <a href="mailto:claw#null,net">claw#null,net</a>, Sat 29 Mar 1997, 13:57 GMT
</LI>
</ul>
</LI>
<LI><strong><A NAME="00199" HREF="msg00199.html">Execution</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Mon 24 Mar 1997, 15:00 GMT
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00202" HREF="msg00202.html">Re: Execution</A></strong>, 
Nathan Yospe <a href="mailto:yospe#hawaii,edu">yospe#hawaii,edu</a>, Tue 25 Mar 1997, 14:14 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00192" HREF="msg00192.html">Mixture</A></strong>, 
Furball <a href="mailto:K.L.Lo-94#student,lut.ac.uk">K.L.Lo-94#student,lut.ac.uk</a>, Mon 24 Mar 1997, 05:40 GMT
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00193" HREF="msg00193.html">Re: Mixture</A></strong>, 
Adam Wiggins <a href="mailto:nightfall#inficad,com">nightfall#inficad,com</a>, Mon 24 Mar 1997, 13:12 GMT
</LI>
<LI><strong><A NAME="00204" HREF="msg00204.html">Re: Mixture</A></strong>, 
Travis S Casey <a href="mailto:casey#nu,cs.fsu.edu">casey#nu,cs.fsu.edu</a>, Tue 25 Mar 1997, 22:12 GMT
</LI>
<LI><strong><A NAME="00205" HREF="msg00205.html">Re: Mixture</A></strong>, 
Furball <a href="mailto:K.L.Lo-94#student,lut.ac.uk">K.L.Lo-94#student,lut.ac.uk</a>, Tue 25 Mar 1997, 22:22 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>