[PD-dev] common date format for Pd
Thomas Grill
gr at grrrr.org
Mon Jun 12 19:28:16 CEST 2006
Hi all,
it may depend on the actual application, but generally i don't think
that symbols are a good idea.
Every generated symbol uses an entry in the symbol table and stays in
memory until PD is restarted, which effectively is a memory leak for
varying data.
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.
greetings,
Thomas
Am 12.06.2006 um 18:47 schrieb Hans-Christoph Steiner:
>
> Since Pd only has 19bits of integer resolution, we can't use UNIX time
> within Pd. So I was thinking that perhaps ISO format would would well
> in Pd since its a symbol:
>
> For example:
>
> Today is 2006-06-12. This email was sent written at 12:40:23. All of
> this can be lumped together as 20060612T124023. I am not sure if this
> ISO unified date/time format officially supports fractional seconds,
> but since it does support fractional seconds in the time
> (12:40:23.2342), and the digit positions are fixed, so I think we can
> easily just tack on fractional seconds like this:
> 20060612T124023.2342. I think keeping the "." is preferable since ISO
> 8601 says 12:40:23.2342 can be shorted to 124023.2342, but I didn't
> see mention of 1240232342.
>
> One problem is that ISO 8601 allows you to omit the separators "-" and
> ":", which would then make it a float in Pd, and therefore it would be
> truncated to 6 digits. So we couldn't support that.
>
> Here's a page all about ISO 8601 date/time formats:
>
> http://www.cl.cam.ac.uk/~mgk25/iso-time.html#time
>
> Thoughts? Comments? Flames? ;)
>
> .hc
>
> -----------------------------------------------------------------------
> -
>
> I have the audacity to believe that peoples everywhere can have three
> meals a day for their bodies, education and culture for their minds,
> and dignity, equality and freedom for their spirits. - Martin
> Luther King, Jr.
>
>
>
> _______________________________________________
> PD-dev mailing list
> PD-dev at iem.at
> http://lists.puredata.info/listinfo/pd-dev
>
>
More information about the Pd-dev
mailing list