hraban / cl-containers

Containers Library for Common Lisp
http://common-lisp.net/project/cl-containers/
Other
65 stars 13 forks source link

Extend ring-buffer to support deletions and LIFO (Emacs' ring style) #10

Open Ambrevar opened 5 years ago

Ambrevar commented 5 years ago

As discussed here: https://old.reddit.com/r/Common_Lisp/comments/d3pc4e/a_library_for_emacs_ring_structure/

the current ring-buffer structure lacks 2 functionalities in my opinion:

I can see 2 options here:

I can work on a patch. What do you think?

gwkkwg commented 5 years ago

Hi Pierre,

Both of those sound like good changes / ideas. As is probably obvious from the commit history, I’m not Lisping much these days so if you’d like to make a patch, that would be great. I’m also happy to give you full access to CL-Containers if you’d like to take over.

On Sep 14, 2019, at 10:24 AM, Pierre Neidhardt notifications@github.com wrote:

As discussed here: https://old.reddit.com/r/Common_Lisp/comments/d3pc4e/a_library_for_emacs_ring_structure/ https://old.reddit.com/r/Common_Lisp/comments/d3pc4e/a_library_for_emacs_ring_structure/ the current ring-buffer structure lacks 2 functionalities in my opinion:

We can't delete arbitrary elements. It's only FIFO, so it's not so convenient to use for histories, where we'd last the most recent element first. I can see 2 options here:

either we create a new data structure; or we add an option to the ring-data structure to change the order and a method to delete elements. I can work on a patch. What do you think?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gwkkwg/cl-containers/issues/10?email_source=notifications&email_token=AABHOIFS7OVZO2YEQLL3J5TQJTXZFA5CNFSM4IWXF2F2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HLMFKWQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AABHOIFKCAVOPC7NHREUTPLQJTXZFANCNFSM4IWXF2FQ.

Ambrevar commented 5 years ago

Hi!

Sure, I'll work on a patch then. I'd be happy to take over maintenance too, thanks for trusting me with that ;)

gwkkwg commented 5 years ago

Hi Pierre,

I've (finally) made you a contributor. You should have a received an invite.

Let me know if there is anything I need to do.

thanks