[chuck-users] time goes backwards (and I don't like that)

Kassen signal.automatique at gmail.com
Fri Mar 13 18:49:28 EDT 2009


> One might think that the while(true) shred woke up *before* _e got
> triggered, but Apple isn't yet building computers with tachyon technology.

I fear the exact same happens on the battered old AMD build here and running
Linux. I'm really quit sure I didn't put anything expensive, rare or exotic
in here.

>  Can someone tell me what's really going on???  Failing that, know any
> doctors who will prescribe a selective serotonin reuptake inhibitor to keep
> me from tearing my hair out?

This is quite clearly wrong, the two times should be the same. Something has
gone wrong in the Shreduler; I've been suspecting there have been changes to
the shreduler since the last version as some of the execution order in my
sequencer has gone very odd indeed, needing a extra ms of advanced time just
to get the shreds to execute in the right order but the cause of this has
eluded me. I'm going to test this with some older versions of ChucK, in the
meantime; I'll past my edits to your code below, I edited it slightly,
removing one  un-nesicary yield and adding a extra printed line to have
ChucK compare the times instead of me, the point to that is to get rid of
rounding errors caused by printed values being truncated after six digits
after the decimal point and because I'm lazy.

This, to put it bluntly, looks very bad and very wrong; seroteine uptake
inhibitors take way too long to get going, let's form a hunting party. Get
the nets, the pitch-forks and war drums and let's catch this bug! ;¬)


==============pasted code below==============

Event _e;
time _t;
time foo;

spork ~ beatProcess();

while (true) {
   now + 1.001::second => _t;
   _e => now;
   if (foo > now) <<<"bang">>>;
   now => foo;

   <<< "returned from _e => now at", now >>>;

fun void beatProcess() {
   while (true) {
       _t => now;
       if (foo > now) <<<"bang">>>;
       now => foo;
       <<< "broadcasting at", now >>>;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20090313/bdcf9561/attachment-0001.html>

More information about the chuck-users mailing list