On Monday, 3 August 2015 at 08:54:32 UTC, Kagamin wrote:
On Saturday, 1 August 2015 at 11:47:29 UTC, Joseph Rushton
Wakeling wrote:
Yea, but that's not what I'm trying to achieve. I know how I
can pass something to `take` so as to e.g. obtain reference
semantics or whatever; what I'm trying
On Saturday, 1 August 2015 at 11:47:29 UTC, Joseph Rushton
Wakeling wrote:
Yea, but that's not what I'm trying to achieve. I know how I
can pass something to `take` so as to e.g. obtain reference
semantics or whatever; what I'm trying to achieve is a range
that _doesn't rely on the user
On Monday, 3 August 2015 at 09:01:51 UTC, Dicebot wrote:
It is now verified as safe by `return ref`.
Yes, until you pointed this out to me I'd been convinced that
classes were the way forward for RNGs. I think that `return ref`
is going to be a _very_ powerful tool for facilitating
On 02/08/15 03:38, Dicebot via Digitalmars-d-learn wrote:
On Saturday, 1 August 2015 at 17:50:28 UTC, John Colvin wrote:
I'm not sure how good an idea it is to totally enforce a range to be
non-copyable, even if you could deal with the function call chain problem.
Even in totally save-aware
On 31/07/15 19:21, Ali Çehreli via Digitalmars-d-learn wrote:
On 07/26/2015 04:29 AM, Joseph Rushton Wakeling via Digitalmars-d-learn wrote:
is this design idea even feasible in principle, or just a bad
idea from the get-go?
As I understand it, it is against one of fundamental D
On Saturday, 1 August 2015 at 12:10:43 UTC, Joseph Rushton
Wakeling wrote:
On 31/07/15 19:21, Ali Çehreli via Digitalmars-d-learn wrote:
On 07/26/2015 04:29 AM, Joseph Rushton Wakeling via
Digitalmars-d-learn wrote:
is this design idea even feasible in principle, or just a
bad
idea from
On 31/07/15 13:40, Kagamin via Digitalmars-d-learn wrote:
On Sunday, 26 July 2015 at 12:16:30 UTC, Joseph Rushton Wakeling wrote:
Example:
Unique!Random rng = new Random(unpredictableSeed);
rng.take(10).writeln;
My aim by contrast is to _allow_ that kind of use, but render the original
On Saturday, 1 August 2015 at 17:50:28 UTC, John Colvin wrote:
I'm not sure how good an idea it is to totally enforce a range
to be non-copyable, even if you could deal with the function
call chain problem. Even in totally save-aware code, there can
still be valid assignment of a range type.
On 07/26/2015 04:29 AM, Joseph Rushton Wakeling via Digitalmars-d-learn
wrote:
is this design idea even feasible in principle, or just a bad
idea from the get-go?
As I understand it, it is against one of fundamental D principles:
structs are value types where any copy can be used in place
On 07/31/2015 11:01 AM, Dicebot wrote: On Friday, 31 July 2015 at
17:21:40 UTC, Ali Çehreli wrote:
On 07/26/2015 04:29 AM, Joseph Rushton Wakeling via
Digitalmars-d-learn wrote:
is this design idea even feasible in principle, or just a bad
idea from the get-go?
As I understand it, it is
On Fri, Jul 31, 2015 at 06:01:44PM +, Dicebot via Digitalmars-d-learn wrote:
On Friday, 31 July 2015 at 17:21:40 UTC, Ali Çehreli wrote:
On 07/26/2015 04:29 AM, Joseph Rushton Wakeling via Digitalmars-d-learn
wrote:
is this design idea even feasible in principle, or just a bad
idea
On Friday, 31 July 2015 at 18:13:04 UTC, Ali Çehreli wrote:
To make sure, I didn't mean that I know of structs in Phobos
that behave that way. Although, it would be interesting to
identify them. :)
Ali
Things like Unique, Scoped, RefCounted - pretty much everything
which wraps reference
On Friday, 31 July 2015 at 18:23:39 UTC, H. S. Teoh wrote:
It seems that what the language (originally) defines structs to
be, is not entirely consistent with how it has come to be used
(which also entailed later extensions to the struct
definition), and this has been a source of problems.
On 7/31/15 1:21 PM, Ali Çehreli wrote:
Disallowing automatic copying and providing a function comes to mind.
Isn't that what std.algorithm.move is for?
-Steve
On Friday, 31 July 2015 at 17:21:40 UTC, Ali Çehreli wrote:
On 07/26/2015 04:29 AM, Joseph Rushton Wakeling via
Digitalmars-d-learn wrote:
is this design idea even feasible in principle, or just a bad
idea from the get-go?
As I understand it, it is against one of fundamental D
principles:
On 07/31/2015 12:18 PM, Steven Schveighoffer wrote:
On 7/31/15 1:21 PM, Ali Çehreli wrote:
Disallowing automatic copying and providing a function comes to mind.
Isn't that what std.algorithm.move is for?
-Steve
Sounds great and I like it! :)
Ali
On Sunday, 26 July 2015 at 12:16:30 UTC, Joseph Rushton Wakeling
wrote:
Example:
Unique!Random rng = new Random(unpredictableSeed);
rng.take(10).writeln;
My aim by contrast is to _allow_ that kind of use, but render
the original handle empty when it's done.
`take` stores the range,
On Wednesday, 29 July 2015 at 19:10:36 UTC, Adam D. Ruppe wrote:
On Sunday, 26 July 2015 at 12:16:30 UTC, Joseph Rushton
Wakeling wrote:
My aim by contrast is to _allow_ that kind of use, but render
the original handle empty when it's done.
I don't think D offers any way to do that. With the
On Wednesday, 29 July 2015 at 19:10:36 UTC, Adam D. Ruppe wrote:
On Sunday, 26 July 2015 at 12:16:30 UTC, Joseph Rushton
Wakeling wrote:
My aim by contrast is to _allow_ that kind of use, but render
the original handle empty when it's done.
I don't think D offers any way to do that. With the
On Sunday, 26 July 2015 at 12:16:30 UTC, Joseph Rushton Wakeling
wrote:
My aim by contrast is to _allow_ that kind of use, but render
the original handle empty when it's done.
I don't think D offers any way to do that. With the disabled
postblit, you can force people into a method you write
On Sunday, 26 July 2015 at 11:30:16 UTC, Joseph Rushton Wakeling
wrote:
Hello all,
A design question that came up during the hackathon held during
the last Berlin D Meetup.
[...]
Ping on the above -- nobody has any insight...?
On Sunday, 26 July 2015 at 11:30:16 UTC, Joseph Rushton Wakeling
wrote:
Hello all,
A design question that came up during the hackathon held during
the last Berlin D Meetup.
[...]
Sounds like unique_ptr (so UniqueRange might be a nice name).
Maybe you can get some ideas from that.
Hello all,
A design question that came up during the hackathon held during the last Berlin
D Meetup.
I was trying to come up with a range that can be copied by value, but when this
is done, destroys the original handle. The idea would be behaviour something
like this:
auto
On 26/07/15 13:45, Martijn Pot via Digitalmars-d-learn wrote:
Sounds like unique_ptr (so UniqueRange might be a nice name). Maybe you can get
some ideas from that.
There is already a Unique in std.typecons. However, I'm not sure that it's
doing what I require.
Example:
Unique!Random
24 matches
Mail list logo