Re: GCC 10.1 Released

2020-05-15 Thread Carl Sturtivant via Digitalmars-d-announce

On Saturday, 16 May 2020 at 00:26:31 UTC, Carl Sturtivant wrote:

On Thursday, 14 May 2020 at 16:57:20 UTC, Iain Buclaw wrote:

[[GCC 11 Development]]

Now the development cycle has started again, I have ambitions 
for a number disruptive changes to land during the next 
release cycle.


Superb! --- gdc is perhaps the most important strategically and 
I am so glad to see this playing out.


In fact I would like to characterize compiler progress for D as 
follows.


dmd --- logistical progress
ldc --- tactical progress
gdc --- strategic progress

:)


Re: GCC 10.1 Released

2020-05-15 Thread Carl Sturtivant via Digitalmars-d-announce

On Thursday, 14 May 2020 at 16:57:20 UTC, Iain Buclaw wrote:

[[GCC 11 Development]]

Now the development cycle has started again, I have ambitions 
for a number disruptive changes to land during the next release 
cycle.


Superb! --- gdc is perhaps the most important strategically and I 
am so glad to see this playing out.


Re: Pijamas, a simple fluent assertation library (forked from Pyjamas)

2020-05-15 Thread Mario Kröplin via Digitalmars-d-announce

.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.





Re: Pijamas, a simple fluent assertation library (forked from Pyjamas)

2020-05-15 Thread welkam via Digitalmars-d-announce

On Friday, 15 May 2020 at 14:42:47 UTC, Dmitry Olshansky wrote:

compiler usually explodes trying to swallow it


https://media.giphy.com/media/tfxgAK370HzEY/giphy.gif


Re: "Programming in D" on Educative.io

2020-05-15 Thread welkam via Digitalmars-d-announce

On Thursday, 14 May 2020 at 08:42:43 UTC, ShadoLight wrote:

On Wednesday, 13 May 2020 at 19:25:43 UTC, welkam wrote:

On Thursday, 7 May 2020 at 09:18:04 UTC, Ali Çehreli wrote:

Because D is a re-engineering of C++


I thought it was re-engineering of C


This opinion seems quite common in the D community, but I 
frankly don't see it. If you are referring to the D subset 
defined by the BetterC switch, well, maybe then I would agree. 
But not for D in general.


At first this language was called Mars and it was simple. It was 
one man`s project. Walter fixed the flaws he saw in C but made 
sure that porting C to Mars was easy - copied code either 
compiled or threw an error.


Then Andrei came and he put all that metaprogramming, generics, 
introspection and more on top of the base that Walter built.


I dont think you can call D as re engineering of C++ when it was 
one person project. But historical accuracy is not why I raised 
that question. I remember there was a post by a C++ programmer 
that came to this mailing list saying that a year ago he  tried D 
because he was told that its similar to C++ but without all the 
cruft or something like that. I dont remember exactly. Because D 
does not behave like C++ that programmer didnt like the language. 
One year later he tried D again but this time he came to D from 
the point of it being like C but with its flaws fixed and stuff 
added to that core. Then he liked the language. The language 
didnt change but his enjoyment changed when he changed his 
expectations.


Re: Pijamas, a simple fluent assertation library (forked from Pyjamas)

2020-05-15 Thread Luis via Digitalmars-d-announce

On Friday, 15 May 2020 at 14:42:47 UTC, Dmitry Olshansky wrote:

On Friday, 15 May 2020 at 12:35:27 UTC, Luis wrote:
On my run to raise stuff from dead packages, I come with 
Pijamas. A fork from Yamadacpc’s Pyjamas that works with D 
frontend 2.090 and forwards.


[...]


I was about to ask what is broken with ctRegex (well except 
that compiler usually explodes trying to swallow it)


[...]


Indeed. Was this error :

dub test
Generating test runner configuration 'pyjamas-test-unittest' for 
'unittest' (library).

Performing "unittest" build using /usr/bin/dmd for x86_64.
pyjamas 0.2.1+commit.20.g765cd5c: building configuration 
"pyjamas-test-unittest"...
tests/pyjamas_spec.d(154,22): Error: template 
pyjamas.Assertion!string.Assertion.match cannot deduce function 
from argument types !()(CTRegexWrapper!char), candidates are:
source/pyjamas.d(273,10):match(RegEx)(RegEx re, string 
file = __FILE__, size_t line = __LINE__)

  with RegEx = CTRegexWrapper!char
  must satisfy one of the following constraints:
   is(RegEx == RegexOfT)
   is(RegEx == StaticRegexOfT)
   isSomeString!RegEx
tests/pyjamas_spec.d(155,45): Error: template 
pyjamas.Assertion!string.Assertion.match cannot deduce function 
from argument types !()(CTRegexWrapper!char), candidates are:
source/pyjamas.d(273,10):match(RegEx)(RegEx re, string 
file = __FILE__, size_t line = __LINE__)

  with RegEx = CTRegexWrapper!char
  must satisfy one of the following constraints:
   is(RegEx == RegexOfT)
   is(RegEx == StaticRegexOfT)
   isSomeString!RegEx
/usr/bin/dmd failed with exit code 1.



Re: Pijamas, a simple fluent assertation library (forked from Pyjamas)

2020-05-15 Thread Dmitry Olshansky via Digitalmars-d-announce

On Friday, 15 May 2020 at 12:35:27 UTC, Luis wrote:
On my run to raise stuff from dead packages, I come with 
Pijamas. A fork from Yamadacpc’s Pyjamas that works with D 
frontend 2.090 and forwards.


[...]


I was about to ask what is broken with ctRegex (well except that 
compiler usually explodes trying to swallow it)


[...]




Re: On the D Blog: Lomuto's Comeback

2020-05-15 Thread Steven Schveighoffer via Digitalmars-d-announce

On 5/14/20 9:26 AM, Mike Parker wrote:
After reading a paper that grabbed his curiosity and wouldn't let go, 
Andrei set out to determine if Lomuto partitioning should still be 
considered inferior to Hoare for quicksort on modern hardware. This blog 
post details his results.


Blog:
https://dlang.org/blog/2020/05/14/lomutos-comeback/

Reddit:
https://www.reddit.com/r/programming/comments/gjm6yp/lomutos_comeback_quicksort_partitioning/ 



HN:
https://news.ycombinator.com/item?id=23179160


Fantastic article!

-Steve


Pijamas, a simple fluent assertation library (forked from Pyjamas)

2020-05-15 Thread Luis via Digitalmars-d-announce
On my run to raise stuff from dead packages, I come with Pijamas. 
A fork from Yamadacpc’s Pyjamas that works with D frontend 2.090 
and forwards.


https://zardoz89.github.io/pijamas/


v0.2.2-beta

Versions v0.2.x must keep being source compatible with Pyjamas.

* Update to DLang frontend 2.090
* Autogeneration of GH Pages with documentation
* Rewrite tests to use Silly
* Fixed false positives with should.exists . The old approach to 
see if is convertible to null, wasn't working.
* Fixed .match(ctRegex) . Now mimics how std.regex : match 
handles it

* Improved the test battery to detect false positives.
* Documenting the source code, so ddoc can generate the 
documentation.


I think that v0.2.2 could be released as not beta version, but I 
keep confused about why Windows LDC 32 bit version keep failing 
when tries to build the tests...



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.


Re: On the D Blog: Lomuto's Comeback

2020-05-15 Thread Les De Ridder via Digitalmars-d-announce

On Thursday, 14 May 2020 at 13:26:23 UTC, Mike Parker wrote:
After reading a paper that grabbed his curiosity and wouldn't 
let go, Andrei set out to determine if Lomuto partitioning 
should still be considered inferior to Hoare for quicksort on 
modern hardware. This blog post details his results.


Blog:
https://dlang.org/blog/2020/05/14/lomutos-comeback/


Great post, and nice to have another example for how bad branches 
can

really be for performance!

One note: The clang/ldc compiler explorer links for
lomuto_partition_branchfree
are wrong.



Re: On the D Blog: Lomuto's Comeback

2020-05-15 Thread kinke via Digitalmars-d-announce
On Friday, 15 May 2020 at 10:28:41 UTC, Joseph Rushton Wakeling 
wrote:
One curious question -- unless I've misread things horribly, it 
looks like the D benchmarks for Lomuto branch-free are 
consistently slower than for C++.  Any idea why that is?  I 
would expect gcc/gdc and clang/ldc to produce effectively 
identical results for code like this.


Wrt. the LDC results, LDC v1.17 was shipped with LLVM 8.0.1, 
while the used clang is v10 based on LLVM 10, so that might 
account for some slight diffs.


Re: On the D Blog: Lomuto's Comeback

2020-05-15 Thread Joseph Rushton Wakeling via Digitalmars-d-announce

On Thursday, 14 May 2020 at 13:26:23 UTC, Mike Parker wrote:
After reading a paper that grabbed his curiosity and wouldn't 
let go, Andrei set out to determine if Lomuto partitioning 
should still be considered inferior to Hoare for quicksort on 
modern hardware. This blog post details his results.


Blog:
https://dlang.org/blog/2020/05/14/lomutos-comeback/


Nice stuff!

One curious question -- unless I've misread things horribly, it 
looks like the D benchmarks for Lomuto branch-free are 
consistently slower than for C++.  Any idea why that is?  I would 
expect gcc/gdc and clang/ldc to produce effectively identical 
results for code like this.


Re: On the D Blog: Lomuto's Comeback

2020-05-15 Thread Dmitry Olshansky via Digitalmars-d-announce

On Thursday, 14 May 2020 at 13:26:23 UTC, Mike Parker wrote:
After reading a paper that grabbed his curiosity and wouldn't 
let go, Andrei set out to determine if Lomuto partitioning 
should still be considered inferior to Hoare for quicksort on 
modern hardware. This blog post details his results.


Fantastic work and great result. Having privately done a very 
heavy critique of the narrow niche the article had chosen to 
explore I still recognize and love the results.


—
Dmitry Olshansky



Re: On the D Blog: Lomuto's Comeback

2020-05-15 Thread Francesco Mecca via Digitalmars-d-announce

On Thursday, 14 May 2020 at 13:26:23 UTC, Mike Parker wrote:
After reading a paper that grabbed his curiosity and wouldn't 
let go, Andrei set out to determine if Lomuto partitioning 
should still be considered inferior to Hoare for quicksort on 
modern hardware. This blog post details his results.


Blog:
https://dlang.org/blog/2020/05/14/lomutos-comeback/

Reddit:
https://www.reddit.com/r/programming/comments/gjm6yp/lomutos_comeback_quicksort_partitioning/

HN:
https://news.ycombinator.com/item?id=23179160


Wow, very interesting article.
Thanks for sharing.


Re: "Programming in D" on Educative.io

2020-05-15 Thread ShadoLight via Digitalmars-d-announce

On Friday, 15 May 2020 at 03:22:43 UTC, dangbinghoo wrote:

On Thursday, 14 May 2020 at 08:42:43 UTC, ShadoLight wrote:

On Wednesday, 13 May 2020 at 19:25:43 UTC, welkam wrote:

[...]


This opinion seems quite common in the D community, but I 
frankly don't see it. If you are referring to the D subset 
defined by the BetterC switch, well, maybe then I would agree. 
But not for D in general.


[...]


but D has GC enabled, then it's not re-engineering of C++.


To quote you back at yourself: "but D has GC enabled, then it's 
not re-engineering of C" ... either.


D has unique features as well as features taken/inspired from 
other languages.


Anyway, I quoted Walter - he referred to "D was conceived ... as 
a successor to C and C++..." [1]. Note that he conceived of D as 
a _successor_ to both C and C++, not just C.


The term "re-engineering", IMHO, is a bit misleading - like if 
some C (or C++) codebase was "re-engineered" to become D. That is 
not what happened. But maybe this is not what the OP meant.


In fact, looking at some synonyms of the term "successor" [2] 
IMHO gives a better insight into the objectives of D in relation 
to C/C++ than the idea of a "re-engineered C" (or C++):


-replacement
-beneficiary
-descendant
-follower
-inheritor
-next in line

I guess you can argue over what the term "re-engineering" really 
covers/means, but my original objection was to the idea that D 
was somehow a "re-engineering" (or even "successor") of only C, 
and not of C++ as well. It was not one or the other, it was both.


[1] 
https://web.archive.org/web/20021205114505/http://digitalmars.com/d/index.html

[2] https://www.thesaurus.com/browse/successor


Re: GCC 10.1 Released

2020-05-15 Thread Walter Bright via Digitalmars-d-announce

On 5/14/2020 9:57 AM, Iain Buclaw wrote:

As of last week (7th May), GCC 10.1 has now been released.


Thank you, Iain, for your hard and fantastic work!