Re: SCHEDULED for deprecation

2009-05-08 Thread Jesse Phillips
On Thu, 07 May 2009 12:57:36 -0400, Tomasz Sowiński wrote:

> This phrase gave me an idea for a small feat:
> 
> deprecated(2009-4-19) void foo();
> 
> Compiling references to the deprecated declaration *before* the
> deprecation date would result in a *warning*. Compiling the deprecated
> declaration OR any reference to it *after* the date would result in an
> *error*.
> 
> Advantages for maintanance are obvious, plus, the feature seems easy to
> implement. What do you think?
> 
> Tomek

You should deprecate on the release it is deprecated and not before. 
However, providing a version for which the function would be removed 
entirely... And stating the alternative might also be nice.

Though these things could be placed in proper documentation, it is nice 
to have them readily available when you are told it is deprecated.


Re: What's the current state of D?

2009-05-08 Thread Andrei Alexandrescu

grauzone wrote:
beyond and I'm quite sure that I'm not the only one. For all the 
Naysayers out there... Keep saying nay and go the hell away. D2 is 
just where it is supposed to be. Let’s not end up in the same mess we 
did by trying to make impatient people happy and releasing D1.


What about the people who want to use D for something actually useful?


They can if they really want, just as much as others can keep on 
naysaying if they really want :o).


Andrei


Re: Real Close to the Machine: Floating Point in D

2009-05-08 Thread Don

bearophile wrote:

Thanks to Don for the very nice explanation. I'll need more time to digest it 
all.

I can see that D2 is one of the best (maybe the best at the moment) language regarding its 
management of floating point values. This means that people interested in doing numerical FP 
computations may become interested in D2. But for them D may enjoy becoming a bit less "system 
language" and a bit more "scientific language", especially regarding tiling loops, 
matrix and domain management, automatic management of some data parallelism that is currently 
nearly totally absent, etc. (see Chapel language).


A more advanced usage, not yet supported on any platform(!) is to provide a nested 
function to be used as a hardware exception handler.<


I didn't know this.


The hardware supports it, but unfortunately, there's no standardisation 
between OSes. Even on x86, it's requires a totally different technique 
for Windows compared to Linux (it's easier on Windows). And there's a 
problem with x87: given

FLOP1
xxx
FLOP2
where FLOP1 and FLOP2 are floating-point operations, if FLOP1 generates 
an exception condition, the exception doesn't actually happen until 
FLOP2! So the intervening xxx instructions are a big problem.
So it's usable only in very limited circumstances. Most likely, we won't 
be able to do more than provide a few library functions that make use of it.



real NaN(ulong payload) -- create a NaN with a "payload", where the payload is a 
ulong.<


- How many bit can reliably be stored there?

It's in the docs for NaN().

- That function returns a real, but can payloads can be stored in doubles too?

Yes.

- If doubles too can be used, how many bits long can be such payload?
- Can Don give me one or two example usages of such payloads? (I have never 
seen them used so far in any language.)

Bye and thank you,
bearophile


Re: Iterators Must Go

2009-05-08 Thread Walter Bright

Steven Schveighoffer wrote:

You're assuming an iterator does not know its bounds.


That's right. That's the usual design, which is based on the pointer 
model. Pointers do not know their limits.


Maybe I should 
call it something other than iterator.  How about cursor?


Or range? 


There are definite reasons to use containers in ways that don't involve 
std.algorithm, where something that has the easy ability to move back 
and forth N times without weird subrange operations.


I'm thinking of a structure with either a pointer to the container for 
bounds checking, or a range and pointer combined (where the invariant is 
that the pointer is always within the range).


I'm not saying ranges are not great, i think they are a HUGE step 
forward, but the statement "Iterators must be eliminated" may be too 
harsh.  Perhaps the unchecked iterator, yes (but you may want to allow 
it in certain performance-critical code).


If you had an iterator that knew its beginning and end, then the whole 
paradigm of:


   for (iterator i = begin; i != end; i++)

doesn't make much sense because of the redundancy.


Re: What's the current state of D?

2009-05-08 Thread Tyro[a.c.edwards]

On 5/9/2009 11:24 AM, grauzone wrote:

beyond and I'm quite sure that I'm not the only one. For all the
Naysayers out there... Keep saying nay and go the hell away. D2 is
just where it is supposed to be. Let’s not end up in the same mess we
did by trying to make impatient people happy and releasing D1.


What about the people who want to use D for something actually useful?


Well, for those cases, there is D1. Which, if I may add, is extremely 
stable. Take a network administrator running his server or firewall on 
say DragonFly or any of the many flavors of BSD or Linux; he does not 
upgrade his server with nightly builds, he sticks instead with a 
"stable," well tested branch of the OS and experiments with "current." 
When current becomes stable, the OS developer does not stop developing 
his OS, he continues on with his vision while the "users" further 
stress-tests the newly stabilized branch and take steps to find and 
correct any holes in the system. And our system administrator, well, he 
doesn't switch until he is comfortable that the newly stabilized branch 
meets all his criteria for upgrade. If they are not met... he waits 
until the OS branches again.


We cannot expect the compiler developer to stop developing compilers 
until after the tools developers decide to build tools. He has done his 
job, which is to develop a stable, documented compiler. Use it to 
develop your tools which will in turn allow the compiler/language to 
gain popularity. Report any bug reports on anything that seems out of 
the ordinary so that it can either be clarified in documentation or 
corrected with code.


Walter is a damn good Engineer but I don't think his interests lie in 
writing tools (IDE and the like). So those people that do write those 
tools may want to take the "stable" compiler and start developing. So 
what if this feature "that is in D2" is not in D1? Use what you have in 
D1 and develop your tools and simply stay abreast with the development 
of D2 so that when it is time to switch, you are not in the dark.


Andrew


Re: What's the current state of D?

2009-05-08 Thread Derek Parnell
On Fri, 08 May 2009 16:20:48 -0700, Walter Bright wrote:

> Frank Benoit wrote:
>> can you allow "shared" or "__gshared" in D1 as do-nothing keywords? That
>> will make it more easy to write code that compiles for D1 and D2.
>> Or is there a trick to accomplish this?
> 
> I think that making code that will compile under both is an impractical 
> task.

I'm thinking that D1 is really the prototype edition of D, and D2 will be
the first release edition of the "D Programming Language". By this I mean
that D1 has worked out to be a sounding board that has helped define what
the design requirements for "D" have really been. The process is not over
as usage of D1 is still pointing out things that need to be in D2.

This is a good thing. And if we end up with two languages (D1=D_proto and
D2=D_proper) in which both are stable, then that is not such a bad outcome.

-- 
Derek Parnell
Melbourne, Australia
skype: derek.j.parnell


0.8510286 Peek Inside And Realize That Dream ... 0.5025898

2009-05-08 Thread 0 . 5479062realizeitistrue
0.5479062 Peek Inside And Realize That Dream ... 0.9431155

0.8510286 Now Visit Tobacco Is Drugs 0.5025898



Re: What's the current state of D?

2009-05-08 Thread Andrei Alexandrescu

Tyro[a.c.edwards] wrote:

On 5/9/2009 3:38 AM, Steve Teale wrote:

Walter Bright Wrote:


Steve Teale wrote:

This is the sort of answer that will kill D. The guy comes back after
2 years, asks a straight question, and get's told "business as usual,
we're still arguing among ourselves about what it should be".

Maybe Tiobe is right! Lots of others may not even bother to ask. They
just visit the newsgroup, read a page of it, and conclude "same old,
same old", and go away.

D should be D, not maybe 1.043, or let's wait a while and see what
happens with D2. Potential real users hate uncertainty. If they are
going to commit, then D must do so too.

What bothers me about this sentiment is that every other mainstream
language undergoes revision, sometimes major ones, but that never seems
to be an excuse for people to not use it.

For example, C++ is quite in flux with C++0x.

The only languages that are not undergoing revision are dead ones.


Yes Walter, but C++ went through a tedious standardization process - 
itself a long argument. So there was some basis for people to think 
that it had 'got there'.


But to come back after 2 years and find the same stuff still going on 
is depressing - been there done that. OK, it didn't put me off, I'm 
still in there, but it bothers me. I'd be dishonest if I said otherwise.


I am not criticizing you. I think you are doing a great job under the 
pressure of a slew of suggestions. But maybe a line in the sand at 
some point?


OK so for those who crave stability there is D1.x, but when all the 
focus appears to be on D2, what level of confidence is afforded to D1 
users. Can a project Manager cross his heart and say that D1 will 
still be alive and well in five years time?




This is quite interesting! Before there was D1, I can remember the same 
requests being submitted over and over again. Tool developers complained 
that they could not use D for anything serious because of its constant 
state of flux. They continuously requested that a line be drawn. Shortly 
after that line was drawn in January 2007, a good majority of the 
community complained that it wasn't exactly what they asked for and a 
majority of the most active members of the community disappeared into 
thin air.


The sad thing is, even after D1 became stable following a number of bug 
fixes, very few people used it for much of anything. Those "advocates of 
stability" all disappeared; abandoning their tools/projects in the process.


The same thing is beginning again and it seems to me that instead of 
something that is actually useful, people a waiting for MicroMoney or 
some other name brand begins to invest in their own D compiler. As far 
as I see it, there will come a time when D language will soar above all 
the rest (not only in capability, which it already does, but also 
commercial usage), I will continue to support it until then and well 
beyond and I'm quite sure that I'm not the only one. For all the 
Naysayers out there... Keep saying nay and go the hell away. D2 is just 
where it is supposed to be. Let’s not end up in the same mess we did by 
trying to make impatient people happy and releasing D1.


Andrew


Very well and heartfelt put.

D needs many things, but probably above all it needs the dedication of 
bright people.


I've had a great time at BoostCon, and enjoyed many interesting 
conversations with as many bright people. Beman Dawes, the originator of 
Boost and an extraordinary gentleman, gave me a little history of Boost. 
Essentially Boost has been toiling in anonymity until Dave Abrahams came 
about. Dave is a design, coding, and organizational powerhouse all in 
one. He not only contributed a great deal of design and code to Boost, 
but also managed organizational and logistics aspects, in addition to 
exercising the charisma necessary for attracting other extraordinarily 
qualified people to dedicate their prime to Boost. And it has snowballed 
ever since. It was amazing just being at Boostcon to see how much 
expertise punch those people packed.


We are lacking such a powerhouse for D. Walter is a great lone wolf kind 
of coder, but not a team organizer and charismatic leader. Things have 
been changed to the better since he has made Phobos accessible on 
dsource.org and since he released the source of the compiler. 
Integration with druntime was another great step forward (thanks Sean!) 
Soon we may convince Walter to put the entire dmd source on dsource.org, 
which would improve things even more. But the role of "Dave" for D is 
still up for grabs.


Of course it's not that easy to find that, but in the meantime there's a 
lot of good things to be done. If you do something great, sooner or 
later it will be picked up. The perfect example is Don, who became a 
prominent contributor solely through the sheer quality and quantity of 
his work. (There are many others that come to mind, but please allow me 
to stay with one because as soon as I mention more than one, I'd feel 

Re: Iterators Must Go

2009-05-08 Thread Steven Schveighoffer
On Fri, 08 May 2009 11:57:41 -0400, Walter Bright  
 wrote:



Steven Schveighoffer wrote:
You still have not addressed the usage of iterators as general data  
structure pointers.  As far as I can tell, ranges do not implement this.

 i.e. find surrounding elements of an element.
 With iterators:
 auto iter = container.find(elem);
auto elembefore = iter - 1;
auto elemafter = iter + 1;
 Assuming incrementing and decrementing an iterator is checked for  
out-of-bounds.


The problem is that last statement - "Assuming". If the iterator is the  
first or the last, or if there's only 1 or 2 elements in the container,  
it's crash city. Iterators are *inherently* uncheckable.


For finding the elemafter, it's trivial as find() returns a range from  
the found element to the end (and it's also trivially checkable!).


For elembefore, there's a bit more work involved, probably defining a  
find() that returns a range backed up by one one.


You're assuming an iterator does not know its bounds.  Maybe I should call  
it something other than iterator.  How about cursor?


There are definite reasons to use containers in ways that don't involve  
std.algorithm, where something that has the easy ability to move back and  
forth N times without weird subrange operations.


I'm thinking of a structure with either a pointer to the container for  
bounds checking, or a range and pointer combined (where the invariant is  
that the pointer is always within the range).


I'm not saying ranges are not great, i think they are a HUGE step forward,  
but the statement "Iterators must be eliminated" may be too harsh.   
Perhaps the unchecked iterator, yes (but you may want to allow it in  
certain performance-critical code).


-Steve


Re: What's the current state of D?

2009-05-08 Thread grauzone
beyond and I'm quite sure that I'm not the only one. For all the 
Naysayers out there... Keep saying nay and go the hell away. D2 is just 
where it is supposed to be. Let’s not end up in the same mess we did by 
trying to make impatient people happy and releasing D1.


What about the people who want to use D for something actually useful?


Re: What's the current state of D?

2009-05-08 Thread Tyro[a.c.edwards]

On 5/9/2009 3:38 AM, Steve Teale wrote:

Walter Bright Wrote:


Steve Teale wrote:

This is the sort of answer that will kill D. The guy comes back after
2 years, asks a straight question, and get's told "business as usual,
we're still arguing among ourselves about what it should be".

Maybe Tiobe is right! Lots of others may not even bother to ask. They
just visit the newsgroup, read a page of it, and conclude "same old,
same old", and go away.

D should be D, not maybe 1.043, or let's wait a while and see what
happens with D2. Potential real users hate uncertainty. If they are
going to commit, then D must do so too.

What bothers me about this sentiment is that every other mainstream
language undergoes revision, sometimes major ones, but that never seems
to be an excuse for people to not use it.

For example, C++ is quite in flux with C++0x.

The only languages that are not undergoing revision are dead ones.


Yes Walter, but C++ went through a tedious standardization process - itself a 
long argument. So there was some basis for people to think that it had 'got 
there'.

But to come back after 2 years and find the same stuff still going on is 
depressing - been there done that. OK, it didn't put me off, I'm still in 
there, but it bothers me. I'd be dishonest if I said otherwise.

I am not criticizing you. I think you are doing a great job under the pressure 
of a slew of suggestions. But maybe a line in the sand at some point?

OK so for those who crave stability there is D1.x, but when all the focus 
appears to be on D2, what level of confidence is afforded to D1 users. Can a 
project Manager cross his heart and say that D1 will still be alive and well in 
five years time?



This is quite interesting! Before there was D1, I can remember the same 
requests being submitted over and over again. Tool developers complained 
that they could not use D for anything serious because of its constant 
state of flux. They continuously requested that a line be drawn. 
Shortly after that line was drawn in January 2007, a good majority of 
the community complained that it wasn't exactly what they asked for and 
a majority of the most active members of the community disappeared into 
thin air.


The sad thing is, even after D1 became stable following a number of bug 
fixes, very few people used it for much of anything. Those "advocates of 
stability" all disappeared; abandoning their tools/projects in the process.


The same thing is beginning again and it seems to me that instead of 
something that is actually useful, people a waiting for MicroMoney or 
some other name brand begins to invest in their own D compiler. As far 
as I see it, there will come a time when D language will soar above all 
the rest (not only in capability, which it already does, but also 
commercial usage), I will continue to support it until then and well 
beyond and I'm quite sure that I'm not the only one. For all the 
Naysayers out there... Keep saying nay and go the hell away. D2 is just 
where it is supposed to be. Let’s not end up in the same mess we did by 
trying to make impatient people happy and releasing D1.


Andrew


Re: What's the current state of D?

2009-05-08 Thread Simen Kjaeraas

grauzone wrote:

Nearly all of those are due to inadvertent reliance on bugs in D1. You  
see this quite a bit in the C++ world. Every time g++ gets updated, I  
have to tweak something in my sources.


In the case of D, the problem is that sometimes you don't really know if  
it's a bug or a feature.


So you file a bug, and if nothing else, the spec should be clarified.

--
 Simen


Re: What's the current state of D?

2009-05-08 Thread Simen Kjaeraas

Lutger wrote:

- these other languages go out of their way to make new releases  
backwards
compatible, sometimes at great costs. They almost never completely  
succeed

though.


And D1 makes an effort to follow the spec, and will not incorporate
breaking changes. D2 is, in many ways, a whole new language. Sure,
you could argue that D1 code should be compilable in D2, but it
would matter no more than the argument that C code should be
compilable in D1.

--
 Simen


Re: GC reuses memory?

2009-05-08 Thread Jarrett Billingsley
On Fri, May 8, 2009 at 8:45 PM, Fractal  wrote:
> Hello
>
> When memory is requested, the GC actually can reuse an unrefenreced block?
>
> Thanks

Yes.  It keeps memory in freelists of variable sizes of blocks.  When
memory is freed, it's put back on the freelist.


GC reuses memory?

2009-05-08 Thread Fractal
Hello

When memory is requested, the GC actually can reuse an unrefenreced block?

Thanks


Re: What's the current state of D?

2009-05-08 Thread torhu

On 09.05.2009 00:29, Christopher Wright wrote:

Open source projects tend to have to support wider ranges of compilers.
I've seen OSS projects where they prioritized issues specific to
gcc-3.4.2 as highly as any other issue, even if the developers typically
used the 4.x branch.


That's probably because they wanted to be cross-platform, since 3.4.2 
was the latest GCC supported by minGw for a long time.


Re: when will D2 be stable?

2009-05-08 Thread Paul D. Anderson
Daniel Keep Wrote:

> 
> 
> Lutger wrote:
> > zsxxsz wrote:
> > 
> >> I found D is a wonderful programming language and start to use it in my
> >> projects. I use D2 now, but which is still unstable although it's version
> >> is D2.029. Can anyone tell me when D2 will be stable? Although D's using
> >> rate suffers sharp fall(shown in tiobe), I'll still believe that D will be
> >> better in future. But why does D fall down so much?
> >>
> >> Thanks
> > 
> > 
> > Tiobe is like the astrology weekly news snippets: you know it's bullshit 
> > but 
> > you can't resist wanting to believe - until it brings bad news of course ;) 
> 
> Mrs O: What are you?
> 
> Mrs Trepidatious: I'm Nesbitt.
> 
> Mrs O: There's not a zodiacal sign called Nesbitt...
> 
> Mrs Trepidatious: All right, Derry and Toms.
> 
> Mrs O: (surveying paper) Aquarius, Scorpio, Virgo, Derry and Toms. April
> 29th to March 22nd. Even dates only.
> 
> Mrs Trepidatious: Well what does it presage?
> 
> Mrs O: You have green, scaly skin, and a soft yellow underbelly with a
> series of fin-like ridges running down your spine and tail. Although
> lizardlike in shape, you can grow anything up to thirty feet in length
> with huge teeth that can bite off great rocks and trees. You inhabit
> arid sub-tropical zones and wear spectacles.
> 
> Mrs Trepidatious: It's very good about the spectacles.
> 
> (Monty Python's Flying Circus, Episode 37)





Re: Real Close to the Machine: Floating Point in D

2009-05-08 Thread bearophile
Thanks to Don for the very nice explanation. I'll need more time to digest it 
all.

I can see that D2 is one of the best (maybe the best at the moment) language 
regarding its management of floating point values. This means that people 
interested in doing numerical FP computations may become interested in D2. But 
for them D may enjoy becoming a bit less "system language" and a bit more 
"scientific language", especially regarding tiling loops, matrix and domain 
management, automatic management of some data parallelism that is currently 
nearly totally absent, etc. (see Chapel language).


>A more advanced usage, not yet supported on any platform(!) is to provide a 
>nested function to be used as a hardware exception handler.<

I didn't know this.


>real NaN(ulong payload) -- create a NaN with a "payload", where the payload is 
>a ulong.<

- How many bit can reliably be stored there?
- That function returns a real, but can payloads can be stored in doubles too?
- If doubles too can be used, how many bits long can be such payload?
- Can Don give me one or two example usages of such payloads? (I have never 
seen them used so far in any language.)

Bye and thank you,
bearophile


Re: What's the current state of D?

2009-05-08 Thread Walter Bright

Frank Benoit wrote:

can you allow "shared" or "__gshared" in D1 as do-nothing keywords? That
will make it more easy to write code that compiles for D1 and D2.
Or is there a trick to accomplish this?


I think that making code that will compile under both is an impractical 
task.


Re: What's the current state of D?

2009-05-08 Thread Walter Bright

Sean Kelly wrote:

It's a way to declare something as "classic global" so you can sidestep any bugs
that crop up with the implementation of 'shared'.  The hope is that you'll
eventually just be able to do a search/replace of '__gshared' to 'shared' once
everything is working correctly.


I like the moniker "classic global", or perhaps even better, "global 
classic" as a term for it.


Re: What's the current state of D?

2009-05-08 Thread Walter Bright

dsimcha wrote:

Just out of curiosity,
though, you use __gshared in a lot of places and I haven't seen it in any of the
discussions.  What is it?


__gshared is the "cowboy" approach, it means make it global and I don't 
care about any weenie synchronization or type checking. It's handy for 
initial ports of "I just want it to compile, I'll fix it later".


Naturally, it won't be allowed in safe mode.


Real Close to the Machine: Floating Point in D

2009-05-08 Thread Walter Bright

Don Clugston writes about floating point programming in D:

http://www.digitalmars.com/d/2.0/d-floating-point.html

http://www.reddit.com/r/programming/comments/8j10v/real_close_to_the_machine_floating_point_in_d/


Re: when will D2 be stable?

2009-05-08 Thread Daniel Keep


Lutger wrote:
> zsxxsz wrote:
> 
>> I found D is a wonderful programming language and start to use it in my
>> projects. I use D2 now, but which is still unstable although it's version
>> is D2.029. Can anyone tell me when D2 will be stable? Although D's using
>> rate suffers sharp fall(shown in tiobe), I'll still believe that D will be
>> better in future. But why does D fall down so much?
>>
>> Thanks
> 
> 
> Tiobe is like the astrology weekly news snippets: you know it's bullshit but 
> you can't resist wanting to believe - until it brings bad news of course ;) 

Mrs O: What are you?

Mrs Trepidatious: I'm Nesbitt.

Mrs O: There's not a zodiacal sign called Nesbitt...

Mrs Trepidatious: All right, Derry and Toms.

Mrs O: (surveying paper) Aquarius, Scorpio, Virgo, Derry and Toms. April
29th to March 22nd. Even dates only.

Mrs Trepidatious: Well what does it presage?

Mrs O: You have green, scaly skin, and a soft yellow underbelly with a
series of fin-like ridges running down your spine and tail. Although
lizardlike in shape, you can grow anything up to thirty feet in length
with huge teeth that can bite off great rocks and trees. You inhabit
arid sub-tropical zones and wear spectacles.

Mrs Trepidatious: It's very good about the spectacles.

(Monty Python's Flying Circus, Episode 37)


Re: What's the current state of D?

2009-05-08 Thread Rainer Deyke
Lutger wrote:
> - other mainstream languages release new compilers and features every couple 
> of years, you do so every couple of months!

Rapid evolution is a good thing.  For every improvement that will be
made to the D2 language, I'd rather see that improvement in a week than
in a couple of years.  *Especially* for improvements that break
backwards compatibility.

D2 is incomplete right now.  The faster it evolves, the sooner it'll
reach completion, at which point it should be as stable as any language.


-- 
Rainer Deyke - rain...@eldwood.com


Re: when will D2 be stable?

2009-05-08 Thread Derek Parnell
On Fri, 08 May 2009 13:00:33 -0500, Andrei Alexandrescu wrote:
> The fall of D in Tiobe has to do with an issue in Yahoo's search engine. 
> I have talked to a friend of mine who is a research scientist at Yahoo 
> and he is looking into fixing the issue and also the fact that the top 3 
> results for "D programming" search are irrelevant.

Hmmm... maybe your friend has done something already. Yahoo search for "D
Programming" (with quotes) is giving me 791K hits and the first three are
www.digitalmars.com/d, en.wikipedia.org/wiki/D_programming_language, and
en.wikibooks.org/wiki/D_Programming.

Looking good.


-- 
Derek Parnell
Melbourne, Australia
skype: derek.j.parnell


Re: What's the current state of D?

2009-05-08 Thread Christopher Wright

Sean Kelly wrote:

== Quote from Steve Teale (steve.te...@britseyeview.com)'s article

OK so for those who crave stability there is D1.x, but when all the focus 
appears to be on D2, what level of confidence is afforded to

D1 users. Can a project Manager cross his heart and say that D1 will still be 
alive and well in five years time?

Will that project manager care?  Most build teams don't update compiler
versions very often--once a version has been settled upon that's pretty
much it, unless a show-stopping bug appears during development that
for some reason can't be worked around.  In fact, I can't even see a team
bothering to speculate about the future popularity of a language when
choosing it for a project.  The only thing that matters is whether it's a
good decision today, not five years from now.  If that weren't the case,
then there would have never been a call for COBOL programmers
during the Y2K transition.


In the Windows world, you get a new compiler every two to three years, 
so that's hardly an issue. Similarly with Java.


Open source projects tend to have to support wider ranges of compilers. 
I've seen OSS projects where they prioritized issues specific to 
gcc-3.4.2 as highly as any other issue, even if the developers typically 
used the 4.x branch.


Re: What's the current state of D?

2009-05-08 Thread Frank Benoit
Walter Bright schrieb:
> dsimcha wrote:
>> Exactly my feelings, but I'll add that the time to make huge, sweeping
>> changes
>> like the ones we're seeing now is before the language becomes
>> mainstream.  Once
>> the language has a large base of crufty production code that nobody still
>> understands and can fix quickly and easily when the language changes,
>> it becomes
>> much harder to make these kinds of changes.
> 
> Yes.
> 
> The next D2 update will have one such change, which has been planned for
> maybe the past year. All static and global variables will default to
> being thread local (instead of being implicitly shared). Doing this is
> disruptive, but is critical to credibly supporting multithreaded
> programming.
> 
> In testing this out, I've uncovered at least a dozen implicit sharing
> bugs in Phobos. I think this change will have a big payoff for
> multithreaded code.

can you allow "shared" or "__gshared" in D1 as do-nothing keywords? That
will make it more easy to write code that compiles for D1 and D2.
Or is there a trick to accomplish this?




Re: What's the current state of D?

2009-05-08 Thread Christopher Wright

Steve Teale wrote:

This is the sort of answer that will kill D. The guy comes back after 2 years, asks a 
straight question, and get's told "business as usual, we're still arguing among 
ourselves about what it should be".


Last week I asked Andrei what DMD2/Phobos to use, looking for something 
stable. I wanted to use D2, but he couldn't answer that question. So why 
is it a problem to give this person an honest answer?


I don't want D2 to be a rush job. Cool things are happening with it. I 
am, however, impatient for it to be stable, but I'm not upset that it 
isn't. It just means I won't use D2 for most of my projects just yet.




Re: What's the current state of D?

2009-05-08 Thread Lutger
Walter Bright wrote:

> grauzone wrote:
>> But C++ programs still compile and run correctly with C++0x compilers.
> 
> True enough, but that wasn't true for C++98, or C89. Nobody refused to
> use C or C++ because of that.
> 
>> I bet none of the projects on dsource are even compilable with dmd2 (even
>> if they were written for D2.0).
> 
> Take any C++ project from 15 years ago and I bet it won't compile today,
> either.
> 
>> And _many_ projects probably need minor
>> fixes, before they compile with the latest dmd1 compiler.
> 
> Nearly all of those are due to inadvertent reliance on bugs in D1. You
> see this quite a bit in the C++ world. Every time g++ gets updated, I
> have to tweak something in my sources.
> 
> Every binary release of dmd is available for download. If you require an
> unchanging compiler, it's trivial to operate that way. dmd isn't going
> to auto-update itself and break your compiles.

That's a really good thing imho. I remember when I got the Civilization 4 
C++ SDK, it would only compile with the MS 2003 compiler. Which at the time 
was outdated and unavailable for download in a legal way. It was also 130K 
LoC and beyond my ability to fix of course, very frustrating. 




Re: What's the current state of D?

2009-05-08 Thread Sean Kelly
== Quote from dsimcha (dsim...@yahoo.com)'s article
>
> Awesome.  I actually found a few of these bugs in the past few days, and was
> meaning to report them.  I guess I don't need to now.  Just out of curiosity,
> though, you use __gshared in a lot of places and I haven't seen it in any of 
> the
> discussions.  What is it?

It's a way to declare something as "classic global" so you can sidestep any bugs
that crop up with the implementation of 'shared'.  The hope is that you'll
eventually just be able to do a search/replace of '__gshared' to 'shared' once
everything is working correctly.


Re: What's the current state of D?

2009-05-08 Thread Lutger
Walter Bright wrote:

> Steve Teale wrote:
>> This is the sort of answer that will kill D. The guy comes back after
>> 2 years, asks a straight question, and get's told "business as usual,
>> we're still arguing among ourselves about what it should be".
>> 
>> Maybe Tiobe is right! Lots of others may not even bother to ask. They
>> just visit the newsgroup, read a page of it, and conclude "same old,
>> same old", and go away.
>> 
>> D should be D, not maybe 1.043, or let's wait a while and see what
>> happens with D2. Potential real users hate uncertainty. If they are
>> going to commit, then D must do so too.
> 
> What bothers me about this sentiment is that every other mainstream
> language undergoes revision, sometimes major ones, but that never seems
> to be an excuse for people to not use it.
> 
> For example, C++ is quite in flux with C++0x.
> 
> The only languages that are not undergoing revision are dead ones.

There are some differences though:

- other mainstream languages release new compilers and features every couple 
of years, you do so every couple of months!

- these other languages go out of their way to make new releases backwards 
compatible, sometimes at great costs. They almost never completely succeed 
though.

To be clear, I do think these are good things for D evolution, but most 
people are wary to invest energy in change. Reflecting back on the 
commitment to D1, I think this was a good move in two ways: it allowed 
larger programs and libraries to rely on it and may have freed the way for 
D2 to incorporate bolder changes. 



Re: when will D2 be stable?

2009-05-08 Thread Lutger
zsxxsz wrote:

> I found D is a wonderful programming language and start to use it in my
> projects. I use D2 now, but which is still unstable although it's version
> is D2.029. Can anyone tell me when D2 will be stable? Although D's using
> rate suffers sharp fall(shown in tiobe), I'll still believe that D will be
> better in future. But why does D fall down so much?
> 
> Thanks


Tiobe is like the astrology weekly news snippets: you know it's bullshit but 
you can't resist wanting to believe - until it brings bad news of course ;) 



Re: What's the current state of D?

2009-05-08 Thread dsimcha
== Quote from Walter Bright (newshou...@digitalmars.com)'s article
> dsimcha wrote:
> > Exactly my feelings, but I'll add that the time to make huge, sweeping 
> > changes
> > like the ones we're seeing now is before the language becomes mainstream.  
> > Once
> > the language has a large base of crufty production code that nobody still
> > understands and can fix quickly and easily when the language changes, it 
> > becomes
> > much harder to make these kinds of changes.
> Yes.
> The next D2 update will have one such change, which has been planned for
> maybe the past year. All static and global variables will default to
> being thread local (instead of being implicitly shared). Doing this is
> disruptive, but is critical to credibly supporting multithreaded
> programming.
> In testing this out, I've uncovered at least a dozen implicit sharing
> bugs in Phobos. I think this change will have a big payoff for
> multithreaded code.

Awesome.  I actually found a few of these bugs in the past few days, and was
meaning to report them.  I guess I don't need to now.  Just out of curiosity,
though, you use __gshared in a lot of places and I haven't seen it in any of the
discussions.  What is it?


Re: What's the current state of D?

2009-05-08 Thread BCS

Reply to F,


Finally, new releases are provided as optional, not as compulsory. If
someone wants to stick with one compiler version, he/she could do the
job with that version and that's all.



The one issue with that re 2.0 is that you can be faced with choosing between 
working thought a breaking change or not getting bug fixes ever again.





Re: What's the current state of D?

2009-05-08 Thread F
I agree. Yes, I still use D/D2 for my home-based projects and not in my work. 
So, you could say it is (still) a toy. But, with every release and bug fix, it 
becomes better and better language. I upgrade to the new release with joy, but 
I am not forced to do so if that will break my code.

Finally, new releases are provided as optional, not as compulsory. If someone 
wants to stick with one compiler version, he/she could do the job with that 
version and that's all.

I don't think stability should become an obstacle in looking for better. Life 
evolves, compilers and languages should do that too. It is us, people, which 
should come at length with that truth.



Walter Bright Wrote:

> Steve Teale wrote:
> > This is the sort of answer that will kill D. The guy comes back after
> > 2 years, asks a straight question, and get's told "business as usual,
> > we're still arguing among ourselves about what it should be".
> > 
> > Maybe Tiobe is right! Lots of others may not even bother to ask. They
> > just visit the newsgroup, read a page of it, and conclude "same old,
> > same old", and go away.
> > 
> > D should be D, not maybe 1.043, or let's wait a while and see what
> > happens with D2. Potential real users hate uncertainty. If they are
> > going to commit, then D must do so too.
> 
> What bothers me about this sentiment is that every other mainstream 
> language undergoes revision, sometimes major ones, but that never seems 
> to be an excuse for people to not use it.
> 
> For example, C++ is quite in flux with C++0x.
> 
> The only languages that are not undergoing revision are dead ones.



Re: What's the current state of D?

2009-05-08 Thread Sean Kelly
== Quote from Walter Bright (newshou...@digitalmars.com)'s article
>
> Back in the 80's, the company I worked for did a project in a particular
> dialect of pascal. The company making that dialect went bust, and the
> company was left holding the bag with mission critical app. The compiler
> was binary only, had bugs, required old hardware to run on, etc.
> The dmd compiler source being available goes a very long way to
> alleviating such problems.

Definitely.  A big build team would want the compiler source code
available to future-proof their investment.  This obviously also
supports the assertion that such teams aren't likely to upgrade
compiler versions very often :-)


Re: when will D2 be stable?

2009-05-08 Thread BCS

Reply to zsxxsz,


I found D is a wonderful programming language and start to use it in
my projects. I use D2 now, but which is still unstable although it's
version is D2.029. Can anyone tell me when D2 will be stable? Although
D's using rate suffers sharp fall(shown in tiobe), I'll still believe
that D will be better in future. But why does D fall down so much?

Thanks



"six to eight weeks" see: 
http://stackoverflow.com/questions/719124/knowing-c-how-long-does-it-take-to-learn-java/719775#719775

(that's a joke BTW)




Re: when will D2 be stable?

2009-05-08 Thread hasen

Andrei Alexandrescu wrote:

zsxxsz wrote:

I found D is a wonderful programming language and start to use it in my
projects. I use D2 now, but which is still unstable although it's 
version is
D2.029. Can anyone tell me when D2 will be stable? Although D's using 
rate
suffers sharp fall(shown in tiobe), I'll still believe that D will be 
better

in future. But why does D fall down so much?


The fall of D in Tiobe has to do with an issue in Yahoo's search engine. 
I have talked to a friend of mine who is a research scientist at Yahoo 
and he is looking into fixing the issue and also the fact that the top 3 
results for "D programming" search are irrelevant.


Andrei


I don't trust TOIBE; no one should, it's just not reliable.


Re: What's the current state of D?

2009-05-08 Thread Walter Bright

dsimcha wrote:

Exactly my feelings, but I'll add that the time to make huge, sweeping changes
like the ones we're seeing now is before the language becomes mainstream.  Once
the language has a large base of crufty production code that nobody still
understands and can fix quickly and easily when the language changes, it becomes
much harder to make these kinds of changes.


Yes.

The next D2 update will have one such change, which has been planned for 
maybe the past year. All static and global variables will default to 
being thread local (instead of being implicitly shared). Doing this is 
disruptive, but is critical to credibly supporting multithreaded 
programming.


In testing this out, I've uncovered at least a dozen implicit sharing 
bugs in Phobos. I think this change will have a big payoff for 
multithreaded code.


Re: What's the current state of D?

2009-05-08 Thread Walter Bright

Sean Kelly wrote:

Will that project manager care?  Most build teams don't update compiler
versions very often--once a version has been settled upon that's pretty
much it, unless a show-stopping bug appears during development that
for some reason can't be worked around.  In fact, I can't even see a team
bothering to speculate about the future popularity of a language when
choosing it for a project.  The only thing that matters is whether it's a
good decision today, not five years from now.  If that weren't the case,
then there would have never been a call for COBOL programmers
during the Y2K transition.


Back in the 80's, the company I worked for did a project in a particular 
dialect of pascal. The company making that dialect went bust, and the 
company was left holding the bag with mission critical app. The compiler 
was binary only, had bugs, required old hardware to run on, etc.


The dmd compiler source being available goes a very long way to 
alleviating such problems.


Also, any significant dev project needs to archive the compiler used to 
build it along with the project. Regardless of the language. That just 
only makes sense.


Re: What's the current state of D?

2009-05-08 Thread BCS

Reply to Steve,


BCS Wrote:


Hello Ameer,


Hi all.
When I last used D a couple years ago, 2.0 was the experimental
branch and
1.0 was stable.

still true


Now that I have a little time on my hands I'm wondering: what is the
current landscape? Is 2.0 approaching any sort of stability?


the const system is stable and now it's starting to play with
threading


Are
there still two competing runtime libraries or have they been
merged?

No not for 1.0 (and they never will be) but /when/ Tango gets ported
to 2.0 they will coexist.


Basically I want to know if it's worth using 2.0 for anything of
importance
or is it still in flux?

Don't use it for bet-the-bank code. Use it for, fun-n-games code.
Between them, it's up to you.


Thanks,
Ameer


This is the sort of answer that will kill D. The guy comes back after
2 years, asks a straight question, and get's told "business as usual,
we're still arguing among ourselves about what it should be".



What, should I lie? Of am I smoking something? If what I said is true and 
will kill D than we need to fix something. (that said...)




D should be D, not maybe 1.043, or let's wait a while and see what
happens with D2. Potential real users hate uncertainty. If they are
going to commit, then D must do so too.



I don't see how that can be done. For people to use it there needs to be 
a stable platform to work with. For it to evolve it needs to be able to make 
breaking changers. These fundamentally conflict. The only solution I can 
see is that D1.0 is the first and should be used for things that need stability 
and 2.0 is the evolving version and shouldn't be used for things that need 
stability until it stabilizes.


How would you have it done?




Re: What's the current state of D?

2009-05-08 Thread Walter Bright

dsimcha wrote:

This sometimes makes me wonder if D1 and D2 are going to evolve into separate 
but
related languages with separate niches at some point, something like Scheme vs.
Common Lisp or C vs. C++.  D1, with its simplicity and the availability of 
Tango,
seems well suited to be a Java++ kind of language.  D2, with its extremely
powerful metaprogramming, greater complexity and the availability of Phobos2,
seems more like a (C++0x)++.


D1, by definition, isn't going to evolve any more than C++98 is going to 
evolve.


Re: What's the current state of D?

2009-05-08 Thread dsimcha
== Quote from Walter Bright (newshou...@digitalmars.com)'s article
> Steve Teale wrote:
> > This is the sort of answer that will kill D. The guy comes back after
> > 2 years, asks a straight question, and get's told "business as usual,
> > we're still arguing among ourselves about what it should be".
> >
> > Maybe Tiobe is right! Lots of others may not even bother to ask. They
> > just visit the newsgroup, read a page of it, and conclude "same old,
> > same old", and go away.
> >
> > D should be D, not maybe 1.043, or let's wait a while and see what
> > happens with D2. Potential real users hate uncertainty. If they are
> > going to commit, then D must do so too.
> What bothers me about this sentiment is that every other mainstream
> language undergoes revision, sometimes major ones, but that never seems
> to be an excuse for people to not use it.
> For example, C++ is quite in flux with C++0x.
> The only languages that are not undergoing revision are dead ones.

Exactly my feelings, but I'll add that the time to make huge, sweeping changes
like the ones we're seeing now is before the language becomes mainstream.  Once
the language has a large base of crufty production code that nobody still
understands and can fix quickly and easily when the language changes, it becomes
much harder to make these kinds of changes.


Re: What's the current state of D?

2009-05-08 Thread Sean Kelly
== Quote from Steve Teale (steve.te...@britseyeview.com)'s article
>
> OK so for those who crave stability there is D1.x, but when all the focus 
> appears to be on D2, what level of confidence is afforded to
D1 users. Can a project Manager cross his heart and say that D1 will still be 
alive and well in five years time?

Will that project manager care?  Most build teams don't update compiler
versions very often--once a version has been settled upon that's pretty
much it, unless a show-stopping bug appears during development that
for some reason can't be worked around.  In fact, I can't even see a team
bothering to speculate about the future popularity of a language when
choosing it for a project.  The only thing that matters is whether it's a
good decision today, not five years from now.  If that weren't the case,
then there would have never been a call for COBOL programmers
during the Y2K transition.


Re: What's the current state of D?

2009-05-08 Thread dsimcha
== Quote from Walter Bright (newshou...@digitalmars.com)'s article
> Steve Teale wrote:
> > I am not criticizing you. I think you are doing a great job under the
> > pressure of a slew of suggestions. But maybe a line in the sand at
> > some point?
> But there *is* a line in the sand - D1.
> > OK so for those who crave stability there is D1.x, but when all the
> > focus appears to be on D2, what level of confidence is afforded to D1
> > users. Can a project Manager cross his heart and say that D1 will
> > still be alive and well in five years time?
> This just makes me very frustrated. Every fix going into D2 that also
> applies to D1 has been folded into D1. There are even some fixes that
> only apply to D1 that only go into D1. These average about 20 per month.
> D1 even got the FreeBSD port before D2. What other language gets that
> kind of support?

This sometimes makes me wonder if D1 and D2 are going to evolve into separate 
but
related languages with separate niches at some point, something like Scheme vs.
Common Lisp or C vs. C++.  D1, with its simplicity and the availability of 
Tango,
seems well suited to be a Java++ kind of language.  D2, with its extremely
powerful metaprogramming, greater complexity and the availability of Phobos2,
seems more like a (C++0x)++.


Re: Write/Writeln, etc

2009-05-08 Thread Don

Steven Schveighoffer wrote:

On Fri, 08 May 2009 08:28:28 -0400, Georg Wrede  wrote:


Steven Schveighoffer wrote:
On Thu, 07 May 2009 16:02:52 -0400, Jarrett Billingsley 
 wrote:


On Thu, May 7, 2009 at 1:38 PM, bearophile 
 wrote:


The following doesn't work, the pragma isn't seen as an 
instruction, I guess this is normal, but I don't like it much:


static if (true)
   pragma(msg, "true");
else
   pragma(msg, "false");


Funny, I just ran into that today too.  If you add braces, for some
reason it works.


D2 programs need more and more compile-time printing, and:
pragma(msg, ToString(...) ~ ...);
isn't much nice.


Once again: 'much' and 'too much' can never.

modify.

adjectives.

They are not adverbs.

 Much.
 can be.
 an adverb.
 http://www.merriam-webster.com/dictionary/much%5B2%5D
 Besides, who really cares if people use incorrect grammar?  We 
aren't turning in essay papers here.

 Bearophile, what you meant to say was "isn't much nicer".


Or "isn't very nice".

(At least, if looking at bearophile's regular use of that phrase. 
Could it be that "very" and "much" are the same word in Italian?)


Not that I care, English isn't my first language, either. ;-)


could be, I didn't read the whole context.

If you were comparing something to something else, then "isn't much 
nicer" makes sense, but if you are not comparing two things, then "isn't 
very nice" makes more sense.


"isn't much nice" seems like it should make sense from a purely 
grammatical point of view, but it sounds weird to me :)  I don't know 
why it's bad, but it is.


-Steve


"nice" isn't measurable, so you can't use "much". Likewise, you can only 
use "many" if it's something you can count.




Re: What's the current state of D?

2009-05-08 Thread Sean Kelly
== Quote from Walter Bright (newshou...@digitalmars.com)'s article
> grauzone wrote:
>
> > And _many_ projects probably need minor
> > fixes, before they compile with the latest dmd1 compiler.
> Nearly all of those are due to inadvertent reliance on bugs in D1. You
> see this quite a bit in the C++ world. Every time g++ gets updated, I
> have to tweak something in my sources.

And this is often unavoidable.  Look at all the workarounds in Boost
code for various versions of the MS compiler, for example (particularly
VC6 vs. later versions).  I can't think of how much code I've written in
C++ that used preprocessor switches to vary implementation between
compiler versions, even though they all claimed to support C++98.
Fortunately, a little experience with the quirks of each compiler makes
transitioning code fairly mechanical in most cases.


Re: What's the current state of D?

2009-05-08 Thread grauzone
Nearly all of those are due to inadvertent reliance on bugs in D1. You 
see this quite a bit in the C++ world. Every time g++ gets updated, I 
have to tweak something in my sources.


In the case of D, the problem is that sometimes you don't really know if 
it's a bug or a feature.


Re: What's the current state of D?

2009-05-08 Thread grauzone
Nobody is saying that you don't put enough effort into making it stable 
or so. It's just sad reality, that the unstable state of the D toolchain 
drives away users and potential users.


Anyway, having a stable version of D and making the full compiler source 
available were great steps into the right direction.


Re: What's the current state of D?

2009-05-08 Thread Walter Bright

Steve Teale wrote:

I am not criticizing you. I think you are doing a great job under the
pressure of a slew of suggestions. But maybe a line in the sand at
some point?


But there *is* a line in the sand - D1.


OK so for those who crave stability there is D1.x, but when all the
focus appears to be on D2, what level of confidence is afforded to D1
users. Can a project Manager cross his heart and say that D1 will
still be alive and well in five years time?


This just makes me very frustrated. Every fix going into D2 that also 
applies to D1 has been folded into D1. There are even some fixes that 
only apply to D1 that only go into D1. These average about 20 per month. 
D1 even got the FreeBSD port before D2. What other language gets that 
kind of support?




Re: when will D2 be stable?

2009-05-08 Thread Steve Teale
zsxxsz Wrote:

> I found D is a wonderful programming language and start to use it in my
> projects. I use D2 now, but which is still unstable although it's version is
> D2.029. Can anyone tell me when D2 will be stable? Although D's using rate
> suffers sharp fall(shown in tiobe), I'll still believe that D will be better
> in future. But why does D fall down so much?
> 
> Thanks

See thread 
http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=89528




Re: What's the current state of D?

2009-05-08 Thread Walter Bright

grauzone wrote:

But C++ programs still compile and run correctly with C++0x compilers.


True enough, but that wasn't true for C++98, or C89. Nobody refused to 
use C or C++ because of that.


I bet none of the projects on dsource are even compilable with dmd2 (even 
if they were written for D2.0).


Take any C++ project from 15 years ago and I bet it won't compile today, 
either.


And _many_ projects probably need minor 
fixes, before they compile with the latest dmd1 compiler.


Nearly all of those are due to inadvertent reliance on bugs in D1. You 
see this quite a bit in the C++ world. Every time g++ gets updated, I 
have to tweak something in my sources.


Every binary release of dmd is available for download. If you require an 
unchanging compiler, it's trivial to operate that way. dmd isn't going 
to auto-update itself and break your compiles.


Re: What's the current state of D?

2009-05-08 Thread Steve Teale
Walter Bright Wrote:

> Steve Teale wrote:
> > This is the sort of answer that will kill D. The guy comes back after
> > 2 years, asks a straight question, and get's told "business as usual,
> > we're still arguing among ourselves about what it should be".
> > 
> > Maybe Tiobe is right! Lots of others may not even bother to ask. They
> > just visit the newsgroup, read a page of it, and conclude "same old,
> > same old", and go away.
> > 
> > D should be D, not maybe 1.043, or let's wait a while and see what
> > happens with D2. Potential real users hate uncertainty. If they are
> > going to commit, then D must do so too.
> 
> What bothers me about this sentiment is that every other mainstream 
> language undergoes revision, sometimes major ones, but that never seems 
> to be an excuse for people to not use it.
> 
> For example, C++ is quite in flux with C++0x.
> 
> The only languages that are not undergoing revision are dead ones.

Yes Walter, but C++ went through a tedious standardization process - itself a 
long argument. So there was some basis for people to think that it had 'got 
there'.

But to come back after 2 years and find the same stuff still going on is 
depressing - been there done that. OK, it didn't put me off, I'm still in 
there, but it bothers me. I'd be dishonest if I said otherwise.

I am not criticizing you. I think you are doing a great job under the pressure 
of a slew of suggestions. But maybe a line in the sand at some point?

OK so for those who crave stability there is D1.x, but when all the focus 
appears to be on D2, what level of confidence is afforded to D1 users. Can a 
project Manager cross his heart and say that D1 will still be alive and well in 
five years time?



Re: What's the current state of D?

2009-05-08 Thread grauzone

Walter Bright wrote:

Steve Teale wrote:

This is the sort of answer that will kill D. The guy comes back after
2 years, asks a straight question, and get's told "business as usual,
we're still arguing among ourselves about what it should be".

Maybe Tiobe is right! Lots of others may not even bother to ask. They
just visit the newsgroup, read a page of it, and conclude "same old,
same old", and go away.

D should be D, not maybe 1.043, or let's wait a while and see what
happens with D2. Potential real users hate uncertainty. If they are
going to commit, then D must do so too.


What bothers me about this sentiment is that every other mainstream 
language undergoes revision, sometimes major ones, but that never seems 
to be an excuse for people to not use it.


For example, C++ is quite in flux with C++0x.

The only languages that are not undergoing revision are dead ones.


But C++ programs still compile and run correctly with C++0x compilers. I 
bet none of the projects on dsource are even compilable with dmd2 (even 
if they were written for D2.0). And _many_ projects probably need minor 
fixes, before they compile with the latest dmd1 compiler.


Re: when will D2 be stable?

2009-05-08 Thread Andrei Alexandrescu

zsxxsz wrote:

I found D is a wonderful programming language and start to use it in my
projects. I use D2 now, but which is still unstable although it's version is
D2.029. Can anyone tell me when D2 will be stable? Although D's using rate
suffers sharp fall(shown in tiobe), I'll still believe that D will be better
in future. But why does D fall down so much?


The fall of D in Tiobe has to do with an issue in Yahoo's search engine. 
I have talked to a friend of mine who is a research scientist at Yahoo 
and he is looking into fixing the issue and also the fact that the top 3 
results for "D programming" search are irrelevant.


Andrei


Re: What's the current state of D?

2009-05-08 Thread Walter Bright

Steve Teale wrote:

This is the sort of answer that will kill D. The guy comes back after
2 years, asks a straight question, and get's told "business as usual,
we're still arguing among ourselves about what it should be".

Maybe Tiobe is right! Lots of others may not even bother to ask. They
just visit the newsgroup, read a page of it, and conclude "same old,
same old", and go away.

D should be D, not maybe 1.043, or let's wait a while and see what
happens with D2. Potential real users hate uncertainty. If they are
going to commit, then D must do so too.


What bothers me about this sentiment is that every other mainstream 
language undergoes revision, sometimes major ones, but that never seems 
to be an excuse for people to not use it.


For example, C++ is quite in flux with C++0x.

The only languages that are not undergoing revision are dead ones.


when will D2 be stable?

2009-05-08 Thread zsxxsz
I found D is a wonderful programming language and start to use it in my
projects. I use D2 now, but which is still unstable although it's version is
D2.029. Can anyone tell me when D2 will be stable? Although D's using rate
suffers sharp fall(shown in tiobe), I'll still believe that D will be better
in future. But why does D fall down so much?

Thanks


Re: What's the current state of D?

2009-05-08 Thread Steve Teale
BCS Wrote:

> Hello Ameer,
> 
> > Hi all.
> > When I last used D a couple years ago, 2.0 was the experimental branch and
> > 1.0 was stable.
> 
> still true
> 
> > Now that I have a little time on my hands I'm wondering:
> > what is the current landscape? Is 2.0 approaching any sort of stability?
> 
> the const system is stable and now it's starting to play with threading
> 
> > Are
> > there still two competing runtime libraries or have they been merged?
> 
> No not for 1.0 (and they never will be) but /when/ Tango gets ported to 2.0 
> they will coexist.
> 
> > Basically I want to know if it's worth using 2.0 for anything of
> > importance
> > or is it still in flux?
> 
> Don't use it for bet-the-bank code. Use it for, fun-n-games code. Between 
> them, it's up to you.
> 
> 
> > Thanks,
> > Ameer
> > 
> 

This is the sort of answer that will kill D. The guy comes back after 2 years, 
asks a straight question, and get's told "business as usual, we're still 
arguing among ourselves about what it should be".

Maybe Tiobe is right! Lots of others may not even bother to ask. They just 
visit the newsgroup, read a page of it, and conclude "same old, same old", and 
go away.

D should be D, not maybe 1.043, or let's wait a while and see what happens with 
D2. Potential real users hate uncertainty. If they are going to commit, then D 
must do so too.



Re: NetBeans

2009-05-08 Thread JC

So, are you saying that it might be possible to create a D plugin for NB 6.7?
Also, what is ANTLR?
Thanks,
JC

BLS wrote:

dsimcha wrote:

== Quote from JC (jcrapuchet...@gmail.com)'s article
I am considering trying NetBeans for all of my development. I have 
been using
Eclipse, but have found that I am only using it because of its 
project interface

and its language highlight support (which sometimes doesn't work).
This brings me to my question: I know that NetBeans will work for PHP 
and C++,
the other two languages I use, but is there a way to get it to work 
with D?

Thanks,
JC


AFAIK, no, but if you could create a plugin for it, I would be forever 
grateful.
A few months ago, I crossed over to the dark side and wrote a very 
small (1-day)
project in Java because it had a library that I really needed.  
Despite despising
everything else about the language (I had never used Java before 
this), I was

thoroughly amazed by the power of NetBeans.

The experience made me understand why people use Java:  As much as 
Java the core
language sucks, the IDEs for it are so good that they're almost 
metaprogramming
facilities that write a bunch of your more tedious Java code for you.  
Of course,
I wouldn't trade D templates for it, but if C++'s relatively weak 
templates were
the tradeoff, I might consider it.  If something half this good were 
created for
D, it would be a huge step toward getting D accepted by the wider 
community.


I spend (waste) a couple of time in creating a Netbeans based D IDE.
(and I agree, Netbeans is a pretty good tool, and the Developer 
Collaboration plugin is fantastic)


Problem was, and still is the virulent paradigm and API change.
During NB 5.5 / 6 the Schlieman engine was a hot topic. ( Meanwhile this 
engine is pretty dead. Was not usable for D 'cause LARL 1 limitation ++)


The next incarnation since NB 6.1 - 6.5 was GSF (Generic scripting 
framework) which , however, never really fits into the Editor-Lexer- 
bridge API.
I will not say that it was impossible to create D language support using 
these APIs but you always have to keep your own code base in sync. with 
the NB SVN repos, which was, frankly said, a pain in the ass.


Now, for the upcoming NB 6.7 the "foreign language related " APIs  seem 
to become stable. IMO the  remaining part is ANTLR integration/support.


Scala,Python,Ruby,PHP,Erlang and since a few days, Scheme support are 
looking quit promising...


Björn
PS :what happens to Netbeans since ORACLE is the new SUN Owner?


Re: htod for linux?

2009-05-08 Thread Georg Wrede

Walter Bright wrote:

Georg Wrede wrote:


Walter, three years ago, when you last compiled htod, linux was an 
unfamiliar thing, right? Now that you're regularly roaming OSX, linux 
&co, would it be a big thing to make a non-windows version, too?


htod is built from the Digital Mars C compiler. In order to make one for 
Linux, it would have to support all of gcc's extensions which are used 
in the header files.


Ouch. Never saw that coming.



Re: htod for linux?

2009-05-08 Thread Walter Bright

Georg Wrede wrote:


Walter, three years ago, when you last compiled htod, linux was an 
unfamiliar thing, right? Now that you're regularly roaming OSX, linux 
&co, would it be a big thing to make a non-windows version, too?


htod is built from the Digital Mars C compiler. In order to make one for 
Linux, it would have to support all of gcc's extensions which are used 
in the header files.


Re: Iterators Must Go

2009-05-08 Thread Walter Bright

Steven Schveighoffer wrote:
You still have not addressed the usage of iterators as general data 
structure pointers.  As far as I can tell, ranges do not implement this.


i.e. find surrounding elements of an element.

With iterators:

auto iter = container.find(elem);
auto elembefore = iter - 1;
auto elemafter = iter + 1;

Assuming incrementing and decrementing an iterator is checked for 
out-of-bounds.


The problem is that last statement - "Assuming". If the iterator is the 
first or the last, or if there's only 1 or 2 elements in the container, 
it's crash city. Iterators are *inherently* uncheckable.


For finding the elemafter, it's trivial as find() returns a range from 
the found element to the end (and it's also trivially checkable!).


For elembefore, there's a bit more work involved, probably defining a 
find() that returns a range backed up by one one.


Re: Iterators Must Go

2009-05-08 Thread Sean Kelly

Sean Kelly wrote:
Great paper!  The only quibble I have so far is that I think iterators 
can support sentinel-terminated containers, it just isn't terribly 
natural to do so.


The things I particularly like:

find_end() -- Reverse iterators are a pain in the ass.  The simplicity 
of this is just fantastic.


Chain, Zip, Stride, Radial -- 100% pure awesome.

partial_sort() -- The definition of this is just ingenious.  It derives 
naturally from the range design and yet I'd never have thought of it 
otherwise.


Regarding iostream ranges, I'd have liked if there was a bit more about 
the difference in interface: put vs. push/pop.  One "benefit" of stream 
iterators is that they use the same syntax as other iterators, so it 
would be good to hear why the change in syntax for ranges isn't actually 
a design flaw.


Overall, the presentation makes a very compelling case for ranges. 
While it's /possible/ to do quite a lot with iterators, the truly 
interesting stuff is so difficult/messy that it isn't worth doing. 
Ranges are elegant and safe for even fancy things.  Nice work.


Re: Iterators Must Go

2009-05-08 Thread Steven Schveighoffer
On Thu, 07 May 2009 23:01:20 -0400, Andrei Alexandrescu  
 wrote:


The slides from my keynote at BoostCon 2009 (www.boostcon.com) are now  
available from:


http://www.boostcon.com/site-media/var/sphene/sphwiki/attachment/2009/05/08/iterators-must-go.pdf

The talk went so well, the urge to brag is too mighty to resist. I mean  
it's not everyday that several people come and tell they've literally  
lost sleep and focus on other talks because of thinking about ranges.  
Also, there was a definite feel of "before" and "after". In short, the  
talk has generated a great deal of interest in both D proper and in the  
Boost community rewriting the STL entirely in terms of ranges.


A good paper.

You still have not addressed the usage of iterators as general data  
structure pointers.  As far as I can tell, ranges do not implement this.


i.e. find surrounding elements of an element.

With iterators:

auto iter = container.find(elem);
auto elembefore = iter - 1;
auto elemafter = iter + 1;

Assuming incrementing and decrementing an iterator is checked for  
out-of-bounds.


-Steve


Re: Iterators Must Go

2009-05-08 Thread Sean Kelly
Great paper!  The only quibble I have so far is that I think iterators 
can support sentinel-terminated containers, it just isn't terribly 
natural to do so.


Re: Write/Writeln, etc

2009-05-08 Thread Steven Schveighoffer

On Fri, 08 May 2009 08:28:28 -0400, Georg Wrede  wrote:


Steven Schveighoffer wrote:
On Thu, 07 May 2009 16:02:52 -0400, Jarrett Billingsley  
 wrote:


On Thu, May 7, 2009 at 1:38 PM, bearophile   
wrote:


The following doesn't work, the pragma isn't seen as an instruction,  
I guess this is normal, but I don't like it much:


static if (true)
   pragma(msg, "true");
else
   pragma(msg, "false");


Funny, I just ran into that today too.  If you add braces, for some
reason it works.


D2 programs need more and more compile-time printing, and:
pragma(msg, ToString(...) ~ ...);
isn't much nice.


Once again: 'much' and 'too much' can never.

modify.

adjectives.

They are not adverbs.

 Much.
 can be.
 an adverb.
 http://www.merriam-webster.com/dictionary/much%5B2%5D
 Besides, who really cares if people use incorrect grammar?  We aren't  
turning in essay papers here.

 Bearophile, what you meant to say was "isn't much nicer".


Or "isn't very nice".

(At least, if looking at bearophile's regular use of that phrase. Could  
it be that "very" and "much" are the same word in Italian?)


Not that I care, English isn't my first language, either. ;-)


could be, I didn't read the whole context.

If you were comparing something to something else, then "isn't much nicer"  
makes sense, but if you are not comparing two things, then "isn't very  
nice" makes more sense.


"isn't much nice" seems like it should make sense from a purely  
grammatical point of view, but it sounds weird to me :)  I don't know why  
it's bad, but it is.


-Steve


Re: Write/Writeln, etc

2009-05-08 Thread Georg Wrede

Steven Schveighoffer wrote:
On Thu, 07 May 2009 16:02:52 -0400, Jarrett Billingsley 
 wrote:


On Thu, May 7, 2009 at 1:38 PM, bearophile  
wrote:


The following doesn't work, the pragma isn't seen as an instruction, 
I guess this is normal, but I don't like it much:


static if (true)
   pragma(msg, "true");
else
   pragma(msg, "false");


Funny, I just ran into that today too.  If you add braces, for some
reason it works.


D2 programs need more and more compile-time printing, and:
pragma(msg, ToString(...) ~ ...);
isn't much nice.


Once again: 'much' and 'too much' can never.

modify.

adjectives.

They are not adverbs.


Much.

can be.

an adverb.

http://www.merriam-webster.com/dictionary/much%5B2%5D

Besides, who really cares if people use incorrect grammar?  We aren't 
turning in essay papers here.


Bearophile, what you meant to say was "isn't much nicer".


Or "isn't very nice".

(At least, if looking at bearophile's regular use of that phrase. Could 
it be that "very" and "much" are the same word in Italian?)


Not that I care, English isn't my first language, either. ;-)


htod for linux?

2009-05-08 Thread Georg Wrede


Walter, three years ago, when you last compiled htod, linux was an 
unfamiliar thing, right? Now that you're regularly roaming OSX, linux 
&co, would it be a big thing to make a non-windows version, too?


Re: htod for linux?

2009-05-08 Thread Denis Koroskin
On Fri, 08 May 2009 16:21:13 +0400, Georg Wrede  wrote:

>
> Walter, three years ago, when you last compiled htod, linux was an  
> unfamiliar thing, right? Now that you're regularly roaming OSX, linux  
> &co, would it be a big thing to make a non-windows version, too?

Did you try BCD? http://www.dsource.org/projects/bcd

I never used it myself, but I hope I'll help you.


Re: Write/Writeln, etc

2009-05-08 Thread Steven Schveighoffer
On Thu, 07 May 2009 16:02:52 -0400, Jarrett Billingsley  
 wrote:


On Thu, May 7, 2009 at 1:38 PM, bearophile   
wrote:


The following doesn't work, the pragma isn't seen as an instruction, I  
guess this is normal, but I don't like it much:


static if (true)
   pragma(msg, "true");
else
   pragma(msg, "false");


Funny, I just ran into that today too.  If you add braces, for some
reason it works.


D2 programs need more and more compile-time printing, and:
pragma(msg, ToString(...) ~ ...);
isn't much nice.


Once again: 'much' and 'too much' can never.

modify.

adjectives.

They are not adverbs.


Much.

can be.

an adverb.

http://www.merriam-webster.com/dictionary/much%5B2%5D

Besides, who really cares if people use incorrect grammar?  We aren't  
turning in essay papers here.


Bearophile, what you meant to say was "isn't much nicer".

-Steve


Re: Iterators Must Go

2009-05-08 Thread Georg Wrede

Walter Bright wrote:
http://www.reddit.com/r/programming/comments/8isiw/author_of_modern_c_design_stl_iterators_must_die/ 



The link reads like Andrei wants to mureder Stepanov.

Good thing I read the slides. :-)