Re: Working code in an upcoming PR by Timon Gehr
On Tuesday, 9 May 2017 at 13:19:09 UTC, Timon Gehr wrote: On 07.05.2017 19:03, Stanislav Blinov wrote: On Sunday, 7 May 2017 at 16:57:58 UTC, Andrei Alexandrescu wrote: [...] I see only unsurprising Jpeg artifacts and not much more :) It's too low resolution to make anything out. It's approximately this: --- alias Seq(T...)=T; void main(){ import std.stdio: writeln; import std.conv: to; static foreach(i;Seq!(0,1,2)){ mixin(`int x`~to!string(i)~" = i;"); } writeln(x0," ",x1," ",x2); } --- ./src/dmd -run staticforeach.d DMD v2.075.0-devel-fd4ff76 DEBUG 0 1 2 --- That was the first test case that worked. I have made it almost feature-complete yesterday: https://github.com/tgehr/dmd/blob/static-foreach/test_staticforeach.d Yes! Finally!
Re: Working code in an upcoming PR by Timon Gehr
On 07.05.2017 19:03, Stanislav Blinov wrote: On Sunday, 7 May 2017 at 16:57:58 UTC, Andrei Alexandrescu wrote: Zoom in on the screen for a nice surprise! http://imgur.com/a/qjI4l -- Andrei I see only unsurprising Jpeg artifacts and not much more :) It's too low resolution to make anything out. It's approximately this: --- alias Seq(T...)=T; void main(){ import std.stdio: writeln; import std.conv: to; static foreach(i;Seq!(0,1,2)){ mixin(`int x`~to!string(i)~" = i;"); } writeln(x0," ",x1," ",x2); } --- ./src/dmd -run staticforeach.d DMD v2.075.0-devel-fd4ff76 DEBUG 0 1 2 --- That was the first test case that worked. I have made it almost feature-complete yesterday: https://github.com/tgehr/dmd/blob/static-foreach/test_staticforeach.d
Re: Working code in an upcoming PR by Timon Gehr
On 5/7/17 7:03 PM, Stanislav Blinov wrote: On Sunday, 7 May 2017 at 16:57:58 UTC, Andrei Alexandrescu wrote: Zoom in on the screen for a nice surprise! http://imgur.com/a/qjI4l -- Andrei I see only unsurprising Jpeg artifacts and not much more :) It's too low resolution to make anything out. I think I know :) Timon was telling me about it. It's a PR to add static foreach to dmd. -Steve
Re: Working code in an upcoming PR by Timon Gehr
On Sunday, 7 May 2017 at 16:57:58 UTC, Andrei Alexandrescu wrote: Zoom in on the screen for a nice surprise! http://imgur.com/a/qjI4l -- Andrei I see only unsurprising Jpeg artifacts and not much more :) It's too low resolution to make anything out.