3 ms·
clojure now reaches jvm, js, a stored procedure language inside a database, (apparently also CLR but i haven’t tried it) and you can target them all with the sa
by dustingetz 8y ago
clojure now reaches jvm, js, a stored procedure language inside a database, (apparently also CLR but i haven’t tried it) and you can target them all with the same portable code, and they have a compatible value interchange format (like JSON) which reaches many more foreign platforms. our prod codebase at http://hyperfiddle.net http://hyperfiddle.net is portable clojure and runs on all above listed platforms, with seamless foreign interop for any native functionality, we have dozens of NPM dependencies for our browser client (seamless enough interop that we actually prefer npm libs over clojurescript libs as they tend to be more mature)
the main thing is the data structures need to be compatible, any value you have on one platform needs to be instantiable on all the others, that is the only way to have the libraries call into each other without impedance. the value notation is called EDN and the value interchange mechanic (that manufactures platform
specific value instances) is called Transit.
Clojure has a pretty cool network effect if you ask me
- abrax3141 8y agoAh, so if we all agreed that the jvm is the clr of the posix world, and then programmed in jython and clojure (or ABCL), and other j-* languages that sit on the jvm, then, modulo struct wrangling, this is what I’m after.
- dustingetz 8y agonot quite. there are two types of foreign interop - large scale and small - both matter. 1/ for distributed system interop, i think the struct wrangling can be solved at the transit layer - transit reaches cpython. for local interop, Clojure doesn’t reach C yet but there is at least one attempt to get it there on top of google right now. i see a clear consolidation loop. what is important in the big picture is that the semantics of the values are the same everywhere, not necessarily that they are memory compatible.