humbleui

Ben Sless 2023-11-28T08:52:55.488329Z

started a REPL via cider-jack-in, everything loads fine, but app window doesn't start

Ben Sless 2023-11-28T12:38:17.390929Z

when I start the REPL via the python script it works fine, but not with CIDER

Niki 2023-11-28T17:08:55.924999Z

python script also calls user/-main , do you do the same with cider?

Niki 2023-11-28T17:09:39.548739Z

In there there’s ui/start-app! that actually starts the app

Ben Sless 2023-11-28T17:23:18.800259Z

Hang on I feel a facepalm coming

Ben Sless 2023-11-28T17:26:58.559099Z

facepalm

Ben Sless 2023-11-28T17:27:01.014679Z

there it is

Ben Sless 2023-11-28T17:27:04.924029Z

all good 🙃

Niki 2023-11-28T17:30:23.854439Z

Here, I extracted user/start from user/-main so you can start app without starting server repl https://github.com/HumbleUI/HumbleUI/commit/7dbc511c012f35ad83399576e1b8dc8c78481e20

Ben Sless 2023-11-28T17:45:56.312379Z

🙏

Niki 2023-11-28T21:23:35.287219Z

Ok hooks are in. Kind of a weird way to implement lifecycle methods but it works? WDYT? Hooks? Class-based?

Daniel Gerson 2023-11-30T13:51:19.013639Z

Is there any reason why both models can't be supported by the lower substrate?

Niki 2023-11-30T14:36:59.049609Z

I think signals work fine with React model, but then you still have to decide between classes or hooks, both of which are not exactly natural for Clojure

Daniel Gerson 2023-11-30T15:11:50.876099Z

Thanks, no experience with signals (only briefly looked at SolidJs) so I find the evolution and discussion interesting.

Quest 2023-12-06T19:29:31.696639Z

Reading through these, I'm reminded of trying an early release of Om Next many years ago. I didn't get far and left with a healthy fear of components, something I'd forgotten until now. I suspect hooks would be a more flexible way to handle reifying state. They seem like a better basis for implementing a closely woven re-frame style dataflow without being caught up in an intermediate layer of components. The functional flavor of HumbleUI's API has also been pleasant to work with & I'd like to retain that as much as possible.

Niki 2023-12-06T19:54:19.393319Z

Yeah, Om Next was more complex than it needed to be

Quest 2023-12-07T01:06:03.206729Z

I'd believe it. I chatted with a friend on hooks vs components but without a real conclusion. His complaints about hooks were that it breaks symmetry with the code tree, can be hard to debug when they break, & taints code. But that they usually "just work." He viewed components as more simple & self-apparent but not inherently better. The conversation reconvinced me that I still don't know enough to make a useful decision -- but I'll try moving my HumbleUI codebase over to latest HumbleUI main in the coming weeks & see what I learn.

Quest 2023-12-05T17:44:05.102119Z

Is there a side-by-side comparison of code for classes vs hooks? I'm currently running a Datalevin database with an in-app event system. Whenever a screen begins transition, I reify its required state into HumbleUI's state-atom. In an ideal world, I'd pull data directly from the database inside a (dynamic ...) binding, but I haven't attempted this yet. With a surface level of understanding, I'm inclined to agree with lilactown's hooks > classes, but I'd have to understand what my downstream implementation will look like to provide good feedback.

Niki 2023-12-05T20:28:16.039939Z

No comparison for Humble UI but there’re lots for React I think. E.g. https://www.bitovi.com/blog/react-hooks-vs-classes-the-ultimate-comparison

👀 1
Niki 2023-12-05T20:29:03.818499Z

There’s one here too https://overreacted.io/making-setinterval-declarative-with-react-hooks/

Daniel Gerson 2023-11-29T13:25:03.840219Z

Interesting to see you embracing React patterns. Makes sense given the original goals.

Niki 2023-11-29T13:50:30.740789Z

This is just an experiment to see how ergonomic that would be

👍 1
lilactown 2023-11-29T17:58:26.516589Z

I'd take hooks over classes (because they compose), and I'd take solidjs signals over hooks