Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 49FB1200BBB for ; Thu, 10 Nov 2016 23:59:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 48B00160B01; Thu, 10 Nov 2016 22:59:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8FBFF160AF7 for ; Thu, 10 Nov 2016 23:59:04 +0100 (CET) Received: (qmail 87582 invoked by uid 500); 10 Nov 2016 22:59:03 -0000 Mailing-List: contact dev-help@fluo.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@fluo.incubator.apache.org Delivered-To: mailing list dev@fluo.incubator.apache.org Received: (qmail 87566 invoked by uid 99); 10 Nov 2016 22:59:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Nov 2016 22:59:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id E777DC028B for ; Thu, 10 Nov 2016 22:59:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.719 X-Spam-Level: X-Spam-Status: No, score=-0.719 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=deenlo-com.20150623.gappssmtp.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id LE4X_r-MHjga for ; Thu, 10 Nov 2016 22:59:00 +0000 (UTC) Received: from mail-qt0-f170.google.com (mail-qt0-f170.google.com [209.85.216.170]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 867CF5F2F2 for ; Thu, 10 Nov 2016 22:59:00 +0000 (UTC) Received: by mail-qt0-f170.google.com with SMTP id c47so4753qtc.2 for ; Thu, 10 Nov 2016 14:59:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=deenlo-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=a9XyT4jeuIVvTT16Rcnh0Rc4o+EET7Cpwq9YMsiiQ2E=; b=AnD6cjNjlR0CpL7eN5opxfWV4fTsd/zmeZewc2V6mBbUpVpx/xhVZmHpfhv9INp+s0 qbDl2k9gAaIcmERedvKRLapyaRxUcKwpSFjsC+h2zBX3bZg3QbD9rTzuxH/JRBGpXRHk LiEm2Wn+lZr7eg+aBQGfijQIYCOtGi/6q35GWPMqoZnfjapZoZzNQS4TfnXPgbcYuYxr 88QDbOx13Emq16KMBzbyezNzC2g8NVYTTkkEVLLc39Hnk0GsTNKVHXiHp7xh7DHeYrVi tJtwj/Dd/NnyHhcpg8sMguCj0TteGnHN/Ro/7tOAbUPGrBAUmdxnb5XfN+acoOFpBvGi +D9Q== 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:from:date :message-id:subject:to; bh=a9XyT4jeuIVvTT16Rcnh0Rc4o+EET7Cpwq9YMsiiQ2E=; b=enOgCiy6RP7lYIeRuZQRrTtcV/ijZupNB3302rUjJJ1WOKi9YxO3eyWwuJf8y0Dpyo 6dzpekv9gSD6a4rXxv/BW7oIGEPsFITTtbG/OxbHSgaO1PRXkMBFKbx99XSccHQZna5k b1zI0+4TzQ7rGrnHOSXS8rLe3TP+09bGZ0jKFT7k6QBq214G83kjmmZconB69ee56jVR 2U0m66ON8tTnYVWJld658WdpomBsLwjznM9vxJJwCOWK9y9Nj9d91qf2Su0OxVGjnMnL rXKQm5LHO8q3J5VAVGvInU7PWKtwkyMS63T63CUH3yHRmU4PzidgPgQiIc4uyVTnoJY8 y+Sw== X-Gm-Message-State: ABUngveiSdkZPqH7qwAetxV5UZZAnqRn24aCnJ43OSh7loNIrcxpLjipJLS8WvfoyGlESGs0VwNNNRyAhamdjQ== X-Received: by 10.237.41.129 with SMTP id o1mr179670qtd.10.1478818737860; Thu, 10 Nov 2016 14:58:57 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.137.91 with HTTP; Thu, 10 Nov 2016 14:58:57 -0800 (PST) In-Reply-To: References: From: Keith Turner Date: Thu, 10 Nov 2016 17:58:57 -0500 Message-ID: Subject: Re: New Blog Post To: dev@fluo.incubator.apache.org Content-Type: text/plain; charset=UTF-8 archived-at: Thu, 10 Nov 2016 22:59:05 -0000 On Thu, Nov 10, 2016 at 5:20 PM, Dylan Hutchison wrote: > Thanks for writing the post Keith. > > How would you compare Fluo's Bytes to Guava's ImmutableList? I think the following elements are key for an immutable byte array wrapper. * good interoperability with byte[], String, ByteBuffer, InputStream, OutputStream, etc. * an efficient reusable builder that also interoperates with type mentioned above * good hashCode, equals, and compareTo functions A list representation might be nice, however the performance implications you mentioned below may be severe. The list implementation would provide some of the elements mentioned above. Would still need to provide additional specialization for the interop. > > Bytes would be more efficient at face value because it used a byte[] > internally rather than an Object[] (that is a Byte[]). Apart from that, I > imagine that the two implementations share a lot of functionality, such as > how to handle sub-arrays of a Bytes (= sublists of an immutable list, which > Guava implements very nicely). Did Bytes take inspiration from Guava or was > it built from the ground up? Its slowly evolved over time, so its hard to remember. I think inspiration was taken from parts of Guava, but I am not sure what parts. Also Java's String was an inspiration. > > On Nov 10, 2016 1:11 PM, "Keith Turner" wrote: > > I just added a new blog post to the Fluo website. > > http://fluo.apache.org/blog/2016/11/10/immutable-bytes/