
Moving forward with work on the D language and foundation - signa11
http://forum.dlang.org/thread/xsqrdgwnzehdmfmvcznn@forum.dlang.org
======
andralex
This is he. AMA!

~~~
jordigh
Looks like the target audience for C++ mindshare is being taken away by Golang
and Rust. When I think of "D" I think of nothing but "oh, yeah, they use it at
Facebook". Who else uses it? How do you see Golang and Rust as competition?

~~~
99decisionstr
We built all of our machine learning backend in D at AdRoll. Some examples:

\- learning of large-scale classifiers and regressors using custom optimizers

\- real-time pricing of billions of ads a day using these models on ad
exchanges. <.5ms latency to parse complex bid requests and compute sparse and
simd dense dot-products

\- a real-time event processing system that hits DynamoDB with ~4.5K json
queries per sec on a single node

We literally have D systems deployed on hundreds of ec2 instances as we speak
and responsible for mission critical tasks of a >100$M run rate company. D is
ready for prime time and works at scale.

~~~
troutwine
And we embed D in our large-scale Erlang deployments, too.

It's a fun time.

------
nnq
Awesome, and congrats to AA! We have an all out languages war ahead with D vs.
Rust vs Go. I'm sure _tons of innovations_ will come out of this that will
benefit us all!

(Yeah, I get it that the languages target different niches _in theory_ , but
there will be significant overlap among the people who use them, I'm sure...)

~~~
teamhappy
D, Rust, and Go (and C++) have been on stage together:
[https://www.youtube.com/watch?v=BBbv1ej0fFo](https://www.youtube.com/watch?v=BBbv1ej0fFo)

~~~
nnq
Ouch, quite a difference between the founders... now I'm sure that C++ and Go
will rule the world... _unfortunately_.

D would be awesome for game development, because it's a "C++ done right", but
I don't think Andrei has the salesman qualities needed to sell his child to
game devs, like getting a bunch of people together to write a good open-source
game engine that could also serve as an example of codding patterns.

And Rust and his daddy... they are just _too smart_ to become popular
nowadays, people just don't have the will and time to sit and learn better
ways of doing things when they have alternatives that "mostly work most of the
time" and have an easier learning curve...

~~~
forgettableuser
Game devs tired of C++ are waiting for Jonathan Blow's new language :)
[https://www.youtube.com/watch?v=TH9VCN6UkyQ](https://www.youtube.com/watch?v=TH9VCN6UkyQ)

He states D isn't different enough to encourage most devs to go through the
pain of switching. If they are going to switch, they would like that language
to be much better targeted at solving game dev specific needs.

~~~
Thaxll
Game devs will 'never' switch to D or anything different from C++, it's a
standard in the industry for the past 20 years, everything is built around it.

Edit: yeay the downvote bandwagon, you should go to a AAA studio and ask about
C++.

~~~
jeremiep
Never say never. I am a game dev. I worked on AAA titles. I want to switch to
D. Badly.

There are reasons why AAA studios stick to C++: they don't know any better,
they're in constant crunch-mode and don't have time to look for better
alternatives, they use an existing engine with years of development history
and don't want to invest in a new one, they target platforms where only C/C++
compilers are available, etc.

You'd be surprised of the horrors you can find in a game's C++ code base
(there are gems too, but you kind of expect those.)

~~~
EliRivers
_You 'd be surprised of the horrors you can find in a game's C++ code base_

While it's true that some languages make some horrors easier to bring into the
world (if you take away people's access to the memory, for example, you remove
an entire class of memory-related nightmares), in my experience, the key
requirement for creating these horrors isn't the language; it's the programmer
and the constraints they're working under (such things as inexperience,
painful levels of urgency, inappropriate processes, team churn, and so on and
so on). People can and will make horrors in any language, and if D becomes the
new C++, in twenty years people will be saying the same things about D.

~~~
jeremiep
While I agree with you I think D's design avoid a lot of the pitfalls of C++.

When I think about all the different variable initialization rules in C++ I
know I'll get it wrong in crunch time and most likely get it wrong when all my
work conditions are perfect because there's like 7 different rules. And that's
for one feature only.

D doesn't make it impossible to write horrors, it just doesn't ask for it the
way C++ does.

------
krylon
I have looked at D repeatedly over the last couple of years, and I really hope
it will become more popular.

It looks pretty much like what one would want C++ to be like if one were to
start over again, free of the need for backwards compatilibity with C (at the
syntax level)

I haven't had the A-Ha moment with D, I have to admit, not the way I had with
Go. Right now, Go feels more aligned with the way I tend to think.

But I still think that D is a brilliant language that people will come to like
if they are not tied to the ground by legacy code they have to maintain. I
don't think D will ever replace C++, but if Alexandrescu is behind it, that
might go a long way.

~~~
luismarques
Try programming with (std.)ranges and (std.)algorithm's. It's something
completely refreshing, replacing a mess of loopy code with a clean pipeline of
algorithms. The lazy nature of the standard algorithms and the clean syntax
you get with the UFCS feature produce some really neat results. Even if you
end up not using D any further, it can change your view of programming.

~~~
eco
Yeah, it's a lot like lisp in that regard. I'm glad I learned D even though I
don't use it professionally if only because it changed the way I look at some
things. The algorithm chaining enabled by UFCS and the range based standard
library can lead to some very beautiful code (at least as far as C-family
languages go). It also made me painfully aware of how often I copy strings in
C++ (string_view cannot come soon enough).

Here's a snippet of code I hacked together in D for a bot to scrape titles
from pages of urls in irc messages.

    
    
        matchAll(message, re_url)
                  .map!(      match => match.captures[0] )
                  .map!(        url => getFirst4k(url).ifThrown([]) )
                  .map!(    content => matchFirst(cast(char[])content, re_title) )
                  .cache // cache to prevent multiple evaluations of preceding
                  .filter!( capture => !capture.empty )
                  .map!(    capture => capture[1].idup.entitiesToUnicode )
                  .map!(  uni_title => uni_title.replaceAll(re_ws, " ") )
                  .array
                  .ifThrown([]);
    

It uses D's fast compile-time regex engine to look for URLs, then it downloads
the first 4k (or substitutes an empty array if there was an exception), uses
regex again to look for a title, filters out any that didn't find a title,
converts all the html entities to their unicode equivalents (another function
I wrote), replaces excessive whitespace using regex, then returns all the
titles it found (or an empty array if there was an exception). There's stuff
to improve upon but compared to how I would approach it in C++ it's much
nicer.

~~~
krylon
This looks pretty cool! I think I know what I am going to do over my next
vacation! :)

------
yawniek
great times ahead for D!

for those now interested in the D language one must recommend Ali Çehreli's
free book that now is also available as print:

[http://ddili.org/ders/d.en/index.html](http://ddili.org/ders/d.en/index.html)

------
claudiug
What a __bold __move. There are other in the OS communities, languages guru 's
that are working 100% on the language?

Matz is working only on ruby at heroku? Guido, is working full time at
dropbox?

I think this is huge lose for Facebook and a big win for D lang comunity

~~~
forgettableuser
The question on my mind (and probably everybody else's) is Facebook backing
away from D? Seems like if they were stepping up D, they would want to keep
him on board to help improve it. And backing away from D might have encouraged
him to leave.

~~~
npongratz
Anything is possible (crystal balls are notoriously unreliable), but in the
linked forum, Mr. Alexandrescu says Facebook is not backing away from D:

"Facebook is and continues to be a D user, the last project I was working on
(and is ongoing) uses D, and there's more use in smaller internal projects.
But there is no stronger involvement for the time being."

[http://forum.dlang.org/post/qnfbjzpldfhqsfqclqdx@forum.dlang...](http://forum.dlang.org/post/qnfbjzpldfhqsfqclqdx@forum.dlang.org)

------
gozo
Don't miss to click around a little (but probably not too much) on the D
forum. It's super fast, but also somewhat annoying (at least in chrome) since
it flashes when reloading. Is there a write up somewhere of the stack (etc.)
behind it?

~~~
yawniek
its open source:
[https://github.com/CyberShadow/DFeed](https://github.com/CyberShadow/DFeed)

~~~
rerixo
thanks, this is super impressive

------
romaniv
Somehow I find this more inspiring than most commercial success stories.
Deciding to work on ideas instead of working for a large or small company. I
sincerely wish the best to the D Foundation.

(I'm an occasional lurker on D mailing list and proud owner of the D book.
That mailing list, BTW, taught me a great deal of things about a whole bunch
of programming languages.)

------
slipstream-
Well, this looks like interesting times ahead for the D language. Hopefully
this is a good thing, I've loved D since I first came across it. :)

------
bowlofstew
That is an incredible loss for Facebook. Congratulations to the D foundation
and community though!

------
misiti3780
I remember reading this book when I was using C++ a lot and being blown away:

[http://www.amazon.com/Modern-Design-Generic-Programming-
Patt...](http://www.amazon.com/Modern-Design-Generic-Programming-
Patterns/dp/0201704315/ref=pd_bxgy_14_img_y)

Unfortunately - I changed jobs to work on some start ups and said bye to C++
for Python, JS, etc and never had a chance to really use the concepts

------
aswanson
I want to learn D, Rust, Go, Android, Rails 4.x, Objective C/Ios, D3.js,
C++11, Lisp, Smalltalk.... Good luck with that, me.

~~~
3pt14159
I can't even get enough time to do Nim, Ember 2, and Rails 5.

------
thawkins
What activities are running to get some more infrastructure support for D. I
keep tryimg to bring up a workflow on it, but get hit by a lack of support for
things like editors/ide's and package managers.

Will the foundatiom be sponsoring development of plugins for popular ide's
like atom, netbeans, intelij, eclipse etc.

------
dbhattar
This is indeed a very courageous decision on AA's part to leave a secure job
at Facebook to join D Foundation. But I am pretty sure, if at some point in
future AA decides, FB will be very happy to have him back.

~~~
tdsamardzhiev
AA is a rockstar programmer, I'd imagine he isn't too short on cash and
wouldn't have any problem finding a job in a big company if he decides to.

------
EvenThisAcronym
I started learning D in 2012, coming from a Java/C++ background. One thing
that I've learned over the past 3 years is that D is one of those languages
that completely changes your perspective on some aspect of language design
(for D, that's metaprogramming and range-based algorithms). D can proudly take
its place among the Lisps, the Haskells, the Smalltalks, as one of those
fundamental paradigm shifts that makes you think differently about everyday
problems.

------
err4nt
I know a little JavaScript - what's the best way for me to tinker around with
D and see what it offers? I'm curious!

Even if I just built something simple in both languages it would be a fun
exercise.

~~~
patcoll
It's a bit old, but this gives some nice context and allows you to follow
along with your own D compiler:

[http://www.informit.com/articles/article.aspx?p=1381876](http://www.informit.com/articles/article.aspx?p=1381876)

------
acrodrig
Good luck! I have been wishing D well for many years now and I hope your
steering of the foundation will take D into the forefront of programming.

------
emmanueloga_
nit:

"Next step with the D Language Foundation is a formal talk with the
foundation's prospective attorney tomorrow."

Isn't that something you'd like to do before leaving your day job?

------
jahnu
Off topic and old but does anyone on here know what happened to the c++ ranges
implementation he promised?

~~~
uxcn
Do you mean Eric Niebler's ranges[1] library?

[1][https://github.com/ericniebler/range-v3](https://github.com/ericniebler/range-v3)

~~~
jahnu
I meant this

[https://news.ycombinator.com/item?id=716111](https://news.ycombinator.com/item?id=716111)

I think he said he had an implementation almost ready to release but I never
saw it. I would be very interested to see it. Thought it would be a good
thread to ask.

------
rdtsc
Of course if you don't know who Alexandrescu is, here is a C++ fantasy map
that was circulated a few years back (it is funnier if know C++) and well,
Alexandrescu has his own castle there:

[http://goldns.ru/cppmap-2012.png](http://goldns.ru/cppmap-2012.png)

~~~
fauigerzigerk
I heard that there's also a diamond mine somewhere in the multiple inheritance
forest, but all pointers to its exact location seem to be off a bit :)

~~~
rdtsc
Indeed, look West, there is a diamond mine. By the Virtual Inheritance
Mountains, which are North of the Inheritance Forest. The location makes
sense, because virtual inheritance helps solve the "diamond" problem. (I am
not a good C++ programmer, so if this is wrong, please correct me).

~~~
carth_baywood
That's for explaining the joke so laboriously and with so little wit

------
_pmf_
Shitty move by Facebook not at least partially sponsoring this. Instead, they
keep putting lipstick on their PHP pig.

~~~
nnq
the pig flies pretty well for them...

~~~
aikah
while HHVM has a little bit of popularity I don't think Hack is really
popular. But good for them if it works.

~~~
marrs
Well it doesn't play with basically any library. That goes for HHVM as well. I
tried it out after someone here recommended it. I had about the simplest app
possible and I still couldn't get it to build.

