Live data from Hacker News

How does D improve on C++17?

p0nce.github.io

51–60 of 77 posts

Re: How does D improve on C++17?

#51
post #6

I'm curious how many people out there on HN actully use D and what for? I don't typically see D based projects here on HN so it would be interesting to find out about any use cases where D was found a perfect fit.

We (AdRoll) use it for performance-sensitive machine learning: http://tech.adroll.com/blog/data/2014/11/17/d-is-for-data-sc...

Nice, thanks for the blog post.

Re: How does D improve on C++17?

#52

I'm curious how many people out there on HN actully use D and what for? I don't typically see D based projects here on HN so it would be interesting to find out about any use cases where D was found a perfect fit.

I did some hobby stuff with it. But I'm afraid that I didn't use it for real stuff. A few weeks ago I try to use it to write a tool to update our Java webservices from the latest Maven deploy (I'm afraid that I work as Java programmer :( ). Sadly I got issues with linking against std.net.curl , and I end writing a bash script for that. I really enjoy a lot more writing on D, but I keep finding the issue that I need t…

Did you consider their wiki page on GUI Libraries?

http://wiki.dlang.org/GUI_Libraries

Just thought I'd share, maybe you overlooked it and this might be helpful for future projects? Good luck!

Re: How does D improve on C++17?

#53

I'm curious how many people out there on HN actully use D and what for? I don't typically see D based projects here on HN so it would be interesting to find out about any use cases where D was found a perfect fit.

I use D for ... almost everything. https://github.com/CyberShadow?tab=repositories Here's a bit of code from a personal shopping comparison program I wrote a few days ago, which combines some standard library constructs with my own libraries: string findProduct(string name) { return ("http://www.tp-link.com/en/search/?q=" ~ encodeComponent(name)) .download .readText .toXML .xmlParse .I!(doc => zip( doc .findAll("#pro…

I know your projects! You made RABCDasm, which is used extensively on a certain game I used to play around in, people are still using it. Hah, I mostly asked this question because I was reminded of you, you're one of the first developers I saw who does most of their work in D.

Thanks for all your hard work, there's people out there who really found RABCDAsm really helpful, and it inspired a lot of fun software in the process.

Re: How does D improve on C++17?

#54
post #43

D is a awesome language to work with, it's got many useful language features that make the activity of code writing a pleasure. - I hope this criticism is taking constructively. However not a beat a dead horse, but if you want to process more than a trickle of data in it you run into problems with the GC really quickly. I really feel the language would be better off without the GC. These are not the same issues addre…

> I've literally seen 20x or more speedups in multithreaded cases just by making sure I reuse every buffer rather than create new ones.

Reuse rather than free and reallocate is a core practice whenever you feel the need for speed, regardless of the memory allocate strategy used.

For some very fast D code:

https://github.com/facebook/warp

Minimizing the amount of heap memory allocated is a core strategy.

Re: How does D improve on C++17?

#55
post #46

> D has a package manager. C++ has none that is popular in its community. Therefore, using a third-party library is many times easier. This comes up all the time in reference to C++. C++ doesn't need a package manager because it has excellent support from distro package managers. Most libraries are in the system package manager. And yes, sometimes you need a newer version of a package or one not quite widely-used eno…

The operating system package manager is supposed to provide packages for libraries that are required to run the rest of the operating system. Not libraries you need for development. Package managers for development allow things such as installing multiple versions of a library, creating "sandboxes" with specific versions of libraries, and sometimes they are also the de-facto build system for a language. The OS packag…

(Note: my frame of reference is experience with UNIX-like systems such as Linux and the BSDs, and even MacPorts on OS X.)

  The operating system package manager is supposed to
  provide packages for libraries that are required to
  run the rest of the operating system. Not libraries
  you need for development.
Distro repos do provide many of the packages you need for development because you need to be able to compile all of the C++ applications and libraries in the distro repo, of which there are many.

  Package managers for development allow things such as
  installing multiple versions of a library, creating
  "sandboxes" with specific version
Distro repos often include multiple versions of libraries because not all of the crucial applications and libraries in the repo are upgraded at the same speed.

  The OS package manager isn't doing the same job and has very
  different requirements. Not all libraries (especially ones that
  are usually built statically or header-only) end up in an OS
  package manager. Typically OS package managers don't bundle
  any libraries that are not required by one or more of
  applications in the package repository.
Fair enough, and for this reason a language-specific PM will most likely have more libraries available, so I concede that point. However, I seriously doubt that a single group of people could be better at providing packages for all the major combinations of kernel, distro, and CPU architecture than the collection of distro groups. Just imagine how difficult that would be!

C++ is different because it is very intertwined with the system. For D it makes sense at this point because it doesn't have the existing distro PM support that C++ does. Once crucial parts of the system starts depending on D the situation might change.

Re: How does D improve on C++17?

#56
post #50

Earlier quoted context omitted.

> Almost every C++ codebase out there vendor all dependencies. Looks like they are not using the system package manager. Yeah, e.g. Chromium. But that was also the reason why Fedora refused to provide packages for Chromium. Distros don't like projects that include their own versions of libraries because it goes against how things are supposed to work (maintenance and, by implication, a security nightmare). I know tha…

In the closed source world I'd say most codebases are like Chromium (difficult to say of course). It's a bit like distributing an application with binary libraries and a no-go for security indeed.

Yeah I am sure it's very common in closed source or internal systems. One place I worked at recently did that. All of my comments are about open source systems such as Linux and BSD.

Re: How does D improve on C++17?

#57

Earlier quoted context omitted.

I did some hobby stuff with it. But I'm afraid that I didn't use it for real stuff. A few weeks ago I try to use it to write a tool to update our Java webservices from the latest Maven deploy (I'm afraid that I work as Java programmer :( ). Sadly I got issues with linking against std.net.curl , and I end writing a bash script for that. I really enjoy a lot more writing on D, but I keep finding the issue that I need t…

Did you consider their wiki page on GUI Libraries? http://wiki.dlang.org/GUI_Libraries Just thought I'd share, maybe you overlooked it and this might be helpful for future projects? Good luck!

I know and try GtkD (https://github.com/Zardoz89/DEDCPU-16). It's fancy, but at the end you would find that you are always trying to do a mental map between the Gtk documentation and how this is translated to D. Plus is Gtk.

Also, I played a few with Qt 5 on C++... I would like to have updated binding of Qt for D. qtd and dqt looks that are abandoned. :S

DQuick looks interesting, perhaps I would rewrite my fontmap editor with it.

PD: If I look that I hate a bit Gtk, I would only say that with buggy graphics drivers (ie ATI/AMD cards on Linux), Gtk usually have horrible graphical glitches, when Qt simply works fine.

Re: How does D improve on C++17?

#58
post #43

D is a awesome language to work with, it's got many useful language features that make the activity of code writing a pleasure. - I hope this criticism is taking constructively. However not a beat a dead horse, but if you want to process more than a trickle of data in it you run into problems with the GC really quickly. I really feel the language would be better off without the GC. These are not the same issues addre…

I got a speedup of around 13,32 on a 16 core Opteron machine a few years ago, using a simple parallel foreach on a N Body problem simulator. I didn't do anything special for it. I thought using SIMD to accelerate it more on the integrator and acceleration calculation, inside of the parallel for.

Unless you are creating or destroying bodies then your n-body implementation won't need to allocate any memory will it? So is it relevant to what he's talking about?

Re: How does D improve on C++17?

#59

Earlier quoted context omitted.

I use D for ... almost everything. https://github.com/CyberShadow?tab=repositories Here's a bit of code from a personal shopping comparison program I wrote a few days ago, which combines some standard library constructs with my own libraries: string findProduct(string name) { return ("http://www.tp-link.com/en/search/?q=" ~ encodeComponent(name)) .download .readText .toXML .xmlParse .I!(doc => zip( doc .findAll("#pro…

I know your projects! You made RABCDasm, which is used extensively on a certain game I used to play around in, people are still using it. Hah, I mostly asked this question because I was reminded of you, you're one of the first developers I saw who does most of their work in D. Thanks for all your hard work, there's people out there who really found RABCDAsm really helpful, and it inspired a lot of fun software in the…

Ah, thank you! Long live game modding ;)

Re: How does D improve on C++17?

#60
post #43

D is a awesome language to work with, it's got many useful language features that make the activity of code writing a pleasure. - I hope this criticism is taking constructively. However not a beat a dead horse, but if you want to process more than a trickle of data in it you run into problems with the GC really quickly. I really feel the language would be better off without the GC. These are not the same issues addre…

As aside:

I just discovered that the language authors are converting the std library (phobos) to be "no GC".

Post reply on HN