Re: Wrong vtable for COM interfaces that don't inherit IUnknown
On Tuesday, 16 July 2019 at 01:38:49 UTC, evilrat wrote: Also from what I see MS done this intentionally, means they either no longer loves COM or there was some other good reason. Primary consumer of COM interfaces is Visual Basic. It was really only Bill Gates who loved Basic, he wrote a Basic interpreter in 1975 and created Microsoft as a business that sold Basic interpreters. As gamedev was locked in C++, there was no real use case for COM there, so MS probably does the expected thing and goes with straight C++.
Re: OT: in economic terms Moore's Law is already dead
TBH modern computers are obscenely powerful, I just spent weeks on celeron 1.8GHz 2mb L2 cache 2gb ram computer and didn't see any slowness on it despite some bloated software in python and a strange text editor pluma that ate 150mb ram just editing a plain text file, I swear it's not based on electron, most operations were seemingly io-bound. On my notebook I downclocked i7 to 50% to reduce it to a decent TDP, there was a reduction in performance... probably, because I don't see it without reference, i7 was a mistake, honestly.
Re: Is this a new bug ?
On Saturday, 20 July 2019 at 14:19:08 UTC, Adam D. Ruppe wrote: Like the other person said, try/catch turns throws to nothrow. The `debug` keyword disables pure checks. Those make this easy without any mixin or wrappers/casts at all. But even if you did want to do the mixin route, look at how Phobos does this. http://dpldocs.info/experimental-docs/std.traits.SetFunctionAttributes.1.html the example of that function shows adding pure to a function pointer. (and btw I think the phobos function itself works with -betterC as well, you might be able to simply call it). Thanks your all for explain, now i get a better understand how pure & debug & nothrow to work together.
Re: Is this a new bug ?
On Saturday, 20 July 2019 at 09:01:21 UTC, Newbie2019 wrote: I want to cast std.stdio : writefln into pure function pointer, so I can call it from debug pure function. Like the other person said, try/catch turns throws to nothrow. The `debug` keyword disables pure checks. Those make this easy without any mixin or wrappers/casts at all. But even if you did want to do the mixin route, look at how Phobos does this. http://dpldocs.info/experimental-docs/std.traits.SetFunctionAttributes.1.html the example of that function shows adding pure to a function pointer. (and btw I think the phobos function itself works with -betterC as well, you might be able to simply call it). But then look at its implementation too: http://dpldocs.info/experimental-docs/source/std.traits.d.html#L2354 .stringof only appears once there, for the `static assert` error message. Everything else is direct stuff. It does string concat a list of keywords, but they are literally written. Then, it immediately mixes it in and thus the template returns the generated type which is used to make an alias and a cast on the outside, avoiding any mixin there too.
Moving location of dub packages?
I'd like to move where dub has stored packages to a shorter path, is there a procedure for this? Thanks in advance!
Re: Is this a new bug ?
On Saturday, 20 July 2019 at 09:01:47 UTC, Newbie2019 wrote: On Saturday, 20 July 2019 at 09:01:21 UTC, Newbie2019 wrote: I want to cast std.stdio : writefln into pure function pointer, so I can call it from debug pure function. is there a way to work around the pure check for call writefln ? nothrow check, not pure. Use try and catch around writefln. https://run.dlang.io/is/Kv3QnT
Re: Is this a new bug ?
On Saturday, 20 July 2019 at 09:01:21 UTC, Newbie2019 wrote: I want to cast std.stdio : writefln into pure function pointer, so I can call it from debug pure function. is there a way to work around the pure check for call writefln ? nothrow check, not pure.
Re: Is this a new bug ?
On Saturday, 20 July 2019 at 06:43:03 UTC, user1234 wrote: use `__traits(identifier)` instead of `.stringof`, see https://dlang.org/spec/traits.html#identifier. as explained this is not a new bug, not even a bug according to me. I want to cast std.stdio : writefln into pure function pointer, so I can call it from debug pure function. is there a way to work around the pure check for call writefln ?