4 ms·
My dream is Clojure hosted on Rust. It's because Clojure isn't intended to "hide away" the platform underneath and you interact with the platform quite a bit.
by 727564797069706 4y ago
My dream is Clojure hosted on Rust.
It's because Clojure isn't intended to "hide away" the platform underneath and you interact with the platform quite a bit. Since I prefer Rust ergonomics over Java/JVM ergonomics, it'd be awesome to have Rust as a Clojure platform.
One day it will happen - if not by me, then by someone else, I'm sure!
- jiyinyiyong 4y agoI built a Clojure dialect in Rust called Calcit https://github.com/calcit-lang/calcit https://github.com/calcit-lang/calcit . It's ClojureScript at core, despite its indentation-based syntax.
- pjmlp 4y agoIt is called Common Lisp and Scheme.
- medo-bear 4y agoi dont understand what you mean
- pjmlp 4y agoNo need for Clojure on Rust, when there are already several mature Common Lisp and Scheme toolchains, compiling to native code for the last 40 years.
- medo-bear 4y agoi am a big advocate for common lisp use but i still don't see your point. are you saying that the whole point of having a clojure on rust is to have native compilation? because i imagine "clojure on rust" for the parent means having a clojure-like-syntax on rust, keeping in mind that rust is a statically typed language (kind of a big point of rust)
- pjmlp 4y agoCommon Lisp supports gradual typing.
- medo-bear 4y agobut not static mem allocation
- pjmlp 4y agoIt surely does, including stack values. That is the thing, Lisp is not only lists unless one is stuck using Lisp 1.5.
- medo-bear 4y agoi dont think were talking about the same thing unless youre claiming that common lisp can be non garbage collected. otherwise stack allocation is very implementation dependent
- phtrivier 4y agoI'm sincerely curious about what you have in mind for "clojure hosted on rust". Rust has a relatively thin runtime, but heavy static compilation work (types and lifetime and borrowing, etc...) , so it kinda seems like a completely different set of tradeoffs than what clojure favors (dynamicity, late bindings, runtime checks, managed memory, etc..) Or did you mean "a clojure-like syntax for something that produces rust code to be eventually compiled natively ?"
- kaba0 4y agoAlso, if everything would be ARC then it would be slow as all hell and would leak (it can’t GC circular references)
- cnity 4y agoI think they mean a JIT compiler for a clojure-like language written in rust, with rust interop (instead of Java interop). There would be no static compilation of rust code.
- fulafel 4y agoCode is easy, data is hard, the JIT would help with the former only. Rust on JSVM/.NET/JVM/Dart relies on the host platform to provide the underlying object system, reflection, interop with host code, GC etc.
- souenzzo 4y agoLike this one? https://github.com/babashka/sci/blob/master/doc/libsci.md https://github.com/babashka/sci/blob/master/doc/libsci.md
- pgt 4y agoHave a look at Carp for real-time applications: https://github.com/carp-lang/Carp https://github.com/carp-lang/Carp Carp is a statically-typed, GC-less Lisp that implements Rust’s borrow-checking. It is implemented in Haskell and compiles to C. It shares some syntax with Clojure, but I wish it was more Clojurey.
- kennytilton 4y agoCarp! A user just turned me onto that, I am looking at porting Matrix to Carp. Matrix started on Common Lisp in the last century. https://github.com/kennytilton/cells https://github.com/kennytilton/cells
- joshlemer 4y agoSo basically https://jank-lang.org/ https://jank-lang.org/ (assuming you don't mean literally it has to be Rust but just any LLVM clojure implementation)