This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-09
Channels
- # babashka (22)
- # beginners (58)
- # calva (14)
- # clj-kondo (3)
- # cljs-dev (4)
- # clojure (17)
- # clojure-dev (4)
- # clojure-italy (6)
- # clojure-uk (2)
- # clojurescript (32)
- # conjure (9)
- # cursive (2)
- # figwheel-main (48)
- # fulcro (77)
- # helix (2)
- # jobs-discuss (3)
- # joker (2)
- # pathom (3)
- # quil (3)
- # re-frame (24)
- # reitit (6)
- # shadow-cljs (11)
- # tools-deps (8)
- # xtdb (29)
pods are now available on the JVM as well: https://github.com/babashka/babashka.pods
also an illustrative test how to add load-pod
to your sci-based project
Wow, just amazing really :)
Don’t forget to go outside today, it’s beautiful weather in our country 🙂
Small clarification of "why JVM support": https://github.com/babashka/babashka.pods#why-jvm-support
bikeshedder: BABASHKA_RUN_AS_POD
or RUN_AS_BABASHKA_POD
as an env var for binaries to instruct them to run as a pod?
most env vars around babashka start with BABASHKA_
, but BABASHKA_RUN_AS_POD
could be confused with the intent of running babashka itself as a pod?
@lilactown yeah, let's do that one
released a new clj-kondo version that can be used as a pod with babashka (0.0.94): https://github.com/borkdude/clj-kondo/#babashka-pod
Hi, I'm using SCI on a project, and I need to evaluate some code, capture def
and defn
, and check their values after that evaluation.
Currently I'm using {:env state}
(state being an Atom) and capturing the result with:
(.-root (get-in @state :namespaces 'user '<my-var>])))
is this the right way? Or is there a better way of doing?(BTW: great job on SCI!)
@mauricio.szabo You can do it that way, but the organization of the atom is an implementation detail. If you want to be safe, do it like this:
(I imagined that it was an implementation detail: it read like it's private-ish 😄)
(def state (atom {}))
(eval-string "(def x 1)" {:env state})
(eval-string "x" {:env state}) ;;=> returns value of x that the user defined
Yes, it does - but is there a way to find which vars where defined only on that namespace? Like, I can use ns-map
but it brings me everything that was required, refered, etc...
@mauricio.szabo in that case I think you should capture the user namespace before and after and compare those
Oh, nevermind - I can use ns-publics
🙂