[climacs-devel] A little on rings
Robert Strandh
strandh at labri.fr
Sun Dec 26 14:02:03 UTC 2004
Hello Elliott,
Elliott Johnson writes:
>
> Hope everyone's holidays have been going well. :)
Sure, lots of hacking.
> I've hardly had time but I've worked up a ring.lisp file. It's
> fairly simple. Classes for generic ring & kill-ring, plus generic
> functions for ring-push, ring-pop, rotate-ring, initialize-kill-ring,
> and kill-in-region.
Sounds good.
> The kill-ring structure is nothing outstanding right now either,
> simply a slot-value for an array, a max size fixnum, and a offset
> fixnum. The kill-ring being a vector can handle any valid lisp
> structure, so weird cuts and inserts are no problem.
>
> If anyone else has cool ideas or better implementations for rings,
> please speak up.
Yes, in fact, if you are going to rotate it and/or do arbitrary
inserts and deletes, a flexichain is particularly useful. And if you
want an offset into the kill ring, you might do that with a
flexicursor into a cursorchain. All of this is in the flexichain
library already used for the buffer data structure, so no extra
libraries necessary.
> Things I still need to do: create a few helper functions (inspired
> by hemlock) and create the CLIM commands, keybindings, etc, so I'll
> have it down before leaving for LA. Cl.net guys havn't replied to
> my account email yet, so hopefully that comes togeather as well.
> If not I'll email it before I go :)
No rush. I'd say wait for the account.
Have a nice trip.
--
Robert Strandh
---------------------------------------------------------------------
Greenspun's Tenth Rule of Programming: any sufficiently complicated C
or Fortran program contains an ad hoc informally-specified bug-ridden
slow implementation of half of Common Lisp.
---------------------------------------------------------------------
More information about the climacs-devel
mailing list