On Jan 7, 2008 1:50 PM, Kassen <signal.automatique@gmail.com> wrote:
<snip>
<<<now /minute>>>; is quite legal and will return a float expressing the amount of minutes the VM has been alive. I see "now" and other times as a duration with the start of the VM as it's start.
So; we can divide "now" by a duration and get a float but a float times a duration will always be a "duration" and not a "time", so far, in practice.
A keyword for this may not be enough. The following is a attempt to create my own "birth" keyword expressing this. I can't get it smaller then this and I would say this is quite perverse in a way;
//strongly typed meets strongly timed :¬p
//at least it runs and works....
now - ((now /samp)::samp) => time birth;
I'd say this means casting can make sense but I'm open to ideas.
Of course, you could just approximate this functionality by having this line run the moment the vm starts:
now => time vmstart;
Then, you'd be able to the do everything relative to that time. At least, that's how I would solve it.
Maybe you'll like my attempt above too.... well, I think it works....
Kas.
_______________________________________________
chuck-users mailing list
chuck-users@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users