December 04, 2023

On Tuesday, 28 November 2023 at 15:19:25 UTC, DrDread wrote:

>

why don't you start giving it the attention then?

I tried, but after they broke my code for the tenth time I relaised that I'm putting much too effor into something nobody gives a pig's arse about.

And it's not like building tools/3rd party for D is a good idea anyway. Since the language can't decide what it wants to be, and you end up having to either overengineer your code, either listen to a lot of complaints how your code is unsupported in certain cases.

December 05, 2023

On Monday, 4 December 2023 at 09:31:16 UTC, GrimMaple wrote:

>

On Tuesday, 28 November 2023 at 15:19:25 UTC, DrDread wrote:

>

why don't you start giving it the attention then?

I tried, but after they broke my code for the tenth time I relaised that I'm putting much too effor into something nobody gives a pig's arse about.

And it's not like building tools/3rd party for D is a good idea anyway. Since the language can't decide what it wants to be, and you end up having to either overengineer your code, either listen to a lot of complaints how your code is unsupported in certain cases.

My solution was simply just sticking to what you're doing and what you're gonna use. If the case falls out over my usage, I simply don't implement since I don't have infinite time. If someday we reach the level where people are willing to help make it more compatible, then, we can accept, while that does not happen, just focusing on our own projects should be more than enough. I don't want to implement a feature for people which I know that after 1 week they're just going over on other thing anyway.

December 05, 2023

On Tuesday, 5 December 2023 at 18:42:13 UTC, Hipreme wrote:

>

My solution was simply just sticking to what you're doing and what you're gonna use.

I'm sorry, but this is exactly the issue OP was talking about. When everyone is "just sticking to what they're doing", you can't get tooling/3rdparty going. It needs to be a collective effort of sorts. And unless there is collective effort, there never will be enough 3rdparty to make D viable for most people.

>

If the case falls out over my usage, I simply don't implement since I don't have infinite time.

Contrary, what I've tried to say was: it's extremely difficult (in D) to implement a "good for everyone" solution, because the language contradicts itself. If you design a @nogc library, then GC people are left out. If you design a GC library, then @nogc users are left out. And yes, I'm aware of templates and metaprogramming, but the code becomes a mess if you try to keep your stuff double-ended.

And then you have worseD users, they don't have half of the language available. What should you, as a framework designer, do? Ignore them? Then you get a lot of complaints how "there is no good framework for X. This one doesn't support betterC". And if you design your library for use with worseD, you're left out with basically C on steroids. No GC, half of std, etc.

As a result, the already scarce D programming force is scattered around projects that do essentially the same but with some unique subset of D.

December 06, 2023

On Tuesday, 5 December 2023 at 21:26:05 UTC, GrimMaple wrote:

>

worseD
half the std

I feel like the big thing is that slices depend on gc, and if you dont have slices how exactly can you use all the algorithms which, oh yeah, like to try to make ranges of dchar if you use any char then which wont be fitting in whatever you allocated

not the std; most of the std isnt relivent

December 05, 2023
On Wed, Dec 06, 2023 at 01:42:02AM +0000, monkyyy via Digitalmars-d wrote:
> On Tuesday, 5 December 2023 at 21:26:05 UTC, GrimMaple wrote:
> > worseD
> > half the std
> 
> I feel like the big thing is that slices depend on gc, and if you dont have slices how exactly can you use all the algorithms which, oh yeah, like to try to make ranges of dchar if you use any char then which wont be fitting in whatever you allocated
[...]

This is wrong, slices do not depend on gc.  *Appending* to slices does (because you have to allocate memory to store the result), but you can pass slices around @nogc code no problem. Taking slices of an existing array (which need not be GC-allocated) is also @nogc. In fact, most of std.algorithm, std.range, can be used with @nogc, the primary blocker there is Exceptions which are GC-allocated.

(Incidentally this is why there was talk about @nogc Exceptions a while back, the idea being that once we get rid of GC dependency for Exception, then basically all of std.algorithm and std.range would be usable in @nogc.)


T

-- 
Let X be the set not defined by this sentence...
December 06, 2023
On Wednesday, 6 December 2023 at 02:32:20 UTC, H. S. Teoh wrote:
[...]
> (Incidentally this is why there was talk about @nogc Exceptions a while back, the idea being that once we get rid of GC dependency for Exception, then basically all of std.algorithm and std.range would be usable in @nogc.)

The exception itself doesn't need to be GC allocated and this already kinda works with some limitations (not good enough for Phobos, but maybe usable for the other @nogc use cases). This reminds me of https://forum.dlang.org/post/kjkjagzrengbynkoffgy@forum.dlang.org
December 06, 2023
On Wednesday, 6 December 2023 at 02:32:20 UTC, H. S. Teoh wrote:
>
> This is wrong, slices do not depend on gc.  *Appending* to slices does (because you have to allocate memory to store the result), but you can pass slices around @nogc code no problem. Taking slices of an existing array (which need not be GC-allocated) is also @nogc. In fact, most of std.algorithm, std.range, can be used with @nogc, the primary blocker there is Exceptions which are GC-allocated.
>
> (Incidentally this is why there was talk about @nogc Exceptions a while back, the idea being that once we get rid of GC dependency for Exception, then basically all of std.algorithm and std.range would be usable in @nogc.)
>
>
> T

True but D has this duality between slices and dynamic arrays and they are sometimes hard to distinguish and there can be allocations underneath when you least expect it.

For me the problem with D isn't really GC but rather the type of GC. For embedded systems memory allocations are fine but the huge amount of instrumentation in order to get the GC to work is unacceptable (stopping threads, reading registers, reading TLS etc). The default GC is also too old and not up to the task for a modern desktop/laptop/server computer systems. D was created when dual core processors was the coolest thing for desktops. Now normal computers have up to 32 cores and multithreading is more common. Stopping 32+ threads takes time as is a really ugly approach. Therefore D needs to evolve in order to accommodate for a more variety of GC types and not only the stop the world type. Now it only supports one GC type which is a design error built into the language/library.

Honestly, I couldn't care less about @nogc even if I'm doing embedded systems. The embedded systems that are so memory constrained that you have avoid do memory allocations, then better C or C alone is the obvious choice for those systems, not using the D library at all.

December 06, 2023

On Sunday, 26 November 2023 at 17:52:24 UTC, Imperatorn wrote:

>

Is there really any other language than D that can replace C++ and Rust?

Go is good, but very tedious to write.
Zig, Odin, Beef, V and Jai are not production ready (according to the creators themselves).

C# is the only thing is see that could be a serious alternative. Forget about Java, Kotlin or whatever.

But other than C#, are there really any serious alternatives?

I don't think Rust is the answer, for many reasons.

Well, maybe Nim would actually be a serious alternative, however, I'm kinda used to the C-style.

Any feedback?

Java is my first and forever love in the world of programming languages. I don't mind the hate it gets. ☕

December 06, 2023

On Wednesday, 6 December 2023 at 21:58:41 UTC, Andrew wrote:

>

Java is my first and forever love in the world of programming languages. I don't mind the hate it gets. ☕

And it's only getting better too, though I still prefer Scala. By the way, thanks for your work on handy-http.

December 07, 2023

On Tuesday, 5 December 2023 at 21:26:05 UTC, GrimMaple wrote:

>

Contrary, what I've tried to say was: it's extremely difficult (in D) to implement a "good for everyone" solution, because the language contradicts itself. If you design a @nogc library, then GC people are left out. If you design a GC library, then @nogc users are left out. And yes, I'm aware of templates and metaprogramming, but the code becomes a mess if you try to keep your stuff double-ended.

Just ignore those nitpicking. They're not going to use it anyway. VS code for D got a lot of that till it eventually became the defacto code editor. Vibe.d has also gotten a lot of such. It works just fine for me being web developer. You simply can't satisfy everyone.

Nitpicking is almost unavoidable.