Twitter | Search | |
Matt Huebert
Life is an experiment, please be kind.
1,469
Tweets
529
Following
863
Followers
Tweets
Matt Huebert Jun 15
Replying to @wazound
I’ve gotten a lot of mileage using a similar pattern of effects named after Clojure core functions (get, get-in, update, update-in, assoc, assoc-in).
Reply Retweet Like
Matt Huebert Jun 14
Replying to @mfikes
These changes are great! I can see my various *.perf namespaces shrinking.
Reply Retweet Like
Matt Huebert Jun 14
That was a great talk!
Reply Retweet Like
Matt Huebert Jun 14
It sounds like DataScript’s performance had a big impact on your conclusions here. If you had a DB that was fast enough, would you still want to keep UI stuff out?
Reply Retweet Like
Matt Huebert Jun 9
Replying to @steren
sure thing, and thanks!
Reply Retweet Like
Matt Huebert Jun 9
Cloud Run looks very nice! I've started migrating a firebase function to Cloud Run (already using the firebase hosting integration). Do you know how one could go about reading firebase-function environment variables from a Run environment?
Reply Retweet Like
Matt Huebert retweeted
Applied Science Studio Jun 3
New blog post about exploring Word2Vec in with :
Reply Retweet Like
Matt Huebert retweeted
Dave Liepmann Jun 2
I just released Tufte CSS v1.6, now available from NPM. Thanks to all the many contributors who report issues and submit PRs to fix bugs or add features.
Reply Retweet Like
Matt Huebert May 21
Replying to @lilactown_ @roman01la
I wrote it a couple of years ago when DataScript was too slow for my app, and it led to this exploration of how to do granular subscriptions
Reply Retweet Like
Matt Huebert May 21
Replying to @lilactown_ @roman01la
There’s also chia/db, which is a kind of “reactive entity store”. Similar data-format as datomic/datascript (entity-attr-val, transact!) but no datalog, only lookup by id or indexed attribute.. however, it keeps track of precisely which patterns of data each view is interested in
Reply Retweet Like
Matt Huebert May 21
Replying to @lilactown_ @roman01la
it's a bit hard to make sense of without proper docs, as there are several moving parts and I am still working on simplifying things.. reactivity is handled here: example of a data source implementation:
Reply Retweet Like
Matt Huebert May 21
Replying to @lilactown_ @roman01la
my current use case is a GraphQL app where all query results are merged into a single cache, and views depend on various slices of that cache
Reply Retweet Like
Matt Huebert May 21
Replying to @lilactown_ @roman01la
I've already been using this approach minus #4, waiting for scheduler to stabilize so I can fully test concurrent behaviour
Reply Retweet Like
Matt Huebert May 21
Replying to @lilactown_ @roman01la
Yeah, missing piece there of how to get that single atom to invalidate only the interested views. Various ways to solve that
Reply Retweet Like
Matt Huebert May 21
Replying to @lilactown_ @roman01la
Possibly: 1. a dynamic var tracks current component, stores async "forceUpdate" hook, 2. Sources track views that depend on them (w/ arbitrary granularity) & "force-update" on change, 3. Dependencies update in an effect, 4. sources queue updates/invalidations using scheduler
Reply Retweet Like
Matt Huebert May 21
Replying to @lilactown_ @roman01la
this in itself isn't much of a change, as lots of tools already queue & batch updates
Reply Retweet Like
Matt Huebert May 21
Replying to @lilactown_ @roman01la
Which part would need to be done in render?
Reply Retweet Like
Matt Huebert May 21
Replying to @lilactown_ @roman01la
The tearing problem, I think, can be avoided if changes to the external source are run through the scheduler? ie. If we let react control timing of updates, there may be no need for it to store the state directly
Reply Retweet Like
Matt Huebert May 21
Replying to @roman01la
(by only using hooks for invalidation and not storing copies of state, one can then build an API that uses hooks as an implementation detail but frees users from the “rules of hooks” and feels like ordinary clojure again)
Reply Retweet Like
Matt Huebert May 21
Replying to @roman01la
I’d like to avoid copying every external value into its own `useState` hook, but this means I need to go for a layout effect, because without a copy of the value, there’s no way to identify changes in-between render & subscribe/effect
Reply Retweet Like