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/
Haudegen has quit [Quit: Bin weg.]
myrkraverk has joined #ocaml
myrkraverk_ has quit [Ping timeout: 252 seconds]
<discocaml> <cod1r> hi
bartholin has joined #ocaml
remexre_ has joined #ocaml
remexre has quit [Ping timeout: 268 seconds]
remexre_ has quit [Ping timeout: 276 seconds]
remexre has joined #ocaml
bartholin has quit [Quit: Leaving]
Serpent7776 has joined #ocaml
myrkraverk_ has joined #ocaml
myrkraverk has quit [Ping timeout: 252 seconds]
hannes has joined #ocaml
mima_ is now known as mima
<rustyne> theblatte: lib/llvm/llvm.cmxa sounds more like where it should be; what is trying to find it in lib/ocaml and do you know why?
Haudegen has joined #ocaml
chiselfuse has quit [Read error: Connection reset by peer]
chiselfuse has joined #ocaml
<discocaml> <lukstafi> Are there known causes of `No Docs` on opam.org if things work locally?
<discocaml> <lukstafi> Are there known causes of `No Docs` on opam.org/p/ if things work locally?
<discocaml> <hannes6838> you're refering to ocaml.org/p/, no? I suggest to open an issue at https://github.com/ocaml/ocaml.org with the package you're seeing "No docs", but which builds fine locally
<discocaml> <lukstafi> Ah yes, typo, sorry
myrkraverk__ has joined #ocaml
myrkraverk_ has quit [Read error: Connection reset by peer]
olle has joined #ocaml
omniscient has joined #ocaml
<discocaml> <peuk> Is there an idiomatic way to build functions for a type that is built through a functor.
<discocaml> <peuk> Say for example that I want to build a function that works for any `Map.t` that associates `'a` to `'b`, what is the best way to do that?
Haudegen has quit [Quit: Bin weg.]
<discocaml> <peuk> Is there an idiomatic way to build functions for a type that is built through a functor?
<discocaml> <peuk> Say for example that I want to build a function that works for any `Map.t` that associates `'a` to `'b`, what is the best way to do that?
<discocaml> <._null._> I don't know of any really satisfying way. Best I can think of is to overwrite the existing `Map.Make` functor by including the existing implementation and adding your function in there
<discocaml> <deepspacejohn> yeah, I think that writing your own functor that's a wrapper around the other functor is the best way. `module MyMap (Ord: Map.OrderedType) = struct include Map.Make(Ord) let my_func = ...`
omniscient has quit [Ping timeout: 276 seconds]
Haudegen has joined #ocaml
omniscient has joined #ocaml
olle has quit [Ping timeout: 268 seconds]
<discocaml> <shon_18152> Hi, all! Just wanted to share here that we are looking to onboard new volunteers into opam-repository maintenance. This is open to all, and in particular I think it's a great way to make connections within the OCaml ecosystem and to learn heaps about every corner of it. More details are available on the discuss post:
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
ddakx has joined #ocaml
omniscient has quit [Remote host closed the connection]
myrkraverk has joined #ocaml
myrkraverk__ has quit [Ping timeout: 252 seconds]
<discocaml> <peuk> Well, Ok, so indeed, nothing really satisfying. Thanks!
bartholin has joined #ocaml
<discocaml> <cemerick> I posted re: multithreaded interop between Java and OCaml, with mostly crickets in response 😆 I wonder if anyone here has any bright ideas? https://discuss.ocaml.org/t/coordinating-java-systhreads-domains/16470
Haudegen has quit [Quit: Bin weg.]
euphores has quit [Quit: Leaving.]
wbooze has joined #ocaml
euphores has joined #ocaml
myrkraverk_ has joined #ocaml
myrkraverk has quit [Ping timeout: 244 seconds]
ddakx has quit [Quit: leaving]
myrkraverk has joined #ocaml
myrkraverk_ has quit [Ping timeout: 260 seconds]
<discocaml> <froyo> I totally forgot that ocamleditor exists and is still actively maintained
<discocaml> <froyo> quality stuff
<discocaml> <froyo> quietly developing on github. I think that's the only place it exists on nowadats
<discocaml> <froyo> nowadays*
<discocaml> <gooby_diatonic> Wow, it's pretty much an IDE :0
myrkraverk_ has joined #ocaml
<discocaml> <gooby_diatonic> And then people say OCaml has no tooling!
myrkraverk has quit [Ping timeout: 252 seconds]
<discocaml> <yawaramin> maybe if they distributed builds...
<discocaml> <kevin_graph> Hi long time OCaml user, I've only just started digging into OCaml 5 features. I'm working on an application where I'd like to do my own preemptive scheduling of domains (as in, run for some quantum of time, then interrupt). Is such a thing possible and if so is there a recommended way? I obviously could drop down to C but I'd prefer not to.
<companion_cube> The kernel schedules domains, what you want seems hard to do
<discocaml> <kevin_graph> I see.
<discocaml> <dubious245> Oh wow that looks awful.
<discocaml> <yawaramin> when people talk about writing schedulers for OCaml concurrency, they usually mean scheduling some light-weight library-level thread construct like a 'fiber' eg https://ocaml-multicore.github.io/eio/eio/Eio/Fiber/index.html
<discocaml> <dubious245> How would you do this in C? Even c code is beholden to the OS when running as a user application.
Tuplanolla has joined #ocaml
Serpent7776 has quit [Ping timeout: 252 seconds]
myrkraverk has joined #ocaml
myrkraverk__ has joined #ocaml
myrkraverk_ has quit [Ping timeout: 260 seconds]
myrkraverk has quit [Ping timeout: 252 seconds]
mrglownr has quit [Remote host closed the connection]
<dh`> it's perfectly feasible to implement your own thread switching
<dh`> you can't do it fully in C but it only takes about a dozen lines of asm
<dh`> then making that preemptible is just mucking with setitimer() and signals
<discocaml> <kevin_graph> Right that's what I meant
<discocaml> <kevin_graph> This will be neither performant nor accurate, but this is intended to be somewhat didactic code, so I might just check whether N amount of time has elapsed on each interpretation iteration (I am using `while...do` since I don't want to the ocaml stack since I need to be able to easily take continuations and inspect the stack in the host language)
<discocaml> <contificate> I don't really understand, do you want parallleism or not? Sounds like you want to multiplex over threads, many of which on a single domain, but then basically have a global runtime lock for the domains themselves
<discocaml> <contificate> parallelism* 🥴
Haudegen has joined #ocaml
<cedb> is there a way to have a list of arguments for the cli library by Core called Command? https://ocaml.janestreet.com/ocaml-core/v0.13/doc/core/Core/Command/Param/index.html
<cedb> alternatively maybe another library is simpler, i simply took it because its covered in the real world ocaml book but i can't for the life of figure out how to have a '$argv0 arg [arg ...]' interface
<cedb> ideally itd be parsed as a list
Tuplanolla has quit [Quit: Leaving.]
bartholin has quit [Quit: Leaving]
<companion_cube> dh`: how do you preempt a thread in assembly?
myrkraverk has joined #ocaml
myrkraverk__ has quit [Ping timeout: 276 seconds]