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, the first is the date in days, the maximum being 49,710 days, then the time of day in seconds, the maximum being 86,400 seconds, then the number of fractional seconds as a float (eg. 0.023414)
It seems to me that breaking up the time into each component leads to some very long lists, so this method would be more compact. The parsing of this format could easily be done with Pd core.
.hc
On Jun 12, 2006, at 1:28 PM, Thomas Grill wrote:
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@iem.at http://lists.puredata.info/listinfo/pd-dev
------------------------------------------------------------------------
If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of everyone, and the receiver cannot dispossess himself of it. - Thomas Jefferson