Many documentation examples can now be run online
Timothee Cour via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Mon Dec 19 22:16:23 PST 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 at 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:
>>
>>> 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!
>>>
>>>
>>> Andrei
>>>
>>
>> I would like to add that this is in an experimental/testing stage and
>> hopefully will get stable with the next release ;-)
>>
>
> When all tests pass, would be better if it said that, rather than "No
> output," which it says now.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-announce/attachments/20161219/e46c7d82/attachment.html>
More information about the Digitalmars-d-announce
mailing list