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.
Real World OCaml – 2nd Edition (2021)
31–40 of 82 posts
Re: Real World OCaml – 2nd Edition (2021)
#32I'm not a huge fan of this book, if I get a book like this I'd expect it to focus on the standard library and not third party libraries. On the other hand it says "real world" OCaml and as far as I can tell that really is how OCaml used so It's hard to blame the author.
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.
What makes you say this has to do with elegance? This sounds surprising.
Re: Real World OCaml – 2nd Edition (2021)
#33Totally unrelated to the link/book, but sparked a question that I've had for a while (curious to hear any answers) --> when you take an initial look at a programming language that you're completely unfamiliar with, and you glance through the syntax of all the basic constructs, do you ever have a particularly strong reaction (be it negative or positive), and if so have you tried to identify why that might be the case?
As I think about why those are I think one of the biggest reasons is familiarity, it's easy to get comfortable doing one thing and it truly sucks to feel like you don't know anything again (I think somebody called this the curse of knowledge? Idk).
Lately I've been intentionally the unknown, or, those languages that I'd look at and be like, "but why!?", for example, why would I want to learn or only use recursion when a for/while has worked for pretty much my whole career? or, following the same functional languages traits, why immutable data? seems like a step backwards?
But the thing is that people, quite likely smarter than me, or at least, a lot more familiar with challenges that I'm not familiar with, came up with solutions that diverge from what I know... and I want to know why! Why they came with immutable data or recursion or a language that pretty much everything is a list (LISP)... and the answers are quite surprising and at the same time I feel that joy of discovery that has almost been erased by years in the industry.
So when you come across a language that you have strong feelings/opinions about, wearing the shoes of the people using it might be quite enlightening and enjoyable.
While I say this, I'm a complete hypocrite because I won't give such courtesy to OOP... but hey, none of us are perfect ;-)
Re: Real World OCaml – 2nd Edition (2021)
#34Re: Real World OCaml – 2nd Edition (2021)
#35I'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.
Re: Real World OCaml – 2nd Edition (2021)
#36Re: Real World OCaml – 2nd Edition (2021)
#37The 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.
Re: Real World OCaml – 2nd Edition (2021)
#38Re: Real World OCaml – 2nd Edition (2021)
#39An easier introductory book: https://ocaml-book.com/
It was published in 2013, though. Much has changed in terms of tooling, right?
Things are different for RWO since it relies also on a number of extra tools and libraries which, indeed, change over time (sometimes also substantially)
Re: Real World OCaml – 2nd Edition (2021)
#40The 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.
Sorry could you explain your comment some more? Genuinely curious what is bad about dune. Just started using it
I'm sure there's a crowd, especially here on HN, that views this as some sort of purity test for the language, but in my opinion it's needlessly obtuse over used by modern build systems.
Then there's the fact that several `init` commands don't actually fully `init` a project (and up until recently, the very example in OCaml's getting started documentation was broken).
Then there's this insanity
dune build
dune test
dune exec # hahaha no, no, this doesn't work.
Then you gotta manually tape together crap between opam and dune (and don't get me started on how insane the lockfile situation is -- I swear to god I complained once and someone told me I should learn to use nix!).This is all very fun and yak shave-ey and I generally grin and bear it, but boy do I totally get why most people look at me like I'm a weirdo because I like this language.