Re: Windows Bindings v1.0
On Wednesday, 17 February 2021 at 19:01:31 UTC, Rumbu wrote: On Wednesday, 17 February 2021 at 14:53:11 UTC, Steven Schveighoffer wrote: On 2/16/21 3:45 PM, Rumbu wrote: [...] Note that in-line docs help with more than just putting docs on dlang.org. It helps with IDEs that use the docs to tell you what your function you are typing is doing, and also if you are reading the source code. [...] What about just having the short summary, and then links to the MS docs? -Steve OK, you convinced me :) Enjoy: https://github.com/rumbu13/windows-d#features 🎂🎉
Re: Windows Bindings v1.0
On 2/17/21 2:01 PM, Rumbu wrote: OK, you convinced me :) Enjoy: https://github.com/rumbu13/windows-d#features Nice! -Steve
Re: Windows Bindings v1.0
On Thursday, 18 February 2021 at 00:46:26 UTC, Walter Bright wrote: Please file bugzilla issues for them! I'm not going to file issues for each individual module, since there are about 100 of them. There already is a general issue about Windows headers: https://issues.dlang.org/show_bug.cgi?id=16267 I actually started working on adding the missing annotations to druntime half a year ago, but abandoned it because it took more time than expected. The tricky part is that modules can contain callback definitions, and adding @nogc nothrow to those is a breaking change. This is where Argument dependent attributes (https://github.com/dlang/DIPs/pull/198) could be useful. I might pick it up again, but if these auto-generated bindings can be incorporated into core.sys.windows that wouldn't be necessary anymore.
Re: Windows Bindings v1.0
On Wednesday, 17 February 2021 at 20:53:49 UTC, tchaloupka wrote: On Tuesday, 16 February 2021 at 08:45:19 UTC, Rumbu wrote: The D Windows SDK projection reached first version. Generated bindings were compiled succesfully. https://github.com/rumbu13/windows-d Destroy! Thanks for this, looks great. Could the generated code be annotated with nothrow @nogc too? Tom I don't know what to say about nothrow. There are WinAPI functions generating exceptions. For example the code below trying to allocate size_t.max bytes, even we reserved 10 only: auto h = HeapCreate(4, 10, 10); auto p = HeapAlloc(h, 4, size_t.max); Now, the D runtime catches internally any Windows exception and throws a generic Win32 Error without any other information, and of course, this will qualify HeapAlloc as a nothrow function. In reality, this should not be just an uncatchable Error, but a full Exception object having the associated error code (0xC017), the associated default message ("Not Enough Quota") and the value of the offending parameter (0x). All this information is available in SEH records but it is ignored by D runtime.
Re: Windows Bindings v1.0
On 2/17/2021 2:09 PM, Dennis wrote: On Wednesday, 17 February 2021 at 20:53:49 UTC, tchaloupka wrote: Thanks for this, looks great. Could the generated code be annotated with nothrow @nogc too? +1 This is actually missing in many core.sys.windows modules. Please file bugzilla issues for them!
Re: Windows Bindings v1.0
On Wednesday, 17 February 2021 at 20:53:49 UTC, tchaloupka wrote: Thanks for this, looks great. Could the generated code be annotated with nothrow @nogc too? +1 This is actually missing in many core.sys.windows modules.
Re: Windows Bindings v1.0
On Tuesday, 16 February 2021 at 08:45:19 UTC, Rumbu wrote: The D Windows SDK projection reached first version. Generated bindings were compiled succesfully. https://github.com/rumbu13/windows-d Destroy! Thanks for this, looks great. Could the generated code be annotated with nothrow @nogc too? Tom
Re: Windows Bindings v1.0
On Wednesday, 17 February 2021 at 14:53:11 UTC, Steven Schveighoffer wrote: On 2/16/21 3:45 PM, Rumbu wrote: On Tuesday, 16 February 2021 at 08:53:06 UTC, rikki cattermole wrote: [...] Sincerely, I doubt that it's a good idea to duplicate gigs of WinAPI documentation which can be found on the official Microsoft sites. Or may be you want to stress test the D compiler when it's generating documentation :) Note that in-line docs help with more than just putting docs on dlang.org. It helps with IDEs that use the docs to tell you what your function you are typing is doing, and also if you are reading the source code. WinAPI docs are available here [1] in md format (1.6Gb, 64280 files, 1347 folders). Someone should build a md scrapper. What about just having the short summary, and then links to the MS docs? -Steve OK, you convinced me :) Enjoy: https://github.com/rumbu13/windows-d#features
Re: Windows Bindings v1.0
On 2/16/21 3:45 PM, Rumbu wrote: On Tuesday, 16 February 2021 at 08:53:06 UTC, rikki cattermole wrote: All of the symbols and modules need to be documented so that the documentation generators will generate documentation for them. Sincerely, I doubt that it's a good idea to duplicate gigs of WinAPI documentation which can be found on the official Microsoft sites. Or may be you want to stress test the D compiler when it's generating documentation :) Note that in-line docs help with more than just putting docs on dlang.org. It helps with IDEs that use the docs to tell you what your function you are typing is doing, and also if you are reading the source code. WinAPI docs are available here [1] in md format (1.6Gb, 64280 files, 1347 folders). Someone should build a md scrapper. What about just having the short summary, and then links to the MS docs? -Steve
Re: Windows Bindings v1.0
On 17/02/2021 9:45 AM, Rumbu wrote: On Tuesday, 16 February 2021 at 08:53:06 UTC, rikki cattermole wrote: All of the symbols and modules need to be documented so that the documentation generators will generate documentation for them. Sincerely, I doubt that it's a good idea to duplicate gigs of WinAPI documentation which can be found on the official Microsoft sites. Or may be you want to stress test the D compiler when it's generating documentation :) Its documented (partially). https://github.com/dlang/druntime/blob/master/src/core/sys/windows/aclui.d#L1 Note I am only talking about some ///'s at the end of the line. https://dlang.org/spec/ddoc.html#parsing
Re: Windows Bindings v1.0
On Tuesday, 16 February 2021 at 20:49:30 UTC, Max Haughton wrote: On Tuesday, 16 February 2021 at 08:45:19 UTC, Rumbu wrote: The D Windows SDK projection reached first version. Generated bindings were compiled succesfully. https://github.com/rumbu13/windows-d Destroy! Hi, I'll be getting in touch about featuring this on the D blog soon - would you prefer to be contacted anywhere other than your git email? It is ok on that e-mail.
Re: Windows Bindings v1.0
On Tuesday, 16 February 2021 at 08:45:19 UTC, Rumbu wrote: The D Windows SDK projection reached first version. Generated bindings were compiled succesfully. https://github.com/rumbu13/windows-d Destroy! Hi, I'll be getting in touch about featuring this on the D blog soon - would you prefer to be contacted anywhere other than your git email?
Re: Windows Bindings v1.0
On Tuesday, 16 February 2021 at 08:53:06 UTC, rikki cattermole wrote: All of the symbols and modules need to be documented so that the documentation generators will generate documentation for them. Sincerely, I doubt that it's a good idea to duplicate gigs of WinAPI documentation which can be found on the official Microsoft sites. Or may be you want to stress test the D compiler when it's generating documentation :) WinAPI docs are available here [1] in md format (1.6Gb, 64280 files, 1347 folders). Someone should build a md scrapper. BTW, none of the core.sys.* packages are documented. [1] https://github.com/MicrosoftDocs/sdk-api
Re: Windows Bindings v1.0
On Tuesday, 16 February 2021 at 09:36:12 UTC, Elronnd wrote: Maybe the wrong place to bring it up, but: any chance this will be merged into core.sys.windows? I'm also wondering about this
Re: Windows Bindings v1.0
Maybe the wrong place to bring it up, but: any chance this will be merged into core.sys.windows?
Re: Windows Bindings v1.0
On 16/02/2021 9:45 PM, Rumbu wrote: The D Windows SDK projection reached first version. Generated bindings were compiled succesfully. https://github.com/rumbu13/windows-d Destroy! All of the symbols and modules need to be documented so that the documentation generators will generate documentation for them. By the looks a good percentage of DirectX is in there. Which is wonderful. I checked as it will be important for a project like this, but it doesn't seem like the docs around IUnknown is correct. https://dlang.org/spec/interface.html#com-interfaces It seems the exact location for IUnknown doesn't matter. Great work!
Windows Bindings v1.0
The D Windows SDK projection reached first version. Generated bindings were compiled succesfully. https://github.com/rumbu13/windows-d Destroy!