On 24/05/12 02:26, Alex Rønne Petersen wrote:
On 23-05-2012 19:16, deadalnix wrote:
Le 23/05/2012 17:29, Don Clugston a écrit :
There's a huge difference between a global collection *may* be
performed from a pure function vs it *must* be possible to force a
global collection from a pure
On Thu, 24 May 2012 04:58:56 -0400, Don Clugston d...@nospam.com wrote:
On 24/05/12 02:26, Alex Rønne Petersen wrote:
On 23-05-2012 19:16, deadalnix wrote:
Le 23/05/2012 17:29, Don Clugston a écrit :
There's a huge difference between a global collection *may* be
performed from a pure
On Thu, May 24, 2012 at 08:56:25AM -0400, Steven Schveighoffer wrote:
[...]
The more I think about it, the more I believe that what gc_collect
does (i.e. run a full collect, or run a pure-function specific
collect) is an implementation detail.
[...]
I agree.
Purity only exists at a certain
On 23/05/12 07:05, Mehrdad wrote:
We should make 'pure' mean strongly pure.
For weakly pure, we could introduce the 'doped' keyword :-D
No, the keyword should be more like @noglobal
I wish people would stop using this weak purity / strong purity
terminology, it's very unhelpful. (And it's
On Wed, 23 May 2012 06:00:11 -0400, Don Clugston d...@nospam.com wrote:
On 23/05/12 07:05, Mehrdad wrote:
We should make 'pure' mean strongly pure.
For weakly pure, we could introduce the 'doped' keyword :-D
No, the keyword should be more like @noglobal
Well, it's actually
On Tue, 22 May 2012 23:31:59 -0400, Alex Rønne Petersen a...@lycus.org
wrote:
On 23-05-2012 05:22, Steven Schveighoffer wrote:
This solution looks crappy to me:
void gc_collect(void *unused = null);
BTW, any compiler with alias analysis and LTO might even decide to
remove the call even
On 05/23/12 05:22, Steven Schveighoffer wrote:
it has no parameters and no return, marking it as pure makes it strong pure,
and an optimizing compiler can effectively remove the call completely!
Arguably a pure function not returning a value doesn't make sense... D's
definition
of pure makes
On 05/23/12 13:45, Steven Schveighoffer wrote:
On Tue, 22 May 2012 23:31:59 -0400, Alex Rønne Petersen a...@lycus.org
wrote:
On 23-05-2012 05:22, Steven Schveighoffer wrote:
This solution looks crappy to me:
void gc_collect(void *unused = null);
BTW, any compiler with alias analysis
Le 23/05/2012 05:22, Steven Schveighoffer a écrit :
I have come across a dilemma.
Alex Rønne Petersen has a pull request changing some things in the GC to
pure. I think gc_collect() should be weak-pure, because it could
technically run on any memory allocation (which is already allowed in
pure
On 23-05-2012 13:48, Artur Skawina wrote:
On 05/23/12 05:22, Steven Schveighoffer wrote:
it has no parameters and no return, marking it as pure makes it strong pure,
and an optimizing compiler can effectively remove the call completely!
Arguably a pure function not returning a value doesn't
On 23-05-2012 14:21, deadalnix wrote:
Le 23/05/2012 05:22, Steven Schveighoffer a écrit :
I have come across a dilemma.
Alex Rønne Petersen has a pull request changing some things in the GC to
pure. I think gc_collect() should be weak-pure, because it could
technically run on any memory
On Wed, 23 May 2012 08:21:42 -0400, deadalnix deadal...@gmail.com wrote:
Le 23/05/2012 05:22, Steven Schveighoffer a écrit :
I have come across a dilemma.
Alex Rønne Petersen has a pull request changing some things in the GC to
pure. I think gc_collect() should be weak-pure, because it could
On 23/05/12 05:22, Steven Schveighoffer wrote:
I have come across a dilemma.
Alex Rønne Petersen has a pull request changing some things in the GC to
pure. I think gc_collect() should be weak-pure, because it could
technically run on any memory allocation (which is already allowed in
pure
Don Clugston:
The real question being asked is, do we need something for
logical purity?
You mean something like @trusted_pure?
Note that we need the same thing for caching.
Regarding caching, memoization, weak references, and related
things, I prefer a more principled approach, like
On 23-05-2012 15:46, deadalnix wrote:
Le 23/05/2012 14:32, Alex Rønne Petersen a écrit :
On 23-05-2012 14:21, deadalnix wrote:
Le 23/05/2012 05:22, Steven Schveighoffer a écrit :
I have come across a dilemma.
Alex Rønne Petersen has a pull request changing some things in the
GC to
pure. I
Le 23/05/2012 14:32, Alex Rønne Petersen a écrit :
On 23-05-2012 14:21, deadalnix wrote:
Le 23/05/2012 05:22, Steven Schveighoffer a écrit :
I have come across a dilemma.
Alex Rønne Petersen has a pull request changing some things in the GC to
pure. I think gc_collect() should be weak-pure,
Le 23/05/2012 14:35, Steven Schveighoffer a écrit :
On Wed, 23 May 2012 08:21:42 -0400, deadalnix deadal...@gmail.com wrote:
Le 23/05/2012 05:22, Steven Schveighoffer a écrit :
I have come across a dilemma.
Alex Rønne Petersen has a pull request changing some things in the GC to
pure. I
On Wed, 23 May 2012 09:17:43 -0400, Don Clugston d...@nospam.com wrote:
On 23/05/12 05:22, Steven Schveighoffer wrote:
I have come across a dilemma.
Alex Rønne Petersen has a pull request changing some things in the GC to
pure. I think gc_collect() should be weak-pure, because it could
Le 23/05/2012 15:47, Alex Rønne Petersen a écrit :
On 23-05-2012 15:46, deadalnix wrote:
Le 23/05/2012 14:32, Alex Rønne Petersen a écrit :
On 23-05-2012 14:21, deadalnix wrote:
Le 23/05/2012 05:22, Steven Schveighoffer a écrit :
I have come across a dilemma.
Alex Rønne Petersen has a pull
Le 23/05/2012 15:52, Steven Schveighoffer a écrit :
What if memory is tight, and the only way to get memory for this new
allocation is to collect from the main heap? This seems an odd
limitation, since strong-pure functions would not be affected by
collecting in the main heap *at all*.
-Steve
On Wed, 23 May 2012 09:52:31 -0400, deadalnix deadal...@gmail.com wrote:
Le 23/05/2012 14:35, Steven Schveighoffer a écrit :
Yes. Memory allocation and deallocation from a global heap is by
definition an impure operation (it affects global state). However, we
must make exceptions because
On 23-05-2012 15:17, Don Clugston wrote:
On 23/05/12 05:22, Steven Schveighoffer wrote:
I have come across a dilemma.
Alex Rønne Petersen has a pull request changing some things in the GC to
pure. I think gc_collect() should be weak-pure, because it could
technically run on any memory
Le 23/05/2012 15:57, Steven Schveighoffer a écrit :
On Wed, 23 May 2012 09:52:31 -0400, deadalnix deadal...@gmail.com wrote:
Le 23/05/2012 14:35, Steven Schveighoffer a écrit :
Yes. Memory allocation and deallocation from a global heap is by
definition an impure operation (it affects global
On 23-05-2012 15:55, deadalnix wrote:
Le 23/05/2012 15:47, Alex Rønne Petersen a écrit :
On 23-05-2012 15:46, deadalnix wrote:
Le 23/05/2012 14:32, Alex Rønne Petersen a écrit :
On 23-05-2012 14:21, deadalnix wrote:
Le 23/05/2012 05:22, Steven Schveighoffer a écrit :
I have come across a
On Wed, 23 May 2012 09:56:58 -0400, deadalnix deadal...@gmail.com wrote:
Le 23/05/2012 15:52, Steven Schveighoffer a écrit :
What if memory is tight, and the only way to get memory for this new
allocation is to collect from the main heap? This seems an odd
limitation, since strong-pure
On 23-05-2012 16:03, deadalnix wrote:
Le 23/05/2012 15:57, Steven Schveighoffer a écrit :
On Wed, 23 May 2012 09:52:31 -0400, deadalnix deadal...@gmail.com
wrote:
Le 23/05/2012 14:35, Steven Schveighoffer a écrit :
Yes. Memory allocation and deallocation from a global heap is by
definition
On Wed, 23 May 2012 10:03:01 -0400, deadalnix deadal...@gmail.com wrote:
Le 23/05/2012 15:57, Steven Schveighoffer a écrit :
On Wed, 23 May 2012 09:52:31 -0400, deadalnix deadal...@gmail.com
wrote:
Le 23/05/2012 14:35, Steven Schveighoffer a écrit :
Yes. Memory allocation and deallocation
Le 23/05/2012 16:03, deadalnix a écrit :
Le 23/05/2012 15:57, Steven Schveighoffer a écrit :
On Wed, 23 May 2012 09:52:31 -0400, deadalnix deadal...@gmail.com
wrote:
Le 23/05/2012 14:35, Steven Schveighoffer a écrit :
Yes. Memory allocation and deallocation from a global heap is by
On 23-05-2012 16:42, deadalnix wrote:
Le 23/05/2012 16:03, deadalnix a écrit :
Le 23/05/2012 15:57, Steven Schveighoffer a écrit :
On Wed, 23 May 2012 09:52:31 -0400, deadalnix deadal...@gmail.com
wrote:
Le 23/05/2012 14:35, Steven Schveighoffer a écrit :
Yes. Memory allocation and
On 23/05/12 15:56, Alex Rønne Petersen wrote:
On 23-05-2012 15:17, Don Clugston wrote:
On 23/05/12 05:22, Steven Schveighoffer wrote:
I have come across a dilemma.
Alex Rønne Petersen has a pull request changing some things in the GC to
pure. I think gc_collect() should be weak-pure, because
On 23-05-2012 17:29, Don Clugston wrote:
On 23/05/12 15:56, Alex Rønne Petersen wrote:
On 23-05-2012 15:17, Don Clugston wrote:
On 23/05/12 05:22, Steven Schveighoffer wrote:
I have come across a dilemma.
Alex Rønne Petersen has a pull request changing some things in the
GC to
pure. I think
On Wed, 23 May 2012 11:41:00 -0400, Alex Rønne Petersen a...@lycus.org
wrote:
On 23-05-2012 17:29, Don Clugston wrote:
Not so. It's impossible for anything outside of a strongly pure function
to hold a pointer to memory allocated by the pure function.
Not sure I follow:
immutable(int)*
On 23-05-2012 17:56, Steven Schveighoffer wrote:
On Wed, 23 May 2012 11:41:00 -0400, Alex Rønne Petersen
a...@lycus..org wrote:
On 23-05-2012 17:29, Don Clugston wrote:
Not so. It's impossible for anything outside of a strongly pure function
to hold a pointer to memory allocated by the pure
On Wed, 23 May 2012 12:22:39 -0400, Alex Rønne Petersen a...@lycus.org
wrote:
On 23-05-2012 17:56, Steven Schveighoffer wrote:
On Wed, 23 May 2012 11:41:00 -0400, Alex Rønne Petersen
a...@lycus..org wrote:
On 23-05-2012 17:29, Don Clugston wrote:
Not so. It's impossible for anything
Le 23/05/2012 17:29, Don Clugston a écrit :
There's a huge difference between a global collection *may* be
performed from a pure function vs it *must* be possible to force a
global collection from a pure function.
Thank you !
Le 23/05/2012 18:22, Alex Rønne Petersen a écrit :
On 23-05-2012 17:56, Steven Schveighoffer wrote:
On Wed, 23 May 2012 11:41:00 -0400, Alex Rønne Petersen
a...@lycus..org wrote:
On 23-05-2012 17:29, Don Clugston wrote:
Not so. It's impossible for anything outside of a strongly pure
On 23-05-2012 19:19, deadalnix wrote:
Le 23/05/2012 18:22, Alex Rønne Petersen a écrit :
On 23-05-2012 17:56, Steven Schveighoffer wrote:
On Wed, 23 May 2012 11:41:00 -0400, Alex Rønne Petersen
a...@lycus..org wrote:
On 23-05-2012 17:29, Don Clugston wrote:
Not so. It's impossible for
On 23-05-2012 19:16, deadalnix wrote:
Le 23/05/2012 17:29, Don Clugston a écrit :
There's a huge difference between a global collection *may* be
performed from a pure function vs it *must* be possible to force a
global collection from a pure function.
Thank you !
I personally disagree that
I have come across a dilemma.
Alex Rønne Petersen has a pull request changing some things in the GC to
pure. I think gc_collect() should be weak-pure, because it could
technically run on any memory allocation (which is already allowed in pure
functions), and it runs in a context that
On 23-05-2012 05:22, Steven Schveighoffer wrote:
I have come across a dilemma.
Alex Rønne Petersen has a pull request changing some things in the GC to
pure. I think gc_collect() should be weak-pure, because it could
technically run on any memory allocation (which is already allowed in
pure
We should make 'pure' mean strongly pure.
For weakly pure, we could introduce the 'doped' keyword :-D
41 matches
Mail list logo