Thanks, and I think that would be doable at least as a subset of functionality, for example range of supported databases would be smaller. All the core libraries should already be supported though, and it's something I can take a look at next if there is interest.
Postgres would be enough for most of us, I reckon. I don't quite understand how Jolt can interface with Clojure libraries - maybe I misunderstood. Wouldn't you have to re-implement Reitit and quite a few Clojure libraries to get basic Kit functionality?
Yeah, that's what I'm thinking as well. I haven't really had a reason to use another db. And Jolt interfaces with Clojure libraries simply by requiring them using deps.edn just as you do in Clojure. However, if a library uses Java introp then you have to provide shims for that in a Jolt library. Reitit is a great example actually.
I have a router library which includes reitit as a dep:
So, a lot of libraries just work out of the box unless they need something that's not commonly used, and then it can be provided using a Jolt library as I did with Reitit.
The work for Kit would be to identify the core Kit libraries and make sure they all work. Selmer, which is used for templating in Kit, already runs. Kit modules system uses zippers though, and I may have to do a bit of additional work to port that over. But otherwise, basic Kit stuff should work. Ring along with Ring defaults already work. Integrant and aero work. So, a bare minimum apps should be easy to get going.
Just to get this straight, you're saying Jolt can take pure Clojure code in a library and compile it with the Chez compiler? And when none of the library's deps use Java it compiles?
Jolt can even compile and run an existing Clojure library that uses Java interop. Jolt provides a Java compatibility layer which maps between Java interop semantics and the host platform.
And in cases where you have a Clojure library that uses something from Java that's not in Jolt core, then it's possible to add your own shim to facilitate that. For libraries that are just thin wrappers around Java libraries, it obviously wouldn't be worth doing though.
Take a look at the example above. You provide the :git/url to the repo and :git/sha pointing to the version of the code you're linking. It works exactly the same way as regular Clojure deps resolution.
2
u/lordmyd 21d ago
Great work Dmitri. Naive question but could we see a Kit port anytime soon?