Re: [GSoC] Precise GC

2016-12-20 Thread qznc via Digitalmars-d-announce

On Sunday, 23 October 2016 at 05:34:08 UTC, Jeremy DeHaan wrote:

On Monday, 17 October 2016 at 02:59:15 UTC, Dsby wrote:

On Friday, 14 October 2016 at 03:26:31 UTC, FrankLike wrote:
On Friday, 2 September 2016 at 03:25:33 UTC, Jeremy DeHaan 
wrote:

Hi everyone,

I know I'm super late to the party for this, and sorry for 
that. While my work on the precise GC didn't go as planned, 
it is closer than it was to be getting merged.


[...]


On Friday, 2 September 2016 at 03:25:33 UTC, Jeremy DeHaan 
wrote:

Hi,how about the precise GC, now?


I want to known too.


I was asked the same question on github, but I'll answer it 
here too with a couple more details.


I've done a little work, but not enough to getit finished. I 
started school a couple of weeks ago and I'm still trying to 
get my schedule figured out, but I'm hoping to start putting 
some regular effort into it starting next week.


Did anything happen?


Re: [GSoC] Precise GC

2016-10-22 Thread Jeremy DeHaan via Digitalmars-d-announce

On Monday, 17 October 2016 at 02:59:15 UTC, Dsby wrote:

On Friday, 14 October 2016 at 03:26:31 UTC, FrankLike wrote:
On Friday, 2 September 2016 at 03:25:33 UTC, Jeremy DeHaan 
wrote:

Hi everyone,

I know I'm super late to the party for this, and sorry for 
that. While my work on the precise GC didn't go as planned, 
it is closer than it was to be getting merged.


[...]


On Friday, 2 September 2016 at 03:25:33 UTC, Jeremy DeHaan 
wrote:

Hi,how about the precise GC, now?


I want to known too.


I was asked the same question on github, but I'll answer it here 
too with a couple more details.


I've done a little work, but not enough to getit finished. I 
started school a couple of weeks ago and I'm still trying to get 
my schedule figured out, but I'm hoping to start putting some 
regular effort into it starting next week.


Re: [GSoC] Precise GC

2016-10-16 Thread Dsby via Digitalmars-d-announce

On Friday, 14 October 2016 at 03:26:31 UTC, FrankLike wrote:
On Friday, 2 September 2016 at 03:25:33 UTC, Jeremy DeHaan 
wrote:

Hi everyone,

I know I'm super late to the party for this, and sorry for 
that. While my work on the precise GC didn't go as planned, it 
is closer than it was to be getting merged.


[...]


On Friday, 2 September 2016 at 03:25:33 UTC, Jeremy DeHaan 
wrote:

Hi,how about the precise GC, now?


I want to known too.


Re: [GSoC] Precise GC

2016-10-13 Thread FrankLike via Digitalmars-d-announce

On Friday, 2 September 2016 at 03:25:33 UTC, Jeremy DeHaan wrote:

Hi everyone,

I know I'm super late to the party for this, and sorry for 
that. While my work on the precise GC didn't go as planned, it 
is closer than it was to be getting merged.


[...]


On Friday, 2 September 2016 at 03:25:33 UTC, Jeremy DeHaan wrote:
Hi,how about the precise GC, now?



Re: [GSoC] Precise GC

2016-09-08 Thread Jeremy DeHaan via Digitalmars-d-announce

On Wednesday, 7 September 2016 at 02:15:30 UTC, Dsby wrote:
On Friday, 2 September 2016 at 03:25:33 UTC, Jeremy DeHaan 
wrote:

Hi everyone,

I know I'm super late to the party for this, and sorry for 
that. While my work on the precise GC didn't go as planned, it 
is closer than it was to be getting merged.


[...]


In Mac 32 bit. the test is not pass.


I didn't have a mac to test this on at the time. I currently have 
some things ordered so that I can see what is actually going on 
and fix this.


Re: [GSoC] Precise GC

2016-09-08 Thread David Nadlinger via Digitalmars-d-announce

On Saturday, 3 September 2016 at 12:22:25 UTC, thedeemon wrote:

On Friday, 2 September 2016 at 14:55:26 UTC, jmh530 wrote:
Anyway, with @safe unions, my thinking is that it would mean 
that the garbage collector can be made precise in @safe code 
in a way that it can't in @system code (assuming unions with 
pointers aren't snuck in through @trusted).


GC (and runtime in general) has no idea what code is safe and 
what code is system. GC works with data at run-time. All 
@safe-related stuff is about code (not data!) and happens at 
compile-time. They are completely orthogonal and independent, 
as I understand.


This is correct, but when designing a GC – in particular, a 
precise GC –, having the compiler emit additional helpful 
metadata to binaries is always an option worth considering.


 — David


Re: [GSoC] Precise GC

2016-09-07 Thread thedeemon via Digitalmars-d-announce

On Tuesday, 6 September 2016 at 14:56:15 UTC, jmh530 wrote:

GC (and runtime in general) has no idea what code is safe and 
what code is system. GC works with data at run-time. All 
@safe-related stuff is about code (not data!) and happens at 
compile-time. They are completely orthogonal and independent, 
as I understand.


I don't see why you wouldn't be able to use compile-time 
information like __traits with the runtime.


In my head, I imagine that at compile-time you can figure out 
which unions are in @safe functions, add a UDA to each (so 
you're marking data, not code), and then read that information 
at run-time (like with __traits).


UDAs are also purely compile-time, they don't exist as run-time 
data.


Re: [GSoC] Precise GC

2016-09-06 Thread Dsby via Digitalmars-d-announce

On Friday, 2 September 2016 at 03:25:33 UTC, Jeremy DeHaan wrote:

Hi everyone,

I know I'm super late to the party for this, and sorry for 
that. While my work on the precise GC didn't go as planned, it 
is closer than it was to be getting merged.


[...]


In Mac 32 bit. the test is not pass.


Re: [GSoC] Precise GC

2016-09-06 Thread jmh530 via Digitalmars-d-announce

On Saturday, 3 September 2016 at 12:22:25 UTC, thedeemon wrote:


GC (and runtime in general) has no idea what code is safe and 
what code is system. GC works with data at run-time. All 
@safe-related stuff is about code (not data!) and happens at 
compile-time. They are completely orthogonal and independent, 
as I understand.


I don't see why you wouldn't be able to use compile-time 
information like __traits with the runtime.


In my head, I imagine that at compile-time you can figure out 
which unions are in @safe functions, add a UDA to each (so you're 
marking data, not code), and then read that information at 
run-time (like with __traits).





Re: [GSoC] Precise GC

2016-09-03 Thread thedeemon via Digitalmars-d-announce

On Friday, 2 September 2016 at 14:55:26 UTC, jmh530 wrote:

Anyway, with @safe unions, my thinking is that it would mean 
that the garbage collector can be made precise in @safe code in 
a way that it can't in @system code (assuming unions with 
pointers aren't snuck in through @trusted).


GC (and runtime in general) has no idea what code is safe and 
what code is system. GC works with data at run-time. All 
@safe-related stuff is about code (not data!) and happens at 
compile-time. They are completely orthogonal and independent, as 
I understand.




Re: [GSoC] Precise GC

2016-09-02 Thread jmh530 via Digitalmars-d-announce

On Friday, 2 September 2016 at 08:14:33 UTC, Rory McGuire wrote:


Can we rather just make a special tagged union that is 
scanned... rather avoid trying to make something that should be 
minimal more and more complex? The compiler already treats some 
parts of phobos as "special" as far as I know.


I had asked about unions in @safe code in other threads, but I 
don't recall anyone responding.


@safe functions cannot access unions with pointers or references 
overlapping with other types. In effect, there is already a 
special tagged union that can be scanned. I would think that the 
garbage collector already identifies these types of unions and 
doesn't just treat every union with the same conservative 
approach, but I have really no idea how it works and don't recall 
hearing back about my questions.


Anyway, with @safe unions, my thinking is that it would mean that 
the garbage collector can be made precise in @safe code in a way 
that it can't in @system code (assuming unions with pointers 
aren't snuck in through @trusted).


Re: [GSoC] Precise GC

2016-09-02 Thread Guillaume Piolat via Digitalmars-d-announce

On Friday, 2 September 2016 at 03:25:33 UTC, Jeremy DeHaan wrote:
Through the work I did and the research of a couple of GC 
topics, I discovered that I really enjoyed working on the 
garbage collector and I plan on continuing that. I was recently 
accepted to the University of Washington's computer science 
program and I am currently working on getting some independent 
study classes set up for future GC work. Once I have some 
better programming chops I'm hoping to help take D's GC to new 
heights.




Hey thanks a lot for working on this!


Re: [GSoC] Precise GC

2016-09-02 Thread Rory McGuire via Digitalmars-d-announce
On Fri, Sep 2, 2016 at 9:46 AM, Jeremy DeHaan via Digitalmars-d-announce <
digitalmars-d-announce@puremagic.com> wrote:

> [snip]. Precisely scanning unions is tricky since they could mix pointer
> and non pointer types. [snip]
>

Can we rather just make a special tagged union that is scanned... rather
avoid trying to make something that should be minimal more and more
complex? The compiler already treats some parts of phobos as "special" as
far as I know.


Re: [GSoC] Precise GC

2016-09-02 Thread Jeremy DeHaan via Digitalmars-d-announce

On Friday, 2 September 2016 at 06:54:57 UTC, Ali Çehreli wrote:

On 09/01/2016 08:25 PM, Jeremy DeHaan wrote:

> I will still continue working on it in the hopes it'll get in.

Great news! :)

> I
> discovered that I really enjoyed working on the garbage
collector

If that's not motivation enough...

> I was recently accepted to the University of Washington's
> computer science program

... now we have your address. We will hunt you if you don't 
complete the GC work. :p


Ali


There's more than one UW campus! Take that!


Re: [GSoC] Precise GC

2016-09-02 Thread Jeremy DeHaan via Digitalmars-d-announce

On Friday, 2 September 2016 at 05:19:57 UTC, thedeemon wrote:
On Friday, 2 September 2016 at 03:25:33 UTC, Jeremy DeHaan 
wrote:

Hi everyone,

I know I'm super late to the party for this, and sorry for 
that. While my work on the precise GC didn't go as planned, it 
is closer than it was to be getting merged.


My open PR for the actual inclusion of the precise GC is here:
https://github.com/dlang/druntime/pull/1603


So what's its current state, how is it different from the 
version Rainer had years ago? Is stack scan precise? Are 
closures scanned precisely? What about unions?


The version in the pull request is not different from the one 
Rainer presented at all. It's actually the same one, just updated 
with what has been changed in druntime recently and my attempts 
at making the marking phase faster. It isn't any faster, but I 
didn't realize this due to benchmarking differences on AMD and 
Intel platforms. I should correct this in the next couple of days 
and performance can be assessed again.


Scanning the stack would require some support from the compiler. 
Precisely scanning unions is tricky since they could mix pointer 
and non pointer types. I'm not sure about closures. If I've done 
anything with closures I'm not aware of it. I have yet to 
actually work with the compiler, but in the future I will have to 
I suppose.


We'd be happy to see some overview of this version, what it 
does and how it succeeds (or fails).


It is essentially in a similar state that it was when Rainer 
presented it at DConf2013. I spent a lot of time doing research 
on techniques to improve its performance and I did start working 
on a sort of proof of concept for some of these ideas, but 
implementing it in a cohesive way would have required a lot more 
than was possible in the GSoC timeframe and it just didn't 
happen. It's pretty late for me here, but I will definitely 
explain more about some of these things later. It's essentially 
stuff that I do on my own time.


Re: [GSoC] Precise GC

2016-09-02 Thread Ali Çehreli via Digitalmars-d-announce

On 09/01/2016 08:25 PM, Jeremy DeHaan wrote:

> I will still continue working on it in the hopes it'll get in.

Great news! :)

> I
> discovered that I really enjoyed working on the garbage collector

If that's not motivation enough...

> I was recently accepted to the University of Washington's
> computer science program

... now we have your address. We will hunt you if you don't complete the 
GC work. :p


Ali



Re: [GSoC] Precise GC

2016-09-01 Thread thedeemon via Digitalmars-d-announce

On Friday, 2 September 2016 at 03:25:33 UTC, Jeremy DeHaan wrote:

Hi everyone,

I know I'm super late to the party for this, and sorry for 
that. While my work on the precise GC didn't go as planned, it 
is closer than it was to be getting merged.


My open PR for the actual inclusion of the precise GC is here:
https://github.com/dlang/druntime/pull/1603


So what's its current state, how is it different from the version 
Rainer had years ago? Is stack scan precise? Are closures scanned 
precisely? What about unions? We'd be happy to see some overview 
of this version, what it does and how it succeeds (or fails).


Re: [GSoC] Precise GC

2016-09-01 Thread rikki cattermole via Digitalmars-d-announce

On 02/09/2016 3:25 PM, Jeremy DeHaan wrote:

Hi everyone,

I know I'm super late to the party for this, and sorry for that. While
my work on the precise GC didn't go as planned, it is closer than it was
to be getting merged.

My open PR for the actual inclusion of the precise GC is here:
https://github.com/dlang/druntime/pull/1603

Even though GSoC is over and it isn't quite ready to be merged, I will
still continue working on it in the hopes it'll get in. I have about a
month until school starts up again, and I'm going to try to get it
merged before that point.

Through the work I did and the research of a couple of GC topics, I
discovered that I really enjoyed working on the garbage collector and I
plan on continuing that. I was recently accepted to the University of
Washington's computer science program and I am currently working on
getting some independent study classes set up for future GC work. Once I
have some better programming chops I'm hoping to help take D's GC to new
heights.

Thanks to Martin Nowak and Adam Wilson for being my mentors and for
keeping me going, to Rainer Schuetze for doing a significant portion of
code review, and to the D community for giving me the opportunity to do
this work.

Jeremy


Awesome, please do keep going with it! It would be great over the next 
few years to get some research papers out of this.


Re: [GSoC] Precise GC

2016-09-01 Thread Dsby via Digitalmars-d-announce

On Friday, 2 September 2016 at 03:25:33 UTC, Jeremy DeHaan wrote:

Hi everyone,

I know I'm super late to the party for this, and sorry for 
that. While my work on the precise GC didn't go as planned, it 
is closer than it was to be getting merged.


[...]


wait for merge


[GSoC] Precise GC

2016-09-01 Thread Jeremy DeHaan via Digitalmars-d-announce

Hi everyone,

I know I'm super late to the party for this, and sorry for that. 
While my work on the precise GC didn't go as planned, it is 
closer than it was to be getting merged.


My open PR for the actual inclusion of the precise GC is here:
https://github.com/dlang/druntime/pull/1603

Even though GSoC is over and it isn't quite ready to be merged, I 
will still continue working on it in the hopes it'll get in. I 
have about a month until school starts up again, and I'm going to 
try to get it merged before that point.


Through the work I did and the research of a couple of GC topics, 
I discovered that I really enjoyed working on the garbage 
collector and I plan on continuing that. I was recently accepted 
to the University of Washington's computer science program and I 
am currently working on getting some independent study classes 
set up for future GC work. Once I have some better programming 
chops I'm hoping to help take D's GC to new heights.


Thanks to Martin Nowak and Adam Wilson for being my mentors and 
for keeping me going, to Rainer Schuetze for doing a significant 
portion of code review, and to the D community for giving me the 
opportunity to do this work.


Jeremy