3 ms·
Or implemented in clojure, which is a more modern lisp...
by hatmatrix 7y ago
Or implemented in clojure, which is a more modern lisp...
- uncletaco 7y agoI'm not sure clojure should be the language of choice to compile anything. At that point you might as well implement elisp as a hosted language as well. What papaw was saying up above was creating an elisp compiler for common lisp will make it portable to native code via sbcl and hosted code via sbcl. I suppose one could argue writing it in clojure would make it portable to both the jvm and any javascript engine but what clojure project of significant complexity doesn't break out into the host language from time to time What compilers have been written so far in idiomatic clojure? EDIT: since I'm thinking about it could anyone imagine debugging a compiler in clojure? Talk about stacks on stacks on stacks...
- didibus 7y agoClojureScript is a Clojure to JavaScript compiler implemented in Clojure. I think that ticks the box.
- uncletaco 7y agoTrue, and that's a good example. I guess what I'm really wondering is how many languages are written in clojure. Clojurescript for instance is just clojure compiling itself.
- didibus 7y agoI remember seeing a few toy ones. No real serious languages though. I don't think the parent meant to implement an elisp interpreter in Clojure. I thought they meant to build an Emacs like editor in Clojure. Similar to this now abandonned project: https://github.com/hraberg/deuce https://github.com/hraberg/deuce There'd be no point in re-writing an Elisp compiler/interpreter in Clojure over its current C implementation apart maybe for if you think it be nice for you to work in Clojure instead of C when coding on it.
- uncletaco 7y agoI can see the parent misconstruing compiling elisp with building a new emacs-like editor, but the thread (and article) was about compiling elisp. That being said a clojure editor could be pretty fun, the oy downside being writing native widgets for a gui. I hardly know anyone who uses emacs in a shell if they can help it, and i know far more people who would prefer to use a shell inside of emacs instead.