March 13, 2015
On 3/13/15 7:51 AM, Chris wrote:
> On Friday, 13 March 2015 at 14:34:23 UTC, Russel Winder wrote:
>> On Fri, 2015-03-13 at 14:20 +0000, Chris via Digitalmars-d wrote:
>> […]
>>
>>> reluctant to learn something new. Crowd 2. we can win over, yet we
>>> have failed to communicate with them, to reach out to them. Most
>>> people I know have a look at D's homepage and say "Uh! Hm. Ah, I'll
>>> use Python." No, they are not hardcore programmers, they are
>>> engineers and scientists. But they are _users_, people who need to
>>> write software to analyze data, to create something. We should not
>>> ignore them, even if they are not (initially) interested in templates
>>> and metaprogramming. Neither was I, when I first learned D.
>>
>> It is not Python or R or Julia the language that people choose, it is
>> the superstructure built on top. So for Python, it is Pandas,
>> Matplotlib, SciPy, NumPy. And the ability to use ready made C, C++ and
>> Fortran libraries.
>
> Exactly, that's part of it. People don't understand that they can use
> all the C libraries with D as well. And if they do, "extern (C)" is too
> "complicated", at least more complicated than "import numbergrind". I'm
> really at loss here, I don't know how to communicate these things to
> people. Colleagues and text books that talk about R and Python weigh so
> much more than "D can actually interface to C without any effort".[1]
>
> Also, sometimes I have the impression that people use any excuse not to
> use D.

That may as well be basic psychology at work. Curb appeal (or lack thereof) is difficult to explain but is easy to rationalize with unrelated arguments.

There is something loosely related to curb appeal that has been discussed here before. Consider someone just starts with D and wants to figure whether there's a startsWith function in D.

So they google for something like ``dlang startswith''. Nicely enough http://dlang.org/phobos/std_algorithm.html comes up first. (Ideally the individual page http://dlang.org/library/std/algorithm/starts_with.html would come up.)

Anyhow, assuming the user clicks on the former, startsWith is easy to find at the top and then when you click on it...

====
uint startsWith(alias pred = "a == b", Range, Needles...)(Range doesThisStart, Needles withOneOfThese) if (isInputRange!Range && Needles.length > 1 && is(typeof(.startsWith!pred(doesThisStart, withOneOfThese[0])) : bool) && is(typeof(.startsWith!pred(doesThisStart, withOneOfThese[1..$])) : uint));
bool startsWith(alias pred = "a == b", R1, R2)(R1 doesThisStart, R2 withThis) if (isInputRange!R1 && isInputRange!R2 && is(typeof(binaryFun!pred(doesThisStart.front, withThis.front)) : bool));
bool startsWith(alias pred = "a == b", R, E)(R doesThisStart, E withThis) if (isInputRange!R && is(typeof(binaryFun!pred(doesThisStart.front, withThis)) : bool));
====

This in big bold font, too. The HTML way of saying, "you wanted startsWith? I'll give you more startsWith than you can carry." Picture the effect this has on someone who just wanted to see if a string starts with another.

We need to make the template constraints distinct for formatting in ddoc.

Sadly http://dlang.org/library/std/algorithm/starts_with.html is bad in other ways. It doesn't have any examples! In contrast, the unified page does have some decent examples.

This all is under the "curb appeal" category.


Andrei

March 13, 2015
Hi everyone,

I'm the guy who threw the rock in the pond. I should probably
clarify a few things about the notes (which Andrei posted with my
permission).

They are stream-of-consciousness scribbles, which I took down
while I was going through the process (I actually sent Andrei a
photo of my notebook pages). I wrote them because I thought he
would be interested to know what went through this programmer's
head when looking at D for a small project, with no prior
exposure to the language. The experiment took one day. I was
planning to discuss it over the phone with Andrei (which we did),
and I wanted to make sure I wouldn't forget anything. It was
definitely not crafted as a well-thought-out critique, but that
was the point. People learn languages one misconception at a
time, and I wanted to give Andrei the raw material. This makes
certain things confusing as written, so I'd like to add a bit
more context.

1) When I wrote "focus on one [feature]", I wasn't suggesting
that features be removed from the language. Instead, I was
referring to the presentation of the language to newcomers. The
thing is, I wasn't visiting the D website to learn D; I was there
because I needed to write a small, self-contained server with a
minimum of fuss. I had a single purpose in mind and a very
limited time budget. Go made it easier for me to zoom in on my
goal, and the main factor was its (perceived) simplicity. This
led to the phrase "designers think of features, users think of
purpose", but it applied to _presentation_. It was like I wanted
to rent a car for one specific day trip, and D was trying to sell
me the car. In contrast, Go was light and easy; I felt I could
catch it after minimal contact, like a dog catches fleas (those
who dislike Go will think of other metaphors here).

D absolutely should not be robbed of its richness to become
"simpler". It's not the language that needs fixing (well, it
might, but only to make it even better). Rather, I look at it
through a newbie's eyes: every person visiting the dlang site has
some purpose in mind. Topical articles/tutorials showing how to
accomplish one thing only (for relevant values of "thing") could
go a long way in lowering the barrier to entry. For those who
want an overview, an interactive tutorial like the one on the Go
playground would be excellent.

2) "Go is a condo in a hip, trendy area". This could be taken to
mean that I was led to Go's neighbourhood because I wanted to be
hip. Instead, that note was in contrast with an adjacent one,
where I saw D like a new house (spacious, comfortable, all
appliances included) that sits empty. I didn't write it down, but
I was thinking it sat empty because the neighbourhood was empty.
As a new user, I want to be where everybody is, because that's
where my community needs are likely to be satisfied. There will
be bakeries, coffee shops, independent bookstores, bike lanes,
parks, theaters, and a subway. It's not the prestige, it's the
livability. This is where those libraries make a difference, and
why Stackoverflow is overflowing, as it were, with Go questions
and answers: that's what all those latte drinkers type away on
their Macbooks. (Yes, I know there are D questions answered on
Stackoverflow; work with me here.)

3) "IDEs". Here, Go isn't doing that great, either. The most
glaringly missing piece is a proper debugger. GDB is unusable
with Go (I'm comfortable with using GDB itself). That was
actually something I was planning to ask Andrei about on the
phone; it wasn't a statement about the current state of D.

4) "Not feeling smart enough for D". As in, to pick up in one day
and get on with my life and my little server. I was actually
thinking of the Wikipedia article on D. I simply could not
understand the example just by looking at that page, and without
opening Andrei's book that sits on my bookshelf. That might be
more a comment about me, but I really think it's the article.
(For context, I write routinely in C++, Java, Scheme, Prolog,
Unix shell, etc., and when those languages don't suffice for my
projects, I write new ones.)

Finally, I feel I should respond to this:

On Friday, 13 March 2015 at 02:28:53 UTC, bachmeier wrote:
> If you want to be Rob Pike Jr., Go is great. If you want to program your way, not so much.

I have no reason to take this personally, seeing as I'm pretty
secure in my non-Rob-Pike-ness, but from a product design (and
selling) standpoint, blaming or insulting the user is, of course,
missing the point. I felt equally put-off by the dismissive tone
of some of the creators of Go towards those who "don't
understand" Go's ethos. I still ended up using their language,
but it wasn't for their persuasion skills. Thankfully, it seems
this isn't the general tone of D's community, and the level of
healthy, open debate over here appears to be much higher than for
Go.

This note is getting too long, so if some of what I wrote needs
more clarification, feel free to ask. I'm glad my humble notes
are sparking discussion, and I hope D continues to grow.

--Florin
March 13, 2015
On Friday, 13 March 2015 at 00:20:40 UTC, Andrei Alexandrescu wrote:
> A friend of mine needed to complete a small project and thought of using a language he didn't know for it.

Come to think of it, this reminds me of a different post I saw recently by the author of a certain famous(?) PHP roast:
http://eev.ee/blog/2015/02/28/sylph-the-programming-language-i-want/

D doesn't hit it out of the park on every point, but I think it's pleasingly close overall.  Unfortunately, D wasn't on the author's radar at all.  Didn't even get mentioned until the comments, and it's not really encouraging even then:
"I've had a look at D before (back when it uh didn't really have a compiler?) and it certainly seemed like a huge breath of fresh air over C. But I really appreciate how effortless it feels to get something up and running in Python, and I feel like by now we should be able to preserve that without paying so dearly for it."

IMO, D has both an image problem and a visibility problem (both with a lot of inertia), and their synergy is driving people from all "factions" away.

Unfortunately, I don't think there's any one "marketing push" or breakthrough that could possibly rectify this; it's going to be a thousand-cuts situation, where each panel, tech talk, or Cool Thing of the Week does a little more to dispel the pariah status (this YOW2015 talk I'm listening to right now is really entertaining).

-Wyatt
March 13, 2015
Florin Mihaila:

> This note is getting too long, so if some of what I wrote needs
> more clarification, feel free to ask. I'm glad my humble notes
> are sparking discussion, and I hope D continues to grow.

Constructive notes (as yours) are always welcome in this friendly community. Thank you for your help.

Bye,
bearophile
March 13, 2015
On Friday, 13 March 2015 at 15:18:33 UTC, Florin Mihaila wrote:
> 3) "IDEs". Here, Go isn't doing that great, either. The most
> glaringly missing piece is a proper debugger. GDB is unusable
> with Go (I'm comfortable with using GDB itself). That was
> actually something I was planning to ask Andrei about on the
> phone; it wasn't a statement about the current state of D.

GDB works great with D, including source analysis. I personally use Nemiver frontend.

March 13, 2015
On Friday, 13 March 2015 at 15:17:06 UTC, Andrei Alexandrescu wrote:
> On 3/13/15 7:51 AM, Chris wrote:
>> On Friday, 13 March 2015 at 14:34:23 UTC, Russel Winder wrote:
>>> On Fri, 2015-03-13 at 14:20 +0000, Chris via Digitalmars-d wrote:
>>> […]
>>>
>>>> reluctant to learn something new. Crowd 2. we can win over, yet we
>>>> have failed to communicate with them, to reach out to them. Most
>>>> people I know have a look at D's homepage and say "Uh! Hm. Ah, I'll
>>>> use Python." No, they are not hardcore programmers, they are
>>>> engineers and scientists. But they are _users_, people who need to
>>>> write software to analyze data, to create something. We should not
>>>> ignore them, even if they are not (initially) interested in templates
>>>> and metaprogramming. Neither was I, when I first learned D.
>>>
>>> It is not Python or R or Julia the language that people choose, it is
>>> the superstructure built on top. So for Python, it is Pandas,
>>> Matplotlib, SciPy, NumPy. And the ability to use ready made C, C++ and
>>> Fortran libraries.
>>
>> Exactly, that's part of it. People don't understand that they can use
>> all the C libraries with D as well. And if they do, "extern (C)" is too
>> "complicated", at least more complicated than "import numbergrind". I'm
>> really at loss here, I don't know how to communicate these things to
>> people. Colleagues and text books that talk about R and Python weigh so
>> much more than "D can actually interface to C without any effort".[1]
>>
>> Also, sometimes I have the impression that people use any excuse not to
>> use D.
>
> That may as well be basic psychology at work. Curb appeal (or lack thereof) is difficult to explain but is easy to rationalize with unrelated arguments.
>
> There is something loosely related to curb appeal that has been discussed here before. Consider someone just starts with D and wants to figure whether there's a startsWith function in D.
>
> So they google for something like ``dlang startswith''. Nicely enough http://dlang.org/phobos/std_algorithm.html comes up first. (Ideally the individual page http://dlang.org/library/std/algorithm/starts_with.html would come up.)
>
> Anyhow, assuming the user clicks on the former, startsWith is easy to find at the top and then when you click on it...
>
> ====
> uint startsWith(alias pred = "a == b", Range, Needles...)(Range doesThisStart, Needles withOneOfThese) if (isInputRange!Range && Needles.length > 1 && is(typeof(.startsWith!pred(doesThisStart, withOneOfThese[0])) : bool) && is(typeof(.startsWith!pred(doesThisStart, withOneOfThese[1..$])) : uint));
> bool startsWith(alias pred = "a == b", R1, R2)(R1 doesThisStart, R2 withThis) if (isInputRange!R1 && isInputRange!R2 && is(typeof(binaryFun!pred(doesThisStart.front, withThis.front)) : bool));
> bool startsWith(alias pred = "a == b", R, E)(R doesThisStart, E withThis) if (isInputRange!R && is(typeof(binaryFun!pred(doesThisStart.front, withThis)) : bool));
> ====
>
> This in big bold font, too. The HTML way of saying, "you wanted startsWith? I'll give you more startsWith than you can carry." Picture the effect this has on someone who just wanted to see if a string starts with another.
>
> We need to make the template constraints distinct for formatting in ddoc.
>
> Sadly http://dlang.org/library/std/algorithm/starts_with.html is bad in other ways. It doesn't have any examples! In contrast, the unified page does have some decent examples.
>
> This all is under the "curb appeal" category.
>
>
> Andrei

Yep. This is part of the "make people feel good about it" approach. Plus, we're not selling shit, it's really a good product. In a way, we do it the other way around: bad marketing for a good product.
March 13, 2015
On Friday, 13 March 2015 at 14:59:42 UTC, Andrei Alexandrescu wrote:

> [...] Offer solid value, and make learning the language just aftermath.

Yes, this one-sentence distillation is the key point.

--Florin
March 13, 2015
On Friday, 13 March 2015 at 00:20:40 UTC, Andrei Alexandrescu wrote:
> A friend of mine needed to complete a small project and thought of using a language he didn't know for it. He already knew I work on D so he considered it alongside Go. He ended up choosing the latter, and documented his decision making process in a few notes that he subsequently shared with me. I'll paste below a sort of transcript of his handwritten notes.
>
> I think this is valuable information from a relatively unbiased potential user, and good ideas and action items on how we can improve our curb appeal. Even mistaken perceptions are good signal - it means our materials weren't explicit enough to dispel them.

> I'd love us to derive a few action items from this and other feedback.
>
>
> Andrei

Well see the real problem is that D cant seem to cater to one group or another.

It cant cater to new/inexperienced people because it isnt portrayed that way.

It cant cater to the hardcore/DieHard C/C++ people because it is difficult to convince them.

You need to pick a target audience and stick with it...
March 13, 2015
On Friday, 13 March 2015 at 14:34:30 UTC, Wyatt wrote:
> On Friday, 13 March 2015 at 13:51:05 UTC, Paulo  Pinto wrote:
>>
>> How do you do semantic refactoring in UNIX shell?
>>
> With tools.  (Can you be less abstract?  "Semantic refactoring" could be all sorts of things-- it's not a well-defined term of art, so I have no idea what you're really trying to accomplish.)
>
> -Wyatt

For example, rename an instance variable, while updating all its occurrences, including comments. While keeping all other symbols that happen to use the same name untouched.

Move a method to another class, keeping all references to imported libraries on the new location.

These are just the tip of the iceberg of what modern refactoring tools offer.
March 13, 2015
On Friday, 13 March 2015 at 15:18:33 UTC, Florin Mihaila wrote:
> Hi everyone,
>
> I'm the guy who threw the rock in the pond. I should probably
> clarify a few things about the notes (which Andrei posted with my
> permission).

Thanks for an extended feedback.