Re: Help with an algorithm!

2017-06-15 Thread Ivan Kazmenko via Digitalmars-d-learn
On Thursday, 15 June 2017 at 13:41:07 UTC, MGW wrote: On Thursday, 15 June 2017 at 13:16:24 UTC, CRAIG DILLABAUGH wrote: The purpose - search of changes in file system. Sorting is a slow operation as well as hashing. Creation of a tree, is equally in sorting. So far the best result:

Re: GStreamer and D

2017-06-15 Thread Jay Norwood via Digitalmars-d-learn
wow! I hadn't tried this gtkd library before. I was hunting for the gstreamer in particular. The hello_world alsa-sink audio example failed on Windows. The debugger indicates no sink, which I guess is reasonable. With very little effort, though, I converted the hello_world example to

Re: Implementing interfaces using alias this

2017-06-15 Thread Jesse Phillips via Digitalmars-d-learn
On Wednesday, 14 June 2017 at 09:34:27 UTC, Balagopal Komarath wrote: Why doesn't this work? The Test!Duck type has a void quack() method but the compiler says it is not implemented. You question was answered, but you can do this: -- interface IDuck { void

Re: Help with an algorithm!

2017-06-15 Thread CRAIG DILLABAUGH via Digitalmars-d-learn
On Thursday, 15 June 2017 at 13:41:07 UTC, MGW wrote: On Thursday, 15 June 2017 at 13:16:24 UTC, CRAIG DILLABAUGH wrote: The purpose - search of changes in file system. Sorting is a slow operation as well as hashing. Creation of a tree, is equally in sorting. So far the best result:

Re: Help with an algorithm!

2017-06-15 Thread MGW via Digitalmars-d-learn
On Thursday, 15 June 2017 at 13:16:24 UTC, CRAIG DILLABAUGH wrote: The purpose - search of changes in file system. Sorting is a slow operation as well as hashing. Creation of a tree, is equally in sorting. So far the best result: string[] rez; foreach(str; m2) { bool fFind; int

Re: Help with an algorithm!

2017-06-15 Thread CRAIG DILLABAUGH via Digitalmars-d-learn
On Thursday, 15 June 2017 at 11:48:54 UTC, Ivan Kazmenko wrote: On Thursday, 15 June 2017 at 06:06:01 UTC, MGW wrote: There are two arrays of string [] mas1, mas2; Size of each about 5M lines. By the size they different, but lines in both match for 95%. It is necessary to find all lines in an

Re: Help with an algorithm!

2017-06-15 Thread Ivan Kazmenko via Digitalmars-d-learn
On Thursday, 15 June 2017 at 06:06:01 UTC, MGW wrote: There are two arrays of string [] mas1, mas2; Size of each about 5M lines. By the size they different, but lines in both match for 95%. It is necessary to find all lines in an array of mas2 which differ from mas1. The principal criterion -

Re: Implementing interfaces using alias this

2017-06-15 Thread Balagopal Komarath via Digitalmars-d-learn
On Thursday, 15 June 2017 at 07:12:56 UTC, Biotronic wrote: Here however, is a solution that works for simple examples. This is awesome. Very generic. Thanks.

Re: Implementing interfaces using alias this

2017-06-15 Thread Biotronic via Digitalmars-d-learn
On Wednesday, 14 June 2017 at 09:34:27 UTC, Balagopal Komarath wrote: void main() { Test!Duck d; } As has been pointed out at length by others here, it's simply not how alias this is intended to work. I do see some arguments in favor of working that way, but I'm not sure what's the

Help with an algorithm!

2017-06-15 Thread MGW via Digitalmars-d-learn
There are two arrays of string [] mas1, mas2; Size of each about 5M lines. By the size they different, but lines in both match for 95%. It is necessary to find all lines in an array of mas2 which differ from mas1. The principal criterion - speed. There are the 8th core processor and it is good