Re: How can I override the defeat compiler select by Dub?

2019-06-23 Thread evilrat via Digitalmars-d-learn
On Sunday, 23 June 2019 at 23:10:48 UTC, Mike Brockus wrote: If you never seen Meson before then pick up a camera and take a picture: 樂  https://mesonbuild.com/ Nope. Wasn't working on Windows last time I checked. Hometown Meson user here simply just wondering how can I tell Dub to use

How can I override the defeat compiler select by Dub?

2019-06-23 Thread Mike Brockus via Digitalmars-d-learn
If you never seen Meson before then pick up a camera and take a picture: 樂  https://mesonbuild.com/ Hometown Meson user here simply just wondering how can I tell Dub to use dmd to compile my dependence in Meson? It’s one of the last things blocking me from having healthy D Meson projects

Re: Casting to interface not allowed in @safe code?

2019-06-23 Thread Nathan S. via Digitalmars-d-learn
On Tuesday, 21 May 2019 at 07:59:13 UTC, Jim wrote: On Tuesday, 21 May 2019 at 07:33:17 UTC, rumbu wrote: On Tuesday, 21 May 2019 at 07:16:49 UTC, Jim wrote: On Tuesday, 21 May 2019 at 07:04:27 UTC, rumbu wrote: On Tuesday, 21 May 2019 at 05:51:30 UTC, Jim wrote: That's because foo is of

Re: gtkDcoding Facelift

2019-06-23 Thread Greatsam4sure via Digitalmars-d-learn
On Sunday, 23 June 2019 at 10:55:52 UTC, Ron Tarrant wrote: Stage 1 is now complete. Blog entries are color-associated in an effort to make things more visual. Each topic also has its own avatar. Points to anyone who can figure out why each avatar is associated with its topic.

shifted lowerBound with ranges

2019-06-23 Thread A. Bressan via Digitalmars-d-learn
Hi, I am trying to convert some pointer based C++ code to ranges. Given a sorted list of numbers w and a value v, I want to extract a sublist containing exactly s numbers <=v and all numbers >v. The following code "works", but it is ugly: -the result of shiftedLowerBound is not a slice of the

Re: Meson build system user learning D.

2019-06-23 Thread Mike Brockus via Digitalmars-d-learn
On Monday, 27 May 2019 at 16:49:45 UTC, Russel Winder wrote: On Mon, 2019-05-27 at 16:13 +, Mike Brockus via Digitalmars-d-learn wrote: […] I tried that custom command voodoo then I tried to use 'dub' as a method for hunting down dependencies. Basically got something like this.

Re: Using std.algorithm.iteration to Calculate Hamming Distance

2019-06-23 Thread Samir via Digitalmars-d-learn
On Sunday, 23 June 2019 at 13:29:25 UTC, KnightMare wrote: zip( "hello world", "Hello World" ).map!"a[0] != a[1]".sum Excellent! Thank you!

Re: Using std.algorithm.iteration to Calculate Hamming Distance

2019-06-23 Thread KnightMare via Digitalmars-d-learn
On Sunday, 23 June 2019 at 13:10:51 UTC, Samir wrote: D already has a function to calculate the Levenshtein distance[1]. I am trying to come up with a function to calculate the Hamming distance[2] between two strings, `a` and `b`. So far, this seems to work: foreach (i, j; zip(a, b)) {

Using std.algorithm.iteration to Calculate Hamming Distance

2019-06-23 Thread Samir via Digitalmars-d-learn
D already has a function to calculate the Levenshtein distance[1]. I am trying to come up with a function to calculate the Hamming distance[2] between two strings, `a` and `b`. So far, this seems to work: foreach (i, j; zip(a, b)) { if (i != j) ++hammingDistance; } Is there a

Re: gtkDcoding Facelift

2019-06-23 Thread angel via Digitalmars-d-learn
On Sunday, 23 June 2019 at 10:55:52 UTC, Ron Tarrant wrote: Stage 1 is now complete. Blog entries are color-associated in an effort to make things more visual. Each topic also has its own avatar. Points to anyone who can figure out why each avatar is associated with its topic.

gtkDcoding Facelift

2019-06-23 Thread Ron Tarrant via Digitalmars-d-learn
Stage 1 is now complete. Blog entries are color-associated in an effort to make things more visual. Each topic also has its own avatar. Points to anyone who can figure out why each avatar is associated with its topic. https://gtkdcoding.com/

Re: Options for unit testing in D?

2019-06-23 Thread XavierAP via Digitalmars-d-learn
On Sunday, 23 June 2019 at 01:26:29 UTC, Mike Brockus wrote: I think we made a lot of progress, suddenly it's working and I don't need to include main. Is there a way to indicate based on console output that one executable is the tester and the other is the application? unittest blocks are