Jump to page: 1 2 3
Thread overview
Windows API and druntime/Phobos
Jan 25, 2012
Jonathan M Davis
Jan 25, 2012
Vladimir Panteleev
Jan 25, 2012
Trass3r
Jan 27, 2012
Kagamin
Jan 27, 2012
Vladimir Panteleev
Jan 28, 2012
Kagamin
Jan 28, 2012
Kagamin
Jan 29, 2012
Marco Leise
Jan 27, 2012
Sean Kelly
Jan 27, 2012
Vladimir Panteleev
Jan 28, 2012
Andrej Mitrovic
Jan 29, 2012
Marco Leise
Jan 28, 2012
Jonathan M Davis
Jan 28, 2012
Vladimir Panteleev
Jan 28, 2012
Andrej Mitrovic
Jan 25, 2012
Don
Jan 25, 2012
Jonathan M Davis
Jan 26, 2012
Jacob Carlborg
Jan 25, 2012
Jesse Phillips
Jan 25, 2012
Yao Gómez
Jan 25, 2012
Jesse Phillips
Jan 25, 2012
Vladimir Panteleev
Jan 25, 2012
Jesse Phillips
Jan 25, 2012
Jonathan M Davis
Jan 26, 2012
Jacob Carlborg
Jan 27, 2012
Sean Kelly
Jan 27, 2012
Sean Kelly
Jan 27, 2012
Jonathan M Davis
January 25, 2012
The level of support for the Windows API in druntime and Phobos is pretty low. As I understand it, Windows users are pretty much forced to use http://www.dsource.org/projects/bindings/browser/trunk/win32 if they need comprehensive Win32 API bindings. druntime seems to be trying to define all of the OS-specific stuff like that, but on top of it missing much of it, in the case of the Win32 API, that's a _lot_ of functions, and I don't know if we want to put that much in druntime. So, the question is, how do we want to support the Win32 API in druntime and Phobos?

Do we want to put all of the Win32 API bindings in druntime? If not, then do we want to put them in Phobos? Or do we just want to send Windows developers to a 3rd party library like the Win32 bindings project on dsource? Given that they're OS bindings, I would _think_ that we'd want them in druntime, but I don't know.

Regardless, this is one of those issues which frequently plagues D Windows developers, and we really should at least get a plan together as to how we want to handle it.

- Jonathan M Davis


P.S. A related pull request: https://github.com/D-Programming- Language/druntime/pull/139
January 25, 2012
On Wednesday, 25 January 2012 at 19:16:34 UTC, Jonathan M Davis wrote:
> The level of support for the Windows API in druntime and Phobos is pretty low. As I understand it, Windows users are pretty much forced to use http://www.dsource.org/projects/bindings/browser/trunk/win32 if they need comprehensive Win32 API bindings. druntime seems to be trying to define all of the OS-specific stuff like that, but on top of it missing much of it, in the case of the Win32 API, that's a _lot_ of functions, and I don't know if we want to put that much in druntime. So, the question is, how do we want to support the Win32 API in druntime and Phobos?
>
> Do we want to put all of the Win32 API bindings in druntime? If not, then do we want to put them in Phobos? Or do we just want to send Windows developers to a 3rd party library like the Win32 bindings project on dsource? Given that they're OS bindings, I would _think_ that we'd want them in druntime, but I don't know.

I support putting all public domain modules from the Win32 bindings project into Druntime.

The entirety of the Windows API modules (headers in C) and accompanying import libraries are an integral part of The Windows SDK. There is no obvious finer-grained separation of modules, so including only a part of them would need to be done on mostly subjective decisions.

The only non-public-domain modules are the DirectX headers (which don't belong in Druntime either way), and WinSock modules, which are "Portions Copyright (c) 1980, 1983, 1988, 1993 The Regents of the University of California.  All rights reserved." and "Portions Copyright (c) 1993 by Digital Equipment Corporation."

January 25, 2012
On 25.01.2012 05:48, Jonathan M Davis wrote:
> The level of support for the Windows API in druntime and Phobos is pretty low.
> As I understand it, Windows users are pretty much forced to use
> http://www.dsource.org/projects/bindings/browser/trunk/win32 if they need
> comprehensive Win32 API bindings. druntime seems to be trying to define all of
> the OS-specific stuff like that, but on top of it missing much of it, in the
> case of the Win32 API, that's a _lot_ of functions, and I don't know if we
> want to put that much in druntime. So, the question is, how do we want to
> support the Win32 API in druntime and Phobos?
>
> Do we want to put all of the Win32 API bindings in druntime? If not, then do
> we want to put them in Phobos? Or do we just want to send Windows developers
> to a 3rd party library like the Win32 bindings project on dsource? Given that
> they're OS bindings, I would _think_ that we'd want them in druntime, but I
> don't know.
>
> Regardless, this is one of those issues which frequently plagues D Windows
> developers, and we really should at least get a plan together as to how we
> want to handle it.
>
> - Jonathan M Davis
>
>
> P.S. A related pull request: https://github.com/D-Programming-
> Language/druntime/pull/139

Please note that the Win32 API project on dsource was created with the explicit intention of including it in Phobos. See bug 317.




January 25, 2012
On Wednesday, 25 January 2012 at 19:16:34 UTC, Jonathan M Davis wrote:
> The level of support for the Windows API in druntime and Phobos is pretty low. As I understand it, Windows users are pretty much forced to use http://www.dsource.org/projects/bindings/browser/trunk/win32 if they need comprehensive Win32 API bindings. druntime seems to be trying to define all of the OS-specific stuff like that, but on top of it missing much of it, in the case of the Win32 API, that's a _lot_ of functions, and I don't know if we want to put that much in druntime. So, the question is, how do we want to support the Win32 API in druntime and Phobos?

It seems to me that calling OS functions are expected to work out of the box. This would preclude requiring a third party library.

I don't think it makes sense in Druntime. It isn't required for the compiler to work that I know of. Maybe their are some Windows functions used within druntime? Also what is there currently isn't generating documentation.

Phobos already has std.windows, it just needs expanded.
January 25, 2012
On Wednesday, 25 January 2012 at 19:58:40 UTC, Jesse Phillips wrote:

[snip]
> Phobos already has std.windows, it just needs expanded.

The issue is that this would be a huge undertaking, as the std.windows (or core.sys.windows, to be more precise) is awfully incomplete. Maybe we could add the Win32 bindings into the Deimos project, and make it more prominent somehow.

--
Yao Gómez


January 25, 2012
On Wednesday, 25 January 2012 at 19:58:40 UTC, Jesse Phillips wrote:
> I don't think it makes sense in Druntime. It isn't required for the compiler to work that I know of.

Underlying implementation of language features trickles down to using either the DMC runtime or Windows APIs. Druntime defines the Windows APIs locally where needed, which is a hack.

Example:

https://github.com/D-Programming-Language/druntime/blob/master/src/rt/dmain2.d#L31

> Also what is there currently isn't generating documentation.

This is not true: http://dlang.org/phobos/core_thread.html
January 25, 2012
> There is no obvious finer-grained separation of modules, so including only a part of them would need to be done on mostly subjective decisions.

Yep, Walter just added what he used.
January 25, 2012
On Wednesday, 25 January 2012 at 21:44:21 UTC, Vladimir Panteleev wrote:
>> Also what is there currently isn't generating documentation.
>
> This is not true: http://dlang.org/phobos/core_thread.html

Yes it is, there aren't doc comments on anything:

https://github.com/D-Programming-Language/druntime/blob/master/src/core/sys/windows/windows.d
January 25, 2012
On Wednesday, 25 January 2012 at 21:36:36 UTC, Yao Gómez wrote:
> On Wednesday, 25 January 2012 at 19:58:40 UTC, Jesse Phillips wrote:
>
> [snip]
>> Phobos already has std.windows, it just needs expanded.
>
> The issue is that this would be a huge undertaking, as the std.windows (or core.sys.windows, to be more precise) is awfully incomplete. Maybe we could add the Win32 bindings into the Deimos project, and make it more prominent somehow.
>
> --
> Yao Gómez

I don't see how that is the problem, this post is about what to do with the Win32 bindings project which is quite a bit more complete and created for the intent of inclusion of Phobos.
January 25, 2012
On Thursday, January 26, 2012 00:20:52 Jesse Phillips wrote:
> On Wednesday, 25 January 2012 at 21:44:21 UTC, Vladimir Panteleev
> 
> wrote:
> >> Also what is there currently isn't generating documentation.
> > 
> > This is not true: http://dlang.org/phobos/core_thread.html
> 
> Yes it is, there aren't doc comments on anything:
> 
> https://github.com/D-Programming-Language/druntime/blob/master/src/core/sys/ windows/windows.d

Pretty much none of the C bindings in druntime generate documentation - I believe primarily because Sean doesn't want to redo C documentation. However, that doesn't preclude giving them empty documentation so that you can see what's there, and that hasn't been done.

- Jonathan M Davis
« First   ‹ Prev
1 2 3