Suggestion: New D front page

2011-01-29 Thread Christopher Bergqvist
Hi!

I have been putting some free time into creating a "design skeleton" for a
new http://d-programming-language.org
front
page:
http://digitalpoetry.se/D%20website/D%20overview%20design.png

My main concern is presenting newcomers with an inspiring and relevant first
impression of D. I think there is lots to gain by having a more alive front
page not based on Ddoc (the rest of the site could still be based on it).

I have not attempted adding any visual style to the design myself since its
not one of my strengths. It should be made to fit better with the overall
theme of d-programming-language.org (although IMO it's currently a bit too
dark and foreboding).

I must confess to being heavily inspired by http://ooc-lang.org and
http://cobra-language.com.

As creating this would take a significant time investment, I suggest that
some more complex sections of the page could be released after the initial
version. I have some background in web development but have been almost
exclusively doing professional C++ games development during the last 4
years. I would not mind putting some more work into this but am also hopeful
that some others in the D community desire to contribute.

Constructive feedback with a minimum of bikeshedding is welcome.
(Please avoid discussions about specific textual content for now, its just
placeholders).

Cheers,
Chris


Re: Suggestion: New D front page

2011-01-29 Thread bearophile
Christopher Bergqvist:

> http://digitalpoetry.se/D%20website/D%20overview%20design.png

It's nice and better than the current design. Some suggestions:
- "Start downlading." Shorten this with "Download ..."
- Edit button on the top right: remove it, and use an edit window, so you are 
already in edit mode. I'd like https://mozillalabs.com/skywriter/ editing 
subwindow here.
- "Get Started" and "D Zen" swap them on the page.

See you,
bearophile


Re: Suggestion: New D front page

2011-01-29 Thread Tomek Sowiński
Christopher Bergqvist napisał:

> Hi!
> 
> I have been putting some free time into creating a "design skeleton" for a
> new http://d-programming-language.org
> front
> page:
> http://digitalpoetry.se/D%20website/D%20overview%20design.png
> 
> My main concern is presenting newcomers with an inspiring and relevant first
> impression of D. I think there is lots to gain by having a more alive front
> page not based on Ddoc (the rest of the site could still be based on it).
> 
> I have not attempted adding any visual style to the design myself since its
> not one of my strengths. It should be made to fit better with the overall
> theme of d-programming-language.org (although IMO it's currently a bit too
> dark and foreboding).
> 
> I must confess to being heavily inspired by http://ooc-lang.org and
> http://cobra-language.com.
> 
> As creating this would take a significant time investment, I suggest that
> some more complex sections of the page could be released after the initial
> version. I have some background in web development but have been almost
> exclusively doing professional C++ games development during the last 4
> years. I would not mind putting some more work into this but am also hopeful
> that some others in the D community desire to contribute.
> 
> Constructive feedback with a minimum of bikeshedding is welcome.
> (Please avoid discussions about specific textual content for now, its just
> placeholders).

Believe it or not but there was a time when the D page welcomed users with 
beautiful exemplary code, but as time went by it got pushed off by quotes, 
current status, news, etc. Looking back, it may have been the reason why I 
didn't say "oh.. um.. NEXT!" and stayed with D :)

I think we need to go back to the roots.

-- 
Tomek



Re: Suggestion: New D front page

2011-01-29 Thread Bernard Helyer
I like it. D's web presence needs work all-round.


Re: Suggestion: New D front page

2011-01-29 Thread Robert Clipsham

On 29/01/11 12:56, Christopher Bergqvist wrote:

Hi!

I have been putting some free time into creating a "design skeleton" for
a new http://d-programming-language.org
 front page:
http://digitalpoetry.se/D%20website/D%20overview%20design.png

My main concern is presenting newcomers with an inspiring and relevant
first impression of D. I think there is lots to gain by having a more
alive front page not based on Ddoc (the rest of the site could still be
based on it).

I have not attempted adding any visual style to the design myself since
its not one of my strengths. It should be made to fit better with the
overall theme of d-programming-language.org
 (although IMO it's currently a bit
too dark and foreboding).

I must confess to being heavily inspired by http://ooc-lang.org
 and http://cobra-language.com
.

As creating this would take a significant time investment, I suggest
that some more complex sections of the page could be released after the
initial version. I have some background in web development but have been
almost exclusively doing professional C++ games development during the
last 4 years. I would not mind putting some more work into this but am
also hopeful that some others in the D community desire to contribute.

Constructive feedback with a minimum of bikeshedding is welcome.
(Please avoid discussions about specific textual content for now, its
just placeholders).

Cheers,
Chris


I like it! Definitely a few tweaks needed to it, that page is far more 
welcoming than anything D has currently though.


--
Robert
http://octarineparrot.com/


Re: Suggestion: New D front page

2011-01-29 Thread spir

On 01/29/2011 01:56 PM, Christopher Bergqvist wrote:

Hi!

I have been putting some free time into creating a "design skeleton" for a
new http://d-programming-language.org
front
page:
http://digitalpoetry.se/D%20website/D%20overview%20design.png

My main concern is presenting newcomers with an inspiring and relevant first
impression of D. I think there is lots to gain by having a more alive front
page not based on Ddoc (the rest of the site could still be based on it).

I have not attempted adding any visual style to the design myself since its
not one of my strengths. It should be made to fit better with the overall
theme of d-programming-language.org (although IMO it's currently a bit too
dark and foreboding).

I must confess to being heavily inspired by http://ooc-lang.org and
http://cobra-language.com.

As creating this would take a significant time investment, I suggest that
some more complex sections of the page could be released after the initial
version. I have some background in web development but have been almost
exclusively doing professional C++ games development during the last 4
years. I would not mind putting some more work into this but am also hopeful
that some others in the D community desire to contribute.

Constructive feedback with a minimum of bikeshedding is welcome.
(Please avoid discussions about specific textual content for now, its just
placeholders).


A great improvement!

Still needs some talk about the welcome page structure, content, & organisation.
Maybe a short paragraph on top about the language itself: what it wants (not) 
to be.
All more specific info should be placed on dedicated pages pointed from there 
--including announcements & commits: that is not what newcomers /first/ wish to 
find; for others, it's only one click away. Pointers to presentation, 
introduction, tutorials, should be in good, obvious, place; inside "Get 
Started" probably. Pointers to language & library refs should also be present 
for advanced programmers or language designers wishing a more technical 
description.
+++ for code sample, "Zen of D" (complementary to short paragraph evoked 
above), & "Featured Projects".


I'd see:


 D prog lang
-- motto

... short presentation paragraph ...

--- ---  ---
| code sample|  Zen of D   |
--- ---  ---

---  ---
|Get Started   |
---  ---

--- ---  ---
| pointers   | Feat. Projects  |
--- ---  ---

  logos
   legal thing


May not be so "squarely" laid out ;-)

Then only, discuss about actual contents and style.

Denis
--
_
vita es estrany
spir.wikidot.com



Re: Suggestion: New D front page

2011-01-29 Thread David Gileadi

On 1/29/11 5:56 AM, Christopher Bergqvist wrote:

Hi!

I have been putting some free time into creating a "design skeleton" for
a new http://d-programming-language.org
 front page:
http://digitalpoetry.se/D%20website/D%20overview%20design.png

My main concern is presenting newcomers with an inspiring and relevant
first impression of D. I think there is lots to gain by having a more
alive front page not based on Ddoc (the rest of the site could still be
based on it).

I have not attempted adding any visual style to the design myself since
its not one of my strengths. It should be made to fit better with the
overall theme of d-programming-language.org
 (although IMO it's currently a bit
too dark and foreboding).

I must confess to being heavily inspired by http://ooc-lang.org
 and http://cobra-language.com
.

As creating this would take a significant time investment, I suggest
that some more complex sections of the page could be released after the
initial version. I have some background in web development but have been
almost exclusively doing professional C++ games development during the
last 4 years. I would not mind putting some more work into this but am
also hopeful that some others in the D community desire to contribute.

Constructive feedback with a minimum of bikeshedding is welcome.
(Please avoid discussions about specific textual content for now, its
just placeholders).

Cheers,
Chris


I like it.  As the guy responsible for the rather "dark and foreboding" 
current look and feel of the current d-programming-language.org I'd be 
happy to work to make this fit the current look and feel as well as 
alter the look and feel to match this direction.  It is very much in 
line with ideas I've had for improving the welcome page.


I'm currently a web dev guy and wouldn't mind contributing time to help 
develop the necessary code.  Andrei or others, if you like this 
direction could you let us know what web technologies/languages your 
server supports?


Re: Suggestion: New D front page

2011-01-29 Thread spir

On 01/29/2011 04:04 PM, David Gileadi wrote:

I like it.  As the guy responsible for the rather "dark and foreboding" current
look and feel of the current d-programming-language.org I'd be happy to work to
make this fit the current look and feel as well as alter the look and feel to
match this direction.  It is very much in line with ideas I've had for
improving the welcome page.


I wish you would avoid white backgrounds (hurt eyes). Since probably many are 
not fan of light-on-dark, pastel bg colors do the job nicely. (Then, it's a 
question of taste... ;-)


Denis
--
_
vita es estrany
spir.wikidot.com



Re: Suggestion: New D front page

2011-01-29 Thread Andrei Alexandrescu

On 1/29/11 9:04 AM, David Gileadi wrote:

I'm currently a web dev guy and wouldn't mind contributing time to help
develop the necessary code. Andrei or others, if you like this direction
could you let us know what web technologies/languages your server supports?


I like David's design, but it isn't much more than a tasteful rework of 
the previous one. The design proposed by Chris blew my mind. More than 
the nice example I like the dynamism - various components are pulled off 
dynamically, which makes revisiting worthwhile.


I'm in charge of d-programming-language.org, which will (when ready) 
become the default landing page of D. However, it's served off Walter's 
server. When I want some functionality (such as rsync recently), I ask 
Walter, who relays the request to the server owner (Jan Knepper), who 
deploys it. So I'm not sure what technologies are available, but Walter 
and Jan should be able to respond.


This is very exciting!


Andrei


Re: Suggestion: New D front page

2011-01-29 Thread Russel Winder
On Sat, 2011-01-29 at 08:04 -0700, David Gileadi wrote:
[ . . . ]
> I like it.  As the guy responsible for the rather "dark and foreboding" 
> current look and feel of the current d-programming-language.org I'd be 

I think the current page style looks fine, actually I like it and do not
consider it "dark and foreboding" (*).  This is not though a vote for
not changing if there is something that is going to be more appealing to
a wider range of programmers.

(*) Or maybe I am just depressed and it fits with the sense of doom and
despondency ;-)

-- 
Russel.
=
Dr Russel Winder  t: +44 20 7585 2200   voip: sip:russel.win...@ekiga.net
41 Buckmaster Roadm: +44 7770 465 077   xmpp: rus...@russel.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder


signature.asc
Description: This is a digitally signed message part


Re: Suggestion: New D front page

2011-01-29 Thread Russel Winder
On Sat, 2011-01-29 at 16:14 +0100, spir wrote:
[ . . . ]
> I wish you would avoid white backgrounds (hurt eyes). Since probably many are 
> not fan of light-on-dark, pastel bg colors do the job nicely. (Then, it's a 
> question of taste... ;-)

I absolutely abhor high contrast websites, i.e. ones with white
backgrounds, (take note Google) and navigate away from them as soon as
possible, or even immediately.  I much prefer muted medium contrast
websites.  It is not just taste, though that is much of it, it is also
an issue of some people having vision issues.

-- 
Russel.
=
Dr Russel Winder  t: +44 20 7585 2200   voip: sip:russel.win...@ekiga.net
41 Buckmaster Roadm: +44 7770 465 077   xmpp: rus...@russel.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder


signature.asc
Description: This is a digitally signed message part


Re: Suggestion: New D front page

2011-01-29 Thread Adam D. Ruppe
> Andrei or others, if you like this
> direction could you let us know what web technologies/languages
> your server supports?

If you have native binary cgi support, it could run D!

I started writing this site in D (imo this newsgroup has too much
talk and too little action as a general rule).

http://arsdnet.net/d-web-site/

You can view it's source here:

http://arsdnet.net/d-web-site/site.d

And the HTML (with inline CSS) here:

http://arsdnet.net/d-web-site/index.html

All the helper modules it uses are available here:

http://arsdnet.net/d-web-site/arsd/


Re: Suggestion: New D front page

2011-01-29 Thread Tomek Sowiński
Russel Winder napisał:

> I think the current page style looks fine, actually I like it and do not
> consider it "dark and foreboding" (*).  This is not though a vote for
> not changing if there is something that is going to be more appealing to
> a wider range of programmers.
> 
> (*) Or maybe I am just depressed and it fits with the sense of doom and
> despondency ;-)

You're not depressed, just subconsciously keen on prolonging your eye-sight ;-)

Let's blend Chris' dynamic layout with David's toned color scheme, shall we?

-- 
Tomek



Re: Suggestion: New D front page

2011-01-29 Thread Adam D. Ruppe
I wrote:
> I started writing this site in D
> http://arsdnet.net/d-web-site/

I continued with this a little more, and I'm starting to like it
now.

I added a relative time thing to the commits, for example,
"1 day ago on druntime". This way, a visitor can tell at-a-glance
that D is actively developed.

My compile and run thing works. I probably won't keep it
for security reasons, but it does some cool things like
support cgi output, (some) third party libraries, and demangled
error output.

The code that auto-fills could be a rotation of small example
programs, or it might have some little tabs above it (or something)
to load up a bunch of examples on demand.



Anyone have ideas on how to best implement the announcements
and featured projects thing? I figure the featured projects
could be a manually maintained list, from which it picks some
at random to show. Announcements seems like the best would be
to pull recent thread titles off the announce newsgroup, but
I don't know how to make that actually happen.


Re: Suggestion: New D front page

2011-01-29 Thread bearophile
Adam D. Ruppe, quoting:
> > I started writing this site in D
> > http://arsdnet.net/d-web-site/

- The vertical alignment of the "D" and "language" are not right.
- For the "Compile and run" button a "Run" button is enough, on the right. It 
may use the ideone API, but it uses an old D2 compiler...
- The Hello World in D is ugly. It's an unnecessary huge program. People want 
to see very little programs that do a lot, not very large programs that do 
nearly nothing. So I suggest to replace it with something much better.
- I suggest to align the line of links that's at the top on the right. And I 
suggest to replace the large | signs between them with something shorter, like 
a simple | char.
- I suggest to swap the place of "Getting started" and "Zen of D". Or maybe to 
swap "Getting started" and the little Run code window.
- I suggest to replace the phrases written in the D zen with a more correct D 
Zen. D is not Higher level C, and the unfinished implementation for dotnet 
shows that no all D implementations will be native, and so on.

Bye,
bearophile


Re: Suggestion: New D front page

2011-01-29 Thread Adam D. Ruppe
bearophile:
> - The vertical alignment of the "D" and "language" are not right.

hahaha, you sound like the designers I work with. I just spent
a minute tweaking, though details like that can easily be
changed later.

I'm implementing the announcement reader now. I'm tempted
to just write a full replacement for that awful web news program
while I'm at it too!

> It may use the ideone API, but it uses an old D2 compiler...

I think we need more control than it offers, to stay up-to-date
and maybe offer other little fixes (like I did here).

It would probably be best to set up a dedicated VM or something
somewhere that's expendable so if security is compromised, it
doesn't hurt anything.

> The Hello World in D is ugly. It's an unnecessary huge program.
> [snip other content ideas]

All content is placeholders, like in the OP's image:

http://digitalpoetry.se/D%20website/D%20overview%20design.png


I changed the program though because I wanted to test my
sandbox environment with something a little more interesting
than hello world :) I like pretty pictures.


I agree with you that it could use some tweaks, but I
don't have any opinion on the specifics.


Re: Suggestion: New D front page

2011-01-29 Thread bearophile
Adam D. Ruppe:

> hahaha, you sound like the designers I work with. I just spent
> a minute tweaking, though details like that can easily be
> changed later.

You are right, I am silly, sorry. Regarding the Commits section, in this design 
they are very public, on the front page, so their text needs to be good enough 
:-)

Bye,
bearophile


Re: Suggestion: New D front page

2011-01-29 Thread Andrei Alexandrescu

On 01/29/2011 02:14 PM, Adam D. Ruppe wrote:

I wrote:

I started writing this site in D
http://arsdnet.net/d-web-site/


I continued with this a little more, and I'm starting to like it
now.


I love how errors propagate from D to HTML, just like from PHP. Here's 
what I just got:






std.exception.ErrnoException@std/stdio.d(423): Could not close file 
`news.digitalmars.com:119' (Illegal seek)


/var/www/htdocs/d-web-site/site(bool std.exception.errnoEnforce!(bool, 
"std/stdio.d"a, 423).errnoEnforce(bool, lazy immutable(char)[])) [0x80ca459]

/var/www/htdocs/d-web-site/site(void std.stdio.File.close()) [0x80c9453]
/var/www/htdocs/d-web-site/site(void std.stdio.File.__dtor()) [0x80c91db]
/var/www/htdocs/d-web-site/site(site[] site.getAnnouncements()) [0x8097796]
/var/www/htdocs/d-web-site/site(_D4site16addAnnouncementsFC4arsd3dom7ElementZv+0x17) 
[0x809639b]
/var/www/htdocs/d-web-site/site(_D4site4siteFC4arsd3cgi3CgiZv+0x91) 
[0x80964d5]

/var/www/htdocs/d-web-site/site(_Dmain+0x2c) [0x8096560]
/var/www/htdocs/d-web-site/site(extern (C) int rt.dmain2.main(int, 
char**)) [0x80b8bb6]
/var/www/htdocs/d-web-site/site(extern (C) int rt.dmain2.main(int, 
char**)) [0x80b8b10]
/var/www/htdocs/d-web-site/site(extern (C) int rt.dmain2.main(int, 
char**)) [0x80b8bfa]
/var/www/htdocs/d-web-site/site(extern (C) int rt.dmain2.main(int, 
char**)) [0x80b8b10]

/var/www/htdocs/d-web-site/site(main+0x96) [0x80b8ab6]
/lib/libc.so.6(__libc_start_main+0xe6) [0xf75cab86]
/var/www/htdocs/d-web-site/site() [0x8095c41]
std.exception.ErrnoException@/home/me/d/dmd2/linux/bin/../../src/phobos/std/stdio.d(671): 
Could not flush file `news.digitalmars.com:119' (Illegal seek)


/var/www/htdocs/d-web-site/site(bool std.exception.errnoEnforce!(bool, 
"/home/me/d/dmd2/linux/bin/../../src/phobos/std/stdio.d"a, 
671).errnoEnforce(bool, lazy immutable(char)[])) [0x80a7613]
/var/www/htdocs/d-web-site/site(void 
std.stdio.File.writeln!(immutable(char)[]).writeln(immutable(char)[])) 
[0x80992aa]

/var/www/htdocs/d-web-site/site(site[] site.getAnnouncements()) [0x8097785]
/var/www/htdocs/d-web-site/site(_D4site16addAnnouncementsFC4arsd3dom7ElementZv+0x17) 
[0x809639b]
/var/www/htdocs/d-web-site/site(_D4site4siteFC4arsd3cgi3CgiZv+0x91) 
[0x80964d5]

/var/www/htdocs/d-web-site/site(_Dmain+0x2c) [0x8096560]
/var/www/htdocs/d-web-site/site(extern (C) int rt.dmain2.main(int, 
char**)) [0x80b8bb6]
/var/www/htdocs/d-web-site/site(extern (C) int rt.dmain2.main(int, 
char**)) [0x80b8b10]
/var/www/htdocs/d-web-site/site(extern (C) int rt.dmain2.main(int, 
char**)) [0x80b8bfa]
/var/www/htdocs/d-web-site/site(extern (C) int rt.dmain2.main(int, 
char**)) [0x80b8b10]

/var/www/htdocs/d-web-site/site(main+0x96) [0x80b8ab6]
/lib/libc.so.6(__libc_start_main+0xe6) [0xf75cab86]
/var/www/htdocs/d-web-site/site() [0x8095c41]
core.exception.AssertError@site.d(343): 230 New news follows
[110122 233017 GMT]

/var/www/htdocs/d-web-site/site(onAssertErrorMsg+0x34) [0x80ccaf4]
/var/www/htdocs/d-web-site/site(_d_assert_msg+0x18) [0x80b89a8]
/var/www/htdocs/d-web-site/site(site[] site.getAnnouncements()) [0x8097455]
/var/www/htdocs/d-web-site/site(_D4site16addAnnouncementsFC4arsd3dom7ElementZv+0x17) 
[0x809639b]
/var/www/htdocs/d-web-site/site(_D4site4siteFC4arsd3cgi3CgiZv+0x91) 
[0x80964d5]

/var/www/htdocs/d-web-site/site(_Dmain+0x2c) [0x8096560]
/var/www/htdocs/d-web-site/site(extern (C) int rt.dmain2.main(int, 
char**)) [0x80b8bb6]
/var/www/htdocs/d-web-site/site(extern (C) int rt.dmain2.main(int, 
char**)) [0x80b8b10]
/var/www/htdocs/d-web-site/site(extern (C) int rt.dmain2.main(int, 
char**)) [0x80b8bfa]
/var/www/htdocs/d-web-site/site(extern (C) int rt.dmain2.main(int, 
char**)) [0x80b8b10]

/var/www/htdocs/d-web-site/site(main+0x96) [0x80b8ab6]
/lib/libc.so.6(__libc_start_main+0xe6) [0xf75cab86]
/var/www/htdocs/d-web-site/site() [0x8095c41]

Cache-Control: private, no-cache="set-cookie" Expires: 0 Pragma: 
no-cache Content-Type: text/html; charset=utf-8



Andrei


Re: Suggestion: New D front page

2011-01-29 Thread Adam D. Ruppe
Andrei Alexandrescu wrote:
> I love how errors propagate from D to HTML, just like from PHP.

Yeah, a boring Internal Server Error would be hell to figure
out what's going on, so it outputs the exception.toString. It
can also be hooked to give a styled error screen too!


But that's an interesting exception (I'm in the middle of writing
a quick NNTP function to do the announcements). Looks like if there's
still data in the read buffer, std.stdio.File tries to skip past it,
but since this is a network stream, it can't.

I'm just flushing the buffer before returning from the function.


The site now loads again, now with automatic reading from
digitalmars.D.announce!


Re: Suggestion: New D front page

2011-01-29 Thread Brad Roberts
On 1/29/2011 3:50 PM, Adam D. Ruppe wrote:
> Andrei Alexandrescu wrote:
>> I love how errors propagate from D to HTML, just like from PHP.
> 
> Yeah, a boring Internal Server Error would be hell to figure
> out what's going on, so it outputs the exception.toString. It
> can also be hooked to give a styled error screen too!

Exposing those sorts of errors directly to users is easy and handy during the 
early stages, but really ought to just be
in the website logs.  Exceptions and other internal state leaks like that are 
both ugly and can potentially point to
exploitable security issues.

> The site now loads again, now with automatic reading from
> digitalmars.D.announce!

For a site with any traffic, placing load on a remote site like that is fairly 
rude.  I suggest re-thinking that design
before it causes problems.  A periodic cron job that caches the data locally 
would be a good alternative.

I realize this is a young project and it might not go anywhere, but it's 
usually easier to get off on the right foot
than scramble to fix things later.

My 2 cents,
Brad


Re: Suggestion: New D front page

2011-01-29 Thread Adam D. Ruppe
Here's a summary of what the code does:

The compile and run box in the upper left runs DMD through my
build.d program from last week (meaning you have access to
whatever modules are in my repository and it demangles output).

It also checks for programs outputting CGI protocol headers
and forwards it to the browser. The example program there now
uses this to output a PNG image to your browser.


Moving down to Announcements, it pulls the thread titles of the
five most newsgroup posts. It determines if a message is a thread
by checking headers.indexOf("References: ")... it isn't 100%
accurate though. Anyone know of a better way? I'm an NNTP noob.


The Commits pulls the most recent commits from DMD, druntime,
and Phobos, then sorts by date and displays the most recent
five. It beautifies the date... though my timezone code is
evidently buggy... so you can see at a glance how active things
are.


Featured Projects is currently static html. I'm open to suggestions
on how to automate that.


And currently, at the bottom of the site, below the header, is
a ddoc program output with syntax highlighting. There's a small
bit of javascript that scans the file for those and adds
an Edit button above it. If you click that, it puts it in a
textarea and lets you compile and run it through the same service
as used above.

That script can be added to any ddoc page to make its code
compilable.

It needs to move to an isolated system for an actual launch.


Re: Suggestion: New D front page

2011-01-29 Thread Adam D. Ruppe
Brad Roberts wrote:
> Exposing those sorts of errors directly to users is easy and handy
> during the early stages, but really ought to just be
> in the website logs.

Right, that's why you can move it to use only stderr (which
Apache automatically logs) with a simple recompile.

> For a site with any traffic, placing load on a remote site
> like that is fairly rude.

It doesn't check every time. It loads from a cache file,
but if the cache is outdated or not present, it checks the
news server to get new news.


if(cache exists && cache.age < nn)
return cache;
else
ask the server for new news since the time the cache was
last modified

write the new result to the cache


Re: Suggestion: New D front page

2011-01-29 Thread Brad Roberts
On 1/29/2011 4:11 PM, Adam D. Ruppe wrote:
> Brad Roberts wrote:
>> Exposing those sorts of errors directly to users is easy and handy
>> during the early stages, but really ought to just be
>> in the website logs.
> 
> Right, that's why you can move it to use only stderr (which
> Apache automatically logs) with a simple recompile.
> 
>> For a site with any traffic, placing load on a remote site
>> like that is fairly rude.
> 
> It doesn't check every time. It loads from a cache file,
> but if the cache is outdated or not present, it checks the
> news server to get new news.
> 
> 
> if(cache exists && cache.age < nn)
> return cache;
> else
> ask the server for new news since the time the cache was
> last modified
> 
> write the new result to the cache

Good answers.  I'd pull the updating out of the user stream into a separate job 
so that any delays or networking issues
don't impact the user experience.  But you've covered the bigger issue.

Sorry to harp on security issues, but what are you doing to protect yourself 
from those compile and run arbitrary code
boxes?  What happens if someone writes and executes the equivalent of "rm -rf 
/"?


Re: Suggestion: New D front page

2011-01-29 Thread Adam D. Ruppe
> Sorry to harp on security issues, but what are you doing to protect
> yourself from those compile and run arbitrary code
> boxes?

It runs a separate process which is suid'd to a single purpose
restricted user that only has access to one directory and a
number of ulimits in force. So they could in theory write evil
things, but the operating system won't let it gain much ground.

I'm currently setting up a separate virtual machine on a different
domain to handle that, so even if they broke it, the system
is completely expendable anyway.

Problems with this would be if someone wanted to set up a network
spammer or a CPU eater. Perhaps a cron job that loops around
killing processes would help with that.


I need to think about it some more. Redirecting the user to
ideone might end up being the best solution (or dropping the
feature) but I want to shoot for something higher first.


Re: Suggestion: New D front page

2011-01-29 Thread Adam D. Ruppe
Brad Roberts wrote:
> I'd pull the updating out of the user stream into a separate job
> so that any delays or networking issues don't impact the user
> experience.

I moved it to a background process (spawned and killed on demand,
simple one line change in the source).

I dislike cron jobs since they run even if you don't need them
and need special setup (editing the crontab or whatever). A
cache updater and a background process gets the job done just
as well without those downsides.


But, it occurs to me that this entire website could be on a
cron job, updated once or twice a day, if we move the platform
detection to the client side.

It's not like the content is truely dynamic per visit or different
for various people (even if it had random code samples or projects,
that could be updated infrequently and still be good enough).

It just periodically updates its content - exactly what a cron
job putting out plain HTML would do. That might be the way to go.
It fits in with the rest of the site being basic html too, so
Walter might prefer it.


Re: Suggestion: New D front page

2011-01-29 Thread Nick Sabalausky
"Russel Winder"  wrote in message 
news:mailman.1036.1296316027.4748.digitalmar...@puremagic.com...
>
>I absolutely abhor high contrast websites, i.e. ones with white
>backgrounds, (take note Google) and navigate away from them as soon as
>possible, or even immediately.  I much prefer muted medium contrast
>websites.  It is not just taste, though that is much of it, it is also
>an issue of some people having vision issues.

Or an issue of people having their monitor's brightness/contrast cranked up 
too high? ;)  Not that I'm disagreeing with you, though.




Re: Suggestion: New D front page

2011-01-30 Thread Christopher Bergqvist
bearophile:
- Thank you for making me aware of skywriter/Ace. I am all for using
that as long as it doesn't incur significantly longer load-times for
the page.
- My opinion is that "D Zen" is something newcomers are interested in
reading before delving any further into download & videos.

Denis:
- I was thinking that the "D Zen" section should serve to introduce
the language, so maybe it could be changed to include your paragraph,
or maybe we should remove the motto and have your paragraph instead to
keep it less crowded.
- Announcements & commits are mainly there to show that the language
is in fact very much alive.
- I was thinking that the links at the top would be used by recurring
users to get to library refs etc without scrolling. Maybe they could
be mouse-over drop down menus to keep the page less crowded but at the
same time reduce the number of page-jumps. Drop downs could be hard to
get to behave though.

David Gileadi:
Thank you for the support! It's becoming more apparent to me that the
darker look is appreciated by a part of the audience (Russel, Tomek
etc), so I understand the current design.

Andrei:
I'm happy that you like the direction!

Adam D. Ruppe:
- The idea of building the page in D itself seemed like wishful
thinking to me. Your rapid progress is jaw-dropping! I did not know
that there already existed such powerful web libraries for D, good
job! Sandboxing would be the main issue of using such a powerful
language as I see it, so running the compiler in a VM seems like a
good step.
- I like the idea of rotating code samples, but I think a "More
examples"-link to get to a page or set of pages dedicated to examples
would be better than tabs.


Since Walter's word is one of the heaviest around here, I wonder what
his thoughts are on this?


Re: Suggestion: New D front page

2011-01-30 Thread Lutger Blijdestijn
Adam D.  Ruppe wrote:

>> Sorry to harp on security issues, but what are you doing to protect
>> yourself from those compile and run arbitrary code
>> boxes?
> 
> It runs a separate process which is suid'd to a single purpose
> restricted user that only has access to one directory and a
> number of ulimits in force. So they could in theory write evil
> things, but the operating system won't let it gain much ground.
> 
> I'm currently setting up a separate virtual machine on a different
> domain to handle that, so even if they broke it, the system
> is completely expendable anyway.
> 
> Problems with this would be if someone wanted to set up a network
> spammer or a CPU eater. Perhaps a cron job that loops around
> killing processes would help with that.
> 
> 
> I need to think about it some more. Redirecting the user to
> ideone might end up being the best solution (or dropping the
> feature) but I want to shoot for something higher first.

ideone also has an api you can use, instead of just redirecting


Re: Suggestion: New D front page

2011-01-30 Thread Adam Ruppe
I have the code runner back up now. I tweaked the ulimits,
moved it all to a restricted and firewalled VM, and put it
on a separate domain (so if someone abuses the cgi passthrough,
they can't really do too much there either)

http://arsdnet.net/d-web-site/

Feel free to try to break it with arbitray code, on the
condition that if you do break it, tell me how you did it.


Another thing you might notice is the announcements and commits
are now clickable links. Commits lead to the github page about it.
Announcements lead to a little newsgroup/web interface I started
last night. (I *hate* the current web news, but we need something
usable for web links to posts.)

Of course, it caches everything too. It lazily loads archives
from the news server, but after it gets it once, it puts it in
a local mysql database for all future use. It's still a work
in progress. Already strips out bad content types and MIME
multipart messages as well as link threads together (from bottom
up, not from top down. To see it, paste a message-ID into the url
and you can walk the chain up).

Coming later is an index and posting capabilities.


It's source code is available here:
http://arsdnet.net/d-web-site/nntp.d

Helper modules are in this folder:
http://arsdnet.net/d-web-site/arsd/