companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 4.12 released: https://ocaml.org/releases/4.12.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
nkatte has joined #ocaml
nkatte has quit [Ping timeout: 268 seconds]
nkatte has joined #ocaml
nkatte has quit [Remote host closed the connection]
nkatte has joined #ocaml
<d_bot> <mimoo> so with ocaml-lsp-server and vscode, if I click on a module that was created by a functor it'll go to the definition of that functor but not the actual use of that functor to create the module. Any idea how I can get the latter?
tizoc_ is now known as tizoc
waleee has joined #ocaml
<d_bot> <rgrinberg> I think I made a PR in merlin to fix that
<d_bot> <mimoo> oh interesting! Did it land 😮 ?
<d_bot> <rgrinberg> I don’t remember anymore
jbrown has quit [Ping timeout: 244 seconds]
jbrown has joined #ocaml
waleee has quit [Ping timeout: 268 seconds]
<d_bot> <mimoo> : c
<d_bot> <mimoo> that would really help me right now 😄
jbrown has quit [Ping timeout: 264 seconds]
jbrown has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
jbrown has quit [Ping timeout: 268 seconds]
jbrown has joined #ocaml
nkatte has quit [Remote host closed the connection]
mbuf has joined #ocaml
andreypopp_ has joined #ocaml
andreypopp has quit [Ping timeout: 272 seconds]
TakinOver has joined #ocaml
fluxm has quit [Read error: Connection reset by peer]
krnkktz has quit [Read error: Connection reset by peer]
Sumera[m] has quit [Remote host closed the connection]
smondet[m] has quit [Remote host closed the connection]
radiopotin[m] has quit [Remote host closed the connection]
labor[m] has quit [Remote host closed the connection]
labor[m] has joined #ocaml
krnkktz has joined #ocaml
fluxm has joined #ocaml
radiopotin[m] has joined #ocaml
smondet[m] has joined #ocaml
Sumera[m] has joined #ocaml
<d_bot> <mimoo> `(dirs :standard \ ocaml) ;; include all directories except ocaml` <- is there a way to exclude a specific file?
<dh`> list it, see if it works?
hackinghorn has joined #ocaml
<d_bot> <mimoo> what do you mean?
<d_bot> <mimoo> ah
<d_bot> <mimoo> actually the `\ ocaml` part doesn't seem to work for me anyway...
<d_bot> <rgrinberg> There’s no way to exclude files unfortunately
olle has joined #ocaml
dhil has joined #ocaml
wonko has joined #ocaml
mikess has joined #ocaml
mikess has quit [Client Quit]
mikess has joined #ocaml
mro has joined #ocaml
shawnw has quit [Ping timeout: 264 seconds]
olle_ has joined #ocaml
berberman has joined #ocaml
berberman_ has quit [Ping timeout: 268 seconds]
yoctocell has joined #ocaml
yoctocell has quit [Read error: Connection reset by peer]
jbrown has quit [Quit: Leaving]
Haudegen has joined #ocaml
shawnw has joined #ocaml
yoctocell has joined #ocaml
neiluj_ has joined #ocaml
neiluj_ is now known as neiluj
<neiluj> Hello! I'm a bit stuck with some system code, and some advice on how to tackle this problem is welcome: https://tpaste.us/V75J. The problem is that the code in on_new_connection is not evaluated, the program exits directly. Wondering if a Lwt loop is needed there.
<neiluj> The only way to evaluate the code in on_new_connection is to bind with a blocking function (like wait to receive a message).
<neiluj> It works fine this way, but idelly it'd be nice to have a loop where the programs loops and handles incoming connections in on_new_connection.
<zozozo> neiluj: you need to use Lwt_main.run to actually evaluate an lwt promise at toplevel
<neiluj> right, thanks, that's indeed what I do.
<neiluj> I should have posted a bit more code oops
<zozozo> if you can post a self-contained example that'd be helpful (or point to the full code)
<neiluj> Sure, thanks a lot: what's not working: https://tpaste.us/maVL . What's working (no loop): https://tpaste.us/R4NY
<neiluj> Wondering if Lwt_utils.never_ending might be needed to make the loop work.
<neiluj> Hum, that never_ending function is part of some code base other than Lwt
<neiluj> hum never_ending is just LWt.wait
Chouhartem has quit [Quit: WeeChat 3.1]
Chouhartem has joined #ocaml
bartholin has joined #ocaml
<neiluj> So, yeah, binding with wait prevents the program from terminating.
<neiluj> All right, problem solved: the problem was that there's no need to loop on on_new_connection since it just installs a hook for new connections.
<neiluj> And a wait was needed too.
theglass has joined #ocaml
theglass has quit [Changing host]
dhil has quit [Quit: Leaving]
dhil has joined #ocaml
dhil has quit [Ping timeout: 244 seconds]
dhil has joined #ocaml
mikess has quit [Ping timeout: 244 seconds]
Serpent7776 has quit [Read error: Connection reset by peer]
neiluj has quit [Ping timeout: 245 seconds]
Serpent7776 has joined #ocaml
neiluj has joined #ocaml
gahr has quit [Read error: Connection reset by peer]
dhil has quit [Ping timeout: 268 seconds]
mro has quit [Remote host closed the connection]
gahr has joined #ocaml
dhil has joined #ocaml
mro has joined #ocaml
mro has quit [Ping timeout: 252 seconds]
mro has joined #ocaml
dhil has quit [Ping timeout: 252 seconds]
mro has quit [Ping timeout: 244 seconds]
Haudegen has quit [Quit: Bin weg.]
dhil has joined #ocaml
<kvik> <froyo> i was pleasantly surprised to find a plan9 port of ocaml
<kvik> <froyo> 4.07 but hey
<kvik> i've got the trunk building on plan9 (9front) the other day :)
dhil has quit [Ping timeout: 272 seconds]
<kvik> only on APE (posix emulation layer) for the moment, but i do plan to make it native sometime, along with a proper Plan9 system module
<kvik> i do need to get to know the code a lot better for that, and i'm also just learning ocaml as well :P
yoctocell has quit [Remote host closed the connection]
dhil has joined #ocaml
mro has joined #ocaml
Haudegen has joined #ocaml
mro has quit [Read error: Connection reset by peer]
mro_ has joined #ocaml
waleee has joined #ocaml
mro_ is now known as mro
TheLemonMan has joined #ocaml
yoctocell has joined #ocaml
reynir has quit [Ping timeout: 264 seconds]
reynir has joined #ocaml
waleee has quit [Ping timeout: 268 seconds]
zebrag has joined #ocaml
hackinghorn has quit [Quit: Leaving]
wonko has quit [Ping timeout: 245 seconds]
mbuf has quit [Quit: Leaving]
Tuplanolla has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
wonko has joined #ocaml
<d_bot> <mimoo> do `dune test` and `dune runtest` do the same thing?
<d_bot> <craigfe> Yes
<d_bot> <mimoo> oh interesting 😮
<d_bot> <craigfe> both are aliases of `dune build @runtest`
<d_bot> <mimoo> that's good to know thx!
mikess has joined #ocaml
mro has quit [Remote host closed the connection]
neiluj has quit [Ping timeout: 268 seconds]
neiluj has joined #ocaml
bartholin has quit [Quit: Leaving]
gzj has joined #ocaml
mro has joined #ocaml
Haudegen has joined #ocaml
neiluj has quit [Remote host closed the connection]
neiluj has joined #ocaml
neiluj has quit [Quit: Leaving]
waleee has joined #ocaml
Guest9824 has joined #ocaml
mikess has quit [Ping timeout: 252 seconds]
motherfs1 has joined #ocaml
motherfsck has quit [Ping timeout: 268 seconds]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
mikess has joined #ocaml
motherfs1 has quit [Ping timeout: 268 seconds]
gzj has quit [Remote host closed the connection]
gzj has joined #ocaml
motherfs1 has joined #ocaml
gzj has quit [Remote host closed the connection]
gzj has joined #ocaml
mikess has quit [Ping timeout: 252 seconds]
dy` is now known as dy
olle_ has quit [Ping timeout: 245 seconds]
vicfred has joined #ocaml
<d_bot> <mimoo> so in ocaml-rs (https://github.com/zshipko/ocaml-rs), they have this in their example:
<d_bot> <mimoo>
<d_bot> <mimoo> ```
<d_bot> <mimoo> #[ocaml::func]
<d_bot> <mimoo> pub fn build_tuple(i: ocaml::Int) -> (ocaml::Int, ocaml::Int, ocaml::Int) {
<d_bot> <mimoo> (i + 1, i + 2, i + 3)
<d_bot> <mimoo> }
<d_bot> <mimoo> ```
<d_bot> <mimoo>
<d_bot> <mimoo> where `ocaml::Int` is defined as an `isize`. My question is: isn't this going to have some weird behavior once we reach values that need more than 63 bits? Addition would work fine in Rust, but my understand is that in OCaml this would not work as the last bit is used for tagging
<companion_cube> yes, conversions to int64 is always a bit weird
<companion_cube> if you plan to use the last bit you should use int64
habnabit is now known as habnabit_
olle__ has joined #ocaml
wonko has quit [Ping timeout: 252 seconds]
mro has quit [Quit: Leaving...]
waleee has quit [Ping timeout: 272 seconds]
habnabit_ has quit [Quit: ZNC - http://znc.sourceforge.net]
habnabit_ has joined #ocaml
habnabit_ has joined #ocaml
habnabit_ has quit [Changing host]
olle__ has quit [Ping timeout: 252 seconds]
<d_bot> <mimoo> well `isize` should be the same as `int64` in rust
<companion_cube> I mean on the OCaml side.
<d_bot> <mimoo> ah sorry, I see what you're saying, use int64 instead of int
habnabit_ has quit [Client Quit]
habnabit_ has joined #ocaml
habnabit_ has quit [Changing host]
habnabit_ has joined #ocaml
habnabit_ has quit [Client Quit]
habnabit_ has joined #ocaml
gzj has quit [Remote host closed the connection]
yoctocell has quit [Quit: C-x C-c, Shutting down OS...]
dhil has quit [Ping timeout: 272 seconds]
<d_bot> <EduardoRFS> I would imagine always sets the lower bit to 1 before sending data to OCaml
motherfs1 is now known as motherfsck
dhil has joined #ocaml
waleee has joined #ocaml
waleee has quit [Ping timeout: 245 seconds]
<d_bot> <froyo> i think it shr's the value
<d_bot> <froyo> there's that [@immediate] thing you can use on external functions
<d_bot> <froyo> idk if it means that the compiler just inserts the shr for you
<d_bot> <froyo> so let's find out with objdump brb
<d_bot> <froyo> it wasn't immediate it was something else
<d_bot> <froyo> untagged
<d_bot> <froyo> it was [@untagged]
<d_bot> <froyo> shl rax and inc rax, looks like the untagged attr does it for you automatically
<d_bot> <froyo> shl & inc from c to ocaml so.. shr from ocaml to c
<d_bot> <froyo> (or rust in this case)
dhil has quit [Ping timeout: 252 seconds]
Haudegen has quit [Ping timeout: 272 seconds]
Techcable has quit [Quit: ZNC - https://znc.in]
Techcable has joined #ocaml
waleee has joined #ocaml
Techcable has quit [Quit: ZNC - https://znc.in]
Techcable has joined #ocaml