February 05, 2012
On 2/3/2012 4:28 PM, H. S. Teoh wrote:
> I agree with this. Based on current documentation, I didn't even know
> the GC can be replaced at compile-time until someone mentioned it. And
> up to now I still don't know how exactly to do this, since I couldn't
> find any docs for it.

The documentation for that is in the source files for the GC, the GC is even in its own subdirectory, src/gc. It stands to reason that to replace the GC, that's where to look.

Doing a replacement GC is pretty advanced work. If one is ready for that, it isn't unreasonable to expect one to peruse those files. It's a bit beyond the scope of D to provide a tutorial on how to write a replacement GC, though you're welcome to do it and contribute it.
February 05, 2012
On Sun, Feb 05, 2012 at 12:10:33AM -0800, Walter Bright wrote:
> On 2/3/2012 4:28 PM, H. S. Teoh wrote:
> >I agree with this. Based on current documentation, I didn't even know the GC can be replaced at compile-time until someone mentioned it. And up to now I still don't know how exactly to do this, since I couldn't find any docs for it.
> 
> The documentation for that is in the source files for the GC, the GC is even in its own subdirectory, src/gc. It stands to reason that to replace the GC, that's where to look.
> 
> Doing a replacement GC is pretty advanced work. If one is ready for that, it isn't unreasonable to expect one to peruse those files.  It's a bit beyond the scope of D to provide a tutorial on how to write a replacement GC, though you're welcome to do it and contribute it.

I was just referring to how to switch between different GCs at compile-time. I'm sure somebody documented this somewhere, the point was that there isn't a central place where someone unfamiliar with the system can go to find the answers.


T

-- 
If you look at a thing nine hundred and ninety-nine times, you are perfectly safe; if you look at it the thousandth time, you are in frightful danger of seeing it for the first time. -- G. K. Chesterton
February 05, 2012
On 04.02.2012 00:12, Zachary Lund wrote:
> Here are some things I'm unhappy with currently.
>
> 1. Documentation
>
> I find certain things, of which I will start writing down and writing
> patches for, in the documentation that are unsatisfactory. Two in
> particular is the current situation with memory management and CTFE.

Could you please explain what you mean about CTFE? I'm not aware of any problems with the documentation. (I gave the docs a complete rewrite a couple of releases ago).
February 05, 2012
On 02/05/2012 09:27 AM, Don wrote:
> On 04.02.2012 00:12, Zachary Lund wrote:
>> Here are some things I'm unhappy with currently.
>>
>> 1. Documentation
>>
>> I find certain things, of which I will start writing down and writing
>> patches for, in the documentation that are unsatisfactory. Two in
>> particular is the current situation with memory management and CTFE.
>
> Could you please explain what you mean about CTFE? I'm not aware of any
> problems with the documentation. (I gave the docs a complete rewrite a
> couple of releases ago).

I didn't see this documentation (under the Functions section none the less). I revoke my statement.
February 05, 2012
On 02/05/2012 09:18 AM, H. S. Teoh wrote:
> On Sun, Feb 05, 2012 at 12:10:33AM -0800, Walter Bright wrote:
>> On 2/3/2012 4:28 PM, H. S. Teoh wrote:
>>> I agree with this. Based on current documentation, I didn't even know
>>> the GC can be replaced at compile-time until someone mentioned it.
>>> And up to now I still don't know how exactly to do this, since I
>>> couldn't find any docs for it.
>>
>> The documentation for that is in the source files for the GC, the GC
>> is even in its own subdirectory, src/gc. It stands to reason that to
>> replace the GC, that's where to look.
>>
>> Doing a replacement GC is pretty advanced work. If one is ready for
>> that, it isn't unreasonable to expect one to peruse those files.  It's
>> a bit beyond the scope of D to provide a tutorial on how to write a
>> replacement GC, though you're welcome to do it and contribute it.
>
> I was just referring to how to switch between different GCs at
> compile-time. I'm sure somebody documented this somewhere, the point was
> that there isn't a central place where someone unfamiliar with the
> system can go to find the answers.
>
>
> T
>

There's a gc stub inside of the druntime get repo. You can literally include that and link it into your project and it will replace the GC as long as you statically link the rest of the druntime (I'm not sure what it does if you dynamically link it).
February 05, 2012
On 2/5/2012 9:13 AM, Zachary Lund wrote:
> On 02/05/2012 09:27 AM, Don wrote:
>> Could you please explain what you mean about CTFE? I'm not aware of any
>> problems with the documentation. (I gave the docs a complete rewrite a
>> couple of releases ago).
>
> I didn't see this documentation (under the Functions section none the less). I
> revoke my statement.

Perhaps CTFE should have its own page.
February 05, 2012
On Sun, Feb 05, 2012 at 10:44:37AM -0800, Walter Bright wrote: [...]
> Perhaps CTFE should have its own page.

That's an excellent idea. A centralized place where we can put all CTFE-related stuff, current limitations, CTFE-specific quirks, etc..


T

-- 
Error: Keyboard not attached. Press F1 to continue. -- Yoon Ha Lee, CONLANG
1 2 3 4
Next ›   Last »