From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id AAD547EE94 for ; Tue, 25 Dec 2012 02:46:21 +0100 (CET) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of berenger@riken.jp) identity=pra; client-ip=134.160.33.162; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="berenger@riken.jp"; x-sender="berenger@riken.jp"; x-conformance=sidf_compatible Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of berenger@riken.jp designates 134.160.33.162 as permitted sender) identity=mailfrom; client-ip=134.160.33.162; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="berenger@riken.jp"; x-sender="berenger@riken.jp"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of postmaster@postman.riken.jp designates 134.160.33.162 as permitted sender) identity=helo; client-ip=134.160.33.162; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="berenger@riken.jp"; x-sender="postmaster@postman.riken.jp"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmACANgE2VCGoCGie2dsb2JhbABEFr1vDgEBFhAWJ4IeAQEEATg0BwMICwsYCSUPAhA2EwYCAQEQh20DCQYMpgKGBw2JVYttaoRDA4hgiXmBXYFWgRyET4VMiBQ X-IronPort-AV: E=Sophos;i="4.84,351,1355094000"; d="scan'208";a="166744813" Received: from postman2.riken.jp (HELO postman.riken.jp) ([134.160.33.162]) by mail4-smtp-sop.national.inria.fr with ESMTP; 25 Dec 2012 02:46:19 +0100 Received: from postman.riken.jp (postman2.riken.jp [127.0.0.1]) by postman.riken.jp (Postfix) with SMTP id 72CBE1260450 for ; Tue, 25 Dec 2012 10:46:15 +0900 (JST) Received: from [172.27.98.103] (rikad98.riken.jp [134.160.214.98]) by postman.riken.jp (Postfix) with ESMTPA id 617AB1270063 for ; Tue, 25 Dec 2012 10:46:10 +0900 (JST) Message-ID: <50D90562.90501@riken.jp> Date: Tue, 25 Dec 2012 10:46:10 +0900 From: Francois Berenger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: caml-list@inria.fr References: <2128CD06-9356-48E9-9284-DCB865E24690@khandkar.net> In-Reply-To: <2128CD06-9356-48E9-9284-DCB865E24690@khandkar.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.6.0.2009776, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.12.25.13615 Subject: Re: [Caml-list] new user - old questions On 12/25/2012 02:59 AM, Siraaj Khandkar wrote: > +1 for OCaml.org! It is an excellent organization of available OCaml resources > that I wish existed when I started checking-out OCaml. > > > SHORT VERSION: > > Editor: > Vim with OMlet plugin > > Books: > 1) Jason Hickey's "Introduction to Objective Caml" > 2) The manual: http://caml.inria.fr/pub/docs/manual-ocaml/ There is also this quite thorough book: "Developing Applications With Objective Caml" http://caml.inria.fr/pub/docs/oreilly-book/html/index.html I just wish the book would have some example of an Error monad. I mean, something advanced you don't find in a lot of other languages. This book is OK even for complete beginners, in my opinion. > Syntax: > I actually preferred OCaml's syntax over Haskell's from the start (meaning > that I don't just prefer OCaml because of familiarity). It is highly > subjective and I don't care to argue about it, but, to me it just feels > simpler, more uniform and (gasp) clean. :) Though honestly, cleanliness > primarily comes down to the author's deliberate effort. > > > LONG VERSION: > > I started by reading/skimming beginning chapters of Jason Hickey's book, and > then just committing to writing in OCaml, every small utility that I had a need > for while looking things up in the manual and stdlib reference. So lots of head > banging and RTFMing, the best way, IMHO :) > > That is for "how to do it" aspect of things, but another, IMHO most > enlightening, aspect is "how to think" in OCaml (or ML in general), and for > that I highly recommend reading Jane Street's blog, with the most important > entry point (IMHO, of course) being the Effective ML talk: > https://ocaml.janestreet.com/?q=node/82 > > I'm yet to switch to their standard library (though I plan to), but just about > everything I've read from these guys so far, have been most moving to me as a > programmer in general, with OCaml just being an excellent facilitator of such > thinking. > > Another thing I have an opinion on is the build system. The "right" way to > compile and link your programs have been quite confusing to me as a beginner. I > was told to "just use OASIS", and I remember wasting quite a lot of time trying > to grok everything it does without understanding OCaml first. I finally (and > rightfully) decided to just write Makefiles with "manual" build steps as is > described in the manual, which helped me to understand how things are actually > put together. > > I just switched to ocamlbuild, and can now fully appreciate what it has to > offer! I plan to go to OASIS eventually, but haven't quite developed an > understanding of what it would gain me (plus I noticed some behaviors that rub > me the wrong way). Seems like distributing libraries is it, but I'm not quite > there yet, so time will tell. > > For managing external libraries, my initial savior was GODI - I had some issues > with packages breaking, but I don't know what I would've done without it - it > is awesome! However, as of a couple of months ago, there's now a much improved > package manager for OCaml - OPAM. I now use OPAM exclusively. > > As for editors, I'm a happy Vim user, with OMlet plugin: > http://www.lix.polytechnique.fr/~dbaelde/productions/omlet.html > > So, my subjective and personally-inspired roadmap is such: > > * Get inspired by Effective ML > * Get a feel for the language from Jason Hickey's book > * Use OPAM > * Write Makefiles with manual steps (see the official manual) > * Hack, hack, hack! > * Watch, and this time understand, Effective ML again > * Switch to ocamlbuild > * Go forth and conquer! :) > > > P.S. For the experienced Camlers, I am not claiming to be "right" in anything I > said, it is simply a description of my perception as a new comer to the > language. > > > > On Dec 24, 2012, at 7:38 AM, Malcolm Matalka wrote: > >> Check ocaml.org, there are tutorials, references, and book suggestions. I >> bootstrapped myself with a tutorial, then read through language spec. Ocaml >> is thankfully not a complicated language to get productive with. >> >> /M >> On Dec 24, 2012 1:30 PM, "Gour" wrote: >> >>> Hello! >>> >>> Some years ago I was looking for adequate language for one open-source >>> project to be done in free time and although I took a look at OCaml, >>> somehow, I didn't like syntax and went playing with Haskell. >>> >>> Never really grokked monads and had feeling that despite nice syntax, >>> some things are more complicated for pragmatic programming than they >>> should be. >>> >>> I managed to scare enough few potential contributors and had to >>> postpone the project for 'sometime in the future'. >>> >>> Later, I was exploring D (v2), but it seems that the language is never >>> finished, code breaks often from one version to another, poor GUI >>> bindings support etc. >>> >>> Shortly thought about using Python+Cython, but dynamic language never >>> sounded right for my project. >>> >>> In utter despair I went to evaluate Ada which seems as nice (a bit >>> verbose) language, mature, actively developed, good ecosystem, but >>> somehow I was missing lack of FP features. >>> >>> For a short time I took a look at Nimrod - nice & interesting language, >>> but very small community and lack of FP features. >>> >>> Then, I do not know exactly how, I got inspired to take a look at OCaml >>> and in a very short time, I could see that there is a language with >>> quite OK syntax, actively developed, not small community enabling me to >>> use FP language with thinking too much about monads and category theory >>> in order to do practical things. >>> >>> The remaining thing is to get hints how to proceed, iow.: >>> >>> a) Real World Ocaml is going to be released in Oct 2013, so I wonder is >>> there any online/paperback book you can recommend? I'm on Debian wheezy >>> which means no 4.0 yet, but probably we'll try to take advantage of new >>> features in due course of time >>> >>> b) it looks that Emacs is the best-supported editor for OCaml. How is >>> support in Vim/Geany? What do you recommend? >>> >>> Now I wonder about Typerex which looks cool, but I was told on #ocaml >>> that it's "dead project" and was recommended to use tuareg mode? >>> >>> That's actually everything or most important...editor & good book to >>> start with? >>> >>> >>> Sincerely, >>> Gour >>> >