dlang.org live examples

Kevin kevincox.ca at gmail.com
Mon Jun 25 07:55:43 PDT 2012


On 25/06/12 10:43, nazriel wrote:
> Hi!
>
> I am polishing up this stuff:
> http://dlang.dzfl.pl/
>
> It would allow to run examples from http://dlang.org directly in
> web-browser.
> Something like http://dpaste.dzfl.pl, but integrated with dlang
> website itself.
>
> I would like to ask you about your opinions and advises.
>
> There are couple things I can't make my mind on.
>
> First, should standard input and command line arguments be constant
> defined in hidden html fields, or should we allow user to pick their own?
> It would allow for more freedom and experience but on other-hand it
> would bloat too much website. Whats your opinion?
>
> Another thing are examples itself. As you may noticed I modified some
> of em too give some experience in browser, for example, I've added
> writeln blocks in Power section.
> What should we do with 'em? Examples to run properly requires main
> functions, and loads of examples doesn't have them. Should we adjust
> those examples or leave them alone? Another thing are examples that
> doesn't return or display anything.
> Like assert(foo !is null); examples. Should we make them throw, add
> some writelns or leave them alone?
>
> I would love to hear your opinion on those.
>
>
> Best regards,
> Damian 'nazriel' Ziemba
What I am picturing is having the code samples just like we do now with
a little "Try It!" button in the corner.  When you click it it pops up a
full version with all of the necessary wrapping and lets you run it and
mess around.   For the stdin I would have a little pane that can slide
out.  This might be a little more javascript than you were imagining but
I could help you with that if you want.

This way you keep it pretty while providing a full-featured
environment.  Also, have you considered using the ideone api to save
yourself all of the security issues or is there something wrong with
what they provide?

I don't think that people are going to run every sample and this is why
I think it is better to hide most of the features and I don't think
people will mind the small delay that another tab or javascript window
takes to open.

Kevin


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 230 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120625/4c632017/attachment.pgp>


More information about the Digitalmars-d mailing list