Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99160 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52083 invoked from network); 24 May 2017 20:12:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 May 2017 20:12:11 -0000 Authentication-Results: pb1.pair.com smtp.mail=ben@benramsey.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ben@benramsey.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain benramsey.com from 209.85.220.176 cause and error) X-PHP-List-Original-Sender: ben@benramsey.com X-Host-Fingerprint: 209.85.220.176 mail-qk0-f176.google.com Received: from [209.85.220.176] ([209.85.220.176:33709] helo=mail-qk0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 85/B0-10292-919E5295 for ; Wed, 24 May 2017 16:12:11 -0400 Received: by mail-qk0-f176.google.com with SMTP id y201so162914366qka.0 for ; Wed, 24 May 2017 13:12:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=benramsey-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=yHKYZp7LxQkPybGybIIWOYmYFFEWVtqvn4sH5aGasC8=; b=veghJydKoGi8mXnbobwoVpXwfnDw0dFIWT0f/aB1x6fFYFl3BiCFXT8ZM9T5k0My4t DvrQIHihn4bXggck6cYb3DIFl0syte0R1oCXOAydSKdZKjjjQdnHdbWzsINM0DqENIl3 M+3hWAAfa/YbXPynY0JCyuQX6Tvoa5upRkv5j8JV+dT+M0ZwzT33QIJrqYjY7hYiTNgv a/IalJtmLafb9KpF3FG0Y2K6TSqOW0vWbZs1J2QglRW29isib89fdadEM4/+4KN01fi1 j1qGXkH2k1KnKlY3/dmPq+4JsGzqtcueOB9PJjsWmI1KDHlMwnHWNjSWPMasCr+kVkHl vJrA== 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=yHKYZp7LxQkPybGybIIWOYmYFFEWVtqvn4sH5aGasC8=; b=WD0jNPKuww9HzKRNCL8Oi+kzEYpM/G555bAveNnn58YuA1Ei3p5tPcB6cuBzY0Hvwd +FzzGm9HH9Jq8lUihXEjOk9J/559HGEvE9wJ/5pnrxea6G4OoI1uPIt1x9+/x8vN93Vq FoUKqQc42ZXZhMvQAY6nUEbIKPZzVgq99X+b2fDJ+Xek7BiZzVX0cDUox0bzc/NfSl0J CKzAFNg3Q3IOz94koj5J3tmV+JUaw3yVCKcyrTqh6eYhAm6pHutbGAiLmoKNU5Jq942A 8HZJbRkMciyVMfA9p4XaELBQdGCQzDZJLitqaD80CVG+V1dwKXxeGIVCb8qZo4twzrc9 Uv1g== X-Gm-Message-State: AODbwcDmkBVOzc6cG4P+CmprcTO2qzQa5vAlT/9ezJLYfvK4Wfj8lcjf t9kdAWir18pqBeUFK7lckEvJKPi1lU6P X-Received: by 10.55.165.196 with SMTP id o187mr32139737qke.88.1495656727253; Wed, 24 May 2017 13:12:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.237.39.99 with HTTP; Wed, 24 May 2017 13:12:06 -0700 (PDT) In-Reply-To: References: Date: Wed, 24 May 2017 16:12:06 -0400 Message-ID: To: Marco Pivetta Cc: Fleshgrinder , php-internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [RFC] [Discussion] UUID From: ben@benramsey.com (Ben Ramsey) On Wed, May 24, 2017 at 2:47 PM, Marco Pivetta wrote: > > On Wed, May 24, 2017 at 8:39 PM, Fleshgrinder wrote: > > > > Furthermore, I carefully crafted everything to be as close to userland > > as possible. No magic, none at all. I use default PHP built-in stuff for > > everything. Even the parameter parsing is 1:1 as it would be if you > > would define the very same class in PHP. > > > > I will extend my signature with "No Magic!" now. ;) > > > > Perfect, this absolutely makes it a huge :+1: on my side. > > Last thing I'd suggest is to grab Ben Ramsey and get him to check the patch > :-) > 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