Subject: Re: @dump question

From: [email-masked] (Greg Hudson)
Date: Fri, 25 Jun 1993 10:36:02 -0700

> I'm having one problem: The PREFIX and SUFFIX wrap the property
> listing but leave out the verb listing. I believe this is due to
> calling suspend(), but I'm not sure how to get around it.

The problem is indeed with the task being suspended.  Ideally, the  
server would have a more sophisticated way of marking task output.   
One option is an INFIX command which would set an infix string, and  
the server would write the infix string whenever a task loses the  
thread but is not finished, and then again when it regains the  
thread.

What I mean by "the thread" here is a bit complicated because of the  
fork statement.  If I use suspend() to suspend execution, then it's  
pretty clear: I lose the thread right away, and the task is not  
complete.  If I use fork, however, then I lose the thread when my  
current task completess (or does a suspend()), and regain the thread  
when the forked code is executed.  I guess more concisely you would  
say:

	LOSE THREAD: The task does a suspend(), or completes with
		fork statements still pending.

	REGAIN THREAD: Resuming from a suspend(), or executing a fork
		statement body.

	TASK FINISHES: Completes with no pending forks.

I'm actually partial to tagging lines of text by their task ID (and  
perhaps some other information) rather than using prefixes, infixes,  
and suffixes.  This requires a bit more cooperation with the client,  
though.

In the meantime, the only solution I can see is to modify @dump to do  
its own prefixing, infixing, and suffixing. Since MOO doesn't let you  
get at the parser, you have to do this for each individual command,  
although you can be modular about it, of course.

--GBH

---

From: Judy Anderson <[email-masked]>
Date: Fri, 25 Jun 1993 11:13:52 -0700

There's $command_utils:suspend() which tries to cope with
prefix/suffix stuff.  Check help $command_utils:suspend.