On Thursday, 16 March 2023 at 20:53:28 UTC, Witold wrote:
It crashes at `new_.value`, as `new_` is `null`
It looks like this:
```d
alias VariableAllocator = ThreadLocal!(FreeList!(Mallocator,
Variable.sizeof, unbounded));
```
should be this instead:
```d
alias VariableAllocator = ThreadL
Hello,
I'm trying to catch segfaults, after reading lot of ressources
online, i came up with this:
```D
import core.stdc.signal: SIGSEGV, SIGFPE, SIGILL, SIGABRT, signal;
import core.stdc.stdlib: free;
import core.stdc.string: strlen;
import core.sys.posix.unistd: STDERR_FILENO, readlink;
impo
On Thursday, 16 March 2023 at 18:58:18 UTC, ag0aep6g wrote:
On Thursday, 16 March 2023 at 18:39:00 UTC, jwatson-CO-edu
wrote:
```d
int rtnVal = buffer.peek(int,Endian.bigEndian)(&marker);
// Error: found `,` when expecting `.` following int
```
You just forgot the exclamation mark there.
"th
I ported a classic DeltaBlue benchmark to D, and for allocations
I use a mix of malloc/free (for structs with some trailing inline
arrays), and new for some other structs and arrays.
After running it, it felt kind of slow (I did not compare it to
any other language yet, so no idea if it is act
On Thursday, 16 March 2023 at 18:39:00 UTC, jwatson-CO-edu wrote:
```d
int rtnVal = buffer.peek(int,Endian.bigEndian)(&marker);
// Error: found `,` when expecting `.` following int
```
You just forgot the exclamation mark there.
I read a file into a `ubyte` buffer as shown:
```d
\\ ...
buffer = cast(ubyte[]) read( fName ); // Read the entire file as
bytestring
marker = 0; // Current index to read from, managed manually, :(
\\ ...
```
The data file contains numbers of varying size, and I want to
read them sequentially
On Thursday, 16 March 2023 at 12:32:34 UTC, Nick Treleaven wrote:
With -preview=nosharedaccess, I get:
int y = 2;
shared int x = y; // OK
assert(x == 2); // no error
y = x; // error
This also does not error:
```d
bool b = x == 3;
```
Filed:
https://issues.dlang.org/show_bug.cg
With -preview=nosharedaccess, I get:
int y = 2;
shared int x = y; // OK
assert(x == 2); // no error
y = x; // error
So for the assignment to y, reading x is an error and atomicLoad
should be used instead. But is it an oversight that reading x in
the assert is not an error?
I
On Tuesday, 14 March 2023 at 18:41:50 UTC, Paul Backus wrote:
On Tuesday, 14 March 2023 at 08:21:00 UTC, amarillion wrote:
I'm trying to understand why this doesn't work. I don't really
understand the error. If I interpret this correctly, it's
missing a length attribute on a string, but shouldn