-
Notifications
You must be signed in to change notification settings - Fork 149
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
Fancy throttle #242
Fancy throttle #242
Conversation
This reminds me of #184 which has some similar constructs. Also, at a glance I wonder if there is much use to using Semigroup if you are not forcing the intermediate value. |
That is a fancy throttle! Nice! |
Does this behave as expected for a delay of 5s and a example input signal that fires once every second? I'd expect proper 5s intervals of silence, as you'd get if only the non-immediate-mode-entering signals trigger, after a delay, the back-to-immediate-mode switch. |
@3noch (maybe a question for James) do we have a test that would answer @lspitzner's question? We should definitely figure out how this interacts/overlaps with #184 before merging. @cgibbard may also have some thoughts as the throttle code here seems to be an upgraded version of something he wrote (that somehow never made it to develop..) Line 243 in 4bdf228
|
cc @xplat |
I had exactly the same question after reading the code for It's all twisty, but it works. |
Right, i should have noticed that. sorry. Looks fine to me! (and regarding functionality overlap: I think it is worth having this function in addition to the #184 ones. Even if you could express fancy-throttle in terms of |
should we add that clarification to the documentation?
…On Tue, Nov 6, 2018, 16:15 Lennart Spitzner ***@***.*** wrote:
Right, i should have noticed that. sorry. Looks fine to me!
(and regarding functionality overlap: I think it is worth having this
function in addition to the #184
<#184> ones. Even if you could
express fancy-throttle in terms of gateGather, as I suspect you can.)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#242 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACNoMc6BVUEr9kI3tpVN0tPV1i73ZOTMks5usiY0gaJpZM4YPUmb>
.
|
Given that the question has come up a couple times, I think we should
On Tue, Nov 6, 2018, 7:44 PM Spiros Boosalis <[email protected]>
wrote:
… should we add that clarification to the documentation?
On Tue, Nov 6, 2018, 16:15 Lennart Spitzner ***@***.***
wrote:
> Right, i should have noticed that. sorry. Looks fine to me!
>
> (and regarding functionality overlap: I think it is worth having this
> function in addition to the #184
> <#184> ones. Even if you
could
> express fancy-throttle in terms of gateGather, as I suspect you can.)
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#242 (comment)>,
> or mute the thread
> <
https://github.com/notifications/unsubscribe-auth/ACNoMc6BVUEr9kI3tpVN0tPV1i73ZOTMks5usiY0gaJpZM4YPUmb
>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#242 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHFpRriLjMa-01ObjivOW818vGmiDkasks5usizpgaJpZM4YPUmb>
.
|
4bdf228
to
ad74fe5
Compare
Should be suitable for throttling ViewSelector updates in rhyolite.
ad74fe5
to
2e2e19d
Compare
It would be good to get this merged. |
pinging @cgibbard since I believe you were somewhat involved in this? afaik this has been in use in prod for some time |
src/Reflex/Time.hs
Outdated
@@ -35,6 +35,7 @@ import Data.Time.Clock | |||
import Data.Typeable | |||
import GHC.Generics (Generic) | |||
import System.Random | |||
import Data.Semigroup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The imports were alphabetized prior to this change
Prelude in ghc 8.0 does not come with Semigroup. Importing it directly works in 8.0, 8.2, and 8.4.
d023324
to
2367e54
Compare
|
@tomsmalley Yikes. I wonder if there's some "innocuous" operation we can do to ensure |
Actually I'm sure it would have bad consequences...but perhaps something else. |
No description provided.