On Thursday, 5 October 2023 at 16:57:00 UTC, Jesse Phillips wrote:
On Wednesday, 4 October 2023 at 10:51:46 UTC, dhs wrote:
D and Go slices have advantages but can be confusing. I don't
have a solution, but if anyone is interested, the relevant
discussions about slice confusion in the Go comm
On Wednesday, 4 October 2023 at 10:51:46 UTC, dhs wrote:
D and Go slices have advantages but can be confusing. I don't
have a solution, but if anyone is interested, the relevant
discussions about slice confusion in the Go community apply to
D slices as well.
I don't believe slice confusion
On Monday, 2 October 2023 at 02:56:33 UTC, Steven Schveighoffer
wrote:
FWIW, there is a cache that makes this decently fast, so it
doesn't have to go all the way into the GC to get all the
information for every append.
But it *most definitely* not going to be as fast as reading a
local "cap
On 10/1/23 1:13 PM, dhs wrote:
It may not be a problem in practice. My concern was performance, because
each time we add an element to the array, the garbage collector has to
map the slice to the allocation it belongs to.
FWIW, there is a cache that makes this decently fast, so it doesn't hav
On Sunday, October 1, 2023 11:13:43 AM MDT dhs via Digitalmars-d-learn wrote:
> On Sunday, 1 October 2023 at 13:27:37 UTC, Adam D Ruppe wrote:
> > On Sunday, 1 October 2023 at 09:01:53 UTC, dhs wrote:
> >> When D creates a dynamic array, it returns a slice. Functions
> >> that add or remove element
On Sunday, 1 October 2023 at 17:21:32 UTC, Steven Schveighoffer
wrote:
On 10/1/23 10:34 AM, Steven Schveighoffer wrote:
This should give you a reasonable head-start.
-Steve
It does. Many thanks!
On 10/1/23 10:34 AM, Steven Schveighoffer wrote:
The complexity is from the way d does operator overloading and indexing.
It should be pretty straightforward. I’ll see if I can post a simple
wrapper.
I didn't tackle any attribute or memory safety issues, or many operator
overloads, but thi
On Sunday, 1 October 2023 at 13:27:37 UTC, Adam D Ruppe wrote:
On Sunday, 1 October 2023 at 09:01:53 UTC, dhs wrote:
When D creates a dynamic array, it returns a slice. Functions
that add or remove elements begin by asking the memory manager
for the dynamic array that the slice belongs to. Only
On Sunday, 1 October 2023 at 13:24:27 UTC, dhs wrote:
On Sunday, 1 October 2023 at 13:05:12 UTC, Steven Schveighoffer
wrote:
On Sunday, 1 October 2023 at 09:01:53 UTC, dhs wrote:
[...]
Std::vector uses value semantics. D does not have anything
like that. It could be done someone just has to
On Sunday, 1 October 2023 at 13:51:35 UTC, Imperatorn wrote:
D can be very readable and maintainable, but since all the
advanced features exist, we are tempted to use them, which can
cause otherwise normal code to become a bit obfuscated.
OK in any case the forum seems to be very helpful. Th
On Sunday, 1 October 2023 at 13:24:27 UTC, dhs wrote:
On Sunday, 1 October 2023 at 13:05:12 UTC, Steven Schveighoffer
wrote:
On Sunday, 1 October 2023 at 09:01:53 UTC, dhs wrote:
Hi,
Is there a straight forward Array type in D similar to C++'s
vector class? Something along the lines of the tu
On Sunday, 1 October 2023 at 09:01:53 UTC, dhs wrote:
When D creates a dynamic array, it returns a slice. Functions
that add or remove elements begin by asking the memory manager
for the dynamic array that the slice belongs to. Only then can
they go on and add elements.
Why is this a problem?
On Sunday, 1 October 2023 at 13:05:12 UTC, Steven Schveighoffer
wrote:
On Sunday, 1 October 2023 at 09:01:53 UTC, dhs wrote:
Hi,
Is there a straight forward Array type in D similar to C++'s
vector class? Something along the lines of the tuple: (pointer
to elements, length, capacity).
[...]
On Sunday, 1 October 2023 at 09:01:53 UTC, dhs wrote:
Hi,
Is there a straight forward Array type in D similar to C++'s
vector class? Something along the lines of the tuple: (pointer
to elements, length, capacity).
[...]
Std::vector uses value semantics. D does not have anything like
that.
On Sunday, 1 October 2023 at 11:43:17 UTC, bachmeier wrote:
On Sunday, 1 October 2023 at 11:39:11 UTC, bachmeier wrote:
On Sunday, 1 October 2023 at 09:01:53 UTC, dhs wrote:
Hi,
Is there a straight forward Array type in D similar to C++'s
vector class? Something along the lines of the tuple:
On Sunday, 1 October 2023 at 11:39:11 UTC, bachmeier wrote:
On Sunday, 1 October 2023 at 09:01:53 UTC, dhs wrote:
Hi,
Is there a straight forward Array type in D similar to C++'s
vector class? Something along the lines of the tuple: (pointer
to elements, length, capacity).
I tried two imple
On Sunday, 1 October 2023 at 09:01:53 UTC, dhs wrote:
Hi,
Is there a straight forward Array type in D similar to C++'s
vector class? Something along the lines of the tuple: (pointer
to elements, length, capacity).
I tried two implementations: D's dynamic array and
std.container.array.
Whe
On Sunday, 1 October 2023 at 09:21:37 UTC, Imperatorn wrote:
On Sunday, 1 October 2023 at 09:01:53 UTC, dhs wrote:
Hi,
Is there a straight forward Array type in D similar to C++'s
vector class? Something along the lines of the tuple: (pointer
to elements, length, capacity).
[...]
https://
On Sunday, 1 October 2023 at 09:01:53 UTC, dhs wrote:
Hi,
Is there a straight forward Array type in D similar to C++'s
vector class? Something along the lines of the tuple: (pointer
to elements, length, capacity).
[...]
https://dlang.org/spec/simd.html
https://dlang.org/phobos/core_simd.ht
Hi,
Is there a straight forward Array type in D similar to C++'s
vector class? Something along the lines of the tuple: (pointer to
elements, length, capacity).
I tried two implementations: D's dynamic array and
std.container.array.
When D creates a dynamic array, it returns a slice. Functi
20 matches
Mail list logo