caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Is OCaml for experienced beginners?
@ 2015-12-18  1:08 Hendrik Boom
  2015-12-18  1:13 ` Hendrik Boom
  0 siblings, 1 reply; 5+ messages in thread
From: Hendrik Boom @ 2015-12-18  1:08 UTC (permalink / raw)
  To: OCaml Mailing List

# Is anyone in charge of the OCaml ecosystem?

I am a beginner to OCaml.  I'm not a beginner to the functional style of programmins, nor to sophisticated type systems, nor to  computing in general.  I started programming in 1963, was involved with Algol 68, Lisp, and constructive type theory.  I've managed to get code running in the days when you had to enter it as numbers; the machine I  used then wouldn't even type letters other than u, v, w, x, y, z (its version of hexadecimal).  In those days 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 syntax works and where to put the brackets.

But the world has changed since source code was in hexadecimal.

## Libraries

Nowdays, software rests on a huge inventory of libaries and tools.  A language, however elegant, isn't very usable for anything very practical without its libraries and their documentation.  It's not enough to know the machine inside out.

That's the hurdle I face whenever I program in OCaml -- figuring out which libraries are usable, and which are actually documented.  Not documented in the sense that someone has written an API guide and a tutorial, but documented 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, ask about it, and then be told, No, that one is troubled, you should use this other 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 it generates the right package files.  The options you need are actually documented in the Makefile.

I had to compile my own from the original Makefile, using the options that are indeed documented inside it.XXX

I've actually manged to write a trivial 3D videogame once I was pointed to the usable OpenGL library.  The one where the function names were closely related to the ones in the OpenGL manual, of which I have a printed copy.  I didn't have to guess what functions to use.

But then you discover that the one you were recommended to use is in the opam library (the one you access by saying opam install ... with a default configuration), and you decide to simplify things by using the Opam package instead 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 was configured 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 different options.  But that is another *huge* problem for a beginner.

So I stick with embedding the library source code in my application.  I already understand how to edit a Makefile.

## Documentation

And try to find documentation.  I'm dealing with this problemm with gtk at the moment.  There's a lablgtk.  There's a lablgtk2.  Whats the relationship between the two?  And where's the documentation.  There's links to a tutorial all over the place, but they seem all to be to the same web page, which isn't there.

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, the packages 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, but to get something done, I find myself programming in C++ instead, even though the concpts of OCAML fit my style of programming ike a glove and fit C++ like a 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, all the ways of doing stuff would be local folklore.  But for the isolated beginner, 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 tools and libraries he needs, it's great.

And most of the problem is lack of organised, findable documentation.

-- hendrik


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-12-20 13:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-18  1:08 [Caml-list] Is OCaml for experienced beginners? Hendrik Boom
2015-12-18  1:13 ` Hendrik Boom
2015-12-18 14:44   ` Gabriel Scherer
2015-12-18 15:21     ` Francois Berenger
2015-12-20 13:55     ` Gabriel Scherer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).