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]
<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?