January 28, 2016
On Monday, 25 January 2016 at 18:17:09 UTC, André wrote:
> Hi,
>
> Inspired by the Go online language tour (https://tour.golang.org/) and the great experience it gave me learning the language I started a similar project for D some weeks ago. It's currently in a very pre-alpha state but I wanted to announce it in case someone had something similar in mind and is willing to contribute. The basic idea behind this tour is to introduce features of the language with short explanations and example code that is compiled and run online.
>
> The code is located here:
>
> https://github.com/stonemaster/dlang-tour
>
> I've setup a server which always runs the latest version:
>
> http://dlang-tour.steinsoft.net
>
> This tour doesn't allow compiling online because the current implementation would just make it too easy to hijack the server :-) Compiling and running online can be activated when compiling locally though. My goal would be to integrate the tour with DPaste in the long run.
>
> Working on this tour unfortunately stalled a little bit in this year but I am trying to work on the project constantly in the upcoming weeks. There is still a lot of content missing and, more importantly, good D source examples. But I have a rough guideline on which D topics I'd like to add content for.
>
> Any kind of feedback is highly appreciated, of course.
>
> Regards,
> André

Another typo: In Basic's page two (Basic types) it says
    The prefix u denotes unsigned types. char translates to UTF-8 characters, dchar is       used in UTF-16 strings and dchar in UTF-32 strings.
Should be
    The prefix u denotes unsigned types. char translates to UTF-8 characters, _W_char is used in UTF-16 strings and dchar in UTF-32 strings.
January 28, 2016
On Thursday, 28 January 2016 at 09:36:00 UTC, Nicholas Wilson wrote:
> On Monday, 25 January 2016 at 18:17:09 UTC, André wrote:
>> [...]
>
> Another typo: In Basic's page two (Basic types) it says
>     The prefix u denotes unsigned types. char translates to UTF-8 characters, dchar is       used in UTF-16 strings and dchar in UTF-32 strings.
> Should be
>     The prefix u denotes unsigned types. char translates to UTF-8 characters, _W_char is used in UTF-16 strings and dchar in UTF-32 strings.

Also

in Basics 10 the comments for the string types are the wrong way round
alias dstring = immutable(dchar)[]; // UTF-16
alias wstring = immutable(wchar)[]; // UTF-32

January 28, 2016
On 01/25/2016 10:17 AM, André wrote:

> http://dlang-tour.steinsoft.net

I love it! :)

> Working on this tour unfortunately stalled a little bit in this year
> but I am trying to work on the project constantly in the upcoming
> weeks.

This thread is an indication of what a great idea it's been. ;)

Ali

January 28, 2016
On Thursday, 28 January 2016 at 09:53:12 UTC, Nicholas Wilson wrote:
>> Another typo: In Basic's page two (Basic types) it says
>>     The prefix u denotes unsigned types. char translates to UTF-8 characters, dchar is       used in UTF-16 strings and dchar in UTF-32 strings.
>> Should be
>>     The prefix u denotes unsigned types. char translates to UTF-8 characters, _W_char is used in UTF-16 strings and dchar in UTF-32 strings.
>
> Also
>
> in Basics 10 the comments for the string types are the wrong way round
> alias dstring = immutable(dchar)[]; // UTF-16
> alias wstring = immutable(wchar)[]; // UTF-32

Nicholas, thank you very much for proof reading! Has been fixed.
January 28, 2016
On Thursday, 28 January 2016 at 10:09:40 UTC, Ali Çehreli wrote:
> On 01/25/2016 10:17 AM, André wrote:
>
> > http://dlang-tour.steinsoft.net
>
> I love it! :)
>
> > Working on this tour unfortunately stalled a little bit in
> this year
> > but I am trying to work on the project constantly in the
> upcoming
> > weeks.
>
> This thread is an indication of what a great idea it's been. ;)
>
> Ali

Thank you very much. Another motivation to keep going on :-)

André

January 30, 2016
On Monday, 25 January 2016 at 21:18:45 UTC, rsw0x wrote:
> On Monday, 25 January 2016 at 21:12:14 UTC, André wrote:
>> [...]
>
> might be worth noting that Rust uses playpen for sandboxing their online compiler
> https://github.com/thestinger/playpen

Thank you for the link and the information! Unfortunately playpen doesn't work inside a Docker container because it basically uses the same technologies and has dependencies just available on systemd based base systems.

I know decided to go the Docker way. I just pushed a change which lets the source be compiled and run within a Docker container that contains RDMD. This is working quite well so far and should be a quite safe sandbox. The started  Docker containers are restricted in memory usage and could be restricted in terms of CPU usage.

And this is online as of now. So the source code editor is now ready for compiling D online in the tour :-)

Cheers,
André
March 29, 2016
On Monday, 25 January 2016 at 18:17:09 UTC, André wrote:
> Hi,
>
> Inspired by the Go online language tour (https://tour.golang.org/) and the great experience it gave me learning the language I started a similar project for D some weeks ago. It's currently in a very pre-alpha state but I wanted to announce it in case someone had something similar in mind and is willing to contribute. The basic idea behind this tour is to introduce features of the language with short explanations and example code that is compiled and run online.
>
> The code is located here:
>
> https://github.com/stonemaster/dlang-tour
>
> I've setup a server which always runs the latest version:
>
> http://dlang-tour.steinsoft.net
>
> This tour doesn't allow compiling online because the current implementation would just make it too easy to hijack the server :-) Compiling and running online can be activated when compiling locally though. My goal would be to integrate the tour with DPaste in the long run.
>
> Working on this tour unfortunately stalled a little bit in this year but I am trying to work on the project constantly in the upcoming weeks. There is still a lot of content missing and, more importantly, good D source examples. But I have a rough guideline on which D topics I'd like to add content for.
>
> Any kind of feedback is highly appreciated, of course.

Here are great news on the dlang-tour project: As of now I've written all content and the latest build is running on

http://dlang-tour.steinsoft.net

Somewhere ago I've implemented running code samples online (which are run in a Docker container on the server) so the tour is fully functional. There are still some polishing work to be left and some issues to be fixed before this should go public: https://github.com/stonemaster/dlang-tour/issues

I would appreciate if people could do some proof reading and just create pull requests for the content: https://github.com/stonemaster/dlang-tour/tree/master/public/content/en.
Or just drop me a message where you find a bug and I'll have it fixed.

Thanks,
André
March 29, 2016
On Tuesday, 29 March 2016 at 16:26:27 UTC, André wrote:
> Or just drop me a message where you find a bug and I'll have it fixed.
>

Looks good. A few suggestions, some content, some typo.

D Basics (fix capitalization?):

Page 3, code example at the bottom right does not compile with @system. Also, D allows pointer arithmetic in @trusted code, so the text above it is not completely accurate. I would change the line

> D also allows pointer arithmetic. This is not allowed in code which is marked as @safe but only in @system code.

to

D allows pointer arithmetic, except in code that is marked as @safe

Page 4, This line on const is confusing

> To a const object can't be written, but someone holding a mutable to the same object might just well.

I feel like the static keyword is complicated enough that it could get its own slide (or multiple). Why not just put the variable at the top level without static?

Page 7, the discussion on delegates could be clearer.

D Gems:
Page 3, put the code examples on a separate line.

Page 7, I would re-write the last line as

The attribute pure is automatically inferred by the compiler for templated functions and auto functions, where applicable (this is also true of @safe, nothrow, and @nogc).

Page 8, I was not aware of invariant. I feel like I have a struct somewhere that could use it!

Page 10, might also mention @safe.

Page 13, conditionnally is spelled wrong.

I feel like static if with templates could get a whole page by itself.

Concurrency:
Maybe re-name Multithreading? I wouldn't consider std.parallelism a way to implement concurrency.

VibeD:
Page 1: Define asynchronous I/O and why it matters. I see a short explanation near the end of Page 2, but I feel like it should be brought up to the front. Maybe make that big paragraph into a list of key vibe-d features and why they matter.
March 29, 2016
On Tuesday, 29 March 2016 at 16:26:27 UTC, André wrote:
> ...
> I would appreciate if people could do some proof reading and just create pull requests for the content:

Nice work but I really think that the left content should be expandable. Some button like Try it or whatever should do the trick. It's a waste space mainly when there is nothing on the left side.

The same thing goes for the bottom content, I don't think it should be fixed.

Finally the font-size is too big for me.

Bubba.

March 30, 2016
Thank you very much for your thorough review! I integrated your ideas and comments in the latest version. Some additional information on what I changed and questions left are below.

On Tuesday, 29 March 2016 at 17:10:33 UTC, jmh530 wrote:
> D Basics (fix capitalization?):

The current title is "D's basics". I'm unsure what to fix here..

> Page 3, [...]  I would change the line
>
>> D also allows pointer arithmetic. This is not allowed in code which is marked as @safe but only in @system code.
>
> to
>
> D allows pointer arithmetic, except in code that is marked as @safe

Done.

> Page 4, This line on const is confusing
> [...]

I tried to make this part more precise.

> I feel like the static keyword is complicated enough that it could get its own slide (or multiple). Why not just put the variable at the top level without static?

Very good idea. I created a new static section in the multi-threading chapter.

> Page 7, the discussion on delegates could be clearer.

Tried to make it more precise here, too. I also moved the section
below classes because it actually is a more advanced topic and hasn't to
be near 'Functions, part I'.

> D Gems:
> Page 3, put the code examples on a separate line.

Done. Much more readable that way.

> Page 7, I would re-write the last line as
>[..]

Done

> Page 10, might also mention @safe.

Mentioning now @safe, @system and @trusted.

> Page 13, conditionnally is spelled wrong.

Fixed.

> I feel like static if with templates could get a whole page by itself.

Thought so too when initially writing the subsection.. I'll have another good night's sleep to decide whether I'll actually move it :-)

> Concurrency:
> Maybe re-name Multithreading? I wouldn't consider std.parallelism a way to implement concurrency.

I changed the name. Better fits the topic.

> VibeD:
> Page 1: Define asynchronous I/O and why it matters. I see a short explanation near the end of Page 2, but I feel like it should be brought up to the front. Maybe make that big paragraph into a list of key vibe-d features and why they matter.

I followed your suggestion and rewrote the paragraph to include bullet points. Also I added a line on asynchronous I/O and a reference to the following page which explains in more detail.