Is it possible that a Clojure (or Clojure) syntax implementation over SBCL (or other fast Lisp)?

I tried both SBCL and Clojure and found that I like the Clojure syntax, but it is very slow compared to SBCL for me. Is there an implementation of Clojure on SBCL or is it possible?


I found https://github.com/ayrnieu/disclojure that can enlighten me. :-)

+6
source share
3 answers

Clojure is designed to configure multiple backends. This is a side effect of Clojure, which is a hosted language developed with a host-wide philosophy . For example, it will never be a goal to make the same code written for Clojure on the JVM unmodified, such as the CLR. Significant amounts of code are shared between Clojure for the JVM and ClojureScript, which is a good bonus.

It is currently stable for:

  • Jvm
  • JavaScript / ECMAScript

Usually stable for:

  • CLR / .net

and I know the experimental builds for:

  • Python
  • WITH
  • Scheme
  • IOS (through the circuit)

More goals appear as interest and time intersect. If you want to provide an implementation for your favorite Lisp, patches are welcome! It would be wise to base your implementation on the ClojureScript compiler, as it best illustrates the intended development methods for the compiler.

+8
source

While previous answers pointed out the difficulties of placing Clojure in different languages, there is one programming language that, in my opinion, is interesting, looks like this: Shen . It was designed with a minimum set of 45 primitive instructions to make it easy to port to different languages. He currently works under CLisp, SBCL, Clojure, Scheme, Ruby, Python, Java, and Javascript. This seems to be a mixture of ML and Lisp, although I have not programmed it much.

+2
source

Perhaps, but it is no coincidence that you will get much faster and then on the JVM.

If you want to speed it up, perhaps look at higher-speed libraries, create clojure for example clojure data using low-level JVM views, etc. or write your own libraries that are faster.

Making clojure fast on the JVM is difficult, but doable is better than better than the port for SBCL.

+1
source

Source: https://habr.com/ru/post/951680/


All Articles