Live data from Hacker News

Draft of OCaml Scientific Computing book

discuss.ocaml.org

121–130 of 132 posts

Re: Draft of OCaml Scientific Computing book

#121
post #74

Earlier quoted context omitted.

I don't know. I think Scala and F# have stolen OCaml's thunder more than Rust. While Rust has been inspired by ML, OCaml and Rust have much different usecases.

Other than interop with .NET does F# bring anything more ? Perhaps a little cleaner syntax. One thing F# does not bring is Ocaml's powerful module system

[deleted]

Re: Draft of OCaml Scientific Computing book

#122

Earlier quoted context omitted.

How much of F#, .net and its data science stack can be divorced from Windows?

.net is cross platform now. it has the same "run anywhere" philosophy as the JVM. I haven't used windows in over 10 years.

.NET Core isn't as feature rich as Java the GUI side, or supported platforms thought.

Almost anything with a CPU has some OEM shipping JVM implementations for them, while Microsoft focus only on the major desktop and mobile OSes (one of them with its own coffee brand).

Re: Draft of OCaml Scientific Computing book

#123
post #23

Earlier quoted context omitted.

I am part of Owl contributors/maintainers. You are right that the ecosystem is small, and will likely be always behind Python, R and Julia. But considering how small the community around numerical methods in OCaml is, I think the work that went into owl and this book is incredible and may help raising awareness and growing the userbase. I think one of our current limitations is the lack of a high quality, full-featur…

> You are right that the ecosystem is small, and will likely be always behind Python, R and Julia. But you should be able to call those languages from OCaml. For instance, RInside https://cran.r-project.org/web/packages/RInside/index.html lets you call R from any language with a C FFI. A very simple solution (even if not quite as convenient as a full OCaml solution) that lets someone write OCaml if that's their prefe…

I said it earlier, but if I have to call R from another language, in most cases I'd rather just use R by itself.

Of course there are reasons why you might integrate the two. Perhaps you have an R expert doing the statistics work and the back end developer gluing everything together. That's fine, but at some point the system becomes pretty confusing and is a giant leaky abstraction.

Re: Draft of OCaml Scientific Computing book

#124
post #49
post #44

Earlier quoted context omitted.

> It's harder to do generic polymorphism in OCaml since the language has nothing like C++'s parametric templates or Haskell's type classes. It does have a very nice module system that has the required flexibility, but compared to these languages, I think it is clunky for the kind of genericity seen in scientific computing. Are parametrized modules really clunkier than parametric templates ?

At least for beginners, they absolutely are. I have found undergrads generally get the idea behind something like HashMap but getting them to reason about OCaml modules takes quite a bit of effort.

(int, string) Map.t doesn't seem to be too many steps away from your example. When I was learning OCaml, I found that much of the module and module type system can just be seen as a more beefed up version of interfaces in OOP languages, so it didn't take long to see its benefits.

Re: Draft of OCaml Scientific Computing book

#125
post #91

Earlier quoted context omitted.

How about Haskell?

Haskell is like the nerdy cousin of the ML family. Everyone knows he's smart, but no one would think to ask him to fix the kitchen sink or install the new dishwasher. Seriously, Haskell is massively impressive, both as a research language and as an implementation. But it does not shed that certain research attitude. Every known problem seems to be boring. "Oh you want a proxying http server? No problem, this is just…

Facebook uses Haskell in a critical portion of their user-content publishing pipeline.

https://engineering.fb.com/security/fighting-spam-with-haske...

Re: Draft of OCaml Scientific Computing book

#126
post #112
post #42

Earlier quoted context omitted.

> I can't understand why OCaml doesn't have mass adoption. Probably for the exact same reason each year you think about learning OCaml you decide not to (I mean this sincerely, not trying to be snide). I think the main reasons it doesn't see mass adoption in industry: * There are only two major companies that do a substantial amount of OCaml that I can think of off the top of my head, Jane Street and Ahrefs. Facebook…

I just cannot understand how people find Python easy to learn but languages like F# or OCaml hard to learn. I personally find Python to be a much more confusing language than F#.

Seriously. Every time I'm forced to use Python or JavaScript I feel like I'm fumbling around totally blind.

Re: Draft of OCaml Scientific Computing book

#127
post #95
post #42

Earlier quoted context omitted.

> I can't understand why OCaml doesn't have mass adoption. Probably for the exact same reason each year you think about learning OCaml you decide not to (I mean this sincerely, not trying to be snide). I think the main reasons it doesn't see mass adoption in industry: * There are only two major companies that do a substantial amount of OCaml that I can think of off the top of my head, Jane Street and Ahrefs. Facebook…

> * The tooling is lacking. Care to elaborate on this point? Maybe it's just because I'm coming from Haskell (lol), but my experience with OCaml's tooling has been pretty darn good. While I don't think there's a heavyweight IDE for OCaml à la IntelliJ, in Emacs I get my error messages inline, on-the-fly checking (including type inference and checking, which is huge), and pretty good completion. All of this seems to "…

Now try setting up OCaml tooling on Windows. That alone would be responsible for a lot of missing users.

Re: Draft of OCaml Scientific Computing book

#128
post #122

Earlier quoted context omitted.

.net is cross platform now. it has the same "run anywhere" philosophy as the JVM. I haven't used windows in over 10 years.

.NET Core isn't as feature rich as Java the GUI side, or supported platforms thought. Almost anything with a CPU has some OEM shipping JVM implementations for them, while Microsoft focus only on the major desktop and mobile OSes (one of them with its own coffee brand).

That should be changing soon.

https://devblogs.microsoft.com/dotnet/introducing-net-multi-...

Re: Draft of OCaml Scientific Computing book

#129
post #122

Earlier quoted context omitted.

.NET Core isn't as feature rich as Java the GUI side, or supported platforms thought. Almost anything with a CPU has some OEM shipping JVM implementations for them, while Microsoft focus only on the major desktop and mobile OSes (one of them with its own coffee brand).

That should be changing soon. https://devblogs.microsoft.com/dotnet/introducing-net-multi-...

That is Xamarin rebranded, and there is yet to be a clear roadmap where it stands versus Uno, Blazor (also being pushed for Electron like deployments), WinUI.

Plus it doesn't help that some teams are adopting React Native, even alongside .NET.

Too much chaos going on sorting out WinRT, while most of us aren't willing to say how high when Microsoft says jump.

Re: Draft of OCaml Scientific Computing book

#130
post #95

Earlier quoted context omitted.

> * The tooling is lacking. Care to elaborate on this point? Maybe it's just because I'm coming from Haskell (lol), but my experience with OCaml's tooling has been pretty darn good. While I don't think there's a heavyweight IDE for OCaml à la IntelliJ, in Emacs I get my error messages inline, on-the-fly checking (including type inference and checking, which is huge), and pretty good completion. All of this seems to "…

Now try setting up OCaml tooling on Windows. That alone would be responsible for a lot of missing users.

This should improve soon: https://youtu.be/E8T_4zqWmq8?t=3459
Post reply on HN