Re: Just one more thing...

2009-02-27 Thread Brad Roberts
Michel Fortin wrote:
> On 2009-02-27 16:37:13 -0500, Jacob Carlborg  said:
> 
>> Nick Sabalausky wrote:
>>> Ordinarily, I detest the idea of pulling support for anything as
>>> recent as just a few years old. But Apple themselves has a habit of
>>> ignoring users of anything except the latest version, so I would
>>> think that mac users would be accustomed to the old routine of their
>>> OS becoming a deadend the moment a new version comes out. So, in this
>>> case, I would think that there may actually be justification in
>>> sticking with 10.5+, if you were to so choose.
>>
>> I would not completely agree with you on this. When you install the
>> developer tools on osx 10.5 it installs SDKs for 10.5 and 10.4 as
>> default, but you can also choose to install support for older
>> versions. I'm not sure if it's only for 10.3 or also for 10.2.
> 
> On Mac OS X 10.5, you can compile for 10.3 using Xcode 3, and 10.2 using
> Xcode 2.5 (Xcode 2.5 for Leopard is a free download). Of course, 10.2
> and 10.3 being PowerPC-only, there's no point trying to compile DMD for
> them.

You can do that if and only if you don't require newer apis.  If you've
been reading this thread, you know that the runtime uses the posix
thread apis and those are supported less and less well as you go back in
time.  The ability to support the old versions isn't some magic wand
that conjures up new features into those old releases.

Later,
Brad



Re: Just one more thing...

2009-02-27 Thread Nick Sabalausky
"Jacob Carlborg"  wrote in message 
news:go9me9$kg...@digitalmars.com...
> Nick Sabalausky wrote:
>> "Walter Bright"  wrote in message 
>> news:go88pa$1gu...@digitalmars.com...
>>> Anders F Björklund wrote:
 Walter Bright wrote:

> Can you upgrade to 10.5 ?
 It's only a few months left to "Snow Leopard",
 then we can play the same game all over again.
>>> Yeah, but 10.5 has working posix threads. It's doubtful whether 10.4 is 
>>> worth the effort.
>>
>> Ordinarily, I detest the idea of pulling support for anything as recent 
>> as just a few years old. But Apple themselves has a habit of ignoring 
>> users of anything except the latest version, so I would think that mac 
>> users would be accustomed to the old routine of their OS becoming a 
>> deadend the moment a new version comes out. So, in this case, I would 
>> think that there may actually be justification in sticking with 10.5+, if 
>> you were to so choose.
>
> I would not completely agree with you on this. When you install the 
> developer tools on osx 10.5 it installs SDKs for 10.5 and 10.4 as default, 
> but you can also choose to install support for older versions. I'm not 
> sure if it's only for 10.3 or also for 10.2.
>
> Then what about Carbon, Classic (don't know if this is still available) 
> and Rosetta, environments and libraries to support older applications.

I was referring more to Apple's own software (which tends to be fairly 
important when using a mac). For instance I remember not being able to use 
XCode (instead of Project Builder) because I was on 10.2, and not being able 
to use certain parts of the "iLife" suite (or newer versions of them) 
because my OS was merely one point release behind (ie, only about 1.5 years 
old, at the time). But I dunno, maybe things have been changing since then. 




Re: Just one more thing...

2009-02-27 Thread Michel Fortin

On 2009-02-27 16:37:13 -0500, Jacob Carlborg  said:


Nick Sabalausky wrote:
Ordinarily, I detest the idea of pulling support for anything as recent 
as just a few years old. But Apple themselves has a habit of ignoring 
users of anything except the latest version, so I would think that mac 
users would be accustomed to the old routine of their OS becoming a 
deadend the moment a new version comes out. So, in this case, I would 
think that there may actually be justification in sticking with 10.5+, 
if you were to so choose.


I would not completely agree with you on this. When you install the 
developer tools on osx 10.5 it installs SDKs for 10.5 and 10.4 as 
default, but you can also choose to install support for older versions. 
I'm not sure if it's only for 10.3 or also for 10.2.


On Mac OS X 10.5, you can compile for 10.3 using Xcode 3, and 10.2 
using Xcode 2.5 (Xcode 2.5 for Leopard is a free download). Of course, 
10.2 and 10.3 being PowerPC-only, there's no point trying to compile 
DMD for them.



Then what about Carbon, Classic (don't know if this is still available) 
and Rosetta, environments and libraries to support older applications.


Classic is no longer supported on Leopard, and was never supported on 
Intel Macs.


Apple keeps old application running on newer versions of the operating 
system -- I can run apps I made for 10.0 on Leopard -- but their 
developer tools are limited to a few operating systems back.



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



Re: QtD 0.1 is out!

2009-02-27 Thread Jarrett Billingsley
On Fri, Feb 27, 2009 at 5:07 PM, Walter Bright
 wrote:
> Eldar Insafutdinov wrote:
>>
>> in our case resources we are initializing are unrelated to the
>> modules we are importing. and semantically the code is placed in
>> modules as it should be.
>
> True, often there isn't an actual dependency on the order, but the compiler
> can't tell that.

I was going to say "can't it?" but then remembered separate compilation.

Sigh.  I think the separate compilation paradigm, at least as designed
for C and C++, has to go the way of the dodo for lots of cool things
to be made possible.  The thread on .D about not being able to
non-virtualize methods in the face of separate compilation is another
example.


Re: QtD 0.1 is out!

2009-02-27 Thread Walter Bright

Eldar Insafutdinov wrote:

in our case resources we are initializing are unrelated to the
modules we are importing. and semantically the code is placed in
modules as it should be.


True, often there isn't an actual dependency on the order, but the 
compiler can't tell that.


Re: New tango conference movies

2009-02-27 Thread Fawzi Mohamed
On 2009-02-25 20:55:09 +0100, Peter Modzelewski 
 said:


Sorry for not giving any signs of life for so long but new job made me 
all occupied and I had little time to do anything else. But here I am - 
back with bunch of goodies:


http://petermodzelewski.blogspot.com/2009/02/tango-conference-2008-rolling-dice.html

http://petermodzelewski.blogspot.com/2009/02/tango-conference-2008-ldc.html

You 


can download the slides from:
team0xf.com/conference/rollingDiceTesting.pdf
team0xf.com/conference/LDC.pdf

Enjoy!


Thanks Keyer!

For those interested the randomized testing framework is part of blip:
http://dsource.org/projects/blip

Fawzi



Re: Just one more thing...

2009-02-27 Thread Jacob Carlborg

Nick Sabalausky wrote:
"Walter Bright"  wrote in message 
news:go88pa$1gu...@digitalmars.com...

Anders F Björklund wrote:

Walter Bright wrote:


Can you upgrade to 10.5 ?

It's only a few months left to "Snow Leopard",
then we can play the same game all over again.
Yeah, but 10.5 has working posix threads. It's doubtful whether 10.4 is 
worth the effort.


Ordinarily, I detest the idea of pulling support for anything as recent as 
just a few years old. But Apple themselves has a habit of ignoring users of 
anything except the latest version, so I would think that mac users would be 
accustomed to the old routine of their OS becoming a deadend the moment a 
new version comes out. So, in this case, I would think that there may 
actually be justification in sticking with 10.5+, if you were to so choose.


I would not completely agree with you on this. When you install the 
developer tools on osx 10.5 it installs SDKs for 10.5 and 10.4 as 
default, but you can also choose to install support for older versions. 
I'm not sure if it's only for 10.3 or also for 10.2.


Then what about Carbon, Classic (don't know if this is still available) 
and Rosetta, environments and libraries to support older applications.


Re: New tango conference movies

2009-02-27 Thread Christian Kamm
> But here I am -
> back with bunch of goodies:
> 
> http://petermodzelewski.blogspot.com/2009/02/tango-conference-2008-
rolling-dice.html
> http://petermodzelewski.blogspot.com/2009/02/tango-conference-2008-
ldc.html

Thanks a lot!

Christian



Re: QtD 0.1 is out!

2009-02-27 Thread Fawzi Mohamed

On 2009-02-27 21:49:58 +0100, Fawzi Mohamed  said:


On 2009-02-27 21:10:29 +0100, Walter Bright  said:


Eldar Insafutdinov wrote:

Now we have to make a manual init function called from class
constructors. I understand that allowing static consructors with
cyclic imports will make order of their execution undefined, but this
is acceptable and actually semantically doesn't break the idea of
cyclic imports. Otherwise in my opinion this behavior is
inconsistent..


One of the goals of D is to eliminate undefined behavior wherever 
possible. In C++, the undefined order of static construction was a 
source of many porting problems. I think it's better in the long run to 
have a defined order, even if it means having to reorganize the code a 
bit.


I fully agree,

*avoiding*

circular dependencies between modules is in general a good practice:
a circular dependency it means that you have tight coupling, in in that 
case it is normally better to have everything in the same module to 
have a better control on it.
Sometime one has cases in which circular dependencies arise, two ways 
to get rid of them are for example:


1) define and interface, the circular dependency is in the interfaces 
that are described in the same module, the two (or more) modules 
include the interfaces, and are not directly dependent on each other 
(only through the interfaces)


2) use templates, the circular dependencies are on a template 
parameter. The circular dependencies arise only upon instantiation





Re: QtD 0.1 is out!

2009-02-27 Thread Fawzi Mohamed

On 2009-02-27 21:10:29 +0100, Walter Bright  said:


Eldar Insafutdinov wrote:

Now we have to make a manual init function called from class
constructors. I understand that allowing static consructors with
cyclic imports will make order of their execution undefined, but this
is acceptable and actually semantically doesn't break the idea of
cyclic imports. Otherwise in my opinion this behavior is
inconsistent..


One of the goals of D is to eliminate undefined behavior wherever 
possible. In C++, the undefined order of static construction was a 
source of many porting problems. I think it's better in the long run to 
have a defined order, even if it means having to reorganize the code a 
bit.


I fully agree, circular dependencies between modules is in general a 
good practice:
a circular dependency it means that you have tight coupling, in in that 
case it is normally better to have everything in the same module to 
have a better control on it.
Sometime one has cases in which circular dependencies arise, two ways 
to get rid of them are for example:


1) define and interface, the circular dependency is in the interfaces 
that are described in the same module, the two (or more) modules 
include the interfaces, and are not directly dependent on each other 
(only through the interfaces)


2) use templates, the circular dependencies are on a template 
parameter. The circular dependencies arise only upon instantiation




Re: QtD 0.1 is out!

2009-02-27 Thread Eldar Insafutdinov
Walter Bright Wrote:

> Eldar Insafutdinov wrote:
> > Now we have to make a manual init function called from class
> > constructors. I understand that allowing static consructors with
> > cyclic imports will make order of their execution undefined, but this
> > is acceptable and actually semantically doesn't break the idea of
> > cyclic imports. Otherwise in my opinion this behavior is
> > inconsistent..
> 
> One of the goals of D is to eliminate undefined behavior wherever 
> possible. In C++, the undefined order of static construction was a 
> source of many porting problems. I think it's better in the long run to 
> have a defined order, even if it means having to reorganize the code a bit.

in our case resources we are initializing are unrelated to the modules we are 
importing. and semantically the code is placed in modules as it should be.


Re: Just one more thing...

2009-02-27 Thread Walter Bright

Nick Sabalausky wrote:
Ordinarily, I detest the idea of pulling support for anything as recent as 
just a few years old. But Apple themselves has a habit of ignoring users of 
anything except the latest version, so I would think that mac users would be 
accustomed to the old routine of their OS becoming a deadend the moment a 
new version comes out. So, in this case, I would think that there may 
actually be justification in sticking with 10.5+, if you were to so choose.


It's really a matter of the number of users who are not upgrading vs the 
effort involved in supporting them.


With Windows its very easy to support 15 years worth of Windows 
operating systems, so there's no reason not to. But there seems to be a 
different tradeoff at work for the Mac.


Re: QtD 0.1 is out!

2009-02-27 Thread Walter Bright

Eldar Insafutdinov wrote:

Now we have to make a manual init function called from class
constructors. I understand that allowing static consructors with
cyclic imports will make order of their execution undefined, but this
is acceptable and actually semantically doesn't break the idea of
cyclic imports. Otherwise in my opinion this behavior is
inconsistent..


One of the goals of D is to eliminate undefined behavior wherever 
possible. In C++, the undefined order of static construction was a 
source of many porting problems. I think it's better in the long run to 
have a defined order, even if it means having to reorganize the code a bit.


Re: Just one more thing...

2009-02-27 Thread Nick Sabalausky
"Walter Bright"  wrote in message 
news:go88pa$1gu...@digitalmars.com...
> Anders F Björklund wrote:
>> Walter Bright wrote:
>>
>>> Can you upgrade to 10.5 ?
>>
>> It's only a few months left to "Snow Leopard",
>> then we can play the same game all over again.
>
> Yeah, but 10.5 has working posix threads. It's doubtful whether 10.4 is 
> worth the effort.

Ordinarily, I detest the idea of pulling support for anything as recent as 
just a few years old. But Apple themselves has a habit of ignoring users of 
anything except the latest version, so I would think that mac users would be 
accustomed to the old routine of their OS becoming a deadend the moment a 
new version comes out. So, in this case, I would think that there may 
actually be justification in sticking with 10.5+, if you were to so choose.

But, to be fair, I did stop being a mac user a long time ago (10.2, tabby, 
or ocelot, or kitty-cat, or whatever the hell arbitrary feline name that 
was), so my opinion on this matter probably doesn't count for much. Feel 
free to take it or ignore it as you will.




Re: QtD 0.1 is out!

2009-02-27 Thread Eldar Insafutdinov
Walter Bright Wrote:

> Jarrett Billingsley wrote:
> > On Fri, Feb 27, 2009 at 12:36 PM, Eldar Insafutdinov 
> >  wrote:
> >> We faced a bug that module static constructors don't work with
> >> cyclic imports. Currently it's fixed with a dirty hack which is not
> >> really acceptable. Is there any chance for this to be fixed?
> >> 
> > 
> > I'll save Walter the trouble: come up with a reproduceable testcase
> > if you haven't already.  It won't get fixed it he can't tell what the
> >  problem is.
> 
> 
> I'll add to that my experience is that if the test case is incomplete, 
> then I need to guess at the rest and fill it in. Often, then the test 
> case works, and there's a cycle of "I can't reproduce the problem" 
> followed by the missing bit of context that was the real cause.
> 
> Then once the problem gets fixed, the reproducible test case goes into 
> the test suite so it stays fixed.

I'm sorry, my mistake - it's in specs 
http://www.digitalmars.com/d/1.0/module.html

>Cycles (circular dependencies) in the import declarations are allowed as long  
>as not both of the modules contain static constructors or static destructors.  
>Violation of this rule will result in a runtime exception.

Now we have to make a manual init function called from class constructors. I 
understand that allowing static consructors with cyclic imports will make order 
of their execution undefined, but this is acceptable and actually semantically 
doesn't break the idea of cyclic imports. Otherwise in my opinion this behavior 
is inconsistent..


Re: QtD 0.1 is out!

2009-02-27 Thread Walter Bright

Jarrett Billingsley wrote:
On Fri, Feb 27, 2009 at 12:36 PM, Eldar Insafutdinov 
 wrote:

We faced a bug that module static constructors don't work with
cyclic imports. Currently it's fixed with a dirty hack which is not
really acceptable. Is there any chance for this to be fixed?



I'll save Walter the trouble: come up with a reproduceable testcase
if you haven't already.  It won't get fixed it he can't tell what the
 problem is.



I'll add to that my experience is that if the test case is incomplete, 
then I need to guess at the rest and fill it in. Often, then the test 
case works, and there's a cycle of "I can't reproduce the problem" 
followed by the missing bit of context that was the real cause.


Then once the problem gets fixed, the reproducible test case goes into 
the test suite so it stays fixed.


Re: QtD 0.1 is out!

2009-02-27 Thread Jarrett Billingsley
On Fri, Feb 27, 2009 at 12:36 PM, Eldar Insafutdinov
 wrote:
> We faced a bug that module static constructors don't work with cyclic 
> imports. Currently it's fixed with a dirty hack which is not really 
> acceptable. Is there any chance for this to be fixed?
>

I'll save Walter the trouble: come up with a reproduceable testcase if
you haven't already.  It won't get fixed it he can't tell what the
problem is.


Re: QtD 0.1 is out!

2009-02-27 Thread Eldar Insafutdinov
We faced a bug that module static constructors don't work with cyclic imports. 
Currently it's fixed with a dirty hack which is not really acceptable. Is there 
any chance for this to be fixed?


Re: Just one more thing...

2009-02-27 Thread Jarrett Billingsley
On Fri, Feb 27, 2009 at 11:20 AM, John Stoneham
 wrote:
> Anders F Björklund Wrote:
>> DMD is now the third D compiler to make it to Mac OS X,
>> after GDC and LDC before it (based on same front-end).
>
> Development on GDC appears to have stopped in 2007. LDC certainly has some 
> life in it and looks promising. I will definitely have to check it out.
>
> However, even if LDC becomes stable on all platforms, it's still not the 
> official reference implementation. That would be DMD. I think it's very 
> important for the official DMD compiler to support the 3 major platforms, and 
> I'm very excited (caught the typo that time :) that OS X has been included.
>

LDC is based on DMD.  They share the same frontend.


Re: Just one more thing...

2009-02-27 Thread John Stoneham
Anders F Björklund Wrote:
> DMD is now the third D compiler to make it to Mac OS X,
> after GDC and LDC before it (based on same front-end).

Development on GDC appears to have stopped in 2007. LDC certainly has some life 
in it and looks promising. I will definitely have to check it out.

However, even if LDC becomes stable on all platforms, it's still not the 
official reference implementation. That would be DMD. I think it's very 
important for the official DMD compiler to support the 3 major platforms, and 
I'm very excited (caught the typo that time :) that OS X has been included. 


Re: Just one more thing...

2009-02-27 Thread Sean Kelly

Anders F Björklund wrote:

Walter Bright wrote:


Can you upgrade to 10.5 ?


It's only a few months left to "Snow Leopard",
then we can play the same game all over again.


And at that point Apple will drop support for 10.4.


Re: Just one more thing...

2009-02-27 Thread Sean Kelly

Fawzi Mohamed wrote:
On 2009-02-27 09:38:02 +0100, Walter Bright  
said:



Anders F Björklund wrote:

Walter Bright wrote:


Can you upgrade to 10.5 ?


It's only a few months left to "Snow Leopard",
then we can play the same game all over again.


Yeah, but 10.5 has working posix threads. It's doubtful whether 10.4 
is worth the effort.


the worst offender (semaphores) are broken also on 10.5, I had to 
implement them on the top of mach semaphores in tango.


This isn't likely to change any time soon.  There is the old sys/sem.h 
or whatever (from the XOpen spec), but the interface just stinks.


Re: Just one more thing...

2009-02-27 Thread Fawzi Mohamed

On 2009-02-27 09:38:02 +0100, Walter Bright  said:


Anders F Björklund wrote:

Walter Bright wrote:


Can you upgrade to 10.5 ?


It's only a few months left to "Snow Leopard",
then we can play the same game all over again.


Yeah, but 10.5 has working posix threads. It's doubtful whether 10.4 is 
worth the effort.


the worst offender (semaphores) are broken also on 10.5, I had to 
implement them on the top of mach semaphores in tango.




Re: Just one more thing...

2009-02-27 Thread Fawzi Mohamed

On 2009-02-27 09:43:12 +0100, Walter Bright  said:


Anders F Björklund wrote:

DMD is now the third D compiler to make it to Mac OS X,
after GDC and LDC before it (based on same front-end).


D2 needed to get there, too.


Yes, I am very happy about this, now I might start playing with D 2.0 
(in the spare time).



But the wxD samples built successfully* with all three...


Great!





Re: Just one more thing...

2009-02-27 Thread Anders F Björklund

Walter Bright wrote:

DMD is now the third D compiler to make it to Mac OS X,
after GDC and LDC before it (based on same front-end).


D2 needed to get there, too.


I get them confused all the time, with D meaning DMD or D2.

--anders


Re: Just one more thing...

2009-02-27 Thread Walter Bright

Anders F Björklund wrote:

DMD is now the third D compiler to make it to Mac OS X,
after GDC and LDC before it (based on same front-end).


D2 needed to get there, too.


But the wxD samples built successfully* with all three...


Great!


Re: Just one more thing...

2009-02-27 Thread Walter Bright

Anders F Björklund wrote:

Walter Bright wrote:


Can you upgrade to 10.5 ?


It's only a few months left to "Snow Leopard",
then we can play the same game all over again.


Yeah, but 10.5 has working posix threads. It's doubtful whether 10.4 is 
worth the effort.


Re: Just one more thing...

2009-02-27 Thread Anders F Björklund

Walter Bright wrote:


Can you upgrade to 10.5 ?


It's only a few months left to "Snow Leopard",
then we can play the same game all over again.

--anders


Re: Just one more thing...

2009-02-27 Thread Anders F Björklund

John Stoneham wrote:


I'm really looking forward to using D on OS X.
As Tank said in the Matirx, it's a very exiting time!


There seems to be typos there, I think you mean "DMD" :-)

DMD is now the third D compiler to make it to Mac OS X,
after GDC and LDC before it (based on same front-end).
Anyway, it's just minor symbol issues left - "hello.d"
even limps along if you stub the missing symbol for it.

But the wxD samples built successfully* with all three...

--anders

* on Mac OS X 10.5, that was