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/
dnh has quit [Client Quit]
wingsorc has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
wingsorc__ has joined #ocaml
wingsorc has quit [Ping timeout: 255 seconds]
infinity0 has quit [Remote host closed the connection]
wingsorc has joined #ocaml
wingsorc__ has quit [Ping timeout: 260 seconds]
infinity0 has joined #ocaml
wingsorc__ has joined #ocaml
wingsorc has quit [Read error: Connection reset by peer]
wingsorc has joined #ocaml
wingsorc__ has quit [Read error: Connection reset by peer]
_whitelogger has quit [Server closed connection]
_whitelogger has joined #ocaml
wingsorc has quit [Remote host closed the connection]
wingsorc has joined #ocaml
wingsorc__ has joined #ocaml
wingsorc__ has quit [Max SendQ exceeded]
wingsorc has quit [Ping timeout: 258 seconds]
wingsorc has joined #ocaml
wingsorc has quit [Ping timeout: 258 seconds]
<companion_cube> What's nano mutex?
edr has quit [Quit: Leaving]
chrisz has quit [Ping timeout: 255 seconds]
chrisz has joined #ocaml
waleee has quit [Ping timeout: 258 seconds]
motherfsck has quit [Ping timeout: 240 seconds]
Serpent7776 has joined #ocaml
src has quit [Read error: Connection reset by peer]
sintheta has joined #ocaml
euouae has joined #ocaml
<euouae> Hello is anyone here?
<euouae> I can't tell because I think something happened to the Libera server
euouae has quit [Remote host closed the connection]
euouae has joined #ocaml
<euouae> Armael: hey
<euouae> I found another example here, <https://github.com/ocaml/dune/files/4968205/binding-example-so.zip> which I am using now. I don't know where this example came from, I saw it on <https://discuss.ocaml.org/t/linking-several-so-libraries-produced-by-dune/6133> but I can't find it on the GH page.
<euouae> I thought maybe you'd be interested. I'm going with that for now
mro has joined #ocaml
dnh has joined #ocaml
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bartholin has joined #ocaml
bartholin has quit [Ping timeout: 264 seconds]
bartholin has joined #ocaml
<Armael> euouae: cool, go to know. I didn't know how to produce a .so so this is indeed helpful
<euouae> my next step is to figure out how to use dune + ocaml to ship this stuff
<euouae> and then I'll write a tutorial on the whole thing I have in mind
jlrnick has joined #ocaml
euouae has quit []
<Armael> one possible pain point is if your ocaml code itself uses C library that need linking
Anarchos has joined #ocaml
conjunctive has quit [Server closed connection]
conjunctive has joined #ocaml
<Anarchos> j'ai du louper un truc, mais j'ai vraiment l'impression que coq et lean font la meme chose...
<Armael> Anarchos: go #ocaml-fr?
bartholin has quit [Quit: Leaving]
<Anarchos> Armael oh sorry
<Anarchos> i misfired
dnh has joined #ocaml
daimrod has quit [Server closed connection]
daimrod has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
Anarchos has joined #ocaml
ursa-major has quit [Ping timeout: 264 seconds]
jlrnick has quit [Ping timeout: 252 seconds]
<companion_cube> Hnmn ok, h0rror
<octachron> With the description of nano_mutex speaking of exploiting the global runtime lock, I wouldn't expect nano_mutex to work in OCaml 5.
<discocaml> <leostera> hey folks, i'm running into an issue with `nocrypto` where I can install it (`opam install nocrypto`) but I can't reference `nocrypto.unix`? (getting a Library not found error on dune). According to the sources it should be there, and if I inspect the switch I see the `nocrypto_unix.a` is also there. any idea of what i'm missing here?
Anarchos has quit [Quit: Vision[]: i've been blurred!]
Anarchos has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
Anarchos has joined #ocaml
noonien8 has joined #ocaml
<discocaml> <leviroth> @leostera: works fine for me. Any chance it's the classic "Multiple opam switches, environment isn't in sync" issue?
<discocaml> <leostera> hmm, i'm a little confused at why the META file is empty where in the sources it has a `unix` subpackage 🤔
<discocaml> <leviroth> Sounds funky
<discocaml> <leostera> other META files seem to have contents
Anarchos has quit [Quit: Vision[]: i've been blurred!]
<discocaml> <leviroth> Wonder if reinstalling fixes it?
bacam has quit [Server closed connection]
bacam has joined #ocaml
<discocaml> <leostera> nope, still empty
<discocaml> <leostera> could be that it got b0rked while publishing?
<discocaml> <leviroth> What version do you have?
<discocaml> <leostera> 0.5.4-2
<discocaml> <leostera> running ocaml 4.14.1
<discocaml> <leostera> fresh switch, created an hour ago
<discocaml> <leviroth> I have the same :/
<discocaml> <reynir> @leostera does it make sense for you to use mirage-crypto instead of nocrypto?
<discocaml> <leostera> its actually a dependency that is using this
<discocaml> <leostera> `sihl`
<discocaml> <leostera> i just reproed the error by using it directly
<discocaml> <leostera> aaaaand i fugged my opam. smh. i deleted the switch i was on and now i can't seem to list available switches to reinstall it.
Anarchos has joined #ocaml
jlrnick has joined #ocaml
edr has joined #ocaml
Guest23 has joined #ocaml
waleee has joined #ocaml
waleee has quit [Client Quit]
kitzman has quit [Quit: C-x C-c]
Guest23 has quit [Quit: Client closed]
CO2 has quit [Quit: WeeChat 4.1.1]
kurfen has quit [Ping timeout: 252 seconds]
kurfen has joined #ocaml
Serpent7776 has quit [Ping timeout: 255 seconds]
mro has quit [Remote host closed the connection]
bibi_ has quit [Quit: Konversation terminated!]
bibi_ has joined #ocaml
bartholin has joined #ocaml
jlrnick has quit [Ping timeout: 252 seconds]
CO2 has joined #ocaml
CO2 has quit [Client Quit]
CO2 has joined #ocaml
Groumf has joined #ocaml
Anarchos has quit [Ping timeout: 255 seconds]
Anarchos has joined #ocaml
Groumf has quit [Quit: Client closed]
Groumf has joined #ocaml
Groumf has quit [Quit: Client closed]
Groumf has joined #ocaml
Tuplanolla has joined #ocaml
waleee has joined #ocaml
motherfsck has joined #ocaml
Anarchos has quit [Ping timeout: 258 seconds]
nfc has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0_ has joined #ocaml
infinity0 is now known as Guest605
infinity0_ is now known as infinity0
Guest605 has quit [Ping timeout: 240 seconds]
Serpent7776 has joined #ocaml
neiluj has joined #ocaml
<neiluj> Hi!
<neiluj> If an external C function returns an exception, and the underlying function returns a C error printed to stderr, how can I catch it from OCaml?
<neiluj> (I'm using Ctypes, if it helps)
<discocaml> <sim642> Does the C function return something special if it fails? Or does it only print to stderr? The latter seems odd and annoyingly unprogrammatic
<neiluj> it prints to stderr and then there is a handler that exits more or less
<neiluj> the C library manages a global state with the handlers, a heap, a garbage collector
<neiluj> which is somewhat nice because if the values handled are large enough i bypass ocaml's memory management for C functions processing them
<neiluj> if the values are too small, however, the overhead of ocaml's indirections from its memory model is more noticeable
<neiluj> oh okay the library has a mechanism for error recovery, following their instructions
<neiluj> problem solved!
jlrnick has joined #ocaml
bartholin has quit [Remote host closed the connection]
bartholin has joined #ocaml
<neiluj> actually no, the error handlers provided by the C libraries are macros, I have no idea how to use them from ocaml
Anarchos has joined #ocaml
Anarchos has quit [Ping timeout: 252 seconds]
Anarchos has joined #ocaml
Anarchos has quit [Client Quit]
ham5urg has joined #ocaml
Anarchos has joined #ocaml
<ham5urg> Hi all, I try to update a Linux package within Voidlinux. The prior version uses a ocaml patch I have no clue of https://github.com/void-linux/void-packages/blob/master/srcpkgs/xen/patches/ocaml-4.12.patch
<ham5urg> I removed the patch for now but Idk if it is still needed. The compilation went through without that patch.
<ham5urg> Can you tell me about that patch and its intention?
bartholin_ has joined #ocaml
<Anarchos> ham5urg it removes the macros Val_None/Some_Val which must have been added in 4.12 and thus conflicting with old code.
<ham5urg> Anarchos, I can't interpret your answer. Does it mean that old Xen developed with outdated Ocaml (outdated from a Voidlinux point of view)? And Voidlinux-people patched it to make it run?
<ham5urg> ...old Xen was developed...
<Anarchos> well that is my understanding, but i may be wrong
<ham5urg> Ok, I will try to check which version Xen uses now. I already compiled and installed a newer version of Xen without that patch. I believe for now I can abandon it.
<ham5urg> Thanks Anarchos
Anarchos has quit [Quit: Vision[]: i've been blurred!]
Anarchos has joined #ocaml
Anarchos has quit [Client Quit]
Anarchos has joined #ocaml
Anarchos has quit [Ping timeout: 264 seconds]
bartholin_ has quit [Quit: Leaving]
bartholin has quit [Quit: Leaving]
Anarchos has joined #ocaml
Anarchos has quit [Ping timeout: 240 seconds]
Anarchos has joined #ocaml
Anarchos has quit [Ping timeout: 255 seconds]
Serpent7776 has quit [Ping timeout: 255 seconds]
jlrnick has quit [Ping timeout: 240 seconds]
ohperitel has quit [Quit: ZNC 1.8.2 - https://znc.in]
ohperitel has joined #ocaml
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Anarchos has joined #ocaml