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/
Haudegen has quit [Ping timeout: 265 seconds]
<discocaml> <froyo> where's the document that describes the current GC implementation? I remember reading the retrofitting paper and the ocaml-multicore notes but I think the merged & released runtime deviates slightly from those?
spip has quit [Quit: Konversation terminated!]
azimut has joined #ocaml
wingsorc has quit [Ping timeout: 240 seconds]
czy has quit [Remote host closed the connection]
<discocaml> <tautologico> now that ocaml has multicore, it could be interesting to have an ocaml version of this benchmark comparing multiple languages https://pkolaczk.github.io/memory-consumption-of-async/
waleee has quit [Ping timeout: 248 seconds]
<discocaml> <froyo> I've done 16M tasks easily with Domainslib.Task
chrisz has quit [Ping timeout: 240 seconds]
chrisz has joined #ocaml
klodelm has joined #ocaml
elmklod has quit [Ping timeout: 240 seconds]
darchitect1 has joined #ocaml
darchitect1 has quit [Ping timeout: 265 seconds]
mbuf has joined #ocaml
<discocaml> <froyo> back with numbers:
<discocaml> <froyo> baseline: 4 MB
<discocaml> <froyo> 10K: 10 MB
<discocaml> <froyo> 100K: 30 MB
<discocaml> <froyo> 1M: 250 MB
<discocaml> <froyo> Time overhead: ~4 seconds
<discocaml> <froyo> one problem I faced was nonblocking sleep
<discocaml> <froyo> ```ocaml
<discocaml> <froyo> let tasks = Array.init 100 (fun _ -> Task.async pool (fun () -> Unix.sleep 1)) in
<discocaml> <froyo> Task.run pool (fun _ -> Array.iter (Task.await pool) tasks)
<discocaml> <froyo> ```
<discocaml> <froyo> this blocks for ~34 seconds on num_domains:2
<discocaml> <froyo> as long as each task's heap allocation doesn't happen when we await on it, then omitting the sleep should be fine. Instead, to block the tasks, I used a Chan.recv for each task.
JSharp has quit [Ping timeout: 250 seconds]
JSharp has joined #ocaml
Serpent7776 has joined #ocaml
bgs has joined #ocaml
<discocaml> <darrenldl> it'll hopefully be easier once i actually finish the PR for eio task pool properly...
<discocaml> <tautologico> so better than all others except Rust+tokio?
bgs has quit [Remote host closed the connection]
<discocaml> <hockletock> the author of that post says he used ChatGPT to create implementations in languages he doesn't know, that's a huge grain of salt for any kind of usefulness of the benchmark
<discocaml> <tautologico> true
bartholin has joined #ocaml
<discocaml> <bellamy> Maybe this is obvious, but what does the Co refer to or stand for in Cohttp? Scoured the docs and have not find the answer. (Conduit, Concurrent, Coroutine, other?)
Haudegen has joined #ocaml
bartholin has quit [Quit: Leaving]
<discocaml> <Le condor du plateau> actually it stand for comunism
klodelm has quit [Read error: Connection reset by peer]
darchitect1 has joined #ocaml
<discocaml> <darrenldl> i kinda like the idea of using chatgpt to fill in code for langs you don't know, cause eventually some experts will get annoyed and give you the expert version
alexherbo2 has joined #ocaml
spip has joined #ocaml
darchitect1 has quit [Ping timeout: 240 seconds]
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
darchitect1 has joined #ocaml
darchitect1 has quit [Ping timeout: 240 seconds]
darchitect1 has joined #ocaml
darchitect1 has quit [Ping timeout: 250 seconds]
mbuf has quit [Ping timeout: 248 seconds]
mbuf has joined #ocaml
mbuf has quit [Remote host closed the connection]
mbuf has joined #ocaml
mbuf has quit [Ping timeout: 248 seconds]
mbuf has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
engler has joined #ocaml
Haudegen has joined #ocaml
<engler> I have to convert a lexer/parser written in OCaml with ocamllex and ocamlyacc into a different programming language. Are there ways to convert it/interface to it?
<octachron> What do you mean by "interface to it"? It is possible to call OCaml function from C, thus you can call the OCaml parser from a different programming language.
<engler> octachron: Yes, this is what I meant with interfacing to it
<engler> Although I would prefer a different way to be honest
<octachron> You can use menhir and ocamllex parser to parse the lexer itself and try to generate the equivalent code in your lexer/parser generator of choice. Or try to write new backend to ocamllex/menir. For small/mid-sized grammar that needs to be converted once, doing the conversion by hand is likely to be faster.
<companion_cube> So it seems that the Mutex module uses regular pthread mutexes. I wonder if the fine people spending a lot of effort on lockless structures would also do a futex based implementation of Mutex, since it's not like it's going to become useless...
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
engler has quit [Quit: leaving]
oriba has joined #ocaml
dhil has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
<discocaml> <bellamy> Could also be Coinductive? Here is a paper in the Caml world which uses the Co prefix with this meaning: https://www.cs.cornell.edu/~kozen/Papers/CoCaml.pdf
bgs has joined #ocaml
<discocaml> <Anurag> Reading the description from an older version of cohttp, `co` is most likely referencing `cooperative concurrency` (https://github.com/ocaml-attic/cohttp.old)
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
waleee has joined #ocaml
bartholin has joined #ocaml
Haudegen has joined #ocaml
motherfsck has joined #ocaml
mbuf has quit [Quit: Leaving]
motherfsck has quit [Ping timeout: 240 seconds]
darchitect1 has joined #ocaml
darchitect1 has quit [Ping timeout: 264 seconds]
nore_ has quit [Ping timeout: 240 seconds]
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
<discocaml> <bellamy> Nice find, thanks! Also just realized that Alcotest must stand for (A) (L)ightweight and (CO)lourful test framework per its description.
Tuplanolla has joined #ocaml
nore_ has joined #ocaml
wingsorc has joined #ocaml
Anarchos has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
dhil has quit [Ping timeout: 240 seconds]
Anarchos has joined #ocaml
Anarchos has quit [Ping timeout: 246 seconds]
Anarchos has joined #ocaml
bgs has quit [Remote host closed the connection]
nore has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
nore_ has quit [*.net *.split]
Serpent7776 has quit [*.net *.split]
pie_ has quit [*.net *.split]
CalimeroTeknik has quit [*.net *.split]
vsiles has quit [*.net *.split]
sim642 has quit [*.net *.split]
bartholin has quit [Quit: Leaving]
Tuplanolla has quit [Quit: Leaving.]
pie_ has joined #ocaml
CalimeroTeknik has joined #ocaml
vsiles has joined #ocaml
sim642 has joined #ocaml
Anarchos has joined #ocaml
<discocaml> <Et7f3 (@me on reply)> It is also a pun to detect alcohol
Anarchos has quit [Quit: Vision[]: i've been blurred!]
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
darchitect1 has joined #ocaml
darchitect1 has quit [Ping timeout: 240 seconds]
oriba has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
<dh`> anyone know what the deal with the permissions argument of Sys.mkdir is?
<dh`> it does not appear to be numeric unix permissions
wingsorc has quit [Ping timeout: 240 seconds]
Haudegen has quit [Ping timeout: 256 seconds]
<companion_cube> You sure? Are you using the octal notation?