Re: iPhoto returns a real number as a photo id
Re: iPhoto returns a real number as a photo id
- Subject: Re: iPhoto returns a real number as a photo id
- From: Doug McNutt <email@hidden>
- Date: Mon, 14 Jun 2010 17:21:02 -0600
At 08:31 +1000 6/15/10, Shane Stanley wrote:
>On 15/6/10 5:25 AM, "Rob Lewis" <email@hidden> wrote:
>> "every photo whose id is 4.943105932E+9" is just frickin' bizarre.
>>
>None of which really answers my question: what can't you do with them that
>you could if they were integers?
It would be a bit difficult to mask off the part of the ID that refers to a photo session or perhaps the date bits. But then Is the format of the ID integer public information in iPhoto?
AppleScript would have considerable difficulty printing out an ID stored that way if there is a desire to match what iPhoto prints.
At 08:33 +1000 6/15/10, Shane Stanley wrote:
>On 15/6/10 8:00 AM, "has" <email@hidden> wrote:
>> AppleScript since its integers are only 30-bit or 62-bit depending on
>> architecture
>
>Where are these 62-bit integers you speak of?
Surely he's referring to an integer that is two bits shy of 64 the same way 30 is two bits shy of 32.
But even that's not completely clear in Applescript. which seems to be limited to 2^29 -1 regardless of the size of the integer on the current machine. It's likely that AppleScript uses those 30 bits to allow for a sign with 29 bits of the absolute value or perhaps it's a 30 bit signed integer in two's complement notation.
Can iPhoto ID's be negative? Do they use 32 bit unsigned integers? Remember that floats and doubles are sign and magnitude even though up to 52 bit integers are exactly represented. (It's things like 1/10 that create accuracy problems because of repeating binary fractions.)
--
--> From the U S of A, the only socialist country that refuses to admit it. <--
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden