Live data from Hacker News

Using D to Create the World’s Fastest File System

dlang.org

131–140 of 167 posts

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

#131
post #129

Earlier quoted context omitted.

There is no such thing as a "good GC" in this context. Game engines go to great lengths to do things: 1) Have bounded memory usage 2) Have consistent frame times These goals are critical to maintain a consistent framerate on fixed-memory devices (aka, consoles). GCs, by their very nature, are not compatible with either of those goals. They need lots of spare memory to go fast, and they cause hiccups when collection h…

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.

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

#132
post #70
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 had a closed source reference compiler for a long time, and didn't have any major backers. Rust had Mozilla backing early, and was fully open and transparent in terms of community feedback, and wasn't just making a language that had high level features, but was pioneering a new category of language that added tons of safety guarantees at compile time by default using a new paradigm of enforcing borrowing and owners…

> D had a closed source reference compiler for a long time, and didn't have any major backers.

In addition, wasn't there for a while two separate and incomparable versions of the standard library that fragmented the community?

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

#133
post #50

Random Fact: I can't help but smile when I read that D's "STL" is called Phobos because of my Doom 2 nostalgia :) Have a nice day, everyone o/

D's runtime is called Phobos because the language was originally named Mars.

I like how main() can still be found in mars.d[1].

1. https://github.com/dlang/dmd/blob/master/src/dmd/mars.d#L909

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

#134
post #70

Earlier quoted context omitted.

D had a closed source reference compiler for a long time, and didn't have any major backers. Rust had Mozilla backing early, and was fully open and transparent in terms of community feedback, and wasn't just making a language that had high level features, but was pioneering a new category of language that added tons of safety guarantees at compile time by default using a new paradigm of enforcing borrowing and owners…

D's only runtime memory safety feature is array bounds checking. (The same as Rust, I believe.) The rest is compile time. D's compile time memory safety focusses on: 1. @safe and @system code 2. disallowing unsafe pointer operations 3. safe alternatives to pointers 4. controlling escaping of pointers 5. controlling the scope of addresses

Rust has other runtime memory safety checking, like RefCell.

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

#135
post #91
post #80

Earlier quoted context omitted.

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

Its not hostile. Its aggressive in selling the strong points of the language. Having said that, I do wish newer languages spring up that adapt the good stuff from Rust. I can never like Rust syntax.

A ludicrous amount of engineering has gone into the Rust compiler, the extensive documentation in RFCs about its design, the huge language docs that took a million man hours to make, RLS is another huge undertaking...

I do forsee Rust getting a Coffeescript of its own. I'm in love with the control flow model of the language but always felt some things that were in from day one (like double colon :: namespace delimiters, ampersand references, asterisk pointers and dereferencing, semicolons, curly braces, etc) were just wholesale copied from the languages de jour of the day because the focus was on the borrow checker as an innovative feature. So the semantics and ergonomics were completely phoned in early on, and by the time the modern development process around the language and compiler matured the glyphs were so totally entrenched there was no way to reconsider any of it.

A syntactic wrapper that gives you the types and behaviors of Rust with beautification like whitespace significance over mandatory brace delimiters and semicolons (like Python) with single colon (or maybe even dot) namespacing and such would be an insanely hard project (because parsing Rust is already insanely hard, and a lot of work went into minimizing compiler passes to parse grammar so keeping that with less control characters to work with in an intuitive way sounds like a substantial exercise in ergonomics) that compiled to ugly normal Rust would be fantastic to help newbies avoid the "glyphic overload" I easily see happen to anyone I try to preach Rust to.

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

#136
post #80
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.

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

The Rust Community is:

    Welcoming
    Inclusive
    Developers prioritize mentorship
    RFC process
    Energizing

It's written in the Rust Marketing Handbook so it's true: https://rust-lang.github.io/rust-marketing/pitches/community...

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

#137
post #70

Earlier quoted context omitted.

D had a closed source reference compiler for a long time, and didn't have any major backers. Rust had Mozilla backing early, and was fully open and transparent in terms of community feedback, and wasn't just making a language that had high level features, but was pioneering a new category of language that added tons of safety guarantees at compile time by default using a new paradigm of enforcing borrowing and owners…

> D had a closed source reference compiler for a long time, and didn't have any major backers. In addition, wasn't there for a while two separate and incomparable versions of the standard library that fragmented the community?

That was 9 years ago and the second is no longer maintained (for about 2 years at this point).

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

#139
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.

Rust brought something new that no other language had: memory safety through statically enforcing object ownership and borrowing. Anyone who has done manual memory management already is familiar with those concepts, and how difficult that can be to track in large systems. Whenever a language is able to abstract pervasive concepts to first-class entities in a language, it becomes attractive to people who deal with tho…

We are working on improving scope atm which is quite an improvement. Tieing exceptions into it too to remove allocations.

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

#140
post #101
post #95

Earlier quoted context omitted.

emphasis on gameplay code . And even there, if you target 60fps (sure a minority of developers), then GC is a liability at best.

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, where "having a CG around" still won't cause problems. Can you think of one?

Post reply on HN