Leonidas has quit [Remote host closed the connection]
nfc has quit [Remote host closed the connection]
bibi__ has quit [Remote host closed the connection]
bacam has quit [Remote host closed the connection]
thizanne has quit [Remote host closed the connection]
bacam has joined #ocaml
alfiee has quit [Ping timeout: 252 seconds]
LainExperiments has joined #ocaml
LainExperiments has quit [Quit: Client closed]
pi3ce has joined #ocaml
LainExperiments has joined #ocaml
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 244 seconds]
LainExperiments has quit [Quit: Client closed]
LainExperiments has joined #ocaml
alfiee has joined #ocaml
myrkraverk has joined #ocaml
alfiee has quit [Ping timeout: 252 seconds]
myrkraverk_ has quit [Ping timeout: 248 seconds]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
LainExperiments has quit [Quit: Client closed]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 252 seconds]
ygrek has quit [Remote host closed the connection]
alfiee has joined #ocaml
ygrek has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
alfiee has quit [Ping timeout: 246 seconds]
myrkraverk_ has joined #ocaml
myrkraverk has quit [Ping timeout: 264 seconds]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 264 seconds]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 252 seconds]
mange has quit [Quit: Quittin' time!]
ygrek has quit [Remote host closed the connection]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 264 seconds]
Serpent7776 has joined #ocaml
szkl has quit [Quit: Connection closed for inactivity]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 252 seconds]
olle has joined #ocaml
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 252 seconds]
bartholin has joined #ocaml
<bartholin>
I saw an answer in my sleep
<bartholin>
so let's say a programmer writes a function f: [< `A of string & int; `B] -> bool, and naively thinks f can accept the argument `A 3, then the typechecker will tell him that the types for tag `A are incompatible
<bartholin>
and by seeing he should provide a payload of type string & int, he will see there is some inconsistency in his code. But the function f is still valid (it can accept `B)
<bartholin>
so the trick question is "where to put the typing info to lead the programmer to their potential mistake?" and the answer in this case is the conjunctive type
dhil has joined #ocaml
Haudegen has joined #ocaml
alfiee has joined #ocaml
<octachron>
bartholin, consider also that you can use a function of type ``f: [< `A of string & int | `B ]`` by applying it to `` `B ``
<bartholin>
octachron: yes, that's why f is still valid, and typechecking error only arises if the programmer foolishly applies it to `A
<octachron>
the delayed unification can also used to perform "fun" type tricks, but that is not really a supported use case.
<discocaml>
<peuk> SWITCH/lib/ocaml/caml/platform.h:222:10: warning: implicit declaration of function ‘atomic_load_acquire’ [-Wimplicit-function-declaration]
<discocaml>
<peuk> I'd tend to say that the problem is not in the library, but either in Dune or OCaml (and I would say OCaml), but I don't know how to be sure of that.
bartholin has quit [Quit: Leaving]
Anarchos has joined #ocaml
<discocaml>
<octachron> This looks like a problem with the library c flags to me, `atomic_load_acquire` is a function from the standard C11 library.
<discocaml>
<peuk> Hum, in standard C, it's `atomic_load_explicit` with an additional parameter `acquire`, this function is not standard.
<discocaml>
<octachron> Found the root issue:the library is defining `#define CAML_INTERNALS`
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 264 seconds]
<discocaml>
<peuk> It should not? Sorry if the question is a bit a naive.
<discocaml>
<octachron> Defining `CAML_INTERNALS` grants you access to the internal API of the OCaml runtime.
<discocaml>
<octachron> In general, libraries should not define it, and if they do they end up more strongly coupled with the runtime.
<discocaml>
<octachron> And the library goes one step further by defining `CAML_INTERNALS` only when importing a single header. The issue is that the graph of header dependency changes when `CAML_INTERNALS` is included, thus the imported header lacks some its dependency that only exists in the internal mode.
<discocaml>
<octachron> Moving the `#define CAML_INTERNALS` to the top fixes the error.
myrkraverk_ has joined #ocaml
myrkraverk has quit [Ping timeout: 248 seconds]
oisota has quit [Quit: Ping timeout (120 seconds)]
oisota has joined #ocaml
alfiee has joined #ocaml
<discocaml>
<peuk> Oh OK, thank you!
alfiee has quit [Ping timeout: 252 seconds]
keyboard has quit [Remote host closed the connection]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 252 seconds]
euphores has quit [Ping timeout: 248 seconds]
myrkraverk has joined #ocaml
euphores has joined #ocaml
myrkraverk_ has quit [Ping timeout: 252 seconds]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 260 seconds]
Haudegen has quit [Quit: Bin weg.]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 252 seconds]
Inline has quit [Quit: Leaving]
Inline has joined #ocaml
Everything has joined #ocaml
Haudegen has joined #ocaml
Inline has quit [Ping timeout: 252 seconds]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 264 seconds]
ygrek has joined #ocaml
Inline has joined #ocaml
keyboard has joined #ocaml
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 252 seconds]
mbuf has joined #ocaml
Anarchos has joined #ocaml
mbuf has quit [Quit: Leaving]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 246 seconds]
Inline has quit [Ping timeout: 246 seconds]
olle has quit [Ping timeout: 265 seconds]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 252 seconds]
pi3ce has quit [Read error: Connection reset by peer]
pi3ce has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
Tuplanolla has joined #ocaml
pi3ce has quit [Ping timeout: 244 seconds]
Everything has quit [Ping timeout: 252 seconds]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 244 seconds]
bartholin has joined #ocaml
dhil has quit [Ping timeout: 248 seconds]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 264 seconds]
infinity0 has quit [Ping timeout: 245 seconds]
infinity0 has joined #ocaml
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 272 seconds]
LainExperiments has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
dhil has joined #ocaml
Inline has joined #ocaml
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 248 seconds]
Anarchos has joined #ocaml
alfiee has joined #ocaml
Leonidas_ has quit [Ping timeout: 252 seconds]
Leonidas has joined #ocaml
alfiee has quit [Ping timeout: 264 seconds]
dhil has quit [Remote host closed the connection]
LainExperiments has quit [Ping timeout: 240 seconds]
Inline has quit [Quit: Leaving]
rgrinberg has joined #ocaml
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 276 seconds]
Inline has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
bartholin has quit [Quit: Leaving]
Inline has quit [Read error: Connection reset by peer]
alfiee has joined #ocaml
Inline has joined #ocaml
alfiee has quit [Ping timeout: 265 seconds]
Serpent7776 has quit [Ping timeout: 264 seconds]
rgrinberg has quit [Quit: My Unrecognized Mac has gone to sleep. ZZZzzz…]