www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - New (page-per-artifact) standard library doc examples are now

reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
Following https://github.com/dlang/dlang.org/pull/1532, the new-style 
docs now also allow editing and running examples. Start at 
http://dlang.org/library-prerelease/ and go anywhere to check it out.

Thanks are due to Sönke Ludwig and Sebastian Wilzbach!


Andrei
Jan 07
parent reply Martin Nowak <code+news.digitalmars dawg.eu> writes:
On 01/07/2017 05:12 PM, Andrei Alexandrescu wrote:
 Following https://github.com/dlang/dlang.org/pull/1532, the new-style
 docs now also allow editing and running examples. Start at
 http://dlang.org/library-prerelease/ and go anywhere to check it out.
 
 Thanks are due to Sönke Ludwig and Sebastian Wilzbach!
Thanks, this is quite an amazing step towards more interactive documentation. Should we start to produce output as well, e.g. with some magic `writeln` that's silent in actual tests?
Jan 07
parent Seb <seb wilzba.ch> writes:
On Saturday, 7 January 2017 at 20:14:56 UTC, Martin Nowak wrote:
 On 01/07/2017 05:12 PM, Andrei Alexandrescu wrote:
 Following https://github.com/dlang/dlang.org/pull/1532, the 
 new-style docs now also allow editing and running examples. 
 Start at http://dlang.org/library-prerelease/ and go anywhere 
 to check it out.
 
 Thanks are due to Sönke Ludwig and Sebastian Wilzbach!
Thanks, this is quite an amazing step towards more interactive documentation. Should we start to produce output as well, e.g. with some magic `writeln` that's silent in actual tests?
There's already some simple support for this in the ddoc pages, e.g. the pattern `assert(a == b);` is automatically rewritten to `writeln(a); // b` https://dlang.org/phobos-prerelease/std_algorithm_searching.html#.minElement However as ddox produces a different output, it doesn't work at the moment with the ddox build. I made a PR: https://github.com/dlang/dlang.org/pull/1551 Of course help to make this smarter is welcome ;-)
Jan 07