Re: Local libraries/packages with dub: How?

2020-12-01 Thread z via Digitalmars-d-learn
On Tuesday, 1 December 2020 at 07:39:31 UTC, rikki cattermole wrote: That isn't right. Thank you, this was the problem apparently. Dub ignored the malformed dependency declaration instead of displaying a warning or an error.(this is apparently a bug.[0][1]) [0]

IsTuple returns true for Nullable!SomeTuple

2020-12-01 Thread Ben Jones via Digitalmars-d-learn
This seems like very surprising behavior to me. Is it a bug? import std.typecons; alias NT = Nullable!(Tuple!(int, double)); pragma(msg, isTuple!NT); //prints true!

Re: Dude about ~ array concatenation performance

2020-12-01 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Dec 01, 2020 at 10:49:55PM +, ddcovery via Digitalmars-d-learn wrote: > Yesterday I really shocked when, comparing one algorithm written in > javascript and the equivalent in D, javascript performed better!!! [...] > With 1 million Double numbers (generated randomly): > Javascript

Anybody know if I can build DMD with Visual Studio 2019?

2020-12-01 Thread WhatMeWorry via Digitalmars-d-learn
I'm trying to build DMD with Visual D under Visual Studio as shown in the Wiki: https://wiki.dlang.org/Building_under_Windows The notes say to use the solution vcbuild: You should be able to build DMD using the visual studio solution found in: dmd\src\vcbuild A typical choice is to build

Re: Doubts about the performance of array concatenation

2020-12-01 Thread ddcovery via Digitalmars-d-learn
On Tuesday, 1 December 2020 at 23:43:31 UTC, Max Haughton wrote: On Tuesday, 1 December 2020 at 22:49:55 UTC, ddcovery wrote: Yesterday I really shocked when, comparing one algorithm written in javascript and the equivalent in D, javascript performed better!!! [...] Use ldc, rdmd can

Re: Doubts about the performance of array concatenation

2020-12-01 Thread Max Haughton via Digitalmars-d-learn
On Wednesday, 2 December 2020 at 00:08:55 UTC, ddcovery wrote: On Tuesday, 1 December 2020 at 23:43:31 UTC, Max Haughton wrote: On Tuesday, 1 December 2020 at 22:49:55 UTC, ddcovery wrote: Yesterday I really shocked when, comparing one algorithm written in javascript and the equivalent in D,

Re: Doubts about the performance of array concatenation

2020-12-01 Thread ddcovery via Digitalmars-d-learn
On Tuesday, 1 December 2020 at 22:49:55 UTC, ddcovery wrote: Yesterday I really shocked when, comparing one algorithm written in javascript and the equivalent in D, javascript performed better!!! [...] Sorry about title (may be "doubt" :-/ )

Re: Dude about ~ array concatenation performance

2020-12-01 Thread Max Haughton via Digitalmars-d-learn
On Tuesday, 1 December 2020 at 22:49:55 UTC, ddcovery wrote: Yesterday I really shocked when, comparing one algorithm written in javascript and the equivalent in D, javascript performed better!!! [...] Use ldc, rdmd can invoke it for you. DMD's optimizer is not even close to as advanced as

Re: Running unit tests from DUB single file packages

2020-12-01 Thread Johannes Loher via Digitalmars-d-learn
Am 01.12.20 um 14:55 schrieb drug: > On 12/1/20 2:40 PM, Johannes Loher wrote: >> ... >> However, I am having trouble running the unit tests when using the >> ... > > This can be one of solution https://github.com/dlang/dub/pull/2050 > Thanks! Let's see if it gets merged or if a slightly more

Re: Running unit tests from DUB single file packages

2020-12-01 Thread Johannes Loher via Digitalmars-d-learn
Am 01.12.20 um 14:52 schrieb jmh530: > On Tuesday, 1 December 2020 at 13:52:35 UTC, jmh530 wrote: >> On Tuesday, 1 December 2020 at 11:40:38 UTC, Johannes Loher wrote: >>> [snip] >>> >>> Any hints on how to execute unit tests from single file DUB packages? >>> Is it even possible at the moment?

Dude about ~ array concatenation performance

2020-12-01 Thread ddcovery via Digitalmars-d-learn
Yesterday I really shocked when, comparing one algorithm written in javascript and the equivalent in D, javascript performed better!!! The idea is to translate the "3 lines sort" in haskell to Javascript and D (with the limitations of each language). This is not a quick sort test, but a

Running unit tests from DUB single file packages

2020-12-01 Thread Johannes Loher via Digitalmars-d-learn
Hello everybody, when solving today's problem for the adventofcode [1], I decided to try out DUB's single file package feature, in order to keep things short. When doing the adventofcode, I always use the given examples as unit tests in order to verify that my solutions are actually correct.

Re: Running unit tests from DUB single file packages

2020-12-01 Thread jmh530 via Digitalmars-d-learn
On Tuesday, 1 December 2020 at 11:40:38 UTC, Johannes Loher wrote: [snip] Any hints on how to execute unit tests from single file DUB packages? Is it even possible at the moment? Thanks in advance for any help! [1] https://adventofcode.com/ Have you tried it without the imports?

Re: Running unit tests from DUB single file packages

2020-12-01 Thread jmh530 via Digitalmars-d-learn
On Tuesday, 1 December 2020 at 13:52:35 UTC, jmh530 wrote: On Tuesday, 1 December 2020 at 11:40:38 UTC, Johannes Loher wrote: [snip] Any hints on how to execute unit tests from single file DUB packages? Is it even possible at the moment? Thanks in advance for any help! [1]

Re: Running unit tests from DUB single file packages

2020-12-01 Thread drug via Digitalmars-d-learn
On 12/1/20 2:40 PM, Johannes Loher wrote: ... However, I am having trouble running the unit tests when using the ... This can be one of solution https://github.com/dlang/dub/pull/2050

Re: Running unit tests from DUB single file packages

2020-12-01 Thread jmh530 via Digitalmars-d-learn
On Tuesday, 1 December 2020 at 14:15:22 UTC, Johannes Loher wrote: [snip] The point of using DUB (and the single file package format) is easy access to libraries from the DUB registry. If I didn't want to use a dependency, I would not be using DUB at all. That said, leaving out the

Re: Is garbage detection a thing?

2020-12-01 Thread Kagamin via Digitalmars-d-learn
On Sunday, 29 November 2020 at 19:09:07 UTC, Mark wrote: Looking at Ada now. I found: Ada is not good for me. It has no augmented assignment. It's just that I want DRY because I use very verbose variable names Using a reasonable naming convention should be much easier than looking for a

Re: Selective unittesting in DUB

2020-12-01 Thread Johannes Loher via Digitalmars-d-learn
Am 01.12.20 um 08:11 schrieb ryuukk_: > Running .\dawn-test-application.exe > 2 modules passed unittests > > > Wich ones? it should print > > > ``` > Running tests for target X > > - src/module_a.d Tests: OK   <-- line in green > - src/module_b.d Tests: OK >