News for hackers. Stuff that matters.
Re:Facebook is using D in production starting today by Keyframe on Friday October 11, 2013 @09:08AM (#6532806)
I kind of bet hard on D, and I know people that bet even more. Last time I used it was 4 years ago.

I was using the other standard library (yeah, there were two, kind of), there were bugs which weren't resolved for years, there were issues with people camping on both sides of standard libraries, there was development stagnation because D2 was being pushed hard... but it all boils down to preference.

D1 (with Tango) to me was like a really really good blend of C with classes and modern stuff in it (mixins for example). I was happy with it, but then D2 started to emerge which was more templatey than I was comfortable with. I have accepted, long ago, that I am a C programmer, not C++, by heart. Ultimately following factors threw me away from D altogether:

- my code isn't an island, I leverage a lot of libraries, and for each and every one I had to use I had to either make my own bindings or rely on somewhat unstable other people's bindings. I accepted the reality of it, but it wasn't something I wanted to waste my time on.

- D2 - it just didn't feel the same

- Lack of tools. DMD compiler, while somewhat working, was a lackluster (to be polite) compared to what I was used to in C world. There was a GDC frontend for gcc which, at the time, wasn't actively developed, there was an attempt to make a LLVM thing.. but if you wanted to work with D, at that time, you pretty much had to use DMD

- several bugs which were ignored in core development which were uncomfortable for my use. I didn't have the expertise at the time to help with resolving that. Coincidentally just yesterday I received an update from bug tracker that bug I reported four years ago is still in.

- Development of D pretty much relied on one man alone

- out of frustration and a tight deadline, I developed something in C at that time and came to a realization that "it just works". I was able to concentrate on my task at hand instead of tackling various gotchas and doing extra amount of work that I had to with bindings etc.

D is more than 10 years old. Honestly, I think it has good ideas, I really liked the approach of D1, but I think it will never catch on en masse.

Re:Facebook is using D in production starting today by eco on Friday October 11, 2013 @11:52AM (#6533896)
A few updates on the current state of things today.

The Tango/Phobos split has been resolved for awhile. You can now use Phobos, Tango, or both in the same D2 program.

The number of libraries and bindings is growing rapidly. There is the new dub package manager that makes it easy to include dependencies < http://code.dlang.org/ > and Deimos which is a collection of C library bindings < https://github.com/D-Programming-Deimos/ >.

GDC and LDC are both actively developed and kept up to date with the state of DMD.

It used to be you'd usually hit a bug while working on something in D but the community is really starting to notice they aren't hitting many bugs these days (especially over the last year or so). < http://dlang.org/bugstats.php >

Everything is up on Github now < https://github.com/D-Programming-Language > and Walter is just one of 21 committers. Github says dmd has 72 contributors and Phobos has 116.

If you don't like D2's template approach though you probably still won't be happy with it even with almost everything being better. Personally I love the power it gives you without sacrificing speed.

Re:Facebook is using D in production starting today by Keyframe on Friday October 11, 2013 @12:35PM (#6534176)
Well that sounds promising, but I don't think I'll go back to it - maybe I'll see what's going on out of curiosity though. Thanks for the update.
Re:Facebook is using D in production starting today by steveklabnik on Friday October 11, 2013 @09:34AM (#6532950)
My friends and I implemented an operating system in D back in college, and I just want to say that I agree entirely with this post. It's mostly why I went into Ruby instead of staying in D, and why I'm doing Rust now instead of D today.

That said, D has a lot of promise, and a lot of these issues have been worked out, but I feel like there are many people like you and I...

Re:Facebook is using D in production starting today by Keyframe on Friday October 11, 2013 @10:28AM (#6533271)
One common trait I see among ex D users is jumping on Rust. Rust has some serious 'corporate' power behind it, so it might be a future ahead.
Re:Facebook is using D in production starting today by onezeno on Friday October 11, 2013 @10:37AM (#6533363)
xomb? Is that project dead now?
Re:Facebook is using D in production starting today by steveklabnik on Friday October 11, 2013 @12:44PM (#6534242)
Yes!!!

I'm not sure. I haven't worked on it in a few years, the others may be keeping it going.

Re:Facebook is using D in production starting today by pjmlp on Friday October 11, 2013 @09:36AM (#6532961)
> D is more than 10 years old. Honestly, I think it has good ideas, I really liked the approach of D1, but I think it will never catch on en masse.

History proves that the only system programming languages that succeed in the industry, have been at a given moment adopted by OS vendors as their main language.

It hasn't happened so far to D, but it might still happen.

Re:Facebook is using D in production starting today by TylerE on Friday October 11, 2013 @10:33AM (#6533324)
So what OS was written in Java?
Re:Facebook is using D in production starting today by pjmlp on Friday October 11, 2013 @10:41AM (#6533389)
Java is not a systems programming language.
Re:Facebook is using D in production starting today by jebblue on Friday October 11, 2013 @12:30PM (#6534148)
Apparently it is: http://en.wikipedia.org/wiki/JNode

Then there's the history thing about Java being designed from the start to run devices: http://www.oracle.com/technetwork/java/javase/overview/javah...

Re:Facebook is using D in production starting today by pjmlp on Friday October 11, 2013 @12:43PM (#6534236)
> Apparently it is: http://en.wikipedia.org/wiki/JNode

I am fully aware of JNode.

It uses language extensions for the dirty tricks system programming languages need to do.

> Then there's the history thing about Java being designed from the start to run devices:

The devices are expected to have a ROM installed VM able to process the bytecodes. Which is the case of many devices that have Java VM available.

Re:Facebook is using D in production starting today by jqgatsby on Friday October 11, 2013 @01:10PM (#6534419)
no true scotsman...
Re:Facebook is using D in production starting today by enqk on Friday October 11, 2013 @03:02PM (#6535179)
I would argue that java application servers fulfill the same role as that of an Operating System (especially a virtualized one) and exist almost entirely to side-step the sysadmin priests.
Re:Facebook is using D in production starting today by pjmlp on Saturday October 12, 2013 @01:11PM (#6539402)
If they were fully written in Java/Assembly and are running directly on hardware then yes.

Until sun.misc.Unsafe or similar is not officially part of Java's public API, the language does not offer standard mechanisms for systems programming.

There are language extensions that allow such uses, but the language itself, according to the JLS does not support systems programming.

You need:

- value types

- control when a GC might happen, to avoid it ocurring during interrup handling

- means to tell the GC not to touch memory currenly involved in DMA operations

- all the nice operations sun.misc.Unsafe provides

Re:Facebook is using D in production starting today by lukeschlather on Friday October 11, 2013 @12:04PM (#6533976)
Java was written by an OS vendor as their main high-level language.
Re:Facebook is using D in production starting today by samf on Friday October 11, 2013 @03:48PM (#6535507)
But Java is not used in any meaningful way in their core OS.
Re:Facebook is using D in production starting today by pjmlp on Friday October 11, 2013 @05:07PM (#6535940)
Java is also not a systems programming language, and I was mentioning systems programming language, in regard to OS vendors support.
Re:Facebook is using D in production starting today by Keyframe on Friday October 11, 2013 @10:38AM (#6533372)
I don't follow Java at all (I wish I had time to take a few months to see what's happening), so I might be talking out of my ass. I think Java got a big boost when it became a de facto standard for communications platforms, especially considering the rise of mobile.
Re:Facebook is using D in production starting today by gmrple on Friday October 11, 2013 @10:39AM (#6533378)
Android, however I would say that it was successful before android.
Re:Facebook is using D in production starting today by possibilistic on Friday October 11, 2013 @11:19AM (#6533667)
Android isn't written in Java. The userland might be, but the kernel itself is Linux, and that is written in C.
Re:Facebook is using D in production starting today by pjmlp on Friday October 11, 2013 @11:55AM (#6533917)
Java is only used for userland code, that is not systems programming.
Re:Facebook is using D in production starting today by mratzloff on Friday October 11, 2013 @01:06PM (#6534390)
An interesting comment from the mailing list:

"Aside from speaking whether 5112 lines of code is really a good sign, there is separate issue regarding quality. When you will look at claim that some language (lets take for example C# or Java) "supports feature X", that really means that the feature is supported. In D this for sure means that the feature is either broken or misdesigned (shared libraries, routine code breakages, obsolete ms32 object format, AA arrays, shared, const postblits, odd template crosstalk bugs, type system holes, segfaulting lambdas, unstable stdlib, absent of third-party libraries). Untill this stuff is fixed this is a huge barrier irrespective of whether D is used in Facebook or not."

Re:Facebook is using D in production starting today by he_the_great on Friday October 11, 2013 @06:54PM (#6536346)
I think there is a lot of truth to the statement, but not to the extreme. There are implementation issues for many claimed features, some because large and in your face, some edge cases, others due to language design.

The situation is better and greatly improving. Many things have a work around. It is just one of the problems with a language full of tools and little full-time man power. Java and Go are rather simple languages so there aren't as many features to boast (e.g. not supporting shared libraries is a feature of Go, yet "broken" in D [lots of good work in git HEAD])