Earlier quoted context omitted.
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...
Owl – OCaml Scientific Computing
61–70 of 80 posts
Re: Owl – OCaml Scientific Computing
#62Earlier quoted context omitted.
F# works just fine in Linux. Better than OCaml in Windows. It is the reason I decided to pick F# over OCaml.
>Better than OCaml in Windows. OCaml works great in windows and have good .Net bindings. LexiFi earns money nearly solely from OCaml on windows. >F# works just fine in Linux. Does it have bindings for the majority of popular libs? For example are there Gstreamer and Gtk F# bindings? Do they work on both .Net Core and Mono?
Perhaps I should clarify. While the language itself might work, the ecosystem didn't seem great. The last time I checked (less than a year ago), opam was mostly broken on Windows. opam is the officially recommended package manager. I didn't want to invest in a system where the official support was virtually nonexistent. Looking at it now, there does seem to be a port of opam for Windows, and the first commit in that repo was less than a year ago, so quite possibly after I last checked.
If it works, I may just switch to it (although in my opinion any software requiring cygwin still means poor Windows support...).
>Does it have bindings for the majority of popular libs? For example are there Gstreamer and Gtk F# bindings? Do they work on both .Net Core and Mono?
There is GTK#[0], which claims support for both. There is Gst#[1], although they claim it is in early stage development.
[0] https://www.mono-project.com/docs/gui/gtksharp/ [1] https://gstreamer.freedesktop.org/htdocs/bindings/dotnet.htm...
Re: Owl – OCaml Scientific Computing
#63Re: Owl – OCaml Scientific Computing
#64Earlier quoted context omitted.
> In python you could import all the data and deal with types later. You can't, you need to know what you are parsing, a number, a complex number, a symbol etc. > deal with types later What does it mean? Dynamic typed language is still typed, all the expressions have types. Just like in Python, you can define types in-place with polymorphic variants and objects, so OCaml would infer their types. let instant_complex =…
>You can't, you need to know what you are parsing, a number, a complex number, a symbol etc. pandas (Python) has the upper hand here. A lot, if not most, real world data will have values of the wrong type interspersed. pandas will still let you read in the table and then deal with these problematic values. For example, reading in the data and then dropping all values that don't conform to the type that is expected co…
Re: Owl – OCaml Scientific Computing
#65How does Owl handle representing arrays of Float64s (for example) in BLAS-compatible format? That is, as contiguous memory blocks, instead of having each float value individually heap allocated and boxed with the array being an array of pointers to these values. That ability seems like the most basic requirement for a language in which scientific computing is done—if for no other reason than to call BLAS and LAPACK a…
https://github.com/ocaml/ocaml/blob/d3e73595e55e84250fa77f04...
Re: Owl – OCaml Scientific Computing
#66What's the state of threading in OCaml? Can I do a multithreaded map() or reduce()?
Re: Owl – OCaml Scientific Computing
#67Earlier quoted context omitted.
I think flexibility becomes a double edged sword over time: when you need to read, understand and modify some code with overloaded operators it can take longer to figure out what's happening.
> I think flexibility becomes a double edged sword over time Agreed in general. For the specific case of number crunching though, sooner or later you would like to call out to a Fortran library. That and with DNNs being so popular now, flexibility over how 'tensors' are laid out in memory by an upstream library or how it has to be laid out to call another library is quite crucial. > when you need to read, understand…
Re: Owl – OCaml Scientific Computing
#68I 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?
Re: Owl – OCaml Scientific Computing
#69How does Owl handle representing arrays of Float64s (for example) in BLAS-compatible format? That is, as contiguous memory blocks, instead of having each float value individually heap allocated and boxed with the array being an array of pointers to these values. That ability seems like the most basic requirement for a language in which scientific computing is done—if for no other reason than to call BLAS and LAPACK a…
OCaml has native support for unboxed ("flat") double arrays. https://github.com/ocaml/ocaml/blob/d3e73595e55e84250fa77f04...
Re: Owl – OCaml Scientific Computing
#70Earlier quoted context omitted.
>You can't, you need to know what you are parsing, a number, a complex number, a symbol etc. pandas (Python) has the upper hand here. A lot, if not most, real world data will have values of the wrong type interspersed. pandas will still let you read in the table and then deal with these problematic values. For example, reading in the data and then dropping all values that don't conform to the type that is expected co…
You should try using R. You're missing out.
And I don't know about today, but when I used pandas years ago, it was much faster than R.