This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-05-06
Channels
- # announcements (37)
- # babashka (17)
- # beginners (20)
- # calva (2)
- # clj-kondo (15)
- # cljs-dev (1)
- # clojure (6)
- # clojure-austin (2)
- # clojure-china (3)
- # clojure-europe (27)
- # clojure-korea (1)
- # clojure-nl (1)
- # clojure-norway (18)
- # clojurescript (13)
- # conjure (3)
- # datomic (31)
- # events (3)
- # honeysql (14)
- # jobs-discuss (33)
- # leiningen (4)
- # lsp (57)
- # membrane (3)
- # missionary (5)
- # off-topic (1)
- # releases (3)
- # shadow-cljs (18)
- # slack-help (2)
- # specter (2)
- # yamlscript (10)
I'm having an issue with closure's google.functions throttle or rateLimit function I wonder if anyone here can throw light on it? Neither of the functions seems to be limiting calls to the enclosed function! https://github.com/submergedstructure/transcript-editor/blob/main/src/com/submerged_structure/ui.cljs#L96 My code is part of a fulcro project but I guess this is a problem with my calling of the google functions. I have an event handler for an audio player that is being called for I think every sample played in the audio player and I want to limit calls to the enclosed function that are overwhelming fulcro's state management machinery.
the compiled app is up here to poke at: https://dev.submergedstructure.com/
here's what happens when you press play:
seems like even google.functions/rateLimit either is being overwhelmed by the calls to it or I am calling separate instances of the function and the timing is separate for each call.
https://github.com/google/closure-library/blob/master/closure/goog/functions/functions.js#L559
more about my project here for anyone interested: https://clojurians.slack.com/archives/C68M60S4F/p1713508694764549
the way you have it you are re-creating the wrapping function every time, so all state it keeps to do the rate limiting thing is also re-created with every call
thanks so much @U05224H0W!
works great, of course. Thanks again! https://github.com/submergedstructure/transcript-editor/blob/main/src/com/submerged_structure/ui.cljs#L98
Reposting from cljs-dev: Hi, I have won tickets to JS nation (https://jsnation.com/) and React summit (https://reactsummit.com/) in Amsterdam in the middle of June. I am not able to go but perhaps somebody might be interested. I would like to give for free the tickets ideally to somebody, who has done a bit of development in the open source ClojureScript community. Please send me a DM, if you are interested or know about somebody, for whom this would be highly interesting.