Live data from Hacker News

OCaml 4.03: Everything else

blogs.janestreet.com

71–80 of 84 posts

Re: OCaml 4.03: Everything else

#71
post #54

Earlier quoted context omitted.

You can learn OCaml in a couple weeks.

Provided you had prior experience with functional languages then yes.

Not even, it was my first functional language (other than about an hour I had spent playing with F# a few months before) and I managed to be proficient enough to read real-world code and able to write my own code in it. Overall, OCaml doesn't have any very difficult concepts that stop you from using it. Can't get currying? Just pass args explicitly, even use tuples for them. Don't get monads? Ignore Lwt/Async. Don't know about functors? Just don't write module-heavy code, etc. Overtime you can sort of start to grasp the other features, but it's not a language that takes months just to be able to use.

Re: OCaml 4.03: Everything else

#72
post #57
post #38

Earlier quoted context omitted.

I for one was quite disappointed to have bought the book "Real World OCaml" only to notice that it wasn't supported on Windows. So aside a short gig to port old Caml Light code that I had lying around into OCaml, I actually spend my ML like coding in F#.

why did you buy the book, you can read it free online

I like to give money to the people for their efforts, so that they can work on technologies that I appreciate.

The writers of the book have bills to pay.

Re: OCaml 4.03: Everything else

#73
post #58
post #57

Earlier quoted context omitted.

why did you buy the book, you can read it free online

I usually buy online books to support the project. Not the person who bought this book.

Same with me.

Sure I was disappointed, but sponsoring the people working on OCaml is more important.

Re: OCaml 4.03: Everything else

#74
I wonder if this change will have any impact on multicore OCaml (given the reduction of allocation)? I don't know the internals of OCaml that well but multicore support has been my BS reason for not embracing OCaml albeit Mirage is looking better and better every day.

Re: OCaml 4.03: Everything else

#75
post #59

If I were already sold on using Haskell or OCaml for a new project, what would be the big seller for OCaml being the choice? I haven't dug into SML or OCaml and I'm not expert with Haskell yet but from looking at them they don't look substantially distant from Haskell.

I would strongly recommend looking at Racket and/or Closure. I tried the Haskell world and what a hassle to get it working on more then one machine the same way. The package management in Haskell is still more painful then other systems and is overly taxing. I work at two locations both using the same exact Dell machine with OpenSUSE and both gave problems. I also tried it on two windows machines and ugh. OCamal also…

Have you tried Stack yet?

Re: OCaml 4.03: Everything else

#76
post #34
post #15

Earlier quoted context omitted.

I really wanted to use OCaml, but it is adding features way later than I can continue to wait. I've started learning Ponylang as my CSP language over Elixir ever since I checked it out several months ago. Maybe OCaml will fit the bill one day. Jane Street's inertia seems to keep it going outside of the academic world, but that's a single linchpin in the commercial world outside of its academic pen.

Many commercial companies (and startups) use OCaml, eg Facebook, Bloomberg, etc https://ocaml.org/learn/companies.html

I am aware companies, big companies, use OCaml. My point, perhaps not made clear, is that Jane Street is building useful libs, and contributing back to OCaml with 'batteries included' type libraries. Facebook creating a VM and programming language compatible with PHP may be useful to some, but is not addressing the more fundamental needs or issues like bringing multicore to OCaml.

Re: OCaml 4.03: Everything else

#77

I really hope modular implicits will make it to the language one day. While OCaml libraries are no stranger to monads they usually only include `bind` and `return`. Since I'm coming from Haskell I'm used to a vast Applicative and Monad vocabulary and making do with just `bind` and `return` is rather painful. So having a generic library of Monad combinators that one could use with any Monad would be great. Also, being…

"monads they usually only include `bind` and `return`" All you need for a monad is `bind` and `return`. Is the problem that there are not polymorphic monad combinators like `sequence`, `traverse`, etc.?

Yes. You can implement sequence/traverse/etc. for each specific monad in OCaml, but if you want to write a generic implementation that will work for any monad then you need typeclass-like functionality.

Re: OCaml 4.03: Everything else

#78
post #27
post #25

Earlier quoted context omitted.

For me, this has been the central issue for not moving many of my projects to OCaml. OPAM sort of works on Windows, but most of the packages I tried to pull broke and fixing them was difficult. Making OPAM work seamlessly on Windows would be a big win in my opinion.

I had some success using this MinGW-based OPAM repository: https://github.com/fdopen/opam-repository-mingw The packages that I needed and that didn't compile in the standard repository were working thanks to patches applied in his repository. Also, the maintainer was very prompt and helpful when dealing with my pull request. There are other forks of that repository, but when googling for "opam windows" they do not ap…

Thanks for the reference as I've not tried that. Unfortunately, that project just failed to install for me, but I put in a bug report for the maintainer.

Ideally, there'd be an official Windows port and installer that doesn't depend on Cygwin. Certainly that takes time and effort to develop and maintain, so it's nice to see projects like this in the interim.

Re: OCaml 4.03: Everything else

#79
post #77

Earlier quoted context omitted.

"monads they usually only include `bind` and `return`" All you need for a monad is `bind` and `return`. Is the problem that there are not polymorphic monad combinators like `sequence`, `traverse`, etc.?

Yes. You can implement sequence/traverse/etc. for each specific monad in OCaml, but if you want to write a generic implementation that will work for any monad then you need typeclass-like functionality.

Not necessarily. You can manually pass in the module for the monad using first-class modules and then define the functions in terms of that. You could also define those operations in terms of monads using a functor if you want it to look more like Haskell.

Re: OCaml 4.03: Everything else

#80
post #64

Earlier quoted context omitted.

Oasis isn't that bad apart from a few options that are tricky to get (or the fact that, as far as I know, there's no sane way to make it install executables to your ocamlfind directory, which makes it fairly unsuitable for PPX extensions). For the most part, it's about as easy/intuitive as using Cabal.

Yes, I am using it too, but too bad it is basically unmaintained since its author moved to work for Google. I had hoped it could generate many more files like config for Merlin or Makefiles for build systems than ocamlbuild.

You may be interested in https://github.com/OCamlPro/opam-user-setup
Post reply on HN