std.experimental.allocator

2015-10-02 Thread Andrei Alexandrescu via Digitalmars-d
It's been bitrotting for a while, I've rebased and it has passed tests now. Who will do the honors? https://github.com/D-Programming-Language/phobos/pull/3405 There are three pull requests open against my fork, I invite the authors to rebase them or retarget them against the phobos mainline af

Re: std.experimental.allocator

2015-10-02 Thread Jonathan M Davis via Digitalmars-d
On Friday, 2 October 2015 at 13:12:47 UTC, Andrei Alexandrescu wrote: It's been bitrotting for a while, I've rebased and it has passed tests now. Who will do the honors? Done. - Jonathan M Davis

Re: std.experimental.allocator

2015-10-02 Thread bitwise via Digitalmars-d
On Friday, 2 October 2015 at 13:12:47 UTC, Andrei Alexandrescu wrote: It's been bitrotting for a while, I've rebased and it has passed tests now. Who will do the honors? [...] Andrei Just curious, why not just merge it yourself?

Re: std.experimental.allocator

2015-10-02 Thread Brad Anderson via Digitalmars-d
On Friday, 2 October 2015 at 21:55:56 UTC, bitwise wrote: On Friday, 2 October 2015 at 13:12:47 UTC, Andrei Alexandrescu wrote: It's been bitrotting for a while, I've rebased and it has passed tests now. Who will do the honors? [...] Andrei Just curious, why not just merge it yourself? The

Re: std.experimental.allocator

2015-10-02 Thread bitwise via Digitalmars-d
On Friday, 2 October 2015 at 21:59:27 UTC, Brad Anderson wrote: On Friday, 2 October 2015 at 21:55:56 UTC, bitwise wrote: On Friday, 2 October 2015 at 13:12:47 UTC, Andrei Alexandrescu wrote: It's been bitrotting for a while, I've rebased and it has passed tests now. Who will do the honors? [.

Re: std.experimental.allocator

2015-10-02 Thread Andrei Alexandrescu via Digitalmars-d
On 10/02/2015 05:55 PM, bitwise wrote: On Friday, 2 October 2015 at 13:12:47 UTC, Andrei Alexandrescu wrote: It's been bitrotting for a while, I've rebased and it has passed tests now. Who will do the honors? [...] Andrei Just curious, why not just merge it yourself? Sticking to procedure,

Re: std.experimental.allocator

2015-10-02 Thread Rikki Cattermole via Digitalmars-d
On 03/10/15 2:12 AM, Andrei Alexandrescu wrote: It's been bitrotting for a while, I've rebased and it has passed tests now. Who will do the honors? https://github.com/D-Programming-Language/phobos/pull/3405 There are three pull requests open against my fork, I invite the authors to rebase them

Re: std.experimental.allocator

2015-10-03 Thread Nordlöw via Digitalmars-d
On Saturday, 3 October 2015 at 00:05:45 UTC, Andrei Alexandrescu wrote: Sticking to procedure, nothing more. Thanks Jonathan - allocator is now in. Enjoy! -- Andrei Superb! I'll spread the word, as usual 😉

Re: std.experimental.allocator

2015-10-03 Thread John Colvin via Digitalmars-d
On Friday, 2 October 2015 at 13:12:47 UTC, Andrei Alexandrescu wrote: It's been bitrotting for a while, I've rebased and it has passed tests now. Who will do the honors? https://github.com/D-Programming-Language/phobos/pull/3405 There are three pull requests open against my fork, I invite the

Re: std.experimental.allocator

2015-10-03 Thread Andrei Alexandrescu via Digitalmars-d
On 10/03/2015 12:31 PM, John Colvin wrote: On Friday, 2 October 2015 at 13:12:47 UTC, Andrei Alexandrescu wrote: It's been bitrotting for a while, I've rebased and it has passed tests now. Who will do the honors? https://github.com/D-Programming-Language/phobos/pull/3405 There are three pull r

Re: std.experimental.allocator

2015-10-03 Thread Andrei Alexandrescu via Digitalmars-d
On 10/03/2015 12:31 PM, John Colvin wrote: On Friday, 2 October 2015 at 13:12:47 UTC, Andrei Alexandrescu wrote: It's been bitrotting for a while, I've rebased and it has passed tests now. Who will do the honors? https://github.com/D-Programming-Language/phobos/pull/3405 There are three pull r

std.experimental.allocator and @nogc

2016-05-08 Thread Danni Coy via Digitalmars-d
It seems to me, that std.experimental.allocator should work with @nogc annotated functions if none of the allocators being used are the gcallocator, though it's not at all clear to me how this would work. Are there plans for this?

ETA: std.experimental.allocator -> std.allocator

2016-12-09 Thread Seb via Digitalmars-d
Hi all, tl;dr: I would like to start having GC-free methods and data structures in Phobos, which depends on std.allocator being stable (i.e not in experimental). Q1: So I would like to know what's missing/blocking this? Is it just time? (FYI: std.experimental.allocator has been merg

Re: std.experimental.allocator and @nogc

2016-05-08 Thread rikki cattermole via Digitalmars-d
On 09/05/2016 4:50 PM, Danni Coy via Digitalmars-d wrote: It seems to me, that std.experimental.allocator should work with @nogc annotated functions if none of the allocators being used are the gcallocator, though it's not at all clear to me how this would work. Are there plans for this?

Re: std.experimental.allocator and @nogc

2016-05-08 Thread Hildigard Sandyman via Digitalmars-d
On Monday, 9 May 2016 at 04:50:59 UTC, Danni Coy wrote: It seems to me, that std.experimental.allocator should work with @nogc annotated functions if none of the allocators being used are the gcallocator, though it's not at all clear to me how this would work. Are there plans for this?

Re: std.experimental.allocator and @nogc

2016-05-08 Thread Hildigard Sandyman via Digitalmars-d
On Monday, 9 May 2016 at 05:00:31 UTC, rikki cattermole wrote: On 09/05/2016 4:50 PM, Danni Coy via Digitalmars-d wrote: It seems to me, that std.experimental.allocator should work with @nogc annotated functions if none of the allocators being used are the gcallocator, though it's not a

Re: std.experimental.allocator and @nogc

2016-05-08 Thread rikki cattermole via Digitalmars-d
On 09/05/2016 5:16 PM, Hildigard Sandyman wrote: On Monday, 9 May 2016 at 05:00:31 UTC, rikki cattermole wrote: On 09/05/2016 4:50 PM, Danni Coy via Digitalmars-d wrote: It seems to me, that std.experimental.allocator should work with @nogc annotated functions if none of the allocators being

Re: std.experimental.allocator and @nogc

2016-05-08 Thread Hildigard Sandyman via Digitalmars-d
On Monday, 9 May 2016 at 05:27:24 UTC, rikki cattermole wrote: On 09/05/2016 5:16 PM, Hildigard Sandyman wrote: On Monday, 9 May 2016 at 05:00:31 UTC, rikki cattermole wrote: On 09/05/2016 4:50 PM, Danni Coy via Digitalmars-d wrote: It seems to me, that std.experimental.allocator should work

Re: std.experimental.allocator and @nogc

2016-05-08 Thread rikki cattermole via Digitalmars-d
On 09/05/2016 6:22 PM, Hildigard Sandyman wrote: It's true but... why do you bother with IAllocator ? Everything can be set a compile time with a template parameter. As long as the param is a struct with allocate/deallocate/reallocate it's OK. you can use already a good part of the package conten

Re: std.experimental.allocator and @nogc

2016-05-09 Thread Danni Coy via Digitalmars-d
On Mon, May 9, 2016 at 3:10 PM, Hildigard Sandyman via Digitalmars-d wrote: > On Monday, 9 May 2016 at 04:50:59 UTC, Danni Coy wrote: > It already mostly works in @nogc block: > - Mallocator and AlignedMallocator are @nogc. I was trying to use BitmappedBlock, AllocatorList and MmapAllocator with

Re: std.experimental.allocator and @nogc

2016-05-09 Thread Danni Coy via Digitalmars-d
> It's true but... why do you bother with IAllocator ? Everything can be set a > compile time with a template parameter. As long as the param is a struct > with allocate/deallocate/reallocate it's OK. you can use already a good part > of the package content in a @nogc fashion. > > Do you have an ex

Re: std.experimental.allocator and @nogc

2016-05-09 Thread Hildigard Sandyman via Digitalmars-d
clearly orientates the answer: It seems to me, that std.experimental.allocator should work with @nogc It should == It doesn't yet Are there plans for this ? Question is based on the previous wrong assumption, but since the most important part of the message is the Q itself, it makes peopl

Re: std.experimental.allocator and @nogc

2016-05-09 Thread ZombineDev via Digitalmars-d
On Monday, 9 May 2016 at 06:35:36 UTC, rikki cattermole wrote: On 09/05/2016 6:22 PM, Hildigard Sandyman wrote: It's true but... why do you bother with IAllocator ? Everything can be set a compile time with a template parameter. As long as the param is a struct with allocate/deallocate/realloca

Re: std.experimental.allocator and @nogc

2016-05-09 Thread rikki cattermole via Digitalmars-d
I've done windowing and image libraries before. You are correct, you do not need OOP. But if you want to keep implementation nicely separated out from usage, you really do. Which is a major part of my requirements.

Re: std.experimental.allocator and @nogc

2016-05-09 Thread ZombineDev via Digitalmars-d
On Monday, 9 May 2016 at 10:33:27 UTC, rikki cattermole wrote: I've done windowing and image libraries before. You are correct, you do not need OOP. But if you want to keep implementation nicely separated out from usage, you really do. Which is a major part of my requirements. Well, in my ex

Re: std.experimental.allocator and @nogc

2016-05-09 Thread rikki cattermole via Digitalmars-d
On 09/05/2016 11:12 PM, ZombineDev wrote: On Monday, 9 May 2016 at 10:33:27 UTC, rikki cattermole wrote: I've done windowing and image libraries before. You are correct, you do not need OOP. But if you want to keep implementation nicely separated out from usage, you really do. Which is a major

Re: std.experimental.allocator and @nogc

2016-05-09 Thread ZombineDev via Digitalmars-d
On Monday, 9 May 2016 at 11:20:00 UTC, rikki cattermole wrote: On 09/05/2016 11:12 PM, ZombineDev wrote: On Monday, 9 May 2016 at 10:33:27 UTC, rikki cattermole wrote: I've done windowing and image libraries before. You are correct, you do not need OOP. But if you want to keep implementation n

Re: std.experimental.allocator and @nogc

2016-05-09 Thread rikki cattermole via Digitalmars-d
On 09/05/2016 11:56 PM, ZombineDev wrote: On Monday, 9 May 2016 at 11:20:00 UTC, rikki cattermole wrote: On 09/05/2016 11:12 PM, ZombineDev wrote: On Monday, 9 May 2016 at 10:33:27 UTC, rikki cattermole wrote: I've done windowing and image libraries before. You are correct, you do not need OOP

Re: std.experimental.allocator and @nogc

2016-05-09 Thread ZombineDev via Digitalmars-d
On Monday, 9 May 2016 at 12:02:19 UTC, rikki cattermole wrote: On 09/05/2016 11:56 PM, ZombineDev wrote: On Monday, 9 May 2016 at 11:20:00 UTC, rikki cattermole wrote: On 09/05/2016 11:12 PM, ZombineDev wrote: On Monday, 9 May 2016 at 10:33:27 UTC, rikki cattermole wrote: I've done windowing

Re: std.experimental.allocator and @nogc

2016-05-09 Thread rikki cattermole via Digitalmars-d
On 10/05/2016 12:33 AM, ZombineDev wrote: On Monday, 9 May 2016 at 12:02:19 UTC, rikki cattermole wrote: On 09/05/2016 11:56 PM, ZombineDev wrote: On Monday, 9 May 2016 at 11:20:00 UTC, rikki cattermole wrote: On 09/05/2016 11:12 PM, ZombineDev wrote: On Monday, 9 May 2016 at 10:33:27 UTC, ri

Re: std.experimental.allocator and @nogc

2016-05-09 Thread ZombineDev via Digitalmars-d
On Monday, 9 May 2016 at 12:37:24 UTC, rikki cattermole wrote: On 10/05/2016 12:33 AM, ZombineDev wrote: On Monday, 9 May 2016 at 12:02:19 UTC, rikki cattermole wrote: On 09/05/2016 11:56 PM, ZombineDev wrote: On Monday, 9 May 2016 at 11:20:00 UTC, rikki cattermole wrote: On 09/05/2016 11:12

Re: std.experimental.allocator and @nogc

2016-05-09 Thread rikki cattermole via Digitalmars-d
On 10/05/2016 1:05 AM, ZombineDev wrote: On Monday, 9 May 2016 at 12:37:24 UTC, rikki cattermole wrote: On 10/05/2016 12:33 AM, ZombineDev wrote: On Monday, 9 May 2016 at 12:02:19 UTC, rikki cattermole wrote: On 09/05/2016 11:56 PM, ZombineDev wrote: On Monday, 9 May 2016 at 11:20:00 UTC, rik

std.experimental.allocator and const etc.

2018-07-15 Thread John Colvin via Digitalmars-d
Currently the API's don't support const(void)[], e.g. import std.experimental.allocator : makeArray, theAllocator, dispose; import std.experimental.allocator.mallocator : Mallocator; void main() { const a = theAllocator.makeArray!ubyte(100); theAllocator.dispose(a); //

Re: ETA: std.experimental.allocator -> std.allocator

2016-12-09 Thread Ilya Yaroshenko via Digitalmars-d
Q4: Current allocator API requires DRuntime to be linked. So, they are not compatible with BetterC mode. Can this be fixed before std.experimental.allocator -> std.allocator migration? --Ilya

Re: ETA: std.experimental.allocator -> std.allocator

2016-12-10 Thread Jacob Carlborg via Digitalmars-d
On 2016-12-10 05:18, Seb wrote: Hi all, tl;dr: I would like to start having GC-free methods and data structures in Phobos, which depends on std.allocator being stable (i.e not in experimental). Q1: So I would like to know what's missing/blocking this? I think it needs to be CTFE compatible. I

Learning resources for std.experimental.allocator

2017-01-05 Thread xtreak via Digitalmars-d
I am newbie to D learning it for sometime using Ali's book. I came across std.experimental.allocator and read through http://dlang.org/library/std/experimental/allocator/building_blocks.html . Can someone explain me the actual benefits of using this and if so any benchmarks explainin

@safe containers with std.experimental.allocator

2017-01-20 Thread bitwise via Digitalmars-d
When std.experimental.allocator was created, I was under the impression it was meant to be used to make containers. But since allocate() returns void[], casts are required before using that memory, which is unsafe. Is my only option to wrap the casts in an @trusted helper function? or am I

std.experimental.allocator unittest failures on Win32

2016-04-20 Thread Vladimir Panteleev via Digitalmars-d
Hi, When I attempt to run the Phobos tests on my machine, I get the following: core.exception.AssertError@std\experimental\allocator\building_blocks\allocator_list.d(198): Assertion failure 0x010AECF7 in _d_assert 0x00EBF05A in D3std12experimental9allocator15building_blocks1

Phobos addition formal review: std.experimental.allocator

2015-06-12 Thread Dicebot via Digitalmars-d
The legendary allocator package by Andrei Alexandrescu has arrived at your doorsteps and kindly asks to let it into Phobos http://wiki.dlang.org/Review/std.experimental.allocator Docs: http://erdani.com/d/phobos-prerelease/std_experimental_allocator.html Code: https://github.com/andralex

Re: std.experimental.allocator and const etc.

2018-07-16 Thread Nicholas Wilson via Digitalmars-d
On Sunday, 15 July 2018 at 13:06:16 UTC, John Colvin wrote: Currently the API's don't support const(void)[], e.g. import std.experimental.allocator : makeArray, theAllocator, dispose; import std.experimental.allocator.mallocator : Mallocator; void main() {

Re: std.experimental.allocator and const etc.

2018-07-17 Thread Steven Schveighoffer via Digitalmars-d
On 7/15/18 9:06 AM, John Colvin wrote: Currently the API's don't support const(void)[], e.g. import std.experimental.allocator : makeArray, theAllocator, dispose; import std.experimental.allocator.mallocator : Mallocator; void main() {     const a = theAllocator.makeArray

Re: Learning resources for std.experimental.allocator

2017-01-05 Thread Edwin van Leeuwen via Digitalmars-d
On Thursday, 5 January 2017 at 11:09:01 UTC, xtreak wrote: Can someone explain me the actual benefits of using this and if so any benchmarks explaining the advantage. Benefits compared to what? Compared to using the GC?

Re: Learning resources for std.experimental.allocator

2017-01-05 Thread jmh530 via Digitalmars-d
On Thursday, 5 January 2017 at 11:09:01 UTC, xtreak wrote: I am newbie to D learning it for sometime using Ali's book. I came across std.experimental.allocator and read through http://dlang.org/library/std/experimental/allocator/building_blocks.html . Can someone explain me the actual ben

Re: Learning resources for std.experimental.allocator

2017-01-05 Thread xtreak via Digitalmars-d
On Thursday, 5 January 2017 at 13:16:44 UTC, Edwin van Leeuwen wrote: On Thursday, 5 January 2017 at 11:09:01 UTC, xtreak wrote: Can someone explain me the actual benefits of using this and if so any benchmarks explaining the advantage. Benefits compared to what? Compared to using the GC? Ye

Re: Learning resources for std.experimental.allocator

2017-01-05 Thread Chris Wright via Digitalmars-d
nient when you are dealing with a task that allocates its own memory and then finishes without sharing that memory anywhere else. Or you could use malloc, which is better for minimizing memory use and amortizes the cost of memory management better than a GC. If you write your code to use std.expe

Re: Learning resources for std.experimental.allocator

2017-01-06 Thread Ryan via Digitalmars-d
On Friday, 6 January 2017 at 03:28:43 UTC, Chris Wright wrote: There are some other interesting things you can do with this, though, regarding tracking how you use memory. Or you could use it to better benchmark malloc vs GC for your application. I did this just to see what the difference w

Re: Learning resources for std.experimental.allocator

2017-01-07 Thread xtreak via Digitalmars-d
On Friday, 6 January 2017 at 23:39:09 UTC, Ryan wrote: On Friday, 6 January 2017 at 03:28:43 UTC, Chris Wright wrote: There are some other interesting things you can do with this, though, regarding tracking how you use memory. Or you could use it to better benchmark malloc vs GC for your app

Re: @safe containers with std.experimental.allocator

2017-01-20 Thread bitwise via Digitalmars-d
On Saturday, 21 January 2017 at 02:47:49 UTC, bitwise wrote: [...] I can see that 'TypedAllocator' exists, but with a different interface than the rest of the allocators. Why wouldn't all allocators just have a common interface? Why wouldn't Mallocator take a template parameter allowing usag

Re: @safe containers with std.experimental.allocator

2017-01-20 Thread Eugene Wissner via Digitalmars-d
On Saturday, 21 January 2017 at 02:47:49 UTC, bitwise wrote: When std.experimental.allocator was created, I was under the impression it was meant to be used to make containers. But since allocate() returns void[], casts are required before using that memory, which is unsafe. Is my only

Re: @safe containers with std.experimental.allocator

2017-01-20 Thread bitwise via Digitalmars-d
On Saturday, 21 January 2017 at 05:06:07 UTC, Eugene Wissner wrote: Alligned allocator isn't present in the std.experimental.allocator because IAllocator has a method alignedAllocate() I hadn't noticed this, but I immediately see two problems: 1) there is no alignedDeallocate(

Re: @safe containers with std.experimental.allocator

2017-01-20 Thread Chris Wright via Digitalmars-d
On Sat, 21 Jan 2017 05:52:49 +, bitwise wrote: > On Saturday, 21 January 2017 at 05:06:07 UTC, Eugene Wissner wrote: >> Alligned allocator isn't present in the std.experimental.allocator >> because IAllocator has a method alignedAllocate() > > I hadn't noticed

Re: @safe containers with std.experimental.allocator

2017-01-20 Thread Eugene Wissner via Digitalmars-d
On Saturday, 21 January 2017 at 05:52:49 UTC, bitwise wrote: I hadn't noticed this, but I immediately see two problems: 1) there is no alignedDeallocate() which is needed because aligned allocators usually prepend metadata containing a pointer to the actual start of the memory to be passed to

Re: @safe containers with std.experimental.allocator

2017-01-21 Thread ZombineDev via Digitalmars-d
On Saturday, 21 January 2017 at 02:47:49 UTC, bitwise wrote: When std.experimental.allocator was created, I was under the impression it was meant to be used to make containers. But since allocate() returns void[], casts are required before using that memory, which is unsafe. Is my only

Re: @safe containers with std.experimental.allocator

2017-01-21 Thread ZombineDev via Digitalmars-d
On Saturday, 21 January 2017 at 09:56:29 UTC, ZombineDev wrote: On Saturday, 21 January 2017 at 02:47:49 UTC, bitwise wrote: When std.experimental.allocator was created, I was under the impression it was meant to be used to make containers. But since allocate() returns void[], casts are

Re: @safe containers with std.experimental.allocator

2017-01-21 Thread Chris Wright via Digitalmars-d
On Sat, 21 Jan 2017 04:01:06 +, bitwise wrote: > On Saturday, 21 January 2017 at 02:47:49 UTC, bitwise wrote: >> [...] > > I can see that 'TypedAllocator' exists, but with a different interface > than the rest of the allocators. Why wouldn't all allocators just have a > common interface? Typ

Re: @safe containers with std.experimental.allocator

2017-01-21 Thread Andrei Alexandrescu via Digitalmars-d
On 01/21/2017 01:06 AM, Eugene Wissner wrote: On Saturday, 21 January 2017 at 05:52:49 UTC, bitwise wrote: I hadn't noticed this, but I immediately see two problems: 1) there is no alignedDeallocate() which is needed because aligned allocators usually prepend metadata containing a pointer to th

Re: @safe containers with std.experimental.allocator

2017-01-21 Thread bitwise via Digitalmars-d
On Saturday, 21 January 2017 at 10:15:46 UTC, ZombineDev wrote: On Saturday, 21 January 2017 at 09:56:29 UTC, ZombineDev wrote: On Saturday, 21 January 2017 at 02:47:49 UTC, bitwise wrote: When std.experimental.allocator was created, I was under the impression it was meant to be used to make

Re: @safe containers with std.experimental.allocator

2017-01-21 Thread bitwise via Digitalmars-d
On Saturday, 21 January 2017 at 16:28:16 UTC, Andrei Alexandrescu wrote: alignedAllocate provides access to OS/clib-provided primitives for aligned allocation. Those don't require a special deallocation function, see e.g. http://en.cppreference.com/w/c/memory/aligned_alloc. -- Andrei This mak

Re: @safe containers with std.experimental.allocator

2017-01-21 Thread Andrei Alexandrescu via Digitalmars-d
On 01/21/2017 12:14 PM, bitwise wrote: On Saturday, 21 January 2017 at 16:28:16 UTC, Andrei Alexandrescu wrote: alignedAllocate provides access to OS/clib-provided primitives for aligned allocation. Those don't require a special deallocation function, see e.g. http://en.cppreference.com/w/c/memo

Re: @safe containers with std.experimental.allocator

2017-01-21 Thread bitwise via Digitalmars-d
On Saturday, 21 January 2017 at 17:26:35 UTC, Andrei Alexandrescu wrote: On 01/21/2017 12:14 PM, bitwise wrote: On Saturday, 21 January 2017 at 16:28:16 UTC, Andrei Alexandrescu wrote: alignedAllocate provides access to OS/clib-provided primitives for aligned allocation. Those don't require a

Re: @safe containers with std.experimental.allocator

2017-01-21 Thread Andrei Alexandrescu via Digitalmars-d
On 1/21/17 5:44 PM, bitwise wrote: About alignedMalloc: In C++ for example, I may want to use a vector full some SIMD type: class alignas(16) Vec4 { union { struct { float x, y, z, w; }; __m128 m; }; }; std::vector points = { ... }; In C++ however, 'new' does not respe

Re: @safe containers with std.experimental.allocator

2017-01-21 Thread Chris Wright via Digitalmars-d
On Sat, 21 Jan 2017 22:44:49 +, bitwise wrote: > So I use a custom aligned allocator: > > template > class AlignedAllocator { > T* allocate(size_type n) { > return (T*)_aligned_malloc(ALIGN, n * sizeof(T)); > } > }; > > SIMD operations(aligned load and store) can now safel

Re: @safe containers with std.experimental.allocator

2017-01-21 Thread bitwise via Digitalmars-d
On Sunday, 22 January 2017 at 00:13:10 UTC, Chris Wright wrote: On Sat, 21 Jan 2017 22:44:49 +, bitwise wrote: So I use a custom aligned allocator: template class AlignedAllocator { T* allocate(size_type n) { return (T*)_aligned_malloc(ALIGN, n * sizeof(T)); } }; SIMD o

Re: @safe containers with std.experimental.allocator

2017-01-21 Thread Chris Wright via Digitalmars-d
On Sun, 22 Jan 2017 00:53:45 +, bitwise wrote: > I understand this, but I've given a solid example which supports the > former, and haven't seen a counter example which supports the latter. Because examples that are easy to generate are small and small examples don't have coarse-grained anyth

Re: @safe containers with std.experimental.allocator

2017-01-21 Thread bitwise via Digitalmars-d
On Saturday, 21 January 2017 at 23:24:52 UTC, Andrei Alexandrescu wrote: On 1/21/17 5:44 PM, bitwise wrote: About alignedMalloc: In C++ for example, I may want to use a vector full some SIMD type: class alignas(16) Vec4 { union { struct { float x, y, z, w; }; __m128 m;

Re: @safe containers with std.experimental.allocator

2017-01-21 Thread bitwise via Digitalmars-d
On Sunday, 22 January 2017 at 01:02:09 UTC, Chris Wright wrote: On Sun, 22 Jan 2017 00:53:45 +, bitwise wrote: I understand this, but I've given a solid example which supports the former, and haven't seen a counter example which supports the latter. Because examples that are easy to gener

Re: @safe containers with std.experimental.allocator

2017-01-21 Thread bitwise via Digitalmars-d
On Saturday, 21 January 2017 at 23:24:52 UTC, Andrei Alexandrescu wrote: Andrei Anyways, design opinions aside, I would be satisfied if an aligned allocator were included in std.allocators that provided aligned heap memory using allocate()/deallocate(). The rest is just details with no pract

Re: @safe containers with std.experimental.allocator

2017-01-22 Thread Andrei Alexandrescu via Digitalmars-d
On 1/21/17 10:07 PM, bitwise wrote: On Saturday, 21 January 2017 at 23:24:52 UTC, Andrei Alexandrescu wrote: Andrei Anyways, design opinions aside, I would be satisfied if an aligned allocator were included in std.allocators that provided aligned heap memory using allocate()/deallocate(). The

Re: @safe containers with std.experimental.allocator

2017-01-24 Thread bitwise via Digitalmars-d
On Sunday, 22 January 2017 at 13:21:41 UTC, Andrei Alexandrescu wrote: On 1/21/17 10:07 PM, bitwise wrote: On Saturday, 21 January 2017 at 23:24:52 UTC, Andrei Alexandrescu wrote: Andrei Anyways, design opinions aside, I would be satisfied if an aligned allocator were included in std.allocat

Re: @safe containers with std.experimental.allocator

2017-01-25 Thread bitwise via Digitalmars-d
On Tuesday, 24 January 2017 at 19:38:31 UTC, bitwise wrote: I would, but I'm not sure I can use these allocators. Ran into this: http://forum.dlang.org/post/akohcwiotlcrodemh...@forum.dlang.org As stated in that thread, I can mark the member instance of the allocator in the container as 'shar

Re: @safe containers with std.experimental.allocator

2017-01-26 Thread bitwise via Digitalmars-d
On Sunday, 22 January 2017 at 13:21:41 UTC, Andrei Alexandrescu wrote: -- Andrei After exploring this idea(@safe containers), then looking at std.Array again, it's actually pretty smart. I had concerns about efficiency, but RefCounted seems to force allocation like make_shared<>, eliminating

Re: Phobos addition formal review: std.experimental.allocator

2015-08-13 Thread Tofu Ninja via Digitalmars-d
Something I thought about today, if a class or struct is allocated by an allocator(say a malloc based allocator) and one of its fields is populated with a reference to GCed memory, will the GC know to scan the allocator memory to keep that GCed memory alive?

Re: Phobos addition formal review: std.experimental.allocator

2015-08-13 Thread rsw0x via Digitalmars-d
On Thursday, 13 August 2015 at 20:56:36 UTC, Tofu Ninja wrote: Something I thought about today, if a class or struct is allocated by an allocator(say a malloc based allocator) and one of its fields is populated with a reference to GCed memory, will the GC know to scan the allocator memory to ke

Re: Phobos addition formal review: std.experimental.allocator

2015-08-13 Thread Tofu Ninja via Digitalmars-d
On Thursday, 13 August 2015 at 21:05:28 UTC, rsw0x wrote: On Thursday, 13 August 2015 at 20:56:36 UTC, Tofu Ninja wrote: Something I thought about today, if a class or struct is allocated by an allocator(say a malloc based allocator) and one of its fields is populated with a reference to GCed

Buffer size policy when using std.experimental.allocator.

2016-01-28 Thread QAston via Digitalmars-d
Hi. I have the following code: /++ A queue like buffer that's first filled up with insertBack, then depopulated using removeFront() until it's empty. +/ struct TransducerBuffer (T, Allocator) { private Allocator _allocator; private T[] _array; void insertBack(auto ref T newElem) { /

Re: std.experimental.allocator unittest failures on Win32

2016-04-21 Thread Vladimir Panteleev via Digitalmars-d
On Wednesday, 20 April 2016 at 13:43:59 UTC, Vladimir Panteleev wrote: Hi, When I attempt to run the Phobos tests on my machine, I get the following: [...] Should anyone run into this, these disappeared after updating snn.lib.

Re: Phobos addition formal review: std.experimental.allocator

2015-06-12 Thread Dicebot via Digitalmars-d
Small tip for reviewers: there are quite many modules in proposed package but majority is actual allocator implementation. I'd suggest to start investigating sources/documentation starting from http://erdani.com/d/phobos-prerelease/std_experimental_allocator.html and http://erdani.com/d/phobo

Re: Phobos addition formal review: std.experimental.allocator

2015-06-12 Thread Dicebot via Digitalmars-d
Also wanted to apologize for authors of any other Phobos proposals - I did intend to step down from review manager role but this specific package is of huge personal interest to me, thus the exception has been made.

Re: Phobos addition formal review: std.experimental.allocator

2015-06-12 Thread Andrea Fontana via Digitalmars-d
On Friday, 12 June 2015 at 11:06:43 UTC, Dicebot wrote: The legendary allocator package by Andrei Alexandrescu has arrived at your doorsteps and kindly asks to let it into Phobos http://wiki.dlang.org/Review/std.experimental.allocator Docs: http://erdani.com/d/phobos-prerelease

Re: Phobos addition formal review: std.experimental.allocator

2015-06-12 Thread Jacob Carlborg via Digitalmars-d
On 2015-06-12 13:06, Dicebot wrote: The legendary allocator package by Andrei Alexandrescu has arrived at your doorsteps and kindly asks to let it into Phobos http://wiki.dlang.org/Review/std.experimental.allocator Docs: http://erdani.com/d/phobos-prerelease/std_experimental_allocator.html

Re: Phobos addition formal review: std.experimental.allocator

2015-06-12 Thread Andrei Alexandrescu via Digitalmars-d
On 6/12/15 7:31 AM, Jacob Carlborg wrote: On 2015-06-12 13:06, Dicebot wrote: The legendary allocator package by Andrei Alexandrescu has arrived at your doorsteps and kindly asks to let it into Phobos http://wiki.dlang.org/Review/std.experimental.allocator Docs: http://erdani.com/d/phobos

Re: Phobos addition formal review: std.experimental.allocator

2015-06-12 Thread Andrei Alexandrescu via Digitalmars-d
lease/std_experimental_allocator.html and http://erdani.com/d/phobos-prerelease/std_experimental_allocator_building_blocks.html while using http://erdani.com/d/phobos-prerelease/std_experimental_allocator_showcase.html as reference for "highlight" examples. A few more words on that: Think of std.experimental.alloc

Re: Phobos addition formal review: std.experimental.allocator

2015-06-12 Thread Andrei Alexandrescu via Digitalmars-d
On 6/12/15 8:54 AM, Andrei Alexandrescu wrote: * A dynamicaly-typed layer that allows the user to swap allocators at runtime. This is embodied in IAllocator, CAllocatorImpl, theAllocator, and processAllocator. Forgot to mention - the entry point for this layer is also http://erdani.com/d/phobo

Re: Phobos addition formal review: std.experimental.allocator

2015-06-12 Thread Baz via Digitalmars-d
On Friday, 12 June 2015 at 11:09:01 UTC, Dicebot wrote: Small tip for reviewers: there are quite many modules in proposed package but majority is actual allocator implementation. I'd suggest to start investigating sources/documentation starting from http://erdani.com/d/phobos-prerelease/std_ex

Re: Phobos addition formal review: std.experimental.allocator

2015-06-12 Thread Andrei Alexandrescu via Digitalmars-d
On 6/12/15 11:23 AM, Baz wrote: On Friday, 12 June 2015 at 11:09:01 UTC, Dicebot wrote: Small tip for reviewers: there are quite many modules in proposed package but majority is actual allocator implementation. I'd suggest to start investigating sources/documentation starting from http://erdani.

Re: Phobos addition formal review: std.experimental.allocator

2015-06-12 Thread Baz via Digitalmars-d
On Friday, 12 June 2015 at 19:19:55 UTC, Andrei Alexandrescu wrote: On 6/12/15 11:23 AM, Baz wrote: On Friday, 12 June 2015 at 11:09:01 UTC, Dicebot wrote: Small tip for reviewers: there are quite many modules in proposed package but majority is actual allocator implementation. I'd suggest to

Re: Phobos addition formal review: std.experimental.allocator

2015-06-12 Thread Tofu Ninja via Digitalmars-d
On Friday, 12 June 2015 at 15:54:27 UTC, Andrei Alexandrescu wrote: On 6/12/15 8:54 AM, Andrei Alexandrescu wrote: * A dynamicaly-typed layer that allows the user to swap allocators at runtime. This is embodied in IAllocator, CAllocatorImpl, theAllocator, and processAllocator. Forgot to ment

Re: Phobos addition formal review: std.experimental.allocator

2015-06-12 Thread Andrei Alexandrescu via Digitalmars-d
On 6/12/15 4:07 PM, Tofu Ninja wrote: Are there any plans to have new and delete call out to theAllocator or processAllocator? In the future we may rig things that way. -- Andrei

Re: Phobos addition formal review: std.experimental.allocator

2015-06-13 Thread Dicebot via Digitalmars-d
Andrei, have you considered creating additional std.allocator.impl package and moving actual allocators there? Or, probably, the other way around with std.allocator.core Existing flat hierarchy does not hint about internal structure in any way.

Re: Phobos addition formal review: std.experimental.allocator

2015-06-13 Thread Andrei Alexandrescu via Digitalmars-d
On 6/13/15 3:14 AM, Dicebot wrote: Andrei, have you considered creating additional std.allocator.impl package and moving actual allocators there? Or, probably, the other way around with std.allocator.core Existing flat hierarchy does not hint about internal structure in any way. It's good docu

Re: Phobos addition formal review: std.experimental.allocator

2015-06-13 Thread Dicebot via Digitalmars-d
On Saturday, 13 June 2015 at 15:48:31 UTC, Andrei Alexandrescu wrote: On 6/13/15 3:14 AM, Dicebot wrote: Andrei, have you considered creating additional std.allocator.impl package and moving actual allocators there? Or, probably, the other way around with std.allocator.core Existing flat hier

Re: Phobos addition formal review: std.experimental.allocator

2015-06-13 Thread Andrei Alexandrescu via Digitalmars-d
On 6/13/15 10:24 AM, Dicebot wrote: On Saturday, 13 June 2015 at 15:48:31 UTC, Andrei Alexandrescu wrote: On 6/13/15 3:14 AM, Dicebot wrote: Andrei, have you considered creating additional std.allocator.impl package and moving actual allocators there? Or, probably, the other way around with std

Re: Phobos addition formal review: std.experimental.allocator

2015-06-13 Thread Jacob Carlborg via Digitalmars-d
On 2015-06-12 13:06, Dicebot wrote: The legendary allocator package by Andrei Alexandrescu has arrived at your doorsteps and kindly asks to let it into Phobos http://wiki.dlang.org/Review/std.experimental.allocator Docs: http://erdani.com/d/phobos-prerelease/std_experimental_allocator.html

Re: Phobos addition formal review: std.experimental.allocator

2015-06-13 Thread Tofu Ninja via Digitalmars-d
On Saturday, 13 June 2015 at 15:48:31 UTC, Andrei Alexandrescu wrote: On 6/13/15 3:14 AM, Dicebot wrote: Andrei, have you considered creating additional std.allocator.impl package and moving actual allocators there? Or, probably, the other way around with std.allocator.core Existing flat hier

Re: Phobos addition formal review: std.experimental.allocator

2015-06-13 Thread ZombineDev via Digitalmars-d
On Saturday, 13 June 2015 at 15:48:31 UTC, Andrei Alexandrescu wrote: On 6/13/15 3:14 AM, Dicebot wrote: Andrei, have you considered creating additional std.allocator.impl package and moving actual allocators there? Or, probably, the other way around with std.allocator.core Existing flat hier

Re: Phobos addition formal review: std.experimental.allocator

2015-06-13 Thread Andrei Alexandrescu via Digitalmars-d
On 6/13/15 4:16 PM, ZombineDev wrote: On Saturday, 13 June 2015 at 15:48:31 UTC, Andrei Alexandrescu wrote: On 6/13/15 3:14 AM, Dicebot wrote: Andrei, have you considered creating additional std.allocator.impl package and moving actual allocators there? Or, probably, the other way around with s

Re: Phobos addition formal review: std.experimental.allocator

2015-06-13 Thread weaselcat via Digitalmars-d
On Sunday, 14 June 2015 at 00:24:51 UTC, Andrei Alexandrescu wrote: On 6/13/15 4:16 PM, ZombineDev wrote: On Saturday, 13 June 2015 at 15:48:31 UTC, Andrei Alexandrescu wrote: On 6/13/15 3:14 AM, Dicebot wrote: Andrei, have you considered creating additional std.allocator.impl package and movi

Re: Phobos addition formal review: std.experimental.allocator

2015-06-13 Thread HaraldZealot via Digitalmars-d
So we have: * 1 request to change names; * 3 requests to wank around the directory structure; * 0 of everything else. Sigh. Andrei Yesterday I have found an error in documentation and have left a comment about it on github PR. And I only start to read the documentation, so I think there

Re: Phobos addition formal review: std.experimental.allocator

2015-06-13 Thread Dicebot via Digitalmars-d
On Sunday, 14 June 2015 at 00:24:51 UTC, Andrei Alexandrescu wrote: So we have: * 1 request to change names; * 3 requests to wank around the directory structure; * 0 of everything else. Sigh. That is to be expected and intended for formal Phobos review. Implementation is not of much interest

Re: Phobos addition formal review: std.experimental.allocator

2015-06-14 Thread Jacob Carlborg via Digitalmars-d
On 2015-06-14 02:24, Andrei Alexandrescu wrote: * 1 request to change names; * 3 requests to wank around the directory structure; * 0 of everything else. Sigh. These are things that are easy to see right away, without looking deep inside the code. You can interpret this as: 1. Either your

  1   2   >