Live data from Hacker News

Owl – OCaml Scientific Computing

ocaml.xyz

31–40 of 80 posts

Re: Owl – OCaml Scientific Computing

#31
post #18
post #15

Earlier quoted context omitted.

> 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.

That's the problem. Everybody has to guess. Everyone thinks there is something out there that somebody else knows. This is a problem I dont have in some of the other ecosystems.

That I would have to (i) write my own cos or (ii) take a dependency on a commercial 3rd party library that will likely not be around for long or (iii) call a native library through and FFI, for something as simple as a cos of float32 is not terribly exciting.

Re: Owl – OCaml Scientific Computing

#32

Earlier quoted context omitted.

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…

How do you deal with data you haven’t seen before? Importing a large csv for example where a lot of the data is the wrong type or the wrong format.

Like in any other language, write a parser? What do you mean by the wrong format?

Re: Owl – OCaml Scientific Computing

#33

Earlier quoted context omitted.

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…

How do you deal with data you haven’t seen before? Importing a large csv for example where a lot of the data is the wrong type or the wrong format.

You can read, say, the top N lines of the file and perform type inference on the column data to determine the type of the column. This is how it's done in the F# "type provider" for CSV: https://fsharp.github.io/FSharp.Data/library/CsvProvider.htm...

Re: Owl – OCaml Scientific Computing

#34
post #31
post #18

Earlier quoted context omitted.

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

That's the problem. Everybody has to guess. Everyone thinks there is something out there that somebody else knows. This is a problem I dont have in some of the other ecosystems. That I would have to (i) write my own cos or (ii) take a dependency on a commercial 3rd party library that will likely not be around for long or (iii) call a native library through and FFI, for something as simple as a cos of float32 is not t…

I have to guess because that kind of work was only relevant to me 5 years ago, so I lost track of what everyone doing data analysis with .NET is using nowadays.

Re: Owl – OCaml Scientific Computing

#35
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.

>Would've been less work for them to write nice functional wrappers around existing .NET libraries. What? Why would they do it? Unix is a standard in the field of scientific computations, so wrapping blas and lapack totally makes sense. Besides, OCaml already had good blas, lapack bindings.

It's been feasible to run F# on Unix for years, first via Mono, and more recently with .NET Core.

Re: Owl – OCaml Scientific Computing

#36
post #34
post #31

Earlier quoted context omitted.

That's the problem. Everybody has to guess. Everyone thinks there is something out there that somebody else knows. This is a problem I dont have in some of the other ecosystems. That I would have to (i) write my own cos or (ii) take a dependency on a commercial 3rd party library that will likely not be around for long or (iii) call a native library through and FFI, for something as simple as a cos of float32 is not t…

I have to guess because that kind of work was only relevant to me 5 years ago, so I lost track of what everyone doing data analysis with .NET is using nowadays.

Oh I have been guessing all year long for several years although it is very relevant to what I do.

BTW I did not intend to mean that you are being unhelpful. Scientific computation just isnt a first class citizen of the .net ecosystem. Either you have to write your own or take a dependency on a commercial library for even the simplest stuff and pray that they will be around.

Re: Owl – OCaml Scientific Computing

#37
post #17

Earlier quoted context omitted.

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.

I'm sure it also replicates the near instant compile times.

Re: Owl – OCaml Scientific Computing

#39
post #17

Earlier quoted context omitted.

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.

I'm sure it also replicates the near instant compile times.

Obviously not if you are comparing it to the OCaml bytecode compiler, now doing a full AOT compilation to native code depends pretty much how those 3rd party libraries are delivered and optimization levels being used.

Re: Owl – OCaml Scientific Computing

#40

I am comfortable with Python, Julia and R, but the static typing and functional aspects of OCaml make Owl look enticing. Can anyone point me towards a good free online resource for learning OCaml?

https://dev.realworldocaml.org/ is a good place to start.
Post reply on HN