This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-16
Channels
- # aleph (2)
- # announcements (1)
- # beginners (162)
- # calva (16)
- # cider (37)
- # cljdoc (9)
- # cljs-dev (2)
- # cljsrn (3)
- # clojure (86)
- # clojure-dev (17)
- # clojure-europe (3)
- # clojure-houston (1)
- # clojure-italy (6)
- # clojure-nl (3)
- # clojure-spec (10)
- # clojure-uk (20)
- # clojuredesign-podcast (15)
- # clojurescript (7)
- # data-science (14)
- # datascript (1)
- # datomic (5)
- # emacs (8)
- # figwheel-main (8)
- # fulcro (25)
- # graalvm (1)
- # jobs (10)
- # jobs-discuss (4)
- # keechma (14)
- # leiningen (2)
- # off-topic (31)
- # onyx (1)
- # other-languages (4)
- # pathom (4)
- # pedestal (1)
- # re-frame (20)
- # remote-jobs (4)
- # shadow-cljs (25)
- # sql (6)
- # tools-deps (15)
- # vim (18)
- # xtdb (9)
I'm trying out clojupyter with @jlmr's awesome parinfer plugin above, does anyone know how to start a kernel from within an existing deps.edn project?
The guides and examples seem to be oriented towards standalone notebooks with interactively added dependencies, but I'm thinking more of using it as a persistent graphical REPL / interface to my library, if that makes sense
@qythium, I don’t know if clojupyter supports this. Personally I use the IClojure kernel: https://github.com/HCADatalab/IClojure. It has a special form /cp
that you can use to add dependencies to the classpath in the form of the :deps
key from deps.edn
. You could use this to first read in your deps.edn
file and then do something like /cp (:deps your-parsed-edn-file)
.
Thanks for the pointer - I'm still unclear what the practical difference is between IClojure and Clojupyter kernels, just went with the latter because it's nREPL-based and supports hiccup HTML display out of the box, but I'm not strongly attached to either one.
@jlmr I installed IClojure and tried out /cp (:deps (read-string (slurp "deps.edn")))
as suggested, but that didn't work - looks like it's a macro which expects a map literal instead of an expression to eval
besides, I don't think that would add the namespaces in my local library's src/
folder to the classpath?
Ideally I'd like to be able to "jack in" to my project and start a REPL server from the command line, then connect to it from Jupyter and have access to the same interactive state, just like a REPL with rich display capabilities - not sure if such a workflow exists?
@qythium strange that this (`/cp (:deps (read-string (slurp "deps.edn")))`) doesn’t work. The documentation specifically states that /cp (form that evaluates to a deps.edn map)
this should work. Maybe drop the :deps
key and put in the whole map?
I’m afraid I can’t help you further, I usually use notebooks for seperate projects to quickly visualize something. However, there is also this: https://github.com/clojupyter/lein-jupyter. It think it works with leiningen, but you could take a look at how it works.