From: Kenny Tilton
Subject: Deep Cello: Conserving stack
Date: 
Message-ID: <3E97076D.9020608@nyc.rr.com>
My immediate problem is getting Cloucell, the "Cello Inside" universal 
inspector, to run on the LW trial edition. I want win32 paupers to be 
able to play with Cello. (so far no luck getting CLisp or CormanCL to 
run Cello (Cells yes, Cello no in both cases), but those can be re-visited.)

Actually, it runs on LW-trial if I inspect something tiny like a Cell, 
but blows out the LW* 1600 stack limit if I inspect the 80-slot window 
instance.

Two questions:

(1) is it worth conserving stack usage anyway? ie, if tomorrow LW 
changes the freebee limit to 16000, would this /still/ be something to 
address? Or is thsi one of those things that only seems 
burdensome/inefficient/expensive/whatever?

(2) Here is a sequence from the frame stack:

Call to CELLS::C-CALCULATE-AND-SET
Call to (METHOD CELLS::C-AWAKEN-CELL (CELLS::C-DEPENDENT))
Call to C-AWAKEN
Call to CELLS::MD-AWAKEN-SLOT
Call to CELLS::MD-AWAKEN
Call to (METHOD TO-BE (T))
Call to CLOS::NEXT-METHOD-CALL-1
Call to (METHOD CELLS::C-ECHO-SLOT-NAME PROGN ((EQL (QUOTE .KIDS)) 
FAMILY T T T))
Call to CELLS::MD-PROPAGATE
Call to CELLS::MD-SLOT-VALUE-ASSUME
Call to CELLS::C-CALCULATE-AND-SET

Should I just take something like MD-AWAKEN-SLOT or some of the other 
nice neat subroutines and inline them? If so, would you use a macro or 
proclaim inline? Do I gather from the CLHS that a given implementation 
might not heed the (proclaim '(inline md-awaken-slot))? Come to think of 
it, what advantage does proclaim-inline have over using a macro?

Perhaps irrelevant: I do have an idea for a way to avoid the massive 
recursion (is it massive?) algorithmically, but not sure it will work. 
Some of the recursion tasks could be pushed onto a queue and processed 
iteratively.

* ACL Trial? Don't ask. Barely get the thing compiled (over several 
sessions) with their heap limit.

-- 

  kenny tilton
  clinisys, inc
  http://www.tilton-technology.com/
  ---------------------------------------------------------------
"Everything is a cell." -- Alan Kay

From: Peter Buchlovsky
Subject: Re: Deep Cello: Conserving stack
Date: 
Message-ID: <5ago9vc0p2de2pc6h1um7csn46grp6gjok@4ax.com>
On Fri, 11 Apr 2003 18:11:41 GMT, Kenny Tilton <·······@nyc.rr.com>
wrote:

>My immediate problem is getting Cloucell, the "Cello Inside" universal 
>inspector, to run on the LW trial edition. I want win32 paupers to be 
>able to play with Cello. (so far no luck getting CLisp or CormanCL to 
>run Cello (Cells yes, Cello no in both cases), but those can be re-visited.)
>
>Actually, it runs on LW-trial if I inspect something tiny like a Cell, 
>but blows out the LW* 1600 stack limit if I inspect the 80-slot window 
>instance.

[snip rest]

You can increase the stack limit all the way to 64000. (I had to do it
to get the Screamer package to compile.) Do it by going to Tools ->
Preferences -> Listener tab. AFAIK the setting only affects the
Listener.

-- 
Peter
From: Kenny Tilton
Subject: Re: Deep Cello: Conserving stack
Date: 
Message-ID: <3E9C5417.4060807@nyc.rr.com>
Peter Buchlovsky wrote:
> On Fri, 11 Apr 2003 18:11:41 GMT, Kenny Tilton <·······@nyc.rr.com>
> wrote:
> 
> 
>>My immediate problem is getting Cloucell, the "Cello Inside" universal 
>>inspector, to run on the LW trial edition. I want win32 paupers to be 
>>able to play with Cello. (so far no luck getting CLisp or CormanCL to 
>>run Cello (Cells yes, Cello no in both cases), but those can be re-visited.)
>>
>>Actually, it runs on LW-trial if I inspect something tiny like a Cell, 
>>but blows out the LW* 1600 stack limit if I inspect the 80-slot window 
>>instance.
> 
> 
> [snip rest]
> 
> You can increase the stack limit all the way to 64000. (I had to do it
> to get the Screamer package to compile.) Do it by going to Tools ->
> Preferences -> Listener tab. AFAIK the setting only affects the
> Listener.
> 

Thx.

Turns out a simple but fundamental tweak of the Cells internals avoids 
what was after all a mad stress test of the stack. Good thing it is 
virtual. On top of that, the tweak makes things a little zippier.

In short, the stress of the artificial stack limitation exposed a 
fundamental flaw present for seven years, quietly sucking resources. Cool.

Maybe I should use your hack to /lower/ the stack limit to 8000. :)

-- 

  kenny tilton
  clinisys, inc
  http://www.tilton-technology.com/
  ---------------------------------------------------------------
"Everything is a cell." -- Alan Kay