having troubles with D and Vulkan.

2023-07-18 Thread Danni Coy via Digitalmars-d-learn
I am trying to run through the basic Vulkan triangle demo. I am getting stuck at vkGetDeviceQueue which segfaults for me. I have written the same tutorial to about the same point in C and I am not getting the segfault. I have enabled validation layers and they are not picking up anything. Any

Re: Print debug data

2023-07-18 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/18/23 5:04 PM, Alain De Vos wrote: ? use `stats` instead of `Stats`. The `Stats` name is the type, whereas the `stats` method is the call that gets the stats. It's kind of a terrible message, I wish it would change to something more informative. -Steve

Re: Redirecting standard streams in Windows

2023-07-18 Thread Adam D Ruppe via Digitalmars-d-learn
On Tuesday, 18 July 2023 at 23:52:06 UTC, Alexander Zhirov wrote: PS C:\dlang\test> cat .\stderr.txt How does the cat program know what the encoding of the file is? Try opening it in notepad or something and specifying the encoding. I betcha it is perfectly fine.

Re: Redirecting standard streams in Windows

2023-07-18 Thread Alexander Zhirov via Digitalmars-d-learn
On Tuesday, 18 July 2023 at 22:09:40 UTC, Adam D Ruppe wrote: You need to use WriteFile when it is redirected, which you can detect with GetFileType to see if it is a character device or not. The redirection issue has been resolved. Another one has now emerged. Since I have unicode, I need

Re: Redirecting standard streams in Windows

2023-07-18 Thread Alexander Zhirov via Digitalmars-d-learn
On Tuesday, 18 July 2023 at 22:12:17 UTC, Alexander Zhirov wrote: with threads streams*

Re: Redirecting standard streams in Windows

2023-07-18 Thread Alexander Zhirov via Digitalmars-d-learn
On Tuesday, 18 July 2023 at 22:09:40 UTC, Adam D Ruppe wrote: On Tuesday, 18 July 2023 at 21:31:54 UTC, Alexander Zhirov wrote: HANDLE h_stdout = GetStdHandle(STD_OUTPUT_HANDLE); WriteConsoleW(h_stderr, str.ptr, cast(DWORD)str.length, NULL, NULL); If you checked the return value of

Re: Redirecting standard streams in Windows

2023-07-18 Thread Adam D Ruppe via Digitalmars-d-learn
On Tuesday, 18 July 2023 at 21:31:54 UTC, Alexander Zhirov wrote: HANDLE h_stdout = GetStdHandle(STD_OUTPUT_HANDLE); WriteConsoleW(h_stderr, str.ptr, cast(DWORD)str.length, NULL, NULL); If you checked the return value of this call, you'd find it fails since WriteConsole only works

Redirecting standard streams in Windows

2023-07-18 Thread Alexander Zhirov via Digitalmars-d-learn
I'm trying to redirect unicode in the windows console, but when redirecting, empty files are created. If i do it without redirects, then the text is displayed correctly in the console: ```d import core.sys.windows.windows; import std.stdio; void main() { wstring str = "Just text...";

Re: Print debug data

2023-07-18 Thread Alain De Vos via Digitalmars-d-learn
?

Re: Print debug data

2023-07-18 Thread Kagamin via Digitalmars-d-learn
Naming is hard.

Re: Print debug data

2023-07-18 Thread devosalain via Digitalmars-d-learn
``` import std.stdio:writeln; import core.memory; void main(){ ulong a=GC.Stats.freeSize; writeln(a); } ``` returns error: Error: need this for freeSize of type ulong

Re: How to tell DMD to use lld-link?

2023-07-18 Thread Vladimir Panteleev via Digitalmars-d-learn
On Tuesday, 18 July 2023 at 07:19:44 UTC, Vladimir Panteleev wrote: Seeing this link failure on Windows: https://github.com/CyberShadow/ae/actions/runs/5574489393/jobs/10184021009#step:8:30 Looks like an MS link SNAFU. lld-link also fails, so this looks like a DMDBE bug... probably

How to tell DMD to use lld-link?

2023-07-18 Thread Vladimir Panteleev via Digitalmars-d-learn
Seeing this link failure on Windows: https://github.com/CyberShadow/ae/actions/runs/5574489393/jobs/10184021009#step:8:30 Looks like an MS link SNAFU. Is there any way I can tell DMD to ignore the presence of MS link and use the bundled lld-link anyway?