www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Learning D2 from nearly zero

reply Grzegorz Adam Hankiewicz <gradha titanium.sabren.com> writes:
After toying with D1 some years ago I've returned to see D2 and ported 
it a program I had written in D1. 99% of the time was figuring out why 
my chars[] suddenly didn't want to work/interface correctly with C 
library calls.

After going through some documentation on the web I managed to make it 
work, but still have the feeling my brain hasn't really reached the 
"aha!" point about all those freaking char/string/whatever aliases. And 
the mangling looks seriously ugly.

Also there are many other changes, like ranges mentioned in the 
Changelog. What the hell are ranges anyway? After browsing some more I 
get to 
http://www.digitalmars.com/d/2.0/statement.html#ForeachRangeStatement 
and simply think: what does this mean other than the word range is in 
there? I still don't get a clue.

My point is, the available documentation is scattered like a 
fragmentation grenade, and depending on your luck you get "hit" by it, 
or have to spend a lot of time seeking it.

I know that there is this "Learn to tango with D" book, but I'm not 
interested in Tango, plus I guess it applies to D1. Is there any other 
documentation source explaining D2 without necessary going through D1 
documentation first?

I'm thinking of something like Python's "holding hands" tutorial. After 
a few hours of reading that you basically know pretty much everything 
there is to it, except for the huge library. It would be great if there 
was something similar for D2 (so I don't have to go and write it myself!).
Apr 30 2009
next sibling parent reply Don <nospam nospam.com> writes:
Grzegorz Adam Hankiewicz wrote:
 After toying with D1 some years ago I've returned to see D2 and ported 
 it a program I had written in D1. 99% of the time was figuring out why 
 my chars[] suddenly didn't want to work/interface correctly with C 
 library calls.
 
 After going through some documentation on the web I managed to make it 
 work, but still have the feeling my brain hasn't really reached the 
 "aha!" point about all those freaking char/string/whatever aliases. And 
 the mangling looks seriously ugly.
 
 Also there are many other changes, like ranges mentioned in the 
 Changelog. What the hell are ranges anyway? After browsing some more I 
 get to 
 http://www.digitalmars.com/d/2.0/statement.html#ForeachRangeStatement 
 and simply think: what does this mean other than the word range is in 
 there? I still don't get a clue.
 
 My point is, the available documentation is scattered like a 
 fragmentation grenade, and depending on your luck you get "hit" by it, 
 or have to spend a lot of time seeking it.
 
 I know that there is this "Learn to tango with D" book, but I'm not 
 interested in Tango, plus I guess it applies to D1. Is there any other 
 documentation source explaining D2 without necessary going through D1 
 documentation first?
 
 I'm thinking of something like Python's "holding hands" tutorial. After 
 a few hours of reading that you basically know pretty much everything 
 there is to it, except for the huge library. It would be great if there 
 was something similar for D2 (so I don't have to go and write it myself!).
The key piece of information which I think you're missing is that D2 just underwent an earthquake change in the last release. D2.029 is alpha 1 of Phobos 2.0. It's a major break from D2.028, and has lots of ground-breaking stuff. The major concepts are in, but there are many bugs, and documentation will take some time. It's really not recommended to use it unless you're interested in working on language/library development. I'm sorry that you've chosen such a bad time to return! The situation should be much better in a couple of months time.
Apr 30 2009
parent reply Grzegorz Adam Hankiewicz <gradha titanium.sabren.com> writes:
Don escribió:
 The key piece of information which I think you're missing is that D2 
 just underwent an earthquake change in the last release. D2.029 is alpha 
 1 of Phobos 2.0. It's a major break from D2.028, and has lots of 
 ground-breaking stuff. The major concepts are in, but there are many 
 bugs, and documentation will take some time. It's really not recommended 
 to use it unless you're interested in working on language/library 
 development.
 I'm sorry that you've chosen such a bad time to return! The situation 
 should be much better in a couple of months time.
Strange choice of words you have there. I would say it is precisely the best time to come and personally watch the fireworks! I only wanted to confirm that I'm not missing any obvious place to look for documentation about new features. So is lurking the forum the only way to learn for the moment?
Apr 30 2009
parent Don <nospam nospam.com> writes:
Grzegorz Adam Hankiewicz wrote:
 Don escribió:
 The key piece of information which I think you're missing is that D2 
 just underwent an earthquake change in the last release. D2.029 is 
 alpha 1 of Phobos 2.0. It's a major break from D2.028, and has lots of 
 ground-breaking stuff. The major concepts are in, but there are many 
 bugs, and documentation will take some time. It's really not 
 recommended to use it unless you're interested in working on 
 language/library development.
 I'm sorry that you've chosen such a bad time to return! The situation 
 should be much better in a couple of months time.
Strange choice of words you have there. I would say it is precisely the best time to come and personally watch the fireworks!
It's definitely fun! Not very practical just yet.
 
 I only wanted to confirm that I'm not missing any obvious place to look 
 for documentation about new features. So is lurking the forum the only 
 way to learn for the moment?
Pretty much. Andrei had been posting his work-in-progress onto his own website, but the code mostly didn't compile. Now that it compiles, his docs are all in Phobos. Some basic functionality (eg, containers) isn't in yet.
Apr 30 2009
prev sibling parent "Saaa" <empty needmail.com> writes:
 After toying with D1 some years ago I've returned to see D2 and ported it 
 a program I had written in D1. 99% of the time was figuring out why my 
 chars[] suddenly didn't want to work/interface correctly with C library 
 calls.

 After going through some documentation on the web I managed to make it 
 work, but still have the feeling my brain hasn't really reached the "aha!" 
 point about all those freaking char/string/whatever aliases. And
same here
 the mangling looks seriously ugly.

 Also there are many other changes, like ranges mentioned in the Changelog. 
 What the hell are ranges anyway? After browsing some more I get to 
 http://www.digitalmars.com/d/2.0/statement.html#ForeachRangeStatement and 
 simply think: what does this mean other than the word range is in there? I 
 still don't get a clue.

 My point is, the available documentation is scattered like a fragmentation 
 grenade, and depending on your luck you get "hit" by it, or have to spend 
 a lot of time seeking it.
Sometimes I remember a certain useful doc but then can't find it anymore
 I know that there is this "Learn to tango with D" book, but I'm not 
 interested in Tango, plus I guess it applies to D1. Is there any other 
 documentation source explaining D2 without necessary going through D1 
 documentation first?
Personally I'm awaiting Andrei's D2 (Phobos) book.
 I'm thinking of something like Python's "holding hands" tutorial. After a 
 few hours of reading that you basically know pretty much everything there 
 is to it, except for the huge library. It would be great if there was 
 something similar for D2 (so I don't have to go and write it myself!).
Adding more tutorials to dsource would be much appreciated! Especially ones between basic and (towards) advanced.
Apr 30 2009