<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Ah. Well, interval:delete doesn’t work that way. It doesn’t return an interval tree, it returns the interval that has (supposedly) just been deleted, along with a flag that tells you whether or not that interval was actually present before deletion.<div><br><div><div>On Oct 26, 2018, at 9:08 AM, Hans Hübner <<a href="mailto:hans.huebner@gmail.com">hans.huebner@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div dir="ltr">Ron,<div><br></div><div>quoting <a href="http://clhs.lisp.se/Body/f_rm_rm.htm">http://clhs.lisp.se/Body/f_rm_rm.htm</a></div><div><br></div><div><a rel="DEFINITION" href="http://clhs.lisp.se/Body/f_rm_rm.htm#delete" style="font-family: Times; font-size: inherit;"><b>delete</b></a><span style="font-family: Times; font-size: inherit;">, </span><a rel="DEFINITION" href="http://clhs.lisp.se/Body/f_rm_rm.htm#delete-if" style="font-family: Times; font-size: inherit;"><b>delete-if</b></a><span style="font-family: Times; font-size: inherit;">, and </span><a rel="DEFINITION" href="http://clhs.lisp.se/Body/f_rm_rm.htm#delete-if-not" style="font-family: Times; font-size: inherit;"><b>delete-if-not</b></a><span style="font-family: Times; font-size: inherit;"> return a </span><a rel="DEFINITION" href="http://clhs.lisp.se/Body/26_glo_s.htm#sequence" style="font-family: Times; font-size: inherit;"><i>sequence</i></a><span style="font-family: Times; font-size: inherit;"> of the same </span><a rel="DEFINITION" href="http://clhs.lisp.se/Body/26_glo_t.htm#type" style="font-family: Times; font-size: inherit;"><i>type</i></a><span style="font-family: Times; font-size: inherit;"> as </span><i style="font-family: Times; font-size: inherit;">sequence</i><span style="font-family: Times; font-size: inherit;"> that has the same elements except that those in the subsequence </span><a rel="DEFINITION" href="http://clhs.lisp.se/Body/26_glo_b.htm#bounded" style="font-family: Times; font-size: inherit;"><i>bounded</i></a><span style="font-family: Times; font-size: inherit;"> by </span><i style="font-family: Times; font-size: inherit;">start</i><span style="font-family: Times; font-size: inherit;"> and </span><i style="font-family: Times; font-size: inherit;">end</i><span style="font-family: Times; font-size: inherit;"> and </span><i style="font-family: Times; font-size: inherit;">satisfying the test</i><span style="font-family: Times; font-size: inherit;">have been deleted. </span><i style="font-family: Times; font-size: inherit;">Sequence</i><span style="font-family: Times; font-size: inherit;"> may be destroyed and used to construct the result; however, the result might or might not be </span><a rel="DEFINITION" href="http://clhs.lisp.se/Body/26_glo_i.htm#identical" style="font-family: Times; font-size: inherit;"><i>identical</i></a><span style="font-family: Times; font-size: inherit;"> to </span><i style="font-family: Times; font-size: inherit;">sequence</i><br></div><div><br></div><div>`DELETE` is an optimization to `REMOVE` that may destroy the sequence if it has to. Still, you need to save the return value of `DELETE` as there is no guarantee that the sequence is modified in-place. I'd assume that `interval:delete` works the same way.</div><div><br></div><div>-Hans</div></div></div><br><div class="gmail_quote"><div dir="ltr">Am Fr., 26. Okt. 2018 um 18:01 Uhr schrieb Ron Garret <<a href="mailto:ron@flownet.com">ron@flownet.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Yeah, pretty sure. What would I use it for?<div><br></div><div>(BTW, I’m pretty sure this is a real bug and not just user error, but if I’m wrong about that I’ll still pay the bounty to whoever shows me what I’m doing wrong. Ultimately, all I care about is having interval-tree code that’s reliable, efficient, and not too messy. I don’t really care about fixing this bug per se, though I do think that is the easiest path from A to B. But if someone wanted to, say, do a complete re-implentation that would probably be OK, but you should check with me first.)</div><div><br></div><div>rg</div><div><br><div><div>On Oct 26, 2018, at 8:50 AM, Hans Hübner <<a href="mailto:hans.huebner@gmail.com" target="_blank">hans.huebner@gmail.com</a>> wrote:</div><br class="m_3729550991641494182Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Ron,<div><br></div><div>are you sure you don't need to use the return value of `interval:delete`?</div><div><br></div><div>-Hans</div></div><br><div class="gmail_quote"><div dir="ltr">Am Fr., 26. Okt. 2018 um 17:46 Uhr schrieb Ron Garret <<a href="mailto:ron@flownet.com" target="_blank">ron@flownet.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This is not a CCL bug, but all the cool kids seem to hang out here so...<br>
<br>
I hereby offer a $500 bug bounty to the first person to publish a fix for this issue:<br>
<br>
<a href="https://github.com/rpav/cl-interval/issues/5" rel="noreferrer" target="_blank">https://github.com/rpav/cl-interval/issues/5</a><br>
<br>
This offer expires on Friday, Nov 9, 2018. That’s not a hard deadline — if you need more time I can accommodate you. I just don’t want someone trying to claim the bounty a year from now. Also, I will need your SSN or TIN so I can send you a 1099.<br>
<br>
If you want to take this on, contact me off-list for some additional info and test cases to help you get started.<br>
<br>
rg<br>
<br>
_______________________________________________<br>
Openmcl-devel mailing list<br>
<a href="mailto:Openmcl-devel@clozure.com" target="_blank">Openmcl-devel@clozure.com</a><br>
<a href="https://lists.clozure.com/mailman/listinfo/openmcl-devel" rel="noreferrer" target="_blank">https://lists.clozure.com/mailman/listinfo/openmcl-devel</a><br>
</blockquote></div>
</blockquote></div><br></div></div></blockquote></div>
</blockquote></div><br></div></body></html>