dkm

Results 53 comments of dkm

I was thinking about this a lot. I was thinking more along the lines of combining attributes of overlaid `image`s, but on one hand, it's not clear what the semantics...

So... if you can set attributes on a region of the `image`, what falls out naturally is simply another image constructor `screen : A.t -> int -> int -> image`...

[Here](https://github.com/pqwy/notty/blob/attr/src/notty.mli#L242-L252) is something that might interest you. It's a combinator to apply attributes to an image. It composes by refining, as opposed to overriding, the existing attributes. And it works...

@rneswold Other than a thumbs-up, how does it work for you? Have you tried it out? I'm asking because its behaviour might seem counter-intuitive at first glance.

It's still on the `attr` branch.

Another alternative would be to use `Cstruct.t`. `sendfile(2)` avoids copying the file into OCaml memory altogether, sure, but just using cstructs mostly bypasses the GC. They are backed by a...

Yeah. Anything that wraps `Bigarray` with offset/pointer so the bulk of it is allocated off the GC heap and it's not expensive to cut. We use `Cstruct.t` in TLS pervasively...

@dbuenzli, @hcarty: That's also true. I can't see myself switching TLS and all the related libs to core just for the buffer type anytime soon. The ecosystem could really use...

Cstructs _are_ a minimal wrapping of bigarrays with offset/length! As for `Lwt_io.read_into_bytes` and its counterpart, they are [called](http://ocsigen.org/lwt/2.4.3/api/Lwt_bytes) `Lwt_bytes.read` / `write`, and are what `Lwt_cstruct.read` / `write` [build upon](https://github.com/mirage/ocaml-cstruct/blob/master/lwt/lwt_cstruct.ml). It...

Is this still relevant? LGTM