<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.lang.d.general">
    <title>gmane.comp.lang.d.general</title>
    <link>http://blog.gmane.org/gmane.comp.lang.d.general</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.d.general/88837"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.d.general/88836"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.d.general/88835"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.d.general/88834"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.d.general/88833"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.d.general/88832"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.d.general/88831"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.d.general/88830"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.d.general/88829"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.d.general/88828"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.d.general/88827"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.d.general/88826"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.d.general/88825"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.d.general/88824"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.d.general/88823"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.d.general/88822"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.d.general/88821"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.d.general/88820"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.d.general/88819"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.d.general/88818"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.d.general/88837">
    <title>Re: Live code analysis in DCT</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.d.general/88837</link>
    <description>&lt;pre&gt;
Just sent you an email saying I'm willing to change SDC's license 
to Boost.

&lt;/pre&gt;</description>
    <dc:creator>Bernard Helyer</dc:creator>
    <dc:date>2012-05-24T16:29:03</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.d.general/88836">
    <title>Re: Destructor nonsense on dlang.org</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.d.general/88836</link>
    <description>&lt;pre&gt;On Thursday, 24 May 2012 at 16:06:23 UTC, Andrei Alexandrescu 
wrote:

You can't do that in today's D either, going by the spec as well 
by the actual implementation.

David

&lt;/pre&gt;</description>
    <dc:creator>David Nadlinger</dc:creator>
    <dc:date>2012-05-24T16:17:15</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.d.general/88835">
    <title>Re: Destructor nonsense on dlang.org</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.d.general/88835</link>
    <description>&lt;pre&gt;
Finalization happens once the world has been resumed, meaning GC 
allocation (and even explicit deallocation) should be perfectly safe. 
This is absolutely essential: Finalization models where finalizers run 
in a paused world are doomed to fail miserably.

&lt;/pre&gt;</description>
    <dc:creator>Alex Rønne Petersen</dc:creator>
    <dc:date>2012-05-24T16:12:36</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.d.general/88834">
    <title>Re: Destructor nonsense on dlang.org</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.d.general/88834</link>
    <description>&lt;pre&gt;
This is possible but not trivial as the state of zombie objects must be 
properly defined. Often such objects will fail their invariant (a 
reasonable state of a zombie object is with the correct vtable, no 
mutex, and all fields in the pre-constructor state).


As one aspect, calls to new should fail during destruction.


Andrei

&lt;/pre&gt;</description>
    <dc:creator>Andrei Alexandrescu</dc:creator>
    <dc:date>2012-05-24T16:10:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.d.general/88833">
    <title>Re: Destructor nonsense on dlang.org</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.d.general/88833</link>
    <description>&lt;pre&gt;
No, the docs specifically state that this is invalid (and it currently 
throws InvalidMemoryOperationError in most cases).

Whether it *should* be allowed is arguable, but it isn't currently, both 
in docs and impl.

&lt;/pre&gt;</description>
    <dc:creator>Alex Rønne Petersen</dc:creator>
    <dc:date>2012-05-24T16:10:31</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.d.general/88832">
    <title>Re: Destructor nonsense on dlang.org</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.d.general/88832</link>
    <description>&lt;pre&gt;
It does matter because a destructor may use an object that has just been 
destroyed.

Andrei


&lt;/pre&gt;</description>
    <dc:creator>Andrei Alexandrescu</dc:creator>
    <dc:date>2012-05-24T16:06:24</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.d.general/88831">
    <title>Re: Destructor nonsense on dlang.org</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.d.general/88831</link>
    <description>&lt;pre&gt;On Thursday, 24 May 2012 at 15:43:57 UTC, Alex Rønne Petersen 
wrote:

Hmm... well, as long as it's optional behavior... as in my case I 
actually want to go in the opposite direction... short-lived tool 
which claims x resources and is run once for every file...

So in this case, resources should be "free:ed" _unless_ it's at 
program termination... as then it just slows down the shutdown 
procedure, the OS reclaim it faster anyway.


&lt;/pre&gt;</description>
    <dc:creator>Tove</dc:creator>
    <dc:date>2012-05-24T16:02:29</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.d.general/88830">
    <title>Re: Destructor nonsense on dlang.org</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.d.general/88830</link>
    <description>&lt;pre&gt;
So does .NET. It just does it with some trampoline magic. Non-D code 
just has to call thread_attachThis()/thread_detachThis() and friends.


The CLR waits for all threads to have shut down (including daemon 
threads). That's not equal to all static/__gshared data being nulled 
out, mind you. All data is cleared out once all threads, including the 
finalizer thread, have been terminated one way or another.

And yes, it is thread safe.


Don't need a virtual machine. We already have the infrastructure to do 
it in druntime, we just need to make the lifetime and GC code respect 
the C#/CLR finalization semantics if we want to go with those.


No, but a sane implementation made for a sane spec should. ;)


We just need a dispose pattern whereby explicit dispose() instructs the 
GC to not finalize.


None. I just came across it in the docs and found it completely insane.

&lt;/pre&gt;</description>
    <dc:creator>Alex Rønne Petersen</dc:creator>
    <dc:date>2012-05-24T15:43:55</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.d.general/88829">
    <title>Re: Destructor nonsense on dlang.org</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.d.general/88829</link>
    <description>&lt;pre&gt;Le 24/05/2012 16:54, Andrei Alexandrescu a écrit :

So what ?

Each GC passes must, mark object that have to be removed, call finalizer 
on them all, THEN recycle memory.

So « zombie » object can still refer to one another in finalization.

The real problem is resurrection, which should be 100% forbiden and this 
must be enforced by the language (ie, the scopeness of this parameter is 
something important).

&lt;/pre&gt;</description>
    <dc:creator>deadalnix</dc:creator>
    <dc:date>2012-05-24T15:27:48</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.d.general/88828">
    <title>Re: Destructor nonsense on dlang.org</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.d.general/88828</link>
    <description>&lt;pre&gt;Le 24/05/2012 15:49, Steven Schveighoffer a écrit :

Indeed. But java's way of doing it is very poor.

&lt;/pre&gt;</description>
    <dc:creator>deadalnix</dc:creator>
    <dc:date>2012-05-24T15:21:09</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.d.general/88827">
    <title>Re: Destructor nonsense on dlang.org</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.d.general/88827</link>
    <description>&lt;pre&gt;On 2012-05-24 14:35:45 +0000, Alex Rønne Petersen &amp;lt;alex&amp;lt; at &amp;gt;lycus.org&amp;gt; said:


.NET is a virtual machine which has total control of all the code that 
runs. D has to work with the C runtime and other non-D code that might 
use D code more or less directly.

The interesting question is *how* do they do it without causing 
thread-safety issues? Perhaps they wait until all threads have been 
terminated, or perhaps they're unsafe too. Would doing the same be 
appropriate for D? Does this mean we can't use anything using static 
and global variables in destructors because they might have been 
finalized? If so, how does the compiler detects this?

If there's a way and it is not overly costly in performance, it might 
be a good idea. But we're not in a virtual machine, there are more 
constrains we must abide to and we might have to make different 
compromises.

Enlarging the scope of all this, there is already some impending 
problems with how destructors are handled in D that can easily create 
low-level races. And this applies to struct destructors too, when the 
struct is put on the heap or is a member of an object. We're in the 
need of a global solution for all this.

&amp;lt;http://d.puremagic.com/issues/show_bug.cgi?id=4621&amp;gt;
&amp;lt;http://d.puremagic.com/issues/show_bug.cgi?id=4624&amp;gt;



Well, not according to the current spec.

It could make sense to do so, although I'm not sure. Freeing "external" 
resources can mean many things: if we're talking about externally 
allocated memory, open files, sockets, mutexes, etc., there's no need 
to finalize that at the end of the program: the OS will do the cleanup 
for us. If we're talking about advisory locks on files, then there's 
definitely a need to clear the lock, although I'm not sure it makes 
sense to make the release dependent on a non-deterministic GC.

So I'm curious, what resource are we trying to free here?


&lt;/pre&gt;</description>
    <dc:creator>Michel Fortin</dc:creator>
    <dc:date>2012-05-24T15:18:01</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.d.general/88826">
    <title>Re: Destructor nonsense on dlang.org</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.d.general/88826</link>
    <description>&lt;pre&gt;
As for replicating that functionality, Scoped!T could always 
check for a magic dispose() method (maybe with another name, a 
marker parameter, …) and if it exists, call it on destruction.

But of course, the »universality« of the Tango runtimes 
solution is lost with this.

David

&lt;/pre&gt;</description>
    <dc:creator>David Nadlinger</dc:creator>
    <dc:date>2012-05-24T15:17:56</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.d.general/88825">
    <title>Re: Destructor nonsense on dlang.org</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.d.general/88825</link>
    <description>&lt;pre&gt;

We can easily hook that in object.clear, which any scoped library  
implementation should be calling.

-Steve

&lt;/pre&gt;</description>
    <dc:creator>Steven Schveighoffer</dc:creator>
    <dc:date>2012-05-24T15:17:04</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.d.general/88824">
    <title>Re: Destructor nonsense on dlang.org</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.d.general/88824</link>
    <description>&lt;pre&gt;

Object.dispose in Tango is called on scope exit if the object is 
variable is declared "scope". "scope" is deprecated in D2.

&lt;/pre&gt;</description>
    <dc:creator>Jacob Carlborg</dc:creator>
    <dc:date>2012-05-24T15:04:06</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.d.general/88823">
    <title>Re: Destructor nonsense on dlang.org</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.d.general/88823</link>
    <description>&lt;pre&gt;
They may refer to one another.

Andrei


&lt;/pre&gt;</description>
    <dc:creator>Andrei Alexandrescu</dc:creator>
    <dc:date>2012-05-24T14:54:11</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.d.general/88822">
    <title>Re: Destructor nonsense on dlang.org</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.d.general/88822</link>
    <description>&lt;pre&gt;
Doesn't matter: Nothing is guaranteed about order of finalization (and 
this is reasonable). Thus, the finalizers can be run in any arbitrary 
order. The important point here is that they are run *at all*.

&lt;/pre&gt;</description>
    <dc:creator>Alex Rønne Petersen</dc:creator>
    <dc:date>2012-05-24T14:57:26</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.d.general/88821">
    <title>Re: Destructor nonsense on dlang.org</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.d.general/88821</link>
    <description>&lt;pre&gt;On Thu, 24 May 2012 10:30:02 -0400, Alex Rønne Petersen &amp;lt;alex&amp;lt; at &amp;gt;lycus.org&amp;gt;  
wrote:


I only found one definition for finalizer on wikipedia, and it fits D's  
definition.

What I think we need is a dispose pattern for objects, like Tango has.

-Steve

&lt;/pre&gt;</description>
    <dc:creator>Steven Schveighoffer</dc:creator>
    <dc:date>2012-05-24T14:53:58</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.d.general/88820">
    <title>Re: Destructor nonsense on dlang.org</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.d.general/88820</link>
    <description>&lt;pre&gt;
Just look at /usr/include/gc/gc.h (from libgc, the Boehm-Demers-Weiser 
GC). It has 3 (if not 4) different kinds of finalization. To be 
specific, the finalization I believe we need is the *_no_order behavior. 
This is the behavior C# and the CLR follow.

&lt;/pre&gt;</description>
    <dc:creator>Alex Rønne Petersen</dc:creator>
    <dc:date>2012-05-24T14:56:31</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.d.general/88819">
    <title>Re: dget - getting code from github</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.d.general/88819</link>
    <description>&lt;pre&gt;
Oh, and maybe I'm a bit to pessimistic on that, but a project 
that takes »only one or two days« and »doesn't require much of 
any design« probably won't offer much functionality over 
»git/hg/&amp;lt;xyz&amp;gt; clone &amp;lt;url&amp;gt;«, and thus is likely to rather be a 
needless complication than much of a timesaver.

With dget in place, you either still need to go to the respective 
hosting site to find out that the project even exists, or we need 
a central list of available libraries, in which case we are 
already halfway towards a package manager. Now add versioning, a 
very ubiquitous concern, into the mix…

By the way, if you really just need to fetch the latest source 
tree for a GitHub project, you don't even need a local Git 
client. Just click the big »ZIP« button (taking you e.g. to 
https://github.com/D-Programming-Language/phobos/zipball/master) 
– works for branches and tags as well.

David

&lt;/pre&gt;</description>
    <dc:creator>David Nadlinger</dc:creator>
    <dc:date>2012-05-24T14:43:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.d.general/88818">
    <title>Re: Destructor nonsense on dlang.org</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.d.general/88818</link>
    <description>&lt;pre&gt;
That's silly. Microsoft .NET and Mono have been running finalizers on 
runtime shutdown for a long time without problems.


Right, but I think if we guarantee finalization at shutdown, that 
shouldn't matter.


Even such an implementation should free all memory at shutdown, and, at 
that point, run finalizers.

&lt;/pre&gt;</description>
    <dc:creator>Alex Rønne Petersen</dc:creator>
    <dc:date>2012-05-24T14:35:45</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.d.general/88817">
    <title>Re: Destructor nonsense on dlang.org</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.d.general/88817</link>
    <description>&lt;pre&gt;
We should really expose a waitForFinalizers() function in core.memory.

&lt;/pre&gt;</description>
    <dc:creator>Alex Rønne Petersen</dc:creator>
    <dc:date>2012-05-24T14:38:10</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.lang.d.general">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.lang.d.general</link>
  </textinput>
</rdf:RDF>

