Fork me on GitHub
#cljs-dev
<
2022-06-29
>
dnolen16:06:37

anybody try ClojureScript w/ Google's incremental-dom?

šŸ‘€ 2
borkdude16:06:43

Haven't tried it. I did listen to a podcast today with one of the devtools developers and how they're not relying on any frameworks like React, but doing everything with web components and lit-html (https://airhacks.fm/#episode_196)

dnolen16:06:53

lit is interesting, but there's a less obvious Closure integration story?

dnolen16:06:08

I think with incremental-dom that's more or less figured out - also a tiny dep

dnolen16:06:50

React is fine, but wondering if we could have lighter weight common solution

lilactown16:06:57

lit is awkward because it relies on string templates, which are a pain to use atm in cljs

lilactown16:06:08

i remember other issues too, it's been awhile since i tried it

dnolen16:06:44

@lilactown how so? I thought it was abstract low level thing?

dnolen16:06:02

oh sorry you're talking about lit - yeah - that's a big downside

borkdude16:06:29

I just mentioned it since I heard about it in the podcast: it's one of the few libraries used in chrome devtools - never used it myself. I think @thheller also was working on some dom diffing CLJS thing?

borkdude16:06:46

I've never used hoplon myself - curious to hear y'alls thoughts about that approach

lilactown16:06:11

i did some experiments with incremental-dom a few years back. a couple things i recall: • there was some awkwardness when patching multiple elements at a time without keeping a handle to it's parent, i.e. a fragment in React parlance • it has no lifecycle or state management, it's literally just a lib for DOM manipulation, so there's a lot of work to do to reach parity with modern ecosystems

šŸ‘€ 1
lilactown16:06:05

i think that solidjs is a solid (pun intended) proof of the approach, though. it's fundamentally incremental-dom + reagent reactive state management in one package

dnolen16:06:30

the lack of higher level things is not really so much of a concern

dnolen16:06:52

a low level thing that is tiny and DCE friendly that others could build off is mostly my interest

phronmophobic16:06:05

I know there's a few cljs libraries in a similar space, but I'm not sure any of them is "there" yet. They're also usually tied to some kind of state management to make them usable. • https://github.com/thheller/shadow-arborist • https://github.com/green-coder/vrac • https://github.com/kennytilton/matrix, https://github.com/kennytilton/matrix/tree/main/cljs/mxweb • hyperfiddle, https://www.hyperfiddle.net/

dnolen17:06:25

I think modern JS has become really bloated - having a few more things in the box in ClojureScript could make a nice goto solution for lighter weight scripting

dnolen17:06:47

these days I think ~20k gzipped is a pretty good selling point

dnolen17:06:23

and also not having to look at a million options for simple stuff - that was a nice thing about ClojureScript pre-React, you could more or less use Closure for simple things

dnolen17:06:49

not glomming on massive deps which is the JS default

Dustin Getz17:06:12

(Not caught up on whole thread) hyperfiddle/photon (a reactive dialect of Clojure/Script) drives point dom effects and incremental maintenance with Missionary, a functional effect system https://github.com/leonoel/missionary Photon is a Clojure/Script to Missionary compiler, 2.5k LOC; photon-dom is 350 LOC In addition to incremental rendering, Photon brings distribution of Clojure functions across the client/server system, an extraordinary capability https://hyperfiddle.notion.site/Hyperfiddle-Photon-progress-update-57aee367c20e45b3b80366d1abe4fbc3 https://www.notion.so/hyperfiddle/UIs-are-streaming-DAGs-e181461681a8452bb9c7a9f10f507991

Dustin Getz17:06:26

1. hello world of client/server transfer 2. query/view composition in a Clojure function in the direct/straightforward style of PHP (compiler managed network) 3. recursive treeview in a browser with direct recursion over file system

dnolen23:06:08

k core.async CLJS now has tests via GH actions, will probably do this for tools.reader and test.check as well - also add a step so that when we commit to ClojureScript we at least check that we don't fail those repos

šŸ‘ 1
Alex Miller (Clojure team)23:06:38

Now I just need to make sure to look at the output :)

Alex Miller (Clojure team)14:06:46

@U050B88UR added an svg badge to the readme to show the test status