November 29
On Thursday, 28 November 2019 at 14:06:39 UTC, Adam D. Ruppe wrote:
> On Thursday, 28 November 2019 at 13:10:44 UTC, Atila Neves wrote:
>> This is the done already by reggae. Unfortunately, since every D module is effectively a header, the number of files that need to be recompiled is usually large, despite the fact that for most changes the recompilation isn't actually necessary.
> Do you think it might work if it did dmd -H and make the auto-generated .di file and then did a content-based change detection on them for recompiling dependencies?

Probably. In fact, I had a plan to do exactly that and measure to see what the difference was. I just haven't gotten around to doing it yet.

> It'd prolly still do more work than it has to, but seeing .d changed, rebuild .di, if .di changed, rebuild other stuff might just avoid full rebuilds upon just simple function body changes.

That was my idea as well.

December 01
On Monday, 25 November 2019 at 18:28:55 UTC, H. S. Teoh wrote:
> - lack of support for build-time code generation (i.e., build a subset
>   of files into an executable, run the executable to generate .d files,
>   compile output .d files plus other existing .d files into final
>   product).

I am doing exactly that. It can be done through preGenerateCommands, calling either a secondary build script or nested dub project, optionally using excludedSourceFiles. The only reason it doesn’t work well is because of But there are workarounds, and a poc fix.

January 23
dud needs your help.

I'm starting work on the dependency resolution and for that I had
to implement proper handling for Semantic Versions, Version Ranges,
and Version Unions(VersionUnion is basically a VersionRange[]).
The dependency resolution algorithm I want to implement (based on
the algorithm used by Dart) needs a few checks and operations on
those types.

SemVer parseSemVer(string input);

Nullable!VersionRange parseVersionRange(string input);

alias Types = AliasSeq!((SemVer,VersionRange,VersionUnion);
static foreach(T, Types) {
    auto inv = invert(T);
    static foreach(S, Types) {
        bool allowsAll(T, T);
        bool allowsAll(T, S);
        bool allowsAll(S, T);

        bool allowsAny(T, T);
        bool allowsAny(T, S);
        bool allowsAny(S, T);

        auto unionOf(T, T);
        auto unionOf(T, S);
        auto unionOf(S, T);

        auto intersectionOf(T, T);
        auto intersectionOf(T, S);
        auto intersectionOf(S, T);

        auto differenceOf(T, T);
        auto differenceOf(T, S);
        auto differenceOf(S, T);

I think I did okay work and the tests cover all/most cases.
But that's properly being a bit overconfident.

Therefore, it would be awesome if you could try to break
these functions and create PRs that break the functions.

The code can be found in the git here
the relevant folder is semver.
The tests are located in the files:

allowsAny: semver/source/dud/semver/checkstest.d
allowsAll: semver/source/dud/semver/checkstest1.d
allowsAll: semver/source/dud/semver/setoperationtest.d
intersectionOf: semver/source/dud/semver/setoperationtest1.d
invert, differenceOf: semver/source/dud/semver/setoperationtest2.d

Building dud, and semver should be as easy as cloning and typing dud, dub test.

git clone
cd dud/semver
dub test
should get you going.


January 23
On Thursday, 23 January 2020 at 17:05:10 UTC, Robert Schadek wrote:


unittest {
  immutable SemVer v1 = SemVer(1,1,1);
  immutable SemVer v2 = SemVer(2,2,2);
  immutable SemVer v3 = SemVer(3,3,3);
  immutable SemVer v4 = SemVer(4,4,4);
  immutable VersionRange a = VersionRange(v1, Inclusive.yes, v2, Inclusive.yes);
  immutable VersionRange b = VersionRange(v3, Inclusive.yes, v4, Inclusive.yes);
  immutable VersionRange c = VersionRange(v2, Inclusive.yes, v3, Inclusive.yes);

  assert(intersectionOf(a, invert(a)).ranges.length == 0);
  assert(intersectionOf(a, a) == a);
  assert(intersectionOf(a, b) != a);
  assert(intersectionOf(a, b) != b);
  assert(intersectionOf(b, a) != a);
  assert(intersectionOf(b, a) != b);
  assert(intersectionOf(invert(a), invert(a)) == invert(a));
  assert(invert(intersectionOf(a, invert(b))) == invert(intersectionOf(a,a)));

  auto add(T, P)(T a, P b) {
	return invert(intersectionOf(invert(a), invert(b)));
  auto remove(T, P)(T a, P b) {
	return intersectionOf(a, invert(b));

  assert(add(a,b) == add(b,a));

  assert(invert(invert(a)) == add(intersectionOf(a,c), remove(a,c)));
  assert(differenceOf(a, a).ranges.length == 0);
  assert(invert(intersectionOf(invert(a), invert(a))) == invert(invert(a)));
  assert(invert(invert(differenceOf(a, invert(a)))) == invert(invert(a)));
  assert(invert(invert(intersectionOf(a, c))) == invert(invert(remove(a, remove(a, c)))));

Everything green. Nice work.

Haven't tried yet. I'll leave that to someone else.
January 24
On Thursday, 23 January 2020 at 20:50:09 UTC, Sebastiaan Koppe wrote:
> Haven't tried yet. I'll leave that to someone else.

Indirectly you already did, invert turns Inclusive.yes bound into bounds.
January 24
Thank you, very nice test
Next ›   Last »
1 2 3 4 5 6 7 8 9