Re: Blog post on automem

2017-05-04 Thread Atila Neves via Digitalmars-d-announce
On Thursday, 4 May 2017 at 08:41:55 UTC, Atila Neves wrote: On Wednesday, 3 May 2017 at 12:43:26 UTC, ANtlord wrote: [...] I took a look at this. It's a druntime problem. Unique.~this calls std.experimental.allocator.dispose, which calls destroy in object.d which calls rt_finalize: extern

Re: Blog post on automem

2017-05-04 Thread Nick Treleaven via Digitalmars-d-announce
On Thursday, 4 May 2017 at 08:41:55 UTC, Atila Neves wrote: I took a look at this. It's a druntime problem. Unique.~this calls std.experimental.allocator.dispose, which calls destroy in object.d which calls rt_finalize: extern (C) void rt_finalize(void *data, bool det=true); Notice the lack o

Re: Blog post on automem

2017-05-04 Thread Atila Neves via Digitalmars-d-announce
On Wednesday, 3 May 2017 at 12:43:26 UTC, ANtlord wrote: On Friday, 28 April 2017 at 14:40:03 UTC, Mike Parker wrote: Atila was kind enough to do a write up on his automem library for the D Blog, talking about why he did it and showing some of the implementation details. This is officially part

Re: Blog post on automem

2017-05-03 Thread ANtlord via Digitalmars-d-announce
On Friday, 28 April 2017 at 14:40:03 UTC, Mike Parker wrote: Atila was kind enough to do a write up on his automem library for the D Blog, talking about why he did it and showing some of the implementation details. This is officially part of the GC series. The next post in the series will be my

Re: Blog post on automem

2017-05-03 Thread ag0aep6g via Digitalmars-d-announce
On 05/03/2017 01:05 PM, ANtlord wrote: As far as I know a delegate depends on GC. Closures depend on the GC. Not all delegates involve closures. For example, you don't need the GC to make a delegate of a method: struct S { int x = 0; void m() @nogc { x = 1; } } void main() @nogc

Re: Blog post on automem

2017-05-03 Thread ANtlord via Digitalmars-d-announce
On Friday, 28 April 2017 at 14:40:03 UTC, Mike Parker wrote: When I publish the next one, I'll add a page to the blog with each post in the series linked under two categories: 'GC Fundamentals' and 'Memory Management Strategies'. Atila's post sits squarely in the latter. If you have a particula

Re: Blog post on automem

2017-04-28 Thread Atila Neves via Digitalmars-d-announce
On Friday, 28 April 2017 at 22:06:57 UTC, Nordlöw wrote: On Friday, 28 April 2017 at 14:40:03 UTC, Mike Parker wrote: Blog: https://dlang.org/blog/2017/04/28/automem-hands-free-raii-for-d/ Nice. One thing, Atila; what about replacing typeof(u1) u2; move(u1, u2); with typeof(u1)

Re: Blog post on automem

2017-04-28 Thread Nordlöw via Digitalmars-d-announce
On Friday, 28 April 2017 at 14:40:03 UTC, Mike Parker wrote: Blog: https://dlang.org/blog/2017/04/28/automem-hands-free-raii-for-d/ Nice. One thing, Atila; what about replacing typeof(u1) u2; move(u1, u2); with typeof(u1) u2 = move(u1); or, alternatively, typeof(u1) u2 = u

Re: Blog post on automem

2017-04-28 Thread Ali Çehreli via Digitalmars-d-announce
On 04/28/2017 11:26 AM, qznc wrote: There is a RefCounted in std.typecons as well. The article does not explain the differences though. The article gives a difference: D’s standard library has Unique and RefCounted in std.typecons but they predate std.experimental.allocator and so “bake in”

Re: Blog post on automem

2017-04-28 Thread qznc via Digitalmars-d-announce
On Friday, 28 April 2017 at 15:39:07 UTC, Swoorup Joshi wrote: On Friday, 28 April 2017 at 14:40:03 UTC, Mike Parker wrote: Atila was kind enough to do a write up on his automem library for the D Blog, talking about why he did it and showing some of the implementation details. This is officiall

Re: Blog post on automem

2017-04-28 Thread Swoorup Joshi via Digitalmars-d-announce
On Friday, 28 April 2017 at 14:40:03 UTC, Mike Parker wrote: Atila was kind enough to do a write up on his automem library for the D Blog, talking about why he did it and showing some of the implementation details. This is officially part of the GC series. The next post in the series will be my

Re: Blog post on automem

2017-04-28 Thread jmh530 via Digitalmars-d-announce
On Friday, 28 April 2017 at 14:40:03 UTC, Mike Parker wrote: Atila was kind enough to do a write up on his automem library for the D Blog, talking about why he did it and showing some of the implementation details. This is officially part of the GC series. The next post in the series will be my