On Saturday, 10 October 2015 at 22:06:31 UTC, Andrei Alexandrescu
wrote:
So there was knowledge of said long history of ranges in C++.
Far as I can tell >"Iterators Must Go" was immediately and
universally recognized as a turning point in >how people
approached getting work done using ranges.
On Monday, 12 October 2015 at 07:08:19 UTC, Ola Fosheim Grøstad
wrote:
One of the most important and convenient iterators (which C++
fails to deliver) are what GoF calls "roboust iterators":
iterators that allow deletions. To get there safely and
conveniently iterators have to be made a
On Monday, 12 October 2015 at 12:29:28 UTC, Kagamin wrote:
http://forum.dlang.org/post/hmtj0e$1qmg$1...@digitalmars.com
Meh, library solutions are no good. Insertions and deletions mess
up many things that effects performance, including vectorisation.
On Sat, Oct 10, 2015 at 06:06:59PM +, Eric Niebler via Digitalmars-d wrote:
> On Saturday, 10 October 2015 at 06:15:10 UTC, Andrei Alexandrescu wrote:
[...]
> >Anyhow, it's best for us all to focus on doing good work instead of
> >pettily fighting for irrelevant credit.
>
> I only jumped in
On Sat, Oct 10, 2015 at 09:52:22AM +0300, Andrei Alexandrescu via Digitalmars-d
wrote:
> On 10/10/15 12:58 AM, Eric Niebler wrote:
> >Trying to express algorithms without any clear abstraction of
> >"position within range" (independent of ranges) is hard and awkward,
> >and occasionally causes
On Saturday, 10 October 2015 at 06:15:10 UTC, Andrei Alexandrescu
wrote:
On 10/10/15 12:58 AM, Eric Niebler wrote:
To be honest, this whole conversation is kind of funny to me.
It
reminds me of the Bugs Bunny cartoon where Marvin the Martian
plants
his flag on Earth and says, "I claim this
On 10/10/15 9:06 PM, Eric Niebler wrote:
On Saturday, 10 October 2015 at 06:15:10 UTC, Andrei Alexandrescu wrote:
On 10/10/15 12:58 AM, Eric Niebler wrote:
To be honest, this whole conversation is kind of funny to me. It
reminds me of the Bugs Bunny cartoon where Marvin the Martian plants
his
On Saturday, 10 October 2015 at 18:07:02 UTC, Eric Niebler wrote:
If I implied that I believe that D ranges were based on
Boost.Range, then I apologize. I don't believe that. I suspect
(but don't know) that ranges in D were independently invented
without knowledge of the long history of them
On 10/10/15 12:58 AM, Eric Niebler wrote:
To be honest, this whole conversation is kind of funny to me. It
reminds me of the Bugs Bunny cartoon where Marvin the Martian plants
his flag on Earth and says, "I claim this planet in the name of
[Digital] Mars!" We Earthlings respectfully disagree.
On 10/10/15 12:58 AM, Eric Niebler wrote:
Trying to express algorithms without any clear abstraction of "position
within range" (independent of ranges) is hard and awkward, and
occasionally causes algorithms to be less efficient.
I agree that ranges are a weaker basis than iterators. But it's
On Thursday, 8 October 2015 at 22:57:01 UTC, Timon Gehr wrote:
Isn't this the same as my suggestion?
http://forum.dlang.org/post/mv3q34$bbg$1...@digitalmars.com
If not, what is the difference?
Your range is undoable. The difference I see is that you use full
(should be frontFull) and
Also imagine you want to write an algorithm that iterates
backwards, you must choose which set of primitives to use:
back+empty+popBack or front+frontUndoEmpty+undoPopFront, and an
undoable bidirectional range will support both.
On Wednesday, 7 October 2015 at 14:59:28 UTC, Trass3r wrote:
On Tuesday, 6 October 2015 at 22:39:01 UTC, Ulrich Küttler
wrote:
Yes, this is an explanation. Thanks. So the argument being C++
customs. Now that you mention it, this seems to be the
argument in Eric's D4128 paper, too.
I was
Here's the original discussion with Eric's elaborate answer:
http://ericniebler.com/2014/02/21/introducing-iterables/#comment-403
Because I want to leverage the vast amount of iterator-based
code already written, and because in my experience, I don’t
find that ranges as primitives solve all
On Thursday, 8 October 2015 at 12:35:08 UTC, Kagamin wrote:
Hmm... conceptually a bidirectional range should be able to
iterate back and forth:
void is_word_boundary(Bidi r)
{
bool is_word_prev = r.re.empty ? false : isword(r.re.back);
bool is_word_this = r.empty ? false :
The backward range can have an input range interface, like retro:
void is_word_boundary(Bidi r)
{
bool is_word_prev = r.prev.empty ? false :
isword(r.prev.front);
bool is_word_this = r.empty ? false : isword(r.front);
return is_word_prev != is_word_this;
}
On Wednesday, 7 October 2015 at 14:59:28 UTC, Trass3r wrote:
On Tuesday, 6 October 2015 at 22:39:01 UTC, Ulrich Küttler
wrote:
Yes, this is an explanation. Thanks. So the argument being C++
customs. Now that you mention it, this seems to be the
argument in Eric's D4128 paper, too.
I was
On Thursday, 8 October 2015 at 14:36:03 UTC, Kagamin wrote:
On Thursday, 8 October 2015 at 13:10:24 UTC, John Colvin wrote:
What you're effectively describing is a trio of iterators
wrapped to give an interface of two linked ranges. popFront
grows the first one and shrinks the second. I'd be
On Thursday, 8 October 2015 at 13:10:24 UTC, John Colvin wrote:
What you're effectively describing is a trio of iterators
wrapped to give an interface of two linked ranges. popFront
grows the first one and shrinks the second. I'd be interested
to see how to construct that, given a generic
On Thu, Oct 08, 2015 at 02:46:05PM +, John Colvin via Digitalmars-d wrote:
> On Thursday, 8 October 2015 at 14:36:03 UTC, Kagamin wrote:
> >On Thursday, 8 October 2015 at 13:10:24 UTC, John Colvin wrote:
> >>What you're effectively describing is a trio of iterators wrapped to
> >>give an
On 10/08/2015 10:08 PM, Kagamin wrote:
OK, I thought a little more and... Name: divisible range. It occurred to
me that we only need to reverse logic of bidirectional range: while
bidirectional range is a pair of ranges that shrink towards each other,
divisible range is divided into two ranges
OK, I thought a little more and... Name: divisible range. It
occurred to me that we only need to reverse logic of
bidirectional range: while bidirectional range is a pair of
ranges that shrink towards each other, divisible range is divided
into two ranges that shrink away from each other. The
On Thursday, 8 October 2015 at 14:46:07 UTC, John Colvin wrote:
Another way is to provide a reverse range of previously popped
items - this can be seen as iterator or not, more like a range
with history rather than an undoable input range, so maybe the
getter should be `history`.
my question
On Tuesday, 6 October 2015 at 22:39:01 UTC, Ulrich Küttler wrote:
Yes, this is an explanation. Thanks. So the argument being C++
customs. Now that you mention it, this seems to be the argument
in Eric's D4128 paper, too.
I was hoping for a somewhat deeper reasoning. Out of curiously,
I am
On Wednesday, 7 October 2015 at 16:33:21 UTC, John Colvin wrote:
On Wednesday, 7 October 2015 at 14:59:28 UTC, Trass3r wrote:
On Tuesday, 6 October 2015 at 22:39:01 UTC, Ulrich Küttler
wrote:
Yes, this is an explanation. Thanks. So the argument being
C++ customs. Now that you mention it, this
On Wednesday, 7 October 2015 at 17:13:45 UTC, Jonathan M Davis
wrote:
As I understand it, there are algorithms that inherently need 3
iterators to do whatever is they do, and the question of how to
deal with them has come up before in the newsgroup. I think
that it's pretty clear that such
On 10/07/2015 07:13 PM, Jonathan M Davis wrote:
...
If we _were_ to look at doing something more than straight ranges, we'd
probably look more at something like Steven's cursors than adding
iterators, though I think that there's a decent chance that that only
really helps with containers (it's
On Wednesday, 7 October 2015 at 14:59:28 UTC, Trass3r wrote:
On Tuesday, 6 October 2015 at 22:39:01 UTC, Ulrich Küttler
wrote:
Yes, this is an explanation. Thanks. So the argument being C++
customs. Now that you mention it, this seems to be the
argument in Eric's D4128 paper, too.
I was
On Tuesday, 6 October 2015 at 06:52:13 UTC, Ulrich Kuettler wrote:
On Tuesday, 6 October 2015 at 02:31:53 UTC, Eric Niebler wrote:
Given that starting point, ranges of different strength are an
"obvious" next step that many people thought up independently.
D took it one way and C++ went
On 10/5/2015 7:31 PM, Eric Niebler wrote:
> The design of the D ranges and algorithms owe quite a lot to C++, and I've
heard
> Andrei say as much.
D ranges owe plenty to C++ iterators and algorithms, no doubt. Boost ranges, I
can't agree.
> Stepanov did the hard work of defining common
On Tuesday, 6 October 2015 at 02:31:53 UTC, Eric Niebler wrote:
On Monday, 5 October 2015 at 21:57:31 UTC, Walter Bright wrote:
Yes, you can build debug iterators that know their limits, or
iterators with back pointers to the range. This is not an
inherent property of Boost ranges, does not
On Tuesday, 6 October 2015 at 02:31:53 UTC, Eric Niebler wrote:
On Monday, 5 October 2015 at 21:57:31 UTC, Walter Bright wrote:
Yes, you can build debug iterators that know their limits, or
iterators with back pointers to the range. This is not an
inherent property of Boost ranges, does not
On Tuesday, 6 October 2015 at 07:09:21 UTC, Jonathan M Davis
wrote:
On Tuesday, 6 October 2015 at 06:52:13 UTC, Ulrich Kuettler
wrote:
On Tuesday, 6 October 2015 at 02:31:53 UTC, Eric Niebler wrote:
Given that starting point, ranges of different strength are
an "obvious" next step that many
On Thursday, 1 October 2015 at 07:37:28 UTC, deadalnix wrote:
Well, yes and no. Sure I'm sure there are precedent for ranges,
be it in C++ or even I'm sure one can find them in other
languages. I'm sure someone in the 70s had something like
ranges already.
Yes, certainly in the 70s, but I
On Saturday, 3 October 2015 at 08:58:26 UTC, Manu wrote:
My strategy has been to backport D ideas into C++ over the past
year
since my last failed attempt to get D into my office, and this
has
been an AGONISING and extremely time consuming process.
I have slices, ranges (as best I can),
On 10/5/2015 9:39 AM, Eric Niebler wrote:
On Friday, 2 October 2015 at 22:57:52 UTC, Walter Bright wrote:
The begin and end are iterators, and don't encapsulate (i.e. constrain) what
can be done with those iterators. For example, begin can return an iterator
that can be used to increment right
On Monday, 5 October 2015 at 21:57:31 UTC, Walter Bright wrote:
Yes, you can build debug iterators that know their limits, or
iterators with back pointers to the range. This is not an
inherent property of Boost ranges, does not appear in the Boost
description of ranges (unless I missed it),
On 10/2/15 6:57 PM, Walter Bright wrote:
On 10/2/2015 10:49 AM, Eric Niebler wrote:
On Thursday, 1 October 2015 at 21:03:16 UTC, Walter Bright wrote:
I don't see evidence that C++ had ranges before D. Boost ranges are
not what
we think of as ranges.
Why not?
Because it returns iterators.
On Friday, 2 October 2015 at 22:57:52 UTC, Walter Bright wrote:
On 10/2/2015 10:49 AM, Eric Niebler wrote:
On Thursday, 1 October 2015 at 21:03:16 UTC, Walter Bright
wrote:
I don't see evidence that C++ had ranges before D. Boost
ranges are not what
we think of as ranges.
Why not?
Because
On 1 October 2015 at 08:47, H. S. Teoh via Digitalmars-d
wrote:
> [...]
> (D has seriously ruined my life; I simply can't bring myself to go back to
> C++ anymore. At least not voluntarily.)
OMG, this!
Seriously, this is more true than I can express in words ;)
My
On Thursday, 1 October 2015 at 21:03:16 UTC, Walter Bright wrote:
I don't see evidence that C++ had ranges before D. Boost ranges
are not what we think of as ranges.
Why not?
On 10/2/2015 10:49 AM, Eric Niebler wrote:
On Thursday, 1 October 2015 at 21:03:16 UTC, Walter Bright wrote:
I don't see evidence that C++ had ranges before D. Boost ranges are not what
we think of as ranges.
Why not?
Because it returns iterators. It should expose functions (or operators)
On Thursday, 1 October 2015 at 05:47:25 UTC, Eric Niebler wrote:
On Thursday, 1 October 2015 at 04:08:00 UTC, bitwise wrote:
I understand, but the C++ committee seems very conservative to
me, so when it's this easy to add for(:) support by giving
ranges begin()/end() functions, it makes me
On Thursday, 1 October 2015 at 05:47:25 UTC, Eric Niebler wrote:
...[snip]...
Hope that clears things up.
It does, thank you.
Eric
P.S. I see lots of people here assuming that C++ is playing
catch-up to D because D has ranges and C++ doesn't yet. That is
ignoring the long history of
On 10/1/2015 2:31 AM, Joakim wrote:
On Thursday, 1 October 2015 at 08:37:37 UTC, Walter Bright wrote:
Sadly, Matthew's work seems to have disappeared from the internets and his web
sites have vanished (rangelib.org).
Update: found it on web.archive.org!
On Thursday, 1 October 2015 at 05:47:25 UTC, Eric Niebler wrote:
On Thursday, 1 October 2015 at 04:08:00 UTC, bitwise wrote:
I understand, but the C++ committee seems very conservative to
me, so when it's this easy to add for(:) support by giving
ranges begin()/end() functions, it makes me
On 10/01/2015 01:37 AM, Walter Bright wrote:
> Update: found it on web.archive.org!
>
>
https://web.archive.org/web/20050427085507/http://rangelib.synesis.com.au/
>
> Anyhow, this is what I could dig up in an hour or so.
Thank you for mining for that.
From the days that I used to frequent
On Thursday, 1 October 2015 at 09:25:37 UTC, Walter Bright wrote:
Ranges because a D core language feature with D 2.021 Nov 25,
2008.
Core language feature meaning it was no longer just a library
construction, it was supported by foreach loops.
As a library feature, it appeared in D 2.008
On 10/1/2015 11:18 AM, Ali Çehreli wrote:
From the days that I used to frequent comp.lang.c++.moderated (before around
2009 or so), I remember an individual who was trying to sell the idea of ranges
to the C++ community. As I remember, nobody took him seriously at that time.
Reading the page
On 09/30/2015 06:06 PM, Joakim wrote:
It is amazing how noisy some of the implementation code with templates
is in C++: I felt like I was looking at some Haskell variant compared to
how clean D would look for the same code.
It's easy to write a clean Haskell version, in case you were trying to
On 9/30/2015 10:47 PM, Eric Niebler wrote:
P.S. I see lots of people here assuming that C++ is playing catch-up to D
because D has ranges and C++ doesn't yet. That is ignoring the long history of
ranges in C++. C++ got ranges in the form of the Boost.Range library by Thorsten
Ottoson sometime in
Ranges because a D core language feature with D 2.021 Nov 25, 2008.
Core language feature meaning it was no longer just a library construction, it
was supported by foreach loops.
As a library feature, it appeared in D 2.008 Nov 27, 2007.
On Thursday, 1 October 2015 at 08:37:37 UTC, Walter Bright wrote:
Sadly, Matthew's work seems to have disappeared from the
internets and his web sites have vanished (rangelib.org).
Update: found it on web.archive.org!
https://web.archive.org/web/20050427085507/http://rangelib.synesis.com.au/
On Wednesday, 30 September 2015 at 16:06:59 UTC, Joakim wrote:
On Wednesday, 30 September 2015 at 01:45:49 UTC, deadalnix
wrote:
https://www.youtube.com/watch?v=mFUXNMfaciE
From
http://wiki.dlang.org/Component_programming_with_ranges
Congrat H. S. Teoh
Thanks for the link, I watched the
On 9/30/15 12:12 PM, wobbles via Digitalmars-d wrote:
On Wednesday, 30 September 2015 at 16:06:59 UTC, Joakim wrote:
On Wednesday, 30 September 2015 at 01:45:49 UTC, deadalnix wrote:
https://www.youtube.com/watch?v=mFUXNMfaciE
From
http://wiki.dlang.org/Component_programming_with_ranges
I haven't watched it yet, but it seems to be similar to this one from
NWCPP I watched recently:
https://www.youtube.com/watch?v=8yV2ONeWXyI
On Wednesday, 30 September 2015 at 01:55:43 UTC, deadalnix wrote:
On Wednesday, 30 September 2015 at 01:45:49 UTC, deadalnix
wrote:
https://www.youtube.com/watch?v=mFUXNMfaciE
From
http://wiki.dlang.org/Component_programming_with_ranges
Congrat H. S. Teoh
Shared on reddit:
On 9/29/15 9:45 PM, deadalnix wrote:
https://www.youtube.com/watch?v=mFUXNMfaciE
From
http://wiki.dlang.org/Component_programming_with_ranges
Congrat H. S. Teoh
Ditto!
Here is the link to the video at the time where D is credited, very nice
compliment:
https://youtu.be/mFUXNMfaciE?t=115
On Wed, Sep 30, 2015 at 10:32:16AM -0400, Andrei Alexandrescu via Digitalmars-d
wrote:
> On 09/30/2015 09:31 AM, Steven Schveighoffer wrote:
> >On 9/29/15 9:45 PM, deadalnix wrote:
> >>https://www.youtube.com/watch?v=mFUXNMfaciE
> >>
> >>From
>
On Wednesday, 30 September 2015 at 01:45:49 UTC, deadalnix wrote:
https://www.youtube.com/watch?v=mFUXNMfaciE
From
http://wiki.dlang.org/Component_programming_with_ranges
Congrat H. S. Teoh
D's ranges are inarguably the best part of the language and one
of the major reasons to use it
On Wednesday, 30 September 2015 at 22:51:24 UTC, H. S. Teoh wrote:
On Wed, Sep 30, 2015 at 10:32:16AM -0400, Andrei Alexandrescu
[...]
I watched most of the video (mainly the first half where he
goes through the C++ version of the code), and I have to
confess I couldn't help noticing just
On Thursday, 1 October 2015 at 01:32:17 UTC, bitwise wrote:
I don't think it would be that hard to make something this
possible:
for(int x : iota(0, 5).to(3))
printf("%d ", x);
Curiosity got the best of me:
http://ideone.com/RoJxLa
output doesn't show up for some reason, but it works.
On Thursday, 1 October 2015 at 01:54:22 UTC, bitwise wrote:
On Thursday, 1 October 2015 at 01:32:17 UTC, bitwise wrote:
I don't think it would be that hard to make something this
possible:
for(int x : iota(0, 5).to(3))
printf("%d ", x);
Curiosity got the best of me:
On Thursday, 1 October 2015 at 02:53:25 UTC, lobo wrote:
On Thursday, 1 October 2015 at 01:54:22 UTC, bitwise wrote:
On Thursday, 1 October 2015 at 01:32:17 UTC, bitwise wrote:
I don't think it would be that hard to make something this
possible:
for(int x : iota(0, 5).to(3))
printf("%d
On Thursday, 1 October 2015 at 00:42:43 UTC, lobo wrote:
If ranges are accepted into ISO C++ I can't imagine it would be
long before for(auto e:range).
Special features are not necessary to do this. C++ for loop works
on anything with begin()/end() functions. Real ranges could just
be a
On Thursday, 1 October 2015 at 04:08:00 UTC, bitwise wrote:
I understand, but the C++ committee seems very conservative to
me, so when it's this easy to add for(:) support by giving
ranges begin()/end() functions, it makes me doubt they will
actually change the language for it.
As of C++11,
On 09/30/2015 09:31 AM, Steven Schveighoffer wrote:
On 9/29/15 9:45 PM, deadalnix wrote:
https://www.youtube.com/watch?v=mFUXNMfaciE
From
http://wiki.dlang.org/Component_programming_with_ranges
Congrat H. S. Teoh
Ditto!
Here is the link to the video at the time where D is credited, very
On 09/29/2015 06:45 PM, deadalnix wrote:
https://www.youtube.com/watch?v=mFUXNMfaciE
From
http://wiki.dlang.org/Component_programming_with_ranges
Congrat H. S. Teoh
Yay! :)
I almost gave the same talk! This talk could have been a part of DConf
2014 if H. S. Teoh or I could go to the
On Wednesday, 30 September 2015 at 02:59:40 UTC, Freddy wrote:
So this is what APL feels like. /s
Nah, the APL version would be shorter and only use builtins. ;)
-Wyatt
On 09/30/2015 08:02 AM, Ali Çehreli wrote:
> if H. S. Teoh or I could go to the conference.
Oops! I've mixed up the years. I did go to DConf 2014 but not DConf
2015. Still... :)
Ali
On Wednesday, 30 September 2015 at 01:45:49 UTC, deadalnix wrote:
https://www.youtube.com/watch?v=mFUXNMfaciE
From
http://wiki.dlang.org/Component_programming_with_ranges
Congrat H. S. Teoh
Thanks for the link, I watched the whole video today and it was a
very good presentation by Niebler.
https://www.youtube.com/watch?v=mFUXNMfaciE
From
http://wiki.dlang.org/Component_programming_with_ranges
Congrat H. S. Teoh
On Wednesday, 30 September 2015 at 01:45:49 UTC, deadalnix wrote:
https://www.youtube.com/watch?v=mFUXNMfaciE
From
http://wiki.dlang.org/Component_programming_with_ranges
Congrat H. S. Teoh
Shared on reddit:
On Wednesday, 30 September 2015 at 01:45:49 UTC, deadalnix wrote:
https://www.youtube.com/watch?v=mFUXNMfaciE
From
http://wiki.dlang.org/Component_programming_with_ranges
Congrat H. S. Teoh
So this is what APL feels like. /s
74 matches
Mail list logo