232 karma · joined September 2, 2016
> no good story for what happens when one component in a tree needs to update another component in the tree
HTMX has a decent answer to this. Any component can target replacement for any other component. So if the state of everything on the page changes then re-render the whole page, even if what the user clicked on is a button heavily nested.
> it's impossible to implement "optimistic UI," ... hurting the user experience
Do we actually need optimistic UI? Some apps need to work in offline mode sure, like offline maps or audiobooks or something. The HTMX author agrees, this is not the solution for that. Most of the stuff I have worked on though ... is useless without an internet connection.
In the case of "useless without internet connection" do we really need optimistic UI. The actual experience of htmx is incredibly fast. There is no overhead of all the SPA stuff. No virtual dom, hardly any js. It's basically the speed of the network. In my limited practice I've actually felt the need to add delays because the update happens _too fast_.
I'm still evaluating htmx but not for any of the reasons you've stated. My biggest concern is ... do I want my api to talk in html?
Notably the author of re-frame has been weary of hooks.
I think that’s for a good reason. The approach in re frame feels like the best way to manage state so far for a react based app. Everything that changes state flows through an event. State can only be observed through subscriptions. Side effects are isolated to their own type of event. Debugging and testing are so straight forward with these concepts.
Redux got close but it has two problems in my mind. Like hooks, it encapsulates for no good reason. Put the state in one thing that you can observe holistically before and after pure events. It also has too much boiler plate.
Two "copy cats" (not meant to be derogatory) of Roam that are open source are: https://github.com/logseq/logseq https://github.com/athensresearch/athens
The underlying in memory datalog style database that can run in the browser that enables these apps https://github.com/tonsky/datascript
It has a pleasant interface and making all the errors go away usually results in clear writing.
> if you can't find a new job in 4 months, it's on you,
This statement feels _wrong_. We are all subject to macro trends that we don't have control over. They impact our lives. Even the well off tech people but especially people in other industries.
Objectively git kraken has more visual information density. To get the same information on the cli requires multiple commands and the user has to hold the information I'm their head between the commands.
Git kraken's buttons are also tightly correlated to commands and you can even bring up a window that shows what cli commands are being run under the hood.
The difference will be there are more consumers in a safe position to make purchasing decisions.
I only have so much active problem solving per day. I can spend it all quickly then go do something recharging or sit around forcing focus and resenting the fact that I have to look busy for 8 hours a day.
Everything Rich Hickey has been giving talks on and clojure itself seem to be the best _solution_ I've seen.
Correcting a guess means drawing over from any point moving right.
The interface seemed really well done even for mobile. Tested it on chrome and Firefox for Android. I'm Really impressed. NY times does some great interactive and visualization work.
The back end is way more mature than front end SPA stuff so I'll just list some things I'm really glad to have in that space
- re-frame : like redux but better
- re-learn : lets you create tutorials for application with no changes to dom
- cljsjs/filesaverjs : cross browser file download dialog
- cljs-react-material-ui : material ui react library port
- camel-snake-kebab :useful for changing casing
- com.rpl/specter : easy way to deal with large nested data structures
- stylefy : inline styles with support for media queries and animations (all with clojure data structures!)
Sure, it could be used but it really shouldn't.
Interacting with the DOM in a procedural way, and storing state on the DOM is always going to be harder to manage than using a reactive pattern when you trend towards more complexity.
https://github.com/Day8/re-frame http://www.luminusweb.net/
edit: Should probably say why...
- Clojure and clojurescript give nearly identical experiences on the front and back end, with the ability to actually share some code between the two.
- Clojure is dynamic and spec gives some really awesome validation and generative test capabilities
- There is a lot of fuss around javascript frameworks and dealing with html / css build tools and their arbitrary syntax. Clojure front end frameworks provide tools that make templating html look just like regular data structures in clojure, styles too. With stylefy you can also keep all styles inline while supporting media queries. It really is a low cognitive load setup once you get going. I love it.
https://github.com/Jarzka/stylefy
edit-2: More whys...
- re-frame is basically redux but easier and with less boilerplate. I use it for small and large projects.
- Pure immutable functions are such a game changer. Even poorly written projects with tons of features can be reasoned about and broken down for long term maintenance if the language supports immutability and pure functions. Re-frame really plays to this strength for managing state and I can't say enough good things about it. Been working with it for 2+ years and I can't imagine switching for anything else I've seen out there.
I really believe that UBI would be sustainable by tapping into the concentrated wealth that arises as an unfortunate and unfair side effect of the economic rules we put in place.