digitalmars.D - Categorizing Ranges
- Mike Parker (12/12) Oct 07 2015 I'm looking for ideas on how to label the ranges returned from
- Big Daddy (2/14) Oct 07 2015 eager
- Jonathan M Davis (4/20) Oct 07 2015 Eager is far more general. Also, while the drop* functions are
- Joseph Rushton Wakeling (11/13) Oct 10 2015 I don't recall the precise details of these particular ranges off
- =?UTF-8?Q?Ali_=c3=87ehreli?= (3/14) Oct 07 2015 Something like shortening, minimizing?
- Andrea Fontana (2/5) Oct 07 2015 Slicing?
- Jonathan M Davis (5/11) Oct 07 2015 Similar, but that's already a pretty overloaded term, and neither
- Gerald Jansen (3/7) Oct 07 2015 Partitioning?
- Mike Parker (2/4) Oct 07 2015 How about reductive?
- DLangLearner (2/8) Oct 07 2015 subtractive
- =?UTF-8?Q?Ali_=c3=87ehreli?= (3/9) Oct 07 2015 That's what I had in mind when I started thesaurusing for the other two....
- drug (2/13) Oct 07 2015 Specifying?
- Meta (2/14) Oct 07 2015 Mutating.
- Jonathan M Davis (5/21) Oct 07 2015 Except that take doesn't mutate its function argument, and drop
- H. S. Teoh via Digitalmars-d (6/27) Oct 07 2015 [...]
- Meta (5/9) Oct 07 2015 Yeah, true. Partitioning or Isolating, something along those
- The Great one (2/12) Oct 07 2015 Needy
- Jonathan M Davis (6/18) Oct 07 2015 If it were just take, then maybe "bounding" would work, and I
- qznc (5/17) Oct 07 2015 Selective
- Mike Parker (10/14) Oct 07 2015 I actually agree with you about iterative, but I hadn't
- Mike Parker (4/5) Oct 07 2015 Thanks for the brainstorming session everyone. I'm on a deadline
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (18/25) Oct 09 2015 I'm guessing you're thinking about categorizing the list at
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (2/4) Oct 09 2015 "Software Visualization" seems to be the correct research term.
- Mike Parker (7/13) Oct 09 2015 This is for the "Learning D" book I'm currently doing revisions
- Jonathan M Davis (12/19) Oct 09 2015 I can certainly understand trying to categorize ranges like this,
I'm looking for ideas on how to label the ranges returned from take and drop. Some examples of what I think are appropriate categories for other types of ranges: Generative - iota, recurrence, sequence Compositional - chain, roundRobin, transposed Iterative - retro, stride, lockstep XXX - take, drop What to put into the XXX? I first thought of "Greedy", but that has an association with "greedy algorithms" that I don't really like. That led to "Selfish", but it's admittedly not that appropriate. Beyond that, I'm stuck. Any and all ideas appreciated.
Oct 07 2015
On Wednesday, 7 October 2015 at 15:06:55 UTC, Mike Parker wrote:I'm looking for ideas on how to label the ranges returned from take and drop. Some examples of what I think are appropriate categories for other types of ranges: Generative - iota, recurrence, sequence Compositional - chain, roundRobin, transposed Iterative - retro, stride, lockstep XXX - take, drop What to put into the XXX? I first thought of "Greedy", but that has an association with "greedy algorithms" that I don't really like. That led to "Selfish", but it's admittedly not that appropriate. Beyond that, I'm stuck. Any and all ideas appreciated.eager
Oct 07 2015
On Wednesday, 7 October 2015 at 15:13:17 UTC, Big Daddy wrote:On Wednesday, 7 October 2015 at 15:06:55 UTC, Mike Parker wrote:Eager is far more general. Also, while the drop* functions are eager, the take* functions are not. - Jonathan M DavisI'm looking for ideas on how to label the ranges returned from take and drop. Some examples of what I think are appropriate categories for other types of ranges: Generative - iota, recurrence, sequence Compositional - chain, roundRobin, transposed Iterative - retro, stride, lockstep XXX - take, drop What to put into the XXX? I first thought of "Greedy", but that has an association with "greedy algorithms" that I don't really like. That led to "Selfish", but it's admittedly not that appropriate. Beyond that, I'm stuck. Any and all ideas appreciated.eager
Oct 07 2015
On Wednesday, 7 October 2015 at 15:39:03 UTC, Jonathan M Davis wrote:Eager is far more general. Also, while the drop* functions are eager, the take* functions are not.I don't recall the precise details of these particular ranges off the top of my head (away from computer so can't easily check), but one nasty little detail of supposedly lazy ranges is that they are often eager for the first element, lazy thereafter -- and even there it's subtly different from 'true' laziness inasmuch as the new values are generated at the point of popping rather than the point of access to the new front. In most cases that's an implementation detail, but it gets _very_ interesting when the elements of your range are non-deterministic.
Oct 10 2015
On 10/07/2015 08:06 AM, Mike Parker wrote:I'm looking for ideas on how to label the ranges returned from take and drop. Some examples of what I think are appropriate categories for other types of ranges: Generative - iota, recurrence, sequence Compositional - chain, roundRobin, transposed Iterative - retro, stride, lockstep XXX - take, drop What to put into the XXX? I first thought of "Greedy", but that has an association with "greedy algorithms" that I don't really like. That led to "Selfish", but it's admittedly not that appropriate. Beyond that, I'm stuck. Any and all ideas appreciated.Something like shortening, minimizing? Ali
Oct 07 2015
On Wednesday, 7 October 2015 at 15:43:44 UTC, Ali Çehreli wrote:On 10/07/2015 08:06 AM, Mike Parker wrote: Something like shortening, minimizing? AliSlicing?
Oct 07 2015
On Wednesday, 7 October 2015 at 15:46:00 UTC, Andrea Fontana wrote:On Wednesday, 7 October 2015 at 15:43:44 UTC, Ali Çehreli wrote:Similar, but that's already a pretty overloaded term, and neither take nor drop requires that a range support slicing. - Jonathan M DaivsOn 10/07/2015 08:06 AM, Mike Parker wrote: Something like shortening, minimizing? AliSlicing?
Oct 07 2015
On Wednesday, 7 October 2015 at 15:46:00 UTC, Andrea Fontana wrote:On Wednesday, 7 October 2015 at 15:43:44 UTC, Ali Çehreli wrote:Partitioning?On 10/07/2015 08:06 AM, Mike Parker wrote: Something like shortening, minimizing?Slicing?
Oct 07 2015
On Wednesday, 7 October 2015 at 15:43:44 UTC, Ali Çehreli wrote:Something like shortening, minimizing? AliHow about reductive?
Oct 07 2015
On Wednesday, 7 October 2015 at 16:15:13 UTC, Mike Parker wrote:On Wednesday, 7 October 2015 at 15:43:44 UTC, Ali Çehreli wrote:subtractiveSomething like shortening, minimizing? AliHow about reductive?
Oct 07 2015
On 10/07/2015 09:15 AM, Mike Parker wrote:On Wednesday, 7 October 2015 at 15:43:44 UTC, Ali Çehreli wrote:That's what I had in mind when I started thesaurusing for the other two. :) AliSomething like shortening, minimizing? AliHow about reductive?
Oct 07 2015
On 07.10.2015 18:06, Mike Parker wrote:I'm looking for ideas on how to label the ranges returned from take and drop. Some examples of what I think are appropriate categories for other types of ranges: Generative - iota, recurrence, sequence Compositional - chain, roundRobin, transposed Iterative - retro, stride, lockstep XXX - take, drop What to put into the XXX? I first thought of "Greedy", but that has an association with "greedy algorithms" that I don't really like. That led to "Selfish", but it's admittedly not that appropriate. Beyond that, I'm stuck. Any and all ideas appreciated.Specifying?
Oct 07 2015
On Wednesday, 7 October 2015 at 15:06:55 UTC, Mike Parker wrote:I'm looking for ideas on how to label the ranges returned from take and drop. Some examples of what I think are appropriate categories for other types of ranges: Generative - iota, recurrence, sequence Compositional - chain, roundRobin, transposed Iterative - retro, stride, lockstep XXX - take, drop What to put into the XXX? I first thought of "Greedy", but that has an association with "greedy algorithms" that I don't really like. That led to "Selfish", but it's admittedly not that appropriate. Beyond that, I'm stuck. Any and all ideas appreciated.Mutating.
Oct 07 2015
On Wednesday, 7 October 2015 at 16:54:00 UTC, Meta wrote:On Wednesday, 7 October 2015 at 15:06:55 UTC, Mike Parker wrote:Except that take doesn't mutate its function argument, and drop only does if the range is a reference type. So, they really aren't mutating algorithms. - Jonathan M DavisI'm looking for ideas on how to label the ranges returned from take and drop. Some examples of what I think are appropriate categories for other types of ranges: Generative - iota, recurrence, sequence Compositional - chain, roundRobin, transposed Iterative - retro, stride, lockstep XXX - take, drop What to put into the XXX? I first thought of "Greedy", but that has an association with "greedy algorithms" that I don't really like. That led to "Selfish", but it's admittedly not that appropriate. Beyond that, I'm stuck. Any and all ideas appreciated.Mutating.
Oct 07 2015
On Wed, Oct 07, 2015 at 05:15:45PM +0000, Jonathan M Davis via Digitalmars-d wrote:On Wednesday, 7 October 2015 at 16:54:00 UTC, Meta wrote:[...] Sub-ranging? T -- A program should be written to model the concepts of the task it performs rather than the physical world or a process because this maximizes the potential for it to be applied to tasks that are conceptually similar and, more important, to tasks that have not yet been conceived. -- Michael B. AllenOn Wednesday, 7 October 2015 at 15:06:55 UTC, Mike Parker wrote:Except that take doesn't mutate its function argument, and drop only does if the range is a reference type. So, they really aren't mutating algorithms.I'm looking for ideas on how to label the ranges returned from take and drop. Some examples of what I think are appropriate categories for other types of ranges: Generative - iota, recurrence, sequence Compositional - chain, roundRobin, transposed Iterative - retro, stride, lockstep XXX - take, drop What to put into the XXX? I first thought of "Greedy", but that has an association with "greedy algorithms" that I don't really like. That led to "Selfish", but it's admittedly not that appropriate. Beyond that, I'm stuck. Any and all ideas appreciated.Mutating.
Oct 07 2015
On Wednesday, 7 October 2015 at 17:15:47 UTC, Jonathan M Davis wrote:Except that take doesn't mutate its function argument, and drop only does if the range is a reference type. So, they really aren't mutating algorithms. - Jonathan M DavisYeah, true. Partitioning or Isolating, something along those lines seems more descriptive I guess, as that's technically what you're doing.
Oct 07 2015
On Wednesday, 7 October 2015 at 18:09:51 UTC, Meta wrote:On Wednesday, 7 October 2015 at 17:15:47 UTC, Jonathan M Davis wrote:NeedyExcept that take doesn't mutate its function argument, and drop only does if the range is a reference type. So, they really aren't mutating algorithms. - Jonathan M DavisYeah, true. Partitioning or Isolating, something along those lines seems more descriptive I guess, as that's technically what you're doing.
Oct 07 2015
On Wednesday, 7 October 2015 at 15:06:55 UTC, Mike Parker wrote:I'm looking for ideas on how to label the ranges returned from take and drop. Some examples of what I think are appropriate categories for other types of ranges: Generative - iota, recurrence, sequence Compositional - chain, roundRobin, transposed Iterative - retro, stride, lockstep XXX - take, drop What to put into the XXX? I first thought of "Greedy", but that has an association with "greedy algorithms" that I don't really like. That led to "Selfish", but it's admittedly not that appropriate. Beyond that, I'm stuck. Any and all ideas appreciated.If it were just take, then maybe "bounding" would work, and I guess that _technically_ that works with drop as well, but it seems kind of off to talk about bounding when the bounds are everything _but_ a small number of elements. - Jonathan M Davis
Oct 07 2015
On Wednesday, 7 October 2015 at 15:06:55 UTC, Mike Parker wrote:I'm looking for ideas on how to label the ranges returned from take and drop. Some examples of what I think are appropriate categories for other types of ranges: Generative - iota, recurrence, sequence Compositional - chain, roundRobin, transposed Iterative - retro, stride, lockstep XXX - take, drop What to put into the XXX? I first thought of "Greedy", but that has an association with "greedy algorithms" that I don't really like. That led to "Selfish", but it's admittedly not that appropriate. Beyond that, I'm stuck. Any and all ideas appreciated.Selective Although, then stride fits better into Selective than into Iterative. On the other hand, iterative seems not that fitting to me. lockstep might also be Compositional.
Oct 07 2015
On Wednesday, 7 October 2015 at 18:26:29 UTC, qznc wrote:Selective Although, then stride fits better into Selective than into Iterative. On the other hand, iterative seems not that fitting to me. lockstep might also be Compositional.I actually agree with you about iterative, but I hadn't considered changing it until I read this. IIRC, I picked the name based on the documentation. All three of the listed ranges use "Iterates" in the short description. I also included zip in that category because it's akin to lockstep, despite the intuition that it should be considered compositional. Anyway, I'm not looking to establish any conventions here, just an easy way to describe ranges. This thread has helped a good deal.
Oct 07 2015
On Wednesday, 7 October 2015 at 15:06:55 UTC, Mike Parker wrote:What to put into the XXX?Thanks for the brainstorming session everyone. I'm on a deadline so I need to pick something and go with it. This thread has simplified things for me.
Oct 07 2015
On Wednesday, 7 October 2015 at 15:06:55 UTC, Mike Parker wrote:I'm looking for ideas on how to label the ranges returned from take and drop. Some examples of what I think are appropriate categories for other types of ranges: Generative - iota, recurrence, sequence Compositional - chain, roundRobin, transposed Iterative - retro, stride, lockstep XXX - take, dropI'm guessing you're thinking about categorizing the list at http://dlang.org/phobos/std_range.html , right? ;) That would, IMHO, be a nice usability/discoverability improvement, especially for new users! :) Further, I've thought about adding some kind standardized graphical explanation for the ranges and algorithms in Phobos. I've Googled a bit on this topic, say: "algorithm visualization" but I can't seem to find any concrete work on this topic. Refs ideas anyone? What file format would be preferred for such graphical descriptions? I'm guessing SVG would be a good contender. A supercool thing would be if we, with the help of D's marvellous meta-programming and CT/RT-reflection, could auto-generate these visualizations.
Oct 09 2015
On Friday, 9 October 2015 at 10:01:47 UTC, Per Nordlöw wrote:I've Googled a bit on this topic, say: "algorithm visualization""Software Visualization" seems to be the correct research term.
Oct 09 2015
On Friday, 9 October 2015 at 10:01:47 UTC, Per Nordlöw wrote:I'm guessing you're thinking about categorizing the list at http://dlang.org/phobos/std_range.html , right? ;) That would, IMHO, be a nice usability/discoverability improvement, especially for new users! :)This is for the "Learning D" book I'm currently doing revisions on. In the chapter on std.range and std.algorithm, there was an imbalance with the latter being neatly categorized into the different modules. It looked odd having the std.range stuff all lumped under one section heading. One of the technical reviewers (rightly) didn't like my initial "Selfish" category, and I agree.
Oct 09 2015
On Friday, 9 October 2015 at 16:08:58 UTC, Mike Parker wrote:This is for the "Learning D" book I'm currently doing revisions on. In the chapter on std.range and std.algorithm, there was an imbalance with the latter being neatly categorized into the different modules. It looked odd having the std.range stuff all lumped under one section heading. One of the technical reviewers (rightly) didn't like my initial "Selfish" category, and I agree.I can certainly understand trying to categorize ranges like this, but at the same time, it seems like there's such a range of things - pun intended :) - that they can do that it quickly becomes about as tenable to categorize ranges as it does to categorize _all_ functions, which is pretty questionable IMHO. In general, I don't think I'd even bother trying to categorize them except to the extent required to figure out which package or module to stuff them in (like you have to do with any function), but it can be more important to categorize stuff in a teaching setting. - Jonathan M Davis
Oct 09 2015