Live data from Hacker News

Owl – OCaml Scientific Computing

ocaml.xyz

11–20 of 80 posts

Re: Owl – OCaml Scientific Computing

#11
post #8

What's the one-minute pitch for using this, over say Python or Julia? I couldn't figure this out from a quick skim.

For me, as a Scipy/Flask/Postgres user it would be about completing the stack. Python’s great but for core things I’d love to have an ML-inspired alternative that’s even half as convenient. I watch this space with great interest.

A great choice of companion language to your Python stack would be Nim: https://nim-lang.org/ (not necessarily ML-inspired) but extremely productive and extremely fast. Bonus, v1.0 is right around the corner for Nim. If you're willing to venture out to a place with an evolving scientific ecosystem, Nim is a great choice to do scientific computing as part of a CPython stack (easy integration both ways since Nim compiles to both C/C++).

Re: Owl – OCaml Scientific Computing

#12

It's interesting to read through the contents here: http://ocaml.xyz/chapter/index.html They seem to be implementing the most popular parts of the Python numerical ecosystem from ndarrays to AD graph and neural nets, as well as plotting.

I guess it's bye-bye SciPy for me then.

Re: Owl – OCaml Scientific Computing

#13

It's interesting to read through the contents here: http://ocaml.xyz/chapter/index.html They seem to be implementing the most popular parts of the Python numerical ecosystem from ndarrays to AD graph and neural nets, as well as plotting.

I guess it's bye-bye SciPy for me then.

Yeah it'd be great to see ports based on scipy. I didn't see signal or ndimage stuff in Owl, which are regular parts of my scipy based stuff.

Re: Owl – OCaml Scientific Computing

#15
post #2

Kinda wish they had gone with F#. Would've been less work for them to write nice functional wrappers around existing .NET libraries. Of course, you can't get funding for something that unambitious, so I understand the tack. Still... I look forward to trying this out once more significant work has been done. I'm a big fan of OCaml-like languages, if that wasn't already obvious.

> around existing .NET libraries.

Which ones ? A free one analogous to libmath that works with float32 would be a good start.

Am serious, would love to know of some .Net libraries for number crunching that one would miss if one were to move out of the .Net platform. Or did you mean non-numeric libraries ?

Re: Owl – OCaml Scientific Computing

#16
The first thing I did was to check how slicing and indexing works. If anyone else is curious it is explained here

http://ocaml.xyz/chapter/slicing.html

The syntax is quite verbose. Anyway to make it better with macros ? Coming from number crunching world makes me wish that the syntax for list and arrays in OCaml were swapped.

On a different note, I hope Owl allows flexibility over memory layout in future. Inter-operating with Fortran is often necessary. Besides that, compile time reshaping n-dimensinal-arrays is very useful for having efficient code. As far as I know Julia can do this with macros, may be without macros too.

> OCaml’s Bigarray can further use kind GADT to specify the

> number type, precision, and memory layout. In Owl, I only

> keep the first two but fix the last one because Owl only

> uses C-layout, or Row-based layout in its implementation.

> See the type definition in Ndarray module.

Re: Owl – OCaml Scientific Computing

#17

What's the one-minute pitch for using this, over say Python or Julia? I couldn't figure this out from a quick skim.

Static typing. I'm doing a image-related and ml-related research at the moment, and I'm a seasoned OCaml user. So I've tried python for a bit, it was such a pain so I've decided to stick with owl. Without static typing, the discoverability is so low so that you're literally feeling pain tinkering with python. REPL experience with static types is so much better. With numpy and scipy, I had to stick to documentation al…

Although Julia is a dynamic language, the way it uses type inference and type annotations, you can also achieve a similar experience.

Naturally OCaml benefits from almost 20 years existence.

Re: Owl – OCaml Scientific Computing

#18
post #15
post #2

Kinda wish they had gone with F#. Would've been less work for them to write nice functional wrappers around existing .NET libraries. Of course, you can't get funding for something that unambitious, so I understand the tack. Still... I look forward to trying this out once more significant work has been done. I'm a big fan of OCaml-like languages, if that wasn't already obvious.

> around existing .NET libraries. Which ones ? A free one analogous to libmath that works with float32 would be a good start. Am serious, would love to know of some .Net libraries for number crunching that one would miss if one were to move out of the .Net platform. Or did you mean non-numeric libraries ?

There used to be some like IMSL, now discontinued, I guess there are others still.

Re: Owl – OCaml Scientific Computing

#19
post #2

Kinda wish they had gone with F#. Would've been less work for them to write nice functional wrappers around existing .NET libraries. Of course, you can't get funding for something that unambitious, so I understand the tack. Still... I look forward to trying this out once more significant work has been done. I'm a big fan of OCaml-like languages, if that wasn't already obvious.

Ocaml and F# are great languages but, rather than lament what language this excellent math library/framework is implemented in, lament that there is no F# equivalent or that projects like Owl outside Python don't really get the attention they need. While having multiple such frameworks per language makes little sense, each language having its own mathlib ecosystem makes a lot of sense from a diversity perspective.

We should want to see examples grow not just for F# or Ocaml but also Haskell, Rust, Scala and others. Then we should prioritize as much as possible, inter-operation of libraries, model definitions and outputs.

Re: Owl – OCaml Scientific Computing

#20

What's the one-minute pitch for using this, over say Python or Julia? I couldn't figure this out from a quick skim.

I'm a fan of functional languages and believe their implementation choices induce a unique approach to problem solving. Not necessarily better but different, which is enough on its own to justify such projects. While I prefer the functional approach, I'm well aware that's a large part just personal preference. What's true however, is every language makes certain things easier and other things difficult as a result of what's prioritized. The locale of functional and typed languages is less visited and worth exploring.
Post reply on HN