hyperfiddle

http://hyperfiddle.net
alexandrkozyrev 2018-11-17T12:49:15.033500Z

@dustingetz feature request: “volume-knob” control for insta-editor’s and auto-transact’s edit-eval delay - http://alexandrkozyrev.hyperfiddle.net/:volume-knob/

alexandrkozyrev 2018-11-17T22:55:03.033900Z

the best example I have is http://alexandrkozyrev.hyperfiddle.net/:change-on-mouse-move/

alexandrkozyrev 2018-11-17T22:57:56.034100Z

if you play with “pure html” on-mouse-move - https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onmousemove - you will notice that you probably don’t recognize all points, it just too fast

alexandrkozyrev 2018-11-17T22:59:56.034400Z

mouse is a “motory” function and I want it to stay unconscious, so 200ms inertia, or stroboscope effect is good enough

alexandrkozyrev 2018-11-17T23:01:33.034600Z

in other words, browser can capture every point of mouse pointer but I can’t really process more that one point every 200ms

alexandrkozyrev 2018-11-17T23:01:49.034800Z

back to http://alexandrkozyrev.hyperfiddle.net/:change-on-mouse-move/

2018-11-17T23:02:39.035Z

For this specific example - Datomic won't ever be able to keep up with transactions that fast, you would need to integrate a different database for realtime data

alexandrkozyrev 2018-11-17T23:02:56.035200Z

here are two examples: auto-transact is off and is on

alexandrkozyrev 2018-11-17T23:03:06.035600Z

alexandrkozyrev 2018-11-17T23:04:29.036Z

that’s the point, for my workflow - 2sec inertia is a good pace

2018-11-17T23:05:32.036200Z

Can you store the temporary values in an atom and only transact/stage when you intend to store it in datomic?

alexandrkozyrev 2018-11-17T23:05:50.036400Z

I’d like to be able to tell HF - transact these values every 2sec (or 1 sec)

2018-11-17T23:07:07.036600Z

Are you trying to query all that data? even at one per second, its still going to blow out the datomic indexes

alexandrkozyrev 2018-11-17T23:07:24.036800Z

yes, the history, the track wont be as accurate in Datomic as in Ratom, these will be less points

alexandrkozyrev 2018-11-17T23:08:48.037Z

“all data” or what and how much will be important later to read from database is way to context dependent

alexandrkozyrev 2018-11-17T23:09:52.037200Z

at the moment I think that 20sec of 1sec points (i.e. 20 points) is a good enough aproximation

2018-11-17T23:11:29.037400Z

WHat if you use :db/add instead of :db.fn/cas, so it will only save the latest one until you transact (this would work with the staging area)

alexandrkozyrev 2018-11-17T23:11:42.037600Z

probably 2mins at 0.5 sec step (120 points) is my own limit

alexandrkozyrev 2018-11-17T23:15:09.037800Z

yes, :db/add - my “volume knob” intent is to be able to play a bit with transact delay, I guess 0ms delay is just a DDoS attack on Datomic, and lower pace will be sufficient

2018-11-17T23:15:50.038Z

The staging area can handle getting slammed, it just can't go through the transactor

2018-11-17T23:16:12.038200Z

Well, the staging area can handle a casual typing pace

2018-11-17T23:19:05.038400Z

Tell me if you think this will work:

2018-11-17T23:19:31.038600Z

for the insta editors, instead of a volume knob, we're going to have alt-enter be like "save and run"

2018-11-17T23:19:51.038800Z

it will also save after 10 seconds of no typing, or something like that