Live data from Hacker News

Using D to Create the World’s Fastest File System

dlang.org

141–150 of 167 posts

Re: Using D to Create the World’s Fastest File System

#141
post #86
post #68

I have wondered for awhile now why Rust is getting all this attention of being "Like C but safe and cool!", but no one would mention D. I personally don't do systems programming because I'm not smart enough but the little bit I have done, I found D to be the most-natural feeling (even over Rust), and D has been around a lot longer. I suppose timing is everything for these kinds of things.

> I have wondered for awhile now why Rust is getting all this attention of being "Like C but safe and cool!", but no one would mention D. D is still build around a GC so it doesn't really fit into a discussion about GC free languages. Unless you want to focus on its "better C" subset, which I think puts it at a disadvantage compared to any language not fundamentally designed around the presence of a GC.

Nah, -betterC gives you an advantage over C. It isn't meant to give you an advantage over languages like C++. Its in the name after all ;)

Re: Using D to Create the World’s Fastest File System

#142
post #86

Earlier quoted context omitted.

> I have wondered for awhile now why Rust is getting all this attention of being "Like C but safe and cool!", but no one would mention D. D is still build around a GC so it doesn't really fit into a discussion about GC free languages. Unless you want to focus on its "better C" subset, which I think puts it at a disadvantage compared to any language not fundamentally designed around the presence of a GC.

Nah, -betterC gives you an advantage over C. It isn't meant to give you an advantage over languages like C++. Its in the name after all ;)

You can use -betterC and link with C++ code, too.

Re: Using D to Create the World’s Fastest File System

#143
post #32

Earlier quoted context omitted.

Not to forget, C++ template meta-programming was discovered by accident. That's probably the only feature (and C++ is the only language) that I can think of in any language that's discovered by accident and is of utmost essential for introspection capabilities.

> Not to forget, C++ template meta-programming was discovered by accident. yep, in 1993 some graybeard working on GCC checked files by last modification date to do some refactoring and saw one that hadn't changed since july 7, 1926, aptly called "alexandrescu.c". When he opened it, his computer started glowing yellow and his BSD prompt suddenly changed from '$' to '>'. He executed the testcase associated and the horr…

Brilliant!

Re: Using D to Create the World’s Fastest File System

#144

Earlier quoted context omitted.

Actually GC can decrease overhead depending on your use of memory since it only frees when memory when it's needed.

"Overhead" is a term with many definitions. Non-conservative GCs use a lot of extra metadata to be able to figure out what's a pointer and what isn't. Conserative GCs leak. In both cases GCs cut into worse case latency.

> Conserative GCs leak.

Yes, but usually the leak is bounded [0], although I'm not aware they evaluated real-world gaming engines. But I guess frame jitter is the bigger problem there.

[0] https://www.hboehm.info/gc/bounds.html

Re: Using D to Create the World’s Fastest File System

#145
post #140
post #101

Earlier quoted context omitted.

But that is exactly the point. One should not constrain productivity just based on hypothetical goals, web scale and such similar arguments. Doing the next Fortnite, Crysis or ground breaking AR/VR/Ray Tracing? Sure, every ms/byte counts. Doing a typical Flash like casual game, game prototypes at Ludum Dare, participating at IGF? Having a GC around isn't the biggest concern.

> Doing a typical Flash like casual game, game prototypes at Ludum Dare, participating at IGF? Having a GC around isn't the biggest concern. But for those cases, what would move you to use D instead of an entirely memory-safe language like Python or Lua? To justify using D for games, you'd need to find a use-case where speed (e.g. targeting 60fps) is high-priority enough to be writing a lot of low-level code; and yet…

Yes, because it compiles to native code and has relatively fast compile times.

Some AAA studios do use D instead of a C++ based script language exactly for that.

Re: Using D to Create the World’s Fastest File System

#146
post #68

I have wondered for awhile now why Rust is getting all this attention of being "Like C but safe and cool!", but no one would mention D. I personally don't do systems programming because I'm not smart enough but the little bit I have done, I found D to be the most-natural feeling (even over Rust), and D has been around a lot longer. I suppose timing is everything for these kinds of things.

D is in an awkward spot. C++/Rust folks dislike it for using a GC. Java/C#/Javascript folks dislike it for being too C++ like with pointers, templates and all. The people who use it don't care about language wars and just enjoy their tool.

Re: Using D to Create the World’s Fastest File System

#147
post #80

Earlier quoted context omitted.

The Rust community is extremely hostile, especially against other languages, and D in particular.

Where do you see that happening? I'd love to tell some people to cut it out!

In this post about D, the top comments are about how great Rust is. But mentioning D in a post about Rust is like sticking your head into a bee-hive.

Re: Using D to Create the World’s Fastest File System

#148
post #129

Earlier quoted context omitted.

And yet there are GCs in Unity and Unreal Engine, the most popular game engines of today.

Only the scripting code is GCed. The core engine in both cases is C++ with manual memory management for the reasons stated above.

On Unity's case with some subsystems in the process of being replaced by HPC#.

And in Unreal you can use GC in whatever components you feel like, it is a matter of weighting where it makes sense.

Re: Using D to Create the World’s Fastest File System

#149

Earlier quoted context omitted.

D is a work of love by WalterBright and the community. I like to think of D as a true successor to C++ when people compare Go to a C++ alternative. It is between Rust and Go but it doesnt do away with Object Oriented programming or the many paradigmns that exist for different programming approaches. I usually tell people if you can grasp C, C++, C# or Java you are going to understand plenty of Go. Rust has a larger l…

I think the optional part might have a bit to do with it. In Java, C#, Go you are 'stuck' with the garbage collector, so people learned to live with it and usually realized it's not as bad as people claim it to be.

Same happened with me and Oberon.

Using an OS written in a GC enabled systems language made me realize that not only it was viable, it was quite productive to work in such environments.

The problem is having a big name OS vendor willing to push it to the nameless crowds no matter what.

So far we have to get happy with half-hearted steps like Swift, ChromeOS/Android(Things) with heavily constrained NDK, .NET/UWP on Windows and maybe in a decade with more baby steps, we are able to reach what Oberon/Topaz/Spin/Inferno/Singularity/Midori had on their design.

Re: Using D to Create the World’s Fastest File System

#150
post #31

Earlier quoted context omitted.

Here's a comparison with Nim. In my experience Nim is one of the fastest both in terms of execution and compile time. https://github.com/timotheecour/D_vs_nim

I see a lot of comparisons between unlike languages (Go and Rust for example) but it looks like D and Nim really are competing for the same niche.

And C# as well, via AOT compilation and the memory management improvements in 7.x versions.
Post reply on HN