Re: The book Programming in D is in beta

2011-11-14 Thread Alex Rønne Petersen

On 14-11-2011 08:00, Ali Çehreli wrote:

I have been translating my Turkish D book D Programlama Dili to
English under the title Programming in D. I have decided to make its
current state available online:

http://ddili.org/ders/d.en/index.html

I will make more chapters available as they get translated.

As the book is for the novice programmer, the chapters that have been
translated so far will not be very interesting to you. For that reason,
I have decided to skip a number of chapters and translate two from the
later ones as well:

Exceptions:

http://ddili.org/ders/d.en/exceptions.html

Ranges:

http://ddili.org/ders/d.en/ranges.html

I hadn't known that my English was so poor. :) Please be patient; the
text is being edited by an expert English speaker and will continuously
be updated as it gets corrected.

I welcome any feedback at acehr...@yahoo.com and of course here.

Thank you,
Ali


This is great news! We definitely need more literature on D.

- Alex


Re: The book Programming in D is in beta

2011-11-14 Thread Walter Bright

On 11/13/2011 11:00 PM, Ali Çehreli wrote:

I have been translating my Turkish D book D Programlama Dili to English under
the title Programming in D. I have decided to make its current state available
online:

http://ddili.org/ders/d.en/index.html

I will make more chapters available as they get translated.


Great work!

I also strongly suggest doing a Kindle version as well, even if you keep a free 
html version on the web. Having more D books on Amazon will help raise the 
profile of D.


Re: The book Programming in D is in beta

2011-11-14 Thread mta`chrono
 Great work!
 
 I also strongly suggest doing a Kindle version as well, even if you keep
 a free html version on the web. Having more D books on Amazon will help
 raise the profile of D.

Great work! Yes, offer a kindle version for 79 EUR and upload a free pdf
version in the name of a famous release group on usenet, torrent and
several warez site. I promise you, that you'll spread the world.


Re: Future D Language Port for Memristor Architectures?

2011-11-14 Thread Kagamin
J. Varghese Wrote:


 Memristors have properties that may allow it to replace DRAM, SRAM and Flash
 and even perform logic. In theory, a single memristor based chip could store
 and retrieve data like an SSD at the speed of DRAM and perform data processing
 as well. A block of memristors on this chip could serve as storage while other
 blocks of memristors function as logic and the functions of each block can be
 changed at any time.

Well... I believe, neural architectures already exist for quite a while.


Re: Future D Language Port for Memristor Architectures?

2011-11-14 Thread Nick Sabalausky
Kagamin s...@here.lot wrote in message 
news:j9rpjh$iuc$1...@digitalmars.com...
 J. Varghese Wrote:


 Memristors have properties that may allow it to replace DRAM, SRAM and 
 Flash
 and even perform logic. In theory, a single memristor based chip could 
 store
 and retrieve data like an SSD at the speed of DRAM and perform data 
 processing
 as well. A block of memristors on this chip could serve as storage while 
 other
 blocks of memristors function as logic and the functions of each block 
 can be
 changed at any time.

 Well... I believe, neural architectures already exist for quite a while.

Yea, I got one of 'em in my head. Talk about embedded!




Re: Website message overhaul

2011-11-14 Thread Tobias Pankrath
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


The Forums link points to a digitalmars.com page. I'd say, it shouldn't 
leave the site and point to a new page, that does only contain links to 
forums / newsgroups related to D, that are still active and interesting to
the newcomer.


Re: Website message overhaul

2011-11-14 Thread bearophile
Andrei Alexandrescu:

 What characteristic of D would you substitute as a major differentiating 
 feature?

In this specific case I suggest to remove the word power.

In general, I like D because I need a lot less time to write a correct program 
in D compared to C/C++, despite the lack of some D data structures. D helps me 
avoid mistakes.

A question for you and other people: what are the differences (in design goals, 
mostly) between Ada and D2?

Bye,
bearophile


A word to the wise

2011-11-14 Thread JimB
don't chug homr breerf beer, sip it 




Re: Website message overhaul

2011-11-14 Thread Vladimir Panteleev
On Mon, 14 Nov 2011 03:50:04 +0200, Andrei Alexandrescu  
seewebsiteforem...@erdani.org 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.


It's way too cheesy in my opinion. Reads like a desperate sales pitch.
Also, too much text - right now it looks like an unappealing wall of text.
Also, ads? Really? Are we so cheap that we can't even afford web hosting  
without annoying the user with often embarrassingly-irrelevant  
advertisements?


Compare with other programming language websites:

http://golang.org/
http://www.scala-lang.org/
http://www.ruby-lang.org/en/
http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/

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


Re: Website message overhaul

2011-11-14 Thread Timon Gehr

On 11/14/2011 02:50 AM, 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


Looks good, I think this is the right direction.

Nitpicks:

1.

// Type deduction works for function results. This is important for generic
// functions, such as min below, which works correctly for all comparable
// types.
auto min(T1, T2)(T1 lhs, T2 rhs) {
return rhs  lhs ? rhs : lhs;
}

It does not. The two types need to have a common type as well.

2.

The scope statement example should actually show transactional code. 
Otherwise the poor reader feels fooled into clicking See example.
Using scope(exit) to write something at function exit is useful for 
debugging, but scope(failure) is the real thing that is important to show.


3.

If contract inheritance is to be promoted on the front page (and it is 
certainly something that may attract developers), it should actually work.


4.

If we can find a less buzzy word than 'Multi-paradigm power' to describe 
D's multi-paradigm power, that would be nice, but I am also fine with 
the current state of affairs.


5.

The most important language features are not displayed at all. Where are 
Metaprogramming, CTFE and code generation? It sure is hard to come up 
with a short but convincing example, but I think we should try to.







that's a lie

2011-11-14 Thread JimB
I am not a liar. I guesss.I don't like being here, do I? 




I do this, I guess

2011-11-14 Thread JimB
It's not so bad. I have to be so bad so that you can see. 




Re: Website message overhaul

2011-11-14 Thread Timon Gehr

On 11/14/2011 10:10 AM, Vladimir Panteleev wrote:

On Mon, 14 Nov 2011 03:50:04 +0200, Andrei Alexandrescu
seewebsiteforem...@erdani.org 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.


It's way too cheesy in my opinion. Reads like a desperate sales pitch.
Also, too much text - right now it looks like an unappealing wall of text.
Also, ads? Really? Are we so cheap that we can't even afford web hosting
without annoying the user with often embarrassingly-irrelevant
advertisements?

Compare with other programming language websites:

http://golang.org/


Very nice, but there is not really much more to say about Go (on a front 
page), because it is so small.



http://www.scala-lang.org/


I did not like this at all when I was first looking for information 
about Scala.



http://www.ruby-lang.org/en/


It says I (love|*love*) ruby six times in a row. Cheesy enough =).


http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/



Same problem as scala-lang.org. Not enough interesting information/too 
much effort to get at it.


Did I post already!

2011-11-14 Thread JimB
This is very bad, well for me. What you do is very bad. That is why I 
hate you. 




Re: Website message overhaul

2011-11-14 Thread Andrea Fontana
I think most of programmers has an analytical mind. So IMHO a comparison
chart (with others programming languages) of features / benchmark /
how-tos will work better than a page filled of words. 

Il giorno lun, 14/11/2011 alle 10.15 +0100, Timon Gehr ha scritto:

 On 11/14/2011 02:50 AM, 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
 
 Looks good, I think this is the right direction.
 
 Nitpicks:
 
 1.
 
 // Type deduction works for function results. This is important for generic
 // functions, such as min below, which works correctly for all comparable
 // types.
 auto min(T1, T2)(T1 lhs, T2 rhs) {
  return rhs  lhs ? rhs : lhs;
 }
 
 It does not. The two types need to have a common type as well.
 
 2.
 
 The scope statement example should actually show transactional code. 
 Otherwise the poor reader feels fooled into clicking See example.
 Using scope(exit) to write something at function exit is useful for 
 debugging, but scope(failure) is the real thing that is important to show.
 
 3.
 
 If contract inheritance is to be promoted on the front page (and it is 
 certainly something that may attract developers), it should actually work.
 
 4.
 
 If we can find a less buzzy word than 'Multi-paradigm power' to describe 
 D's multi-paradigm power, that would be nice, but I am also fine with 
 the current state of affairs.
 
 5.
 
 The most important language features are not displayed at all. Where are 
 Metaprogramming, CTFE and code generation? It sure is hard to come up 
 with a short but convincing example, but I think we should try to.
 
 
 
 


Re: Website message overhaul

2011-11-14 Thread Timon Gehr

On 11/14/2011 10:37 AM, Andrea Fontana wrote:

I think most of programmers has an analytical mind.


I agree.


So IMHO a comparison
chart (with others programming languages) of features / benchmark /
how-tos will work better than a page filled of words.



I think this is a valid proposal, but an analytical mind is usually able 
to do comparisons with other known languages itself. There should maybe 
be a link to some benchmarks where the text says that D compiles to fast 
native code though.


I think the page should at least assume that the reader has some 
interest in informing himself about the language. It should just make 
that easy.


Re: Website message overhaul

2011-11-14 Thread Jonathan M Davis
On Monday, November 14, 2011 10:45:15 Timon Gehr wrote:
 On 11/14/2011 10:37 AM, Andrea Fontana wrote:
  I think most of programmers has an analytical mind.
 
 I agree.
 
  So IMHO a comparison
  chart (with others programming languages) of features / benchmark /
  how-tos will work better than a page filled of words.
 
 I think this is a valid proposal, but an analytical mind is usually able
 to do comparisons with other known languages itself. There should maybe
 be a link to some benchmarks where the text says that D compiles to fast
 native code though.
 
 I think the page should at least assume that the reader has some
 interest in informing himself about the language. It should just make
 that easy.

Having such a page is a good idea, but I don't know that it needs to be the 
front page. We don't want to overload it with data.

- Jonathan M Davis


Re: Website message overhaul

2011-11-14 Thread Andrea Fontana
Ok, but check this:

for( unsigned int i = 0; i  arr.size(); ++i) arr[i] = 10;   
vs  
arr[] = 10;

or

arr[0..1] = arr2[2..3];  

This examples (about arrays) are (almost) self-explanatory and very
impressive for a c/c++ coder. 

Same goes for strings, CTFE, parallelism, etc...


Il giorno lun, 14/11/2011 alle 10.45 +0100, Timon Gehr ha scritto:

 On 11/14/2011 10:37 AM, Andrea Fontana wrote:
  I think most of programmers has an analytical mind.
 
 I agree.
 
  So IMHO a comparison
  chart (with others programming languages) of features / benchmark /
  how-tos will work better than a page filled of words.
 
 
 I think this is a valid proposal, but an analytical mind is usually able 
 to do comparisons with other known languages itself. There should maybe 
 be a link to some benchmarks where the text says that D compiles to fast 
 native code though.
 
 I think the page should at least assume that the reader has some 
 interest in informing himself about the language. It should just make 
 that easy.


Re: Website message overhaul

2011-11-14 Thread Walter Bright

On 11/14/2011 1:37 AM, Andrea Fontana wrote:

I think most of programmers has an analytical mind. So IMHO a comparison chart
(with others programming languages) of features / benchmark / how-tos will
work better than a page filled of words.


There used to be a comparison chart. Everyone hated it.


enum - auto

2011-11-14 Thread so

Auto and immutable.
Can we please put an end to this issue?
I remember a few discussions, never a complete answer, but many  
contradicting answers.


1. Is enum (its current usage) still a temporary hack to a technical  
limitation on immutable?

2. Can or Will immutable replace enum? (Not that i want such a change)
3. Isn't enum a higher order immutable, which is guarantied to be a  
compile time constant?


--

Another issue, auto.
I was thinking that it works like C++0x auto.
Now i realize they are not that alike. Can anyone show me the D equivalent  
of the code below?


struct test {
int a;
};

void main() {
test tmp;
auto a = tmp.a;
}

Thanks.


Re: enum - auto

2011-11-14 Thread so

On Mon, 14 Nov 2011 12:14:02 +0200, so s...@so.so wrote:


Auto and immutable.


Uhm sorry, that should be Enum and immutable


Re: enum - auto

2011-11-14 Thread Dejan Lekic
You obviously did not pay attention to the recent thread about enums. You 
participated in it as well... Enums are different things from immutables. 
End of story.


Re: Website message overhaul

2011-11-14 Thread Dejan Lekic
Andrei, what attracted me to D some ... 7-8 years ago was the fact it is a 
*pragmatic* language. Modules, unittesting, design by contract, version 
keyword, much clearer syntax for templates where always on top of my list of 
D features.

Kind regards


Re: Website message overhaul

2011-11-14 Thread so

On Mon, 14 Nov 2011 11:45:15 +0200, Timon Gehr timon.g...@gmx.ch wrote:


On 11/14/2011 10:37 AM, Andrea Fontana wrote:

I think most of programmers has an analytical mind.


I agree.


I do not agree, most programmers have only one thing in common, they all  
are programmers and even that is questionable.


Re: enum - auto

2011-11-14 Thread Simen Kjærås

On Mon, 14 Nov 2011 11:14:02 +0100, so s...@so.so wrote:


Auto and immutable.
Can we please put an end to this issue?
I remember a few discussions, never a complete answer, but many  
contradicting answers.


1. Is enum (its current usage) still a temporary hack to a technical  
limitation on immutable?


Yes and no. Enum was chosen due to limitations in the linker, which made it
impossible to weed out unused constants. The linker is free to remove  
unused

constants, but DMD's linker will not do so. Perhaps in the future, it will.



2. Can or Will immutable replace enum? (Not that i want such a change)


Enum is now an established part of the language, and even if such were  
possible,

it is not going to happen.


3. Isn't enum a higher order immutable, which is guarantied to be a  
compile time constant?


One could think of it as such, yes. That hardly gives much advantage over
immutable, though. The main feature of enum is that it takes up no space  
in the

result binary.



Another issue, auto.
I was thinking that it works like C++0x auto.
Now i realize they are not that alike. Can anyone show me the D  
equivalent of the code below?


struct test {
 int a;
};

void main() {
 test tmp;
 auto a = tmp.a;
}


That would be a reference to an int, right? No such thing in D, except for
function parameters. What you would do instead is get a pointer:

struct test {
int a;
}

void main() {
test tmp;
auto a = tmp.a;
}


this is very bad

2011-11-14 Thread JimB
I am very bad because.. I'm not and I don't. It's very bad to be me. I 
haven't lived a day without someone I love very much... isn't that 
selfish. 




I dunno, I need your help

2011-11-14 Thread JimB
I don't owe you anything 




I drnk, but you suk

2011-11-14 Thread JimB
I really do. I hae your. 




I like being crazy

2011-11-14 Thread JimB
you are fucking stupid idiots, right? 




Re: Website message overhaul

2011-11-14 Thread so
On Mon, 14 Nov 2011 12:06:52 +0200, Walter Bright  
newshou...@digitalmars.com wrote:



On 11/14/2011 1:37 AM, Andrea Fontana wrote:
I think most of programmers has an analytical mind. So IMHO a  
comparison chart
(with others programming languages) of features / benchmark / how-tos  
will

work better than a page filled of words.


There used to be a comparison chart. Everyone hated it.


Not everyone, it was the first thing i checked, C++/C/C++0x comparison.


why I hate you

2011-11-14 Thread JimB
you are so smart now. you got your vote. you got your flag. you are 
wrong. 




maybe I want your help

2011-11-14 Thread JimB
maybe you should get the fuck out of my face 




Re: Website message overhaul

2011-11-14 Thread Walter Bright

On 11/14/2011 2:36 AM, so wrote:

On Mon, 14 Nov 2011 12:06:52 +0200, Walter Bright newshou...@digitalmars.com
wrote:


On 11/14/2011 1:37 AM, Andrea Fontana wrote:

I think most of programmers has an analytical mind. So IMHO a comparison chart
(with others programming languages) of features / benchmark / how-tos will
work better than a page filled of words.


There used to be a comparison chart. Everyone hated it.


Not everyone, it was the first thing i checked, C++/C/C++0x comparison.


Well, it's dead and will not be resurrected. The criticism of it was heavy, 
pitiless and unrelenting. And correct.


Re: Website message overhaul

2011-11-14 Thread Walter Bright

On 11/14/2011 2:27 AM, Dejan Lekic wrote:

Andrei, what attracted me to D some ... 7-8 years ago was the fact it is a
*pragmatic* language. Modules, unittesting, design by contract, version
keyword, much clearer syntax for templates where always on top of my list of
D features.


The idea for the front page is to list 3 concepts about D. Not 2, not 4, and 
most definitely not a laundry list. This is based on a fair amount of cognitive 
research.


Each concept can have 3 sub-aspects to it, etc.

So yes, D has a lot of features, and everyone has their favorites. The hard part 
is boiling it down to the 3 most essential and definitive concepts about D, and 
then to be able to summarize it into a tweet sized chunk of text.


If someone asks about D, and they get a long rambling list of features, they 
will tune out.




can you help me?

2011-11-14 Thread JimB
I can't see beyond getting drunk 




Re: Website message overhaul

2011-11-14 Thread Timon Gehr

On 11/14/2011 11:03 AM, Andrea Fontana wrote:

Ok, but check this:

for( unsigned int i = 0; i  arr.size(); ++i) arr[i] = 10;
vs
arr[] = 10;

or

arr[0..1] = arr2[2..3];

This examples (about arrays) are (almost) self-explanatory and very
impressive for a c/c++ coder.

Same goes for strings, CTFE, parallelism, etc...



I agree, those should totally be in an example somewhere. I was just 
saying that the C++ version does not strictly need to be there too.


I am bad every time I post

2011-11-14 Thread JimB
I work on problems and nevermind what you cannot have. It sucks to be me 
because , well maybe I'm not so bad. From a long far away place 
though.they have a lot to learn. 




please help me

2011-11-14 Thread JimB
I did not mean it 




I lie about everything

2011-11-14 Thread JimB
I get drunk a lot to. I don't know if it counts. I don't really care 
about your stuff... so fuck off 




please help me

2011-11-14 Thread JimB
you suck 




I don't know how to feel

2011-11-14 Thread JimB
something very bad happened, 




please help me

2011-11-14 Thread JimB
I love someone so much 




Re: enum - auto

2011-11-14 Thread Timon Gehr

On 11/14/2011 11:33 AM, Simen Kjærås wrote:

On Mon, 14 Nov 2011 11:14:02 +0100, so s...@so.so wrote:


Auto and immutable.
Can we please put an end to this issue?
I remember a few discussions, never a complete answer, but many
contradicting answers.

1. Is enum (its current usage) still a temporary hack to a technical
limitation on immutable?


Yes and no. Enum was chosen due to limitations in the linker, which made it
impossible to weed out unused constants. The linker is free to remove
unused
constants, but DMD's linker will not do so. Perhaps in the future, it will.



I guess this is not a problem on Linux. I still find the enum storage 
class to add significant value to the language.





2. Can or Will immutable replace enum? (Not that i want such a change)


Enum is now an established part of the language, and even if such were
possible,
it is not going to happen.



3. Isn't enum a higher order immutable, which is guarantied to be a
compile time constant?


static immutable variables are also guaranteed to be compile time 
constants. enum and immutable are not too tightly related.





One could think of it as such, yes. That hardly gives much advantage over
immutable, though. The main feature of enum is that it takes up no space
in the
result binary.



There are other important differences. enums are always treated like 
values, even if their type has reference semantics. (basically, that 
means their value is just copied each time they are referenced.) This is 
necessary to guarantee their constancy without restricting operations on 
their values.


Furthermore writing

enum x = foo(); // CTFE'd/compile time constant

is much more convenient than having to write

static immutable x = foo(); // CTFE'd/compile time constant

Even when ignoring the fact that the second one infects x with the 
'immutable' type qualifier.




Re: Class inheritance bug

2011-11-14 Thread Steven Schveighoffer
On Fri, 11 Nov 2011 17:51:38 -0500, Tobias M. tobia...@onlinehome.de  
wrote:



This does not link because there is no main function. main() is required
to link.

Note the Warning 134: No Start Address message

-Steve


Why has the lack of a main funcktion (or start address) something to do  
with unimplemented methods?


There are no unimplemented methods.  They just aren't being linked in.   
All is fixed with a main method.


If you wish to compile code without linking, you can do it via dmd -c.   
Then you will not get linker errors without a main method.


General rule of thumb -- if you are getting linker errors, most likely the  
issue is with your build (i.e. you aren't passing enough stuff on the  
command line, or in the right order).  The one exception is the main  
function, which is always expected by the linker, and must be provided by  
you (it's not in any library).


-Steve


Re: [D-Programming-Deimos] Review process?

2011-11-14 Thread Jude Young
Ok, I think that the ncurses bindings are about ready.
Just something to remember: ncurses is HUGE.

There are probably hidden bugs somewhere.  

So there are a few questions that I'd like answered before I send a 
pull request.
1. layout of the files.  I see that lzma is currently using C folder to 
house the C.h and deimos to house the .d files.
Is this the standard that all of the repos should follow?  I have 
simply put the .d files in the top level.
Which would be the preferred method?

2. What will be the criteria for deciding what gets into Deimos?  I 
understand not wanting to allow cruft and unsupportable bindings into 
Deimos, but at the same time, some of the projects would benefit
from bug reports.

3. Can we get a set standard way to request that a new repo be added?  
I have ZeroMQ ready, but I'm a little unsure who to contact about 
adding it.  I don't really want to bother anyone...



A little Problem translating a header file.

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

ok, so I've been working on ncurses.
It's pretty much complete, but one of the things that I think needs to
be worked on is the ACS vars.

The header file uses this:

extern NCURSES_EXPORT_VAR(chtype) acs_map[];

#define NCURSES_ACS(c)  (acs_map[NCURSES_CAST(unsigned char,c)])

/* VT100 symbols begin here */
#define ACS_ULCORNERNCURSES_ACS('l') /* upper left corner */
#define ACS_LLCORNERNCURSES_ACS('m') /* lower left corner */
#define ACS_URCORNERNCURSES_ACS('k') /* upper right corner */
#define ACS_LRCORNERNCURSES_ACS('j') /* lower right corner */

this way, you can simply type in, for example: addch(ACS_ULCORNER);
and it will print the appropriate character to the screen.

However, i've been struggling to come up with a way to allow this in
the D bindings.

The best that has been come up with (by Jon) is:
immutable enum ACS
{
/* VT100 symbols begin here */
ULCORNER  = 'l',
LLCORNER  = 'm',
URCORNER  = 'k',

to use it you have to type: addch(acs_map[ACS.ULCORNER]);


Is there an easy way to do this that I have been missing?
Preferably something that can be done at compile time, rather than
having to call a function manually?
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOwSAjAAoJENcHIWLyQiSl7hQH/26wD4/8Y3JUu61dY2s1KBp2
M2gpy8l3d7Qh+sXYMeEnRWzpEHaamHx8G6umuNEufFhbdC6Mc61aCFgyYePDoFXO
BUBhq2H1PwP2oyuKtDvxbrLEATh3CV/gHfxIg3r5YdzTboHA3HAvKPsTpftZgvIU
2KC1r4Moh7Z//AGYEg0+0Su2Dd7Q1ekpgG9g5f/md0sNNk4IYnv71dV3RJfkY1pE
APO89Ya2jZP3eR2D1ZMtnNUvfgvhD/Zuj61depNkQ9HOY+3adVOdMosQoj1YyeiU
+dEsEco0NaLjEfU69Ntu0qBOfscjBnnI7IvLSafyrZER+W879EYZbfPt5UqlMmo=
=DbnD
-END PGP SIGNATURE-


Re: Add 'd-programming-language' to the D newsgroups web pages

2011-11-14 Thread Armin Kazmi
Sorry to add OT-stuff here, but since you don't have a valid mail 
address placed down anywhere, Nick, I just wanted to state that your 
Goldie parsing system does not compile on 64 bit dmd due to the good 
old size_t vs uint for array sizes/inidices issue. Even after fixing 
these bugs goldie will crash with a range error. 

Plz respond to my mail address so we might fix that issue.

 Gor Gyolchanyan gor.f.gyolchan...@gmail.com wrote in message
 news:mailman.864.1321006800.24802.digitalmar...@puremagic.com...
 and
 community tools (i had to go through the pains of setting up google
 with this newsgroup to be able to use it at all).

 
 You can just use any normal NG client. It's no pain at all as long as 
you
 don't go using some web interface. 'Course, that said, a better 
official
 web interface to the NGs probably would be in D's best interest. 
That,
 plus suggestions (Opera, T-Bird, OE, etc) and instructions for real 
NG
 clients right there on the d site. ...And a clear notice that help 
with
 learning D belongs in D.learn, not here...



Re: Website message overhaul

2011-11-14 Thread Steven Schveighoffer
On Mon, 14 Nov 2011 05:49:41 -0500, Walter Bright  
newshou...@digitalmars.com wrote:



On 11/14/2011 2:36 AM, so wrote:
On Mon, 14 Nov 2011 12:06:52 +0200, Walter Bright  
newshou...@digitalmars.com

wrote:


On 11/14/2011 1:37 AM, Andrea Fontana wrote:
I think most of programmers has an analytical mind. So IMHO a  
comparison chart
(with others programming languages) of features / benchmark /  
how-tos will

work better than a page filled of words.


There used to be a comparison chart. Everyone hated it.


Not everyone, it was the first thing i checked, C++/C/C++0x comparison.


Well, it's dead and will not be resurrected. The criticism of it was  
heavy, pitiless and unrelenting. And correct.


http://www.d-programming-language.org/new/comparison.html

Although it's not comparing itself to anything.

Two comments on this page:

1. The chart is very tall and thin, it seems like a waste of space.   
Perhaps we could add a notes column to consolidate some of the  
descriptions later.
2. It should not be titled Comparison since there is no comparisons  
going on.  The title on the left is called Features.  That sounds much  
better.
3. Reading a lot of the notes on the bottom, it seems like it expects the  
chart to be comparing to C and C++.
4. Would it not be a valid place to list D1 features as well for  
comparison?


-Steve


Re: Website message overhaul

2011-11-14 Thread Steven Schveighoffer
On Mon, 14 Nov 2011 09:34:08 -0500, Steven Schveighoffer  
schvei...@yahoo.com wrote:


On Mon, 14 Nov 2011 05:49:41 -0500, Walter Bright  
newshou...@digitalmars.com wrote:



On 11/14/2011 2:36 AM, so wrote:
On Mon, 14 Nov 2011 12:06:52 +0200, Walter Bright  
newshou...@digitalmars.com

wrote:


On 11/14/2011 1:37 AM, Andrea Fontana wrote:
I think most of programmers has an analytical mind. So IMHO a  
comparison chart
(with others programming languages) of features / benchmark /  
how-tos will

work better than a page filled of words.


There used to be a comparison chart. Everyone hated it.


Not everyone, it was the first thing i checked, C++/C/C++0x comparison.


Well, it's dead and will not be resurrected. The criticism of it was  
heavy, pitiless and unrelenting. And correct.


http://www.d-programming-language.org/new/comparison.html

Although it's not comparing itself to anything.

Two comments on this page:


I mean 4 comments :P

Started out with 2 comments, but forgot to go back and edit this...

-Steve


Re: Website message overhaul

2011-11-14 Thread Nick Sabalausky
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message 
news:j9ps5n$30nq$1...@digitalmars.com...
 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.


Haven't had a chance to read through it yet, but initial observations:

Con: Examples are never visible without JS. There is *no* good technical or 
stylistic reason for that. Like I was just telling someone on D.announce, if 
you need something collapsible, the way you do it is by leaving it 
uncollapsed in the HTML/CSS. Then, if you really want JS users to see it 
collapsed by default, you collapse it *via JS* upon page load. Or just make 
use of the noscript tag. There is *never* any reason to do it any 
differently than that.

Con: I don't think it's a good stylistic choice to have *no* sample code at 
all on the main homepage without clicking. Put a good short snippet right 
there for everyone to always see. Doesn't have to be anything fancy or 
all-encompassing. You can look through other langauge's sites for 
inspiration - it's quickly becoming standard practice for languages to have 
a short example on their website's homepage. It's often not much more than a 
hello world, just to get a little taste of the language.

Con: The little icons after external links are ugly and unnecessary. First 
of all, this isn't a wiki. More importantly, if anyone actually cares what 
links go to a different site, they can already tell that by hovering. If 
you're doing it out of worry that people will think they're still on the 
same site, well, that's *very* 1990's, and it was merely absurd paranoia 
even back then. It's not much better than those god-awful sites that have 
those rediculous and patronizing you are now leaving our site screens.

Con: While I don't have any objection to there *being* Kindle versions of 
the docs, I strongly feel it doesn't deserve a place in the default sidebar. 
Call it a matter of pulling it's own weight. It's just not nearly 
significant enough, and it's easy enough (and perfectly sufficient) to have 
a link to the kindle version of the Book/Reference *on* the main page for 
the Book/Reference. Besides, we're not an Amazon advertisement here.

Plus: I don't see this new twitface element people are talking about. Yes, I 
realize *some* people like such sites, but that's no excuse for cramming it 
down *everyone's* face. Again, we're not here to be twitface's free 
advertising. So I like that whatever this new thing is isn't showing up.




Re: Website message overhaul

2011-11-14 Thread Nick Sabalausky
Walter Bright newshou...@digitalmars.com wrote in message 
news:j9qrpf$1lkt$1...@digitalmars.com...
 On 11/14/2011 2:36 AM, so wrote:
 On Mon, 14 Nov 2011 12:06:52 +0200, Walter Bright 
 newshou...@digitalmars.com
 wrote:

 On 11/14/2011 1:37 AM, Andrea Fontana wrote:
 I think most of programmers has an analytical mind. So IMHO a 
 comparison chart
 (with others programming languages) of features / benchmark / how-tos 
 will
 work better than a page filled of words.

 There used to be a comparison chart. Everyone hated it.

 Not everyone, it was the first thing i checked, C++/C/C++0x comparison.

 Well, it's dead and will not be resurrected. The criticism of it was 
 heavy, pitiless and unrelenting. And correct.

I found it to be a *huge* help when I first came across D. I always liked 
it.




Re: Website message overhaul

2011-11-14 Thread Nick Sabalausky
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message 
news:j9ps5n$30nq$1...@digitalmars.com...
 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.


I really think we need a link to the changelog. I can't even *find* a way to 
navigate to the changelog from d-p-l.org.




Re: Website message overhaul

2011-11-14 Thread Nick Sabalausky
Nick Sabalausky a@a.a wrote in message 
news:j9rbtd$2qqj$1...@digitalmars.com...
 Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message 
 news:j9ps5n$30nq$1...@digitalmars.com...
 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.


 I really think we need a link to the changelog. I can't even *find* a way 
 to navigate to the changelog from d-p-l.org.


Speaking of the changelog, the d-p-l.org version of the changelog (which I 
had to get to by typing in the URL directly) is showing 2.056 as completely 
blank:

http://www.d-programming-language.org/changelog.html

Also, the justified-text should probably be disabled for this page since it 
just doesn't work well for this type of content. In particular, see the 
New/Changed Features section for 2.055. Most of it looks fine since the 
lines aren't long enough to wrap (in which case the justification isn't even 
doing *anything*), but then there's this absolutely hideous line in the 
middle that says The  names   of   the 
values   of   std.mmfile.Mode,...




Re: State of LDC

2011-11-14 Thread Ruslan Mullakhmetov

On 2011-11-12 11:29:51 +, Jonas Drewsen said:

dlang.org actually contains a copy of d-p-l.org. Maybe the owner of 
dlang.org is willing to let digitalmars take over that domain and make 
it the official domain. That would be much better that d-p-l.org I 
think.


Wow! I didn't know. that's good.
--
BR, Ruslan Mullakhmetov



Re: Website message overhaul

2011-11-14 Thread Andrej Mitrovic
On 11/14/11, Nick Sabalausky a@a.a wrote:
 I really think we need a link to the changelog. I can't even *find* a way to
 navigate to the changelog from d-p-l.org.

That's because Download  Tools
(http://d-programming-language.org/download.html) redirects to
http://www.digitalmars.com/d/download.html , even though there's a
whole subcategory section as found here:
http://d-programming-language.org/dmd-linux.html

I think I've already reported this but nothing was done about it, or
it was shot down, I don't really recall. But each of those DMD
Linux/Win/OSX pages links to
http://www.digitalmars.com/d/download.html via the Download D
Compiler link, so there's no reason Download  Tools should link
directly to http://www.digitalmars.com/d/download.html.


Re: Website message overhaul

2011-11-14 Thread Andrej Mitrovic
On 11/14/11, Andrej Mitrovic andrej.mitrov...@gmail.com wrote:
 so there's no reason Download  Tools should link
 directly to http://www.digitalmars.com/d/download.html.

And because it redirects to that page you can't find information on
what compiler arguments you can pass. This is a serious flaw imho.


Re: A little Problem translating a header file.

2011-11-14 Thread Kagamin
Jude Young Wrote:

 /* VT100 symbols begin here */
 #define ACS_ULCORNERNCURSES_ACS('l') /* upper left corner */
 #define ACS_LLCORNERNCURSES_ACS('m') /* lower left corner */
 #define ACS_URCORNERNCURSES_ACS('k') /* upper right corner */
 #define ACS_LRCORNERNCURSES_ACS('j') /* lower right corner */
 
 immutable enum ACS
 {
 /* VT100 symbols begin here */
 ULCORNER  = 'l',
 LLCORNER  = 'm',
 URCORNER  = 'k',
 
 to use it you have to type: addch(acs_map[ACS.ULCORNER]);

addch_map(ubyte c)
{ addch(acs_map[c]); }

or

 immutable enum ACS
 {
 /* VT100 symbols begin here */
 ULCORNER  = NCURSES_ACS('l'),
 LLCORNER  = NCURSES_ACS('m'),
 URCORNER  = NCURSES_ACS('k'),

should be CTFE'able if acs_map is immutable and known at compile time.


Re: meaning import order?

2011-11-14 Thread Nick Sabalausky
Alexey Veselovsky alexey.veselov...@gmail.com wrote in message 
news:mailman.928.1321256527.24802.digitalmar...@puremagic.com...
 =
 $ cat main.d
 import std = std.stdio;
 import std.socket;
 import std.array;
 import std.getopt;

 void main() { std.writeln(bar);}
 ==

 compiles ok. But:

 import std.socket;
 import std.array;
 import std.getopt;
 import std = std.stdio;

 void main() { std.writeln(bar);}

 $ dmd main.d
 main.d(6): Error: undefined identifier package std.writeln

 wtf?

Looks like a bug, you should file it at http://d.puremagic.com/issues/

It might have something to do with an existing bug with renamed imports.




Re: Website message overhaul

2011-11-14 Thread Robert Clipsham

On 14/11/2011 01:50, 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


 - From the first look at the page it's a big block of text with no
   code. Very off putting from a programming language home page.
- My advise here would be to *just* show the key bullet points,
  click for more information.
 - It's covered in buzz words. Are you trying to appeal to managers or
   programmers?
 - See example. is actually show/hide example, the text should
   reflect this.
 - Community
- Maybe mention the IRC channel #D on freenode.
- There's no need for the Walter Bright name-drop, particularly in
  a community section (Walter is not the community!)
 - Contribute
- First thing I see is a bullet pointed list of compilers, DMD is
  not listed, perhaps the surrounding text needs to be re-worded
- inconsistent capitalization of (C|c)ompiler
- Definitely needs a Fork us on github banner of some sort

A key thing I find missing is code - the first thing I want to see when 
I visit the home page of a new language is sample code.


My advise here would be to always have a code section on one side, then 
have more information on the other, describing what the code is 
demonstrating. Something like http://imgur.com/QL619 where the right 
hand side would have code, the left hand side your 3 key points.


--
Robert
http://octarineparrot.com/


Re: enum - auto

2011-11-14 Thread Timon Gehr

On 11/14/2011 11:21 AM, Dejan Lekic wrote:

You obviously did not pay attention to the recent thread about enums. You
participated in it as well... Enums are different things from immutables.
End of story.


I think discussing the matter does not hurt.


[OT] Goldie 64-bit (was: Add 'd-programming-language' to the D newsgroups web pages)

2011-11-14 Thread Nick Sabalausky
Armin Kazmi armin.ka...@tu-dortmund.de wrote in message 
news:j9r8s8$2ktq$1...@digitalmars.com...
 Sorry to add OT-stuff here, but since you don't have a valid mail
 address placed down anywhere, Nick, I just wanted to state that your
 Goldie parsing system does not compile on 64 bit dmd due to the good
 old size_t vs uint for array sizes/inidices issue. Even after fixing
 these bugs goldie will crash with a range error.

 Plz respond to my mail address so we might fix that issue.


Ahh, thanks. I don't have a 64-bit system ATM, so that's how the problem 
crept in. Although I think I might at least have access to a 64-bit machine 
though, I should check...

I do have issue tracking for Goldie here:

View Tickets: http://www.dsource.org/projects/goldie/report
Add Ticket: http://www.dsource.org/projects/goldie/newticket

We should probably keep the discussion there unless there's a reason you'd 
prefer to keep it private.

In either case, I'll directly email you a copy of this message in case 
you're not monitoring this thread any more.




Re: [OT] Goldie 64-bit (was: Add 'd-programming-language' to the D newsgroups web pages)

2011-11-14 Thread Nick Sabalausky
Nick Sabalausky a@a.a wrote in message 
news:j9rq36$k0n$1...@digitalmars.com...
 Armin Kazmi armin.ka...@tu-dortmund.de wrote in message 
 news:j9r8s8$2ktq$1...@digitalmars.com...
 Sorry to add OT-stuff here, but since you don't have a valid mail
 address placed down anywhere, Nick, I just wanted to state that your
 Goldie parsing system does not compile on 64 bit dmd due to the good
 old size_t vs uint for array sizes/inidices issue. Even after fixing
 these bugs goldie will crash with a range error.

 Plz respond to my mail address so we might fix that issue.


 Ahh, thanks. I don't have a 64-bit system ATM, so that's how the problem 
 crept in. Although I think I might at least have access to a 64-bit 
 machine though, I should check...

 I do have issue tracking for Goldie here:

 View Tickets: http://www.dsource.org/projects/goldie/report
 Add Ticket: http://www.dsource.org/projects/goldie/newticket

 We should probably keep the discussion there unless there's a reason you'd 
 prefer to keep it private.

 In either case, I'll directly email you a copy of this message in case 
 you're not monitoring this thread any more.


I've created an ticket for this issue: 
http://www.dsource.org/projects/goldie/ticket/20




Re: Website message overhaul

2011-11-14 Thread Andrei Alexandrescu

On 11/13/11 11:27 PM, Jacob Carlborg wrote:

On 2011-11-14 02:50, 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


No mention of metaprogramming?


It's part of the multi-paradigm point, but it should be better 
substantiated.



May I suggest adding a Fork me on GitHub banner.


Good idea.


Andrei


Re: Website message overhaul

2011-11-14 Thread Andrei Alexandrescu

On 11/14/11 12:07 AM, Tobias Pankrath wrote:

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



The Forums link points to a digitalmars.com page. I'd say, it shouldn't
leave the site and point to a new page, that does only contain links to
forums / newsgroups related to D, that are still active and interesting to
the newcomer.


Yes, we plan to migrate the groups and downloads page to d-p-l.org.

Thanks,

Andrei


Re: Website message overhaul

2011-11-14 Thread Michel Fortin
On 2011-11-14 01:50:04 +, Andrei Alexandrescu 
seewebsiteforem...@erdani.org said:


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.


I kind of like it, the structure. I don't like the visual presentation 
(but I understand that will come later). But most of all I think you're 
being too wordy.


(I haven't read most of the thread yet, so sorry if I am just repeating 
what others have said.)


Just take the three main points:

- Modern convenience
- Multi-paradigm power
- Native efficiency

That's all mixed up. Either use use these three *qualifiers*:

- Modern
- Multi-paradigm
- Native

Or these three *goals*:

- Convenience
- Power
- Efficiency

But matching each goal with a qualifier/feature makes things more 
confusing. At least for me, it automatically raise a bullshit flag in 
my head. Just answer this: why does the *multi-paradigm* feature bring 
power specifically? Couldn't it bring efficiency or convenience instead 
or in addition to power? How many ways could you combine words from 
these two lists and it'd still mean the same thing?


--
Michel Fortin
michel.for...@michelf.com
http://michelf.com/



Re: Website message overhaul

2011-11-14 Thread Andrei Alexandrescu

On 11/14/11 1:10 AM, Vladimir Panteleev wrote:

On Mon, 14 Nov 2011 03:50:04 +0200, Andrei Alexandrescu
seewebsiteforem...@erdani.org 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.


It's way too cheesy in my opinion. Reads like a desperate sales pitch.
Also, too much text - right now it looks like an unappealing wall of text.
Also, ads? Really? Are we so cheap that we can't even afford web hosting
without annoying the user with often embarrassingly-irrelevant
advertisements?

Compare with other programming language websites:

http://golang.org/
http://www.scala-lang.org/
http://www.ruby-lang.org/en/
http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/


There was more text on the page before, including a code example that 
wasn't very illustrative.


While working on the homepage I kept an eye on those websites and others 
(Perl, Java) and my perception is that the proposed website compares 
well with others.


Regarding ads, this is my I told you moment. I am completely opposed 
to ads anywhere on d-p-l.org, and I believe their presence hurts us in 
ways that the cost savings doesn't even begin to cover. I see it as a 
textbook case of penny wise. That being said, Walter agreed with 
removing ads from the homepage but not the other parts of the site. I 
didn't get to that yet.



Andrei


Re: Website message overhaul

2011-11-14 Thread Andrei Alexandrescu

On 11/14/11 1:15 AM, Timon Gehr wrote:

Looks good, I think this is the right direction.

Nitpicks:

1.

// Type deduction works for function results. This is important for generic
// functions, such as min below, which works correctly for all comparable
// types.
auto min(T1, T2)(T1 lhs, T2 rhs) {
return rhs  lhs ? rhs : lhs;
}

It does not. The two types need to have a common type as well.


It's difficult to be concise and complete simultaneously. The underlying 
assumption is that if two types are comparable, they also have a common 
type.



2.

The scope statement example should actually show transactional code.
Otherwise the poor reader feels fooled into clicking See example.
Using scope(exit) to write something at function exit is useful for
debugging, but scope(failure) is the real thing that is important to show.


Good point.


3.

If contract inheritance is to be promoted on the front page (and it is
certainly something that may attract developers), it should actually work.


Absolutely.


4.

If we can find a less buzzy word than 'Multi-paradigm power' to describe
D's multi-paradigm power, that would be nice, but I am also fine with
the current state of affairs.

5.

The most important language features are not displayed at all. Where are
Metaprogramming, CTFE and code generation? It sure is hard to come up
with a short but convincing example, but I think we should try to.


Those would be under the multi-paradigm thingie.


Andrei


Re: Website message overhaul

2011-11-14 Thread Vladimir Panteleev
On Mon, 14 Nov 2011 21:45:58 +0200, Andrei Alexandrescu  
seewebsiteforem...@erdani.org wrote:


There was more text on the page before, including a code example that  
wasn't very illustrative.


Most other front pages are still more varied and dynamic.
What happened with the ideas to have the latest commits / newsgroup topics  
/ etc. in a box on the front page?


Regarding ads, this is my I told you moment. I am completely opposed  
to ads anywhere on d-p-l.org, and I believe their presence hurts us in  
ways that the cost savings doesn't even begin to cover. I see it as a  
textbook case of penny wise. That being said, Walter agreed with  
removing ads from the homepage but not the other parts of the site. I  
didn't get to that yet.


There's also a moral issue here. Except for the articles he's written,  
Walter is basically monetizing the work of everyone who's contributed to  
D. If it were just a matter of hosting, I'm sure there are many from our  
community who would gladly provide it.


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


Re: Website message overhaul

2011-11-14 Thread Andrei Alexandrescu

On 11/14/11 7:23 AM, Nick Sabalausky wrote:

Andrei Alexandrescuseewebsiteforem...@erdani.org  wrote in message
news:j9ps5n$30nq$1...@digitalmars.com...

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.



I really think we need a link to the changelog. I can't even *find* a way to
navigate to the changelog from d-p-l.org.


Good idea.

Andrei


Re: Website message overhaul

2011-11-14 Thread Andrei Alexandrescu

On 11/14/11 7:11 AM, Nick Sabalausky wrote:

Con: Examples are never visible without JS. There is *no* good technical or
stylistic reason for that. Like I was just telling someone on D.announce, if
you need something collapsible, the way you do it is by leaving it
uncollapsed in the HTML/CSS. Then, if you really want JS users to see it
collapsed by default, you collapse it *via JS* upon page load. Or just make
use of the noscript tag. There is *never* any reason to do it any
differently than that.


I'm not sure what to do about catering for people who disable JS. Other 
language sites (Go, Scala) do use JS and at least Go is unprepared for 
it being disabled. Scala seems to have a designed fallback mode.


A reasonable question is what percentage of people have Javascript 
disabled. I ran this query:


https://www.google.com/search?gcx=wsourceid=chromeie=UTF-8q=percentage+javascript+disabled+browsers

After looking through the top answers I inferred that the percentage is 
around 2% and declining.



Con: I don't think it's a good stylistic choice to have *no* sample code at
all on the main homepage without clicking. Put a good short snippet right
there for everyone to always see. Doesn't have to be anything fancy or
all-encompassing. You can look through other langauge's sites for
inspiration - it's quickly becoming standard practice for languages to have
a short example on their website's homepage. It's often not much more than a
hello world, just to get a little taste of the language.


Okay.


Con: The little icons after external links are ugly and unnecessary. First
of all, this isn't a wiki. More importantly, if anyone actually cares what
links go to a different site, they can already tell that by hovering. If
you're doing it out of worry that people will think they're still on the
same site, well, that's *very* 1990's, and it was merely absurd paranoia
even back then. It's not much better than those god-awful sites that have
those rediculous and patronizing you are now leaving our site screens.


I added that only to further distinguish See example which keeps you 
on the page from Read more which takes you out.



Con: While I don't have any objection to there *being* Kindle versions of
the docs, I strongly feel it doesn't deserve a place in the default sidebar.
Call it a matter of pulling it's own weight. It's just not nearly
significant enough, and it's easy enough (and perfectly sufficient) to have
a link to the kindle version of the Book/Reference *on* the main page for
the Book/Reference. Besides, we're not an Amazon advertisement here.


Okay.


Plus: I don't see this new twitface element people are talking about. Yes, I
realize *some* people like such sites, but that's no excuse for cramming it
down *everyone's* face. Again, we're not here to be twitface's free
advertising. So I like that whatever this new thing is isn't showing up.


You'd probably see it if you enabled javascript. The idea is that 
streaming Twitter news adds dynamism to the page, which encourages 
repeat visits. I don't see anything wrong with using such a technology 
to keep people informed. We're not in the business of creating news 
aggregators.



Andrei


Re: Website message overhaul

2011-11-14 Thread Vladimir Panteleev
On Mon, 14 Nov 2011 22:01:49 +0200, Andrei Alexandrescu  
seewebsiteforem...@erdani.org wrote:


After looking through the top answers I inferred that the percentage is  
around 2% and declining.


This is a bad measurement. Technically-inclined people are more likely to  
fine-tune their web browsing experience. The best metrics would be of  
d-p-l.org visitors.


However, making the website accessible without JS is so easy, it's not  
really worth arguing about.


Reminder: there are people in this community (myself included) who have  
web programming experience and would gladly help out. Don't be afraid to  
ask.


You'd probably see it if you enabled javascript. The idea is that  
streaming Twitter news adds dynamism to the page, which encourages  
repeat visits. I don't see anything wrong with using such a technology  
to keep people informed. We're not in the business of creating news  
aggregators.


Speaking of which, the twitter widget needs to be placed in an iframe so  
that it doesn't block the page load (inline scripts cause browsers to stop  
parsing the page until the script is loaded and executed, which creates a  
network dependency on a website we don't control).


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


Re: Website message overhaul

2011-11-14 Thread Andrei Alexandrescu

On 11/14/11 10:11 AM, Andrej Mitrovic wrote:

On 11/14/11, Nick Sabalauskya@a.a  wrote:

I really think we need a link to the changelog. I can't even *find*
a way to navigate to the changelog from d-p-l.org.


That's because Download  Tools
(http://d-programming-language.org/download.html) redirects to
http://www.digitalmars.com/d/download.html , even though there's a
whole subcategory section as found here:
http://d-programming-language.org/dmd-linux.html

I think I've already reported this but nothing was done about it, or
it was shot down, I don't really recall. But each of those DMD
Linux/Win/OSX pages links to
http://www.digitalmars.com/d/download.html via the Download D
Compiler link, so there's no reason Download  Tools should link
directly to http://www.digitalmars.com/d/download.html.


We will take care of this. From an email I wrote on Sunday:


4. We must make Download simpler and more direct. Downloads 
Tools on the right-hand site is small and has a diluted message. I
want people who visit the homepage to see a prominent button offering
immediate download of the compiler for their OS.



Andrei


Re: Website message overhaul

2011-11-14 Thread Andrei Alexandrescu

On 11/14/11 10:13 AM, Andrej Mitrovic wrote:

On 11/14/11, Andrej Mitrovicandrej.mitrov...@gmail.com  wrote:

so there's no reason Download  Tools should link
directly to http://www.digitalmars.com/d/download.html.


And because it redirects to that page you can't find information on
what compiler arguments you can pass. This is a serious flaw imho.


I don't understand this.

Andrei


Re: Website message overhaul

2011-11-14 Thread Andrei Alexandrescu

On 11/14/11 11:04 AM, Robert Clipsham wrote:

- From the first look at the page it's a big block of text with no
code. Very off putting from a programming language home page.


I think the current page with a big block of code is quite unappealing, 
too.



- My advise here would be to *just* show the key bullet points,
click for more information.


Duly noted.


- It's covered in buzz words. Are you trying to appeal to managers or
programmers?


Programmers. Of the language sites I looked at, scala-lang.org looked 
the most corporate-y.


We are trying to convey the key advantages of D in few words. If we used 
weaker words, the message would be, well, weak. The point is that we 
really have something to show under each buzzword.



- See example. is actually show/hide example, the text should
reflect this.


Hm, that should change when expanded. More work for me, sigh.


- Community
- Maybe mention the IRC channel #D on freenode.


Yah, forgot


- There's no need for the Walter Bright name-drop, particularly in
a community section (Walter is not the community!)


Walter is the most prominent member of the community. I think the 
mention is entirely appropriate. In particular, we noted that the old 
site doesn't mention Walter as the creator of D, and that many people 
don't know who invented D.



- Contribute
- First thing I see is a bullet pointed list of compilers, DMD is
not listed, perhaps the surrounding text needs to be re-worded


The idea is that there'd be copious download links before that point (to 
be added).



- inconsistent capitalization of (C|c)ompiler


OK.


- Definitely needs a Fork us on github banner of some sort


OK.


A key thing I find missing is code - the first thing I want to see when
I visit the home page of a new language is sample code.


OK.


My advise here would be to always have a code section on one side, then
have more information on the other, describing what the code is
demonstrating. Something like http://imgur.com/QL619 where the right
hand side would have code, the left hand side your 3 key points.


Thanks!


Andrei


Re: Website message overhaul

2011-11-14 Thread Andrei Alexandrescu

On 11/14/11 11:41 AM, Michel Fortin wrote:

On 2011-11-14 01:50:04 +, Andrei Alexandrescu
seewebsiteforem...@erdani.org said:


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.


I kind of like it, the structure. I don't like the visual presentation
(but I understand that will come later). But most of all I think you're
being too wordy.

(I haven't read most of the thread yet, so sorry if I am just repeating
what others have said.)

Just take the three main points:

- Modern convenience
- Multi-paradigm power
- Native efficiency

That's all mixed up. Either use use these three *qualifiers*:

- Modern
- Multi-paradigm
- Native

Or these three *goals*:

- Convenience
- Power
- Efficiency


It's a good idea to keep the top message as is and then eliminate the 
goals from the bullet points.



But matching each goal with a qualifier/feature makes things more
confusing. At least for me, it automatically raise a bullshit flag in my
head. Just answer this: why does the *multi-paradigm* feature bring
power specifically?


Because it allows you to model difficult problem domains.


Couldn't it bring efficiency or convenience instead
or in addition to power?


It could, but that would be secondary at best.


How many ways could you combine words from
these two lists and it'd still mean the same thing?


Not many.


Andrei


Re: Website message overhaul

2011-11-14 Thread Adam D. Ruppe
The cost of supporting non-scripted browsing is virtually zero.
There's really no reason not to, even if Nick and I are the only
people left on Earth who disable javascript!


Re: Website message overhaul

2011-11-14 Thread Andrei Alexandrescu

On 11/14/11 12:09 PM, Vladimir Panteleev wrote:

On Mon, 14 Nov 2011 22:01:49 +0200, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:


After looking through the top answers I inferred that the percentage
is around 2% and declining.


This is a bad measurement. Technically-inclined people are more likely
to fine-tune their web browsing experience. The best metrics would be of
d-p-l.org visitors.

However, making the website accessible without JS is so easy, it's not
really worth arguing about.

Reminder: there are people in this community (myself included) who have
web programming experience and would gladly help out. Don't be afraid to
ask.


By this I am asking. Let's do this - finish this pass, and then make 
sure things work properly without javascript. From what I understand 
that's not difficult.



You'd probably see it if you enabled javascript. The idea is that
streaming Twitter news adds dynamism to the page, which encourages
repeat visits. I don't see anything wrong with using such a technology
to keep people informed. We're not in the business of creating news
aggregators.


Speaking of which, the twitter widget needs to be placed in an iframe so
that it doesn't block the page load (inline scripts cause browsers to
stop parsing the page until the script is loaded and executed, which
creates a network dependency on a website we don't control).


Yah, good point. That raises additional issues but probably needs to be 
done at some point.



Andrei


Re: Website message overhaul

2011-11-14 Thread Andrei Alexandrescu

On 11/14/11 11:55 AM, Vladimir Panteleev wrote:

On Mon, 14 Nov 2011 21:45:58 +0200, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:


There was more text on the page before, including a code example that
wasn't very illustrative.


Most other front pages are still more varied and dynamic.
What happened with the ideas to have the latest commits / newsgroup
topics / etc. in a box on the front page?


What happened is that nobody took those to completion. I did all I could 
in a limited amount of time. My focus was the message more than the 
presentation.



Regarding ads, this is my I told you moment. I am completely opposed
to ads anywhere on d-p-l.org, and I believe their presence hurts us in
ways that the cost savings doesn't even begin to cover. I see it as a
textbook case of penny wise. That being said, Walter agreed with
removing ads from the homepage but not the other parts of the site. I
didn't get to that yet.


There's also a moral issue here. Except for the articles he's written,
Walter is basically monetizing the work of everyone who's contributed to
D.


I think that's an exaggeration.


Andrei



Re: Website message overhaul

2011-11-14 Thread Adam D. Ruppe
Is the site source on the github?

We could always go back and fix the code/script issues later with
a pull request.


Re: Website message overhaul

2011-11-14 Thread Andrej Mitrovic
On 11/14/11, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote:
 On 11/14/11 10:13 AM, Andrej Mitrovic wrote:
 On 11/14/11, Andrej Mitrovicandrej.mitrov...@gmail.com  wrote:
 so there's no reason Download  Tools should link
 directly to http://www.digitalmars.com/d/download.html.

 And because it redirects to that page you can't find information on
 what compiler arguments you can pass. This is a serious flaw imho.

 I don't understand this.

 Andrei


I just meant if there's no link to the compiler information page (e.g.
http://d-programming-language.org/dmd-linux.html), then people can't
really figure out how to use DMD. And Downloads  Tools is supposed
to link there.

But it's getting fixed, so that's good.


Re: Website message overhaul

2011-11-14 Thread Vladimir Panteleev
On Mon, 14 Nov 2011 22:16:11 +0200, Andrei Alexandrescu  
seewebsiteforem...@erdani.org wrote:



On 11/14/11 11:55 AM, Vladimir Panteleev wrote:

On Mon, 14 Nov 2011 21:45:58 +0200, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:


There was more text on the page before, including a code example that
wasn't very illustrative.


Most other front pages are still more varied and dynamic.
What happened with the ideas to have the latest commits / newsgroup
topics / etc. in a box on the front page?


What happened is that nobody took those to completion. I did all I could  
in a limited amount of time. My focus was the message more than the  
presentation.


I could easily do the technical part (I already have something that  
announces GitHub events, newsgroup and twitter posts on the #d IRC  
channel).


Should it be multiple boxes, or one single feed? I could format it as a  
single chronological list, with multiple syndicated sources. (Icons can be  
used to visually distinguish event sources.)


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


Re: Website message overhaul

2011-11-14 Thread Robert Clipsham

On 14/11/2011 20:12, Andrei Alexandrescu wrote:

On 11/14/11 11:04 AM, Robert Clipsham wrote:

- From the first look at the page it's a big block of text with no
code. Very off putting from a programming language home page.


I think the current page with a big block of code is quite unappealing,
too.


Well neither is ideal! It'll probably take some fine-tuning to get the 
right balance.



- My advise here would be to *just* show the key bullet points,
click for more information.


Duly noted.


I always found this really annoying (though it seems to work well for a 
lot of things) - having an automatic scroll through the bullet points 
showing them in more detail could work though.



- It's covered in buzz words. Are you trying to appeal to managers or
programmers?


Programmers. Of the language sites I looked at, scala-lang.org looked
the most corporate-y.

We are trying to convey the key advantages of D in few words. If we used
weaker words, the message would be, well, weak. The point is that we
really have something to show under each buzzword.


few words + little code = big impact

At least in my opinion. I know this differs a lot, but most of my 
generation don't read more than a few words on screen unless they have 
to, their eyes jump almost immediately to what they want to see. Having 
some code and some text is probably the best way to simplify this.



- See example. is actually show/hide example, the text should
reflect this.


Hm, that should change when expanded. More work for me, sigh.


It's only a couple of lines of code ;)


- Community
- Maybe mention the IRC channel #D on freenode.


Yah, forgot


- There's no need for the Walter Bright name-drop, particularly in
a community section (Walter is not the community!)


Walter is the most prominent member of the community. I think the
mention is entirely appropriate. In particular, we noted that the old
site doesn't mention Walter as the creator of D, and that many people
don't know who invented D.


I challenge you to find a programming language website that mentions the 
creator on the front page. It's not that I don't think Walter deserves 
credit for his work, just that I don't deem it such an important detail 
that it needs to be on the homepage.


Also, should D gain popularity I foresee Walter being bombarded with 
direct questions rather than them coming to the community who are just 
as qualified to answer a lot of them - having his name on the front page 
won't help this :)


--
Robert
http://octarineparrot.com/


Re: Website message overhaul

2011-11-14 Thread Timon Gehr

On 11/14/2011 08:47 PM, Andrei Alexandrescu wrote:

On 11/14/11 1:15 AM, Timon Gehr wrote:

Looks good, I think this is the right direction.

Nitpicks:

1.

// Type deduction works for function results. This is important for
generic
// functions, such as min below, which works correctly for all comparable
// types.
auto min(T1, T2)(T1 lhs, T2 rhs) {
return rhs  lhs ? rhs : lhs;
}

It does not. The two types need to have a common type as well.


It's difficult to be concise and complete simultaneously. The underlying
assumption is that if two types are comparable, they also have a common
type.


hm, maybe call the them 'compatible comparable types'?




2.

The scope statement example should actually show transactional code.
Otherwise the poor reader feels fooled into clicking See example.
Using scope(exit) to write something at function exit is useful for
debugging, but scope(failure) is the real thing that is important to
show.


Good point.


3.

If contract inheritance is to be promoted on the front page (and it is
certainly something that may attract developers), it should actually
work.


Absolutely.


There has been disagreement on whether or not my bug report on the 
matter was valid.


What it means for your example:

// Interfaces and classe
interface Printable {
void print(uint level)
in { assert(level  0); } // contract is part of the interface
}

// Interface implementation
class Widget : Printable {
void print(uint level) { ... }
}

void main(){
Widget w = new Widget();
w.print(0); // passes through, but should not
}

Can you state in the issue tracker that the bug report is valid?
http://d.puremagic.com/issues/show_bug.cgi?id=6856





4.

If we can find a less buzzy word than 'Multi-paradigm power' to describe
D's multi-paradigm power, that would be nice, but I am also fine with
the current state of affairs.

5.

The most important language features are not displayed at all. Where are
Metaprogramming, CTFE and code generation? It sure is hard to come up
with a short but convincing example, but I think we should try to.


Those would be under the multi-paradigm thingie.



Ok. Maybe there could be a few LOC demonstrating the 'recurrence' 
function generating a few fibonacci numbers. I think it is a nice 
showcase, although I have never needed that particular function in real 
code :o). It has also the potential of showing Phobos' lazy functional 
style features. But unfortunately, most functional programmers will 
shriek for a moment when they see the argument order of 'take'.







Re: Website message overhaul

2011-11-14 Thread Adam D. Ruppe
Vladimir Panteleev wrote:
 I could easily do the technical part 

If you like, I can send you the code from my
implementation of the last idea too.

You can see it live here:
http://arsdnet.net/d-web-site/

It's all written in D too, but I haven't updated
it for months.

(and lol, my crappy web newsreader that I never finished
works much better than the one on digitalmars.com!

At least mine actually loads every time.)


Re: Website message overhaul

2011-11-14 Thread Timon Gehr

On 11/14/2011 08:41 PM, Michel Fortin wrote:

On 2011-11-14 01:50:04 +, Andrei Alexandrescu
seewebsiteforem...@erdani.org said:


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.


I kind of like it, the structure. I don't like the visual presentation
(but I understand that will come later). But most of all I think you're
being too wordy.

(I haven't read most of the thread yet, so sorry if I am just repeating
what others have said.)

Just take the three main points:

- Modern convenience
- Multi-paradigm power
- Native efficiency

That's all mixed up. Either use use these three *qualifiers*:

- Modern
- Multi-paradigm
- Native

Or these three *goals*:

- Convenience
- Power
- Efficiency


+1. Gets us rid of the buzzy 'Multi-paradigm' in the title too.



But matching each goal with a qualifier/feature makes things more
confusing. At least for me, it automatically raise a bullshit flag in my
head. Just answer this: why does the *multi-paradigm* feature bring
power specifically? Couldn't it bring efficiency or convenience instead
or in addition to power? How many ways could you combine words from
these two lists and it'd still mean the same thing?





Re: Website message overhaul

2011-11-14 Thread Adam D. Ruppe
Oh, forgot to mention, that try now button currently
doesn't work.

My server that was hosting the compiler died and I haven't
replaced it yet.


Re: Website message overhaul

2011-11-14 Thread Jacob Carlborg

On 2011-11-14 21:12, Adam D. Ruppe wrote:

The cost of supporting non-scripted browsing is virtually zero.
There's really no reason not to, even if Nick and I are the only
people left on Earth who disable javascript!


I have disabled javascript by default as well.

--
/Jacob Carlborg


Re: Website message overhaul

2011-11-14 Thread Michel Fortin

On 2011-11-14 19:41:28 +, Michel Fortin michel.for...@michelf.com said:

On 2011-11-14 01:50:04 +, Andrei Alexandrescu 
seewebsiteforem...@erdani.org said:


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.


I kind of like it, the structure. I don't like the visual presentation 
(but I understand that will come later). But most of all I think you're 
being too wordy.


(I haven't read most of the thread yet, so sorry if I am just repeating 
what others have said.)


More comments:

At least make the key words bold in the lists of features so you can 
scan the text and pass over the parts that are not interesting to you.


The news section is empty for me (I get an empty twitter frame with a 
join the conversation link). I guess that's my fault for using browser 
extensions to disable various web tracking APIs, so I won't complain.


--
Michel Fortin
michel.for...@michelf.com
http://michelf.com/



Re: Website message overhaul

2011-11-14 Thread Jacob Carlborg

On 2011-11-14 21:09, Vladimir Panteleev wrote:

Speaking of which, the twitter widget needs to be placed in an iframe so
that it doesn't block the page load (inline scripts cause browsers to
stop parsing the page until the script is loaded and executed, which
creates a network dependency on a website we don't control).



Put the JavaScript at the end of the page instead.

--
/Jacob Carlborg


Re: Website message overhaul

2011-11-14 Thread Michel Fortin
On 2011-11-14 20:14:22 +, Andrei Alexandrescu 
seewebsiteforem...@erdani.org said:



On 11/14/11 11:41 AM, Michel Fortin wrote:

On 2011-11-14 01:50:04 +, Andrei Alexandrescu
seewebsiteforem...@erdani.org said:


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.


I kind of like it, the structure. I don't like the visual presentation
(but I understand that will come later). But most of all I think you're
being too wordy.

(I haven't read most of the thread yet, so sorry if I am just repeating
what others have said.)

Just take the three main points:

- Modern convenience
- Multi-paradigm power
- Native efficiency

That's all mixed up. Either use use these three *qualifiers*:

- Modern
- Multi-paradigm
- Native

Or these three *goals*:

- Convenience
- Power
- Efficiency


It's a good idea to keep the top message as is and then eliminate the 
goals from the bullet points.



But matching each goal with a qualifier/feature makes things more
confusing. At least for me, it automatically raise a bullshit flag in my
head. Just answer this: why does the *multi-paradigm* feature bring
power specifically?


Because it allows you to model difficult problem domains.


Couldn't it bring efficiency or convenience instead
or in addition to power?


It could, but that would be secondary at best.


How many ways could you combine words from
these two lists and it'd still mean the same thing?


Not many.


You mean this doesn't make sense to you?

- Multi-paradigm convenience: it's much more convenient than mixing 
code from two or more languages.
- Native power: can use every bit of power your hardware can provide 
because it's native.
- Modern efficiency: all modern languages now have good optimizers 
built-in, making the code efficient.


It probably makes more sense from your perspective to match them the 
way you did, I won't contest that. But there's always a way to match 
them differently that would fit someone else's perspective. So to me it 
raises questions whether those words mean anything or they are there to 
impress the less knowledgeable (buzzwords). Or at least it'd raise 
those questions if I were visiting the site for the first time.


--
Michel Fortin
michel.for...@michelf.com
http://michelf.com/



Re: Website message overhaul

2011-11-14 Thread Nick Sabalausky
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message 
news:j9rs4o$nrs$1...@digitalmars.com...
 On 11/14/11 7:11 AM, Nick Sabalausky wrote:
 Con: Examples are never visible without JS. There is *no* good technical 
 or
 stylistic reason for that. Like I was just telling someone on D.announce, 
 if
 you need something collapsible, the way you do it is by leaving it
 uncollapsed in the HTML/CSS. Then, if you really want JS users to see it
 collapsed by default, you collapse it *via JS* upon page load. Or just 
 make
 use of the noscript tag. There is *never* any reason to do it any
 differently than that.

 I'm not sure what to do about catering for people who disable JS. Other 
 language sites (Go, Scala) do use JS and at least Go is unprepared for it 
 being disabled.

Well, that's not too surprising since Go comes from people in Google. 
Google's been really trying to push JS more and more the last so many years.

 Scala seems to have a designed fallback mode.

 A reasonable question is what percentage of people have Javascript 
 disabled. I ran this query:

 https://www.google.com/search?gcx=wsourceid=chromeie=UTF-8q=percentage+javascript+disabled+browsers

 After looking through the top answers I inferred that the percentage is 
 around 2% and declining.


Vlad and Adam have already addressed all of this pretty well, including most 
of my main points, but I'd like that add that while even 1% sounds small, 
it's still a hell of a lot of people.

Also, and this is getting slightly offtopic, but I've often wondered about 
the reliability of Google's stats about JS vs non-JS. My understanding is 
that Google Analytics *uses* JS, so I would think there's a good chance that 
many non-JS users are unaccounted for. But maybe I'm wrong.

But even that possible inaccuracy aside, many of the people who disable JS 
do so selectively via NoScript. It's common to have JS disabled by default, 
but then turn it on for certain domains. I'd be willing to bet that among 
the people who do that, google would probably be a very common domain to 
have JS enabled on (even I sometimes have it on for the google domain even 
though I don't like to do so). So that would skew google's recorded non-JS 
results lower than they really are.

So then those NoScript selective-JS users would go to d-p-l.org and basic, 
trivial stuff on the frontpage would fail to work. Maybe they would then 
turn JS on for d-p-l.org, too, but it would leave a bad first impression - 
which is exactly what that page is designed for: first impressions.




Re: Website message overhaul

2011-11-14 Thread Jacob Carlborg

On 2011-11-14 21:12, Andrei Alexandrescu wrote:

Walter is the most prominent member of the community. I think the
mention is entirely appropriate. In particular, we noted that the old
site doesn't mention Walter as the creator of D, and that many people
don't know who invented D.


That may be more appropriate on page covering the history and background 
of D.


--
/Jacob Carlborg


Re: Website message overhaul

2011-11-14 Thread Brad Anderson
On Mon, Nov 14, 2011 at 1:29 PM, Timon Gehr timon.g...@gmx.ch wrote:

 On 11/14/2011 08:47 PM, Andrei Alexandrescu wrote:

 On 11/14/11 1:15 AM, Timon Gehr wrote:

 Looks good, I think this is the right direction.

 Nitpicks:

 1.

 // Type deduction works for function results. This is important for
 generic
 // functions, such as min below, which works correctly for all comparable
 // types.
 auto min(T1, T2)(T1 lhs, T2 rhs) {
 return rhs  lhs ? rhs : lhs;
 }

 It does not. The two types need to have a common type as well.


 It's difficult to be concise and complete simultaneously. The underlying
 assumption is that if two types are comparable, they also have a common
 type.


 hm, maybe call the them 'compatible comparable types'?



  2.

 The scope statement example should actually show transactional code.
 Otherwise the poor reader feels fooled into clicking See example.
 Using scope(exit) to write something at function exit is useful for
 debugging, but scope(failure) is the real thing that is important to
 show.


 Good point.

  3.

 If contract inheritance is to be promoted on the front page (and it is
 certainly something that may attract developers), it should actually
 work.


 Absolutely.


 There has been disagreement on whether or not my bug report on the matter
 was valid.

 What it means for your example:

 // Interfaces and classe
 interface Printable {
void print(uint level)
in { assert(level  0); } // contract is part of the interface
 }

 // Interface implementation
 class Widget : Printable {
void print(uint level) { ... }
 }

 void main(){
Widget w = new Widget();
w.print(0); // passes through, but should not
 }

 Can you state in the issue tracker that the bug report is valid?
 http://d.puremagic.com/issues/**show_bug.cgi?id=6856http://d.puremagic.com/issues/show_bug.cgi?id=6856




  4.

 If we can find a less buzzy word than 'Multi-paradigm power' to describe
 D's multi-paradigm power, that would be nice, but I am also fine with
 the current state of affairs.

 5.

 The most important language features are not displayed at all. Where are
 Metaprogramming, CTFE and code generation? It sure is hard to come up
 with a short but convincing example, but I think we should try to.


 Those would be under the multi-paradigm thingie.


 Ok. Maybe there could be a few LOC demonstrating the 'recurrence' function
 generating a few fibonacci numbers. I think it is a nice showcase, although
 I have never needed that particular function in real code :o). It has also
 the potential of showing Phobos' lazy functional style features. But
 unfortunately, most functional programmers will shriek for a moment when
 they see the argument order of 'take'.



I think that's a good idea.  While learning D I became impressed with it
when I solved Project Euler problem 2 (By considering the terms in the
Fibonacci sequence whose values do not exceed four million, find the sum of
the even-valued terms.) with:

auto answer = reduce!a + b(filter!a % 2 == 0(until!a 
4_000_000(recurrence!a[n-1] + a[n-2](1, 1;

It'd look better with UFCS but it's still rather neat I think.


Translation of C struct to D

2011-11-14 Thread Michael Kremser

Hi!

I currently try to create a simple linux driver (for test purposes) just 
like in [1] in D based on [2]. The main difficulty is to call 
register_chrdev. It expects an argument fops of type file_operations 
which can look like that in C:


static struct file_operations fops = {
.read = device_read,
.write = device_write,
.open = device_open,
.release = device_release
};

device_read and so on are functions. Originally, file_operations has 
much more fields and it's possible to omit unused fields.


What I tried so far: I declared register_chrdev as follows:

extern (C):
int register_chrdev (uint major, char *name, file_operations *fops);

My try for the translation of file_operations looks like that:

struct file_operations {
int function() open;
int function() release;
};

In init_module() I have the following code:

char[] DEVICE_NAME = dtestdev;
file_operations fops;
fops.open = device_open;
fops.release = device_close;
Major = register_chrdev(0, std.string.toStringz(DEVICE_NAME), fops);

The code compiles with some warnings, and if I try to insert it into the 
kernel, I get some messages in the kernel log.


WARNING: _D3std6string9toStringzFAaZPa [./hello.ko] undefined!
WARNING: _Dmodule_ref [./hello.ko] undefined!
WARNING: _D15TypeInfo_Struct6__vtblZ [./hello.ko] undefined!
WARNING: register_chrdev [./hello.ko] undefined!
WARNING: _D3std6string12__ModuleInfoZ [./hello.ko] undefined!

Nov 14 21:12:39 eeepc1104 kernel: [17127.068990] hello: Unknown symbol 
_D3std6string12__ModuleInfoZ (err 0)
Nov 14 21:12:39 eeepc1104 kernel: [17127.069613] hello: Unknown symbol 
register_chrdev (err 0)
Nov 14 21:12:39 eeepc1104 kernel: [17127.070462] hello: Unknown symbol 
_D15TypeInfo_Struct6__vtblZ (err 0)
Nov 14 21:12:39 eeepc1104 kernel: [17127.071359] hello: Unknown symbol 
_Dmodule_ref (err 0)
Nov 14 21:12:39 eeepc1104 kernel: [17127.072352] hello: Unknown symbol 
_D3std6string9toStringzFAaZPa (err 0)


Any help greatly appreciated.

Greetings

Michael

[1] http://tldp.org/LDP/lkmpg/2.6/html/lkmpg.html#AEN680
[2] 
http://iainbuclaw.wordpress.com/2010/05/22/writing-a-linux-kernel-module-in-d/


Re: Website message overhaul

2011-11-14 Thread Nick Sabalausky
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message 
news:j9rso9$ov0$1...@digitalmars.com...
 On 11/14/11 11:04 AM, Robert Clipsham wrote:
 - See example. is actually show/hide example, the text should
 reflect this.

 Hm, that should change when expanded. More work for me, sigh.


Just changing the text from See example to show/hide example should be 
perfectly sufficent. 'Course, if you'd really rather make it change, that'd 
certainly be fine too.




Re: Website message overhaul

2011-11-14 Thread Vladimir Panteleev
On Mon, 14 Nov 2011 22:37:50 +0200, Adam D. Ruppe  
destructiona...@gmail.com wrote:



Oh, forgot to mention, that try now button currently
doesn't work.


How did you do the sandboxing?

I was messing with creating chroot jails for another project. The  
filesystem security is easy to nail down, but there remains the question  
of limiting up resources (ulimit? cgroups?). There's also the dilemma of  
network access - should it be allowed for the sake of network code  
examples, or forbidden to prevent abuse?


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


Re: Website message overhaul

2011-11-14 Thread Vladimir Panteleev
On Mon, 14 Nov 2011 22:36:08 +0200, Adam D. Ruppe  
destructiona...@gmail.com wrote:



It's all written in D too, but I haven't updated
it for months.


That's a solid piece of work.


If you like, I can send you the code from my
implementation of the last idea too.


Why not make it open-source?

I think the best way to make things last is to open-source them - then  
anyone can fix them if I run out of time/interest/under a bus. If I can't  
open-source your code, we might be better-off with a rewrite :)



(and lol, my crappy web newsreader that I never finished
works much better than the one on digitalmars.com!


I'm itching to write a D web newsreader as well. (You'll never make me use  
CGI though, mwahaha!)


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


Re: Website message overhaul

2011-11-14 Thread Robert Clipsham

On 14/11/2011 01:50, 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


Another point, partially based on things others have said that I've now 
read:


As I mentioned in another post, myself (and many, many others I'm sure) 
have the ability to look at a page and automatically find what we want 
without reading anything. People visiting dpl.org will be in one of two 
groups:


 - Potential D users
 - D users

What they want to see:

= Potential D users
 i  ) Sample code
 ii ) Reasons to use D
 iii) Download/try/setup links
 iv ) How to find out more

= D users
 v   ) Download links
 vi  ) How to get help
 vii ) Language reference
 viii) Library reference
 ix  ) News/things of interest
 x   ) Current version (Do I have the latest and greatest? This will be 
less important as the language continues to mature)

 xi  ) Changelog (see above, less important with time)
 xii ) How to get involved.

This is a lot of information to get onto one page, but it can easily be 
simplified with a simple bit of knowledge - D users have seen the page 
before.


Related note: I can't find any of these by looking at the D front page, 
despite having seen it hundreds of times (yes, I know most of it is in 
the sidebar, that's not something I see without thinking about it 
though, I automatically assume it's just part of the background).


--
Robert
http://octarineparrot.com/


Re: Website message overhaul

2011-11-14 Thread Vladimir Panteleev

On Mon, 14 Nov 2011 22:43:05 +0200, Jacob Carlborg d...@me.com wrote:


On 2011-11-14 21:09, Vladimir Panteleev wrote:

Speaking of which, the twitter widget needs to be placed in an iframe so
that it doesn't block the page load (inline scripts cause browsers to
stop parsing the page until the script is loaded and executed, which
creates a network dependency on a website we don't control).



Put the JavaScript at the end of the page instead.


The script writes its content during execution. Unless the Twitter JS  
supports writing to a specified element, it can't be at the end without  
CSS positioning hacks.


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


Re: Website message overhaul

2011-11-14 Thread Nick Sabalausky
Michel Fortin michel.for...@michelf.com wrote in message 
news:j9rqui$le5$1...@digitalmars.com...

 Just take the three main points:

 - Modern convenience
 - Multi-paradigm power
 - Native efficiency

 That's all mixed up. Either use use these three *qualifiers*:

 - Modern
 - Multi-paradigm
 - Native


Yes, I like this change a lot. It's much clearer and easier to read. I can 
grok the latter at a mere glance, while the former I have to actually read 
and then think. Besides, I can draw my own conclusions as to what Modern, 
Multi-paradigm, and Native each imply, and they're all still explained 
in the text anyway.




  1   2   >