🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ti.explorer
Article #154

Substitute for REMOVE

#154
From: Dan Cerys
Date: Fri, 01 Dec 1989 16:03
24 lines
1733 bytes
Are you sure that the GCLISP on your PC is really a Common Lisp?  Maybe
it's just an older version.  Seems like a simple bug for the Gold Hill
folks to fix.

Anyways, to get around the problem: shadow LISP:REMOVE for your package(s).
(packages are supported, aren't they).  Add your own REMOVE such that it is
accessible in all packages that care.  This REMOVE can either be a function
that calls LISP:REMOVE in the non-count cases, using your own code when
:count is supplied.  If you are a real speed daemon, make your REMOVE a
macro that simply expands to LISP:REMOVE in the non-:count cases (saving
you an extra function call (as if it really matters at the speed your PC
will be running :-) )).

For the random number generator (and many other generators, and numeric
algorithms), a fantastic reference is Numerical Recipes.  It provides great
explanations and sample code (in Pascal/Fortran) that you can translate to
Lisp.  In fact, I use the shadow trick I mentioned for REMOVE to shadow
RANDOM so that I can plug in (in a portable manner) different random number
generators (for when I want to care about things like being able to reproduce
the same random sequence on different implementations).

Good luck on the PC!  Boy, I envy you! :-)

Dan
Technical Details
Message-ID: <8912011620.AA19952@sumex-aim.stanford.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!BBN.COM!cerys
References: <8912011405.AA05163@umbc3.umbc.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!BBN.COM!cerys
From: cerys@BBN.COM (Dan Cerys)
Newsgroups: comp.sys.ti.explorer
Subject: Substitute for REMOVE
Message-ID: <8912011620.AA19952@sumex-aim.stanford.edu>
Date: 1 Dec 89 16:03:27 GMT
References: <8912011405.AA05163@umbc3.umbc.edu>
Sender: daemon@ucbvax.BERKELEY.EDU
Distribution: inet
Organization: Bolt Beranek and Newman Inc. (STC)
Lines: 24