May 05, 2021

On Wednesday, 5 May 2021 at 09:18:58 UTC, Imperatorn wrote:

>

If I use dmd or dmd-beta. But if I change it to dmd-nightly it doesn't :(

That's because nightlies are broken. The compiler used is actually somewhere between 2.091 and 2.092 :

https://run.dlang.io/is/foS0FX

Also visible there : http://downloads.dlang.org/nightlies/.
There are not even promoted on the main download page, as it used to be.

May 05, 2021

On Wednesday, 5 May 2021 at 09:18:58 UTC, Imperatorn wrote:

>

On Wednesday, 5 May 2021 at 08:58:41 UTC, user1234 wrote:

>

On Saturday, 1 May 2021 at 11:32:47 UTC, Blatnik wrote:

>

I love how D redesigned the terrible C/C++ arrays. And it's awesome that array operations like element wise +, -, etc. are built into the language - it makes me want to use arrays and slices for everything. But there are still some rough edges in the design.

I have experimented some and found a few workarounds which might be acceptable.

But, I'm having some weird bug. On dmd and dmd-beta it works, but on dmd-nightly I get:

cannot interpret array literal expression [1, 2, 3] + [3, 2, 1] at compile time

I think this might be a regression?

Like, this works as I want:
https://run.dlang.io/is/rHRiP9

If I use dmd or dmd-beta. But if I change it to dmd-nightly it doesn't :(

😢😢😢

Output locally from https://run.dlang.io/is/ZUFFfZ:

PS C:\Temp\D\temp> dmd .\arrays.d
2096L
PS C:\Temp\D\temp> .\arrays.exe
[4, 4, 4]
[4, 4, 4]
[4, 4, 4]
[4, 4, 4]
[4, 4, 4]
PS C:\Temp\D\temp> ldc2 .\arrays.d
2096L
PS C:\Temp\D\temp> .\arrays.exe
[4, 4, 4]
[4, 4, 4]
[4, 4, 4]
[4, 4, 4]
[4, 4, 4]

May 05, 2021
On 04.05.21 20:16, Q. Schroll wrote:
> 
> The operation necessitates an allocation and people here don't like hidden allocations.


(Just some of them. Some of them obnoxiously loud. They shouldn't dictate language evolution.)
May 05, 2021

On Wednesday, 5 May 2021 at 09:28:45 UTC, Imperatorn wrote:

>

On Wednesday, 5 May 2021 at 09:18:58 UTC, Imperatorn wrote:

>

On Wednesday, 5 May 2021 at 08:58:41 UTC, user1234 wrote:

>

On Saturday, 1 May 2021 at 11:32:47 UTC, Blatnik wrote:

>

I love how D redesigned the terrible C/C++ arrays. And it's awesome that array operations like element wise +, -, etc. are built into the language - it makes me want to use arrays and slices for everything. But there are still some rough edges in the design.

I have experimented some and found a few workarounds which might be acceptable.

But, I'm having some weird bug. On dmd and dmd-beta it works,

This all works with 2.096.0 and beta but not nightly

import std.stdio;

immutable ic = [1, 2, 3] + [3, 2, 1];
const ca2 = [1, 2, 3] + [3, 2, 1];
enum ea2 = [1, 2, 3] + [3, 2, 1];

int[] i3 = [1, 2, 3] + [3, 2, 1];

auto a6 = [1, 2, 3] + [3, 2, 1];

void main()
{
    pragma(msg, __VERSION__);

    auto a = [1, 2, 3];
    auto b = [3, 2, 1];

    enum ia2 = [1, 2, 3] + [3, 2, 1] + [1, 1, 1];

    int[3] d;

    d = a[] + b[];

    writeln(ia2);
    writeln(ic);
    writeln(ca2);
    writeln(ea2);
    writeln(a6);
    writeln(d);
}
May 05, 2021

On Wednesday, 5 May 2021 at 09:33:47 UTC, Imperatorn wrote:

>

On Wednesday, 5 May 2021 at 09:28:45 UTC, Imperatorn wrote:

>

On Wednesday, 5 May 2021 at 09:18:58 UTC, Imperatorn wrote:

>

On Wednesday, 5 May 2021 at 08:58:41 UTC, user1234 wrote:

>

On Saturday, 1 May 2021 at 11:32:47 UTC, Blatnik wrote:

>

I love how D redesigned the terrible C/C++ arrays. And it's awesome that array operations like element wise +, -, etc. are built into the language - it makes me want to use arrays and slices for everything. But there are still some rough edges in the design.

I have experimented some and found a few workarounds which might be acceptable.

But, I'm having some weird bug. On dmd and dmd-beta it works,

This all works with 2.096.0 and beta but not nightly

lol, nightlies are not updated since 13 monthes...

https://forum.dlang.org/post/avkkqfjtfrwtmnvpxbot@forum.dlang.org

May 05, 2021

On Wednesday, 5 May 2021 at 09:26:39 UTC, user1234 wrote:

>

On Wednesday, 5 May 2021 at 09:18:58 UTC, Imperatorn wrote:

>

If I use dmd or dmd-beta. But if I change it to dmd-nightly it doesn't :(

That's because nightlies are broken. The compiler used is actually somewhere between 2.091 and 2.092 :

https://run.dlang.io/is/foS0FX

Also visible there : http://downloads.dlang.org/nightlies/.
There are not even promoted on the main download page, as it used to be.

Oh, what's happening? I thought nightly was nightly :D

May 05, 2021

On Wednesday, 5 May 2021 at 09:42:01 UTC, Imperatorn wrote:

>

On Wednesday, 5 May 2021 at 09:26:39 UTC, user1234 wrote:

>

On Wednesday, 5 May 2021 at 09:18:58 UTC, Imperatorn wrote:

>

If I use dmd or dmd-beta. But if I change it to dmd-nightly it doesn't :(

That's because nightlies are broken. The compiler used is actually somewhere between 2.091 and 2.092 :

https://run.dlang.io/is/foS0FX

Also visible there : http://downloads.dlang.org/nightlies/.
There are not even promoted on the main download page, as it used to be.

Oh, what's happening? I thought nightly was nightly :D

They could be restored soon. There's a related PR https://github.com/dlang/dmd/pull/12491, it's not sure if it aims at restoring nighlies. It 90% sure tho.

May 05, 2021

On Wednesday, 5 May 2021 at 09:47:37 UTC, user1234 wrote:

>

On Wednesday, 5 May 2021 at 09:42:01 UTC, Imperatorn wrote:

>

On Wednesday, 5 May 2021 at 09:26:39 UTC, user1234 wrote:

>

On Wednesday, 5 May 2021 at 09:18:58 UTC, Imperatorn wrote:

>

If I use dmd or dmd-beta. But if I change it to dmd-nightly it doesn't :(

That's because nightlies are broken. The compiler used is actually somewhere between 2.091 and 2.092 :

https://run.dlang.io/is/foS0FX

Also visible there : http://downloads.dlang.org/nightlies/.
There are not even promoted on the main download page, as it used to be.

Oh, what's happening? I thought nightly was nightly :D

They could be restored soon. There's a related PR https://github.com/dlang/dmd/pull/12491, it's not sure if it aims at restoring nighlies. It 90% sure tho.

Thanks for the info!

1 2 3 4 5
Next ›   Last »