This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-11-29
Channels
- # arachne (3)
- # bangalore-clj (6)
- # beginners (246)
- # boot (57)
- # business (1)
- # capetown (1)
- # cider (2)
- # clara (1)
- # cljsjs (36)
- # cljsrn (1)
- # clojure (150)
- # clojure-austin (4)
- # clojure-brasil (7)
- # clojure-china (2)
- # clojure-france (3)
- # clojure-greece (3)
- # clojure-japan (3)
- # clojure-russia (38)
- # clojure-spec (25)
- # clojure-uk (25)
- # clojurescript (320)
- # clojurex (1)
- # cursive (38)
- # datascript (48)
- # datomic (23)
- # emacs (29)
- # events (1)
- # funcool (2)
- # hoplon (64)
- # jobs (3)
- # luminus (10)
- # off-topic (26)
- # om (27)
- # om-next (1)
- # onyx (1)
- # parinfer (38)
- # perun (5)
- # planck (19)
- # re-frame (38)
- # reagent (19)
- # remote-jobs (1)
- # rum (2)
- # schema (2)
- # spacemacs (1)
- # specter (8)
- # test-check (10)
- # vim (7)
- # yada (14)
@leov, I haven’t used it but this exists: https://github.com/tonsky/datascript-transit
Say, can anyone tell me what the difference is between (d/transact)
and (d/transact!)
?
well, in ruby that would be throws-exception vs exceptionless, but here.. need to read code 🙂
also, I've just installed ds-transit. to my first impression, the only difference of transit to JSON here is the appearance of custom data types, methinks
ok, @timgilbert , according to the sources of datascript transat is the same as transact!, but wraps the result into deferrable
or how is it called? when you need to apply @ (aka deref) to the result to get the value
Oh, that makes sense, it’s the same API as in datomic then. Thanks for looking @leov
transact!
is DataScript way to do transaction, exclamation mark means side effects (same everywhere in Clojure)
for DataScript, it means it keeps datoms and can even serialize full DB through custom type serializer
also, someone, any plans to combine datascript engine with https://github.com/datacrypt-project/hitchhiker-tree?)
Nikita, you mentioned there were some drawbacks in making datascript umm using underlying storage, even in browser
@tonsky by "plans", I meant something like "comment on whether it is feasible/(im)possible/worth it with current architecture".
I only remember mentioning that it was not designed to work with async storages like IndexedDB
just matching any datomic feature within js environment easily might not be the best idea
how much more expensive would be to get straight to recognize new lookup refs within same transaction
?
like, why would you use
[{:db/id "that guy" ; new user
:user/email ""} ; user's unique identity
{:user/email "" ; existing user
:user/friends "that guy"}] ;string temp id
instead of just:
[{:user/email ""} ; new user
{:user/email ""} ; lookup ref to existing user
:user/friends [:user/email ""]] ;new user's lookup ref