On Jan 7, 2008 1:50 PM, Kassen &lt;<a href="mailto:signal.automatique@gmail.com">signal.automatique@gmail.com</a>&gt; wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
&lt;snip&gt;<div><div><br>&lt;&lt;&lt;now /minute&gt;&gt;&gt;; is quite legal and will return a float expressing the amount of minutes the VM has been alive. I see &quot;now&quot; and other times as a duration with the start of the VM as it&#39;s start.
<br><br>So; we can divide &quot;now&quot; by a duration and get a float but a float times a duration will always be a &quot;duration&quot; and not a &quot;time&quot;, so far, in practice.<br>&nbsp;</div></div></blockquote><div>
<br>Oh, but that&#39;s far weirder!&nbsp; I would not have expected that to be legal.&nbsp; So &quot;now&quot; is a strange animal indeed, having traits of both time and duration...<br><br>Actually, it looks like any time type divided by a duration returns a float.&nbsp; hrm...&nbsp; I wouldn&#39;t have guessed.&nbsp; 
<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div><br>A keyword for this may not be enough. The following is a attempt to create my own &quot;birth&quot; keyword expressing this. I can&#39;t get it smaller then this and I would say this is quite perverse in a way;
<br><br>&nbsp;//strongly typed meets strongly timed :¬p<br>//at least it runs and works....<br>now - ((now /samp)::samp) =&gt; time birth;<br><br>I&#39;d say this means casting can make sense but I&#39;m open to ideas.</div></div>
</blockquote><div><br>I still don&#39;t like the idea that a time can be cast as a duration-from-vm-start, however, a &quot;birth&quot; keyword makes sense.&nbsp; Consider this:<br><br>2::second =&gt; now;&nbsp; // is kind of like &quot;for the next two seconds&quot; or &quot;two seconds from now&quot;, etc.
<br><br>if we had some idiom for &quot;since&quot;...&nbsp; like:<br><br>since(now, birth) =&gt; dur aliveTime;&nbsp;&nbsp;&nbsp; // which you could build...<br><br>or:<br><br>2::second + birth =&gt; time twoSecAfterBirth;<br><br>You&#39;re right, that would make timing relative to the VM starting up much simpler.&nbsp; 
<br><br>your way is clever:<br>&nbsp;//strongly typed meets strongly timed :¬p<br>//at least it runs and works....<br>now - ((now /samp)::samp) =&gt; time birth;<br><br>But I feel like you shouldn&#39;t have to do that.&nbsp; I see how you could easily abstract this using functions, but a keyword for the time that the VM started seems like it would be easier, more global, etc.
<br><br>at least, this returns a -1:<br><br>now - ((now /samp)::samp) =&gt; time birth;<br>&lt;&lt;&lt;(birth - 2::second) /2::second&gt;&gt;&gt;;<br><br>I was worried...&nbsp; :)<br><br>-mike<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div><br>&nbsp;<br>
<br><br></div><div class="Ih2E3d"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Of course, you could just approximate this functionality by having this line run the moment the vm starts:
<br><br>now =&gt; time vmstart;<br><br>Then, you&#39;d be able to the do everything relative to that time.&nbsp; At least, that&#39;s how I would solve it.
</blockquote></div><div><br>Maybe you&#39;ll like my attempt above too.... well, I think it works....<br><br>Kas.<br><br><br></div></div>
<br>_______________________________________________<br>chuck-users mailing list<br><a href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a><br><a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br><br></blockquote></div><br><br clear="all"><br>-- <br><a href="http://semiotech.org">http://semiotech.org</a><br><a href="http://blog.deadlylittlepills.com">
http://blog.deadlylittlepills.com</a><br><a href="http://www.murderkills.com">http://www.murderkills.com</a><br><a href="http://shadowofaculture.blogspot.com">http://shadowofaculture.blogspot.com</a>