Re: Skiplist duplicates

2015-03-24 Thread William A. Rowe Jr.
On Fri, 13 Mar 2015 08:56:14 -0400 Jeff Trawick traw...@gmail.com wrote: On Fri, Mar 13, 2015 at 8:51 AM, Jim Jagielski j...@jagunet.com wrote: On Mar 13, 2015, at 8:04 AM, Yann Ylavic ylavic@gmail.com wrote: It seems that the implementation is not that broken actually.

Re: Skiplist duplicates

2015-03-13 Thread Branko Čibej
On 12.03.2015 18:36, Jim Jagielski wrote: No, it's a design error. There's not much helping that... once it ships, that's our implementation. Might caution us to provide more careful code review before n.n.0 releases on new features. S if apr_snprintf(%d were to, on every 50th int,

Re: Skiplist duplicates

2015-03-13 Thread Jim Jagielski
S if apr_snprintf(%d were to, on every 50th int, print it out in decimal form, that would be a design error? :) That's a terrible analogy :) Yeah, I agree. If so, how can we call it a skiplist which has a set of compliant expectations? It's not a skiplist implementation at

Re: Skiplist duplicates

2015-03-13 Thread Jeff Trawick
On Fri, Mar 13, 2015 at 8:51 AM, Jim Jagielski j...@jagunet.com wrote: On Mar 13, 2015, at 8:04 AM, Yann Ylavic ylavic@gmail.com wrote: It seems that the implementation is not that broken actually. One can still have the add semantic with insert() in 1.5.x by using the

Re: Skiplist duplicates

2015-03-13 Thread Yann Ylavic
It seems that the implementation is not that broken actually. One can still have the add semantic with insert() in 1.5.x by using the appropriate compare function and apr_skiplist_insert_compare(), that is, a function that does not return 0 when entries are equal, but rather 0 for LIFO or 0 for

Re: Skiplist duplicates

2015-03-13 Thread Jim Jagielski
On Mar 13, 2015, at 8:04 AM, Yann Ylavic ylavic@gmail.com wrote: It seems that the implementation is not that broken actually. One can still have the add semantic with insert() in 1.5.x by using the appropriate compare function and apr_skiplist_insert_compare(), that is, a function

Re: Skiplist duplicates

2015-03-12 Thread William A. Rowe Jr.
On Sat, 7 Mar 2015 10:57:22 -0500 Jim Jagielski j...@jagunet.com wrote: On Mar 7, 2015, at 2:30 AM, William A. Rowe Jr. wr...@rowe-clan.net wrote: On Thu, 5 Mar 2015 11:19:40 -0500 Jim Jagielski j...@jagunet.com wrote: After doing some additional research, I think that the

Re: Skiplist duplicates

2015-03-12 Thread Jim Jagielski
No, it's a design error. There's not much helping that... once it ships, that's our implementation. Might caution us to provide more careful code review before n.n.0 releases on new features. S if apr_snprintf(%d were to, on every 50th int, print it out in decimal form, that would

Re: Skiplist duplicates

2015-03-12 Thread Jim Jagielski
On Mar 12, 2015, at 1:36 PM, Jim Jagielski j...@jagunet.com wrote: No, it's a design error. There's not much helping that... once it ships, that's our implementation. Might caution us to provide more careful code review before n.n.0 releases on new features. S if

Re: Skiplist duplicates

2015-03-12 Thread Jeff Trawick
On Thu, Mar 12, 2015 at 1:36 PM, Jim Jagielski j...@jagunet.com wrote: No, it's a design error. There's not much helping that... once it ships, that's our implementation. Might caution us to provide more careful code review before n.n.0 releases on new features. S if

Re: Skiplist duplicates

2015-03-12 Thread William A. Rowe Jr.
On Thu, 12 Mar 2015 13:36:55 -0400 Jim Jagielski j...@jagunet.com wrote: No, it's a design error. There's not much helping that... once it ships, that's our implementation. Might caution us to provide more careful code review before n.n.0 releases on new features. S if

Re: Skiplist duplicates

2015-03-07 Thread Yann Ylavic
On Sat, Mar 7, 2015 at 8:30 AM, William A. Rowe Jr. wr...@rowe-clan.net wrote: On Thu, 5 Mar 2015 11:19:40 -0500 Jim Jagielski j...@jagunet.com wrote: After doing some additional research, I think that the current implementation of NOT allowing duplicates (in APR 1.5/1.6) is BROKEN. In trunk

Re: Skiplist duplicates

2015-03-07 Thread Yann Ylavic
On Sat, Mar 7, 2015 at 1:10 PM, Jeff Trawick traw...@gmail.com wrote: On Sat, Mar 7, 2015 at 5:03 AM, Yann Ylavic ylavic@gmail.com wrote: On Sat, Mar 7, 2015 at 8:30 AM, William A. Rowe Jr. wr...@rowe-clan.net wrote: On Thu, 5 Mar 2015 11:19:40 -0500 Jim Jagielski j...@jagunet.com

Re: Skiplist duplicates

2015-03-07 Thread Yann Ylavic
On Sat, Mar 7, 2015 at 11:03 AM, Yann Ylavic ylavic@gmail.com wrote: It would be to give apr_skiplist_insert_compare(), which exists in 1.5.x, the add semantic when its compare function arg is NULL. Note this wouldn't break any assumption on apr_skiplist_insert_compare() since the current

Re: Skiplist duplicates

2015-03-07 Thread Jim Jagielski
On Mar 7, 2015, at 2:30 AM, William A. Rowe Jr. wr...@rowe-clan.net wrote: On Thu, 5 Mar 2015 11:19:40 -0500 Jim Jagielski j...@jagunet.com wrote: After doing some additional research, I think that the current implementation of NOT allowing duplicates (in APR 1.5/1.6) is BROKEN. In

Re: Skiplist duplicates

2015-03-07 Thread Jeff Trawick
On Sat, Mar 7, 2015 at 5:03 AM, Yann Ylavic ylavic@gmail.com wrote: On Sat, Mar 7, 2015 at 8:30 AM, William A. Rowe Jr. wr...@rowe-clan.net wrote: On Thu, 5 Mar 2015 11:19:40 -0500 Jim Jagielski j...@jagunet.com wrote: After doing some additional research, I think that the current

Re: Skiplist duplicates

2015-03-05 Thread Jim Jagielski
Plus, the way we do it in trunk breaks the skiplist stability requirement, so that needs to be fixed as well. On Mar 5, 2015, at 11:19 AM, Jim Jagielski j...@jagunet.com wrote: After doing some additional research, I think that the current implementation of NOT allowing duplicates (in APR

Skiplist duplicates

2015-03-05 Thread Jim Jagielski
After doing some additional research, I think that the current implementation of NOT allowing duplicates (in APR 1.5/1.6) is BROKEN. In trunk this is determined by a flag w/ the insert statement, but the default *should* be to allow dups. As such, I'd like to adjust 1.5/1.6 to the correct and,

Re: Skiplist duplicates

2015-03-05 Thread Ruediger Pluem
On 03/05/2015 05:19 PM, Jim Jagielski wrote: After doing some additional research, I think that the current implementation of NOT allowing duplicates (in APR 1.5/1.6) is BROKEN. In trunk this is determined by a flag w/ the insert statement, but the default *should* be to allow dups. As

Re: Skiplist duplicates

2015-03-05 Thread Jim Jagielski
No, we didn't. But the current behavior is broken, so if people are expecting our skiplists to act like real skiplists, it will fail. I think fixing broken should be allowed... On Mar 5, 2015, at 11:29 AM, Ruediger Pluem rpl...@apache.org wrote: On 03/05/2015 05:19 PM, Jim Jagielski