Fork me on GitHub
#hoplon
<
2018-01-22
>
ntzanos08:01:49

@thedavidmeister Thanks a million! I did something similar to that 🙂

chromalchemy18:01:30

@thedavidmeister Thanks for the Hickey! So using comp creates the transducer? Specter does something similar to transducers, skipping intermediate reifications in the transformation, so I can probably start with that. So to re-sate, I might see some performance benefits by doing all my list modifications in one (transduced) function, rather than streaming the list through a series of modifying formula cells?

chromalchemy18:01:00

And I understand there is some magic of structural sharing at the Closure data level when creating n modified-lists from the original. But when rendering those modified-lists via a formula cell in the old for-tple, is there any sharing going on at the DOM level, or just simply n independent sets of DOM nodes in the cache?

flyboarder20:01:41

@chromalchemy n independent DOM nodes, cache is positional

kennytilton20:01:52

@thedavidmeister’s pitch was irresistible so I took a closer look. I do not get why a plain defn cannot take attributes as a single map:

kennytilton20:01:04

`(defn my-list
  [& items]
  (ul (map li items)))
`

kennytilton20:01:52

That’s ^^^^ from https://github.com/hoplon/hoplon/wiki/Composing-HTML, explaining why defelem is necessary.