This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-03
Channels
- # announcements (35)
- # aws (20)
- # babashka (4)
- # beginners (88)
- # cider (9)
- # clara (1)
- # clj-kondo (6)
- # cljsrn (3)
- # clojure (107)
- # clojure-dev (7)
- # clojure-europe (99)
- # clojure-nl (3)
- # clojure-spec (9)
- # clojure-uk (2)
- # clojurescript (28)
- # core-async (53)
- # cursive (11)
- # datascript (1)
- # datomic (2)
- # emacs (20)
- # fulcro (3)
- # graalvm (4)
- # holy-lambda (18)
- # jobs (1)
- # kaocha (7)
- # leiningen (2)
- # lsp (25)
- # luminus (1)
- # membrane-term (52)
- # missionary (8)
- # nextjournal (19)
- # off-topic (16)
- # other-languages (3)
- # podcasts-discuss (2)
- # polylith (23)
- # re-frame (4)
- # reclojure (6)
- # remote-jobs (1)
- # rewrite-clj (36)
- # ring (1)
- # sci (10)
- # shadow-cljs (7)
- # spacemacs (5)
- # sql (20)
- # uncomplicate (1)
- # vscode (3)
- # xtdb (27)
Would it be possible in principle to serialize/deserialize SCI's state (to pause/resume computations)?
@wombawomba I think someone has tried this once with nippy and one of the issues was circular references within the state.
Alright! If I wanted to give it a shot, how should I go about it?
essentially, you have a cyclical graph. there are many ways to represent a cyclical graph. I might suggest either EAV approach like datomic or just a graph approach with nodes and edges.
@wombawomba one of the problems is: how to persist functions. Red Planet Labs has some tricks for this which I recommended the last time someone tried this. https://tech.redplanetlabs.com/2020/01/06/serializing-and-deserializing-clojure-fns-with-nippy/. Unfortunately I can't find the conversation anymore.
One limitation of red planet labs solution is that it depends on eval
. So it does not work with GraalVM. Otherwise, it works very well. For Datalevin, I had to use a special macro for serializable functions to send over the wire to the server.
Specter also relies on eval but I was able to patch specter to use SCI for eval to make it work with GraalVM. Perhaps the same can be done for this?
i remembered i tried that but it did not work. Forgot the reason, maybe it was the methodHandle stuff