You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Timothy Chen <tn...@apache.org> on 2016/01/16 02:32:16 UTC

Review Request 42379: Add reverse_foreach in libprocess.

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42379/
-----------------------------------------------------------

Review request for mesos and Jie Yu.


Repository: mesos


Description
-------

Add reverse_foreach in libprocess.


Diffs
-----

  3rdparty/libprocess/3rdparty/stout/include/stout/foreach.hpp 7fb0044790ee249b69e07b81a26851bd5bfb110f 

Diff: https://reviews.apache.org/r/42379/diff/


Testing
-------

make check


Thanks,

Timothy Chen


Re: Review Request 42379: Add reverse_foreach in libprocess.

Posted by haosdent huang <ha...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42379/#review114856
-----------------------------------------------------------

Ship it!


Ship It!

- haosdent huang


On Jan. 16, 2016, 1:32 a.m., Timothy Chen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42379/
> -----------------------------------------------------------
> 
> (Updated Jan. 16, 2016, 1:32 a.m.)
> 
> 
> Review request for mesos and Jie Yu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Add reverse_foreach in libprocess.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/foreach.hpp 7fb0044790ee249b69e07b81a26851bd5bfb110f 
> 
> Diff: https://reviews.apache.org/r/42379/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Timothy Chen
> 
>


Re: Review Request 42379: Add reverse_foreach in libprocess.

Posted by Jie Yu <yu...@gmail.com>.
Added reverse adaptor:

https://reviews.apache.org/r/42450
https://reviews.apache.org/r/42451

Ben, do you think it makes sense to add the above?

- Jie

On Sat, Jan 16, 2016 at 12:33 PM, Jie Yu <yu...@gmail.com> wrote:

> Maybe include boost::adaptor into stout under namespace adaptor? I liked
> the adaptor idea since it can be composed.
>
> - Jie
>
> On Sat, Jan 16, 2016 at 10:48 AM, Benjamin Mahler <bm...@apache.org>
> wrote:
>
>> It seems unfortunate to introduce alternative looping constructs, for
>> example the following would be the more composable approach:
>>
>> foreach (int i, reversed(numbers)) {
>>
>> }
>>
>> I remember this coming up before:
>>
>> http://mail-archives.apache.org/mod_mbox/mesos-dev/201410.mbox/%3C20141002211204.18846.48448@reviews.apache.org%3E
>>
>> Thoughts?
>>
>> On Saturday, January 16, 2016, Jie Yu <yu...@gmail.com> wrote:
>>
>>>
>>> -----------------------------------------------------------
>>> This is an automatically generated e-mail. To reply, visit:
>>> https://reviews.apache.org/r/42379/#review114871
>>> -----------------------------------------------------------
>>>
>>> Ship it!
>>>
>>>
>>>
>>> 3rdparty/libprocess/3rdparty/stout/include/stout/foreach.hpp (lines 55 -
>>> 58)
>>> <https://reviews.apache.org/r/42379/#comment175706>
>>>
>>>     Ca you move this below 'foreachvalue'?
>>>
>>>
>>> - Jie Yu
>>>
>>>
>>> On Jan. 16, 2016, 1:32 a.m., Timothy Chen wrote:
>>> >
>>> > -----------------------------------------------------------
>>> > This is an automatically generated e-mail. To reply, visit:
>>> > https://reviews.apache.org/r/42379/
>>> > -----------------------------------------------------------
>>> >
>>> > (Updated Jan. 16, 2016, 1:32 a.m.)
>>> >
>>> >
>>> > Review request for mesos and Jie Yu.
>>> >
>>> >
>>> > Repository: mesos
>>> >
>>> >
>>> > Description
>>> > -------
>>> >
>>> > Add reverse_foreach in libprocess.
>>> >
>>> >
>>> > Diffs
>>> > -----
>>> >
>>> >   3rdparty/libprocess/3rdparty/stout/include/stout/foreach.hpp
>>> 7fb0044790ee249b69e07b81a26851bd5bfb110f
>>> >
>>> > Diff: https://reviews.apache.org/r/42379/diff/
>>> >
>>> >
>>> > Testing
>>> > -------
>>> >
>>> > make check
>>> >
>>> >
>>> > Thanks,
>>> >
>>> > Timothy Chen
>>> >
>>> >
>>>
>>>
>

Re: Review Request 42379: Add reverse_foreach in libprocess.

Posted by Jie Yu <yu...@gmail.com>.
Maybe include boost::adaptor into stout under namespace adaptor? I liked
the adaptor idea since it can be composed.

- Jie

On Sat, Jan 16, 2016 at 10:48 AM, Benjamin Mahler <bm...@apache.org>
wrote:

> It seems unfortunate to introduce alternative looping constructs, for
> example the following would be the more composable approach:
>
> foreach (int i, reversed(numbers)) {
>
> }
>
> I remember this coming up before:
>
> http://mail-archives.apache.org/mod_mbox/mesos-dev/201410.mbox/%3C20141002211204.18846.48448@reviews.apache.org%3E
>
> Thoughts?
>
> On Saturday, January 16, 2016, Jie Yu <yu...@gmail.com> wrote:
>
>>
>> -----------------------------------------------------------
>> This is an automatically generated e-mail. To reply, visit:
>> https://reviews.apache.org/r/42379/#review114871
>> -----------------------------------------------------------
>>
>> Ship it!
>>
>>
>>
>> 3rdparty/libprocess/3rdparty/stout/include/stout/foreach.hpp (lines 55 -
>> 58)
>> <https://reviews.apache.org/r/42379/#comment175706>
>>
>>     Ca you move this below 'foreachvalue'?
>>
>>
>> - Jie Yu
>>
>>
>> On Jan. 16, 2016, 1:32 a.m., Timothy Chen wrote:
>> >
>> > -----------------------------------------------------------
>> > This is an automatically generated e-mail. To reply, visit:
>> > https://reviews.apache.org/r/42379/
>> > -----------------------------------------------------------
>> >
>> > (Updated Jan. 16, 2016, 1:32 a.m.)
>> >
>> >
>> > Review request for mesos and Jie Yu.
>> >
>> >
>> > Repository: mesos
>> >
>> >
>> > Description
>> > -------
>> >
>> > Add reverse_foreach in libprocess.
>> >
>> >
>> > Diffs
>> > -----
>> >
>> >   3rdparty/libprocess/3rdparty/stout/include/stout/foreach.hpp
>> 7fb0044790ee249b69e07b81a26851bd5bfb110f
>> >
>> > Diff: https://reviews.apache.org/r/42379/diff/
>> >
>> >
>> > Testing
>> > -------
>> >
>> > make check
>> >
>> >
>> > Thanks,
>> >
>> > Timothy Chen
>> >
>> >
>>
>>

Re: Review Request 42379: Add reverse_foreach in libprocess.

Posted by Benjamin Mahler <bm...@apache.org>.
It seems unfortunate to introduce alternative looping constructs, for
example the following would be the more composable approach:

foreach (int i, reversed(numbers)) {

}

I remember this coming up before:
http://mail-archives.apache.org/mod_mbox/mesos-dev/201410.mbox/%3C20141002211204.18846.48448@reviews.apache.org%3E

Thoughts?

On Saturday, January 16, 2016, Jie Yu <yu...@gmail.com> wrote:

>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42379/#review114871
> -----------------------------------------------------------
>
> Ship it!
>
>
>
> 3rdparty/libprocess/3rdparty/stout/include/stout/foreach.hpp (lines 55 -
> 58)
> <https://reviews.apache.org/r/42379/#comment175706>
>
>     Ca you move this below 'foreachvalue'?
>
>
> - Jie Yu
>
>
> On Jan. 16, 2016, 1:32 a.m., Timothy Chen wrote:
> >
> > -----------------------------------------------------------
> > This is an automatically generated e-mail. To reply, visit:
> > https://reviews.apache.org/r/42379/
> > -----------------------------------------------------------
> >
> > (Updated Jan. 16, 2016, 1:32 a.m.)
> >
> >
> > Review request for mesos and Jie Yu.
> >
> >
> > Repository: mesos
> >
> >
> > Description
> > -------
> >
> > Add reverse_foreach in libprocess.
> >
> >
> > Diffs
> > -----
> >
> >   3rdparty/libprocess/3rdparty/stout/include/stout/foreach.hpp
> 7fb0044790ee249b69e07b81a26851bd5bfb110f
> >
> > Diff: https://reviews.apache.org/r/42379/diff/
> >
> >
> > Testing
> > -------
> >
> > make check
> >
> >
> > Thanks,
> >
> > Timothy Chen
> >
> >
>
>

Re: Review Request 42379: Add reverse_foreach in libprocess.

Posted by Jie Yu <yu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42379/#review114871
-----------------------------------------------------------

Ship it!



3rdparty/libprocess/3rdparty/stout/include/stout/foreach.hpp (lines 55 - 58)
<https://reviews.apache.org/r/42379/#comment175706>

    Ca you move this below 'foreachvalue'?


- Jie Yu


On Jan. 16, 2016, 1:32 a.m., Timothy Chen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42379/
> -----------------------------------------------------------
> 
> (Updated Jan. 16, 2016, 1:32 a.m.)
> 
> 
> Review request for mesos and Jie Yu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Add reverse_foreach in libprocess.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/foreach.hpp 7fb0044790ee249b69e07b81a26851bd5bfb110f 
> 
> Diff: https://reviews.apache.org/r/42379/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Timothy Chen
> 
>