Subject: Re: large hashtable crashes SBCL and GCL
From: rpw3@rpw3.org (Rob Warnock)
Date: Thu, 21 Aug 2008 07:36:31 -0500
Newsgroups: comp.lang.lisp
Message-ID: <TZSdnV2I5obS_DDVnZ2dnUVZ_sTinZ2d@speakeasy.net>
Richard J. Fateman <fateman@eecs.berkeley.edu> wrote:
+---------------
| The reason I had no *earmuffs* is that I was typing x and y in 
| repeatedly for tests, and didn't want to type *x* and *y* so much.
+---------------

Use DEFLEX to get (well, simulate) top-level lexical variables:

    http://rpw3.org/hacks/lisp/deflex.lisp

[There are lots of other variations on the theme; that's just
the one I wrote & use.]

Then you can define all the short REPL variables you want without
accidentally rebinding global specials, e.g.:

    > (deflex foo 23)

    FOO
    > (defun foo () foo)

    FOO
    > (defvar bar 91)     ; UNSAFE!! Should be named *BAR*

    BAR
    > (defun bar () bar)

    BAR
    > (let ((foo 37)
            (bar 103))
        (list foo (foo) bar (bar)))

    (37 23 103 103)
    > 

Does that help?


-Rob

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607