www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Release D 2.102.0

reply Iain Buclaw <ibuclaw gdcproject.org> writes:
Glad to announce D 2.102.0, ♥ to the 40 contributors.

This release comes with support for multiple message arguments in 
`static assert()`, stack allocated `scope` array literals, a new 
preview switch to add support for ` system` variables, and many 
more.

Downloads and full changelog are available from the dlang site.

http://dlang.org/download.html
http://dlang.org/changelog/2.102.0.html

-Iain
on behalf of the Dlang Core Team
Feb 02 2023
next sibling parent M.M. <matus email.cz> writes:
On Thursday, 2 February 2023 at 12:30:50 UTC, Iain Buclaw wrote:
 Glad to announce D 2.102.0, ♥ to the 40 contributors.

 This release comes with support for multiple message arguments 
 in `static assert()`, stack allocated `scope` array literals, a 
 new preview switch to add support for ` system` variables, and 
 many more.

 Downloads and full changelog are available from the dlang site.

 http://dlang.org/download.html
 http://dlang.org/changelog/2.102.0.html

 -Iain
 on behalf of the Dlang Core Team
Fantastic!
Feb 02 2023
prev sibling next sibling parent "Richard (Rikki) Andrew Cattermole" <richard cattermole.co.nz> writes:
Awesome!

Remember if you need any help with any of the Unicode changes, please 
let me know!
Feb 02 2023
prev sibling next sibling parent reply jmh530 <john.michael.hall gmail.com> writes:
On Thursday, 2 February 2023 at 12:30:50 UTC, Iain Buclaw wrote:
 Glad to announce D 2.102.0, ♥ to the 40 contributors.

 This release comes with support for multiple message arguments 
 in `static assert()`, stack allocated `scope` array literals, a 
 new preview switch to add support for ` system` variables, and 
 many more.

 Downloads and full changelog are available from the dlang site.

 http://dlang.org/download.html
 http://dlang.org/changelog/2.102.0.html

 -Iain
 on behalf of the Dlang Core Team
Thanks. I was reading through some of the PRs referenced in [issue 23548](https://issues.dlang.org/show_bug.cgi?id=23548), and a little confused by the takeaway. It currently searches for Di, then D files. If it finds none of them, then it searches for C/h files. Is that right? Is this search order described in the spec anywhere?
Feb 02 2023
parent reply Steven Schveighoffer <schveiguy gmail.com> writes:
On 2/2/23 10:01 AM, jmh530 wrote:

 I was reading through some of the PRs referenced in [issue 
 23548](https://issues.dlang.org/show_bug.cgi?id=23548), and a little 
 confused by the takeaway. It currently searches for Di, then D files. If 
 it finds none of them, then it searches for C/h files. Is that right? Is 
 this search order described in the spec anywhere?
Previously, it would search in each path, and look for the files in the order of di, then d, then i, then c. So based on the order of the paths, it might find a matching C file before a matching D file in a later import path. Now, it searches all the paths for D files first, then all the paths for C files second, ensuring that it will prefer D files. The spec I don't think covers how files are searched for module definitions. The compiler command line docs have some information on what files are expected to contain, but doesn't seem to specify priorities or how they are searched. I don't know if it should be covered in the spec or the compiler docs. -Steve
Feb 02 2023
parent jmh530 <john.michael.hall gmail.com> writes:
On Thursday, 2 February 2023 at 15:56:56 UTC, Steven 
Schveighoffer wrote:
 [snip]

 Previously, it would search in each path, and look for the 
 files in the order of di, then d, then i, then c. So based on 
 the order of the paths, it might find a matching C file before 
 a matching D file in a later import path.

 Now, it searches all the paths for D files first, then all the 
 paths for C files second, ensuring that it will prefer D files.

 The spec I don't think covers how files are searched for module 
 definitions. The compiler command line docs have some 
 information on what files are expected to contain, but doesn't 
 seem to specify priorities or how they are searched. I don't 
 know if it should be covered in the spec or the compiler docs.

 -Steve
Thanks. The new way seems to make more sense to me.
Feb 02 2023
prev sibling next sibling parent reply =?UTF-8?Q?Ali_=c3=87ehreli?= <acehreli yahoo.com> writes:
On 2/2/23 04:30, Iain Buclaw wrote:

 Glad to announce D 2.102.0, ♥ to the 40 contributors.
Thanks indeed! Two issues that I had some interest in are fixed. Yay! https://issues.dlang.org/show_bug.cgi?id=17378 https://issues.dlang.org/show_bug.cgi?id=23561 I am aware how complex unicode collation is[1] but I somehow find it very wrong to list Ömer at the end. :) [...]
 Steven Schveighoffer
 Vladimir Panteleev
 Walter Bright
 Ömer Faruk IRMAK
Obviously because I am used to the Turkish alphabet but in any case because Ö is very much related to O, I find it universally better to list Ö right after O. (The same should be for all latin based characters.) I see there is std.uni.icmp which uses dmd/std/internal/unicode_tables.d but it doesn't help because the array fullCaseTable in there seems to be about equivalence (e.g. of ß and ss). I think we need a "mostly correct" collation for latin based characters. I have a hacky[2] solution only for Turkish, which I used for the Index section of my book: https://bitbucket.org/acehreli/ddili/src/4c0552fe8352dfe905c9734a57d84d36ce4ed476/src/alphabet.d#lines-50 Ali [1] https://www.unicode.org/reports/tr10/ [2] The comment about the hacky treatment of 'I' in there is another example of how difficult collation is. This may not fit everybody's preference but as a result and as I desired, the entries "IDE" and "InputRange" appear under 'İ' in the index (instead of 'I'): http://ddili.org/ders/d/ix.html
Feb 02 2023
next sibling parent "Richard (Rikki) Andrew Cattermole" <richard cattermole.co.nz> writes:
On 03/02/2023 6:22 AM, Ali Çehreli wrote:
 but it doesn't help because the array fullCaseTable in there seems to be 
 about equivalence (e.g. of ß and ss). I think we need a "mostly correct" 
 collation for latin based characters.
Yeah collation is a very different beast than comparison, we can absolutely have a correct implementation its just somebody has to do it. What we have is correct (although incomplete and on my todo list to improve), but it isn't collation and won't be as its a different algorithm and tables. I.e. we are missing https://www.unicode.org/Public/UCA/15.0.0/allkeys.txt https://issues.dlang.org/show_bug.cgi?id=10566
Feb 02 2023
prev sibling next sibling parent reply jmh530 <john.michael.hall gmail.com> writes:
On Thursday, 2 February 2023 at 17:22:46 UTC, Ali Çehreli wrote:
 [snip]

   https://issues.dlang.org/show_bug.cgi?id=17378

 
Looks like your bug report is for assert and static assert, but the PR only handles static assert. You might want to file a separate one for assert.
Feb 02 2023
parent reply =?UTF-8?Q?Ali_=c3=87ehreli?= <acehreli yahoo.com> writes:
On 2/2/23 10:29, jmh530 wrote:
 On Thursday, 2 February 2023 at 17:22:46 UTC, Ali Çehreli wrote:
 [snip]

   https://issues.dlang.org/show_bug.cgi?id=17378
Looks like your bug report is for assert and static assert, but the PR only handles static assert.
I've noticed that as well.
 You might want to file a separate one for assert.
I am a little hesitant after long philosophical (to me) discussions on a tangential topic. That forum discussion is linked from this bug: https://issues.dlang.org/show_bug.cgi?id=17226 The forum discussion: https://forum.dlang.org/thread/qwixdanceeupdefyqwnr forum.dlang.org I still agree with myself :) in that discussion here: https://forum.dlang.org/post/tlqcjq$usk$1 digitalmars.com And I think this code is how 17226 should be fixed as: https://forum.dlang.org/post/tldrrs$qn$1 digitalmars.com Ali
Feb 02 2023
parent reply Max Samukha <maxsamukha gmail.com> writes:
On Thursday, 2 February 2023 at 22:46:51 UTC, Ali Çehreli wrote:

 https://forum.dlang.org/thread/qwixdanceeupdefyqwnr forum.dlang.org

 I still agree with myself :) in that discussion here:

   https://forum.dlang.org/post/tlqcjq$usk$1 digitalmars.com
BTW, check out another case of D violating the "if in an invalid state, die" precept. The following code not only runs the upstream destructor (which depends on successful completion of the downstream one), but does that in an infinite loop: struct TransactionFactory { Transaction spawnTransaction() { return Transaction(0); } // depends on all Transactions having been destroyed ~this() { assert(Transaction.count == 0); } } struct Transaction { static int count; // the usual "fake nullary constructor" fiddlesticks this() disable; this(int dummy) { count++; } ~this() { assert(false); // a failure that leaves the system in an invalid state count--; } } void main() { TransactionFactory tf; Transaction t = tf.spawnTransaction; }
Feb 03 2023
parent Mathias LANG <geod24 gmail.com> writes:
On Friday, 3 February 2023 at 08:33:26 UTC, Max Samukha wrote:
 BTW, check out another case of D violating the "if in an 
 invalid state, die" precept. The following code not only runs 
 the upstream destructor (which depends on successful completion 
 of the downstream one), but does that in an infinite loop:

 [...]
Yep, it's a regression: https://issues.dlang.org/show_bug.cgi?id=23164
Feb 03 2023
prev sibling next sibling parent Iain Buclaw <ibuclaw gdcproject.org> writes:
On Thursday, 2 February 2023 at 17:22:46 UTC, Ali Çehreli wrote:
 I am aware how complex unicode collation is[1] but I somehow 
 find it very wrong to list Ömer at the end. :)

 [...]
 Steven Schveighoffer
 Vladimir Panteleev
 Walter Bright
 Ömer Faruk IRMAK
Obviously because I am used to the Turkish alphabet but in any case because Ö is very much related to O, I find it universally better to list Ö right after O. (The same should be for all latin based characters.) I see there is std.uni.icmp which uses dmd/std/internal/unicode_tables.d but it doesn't help because the array fullCaseTable in there seems to be about equivalence (e.g. of ß and ss). I think we need a "mostly correct" collation for latin based characters.
You are more than welcome to raise a PR to fix the sort. :-) https://github.com/dlang/tools/blob/master/contributors.d#L107-L113
Feb 02 2023
prev sibling parent Salih Dincer <salihdb hotmail.com> writes:
On Thursday, 2 February 2023 at 17:22:46 UTC, Ali Çehreli wrote:
 On 2/2/23 04:30, Iain Buclaw wrote:

 Glad to announce D 2.102.0, ♥ to the 40 contributors.
... Two issues that I had some interest in are fixed. Yay!
very much!
 "Ali hocam, bence diğer konu daha önemli, hem de çok!"
Because it can wait in line for the mighty David, who has more pressing issues.
 "Çünkü daha acil sorunları olan çok güçlü D için sırada 
 bekleyebilir."
Moreover, other programming languages ​​have the same problem and non-native speakers come up with their own solutions.
 "Üstelik diğer programlama dillerinde de aynı sorun var ve ana 
 dili İngilizce olmayanlar kendi çözümlerini buluyor."
In summary this is not D's primary problem.
 "Özetle bu D'nin öncelikli sorun değildir."
By the way, thank you very much for the update. This was the first update I followed from start to finish.
 "Bu arada, güncelleme için çok teşekkür ederim.  Bu, başından 
 sonuna kadar takip ettiğim ilk güncellemeydi."
SDB 79
Feb 02 2023
prev sibling next sibling parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
On Thursday, 2 February 2023 at 12:30:50 UTC, Iain Buclaw wrote:
 http://dlang.org/download.html
 http://dlang.org/changelog/2.102.0.html

 -Iain
 on behalf of the Dlang Core Team
- Stack traces can now be generated when run inside the GC collection routine. - InvalidMemoryOperationError now has a stack trace. This is awesome. And thanks for the release Iain.
Feb 02 2023
prev sibling next sibling parent ryuukk_ <ryuukk.dev gmail.com> writes:
On Thursday, 2 February 2023 at 12:30:50 UTC, Iain Buclaw wrote:
 Glad to announce D 2.102.0, ♥ to the 40 contributors.

 This release comes with support for multiple message arguments 
 in `static assert()`, stack allocated `scope` array literals, a 
 new preview switch to add support for ` system` variables, and 
 many more.

 Downloads and full changelog are available from the dlang site.

 http://dlang.org/download.html
 http://dlang.org/changelog/2.102.0.html

 -Iain
 on behalf of the Dlang Core Team
 Dub changes
 Binary output will now be in a central cache
A welcome change, thanks!
 Bugzilla 21301: Wrong values being passed in long parameter list
Finally fixed, thanks!!
Feb 03 2023
prev sibling next sibling parent reply Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
On Thursday, 2 February 2023 at 12:30:50 UTC, Iain Buclaw wrote:
 http://dlang.org/download.html
Seems there's problems with the installer script: https://issues.dlang.org/show_bug.cgi?id=23671
Feb 04 2023
parent reply Iain Buclaw <ibuclaw gdcproject.org> writes:
On Sunday, 5 February 2023 at 01:59:47 UTC, Andrej Mitrovic wrote:
 On Thursday, 2 February 2023 at 12:30:50 UTC, Iain Buclaw wrote:
 http://dlang.org/download.html
Seems there's problems with the installer script: https://issues.dlang.org/show_bug.cgi?id=23671
Indeed, it's not downloading the *new* version of https://dlang.org/d-keyring.gpg As a workaround remove ~/dlang/d-keyring.gpg and try again.
Feb 13 2023
parent notna <notna.remove.this ist-einmalig.de> writes:
On Monday, 13 February 2023 at 20:55:42 UTC, Iain Buclaw wrote:
 On Sunday, 5 February 2023 at 01:59:47 UTC, Andrej Mitrovic 
 wrote:
 On Thursday, 2 February 2023 at 12:30:50 UTC, Iain Buclaw 
 wrote:
 http://dlang.org/download.html
Seems there's problems with the installer script: https://issues.dlang.org/show_bug.cgi?id=23671
Indeed, it's not downloading the *new* version of https://dlang.org/d-keyring.gpg As a workaround remove ~/dlang/d-keyring.gpg and try again.
Well, this seems to happen now and then... since many years - https://forum.dlang.org/search?q=d-keyring%2Egpg&page=1 - https://github.com/dlang/installer/pull/457
Feb 14 2023
prev sibling parent reply Iain Buclaw <ibuclaw gdcproject.org> writes:
Glad to announce the first beta for the 2.102.1 point release, ♥ 
to the 6 contributors.

This fixes two breaking regressions found in dub 1.31.0 after the 
initial release.

http://dlang.org/download.html#dmd_beta
http://dlang.org/changelog/2.102.1.html

As usual please report any bugs at
https://issues.dlang.org

-Iain
on behalf of the Dlang Core Team
Feb 13 2023
parent Iain Buclaw <ibuclaw gdcproject.org> writes:
Glad to announce D 2.102.1, ♥ to the 6 contributors.

http://dlang.org/download.html

This point release fixes a few issues over 2.102.0, see the 
changelog for more details.

http://dlang.org/changelog/2.102.1.html

-Iain
on behalf of the Dlang Core Team
Feb 15 2023