Simon Cruanes
Simon Cruanes
You can do the same with an atomic if the critical section is idempotent (since you might have to do it several times under contention) and if it's cheap (ditto)....
An atomic is fine if you're willing to do the update several times in case of contention, and if you don't need to do anything else than updating the map....
The later, yes. In containers: ```ocaml (* in CCLock.ml *) type 'a t = { mutex: Mutex.t; mutable content: 'a } ```
It's this way because it's more flexible. No one forces you to actually mutate it, and some functions assume you use internal mutation (like `with_lock`). Why introduce a wasteful indirection...
I think processes shouldn't live in another package :-). They're a cornerstone of any unix-y IO library, and having them tightly integrated with `Flow` is really nice! If you worry...
https://www.json.org/json-en.html here I see that "whitespace" should include "linefeed" and "carriage return", so it's probably a bug that \r is not handled properly?
I think it's because, if you use yojson _on_ windows, the OCaml IO channels will translate "\r\n" on the fly for you. Here the bug is exposed by _copying_ a...
It's been a while, do you know what the escaping rules for TPTP are? Anything not in `[A-Za-z0-9]+` (with underscores perhaps)?
Just fyi, if it's about moving one word left/right when `ctrl-left` or `ctrl-right` is pressed (with the corresponding long escape sequences `\033[5;D` and `C` respectively, I have a patch for...
Indeed, I will probably alias `rg` to `rg -p`. Still, automatic paging is quite nice :-)