November 05, 2015
On Wednesday, 4 November 2015 at 17:52:23 UTC, Dmitry Olshansky wrote:
> If host machine is x64 bit windows try setting large address aware bit on the executable (there are tools to do that IRC), would allow it to eat up to ~4 gigs.

What can we do when it eats up all 4 gigs? (Windows)

November 05, 2015
On Wednesday, 04 November, 2015 09:49 AM, Martin Nowak wrote:
> Glad to announce D 2.069.0.
>
> http://dlang.org/download.html
> http://downloads.dlang.org/releases/2.x/2.069.0/
>
> This is the first release with a self-hosted dmd compiler and comes with
> even more rangified phobos functions, std.experimental.allocator, and
> many other improvements.
>
> See the changelog for more details.
> http://dlang.org/changelog/2.069.0.html
>
> -Martin

Great! This is fantastic!
Thank you D community.
November 07, 2015
On Thursday, November 05, 2015 02:38:01 Sebastiaan Koppe via Digitalmars-d-announce wrote:
> On Wednesday, 4 November 2015 at 17:52:23 UTC, Dmitry Olshansky wrote:
> > If host machine is x64 bit windows try setting large address aware bit on the executable (there are tools to do that IRC), would allow it to eat up to ~4 gigs.
>
> What can we do when it eats up all 4 gigs? (Windows)

With any program, if you're hitting the limit of the 32-bit address space (which is actually more like 3.6 GiB than 4), then you really only have two options - use less memory or go to 64-bit. In the case of dmd specifically, that means either reducing how much memory dmd consumes (which would mean improvements to the dmd codebase), have a 64-bit build of dmd (I have no idea what's involved with that, though it sounds like it's been done before), or you have to build your program in separate pieces that each require a low enough amount of memory when compiling that they don't run out of memory. Phobos has been built in pieces for quite a while now specifically because it requires too much memory to build it all at once (std.algorithm alone requires a lot of memory thanks to all of the template instantiations in its unit tests).

- Jonathan M Davis

November 07, 2015
On 07-Nov-2015 16:25, Jonathan M Davis via Digitalmars-d-announce wrote:
> On Thursday, November 05, 2015 02:38:01 Sebastiaan Koppe via Digitalmars-d-announce wrote:
>> On Wednesday, 4 November 2015 at 17:52:23 UTC, Dmitry Olshansky
>> wrote:
>>> If host machine is x64 bit windows try setting large address
>>> aware bit on the executable (there are tools to do that IRC),
>>> would allow it to eat up to ~4 gigs.
>>
>> What can we do when it eats up all 4 gigs? (Windows)
>

Getting 64-bit packaged should be simplest thing possible. Ask around on
D.learn maybe somebody could either show how to build it manually or at least have done so before.

Otherwise - the single biggest problem with memory is CTFE leaking memory like crazy. Second to that is templates.

IMHO enabling D's GC in the frontend is better way to fix leaking in the CTFE, but there are some issues with that (it segfaults if we enable GC).

Lastly compiler's frontend could use some improvement in general and now that it's written in D and I totally expect better memory management to come soon.

> Phobos has been built in pieces for quite a while now
> specifically because it requires too much memory to build it all at once
> (std.algorithm alone requires a lot of memory thanks to all of the template
> instantiations in its unit tests).
>

That's only true for unittests, it still builds the library in one go (in about 7 seconds for me) on windows.


-- 
Dmitry Olshansky
November 08, 2015
On Saturday, November 07, 2015 17:41:20 Dmitry Olshansky via Digitalmars-d-announce wrote:
> On 07-Nov-2015 16:25, Jonathan M Davis via Digitalmars-d-announce wrote:
> > Phobos has been built in pieces for quite a while now
> > specifically because it requires too much memory to build it all at once
> > (std.algorithm alone requires a lot of memory thanks to all of the template
> > instantiations in its unit tests).
> >
>
> That's only true for unittests, it still builds the library in one go (in about 7 seconds for me) on windows.

Yes, but it's forced to do that with the unit test build, because it takes too much memory to compile them. Other programs may have the same problem (especially if they use templates and CTFE heavily).

But dmd just does not do well with memory consumption when it comes to templates and CTFE, and it definitely will be a major improvement when we can reduce how much memory compiling them requires.

- Jonathan M Davis

November 08, 2015
On Saturday, 7 November 2015 at 13:25:41 UTC, Jonathan M Davis wrote:
>> What can we do when it eats up all 4 gigs? (Windows)
>
> With any program, if you're hitting the limit of the 32-bit address space (which is actually more like 3.6 GiB than 4), then you really only have two options - use less memory or go to 64-bit. In the case of dmd specifically, that means either reducing how much memory dmd consumes (which would mean improvements to the dmd codebase), have a 64-bit build of dmd (I have no idea what's involved with that, though it sounds like it's been done before), or you have to build your program in separate pieces that each require a low enough amount of memory when compiling that they don't run out of memory. Phobos has been built in pieces for quite a while now specifically because it requires too much memory to build it all at once (std.algorithm alone requires a lot of memory thanks to all of the template instantiations in its unit tests).
>
> - Jonathan M Davis

With a codebase like phobos, compiling in several steps isn't a bad solution. But I am building a parser using pegged, and splitting up the grammar into different modules feels like a no-no. It's an option though.

Right now I run compile with gdc in a virtual machine. Still eats about 7 gigs.

The 64bit dmd would be nice. I waved the idea goodbye when I couldn't find a download link. Maybe need to look into it.
November 08, 2015
On Sunday, 8 November 2015 at 14:14:23 UTC, Sebastiaan Koppe wrote:
> With a codebase like phobos, compiling in several steps isn't a bad solution. But I am building a parser using pegged, and splitting up the grammar into different modules feels like a no-no. It's an option though.

Note that you can still used pegged in a stand-alone style with just saving generator output in a separate module and building it with project in a separate step. This means losing one of main advantages compared to using 3d party generators but if you hit the memory limit hard it may be the only option for now.
November 08, 2015
On Sunday, 8 November 2015 at 14:22:38 UTC, Dicebot wrote:
> On Sunday, 8 November 2015 at 14:14:23 UTC, Sebastiaan Koppe wrote:
>> With a codebase like phobos, compiling in several steps isn't a bad solution. But I am building a parser using pegged, and splitting up the grammar into different modules feels like a no-no. It's an option though.
>
> Note that you can still used pegged in a stand-alone style with just saving generator output in a separate module and building it with project in a separate step. This means losing one of main advantages compared to using 3d party generators but if you hit the memory limit hard it may be the only option for now.

You mean instead of mixin(grammer(`...`)) I write the output of grammer(`...`) to a file and include that into the final build?

That might be a nice idea once I make a dub package out of it; to presupply the generated parser instead of eating up user's mem.

Thanks.
November 08, 2015
On 11/03/2015 08:49 PM, Martin Nowak wrote:
> Glad to announce D 2.069.0.
>
> http://dlang.org/download.html
> http://downloads.dlang.org/releases/2.x/2.069.0/
>
> This is the first release with a self-hosted dmd compiler and comes with
> even more rangified phobos functions, std.experimental.allocator, and
> many other improvements.
>
> See the changelog for more details.
> http://dlang.org/changelog/2.069.0.html
>
> -Martin

This schedule seems to work well. Daily downloads on the rise - 28-days moving average almost 1400 as of today. Good work everyone and particularly thanks Martin for putting us on a schedule!

http://erdani.com/d/downloads.daily.png


Andrei

November 08, 2015
On Sunday, 8 November 2015 at 18:56:55 UTC, Andrei Alexandrescu wrote:
> On 11/03/2015 08:49 PM, Martin Nowak wrote:
>> Glad to announce D 2.069.0.
>>
>> http://dlang.org/download.html
>> http://downloads.dlang.org/releases/2.x/2.069.0/
>>
>> This is the first release with a self-hosted dmd compiler and comes with
>> even more rangified phobos functions, std.experimental.allocator, and
>> many other improvements.
>>
>> See the changelog for more details.
>> http://dlang.org/changelog/2.069.0.html
>>
>> -Martin
>
> This schedule seems to work well. Daily downloads on the rise - 28-days moving average almost 1400 as of today. Good work everyone and particularly thanks Martin for putting us on a schedule!
>
> http://erdani.com/d/downloads.daily.png
>
>
> Andrei

This made me a bit interested on Linux package downloads, but the only sources seem to be self-reported so you can only compare it relatively.

Interestingly, GDC seems *very* popular - it has a 4:1 install rate of gccgo and only trailing slightly behind the golang-go package(reference compiler?) on Ubuntu's popcon. Debian's shows nearly similar numbers. LDC is lagging severely behind on both - packaging issue?