On Thursday, 28 October 2021 at 21:23:15 UTC, kyle wrote:
```
void main()
{
import std.math : abs, sgn;
alias n_type = short; //or int, long, byte, whatever
assert(n_type.min == abs(n_type.min));
assert(sgn(abs(n_type.min)) == -1);
}
```
I stumbled into this fun today. I
```
void main()
{
import std.math : abs, sgn;
alias n_type = short; //or int, long, byte, whatever
assert(n_type.min == abs(n_type.min));
assert(sgn(abs(n_type.min)) == -1);
}
```
I stumbled into this fun today. I understand why abs yields a
negative value here with overflow
On Thursday, 28 October 2021 at 13:30:53 UTC, Paul Backus wrote:
On Thursday, 28 October 2021 at 09:02:52 UTC, JG wrote:
I am heavily using SumType (which I like very much). The
problem I am having is that is seems to be causing slow
compile times (as can be observed by profiling during the
On Thursday, 28 October 2021 at 13:30:36 UTC, Rey Valeza wrote:
On Friday, 2 April 2021 at 22:29:20 UTC, Imperatorn wrote:
On Thursday, 4 March 2021 at 13:47:11 UTC, Imperatorn wrote:
On Monday, 1 March 2021 at 22:25:39 UTC, Rey Valeza wrote:
[...]
On Wednesday, 7 April 2021 at 09:00:29 UTC, M.M. wrote:
On Friday, 2 April 2021 at 22:29:20 UTC, Imperatorn wrote:
On Thursday, 4 March 2021 at 13:47:11 UTC, Imperatorn wrote:
On Monday, 1 March 2021 at 22:25:39 UTC, Rey Valeza wrote:
Hi, I wrote a tutorial on Vibe.d while trying to re-learn
On Thursday, 28 October 2021 at 09:02:52 UTC, JG wrote:
I am heavily using SumType (which I like very much). The
problem I am having is that is seems to be causing slow compile
times (as can be observed by profiling during the compile). The
problem seems to be with match (which is extremely
On Friday, 2 April 2021 at 22:29:20 UTC, Imperatorn wrote:
On Thursday, 4 March 2021 at 13:47:11 UTC, Imperatorn wrote:
On Monday, 1 March 2021 at 22:25:39 UTC, Rey Valeza wrote:
Hi, I wrote a tutorial on Vibe.d while trying to re-learn
Vibe.d. I find that most of Kai Nacke's book need
On Wednesday, 27 October 2021 at 16:54:49 UTC, Simon wrote:
What is the equivalent in D?
With LDC, you have:
```D
import ldc.intrinsics: llvm_debugtrap;
```
Combining that with previous answers, you can make something like
this:
```D
void debugbreak() nothrow @nogc @trusted {
I am heavily using SumType (which I like very much). The problem
I am having is that is seems to be causing slow compile times (as
can be observed by profiling during the compile). The problem
seems to be with match (which is extremely convenient to use). I
looked at the code and it does the
On Thursday, 28 October 2021 at 05:51:27 UTC, Imperatorn wrote:
Try renaming debug to something else
Many thanks guys. I should have spotted that one!
10 matches
Mail list logo