Hello Here is the latest OCaml Weekly News, for the week of November 02 to 09, 2021. Table of Contents ───────────────── OTOML 0.9.0 — a compliant and flexible TOML parsing, manipulation, and pretty-printing library Build System Engineer at Jane Street Real-world use example of ts2ocaml First release of `ts2ocaml' - generates OCaml bindings from .d.ts files! OUPS meetups are back! Old CWN OTOML 0.9.0 — a compliant and flexible TOML parsing, manipulation, and pretty-printing library ══════════════════════════════════════════════════════════════════════════════════════════════ Archive: Daniil Baturin announced ──────────────────────── OTOML 0.9.2 is now available from the OPAM repository. Breaking changes ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ It makes a breaking change to the `get_array' accessor: it now has type `Otoml.get_array' now has type `?strict:bool -> (t -> 'a) -> t -> 'a list' , that is, it requires an accessor function that will be applied to every item of the array. For example, you can use `Otoml.find t (Otoml.get_array Otoml.get_string) ["foo"]' to retrieve an array of strings from a TOML document's key `foo' . The motivation for the change is that it allows retrieving arrays of unwrapped OCaml values in one step. The old behaviour can still be emulated using an identify function for the accessor, for example the built-in `Otoml.get_value : 'a -> 'a' . New features ╌╌╌╌╌╌╌╌╌╌╌╌ New `Otoml.path_exists t ["some"; "table"; "key"]' allows checking if a key path exists in a TOML document. `Otoml.Printer.to_string/to_channel' functions now provide `~force_table_array' option. When set to true, it forces every array that contains nothing but tables to be rendered using the `[[...]]~' table array syntax. Bug fixes ╌╌╌╌╌╌╌╌╌ Unicode escape sequences are now printed correctly. If a table has subtables and non-table items, the non-table items are forcibly moved before the first subtable for printing. This way the output parses correctly, otherwise the non-table items would be mistakenly treated as subtable members. This way hand-constructed TOML tables are always formatted correctly even if the user inserts non-table items after a subtable. Testing ╌╌╌╌╌╌╌ I added a minimal test suite for the read-write interface. If anyone wants to contribute to it, that will be much appreciated. Ideally, all lookup functions and all accessors/constructors should be tested to work as expected. Both parser and formatter are now tested with the [github.com/BurntSushi/toml-test] and are fully compliant (one formatter test is skipped because the test itself is malformed). [github.com/BurntSushi/toml-test] Future plan ╌╌╌╌╌╌╌╌╌╌╌ My idea was to call it 1.0.0 when it passes both parsing and formatter tests. That goal is reached now, but I'd like to see if anyone has any more ideas for the API that cannot be implemented without breaking changes. If not, I'll call it 1.0.0 in the next release. Build System Engineer at Jane Street ════════════════════════════════════ Archive: Andrey Mokhov announced ─────────────────────── Jane Street is looking for new build system engineers! I've worked in this team for two years and I love the job. Here is why: • You frequently change focus from low-level work, like debugging a weird file-system issue, to high-level work, like designing a cloud build cache. • Your colleagues are amazing. If you're like me, you'll feel like an imposter in most conversations but it's OK since everyone is kind and helpful, so you'll learn something new every day. • Most of your work is open-source and benefits the wider OCaml community. For balance, let me also say a few words about challenges. • Build systems accumulate years of knowledge of many people on how to get things done. When this knowledge goes out of date, you are often the only person to fix it. For this reason, build systems work can be daunting. • It's far from our core business, so you don't get to work on any of our cool trading systems. Your role is to empower others. • Our team is small, so we may have to turn down some good candidates. However, please don't get discouraged by this! If in doubt, send me a message and we'll chat. • There is no remote work for now. To apply, follow [this link] and mention the build systems role in your application. Our plans for 2022 include: implementing cloud builds in Dune, better integration with other tools like IDEs and the OCaml compiler, and making Dune even faster than it is today. To learn more about our work, listen to [this podcast]. And feel free to message me or @jeremiedimino if you have any questions! [this link] [this podcast] Real-world use example of ts2ocaml ══════════════════════════════════ Archive: Sora Morimoto announced ─────────────────────── Some OCaml/JavaScript enthusiasts may know that we spent almost two years working on a tool automatically generating OCaml bindings from TypeScript's type definition files. To prepare for its release, we just published a repository to show an example use of it. This example generates and actually uses a binding to a small JavaScript library called [pretty-bytes], and it doesn't only generate the binding, but also converts JSDoc comments to odoc ones. We believe we can release ts2ocaml as early as this month, please look forward to the new announcement! [pretty-bytes] First release of `ts2ocaml' - generates OCaml bindings from .d.ts files! ════════════════════════════════════════════════════════════════════════ Archive: Cannorin announced ────────────────── We're pleased to announce that ts2ocaml is now public! This is a tool which parses TypeScript definition files (`.d.ts') of a JS package and then generates an OCaml binding for the package. ts2ocaml currently supports js_of_ocaml as a target via [LexiFi/gen_js_api], and ReScript is also going to be supported too! You can install ts2ocaml from NPM: `npm install -g @ocsigen/ts2ocaml'. Please take a look at the documentation on our GitHub repository before using it. Also, we appreciate any feedback or bug reports, especially since this is the first release of ts2ocaml! This tool is heavily inspired by ts2fable, which generates Fable (F# AltJS) bindings from `.d.ts' files. This tool is also written in Fable. Thank you very much for the great language and an awesome ecosystem, Fable team! [LexiFi/gen_js_api] OUPS meetups are back! ══════════════════════ Archive: zapashcanon announced ───────────────────── We (@Vertmo, @lsylvestre, Colin González and myself) are happy to announce that the [OUPS (OCaml Users in PariS) meetups] are back. If you're not familiar with OUPS, the idea is to have people using OCaml (developers, applications' users, researchers, …) to meet in Paris where a talk is given, followed by some discussions while eating pizza and drinking beer. We're planning to have the first meetup happening this year in December. Thus we're looking for speakers willing to give a talk for the first meetups or the following ones. The talks usually happen at [IRILL]'s offices, [4 Place Jussieu, 75005 Paris]. We'll prefer talks in french and with someone able to be physically present, but we're open about english and remote talks. If you want to give a talk in December or in the future, you can let us know here or [on zulip] where we plan to have our main discussions. We also have [a group on Framagit] where we'll store some stuff. If you don't like Zulip, I'm also on IRC (#oups in [libera.chat]) and [matrix] but not everyone is. The four of us are doing a PhD in the following places: [ENS] ([Parkas team]), [Université de Paris] ([Irif]) + [Nomadic Labs], [Université Paris-Saclay] ([LMF]) + [OCamlPro], [Sorbonne Université] ([APR team - LIP6]) ; so we have a good coverage of the OCaml users in Paris but we don't know everyone. Even if you don't want to give a talk, if you know someone that may be interested, please talk to him about OUPS ! :) Also, if there's a subject you'd like to hear about at OUPS, you can tell us and we'll try to find a speaker to give a talk about it. We'll come back to you very quickly about the December meetup. [OUPS (OCaml Users in PariS) meetups] [IRILL] [4 Place Jussieu, 75005 Paris] [on zulip] [a group on Framagit] [libera.chat] [matrix] [ENS] [Parkas team] [Université de Paris] [Irif] [Nomadic Labs] [Université Paris-Saclay] [LMF] [OCamlPro] [Sorbonne Université] [APR team - LIP6] Old CWN ═══════ If you happen to miss a CWN, you can [send me a message] and I'll mail it to you, or go take a look at [the archive] or the [RSS feed of the archives]. If you also wish to receive it every week by mail, you may subscribe [online]. [Alan Schmitt] [send me a message] [the archive] [RSS feed of the archives] [online] [Alan Schmitt]