Skip to content
HomeVideosBooks
AllTopicsTrends
BlogsPodcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    OCaml from the Very BeginningJohn Whitington

    OCaml from the Very Beginning

    John Whitington · 2013

    In OCaml from the Very Beginning John Whitington takes a no-prerequisites approach to teaching a modern general-purpose programming language. Each small, self-contained chapter introduces a new topic, building until the reader can write quite substantial programs. There are plenty of questions and, crucially, worked answers and hints. OCaml from the Very Beginning will appeal both to new programmers, and experienced programmers eager to explore functional languages such as OCaml. It is suitable both for formal use within an undergraduate or graduate curriculum, and for the interested amateur.

    Lisp & Functional
    Open LibraryAmazon
    Stats for nerds
    6recommend
    11mentions
    10people
    2013–2025years
    55% recommend45% neutral

    Mentions per year

    2013201520172019202120232025

    What Hacker News says

    1. nobleachNov 2024
      I get that. Having read Real World OCaml back when it was an O'Reilly book, I had a hard time not thinking Core was the defacto OCaml std lib. And its horrible documentation made me think the OCaml community was dead - or at least brain-dead. It appealed to one type of learner: Someone who just needs to see type signatures and has no interest in examples of how it could be used.

      After reading OCaml From The Very Beginning my stance softened. Learning PURE OCaml is a must. (if you want to do AoC with it). You may find yourself bringing in Core or Base, after you've got a good idea of a solution.

      It's definitely a fun language for doing AoC... but it can become extraordinarily frustrating when you hit a wall and all the StackOverflow answers assume Core.

      thread
    2. keyleSep 2024
      I think it was a pretty ambitious first project in OCaml, which is vastly different from the languages you came from.

      I took a similar path years ago and I found your situation akin to mine. The documentation is spotty, full of gaps, particularly for a new comer; although I found some reasonable books that helped "OCaml from the very beginning, 2013" and "Real world OCaml 2nd edition, 2022".

      I love OCaml but I don't see myself going back to it. I love re-reading old code that has been cleaned up. It reads like perfect design. It's satisfying.

      However I found writing OCaml to be painful, battling the syntax and the LSP. The LSP being actively highlighting everything red due to one typo, because the syntax is this way, and it's frustrating... And sure, you can work without LSP support, but it's useful than cmd+tabbing 300 times to run the program and watch it crash on typos. The right balance is to turn it off and turn it back on at times.

      But once finished, and years down the line, re-reading completed OCaml projects is a joy. I'd like to imagine that it made me a better programmer in other languages; due to the type-system-first approach, and transformation of data through functional programming.

      thread
    3. anactofgodSep 2023
      Up until a few days ago, I was also vacillating between learning OCaml or Haskell, before deciding on Haskell for reasons.

      I surveyed many free and paid-for references to build my foundation, before picking John Whitington's "Haskell From the Very Beginning" (https://www.haskellfromtheverybeginning.com), because it "takes a no-prerequisites approach to teaching the basics of a modern general-purpose programming language".

      I am also using Replit's "free-tier" as my Haskell learning environment. Replit let me jump right into the fun of Haskell, while postponing dealing with installation/configuration nuances until absolutely necessary. This is also letting me do learning any time I have a free moment from wherever I last left off on any computing device I have handy, including my tablets or smartphone.

      So far, my learning experience has been a joy.

      If you decide on OCaml, Whitington also wrote "OCaml From the Very Beginning" (http://ocaml-book.com), which available via free pdf or HTML thanks to the OCaml Software Foundation, and looks to be structured similar to his Haskell book.

      Hope this helps.

      thread
    4. haskellandchillApr 2017
      OCaml from the Very Beginning is amazing beginner material.
      thread
    5. brunocDec 2015
      I'm just about to start a course that uses OCaml for teaching. Any book or website recommendations?

      The textbooks are "OCaml from the very beginning" and "More OCaml: Algorithms, Methods & Diversions"

      thread
    6. avsmJul 2014
      Well, it's always fun to learn a new language, especially one with the 20 year provenance of OCaml! The modularity features that OCaml provides are really key to the core of Mirage. I'd suggest starting with:

      * OCaml from the very beginning: http://ocaml-book.com/

      * Real World OCaml (shameless plug: author). Freely available online: https://realworldocaml.org

      * The OCaml.org website itself: http://ocaml.org/learn/ (99 problems is really fun).

      Mirage does of course offer an FFI to interface with C libraries, although the majority of the hacking efforts are geared towards filling in gaps in the pure OCaml library ecosystem. See the FFI blog post for more on this (you can even bind to C libraries interactively using the `utop` REPL with ctypes): http://openmirage.org/blog/modular-foreign-function-bindings

      Mirage is as much about the security and efficiency of using static typing through the OS stack, as it is about exploring the concept of unikernels. There are other efforts more into compatibility with existing applications (like OSv) that you might want to look into for running an existing stack. But I encourage you to experiment with thinking and trying the Mirage style of unikernel assembly, and report back with where it works and the areas where it could improve!

      Others have written more eloquently than me about why you should bother learning OCaml:

      * Esper: http://tech.esper.com/2014/07/15/why-we-use-ocaml/

      * Thomas Leonard's Python to OCaml retrospective: http://roscidus.com/blog/blog/2014/06/06/python-to-ocaml-ret... (Thomas also leads the Mirage ARM port work)

      * Yaron Minsky's OCaml for the Masses: http://queue.acm.org/detail.cfm?id=2038036

      thread

    Related

    More OCamlJohn Whitington
    2015–2018

    More OCaml

    John Whitington
    2 recommend · 3
    Cover of Real World OCaml
    2012–2026

    Real World OCaml

    Yaron Minsky
    69 recommend · 142
    Cover of On LISP
    2007–2026

    On LISP

    Paul Graham
    192 recommend · 533
    Cover of Practical Common Lisp
    2007–2026

    Practical Common Lisp

    Peter Seibel
    218 recommend · 400
    Cover of Real World Haskell
    2008–2026

    Real World Haskell

    Bryan O'Sullivan
    122 recommend · 250
    Cover of An Introduction to Programming in Emacs Lisp
    2010–2026

    An Introduction to Programming in Emacs Lisp

    Robert J. Chassell
    16 recommend · 25
    Cover of Lisp in Small Pieces
    2007–2026

    Lisp in Small Pieces

    Christian Queinnec
    101 recommend · 246
    Cover of Land of Lisp
    2009–2026

    Land of Lisp

    Conrad Barski
    124 recommend · 256