On Thursday, 2 June 2022 at 05:04:03 UTC, Salih Dincer wrote:
Hi,
Do I misunderstand? A dynamic array is allocated memory
according to the `nextpow2()` algorithm(-1 lapse); strings, on
the other hand, don't behave like this...
```d
string str = "0123456789ABCDEF";
char[] chr = str.dup;
On Thursday, 2 June 2022 at 08:14:40 UTC, Mike Parker wrote:
More specifically, it points to the starting address of the
allocated block of memory.
I posted too soon.
Given an instance `ts` of type `T[]`, array accesses essentially
are this:
```d
ts[0] == *(ts.ptr + 0);
ts[1] == *(ts.ptr +
JSON properties can be
- a value
- null
- absent
What's the standard way to define a serialziable/deserializable
structs supporting properties of any of this 4 kinds?:
* int
* int | null
* int | absent
* int | null | absent
Whats the best library to manage this JSON requirements? (all the
4
On Thursday, 2 June 2022 at 08:24:51 UTC, Mike Parker wrote:
And so, `&ts[0]` is the same as `&(*ts.ptr + 0)`, or simply
`ts.ptr`.
That should be the same as `&(*(ts.ptr + 0))`!
On Thursday, 2 June 2022 at 08:27:32 UTC, Antonio wrote:
JSON properties can be
- a value
- null
- absent
What's the standard way to define a serialziable/deserializable
structs supporting properties of any of this 4 kinds?:
* int
* int | null
* int | absent
* int | null | absent
Whats the
On Thursday, 2 June 2022 at 03:37:13 UTC, z wrote:
Is there a quick way of obtaining the graph of D functions like
these?
```d
T f(T) if (isScalarType!T){}
```
or
```D
T[2] f(T, T)if (isScalarType!T){}
```
I know that there are graphing calculators already, but these
don't support low level bla
On 6/2/22 1:04 AM, Salih Dincer wrote:
Hi,
Do I misunderstand? A dynamic array is allocated memory according to the
`nextpow2()` algorithm(-1 lapse); strings, on the other hand, don't
behave like this...
```d
string str = "0123456789ABCDEF";
char[] chr = str.dup;
assert(str.length
On Thursday, 2 June 2022 at 03:37:13 UTC, z wrote:
Is there a quick way of obtaining the graph of D functions like
these?
```d
T f(T) if (isScalarType!T){}
```
or
```D
T[2] f(T, T)if (isScalarType!T){}
```
I know that there are graphing calculators already, but these
don't support low level bla
On Thursday, 2 June 2022 at 08:14:40 UTC, Mike Parker wrote:
You've initialized `str` with a string literal. No memory is
allocated for these from the GC. They're stored in the binary,
meaning they're loaded into memory from disk by the OS. So
`str.ptr` points to a static memory location that's