Thread overview | |||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
January 25, 2016 Pre-alpha D language online tour | ||||
---|---|---|---|---|
| ||||
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é |
January 25, 2016 Re: Pre-alpha D language online tour | ||||
---|---|---|---|---|
| ||||
Posted in reply to André | On Monday, 25 January 2016 at 18:17:09 UTC, André wrote: > ... > http://dlang-tour.steinsoft.net > ... > Any kind of feedback is highly appreciated, of course. This is very neat and I think this is a thing this will be very good for newcomers. PS: On the index page "after page 1" there is a huge white space on the left side: http://i.imgur.com/ypCTdbo.png JohnCK. |
January 25, 2016 Re: Pre-alpha D language online tour | ||||
---|---|---|---|---|
| ||||
Posted in reply to André | On 1/25/16 1:17 PM, 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
Whoa, what a sight for sore eyes. I very much encourage development by you and the entire community. We need to make this easily accessible from dlang.org. Please let me know how we can help. Thank you! -- Andrei
|
January 25, 2016 Re: Pre-alpha D language online tour | ||||
---|---|---|---|---|
| ||||
Posted in reply to André | On Monday, 25 January 2016 at 18:17:09 UTC, André wrote:
> 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.
I wonder how much bandwidth it would use to host a sandboxed server with dmd on it. Are any of the dpaste guys around that could give an estimate?
|
January 25, 2016 Re: Pre-alpha D language online tour | ||||
---|---|---|---|---|
| ||||
Posted in reply to JohnCK | On Monday, 25 January 2016 at 18:31:57 UTC, JohnCK wrote:
> On Monday, 25 January 2016 at 18:17:09 UTC, André wrote:
>> ...
>> http://dlang-tour.steinsoft.net
>> ...
>> Any kind of feedback is highly appreciated, of course.
>
> This is very neat and I think this is a thing this will be very good for newcomers.
>
> PS: On the index page "after page 1" there is a huge white space on the left side: http://i.imgur.com/ypCTdbo.png
>
> JohnCK.
Thanks very much! Actually this huge white space is by design :-) On every section that doesn't include a code example the space that the source editor would use is just left blank. That way the content always stays at the same position. And it looked awkward when the content just streched to the whole screen on big displays.. That is the same behaviour the Go tour has if no source is shown and I didn't come up with a better solution so far.
Cheers,
André
|
January 25, 2016 Re: Pre-alpha D language online tour | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On Monday, 25 January 2016 at 19:51:44 UTC, Andrei Alexandrescu wrote:
> On 1/25/16 1:17 PM, André wrote:
>> Hi,
>>
>> [...]
>>
>> 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
>
> Whoa, what a sight for sore eyes. I very much encourage development by you and the entire community. We need to make this easily accessible from dlang.org. Please let me know how we can help. Thank you! -- Andrei
Thank you for the motivating words! I'll keep you posted on progress and you'll hear from me when I need help :-)
Regards,
André
|
January 25, 2016 Re: Pre-alpha D language online tour | ||||
---|---|---|---|---|
| ||||
Posted in reply to rsw0x | On Monday, 25 January 2016 at 20:02:10 UTC, rsw0x wrote:
> On Monday, 25 January 2016 at 18:17:09 UTC, André wrote:
>> 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.
>
> I wonder how much bandwidth it would use to host a sandboxed server with dmd on it. Are any of the dpaste guys around that could give an estimate?
If DPaste isn't an option I thought about implementing sandbox compiling within Docker containers. A Docker container running rdmd to compile online code is quite easily put together. The advantage with Docker is that it starts quickly and can be limited in terms of memory and CPU. And it is a pretty safe sandbox (so far). The current code actually implements caching already so that not every unchanged code example has to be compiled online.
The dlang-tour currently runs in a Docker container itself because it makes deployment later on very easy. So together with some sandboxing mechanism for compiling it should be able to scale quite well depending on future usage.
The question is just whether it's better to use the existing DPaste infrastructure or to implement something especially for the tour?
|
January 25, 2016 Re: Pre-alpha D language online tour | ||||
---|---|---|---|---|
| ||||
Posted in reply to André | 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. > > [...] Looks promising. You should rename it D-tours so that you can take advantage of D's underused, but excellent, pun making potential :o) Then you need to include some graphics: http://www.roadtrafficsigns.com/detour-signs |
January 25, 2016 Re: Pre-alpha D language online tour | ||||
---|---|---|---|---|
| ||||
Posted in reply to André | 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 |
January 25, 2016 Re: Pre-alpha D language online tour | ||||
---|---|---|---|---|
| ||||
Posted in reply to André | 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é I should do this myself, but since I can't access my Github account ATM and will likely forget. The page: http://dlang-tour.steinsoft.net/tour/basics/1 The line: "An import statement mustn't appear at the top ... " Should read: "An import statement need not appear at the top ... " |
Copyright © 1999-2021 by the D Language Foundation