From reviews-return-20834-apmail-mesos-reviews-archive=mesos.apache.org@mesos.apache.org Mon Jan 18 08:01:25 2016 Return-Path: X-Original-To: apmail-mesos-reviews-archive@minotaur.apache.org Delivered-To: apmail-mesos-reviews-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 497911883A for ; Mon, 18 Jan 2016 08:01:25 +0000 (UTC) Received: (qmail 60363 invoked by uid 500); 18 Jan 2016 08:01:25 -0000 Delivered-To: apmail-mesos-reviews-archive@mesos.apache.org Received: (qmail 60331 invoked by uid 500); 18 Jan 2016 08:01:25 -0000 Mailing-List: contact reviews-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@mesos.apache.org Delivered-To: mailing list reviews@mesos.apache.org Received: (qmail 60319 invoked by uid 99); 18 Jan 2016 08:01:24 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Jan 2016 08:01:24 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 76D5A18052F for ; Mon, 18 Jan 2016 08:01:24 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.879 X-Spam-Level: ** X-Spam-Status: No, score=2.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id GreR5q2TWskW for ; Mon, 18 Jan 2016 08:01:23 +0000 (UTC) Received: from mail-yk0-f181.google.com (mail-yk0-f181.google.com [209.85.160.181]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 638EF20270 for ; Mon, 18 Jan 2016 08:01:22 +0000 (UTC) Received: by mail-yk0-f181.google.com with SMTP id x67so606863524ykd.2 for ; Mon, 18 Jan 2016 00:01:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=YH/pk3QBkyukxUsjGei/capWk738iiWSdHLpK0uZoVA=; b=UcMsPSG8TjTw9NsWZcFytBfMfW/ExYfUi2qPPtWrjmfhg9GqYZcLxXMdXBTg/xHVXj CECEMyrJuJDt9xUVsNEhO9T9iSt6ddKBAga5YhOdSg6XQG4ep4CsNU50IejkPfdDgHES 1sjIVJFC5XBNyz12PWG1AusGINX6YmGkivmvQ/lw/DTcqbx+DTWTQi8ermMThgqg/Dwy trwjVict9Yk4z4WKH+iytJ4j6Qu+a/youIOiFuT5532guwSBQzcDSi9DfuhNJd6eOer6 k9CWkQnMQ3NGntpW2YNjjEUTbwvmUzBElKkgDbDG6UXaATSsKXba0rmiql7arQkgzzhp tYlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=YH/pk3QBkyukxUsjGei/capWk738iiWSdHLpK0uZoVA=; b=Zu21MGeewHwsnrCgq/1fzFcYq+ga6s1TSrqll/ZSzGnTZmNaPSkymlheb1ygO6ilPC zkuBW6y1YlKRP0kOFye2tecohKMhkem2SWx7Up/IVr3la9+PPAd9731TzBvg/ltKn8Ht I0BzTgcZdLlHtgJvEU1qaLGR5/+8SrVKGhV5+O/UqnRl5aXIoeKeWh45pIUICc3Qr0tl /kLbza/jChAyNvA3hGHy9oJ80LOq++zSwLL4yLMWk4+1PtEWgzcBFEP3P0KAhzVl7ieN Drpb+00c2oUWxbON8hCP8hN1diwsPGYkPjOb1xQNPIFZHHVjbPGQrbAkaaguBJPz120R ltxA== X-Gm-Message-State: ALoCoQlaxf7YNX3ZgaWkmPtQHR924uk9lMmNk6FpmAnE5wqh5dIFz5QLYVErpPPpf0AxpXB1OxxeBhpjw93QgbgeW5uAlUAR1A== MIME-Version: 1.0 X-Received: by 10.13.250.196 with SMTP id k187mr16501853ywf.23.1453104081429; Mon, 18 Jan 2016 00:01:21 -0800 (PST) Received: by 10.37.56.200 with HTTP; Mon, 18 Jan 2016 00:01:21 -0800 (PST) In-Reply-To: References: <20160116013216.26792.68797@reviews.apache.org> <20160116173712.26792.28034@reviews.apache.org> Date: Mon, 18 Jan 2016 00:01:21 -0800 Message-ID: Subject: Re: Review Request 42379: Add reverse_foreach in libprocess. From: Jie Yu To: Benjamin Mahler Cc: "reviews@mesos.apache.org" , Timothy Chen Content-Type: multipart/alternative; boundary=94eb2c05ed50986d11052997286f --94eb2c05ed50986d11052997286f Content-Type: text/plain; charset=UTF-8 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 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 > 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 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) >>> >>> >>> 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 >>> > >>> > >>> >>> > --94eb2c05ed50986d11052997286f--