Greetings.
I would like to finish Phobos runnable examples case. But I need
help in picking one strategy for implementation details.
Current state of things is rather bad.
Apart from the fact that lots of examples are not valid examples
per se
(first example in std.algorithm:
---
in
On 2013-03-27 22:54, nazriel wrote:
Requesting user to edit code first, add main(){} block or fix invalid D
code and then run example itself is unacceptable.
RDMD already has a --main flag and DMD will soon too.
--
/Jacob Carlborg
I think it's too fragile to require examples inside docs to be
runnable. A better way would be to expose those examples in the code
(ie outside of comments). That way, they'll be guaranteed to have
correct syntax, be properly syntax highlighted, and stay in sync with
code.
here's a simple possibil
On 03/27/2013 04:54 PM, nazriel wrote:
[snip]
The options I've gathered so far:
1) Make all examples valid D code by hand. Make JavaScript assume that
all code examples in Phobos documentation should be wrapped in void
main() {} blocks. Add default set of includes + the module we are on.
Explicit
On 03/28/2013 07:18 AM, Jacob Carlborg wrote:
On 2013-03-27 22:54, nazriel wrote:
Requesting user to edit code first, add main(){} block or fix invalid D
code and then run example itself is unacceptable.
RDMD already has a --main flag and DMD will soon too.
Yes, DMD trunk already does that
On 03/28/2013 07:46 AM, Timothee Cour wrote:
I think it's too fragile to require examples inside docs to be
runnable. A better way would be to expose those examples in the code
(ie outside of comments). That way, they'll be guaranteed to have
correct syntax, be properly syntax highlighted, and st
On 03/28/2013 09:53 AM, 1100110 wrote:
I'll work on 1. and see if we can't come up with something better!
The code snippets are pretty much necessary IMO. They just need to be
fixed.
int[] a = ...;
static bool greater(int a, int b)
{
return a > b;
}
sort!(greater)(a); // predicate a
On 03/28/2013 12:09 PM, nazriel wrote:
On 03/28/2013 09:53 AM, 1100110 wrote:
I'll work on 1. and see if we can't come up with something better!
The code snippets are pretty much necessary IMO. They just need to be
fixed.
int[] a = ...;
static bool greater(int a, int b)
{
return a > b;
}
Am Wed, 27 Mar 2013 22:54:21 +0100
schrieb "nazriel" :
> Greetings.
>
> I would like to finish Phobos runnable examples case. But I need
> help in picking one strategy for implementation details.
>
With the recent unittest-as-example changes I'd say make runnable
examples work with those and p
On Thu, Mar 28, 2013 at 07:25:07PM +0100, Johannes Pfau wrote:
> Am Wed, 27 Mar 2013 22:54:21 +0100
> schrieb "nazriel" :
>
> > Greetings.
> >
> > I would like to finish Phobos runnable examples case. But I need
> > help in picking one strategy for implementation details.
> >
>
> With the rece
On 03/28/2013 01:25 PM, Johannes Pfau wrote:
> Greetings.
>
> I would like to finish Phobos runnable examples case. But I need
> help in picking one strategy for implementation details.
>
Good point, I forgot about that.
On 3/27/13 5:54 PM, nazriel wrote:
Greetings.
I would like to finish Phobos runnable examples case. But I need help in
picking one strategy for implementation details.
Current state of things is rather bad.
Apart from the fact that lots of examples are not valid examples per se
(first example
12 matches
Mail list logo