Re: UUID version 4 needed

2018-07-07 Thread Jeremy French via 4D_Tech
Is the version number being decoded correctly?

According to Wikipedia, there are several variants of encoding UUIDs:

1) Little-endian
2) Big-endian
3) Mixed-endian

To decode the UUID version number, you need to know what encoding variant was 
used: Little-endian, Big-endian or Mixed-endian.

Otherwise you get the wrong answer.

See: https://en.wikipedia.org/wiki/Universally_unique_identifier#Encoding

> On Jul 6, 2018, at 10:05 AM, Piotr Chabot Stadhouders via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Has this something to do with byte swapping or something? 

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: UUID version 4 needed

2018-07-07 Thread Jeffrey Kain via 4D_Tech
If you look at the MSDN site, there are a a couple of different ways to 
generate a UUID. I'm pretty sure it's not a bug in Windows but rather 4D 
calling a different function... :)

https://docs.microsoft.com/en-us/windows/desktop/api/rpcdce/nf-rpcdce-uuidcreatesequential
https://docs.microsoft.com/en-us/windows/desktop/api/combaseapi/nf-combaseapi-cocreateguid

I just looked at the source to the Win32API plug-in, and it's calling 
UuidCreate. 4D must be calling one of the other variations.

https://github.com/OrchardSoftware/4D-Win32API/blob/master/Source%20Code/Visual%20C%2B%2B%20Project/4DPlugin.c

(See line 1762)



--
Jeffrey Kain
jeffrey.k...@gmail.com




> On Jul 7, 2018, at 1:16 PM, npdennis via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> If I use the same code on Windows 8 I get one that does not look like version 
> 4:
> 
>   06CEFE7DB60C7847884A346274C254DB

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: UUID version 4 needed

2018-07-07 Thread npdennis via 4D_Tech
> Is there anybody that can confirm that on WIndows 4D generates it the wrong 
> way”?


If I generate one on Mac OS X, 4D v16.3 I get what looks like version 4:

9D93513FEC514B3DA0FC0894C87C41C6

If I use the same code on Windows 8 I get one that does not look like version 4:

06CEFE7DB60C7847884A346274C254DB

Neil


--
Neil Dennis
4D Developer since 1990


GreaText - Designing Software for the Way You Work
716 East 1850 N
North Ogden, UT 84414

mailto:npden...@greatext.com
http://www.greatext.com/

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: UUID version 4 needed

2018-07-07 Thread Chip Scheide via 4D_Tech

my only thought would be that 4D has either a bug in the windows version of 
UUID generator, or it uses/expects some underlying mechanism at the OS level 
which is broken.

> Hi Chip, Keith,
> 
> Thanks Chip for the tip!
> But still, isn't it strange that 4D v16 does generate UUID where on 
> WIndows the 15th hex digit is a 4
> 
> Thanks Keith for testing this on OSX, but unfortunately I need this 
> on both platforms.
> 
> Is there anybody that can confirm that on WIndows 4D generates it 
> "the wrong way"?
> Or is there an explanation for this?
> 
> Gr,
> 
> Piotr
> 
>> -Oorspronkelijk bericht-
>> Van: Chip Scheide <4d_o...@pghrepository.org>
>> Verzonden: vrijdag 6 juli 2018 18:02
>> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
>> CC: Piotr Chabot Stadhouders 
>> Onderwerp: RE: UUID version 4 needed
>> 
>> after just a bit of google-fu
>> I found this php routine to generate a UUID. Since, in principle 4D 
>> supports
>> php... maybe you can just generate your own.
>> 
>> if (!function_exists('com_create_guid')) {
>>   function com_create_guid() {
>> return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
>> mt_rand( 0, 0x ), mt_rand( 0, 0x ),
>> mt_rand( 0, 0x ),
>> mt_rand( 0, 0x0fff ) | 0x4000,
>> mt_rand( 0, 0x3fff ) | 0x8000,
>> mt_rand( 0, 0x ), mt_rand( 0, 0x ), mt_rand( 0, 0x )
>> );
>>   }
>> }
>> 
>> source:
>> https://helloacm.com/how-to-create-uuid-in-php/
>> 
>> also there is a bunch of discussion on StackOVerflow regarding generating a
>> UUID, in various languages, and platforms
>> 
>> 
>> On Fri, 6 Jul 2018 15:33:48 +, Piotr Chabot Stadhouders via 4D_Tech
>> wrote:
>>> Hi,
>>> 
>>> The Win32API command sys_GetGUID does return a version 4 UUID
>>> 
>>> So on Windows :
>>> Win32API generates a version 4 UUID --> 13th hex digit is a 4
>>> 4D v16 does not generate a version 4 UUID --> 15th hex digit is a 4
>>> 
>>> 
>>>> -Oorspronkelijk bericht-
>>>> Van: Dennis, Neil 
>>>> Verzonden: vrijdag 6 juli 2018 16:25
>>>> Aan: Piotr Chabot Stadhouders ; 4D iNug
>>>> Technical <4d_tech@lists.4d.com>
>>>> Onderwerp: RE: UUID version 4 needed
>>>> 
>>>>> And in fact, my 4D generated UUID is rejected by the web service,
>>>>> saying it
>>>> isn't a 4 version UUID
>>>> 
>>>> Very possible, it has been a while since I looked into it and I was
>>>> going off of my
>>>> fuzzy memory.
>>>> 
>>>> Neil
>>>> 
>>>> 
>>>> 
>>>> 
>>>> --
>>>> 
>>>> 
>>>> Privacy Disclaimer: This message contains confidential information and is
>>>> intended only for the named addressee. If you are not the named addressee
>>>> you should not disseminate, distribute or copy this email. Please
>>>> delete this
>>>> email from your system and notify the sender immediately by replying
>>>> to this
>>>> email.  If you are not the intended recipient you are notified that
>>>> disclosing,
>>>> copying, distributing or taking any action in reliance on the
>>>> contents of this
>>>> information is strictly prohibited.
>>>> 
>>>> The Alternative Investments division of UMB Fund Services provides a
>>>> full range
>>>> of services to hedge funds, funds of funds and private equity
>>>> funds.  Any tax
>>>> advice in this communication is not intended to be used, and cannot
>>>> be used, by
>>>> a client or any other person or entity for the purpose of (a)
>>>> avoiding penalties
>>>> that may be imposed on any taxpayer or (b) promoting, marketing, or
>>>> recommending to another party any matter addressed herein.
>>> 
>> 
>> **
>>> 4D Internet Users Group (4D iNUG)
>>> FAQ:  http://lists.4d.com/faqnug.html
>>> Archive:  http://lists.4d.com/archives.html
>>> Options: https://lists.4d.com/mailman/options/4d_tech
>>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>>> 
>> 
>> **
>> ---
>> Gas is for washing parts
>> Alcohol is for drinkin'
>> Nitromethane is for racing
> 

Hell is other people 
 Jean-Paul Sartre
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: UUID version 4 needed

2018-07-07 Thread Jeffrey Kain via 4D_Tech
Strange in light of what Miyako wrote that 4D just calls through to the OS. I 
guarantee you that the Win32API plug-in call is an unmodified OS call - maybe 
that’s your workaround for now?

I tested on v17 final candidate Windows 64-bit and saw the same as the others - 
no ‘4’ in that position.  But that’s the extent of my deep UUID knowledge.. :)

> On Jul 7, 2018, at 9:12 AM, Piotr Chabot Stadhouders via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Hi Chip, Keith,
> 
> Thanks Chip for the tip!
> But still, isn't it strange that 4D v16 does generate UUID where on WIndows 
> the 15th hex digit is a 4
> 
> Thanks Keith for testing this on OSX, but unfortunately I need this on both 
> platforms.
> 
> Is there anybody that can confirm that on WIndows 4D generates it "the wrong 
> way"?
> Or is there an explanation for this?
> 
> Gr,
> 
> Piotr
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: UUID version 4 needed

2018-07-07 Thread Arnaud de Montard via 4D_Tech

> Le 6 juil. 2018 à 16:05, Piotr Chabot Stadhouders via 4D_Tech 
> <4d_tech@lists.4d.com> a écrit :
> 
> And in fact, my 4D generated UUID is rejected by the web service, saying it 
> isn't a 4 version UUID



with this code:

repeat
ASSERT(Generate UUID[[13]]="4")
until(windows alt down)

v14r5, v15r5, v16r5, v17: assert is always true. 

-- 
Arnaud de Montard

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: UUID version 4 needed

2018-07-07 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Chip, Keith,

Thanks Chip for the tip!
But still, isn't it strange that 4D v16 does generate UUID where on WIndows the 
15th hex digit is a 4

Thanks Keith for testing this on OSX, but unfortunately I need this on both 
platforms.

Is there anybody that can confirm that on WIndows 4D generates it "the wrong 
way"?
Or is there an explanation for this?

Gr,

Piotr

> -Oorspronkelijk bericht-
> Van: Chip Scheide <4d_o...@pghrepository.org>
> Verzonden: vrijdag 6 juli 2018 18:02
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> CC: Piotr Chabot Stadhouders 
> Onderwerp: RE: UUID version 4 needed
> 
> after just a bit of google-fu
> I found this php routine to generate a UUID. Since, in principle 4D supports
> php... maybe you can just generate your own.
> 
> if (!function_exists('com_create_guid')) {
>   function com_create_guid() {
> return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
> mt_rand( 0, 0x ), mt_rand( 0, 0x ),
> mt_rand( 0, 0x ),
> mt_rand( 0, 0x0fff ) | 0x4000,
> mt_rand( 0, 0x3fff ) | 0x8000,
> mt_rand( 0, 0x ), mt_rand( 0, 0x ), mt_rand( 0, 0x )
> );
>   }
> }
> 
> source:
> https://helloacm.com/how-to-create-uuid-in-php/
> 
> also there is a bunch of discussion on StackOVerflow regarding generating a
> UUID, in various languages, and platforms
> 
> 
> On Fri, 6 Jul 2018 15:33:48 +, Piotr Chabot Stadhouders via 4D_Tech
> wrote:
> > Hi,
> >
> > The Win32API command sys_GetGUID does return a version 4 UUID
> >
> > So on Windows :
> > Win32API generates a version 4 UUID --> 13th hex digit is a 4
> > 4D v16 does not generate a version 4 UUID --> 15th hex digit is a 4
> >
> >
> >> -Oorspronkelijk bericht-----
> >> Van: Dennis, Neil 
> >> Verzonden: vrijdag 6 juli 2018 16:25
> >> Aan: Piotr Chabot Stadhouders ; 4D iNug
> >> Technical <4d_tech@lists.4d.com>
> >> Onderwerp: RE: UUID version 4 needed
> >>
> >>> And in fact, my 4D generated UUID is rejected by the web service,
> >>> saying it
> >> isn't a 4 version UUID
> >>
> >> Very possible, it has been a while since I looked into it and I was
> >> going off of my
> >> fuzzy memory.
> >>
> >> Neil
> >>
> >>
> >>
> >>
> >> --
> >>
> >>
> >> Privacy Disclaimer: This message contains confidential information and is
> >> intended only for the named addressee. If you are not the named addressee
> >> you should not disseminate, distribute or copy this email. Please
> >> delete this
> >> email from your system and notify the sender immediately by replying
> >> to this
> >> email.  If you are not the intended recipient you are notified that
> >> disclosing,
> >> copying, distributing or taking any action in reliance on the
> >> contents of this
> >> information is strictly prohibited.
> >>
> >> The Alternative Investments division of UMB Fund Services provides a
> >> full range
> >> of services to hedge funds, funds of funds and private equity
> >> funds.  Any tax
> >> advice in this communication is not intended to be used, and cannot
> >> be used, by
> >> a client or any other person or entity for the purpose of (a)
> >> avoiding penalties
> >> that may be imposed on any taxpayer or (b) promoting, marketing, or
> >> recommending to another party any matter addressed herein.
> >
> 
> **
> > 4D Internet Users Group (4D iNUG)
> > FAQ:  http://lists.4d.com/faqnug.html
> > Archive:  http://lists.4d.com/archives.html
> > Options: https://lists.4d.com/mailman/options/4d_tech
> > Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> >
> 
> **
> ---
> Gas is for washing parts
> Alcohol is for drinkin'
> Nitromethane is for racing
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: UUID version 4 needed

2018-07-06 Thread Keith Culotta via 4D_Tech
$a:=Substring(Generate UUID;13;1)
ALERT($a)

Mac 16.225201 64bit - returns a "4" (client/server)
Mac 17.224978 64bit - returns a "4"

Char 15 is random.

v16 tested on Macs of various ages and 10.12, 10.13.

Keith - CDI

> On Jul 6, 2018, at 10:33 AM, Piotr Chabot Stadhouders via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Hi,
> 
> The Win32API command sys_GetGUID does return a version 4 UUID
> 
> So on Windows :
> Win32API generates a version 4 UUID --> 13th hex digit is a 4
> 4D v16 does not generate a version 4 UUID --> 15th hex digit is a 4

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: UUID version 4 needed

2018-07-06 Thread Chip Scheide via 4D_Tech
after just a bit of google-fu
I found this php routine to generate a UUID. Since, in principle 4D 
supports php... maybe you can just generate your own.

if (!function_exists('com_create_guid')) {
  function com_create_guid() {
return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
mt_rand( 0, 0x ), mt_rand( 0, 0x ),
mt_rand( 0, 0x ),
mt_rand( 0, 0x0fff ) | 0x4000,
mt_rand( 0, 0x3fff ) | 0x8000,
mt_rand( 0, 0x ), mt_rand( 0, 0x ), mt_rand( 0, 0x )
);
  }
}

source:
https://helloacm.com/how-to-create-uuid-in-php/

also there is a bunch of discussion on StackOVerflow regarding 
generating a UUID, in various languages, and platforms


On Fri, 6 Jul 2018 15:33:48 +, Piotr Chabot Stadhouders via 4D_Tech 
wrote:
> Hi,
> 
> The Win32API command sys_GetGUID does return a version 4 UUID
> 
> So on Windows :
> Win32API generates a version 4 UUID --> 13th hex digit is a 4
> 4D v16 does not generate a version 4 UUID --> 15th hex digit is a 4
> 
> 
>> -Oorspronkelijk bericht-
>> Van: Dennis, Neil 
>> Verzonden: vrijdag 6 juli 2018 16:25
>> Aan: Piotr Chabot Stadhouders ; 4D iNug
>> Technical <4d_tech@lists.4d.com>
>> Onderwerp: RE: UUID version 4 needed
>> 
>>> And in fact, my 4D generated UUID is rejected by the web service, 
>>> saying it
>> isn't a 4 version UUID
>> 
>> Very possible, it has been a while since I looked into it and I was 
>> going off of my
>> fuzzy memory.
>> 
>> Neil
>> 
>> 
>> 
>> 
>> --
>> 
>> 
>> Privacy Disclaimer: This message contains confidential information and is
>> intended only for the named addressee. If you are not the named addressee
>> you should not disseminate, distribute or copy this email. Please 
>> delete this
>> email from your system and notify the sender immediately by replying 
>> to this
>> email.  If you are not the intended recipient you are notified that 
>> disclosing,
>> copying, distributing or taking any action in reliance on the 
>> contents of this
>> information is strictly prohibited.
>> 
>> The Alternative Investments division of UMB Fund Services provides a 
>> full range
>> of services to hedge funds, funds of funds and private equity 
>> funds.  Any tax
>> advice in this communication is not intended to be used, and cannot 
>> be used, by
>> a client or any other person or entity for the purpose of (a) 
>> avoiding penalties
>> that may be imposed on any taxpayer or (b) promoting, marketing, or
>> recommending to another party any matter addressed herein.
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: UUID version 4 needed

2018-07-06 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

The Win32API command sys_GetGUID does return a version 4 UUID

So on Windows :
Win32API generates a version 4 UUID --> 13th hex digit is a 4
4D v16 does not generate a version 4 UUID --> 15th hex digit is a 4


> -Oorspronkelijk bericht-
> Van: Dennis, Neil 
> Verzonden: vrijdag 6 juli 2018 16:25
> Aan: Piotr Chabot Stadhouders ; 4D iNug
> Technical <4d_tech@lists.4d.com>
> Onderwerp: RE: UUID version 4 needed
> 
> > And in fact, my 4D generated UUID is rejected by the web service, saying it
> isn't a 4 version UUID
> 
> Very possible, it has been a while since I looked into it and I was going off 
> of my
> fuzzy memory.
> 
> Neil
> 
> 
> 
> 
> --
> 
> 
> Privacy Disclaimer: This message contains confidential information and is
> intended only for the named addressee. If you are not the named addressee
> you should not disseminate, distribute or copy this email. Please delete this
> email from your system and notify the sender immediately by replying to this
> email.  If you are not the intended recipient you are notified that 
> disclosing,
> copying, distributing or taking any action in reliance on the contents of this
> information is strictly prohibited.
> 
> The Alternative Investments division of UMB Fund Services provides a full 
> range
> of services to hedge funds, funds of funds and private equity funds.  Any tax
> advice in this communication is not intended to be used, and cannot be used, 
> by
> a client or any other person or entity for the purpose of (a) avoiding 
> penalties
> that may be imposed on any taxpayer or (b) promoting, marketing, or
> recommending to another party any matter addressed herein.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: UUID version 4 needed

2018-07-06 Thread Dennis, Neil via 4D_Tech
> And in fact, my 4D generated UUID is rejected by the web service, saying it 
> isn't a 4 version UUID

Very possible, it has been a while since I looked into it and I was going off 
of my fuzzy memory.

Neil




--


Privacy Disclaimer: This message contains confidential information and is 
intended only for the named addressee. If you are not the named addressee you 
should not disseminate, distribute or copy this email. Please delete this email 
from your system and notify the sender immediately by replying to this email.  
If you are not the intended recipient you are notified that disclosing, 
copying, distributing or taking any action in reliance on the contents of this 
information is strictly prohibited.

The Alternative Investments division of UMB Fund Services provides a full range 
of services to hedge funds, funds of funds and private equity funds.  Any tax 
advice in this communication is not intended to be used, and cannot be used, by 
a client or any other person or entity for the purpose of (a) avoiding 
penalties that may be imposed on any taxpayer or (b) promoting, marketing, or 
recommending to another party any matter addressed herein.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: UUID version 4 needed

2018-07-06 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Dennis,

There is something strange:
Indeed, when I look at the generated UUID in 4D the 15th hex digit is always 4
But, as far as I know the docs say : "set the four most significant bits of the 
7th byte to 0100'B, so the high nibble is 4"
This means that the 13th hex digit must be 4

And in fact, my 4D generated UUID is rejected by the web service, saying it 
isn't a 4 version UUID

Has this something to do with byte swapping or something? What should I do?
This has been tested with 4D v16R6 on a 64-bit Windows laptop

Gr,

Piotr

> -Oorspronkelijk bericht-
> Van: Dennis, Neil 
> Verzonden: donderdag 5 juli 2018 17:06
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> CC: Piotr Chabot Stadhouders 
> Onderwerp: RE: UUID version 4 needed
> 
> > Does anybody know how to generate an UUID version 4
> 
> Doesn't 4D already generate version 4 UUIDs? In version 4 the 15th hex digit 
> is
> always a 4, it seems that this is what 4D uses.
> 
> If you need a good explanation, of the various types, wikipedia works
> https://en.wikipedia.org/wiki/Universally_unique_identifier
> 
> Neil
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Privacy Disclaimer: This message contains confidential information and is
> intended only for the named addressee. If you are not the named addressee
> you should not disseminate, distribute or copy this email. Please delete this
> email from your system and notify the sender immediately by replying to this
> email.  If you are not the intended recipient you are notified that 
> disclosing,
> copying, distributing or taking any action in reliance on the contents of this
> information is strictly prohibited.
> 
> The Alternative Investments division of UMB Fund Services provides a full 
> range
> of services to hedge funds, funds of funds and private equity funds.  Any tax
> advice in this communication is not intended to be used, and cannot be used, 
> by
> a client or any other person or entity for the purpose of (a) avoiding 
> penalties
> that may be imposed on any taxpayer or (b) promoting, marketing, or
> recommending to another party any matter addressed herein.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: UUID version 4 needed

2018-07-05 Thread Dennis, Neil via 4D_Tech
> As far as I know most computers generate pseudo random and if so will 
> increase chance of UUID's colliding no?

Correct

> However it would be an advantage to "know" what the limitations (of what we 
> mostly use to generate unique keys) are

For there to be a one in a billion chance of duplication, 103 trillion version 
4 UUIDs must be generated 
(https://en.wikipedia.org/wiki/Universally_unique_identifier)

Neil






--

Privacy Disclaimer: This message contains confidential information and is 
intended only for the named addressee. If you are not the named addressee you 
should not disseminate, distribute or copy this email. Please delete this email 
from your system and notify the sender immediately by replying to this email.  
If you are not the intended recipient you are notified that disclosing, 
copying, distributing or taking any action in reliance on the contents of this 
information is strictly prohibited.

The Alternative Investments division of UMB Fund Services provides a full range 
of services to hedge funds, funds of funds and private equity funds.  Any tax 
advice in this communication is not intended to be used, and cannot be used, by 
a client or any other person or entity for the purpose of (a) avoiding 
penalties that may be imposed on any taxpayer or (b) promoting, marketing, or 
recommending to another party any matter addressed herein.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: UUID version 4 needed

2018-07-05 Thread Keisuke Miyako via 4D_Tech
I'm not sure how that would solve any uncertainties.

4D is a native Win32/Cocoa/Carbon app,
so it would be natural to assume that it simply calls

UuidCreate on Windows and
[NSUUID UUID] or CFUUIDCreate on Mac.

but will then go on to ask Apple and Microsoft the same question?
as already pointed out, the version is apparent from the value itself.

> 2018/07/06 1:00、Jim Labos - infobase via 4D_Tech <4d_tech@lists.4d.com> のメール:
> This brings up the question of shouldn't 4D confirm what method they are
> using?



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: UUID version 4 needed

2018-07-05 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Neil,

For some reason I thought it is not version 4. I hope you are right!

@Steven :
Unfortunately the webservice we are talking with demands a message with a UUID 
version 4 generated message ID. Don't ask me why.

Gr,

Piotr

> -Oorspronkelijk bericht-
> Van: Dennis, Neil 
> Verzonden: donderdag 5 juli 2018 17:06
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> CC: Piotr Chabot Stadhouders 
> Onderwerp: RE: UUID version 4 needed
> 
> > Does anybody know how to generate an UUID version 4
> 
> Doesn't 4D already generate version 4 UUIDs? In version 4 the 15th hex digit 
> is
> always a 4, it seems that this is what 4D uses.
> 
> If you need a good explanation, of the various types, wikipedia works
> https://en.wikipedia.org/wiki/Universally_unique_identifier
> 
> Neil
> 

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: UUID version 4 needed

2018-07-05 Thread Jim Labos - infobase via 4D_Tech
This brings up the question of shouldn't 4D confirm what method they are
using?

The random (version 4) does rely on the host computer's system to generate
the randomness I would assume so that becomes the weakness (according to the
definitions). As far as I know most computers generate pseudo random and if
so will increase chance of UUID's colliding no? Albeit the chances are still
astronomical. However it would be an advantage to "know" what the
limitations (of what we mostly use to generate unique keys) are.

Cheers



-
Jim Labos - infobase
--
Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: UUID version 4 needed

2018-07-05 Thread Dennis, Neil via 4D_Tech
> Does anybody know how to generate an UUID version 4

Doesn't 4D already generate version 4 UUIDs? In version 4 the 15th hex digit is 
always a 4, it seems that this is what 4D uses.

If you need a good explanation, of the various types, wikipedia works 
https://en.wikipedia.org/wiki/Universally_unique_identifier

Neil











Privacy Disclaimer: This message contains confidential information and is 
intended only for the named addressee. If you are not the named addressee you 
should not disseminate, distribute or copy this email. Please delete this email 
from your system and notify the sender immediately by replying to this email.  
If you are not the intended recipient you are notified that disclosing, 
copying, distributing or taking any action in reliance on the contents of this 
information is strictly prohibited.

The Alternative Investments division of UMB Fund Services provides a full range 
of services to hedge funds, funds of funds and private equity funds.  Any tax 
advice in this communication is not intended to be used, and cannot be used, by 
a client or any other person or entity for the purpose of (a) avoiding 
penalties that may be imposed on any taxpayer or (b) promoting, marketing, or 
recommending to another party any matter addressed herein.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: UUID version 4 needed

2018-07-05 Thread Stephen J. Orth via 4D_Tech
Piotr,

I'm curious why you would need a V4 version, because the only difference 
between the two types is "uniqueness" versus "randomness".

Best,


Steve


-Original Message-
From: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] On Behalf Of Piotr Chabot 
Stadhouders via 4D_Tech
Sent: Thursday, July 05, 2018 9:54 AM
To: 4D iNug Technical <4d_tech@lists.4d.com>
Cc: Piotr Chabot Stadhouders 
Subject: UUID version 4 needed

Hi all,

I need to generate an UUID but it MUST be version 4
I know in 4D there is the command Generate UUID and the NTK plugin has the 
command NTK Create UUID but as far as I know they both are not UUID version 4

Does anybody know how to generate an UUID version 4?

Thanks,

Piotr

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**