This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-09
Channels
- # beginners (121)
- # boot (28)
- # cider (106)
- # clara (57)
- # cljs-dev (70)
- # cljsrn (6)
- # clojure (145)
- # clojure-dev (7)
- # clojure-italy (36)
- # clojure-russia (42)
- # clojure-spec (26)
- # clojure-uk (127)
- # clojurescript (103)
- # core-async (10)
- # cursive (56)
- # datascript (66)
- # datomic (16)
- # defnpodcast (1)
- # emacs (18)
- # events (6)
- # figwheel (1)
- # jobs (1)
- # luminus (1)
- # lumo (44)
- # off-topic (58)
- # om (17)
- # onyx (2)
- # parinfer (75)
- # pedestal (4)
- # re-frame (18)
- # ring (4)
- # ring-swagger (8)
- # rum (7)
- # spacemacs (7)
- # specter (2)
- # sql (4)
- # unrepl (39)
- # untangled (17)
- # vim (3)
- # yada (21)
(map (fn [[f s]] [f (mapv :son s)])
(group-by :father
[{:father "A" :son "B"}
{:father "A" :son "C"}]))
@misha I'd add "datoms are perfect for client-server sync", I'd keep datascript in worker/thread just for that
Have you done that, run it in a web worker? Any example?
@bbss I have it running in a thread in RN. No public examples yet, but basically it is query-as-transit-string in, data-as-transit-string out.
in ui thread I have somehting similar to om-next's normalized data storage, which is basically map of maps. I sync it with datascript
last time I checked, RN added ~50ms overhead on such communication, so it is still pretty expensive, but I you want to have optimistic updates in UI you still have to have some extra layer on top of DS
you store the state there that doesn't belong in datascript? like local react component state and "unfinished transactions"?
one cool trick™ is to pull not only '[*]
, but reverse attributes as well, think of it as (concat [*] [_*])
I use DS as a sort of "finished transaction" and any steps in between I store in an atom.
I have a lot of moving parts right now, and hardly have a prototype – rewrote it so many times. But as soon as it will come together – will report with some benchmark data
there is a non-zero chance - this stuff with DS cache map, and inter-thread syncing DS, would be too slow, and I'd need to abandon it altogether.
well even with 50ms delay, as long as the rest of the app doesn't yank it's really a win.
I don't actually remember. Most of the learning time is "wasted" on tooling and infrastructure, etc.
I touched it like half a year ago last time, a lot of things have changed: node modules support in cljs, lots of RN updates and refactorings, it's a bit scary to dive into all of that again
but it totally worked, yes. Whether that was acceptable or not - it's another question.
yeah same for me. I should really invest time in it though. Being able to write a web-app once and easily transform them into mobile/android/iOS apps is such a killer feature 🙂
device was plastic iphone 5c, btw. I hope by the time I'll get into RN again - every one will have at least iphone 7, and it'd be much easier
true, that's why I switched to solving "organizational" problems first, so I could then plug those solutions into both web and native mobile.
I am trying to use just core.async and writing some transducers to cache latest values and turn it into an FRP thing.
or I'll just know my product so well, that I will be able to afford to write it in obj c with no pressing need of live code reloading, etc.
cool, what do you use for visualization? this is almost exactly my another perpetual project
I think it's useful, too many channels can get hard to keep in your head when just reading code.
right now it's just a mapping transducer before and a mapping transducer after the actual transformation.