New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup in Time.js #210

Merged
merged 3 commits into from Apr 10, 2015

Conversation

Projects
None yet
2 participants
@jvoigtlaender
Contributor

jvoigtlaender commented Apr 10, 2015

Done in the aftermath of elm-lang@9d52af2.

Main difference: fps is already defined from fpsWhen in Time.elm, so there is no need anymore to have it in Time.js.

Something I noticed while going through this: somewhere along the way, Time.delay and Time.since seem to have vanished. Purposefully?

jvoigtlaender added some commits Apr 10, 2015

remove fps from Time.js
... because it is now defined in Time.elm
ticking with null instead of Utils.Tuple0
... thus making the import of Native.Utils superfluous
directly use the functions from Native.Signal
... thus making the import of Signal.elm superfluous

evancz pushed a commit that referenced this pull request Apr 10, 2015

@evancz evancz merged commit 47b2f6f into elm:master Apr 10, 2015

1 check failed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
@evancz

This comment has been minimized.

Show comment
Hide comment
@evancz

evancz Apr 10, 2015

Member

Great, thank you! I removed delay and since because I think it'll be better to recommend doing that kind of thing with Task.sleep. I'm not sure if that's true given that things go out ports. Are there things that definitely need those things right now?

Member

evancz commented Apr 10, 2015

Great, thank you! I removed delay and since because I think it'll be better to recommend doing that kind of thing with Task.sleep. I'm not sure if that's true given that things go out ports. Are there things that definitely need those things right now?

@jvoigtlaender jvoigtlaender deleted the jvoigtlaender:time-cleanup branch Apr 10, 2015

@jvoigtlaender

This comment has been minimized.

Show comment
Hide comment
@jvoigtlaender

jvoigtlaender Apr 10, 2015

Contributor

Rate-limiting a signal, as useful e.g. for certain UI behavior. Like explained here. There was a relevant thread on the mailing list where we ended up with an Elm implementation based on Time.since. The need for such rate-limiting has come up more than once on the mailing list, so I'm pretty sure people would not be pleased to lose it. I don't immediately see how to do it with Task.sleep.

Contributor

jvoigtlaender commented Apr 10, 2015

Rate-limiting a signal, as useful e.g. for certain UI behavior. Like explained here. There was a relevant thread on the mailing list where we ended up with an Elm implementation based on Time.since. The need for such rate-limiting has come up more than once on the mailing list, so I'm pretty sure people would not be pleased to lose it. I don't immediately see how to do it with Task.sleep.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment