FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Introduction

 
Post new topic   Reply to topic     Forum Index -> Tutorials
View previous topic :: View next topic  
Author Message
jcc7



Joined: 22 Feb 2004
Posts: 657
Location: Muskogee, OK, USA

PostPosted: Sat Oct 30, 2004 1:56 pm    Post subject: Introduction Reply with quote

The idea behind these tutorials is to make it so that a programming novice can use it to learn D. Walter wrote in the D spec (under the heading "Who D is Not For") that "D makes an excellent second language". Well, I believe that if there is a thorough tutorial for learning it, D would be as appropriate as Java as a beginning language.


Submitting Examples

With the current system, anyone can post examples, but only a couple of us can edit them (if something needs fixing). If you find a mistake or something that needs updating in a tutorial example, please let me know (either by posting in the tutorial forum or by sending me a PM).


Showing All Examples on a Single Page

This link displays all of the examples. You can also click on "Show all examples" at the bottom of the page on the right side.

It may take a few minutes to generate, but when it finishes loading it should contain all of the examples on a single page.


Embedding HTML in an example

By the way, there's a feature for embedding raw HTML now. Here's an example (#14):

Code:
void main()
{
}

/+rawhtml For an explanation of what this means, visit <a href="http://www.wikiservice.at/d/wiki.cgi?D__Tutorial/StartingWithD">Wiki4D.</a> rawhtml+/

A more exciting example: #59

The idea is that the content between the /+rawhtml and rawhtml+/ tags to output directly to HTML. Basically, it facilitates adding hyperlinks and custom formatting.


Future Improvements

An issue of increasing concern to me is how editable should the tutorials be to the average user. It's a conflict between security and maintainability. Currently, the system only allows me and Brad to edit examples. If someone is interested in adding examples from time to time, I wouldn't mind giving him or her access, also, but I'd rather grant access person-by-person than by allowing full access to everyone who logs into the forums.

I've already been thinking that I should set up some sort source control on the examples (such as how wikis do). Brad (the leader of dsource.org) is working on a new server will running Trac. I've been looking at the Trac wiki system (I just got it installed on my computer). It looks pretty nice. Trac allows custom syntax highlighting processors written in Python.

I've written a little Python and I don't think it'll be a problem to port D2HTML (which was first written in D) from PHP to Python. So I think Trac might be a good basis for a new tutorial system. One big advantage to using a wiki compared to the current system is that the change tracking would be automatic and safe.


Related Links

D Tutorial
Notes For Programmers Used To...


Last edited by jcc7 on Sun Nov 20, 2005 11:00 pm; edited 1 time in total
Back to top
View user's profile Send private message AIM Address
jcc7



Joined: 22 Feb 2004
Posts: 657
Location: Muskogee, OK, USA

PostPosted: Thu Mar 24, 2005 10:40 pm    Post subject: On the right Trac... Reply with quote

I managed to port D2HTML to Python last week, so we should be able to have nice syntax highlighting of D code in Trac.

I expect we'll eventually phase out the current custom PHP/MySQL tutorials system (we would probably just move the existing examples into Trac wiki pages), so I don't know how much more work I'll be putting into the current tutorials system. The current system was fun to write, but it's not as flexible as I'd like. The code is already pretty hairy, and each new feature is that much more difficult to add.

I'll keep the existing system running for now, but there probably won't be many new features.
Back to top
View user's profile Send private message AIM Address
jcc7



Joined: 22 Feb 2004
Posts: 657
Location: Muskogee, OK, USA

PostPosted: Sun Nov 20, 2005 10:59 pm    Post subject: Reply with quote

Since we're now transitioning to using a Trac wiki for examples (and putting the old tutorial system into semi-retirement), the information in this topic is obsolete.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Tutorials All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group