companion_cube changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.11 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.11/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
CcxWrk has joined #ocaml
Haudegen has quit [Ping timeout: 265 seconds]
Yagotzirck has quit [Quit: Leaving]
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
vicfred has joined #ocaml
tizoc has quit [Quit: Coyote finally caught me]
tizoc has joined #ocaml
Tuplanolla has quit [Ping timeout: 265 seconds]
f[x] has quit [Remote host closed the connection]
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
f[x] has joined #ocaml
rock64 has quit [Ping timeout: 240 seconds]
aquijoule_ has joined #ocaml
richbridger has quit [Ping timeout: 240 seconds]
zebrag has quit [Quit: Konversation terminated!]
osa1 has quit [Ping timeout: 256 seconds]
zebrag has joined #ocaml
raver has quit [Ping timeout: 240 seconds]
arecaceae has quit [Remote host closed the connection]
arecaceae has joined #ocaml
azot has joined #ocaml
<azot> I wonder, how could one export a directory from an opam repository, to which one could opam pin later?
<azot> I performed a direct copy from ~/.opam/repo/default, but the package is refusing to fetch sources when after I opam pin the copy.
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
zolk3ri has quit [Remote host closed the connection]
zolk3ri has joined #ocaml
zolk3ri has quit [Remote host closed the connection]
zebrag has quit [Quit: Konversation terminated!]
mxns has quit [Ping timeout: 264 seconds]
f[x] has quit [Remote host closed the connection]
vicfred has quit [Quit: Leaving]
mfp_ has quit [Ping timeout: 256 seconds]
waleee-cl has quit [Quit: Connection closed for inactivity]
osa1 has joined #ocaml
dhil has joined #ocaml
decentpenguin has quit [Read error: Connection reset by peer]
decentpenguin has joined #ocaml
<azot> I also wonder, what would be the best way to request a native-only build from dune?
Haudegen has joined #ocaml
raver has joined #ocaml
borne has joined #ocaml
shawnw has joined #ocaml
Serpent7776 has joined #ocaml
shawnw__ has quit [Read error: Connection reset by peer]
stux|RC has quit [Quit: Aloha!]
jerith_ has quit [Ping timeout: 256 seconds]
amr has quit [Ping timeout: 272 seconds]
amr has joined #ocaml
stux|RC has joined #ocaml
jerith has joined #ocaml
neiluj has quit [Remote host closed the connection]
bartholin has joined #ocaml
Tuplanolla has joined #ocaml
neiluj has joined #ocaml
neiluj has joined #ocaml
neiluj has quit [Client Quit]
neiluj has joined #ocaml
neiluj has joined #ocaml
mfp_ has joined #ocaml
smerdyakov has joined #ocaml
TC01 has quit [Ping timeout: 256 seconds]
olle has joined #ocaml
<d_bot> <Lupus> is it possible to figure out how many memory was allocated for bigarrays? ideally some way that can be used to expose this metric for monitoring 🙂 this is not accounted in the OCaml heap, we have large memory utilization in one of services and trying to figure out where is it coming from - bigarrays or from some other native library
boxscape has joined #ocaml
<d_bot> <Drup> `Obj.reachable_words` doesn't work ?
<olle> gdb?
<d_bot> <Drup> (bigarrays are pretty easy to count the size, though, you could just compute the size and the wordsize of each element)
<d_bot> <EduardoRFS> there is any "safe" way to split a block in two? If I have a bytes sequence with a OCaml block inside of it, is it okay to change the size of the block on the header and then point to the top of the block?
<d_bot> <EduardoRFS> like, I did this already, but I want to understand the implications of it
<d_bot> <Drup> @EduardoRFS With `Obj.truncate`, or with another method ?
zebrag has joined #ocaml
<d_bot> <EduardoRFS> using FFI, I changed the header of the bytes array and pointed out to the block at the end of the bytes
<Armael> isn't Obj.truncate deprecated now?
<d_bot> <Lupus> hm, I don't have a list of my bigarrays available, I just know that there are a lot of them and I want to know how much memory all those actually occupy
<octachron> The 4.12 version of statmemprof allows to track the allocation of custom datatypes, including bigarrays
Haudegen has quit [Quit: Bin weg.]
tane has joined #ocaml
<d_bot> <Lupus> is statmemprof that new mechanism that memtrace uses?
<d_bot> <Lupus> we can repro the issue locally, so we'll just use valgrind massif to track it down, but this is not always feasible and would be awesome to be able to measure off-heap data allocations done by services via bigarray/bigstring...
<octachron> Yes, memtraces is using statmemprof
<hannes> Lupus: yes, statmemprof is used by memtrace. only since 4.12 (atm in beta) bigarrays are tracked there - if you use 4.11 you won't see bigarrays.
jiriknesl has joined #ocaml
jiriknesl has quit [Quit: Connection closed]
jiriknesl has joined #ocaml
<olle> maybe try caml_alloc?
jiriknesl has quit [Quit: Connection closed]
<d_bot> <Lupus> cool, sounds awesome! we're on 4.11
ewd has joined #ocaml
<d_bot> <Lupus> massif shows that those are bigarrays that occupy a lot of memory...
<d_bot> <Lupus> is there some additional GC weight associated with bigarrays? or GC seems those as just small objects and thus considers major heap not worth collecting?
<d_bot> <Lupus> *sees
neiluj has quit [Quit: leaving]
Serpent7776 has quit [Read error: Connection reset by peer]
Serpent7776 has joined #ocaml
Haudegen has joined #ocaml
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
<d_bot> <octachron> Normally yes, the GC is (partially) aware of the amount of out-of-bound memory used by custom value: https://ocaml.org/manual/intfc.html#ss:c-custom-alloc
<d_bot> <Lupus> thanks for the pointer @octachron !
<d_bot> <Lupus> that's great 🙂
webshinra has quit [Remote host closed the connection]
webshinra has joined #ocaml
Serpent7776 has quit [Read error: Connection reset by peer]
Serpent7776 has joined #ocaml
olle has quit [Ping timeout: 256 seconds]
mxns has joined #ocaml
waleee-cl has joined #ocaml
gareppa has joined #ocaml
gareppa has quit [Remote host closed the connection]
f[x] has joined #ocaml
DanC has quit [Ping timeout: 258 seconds]
DanC has joined #ocaml
TC01 has joined #ocaml
olle has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
<d_bot> <Icemasta> Not exactly ocaml related but I am wracking my brain against this
<d_bot> <Icemasta> I have an array of X elements, Y of which are TRUE, Z of which are FALSE. I cannot know what the content of this array, all I can do is call a compare function which returns TRUE if both elements of the array are identical, or false if they aren't.
<d_bot> <Icemasta> Now I've done the usual brute force solution, which works, but I feel there could be a fancier way of doing this
<d_bot> <Icemasta> At first I also thought about dividing it, so like if I got 100 elements, it would be split into 2 groups of 50, and then 4 groups of 25 and so on
<d_bot> <Icemasta> But in the end this is just brute force solution with extra steps
boxscape has quit [Ping timeout: 240 seconds]
<d_bot> <octachron> Note that you have not described what you are trying to do at all.
<d_bot> <Icemasta> Sorry. I have to write a program that finds 2 identical objects in an array and return their index position.
<d_bot> <Icemasta> And we cannot know exactly what it's in the array position (so can't use memory methods), at this point I am sure it's fairly mathematical
<d_bot> <octachron> If you only have an equal function, there is no shortcut : you need to potentially test every pair.
<d_bot> <Icemasta> Thanks, that's what I thought
bartholin has quit [Quit: Leaving]
Serpent7776 has quit [Read error: Connection reset by peer]
Serpent7776 has joined #ocaml
<d_bot> <Icemasta> Oh I did forget something
<d_bot> <Icemasta> In the argument of the program we are told how many are false and how many are true. So right now I just thought that since you know how big each group are, I can probably reduce the amount of search to the common dominator. So If I get like 6 false and 2 good, that's 1/4 good, so the maximum distance between 2 points should be 2*4-1, or 7, with something like TFFF FFFT, if I verify in pairs, the worst case is still like brute
vicfred has joined #ocaml
<d_bot> <darrenldl> so each member is either T or F?
Haudegen has joined #ocaml
<d_bot> <Icemasta> yes
sz0 has quit [Quit: Connection closed for inactivity]
nicoo has quit [Ping timeout: 268 seconds]
nicoo has joined #ocaml
<d_bot> <SwissAndOr> In the toplevel, is there a way to separate what your code prints out versus the evaluation that the toplevel prints out?
mxns has quit [Ping timeout: 272 seconds]
mxns has joined #ocaml
mxns has quit [Ping timeout: 272 seconds]
mxns has joined #ocaml
mxns has quit [Quit: ZNC 1.8.2 - https://znc.in]
mxns has joined #ocaml
arecaceae has quit [Remote host closed the connection]
arecaceae has joined #ocaml
borne has quit [Ping timeout: 264 seconds]
rosterok has joined #ocaml
f[x] has quit [Remote host closed the connection]
f[x] has joined #ocaml
olle has quit [Ping timeout: 256 seconds]
Yagotzirck has joined #ocaml
borne has joined #ocaml
f[x] has quit [Remote host closed the connection]
leah2 has quit [Ping timeout: 260 seconds]
leah2 has joined #ocaml
Jesin has quit [Quit: Leaving]
f[x] has joined #ocaml
Jesin has joined #ocaml
arecaceae has quit [Remote host closed the connection]
ewd has quit [Ping timeout: 272 seconds]
arecaceae has joined #ocaml
decentpenguin has quit [Quit: ZNC crashed or something]
decentpenguin has joined #ocaml
borne has quit [Ping timeout: 260 seconds]
borne has joined #ocaml
ski has quit [Ping timeout: 264 seconds]
Yagotzirck has quit [Quit: Leaving]
robmyers has quit [Ping timeout: 246 seconds]
robmyers has joined #ocaml
Serpent7776 has quit [Quit: leaving]
rosterok has quit [Quit: Connection closed for inactivity]
mxns has quit [Ping timeout: 265 seconds]
tane has quit [Quit: Leaving]
ski has joined #ocaml
mxns has joined #ocaml
mxns has quit [Ping timeout: 240 seconds]