[chuck-users] time goes backwards (and I don't like that)
Robert Poor
rdpoor at gmail.com
Fri Mar 13 19:02:07 EDT 2009
Kas:
> This is quite clearly wrong, the two times should be the same.
*Whew* -- thanks -- I was worried that I was suffering a dissociative
fugue (not to be confused with a counter-fugue).
A hint to the hunting party: the "wrong" time returned by now always
seems to be an integer. It's as if the fractional part is getting
lopped off - either by truncation or rounding, I'm not sure which.
Fetch me my halberd!
- Rob
On 13 Mar 2009, at 15:49, Kassen wrote:
> Rob;
>
>
> 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! ;¬)
>
> Yours,
> Kas.
>
> ==============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 >>>;
> _e.broadcast();
> }
> }
>
>
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
More information about the chuck-users
mailing list