Re: How short can I make it
Re: How short can I make it
- Subject: Re: How short can I make it
- From: "Mark J. Reed" <email@hidden>
- Date: Thu, 13 Oct 2011 20:07:15 -0400
The logic is the same (though base 64, as a power of 2, can be implemented much more efficiently on computer hardware), but it's worth pointing out that Base64 encoding is not a traditional numeric representation. The name doesn't lie - it is certainly a true base-64 format. But the selection of digits does not follow the usual pattern (couldn't, really, since the usual pattern runs out at 36). For instance, 0-9 are not represented by themselves (the value of 0 is represented by 'A', while '0' represents 52), upper and lowercase are distinct ('a' represents 26), and the digit set includes punctuation marks ('+' for 62, '/' for 63).
On Thursday, October 13, 2011, Doug McNutt <
email@hidden> wrote:
> At 15:04 -0700 10/13/11, Stan Cleveland wrote:
>>On Oct 13, 2011, at 10:01 AM, Mark J. Reed wrote:
>>
>>>9 digits? Not in decimal - epoch time broke 10 digits in 2001. As I type this it's 1,318,524,834. That's 8 digits in hexadecimal. Or 6 digits in base 36 (0,1,2,3,4,5,6,7,8,9,a,b,c,d,...,z)...
>>>
>>Base 36? Very interesting. Do you have AS routines to share for doing conversions between decimal and base 36 and back again? Or even better, between any two bases in the range of, say, 2 to 36?
>
> Base 36 would be not much different from Base 64 here. There is lots of code for that.
>
> But then a simple loop doing integer divisions by 36 and using the remainder as the next digit in a result would be pretty simple unless AppleScript gets in the way.
>
> --
>
> --> 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.
> Archives:
http://lists.apple.com/archives/applescript-users>
> This email sent to
email@hidden
>
--
Mark J. Reed <
email@hidden>
_______________________________________________
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