unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* etymology of obarray
@ 2014-05-16 16:33 Joe Riel
  0 siblings, 0 replies; 5+ messages in thread
From: Joe Riel @ 2014-05-16 16:33 UTC (permalink / raw)
  To: Help GNU Emacs

Where does the word obarray originate?  What is "ob"?

-- 
Joe Riel




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: etymology of obarray
       [not found] <mailman.1490.1400258061.1147.help-gnu-emacs@gnu.org>
@ 2014-05-16 17:57 ` Emanuel Berg
  2014-05-16 18:41   ` Pascal J. Bourguignon
  2014-05-16 18:25 ` B. T. Raven
  1 sibling, 1 reply; 5+ messages in thread
From: Emanuel Berg @ 2014-05-16 17:57 UTC (permalink / raw)
  To: help-gnu-emacs

Joe Riel <joer@san.rr.com> writes:

> Where does the word obarray originate?  What is "ob"?

Object, perhaps? Just a guess, but if you are
interested in the obarray in general I remember asking
about it way back - because as I recall, the
documentation was cryptic to say the least - and there
were some very advanced replies, as I remember. So hit
the archives, look for Emanuel Berg and "obarray" in
the Subject header. Report back everything you learn :)

As I recall, the obarray is a data structure (some kind
of hash table) to store stuff dynamically (i.e., not
just in memory) so that you can filter and do stuff
with it - for example, to provide the set of operands
possible after you invoke a command.

-- 
underground experts united:
http://user.it.uu.se/~embe8573


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: etymology of obarray
       [not found] <mailman.1490.1400258061.1147.help-gnu-emacs@gnu.org>
  2014-05-16 17:57 ` Emanuel Berg
@ 2014-05-16 18:25 ` B. T. Raven
  2014-05-16 18:46   ` Emanuel Berg
  1 sibling, 1 reply; 5+ messages in thread
From: B. T. Raven @ 2014-05-16 18:25 UTC (permalink / raw)
  To: help-gnu-emacs



> Where does the word obarray originate?  What is "ob"?
> 

I think it's 'object', i.e. anything that (type-of) returns. E.g.
(type-of 'type-of) returns > symbol, (type-of 1) returns > integer, etc.
There is or was also an oblist, which includes the same kind of info in
a list rather than a vector.

Ed


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: etymology of obarray
  2014-05-16 17:57 ` Emanuel Berg
@ 2014-05-16 18:41   ` Pascal J. Bourguignon
  0 siblings, 0 replies; 5+ messages in thread
From: Pascal J. Bourguignon @ 2014-05-16 18:41 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg <embe8573@student.uu.se> writes:

> Joe Riel <joer@san.rr.com> writes:
>
>> Where does the word obarray originate?  What is "ob"?
>
> Object, perhaps? Just a guess, but if you are

Yes, Object Array.

It already existed in MACLISP:
 http://www.maclisp.info/pitmanual/symbol.html

Originally, in LISP 1.5, it was an OBLIST.
cf. page 12 of http://www.dreamsongs.com/Files/HOPL2-Uncut.pdf

And in LISP 1.5 we have those occurences of OBLIST:

grep -niH -e oblist lisp15.asm
lisp15.asm:1531:       AXC     OBLIST,2           POINTER TO OBJECT LIST
lisp15.asm:1534:       RNT     DEBUGI             SKIP MARKING OBLIST IF IN A DEBUG
lisp15.asm:8871:OBLIST SYN     BUCKET
lisp15.asm:8951:               OBLBA,,-*-1        OBLIST OBJECT                         GENER068
lisp15.asm:9921:               -OBLIST                                                  GPLI0823
lisp15.asm:9923:               -*-1               OBLIST                                GPLI0825

> interested in the obarray in general I remember asking
> about it way back - because as I recall, the
> documentation was cryptic to say the least - and there
> were some very advanced replies, as I remember. So hit
> the archives, look for Emanuel Berg and "obarray" in
> the Subject header. Report back everything you learn :)
>
> As I recall, the obarray is a data structure (some kind
> of hash table) to store stuff dynamically (i.e., not
> just in memory) so that you can filter and do stuff
> with it - for example, to provide the set of operands
> possible after you invoke a command.

-- 
__Pascal Bourguignon__
http://www.informatimago.com/
"Le mercure monte ?  C'est le moment d'acheter !"


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: etymology of obarray
  2014-05-16 18:25 ` B. T. Raven
@ 2014-05-16 18:46   ` Emanuel Berg
  0 siblings, 0 replies; 5+ messages in thread
From: Emanuel Berg @ 2014-05-16 18:46 UTC (permalink / raw)
  To: help-gnu-emacs

"B. T. Raven" <btraven@nihilo.net> writes:

>> Where does the word obarray originate?  What is
>> "ob"?
>
> I think it's 'object', i.e. anything that (type-of)
> returns. E.g.  (type-of 'type-of) returns > symbol,
> (type-of 1) returns > integer, etc.  There is or was
> also an oblist, which includes the same kind of info
> in a list rather than a vector.

The documentation - (describe-variable 'obarray) -
reads:

    Symbol table for use by `intern' and `read'.
    It is a vector whose length ought to be prime for best results.
    The vector's contents don't make sense if examined from Lisp programs;
    to find all the symbols in an obarray, use `mapatoms'.

Crystal clear! :)

Here is an example of how to use the obarray - to echo
simple variable values without fuss -

(defun describe-variable-short (var)
  (interactive
   (let*((v            (variable-at-point))
         (var-at-point (not (eq v 0)))
         (v-name       (if var-at-point (symbol-name v)))
         (v-final
          (completing-read
           (format " variable%s: " (if var-at-point
                                       (format " (default %s)" v)
                                       ""))
           obarray
           (lambda (vv)
             (or (get vv 'variable-documentation)
                 (boundp vv) ))
           t    ; require match
           nil  ; no insert to minibuffer (?)
           nil  ; no history
           v-name
          )))
   `(,(intern v-final)) ))
  (message (format " %s: %s" (symbol-name var) (symbol-value var))) )

-- 
underground experts united:
http://user.it.uu.se/~embe8573


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-05-16 18:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-16 16:33 etymology of obarray Joe Riel
     [not found] <mailman.1490.1400258061.1147.help-gnu-emacs@gnu.org>
2014-05-16 17:57 ` Emanuel Berg
2014-05-16 18:41   ` Pascal J. Bourguignon
2014-05-16 18:25 ` B. T. Raven
2014-05-16 18:46   ` Emanuel Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).