Last active
June 5, 2023 04:09
-
-
Save whamtet/7dd050dee29afcf2926c572e2e3b2c5e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| IFn loadString = clojure.java.api.Clojure.var("clojure.core", "load-string"); | |
| loadString.invoke("(require '[clojure.core.server :as s]) (defonce _ (s/start-server {:port 7000 :name \"hi\" :accept 'clojure.core.server/repl}))"); | |
| // rlwrap telnet localhost 7000 | |
| // also | |
| public static void bind(String k, Object v) { | |
| String src = String.format("(in-ns 'user) #(def %s %%)", k); | |
| ((IFn) loadString.invoke(src)).invoke(v); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment