Live data from Hacker News

Using D to Create the World’s Fastest File System

dlang.org

161–167 of 167 posts

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

#161
post #158

Earlier quoted context omitted.

> On Unity's case with some subsystems in the process of being replaced by HPC#. They are converting their C# code to HPC# which specifically does not do GC allocations. https://youtu.be/NF6kcNS6U80?t=886 HPC#: * no class types * no boxing * no GC allocation * not exceptions for control flow They are building a compiler to eliminate the GC from the GC'd language they were using.

Once upon a time, C code for games engines looked like this. void do_stuff(void) { asm { } } Hardly any C code in sight, and most of the stuff could equally have been coded in MASM/TASM with their higher level macros. Eventually game devs migrated to proper C. A couple of years later, C++ code in game engines, was not even "C with Classes", rather C compiled with C++ compiler. Eventually game devs migrated to proper…

Except they are stepping AWAY from C# here, not towards it.

And the game-industry as a whole is moving to data-oriented design, which tends to be hard to do at best (if not downright impossible) in most GC'd languages.

Regardless the transition from C to C++ has no performance cost (often a performance advatnage), so I'm not sure why you're bringing that up as some significant migration in this case? It doesn't support any argument for a transition from C++ to C# or similar, as that comes with a huge performance cost. Particularly in an era where CPU performance hasn't improved for almost a decade now.

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

#162
post #158

Earlier quoted context omitted.

Once upon a time, C code for games engines looked like this. void do_stuff(void) { asm { } } Hardly any C code in sight, and most of the stuff could equally have been coded in MASM/TASM with their higher level macros. Eventually game devs migrated to proper C. A couple of years later, C++ code in game engines, was not even "C with Classes", rather C compiled with C++ compiler. Eventually game devs migrated to proper…

Except they are stepping AWAY from C# here, not towards it. And the game-industry as a whole is moving to data-oriented design, which tends to be hard to do at best (if not downright impossible) in most GC'd languages. Regardless the transition from C to C++ has no performance cost (often a performance advatnage ), so I'm not sure why you're bringing that up as some significant migration in this case? It doesn't supp…

Modern CPU performance gets explored by taking advantage of multi-core, and GC is a very helpful tool for writing lock-free data structures.

Additionally dataflow languages are better suited for GPGPU programming than plain old C and C++, as Google is exploring with XLA on Tensorflow, and game engines with graphical tooling for shader generation.

Again, lets come back in 10 years and see who was actually right.

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

#163
post #78

Earlier quoted context omitted.

>D is a secret weapon at several companies That used to be said about Python back in the day, before it became as widely known and used as it is now.

The difference being with Python you gained in prototyping speed but were losing (at least at the time) on execution speed, whereas in D you get rapid prototyping while keeping very high efficiency.

Good point. But that is partly due to the design of Python, it being a highly dynamic language. I don't want to get into any flame wars, but I'd hazard a guess that Python is somewhat more dynamic in nature than D (I know some D, and Python well), and that at the least, some of the things one can do in Python, would require a lot more knowledge and skill (with D) and acrobatics or contortions (speaking loosely) to do in D. (It would be good to be proven wrong on this, though :) This is not a criticism of D, I really like the language, and am aware of its power. Check out these two posts about D by Dmitry Popov (lead developer and Director), on the Infognition blog:

http://www.infognition.com/blog/2014/why_d.html

http://www.infognition.com/blog/2014/d_as_scripting_language...

(2nd post not loading for me right now)

In fact, here are some posts I've written that show how to write some kinds of basic apps for various purposes in D, that I posted about on HN just recently:

https://news.ycombinator.com/item?id=18609543

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

#164
post #163

Earlier quoted context omitted.

The difference being with Python you gained in prototyping speed but were losing (at least at the time) on execution speed, whereas in D you get rapid prototyping while keeping very high efficiency.

Good point. But that is partly due to the design of Python, it being a highly dynamic language. I don't want to get into any flame wars, but I'd hazard a guess that Python is somewhat more dynamic in nature than D (I know some D, and Python well), and that at the least, some of the things one can do in Python, would require a lot more knowledge and skill (with D) and acrobatics or contortions (speaking loosely) to do…

[deleted]

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

#165
post #163

Earlier quoted context omitted.

The difference being with Python you gained in prototyping speed but were losing (at least at the time) on execution speed, whereas in D you get rapid prototyping while keeping very high efficiency.

Good point. But that is partly due to the design of Python, it being a highly dynamic language. I don't want to get into any flame wars, but I'd hazard a guess that Python is somewhat more dynamic in nature than D (I know some D, and Python well), and that at the least, some of the things one can do in Python, would require a lot more knowledge and skill (with D) and acrobatics or contortions (speaking loosely) to do…

Forgot to put the titles for the 2 Infognition posts linked above, here they are again, with titles now:

Why D?

http://www.infognition.com/blog/2014/why_d.html

D as a scripting language:

http://www.infognition.com/blog/2014/d_as_scripting_language...

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

#166
post #64
post #12

Ah, just looking at this. When I was looking at D back around 2005 it was a closed shop run by one guy - I had the feeling it did not take off because it simply wasn't an open enough project. It is a shame, as since then we've had go, Swift, Rust all come along and it is a lot more competitive for mindshare in that space... not to forget the merits of modern C++ (it is a far better language post 2011)

"it was a closed shop run by one guy" You do realize Walter Bright is a frequent HN resident :) ?

I don't criticise him, I just think the structure of the project meant it failed to really launch. There are people like me (20y+ C++) that when certainly I think of D, I think of it being a closed project. I spent quite a bit of time looking at it and thinking how great it was, but it seemed confusingly proprietary (which is not a great place for a programming language to be.)

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

#167
post #145
post #140

Earlier quoted context omitted.

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

Only one studio, no more. And I hear there are some questions about this decision...
Post reply on HN