Fork me on GitHub
#sci
<
2022-04-24
>
teodorlu13:04:47

would it be hard to write a sci interpreter in Emacs Lisp?

teodorlu13:04:37

I guess ... it couldn't work the same way as Clojure/Clojurescript. We don't have a Clojure-to-Emacs-Lisp compiler, as we have for Javascript and JVM.

teodorlu13:04:18

Specifically, I was wondering about running neil source code directly in Emacs, without shelling out to anything.

lilactown15:04:39

I think it would be better to embed bb or some other compiled sci

👍 1
phronmophobic19:04:12

I think the challenge is that sci doesn't provide its own clojure.core library. It uses the clojure.core library provided by the jvm and clojurescript implementations.

phronmophobic19:04:18

Most of a compiler for transpiling clojure is already available with the clojure.tools.* libraries, but there's still not a target agnostic version of the core data structures and core library (although the cljs core library is pretty close)

👍 1
teodorlu07:04:28

Yeah, I think you're right. A large part of sci simply refers to core functions. Not having access to things like tools.analyzer is another good point. https://github.com/babashka/sci/blob/master/src/sci/impl/namespaces.cljc#L838

borkdude09:04:55

Another issue is that elisp hardly provides any immutable stuff, even strings are mutable I think

👍 1