www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - multiwayMerge/multiwayUnion review

reply Ilya Yaroshenko <ilyayaroshenko gmail.com> writes:
Hi, I ported two this functions to mir-algorithm ~master: need 
them for work ASAP (License and Copyright are preserved). My 
small report:

  - Two algorithmic bugs in multiwayUnion: it is one line 
function, you can easily find them.
  - One truly significant algorithmic optimisation bug in 
multiwayMerge: see mir-algorithm ~master for fix.
  - Three kinds of bugs related to attributes and BetterC: ditto.

Sorry, can not fill the issues.

It is weird to duplicate Phobos code/API/functionality. Hope one 
day it will be split into DUB packages.

Best,
Ilya
Jan 03 2018
parent reply jmh530 <john.michael.hall gmail.com> writes:
On Wednesday, 3 January 2018 at 19:32:37 UTC, Ilya Yaroshenko 
wrote:
 Hi, I ported two this functions to mir-algorithm ~master: need 
 them for work ASAP (License and Copyright are preserved). My 
 small report:

  - Two algorithmic bugs in multiwayUnion: it is one line 
 function, you can easily find them.
  - One truly significant algorithmic optimisation bug in 
 multiwayMerge: see mir-algorithm ~master for fix.
  - Three kinds of bugs related to attributes and BetterC: ditto.

 Sorry, can not fill the issues.

 It is weird to duplicate Phobos code/API/functionality. Hope 
 one day it will be split into DUB packages.

 Best,
 Ilya
Ah, so you're just giving heads up that you added these to mir-algorithm because you needed to fix some bugs that were in the phobos implementation and didn't have time to do it yourself.
Jan 03 2018
parent Ilya Yaroshenko <ilyayaroshenko gmail.com> writes:
On Wednesday, 3 January 2018 at 22:19:41 UTC, jmh530 wrote:
 On Wednesday, 3 January 2018 at 19:32:37 UTC, Ilya Yaroshenko 
 wrote:
 Hi, I ported two this functions to mir-algorithm ~master: need 
 them for work ASAP (License and Copyright are preserved). My 
 small report:

  - Two algorithmic bugs in multiwayUnion: it is one line 
 function, you can easily find them.
  - One truly significant algorithmic optimisation bug in 
 multiwayMerge: see mir-algorithm ~master for fix.
  - Three kinds of bugs related to attributes and BetterC: 
 ditto.

 Sorry, can not fill the issues.

 It is weird to duplicate Phobos code/API/functionality. Hope 
 one day it will be split into DUB packages.

 Best,
 Ilya
Ah, so you're just giving heads up that you added these to mir-algorithm because you needed to fix some bugs that were in the phobos implementation and didn't have time to do it yourself.
At least it should be interesting task for a student to find two bugs in his code [1] and optimise Andrei's code (popFront). Then he can check it with Mir Algorithm. Attributes requires a lot of work and conversations because of required breaking changes or code large duplication. [1] https://github.com/dlang/phobos/pull/5620
Jan 03 2018