Hacker News new | ask | show | jobs
by platform 2636 days ago
thank you. It is such a great service to the community around the language.

If I may, i would like to ask if there are any AI/numerics libraries that are available in clojure, that are also exposed and working via clojurescript.

I want to allow my users to write 'snippets' of instructions in a custom DSL, that get translated into some numeric, in the area of matrix functs, CAS, and a PDE solver.

Similar like core.logic works with clojurescript.

1 comments

Depending on what exactly you want to do, this can either be an unsurmountable problem (unrelated to Clojure but to the restricted browser environment) or something that can be solved with just redefining how you approach it.

1. JavaScript has poor selection of high-performance numerics resources. The language itself does not help...

2. If you would like to write code examples, which your readers should execute on /their/ machines, the issue is that it either has to be pure JS (ClojureScript) or your users have to install the underlying native performance libraries, at which point you can also ask them to install Clojure proper, and use that.

3. If you are fine with these examples running on the server /you control/, you are already covered by either gorilla-repl (not actively developed any more) or some of the plugins for popular notebook environments (Jupyter etc.). These work today but may need some fiddling until you set it up.

4. There is the more straightforward way that I prefer: provide straightforward Clojure projects for the code you explain in the web pages and ask your users to run these in their favorite programming environments.