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 9F96B200BDF for ; Sun, 18 Dec 2016 08:05:07 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 9E064160B30; Sun, 18 Dec 2016 07:05:07 +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 C4433160B12 for ; Sun, 18 Dec 2016 08:05:06 +0100 (CET) Received: (qmail 44434 invoked by uid 500); 18 Dec 2016 07:05:05 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 44418 invoked by uid 99); 18 Dec 2016 07:05:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Dec 2016 07:05:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 9ED1E1A05A1 for ; Sun, 18 Dec 2016 07:05:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.02 X-Spam-Level: X-Spam-Status: No, score=-0.02 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=wortharead-com.20150623.gappssmtp.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id AE0PA24V6qZ5 for ; Sun, 18 Dec 2016 07:05:03 +0000 (UTC) Received: from mail-wj0-f182.google.com (mail-wj0-f182.google.com [209.85.210.182]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 397525FD3F for ; Sun, 18 Dec 2016 07:05:03 +0000 (UTC) Received: by mail-wj0-f182.google.com with SMTP id v7so124964534wjy.2 for ; Sat, 17 Dec 2016 23:05:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wortharead-com.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=jTfloWZrKEN/V8gjG65DlQkSgegGcs2pFmfH0knFCJk=; b=GLDBu6z3UbMIUsd3YzbYhqTJbKur3Qht5S4wa1IO0ft6MbPgvZOuVAc3XDHlZcdXcX Vm78LIL2sxvc5seJSF0zJOyzPIoAIMh2gxoITz+miELsAmsbEvKZLl/SC5/FtpOdC23j bsrLIoodLdQIEl+kRs7JSh2EmBJIhSxesMA+XT/A1cmEBVOJyBC1pbEMw5LQxQEFniW1 W2zPTRFUUj/CyKGg5b/flArDhMfAewpwXgz/Pr1kn53A/cH/w3I2AQLgqBlKl9JEwsh4 6YSyQ/DR1gWOjzSya7AyrBgIYknEz4ivtiT7h3K3la8OvJBoLCr0yB8spvnMsLWh9na7 YDeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=jTfloWZrKEN/V8gjG65DlQkSgegGcs2pFmfH0knFCJk=; b=gfuXsvC0BHghJGoQikziIqUicPNSdNHLHQoKxfvdZYmi2pC9yL0UDOvwq3B9iIFANE TQiiBAeLV8dK+s1JEzEvlZRiHmuhSWjwWyCv2RKArICyg+PDJjCcz4Wn8AD6FOvVmFa7 n7Oe8svgHfo9xwP6uyVRJQeaNG3x9PIq5EiYRl0znxrw5Gg+GrlGoRJL9PE6vGjnk/AM ZPHuePLEfs+qvQp+CqXMSaCkHLu3RSiEPXKV554H5Fdfe7H7Mf7Cm7HOyn2hcU4ECJ0p fJ/oplQHcngGaY3eAOszfCATZp05tySnB25QM+4eORtXLZ3enW1CxPGpbXqFwQ8oovmi lB3A== X-Gm-Message-State: AKaTC01yVlfGE443+hm+rM/qcBiKxwinKSLrALH2L2VYs/MbSm+kZFIoQK2PDzDo6QQZmA== X-Received: by 10.194.90.135 with SMTP id bw7mr8557981wjb.34.1482044702014; Sat, 17 Dec 2016 23:05:02 -0800 (PST) Received: from duncan-mac.home.gateway (host-78-151-182-17.as13285.net. [78.151.182.17]) by smtp.gmail.com with ESMTPSA id d64sm11207428wmh.3.2016.12.17.23.05.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Dec 2016 23:05:01 -0800 (PST) From: Duncan Jones Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: [LANG] [RNG] New Unicode-capable additions to RandomStringUtils Date: Sun, 18 Dec 2016 07:04:59 +0000 References: <41FD1D64-C265-4B74-BC33-E7A3E62E81CB@wortharead.com> To: Commons Developers List In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3251) archived-at: Sun, 18 Dec 2016 07:05:07 -0000 > On 18 Dec 2016, at 06:55, Gary Gregory wrote: >=20 > I thought we were talking about deprecating any random code in favor = of > Commons RNG? >=20 > Gary I guess that depends on the scope of RNG. Our previous conversation = about RandomUtils made sense (LANG-1299), since that was about the = functionality offered by the generator itself. If RNG will become a repository of things you could do with a random = generator, rather than just implementations of the generators, then I = agree with your suggestion. If not, then I could imagine this random = string generation staying in Lang or perhaps moving to Text. Duncan >=20 > On Dec 17, 2016 10:39 PM, "Duncan Jones" = wrote: >=20 >> On reflection, a bad choice of subject line. The other methods are >> Unicode-capable, but just very rooted in thinking about char data = types. >>=20 >>> On 18 Dec 2016, at 06:38, Duncan Jones = wrote: >>>=20 >>> Hi all, >>>=20 >>> I=E2=80=99ve created a variation of RandomStringUtils.random(), = which generates >> the specified number of code points (rather than chars). >>>=20 >>> Implementation can be seen here (https://gist.github.com/dmjones500/ >> da2f61a0234f428748417bf1443c0dff). >>>=20 >>> Signature is: >>>=20 >>> public static String randomUnicode(final int count, final int >> minCodePoint, final int maxCodePoint, >>> final Set include, final Random = random) >>>=20 >>>=20 >>> Expected overloads: >>>=20 >>>=20 >>> public static String randomUnicode(final int count, final int >> minCodePoint, final int maxCodePoint, final Set = include) >>> public static String randomUnicode(final int count, final int >> minCodePoint, final int maxCodePoint) >>> public static String randomUnicode(final int count) >>>=20 >>> And possibly: >>>=20 >>> public static String randomNumberUnicode(final int count) >>> public static String randomAlphabeticUnicode(final int count) >>> public static String randomAlphanumericUnicode(final int count) >>>=20 >>>=20 >>> Any complaints if I add this to the code base? I=E2=80=99ve possibly >> overcomplicated the predicate stuff, however it seemed the most = flexible >> way to specify requirements on the letters. I=E2=80=99ve created two = built-in >> predicates, but more could be supported (and users can create their = own). >>>=20 >>> Duncan >>=20 >>=20 >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org >> For additional commands, e-mail: dev-help@commons.apache.org >>=20 >>=20 --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org