digitalmars.D.announce - Many documentation examples can now be run online
- Andrei Alexandrescu (11/11) Dec 19 2016 Take a look e.g. at
- Seb (4/12) Dec 19 2016 I would like to add that this is in an experimental/testing stage
- Joakim (3/19) Dec 19 2016 When all tests pass, would be better if it said that, rather than
- Timothee Cour via Digitalmars-d-announce (13/37) Dec 19 2016 is it properly sandboxed / hacking proof?
- Seb (4/16) Dec 19 2016 It uses DPaste (https://dpaste.dzfl.pl/) as backend - in fact I
- Seb (2/4) Dec 19 2016 Excellent idea -> https://github.com/dlang/dlang.org/pull/1527 :)
- =?UTF-8?B?Tm9yZGzDtnc=?= (2/4) Dec 20 2016 Great work, Seb!
- Mark (2/18) Dec 23 2016 Awesome.
- Jakub Szewczyk (5/13) Dec 19 2016 It looks great, but I think that the source code should not be
- Picaud Vincent (3/6) Dec 19 2016 +1
- Soulsbane (2/9) Dec 19 2016 +1 also.
- Seb (4/18) Dec 19 2016 Thanks a lot for your feedback! This will hopefully soon be
- Johan Engelen (12/13) Dec 23 2016 Nice. It's pretty awesome!
- Seb (3/17) Dec 23 2016 Hehe, that's already in the queue:
- Saurabh Das (11/34) Dec 23 2016 This is really wonderful. An excellent feature for new users –
- safety0ff (5/8) Dec 23 2016 I agree the button placement should be improved, I think they
- safety0ff (4/8) Dec 23 2016 I didn't see that there could be text between the "Examples:"
- Seb (9/21) Dec 23 2016 Sure - that should be fairly trivial.
- Saurabh Das (4/17) Dec 25 2016 I was using dpaste as an example. Any website which there's a D
- unDEFER (1/1) Dec 19 2016 Excellent work, thank you!
- =?UTF-8?B?Tm9yZGzDtnc=?= (3/5) Dec 20 2016 Nice!
Take a look e.g. at https://dlang.org/phobos-prerelease/std_algorithm_iteration.html. Examples now have "Edit" and "Run" buttons that allow you to play with them online and see what they output. Changes for the ddox version forthcoming. Related: https://github.com/dlang/dlang.org/pull/1297, https://issues.dlang.org/show_bug.cgi?id=16984, https://issues.dlang.org/show_bug.cgi?id=16985. Many thanks to Sebastian Wilzbach who took this to completion, and to Damian Ziemba for working on the online compiler code! Andrei
Dec 19 2016
On Monday, 19 December 2016 at 17:44:29 UTC, Andrei Alexandrescu wrote:Take a look e.g. at https://dlang.org/phobos-prerelease/std_algorithm_iteration.html. Examples now have "Edit" and "Run" buttons that allow you to play with them online and see what they output. Changes for the ddox version forthcoming. Related: https://github.com/dlang/dlang.org/pull/1297, https://issues.dlang.org/show_bug.cgi?id=16984, https://issues.dlang.org/show_bug.cgi?id=16985. Many thanks to Sebastian Wilzbach who took this to completion, and to Damian Ziemba for working on the online compiler code! AndreiI would like to add that this is in an experimental/testing stage and hopefully will get stable with the next release ;-)
Dec 19 2016
On Monday, 19 December 2016 at 17:50:17 UTC, Seb wrote:On Monday, 19 December 2016 at 17:44:29 UTC, Andrei Alexandrescu wrote:When all tests pass, would be better if it said that, rather than "No output," which it says now.Take a look e.g. at https://dlang.org/phobos-prerelease/std_algorithm_iteration.html. Examples now have "Edit" and "Run" buttons that allow you to play with them online and see what they output. Changes for the ddox version forthcoming. Related: https://github.com/dlang/dlang.org/pull/1297, https://issues.dlang.org/show_bug.cgi?id=16984, https://issues.dlang.org/show_bug.cgi?id=16985. Many thanks to Sebastian Wilzbach who took this to completion, and to Damian Ziemba for working on the online compiler code! AndreiI would like to add that this is in an experimental/testing stage and hopefully will get stable with the next release ;-)
Dec 19 2016
is it properly sandboxed / hacking proof? quick tests: ``` import std.process; auto msg="sleep 10"; executeShell(msg).output.writeln; ``` correctly results in `Application output (9: Killed)` "ls -al .." => permission denied "ls /usr/bin/ld" => -rwxr-xr-x 2 0 0 834648 Jan 3 2013 /usr/bin/ld "ps -auwx" => ... On Mon, Dec 19, 2016 at 6:25 PM, Joakim via Digitalmars-d-announce < digitalmars-d-announce puremagic.com> wrote:On Monday, 19 December 2016 at 17:50:17 UTC, Seb wrote:On Monday, 19 December 2016 at 17:44:29 UTC, Andrei Alexandrescu wrote:When all tests pass, would be better if it said that, rather than "No output," which it says now.Take a look e.g. at https://dlang.org/phobos-prere lease/std_algorithm_iteration.html. Examples now have "Edit" and "Run" buttons that allow you to play with them online and see what they output. Changes for the ddox version forthcoming. Related: https://github.com/dlang/dlang.org/pull/1297, https://issues.dlang.org/show_bug.cgi?id=16984, https://issues.dlang.org/show_bug.cgi?id=16985. Many thanks to Sebastian Wilzbach who took this to completion, and to Damian Ziemba for working on the online compiler code! AndreiI would like to add that this is in an experimental/testing stage and hopefully will get stable with the next release ;-)
Dec 19 2016
On Tuesday, 20 December 2016 at 06:16:23 UTC, Timothee Cour wrote:is it properly sandboxed / hacking proof? quick tests: ``` import std.process; auto msg="sleep 10"; executeShell(msg).output.writeln; ``` correctly results in `Application output (9: Killed)` "ls -al .." => permission denied "ls /usr/bin/ld" => -rwxr-xr-x 2 0 0 834648 Jan 3 2013 /usr/bin/ld "ps -auwx" => ...It uses DPaste (https://dpaste.dzfl.pl/) as backend - in fact I tried to re-use most of the code for the example snippet on dlang.org
Dec 19 2016
On Tuesday, 20 December 2016 at 02:25:06 UTC, Joakim wrote:When all tests pass, would be better if it said that, rather than "No output," which it says now.Excellent idea -> https://github.com/dlang/dlang.org/pull/1527 :)
Dec 19 2016
On Monday, 19 December 2016 at 17:50:17 UTC, Seb wrote:I would like to add that this is in an experimental/testing stage and hopefully will get stable with the next release ;-)Great work, Seb!
Dec 20 2016
On Monday, 19 December 2016 at 17:50:17 UTC, Seb wrote:On Monday, 19 December 2016 at 17:44:29 UTC, Andrei Alexandrescu wrote:Awesome.Take a look e.g. at https://dlang.org/phobos-prerelease/std_algorithm_iteration.html. Examples now have "Edit" and "Run" buttons that allow you to play with them online and see what they output. Changes for the ddox version forthcoming. Related: https://github.com/dlang/dlang.org/pull/1297, https://issues.dlang.org/show_bug.cgi?id=16984, https://issues.dlang.org/show_bug.cgi?id=16985. Many thanks to Sebastian Wilzbach who took this to completion, and to Damian Ziemba for working on the online compiler code! AndreiI would like to add that this is in an experimental/testing stage and hopefully will get stable with the next release ;-)
Dec 23 2016
On Monday, 19 December 2016 at 17:44:29 UTC, Andrei Alexandrescu wrote:Take a look e.g. at https://dlang.org/phobos-prerelease/std_algorithm_iteration.html. Examples now have "Edit" and "Run" buttons that allow you to play with them online and see what they output. Changes for the ddox version forthcoming. Related: https://github.com/dlang/dlang.org/pull/1297, https://issues.dlang.org/show_bug.cgi?id=16984, https://issues.dlang.org/show_bug.cgi?id=16985. Many thanks to Sebastian Wilzbach who took this to completion, and to Damian Ziemba for working on the online compiler code! AndreiIt looks great, but I think that the source code should not be hidden when pressing the Run button, instead the application output box should appear above/below the source code :-)
Dec 19 2016
On Monday, 19 December 2016 at 18:54:56 UTC, Jakub Szewczyk wrote:It looks great, but I think that the source code should not be hidden when pressing the Run button, instead the application output box should appear above/below the source code :-)+1 Otherwise that is great!
Dec 19 2016
On Monday, 19 December 2016 at 19:11:26 UTC, Picaud Vincent wrote:On Monday, 19 December 2016 at 18:54:56 UTC, Jakub Szewczyk wrote:+1 also.It looks great, but I think that the source code should not be hidden when pressing the Run button, instead the application output box should appear above/below the source code :-)+1 Otherwise that is great!
Dec 19 2016
On Tuesday, 20 December 2016 at 01:34:30 UTC, Soulsbane wrote:On Monday, 19 December 2016 at 19:11:26 UTC, Picaud Vincent wrote:Thanks a lot for your feedback! This will hopefully soon be online: https://github.com/dlang/dlang.org/pull/1527On Monday, 19 December 2016 at 18:54:56 UTC, Jakub Szewczyk wrote:+1 also.It looks great, but I think that the source code should not be hidden when pressing the Run button, instead the application output box should appear above/below the source code :-)+1 Otherwise that is great!
Dec 19 2016
On Tuesday, 20 December 2016 at 07:04:38 UTC, Seb wrote:https://github.com/dlang/dlang.org/pull/1527Nice. It's pretty awesome! When clicking the "edit" button, a new box appears with the example's code in it but editable. Then when clicking "run", the editted code disappears (it's saved for future use, pfew!). How about this: when clicking _either_ "edit" or "run", the non-editable code box disappears, and the edittable code box appears and stays there forever. (also, the height of the editable-code-box is too small; should fit the whole example's code?) cheers, Johan
Dec 23 2016
On Friday, 23 December 2016 at 23:52:48 UTC, Johan Engelen wrote:On Tuesday, 20 December 2016 at 07:04:38 UTC, Seb wrote:Hehe, that's already in the queue: https://github.com/dlang/dlang.org/pull/1529https://github.com/dlang/dlang.org/pull/1527Nice. It's pretty awesome! When clicking the "edit" button, a new box appears with the example's code in it but editable. Then when clicking "run", the editted code disappears (it's saved for future use, pfew!). How about this: when clicking _either_ "edit" or "run", the non-editable code box disappears, and the edittable code box appears and stays there forever. (also, the height of the editable-code-box is too small; should fit the whole example's code?) cheers, Johan
Dec 23 2016
On Saturday, 24 December 2016 at 00:04:54 UTC, Seb wrote:On Friday, 23 December 2016 at 23:52:48 UTC, Johan Engelen wrote:This is really wonderful. An excellent feature for new users – lowers the cost of "just try it out". Feedback: 1. It will be aesthetically better if the edit/run buttons are inside the code box, say just inside the right top corner. 2. Could we add a "open in an external website/new window" icon/button (for example: http://findicons.com/files/icons/2315/default_icon/256/open_in_new_window.png ) to open the example in say a dpaste window or an equivalent playground. Thanks, SaurabhOn Tuesday, 20 December 2016 at 07:04:38 UTC, Seb wrote:Hehe, that's already in the queue: https://github.com/dlang/dlang.org/pull/1529https://github.com/dlang/dlang.org/pull/1527Nice. It's pretty awesome! When clicking the "edit" button, a new box appears with the example's code in it but editable. Then when clicking "run", the editted code disappears (it's saved for future use, pfew!). How about this: when clicking _either_ "edit" or "run", the non-editable code box disappears, and the edittable code box appears and stays there forever. (also, the height of the editable-code-box is too small; should fit the whole example's code?) cheers, Johan
Dec 23 2016
On Saturday, 24 December 2016 at 06:08:49 UTC, Saurabh Das wrote:Feedback: 1. It will be aesthetically better if the edit/run buttons are inside the code box, say just inside the right top corner.I agree the button placement should be improved, I think they should be immediately to the right of "Examples:" e.g. "Examples: [Edit][Run]" Which makes it more clear that the examples can be run & edited.
Dec 23 2016
On Saturday, 24 December 2016 at 06:15:16 UTC, safety0ff wrote:I agree the button placement should be improved, I think they should be immediately to the right of "Examples:" e.g. "Examples: [Edit][Run]" Which makes it more clear that the examples can be run & edited.I didn't see that there could be text between the "Examples:" line and the code box. Anyways, I agree with the feedback that the buttons off to the right is difficult to notice.
Dec 23 2016
On Saturday, 24 December 2016 at 06:08:49 UTC, Saurabh Das wrote:On Saturday, 24 December 2016 at 00:04:54 UTC, Seb wrote:Thanks for your feedback :)Hehe, that's already in the queue: https://github.com/dlang/dlang.org/pull/1529This is really wonderful. An excellent feature for new users – lowers the cost of "just try it out". Feedback:1. It will be aesthetically better if the edit/run buttons are inside the code box, say just inside the right top corner.Sure - that should be fairly trivial.2. Could we add a "open in an external website/new window" icon/button (for example: http://findicons.com/files/icons/2315/default_icon/256/open_in_new_window.png ) to open the example in say a dpaste window or an equivalent playground.Yes, that would be pretty nice to have. Unfortunately the maintainer of DPaste has been quite unresponsive in the past, so it's not possible with DPaste (e.g. we would need a simple POST API which returns a URL). If someone is planning to reboot sth. like DPaste (e.g. with DUB support, fast caches, ...), please let us know!
Dec 23 2016
On Saturday, 24 December 2016 at 06:55:37 UTC, Seb wrote:On Saturday, 24 December 2016 at 06:08:49 UTC, Saurabh Das wrote:I was using dpaste as an example. Any website which there's a D playground would work. Infact are there any other that anyone is aware of?[...]Thanks for your feedback :)[...]Sure - that should be fairly trivial.[...]Yes, that would be pretty nice to have. Unfortunately the maintainer of DPaste has been quite unresponsive in the past, so it's not possible with DPaste (e.g. we would need a simple POST API which returns a URL). If someone is planning to reboot sth. like DPaste (e.g. with DUB support, fast caches, ...), please let us know!
Dec 25 2016
On Monday, 19 December 2016 at 17:44:29 UTC, Andrei Alexandrescu wrote:Take a look e.g. at https://dlang.org/phobos-prerelease/std_algorithm_iteration.html. Examples now have "Edit" and "Run" buttons that allow you to play with them online and see what they output. Changes for the ddox version forthcoming.Nice!
Dec 20 2016