May 16, 2021

On Sunday, 16 May 2021 at 03:58:15 UTC, Mike Parker wrote:

>

dmd doesn't release memory, either.

That's the missing puzzle piece. Since about two months I wonder why running the unittests on phobos with 3 cores on my computer practically uses 4 cores. I meanwhile found out, that the 4th core is the swap demon and that it happens when the regex modules (containing a lot of memory consuming unittests) are compiled...

May 16, 2021

On Sunday, 16 May 2021 at 12:42:44 UTC, Bastiaan Veelo wrote:

>

On Sunday, 16 May 2021 at 10:50:38 UTC, Johan Engelen wrote:

>

On Sunday, 16 May 2021 at 03:58:15 UTC, Mike Parker wrote:

>

On Sunday, 16 May 2021 at 03:46:50 UTC, Ola Fosheim Grostad wrote:
Ola's statement that

>

dmd does not ship with GC enabled

is false, given the -lowmem compiler option:

>

-lowmem
Enable the garbage collector for the compiler, reducing the compiler memory requirements but increasing compile times.

So dmd as shipped can be used with and without the GC, the default being fast. You've got to have a default.

So, you just confirmed that my statement was true.

My MAIN POINT was however that D does not have a system level management option if it does not have an option that deemed good enough for DMD. And that would be the default.

Calling free manually isnt it, because that is manual management that nobody wants to do, and not calling free is even worse.

Whatever the default is, it should be a memory management solution that can be recommended and pointed to as a feature, by being the default that solution would be given priority.

Simple language development strategy to ensure improved quality over time.

May 16, 2021

Folks, I think the forum is discussing whether to do GC or not which IMHO is a wrong thinking. We need both. I think GC is good enough for most of the use cases whether its web services, user tools, business logic etc. Do you really think Go/Rust without google/mozilla support and money and constant promotion could have reached this popularity. no way. My request to the community is let D be good at both. With a switch of GC=off, people should be able to use manual memory management and also able to use stdlib and lot of libraries. Not sure if its technically possible. Most people will use D with GC on. I know we can turn off GC and mix manual memory management. But not sure we are able to understand the developer community. So lets make it more clear with a black and white approach. Instead we gave them options with lot of ifs and buts.
We should get their feedback(please initiate a survey). Lets create small groups to improve specific areas, lets do benchmarks, lets create a plan, improve our documentation. If you create a plan and divide into smaller milestones people can help their part. I think we have all the ammunition its just that we need to clean, improve and show case better. I guess industry wants a simple, secure language which can be easily interop with billions of existing C/C++ codebases. Instead of hundreds of features, lets focus on tooling, bootstrap, strengths etc. We need a reincarnation.

May 16, 2021

On Sunday, 16 May 2021 at 13:01:58 UTC, Berni44 wrote:

>

On Sunday, 16 May 2021 at 03:58:15 UTC, Mike Parker wrote:

>

dmd doesn't release memory, either.

That's the missing puzzle piece. Since about two months I wonder why running the unittests on phobos with 3 cores on my computer practically uses 4 cores. I meanwhile found out, that the 4th core is the swap demon and that it happens when the regex modules (containing a lot of memory consuming unittests) are compiled...

Oh yes. If you look at ASan's output (compile with ldc or gdc) on a typical dmd test suite run you're looking at hundreds of thousands of lines worth of memory leaks (some of this is from the GC, others not). This isn't a huge problem in the normal case however the memory allocation/access patterns are not pretty when the going gets tough.

May 16, 2021

On Sunday, 16 May 2021 at 18:24:11 UTC, dogman wrote:

>

[...]

There are "GC off" switches.

@nogc, GC.disable and betterC

May 16, 2021

On Sunday, 16 May 2021 at 19:46:06 UTC, Imperatorn wrote:

>

On Sunday, 16 May 2021 at 18:24:11 UTC, dogman wrote:

>

[...]

There are "GC off" switches.

@nogc, GC.disable and betterC

But then we dont know if all standard library and other modules can be used. We dont even have associate arrays etc. What we want is a pluggable framework where people can use the default GC or their GC or manual memory management by registering malloc/free's(like zig). Code is same. I am not sure technically if its possible as I am not an expert in compiler.

May 16, 2021

On Sunday, 16 May 2021 at 20:33:12 UTC, dogman wrote:

>

On Sunday, 16 May 2021 at 19:46:06 UTC, Imperatorn wrote:

>

On Sunday, 16 May 2021 at 18:24:11 UTC, dogman wrote:

>

[...]

There are "GC off" switches.

@nogc, GC.disable and betterC

But then we dont know if all standard library and other modules can be used. We dont even have associate arrays etc. What we want is a pluggable framework where people can use the default GC or their GC or manual memory management by registering malloc/free's(like zig). Code is same. I am not sure technically if its possible as I am not an expert in compiler.

Rust says "Rewrite", D will say "Extend" which means extend your code and rewrite slowly with a safe and simple language. Companies can start writing D and use their existing c/c++ code. I have been working in c/c++ for last 10-15 years still I couldnt follow rust easily. Went through the rust book 2 times. I do like some part of it but any big code base looks horribly complex. I doubted if its my problem or is language is complex and bad to read.

May 16, 2021

On Sunday, 16 May 2021 at 20:33:12 UTC, dogman wrote:

>

On Sunday, 16 May 2021 at 19:46:06 UTC, Imperatorn wrote:

>

On Sunday, 16 May 2021 at 18:24:11 UTC, dogman wrote:

>

[...]

There are "GC off" switches.

@nogc, GC.disable and betterC

But then we dont know if all standard library and other modules can be used. We dont even have associate arrays etc. What we want is a pluggable framework where people can use the default GC or their GC or manual memory management by registering malloc/free's(like zig). Code is same. I am not sure technically if its possible as I am not an expert in compiler.

Yeah, I see what you mean

May 16, 2021

On Sunday, 16 May 2021 at 20:36:41 UTC, dogman wrote:

>

On Sunday, 16 May 2021 at 20:33:12 UTC, dogman wrote:

>

On Sunday, 16 May 2021 at 19:46:06 UTC, Imperatorn wrote:

>

On Sunday, 16 May 2021 at 18:24:11 UTC, dogman wrote:

>

[...]

There are "GC off" switches.

@nogc, GC.disable and betterC

But then we dont know if all standard library and other modules can be used. We dont even have associate arrays etc. What we want is a pluggable framework where people can use the default GC or their GC or manual memory management by registering malloc/free's(like zig). Code is same. I am not sure technically if its possible as I am not an expert in compiler.

Rust says "Rewrite", D will say "Extend" which means extend your code and rewrite slowly with a safe and simple language. Companies can start writing D and use their existing c/c++ code. I have been working in c/c++ for last 10-15 years still I couldnt follow rust easily. Went through the rust book 2 times. I do like some part of it but any big code base looks horribly complex. I doubted if its my problem or is language is complex and bad to read.

Let me put it this way, a couple of years ago Facebook played with D, now they have this to tell about Rust.

https://engineering.fb.com/2021/04/29/developer-tools/rust/

A couple of years ago Remedy played with D, now Unity (with C#) is on

https://developer.android.com/games/develop/build-in-unity

https://dotnet.microsoft.com/learn/games

https://stadia.dev/intl/fr_fr/blog/unity-support-for-stadia:heres-what-you-need-to-know/

https://developer.nintendo.com/tools

https://unity.com/our-company/newsroom/sony-computer-entertainment-and-unity-technologies-form-strategic-partnership

Why? Because they have had plan and stuck to it, regardless of what others keep saying about their suitability.

May 16, 2021

On Thursday, 13 May 2021 at 20:57:13 UTC, dogman wrote:

>

[...]

Ah yes, another thread in which energy is expended on internet slap-fights that, in the end, precipitate in nothing but negative feelings.