Re: Release D 2.096.0
The fix for Issue 21508 - _private class p in file p.d visible outside the file (module)_ removed a behavior that was (wrongly) used from time to time: ``` module Foo; class Foo {...} ``` The class `Foo` can no longer be imported with `import Foo;` This is a surprising breaking change. Perhaps it should be documented more explicitly.
Re: The ABC's of Templates in D
On Friday, 31 July 2020 at 13:46:43 UTC, Mike Parker wrote: The blog: https://dlang.org/blog/2020/07/31/the-abcs-of-templates-in-d/ Minor detail: in "Even shorter syntax" the point is not that the template has only one parameter, but that the template argument is only one token long (for example, no `char[]`).
uncovered: code coverage summary tool
https://github.com/linkrope/uncovered examines coverage listing files to identify the ones with the most uncovered lines. The results are sorted by absolute number, rather than percentage - the most actionable at the end. There is also a package summary. For example, this is the output after a Phobos unittest run: ... 257/802 std-socket.lst 262/3568 std-range-package.lst 265/1282 std-stdio.lst 267/267 std-regex-internal-backtracking.lst 282/323 std-regex-internal-kickstart.lst 284/1084 std-net-curl.lst 303/3176 std-datetime-interval.lst 445/717 std-regex-internal-parser.lst 777/3366 std-uni-package.lst 854/3499 std-format.lst --- 0/0 std-windows 3/5 etc-c 196/1940 std-digest 211/7103 std-algorithm 366/4044 std-range 371/2480 std-container 400/1840 std-net 437/2592 std-internal 514/7178 std-experimental 658/14567 std-datetime 777/3366 std-uni 1122/2318 std-regex 3960/36485 std --- 9015/83918 lines uncovered (quite impressive)
Re: Pijamas, a simple fluent assertation library (forked from Pyjamas)
.empty and .throw are not that difficult: see https://code.dlang.org/packages/dshould On Friday, 15 May 2020 at 12:35:27 UTC, Luis wrote: On my TODOs list for v0.3 I have : * Rename module to pijamas * Add .empty that it's equivalent to .length(0) * Handle range.should.be.equal([1, 2, 3]) * Test if a .instanceOf could be posible * See if (throwing expression).should.Throw!Exception could be done, and avoid passing a pointer to a function like actually does. In other words, work like assertThorow!Exception(expression) * Try to hide Assertation class (Volvemort class perhaps?) and get out the public methods to avoid Assertation spaming on autogenerated documentation.
Oberon to D
https://github.com/linkrope/oberon2d is a simple tool that translates source code from Oberon to D. It was intended to be thrown away after the resurrection of a single Oberon project. (So, don't expect too much.) But then, Bastiaan Veelo presented a very similar problem at DConf 2017. I'm a bit late, but I hope this could help.
depend 0.2.0
depend is a tool to visualize or to check import dependencies. It was briefly presented at DConf 2018. For an example, see the generated package dependencies of the vibe.d code: https://raw.githubusercontent.com/wiki/funkwerk/depend/images/vibe.png The tool has been completely reworked in response to https://issues.dlang.org/show_bug.cgi?id=15337 http://github.com/funkwerk/depend http://depend.dub.pm/
Re: detectcycles: A source code dependency cycle checker
I did not mention it in the README, but the tred filter used in https://code.dlang.org/packages/depend complains about cyclic dependencies. I am currently working on a branch, where the transitive reduction and the corresponding warnings are built in. While this tool is for D only, it also allows to visualize and to check dependencies.
Re: Unit Testing in Action
On Monday, 23 October 2017 at 12:38:01 UTC, Atila Neves wrote: "parallel test execution (from it’s name, the main goal of unit-threaded) was quite problematic with the first test suite we converted" I'd love to know what the problems were, especially since it's possible to run in just one thread with a command-line option, or to use UDAs to run certain tests in a module in the same thread (sometimes one has to change global state, as much as that is usually not a good idea). Delays are our business, so we use the clock and timers everywhere. Long ago, we introduced Singletons to be able to replace the implementations for unit testing. By now, lots of tests fake time and it's a problem if they do so in parallel. It's not too hard, however, to change this to thread-local replacements of the clock and timers. Another problem was using the same port number for different test cases. We now apply "The port 0 trick" (https://www.dnorth.net/2012/03/17/the-port-0-trick/). "With the new static foreach feature however, it is easy to implement parameterized tests without the support of a framework" It is, but it's the same problem with plain asserts in terms of knowing what went wrong unless the parameterised value happens to be in the assertion. And there's also the issue of running the test only for the value/type that it failed for instead of going through the whole static foreach everytime. That's why I recommend to put the `static foreach` around the `unitest`. My example shows how to instantiate test descriptions (with CTFE of `format`) so that these string attributes are used to report failures or to slectively execute a test in isolation.
Re: Unit Testing in Action
On Friday, 20 October 2017 at 21:26:35 UTC, qznc wrote: * fluent-asserts is considered the best expectations library. Syntax is `(x + y).should.equal(42).because("of test reasons");` and it gives nice output with code snippets. The code snippets were the prominent feature from the announcement of fluent-asserts. But this feature was the reason why I originally dismissed the library. In my opinion, the goal is that the failure message describes the issue without the need to look at the test implementation. The diff of lengthy strings is, what I was always looking for. Back then, I wrote a lightweight kind of diff for dunit. In writing the blog post, I rechecked code.dlang.org. To my surprise, Sönke Ludwig ported google-diff-match-patch to D in 2014. (The status is "build: error", but there is hope that it's only corner cases that don't work.) Further investigation revealed that fluent-asserts uses this port. So, it's this "hidden feature" that currently makes fluent-asserts my favorite.
Re: From the D Blog: The Evolution of the accessors Library
On Wednesday, 6 September 2017 at 18:11:28 UTC, Joakim wrote: - There's no resolution to the Flag type issue: you should say whether you filed a bug, as you did with the issue in the private classes section, or if you were able to work around it. We asked in the forum whether this is a bug: https://forum.dlang.org/thread/igsxmowtguwvngnqu...@forum.dlang.org The answer was ... inconclusive. So, we worked around the problem: https://github.com/funkwerk/accessors/blob/master/src/accessors.d#L223
Re: Release D 2.076.0
What's the problem with `TypeInfo_Typedef`? https://github.com/dlang/undeaD shows "build:failing". https://travis-ci.org/dlang/undeaD/jobs/270947584 shows: src/undead/doformat.d(934,23): Error: undefined identifier TypeInfo_Typedef
Re: Beta 2.075.0-b1
"Deprecation: Comparison between different enumeration types const(Status) and Status; If this behavior is intended consider using std.conv.asOriginalType" It' not really intended to disallow comparisons between const(Status) and Status, isn't it? BTW: There's a regression: running dmd with option -deps results in a segmentation fault. We can try to reduce the example.
Re: DConf 2017 Hotel - book now!
On Thursday, 2 March 2017 at 19:39:55 UTC, Walter Bright wrote: Tegel Airport to Hotel: Bus 109 to Jakob-Kaiser-Platz Subway U 7 in the direction of Rudow to Grenzallee Cross the street at the traffic light and turn left. The next street on the right is Jahnstraße. On the left side you will find our hotel. Bus X9 also takes you from Tegel Airport to Jakob-Kaiser-Platz. The goodies: - the X9 bus stop is (a few yards) closer to the exit of Tegel Airport - Jakob-Kaiser-Platz is the first stop of the X9