From : Hendrik Boom <hendrik AT topoi.pooq.com>

: Hendrik Boom <hendrik AT topoi.pooq.com> To : OCaml Mailing List <caml-list AT inria.fr>

: OCaml Mailing List <caml-list AT inria.fr> Subject : [Caml-list] Is OCaml for experienced beginners?

: [Caml-list] Is OCaml for experienced beginners? Date : Thu, 17 Dec 2015 20:08:35 -0500

: Thu, 17 Dec 2015 20:08:35 -0500 Authentication-results : mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=hendrik AT topoi.pooq.com; spf=None smtp.mailfrom=hendrik AT topoi.pooq.com; spf=None smtp.helo=postmaster AT april.topoi.pooq.com

: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=hendrik AT topoi.pooq.com; spf=None smtp.mailfrom=hendrik AT topoi.pooq.com; spf=None smtp.helo=postmaster AT april.topoi.pooq.com Ironport-phdr: 9a23:R8JtpxyhB+s18ULXCy+O+j09IxM/srCxBDY+r6Qd0e0QIJqq85mqBkHD//Il1AaPBtWFraocw8Pt8IneGkU4qa6bt34DdJEeHzQksu4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2WVTerzWI4CIIHV2nbEwudrqzQtaapv/0/t7x0qWbWx9Piju5bOE6BzSNhiKViPMrh5B/IL060BrDrygAUe1XwWR1OQDbxE6ktY+YtaRu+CVIuv8n69UIEeCjJ/x5HvRkC2EBGGkw4IXOvBjHTA2Arl8dSXlexhFBBgyA6BDhQr/wtDH7v6xzwn/JE9fxSOUUVDKu9aZoADXvjyJPYz409m3Ni89YkKVDpxPnvxt42sjfZ4TDZ6k2Rb/UYd5PHTkJZc1WTSEUR9rkN4Y=

# Is anyone in charge of the OCaml ecosystem?I am a beginner to OCaml. I'm not a beginner to the functional style ofprogrammins, nor to sophisticated type systems, nor to computing in general.I started programming in 1963, was involved with Algol 68, Lisp, andconstructive type theory. I've managed to get code running in the days whenyou had to enter it as numbers; the machine I used then wouldn't even typeletters other than u, v, w, x, y, z (its version of hexadecimal). In thosedays what you needed to know was the instruction set and its encoding.Everything followed from that.Believe be, I appreciate every advantage high-level languages have to offer.With this background, you'd expect I'd take to OCaml like a duck to water.Wrong.The language itself is actually usable. Once you figure out how the syntaxworks and where to put the brackets.But the world has changed since source code was in hexadecimal.## LibrariesNowdays, software rests on a huge inventory of libaries and tools. Alanguage, however elegant, isn't very usable for anything very practicalwithout its libraries and their documentation. It's not enough to know themachine inside out.That's the hurdle I face whenever I program in OCaml -- figuring out whichlibraries are usable, and which are actually documented. Not documented inthe sense that someone has written an API guide and a tutorial, butdocumented in the sense that it is actually possible to find them.There are often multiple packages to accomplish a single task.You don't know which one to use. You try the obvious one, have trouble, askabout it, and then be told, No, that one is troubled, you should use thisother one instead. The one you can download from *this* site. So you do,You download it. You figure out how to edit the Makefile so that itgenerates the right package files. The options you need are actuallydocumented in the Makefile.I had to compile my own from the original Makefile, using the options thatare indeed documented inside it.XXXI've actually manged to write a trivial 3D videogame once I was pointed tothe usable OpenGL library. The one where the function names were closelyrelated to the ones in the OpenGL manual, of which I have a printed copy. Ididn't have to guess what functions to use.But then you discover that the one you were recommended to use is in the opamlibrary (the one you access by saying opam install ... with a defaultconfiguration), and you decide to simplify things by using the Opam packageinstead of including all the library's source code within your own project.But when you do that, it doesn't work, because the Opam package was wasconfigured with optons that preclude essential functionality. (in my case,the ability to load PNG files, not just JPEG).So what? another might say. Just tell opam to install with differentoptions. But that is another *huge* problem for a beginner.So I stick with embedding the library source code in my application. Ialready understand how to edit a Makefile.## DocumentationAnd try to find documentation. I'm dealing with this problemm with gtk atthe moment. There's a lablgtk. There's a lablgtk2. Whats the relationshipbetween the two? And where's the documentation. There's links to a tutorialall over the place, but they seem all to be to the same web page, which isn'tthere.Opam has a way, I'm told, to install documentation along with the package,but haven't been able to figure out how it works. Or maybe, just maybe, thepackages I've been trying it on don't have documentation. Who knows?## Are beginners even welcome?Is there anyone in charge of any of this?And what's the result? It's a lovely language, it deserves to be used, butto get something done, I find myself programming in C++ instead, even thoughthe concpts of OCAML fit my style of programming ike a glove and fit C++ likea rusty nail keeps my hand warm. Or spend days or months trying things,asking questions, deciphering the answers, and so forth.I imagine if I were working in a shop where lots of people used OCaml, allthe ways of doing stuff would be local folklore. But for the isolatedbeginner, there's a huge barrier to entry.It's a lovely language, but the pragmatics of its ecosystem are all wrong.For a beginner. For someone with experience in the particular set of toolsand libraries he needs, it's great.And most of the problem is lack of organised, findable documentation.-- hendrik