Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99167 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92092 invoked from network); 25 May 2017 10:14:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 May 2017 10:14:58 -0000 Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.68 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.214.68 mail-it0-f68.google.com Received: from [209.85.214.68] ([209.85.214.68:34855] helo=mail-it0-f68.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 23/84-10292-1AEA6295 for ; Thu, 25 May 2017 06:14:58 -0400 Received: by mail-it0-f68.google.com with SMTP id 67so22249887itx.2 for ; Thu, 25 May 2017 03:14:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=46MpgOCC7u9Tr6sZoEudpg6IgwwpbmlFvt8d0N09Lbo=; b=RNkLusOJxla/gO9vwR2PTsc83uD5cOYAyj0yV5VDETecIrmw+/HkZNZMzpvpaAdpFc +6Jmyg75R+kI0PJ7TJnAy/tCp6jk//7EwtYGF7x9xjjtTwd1ajdKE4XQ+uUAte3QkVum VM0x7kE69efb0R500ltrC0rn7LL9nqLqnjXn6Biwq3oWkEpROnCLE4KUYb0qRwBokPCo XJxUlwrRDdFg8ZwhnDZ8yd+vTirr0FoKobK6WiMjeXvky3I1cnGaBoG9igw1tPGLHUyz WR8jkOL+Zc9nS0jKbiOyRfufeshDmwtPxK47FOpKZqEOXvqXDAGeNPPPwr6ATgtDgazF ZvDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=46MpgOCC7u9Tr6sZoEudpg6IgwwpbmlFvt8d0N09Lbo=; b=ShSNWMKcutntiN6HiHAdbnq4c+7U+vjC40lZtj98KOpaVXPNcH+R/a33fje1B7Y/Uv dW1j/K/7zs7Ovy1Fbvgfu1942WmSMPUN5dIHK9PdTRfJarBuityhNSrsFjYwmDCvZv+6 gfY3Ou187kyR1yDTA/9TO/rIN/WuvZNrT+1TYl49qP6pu1SBPkwilR1+QoWe3eTr94go 9WzVbRwjvxpLVN3p/Re5Lwmkk0/GdD1b33CVcAr7aRsTnxSZSjQhVEUKOec3FeKgsa4S J84cAM/tThFWmK8/r7CMZJlcCK66sotjNl2m/luc45RlNDYqqLQvNnq7obdfyBjhCVA6 VvQw== X-Gm-Message-State: AODbwcCK8qPz36dAvPG6ofCwZYR+rgzCmib157mwd1oOO31ICf4FZcK/ rhvWFODHjqBrqYkIDRAvmbdHHlIh1w== X-Received: by 10.36.74.3 with SMTP id k3mr13323389itb.28.1495707294820; Thu, 25 May 2017 03:14:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.12.158 with HTTP; Thu, 25 May 2017 03:14:54 -0700 (PDT) In-Reply-To: References: Date: Thu, 25 May 2017 12:14:54 +0200 Message-ID: To: Fleshgrinder Cc: php-internals , Ben Ramsey , Marco Pivetta Content-Type: multipart/alternative; boundary="001a11449396feed820550567d3e" Subject: Re: [PHP-DEV] [RFC] [Discussion] UUID From: nikita.ppv@gmail.com (Nikita Popov) --001a11449396feed820550567d3e Content-Type: text/plain; charset="UTF-8" On Thu, May 25, 2017 at 12:05 PM, Fleshgrinder wrote: > On 5/24/2017 10:12 PM, Ben Ramsey wrote: > > I'll take a look at the patch soon. If this is accepted to the core, > > I'll probably add an adapter to ramsey/uuid that wraps this > > implementation. The point of the "over engineering" there is to provide > > choice. Some users want to generate bytes from sources other than > > random_bytes() (i.e., libsodium) or encode UUIDs in different ways > > (i.e., ordered time). A UUID generator in the core will only help to > > improve ramsey/uuid, providing more choice and better performance. > > > > I may split out the less-used adapters and codecs into separate > > components in version 4 or 5 of ramsey/uuid, though, since most users > > don't need anything other than the default. > > > > -Ben > > > > Yes, exactly. > > The provided implementation does not have any of the options your > library offers. There are no special formatters, no accessors for e.g. > time (not applicable to v3, v4, and v5), no RNG choices, no mutability, > ... well ... nothing. It is just a straight UUID implementation. > > I also hope that this implementation will help to get rid of uniqid at > some point. > > -- > Richard "Fleshgrinder" Fussenegger > I'm wondering if just adding a uuid_v4_create() function (directly returning a UUID string) might not cover the 95% use case here. My general impression is that that's what people are usually interested in -- parsing UUIDs etc. seems to be a rather niche concern. Nikita --001a11449396feed820550567d3e--