{"action":"created","issue":{"url":"https://api.github.com/repos/ocaml/ocaml/issues/1961","repository_url":"https://api.github.com/repos/ocaml/ocaml","labels_url":"https://api.github.com/repos/ocaml/ocaml/issues/1961/labels{/name}","comments_url":"https://api.github.com/repos/ocaml/ocaml/issues/1961/comments","events_url":"https://api.github.com/repos/ocaml/ocaml/issues/1961/events","html_url":"https://github.com/ocaml/ocaml/pull/1961","id":347009142,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1NzMyNDU1","number":1961,"title":"[RFC] Add Bigstring module","user":{"login":"nojb","id":113560,"node_id":"MDQ6VXNlcjExMzU2MA==","avatar_url":"https://avatars3.githubusercontent.com/u/113560?v=4","gravatar_id":"","url":"https://api.github.com/users/nojb","html_url":"https://github.com/nojb","followers_url":"https://api.github.com/users/nojb/followers","following_url":"https://api.github.com/users/nojb/following{/other_user}","gists_url":"https://api.github.com/users/nojb/gists{/gist_id}","starred_url":"https://api.github.com/users/nojb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nojb/subscriptions","organizations_url":"https://api.github.com/users/nojb/orgs","repos_url":"https://api.github.com/users/nojb/repos","events_url":"https://api.github.com/users/nojb/events{/privacy}","received_events_url":"https://api.github.com/users/nojb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-08-02T13:20:55Z","updated_at":"2018-08-02T13:56:25Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/ocaml/ocaml/pulls/1961","html_url":"https://github.com/ocaml/ocaml/pull/1961","diff_url":"https://github.com/ocaml/ocaml/pull/1961.diff","patch_url":"https://github.com/ocaml/ocaml/pull/1961.patch"},"body":"This PR proposes the addition of a `Bigstring` module to the standard library (see [MPR#7772](https://caml.inria.fr/mantis/view.php?id=7772)). \"Big strings\" refer to one-dimensional big arrays of characters, and they are widely used for interfacing with C code, and in other contexts.\r\n\r\nThe new module `Bigstring` exposes an abstract type, and provides roughly the same functions as `Bytes`, a non-copying `sub` operation, plus binary numeric functions (as in #1864), and conversions to- and from- `bytes`, `string`, and bigarray types.\r\n\r\nIn addition, the new type is integrated with existing stdlib modules: `Bytes.sub_bigstring` is defined as well as I/O functions in both `Stdlib` and `Unix`. In order to define these functions in their natural modules and to bring the bigstring type to the same level as `bytes` and `string`, a new built-in, predefined type `bigstring` is defined in the compiler.\r\n\r\nMissing:\r\n- `Unix` functions under Windows.\r\n- Tests\r\n\r\nFeedback welcome! (in particular, whether the more invasive changes to the existing standard library and compiler are worthwhile).\r\n\r\n/cc @hhugo @diml "},"comment":{"url":"https://api.github.com/repos/ocaml/ocaml/issues/comments/409934962","html_url":"https://github.com/ocaml/ocaml/pull/1961#issuecomment-409934962","issue_url":"https://api.github.com/repos/ocaml/ocaml/issues/1961","id":409934962,"node_id":"MDEyOklzc3VlQ29tbWVudDQwOTkzNDk2Mg==","user":{"login":"nojb","id":113560,"node_id":"MDQ6VXNlcjExMzU2MA==","avatar_url":"https://avatars3.githubusercontent.com/u/113560?v=4","gravatar_id":"","url":"https://api.github.com/users/nojb","html_url":"https://github.com/nojb","followers_url":"https://api.github.com/users/nojb/followers","following_url":"https://api.github.com/users/nojb/following{/other_user}","gists_url":"https://api.github.com/users/nojb/gists{/gist_id}","starred_url":"https://api.github.com/users/nojb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nojb/subscriptions","organizations_url":"https://api.github.com/users/nojb/orgs","repos_url":"https://api.github.com/users/nojb/repos","events_url":"https://api.github.com/users/nojb/events{/privacy}","received_events_url":"https://api.github.com/users/nojb/received_events","type":"User","site_admin":false},"created_at":"2018-08-02T13:56:25Z","updated_at":"2018-08-02T13:56:25Z","author_association":"CONTRIBUTOR","body":"> Finally, the naming is perhaps confusing, since strings are immutable, but bigstrings are mutable.\r\n\r\nTrue. I chose this name since it is the one historically given to this concept, but I am open to suggestions! Some existing libraries that use this name:\r\n- https://github.com/c-cube/ocaml-bigstring\r\n- https://github.com/inhabitedtype/bigstringaf\r\n- https://github.com/janestreet/core_kernel/blob/master/src/bigstring.mli\r\n- https://github.com/OCamlPro/ocplib-endian/blob/master/src/endianBigstring.cppo.mli\r\n"}}
{"actor":{"display_login":"nojb"}}