r/Clojure • u/yogthos • Mar 21 '23
Small Clojure Interpreter integrated with Emacs as a loadable module
https://github.com/jackrusher/scimacs9
1
u/Adt_94 Apr 14 '23
Is there anything like this for vscode? Or I can just compile cljs and that should work?
1
2
u/jherrlin Mar 21 '23 edited Mar 21 '23
So excited! Can I then call Elisp code from the SCI code and vice versa? So build my stuff in Clojure and then call elisp in the outermost layers. How is the interactive development workflow?
0
Mar 21 '23
[deleted]
3
u/jackrusher Mar 22 '23
I'm looking into ways to make two-way bindings work so that Clojure code running in scimacs can call elisp functions and elisp functions can call Clojure ones. So far, there are some pain points around getting everything to work together and compile/link on all major platforms, but I'm pretty sure it can be done. :)
2
2
u/mobiledevguy5554 Mar 22 '23
Borkdude has clojure transpiling into emacs lisp. The guys a phenom
2
u/Borkdude Mar 22 '23
That's https://github.com/borkdude/clj2el which you can run separately but also inside of scimacs. The benefit of running in scimacs is that it's faster than spinning up a new process. But scimac's distribution / installation model is still something to be worked out.
1
u/iwaka Mar 22 '23
Sounds super exciting! So will it be a completely separate project from mainline Emacs, or can it be distributed as some kind of package that can attach to a regular Emacs? What is the hope for this?
If I could use Clojure in Emacs instead of Elisp, that would be amazing!
4
u/Borkdude Mar 22 '23
So, the idea behind scimacs, and correct me if I wrong Jack, is to call Clojure code from emacs and vice versa in a native way via the dynamic module system that emacs offers.
The idea behind the transpiler is: I know clojure, but don't know how much about elisp: give me some suggestions. So it's a different project, but because it's written in clojure, it could run inside scimacs and you could easily evaluate transpiled expressions on the fly. This is just one of the things that scimacs allows you to do. I've done that experiment in user space, without changing scimacs itself.
2
1
u/iwaka Mar 22 '23
Super hyped! Will be watching scimacs with great interest. Thank you both for this! :)
8
u/TheLastSock Mar 21 '23
What is a loadable module?
Does this mean i can use clj instead of elisp to program emacs , just just call out to emacs fns as needed?