companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 5.2.0 released: https://ocaml.org/releases/5.2.0 | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
cr1901_ is now known as cr1901
Tuplanolla has quit [Quit: Leaving.]
torretto has quit [Remote host closed the connection]
torretto has joined #ocaml
neiluj has joined #ocaml
neiluj has quit [Ping timeout: 255 seconds]
<discocaml> <jordan4ibanez> how is the hot reload watch so dang fast?!
waleee has quit [Ping timeout: 255 seconds]
neiluj has joined #ocaml
neiluj has quit [Ping timeout: 264 seconds]
williewillus has joined #ocaml
cr1901 has quit [Read error: Connection reset by peer]
neiluj has joined #ocaml
neiluj has quit [Ping timeout: 255 seconds]
<discocaml> <functionalprogramming> separate compilation
cr1901 has joined #ocaml
jabuxas has quit [Ping timeout: 272 seconds]
torretto has quit [Remote host closed the connection]
torretto has joined #ocaml
c7n_kubelet is now known as companion_cube
<discocaml> <sim642> What hot reload?
<discocaml> <yawaramin> `dune exec --watch`.
<discocaml> <yawaramin> incidentally, to make it even faster, use bytecode compilation mode
neiluj has joined #ocaml
neiluj has quit [Ping timeout: 252 seconds]
bartholin has joined #ocaml
williewillus has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.3)]
neiluj has joined #ocaml
neiluj has quit [Ping timeout: 240 seconds]
gooby323 has joined #ocaml
YuGiOhJCJ has joined #ocaml
<gooby323> What does the process of updating a library from OCaml 4 to OCaml 5 look like more or less?
<discocaml> <darrenldl> mostly concerned with switching from ocaml 4 concurrency libs to ocaml 5 ones
waleee has joined #ocaml
<discocaml> <sim642> I wouldn't call watch mode "hot reload" really. That term is usually used for reloading parts of running applications without completely restarting them, while preserving state and such while swapping out code on the fly.
Franciman has joined #ocaml
<gooby323> darrenldl: What I had in mind was the mariadb library, which is stuck on OCaml 4, I think it has its own Lwt/Async bindings already so I don't think that needs to be changed
<gooby323> Ah no wait nevermind, it just provides the functors and you define the asynchronous pieces yourself, so actually I don't think there will be anything to update on that front
<gooby323> It would be nice if we could just change the OCaml dependency to 5 and see what breaks, but I don't think it's as easy as that unfortunately x)
<reynir> gooby323: maybe you need to add some locking if you expect to use it in parallel
<gooby323> reynir: That's a fair point, although the library right now doesn't support parallelism, only concurrency, so that would be outside the scope of an upgrade
Tuplanolla has joined #ocaml
waleee has quit [Ping timeout: 264 seconds]
<discocaml> <darrenldl> yeah i think just see if anything breaks first, if you dont care about thread safety (right now)
<octachron> gooby323, it looks like the issue is that the library is stuck with oasis. Updating from OCaml 4 to OCaml 5 doesn't require any changes for most libraries.
troydm has joined #ocaml
gooby323 has quit [Quit: Konversation terminated!]
<myrkraverk> I'm getting back into OCaml. What is a good starting project to get familiar with it?
<myrkraverk> I'm just asking for some random suggestions, or whatever worked for you.
gooby323 has joined #ocaml
<gooby323> octachron: Ah I see. It seems that switching from oasis to dune isn't too complex, so that could be the first step. Thanks
toastal has quit [Ping timeout: 268 seconds]
gooby323 has quit [Quit: Konversation terminated!]
neiluj has joined #ocaml
gooby323 has joined #ocaml
jabuxas has joined #ocaml
troydm has quit [Ping timeout: 264 seconds]
neiluj has quit [Ping timeout: 264 seconds]
gooby323 has quit [Quit: Konversation terminated!]
<Franciman> hi, is it possible to have a list of modules
<Franciman> and do a map to import all of the modules?
<Franciman> something like: let modules = [M1, M2, M3] and then do List.iter (fun m -> open m) modules
<Franciman> ?
<discocaml> <mbs> Having a list of modules is no problem, see, e.g., https://dev.realworldocaml.org/first-class-modules.html
<Franciman> oh nice
<Franciman> thanks a lot
<discocaml> <mbs> > and then do List.iter (fun m -> open m) modules
<discocaml> <mbs>
<discocaml> <mbs> This is harder (if possible at all)
<discocaml> <mbs> What exactly are you trying to achieve with this?
bartholin has quit [Remote host closed the connection]
bartholin has joined #ocaml
<octachron> You cannot have a function evaluated at runtime have any effect on compilation. Also first class modules are an advanced feature better left for latter exploration.
<octachron> You could define a module as a collection of many modules `module All = struct include M1 include M2 include M3 end` and open this module.
<octachron> However, the generic advice is rather to avoid widely opening modules.
neiluj has joined #ocaml
jabuxas has quit [Ping timeout: 264 seconds]
toastal has joined #ocaml
neiluj has quit [Ping timeout: 264 seconds]
neiluj has joined #ocaml
chiselfuse has quit [Remote host closed the connection]
chiselfuse has joined #ocaml
neiluj has quit [Ping timeout: 255 seconds]
neiluj has joined #ocaml
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
Inline has quit [Read error: Connection reset by peer]
Inline has joined #ocaml
<Franciman> @mbs i defined various types of interpreters
<Franciman> and i put them in an association list
<Franciman> associated with a string name that the user can provide to select the correct interpreter. It seems to be working using the syntax you provided
<Franciman> btw, i can't seem to find a way to perform bitwise operations
<Franciman> what is the syntax?
<discocaml> <Kali> no syntax
<discocaml> <Kali> they are functions
<discocaml> <Kali> `band`, `bor`, etc.
<discocaml> <Kali> b for bitwise
<Franciman> where are they defined?
<Franciman> i get an error if i use it
<discocaml> <Kali> in Int
<Franciman> ah found, logor, logand etc
<Franciman> thanks
<discocaml> <Kali> oops, yeah, i forgot what they were called but those are the ones yeah
<discocaml> <Kali> i was confusing them with luajit's bit module
<Franciman> np
torretto has quit [Remote host closed the connection]
torretto has joined #ocaml
neiluj has quit [Ping timeout: 246 seconds]
CalimeroTeknik has quit [Ping timeout: 255 seconds]
oisota6 has joined #ocaml
neiluj has joined #ocaml
trillion_exabyte has quit [Ping timeout: 255 seconds]
oisota has quit [Ping timeout: 255 seconds]
oisota6 is now known as oisota
trillion_exabyte has joined #ocaml
CalimeroTeknik has joined #ocaml
neiluj has quit [Ping timeout: 260 seconds]
neiluj has joined #ocaml
<octachron> There is also the operator version "2 lor 3"
leah2 has quit [Ping timeout: 268 seconds]
neiluj has quit [Ping timeout: 246 seconds]
pieguy128_ has quit [Ping timeout: 268 seconds]
pieguy128 has joined #ocaml
leah2 has joined #ocaml
neiluj has joined #ocaml
torretto has quit [Ping timeout: 260 seconds]
torretto has joined #ocaml
toastal has left #ocaml [Disconnected: Hibernating too long]
Anarchos has joined #ocaml
neiluj has quit [Quit: WeeChat 4.2.1]
ocra8_ has quit [Read error: Connection reset by peer]
waleee has joined #ocaml
bartholin has quit [Quit: Leaving]
Inline has quit [Quit: Konversation terminated!]
Inline has joined #ocaml
leah2 has quit [Ping timeout: 255 seconds]
leah2 has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
ocra8 has joined #ocaml
mal`` has quit [Quit: Leaving]
Tuplanolla has quit [Quit: Leaving.]