Anarchos has quit [Quit: Vision[]: i've been blurred!]
cr1901_ has joined #ocaml
cr1901 has quit [Ping timeout: 260 seconds]
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dnh has joined #ocaml
dnh has quit [Client Quit]
xd1le has joined #ocaml
fererrorocher has joined #ocaml
jabuxas has quit [Read error: Connection reset by peer]
jabuxas has joined #ocaml
pi3ce has quit [Quit: No Ping reply in 180 seconds.]
pi3ce has joined #ocaml
jabuxas has quit [Ping timeout: 255 seconds]
pi3ce has quit [Quit: No Ping reply in 180 seconds.]
pi3ce has joined #ocaml
pi3ce has quit [Ping timeout: 255 seconds]
pi3ce has joined #ocaml
fererrorocher has quit [Quit: WeeChat 4.2.1]
zozozo has quit [Ping timeout: 255 seconds]
mbuf has joined #ocaml
bartholin has joined #ocaml
cr1901_ is now known as cr1901
Anarchos has joined #ocaml
bartholin has quit [Remote host closed the connection]
<Anarchos>
how to let opam install a local dir with compiled files without recompiling them ? The invoocation of dune by opam do'nt work on my system, that's why i have to do 'make' manually.
bartholin has joined #ocaml
dnh has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
<Anarchos>
Compcert compiled on HaikuOS , for first time !
<discocaml>
<contextfreebeer> Anarchos: I have compiled compcert, I did not have any issues, but good you figured it out
<Anarchos>
contextfreebeer on haiku OS ?
<discocaml>
<contextfreebeer> Debian
<Anarchos>
i ported ocaml, gtksourceview", coq , and compcert to Haiku to be able to get compcert
<discocaml>
<contextfreebeer> nice, well done
<Anarchos>
contextfreebeer i am still unable to install coq through opam so i had to do a manually 'make install'
<discocaml>
<contextfreebeer> what was the issue?
<discocaml>
<contextfreebeer> linuxisms in opam?
<Anarchos>
contextfreebeer when opam calls dune, execve crashes with 'operation not allowed'
<discocaml>
<contextfreebeer> hmm I see
<Anarchos>
not sure abotu the semantics of execve() in Haiku when run from non main-thread of a team...
<discocaml>
<contextfreebeer> not sure, but people in the BSD world are always running into issues with software that relies on linux semantics
<discocaml>
<contextfreebeer> is haiku a unix-like?
<Anarchos>
contextfreebeer yes but with a very unique kernel
<Anarchos>
kernel from scratch, and big POSIX compatibility
Anarchos has quit [Quit: enough work for today.]
jabuxas has joined #ocaml
rgrinberg has joined #ocaml
<discocaml>
<myrlhex> Just to clarify this is not necessarily true. Nix philosophy is impure nix-shell and pure nix-build.
fererrorocher has joined #ocaml
<discocaml>
<myrlhex> I just realized something. I can make a middleware stack with modules. Is this... unusual? to do?
<discocaml>
<myrlhex> (To those who used Clojure, this would basically be a transducer stack but with modules.)
<discocaml>
<myrlhex> (To those who used Clojure, this would basically be a transducer stack but with functors.)
Anarchos has joined #ocaml
waleee has joined #ocaml
<Anarchos>
what is the equivalent of __GNUC__ for compcert ?
<dh`>
hmm idk
<dh`>
it doesn't have its own cpp still, right?
aljazmc has joined #ocaml
emilknievel has quit [Remote host closed the connection]
<Anarchos>
dh` no idea
<dh`>
should be able to find out from how it invokes the cpp it uses then
jabuxas has quit [Ping timeout: 240 seconds]
<Anarchos>
ok
mbuf has quit [Quit: Leaving]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
<discocaml>
<contextfreebeer> does anybody know of a set implementation that will insert an element if it is already present rather than return the same map?
<discocaml>
<contextfreebeer> does anybody know of a set implementation that will insert an element if it is already present rather than return the same set/?
<discocaml>
<contextfreebeer> hmm, discord interpreted s/map/set/ as an edit command, didn't mean to do that
<discocaml>
<Kali> discord does that
<discocaml>
<hockletock> Do you mean if `X.equals x1 x2` and you insert x1, then x2, the set contains x2 but not x1?
<discocaml>
<contextfreebeer> Not quite, I'm using stdlib `Set` now and for fast insertion my comparison uses an id field of the set element, so even if the element changes, as far as Set is concerned it will be the same so it will not do anything, if I am understanding correctly that is
<discocaml>
<contextfreebeer> that appears to be what is happening
<discocaml>
<contextfreebeer> but in principle yes I want a replacement in all cases
<discocaml>
<contextfreebeer> and if I understand this comment correctly: `Before 4.03 Physical equality was not ensured.` it seems like this used to be the behavior?
<discocaml>
<hockletock> that means it might return a duplicate of Set
<discocaml>
<hockletock> of the* set
<discocaml>
<contextfreebeer> because it will spuriously split the set on the new insertion even though the set might have really been unchanged?
<discocaml>
<contextfreebeer> oh wait never mind, I understand, it will allocate an entirely new set while it's recursing, right? but after 4.03 it will instead return the original
<discocaml>
<hockletock> Yes
<discocaml>
<contextfreebeer> right. in any case, is there a set with the behavior I described?
<discocaml>
<contextfreebeer> the big libraries seem to have the same semantics as the stdlib
<discocaml>
<octachron> Not an entirely new set, only the path to the element would have been re-allocated.
<discocaml>
<octachron> The behavior that you are describing sound more like a map?
<discocaml>
<contextfreebeer> In a way, yes, I'm simulating a multimap with a map of sets
<discocaml>
<hockletock> if the element IDs are the same but the contents change... do you need to change the set at all?
<discocaml>
<contextfreebeer> what do you mean?
<discocaml>
<contextfreebeer> the elements must be updated
<discocaml>
<contextfreebeer> right now to get the correct behavior I must first remove, then insert, ideally it should just be one insertion and always get a new mp
<discocaml>
<contextfreebeer> right now to get the correct behavior I must first remove, then insert, ideally it should just be one insertion and always get a new map/
<discocaml>
<contextfreebeer> (even including initial whitespace will also trigger an edit it seems)
<discocaml>
<hockletock> what is the relationship between the element ID and its content?
<discocaml>
<hockletock> is that what these sets are supposed to maintain?
<discocaml>
<contextfreebeer> maybe it would just be better to explain exactly what it is I'm doing. I'm trying to improve the performance of my SAT solver as much as I can so right now I'm hoping to get rid of this "unneeded" remove, the map is a map from literals to a set of clauses where that literal is being watched, but these are "decorated clauses" which also contain the bookkeeping, the ID is the clause ID that is used in other contexts
<discocaml>
<contextfreebeer> when the watched literals change, I only need to remove the clause from one of the literal's clause set, for the other, I just need to update the clause so it has the current watched literals information
<discocaml>
<contextfreebeer> i.e.
<discocaml>
<contextfreebeer>
<discocaml>
<contextfreebeer> ```ocaml
<discocaml>
<contextfreebeer> match WatchedClause.update l a c with
<discocaml>
<contextfreebeer> WatchedClause.Map.remove w1 c watchers'
<discocaml>
<contextfreebeer> |> WatchedClause.Map.remove w2 c (* This isn't really necessary *)
<discocaml>
<contextfreebeer> |> WatchedClause.Map.add w1' c'
<discocaml>
<contextfreebeer> |> WatchedClause.Map.add w2 c'
<discocaml>
<contextfreebeer> in
<discocaml>
<contextfreebeer> { f' with watchers = watchers' }
<discocaml>
<contextfreebeer> ...
<discocaml>
<contextfreebeer> ```
<discocaml>
<hockletock> without the remove, you get a map with multiple bindings to w2?
<discocaml>
<contextfreebeer> I get outdated watcher information, so it results in an incorrect result
<discocaml>
<contextfreebeer> returning SAT for an unsatisfiable clause etc.
<discocaml>
<contextfreebeer> formula*
<discocaml>
<octachron> You can switch to a map of map by splitting the metadata to the inner map content. Then, your operation is an `update`.
<discocaml>
<contextfreebeer> hmm, I'm afraid I'm not sure what you mean
<discocaml>
<octachron> AFAIU, your issue is that the identity implied by the comparison is not an identity. The problem disappears if you make the comparison a real comparison and stores the metadata elsewhere.
<discocaml>
<contextfreebeer> Yeah, I guess so
gentauro has quit [Read error: Connection reset by peer]
<discocaml>
<contextfreebeer> I'm a bit afraid introducing another map might be a pessimization though, but there is probably a good solution to all of this, I'll ponder over it a while
<discocaml>
<contextfreebeer> thank you
gentauro has joined #ocaml
aljazmc has quit [Remote host closed the connection]
aljazmc has joined #ocaml
<discocaml>
<contextfreebeer> okay, I know what I need to do, no need to introduce more data structures, but it will require some refactoring, and I'm not sure if it will end up being an improvement, but I'll try it
aljazmc has quit [Remote host closed the connection]
aljazmc has joined #ocaml
<discocaml>
<contextfreebeer> just to avoid spending a bunch of time for nothing I decided to first try changing the stdlib Set to have the behavior I want and honestly it doesn't make too much of a difference, it's an improvement for sure but not worth a major refactor, so for now I will just leave it as it is and not be greedy
<discocaml>
<contextfreebeer> this is a hot function but it's not really hot because of the extra remove