companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 5.0 released(!!1!): https://ocaml.org/releases/5.0.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
Tuplanolla has quit [Ping timeout: 256 seconds]
szkl has joined #ocaml
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dnh has joined #ocaml
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
ridcully has quit [Ping timeout: 255 seconds]
ridcully has joined #ocaml
TrillionEuroNote has quit [Ping timeout: 256 seconds]
TrillionEuroNote has joined #ocaml
edr has quit [Quit: Leaving]
szkl has quit [Quit: Connection closed for inactivity]
trev has joined #ocaml
<discocaml> <sim642> Doesn't the profiler also give you stack traces?
<discocaml> <sim642> I think somehow dumping the lambda IR from the compiler shows the numbers. Not sure how convenient that is to do in a real project though
ski has joined #ocaml
azimut has quit [Ping timeout: 240 seconds]
bartholin has joined #ocaml
waleee has joined #ocaml
Serpent7776 has joined #ocaml
Tuplanolla has joined #ocaml
waleee has quit [Ping timeout: 276 seconds]
neiluj has joined #ocaml
<neiluj> yikes, got a memleak to debug
<discocaml> <contextfreebeer> not by default but you can enable them it seems, I'm using `perf`
sim642 has left #ocaml [WeeChat 3.6]
dnh has joined #ocaml
<discocaml> <kakadu18> Folks, is it normal that `Float.(max (-.nan) nan)` is `-nan`?
<neiluj> Hey! how to interpret this flamegraph? http://lutim.altay.fr/6NX1hPcw/ucwxOSTt.png I don't understand where all these heap allocations are coming from
<discocaml> <kakadu18> I'm trying to read https://iremi.univ-reunion.fr/IMG/pdf/ieee-754-2008.pdf#page=40 and d3i says that negative Nans should be below positive ones.
<neiluj> the code for with_clean_stack6 is https://bpa.st/LT5Q
<neiluj> the C code gerepilemany6 does not allocate to the heap
chrisz has quit [Ping timeout: 252 seconds]
<discocaml> <contextfreebeer> what is your cpu?
<discocaml> <contextfreebeer> on x86 at least iirc there is no such thing as signed NaN, there is a distinction between quiet and signaling instead, and in that case an ordering on the NaNs might as well just be based on the bit pattern with msb set = higher, right?
<discocaml> <contextfreebeer> this is not something covered by the ieee754 standard AFAICT, so there is no correct behavior
<discocaml> <contextfreebeer> my mistake, it does seem to be specified based on what you sent
<discocaml> <contextfreebeer> however, `signaling orders below quiet for +NaN, reverse for −NaN`, not sure what this means exactly, if you just read the first part, it implies that quiet > signaling which means `-nan` would be higher, but I don't understand the `for +NaN, reverse for −NaN`
<neiluj> okay got it, the garbage collector is not called enough
<neiluj> that's annoying thoug
<discocaml> <Kakadu> I'm on amd64 4.14 where nans are signalling. So the distinction between quiet and signalling seems not to be relevant there....
<discocaml> <contextfreebeer> what do you mean, *all* NaNs are signalling?
<discocaml> <contextfreebeer> is it an AMD cpu, not intel?
<discocaml> <contextfreebeer> I am reading the intel x86_64 documentation and it looks like *any* operation performed on both signaling and quiet nans returns the quiet nan
<discocaml> <contextfreebeer> which is consistent with the results you showed
<discocaml> <contextfreebeer> well, it doesn't return the quiet nan operand exactly unless it is an x87 operation, but the signalling nan is converted to a quiet one for sse floating point operations
<discocaml> <kakadu18> Why it returns -nan? I expected just a nan.
<discocaml> <kakadu18> I meant that Float.nan is a signalling one on 4.14
<discocaml> <contextfreebeer> yep, makes sense
<discocaml> <contextfreebeer> and -nan is quiet
<discocaml> <contextfreebeer> so, https://godbolt.org/z/5bYnf6169 it looks like the comparison instruction here is `comisd` and then the flags are checked to see which is the maximum
<discocaml> <contextfreebeer> the documentation says that sse instructions, if both operands are NaNs, will convert the first operand to quiet nan if it is signalling, otherwise return it, in any case, the result is a quiet nan
<discocaml> <contextfreebeer> so the max will always be `-nan`
waleee has joined #ocaml
<discocaml> <kakadu18> I think, that I extended my understanded, thanks!
Anarchos has joined #ocaml
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<neiluj> what could be the reasons the memory consumption keeps increasing (excluding memory leak?)
azimut has joined #ocaml
neiluj has quit [Ping timeout: 250 seconds]
azimut has quit [Ping timeout: 240 seconds]
<discocaml> <contextfreebeer> bad space complexity?
dnh has joined #ocaml
neiluj has joined #ocaml
<neiluj> thanks!
bartholin has quit [Ping timeout: 260 seconds]
<neiluj> 'cause I got a bit loop that computes a sequence from the previous terms, so the memory consumption should be constant
<neiluj> however, the used memory keeps growing
<neiluj> with the code I posted earlier: https://bpa.st/LT5Q
dhil has joined #ocaml
bartholin has joined #ocaml
neiluj has quit [Ping timeout: 250 seconds]
Anarchos has quit [Ping timeout: 255 seconds]
azimut has joined #ocaml
trev has quit [Quit: trev]
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
azimut has quit [Remote host closed the connection]
azimut has joined #ocaml
dnh has joined #ocaml
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Anarchos has joined #ocaml
dh` has quit [Ping timeout: 255 seconds]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
Inline has joined #ocaml
<discocaml> <holmdunc> Not sure how relevant it is, but OCaml 5(.1.0) is now directly installable from Homebrew. It was previously stuck on 4.14.0 for a long time
dnh has joined #ocaml
dnh has quit [Client Quit]
szkl has joined #ocaml
Serpent7776 has quit [Ping timeout: 252 seconds]
bartholin has quit [Quit: Leaving]
wingsorc has joined #ocaml
dhil has quit [Ping timeout: 256 seconds]
_whitelogger has joined #ocaml
wingsorc has quit [Remote host closed the connection]
wingsorc has joined #ocaml