Let’s imagine that a clojure program wants to load clojure files during runtime. I want to emulate weechat scripting system in clojure.
The clojure files are stored as ~/.program/scripts/*.clj
I could, for example, add ~/.program/scripts to classpath, scan ~/.program/scripts, and require clj files in ~/.program/scripts. Is there a better way?
Ideally, I’d also want sandboxed execution, but even java security manager has security issues. It is an intractable problem for now.
How would you use
load-file to mimick weechat scripts?
I don’t know weechat scripts, but if you need sandboxing you could also use a Clojure interpreter like sci.
That’s a great option for guaranteed sandboxing. Sandboxing native clojure is an intractable problem. A minimal clojure dialect is sandboxed by default.
It seems that combination of GraalVM and sci enables a lot of things including dad which I always wanted to have.
Also, depending who the target audience is, you can check out: https://github.com/benzap/eden
It is also an interpreted, sandboxed language meant to be run embedded inside Clojure. It mostly mimic Lua syntax, and is imperative by nature.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.