Re: [DIP] In-place struct initialization

2016-08-11 Thread Georgi D via Digitalmars-d
On Sunday, 31 July 2016 at 07:10:46 UTC, cym13 wrote: On Sunday, 31 July 2016 at 04:55:31 UTC, deadalnix wrote: On Saturday, 30 July 2016 at 21:42:42 UTC, cym13 wrote: [...] That doesn't help. In fact, it makes things worse as now constructor calls and function call do not have the same syn

Re: DMD producing huge binaries

2016-05-20 Thread Georgi D via Digitalmars-d
On Friday, 20 May 2016 at 19:37:23 UTC, Andrei Alexandrescu wrote: On 5/20/16 2:34 PM, Georgi D wrote: 1) Exponential growth of symbol name with voldemort types. I like Steven's solution where the compiler lowers the struct outside of the method. Was talking to Walter on the phone and he jus

Re: DMD producing huge binaries

2016-05-20 Thread Georgi D via Digitalmars-d
On Friday, 20 May 2016 at 16:21:55 UTC, ZombineDev wrote: On Friday, 20 May 2016 at 13:16:32 UTC, Johan Engelen wrote: On Friday, 20 May 2016 at 12:57:40 UTC, ZombineDev wrote: As I said earlier, it would be best if can prevent the generation of long symbols in the first place, because that

Re: DMD producing huge binaries

2016-05-20 Thread Georgi D via Digitalmars-d
On Thursday, 19 May 2016 at 16:41:59 UTC, Andrei Alexandrescu wrote: On 05/19/2016 11:56 AM, Georgi D wrote: Making a local copy of chain and moving the structure outside of the method solved the problem and reduced the code size. The stripped size even reduced from the version that did not e

Re: DMD producing huge binaries

2016-05-19 Thread Georgi D via Digitalmars-d
On Thursday, 19 May 2016 at 12:38:09 UTC, Steven Schveighoffer wrote: On 5/17/16 6:04 PM, ZombineDev wrote: On Tuesday, 17 May 2016 at 21:58:06 UTC, Andrei Alexandrescu wrote: On 05/17/2016 05:44 PM, Georgi D wrote: Hi, While working on a D project which heavily uses the lazy algorithms for

Re: Potential issue with DMD where the template constrains are not evaluated early enough to prevent type recursion

2016-05-18 Thread Georgi D via Digitalmars-d
On Wednesday, 18 May 2016 at 12:02:13 UTC, Hara Kenji wrote: On Tuesday, 17 May 2016 at 21:48:55 UTC, Georgi D wrote: On Friday, 13 May 2016 at 23:31:00 UTC, Timon Gehr wrote: On 13.05.2016 23:21, Georgi D wrote: [...] It's tricky. The reason it fails to compile is that the template argumen

Re: DMD producing huge binaries

2016-05-17 Thread Georgi D via Digitalmars-d
On Tuesday, 17 May 2016 at 21:58:06 UTC, Andrei Alexandrescu wrote: On 05/17/2016 05:44 PM, Georgi D wrote: Hi, While working on a D project which heavily uses the lazy algorithms for ranges I noticed a sudden huge increase in the compilation time and the produced binary size. [snip] Thank

Re: Potential issue with DMD where the template constrains are not evaluated early enough to prevent type recursion

2016-05-17 Thread Georgi D via Digitalmars-d
On Friday, 13 May 2016 at 23:31:00 UTC, Timon Gehr wrote: On 13.05.2016 23:21, Georgi D wrote: [...] It's tricky. The reason it fails to compile is that the template argument you are passing does not actually refer to the overload set. [...] Should I open a PR in bugzilla for this? Than

DMD producing huge binaries

2016-05-17 Thread Georgi D via Digitalmars-d
Hi, While working on a D project which heavily uses the lazy algorithms for ranges I noticed a sudden huge increase in the compilation time and the produced binary size. I chased down the offending change to just a small change in one line of the code which made the resulting binary to jump

Potential issue with DMD where the template constrains are not evaluated early enough to prevent type recursion

2016-05-13 Thread Georgi D via Digitalmars-d
Hi, I have the following code which should compile in my opinion: struct Foo {} import std.range.primitives; import std.algorithm.iteration : map, joiner; auto toChars(R)(R r) if (isInputRange!R) { return r.map!(toChars).joiner(", "); } auto toChars(Foo f) { import std.range : chain;