John_Ivan has quit [Remote host closed the connection]
bartholin has quit [Quit: Leaving]
<discocaml>
<Scarlet> hey, i have a problem that im stuck on for a while.
<discocaml>
<Scarlet> i have file that is keep write into while the code is running, and everything is works. but whenever I re-run the program , i want to overwrite the file and not append to it . anyone know how to do it?
<discocaml>
<Scarlet> i have file that i keep write into while the code is running, and everything is works. but whenever I re-run the program , i want to overwrite the file and not append to it . anyone know how to do it?
<discocaml>
<Scarlet> i have file that is being consistently appended while the code is running, and everything is works. but whenever I re-run the program , i want to overwrite the file and not append to it . anyone know how to do it?
hrberg has quit [Quit: No Ping reply in 180 seconds.]
hrberg has joined #ocaml
azimut has joined #ocaml
olle has quit [Quit: Lost terminal]
<reynir>
What ppx provides let%bind?
<discocaml>
<leviroth> ppx_let
<reynir>
thanks
<discocaml>
<cameliacamelia888> I need your precious help. I need to return a copy of a list in which odd-length lists have been doubled. For exemple my list : oddList [[]; [1];[1;2];[1;2;3];[];[5;4;3;2;1]] must return oddList [[]; [1; 1]; [1; 2]; [1; 2; 3; 1; 2; 3]; []; [5; 4; 3; 2; 1; 5; 4; 3; 2; 1]]
<discocaml>
<cameliacamelia888>
<discocaml>
<cameliacamelia888> I tried this without success:
<discocaml>
<cameliacamelia888>
<discocaml>
<cameliacamelia888> let rec listes_paires l = match l with
<discocaml>
<cameliacamelia888> | [] -> []
<discocaml>
<cameliacamelia888> | x :: r -> if length x mod 2 = 0 then (x :: (listes_paires r))
<discocaml>
<cameliacamelia888> I need your precious help. I need to return a copy of a list in which odd-length lists have been doubled. For exemple my list : oddList [[]; [1];[1;2];[1;2;3];[];[5;4;3;2;1]] must return oddList [[]; [1; 1]; [1; 2]; [1; 2; 3; 1; 2; 3]; []; [5; 4; 3; 2; 1; 5; 4; 3; 2; 1]]
<discocaml>
<cameliacamelia888>
<discocaml>
<cameliacamelia888> I tried this without success:
<discocaml>
<cameliacamelia888> `
<discocaml>
<cameliacamelia888> let rec listes_paires l = match l with
<discocaml>
<cameliacamelia888> | [] -> []
<discocaml>
<cameliacamelia888> | x :: r -> if length x mod 2 = 0 then (x :: (listes_paires r))
<discocaml>
<cameliacamelia888> I need your precious help. I need to return a copy of a list in which odd-length lists have been doubled. For exemple my list :
<zozozo>
I guess I can get what I want with enabled_if
<discocaml>
<emillon> add `enabled_if` on the corresponding `(mdx)` stanza
bgs has joined #ocaml
<zozozo>
yeah, that's what I found
slothby has joined #ocaml
motherfsck has joined #ocaml
neiluj has joined #ocaml
mbuf has quit [Quit: Leaving]
<discocaml>
<RegularSpatula> Here is a quote from a matklad blog post: "we don’t have a reliability-oriented high-level programming language with a good quality of implementation (modern ML, if you will)." (https://matklad.github.io/2023/03/26/zig-and-rust.html) ...I'm wondering what others here think...why wouldn't ocaml fit as a reliability-oriented high level modern ML with a good implementation? (the context if you don't care to read the post, is that rust g
<discocaml>
<RegularSpatula> setting aside ecosystem size (like availability of whatever libs you need) it seems that a lot of users looking for "modern ML" with a good implementation would be well served by ocaml rather than rust...anyway, just an interesting thought brought up from that paragraph in that post
<discocaml>
<RegularSpatula> maybe "reliability-oriented" has a specific meaning that i don't understand and that explains why ocaml wouldn't fit the description (idk)
<discocaml>
<masterbuilder> Personally I would not consider Rust to be a language belonging to the ML family, it just borrows some ideas
<discocaml>
<RegularSpatula> the author of the post does use quotes when calling rust a "modern ML" so i think they probably mean it in the sense that you say...ML-ish or ML-inspired
olle has joined #ocaml
Serpent7776 has quit [Quit: leaving]
Stumpfenstiel has joined #ocaml
bartholin has joined #ocaml
<companion_cube>
I suspect matklad refers to tooling, possibly to some stdlib things too (which are more painful in ocaml than they'd be in a more recent language). That's how I interpret it.
gdd has quit [Ping timeout: 252 seconds]
gdd has joined #ocaml
oriba has joined #ocaml
bgs has quit [Remote host closed the connection]
trev has quit [Remote host closed the connection]
olle has quit [Ping timeout: 260 seconds]
bartholin has quit [Quit: Leaving]
Stumpfenstiel has quit [Ping timeout: 276 seconds]