[chuck-users] giving birth made easy (and head-hitting)
signal.automatique at gmail.com
Fri Jan 11 15:35:26 EST 2008
It turns out that for a VM that has been running for a arbitrarily long time
it's still easy to find the time of it's birth.
considder the following;
now - (now /samp)::samp => time start;
if (start == birth) <<<"Yay">>>;
So, it's possible after all to define objects of type time wthout using time
after all; adding durations to a "fresh" time object will in fact do.
Next up; a poor man's casting;
//time to duration and dur to time by Kassen.
//considered trivial once I thought of it
//no rights reserved
fun time dtot (dur input)
//duration to time
//probably leaks memory
input +=> garbage;
fun dur ttod (time input)
//time to duration
//here we go again with the strong typing
return ( input/samp )::samp;
*hits head again*
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the chuck-users