From: Allan Adler
Subject: obstack
Date: 
Message-ID: <y93acnu82o9.fsf@nestle.csail.mit.edu>
A few decades ago, the dialects of Lisp I was familiar with, mostly
as substrates for symbolic algebra packages, had something called
an obstack. If you typed (obstack) you got an endless printout of
every object known to Lisp, or so it seemed. I never saw the source
code and wasn't particularly good at lisp anyway, so I never got
any deeper into it than that, although I did wonder about the objects
whose names were streaming down the page.

Anyway, I'd still like to understand the obstack. Maybe there isn't one
in Common Lisp (or maybe it is well hidden), but I'd settle for some C
source code for a small dialect of Lisp of that still features an obstack.
In fact, Common Lisp is probably way too big for me to study the source code.

It would also be nice to know, since it is apparently intended to be called
a stack, just how much its use resembles that of other stacks, e.g. the one in
postscript. Also, if there really is not an obstack in Common Lisp, how does
it manage without it?
-- 
Ignorantly,
Allan Adler <···@zurich.csail.mit.edu>
* Disclaimer: I am a guest and *not* a member of the MIT CSAIL. My actions and
* comments do not reflect in any way on MIT. Also, I am nowhere near Boston.

From: Christopher C. Stacy
Subject: Re: obstack
Date: 
Message-ID: <u3btlud54.fsf@news.dtpq.com>
I have never heard of this OBSTACK of which you speak.

(I've been around Lisp forever, but I'm sure that I haven't 
seen everything.  For example, I never used INTERLISP.)

It's easy to write a program to print out all of the symbols
known to Lisp, and which objects are associated with them.
Or you might like the APROPOS function, which lets you search
for things by name.

What is it exactly that you want to do?  An "endless printout 
of every object known to Lisp" seems fairly useless to me.
From: Rob Warnock
Subject: Re: obstack
Date: 
Message-ID: <kpidnYb4luC7vfvfRVn-pQ@speakeasy.net>
Christopher C. Stacy <······@news.dtpq.com> wrote:
+---------------
| I have never heard of this OBSTACK of which you speak.
+---------------

I suspect he meant either OBLIST or OBARRAY, predecessors to the
modern per-package internal hash-table of symbols. From Graham's
"On Lisp" <http://www.paulgraham.com/lib/paulgraham/onlisp.pdf>,
"Appendix: Packages":

    Packages are Common Lisp's way of grouping code into modules.
    Early dialects of Lisp contained a symbol-table, called the oblist,
    which listed all the symbols read so far by the system. Through
    a symbol's entry on the oblist, the system had access to things
    like its value and its property list. A symbol listed in the oblist
    was said to be interned.

    Recent dialects of Lisp have split the concept of the oblist
    into multiple packages. Now a symbol is not merely interned,
    but interned in a particular package.  ...

And page 12 of Gabriel and Steele's "Evolution of Lisp" (the "uncut"
version <http://www.dreamsongs.com/NewFiles/HOPL2-Uncut.pdf>) says:

    In 1971, Jon L White (sic) changed the representation of the data
    structure that maps names (strings) to symbols from a list to a
    hash table [White, 19691982]; thus the traditional OBLIST (list of
    objects, that is, named atoms) of Lisp 1.5 was renamed the OBARRAY.
    This signaled a move to a more careful choice of data structures
    to optimize size or speed. Later implementations of Lisp relied
    even more heavily on hash tables for parts of their implementations.
    The introduction of the OBARRAY marked an important step in the
    increase of sophistication of Lisp implementors.


-Rob

-----
Rob Warnock			<····@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607
From: Christopher C. Stacy
Subject: Re: obstack
Date: 
Message-ID: <ull7dd7ye.fsf@news.dtpq.com>
····@rpw3.org (Rob Warnock) writes:

> Christopher C. Stacy <······@news.dtpq.com> wrote:
> +---------------
> | I have never heard of this OBSTACK of which you speak.
> +---------------
> 
> I suspect he meant either OBLIST or OBARRAY, predecessors to the
> modern per-package internal hash-table of symbols.

I would have thought so too, except that he specifically 
was asking about its stack nature.
From: Allan Adler
Subject: Re: obstack
Date: 
Message-ID: <y938y3d8ita.fsf@nestle.csail.mit.edu>
······@news.dtpq.com (Christopher C. Stacy) writes:

> ····@rpw3.org (Rob Warnock) writes:
> > Christopher C. Stacy <······@news.dtpq.com> wrote:
> > +---------------
> > | I have never heard of this OBSTACK of which you speak.
> > +---------------
> > I suspect he meant either OBLIST or OBARRAY, predecessors to the
> > modern per-package internal hash-table of symbols.
> I would have thought so too, except that he specifically 
> was asking about its stack nature.

I was confused. It was the oblist. I'm not absolutely sure it was never
called the obstack (e.g. maybe in the substrate of mu-math), but I mostly
remember oblist. The source of the confusion was probably looking at GNU
C Compiler stuff, which has something called a struct obstack, e.g. see
http://www.gnu.org/software/libc/manual/html_node/Allocation-in-an-Obstack.html

After that conflation, it was easy to hallucinate that maybe the oblist
had some stack features. Thanks to all for answering the parts of my question
that made sense.

I've download onlisp.pdf and will see what else I can learn from it.
-- 
Ignorantly,
Allan Adler <···@zurich.csail.mit.edu>
* Disclaimer: I am a guest and *not* a member of the MIT CSAIL. My actions and
* comments do not reflect in any way on MIT. Also, I am nowhere near Boston.
From: Paul Tarvydas
Subject: Re: obstack
Date: 
Message-ID: <QJydnXOFiL2iJfvfRVn-tA@rogers.com>
I remember it being more utilitarian / pedestrian: in Fritz van der
Wateren's Lisp for the 6800 (and maybe Lisp 1.5 and others?) the OBLIST
variable, or (OBLIST) function, was a magic object (like NIL) known to the
garbage collector.  Anything on the OBLIST or reachable from it (likewise
the stack, and registers) was considered "live" and was not reclaimed by
the garbage collector.  The reader created (intern'ed) a new symbol every
time it tokenized something it hadn't seen before and plunked it onto the
OBLIST.  Top level functions (FEXPRs and EXPRs) would avoid being garbage
collected into oblivion by being putprop'ed onto the property lists of
these interned symbols (thus, being reachable from the OBLIST and
considered "live").

pt
From: Debian User
Subject: Re: obstack
Date: 
Message-ID: <4266ae5c$0$78288$dbd45001@news.wanadoo.nl>
On 20 Apr 2005 00:58:30 -0400, Allan Adler <···@nestle.csail.mit.edu> wrote:
> 
> 
> Anyway, I'd still like to understand the obstack. Maybe there isn't one
> in Common Lisp (or maybe it is well hidden), but I'd settle for some C
> source code for a small dialect of Lisp of that still features an obstack.
> In fact, Common Lisp is probably way too big for me to study the source code.
> 

Have a look at the xlisp source code, written in C.  Especially the
versions 1.xx.
From: Allan Adler
Subject: Re: obstack
Date: 
Message-ID: <y93zmvsr0cr.fsf@nestle.csail.mit.edu>
Debian User <···@xxxx.xx> writes:

> Have a look at the xlisp source code, written in C.  Especially the
> versions 1.xx.

Where does one get this old version?
-- 
Ignorantly,
Allan Adler <···@zurich.csail.mit.edu>
* Disclaimer: I am a guest and *not* a member of the MIT CSAIL. My actions and
* comments do not reflect in any way on MIT. Also, I am nowhere near Boston.
From: Debian User
Subject: Re: obstack
Date: 
Message-ID: <4268086b$0$44350$dbd4d001@news.wanadoo.nl>
On 21 Apr 2005 04:38:12 -0400, Allan Adler <···@nestle.csail.mit.edu> wrote:
> Debian User <···@xxxx.xx> writes:
> 
>> Have a look at the xlisp source code, written in C.  Especially the
>> versions 1.xx.
> 
> Where does one get this old version?

have a look at:

http://ftp.uniroma2.it/unix/comp.sources.unix/volume6/xlisp1.6/