Re: Testing D codes

2017-04-06 Thread Russel Winder via Digitalmars-d-learn
On Tue, 2017-04-04 at 15:23 +, Kagamin via Digitalmars-d-learn wrote: > Same as anywhere else. Integration test is a test that connects  > to a deployed system, which is different from unittest only in  > philosophical aspect. Well according to the standard definitions connecting to a deployed

Re: Testing D codes

2017-04-06 Thread Kagamin via Digitalmars-d-learn
https://github.com/ikod/dlang-requests/blob/master/tests/app.d

Re: is char[] faster than string?

2017-04-06 Thread Kagamin via Digitalmars-d-learn
On Wednesday, 5 April 2017 at 21:58:16 UTC, Inquie wrote: What I am looking for is something like StringBuilder in C#. If you want it to not copy data on expand, there's nothing like that in D yet. I wrote one for myself :)

Re: is char[] faster than string?

2017-04-06 Thread Gary Willoughby via Digitalmars-d-learn
On Wednesday, 5 April 2017 at 21:58:16 UTC, Inquie wrote: What I am looking for is something like StringBuilder in C#. std.array.appender

Re: Testing D codes

2017-04-06 Thread Russel Winder via Digitalmars-d-learn
On Thu, 2017-04-06 at 13:08 +, Kagamin via Digitalmars-d-learn wrote: > https://github.com/ikod/dlang-requests/blob/master/tests/app.d Which implies that in the D milieu all tests are unittests even if they are not unittests. Sad use of terminology and jargon, but I can see it working. Is the

Re: Testing D codes

2017-04-06 Thread drug via Digitalmars-d-learn
06.04.2017 16:49, Russel Winder via Digitalmars-d-learn пишет: On Thu, 2017-04-06 at 13:08 +, Kagamin via Digitalmars-d-learn wrote: https://github.com/ikod/dlang-requests/blob/master/tests/app.d Which implies that in the D milieu all tests are unittests even if they are not unittests. Sad

Re: Testing D codes

2017-04-06 Thread Russel Winder via Digitalmars-d-learn
On Thu, 2017-04-06 at 16:57 +0300, drug via Digitalmars-d-learn wrote: > […] > I'm not sure about terminology too, but did you try some like  > https://code.dlang.org/packages/unit-threaded? > I use it and am satisfied. I was slowly sidling up to using this as the inbuilt system is a tad primitiv

Re: Single exe vibe.d app

2017-04-06 Thread Satoshi via Digitalmars-d-learn
On Wednesday, 5 April 2017 at 12:42:23 UTC, evilrat wrote: On Wednesday, 5 April 2017 at 12:13:38 UTC, Satoshi wrote: Hi, How can I build single exe application with vibe.d (windows)? now it require zlib.dll, libeay32.dll and ssleay32.dll But I need it as single app. btw, if all you need is t

Re: Single exe vibe.d app

2017-04-06 Thread Stefan Koch via Digitalmars-d-learn
On Wednesday, 5 April 2017 at 12:13:38 UTC, Satoshi wrote: Hi, How can I build single exe application with vibe.d (windows)? now it require zlib.dll, libeay32.dll and ssleay32.dll But I need it as single app. One solution would be to compile vibe.d without ssl support that way it will not need

Spreading D Arrays

2017-04-06 Thread Russel Winder via Digitalmars-d-learn
Many languages have a "spread" operator which takes a sequence and creates positional argument to a (usually variadic but not necessarily) function. Does D have such a facility? (Such a facility looks like it might be really, really useful when writing unit-threaded tests.) -- Russel. ==

Re: Spreading D Arrays

2017-04-06 Thread Stefan Koch via Digitalmars-d-learn
On Thursday, 6 April 2017 at 18:25:27 UTC, Russel Winder wrote: Many languages have a "spread" operator which takes a sequence and creates positional argument to a (usually variadic but not necessarily) function. Does D have such a facility? (Such a facility looks like it might be really, real

Function names and lambdas

2017-04-06 Thread Russel Winder via Digitalmars-d-learn
I am used to a function name being a reference to the function body, cf. lots of other languages. However D rejects: iterative as a thing can put in an array, it requires: (n) => iterative(n) Presumably this introduces inefficiency at run time? I.e. the extra level of indirectio

Re: Function names and lambdas

2017-04-06 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 6 April 2017 at 18:37:51 UTC, Russel Winder wrote: I am used to a function name being a reference to the function body, cf. lots of other languages. However D rejects: iterative Try &iterative The compiler would probably optimize out a trivial thing anyway, but &foo

Re: Function names and lambdas

2017-04-06 Thread Ali Çehreli via Digitalmars-d-learn
On 04/06/2017 11:37 AM, Russel Winder via Digitalmars-d-learn wrote: I am used to a function name being a reference to the function body, cf. lots of other languages. However D rejects: iterative as a thing can put in an array, it requires: (n) => iterative(n) Presumably this

Creating Tuple or AliasSeq

2017-04-06 Thread ANtlord via Digitalmars-d-learn
Hello! I've got an issue related to making a Tuple or AliasSeq using income template arguments. I want to create template makes an array of objects from array of arrays have different sizes and different types of values. I created temporary solution. It is a concatenation of strings that will