tags:

views:

2009

answers:

10

Suppose I had to learn OCaml in a hurry. What would you suggest I read and/or do?

I would happily spend real $$$ (or £££, or €€€) on a book or two, but by the time our favoured online book store delivers them I would hope to have turned my attention to something else.

+9  A: 

There is a nice cheat sheet for all your syntax needs --it came in handy when I (used to) forget simple syntax.

But for learning it, I posted some books and tutorials in another thread, and the manual isn't really a tough or long read if you give it some slack --since it was translated from French.

An aside about books, I don't think you need to buy any --esp. oCaml for Sci_entists-- but stick to the O'Reilly or Jason Hickeys book. OFS is expensive, and doesn't add anything that you can't find for free in the other places.

nlucaroni
Most of the information in OCaml for Scientists is not available elsewhere. For example, the chapter on optimization goes way beyond anything else available.
Jon Harrop
At 85 pounds, it's damned expensive, so I've never bought it. However, another reason some might recommend against it is that Harrop has a reputation for being abrasive. Don't let this deter you if you need the material. He is smart and thoughtful, whatever you think of his personality.
Don Wakefield
Hello Jon Harrop, will you be making F# for Scientists?
Unknown
he has F# for Scientists already. And yes, I agree with Don, but I actually have the book (OfS) sitting on my shelf --not in arms reach, but none of them are, that's why I have wheels on my chair.
nlucaroni
@Unknown: I wrote F# for Scientists 2 years ago and it is published by Wiley. I am currently writing a new book on F# that will cover all of the latest libraries, language features and tools. Assuming everything goes well with F#, I'll hopefully continue work on HLVM and publish books on my own language implementation.
Jon Harrop
+2  A: 

I suggest you need a good book on functional programming even before you learn OCaml. Learning OCaml (or F# or Lisp et al) requires a totally different mindset and approach from traditional OO languages. I would suggest Functional Programming: Practice and Theory by Bruce J. Maclennan

Conrad
+6  A: 

Developing Applications with Objective Caml - available for free online

Kristopher Johnson
+4  A: 

There's a pretty good tutorial you go can through at http://www.ocaml-tutorial.org/.

Kevin Ballard
+4  A: 

I'm wary of learning anything fast.

mk
Norvig's text is about learning to program, not a certain programming language.
stesch
You and Peter Norvig.
Norman Ramsey
+5  A: 

I'll second Jason Hickey's Introduction to Objective Caml, especially if you have no previous experience with functional programming. The language manual is great, if you just need to learn the syntax.

Chris Conway
A: 

Buy a few books. Set up your dev environment on a laptop. Find a(n) open source project(s) in languages you know, download source to laptop. GO to Flagstaff and rent a cabin, make like a mountain man and code. Key is to have electric but no internet.

Brian Leahy
+2  A: 

OCaml for Scientists and The OCaml Journal.

Jon Harrop
Why did you get so many downvotes? These books aren't really good examples of "fast learning method" but still...
alvatar
That's the kind of audience stack overflow has garnered.
Jon Harrop
Downvotes may be due to suggesting your own work.
Kristopher Johnson
+2  A: 

Suppose I had to learn OCaml in a hurry. What would you suggest I do?

Slow down.

Then read Teach Yourself Programming in Ten Years by Peter Norvig.

Norman Ramsey
+1  A: 

It is a shame that people who show they are not really interested in answering a question helpfully feel obliged to say something anyway.I agree that to grok the essence of programming 'fast' is a mere fantasy for most, but I am sure that there are people out there who can at least grasp the essence or syntax of a language in a relatively short time. Regarding the comment that refers to Jon Harrop as abrasive ... I have yet to see an example of this being true,having followed his comments and thoughts in one way or another on the internet, for a few years now. Somebody mentioned to me recently that John Logie Baird believed that his invention would change the world forever, bringing information to the masses, yet we have seen how it's potential has been exploited for much less savoury purposes, and I can't help feeling that with a little more thought, the internet could be the spark for the education of much more people than it is already ... if only we would all try to to use the bandwidth more positively.

Lloyd Moore