brownplt / pyret-lang

The Pyret language.
Other
1.07k stars 110 forks source link

negative seconds-per-tick should error #977

Closed jpolitz closed 4 years ago

jpolitz commented 7 years ago

Currently, it sends a negative value to setTimeout, which uses the browser's minimum time threshold for the delay.

blerner commented 7 years ago

@joe, is this properly a CPO issue with world.js? I don't see it in reactors.js anywhere...

blerner commented 7 years ago

Fixed by https://github.com/brownplt/pyret-lang/commit/a24b53c56a9ef6dfa4ff8defd98a5da5c65c00e0

blerner commented 7 years ago

Ugh, this gives an error, but a meaningless, unactionable one!

The annotation
  seconds-per-tick: [[[[-1]]]],
was not satisfied by the value
-1

Uh, what annotation? What's wrong with this value?

I could've sworn I'd gotten better annotation error than this when I committed the fix above.

schanzer commented 4 years ago

This appears to do the right thing now: image

@blerner OK to close?