Hacker News new | ask | show | jobs
by ernst_klim 2815 days ago
>to have libraries for... anything really

It has thousands of libraries, check opam out. If something is absent, why won't you write your own library anyway? Elasticsearch is really not that complex, here is the example:

https://github.com/cyborgize/es-cli

1 comments

I addressed that in my other comment. It's not just Elasticsearch. That was one example out of at least 20 I could give you. The fact that there isn't even a client for the world's most popular search database is indicative of the ecosystem as a whole. It's fine if you use OCaml for whatever, but it's not what I'm looking for. Though, I am keeping my eye on this for personal interest: https://reasonml.github.io
>The fact that there isn't even a client for the world's most popular search database is indicative of the ecosystem as a whole.

It indicates that you haven't written one? That's a rather strange attitude, for sure it doesn't have a wrapper for any rest api, what it has is all needed tools for write it, that's what really matters. The tool in repo above does not even use a library, only generated bindings. It's much easier to write a client to a rest api in OCaml than in Go due to derivers [1], atdgen [2] and the power of the language. Take a look at graphql bindings as an example [3] [4].

[1] https://github.com/ocaml-ppx/ppx_deriving

[2] https://github.com/mjambon/atd

[3] https://github.com/andreas/ocaml-graphql-server

[4] https://www.youtube.com/watch?v=jaKcEGkItsY