www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Call for dsource tutorials upgrade

reply "Saaa" <empty needmail.com> writes:
With all the different design possibilities of D I find looking through code 
(from others) especially useful.

The first place I always go to is dsource tutorials and thus love to see it 
expanded.
Maybe see D1 and D2 seperated?

And where do you go code seeing?
Feb 14 2008
next sibling parent reply okibi <spam ratedo.com> writes:
Saaa Wrote:

 
 With all the different design possibilities of D I find looking through code 
 (from others) especially useful.
 
 The first place I always go to is dsource tutorials and thus love to see it 
 expanded.
 Maybe see D1 and D2 seperated?
 
 And where do you go code seeing?
 
 

I used to read over the code at dsource, but it's terribly out of date. I pretty much just read over either the specs here or go to docwiki.net and figure it out. If the brain fart is too massive, I post here. I don't think there's any really good place for up to date d examples yet. Maybe we should put some work into the dsource tutorials?
Feb 14 2008
next sibling parent Bill Baxter <dnewsgroup billbaxter.com> writes:
okibi wrote:
 Saaa Wrote:
 
 With all the different design possibilities of D I find looking through code 
 (from others) especially useful.

 The first place I always go to is dsource tutorials and thus love to see it 
 expanded.
 Maybe see D1 and D2 seperated?

 And where do you go code seeing?

I used to read over the code at dsource, but it's terribly out of date. I pretty much just read over either the specs here or go to docwiki.net and figure it out. If the brain fart is too massive, I post here. I don't think there's any really good place for up to date d examples yet. Maybe we should put some work into the dsource tutorials?

dsource/projects/scrapple may be good as a source for for shortish chunks of decent relatively-up-to-date code. Not quite the same as tutorial examples though. --bb
Feb 14 2008
prev sibling next sibling parent reply "Saaa" <empty needmail.com> writes:
How about forcing =) everybody on the newsgroup creating one tutorial?
(I mean 1 per person would be quit a bit of code)

D version:
Category:
Difficulty:
Keywords:


 With all the different design possibilities of D I find looking through 
 code
 (from others) especially useful.

 The first place I always go to is dsource tutorials and thus love to see 
 it
 expanded.
 Maybe see D1 and D2 seperated?

 And where do you go code seeing?

I used to read over the code at dsource, but it's terribly out of date. I pretty much just read over either the specs here or go to docwiki.net and figure it out. If the brain fart is too massive, I post here. I don't think there's any really good place for up to date d examples yet. Maybe we should put some work into the dsource tutorials?

Feb 14 2008
next sibling parent reply Clay Smith <clayasaurus gmail.com> writes:
Saaa wrote:
 How about forcing =) everybody on the newsgroup creating one tutorial?
 (I mean 1 per person would be quit a bit of code)
 
 D version:
 Category:
 Difficulty:
 Keywords:
 
 

I don't think there is a trouble in creating them, but maintaining them. ~ Clay
Feb 14 2008
parent "Saaa" <empty needmail.com> writes:
 I don't think there is a trouble in creating them, but maintaining them.

 ~ Clay

When they are greatly outdated I'll post a call to update them again, ok? If you would create one, I'll be happy =) D1 would probably stay pretty updated as long as the std part isn't too big.
Feb 14 2008
prev sibling parent jcc7 <technocrat7 gmail.com> writes:
== Quote from Saaa (empty needmail.com)'s article
 How about forcing =) everybody on the newsgroup creating one tutorial?
 (I mean 1 per person would be quit a bit of code)

That's fine with me since I already submitted more than my quota a few years ago. ;)
Feb 14 2008
prev sibling parent reply jcc7 <technocrat7 gmail.com> writes:
== Quote from okibi (spam ratedo.com)'s article
...
 I used to read over the code at dsource, but it's terribly out of
 date. I pretty much just read over either the specs here or go to
 docwiki.net and figure it out. If the brain fart is too massive, I
 post here.

 I don't think there's any really good place for up to date d
 examples  yet. Maybe we should put some work into the dsource
 tutorials?

By the way, anyone should free to login and fix any of the dsource tutorials that have problems. Even someone doesn't want to directly "fix" the problem (perhaps it would take too much time or the solution isn't known), just adding a comment that there's a problem can be help give a clue to someone else that there's a problem that needs fixing.
Feb 14 2008
parent "Saaa" <empty needmail.com> writes:
 By the way, anyone should free to login and fix any of the dsource 
 tutorials that
 have problems. Even someone doesn't want to directly "fix" the problem 
 (perhaps it
 would take too much time or the solution isn't known), just adding a 
 comment that
 there's a problem can be help give a clue to someone else that there's a 
 problem
 that needs fixing.

agreed
Feb 15 2008
prev sibling next sibling parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
Saaa wrote:
 With all the different design possibilities of D I find looking through code 
 (from others) especially useful.
 
 The first place I always go to is dsource tutorials and thus love to see it 
 expanded.
 Maybe see D1 and D2 seperated?

Maybe D1|Phobos, D1|Tango, D2, actually. --bb
Feb 14 2008
next sibling parent reply "Saaa" <empty needmail.com> writes:
 Saaa wrote:
 With all the different design possibilities of D I find looking through 
 code (from others) especially useful.

 The first place I always go to is dsource tutorials and thus love to see 
 it expanded.
 Maybe see D1 and D2 seperated?

Maybe D1|Phobos, D1|Tango, D2, actually. --bb

I thought to include that distinction into the category. Most tutorials are relatively small and don't necessarily need any std lib.
Feb 14 2008
parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
Saaa wrote:
 Saaa wrote:
 With all the different design possibilities of D I find looking through 
 code (from others) especially useful.

 The first place I always go to is dsource tutorials and thus love to see 
 it expanded.
 Maybe see D1 and D2 seperated?

--bb

I thought to include that distinction into the category. Most tutorials are relatively small and don't necessarily need any std lib.

I guess you're thinking of a different kind of tutorials than me, then. I'd think at least you'd need writefln/Stdout at some point in your tutorials. I would think how to use writefln/Stdout would even be the subject of one of the first few tutorials. --bb
Feb 14 2008
next sibling parent reply "Saaa" <empty needmail.com> writes:
 I guess you're thinking of a different kind of tutorials than me, then. 
 I'd think at least you'd need writefln/Stdout at some point in your 
 tutorials.  I would think how to use writefln/Stdout would even be the 
 subject of one of the first few tutorials.

 --bb

I would suggest using phobos by default as it is the standard library and adding tango to the category if it is used instead. Anybody starting off would see phobos as the std. (I did :) and still do btw. whether tango is better or not.
Feb 14 2008
parent reply jcc7 <technocrat7 gmail.com> writes:
== Quote from Saaa (empty needmail.com)'s article
 I guess you're thinking of a different kind of tutorials than me,
 then. I'd think at least you'd need writefln/Stdout at some point
 in your tutorials.  I would think how to use writefln/Stdout would
 even be the subject of one of the first few tutorials.

 --bb

I would suggest using phobos by default as it is the standard library and adding tango to the category if it is used instead.

Since the tutorials project began before the Tango project began, there's already an established pro-Phobos bias. ;) I looked into creating some examples that would work for Phobos and Tango (using version(Tango)), but it was harder to do than I thought it would be, so I don't think I ever added any pages based on my efforts.
 Anybody starting off would see phobos as the std.
 (I did :) and still do btw. whether tango is better or not.

I'm not against people adding Tango examples to the Tutorials project, but they should include a mention of Tango (something like "Tango is required"). It's helpful to mention which combination of compiler version/library version it's been tested with so that if breaks, future users will have a clue as to why it broke.
Feb 14 2008
parent reply "Saaa" <empty needmail.com> writes:
 Since the tutorials project began before the Tango project began, there's 
 already
 an established pro-Phobos bias. ;)

 I looked into creating some examples that would work for Phobos and Tango 
 (using
 version(Tango)), but it was harder to do than I thought it would be, so I 
 don't
 think I ever added any pages based on my efforts.

Maybe adding one of your efforts? and explaining why it doesn't work exactly like you would like.
 Anybody starting off would see phobos as the std.
 (I did :) and still do btw. whether tango is better or not.

I'm not against people adding Tango examples to the Tutorials project, but they should include a mention of Tango (something like "Tango is required").

keywords.
 It's helpful to mention which combination of compiler version/library 
 version it's
 been tested with so that if breaks, future users will have a clue as to 
 why it broke.

Feb 15 2008
parent jcc7 <technocrat7 gmail.com> writes:
== Quote from Saaa (empty needmail.com)'s article
...
 I looked into creating some examples that would work for Phobos
 and Tango (using version(Tango)), but it was harder to do than I
 thought it would be, so I don't think I ever added any pages based
 on my efforts.

exactly like you would like.

Well, since Tango downloads are available that include Tangobos now, it might be less of an issue than it was before. If people want "pure Tango" examples they can find them in the Tango wiki. If people don't mind using Tangobos, most of the tutorials should run without any modification needed. (I guess I might install a recent version of Tango to see if this is true.)
Feb 15 2008
prev sibling parent jcc7 <technocrat7 gmail.com> writes:
== Quote from Bill Baxter (dnewsgroup billbaxter.com)'s article
 Saaa wrote:
 Saaa wrote:
 With all the different design possibilities of D I find looking
 through code (from others) especially useful.

 The first place I always go to is dsource tutorials and thus
 love to see it expanded.
 Maybe see D1 and D2 seperated?

--bb

I thought to include that distinction into the category. Most tutorials are relatively small and don't necessarily need any std lib.

I guess you're thinking of a different kind of tutorials than me, then. I'd think at least you'd need writefln/Stdout at some point in your tutorials. I would think how to use writefln/Stdout would even be the subject of one of the first few tutorials. --bb

I agree. Newcomers who want to use the Tutorials with Tango should probably install the Tango that comes with Tangobos.
Feb 14 2008
prev sibling parent reply jcc7 <technocrat7 gmail.com> writes:
== Quote from Bill Baxter (dnewsgroup billbaxter.com)'s article
 Saaa wrote:
 With all the different design possibilities of D I find looking
 through code (from others) especially useful.

 The first place I always go to is dsource tutorials and thus love
 to see it expanded.
 Maybe see D1 and D2 seperated?

Maybe D1|Phobos, D1|Tango, D2, actually. --bb

Actually, I don't know if there's any D2 or Tango code in there (though I suppose some of "less useful" examples would comply in any situation), but you're right it'd be better if the compiler versions and needed libraries were indicated for every example. I've added some of that compiler/library version information to older entries (and I try to include that information with new entries), but I confess it's not something that I really enjoy doing. Everyone is welcome to help improve the wiki pages. (Any registered dsource user should be able to edit the Tutorial wiki.)
Feb 14 2008
parent reply "Saaa" <empty needmail.com> writes:
 (Any registered dsource user should be able to edit the Tutorial wiki.)

Didn't know that. I'll see if I can fabricate something interesting. 
Feb 15 2008
parent reply "Saaa" <empty needmail.com> writes:
Btw. what is the best way to add a comment question?

For instance about the nested functions example:

Why not exclude the lines:
bit found;
while (!found), and
found=true;

They don't seem to add anything except complexity. 
Feb 15 2008
parent reply jcc7 <technocrat7 gmail.com> writes:
== Quote from Saaa (empty needmail.com)'s article
 Btw. what is the best way to add a comment question?

Maybe just add a section to the wiki page. For example: == Comment == Why not exclude the lines: {{{ #!d bit found; while (!found), and found=true; }}} They don't seem to add anything except complexity. --Saaa
 For instance about the nested functions example:
 Why not exclude the lines:
 bit found;
 while (!found), and
 found=true;
 They don't seem to add anything except complexity.

To answer the question that you wanted to comment on, I'm not sure, but I think it was just my personal preference when I posted that code in 2004. Example code can be too complicated or too short. If it's too complicated, someone may not understand the code. If it's too simple the point of the example might be lost. The "perfect balance" between the two extremes will vary from person to person. Perhaps this example is more complicated that it should be. I suspect that I was trying to show how useful a nested function could be. It doesn't seem that complex to me, but perhaps that's because I've been programming too long. ;)
Feb 15 2008
parent "Saaa" <empty needmail.com> writes:
Maybe its even more complex than I thought, but my problem with the extra
code would be that the while loop isn't really used: There is no loop :)

 == Quote from Saaa (empty needmail.com)'s article
 Btw. what is the best way to add a comment question?

Maybe just add a section to the wiki page. For example: == Comment == Why not exclude the lines: {{{ #!d bit found; while (!found), and found=true; }}} They don't seem to add anything except complexity. --Saaa
 For instance about the nested functions example:
 Why not exclude the lines:
 bit found;
 while (!found), and
 found=true;
 They don't seem to add anything except complexity.

To answer the question that you wanted to comment on, I'm not sure, but I think it was just my personal preference when I posted that code in 2004. Example code can be too complicated or too short. If it's too complicated, someone may not understand the code. If it's too simple the point of the example might be lost. The "perfect balance" between the two extremes will vary from person to person. Perhaps this example is more complicated that it should be. I suspect that I was trying to show how useful a nested function could be. It doesn't seem that complex to me, but perhaps that's because I've been programming too long. ;)

Feb 16 2008
prev sibling parent reply jcc7 <technocrat7 gmail.com> writes:
== Quote from Saaa (empty needmail.com)'s article
 With all the different design possibilities of D I find looking
 through code (from others) especially useful.

 The first place I always go to is dsource tutorials and thus love to
 see it expanded.
 Maybe see D1 and D2 seperated?

Is there any D2 code in there? Some of the code even probably needs to be updated for D1 (i.e., some of the code was written before D 1.0 and may not work for D1.x).
 And where do you go code seeing?

Feb 14 2008
parent reply "Saaa" <empty needmail.com> writes:
 Maybe see D1 and D2 seperated?

Is there any D2 code in there?

I mean for the future :)
Feb 15 2008
parent jcc7 <technocrat7 gmail.com> writes:
== Quote from Saaa (empty needmail.com)'s article
 Maybe see D1 and D2 seperated?

Is there any D2 code in there?


Yes, in the future, I would expect there to be D2 code in the tutorials. But I don't know how stable D2 is now (I know that Walter is planning to add stuff, but I don't know how many breaking changes are planned). If someone else wants to start adding D2 code, I won't get in the way, but I've personally been waiting until it stabilizes. I guess the const stuff may be mostly staying the way that it is now, but I get tired of chasing a moving target. I've been sticking to D1 with my D projects. D2 is very much the frontier right now. Tango isn't available for D2 yet (I think I heard they're working on it behind the scenes). I haven't heard that DFL or DWT are supporting D2 yet. I don't think that D2 is for the faint of heart, and I'd recommend for newbies to concentrate on learning D1 at this point.
Feb 15 2008