[PD-dev] common date format for Pd

Hans-Christoph Steiner hans at eds.org
Mon Jun 12 23:55:13 CEST 2006


On Jun 12, 2006, at 3:46 PM, carmen wrote:

>> Yeah, I guess that makes sense to avoid symbols.  In which case,  
>> it probably makes sense to split up the UNIX time_t into two numbers
>
>>> Since i use messages like [double hi lo( with summed single- 
>>> precision parts hi and lo to represent double-precision numbers,  
>>> i would suggest
>>> something like [date ymd hms( where ymd and hms are some numbers  
>>> that get encoded and decoded by some objects.
>
> imo using the integer (float for subseconds) unixdate would be  
> preferable, since it easily lends itself to simple processing -  
> like adding 90 seconds without thinking about rolling over to the  
> minute field. or nesting a set of abstractions for minute, hour,  
> day, january, etc.. if pd can't really store the unix timestamp  
> without munging it, that should be fixed.
>
>>>> Since Pd only has 19bits of integer resolution
>
> are you sure about this? i seem to recall matju explaining its 23  
> bits or so..

Either way, 32bits are needed for UNIX time.  And making Pd support  
32 bit ints would be a massive, fundamental change.  The only option  
is get a 64-bit machine, then Pd will be able to represent 32 bit  
ints in a 64-bit float.

.hc

------------------------------------------------------------------------

Looking at things from a more basic level, you can come up with a  
more direct solution... It may sound small in theory, but it in  
practice, it can change entire economies.     - Amy Smith






More information about the Pd-dev mailing list