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.]
zenmov has quit [Ping timeout: 255 seconds]
Everything has quit [Ping timeout: 252 seconds]
Everything has joined #ocaml
Tuplanolla has quit [Quit: Leaving.]
rgrinberg has quit [Quit: My Unrecognized Mac has gone to sleep. ZZZzzz…]
mange has joined #ocaml
zenmov has joined #ocaml
cr1901 is now known as Dolu1990
Dolu1990 is now known as cr1901
kurfen_ has joined #ocaml
kurfen has quit [Ping timeout: 276 seconds]
Everything has quit [Quit: leaving]
ygrek has quit [Remote host closed the connection]
anpad has quit [Quit: ZNC 1.8.2 - https://znc.in]
anpad has joined #ocaml
mange has quit [Quit: Quittin' time!]
bartholin has joined #ocaml
Serpent7776 has joined #ocaml
bartholin has quit [Quit: Leaving]
toastal has quit [Quit: Gateway shutdown]
olle has joined #ocaml
Haudegen has joined #ocaml
pi3ce has quit [Read error: Connection reset by peer]
pi3ce has joined #ocaml
nirvdrum has quit [Quit: Ping timeout (120 seconds)]
nirvdrum has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
<discocaml> <xavierm02_> Is it possible to organize several independent files containing expect tests in such a way that they all share the same dune file and it is possible to run the expect tests of a single file?
<discocaml> <xavierm02_> If I put all the files in the same directory, then I don't know how to tell dune to only run the expect tests of one of the files; if I put them each in their subdirectory then I can do `dune runtest lib/subdir` but I need to have a dune file in each subdir because otherwise ppx_expect_runtime raises an exception telling me it didn't find the file in `lib`...
Haudegen has joined #ocaml
gentauro has quit [Read error: Connection reset by peer]
gentauro has joined #ocaml
pi3ce has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
pi3ce has joined #ocaml
<companion_cube> 😂
<olle> Arise what?
<discocaml> <bluddy5> (undead thread)
<companion_cube> lfg
<discocaml> <bluddy5> How many people are actually actively using eio? Aren't most people still on lwt?
<companion_cube> I'm not entirely sure
<companion_cube> I'm on OCaml 5 but without Eio
<olle> Ah
<discocaml> <bluddy5> lwt has 613 uses on opam. eio has 28.
semarie has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
ygrek has joined #ocaml
semarie has joined #ocaml
<discocaml> <JM> The last eio adoption I've seen (smaws), if I read it right, sticks the entire `env` in a context so capabilities don't appear in the API at all.
<discocaml> <JM> That seems the only sensible way to have a good dev experience when building on top of eio 🤷‍♂️
semarie has quit [Quit: quit]
semarie has joined #ocaml
f[x] has joined #ocaml
ygrek has quit [Remote host closed the connection]
<discocaml> <lukstafi> Any idea where in Landmarks a discrepancy between `Time` (https://en.wikipedia.org/wiki/Time_Stamp_Counter) and `Sys time` could be coming from? It's for `ROOT`, could it be that `Landmark.reset` does not reset the sys timer? I have a loop that should be doing the same thing, `Time` has a very slight statistical upward drift, while `Sys time` grows monotonically, something like `delta0 + 0.45 * t * delta0`.
<discocaml> <lukstafi> (I'll check if it comes from condition variables.)
<companion_cube> sys time is cpu usage, isn't it?
<discocaml> <lukstafi> `sys_time : bool;
<discocaml> <lukstafi> Also collect Sys.time timestamps during profiling.`
<discocaml> <dinosaure> `Sys.time` is (depending on your system however) probably the `times` function
<discocaml> <dinosaure> (see `man 2 times`)
<discocaml> <dinosaure> if it's really sensible, it's probably better (for micro-benchmark) to use a monotonic clock like `clock_gettime`
<discocaml> <dinosaure> (and if you want to be really precise, `rdtsc` is probably the best)
<discocaml> <dinosaure> (and I reiterate, if it's a question of calculating execution time, `landmarks` may not be the best, it's very good for a GC view but `bechamel` is probably preferable for micro-benchmark).
<companion_cube> use mtime for this
<companion_cube> monotonic time
<discocaml> <dinosaure> yes, but the metric is still volatile. you need to do an extra analyze (like ols or ransac) to have a good confidence about results
<discocaml> <lukstafi> Alright! mtime resolves it, thanks! `Sys time` isn't getting reset.
<companion_cube> on linux at least, mtime is super fast, it bypasses the system call entirely
<companion_cube> vdso or whatnot
olle has quit [Ping timeout: 248 seconds]
Haudegen has quit [Quit: Bin weg.]
Mister_Magister has joined #ocaml
<Mister_Magister> Hello beautiful people, i've decided to finally start learning ocaml and couple paragrpahs into tutorial i am already confused. Tutorial states that let makes a constant but then couple lines above it was adding value to array that was defined with let, which would mean it is not constant but mutable, and at this point i am confused
<f[x]> name bound by let is constant - as in points to the same value, value itself can be mutable
<discocaml> <yawaramin> sorry can you point us to what paragraph exactly you are reading, it will help answer your question better. the exact link would be good
<discocaml> <._null._> The definition of constant and variable is a bit blurry since they are seen as synonymous in OCaml : you can't change the value a variable contains, but if a value is mutable then it can be mutated
<octachron> An alternative viewpoint is that "let" gives a name to an expression. The name is constant and will always refer to the same object. But the contents of the named object may change.
<discocaml> <yawaramin> sorry, where is it adding value to array that was defined with let? i don't see any mention of arrays here
<Mister_Magister> list if we want to be pedantic
<discocaml> <._null._> Lists aren't mutable, no list is being edited here
<Mister_Magister> it's literally doing # 9 :: u;;
<discocaml> <._null._> This is not changing u
<Mister_Magister> oh… it doesn't edit the list
<Mister_Magister> ohhh
<discocaml> <._null._> This is a construiction
<Mister_Magister> now that makes sense
<Mister_Magister> sanity restored
<discocaml> <yawaramin> it's kinda important to differentiate between lists and arrays in OCaml
xgqt has quit [Quit: WeeChat 4.2.2]
xgqt has joined #ocaml
Haudegen has joined #ocaml
Tuplanolla has joined #ocaml
bartholin has joined #ocaml
alexherbo2 has quit [Ping timeout: 256 seconds]
Haudegen has quit [Quit: Bin weg.]
<discocaml> <chrisarmstrong> yes, and I wouldn't argue it's the most correct usage (I'm the author 😂 ). In that case, it's a long-lived context i.e. a connection pool, so I need to keep the same env around
YuGiOhJCJ has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My Unrecognized Mac has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
Everything has joined #ocaml
alexherbo2 has joined #ocaml
bartholin has quit [Quit: Leaving]
Serpent7776 has quit [Ping timeout: 252 seconds]
f[x] has quit [Remote host closed the connection]
pi3ce has quit [Read error: Connection reset by peer]
pi3ce has joined #ocaml
Everything has quit [Ping timeout: 252 seconds]
Everything has joined #ocaml
malte has quit [Remote host closed the connection]
malte has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]