Jump to page: 1 2 3
Thread overview
Sneak preview into std.allocator's porcelain
May 07, 2015
Vladimir Panteleev
May 07, 2015
Vladimir Panteleev
May 07, 2015
Namespace
May 08, 2015
deadalnix
May 08, 2015
Vladimir Panteleev
May 08, 2015
deadalnix
May 08, 2015
Vladimir Panteleev
May 08, 2015
deadalnix
May 10, 2015
Jacob Carlborg
May 11, 2015
deadalnix
May 08, 2015
Vladimir Panteleev
May 07, 2015
Brian Schott
May 07, 2015
Ali Çehreli
May 11, 2015
Jonathan M Davis
May 07, 2015
Alex Parrill
May 11, 2015
Jonathan M Davis
May 07, 2015
http://erdani.com/d/phobos-prerelease/std_experimental_allocator_porcelain.html

Andrei
May 07, 2015
On Thursday, 7 May 2015 at 02:28:45 UTC, Andrei Alexandrescu wrote:
> http://erdani.com/d/phobos-prerelease/std_experimental_allocator_porcelain.html
>
> Andrei

Now that https://issues.dlang.org/show_bug.cgi?id=8269 was fixed, how about that idea of using with(scopeAllocator(...)) { /* use theAllocator */ } ?

I.e. encapsulating

auto oldAllocator = theAllocator;
scope(exit) theAllocator = oldAllocator;
theAllocator = allocatorObject(...);

into a nice RAII type and then using it with WithStatement.
May 07, 2015
On Thursday, 7 May 2015 at 02:28:45 UTC, Andrei Alexandrescu wrote:
> http://erdani.com/d/phobos-prerelease/std_experimental_allocator_porcelain.html
>
> Andrei

*Reads module name* "...toilets? Oh. Wait. This is is allocator stuff."

Looks like there's a macro expansion problem in makeArray's "Throws:" section.

IAllocator.empty and IAllocator.zeroesAllocations, CAllocatorImpl.impl, CAllocatorImpl.empty, and CAllocatorImpl.zeroesAllocations are missing @property.

Can we get a different name for "kill"? That makes me think of processes. How about "dispose"?
May 07, 2015
On 5/7/15 2:18 AM, Brian Schott wrote:
> On Thursday, 7 May 2015 at 02:28:45 UTC, Andrei Alexandrescu wrote:
>> http://erdani.com/d/phobos-prerelease/std_experimental_allocator_porcelain.html
>>
>>
>> Andrei
>
> *Reads module name* "...toilets? Oh. Wait. This is is allocator stuff."
>
> Looks like there's a macro expansion problem in makeArray's "Throws:"
> section.
>
> IAllocator.empty and IAllocator.zeroesAllocations, CAllocatorImpl.impl,
> CAllocatorImpl.empty, and CAllocatorImpl.zeroesAllocations are missing
> @property.
>
> Can we get a different name for "kill"? That makes me think of
> processes. How about "dispose"?

Sounds good, will do. Thanks! -- Andrei
May 07, 2015
On Thursday, 7 May 2015 at 02:28:45 UTC, Andrei Alexandrescu wrote:
> http://erdani.com/d/phobos-prerelease/std_experimental_allocator_porcelain.html
>
> Andrei

The links for allocator.temp and allocator.typed lead to 404 pages.
May 07, 2015
"Alex Parrill" <initrd.gz@gmail.com> wrote:
> On Thursday, 7 May 2015 at 02:28:45 UTC, Andrei Alexandrescu wrote:
>> http://erdani.com/d/phobos-prerelease/std_experimental_allocator_porcelain.html
>> 
>> Andrei
> 
> The links for allocator.temp and allocator.typed lead to 404 pages.

Sorry, those modules are not used anymore (stuff that used to be in typed is now in porcelain and temp is just a dump).
May 07, 2015
On 5/6/15 11:00 PM, Vladimir Panteleev wrote:
> On Thursday, 7 May 2015 at 02:28:45 UTC, Andrei Alexandrescu wrote:
>> http://erdani.com/d/phobos-prerelease/std_experimental_allocator_porcelain.html
>>
>>
>> Andrei
>
> Now that https://issues.dlang.org/show_bug.cgi?id=8269 was fixed, how
> about that idea of using with(scopeAllocator(...)) { /* use theAllocator
> */ } ?
>
> I.e. encapsulating
>
> auto oldAllocator = theAllocator;
> scope(exit) theAllocator = oldAllocator;
> theAllocator = allocatorObject(...);
>
> into a nice RAII type and then using it with WithStatement.

Sadly that won't be possible with the current design; all higher-level functions are not methods and instead rely on UFCS. -- Andrei
May 07, 2015
On Thursday, 7 May 2015 at 17:57:24 UTC, Andrei Alexandrescu wrote:
> On 5/6/15 11:00 PM, Vladimir Panteleev wrote:
>> On Thursday, 7 May 2015 at 02:28:45 UTC, Andrei Alexandrescu wrote:
>>> http://erdani.com/d/phobos-prerelease/std_experimental_allocator_porcelain.html
>>>
>>>
>>> Andrei
>>
>> Now that https://issues.dlang.org/show_bug.cgi?id=8269 was fixed, how
>> about that idea of using with(scopeAllocator(...)) { /* use theAllocator
>> */ } ?
>>
>> I.e. encapsulating
>>
>> auto oldAllocator = theAllocator;
>> scope(exit) theAllocator = oldAllocator;
>> theAllocator = allocatorObject(...);
>>
>> into a nice RAII type and then using it with WithStatement.
>
> Sadly that won't be possible with the current design; all higher-level functions are not methods and instead rely on UFCS. -- Andrei

Not what I meant. This is your idea:

http://forum.dlang.org/post/l4ccb4$25ul$1@digitalmars.com
May 07, 2015
On 05/07/2015 02:18 AM, Brian Schott wrote:
> On Thursday, 7 May 2015 at 02:28:45 UTC, Andrei Alexandrescu wrote:
>> http://erdani.com/d/phobos-prerelease/std_experimental_allocator_porcelain.html
>>
>>
>> Andrei
>
> *Reads module name* "...toilets? Oh. Wait.

I thought dishes and tea cups. :)

> This is is allocator stuff."

If it is related to allocators, I am not familiar with that term. Could someone please explain why "porcelain"?

Ali

May 07, 2015
> Not what I meant. This is your idea:
>
> http://forum.dlang.org/post/l4ccb4$25ul$1@digitalmars.com

Oh, my dream could come true... :)
« First   ‹ Prev
1 2 3