jgpc42 / insn

Functional JVM bytecode generation for Clojure.
Eclipse Public License 1.0
198 stars 5 forks source link

I love this library #4

Closed cnuernber closed 3 years ago

cnuernber commented 3 years ago

Just wanted to say so publicly and officially.

We use it at a pretty deep level to build optimized dimension-specific indexing systems for ND operations:

https://github.com/techascent/tech.datatype/blob/57988eef8e544b02f6f36a1b6f52aef3a02cb0d1/src/tech/v2/tensor/dimensions/global_to_local.clj

I wrote a sort of blog post about my experience using it a while ago and meant to post it here:

https://github.com/techascent/tech.datatype/blob/57988eef8e544b02f6f36a1b6f52aef3a02cb0d1/docs/dimensions-bytecode-gen.md

jgpc42 commented 3 years ago

Thank you very much for your kind words.

I really enjoyed your blog post. Your project looks like exactly the kind of thing this library was designed for.

Do you mind if I add your project to the "Projects using insn" section of the README? You can give me a short description to use, if you would like. I'd also add a link to your blog post on the "Higher Level API" wiki page, if I have your permission.

Thanks again!

cnuernber commented 3 years ago

Please, by all means, anything you like.

Working on next version of datatype library btw, which will (among other things) combine everything above with graal native.

jgpc42 commented 3 years ago

Thank you. I've added the links. I'll be watching for the next version!

cnuernber commented 3 years ago

Slack announcement: https://clojurians.slack.com/archives/C06MAR553/p1614700654191700

I used insn to dynamically generate bindings for the different ffi systems in order to implement a data driven, multi backend ffi pathway.

Having this done with insn means I am not limited by Clojure's typesystem which, for instance, is unable to use invokeExact on a method handle.

It means I can also, in code, generate a class suitable for jna's directmapping pathway and of course generating and loading the classes is pretty much instant as there really isn't a compilation process.

Just FYI :-). This is great :-).