Re: dddb lightweight and simple key-value database

2018-03-22 Thread Fra Mecca via Digitalmars-d-announce
On Thursday, 22 March 2018 at 15:34:28 UTC, aerto wrote: I just start yesterday with d, I write dddb a lightweight and simple key-value database for dlang build on top of std.json source and usage https://github.com/cvsae/dddb I'm waiting your comments Hi, well done! Your code is very

Re: Why think unit tests should be in their own source code hierarchy instead of side-by-side

2018-03-22 Thread Tony via Digitalmars-d-announce
I think unittest blocks are good for write-once and quick-and-dirty projects, or as a first-cut of testing that ultimately gets moved to a full-grown test suite in a separate project. I'd prefer not to read source code that has unittest blocks inter-mixed with the actual code.

Re: Why think unit tests should be in their own source code hierarchy instead of side-by-side

2018-03-22 Thread H. S. Teoh via Digitalmars-d-announce
On Thu, Mar 22, 2018 at 05:29:52PM +, Anton Fediushin via Digitalmars-d-announce wrote: [...] > Oh heck yeah! I think that dub is only one of the D tools which never > disappoints me. I'm glad you found dub to your liking. I'm afraid I can't say the same, though for reasons not really

Re: Why think unit tests should be in their own source code hierarchy instead of side-by-side

2018-03-22 Thread H. S. Teoh via Digitalmars-d-announce
On Thu, Mar 22, 2018 at 05:21:41PM +, Atila Neves via Digitalmars-d-announce wrote: > On Thursday, 22 March 2018 at 16:30:37 UTC, H. S. Teoh wrote: [...] > > being tested, was a big slowdown for me. I have to stop to think > > about which subdirectory under test/ I should put the relevant >

Re: Why think unit tests should be in their own source code hierarchy instead of side-by-side

2018-03-22 Thread Dmitry Olshansky via Digitalmars-d-announce
On Thursday, 22 March 2018 at 10:59:56 UTC, Atila Neves wrote: Blog post: https://atilanevesoncode.wordpress.com/ Agreed on most counts though I’d say D simply produced a language without regard for build tools and large projects. Many small annoying things like version(unittest) stem from

Re: Why think unit tests should be in their own source code hierarchy instead of side-by-side

2018-03-22 Thread Basile B. via Digitalmars-d-announce
On Thursday, 22 March 2018 at 13:50:39 UTC, Atila Neves wrote: On Thursday, 22 March 2018 at 11:19:46 UTC, Basile B. wrote: On Thursday, 22 March 2018 at 11:00:31 UTC, Atila Neves wrote: On Thursday, 22 March 2018 at 10:59:56 UTC, Atila Neves wrote: Blog post:

Re: Why think unit tests should be in their own source code hierarchy instead of side-by-side

2018-03-22 Thread Atila Neves via Digitalmars-d-announce
On Thursday, 22 March 2018 at 17:09:55 UTC, Marco Leise wrote: I understand your opinion and I think it is all reasonable. You talk about longer compile times since every D module is like a C++ header. That touches one of my pet peeves with the language or eco system as it stands and I wonder

Re: Why think unit tests should be in their own source code hierarchy instead of side-by-side

2018-03-22 Thread Anton Fediushin via Digitalmars-d-announce
On Thursday, 22 March 2018 at 17:15:55 UTC, Anton Fediushin wrote: So? Am I wrong about dub? Let me investigate I'm not wrong! It works as expected: only package you are working with compiles with `-unittest` option. Test repo:

Re: Why think unit tests should be in their own source code hierarchy instead of side-by-side

2018-03-22 Thread Atila Neves via Digitalmars-d-announce
On Thursday, 22 March 2018 at 16:30:37 UTC, H. S. Teoh wrote: On Thu, Mar 22, 2018 at 10:59:56AM +, Atila Neves via Digitalmars-d-announce wrote: Blog post: https://atilanevesoncode.wordpress.com/ [...] I realize this is your opinion, but I disagree with them because: Disagreeing is

Re: Why think unit tests should be in their own source code hierarchy instead of side-by-side

2018-03-22 Thread Atila Neves via Digitalmars-d-announce
On Thursday, 22 March 2018 at 16:54:18 UTC, Anton Fediushin wrote: On Thursday, 22 March 2018 at 16:30:37 UTC, H. S. Teoh wrote: As for the dub-specific problems introduced by version(unittest): IMO that's a flaw in dub. I should not need to contort my code just to accomodate some flaw in

Re: Why think unit tests should be in their own source code hierarchy instead of side-by-side

2018-03-22 Thread Anton Fediushin via Digitalmars-d-announce
On Thursday, 22 March 2018 at 17:08:18 UTC, Jonathan M Davis wrote: I could be wrong, but I am _quite_ sure that dub builds all dependencies with their test targets when you build your project with its test target. I thought so too, but I just checked and it doesn't do that. I'd better

Re: Why think unit tests should be in their own source code hierarchy instead of side-by-side

2018-03-22 Thread Anton Fediushin via Digitalmars-d-announce
On Thursday, 22 March 2018 at 13:58:50 UTC, Atila Neves wrote: On Thursday, 22 March 2018 at 12:26:14 UTC, Anton Fediushin Tests in their own file is something from 90-s. It's 2018 and I want to be able to write tests anywhere I want. You _can_ write them wherever you want. I'm not arguing

Re: Why think unit tests should be in their own source code hierarchy instead of side-by-side

2018-03-22 Thread Marco Leise via Digitalmars-d-announce
I understand your opinion and I think it is all reasonable. You talk about longer compile times since every D module is like a C++ header. That touches one of my pet peeves with the language or eco system as it stands and I wonder if you would agree with me on the following: Libraries should be

Re: Why think unit tests should be in their own source code hierarchy instead of side-by-side

2018-03-22 Thread Jonathan M Davis via Digitalmars-d-announce
On Thursday, March 22, 2018 16:54:18 Anton Fediushin via Digitalmars-d- announce wrote: > On Thursday, 22 March 2018 at 16:30:37 UTC, H. S. Teoh wrote: > > As for the dub-specific problems introduced by > > version(unittest): IMO that's a flaw in dub. I should not need > > to contort my code just

Re: Why think unit tests should be in their own source code hierarchy instead of side-by-side

2018-03-22 Thread Jonathan M Davis via Digitalmars-d-announce
On Thursday, March 22, 2018 09:30:37 H. S. Teoh via Digitalmars-d-announce wrote: > 2) Compilation times: perhaps if your unittests are too heavy, > compilation times could become a problem, but IME, they haven't been. Personally, I agree with you, but Atila is one of those folks who gets

Re: Why think unit tests should be in their own source code hierarchy instead of side-by-side

2018-03-22 Thread H. S. Teoh via Digitalmars-d-announce
On Thu, Mar 22, 2018 at 10:59:56AM +, Atila Neves via Digitalmars-d-announce wrote: > Blog post: > > https://atilanevesoncode.wordpress.com/ [...] I realize this is your opinion, but I disagree with them because: 1) I've found that having unittests built into the language is a big win,

dddb lightweight and simple key-value database

2018-03-22 Thread aerto via Digitalmars-d-announce
I just start yesterday with d, I write dddb a lightweight and simple key-value database for dlang build on top of std.json source and usage https://github.com/cvsae/dddb I'm waiting your comments

Re: Why think unit tests should be in their own source code hierarchy instead of side-by-side

2018-03-22 Thread Jacob Carlborg via Digitalmars-d-announce
On Thursday, 22 March 2018 at 11:00:31 UTC, Atila Neves wrote: Direct link: https://atilanevesoncode.wordpress.com/2018/03/22/keep-d-unittests-separated-from-production-code/ I completely agree. Although my reason is mostly because there will be too much code in a single file if the regular

Re: Why think unit tests should be in their own source code hierarchy instead of side-by-side

2018-03-22 Thread Atila Neves via Digitalmars-d-announce
On Thursday, 22 March 2018 at 12:26:14 UTC, Anton Fediushin wrote: On Thursday, 22 March 2018 at 10:59:56 UTC, Atila Neves wrote: Blog post: https://atilanevesoncode.wordpress.com/ Atila I *love* built-in unittests. Putting them right after each function makes things so much easier. If

Re: Why think unit tests should be in their own source code hierarchy instead of side-by-side

2018-03-22 Thread Atila Neves via Digitalmars-d-announce
On Thursday, 22 March 2018 at 11:19:46 UTC, Basile B. wrote: On Thursday, 22 March 2018 at 11:00:31 UTC, Atila Neves wrote: On Thursday, 22 March 2018 at 10:59:56 UTC, Atila Neves wrote: Blog post: https://atilanevesoncode.wordpress.com/ Atila Direct link:

Diamond MVC - v2.8.0 (Backup functionality & cookie consent support added)

2018-03-22 Thread bauss via Digitalmars-d-announce
I'm happy to announce the next version of Diamond MVC. Release: https://github.com/DiamondMVC/Diamond/releases/tag/v2.8.0 This is a breaking change to the cookie API, since it implements cookie consent and not in a backward compatible way to make sure it's enforced. This release also

Re: Why think unit tests should be in their own source code hierarchy instead of side-by-side

2018-03-22 Thread Seb via Digitalmars-d-announce
On Thursday, 22 March 2018 at 12:25:59 UTC, bauss wrote: On Thursday, 22 March 2018 at 11:47:34 UTC, Alexandru Ermicioi wrote: On Thursday, 22 March 2018 at 11:19:46 UTC, Basile B. wrote: On Thursday, 22 March 2018 at 11:00:31 UTC, Atila Neves wrote: On Thursday, 22 March 2018 at 10:59:56 UTC,

Re: Why think unit tests should be in their own source code hierarchy instead of side-by-side

2018-03-22 Thread Anton Fediushin via Digitalmars-d-announce
On Thursday, 22 March 2018 at 10:59:56 UTC, Atila Neves wrote: Blog post: https://atilanevesoncode.wordpress.com/ Atila I *love* built-in unittests. Putting them right after each function makes things so much easier. Tests in their own file is something from 90-s. It's 2018 and I want to

Re: Why think unit tests should be in their own source code hierarchy instead of side-by-side

2018-03-22 Thread bauss via Digitalmars-d-announce
On Thursday, 22 March 2018 at 11:47:34 UTC, Alexandru Ermicioi wrote: On Thursday, 22 March 2018 at 11:19:46 UTC, Basile B. wrote: On Thursday, 22 March 2018 at 11:00:31 UTC, Atila Neves wrote: On Thursday, 22 March 2018 at 10:59:56 UTC, Atila Neves wrote: Blog post:

Re: Why think unit tests should be in their own source code hierarchy instead of side-by-side

2018-03-22 Thread Alexandru Ermicioi via Digitalmars-d-announce
On Thursday, 22 March 2018 at 11:19:46 UTC, Basile B. wrote: On Thursday, 22 March 2018 at 11:00:31 UTC, Atila Neves wrote: On Thursday, 22 March 2018 at 10:59:56 UTC, Atila Neves wrote: Blog post: https://atilanevesoncode.wordpress.com/ Atila Direct link:

Re: Why think unit tests should be in their own source code hierarchy instead of side-by-side

2018-03-22 Thread Basile B. via Digitalmars-d-announce
On Thursday, 22 March 2018 at 11:00:31 UTC, Atila Neves wrote: On Thursday, 22 March 2018 at 10:59:56 UTC, Atila Neves wrote: Blog post: https://atilanevesoncode.wordpress.com/ Atila Direct link:

Why think unit tests should be in their own source code hierarchy instead of side-by-side

2018-03-22 Thread Atila Neves via Digitalmars-d-announce
Blog post: https://atilanevesoncode.wordpress.com/ Atila