January 13, 2015
On Friday, 19 December 2014 at 16:45:40 UTC, Ola Fosheim Grøstad wrote:
> Yes, but it would be easy to define some focused goals for each release and refuse to touch stuff that belongs to a later release. E.g.

http://wiki.dlang.org/Agenda
January 14, 2015
On 14/01/2015 12:34 p.m., brian wrote:
> I know this thread is a little old now, and I'm not the most experienced
> programmer by a long shot, but I'll post my 2 cents from the n00b
> persepctive.
>
> A question first: ... what do people actually have working in D?
> I find very few "working examples" of things I want to do. Or things in
> general. That I can read and say "oooh that's close to what I want, I
> can tweak it a little here and there".
>
> Eg.
> I want a program to write tweets.
> I can't just google "twitter example d" and find a nice starter program
> to connect a write a tweet.
> Do the same with "twitter example java" and you'll probably have your
> problem solved within half an hour.
> So in half an hour I have a java program, and not a d one. I'll probably
> make changes to my java one and grow that, rather than trying to rewrite
> it in D because I don't even know it will work.
>
> The same can be said when I try to do other things too:
> Like parse a webpage.
> Or connect to APIs.
> (maybe I'm constantly looking for things that other's don't do, but
> that's unlikely)
>
> So for me, it's getting easier to solve my simple programming problems
> in other languages because I can find examples that a) others have
> posted and b) others have the same issues I face.
> I can't find those things in D nearly as easily (is this a limit of
> searching the term "D" or dlang?)
>
>> try
>>      solveMyProblem(close_to_exactly);
>> catch(Exception e)
>>      writeln("this library sucks");
>> finally {
>>      do it myself with exactly what i need and little more
>> }
>
> I'd *love* to be able to do this, but if libraries don't work,
> personally, I don't know where to start most of the time. What if there
> isn't a library at all? html headers, oauth, blah blah. I may as well
> build a rocket. I have plenty of projects where I hit a wall (which I
> don't think is necessarily a language thing, but trying to use D to get
> to something else/do something).
>
> So in summary, from my perspective I find it difficult to solve the
> programming challenges I face, using D. Maybe that's a skill thing.
> Lack of working examples makes taking that first leap daunting.
> Lack of connectivity (to the things I want to connect to) is
> frustrating. Through googling, I'll be able to get something running
> quicker in another language than continue trying to get D to work.
> If I find these issues, and I'm moderately intelligent, I'm sure others
> have the same issues.
> I love the language, but if someone wanted a language to learn, I don't
> think I would recommend D. :(

For my next book I was thinking about taking it from the point of view of cook book. I want to do X, how do I do it?
Which is exactly what you are wanting.
Point being not language orientated. More feature orientated.
January 14, 2015
On Tuesday, 13 January 2015 at 23:34:40 UTC, brian wrote:
> I know this thread is a little old now, and I'm not the most experienced programmer by a long shot, but I'll post my 2 cents from the n00b persepctive.
>
> A question first: ... what do people actually have working in D?
> I find very few "working examples" of things I want to do. Or things in general. That I can read and say "oooh that's close to what I want, I can tweak it a little here and there".

Take a look at the official package registry, called dub:

http://code.dlang.org/

> Eg.
> I want a program to write tweets.
> I can't just google "twitter example d" and find a nice starter program to connect a write a tweet.
> Do the same with "twitter example java" and you'll probably have your problem solved within half an hour.
> So in half an hour I have a java program, and not a d one. I'll probably make changes to my java one and grow that, rather than trying to rewrite it in D because I don't even know it will work.

I don't think it's that unusual for a native compiled language: can you find C++ snippets to write tweets?  I doubt it.  A compiled languages is just not the tool people usually grab to write such things.  D would like to break out of that box and be such a language, but it's probably not going to have a bunch of code written for small jobs like that yet.

> The same can be said when I try to do other things too:
> Like parse a webpage.
> Or connect to APIs.
> (maybe I'm constantly looking for things that other's don't do, but that's unlikely)

D would like to be good at all these things, and some of them are enabled on dub.  But as a newer language with a smaller community than Java, obviously the amount of APIs covered is going to be less right now.

> So for me, it's getting easier to solve my simple programming problems in other languages because I can find examples that a) others have posted and b) others have the same issues I face.
> I can't find those things in D nearly as easily (is this a limit of searching the term "D" or dlang?)
>
>> try
>>     solveMyProblem(close_to_exactly);
>> catch(Exception e)
>>     writeln("this library sucks");
>> finally {
>>     do it myself with exactly what i need and little more
>> }
>
> I'd *love* to be able to do this, but if libraries don't work, personally, I don't know where to start most of the time. What if there isn't a library at all? html headers, oauth, blah blah. I may as well build a rocket. I have plenty of projects where I hit a wall (which I don't think is necessarily a language thing, but trying to use D to get to something else/do something).

This is the normal chicken-or-egg problem with a new language like D, ie people want libraries or API wrappers to get their job done easier but if they don't spend time writing them, they never get done.

Also, maybe the D community doesn't put their code up for public consumption as much as some other language communities.  Could be another reason for the disparity, but just a stab in the dark: I have no idea if it's true.

> So in summary, from my perspective I find it difficult to solve the programming challenges I face, using D. Maybe that's a skill thing.
> Lack of working examples makes taking that first leap daunting.
> Lack of connectivity (to the things I want to connect to) is frustrating. Through googling, I'll be able to get something running quicker in another language than continue trying to get D to work.
> If I find these issues, and I'm moderately intelligent, I'm sure others have the same issues.
> I love the language, but if someone wanted a language to learn, I don't think I would recommend D. :(

I don't doubt that these issues exist, I just consider them normal for a newer language.

As for recommending D, I think it depends on the type of user.  If they care at all about efficiency, I don't know that I'd recommend a language other than D.  If they don't really care how fast their code runs and prefer to stay at a higher scripting level, then the advantages of D fade compared to other languages.
January 14, 2015
On Tuesday, 13 January 2015 at 23:40:32 UTC, Martin Nowak wrote:
> On Friday, 19 December 2014 at 16:45:40 UTC, Ola Fosheim Grøstad wrote:
>> Yes, but it would be easy to define some focused goals for each release and refuse to touch stuff that belongs to a later release. E.g.
>
> http://wiki.dlang.org/Agenda

That's a good start, but it is too vague. You need to design ahead so that you don't start on the release without having measurable goals and milestones. "c++ and gc" is not measurable.

You need to map out future releases and dependencies between features.

Then you need to evaluate what went "wrong" in the last release, and what was added to the last release, but not in the plan and why. The "Agenda" is loosing its authority as a plan if it is not evaluated. Without evaluation you can basically ignore it?
January 14, 2015
On Wednesday, 14 January 2015 at 05:10:05 UTC, Joakim wrote:
> I don't think it's that unusual for a native compiled language: can you find C++ snippets to write tweets?  I doubt it.  A compiled languages is just not the tool people usually grab to write such things.  D would like to break out of that box and be such a language, but it's probably not going to have a bunch of code written for small jobs like that yet.

I kinda agree, except:

«twitcurl is a pure C++ library for twitter APIs. twitcurl uses cURL for handling HTTP requests and responses.»

https://code.google.com/p/twitcurl/
https://dev.twitter.com/overview/api/twitter-libraries

And Go has two twitter libraries...

There were a lot more people doing cute stuff like that for D1, I think. It will probably come when D2 is more stable.
January 15, 2015
On Wednesday, 14 January 2015 at 05:10:05 UTC, Joakim wrote:

> Take a look at the official package registry, called dub:

I love dub, who doesn't. It is evidence of a very active and large community.

> I don't think it's that unusual for a native compiled language: can you find C++ snippets to write tweets?  I doubt it.  A compiled languages is just not the tool people usually grab to write such things.

Pardon my naivity, but I don't know why I *wouldn't* want to do this in D? I want something to pull tweets, analyse them quickly and produce results. And then I graph it in something else. Isn't this what this language would be *really* good at, as it provides efficiency with minimal coding?

> D would like to be good at all these things, and some of them are enabled on dub.  But as a newer language with a smaller community than Java, obviously the amount of APIs covered is going to be less right now.

I'd love to help it on this journey, with my limited knowledge. Where can I start?

> This is the normal chicken-or-egg problem with a new language like D, ie people want libraries or API wrappers to get their job done easier but if they don't spend time writing them, they never get done.

Agreed. But if I'm looking to use an API library and their isn't one there, writing a new library entirely isn't exactly a trivial task.

> Also, maybe the D community doesn't put their code up for public consumption as much as some other language communities.

This is my belief and main point.

> I don't doubt that these issues exist, I just consider them normal for a newer language.
>
> As for recommending D, I think it depends on the type of user.  If they care at all about efficiency, I don't know that I'd recommend a language other than D.  If they don't really care how fast their code runs and prefer to stay at a higher scripting level, then the advantages of D fade compared to other languages.

Yes the language is efficient but what's the point in having efficient code if I don't know how to get it to do what I want?

While I'm not sure if you agree or disagree with me, I think you also clarify what I was trying to say.

My point wasn't that there aren't ways to do things in D.
My point was that there are fewer examples of *how* to do things in D.
This will discourage the new user, which will prevent it becoming a more popular language.
So if I'm looking for a new language to use, I'd probably stick to the ones that have more examples.
January 15, 2015
On Thursday, 15 January 2015 at 03:19:10 UTC, brian wrote:
> On Wednesday, 14 January 2015 at 05:10:05 UTC, Joakim wrote:
>> I don't think it's that unusual for a native compiled language: can you find C++ snippets to write tweets?  I doubt it.  A compiled languages is just not the tool people usually grab to write such things.
>
> Pardon my naivity, but I don't know why I *wouldn't* want to do this in D? I want something to pull tweets, analyse them quickly and produce results. And then I graph it in something else. Isn't this what this language would be *really* good at, as it provides efficiency with minimal coding?

You originally talked about _writing_ tweets by using a D tool, not pulling and analyzing them as you do now, which is usually what people use a native language for.  For writing tweets, tossing off something in a scripting language is usually much quicker and easier, as you see with all the perl/python/php/ruby libraries listed in the official Twitter libraries link Ola provided above.

However, D could be used for both writing and analyzing, and if you look on dub, you'll see two libraries that advertise twitter support:

http://code.dlang.org/packages/twitter4d
http://code.dlang.org/packages/graphite

>> D would like to be good at all these things, and some of them are enabled on dub.  But as a newer language with a smaller community than Java, obviously the amount of APIs covered is going to be less right now.
>
> I'd love to help it on this journey, with my limited knowledge. Where can I start?

Simple, write the kinds of libraries or API wrappers you'd like to use.

>> This is the normal chicken-or-egg problem with a new language like D, ie people want libraries or API wrappers to get their job done easier but if they don't spend time writing them, they never get done.
>
> Agreed. But if I'm looking to use an API library and their isn't one there, writing a new library entirely isn't exactly a trivial task.

It doesn't have to be a new library.  It could just be a D wrapper for an existing C library, because D provides for wrapping C easily.  I ran the automated C->D header translation tool dstep and modified the output a little to provide a D wrapper for the native Android C APIs:

https://github.com/jacob-carlborg/dstep
https://github.com/joakim-noah/android

>> Also, maybe the D community doesn't put their code up for public consumption as much as some other language communities.
>
> This is my belief and main point.

Tough to say.

>> I don't doubt that these issues exist, I just consider them normal for a newer language.
>>
>> As for recommending D, I think it depends on the type of user.
>>  If they care at all about efficiency, I don't know that I'd recommend a language other than D.  If they don't really care how fast their code runs and prefer to stay at a higher scripting level, then the advantages of D fade compared to other languages.
>
> Yes the language is efficient but what's the point in having efficient code if I don't know how to get it to do what I want?

Generally, the kind of people who write efficient code don't mind writing and figuring out such stuff themselves, without relying on existing code examples.

> While I'm not sure if you agree or disagree with me, I think you also clarify what I was trying to say.
>
> My point wasn't that there aren't ways to do things in D.
> My point was that there are fewer examples of *how* to do things in D.
> This will discourage the new user, which will prevent it becoming a more popular language.
> So if I'm looking for a new language to use, I'd probably stick to the ones that have more examples.

I agree that most users learn from examples, so to the extent D is missing those, it will not get as many users.  But any new language without corporate support has this problem, as language users generally don't bother taking the time to slap all their support code and examples online.

dub has been an effort to remedy that, and taking your twitter example, appears to have worked, based on the two links I found.  Obviously, D still has a ways to go to reach ruby or Java levels of example/library availability.
January 15, 2015
On 1/14/15 7:19 PM, brian wrote:
> My point was that there are fewer examples of *how* to do things in D.
> This will discourage the new user, which will prevent it becoming a more
> popular language.

Yes, it would be great if we could crowdsource a cornucopia of "how to" topics in D. -- Andrei
January 15, 2015
On Thursday, 15 January 2015 at 07:58:47 UTC, Andrei Alexandrescu wrote:
> On 1/14/15 7:19 PM, brian wrote:
>> My point was that there are fewer examples of *how* to do things in D.
>> This will discourage the new user, which will prevent it becoming a more
>> popular language.
>
> Yes, it would be great if we could crowdsource a cornucopia of "how to" topics in D. -- Andrei


Adam's D Cookbook kindof does that
January 15, 2015
On Thursday, 15 January 2015 at 03:19:10 UTC, brian wrote:
>
> My point wasn't that there aren't ways to do things in D.
> My point was that there are fewer examples of *how* to do things in D.
> This will discourage the new user, which will prevent it becoming a more popular language.
> So if I'm looking for a new language to use, I'd probably stick to the ones that have more examples.

Does this help? http://p0nce.github.io/d-idioms/

In my eyes, it is a responsibility of the twitter library to provide an example.

The best we have for busy programmers is Adam Ruppe's book.