www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Efficient binary search using two-way comparisons

reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
While reading Okasaki's bool on persistent data structures, I found 
(page 14) a reference to a nice idea applicable to binary search using 
D's two-way "less than" comparisons.

https://issues.dlang.org/show_bug.cgi?id=15385

Any takers?


Andrei
Nov 28 2015
parent reply Enamex <enamex+d outlook.com> writes:
On Saturday, 28 November 2015 at 20:04:11 UTC, Andrei 
Alexandrescu wrote:
 While reading Okasaki's bool on persistent data structures, I 
 found (page 14) a reference to a nice idea applicable to binary 
 search using D's two-way "less than" comparisons.

 https://issues.dlang.org/show_bug.cgi?id=15385

 Any takers?


 Andrei
Looks really simple. I could try? Though I'll probably come asking here about contribution procedures and stuff (especially that I can't, not possibly, compile Phobos or anything close to it with tests and such).
Nov 29 2015
next sibling parent ZombineDev <valid_email he.re> writes:
On Sunday, 29 November 2015 at 21:13:37 UTC, Enamex wrote:
 On Saturday, 28 November 2015 at 20:04:11 UTC, Andrei 
 Alexandrescu wrote:
 While reading Okasaki's bool on persistent data structures, I 
 found (page 14) a reference to a nice idea applicable to 
 binary search using D's two-way "less than" comparisons.

 https://issues.dlang.org/show_bug.cgi?id=15385

 Any takers?


 Andrei
Looks really simple. I could try? Though I'll probably come asking here about contribution procedures and stuff (especially that I can't, not possibly, compile Phobos or anything close to it with tests and such).
If you're on Linux, OSX or FreeBSD this should help you get started: http://wiki.dlang.org/Starting_as_a_Contributor On Windows the part about `git` is the same, however I'm not sure about the additional tools like `make`. I would try getting them using `msys2`'s `pacman` package manager, though maybe the `make` distributed with DMC/DMD is specifically needed for DMD, phobos and druntime. This was written in more detail here: http://wiki.dlang.org/Building_DMD, however I'm not sure if the information is up to date. Anyway, here you can find a good overview of the procedures (i.e. making Pull Requests on github): http://wiki.dlang.org/Category:Contribution_Guidelines.
Nov 29 2015
prev sibling parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 11/29/2015 04:13 PM, Enamex wrote:
 On Saturday, 28 November 2015 at 20:04:11 UTC, Andrei Alexandrescu wrote:
 While reading Okasaki's bool on persistent data structures, I found
 (page 14) a reference to a nice idea applicable to binary search using
 D's two-way "less than" comparisons.

 https://issues.dlang.org/show_bug.cgi?id=15385

 Any takers?


 Andrei
Looks really simple. I could try? Though I'll probably come asking here about contribution procedures and stuff (especially that I can't, not possibly, compile Phobos or anything close to it with tests and such).
Xinok got ahead, but don't let that deter you. I'll post here other similar simple yet interesting tasks, and I encourage others to do the same. -- Andrei
Nov 30 2015