December 30, 2012
On 28/12/2012 04:57, Jonathan M Davis wrote:
> On Thursday, December 27, 2012 17:44:09 Stewart Gordon wrote:
>> On 27/12/2012 13:52, Jonathan M Davis wrote:
<snip>
>>> We're not supporting anything older than XP, but we're still
>>> supporting XP, so whatever is done with the bindings needs to be in
>>> line with that.
>>
>> Are you referring to DMD or to the D language as a whole?  And where is
>> the official statement?
>
> I am referring to dmd, druntime, and Phobos. It was agreed upon by the Phobos
> devs in the newsgroup and/or in discussions in github pull requests, so it's
> essentially official, but we've never actually put it in the changelog or
> officially announced it in any way. I believe that it happened when we
> explicitly removed all of the Win9x support a while back.
<snip>

Thinking about it, we need to consider what third-party compiler vendors are going to do.  A standardised set of versions for all D compilers to use would be desirable.  Moreover, these third parties might want to use our bindings as well and thereby avoid duplication of effort.

But what is the oldest version of Windows we can reasonably expect anybody who writes a D2 compiler to want to support?  Getting rid of the Win9x support would simplify things considerably, but maybe we should still make Win2000 the default target version.  While it would seem silly to default to targeting a version that we officially don't support, it would make our bindings more portable and encourage Windows programmers to write portable code.  If that makes sense.

But this does suggest that, if nonetheless Walter decrees that the bindings distributed with DMD shall have XP as the minimum target version, meeting all of the objectives I've covered would mean creating a fork of the bindings project....

Stewart.
December 30, 2012
On Sunday, December 30, 2012 00:32:18 Stewart Gordon wrote:
> On 28/12/2012 04:57, Jonathan M Davis wrote:
> > On Thursday, December 27, 2012 17:44:09 Stewart Gordon wrote:
> >> On 27/12/2012 13:52, Jonathan M Davis wrote:
> <snip>
> 
> >>> We're not supporting anything older than XP, but we're still supporting XP, so whatever is done with the bindings needs to be in line with that.
> >> 
> >> Are you referring to DMD or to the D language as a whole?  And where is the official statement?
> > 
> > I am referring to dmd, druntime, and Phobos. It was agreed upon by the Phobos devs in the newsgroup and/or in discussions in github pull requests, so it's essentially official, but we've never actually put it in the changelog or officially announced it in any way. I believe that it happened when we explicitly removed all of the Win9x support a while back.
> 
> <snip>
> 
> Thinking about it, we need to consider what third-party compiler vendors are going to do.  A standardised set of versions for all D compilers to use would be desirable.  Moreover, these third parties might want to use our bindings as well and thereby avoid duplication of effort.

Third parties would typically take druntime and make whatever minimal tweaks they need to make it work with their stuff. That's what gdc and ldc do.

> But what is the oldest version of Windows we can reasonably expect anybody who writes a D2 compiler to want to support?  Getting rid of the Win9x support would simplify things considerably, but maybe we should still make Win2000 the default target version.  While it would seem silly to default to targeting a version that we officially don't support, it would make our bindings more portable and encourage Windows programmers to write portable code.  If that makes sense.
> 
> But this does suggest that, if nonetheless Walter decrees that the bindings distributed with DMD shall have XP as the minimum target version, meeting all of the objectives I've covered would mean creating a fork of the bindings project....

We specifically decided not to support Win2K. It requires extra effort that we don't want to go to, and almost no one uses it anymore. XP isn't even going to be supported by Microsoft for all that much longer. I think that it's just asking for trouble to try and support anything older than XP. It's extra effort for little-to-no gain. I don't know why you'd bother. And IIRC, Phobos already uses at least one function which does not exist in Win2K. So, while you can certainly make it all work on older versions of Windows if you really want to, you're fighting an uphill battle. I would expect any bindings added to druntime to be done with the idea that they're for XP or newer rather than trying to support pre-XP at all.

- Jonathan M Davis
December 30, 2012
12/30/2012 3:20 AM, Stewart Gordon пишет:
> On 28/12/2012 19:20, Stewart Gordon wrote:
>> On 28/12/2012 18:54, Phil Lavoie wrote:
>> <snip>
>>> Additional Question: Is there a reason why you use MingW's headers
>>> instead of VC? I am just wild guessing here, but aren't VC's most likely
>>> to be up to date?
>>
>> Copyright.  The MinGW headers are public domain.
>
> On top of this, to use the headers from VS would require that somebody
> who is involved with the project has access to a version of VS that has
> the headers for the latest version of Windows, or at least access to
> said headers.  What's more, it would be more of a challenge to update
> our bindings when a new version comes out.
>

Platform SDK is free for anyone having Windows license. It includes relevant headers, libraries and build tools.

Copyright issues might be more critical though.

> OTOH, anybody can download the MinGW headers for free, both the latest
> version and older versions in order to compare them and determine what
> changes need to be made to our bindings.
>
> Stewart.


-- 
Dmitry Olshansky
December 30, 2012
On 30/12/2012 00:49, Jonathan M Davis wrote:
<snip>
> Third parties would typically take druntime and make whatever
> minimal tweaks they need to make it work with their stuff. That's
> what gdc and ldc do.

All the more reason to keep the Win2000 support in, in case one of these third parties wants it.

<snip>
> We specifically decided not to support Win2K. It requires extra
> effort that we don't want to go to, and almost no one uses it
> anymore.

What extra effort is that?  The versioning to support Win2000 (and even NT4) is already in both the C headers and the D modules that have so far been done.  It's just another value of the constant _WIN32_WINNT.  My common sense tells me that it is _removing_ it that requires extra effort.

<snip>
> I would expect any bindings added to druntime to be done with the
> idea that they're for XP or newer rather than trying to support
> pre-XP at all.

Once each file has been translated, why would any further bindings for WinXP, let alone any older version, be later added?

Stewart.
December 30, 2012
On Sunday, December 30, 2012 18:33:01 Stewart Gordon wrote:
> On 30/12/2012 00:49, Jonathan M Davis wrote:
> <snip>
> 
> > Third parties would typically take druntime and make whatever minimal tweaks they need to make it work with their stuff. That's what gdc and ldc do.
> 
> All the more reason to keep the Win2000 support in, in case one of these third parties wants it.

They're on their own if they want that. We're not supporting it, and since Microsoft hasn't supported it for years, I expect that very few people are going to care about it.

> > We specifically decided not to support Win2K. It requires extra effort that we don't want to go to, and almost no one uses it anymore.
> 
> What extra effort is that?  The versioning to support Win2000 (and even NT4) is already in both the C headers and the D modules that have so far been done.  It's just another value of the constant _WIN32_WINNT.  My common sense tells me that it is _removing_ it that requires extra effort.

There's stuff in druntime that doesn't work on Win2K right now. For instance, per this bug report, the stack trace stuff doesn't work on Win2K:

http://d.puremagic.com/issues/show_bug.cgi?id=6024

The solution was to drop Win2K support (the bug is still open, because it's asking that we make an official announcement about it, which we haven't done yet and really should have).

> > I would expect any bindings added to druntime to be done with the idea that they're for XP or newer rather than trying to support pre-XP at all.
> 
> Once each file has been translated, why would any further bindings for WinXP, let alone any older version, be later added?

I don't follow.

I'd expect that druntime contain the function declarations for the entire Windows system API which is supported with XP with no care whatsoever to what was or wasn't supported before XP (because we're not supporting anything prior to XP). If those functions happened to be on Win2k, then fine, but it doesn't matter one way or the other, because we don't suppport it. Newer functions that are not in XP would then presumably be added in a way which they're only there if you've defined the right version to enable them (e.g. a version identifier indicating Vista would enable all of the functions added in Vista).

In general, older versions of Windows may work, but we're not making any effort to make them work (_especially_ if that means doing stuff like checking the Windows version number or creating different code branches for them as used to be the case in std.file to deal with the lack of W functions in Win9x), and we're not adding any code to target them or help them. They work as long as they work with the stuff targeting the currently supported versions of Windows.

I suppose that you can add Win2K bindings to druntime if you really want to go to that extra effort, but only if it's not going to complicate things. And we're not supporting anything related to Win2K, so any bindings which are 2k- specific are just icing on the cake. druntime and Phobos themselves will not be making any attempt to support Win2K, and no bug reports related to Win2K are likely to be considered valid.

Whenever we drop XP support (which is obviously a ways off), that may or may not involve removing stuff related to XP. For the most part, it'll probably just be left there, but if it's causing problems for something (e.g. like was happening with std.file and Win9x), then it probably will be removed. If it doesn't harm anything to leave it there, then it's generally better to just leave it there, but just like with 2K now, at that point, XP won't be a concern anymore. If it happens to work, then great, but we won't put any effort into making it work, and we may do things that make it not work if it improves the situation for stuff that we actually support at that point in time.

- Jonathan M Davis
December 31, 2012
On 30/12/2012 22:27, Jonathan M Davis wrote:
> On Sunday, December 30, 2012 18:33:01 Stewart Gordon wrote:
>> On 30/12/2012 00:49, Jonathan M Davis wrote:
<snip>
>>> We specifically decided not to support Win2K. It requires extra
>>> effort that we don't want to go to, and almost no one uses it
>>> anymore.
>>
>> What extra effort is that?  The versioning to support Win2000 (and even
>> NT4) is already in both the C headers and the D modules that have so far
>> been done.  It's just another value of the constant _WIN32_WINNT.  My
>> common sense tells me that it is _removing_ it that requires extra effort.
>
> There's stuff in druntime that doesn't work on Win2K right now.

Your comment was posted as a reply to my statement that was about the Windows API bindings, not anything that is already in druntime.  As such, what you ended up saying was that we would need to go to some extra effort to have Win2K-compatible Windows API bindings.  So that isn't what you meant to say.  I see now.

> For instance,
> per this bug report, the stack trace stuff doesn't work on Win2K:
>
> http://d.puremagic.com/issues/show_bug.cgi?id=6024

It was me that mentioned this to you actually.  Besides, it claims something far more serious, that compiled programs don't work at all on Win2K.  Is it wrong or OOD in this respect?

But as you seem to be saying later on, whether we're going to fix it to work again on Win2K and whether Walter's going to make us remove the 9x vs. NT4 vs. 2K vs. XP versioning from the Windows API bindings before allowing them to be dropped in are two different matters.

Though I am inclined to remove the versioning for 9x, considering that

- doing so would simplify the versioning quite a bit
- character sets under Win9x are a PITA, especially in a language where you're meant to use only Unicode
- some of it seems wrong anyway, in such matters as which W functions are supported

<snip>
> I'd expect that druntime contain the function declarations for the entire
> Windows system API which is supported with XP with no care whatsoever to what
> was or wasn't supported before XP (because we're not supporting anything prior
> to XP). If those functions happened to be on Win2k, then fine, but it doesn't
> matter one way or the other, because we don't suppport it. Newer functions
> that are not in XP would then presumably be added in a way which they're only
> there if you've defined the right version to enable them (e.g. a version
> identifier indicating Vista would enable all of the functions added in Vista).

So you think the view Walter will take is that, if somebody wants to build a WinXP app (which may have been written by a DMD user) with a D compiler that happens to support Win2K, it's that somebody's responsibility to make sure -version=WindowsXP (or the equivalent switch for that compiler) has been set.

<snip>
> I suppose that you can add Win2K bindings to druntime if you really want to go
> to that extra effort, but only if it's not going to complicate things. And
> we're not supporting anything related to Win2K, so any bindings which are 2k-
> specific are just icing on the cake.

Are there APIs that have been removed in XP?  I wasn't thinking about those ... and don't even know how the MS or MinGW C headers would deal with such a scenario.

Stewart.
December 31, 2012
On Monday, December 31, 2012 01:41:38 Stewart Gordon wrote:
> Your comment was posted as a reply to my statement that was about the Windows API bindings, not anything that is already in druntime.  As such, what you ended up saying was that we would need to go to some extra effort to have Win2K-compatible Windows API bindings.  So that isn't what you meant to say.  I see now.

I really don't know what the state of the Windows API project's bindings are. I'm just talking about what we want to be doing with druntime, though obviously taking the bindings from the Windows API project is a great time saver, and as I understand it, that was pretty much the point of the project in the first place. I may not have been clear on that point.

> > For instance,
> > per this bug report, the stack trace stuff doesn't work on Win2K:
> > 
> > http://d.puremagic.com/issues/show_bug.cgi?id=6024
> 
> It was me that mentioned this to you actually.  Besides, it claims something far more serious, that compiled programs don't work at all on Win2K.  Is it wrong or OOD in this respect?

I have no idea what the current state of Win2K and dmd, druntime, or Phobos is. I know that std.datetime uses a function that doesn't exist in Win2K, and I know that that bug report was indicating problems with Win2K and stack traces, but I have no idea what the exact state of Win2K is with regards to running D programs.

> But as you seem to be saying later on, whether we're going to fix it to work again on Win2K and whether Walter's going to make us remove the 9x vs. NT4 vs. 2K vs. XP versioning from the Windows API bindings before allowing them to be dropped in are two different matters.

I'd say that they're different matters. We don't support pre-XP at this point, but that doesn't mean that we can't provide the bindings to C functions for them. I'd be generally inclined not to bother though.

I think that Walter may have argued for not providing the A functions on the basis that they shouldn't be used, but I'd have to go digging through the archives to be sure. Regardless, that's still a bindings issue rather than whether we go to the effort of making anything pre-XP actually, properly work with D programs or not.

> Though I am inclined to remove the versioning for 9x, considering that
> 
> - doing so would simplify the versioning quite a bit
> - character sets under Win9x are a PITA, especially in a language where
> you're meant to use only Unicode
> - some of it seems wrong anyway, in such matters as which W functions
> are supported

Supporting Win9x is far worse than supporting Win2K. Win2K is at least close to XP. In either case, I wouldn't really expect people to be writing D programs for them. D's too new for there to be any legacy stuff using D with those systems, and I wouldn't expect anyone to be using them for anything other than legacy stuff. I see no problem whatsoever with dropping any bindings that are specific to anything pre-XP. In fact, it would probably be far better to, since then there's less clutter to deal with in druntime.

> So you think the view Walter will take is that, if somebody wants to build a WinXP app (which may have been written by a DMD user) with a D compiler that happens to support Win2K, it's that somebody's responsibility to make sure -version=WindowsXP (or the equivalent switch for that compiler) has been set.

If someone is using another D compiler, then it's between them and that compiler vendor as to what the compiler does or what their version of druntime does. At this point, dmd, druntime, and Phobos only support XP and newer. So, I'd expect the Windows bindings in druntime to default to whatever is appropriate for that. If someone wants to target an older version of Windows, it's up to them to deal with that, since it's unsupported. If someone wants to target a newer version of Windows, then presumably they'd either just target XP and let it work on the newer version, or they'd have to compile with the appropriate version identifier to make druntime target the version that they wanted to target.

AFAIK, Walter has no reason to disagree with that assessment, but I don't know what he'll say until he says it.

> > I suppose that you can add Win2K bindings to druntime if you really want to go to that extra effort, but only if it's not going to complicate things. And we're not supporting anything related to Win2K, so any bindings which are 2k- specific are just icing on the cake.
> 
> Are there APIs that have been removed in XP?  I wasn't thinking about those ... and don't even know how the MS or MinGW C headers would deal with such a scenario.

I have no idea. I suspect not. Microsoft normally adds stuff rather than removing it. But my point is that it doesn't really matter what the deal with Win2K is, because we're not supporting it. If it happens to work, great. But if it doesn't, oh well. We're not planning to put in extra effort to make it work, and we may do things that break it (probably mostly by using functions that don't exist on Win2K).

- Jonathan M Davis
January 03, 2013
Hi Stewart,

I read the notes on the page of the win32 project. I looked at your request for first assigning a module to one's self before starting to work on it and I did not find any way to do so.

I thought maybe I had to be logged in on the site, so I created an account but when I log in it just redirects me to a blank page...

Also, in order to work on this specific project, should I check out all the bindings or only win32 from the trunk.

What is the dev process? Should I just check out stuff and commit changes like that?

Is there another channel where we can discuss this?

Phil
1 2 3 4
Next ›   Last »