On Sep 1, 2015, at 10:43 AM, Kevin Wolf wrote: > Am 01.09.2015 um 16:18 hat Programmingkid geschrieben: >> >> On Sep 1, 2015, at 8:34 AM, Kevin Wolf wrote: >> >>> Am 27.08.2015 um 14:32 hat Jeff Cody geschrieben: >>>> I'm not married to the ID generation scheme I proposed. >>>> >>>> What I am trying to do, however, is have a technical discussion on >>>> generating an ID in a well-formed manner. And hopefully, in a way >>>> that is useful to all interested subsystems, if possible. >>>> >>>> Do you disagree with the requirements I listed above? If so, it would >>>> be useful to begin the discussion around that. For ease of >>>> discussion, I'll list them again: >>>> >>>> * Reserved namespaces >>>> * Uniqueness >>>> * Non-predictable (to avoid inadvertently creating a de facto ABI) >>>> >>>> >>>> . . . >>>> >>>> On the generation scheme proposed above: >>>> >>>> I understand that something you desire is an ID that is easier to >>>> type. >>>> >>>> If we wanted to make it shorter, perhaps we could have the number >>>> counter be variable length: >>>> >>>> qemu#ss#D#XY >>>> | | | | >>>> qemu reserved - | | | >>>> | | | >>>> subsystem name ---| | | >>>> | | >>>> counter --------| | >>>> | >>>> 2-digit random ---| >>> >>> Even with keeping all of the information in there we can shorten the ID >>> a bit more: # at the start is enough to mark it as autogenerated, the >>> subsystem seems nice to have in there anyway, and the # separators can >>> be removed without making the ID less unique (assuming that subsystems >>> never end in a digit). This results in an ID that looks like a three (or >>> more) digit number for the subsystem, where the last two digits are >>> random, like this: >>> >>> #block150 >>> #block219 >>> #block344 >>> ... >>> >>> That seems easy to type and still fulfills all of the criteria. >>> >>> Kevin >> >> I do know that some really want an indicator that shows that an ID is >> auto-generated. But we could still do this and keep the ID short. What if >> the auto-generated ID just started with a character the user could never use >> at the beginning of the ID. I suggest we use an underscore to indicate >> machine-generated ID's. Something like this _1. It is very simple and >> effective. > > That's what I already did. # is a reserved character. I don't think > something like #block150 is unreasonably long, it's a bit more > descriptive than _1, and it fulfills all of Jeff's criteria, which _1 > clearly doesn't.
The rules aren't all necessary.