myrkraverk_ has quit [Read error: Connection reset by peer]
myrkraverk_ has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
raskol has quit [Ping timeout: 256 seconds]
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
jtza8 has joined #ocaml
jtza8 has quit [Changing host]
jtza8 has joined #ocaml
Square3 has joined #ocaml
Serpent7776 has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bartholin has joined #ocaml
rgrinberg has joined #ocaml
olle has joined #ocaml
bartholin has quit [Quit: Leaving]
azimut has joined #ocaml
dnh has joined #ocaml
szkl has joined #ocaml
jutty has joined #ocaml
a51 has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
troydm has joined #ocaml
jutty has quit [Ping timeout: 268 seconds]
jutty has joined #ocaml
<discocaml>
<grianneau> ing
raskol has joined #ocaml
jutty has quit [Ping timeout: 246 seconds]
jutty has joined #ocaml
jutty has quit [Ping timeout: 264 seconds]
jutty has joined #ocaml
jabuxas has joined #ocaml
<discocaml>
<barconstruction> Companion_cube, you are singling out the mention of polars because rust is faster for numerical computation than OCaml. First, dataframes are used for more than numerical computation and linear algebra, it is half this and half a database query engine. Second I do not know why you chose to focus on polars and not pandas and numpy which are far bigger, obviously python is much slower than Rust or OCaml but this has not stopped it from b
<leah2>
those are not written in python, at least not the critical parts
<discocaml>
<barconstruction> Yes, this is what I meant when I said "the numerical routines are written in C just as in Numpy". I.e. numerical routines in Numpy are written in C.
<discocaml>
<barconstruction> Still, using Numpy imposes constraints on what is possible to write in a performant way because one can only use what is given through the API. Owl gives substantial more flexibility because one does not have to write every line of code as a library call in order to have good performance.
<discocaml>
<bluddy5> Owl needs to be broken up into easily digestible pieces. Dream has shown how to make these things work.
<companion_cube>
But do you actually get good performance out of owl?
end has quit [Ping timeout: 255 seconds]
<companion_cube>
I was talking about polars because it also has Arrow support, for example. It's not just numeric crunching. And supporting Arrow in ocaml would also not be the greatest thing (there are bindings, though)
<discocaml>
<regularspatula> For me, if Owl would be comparable to R then it would be good enough. Of course speed critical routines in R are also written in C....but I have tons of work where "slow" R code is fine
<discocaml>
<regularspatula> in terms of speed i mean
<discocaml>
<barconstruction> I had problems with Owl last time I used it but these were primarily problems with an OCaml garbage collection bug. I also had to do some unnecessary duplications to work around an owl bug. I fixed the owl bug but my PR was submitted after they stopped maintaining it. So... Inconclusive 🤷
end has joined #ocaml
jutty has quit [Quit: jutty]
jtza8 has quit [Ping timeout: 260 seconds]
waleee has joined #ocaml
Square3 has quit [Ping timeout: 255 seconds]
fweht has joined #ocaml
<discocaml>
<bluddy5> companion_cube: yes. You get performance like numpy. If you also have a lot of OCaml code, that part will obviously be faster than the equivalent python.
<discocaml>
<bluddy5> Owl has one issue whereby it does less sharing of underlying BigArrays than numpy does.
jabuxas has quit [Ping timeout: 246 seconds]
<palainp>
§3
<palainp>
(sorry)
<discocaml>
<mseri.> I agree with this sentiment. I think that having a coherent api between owl and owl_based and proper packaging of the various part could be done properly without jeopardising the initial philosophy since they can still live together in the same repo
<companion_cube>
in my uninformed opinion, OCaml should have some sort of numpy compat layer and try to talk to python for this stuff
<discocaml>
<mseri.> It gets slower if you do lots of small array initialisations, but this is because the way the bigarray is created and transformed and if I recall correctly also due to the fact that blit is a copy and not a view. In principle it can be sped up sensibility by moving it to a c stub though
<companion_cube>
or reuse the C bindings that already speak numpy
<discocaml>
<mseri.> You could send owl arrays to python in the past
<discocaml>
<mseri.> This is harder, some of them really use numpy internal stuff that would be problematic in ocaml
<companion_cube>
then there needs to be a library that does that, and only that
<discocaml>
<mseri.> I don’t know, numpy is a layer over blas as much as owl
<discocaml>
<mseri.> You just need to talk to blas/lapack to be interoperabke in most cases and this is already there
<discocaml>
<mseri.> Also python world has a number of drop-in replacements of numpy, you want jax numba or whatnot very often to speed up code
<discocaml>
<mseri.> Having a thin ocaml shim over numpy imho is slower than directly calling the same libraries and, since they are the same, you can take your arrays and send them to python with pyml or to c with whatever thin stub you prefer
<discocaml>
<mseri.> You could use matplotlib to plot from owl with little effort (when pyml was happy with your python)
<discocaml>
<mseri.> So I think that is already there
<discocaml>
<mseri.> Personally what I like of owl is that I get less dependency failures than with python
<discocaml>
<mseri.> Jupyer nktebooks are currently broken in many systems because of weird incompatibilities between python libraries, even with anaconda
<discocaml>
<mseri.> I had to waste an enormous amount of time to explain our students how to fix it
<companion_cube>
ok where is the best place to rant
<companion_cube>
I need to rant
<discocaml>
<mseri.> 😄
<discocaml>
<mseri.> If you were on discord we could make a rant thread
<octachron>
Such sad days when one can rant no long in #ocaml nor #ocaml-fr.
a51 has quit [Quit: WeeChat 4.2.1]
<discocaml>
<mseri.> ahahahah
<companion_cube>
better to hide it in a thread 😅
jutty has joined #ocaml
dh` has quit [Ping timeout: 256 seconds]
waleee has quit [Ping timeout: 255 seconds]
jutty has quit [Quit: jutty]
jabuxas has joined #ocaml
a51 has joined #ocaml
azimut has quit [Ping timeout: 255 seconds]
<companion_cube>
waiiiiit, has `Stack.t` changes???
<companion_cube>
changed8
<discocaml>
<regularspatula> python compatibility (or whatever your favorite numerical computing kit language) would be great in a more foundational library...pyml says it can do copy-free interop with numpy, but I haven't tested it out speed-wise
a51 has quit [Quit: WeeChat 4.2.1]
a51 has joined #ocaml
rgrinberg has joined #ocaml
zozozo has joined #ocaml
jabuxas has quit [Ping timeout: 268 seconds]
<companion_cube>
is this all another lesson in "actually putting stuff in the stdlib is bad"? :/
<discocaml>
<bluddy5> yep
a51 has quit [Quit: WeeChat 4.2.1]
darchitect has quit [Ping timeout: 255 seconds]
fweht has quit [Quit: Connection closed for inactivity]
<discocaml>
<deepspacejohn> Well, the example a Stack.t change in the "last few years" was from 9 years ago. And that change was pretty minor.
<companion_cube>
and about strings and arrays I'm not sure what he means
<companion_cube>
I mean besides float arrays, but that's just not visible from within OCaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mbuf has quit [Quit: Leaving]
torretto has quit [Remote host closed the connection]
<companion_cube>
tbh they never really deprecate+remove anything
<companion_cube>
the *one* historical exception was mutation in strings
jutty has joined #ocaml
azimut has joined #ocaml
bibi_ has quit [Quit: Konversation terminated!]
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
alexherbo2 has quit [Remote host closed the connection]
bibi_ has joined #ocaml
<discocaml>
<bluddy5> Sure, but just as *theoretically* abstraction allows them to change the representation, creating your function *doesn't really* tie down the current representation at all. It would only do so if they committed to always give you access to the raw internal representation as it is. Not only is this not the case (nothing in the types can guarantee that), but also a comment clarifying this isn't the case would make the situation even clearer.
<companion_cube>
honestly it would cement the current implementation if you guarantee performance
<zozozo>
companion_cube: reading these discussions, I'm almost tented to have code with conditional compilation that just uses unsafe/magic feature to access the internal representation and do what's needed without having to move the stdlib, :p
<companion_cube>
kind of yeah
<companion_cube>
I mean I'd do that if there was a `bytes` function added
<companion_cube>
(cause then I'd be able to guaranteed its continued existence)
<companion_cube>
(I mean I'd provide that on older version probably)
azimut has quit [Ping timeout: 255 seconds]
azimut has joined #ocaml
Serpent7776 has quit [Ping timeout: 255 seconds]
a51 has joined #ocaml
rgrinberg has joined #ocaml
cr1901_ is now known as cr1901
pi3ce has quit [Ping timeout: 252 seconds]
pi3ce has joined #ocaml
pi3ce has quit [Ping timeout: 255 seconds]
Serpent7776 has joined #ocaml
jutty has quit [Quit: jutty]
trillion_exabyte has quit [Ping timeout: 264 seconds]
trillion_exabyte has joined #ocaml
<discocaml>
<sim642> Batteries has a bunch of such magic unsafe things that assume certain Stdlib representation. It's not nice but it has worked surprisingly well since Stdlib internals change so rarely
Tuplanolla has joined #ocaml
Anarchos has joined #ocaml
<Anarchos>
how to run tests only of one specific file with dune ?
waleee has joined #ocaml
Serpent7776 has quit [Ping timeout: 260 seconds]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
azimut has quit [Ping timeout: 255 seconds]
trillion_exabyte has quit [Ping timeout: 268 seconds]
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]