Re: Website message overhaul, pass 2

2011-11-28 Thread Caligo
BTW, something is wrong with the class section of the language reference:
http://d-programming-language.org/new/class.html

It's been like that for months.


Re: Website message overhaul, pass 2

2011-11-28 Thread Jacob Carlborg

On 2011-11-29 08:40, Caligo wrote:

BTW, something is wrong with the class section of the language
reference: http://d-programming-language.org/new/class.html

It's been like that for months.


There's a pull request available but it hasn't been merged.

--
/Jacob Carlborg


Re: Website message overhaul, pass 2

2011-11-25 Thread Jerry
Andrei Alexandrescu seewebsiteforem...@erdani.org writes:

 On 11/20/11 7:09 AM, Robert Clipsham wrote:
 - The code sample at the top is terrible, the equivalent C is only a
 couple of lines longer and it doesn't show off any of what makes D
 better! Admittedly you're limited in what you can do here as the code
 needs to be fairly understandable by non-D programmers, but what's there
 is... Not good at all.

 I'd be curious how with only a couple of lines more you address in C
 lines of arbitrary length and proper error handling. Same goes about
 C++ (in addition to the speed issue) - code that does the right thing
 and is not very slow is quite subtle and I doubt two out of five C++
 programmers know how to write it.

I had one minor thought on the average line length code example.  If you
eliminate the initialization of lines and sumLength, it would
demonstrate default initialization.  


 - Rotating the example is a brilliant idea, particularly if powered by a
 continuous contest.

 Yah, looking forward to that. It's going to be interesting.

 - This is less about the message, but how about an explain this link
 in the corner of examples with little hints for C/C++/Java programmers,
 so when clicked additional comments appear in the code or bubbles appear
 above on hover or something, they would include small bits of text like
 auto can be used in place of a type to infer the type from what is
 being assigned... But better worded of course.

 Good idea.

What do you think about offering equivalent code from other languages?
Not necessarily all language for any given example, but if there are
enough equivalents from enough other languages, it might more directly
highlight the strengths of D for newbies with those backgrounds.

So in this case a perl comparison wouldn't be illuminating but a C++ one
would.  If all the various paradigms that D supports get illustrated
that way it might give a broader feeling for how D will make things
easier on many fronts.

Jerry


Re: Website message overhaul, pass 2

2011-11-24 Thread Martin Nowak
On Sun, 20 Nov 2011 09:40:09 +0100, Andrei Alexandrescu  
seewebsiteforem...@erdani.org wrote:


Thanks to all who provided feedback! I read again the entire thread,  
then made one more pass:


http://d-programming-language.org/new/

I didn't make technical/aesthetic changes (JS/noJS, placement of news,  
links to secondary pages etc) so when providing additional feedback  
please focus on the core message.


There are significant changes of content: some keywords are different,  
text is shorter, no more community section (probably it'll go on a  
different page).


There's a prominent example at the top. I'm thinking to rotate that  
randomly, and pick examples out of an always-running contest.



Thanks,

Andrei


The css appears to be broken for
http://d-programming-language.org/class.html
as well as
http://d-programming-language.org/new/class.html
using Opera 11.52.

martin


Re: Website message overhaul, pass 2

2011-11-23 Thread Andrej Mitrovic
Please, *please* don't make the website narrow like this:
http://www.d-programming-language.org/new/phobos/std_algorithm.html

This is only necessary for that twitter thing on the /new page, but
don't make the entire website narrow because of that single page.


Re: Website message overhaul, pass 2

2011-11-23 Thread Jonathan M Davis
On Wednesday, November 23, 2011 18:23:11 Andrej Mitrovic wrote:
 Please, *please* don't make the website narrow like this:
 http://www.d-programming-language.org/new/phobos/std_algorithm.html
 
 This is only necessary for that twitter thing on the /new page, but
 don't make the entire website narrow because of that single page.

Yeah. That's pretty bad. I'd have expected the site to vary its width
depending on your browser window, not force itself to an insanely
narrow width.

- Jonathan M Davis


Re: Website message overhaul, pass 2

2011-11-23 Thread Andrei Alexandrescu

On 11/23/11 11:23 AM, Andrej Mitrovic wrote:

Please, *please* don't make the website narrow like this:
http://www.d-programming-language.org/new/phobos/std_algorithm.html

This is only necessary for that twitter thing on the /new page, but
don't make the entire website narrow because of that single page.


Ah, yah. Fixed. Thanks!

Andrei


Re: Website message overhaul, pass 2

2011-11-23 Thread Andrei Alexandrescu

On 11/21/11 11:56 AM, Robert Clipsham wrote:

Something that's just annoyed me thoroughly now you've done this (though
it didn't before for some reason) - my eyes have to look all over the
place to see everything on the screen. Please use something like:

body {
max-width: 1300px;
margin: 0px auto;
}

This won't be noticeable for smaller screens, but on larger screens it
makes the page a lot more readable.


I decided to undo this artificial limitation. Sorry.

Andrei


Re: Website message overhaul, pass 2

2011-11-23 Thread Andrei Alexandrescu

On 11/23/11 11:40 AM, Andrei Alexandrescu wrote:

On 11/23/11 11:23 AM, Andrej Mitrovic wrote:

Please, *please* don't make the website narrow like this:
http://www.d-programming-language.org/new/phobos/std_algorithm.html

This is only necessary for that twitter thing on the /new page, but
don't make the entire website narrow because of that single page.


Ah, yah. Fixed. Thanks!

Andrei


I also made the slogan H2 instead of H1.

Andrei


Re: Website message overhaul, pass 2

2011-11-23 Thread Jimmy Cao
2011/11/23 Andrei Alexandrescu seewebsiteforem...@erdani.org

 On 11/23/11 11:40 AM, Andrei Alexandrescu wrote:

 On 11/23/11 11:23 AM, Andrej Mitrovic wrote:

 Please, *please* don't make the website narrow like this:
 http://www.d-programming-**language.org/new/phobos/std_**algorithm.htmlhttp://www.d-programming-language.org/new/phobos/std_algorithm.html

 This is only necessary for that twitter thing on the /new page, but
 don't make the entire website narrow because of that single page.


 Ah, yah. Fixed. Thanks!

 Andrei


 I also made the slogan H2 instead of H1.


You should also put a colon (to make it grammatically correct).


Re: Website message overhaul, pass 2

2011-11-23 Thread RivenTheMage

http://d-programming-language.org/new/


There is an error, I believe: scope statements link should point to 
#ScopeGuardStatement, not #ScopeBlockStatement.


Re: Website message overhaul, pass 2

2011-11-23 Thread Andrej Mitrovic
Thanks for the quick fix Andrei. :-)


Re: Website message overhaul, pass 2

2011-11-23 Thread Dmitry Olshansky

On 20.11.2011 18:17, Peter Alexander wrote:

On 20/11/11 1:09 PM, Robert Clipsham wrote:

- The code sample at the top is terrible, the equivalent C is only a
couple of lines longer and it doesn't show off any of what makes D
better! Admittedly you're limited in what you can do here as the code
needs to be fairly understandable by non-D programmers, but what's there
is... Not good at all.


It's hard to come up with something that is short, easily-understandable
and demonstrates D's (numerous) powerful features.

How about this one:

// Match email addresses on each line of standard input
// using a compile-time generated regular expression engine.
import std.stdio, std.regex;

void main() {
string email = r\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b;


Well, soon you'd get CTFE and compile-time goodies...
Then just swap it with:
auto email = ctRegex!(r\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b,i);
just keep in mind that it's fairly new and experimental stuff.


foreach (line; stdin.byLine()) {
foreach (m; match(line, email))) {
writefln(%s[%s]%s, m.pre, m.hit, m.post);
}
}
}

Demonstrates:
- Syntax
- Imports
- Raw string literals
- Foreach with type deduction
- CTFE with regex
- Batteries included library (std.byLine(), regex, match, writefln)
- General succinctness of D code


- Rotating the example is a brilliant idea, particularly if powered by a
continuous contest.
- This is less about the message, but how about an explain this link
in the corner of examples with little hints for C/C++/Java programmers,
so when clicked additional comments appear in the code or bubbles appear
above on hover or something, they would include small bits of text like
auto can be used in place of a type to infer the type from what is
being assigned... But better worded of course.
- Maybe it's just me, but I don't like the title being so long. I think
The D Programming Language on its own is fine. The rest of it may
still have a place, but it needs to be elsewhere in my opinion (even if
it just moves to the line below).
- Your summary sentence at the start reads It pragmatically combines
efficiency, control, and modeling power, with safety and programmer
productivity. You then go on to talk about convinience, power and
efficiency... http://en.wikipedia.org/wiki/Topic_sentence The sentence
needs to be changed to reflect what you go on to detail below -
currently you're making statements without backing them up (note that
you do back up most of it, not all of it though, and the subheadings
don't make it obvious where you can find out more about the claims).
- convinience - convenience
- I can't really fault the bullet points, they're a huge improvement.
- I have a reasonably large screen and can't see the news section
without scrolling. To me this means there is no news ;)

I'm starting to nit-pick, it must be getting better.


+1 to everything


Back to topic, I'm also pleased with the recent improvements.

--
Dmitry Olshansky


Re: Website message overhaul, pass 2

2011-11-23 Thread Andrei Alexandrescu

On 11/23/11 1:17 PM, RivenTheMage wrote:

http://d-programming-language.org/new/


There is an error, I believe: scope statements link should point to
#ScopeGuardStatement, not #ScopeBlockStatement.


Fixed. Thanks!

Andrei


Re: Website message overhaul, pass 2

2011-11-22 Thread David Gileadi

On 11/20/11 11:00 PM, Brad Roberts wrote:

Second, if the 'comment on this page' link is going to continue to receive 
similar placement, there really needs to be
continuous effort to actually incorporate the comments.  Many, if not all, of 
the sites pages have comments over in the
wiki, many of which are bug reports.  It's essentially a black hole through 
which feedback disappears forever.  Should
that link be turned into a bugzilla link instead, maybe?


I had planned this when I first worked on the site redesign.  I did some 
work on implementing it via Javascript and this could work if there were 
a service on the dpl.org site that scrapes the HTML from the wiki.


Of course the larger question is whether we want user comments to appear 
on every page.  I tend to think that a bugzilla link may be more 
appropriate, with an appropriate link text change.


Re: Website message overhaul, pass 2

2011-11-22 Thread Brad Anderson
On Sun, Nov 20, 2011 at 1:40 AM, Andrei Alexandrescu 
seewebsiteforem...@erdani.org wrote:

 Thanks to all who provided feedback! I read again the entire thread, then
 made one more pass:

 http://d-programming-language.**org/new/http://d-programming-language.org/new/

 I didn't make technical/aesthetic changes (JS/noJS, placement of news,
 links to secondary pages etc) so when providing additional feedback please
 focus on the core message.

 There are significant changes of content: some keywords are different,
 text is shorter, no more community section (probably it'll go on a
 different page).

 There's a prominent example at the top. I'm thinking to rotate that
 randomly, and pick examples out of an always-running contest.


 Thanks,

 Andrei


Solid improvements.

In the first example shouldn't:
auto x = min(arr[0], table[two]);
be:
auto x = min(arr[0], dictionary[two]);

Regards,
Brad Anderson


Re: Website message overhaul, pass 2

2011-11-22 Thread Andrei Alexandrescu

On 11/22/11 11:16 AM, Brad Anderson wrote:

Solid improvements.

In the first example shouldn't:
 auto x = min(arr[0], table[two]);
be:
 auto x = min(arr[0], dictionary[two]);


Fixed. Also added [your code here] at the end of the top example. Try it!

Andrei


Re: Website message overhaul, pass 2

2011-11-21 Thread tn
Andrei Alexandrescu Wrote:

 On 11/20/11 2:40 AM, Andrei Alexandrescu wrote:
  Thanks to all who provided feedback! I read again the entire thread,
  then made one more pass:
 
  http://d-programming-language.org/new/
 
 I made one more pass and improved the homepage in a number of ways. 
 (Learned about div more than I ever wanted to know...)

The page starts to look good. But the title (The D programming language. 
Modern convenience. Modeling power. Native efficiency.) is too long and hard 
to read. I would shorten it to something like The D programming language - 
Convenience, Power, Efficiency or even The D programming language.


Re: Website message overhaul, pass 2

2011-11-21 Thread Derek

On Mon, 21 Nov 2011 19:02:39 +1100, tn n...@email.com wrote:

The page starts to look good. But the title (The D programming  
language. Modern convenience. Modeling power. Native efficiency.) is  
too long and hard to read. I would shorten it to something like The D  
programming language - Convenience, Power, Efficiency or even The D  
programming language.


Yes!

--
Derek Parnell
Melbourne, Australia


Re: Website message overhaul, pass 2

2011-11-21 Thread Peter Alexander

On 21/11/11 8:23 AM, Derek wrote:

On Mon, 21 Nov 2011 19:02:39 +1100, tn n...@email.com wrote:


The page starts to look good. But the title (The D programming
language. Modern convenience. Modeling power. Native efficiency.) is
too long and hard to read. I would shorten it to something like The D
programming language - Convenience, Power, Efficiency or even The D
programming language.


Yes!


Agree.

It also splits over a line for me, which is kind of ugly for a title.




Re: Website message overhaul, pass 2

2011-11-21 Thread Don

On 20.11.2011 09:40, Andrei Alexandrescu wrote:

Thanks to all who provided feedback! I read again the entire thread,
then made one more pass:

http://d-programming-language.org/new/

I didn't make technical/aesthetic changes (JS/noJS, placement of news,
links to secondary pages etc) so when providing additional feedback
please focus on the core message.

There are significant changes of content: some keywords are different,
text is shorter, no more community section (probably it'll go on a
different page).

There's a prominent example at the top. I'm thinking to rotate that
randomly, and pick examples out of an always-running contest.


Thanks,

Andrei


First, a comment. I like the word control in the first line. Along 
with pragmatic it's IMHO one of the key themes of D.

If asked for a slogan for D, I'd say, Regain control with D.

Consider replacing the power title with control. Everybody claims 
power, far fewers languages claim control.


The best paradigm is to not impose one at the expense of others
I think the underlying idea, is that each paradigm is good for solving 
particular kinds of problems, but poor for others. I'm not quite sure 
how to word this, something like, The best programming paradigm depends 
on the problem domain, or No single paradigm is optimal for all 
problem domains.


As others said, the word naturally here is a bit funny:
D compiles naturally to efficient native code.
How about:
D compiles directly to efficient native code.


Re: Website message overhaul

2011-11-21 Thread Nick Sabalausky
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message 
news:jabtgj$2jua$1...@digitalmars.com...
 On 11/20/11 2:55 PM, Nick Sabalausky wrote:
 Andrei Alexandrescuseewebsiteforem...@erdani.org  wrote in message
 news:jabkq4$1nu6$1...@digitalmars.com...
 On 11/20/11 4:43 AM, Andrea Fontana wrote:
 I see that http://www.digitalmars.com/d/ redirect to
 http://www.d-programming-language.org/ using a meta http-equiv=refresh.

 You should redirect using a http 301 headers to transfer google ranking
 to new domain..

 Andrea

 Request forwarded.


 Hah! I see what you did there... ;)

 Telling the truth is what I did. I don't have access to the the config 
 files and .htaccess use is disabled, so I sent the request to the site 
 admin.


Guess the irony wasn't deliberate then: http 301...request 
forwarded...although HTTP more commonly uses the term redirected, but 
it's a similar thing. 




Re: Website message overhaul, pass 2

2011-11-21 Thread Robert Clipsham

On 21/11/2011 00:13, Jonathan M Davis wrote:

On Sunday, November 20, 2011 23:47:42 Robert Clipsham wrote:

On 20/11/2011 21:49, Vladimir Panteleev wrote:

The D Programming Language: Modern Convenience, Modeling Power, Native
Efficiency


I'm not sure about the capitalization


Too many capitals!

The D Programming Language: Modern convenience, modeling power, native
efficiency.

The - Start of a sentence
D Programming Language - a noun.
Modern - comes after a colon.


I completly disagree. It's the title. You're _supposed_ to capitalize there.
It looks just plain wrong to not capitalize those words. If it were in a
sentence, that would be one thing, but titles follow different rules of
capitalization.

- Jonathan M Davis


It's a title?! Oh yeah, scrap then, capitalise it all.

--
Robert
http://octarineparrot.com/


Re: Website message overhaul, pass 2

2011-11-21 Thread Matt Soucy

On 11/20/2011 03:40 AM, Andrei Alexandrescu wrote:

Thanks to all who provided feedback! I read again the entire thread,
then made one more pass:

http://d-programming-language.org/new/

I didn't make technical/aesthetic changes (JS/noJS, placement of news,
links to secondary pages etc) so when providing additional feedback
please focus on the core message.

There are significant changes of content: some keywords are different,
text is shorter, no more community section (probably it'll go on a
different page).

There's a prominent example at the top. I'm thinking to rotate that
randomly, and pick examples out of an always-running contest.


Thanks,

Andrei
It looks pretty good in my opinion - just one tiny problem: the first 
sample code should use dictionary[two] instead of table[two] on line 
8, so that it would actually compile. Other than that nitpick, and the 
fact that the download page is still on digitalmars.com, it looks great!


Re: Website message overhaul, pass 2

2011-11-21 Thread Robert Clipsham

On 21/11/2011 05:31, Andrei Alexandrescu wrote:

On 11/20/11 2:40 AM, Andrei Alexandrescu wrote:

Thanks to all who provided feedback! I read again the entire thread,
then made one more pass:

http://d-programming-language.org/new/


I made one more pass and improved the homepage in a number of ways.
(Learned about div more than I ever wanted to know...)

* The news column is now on the right.


Something that's just annoyed me thoroughly now you've done this (though 
it didn't before for some reason) - my eyes have to look all over the 
place to see everything on the screen. Please use something like:


body {
max-width: 1300px;
margin: 0px auto;
}

This won't be noticeable for smaller screens, but on larger screens it 
makes the page a lot more readable.



* Border is thinner

* The page behaves better when shrinking laterally


On my laptop's screen (1280x800, not the smallest) the title doesn't fit 
on one line. Titles should not be so long!



* Footer is better integrated

* Copyright text is smaller


Andrei



--
Robert
http://octarineparrot.com/


Re: Website message overhaul, pass 2

2011-11-21 Thread Andrei Alexandrescu

On 11/21/11 11:56 AM, Robert Clipsham wrote:

On 21/11/2011 05:31, Andrei Alexandrescu wrote:

On 11/20/11 2:40 AM, Andrei Alexandrescu wrote:

Thanks to all who provided feedback! I read again the entire thread,
then made one more pass:

http://d-programming-language.org/new/


I made one more pass and improved the homepage in a number of ways.
(Learned about div more than I ever wanted to know...)

* The news column is now on the right.


Something that's just annoyed me thoroughly now you've done this (though
it didn't before for some reason) - my eyes have to look all over the
place to see everything on the screen. Please use something like:

body {
max-width: 1300px;
margin: 0px auto;
}


Set it to 1600px.


This won't be noticeable for smaller screens, but on larger screens it
makes the page a lot more readable.


* Border is thinner

* The page behaves better when shrinking laterally


On my laptop's screen (1280x800, not the smallest) the title doesn't fit
on one line. Titles should not be so long!


It's not a title.


Andrei


Re: Website message overhaul, pass 2

2011-11-21 Thread Jonathan M Davis
On Monday, November 21, 2011 12:33:19 Andrei Alexandrescu wrote:
 On 11/21/11 11:56 AM, Robert Clipsham wrote:
  On my laptop's screen (1280x800, not the smallest) the title doesn't fit
  on one line. Titles should not be so long!
 
 It's not a title.

Then what is it? It's sure not a sentence, and it's at the top of the page.

- Jonathan M Davis


Re: Website message overhaul, pass 2

2011-11-21 Thread Andrei Alexandrescu

On 11/21/11 12:50 PM, Jonathan M Davis wrote:

On Monday, November 21, 2011 12:33:19 Andrei Alexandrescu wrote:

On 11/21/11 11:56 AM, Robert Clipsham wrote:

On my laptop's screen (1280x800, not the smallest) the title doesn't fit
on one line. Titles should not be so long!


It's not a title.


Then what is it? It's sure not a sentence, and it's at the top of the page.

- Jonathan M Davis


Section header.

Andrei


Re: Website message overhaul, pass 2

2011-11-21 Thread Jimmy Cao
2011/11/21 Andrei Alexandrescu seewebsiteforem...@erdani.org

 On 11/21/11 12:50 PM, Jonathan M Davis wrote:

 On Monday, November 21, 2011 12:33:19 Andrei Alexandrescu wrote:

 On 11/21/11 11:56 AM, Robert Clipsham wrote:

 On my laptop's screen (1280x800, not the smallest) the title doesn't fit
 on one line. Titles should not be so long!


 It's not a title.


 Then what is it? It's sure not a sentence, and it's at the top of the
 page.

 - Jonathan M Davis


 Section header.


This is an urgent fix of utmost grammatical importance:

The D programming language. Modern convenience. Modeling power. Native
efficiency. -  The D Programming Language: Modern Convenience, Modeling
Power, and Native Efficiency

A dash in place of the colon would also work.  A section header is a title,
so capitalize accordingly.


Re: Website message overhaul, pass 2

2011-11-21 Thread Jonathan M Davis
On Monday, November 21, 2011 13:35:21 Jimmy Cao wrote:
 2011/11/21 Andrei Alexandrescu seewebsiteforem...@erdani.org
 
  On 11/21/11 12:50 PM, Jonathan M Davis wrote:
  On Monday, November 21, 2011 12:33:19 Andrei Alexandrescu wrote:
  On 11/21/11 11:56 AM, Robert Clipsham wrote:
  On my laptop's screen (1280x800, not the smallest) the title
  doesn't fit on one line. Titles should not be so long!
  
  It's not a title.
  
  Then what is it? It's sure not a sentence, and it's at the top of the
  page.
  
  - Jonathan M Davis
  
  Section header.
 
 This is an urgent fix of utmost grammatical importance:
 
 The D programming language. Modern convenience. Modeling power. Native
 efficiency. -  The D Programming Language: Modern Convenience, Modeling
 Power, and Native Efficiency
 
 A dash in place of the colon would also work.  A section header is a title,
 so capitalize accordingly.

1. It's odd to call the header on the top of the page something other than a 
title IMHO, but it's a matter of semantics, I suppose.

2. Regardless of that, I would argue that section headers _are_ titles and 
should follow the same rules with regards to capitalization.

Also, it should probably be a colon after The D Programming Language rather 
than a period. It makes more sense grammatically.

- Jonathan M Davis


Re: Website message overhaul, pass 2

2011-11-21 Thread Adam Richardson
On Mon, Nov 21, 2011 at 3:03 PM, Jonathan M Davis jmdavisp...@gmx.comwrote:

 On Monday, November 21, 2011 13:35:21 Jimmy Cao wrote:
  2011/11/21 Andrei Alexandrescu seewebsiteforem...@erdani.org
 
   On 11/21/11 12:50 PM, Jonathan M Davis wrote:
   On Monday, November 21, 2011 12:33:19 Andrei Alexandrescu wrote:
   On 11/21/11 11:56 AM, Robert Clipsham wrote:
   On my laptop's screen (1280x800, not the smallest) the title
   doesn't fit on one line. Titles should not be so long!
  
   It's not a title.
  
   Then what is it? It's sure not a sentence, and it's at the top of the
   page.
  
   - Jonathan M Davis
  
   Section header.
 
  This is an urgent fix of utmost grammatical importance:
 
  The D programming language. Modern convenience. Modeling power. Native
  efficiency. -  The D Programming Language: Modern Convenience, Modeling
  Power, and Native Efficiency
 
  A dash in place of the colon would also work.  A section header is a
 title,
  so capitalize accordingly.

 1. It's odd to call the header on the top of the page something other than
 a
 title IMHO, but it's a matter of semantics, I suppose.

 2. Regardless of that, I would argue that section headers _are_ titles and
 should follow the same rules with regards to capitalization.

 Also, it should probably be a colon after The D Programming Language
 rather
 than a period. It makes more sense grammatically.

 - Jonathan M Davis


Insisting that titles be capitalized to match typical print publication
conventions is rather old school in terms of web development, and D is
anything but old school :) Rather, the style guide for the site should be
implemented consistently site-wide, and the capitalization scheme (which
CAN require rules such as those outlined by the *The Chicago Manual of Style
*, but, again, does not have to) should be addressed in the style guide:

http://styleguide.yahoo.com/editing/treat-abbreviations-capitalization-and-titles-consistently/capitalization

Styling depends on *what something is* and *where it is *in the flow of the
page. A heading in an aside might be styled in sentence case as opposed to
the same content appearing within the main header tag of a page, which
might be title case. As long as the D website consistently follows the
style choices laid out for the site, all will be well :)

That said, the main header could benefit from the colon as pointed out by
others, and the tagline could be improved. Steve Krug provides some great,
quick insights on what makes a great tagline:
http://www.amazon.com/Dont-Make-Me-Think-Usability/dp/0321344758

Adam


Re: Website message overhaul

2011-11-20 Thread Andrei Alexandrescu

On 11/15/11 12:57 PM, so wrote:

Contrary to some (not surprisingly), i *really* like golang.org.

It is simply precise.

No twitter or facebook bs in the front page.
I am guessing this is because they are rivals but still.


To me it looks like the connection dropped and the page hasn't loaded. 
The button Community is not aligned, but instead oddly centered below 
the others. The Quick Links aligns with the upper edge of the code 
frame, which is jarring because that frame also has textual title (which 
would be more natural to align other text with).


I understand that the site tries its best to be simple, but it has 
unrelated issues. I don't think it's an example to follow.



Andrei


Re: Website message overhaul

2011-11-20 Thread Jude Young
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 11/20/2011 01:41 AM, Gour wrote:
 On Sun, 20 Nov 2011 00:18:49 -0600 Jude Young 10equa...@gmail.com
 wrote:
 
 It would help if you would give me a few libraries that you
 'know' would be useful,and that people would like to have.
 
 For now I'd like to have complete sqlite3 bindings with possibly 
 higher-level D-ish API and/or general DB-API covering the 
 MySQl/PostgreSQL/Sqlite trio.

I believe that this is being worked on, check the archives.
https://github.com/bioinfornatics/DSQLite/blob/master/examples/test_sql.d
is what I found with a little searching.

I don't know how far along that is though...
 
 Another sensitive area are GUI bindings: Qtd is practically
 stalled, while gtkD is one-man-show (as I'm told on #gtkd
 yesterday).

You're right, GUI is definitely important.
And with that, my plate is officially overflowing.
 
 
 What is the recommended tool to provide higher-level D bindings
 for C-libs?

Not sure that there is one.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOyLV9AAoJENcHIWLyQiSlcyMH/jOxzzx+/ReW6D3sR0+shN4O
4Wg2KNW8+40SOi+hPs4HUwZQauGVyAg6NX4hU1ruDp2WVTSIyaE40k72ECm+pLpN
RKfcRdnyar9hmUvSUPVQ3IpE8wfiN2OXBJEewKzxmTlGkKC0gfBNFfrCOzb/wgfA
rbvilG/S0PmTtDmJ5iKyu0wPGtVRWq5dYXEhNM81HfP0T9S1T4yt5MXinGgsS5oS
78f7PJ414t/HdCKajEYmSS22Q/Sd8+Azduk+Vl/cGUxhyo9QXvwQWSF29oWKX2N4
RfcuIpg/F8qQPfAEXfP5E8/yHRMwz8ORhUaMMPZhVa5VHsVWamRQb9BmYhlK7yQ=
=NZtR
-END PGP SIGNATURE-


Re: Website message overhaul

2011-11-20 Thread Paulo Pinto

Am 19.11.2011 21:49, schrieb Timon Gehr:




The fact that Nicks example works has no implications for the GC
implementation because the two types involved in his reinterpret-casting
don't have any indirections.

Furthermore:

int* a =...;
int b = cast(int)a;
int* c = cast(int*)b;
// assert(a == c); // not guaranteed!

The language allows the GC to move around heap data.
What kind of GC would be impossible to implement?


I am by no means a GC expert, but I was under the impression that D
could only make use of conservative GC because of the casting tricks.

What if Nick's example had inner pointers?

align(1) struct Foo
{
int x, y;
ubyte r, g, b, a;
char[16] ident;
uint[100] data;
Foo* next;
}


Is the GC smart enough to know that Foo.next will contain garbage after
the assignment with cast?  What about when I later assign a valid value 
to it?


Website message overhaul, pass 2

2011-11-20 Thread Andrei Alexandrescu
Thanks to all who provided feedback! I read again the entire thread, 
then made one more pass:


http://d-programming-language.org/new/

I didn't make technical/aesthetic changes (JS/noJS, placement of news, 
links to secondary pages etc) so when providing additional feedback 
please focus on the core message.


There are significant changes of content: some keywords are different, 
text is shorter, no more community section (probably it'll go on a 
different page).


There's a prominent example at the top. I'm thinking to rotate that 
randomly, and pick examples out of an always-running contest.



Thanks,

Andrei


Re: Website message overhaul

2011-11-20 Thread Paulo Pinto

Am 19.11.2011 21:22, schrieb Nick Sabalausky:


Well, the vast majority of the time I come across a slow, bloated app, it's
from a VM or otherwise dymanic language. The vast majority of the time I
come across a lean, zippy app, it's from something like C/C++/D/etc.
Whatever the exact reasons, the former group of langauges tends to lean
towards inefficient approaches, and the latter group tends to lean towards
more efficient approaches. (I try to avoid calling the things like
C#/Ruby/Java/etc high-level, since I consider D to be just as high-level, if
not more - it's just that D is *also* more low-level, too)


Sure you are right, but that is because most developers nowadays don't 
learn properly how to code.


In my line of work, one of the reasons why we make static analysis tools
part of the build process is to force developers to code properly.

Sometimes I ask myself what some of our developers were doing at the 
university.





Also, in my own personal experience coding, even just a quick-n-dirty
approach in C, C++ or D tends to be *noticably* more efficient than putting
forth the same amount of effort in something like C# or Java. With the
VM-ish stuff, I've always found you need to put forth more effort to get
comparable efficiency.


As for C,C++, D usually you get faster results quicker that's for sure, 
but you can also do that in other languages, specially if native code 
compilers are available to it. But you are right that some more effort 
might be required, depending on the algorithm in case.


Haskell is a good example. It can run as fast as C in most cases, but 
you need to aproach your problem with a completely different mindset.




Interesting point. Although, it is a balancing act: From what I hear, JVM is
considered to have a top-notch GC (no doubt due in part to it's lack of
low-level ability), but I bet you'd be hard-pressed to get our
reinterpret-cast-Foo example or codecs/filter/rasterizers/etc (assuming you
actually wanted to ;)) to run as fast in Java as in D.



That is the reason I tend to favour polyglot programming. As a possible 
example, I would rather write the majority of the application in Java 
and leave the codec implemented in C, while calling it via JNI.


This is how we code most applications in my line of work.

Anyway, this was the reason I was against referrin to C# in the language 
slogan. If you start comparing against other languages, in the eyes of 
the receiver you already lost, most time.


Surely you need to compare, but that comes afterwards after the person
has got some interest to find more about the language.


Re: Website message overhaul, pass 2

2011-11-20 Thread Jonathan M Davis
On Sunday, November 20, 2011 02:40:09 Andrei Alexandrescu wrote:
 Thanks to all who provided feedback! I read again the entire thread,
 then made one more pass:
 
 http://d-programming-language.org/new/
 
 I didn't make technical/aesthetic changes (JS/noJS, placement of news,
 links to secondary pages etc) so when providing additional feedback
 please focus on the core message.
 
 There are significant changes of content: some keywords are different,
 text is shorter, no more community section (probably it'll go on a
 different page).
 
 There's a prominent example at the top. I'm thinking to rotate that
 randomly, and pick examples out of an always-running contest.

Overall. It looks good. It's also more compact, which is probably a good 
thing. One thing that bothered me right off the bat though is modeling power 
in that my first reaction is what kind of modeling power? It feels to me like 
it needs an adjective in front of it. It's probably fine though - particularly 
since I can't think of what to put in front of it (high?). The thought behind 
it is solid, but I guess that the phrase is just a bit odd to me.

Nitpick: giving the best of the static and dynamic worlds would be slightly 
better IMHO as giving the best of both the static and the dynamic worlds.

Nitpick: The + on the Example link is a nice improvement, but ideally it would 
change to a - when the example is visible. That might be more complicated than 
it's worth though. I don't know (since I'm not a web programmer).

Nitpick: Best paradigm is to not impose... sounds odd. Do you mean The best 
paradigm... or something else? Maybe it should be something more like It is 
best to not impose one programming paradigm at the expense of others.

Suggestion: Make RAII in the text a link to RAII on wikipedia. Also, scope 
should probably be turned into a link to scope statements in the documenation.

I really like the idea of having the prominent example rotate randomly from a 
list somewhere, but of course, that means that we need to come up with such a 
list, and coming up with good, concise examples like that generally seems to 
be difficult. If we can come up with even just a few though, it would still be 
a 
nice touch over having one, static example.

I find it interesting that whatever you did with the news section this time 
around actually shows up properly in Konqueror, whereas before it didn't 
(Konqueror is generally quite standards compliant, but that doesn't always 
translate to showing stuff correctly - especially with advanced web 2.0 kind of 
stuff).

Overall, it looks good to me. But from the previous comments, I think that 
others are far pickier than I am about the content (e.g. multi-paradigm was 
fine with me).

- Jonathan M Davis


Re: Website message overhaul

2011-11-20 Thread Andrea Fontana
I see that http://www.digitalmars.com/d/ redirect to 
http://www.d-programming-language.org/ using a meta http-equiv=refresh.

You should redirect using a http 301 headers to transfer google ranking
to new domain..

Andrea

Andrei Alexandrescu wrote:

 Walter and I have been working on the website for a while. We want to 
 crystallize a clear message of what the D programming language is.

 Please take a look at http://d-programming-language.org/new/. The work 
 is content-only (no significant changes in style, though collapsible 
 examples and twitter news are a new style element).

 Feedback is welcome.


 Thanks,

 Andrei



Re: Website message overhaul, pass 2

2011-11-20 Thread Paulo Pinto

Looks great.

While I am not native English speaker, would it not be better
to exachange the position of *naturally* and *compiles* on the following
sentence?

From:

D naturally compiles to efficient native code.

To:

D compiles naturally to efficient native code.

--
Paulo

Am 20.11.2011 09:40, schrieb Andrei Alexandrescu:

Thanks to all who provided feedback! I read again the entire thread,
then made one more pass:

http://d-programming-language.org/new/

I didn't make technical/aesthetic changes (JS/noJS, placement of news,
links to secondary pages etc) so when providing additional feedback
please focus on the core message.

There are significant changes of content: some keywords are different,
text is shorter, no more community section (probably it'll go on a
different page).

There's a prominent example at the top. I'm thinking to rotate that
randomly, and pick examples out of an always-running contest.


Thanks,

Andrei




Re: Website message overhaul

2011-11-20 Thread bearophile
Paulo Pinto:

 Haskell is a good example. It can run as fast as C in most cases, but 
 you need to aproach your problem with a completely different mindset.

My small experience tells me otherwise: with Haskell you are able to approach 
something vaguely like C performance only if you use complex weird things 
(sometimes mutability too). Normal Haskell programs are usually not near C 
programs speed, unless they use a better algorithm compared to the C programs 
(this sometimes happens because Haskell is lazy, and lazyness sometimes allows 
to express certain better algorithms in a simpler way, that are harder to 
express correctly in C).

Bye,
bearophile


Re: Website message overhaul, pass 2

2011-11-20 Thread Jude Young
On Sun 20 Nov 2011 05:09:28 AM CST, Paulo Pinto wrote:
 Looks great.

 While I am not native English speaker, would it not be better
 to exachange the position of *naturally* and *compiles* on the following
 sentence?

 From:

 D naturally compiles to efficient native code.

 To:

 D compiles naturally to efficient native code.

 -- 
 Paulo

 Am 20.11.2011 09:40, schrieb Andrei Alexandrescu:
 Thanks to all who provided feedback! I read again the entire thread,
 then made one more pass:

 http://d-programming-language.org/new/

 I didn't make technical/aesthetic changes (JS/noJS, placement of news,
 links to secondary pages etc) so when providing additional feedback
 please focus on the core message.

 There are significant changes of content: some keywords are different,
 text is shorter, no more community section (probably it'll go on a
 different page).

 There's a prominent example at the top. I'm thinking to rotate that
 randomly, and pick examples out of an always-running contest.


 Thanks,

 Andrei



Nice catch.  It does indeed sound better your way.


Re: Website message overhaul, pass 2

2011-11-20 Thread Robert Clipsham

On 20/11/2011 08:40, Andrei Alexandrescu wrote:

Thanks to all who provided feedback! I read again the entire thread,
then made one more pass:

http://d-programming-language.org/new/

I didn't make technical/aesthetic changes (JS/noJS, placement of news,
links to secondary pages etc) so when providing additional feedback
please focus on the core message.

There are significant changes of content: some keywords are different,
text is shorter, no more community section (probably it'll go on a
different page).

There's a prominent example at the top. I'm thinking to rotate that
randomly, and pick examples out of an always-running contest.


Thanks,

Andrei


This is a huge improvement! Ignoring the broken +Example links:

 - The code sample at the top is terrible, the equivalent C is only a 
couple of lines longer and it doesn't show off any of what makes D 
better! Admittedly you're limited in what you can do here as the code 
needs to be fairly understandable by non-D programmers, but what's there 
is... Not good at all.
 - Rotating the example is a brilliant idea, particularly if powered by 
a continuous contest.
 - This is less about the message, but how about an explain this link 
in the corner of examples with little hints for C/C++/Java programmers, 
so when clicked additional comments appear in the code or bubbles appear 
above on hover or something, they would include small bits of text like 
auto can be used in place of a type to infer the type from what is 
being assigned... But better worded of course.
 - Maybe it's just me, but I don't like the title being so long. I 
think The D Programming Language on its own is fine. The rest of it 
may still have a place, but it needs to be elsewhere in my opinion (even 
if it just moves to the line below).
 - Your summary sentence at the start reads It pragmatically combines 
efficiency, control, and modeling power, with safety and programmer 
productivity. You then go on to talk about convinience, power and 
efficiency... http://en.wikipedia.org/wiki/Topic_sentence The sentence 
needs to be changed to reflect what you go on to detail below - 
currently you're making statements without backing them up (note that 
you do back up most of it, not all of it though, and the subheadings 
don't make it obvious where you can find out more about the claims).

 - convinience - convenience
 - I can't really fault the bullet points, they're a huge improvement.
 - I have a reasonably large screen and can't see the news section 
without scrolling. To me this means there is no news ;)


I'm starting to nit-pick, it must be getting better.

--
Robert
http://octarineparrot.com/


Re: Website message overhaul, pass 2

2011-11-20 Thread Peter Alexander

On 20/11/11 8:40 AM, Andrei Alexandrescu wrote:

Thanks to all who provided feedback! I read again the entire thread,
then made one more pass:

http://d-programming-language.org/new/


Much better :-)

A few comments:

Can we please not use the term RAII? First, only C++ people know what it 
means, and second, its expansion doesn't tell you what it does or what 
it is used for. Just say something like scoped deterministic memory 
management or something like that. I'm sure C++ people will link that 
to RAII, and non-C++ people will have a better idea of what it means.


I think the point about the shebang line is unnecessary. It's a 
certainly a nice feature, but doesn't feel important enough to me to 
warrant being on the front-page trying to sell the language. Perhaps 
something about version/debug blocks would be more appropriate as 
they're something that everyone uses.


Without preventing virtual machine approaches, D naturally compiles to 
efficient native code. I would add onto the end of that rivaling and 
often bettering the runtime performance of raw C and C++ code. That's 
what people really want to hear, and it doesn't hurt to be explicit 
about it.


With this point:

The @safe, @trusted, and @system modular attributes allow the 
programmer to best decide the safety/efficiency tradeoffs of a 
particular application, and have the compiler check for consistency.


I'm not sure the reader can get much from that without knowing what 
those attributes mean.


Re: Website message overhaul, pass 2

2011-11-20 Thread Jonathan M Davis
On Sunday, November 20, 2011 13:47:31 Peter Alexander wrote:
 On 20/11/11 8:40 AM, Andrei Alexandrescu wrote:
  Thanks to all who provided feedback! I read again the entire thread,
  then made one more pass:
  
  http://d-programming-language.org/new/
 
 Much better :-)
 
 A few comments:
 
 Can we please not use the term RAII? First, only C++ people know what it
 means, and second, its expansion doesn't tell you what it does or what
 it is used for. Just say something like scoped deterministic memory
 management or something like that. I'm sure C++ people will link that
 to RAII, and non-C++ people will have a better idea of what it means.

Making it a link to wikipedia should be plenty. The C++ will know what RAII 
is, and anyone who's learning D should learn it. The combination of an 
example, the brief explanation that's there, and a link to Wikipedia should be 
plenty for people to be able to figure out what they need to know. And it _is_ 
a very important feature for those who know what it means.

- Jonathan M Davis


Re: Website message overhaul

2011-11-20 Thread Paulo Pinto

Am 20.11.2011 12:30, schrieb bearophile:

Paulo Pinto:


Haskell is a good example. It can run as fast as C in most cases, but
you need to aproach your problem with a completely different mindset.


My small experience tells me otherwise: with Haskell you are able to approach 
something vaguely like C performance only if you use complex weird things 
(sometimes mutability too). Normal Haskell programs are usually not near C 
programs speed, unless they use a better algorithm compared to the C programs 
(this sometimes happens because Haskell is lazy, and lazyness sometimes allows 
to express certain better algorithms in a simpler way, that are harder to 
express correctly in C).

Bye,
bearophile


That is what I meant with a completely different mindset.


Re: Website message overhaul, pass 2

2011-11-20 Thread Peter Alexander

On 20/11/11 1:09 PM, Robert Clipsham wrote:

- The code sample at the top is terrible, the equivalent C is only a
couple of lines longer and it doesn't show off any of what makes D
better! Admittedly you're limited in what you can do here as the code
needs to be fairly understandable by non-D programmers, but what's there
is... Not good at all.


It's hard to come up with something that is short, easily-understandable 
and demonstrates D's (numerous) powerful features.


How about this one:

// Match email addresses on each line of standard input
// using a compile-time generated regular expression engine.
import std.stdio, std.regex;

void main() {
string email = r\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b;

foreach (line; stdin.byLine()) {
foreach (m; match(line, regex(email, i))) {
writefln(%s[%s]%s, m.pre, m.hit, m.post);
}
}
}

Demonstrates:
- Syntax
- Imports
- Raw string literals
- Foreach with type deduction
- CTFE with regex
- Batteries included library (std.byLine(), regex, match, writefln)
- General succinctness of D code


- Rotating the example is a brilliant idea, particularly if powered by a
continuous contest.
- This is less about the message, but how about an explain this link
in the corner of examples with little hints for C/C++/Java programmers,
so when clicked additional comments appear in the code or bubbles appear
above on hover or something, they would include small bits of text like
auto can be used in place of a type to infer the type from what is
being assigned... But better worded of course.
- Maybe it's just me, but I don't like the title being so long. I think
The D Programming Language on its own is fine. The rest of it may
still have a place, but it needs to be elsewhere in my opinion (even if
it just moves to the line below).
- Your summary sentence at the start reads It pragmatically combines
efficiency, control, and modeling power, with safety and programmer
productivity. You then go on to talk about convinience, power and
efficiency... http://en.wikipedia.org/wiki/Topic_sentence The sentence
needs to be changed to reflect what you go on to detail below -
currently you're making statements without backing them up (note that
you do back up most of it, not all of it though, and the subheadings
don't make it obvious where you can find out more about the claims).
- convinience - convenience
- I can't really fault the bullet points, they're a huge improvement.
- I have a reasonably large screen and can't see the news section
without scrolling. To me this means there is no news ;)

I'm starting to nit-pick, it must be getting better.


+1 to everything


Re: Website message overhaul, pass 2

2011-11-20 Thread Peter Alexander

On 20/11/11 1:46 PM, Jonathan M Davis wrote:

On Sunday, November 20, 2011 13:47:31 Peter Alexander wrote:

On 20/11/11 8:40 AM, Andrei Alexandrescu wrote:

Thanks to all who provided feedback! I read again the entire thread,
then made one more pass:

http://d-programming-language.org/new/


Much better :-)

A few comments:

Can we please not use the term RAII? First, only C++ people know what it
means, and second, its expansion doesn't tell you what it does or what
it is used for. Just say something like scoped deterministic memory
management or something like that. I'm sure C++ people will link that
to RAII, and non-C++ people will have a better idea of what it means.


Making it a link to wikipedia should be plenty. The C++ will know what RAII
is, and anyone who's learning D should learn it. The combination of an
example, the brief explanation that's there, and a link to Wikipedia should be
plenty for people to be able to figure out what they need to know. And it _is_
a very important feature for those who know what it means.


I just think it's a terrible acronym and that we shouldn't be promoting 
its use. What part of resource acquisition is initialization tells me 
that its main purpose is deterministic, scoped resource management?


They should learn the concept but not the acronym ;-)


Re: Website message overhaul, pass 2

2011-11-20 Thread Jonathan M Davis
On Sunday, November 20, 2011 14:22:16 Peter Alexander wrote:
 On 20/11/11 1:46 PM, Jonathan M Davis wrote:
  On Sunday, November 20, 2011 13:47:31 Peter Alexander wrote:
  On 20/11/11 8:40 AM, Andrei Alexandrescu wrote:
  Thanks to all who provided feedback! I read again the entire thread,
  then made one more pass:
  
  http://d-programming-language.org/new/
  
  Much better :-)
  
  A few comments:
  
  Can we please not use the term RAII? First, only C++ people know what
  it
  means, and second, its expansion doesn't tell you what it does or what
  it is used for. Just say something like scoped deterministic memory
  management or something like that. I'm sure C++ people will link that
  to RAII, and non-C++ people will have a better idea of what it means.
  
  Making it a link to wikipedia should be plenty. The C++ will know what
  RAII is, and anyone who's learning D should learn it. The combination
  of an example, the brief explanation that's there, and a link to
  Wikipedia should be plenty for people to be able to figure out what
  they need to know. And it _is_ a very important feature for those who
  know what it means.
 
 I just think it's a terrible acronym and that we shouldn't be promoting
 its use. What part of resource acquisition is initialization tells me
 that its main purpose is deterministic, scoped resource management?
 
 They should learn the concept but not the acronym ;-)

It's well-established at this point. It would _increase_ confusion for many if 
we tried to avoid the term.

- Jonathan M Davis


Re: Website message overhaul, pass 2

2011-11-20 Thread Peter Alexander

On 20/11/11 2:20 PM, Jonathan M Davis wrote:

On Sunday, November 20, 2011 14:22:16 Peter Alexander wrote:

On 20/11/11 1:46 PM, Jonathan M Davis wrote:

On Sunday, November 20, 2011 13:47:31 Peter Alexander wrote:

On 20/11/11 8:40 AM, Andrei Alexandrescu wrote:

Thanks to all who provided feedback! I read again the entire thread,
then made one more pass:

http://d-programming-language.org/new/


Much better :-)

A few comments:

Can we please not use the term RAII? First, only C++ people know what
it
means, and second, its expansion doesn't tell you what it does or what
it is used for. Just say something like scoped deterministic memory
management or something like that. I'm sure C++ people will link that
to RAII, and non-C++ people will have a better idea of what it means.


Making it a link to wikipedia should be plenty. The C++ will know what
RAII is, and anyone who's learning D should learn it. The combination
of an example, the brief explanation that's there, and a link to
Wikipedia should be plenty for people to be able to figure out what
they need to know. And it _is_ a very important feature for those who
know what it means.


I just think it's a terrible acronym and that we shouldn't be promoting
its use. What part of resource acquisition is initialization tells me
that its main purpose is deterministic, scoped resource management?

They should learn the concept but not the acronym ;-)


It's well-established at this point. It would _increase_ confusion for many if
we tried to avoid the term.

- Jonathan M Davis


It's *only* established in the C++ community, and I would even suspect 
that majority of working C++ programmers don't know what it means (even 
though they know the concept).


The vast majority of programmers (i.e. non-C++ programmers) have no idea 
what it means, can't tell from the name, and when they learn it they'll 
have no why it was called that.


Re: Website message overhaul, pass 2

2011-11-20 Thread Adam D. Ruppe
RAII confused me at first because it doesn't really have anything to do with 
resource
acquisition or initilaization!

RAII is more about scoped destructors than anything else... the opposite of what
the name implies.


I know what it means now, but I see where Peter Alexander is coming from. It's 
not
an intuitive name.


Re: Website message overhaul

2011-11-20 Thread Nick Sabalausky
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message 
news:jaac0l$1keu$1...@digitalmars.com...
 On 11/15/11 12:57 PM, so wrote:
 Contrary to some (not surprisingly), i *really* like golang.org.

 It is simply precise.

 No twitter or facebook bs in the front page.
 I am guessing this is because they are rivals but still.

 To me it looks like the connection dropped and the page hasn't loaded. The 
 button Community is not aligned, but instead oddly centered below the 
 others.

Looks fine in FF2... (Heh, yea, I know...)

 The Quick Links aligns with the upper edge of the code frame, which is 
 jarring because that frame also has textual title (which would be more 
 natural to align other text with).

 I understand that the site tries its best to be simple, but it has 
 unrelated issues. I don't think it's an example to follow.


 Andrei 




Re: Website message overhaul

2011-11-20 Thread Nick Sabalausky
Paulo Pinto pj...@progtools.org wrote in message 
news:jaafb1$1u20$1...@digitalmars.com...
 Am 19.11.2011 21:22, schrieb Nick Sabalausky:

 Well, the vast majority of the time I come across a slow, bloated app, 
 it's
 from a VM or otherwise dymanic language. The vast majority of the time I
 come across a lean, zippy app, it's from something like C/C++/D/etc.
 Whatever the exact reasons, the former group of langauges tends to lean
 towards inefficient approaches, and the latter group tends to lean 
 towards
 more efficient approaches. (I try to avoid calling the things like
 C#/Ruby/Java/etc high-level, since I consider D to be just as high-level, 
 if
 not more - it's just that D is *also* more low-level, too)

 Sure you are right, but that is because most developers nowadays don't 
 learn properly how to code.


I still think there's more to it than just that, but I do share your 
pessimism on the quality of most programmers.

 In my line of work, one of the reasons why we make static analysis tools
 part of the build process is to force developers to code properly.

 Sometimes I ask myself what some of our developers were doing at the 
 university.


I would never trust a programmer whose only experience is classroom and 
homework. Luckily though, programming is one of those things you can get 
real non-school experience in without actually being employed in the field. 
(Many other fields have a chicken-and-egg problem in that regard.)


 Interesting point. Although, it is a balancing act: From what I hear, JVM 
 is
 considered to have a top-notch GC (no doubt due in part to it's lack of
 low-level ability), but I bet you'd be hard-pressed to get our
 reinterpret-cast-Foo example or codecs/filter/rasterizers/etc (assuming 
 you
 actually wanted to ;)) to run as fast in Java as in D.


 That is the reason I tend to favour polyglot programming. As a possible 
 example, I would rather write the majority of the application in Java and 
 leave the codec implemented in C, while calling it via JNI.


See, I've never really been a fan of that style. Yea, it's a good thing to 
do when necessary, but I always favor using a more general-purpose langauge 
(big part of what drew me to D) than constantly switching langauges, or 
ending up in a language-soup project. I find polyglot programming to be a 
big pain. That way you have to deal with things like interop, and mentally 
switching gears to the other langauge (that's a fairly high-overhead context 
switch).

 This is how we code most applications in my line of work.


I don't know what line of work you're in, but I do a lot of web stuff and 
it's the same thing here. That's one of the many things I dislike about web 
dev: Can't do anything without swapping between twenty different lanaguges.

 Anyway, this was the reason I was against referrin to C# in the language 
 slogan. If you start comparing against other languages, in the eyes of the 
 receiver you already lost, most time.

 Surely you need to compare, but that comes afterwards after the person
 has got some interest to find more about the language. 




Re: Website message overhaul, pass 2

2011-11-20 Thread Peter Alexander

On 20/11/11 2:17 PM, Peter Alexander wrote:

Demonstrates:
- Syntax
- Imports
- Raw string literals
- Foreach with type deduction
- CTFE with regex
- Batteries included library (std.byLine(), regex, match, writefln)
- General succinctness of D code


Ignore the CTFE with regex, it doesn't do any CTFE. Maybe I was thinking 
of the new one?


Re: Website message overhaul

2011-11-20 Thread Jeff Nowakowski

On 11/19/2011 11:27 PM, Walter Bright wrote:


I don't agree. You cannot have any data structures in Java that are not
OOP. You've really got to stretch to call Java multiparadigm.


You've got a very binary view on things.

Object-oriented programming is about encapsulating data via methods and 
inheritance. If all you've got is primitive types, arrays, objects with 
fields only, and static procedures along with reference equality then 
you've got a classic, procedural program. The only thing you've paid for 
is a tiny bit of object memory overhead.



Haskell, Ruby, Python don't, for example.


Haskell is *the* single-paradigm functional language, and I've already 
stated it is. Both Python and Ruby offer functional support, as well as 
support for objects.



I'll argue in this n.g. that Scala isn't functional, but I don't intend
to do so on the web site or write any articles about Scala.


In your binary thinking world, Scala doesn't support functional 
programming. Yet the outside world sees that it does, so any marketing 
along the lines of D being multi-paradigm isn't going to be unique.



It's misused a lot, to be sure. But we are using it correctly. D really
is multi-paradigm. There is no stretching of the term to make it fit.


It's a stupid sounding buzzword because average people don't use it in 
everyday conversation. They use simpler, more common words like model 
or style. It's like when the marketing droids came up with the word 
leverage and starting using it everywhere in place of use.


Re: Website message overhaul

2011-11-20 Thread Jeff Nowakowski

On 11/20/2011 10:03 AM, Nick Sabalausky wrote:


Looks fine in FF2... (Heh, yea, I know...)


There's nothing funny about running a browser that stopped getting 
security updates 3 years ago.


Re: Website message overhaul, pass 2

2011-11-20 Thread Derek

On Sun, 20 Nov 2011 22:40:34 +1100, Jude Young 10equa...@gmail.com wrote:


On Sun 20 Nov 2011 05:09:28 AM CST, Paulo Pinto wrote:

Looks great.

While I am not native English speaker, would it not be better
to exachange the position of *naturally* and *compiles* on the following
sentence?

From:

D naturally compiles to efficient native code.

To:

D compiles naturally to efficient native code.



Nice catch.  It does indeed sound better your way.


I think naturally can be removed altogether.

D compiles to efficient machine code.

--
Derek Parnell
Melbourne, Australia


Re: Website message overhaul

2011-11-20 Thread Timon Gehr

On 11/20/2011 07:20 AM, Derek wrote:

On Sun, 20 Nov 2011 11:02:14 +1100, Walter Bright
newshou...@digitalmars.com wrote:


... all variables being immutable ...


LOL, nice oxymoron.



http://en.wikipedia.org/wiki/Variable_%28mathematics%29


Re: Website message overhaul

2011-11-20 Thread Timon Gehr

On 11/20/2011 02:23 AM, Bane wrote:



There is 'D' the language and 'DMD' the implementation. You confuse the
two. The quirks you are talking about are DMD's, but the specification
is that of D. DMD needs to be fixed, and that is what the 'core people'
are working on.


I am using dmd compilers just because I believe they are first to implement new 
features and define standard for language. I might be wrong.



BTW, I have never felt much PITA when working with DMD even though I
have hit a few bugs. What are the specific quirks you are referring to?


D1 is joy for me. It is simple and fairly nicely documented. With it I have no 
problems. D2 is whole different ball game.



Well, that does not answer my question since I am working exclusively 
with D2.





Re: Website message overhaul

2011-11-20 Thread Timon Gehr

On 11/20/2011 09:40 AM, Paulo Pinto wrote:

Am 19.11.2011 21:49, schrieb Timon Gehr:




The fact that Nicks example works has no implications for the GC
implementation because the two types involved in his reinterpret-casting
don't have any indirections.

Furthermore:

int* a =...;



I meant
int* a = new int;
here, just in case anyone is wondering.


int b = cast(int)a;
int* c = cast(int*)b;
// assert(a == c); // not guaranteed!

The language allows the GC to move around heap data.
What kind of GC would be impossible to implement?


I am by no means a GC expert, but I was under the impression that D
could only make use of conservative GC because of the casting tricks.


D's GC could make use of any advanced GC algorithm I am aware of, it 
just has to be implemented (the bottleneck is probably compiler 
support). At the moment, the GC is conservative because the compiler 
provides no runtime information about which pieces of memory are 
pointers/references and which are not




What if Nick's example had inner pointers?

align(1) struct Foo
{
int x, y;
ubyte r, g, b, a;
char[16] ident;
uint[100] data;
Foo* next;
}



That is actually not a problem. Dereferencing an invalid pointer is 
unrelated to GC issues. And if the pointer is always valid, then it does 
not point to GC memory, therefore it can be ignored by the GC.




Is the GC smart enough to know that Foo.next will contain garbage after
the assignment with cast?


How can it know that it will contain garbage? Not every object in a D 
program is necessarily GC heap allocated. But the GC does not have to 
care anyway, as soon as unsafe casts are in play it is the 
responsibility of the programmer to ensure correctness.



What about when I later assign a valid value to it?


That works as expected, because the type information is available.














Re: Website message overhaul, pass 2

2011-11-20 Thread Andrej Mitrovic
Clicking Example doesn't do anything. And yes I have javascript on. :)


Re: Website message overhaul

2011-11-20 Thread Nick Sabalausky
Jeff Nowakowski j...@dilacero.org wrote in message 
news:jab7i5$o4t$1...@digitalmars.com...
 On 11/20/2011 10:03 AM, Nick Sabalausky wrote:

 Looks fine in FF2... (Heh, yea, I know...)

 There's nothing funny about running a browser that stopped getting 
 security updates 3 years ago.

All Mozilla has to do is put out a browser with a UI that can be configured 
to *not* be worse than FF2. It's not as if that should be difficult for any 
team that doesn't have their heads up Chrome's ass.




Re: Website message overhaul

2011-11-20 Thread Andrei Alexandrescu

On 11/20/11 4:43 AM, Andrea Fontana wrote:

I see that http://www.digitalmars.com/d/ redirect to
http://www.d-programming-language.org/ using a meta http-equiv=refresh.

You should redirect using a http 301 headers to transfer google ranking
to new domain..

Andrea


Request forwarded.

Andrei


Re: Website message overhaul, pass 2

2011-11-20 Thread Andrei Alexandrescu

On 11/20/11 7:09 AM, Robert Clipsham wrote:

- The code sample at the top is terrible, the equivalent C is only a
couple of lines longer and it doesn't show off any of what makes D
better! Admittedly you're limited in what you can do here as the code
needs to be fairly understandable by non-D programmers, but what's there
is... Not good at all.


I'd be curious how with only a couple of lines more you address in C 
lines of arbitrary length and proper error handling. Same goes about C++ 
(in addition to the speed issue) - code that does the right thing and is 
not very slow is quite subtle and I doubt two out of five C++ 
programmers know how to write it.



- Rotating the example is a brilliant idea, particularly if powered by a
continuous contest.


Yah, looking forward to that. It's going to be interesting.


- This is less about the message, but how about an explain this link
in the corner of examples with little hints for C/C++/Java programmers,
so when clicked additional comments appear in the code or bubbles appear
above on hover or something, they would include small bits of text like
auto can be used in place of a type to infer the type from what is
being assigned... But better worded of course.


Good idea.


- Maybe it's just me, but I don't like the title being so long. I think
The D Programming Language on its own is fine. The rest of it may
still have a place, but it needs to be elsewhere in my opinion (even if
it just moves to the line below).


I like that the main message is small enough to allow formatting in 
large font.



- Your summary sentence at the start reads It pragmatically combines
efficiency, control, and modeling power, with safety and programmer
productivity. You then go on to talk about convinience, power and
efficiency... http://en.wikipedia.org/wiki/Topic_sentence The sentence
needs to be changed to reflect what you go on to detail below -
currently you're making statements without backing them up (note that
you do back up most of it, not all of it though, and the subheadings
don't make it obvious where you can find out more about the claims).


Agreed. I'll think of fixing that.


- convinience - convenience


Where?


- I can't really fault the bullet points, they're a huge improvement.
- I have a reasonably large screen and can't see the news section
without scrolling. To me this means there is no news ;)


I'm considering moving the news on the right-hand side.


I'm starting to nit-pick, it must be getting better.


Thanks for the feedback!


Andrei


Re: Website message overhaul, pass 2

2011-11-20 Thread Andrei Alexandrescu

On 11/20/11 3:10 AM, Jonathan M Davis wrote:

Overall. It looks good. It's also more compact, which is probably a good
thing. One thing that bothered me right off the bat though is modeling power
in that my first reaction is what kind of modeling power? It feels to me like
it needs an adjective in front of it. It's probably fine though - particularly
since I can't think of what to put in front of it (high?). The thought behind
it is solid, but I guess that the phrase is just a bit odd to me.


Keeping this in mind.


Nitpick: giving the best of the static and dynamic worlds would be slightly
better IMHO as giving the best of both the static and the dynamic worlds.


Done.


Nitpick: The + on the Example link is a nice improvement, but ideally it would
change to a - when the example is visible. That might be more complicated than
it's worth though. I don't know (since I'm not a web programmer).


Yes, that's part of the plan. Note that the + is a nice small Unicode 
+, and probably the - will be the small Unicode -.



Nitpick: Best paradigm is to not impose... sounds odd. Do you mean The best
paradigm... or something else? Maybe it should be something more like It is
best to not impose one programming paradigm at the expense of others.


I wanted to put there a strong sentence a la best organization is 
disorganization. I thought best paradigm is no paradigm but that 
would be too extreme.



Suggestion: Make RAII in the text a link to RAII on wikipedia. Also, scope
should probably be turned into a link to scope statements in the documenation.


Done.


I really like the idea of having the prominent example rotate randomly from a
list somewhere, but of course, that means that we need to come up with such a
list, and coming up with good, concise examples like that generally seems to
be difficult. If we can come up with even just a few though, it would still be a
nice touch over having one, static example.


I'm sure we will. I wonder how I can superimpose on the code frame a 
small text in the bottom right saying [your code here] linked to a 
submission form. That way we advertise the contest right where the prize is!



I find it interesting that whatever you did with the news section this time
around actually shows up properly in Konqueror, whereas before it didn't
(Konqueror is generally quite standards compliant, but that doesn't always
translate to showing stuff correctly - especially with advanced web 2.0 kind of
stuff).


I issued a window.stop() after the twitter code.


Overall, it looks good to me. But from the previous comments, I think that
others are far pickier than I am about the content (e.g. multi-paradigm was
fine with me).


Thanks for your input!


Andrei


Re: Website message overhaul, pass 2

2011-11-20 Thread Andrei Alexandrescu

On 11/20/11 5:09 AM, Paulo Pinto wrote:

Looks great.

While I am not native English speaker, would it not be better
to exachange the position of *naturally* and *compiles* on the following
sentence?

From:

D naturally compiles to efficient native code.

To:

D compiles naturally to efficient native code.


Done.

Andrei


Re: Website message overhaul, pass 2

2011-11-20 Thread Andrei Alexandrescu

On 11/20/11 7:09 AM, Robert Clipsham wrote:

- The code sample at the top is terrible, the equivalent C is only a
couple of lines longer and it doesn't show off any of what makes D
better! Admittedly you're limited in what you can do here as the code
needs to be fairly understandable by non-D programmers, but what's there
is... Not good at all.


I'd be curious how with only a couple of lines more you address in C 
lines of arbitrary length and proper error handling. Same goes about C++ 
(in addition to the speed issue) - code that does the right thing and is 
not very slow is quite subtle and I doubt two out of five C++ 
programmers know how to write it.



- Rotating the example is a brilliant idea, particularly if powered by a
continuous contest.


Yah, looking forward to that. It's going to be interesting.


- This is less about the message, but how about an explain this link
in the corner of examples with little hints for C/C++/Java programmers,
so when clicked additional comments appear in the code or bubbles appear
above on hover or something, they would include small bits of text like
auto can be used in place of a type to infer the type from what is
being assigned... But better worded of course.


Good idea.


- Maybe it's just me, but I don't like the title being so long. I think
The D Programming Language on its own is fine. The rest of it may
still have a place, but it needs to be elsewhere in my opinion (even if
it just moves to the line below).


I like that the main message is small enough to allow formatting in 
large font.



- Your summary sentence at the start reads It pragmatically combines
efficiency, control, and modeling power, with safety and programmer
productivity. You then go on to talk about convinience, power and
efficiency... http://en.wikipedia.org/wiki/Topic_sentence The sentence
needs to be changed to reflect what you go on to detail below -
currently you're making statements without backing them up (note that
you do back up most of it, not all of it though, and the subheadings
don't make it obvious where you can find out more about the claims).


Agreed. I'll think of fixing that.


- convinience - convenience


Where?


- I can't really fault the bullet points, they're a huge improvement.
- I have a reasonably large screen and can't see the news section
without scrolling. To me this means there is no news ;)


I'm considering moving the news on the right-hand side.


I'm starting to nit-pick, it must be getting better.


Thanks for the feedback!


Andrei


Re: Website message overhaul, pass 2

2011-11-20 Thread Andrei Alexandrescu

On 11/20/11 8:36 AM, Adam D. Ruppe wrote:

RAII confused me at first because it doesn't really have anything to do with 
resource
acquisition or initilaization!

RAII is more about scoped destructors than anything else... the opposite of what
the name implies.


I know what it means now, but I see where Peter Alexander is coming from. It's 
not
an intuitive name.


Adjusted text.

Andrei


Re: Website message overhaul, pass 2

2011-11-20 Thread Andrei Alexandrescu

On 11/20/11 8:17 AM, Peter Alexander wrote:

How about this one:

// Match email addresses on each line of standard input
// using a compile-time generated regular expression engine.
import std.stdio, std.regex;

void main() {
string email = r\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b;

foreach (line; stdin.byLine()) {
foreach (m; match(line, regex(email, i))) {
writefln(%s[%s]%s, m.pre, m.hit, m.post);
}
}
}

Demonstrates:
- Syntax
- Imports
- Raw string literals
- Foreach with type deduction
- CTFE with regex
- Batteries included library (std.byLine(), regex, match, writefln)
- General succinctness of D code


Great. Save that for the contest.

Andrei


Re: Website message overhaul, pass 2

2011-11-20 Thread Andrei Alexandrescu

On 11/20/11 7:47 AM, Peter Alexander wrote:

A few comments:

Can we please not use the term RAII? First, only C++ people know what it
means, and second, its expansion doesn't tell you what it does or what
it is used for. Just say something like scoped deterministic memory
management or something like that. I'm sure C++ people will link that
to RAII, and non-C++ people will have a better idea of what it means.


I think RAII+link is fine. It's an awful acronym, but it has caught on.


I think the point about the shebang line is unnecessary. It's a
certainly a nice feature, but doesn't feel important enough to me to
warrant being on the front-page trying to sell the language. Perhaps
something about version/debug blocks would be more appropriate as
they're something that everyone uses.


Good point, will keep in mind.


Without preventing virtual machine approaches, D naturally compiles to
efficient native code. I would add onto the end of that rivaling and
often bettering the runtime performance of raw C and C++ code. That's
what people really want to hear, and it doesn't hurt to be explicit
about it.


No mention of other languages. Well I broke that with C-like syntax 
because that's very informative.



With this point:

The @safe, @trusted, and @system modular attributes allow the
programmer to best decide the safety/efficiency tradeoffs of a
particular application, and have the compiler check for consistency.

I'm not sure the reader can get much from that without knowing what
those attributes mean.


There's an article link for those interested.


Andrei


Re: Website message overhaul

2011-11-20 Thread Andrei Alexandrescu

On 11/20/11 9:03 AM, Nick Sabalausky wrote:

Andrei Alexandrescuseewebsiteforem...@erdani.org  wrote in message
news:jaac0l$1keu$1...@digitalmars.com...

On 11/15/11 12:57 PM, so wrote:

Contrary to some (not surprisingly), i *really* like golang.org.

It is simply precise.

No twitter or facebook bs in the front page.
I am guessing this is because they are rivals but still.


To me it looks like the connection dropped and the page hasn't loaded. The
button Community is not aligned, but instead oddly centered below the
others.


Looks fine in FF2... (Heh, yea, I know...)


Not if you increase the font size.

Andrei


Re: Website message overhaul, pass 2

2011-11-20 Thread Andrei Alexandrescu

On 11/20/11 9:50 AM, Derek wrote:

On Sun, 20 Nov 2011 22:40:34 +1100, Jude Young 10equa...@gmail.com wrote:


On Sun 20 Nov 2011 05:09:28 AM CST, Paulo Pinto wrote:

Looks great.

While I am not native English speaker, would it not be better
to exachange the position of *naturally* and *compiles* on the following
sentence?

From:

D naturally compiles to efficient native code.

To:

D compiles naturally to efficient native code.



Nice catch. It does indeed sound better your way.


I think naturally can be removed altogether.

D compiles to efficient machine code.


Naturally emphasizes that we're not talking about the reasonably 
advanced compiler myth.


Andrei


Re: Website message overhaul, pass 2

2011-11-20 Thread Andrei Alexandrescu

On 11/20/11 12:26 PM, Andrej Mitrovic wrote:

Clicking Example doesn't do anything. And yes I have javascript on. :)


I only noticed that now... will look into it.

Andrei


Re: Website message overhaul

2011-11-20 Thread Walter Bright

On 11/20/2011 7:28 AM, Jeff Nowakowski wrote:

Yet
the outside world sees that it does, so any marketing along the lines of D being
multi-paradigm isn't going to be unique.


I am not arguing that D being multi-paradigm is unique. I would argue that it 
arguably supports more paradigms than any other language.


My view of what is multi-paradigm isn't binary, I know there's a continuum. But 
I think that saying Java supports imperative programming is quite a stretch. 
Saying Scala supports functional is also a stretch, because it supports only one 
of the three defining characteristics of functional programming. It doesn't even 
support the other two in a half-assed manner, it doesn't support them at all.


I didn't invent my own definition of functional programming. I am using the 
standard definition that anyone can look up. I don't see that as being 
unreasonable, binary, or misusing the term.





It's a stupid sounding buzzword because average people don't use it in everyday
conversation. They use simpler, more common words like model or style. It's
like when the marketing droids came up with the word leverage and starting
using it everywhere in place of use.


Back around 1990, OOP was the hot buzzword of the day. Everyone started calling 
their product object oriented. Every programming language was tortured into 
being object oriented (even Fortran!), databases were re-documented as object 
oriented, even operating systems were touted as object oriented. It did become a 
joke after a while to call something object oriented. Fortunately, after a 
while, the noise passed and OOP reverted to just another paradigm among many.


I see an echo of that today in calling Java multi-paradigm, which I find 
hilariously ironic as Java was designed during the apex of the OOP hype and was 
certainly designed to buy into OOP lock, stock and barrel.


But I am not seeing multi-paradigm jargon hype as nearly as pervasive as the OOP 
fever was.


(In another of the great ironies, the kickoff of the Great OOP Boom was, you 
guessed it, C++. C++ led the charge for OOP. And yet, at the height of OOP, C++ 
abruptly turned left and went to parametric polymorphism, i.e. template 
metaprogramming. You don't see much of anything written about C++'s OOP 
abilities any more.)


Re: Website message overhaul, pass 2

2011-11-20 Thread Derek
On Mon, 21 Nov 2011 07:06:00 +1100, Andrei Alexandrescu  
seewebsiteforem...@erdani.org wrote:




I think naturally can be removed altogether.

D compiles to efficient machine code.


Naturally emphasizes that we're not talking about the reasonably  
advanced compiler myth.


Ok, I see where you are going with that now; it wasn't obvious to me. So  
rephrasing it and using more words, - the nature of D makes it simple to  
generate efficient machine code.


--
Derek Parnell
Melbourne, Australia


Re: Website message overhaul

2011-11-20 Thread Jeff Nowakowski

On 11/20/2011 01:49 PM, Nick Sabalausky wrote:


All Mozilla has to do is


Mozilla doesn't have to do anything. Why should they care that *you* are 
running with a browser 3 years out of security updates? According to 
Wikipedia [1], not even 1% of Firefox users out there still run version 2.


[1] http://en.wikipedia.org/wiki/Firefox#Market_adoption

Maybe you want to dispute the statistics, but I think you'll have a hard 
time coming up with anything significantly different.


Re: Website message overhaul

2011-11-20 Thread Nick Sabalausky
Jeff Nowakowski j...@dilacero.org wrote in message 
news:jaboq8$269f$1...@digitalmars.com...
 On 11/20/2011 01:49 PM, Nick Sabalausky wrote:

 All Mozilla has to do is

 Mozilla doesn't have to do anything. Why should they care that *you* are 
 running with a browser 3 years out of security updates? According to 
 Wikipedia [1], not even 1% of Firefox users out there still run version 2.

 [1] http://en.wikipedia.org/wiki/Firefox#Market_adoption

 Maybe you want to dispute the statistics, but I think you'll have a hard 
 time coming up with anything significantly different.

Well, whether Mozilla or not, some people obviously do care, considering the 
amount of crap I get from people (and websites) for using FF2.

Besides, there's a *lot* of people that get irritated at newer versions of 
FF changing things without a revert option. Whether those people upgrade 
anyway or not, fact is, Mozilla's got it's head up it's ass - and doubly so 
if they keep pulling those stunts while still banging that load of crap 
customizable/personalizable drum.




Re: Website message overhaul

2011-11-20 Thread Nick Sabalausky
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message 
news:jabkq4$1nu6$1...@digitalmars.com...
 On 11/20/11 4:43 AM, Andrea Fontana wrote:
 I see that http://www.digitalmars.com/d/ redirect to
 http://www.d-programming-language.org/ using a meta http-equiv=refresh.

 You should redirect using a http 301 headers to transfer google ranking
 to new domain..

 Andrea

 Request forwarded.


Hah! I see what you did there... ;)




Re: Website message overhaul, pass 2

2011-11-20 Thread Jesse Phillips
On Sun, 20 Nov 2011 13:58:14 -0600, Andrei Alexandrescu wrote:

 On 11/20/11 7:47 AM, Peter Alexander wrote:
 I think the point about the shebang line is unnecessary. It's a
 certainly a nice feature, but doesn't feel important enough to me to
 warrant being on the front-page trying to sell the language. Perhaps
 something about version/debug blocks would be more appropriate as
 they're something that everyone uses.
 
 Good point, will keep in mind.

On top of that, #! is only available to the *nix world.


Re: Website message overhaul, pass 2

2011-11-20 Thread Vladimir Panteleev
On Sun, 20 Nov 2011 10:40:09 +0200, Andrei Alexandrescu  
seewebsiteforem...@erdani.org wrote:


Thanks to all who provided feedback! I read again the entire thread,  
then made one more pass:


http://d-programming-language.org/new/


I would like to humbly suggest a change in the punctuation of the top  
heading. From this:


The D programming language. Modern convenience. Modeling power. Native  
efficiency.


To this:

The D Programming Language: Modern Convenience, Modeling Power, Native  
Efficiency


I'm not sure about the capitalization, but the period-overloaded version  
reads in my head like a lame car commercial.


--
Best regards,
 Vladimirmailto:vladi...@thecybershadow.net


Re: Website message overhaul, pass 2

2011-11-20 Thread Andrei Alexandrescu

On 11/20/11 3:01 PM, Jesse Phillips wrote:

On Sun, 20 Nov 2011 13:58:14 -0600, Andrei Alexandrescu wrote:


On 11/20/11 7:47 AM, Peter Alexander wrote:

I think the point about the shebang line is unnecessary. It's a
certainly a nice feature, but doesn't feel important enough to me to
warrant being on the front-page trying to sell the language. Perhaps
something about version/debug blocks would be more appropriate as
they're something that everyone uses.


Good point, will keep in mind.


On top of that, #! is only available to the *nix world.


And cygwin.

Andrei


Re: Website message overhaul

2011-11-20 Thread Andrei Alexandrescu

On 11/20/11 2:55 PM, Nick Sabalausky wrote:

Andrei Alexandrescuseewebsiteforem...@erdani.org  wrote in message
news:jabkq4$1nu6$1...@digitalmars.com...

On 11/20/11 4:43 AM, Andrea Fontana wrote:

I see that http://www.digitalmars.com/d/ redirect to
http://www.d-programming-language.org/ using a meta http-equiv=refresh.

You should redirect using a http 301 headers to transfer google ranking
to new domain..

Andrea


Request forwarded.



Hah! I see what you did there... ;)


Telling the truth is what I did. I don't have access to the the config 
files and .htaccess use is disabled, so I sent the request to the site 
admin.


Andrei


Re: Website message overhaul

2011-11-20 Thread Peter Alexander

On 20/11/11 8:15 PM, Walter Bright wrote:

My view of what is multi-paradigm isn't binary, I know there's a
continuum. But I think that saying Java supports imperative programming
is quite a stretch. Saying Scala supports functional is also a stretch,
because it supports only one of the three defining characteristics of
functional programming. It doesn't even support the other two in a
half-assed manner, it doesn't support them at all.

I didn't invent my own definition of functional programming. I am using
the standard definition that anyone can look up. I don't see that as
being unreasonable, binary, or misusing the term.


I don't disagree with you, but the fact of the matter is that Scala is 
considered a functional programming language. Its website says it, 
wikipedia says, and people that talk about Scala say it.




Re: Website message overhaul

2011-11-20 Thread Andrei Alexandrescu

On 11/20/11 3:07 PM, Xinok wrote:

On 11/18/2011 11:01 AM, Andrei Alexandrescu wrote:

On 11/18/11 7:22 AM, Nick Sabalausky wrote:

Andrei Alexandrescuseewebsiteforem...@erdani.org wrote in message
news:ja4fhd$2amk$1...@digitalmars.com...

On 11/17/11 11:48 AM, Xinok wrote:

What are its benefits? Higher productivity, fewer bugs, native speed,
fast compilation.


As opposed to other languages that have lower productivity, more bugs,
less speed and slower compilation as goals.



As opposed to other langauges that either don't have all those as major
goals, or do a poor job of them.


These are too motherhood and apple pie kind of things, and too vague
to be useful.

Andrei


That's why you go into more detail in the following bullet points. There
are lots of terms you could use to describe a programming language:
Strict, flexible, powerful, expressive, explicit, etc. Not all of these
terms apply to D, so while they may be vague, they still give the
newcomer a general idea.

What is too vague is the terms at the top of the page, it sounds like a
commercial for a hygiene product. Intriguing, elegant, Loreal.


We're looking for a brief and memorable intro. Three long-winding 
sentences are not that.


Andrei


Re: Website message overhaul, pass 2

2011-11-20 Thread Peter Alexander

On 20/11/11 7:58 PM, Andrei Alexandrescu wrote:

Without preventing virtual machine approaches, D naturally compiles to
efficient native code. I would add onto the end of that rivaling and
often bettering the runtime performance of raw C and C++ code. That's
what people really want to hear, and it doesn't hurt to be explicit
about it.


No mention of other languages. Well I broke that with C-like syntax
because that's very informative.


How about being more vague?

rivalling and often bettering the runtime performance of other systems 
programming languages.


Re: Website message overhaul

2011-11-20 Thread Andrei Alexandrescu

On 11/20/11 4:03 PM, Andrei Alexandrescu wrote:

On 11/20/11 2:55 PM, Nick Sabalausky wrote:

Andrei Alexandrescuseewebsiteforem...@erdani.org wrote in message
news:jabkq4$1nu6$1...@digitalmars.com...

On 11/20/11 4:43 AM, Andrea Fontana wrote:

I see that http://www.digitalmars.com/d/ redirect to
http://www.d-programming-language.org/ using a meta http-equiv=refresh.

You should redirect using a http 301 headers to transfer google ranking
to new domain..

Andrea


Request forwarded.



Hah! I see what you did there... ;)


Telling the truth is what I did. I don't have access to the the config
files and .htaccess use is disabled, so I sent the request to the site
admin.

Andrei


Got word back - this has been taken cared of. Except for newsgroups and 
download, everything D related on digitalmars.com seamlessly forwards to 
d-programming-language.org.


Andrei


Re: Website message overhaul, pass 2

2011-11-20 Thread Andrei Alexandrescu

On 11/20/11 2:40 AM, Andrei Alexandrescu wrote:

Thanks to all who provided feedback! I read again the entire thread,
then made one more pass:

http://d-programming-language.org/new/

I didn't make technical/aesthetic changes (JS/noJS, placement of news,
links to secondary pages etc) so when providing additional feedback
please focus on the core message.

There are significant changes of content: some keywords are different,
text is shorter, no more community section (probably it'll go on a
different page).

There's a prominent example at the top. I'm thinking to rotate that
randomly, and pick examples out of an always-running contest.


Arranged things such that +Example becomes -Example when expanded. Also, 
examples are now clickable while the page is still loading.


Andrei


Re: Website message overhaul

2011-11-20 Thread Andrej Mitrovic
Btw, DMD still ships web files from digitalmars.com instead of the new one.


Re: Website message overhaul, pass 2

2011-11-20 Thread bearophile
Andrei Alexandrescu:

 Thanks to all who provided feedback! I read again the entire thread, 
 then made one more pass:
 
 http://d-programming-language.org/new/

On Wikipedia they are asking for some changes:
http://en.wikipedia.org/wiki/D_language


(We don't want to use this on the front page:

import std.stdio, std.string, std.algorithm;

void main() {
string[][string] signature2words;

foreach (char[] line; lines(File(words.txt))) {
auto cline = line.chomp();
string word = cline.idup;
cline.toLowerInPlace();
(cast(ubyte[])cline).sort();
signature2words[cline.idup] ~= word;
}

foreach (words; signature2words)
if (words.length  1)
writefln(words.join( ));
}

---

I have modified a bit your text, this is not meant to be a final version, but 
shows a text I like a bit more:

The D programming language

// Finds and prints word anagrams
import std.stdio, std.string, std.algorithm;

void main() {
dstring[][dstring] signature2words;

foreach (dstring line; lines(File(words.txt))) {
auto word = line.chomp();
auto key = word.toLower().dup.sort().release().idup;
signature2words[key] ~= word;
}

foreach (words; signature2words)
if (words.length  1)
writefln(words.join( ));
}

D is a statically typed language with C-like syntax. It tries to combine 
efficiency and control with safety and programmer productivity.

Convenience

* The simple type inference of D allow writing code with no redundant type 
specifications, while keeping static typing safety and efficiency. [Example]
* The optional garbage collector makes for simple and safe code. D also 
supports scoped resource management (the RAII idiom) and scope statements for 
... code that is easy to read. [Example]
* Array slicing syntax, built-in dynamic arrays and associative arrays, and 
several other features allow to write handy short script-like programs 
succinctly and safely.

Power

* D supports classic polymorphism, value semantics, functional style, 
generics, generative programming and contract programming. [Example]
* D offers an innovative approach to concurrency featuring true immutable 
data, message passing, no sharing by default, pure functions and controlled 
mutable sharing across threads. Read more.
* D scales to larger projects with unit testing, information hiding, 
refined modularity, fast compilation and precise interfaces. Read more.

Efficiency

* D compiles naturally to efficient native code.
* D is designed such that most obvious code is fast and safe. On occasion 
you might need to escape the confines of type safety for ultimate speed and 
control. For such rare cases D offers native pointers, type casts, access to 
any C function without any intervening translation, and even inline assembly. 
So D allows to mix high level code and low level code in the same program. 
[Example]
* The @safe, @trusted, and @system modular attributes allow the programmer 
to best decide the safety/efficiency tradeoffs of a particular application, and 
have the compiler check for consistency. Read more.

Bye,
bearophile


Re: Website message overhaul

2011-11-20 Thread bearophile
Walter:

 Saying Scala supports functional is also a stretch, because it supports only 
 one 
 of the three defining characteristics of functional programming. It doesn't 
 even 
 support the other two in a half-assed manner, it doesn't support them at all.
 
 I didn't invent my own definition of functional programming. I am using the 
 standard definition that anyone can look up. I don't see that as being 
 unreasonable, binary, or misusing the term.

This is an interesting discussion topic. Scala is widely regarded as a rather 
functional language (more than C#, less than F# and OCaML and Haskell). Why is 
Scala perceived as quite functional?

1) It has pattern matching, lazy stream lists similar to Haskell lists, its 
standard library is rather functional oriented, its has better type inference, 
is has a very powerful type system that allows to express lot of static 
invariants, and generally Scala encourages to use immutability over mutability, 
there are immutable collections too in its standard library, and they are 
preferred. All this makes Scala rather handy for functional programming despite 
it lacks true immutability and true purity.

2) It's a matter of syntax too. Scala has optional parenthesys, and other 
sylistic features that are pleasant for functional programming. While if you 
try to use a functional-style programming in D you often produce unreadable 
lines of code. I have shown this several times in the D newsgroup but nearly 
nobody seemed to care.

3) It's a bit a matter of perception too. People think of it as partially 
functional because lot of people do it, and it is advertised for this. Around 
it there are functional programmers too, even academic ones.

Regarding D immutability and purity, often you can't put a map() in a pure 
function, and many Phobos functions don't work with const/immutable data. This 
makes D almost a joke for functional programming. This side of D will improve, 
but Scala is there already.


import std.algorithm: map, filter;
int foo(immutable int x) pure nothrow {
return 1;
}
void main() pure {
immutable data = [1, 2, 3];
auto m1 = map!((x){ return 1; })(data); // OK
auto m2 = map!((int x){ return 1; })(data); // OK
auto m3 = map!q{ 1 }(data); // error, map is not pure
auto m4 = map!foo(data);// error, map is not pure
//
auto f1 = filter!((x){ return 1; })(data); // OK
auto f2 = filter!((int x){ return 1; })(data); // OK
auto f3 = filter!q{ 1 }(data); // error, filter is not pure
auto f4 = filter!foo(data);// error, filter is not pure
}

Bye,
bearophile


Re: Website message overhaul, pass 2

2011-11-20 Thread Andrei Alexandrescu

On 11/20/11 4:45 PM, bearophile wrote:
[snip]

Thanks for your feedback! Operated a few changes. I think the example 
introduces too many concepts.



Thanks again,

Andrei


Re: Website message overhaul, pass 2

2011-11-20 Thread Danni Coy



 From:

 D naturally compiles to efficient native code.

 To:

 D compiles naturally to efficient native code.


I think that naturally applies to D rather than compiles
so perhaps
Naturally D compiles to efficient native code.


Re: Website message overhaul, pass 2

2011-11-20 Thread Andrei Alexandrescu

On 11/20/11 5:22 PM, Danni Coy wrote:



From:

D naturally compiles to efficient native code.

To:

D compiles naturally to efficient native code.


I think that naturally applies to D rather than compiles
so perhaps
Naturally D compiles to efficient native code.


That Yoda sounds said like.

Andrei


Re: Website message overhaul

2011-11-20 Thread Andrei Alexandrescu

On 11/20/11 5:05 PM, bearophile wrote:

This is an interesting discussion topic. Scala is widely regarded as
a rather functional language (more than C#, less than F# and OCaML
and Haskell). Why is Scala perceived as quite functional?


Marketing. Scala is most often contrasted with Java, so since it has 
lambdas, higher-order functions, and free functions, it is more 
functional than Java.



1) It has pattern matching, lazy stream lists similar to Haskell
lists, its standard library is rather functional oriented, its has
better type inference,


Not a functional thing.


is has a very powerful type system that
allows to express lot of static invariants,


Not a functional thing.


and generally Scala
encourages to use immutability over mutability,


There is no data immutability beyond final. I am surprised that I get 
to destroy with this even programmers who pretend to know Scala quite well.



there are immutable
collections too in its standard library,


Most languages allow defining a collection interface that disallows 
change to individual elements.



and they are preferred.


We're talking about support, not preference.


All
this makes Scala rather handy for functional programming despite it
lacks true immutability and true purity.


For someone coming from Java, sure.


2) It's a matter of syntax too. Scala has optional parenthesys, and
other sylistic features that are pleasant for functional
programming.


Optional parens are not a functional things. In fact it's supremely 
ironic to sustain otherwise because Lisp is the forefather of all 
functional languages...



While if you try to use a functional-style programming
in D you often produce unreadable lines of code. I have shown this
several times in the D newsgroup but nearly nobody seemed to care.


In D you have a bit more of a difficult time producing compelling 
examples. This is because D is multi-paradigm so your D functional 
example must compete with a variety of other possible approaches, of 
which often a different style leads to a simpler approach. In contrast, 
in e.g. Haskell getting something done in a functional manner is pretty 
much the only way to do it so there's no more discussion.


From what I saw there is a pattern of debate that goes like this:

bearophile: I took this functional example in language X and translated 
in D. The original X code is this: [weird mess]. The translation is 
this: [weirder mess]. The D version looks bad and is slower, too!


someone else: They why the hell don't you solve the problem like this: 
[simple code mixing paradigms]? It's smaller, simpler, and faster!



3) It's a bit a matter of perception too. People think of it as
partially functional because lot of people do it, and it is
advertised for this. Around it there are functional programmers too,
even academic ones.

Regarding D immutability and purity, often you can't put a map() in
a pure function, and many Phobos functions don't work with
const/immutable data. This makes D almost a joke for functional
programming. This side of D will improve, but Scala is there
already.


So let me make sure I understand: you find D's support for pure and 
immutable insufficient (something I agree with), but Scala is there 
already because it doesn't have any notion of pure and immutability?



import std.algorithm: map, filter;
int foo(immutable int x) pure nothrow {
return 1;
}
void main() pure {
immutable data = [1, 2, 3];
auto m1 = map!((x){ return 1; })(data); // OK
auto m2 = map!((int x){ return 1; })(data); // OK
auto m3 = map!q{ 1 }(data); // error, map is not pure
auto m4 = map!foo(data);// error, map is not pure
//
auto f1 = filter!((x){ return 1; })(data); // OK
auto f2 = filter!((int x){ return 1; })(data); // OK
auto f3 = filter!q{ 1 }(data); // error, filter is not pure
auto f4 = filter!foo(data);// error, filter is not pure
}



This would make a solid bug report.


Thanks,

Andrei


Re: Website message overhaul, pass 2

2011-11-20 Thread Jonathan M Davis
On Sunday, November 20, 2011 17:31:57 Andrei Alexandrescu wrote:
 On 11/20/11 5:22 PM, Danni Coy wrote:
  From:
  
  D naturally compiles to efficient native code.
  
  To:
  
  D compiles naturally to efficient native code.
  
  I think that naturally applies to D rather than compiles
  so perhaps
  Naturally D compiles to efficient native code.
 
 That Yoda sounds said like.

Well, if it were Naturally, D compiles to efficient, native code, then it 
means something similar to Obviously, D compiles to efficient, native code. 
But the naturally that the original phrase uses is a different definition. So, 
yes, if naturally were to keep the same meaning with this suggested rewrite, 
it would be Yoda-talk, but most people would probably take it as a different 
meaning of the word entirely.

- Jonathan M Davis


Re: Website message overhaul, pass 2

2011-11-20 Thread Andrei Alexandrescu

On 11/20/11 5:31 PM, Andrei Alexandrescu wrote:

On 11/20/11 5:22 PM, Danni Coy wrote:



From:

D naturally compiles to efficient native code.

To:

D compiles naturally to efficient native code.


I think that naturally applies to D rather than compiles
so perhaps
Naturally D compiles to efficient native code.


That Yoda sounds said like.

Andrei


On second thought, this seems glib, apologies.

What I really meant to say is that natural actually goes to the 
process of compilation, not D itself. You can see that by replacing e.g. 
natural with easy: D compiles easily to efficient native code. 
That's what I meant when writing the sentence, and again it's there to 
avoid the fallacy that you'd need a magically advanced compiler to do that.


In fact I've considered adding one more sentence there, but I can't come 
up with anything short and good. Something like: D builds structure on 
top of C's object model bedrock, so D compiles naturally to efficient 
native code. That is long-ish and, worse, leads to all sorts of 
mistaken interpretations.



Andrei


Re: Website message overhaul, pass 2

2011-11-20 Thread Robert Clipsham

On 20/11/2011 19:55, Andrei Alexandrescu wrote:

On 11/20/11 7:09 AM, Robert Clipsham wrote:

- The code sample at the top is terrible, the equivalent C is only a
couple of lines longer and it doesn't show off any of what makes D
better! Admittedly you're limited in what you can do here as the code
needs to be fairly understandable by non-D programmers, but what's there
is... Not good at all.


I'd be curious how with only a couple of lines more you address in C
lines of arbitrary length and proper error handling. Same goes about C++
(in addition to the speed issue) - code that does the right thing and is
not very slow is quite subtle and I doubt two out of five C++
programmers know how to write it.


I don't have time to write up an example, however a C/C++ programmer 
reading that code would have no idea any error handling was happening.



I like that the main message is small enough to allow formatting in
large font.


I personally don't find it very readable with it all being on one line, 
I feel breaking it into two looks far nicer (I did try).



- convinience - convenience


Where?


No idea! :D


- I can't really fault the bullet points, they're a huge improvement.
- I have a reasonably large screen and can't see the news section
without scrolling. To me this means there is no news ;)


I'm considering moving the news on the right-hand side.


I think it would be quite good to put it in the already existent sidebar 
- as I've already mentioned, I don't see the sidebar unless I really 
look for it (it looks too much like it's part of the background)... With 
a bit of tweaking I think you could make it more noticeable (without 
being intrusive) and have the twitter feed in there (thus saving 
horizontal space for those with small screens).


--
Robert
http://octarineparrot.com/


Re: Website message overhaul, pass 2

2011-11-20 Thread Robert Clipsham

On 20/11/2011 21:49, Vladimir Panteleev wrote:

The D Programming Language: Modern Convenience, Modeling Power, Native
Efficiency


I'm not sure about the capitalization


Too many capitals!

The D Programming Language: Modern convenience, modeling power, native 
efficiency.


The - Start of a sentence
D Programming Language - a noun.
Modern - comes after a colon.

--
Robert
http://octarineparrot.com/


Re: Website message overhaul, pass 2

2011-11-20 Thread Andrei Alexandrescu

On 11/20/11 5:43 PM, Robert Clipsham wrote:

I think it would be quite good to put it in the already existent sidebar
- as I've already mentioned, I don't see the sidebar unless I really
look for it (it looks too much like it's part of the background)... With
a bit of tweaking I think you could make it more noticeable (without
being intrusive) and have the twitter feed in there (thus saving
horizontal space for those with small screens).


Tried that, too narrow.

Andrei


Re: Website message overhaul, pass 2

2011-11-20 Thread Jonathan M Davis
On Sunday, November 20, 2011 23:47:42 Robert Clipsham wrote:
 On 20/11/2011 21:49, Vladimir Panteleev wrote:
  The D Programming Language: Modern Convenience, Modeling Power, Native
  Efficiency
  
  I'm not sure about the capitalization
 
 Too many capitals!
 
 The D Programming Language: Modern convenience, modeling power, native
 efficiency.
 
 The - Start of a sentence
 D Programming Language - a noun.
 Modern - comes after a colon.

I completly disagree. It's the title. You're _supposed_ to capitalize there. 
It looks just plain wrong to not capitalize those words. If it were in a 
sentence, that would be one thing, but titles follow different rules of 
capitalization.

- Jonathan M Davis


Re: Website message overhaul, pass 2

2011-11-20 Thread Jimmy Cao
2011/11/20 Jonathan M Davis jmdavisp...@gmx.com

 On Sunday, November 20, 2011 23:47:42 Robert Clipsham wrote:
  On 20/11/2011 21:49, Vladimir Panteleev wrote:
   The D Programming Language: Modern Convenience, Modeling Power, Native
   Efficiency
  
   I'm not sure about the capitalization
 
  Too many capitals!
 
  The D Programming Language: Modern convenience, modeling power, native
  efficiency.
 
  The - Start of a sentence
  D Programming Language - a noun.
  Modern - comes after a colon.

 I completly disagree. It's the title. You're _supposed_ to capitalize
 there.
 It looks just plain wrong to not capitalize those words. If it were in a
 sentence, that would be one thing, but titles follow different rules of
 capitalization.

 The biggest problem is the title's equal emphasis.  There should be a
colon.

What makes more sense?

Ducks. Tasty. Feathers. Buoyant.

or

Ducks:  Tasty, Feathers, Bouyant.


  1   2   3   4   >