Live data from Hacker News

Real World OCaml – 2nd Edition (2021)

dev.realworldocaml.org

41–50 of 82 posts

Re: Real World OCaml – 2nd Edition (2021)

#41
post #31

The design of OCaml/Reason is the sweet spot of functional programming for me but every time I must deal with Dune after working with the tooling of Go or Rust I want to stab myself in the face repeatedly and I think that maybe that might just be related to the general concept of "masses" + OCaml.

Dune is a great "window" in my experience with OCaml, it forces you to do more than with every other language but you end up with a better understanding of everything.

This is fair. It's also a reason the "masses" are going to pick up Go or Rust instead.

Re: Real World OCaml – 2nd Edition (2021)

#42

The design of OCaml/Reason is the sweet spot of functional programming for me but every time I must deal with Dune after working with the tooling of Go or Rust I want to stab myself in the face repeatedly and I think that maybe that might just be related to the general concept of "masses" + OCaml.

What's wrong with dune? I thought it was really good.

Horrible doc, the configuration files are a made-up language with no extension, it is completely detached from managing the versions of your dependencies, or their source of origin (package manager? vendored? patched? internal?), horrible CLI, transitive dependencies are imported by default and it's hard to not do that, etc.

And then you try to use it in combination with opam and you want to blow your head.

Re: Real World OCaml – 2nd Edition (2021)

#43
post #31

The design of OCaml/Reason is the sweet spot of functional programming for me but every time I must deal with Dune after working with the tooling of Go or Rust I want to stab myself in the face repeatedly and I think that maybe that might just be related to the general concept of "masses" + OCaml.

Dune is a great "window" in my experience with OCaml, it forces you to do more than with every other language but you end up with a better understanding of everything.

I spent so much time reading the horrible documentation of Dune and I don't think I learned much about the internals of OCaml.

Re: Real World OCaml – 2nd Edition (2021)

#44
post #15
post #3

I'm a bit surprised to see this making it to the front page. It's been available for a long time and is one of the first resources anyone with an interest in OCaml is likely to encounter. It seems a little like posting a link to cppreference.com.

Even just "The lucky 10 000" can be already a reason good enough ( https://xkcd.com/1053/ )!

I wish someone posted that xkcd everytime someone posted a comment like GP

Re: Real World OCaml – 2nd Edition (2021)

#45

The design of OCaml/Reason is the sweet spot of functional programming for me but every time I must deal with Dune after working with the tooling of Go or Rust I want to stab myself in the face repeatedly and I think that maybe that might just be related to the general concept of "masses" + OCaml.

I haven't spent enough time with dune to form an opinion (go and cargo are absolutely marvelous though) but a quick search[0] reveals that dune is not the only option.

[0] https://github.com/ocaml-community/awesome-ocaml#package-man...>

Re: Real World OCaml – 2nd Edition (2021)

#46
post #31

Earlier quoted context omitted.

Dune is a great "window" in my experience with OCaml, it forces you to do more than with every other language but you end up with a better understanding of everything.

This is fair. It's also a reason the "masses" are going to pick up Go or Rust instead.

That's how I think things will go too. I really enjoy the time I spend with OCaml but whenever I need to do something I use JS because it gives me the frustration in lower doses if that makes sense. I learn less but sometimes I don't want to learn, I want to do.

Re: Real World OCaml – 2nd Edition (2021)

#47
post #31

Earlier quoted context omitted.

Dune is a great "window" in my experience with OCaml, it forces you to do more than with every other language but you end up with a better understanding of everything.

This is fair. It's also a reason the "masses" are going to pick up Go or Rust instead.

Rust has a larger ecosystem, but it's not even on the same planet as ocaml in terms of expressiveness.

Kind of disappointed facebook didn't run with ocaml, instead of doing the whole Reason thing. They could have been contributing to and using ocaml directly, instead they decided that programmers will freak out if there's no curly braces.

Re: Real World OCaml – 2nd Edition (2021)

#48
post #42

Earlier quoted context omitted.

What's wrong with dune? I thought it was really good.

Horrible doc, the configuration files are a made-up language with no extension, it is completely detached from managing the versions of your dependencies, or their source of origin (package manager? vendored? patched? internal?), horrible CLI, transitive dependencies are imported by default and it's hard to not do that, etc. And then you try to use it in combination with opam and you want to blow your head.

- thought the docs were good. Same level as cargo or npm or anything else I've used.

- the 'made up langauge' is just s-expressions, not any more made up than NPM using a json file. There's no standard file extension for them though, which is fair.

- I'll take your word on the rest of them, I didn't do anything heavy duty

Re: Real World OCaml – 2nd Edition (2021)

#49
post #32
post #7

Earlier quoted context omitted.

The standard library is quite small and not very usable for modern production applications. As an example a lot of the list manipulation functions are not tail-recursive because the tail-recursive implementation is less elegant.

> As an example a lot of the list manipulation functions are not tail-recursive because the tail-recursive implementation is less elegant. What makes you say this has to do with elegance? This sounds surprising.

Well I’m not certain that’s the case, it’s my guess because the language has a strong academic background and is also used for teaching purposes, and many functions are written like they would be in a textbook chapter on recursion, with the topmost stack frame holding a pointer to the front of the list, meaning you can blow the stack on large inputs. Why else would it be done that way? Certainly possible I’m missing something.

Re: Real World OCaml – 2nd Edition (2021)

#50

The design of OCaml/Reason is the sweet spot of functional programming for me but every time I must deal with Dune after working with the tooling of Go or Rust I want to stab myself in the face repeatedly and I think that maybe that might just be related to the general concept of "masses" + OCaml.

What's wrong with dune? I thought it was really good.

detailed answer upthread https://news.ycombinator.com/item?id=31278948
Post reply on HN