This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-06-24
Channels
- # babashka (11)
- # beginners (62)
- # calva (9)
- # cider (7)
- # clj-kondo (18)
- # cljfx (2)
- # cljsrn (4)
- # clojure (55)
- # clojure-australia (3)
- # clojure-dev (2)
- # clojure-europe (39)
- # clojure-italy (3)
- # clojure-nl (3)
- # clojure-spec (5)
- # clojure-uk (5)
- # clojured (7)
- # clojurescript (16)
- # clojureverse-ops (2)
- # conjure (22)
- # cursive (12)
- # data-science (13)
- # datomic (8)
- # duct (7)
- # emacs (11)
- # events (1)
- # fulcro (12)
- # helix (10)
- # integrant (21)
- # introduce-yourself (5)
- # jobs (2)
- # jobs-discuss (16)
- # lsp (1)
- # malli (5)
- # meander (7)
- # membrane (9)
- # pathom (9)
- # reitit (5)
- # releases (3)
- # ring (2)
- # sci (18)
- # shadow-cljs (35)
- # sql (15)
My use case is: I have several functions defined, I read in a file containing Clojure code that only uses those functions, and I want to load-string on file.
{:namespaces {'io {'file #(apply files/resolve lh %&)}
'json (ns-publics 'clojure.data.json)
'str (ns-publics 'clojure.string)
'tools (ns-publics 'lh.sci-tools)
'user {'slurp slurp}}}
Is what I useSorry for poor formatting, on my phone at the moment
I suppose I would need to add something like "(require 'json)" to the top of the file coming in, to use your example @ddouglass
you could also just add everything to the user namespace, if that fits your use case
I've written a C++ code generator for our embedded development team that takes as input a file of text, which looks a lot like Clojure, loads it, analyzes it, and ouputs the C++ code. To date it required devs to have Java on their machines (e.g., Linux, Windows). I want to use "sci" so I can provide native binaries. It looks like "sci" is going to do the trick.
Thanks @borkdude for all you hard work, and the latest ClojureD presentation which sparked my interest in making this new native binary version!
Hey @borkdude, is http://ko-fi.com the best way to make a one-time contribution?