On Wednesday, 25 May 2022 at 21:35:07 UTC, Christian Köstlin
wrote:
Is there also a way to get the "real"
threadid?
I'm using that functions inside threads:
core.sys.windows.winbase.GetCurrentThreadId on Windows
core.sys.posix.pthread.pthread_self on Unix (implied pthreads are
used)
On 5/25/22 14:35, Christian Köstlin wrote:
> 1. I went for a singleton for storing tracing/logging information that
> needs to be initialized manually. Is __gshared the right way to do that?
I think this is where thread-local storage comes in handy. As the D
runtime does for dmd's -profile
I experimented with application level tracing/profiling of d
applications similar to what is described in
https://dlang.org/blog/2020/03/13/tracing-d-applications/ as the
"writef-based approach". Only difference is, that I am emitting json
On Wednesday, 25 May 2022 at 14:09:31 UTC, Steven Schveighoffer
wrote:
Yes, he acknowledged that too much was stripped. I also
verified similar code works.
But the real problem was something else. He is saying in this
message "why doesn't the compiler recognize that in comparing a
function
On 5/25/22 6:55 AM, user1234 wrote:
On Wednesday, 25 May 2022 at 06:04:10 UTC, frame wrote:
On Wednesday, 25 May 2022 at 05:56:28 UTC, Steven Schveighoffer wrote:
It's a case where the compiler can't divine what you were thinking
when you wrote that code ;)
I see not in all cases but in
Thanks:)
**writeln( (v1<<8) + v2 );** is ok
On Wednesday, 25 May 2022 at 12:51:07 UTC, Paul Backus wrote:
On Wednesday, 25 May 2022 at 12:42:04 UTC, step8 wrote:
I run following test code:
int v1 = 22;
int v2 = 23;
writeln( v1<<8 + v2 );
On Wednesday, 25 May 2022 at 12:42:04 UTC, step8 wrote:
I run following test code:
int v1 = 22;
int v2 = 23;
writeln( v1<<8 + v2 );
writeln( v1<<8 | v2 );
result is 0 and 5655
Why ( v1<<8 + v2 ) = 0 ?
`+` has a higher precedence than `<<`, so the
I run following test code:
int v1 = 22;
int v2 = 23;
writeln( v1<<8 + v2 );
writeln( v1<<8 | v2 );
result is 0 and 5655
Why ( v1<<8 + v2 ) = 0 ?
On Wednesday, 25 May 2022 at 06:04:10 UTC, frame wrote:
On Wednesday, 25 May 2022 at 05:56:28 UTC, Steven Schveighoffer
wrote:
It's a case where the compiler can't divine what you were
thinking when you wrote that code ;)
I see not in all cases but in mine. If the compiler sees the
On Wednesday, 25 May 2022 at 05:56:28 UTC, Steven Schveighoffer
wrote:
It's a case where the compiler can't divine what you were
thinking when you wrote that code ;)
I see not in all cases but in mine. If the compiler sees the
function isn't callable without arguments and it is inside an
On 5/25/22 1:40 AM, frame wrote:
This would have been more visible if the compiler just says: "function
cannot be compared against null, only function pointer". That function
vs function pointer is too subtle.
It's a case where the compiler can't divine what you were thinking when
you
11 matches
Mail list logo