Re: [stack] What are the advantages and disadvantages in manipulation of the return stack

stevan apter <[email protected]> Mon, 14 Jun 2010 09:45:41 -0400
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
here's chris's page on his implementation:

	http://old.nabble.com/XY-implementation-in-JavaScript-td22048844.html

as i wrote to him a while ago, i'm amazed that he was able to make
sense of it.  :-)

On Jun 14, 2010, at 5:10 AM, blazeski wrote:

> I've created an interpreter for a stack language in c++:
> Currently it supports: 
> - data types : int , float, char, void will add later double,enum 
> - operations + - * / abs 
> - define 
> Support for scrips is approaching completion.
> However I'm little confused about what primitives should I offer beside the above. My implementations runs by using a DEQUE holding parsed but unevaluated syntax tree [ future of computation] and a "STACK" holding evaluated values [past of the computation]. I've ripped of Steven Apter XY (*) because that looked like the easiest to implement.
> Now I'm confused about what primitives should I have in the core. The ones offered by XY seems far different then classical base (swap, dup, drop, dip, cons, uncons, null, and if). Also XY offers manipulation of the return stack, or queue(**) . 
> So what are the upsides and downsides of allowing programmer to manipulate the return stack? 
> 
> (*)http://www.nsl.com/k/xy/xy.htm
> (**) Though it looks like a deck to me:
> <= moves the tail of the queue to the top of the stack:
> / prepends to the queue the item found at the top of the stack.
> 
> 



[Non-text portions of this message have been removed]



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/concatenative/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/concatenative/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/