[cwn] Attn: Development Editor, Latest OCaml Weekly News
Alan Schmitt
alan.schmitt at polytechnique.org
Tue Sep 11 07:06:31 PDT 2018
Hello
Here is the latest OCaml Weekly News, for the week of September 04 to
11, 2018.
Table of Contents
─────────────────
callipyge 0.2 and eqaf 0.1
Be Sport is hiring (engineers, interns)
Sedlex moved to ocaml-community
An implementation of the Noise Protocol Framework
Release of Bindlib 5.0
Ocaml Github Pull Requests
Old CWN
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
callipyge 0.2 and eqaf 0.1
══════════════════════════
Archive:
[https://discuss.ocaml.org/t/ann-callipyge-0-2-and-eqaf-0-1/2520/1]
Calascibetta Romain announced
─────────────────────────────
I'm happy to announce the second release of [callipyge] which is an
implementation of `curve25519' in OCaml and [eqaf] which is an
implementation of the equal function on `string' in a linear time -
specially to avoid timing attacks.
[digestif] will be updated with `eqaf' too.
The goal of `callipyge' is to have a good implementation of
`curve25519' but it should be replaced by a C stub extracted from the
[HACL Star project] (like what Firefox does). So, currently, we
provide this implementation which is 3 times slower than the
[reference implementation].
Then, it's a good project to introduce `eqaf' which provides only one
function `equal : string -> string -> bool' (a binding to the
[OpenBSD's implementation]) and ensure to execute this function on
linear time and avoid timing attacks. So we did some benchmarks and
compare them with the current implementation of `String.equal' from
the standard library of OCaml. Then, we get expected results: in any
situation `eqaf' took the same time to compare two `string' which is
not the case with `String.equal'.
So, happy hacking!
[callipyge] https://github.com/oklm-wsh/Callipyge.git
[eqaf] https://github.com/dinosaure/eqaf.git
[digestif] https://github.com/mirage/digestif.git
[HACL Star project] https://github.com/project-everest/hacl-star
[reference implementation] https://github.com/agl/curve25519-donna
[OpenBSD's implementation]
https://github.com/aperezdc/signify/blob/master/timingsafe_bcmp.c
He later added
──────────────
And if you are interesting by `eqaf' and how we can check if the
function has linear time, you should look [the first issue of
`eqaf']. You can find a good explanation about expected results of
benchmarks on `eqaf'.
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[the first issue of `eqaf'] https://github.com/dinosaure/eqaf/issues/1
Be Sport is hiring (engineers, interns)
═══════════════════════════════════════
Archive:
[https://sympa.inria.fr/sympa/arc/caml-list/2018-09/msg00016.html]
Vincent Balat announced
───────────────────────
Be Sport is looking for talented developers enjoying functional
programming and teamwork. All profiles are welcome.
They will work either on data importation/analysis or on the
implementation of our mobile and Web apps. All the code is written in
OCaml.
Send me a message for more information!
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
Sedlex moved to ocaml-community
═══════════════════════════════
Archive:
[https://discuss.ocaml.org/t/sedlex-moved-to-ocaml-community/2532/1]
Perry E. Metzger announced
──────────────────────────
For those of you who use sedlex, it has moved to [a new repository on
ocaml-community.]
This was done with a github transfer, so existing issues against the
repository got moved as well, and existing users should be redirected
properly. That said, I've done a pull request to fix the opam packages
and hopefully it will be merged soon.
[a new repository on ocaml-community.]
https://github.com/ocaml-community/sedlex
gasche asked and Gabriel Radanne replied
────────────────────────────────────────
How does the regexp compilation engine compares to what is
done in [Re]? Would it be possible to build a lexer
generator on top of an independent regexp library like
[Tyre] or [ppx_regexp]? (cc @Drup)
That is a very good question, I have some plans in mind, but they
require quite a bit of work. Basically, the current situation is the
following:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Library Syntax Composition Refill Unicode Automaton Regexs
─────────────────────────────────────────────────────────────────────────────────────────────
ocamlex Custom No¹ Yes No DFA, codegen to C Basic
sedlex PPX No¹ Yes Yes DFA, codegen to OCaml Limited
Re/Tyre OCaml Yes No No³ Online determinization² Extended⁴
ppx_regex/tyre PPX+OCaml Yes No No Online determinization² Extended⁴
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
¹: Some built-in mechanism for locally defining regex exists, but no
true composition.
²: There are some things to determinize offline, but they need
refreshing
³: [https://github.com/ocaml/ocaml-re/pull/48]
⁴: Within regularity. Lacks full blown complementation. See also [this
paper].
My plans would not be to try to improve sedlex, but rather to push
`re' (and the related libraries) to the point where it's universally
better. Ppx_regexp/tyre provides a convenient "ocamlex" like syntax
while preserving composition. The first step would be a refill
mechanism, and support for UTF (for which @nojb made a prototype that
would need revival).
Performances are a tricky question. Ocamllex is clearly faster, since
it generates a C-based DFA. I expect sedlex to be faster than re in
small examples, but it would need evaluation. Online determinization
is very desirable in many contexts.
wrt. Unicode libraries: At least for sedlex, it was designed so that
bunzli's libraries can be used before giving the stream to
sedlex. Either to re-encode, or to normalize. I think that's a decen
way of doing things.
[Re] https://github.com/ocaml/ocaml-re
[Tyre] https://github.com/Drup/tyre
[ppx_regexp] https://github.com/paurkedal/ppx_regexp
[this paper]
https://www.home.hs-karlsruhe.de/~suma0002/publications/cc14-flexible-lexing-via-extended-regex.pdf
james woodyatt then said
────────────────────────
First off, I'm pleased to see sedlex getting some love finally. Very
grateful to the community for that.
I would like to add here that my forthcoming _Orsetto_ project
includes another [alternative] to _sedlex_ that might be worth noting,
although it [has] [issues] and it remains in the "unstable" branch
while I'm slowly working on it in my copious spare time.
I would describe it here as follows:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Library Syntax Composition Unicode Automaton Regexs
──────────────────────────────────────────────────────────────
Orsetto.UCS OCaml Yes Yes Lazy DFA Basic¹
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
¹: A subset of UTS #18, RL1 (no loose matching, word or line
boundaries, etc.)
Also, I'm not sure what "refill" means here, so I didn't characterize
it.
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[alternative]
https://bitbucket.org/jhw/orsetto/src/unstable/src/ucs/ucs_regx.mli
[has]
https://bitbucket.org/jhw/orsetto/issues/7/unicode-regular-expression-level-2-support
[issues]
https://bitbucket.org/jhw/orsetto/issues/6/unicode-regular-expression-level-1-support
An implementation of the Noise Protocol Framework
═════════════════════════════════════════════════
Archive:
[https://discuss.ocaml.org/t/ann-an-implementation-of-the-noise-protocol-framework/2539/1]
Etienne Millon announced
────────────────────────
I am announcing the first release of [noise], an implementation of the
[Noise Protocol Framework].
It contains building blocks to implement a secure protocol with
confidentiality and authentication on top of modern cryptographic
primitives. This protocol framework is used by [WhatsApp],
[WireGuard], and [Lightning].
This is still a very early version:
• it contains some custom implementations of cryptographic primitives
• the interface is unstable
• most applications need a higher level protocol like [NoiseSocket],
which is comparable to TLS
Next on my roadmap is implementing a WireGuard client and server that
can be used in [Mirage].
If you are interested in implementing a protocol that uses Noise,
please get in touch!
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[noise] https://github.com/emillon/ocaml-noise
[Noise Protocol Framework] https://noiseprotocol.org/
[WhatsApp]
https://www.whatsapp.com/security/WhatsApp-Security-Whitepaper.pdf
[WireGuard] https://www.wireguard.com/
[Lightning]
https://github.com/lightningnetwork/lightning-rfc/blob/master/08-transport.md
[NoiseSocket] https://noisesocket.org/
[Mirage] https://mirage.io/
Release of Bindlib 5.0
══════════════════════
Archive: [https://discuss.ocaml.org/t/release-of-bindlib-5-0/2541/1]
Rodolphe Lepigre announced
──────────────────────────
I am pleased to announce the release of Bindlib 5.0.1, which is a
library for handling structures with bound (and free) variables
(typical applications include the development of languages and proof
systems). It has already been available on Opam for several weeks, and
the source code of the latest version can be found in the [development
repository].
This new version provides a simpler, more concise interface. It is
extensively documented, and includes a small tutorial. An
[introductory paper] has also been recently presented at the LFMTP
2018 workshop.
Bindlib has already been used in fairly big projects (from the most
recent): [Lambdapi], [PML₂], [SubML], [PML], and many other smaller
prototypes.
The implementation is very efficient (in terms of substitution), and
it handles renaming to avoid capture.
Feel free to give feedback!
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[development repository] https://github.com/rlepigre/ocaml-bindlib
[introductory paper]
http://eptcs.web.cse.unsw.edu.au/paper.cgi?LFMTP2018.4
[Lambdapi] https://github.com/rlepigre/lambdapi
[PML₂] https://github.com/rlepigre/pml
[SubML] https://rlepigre.github.io/subml/
[PML] https://lama.univ-savoie.fr/tracpml
Ocaml Github Pull Requests
══════════════════════════
Gabriel Scherer and the editor compiled this list
─────────────────────────────────────────────────
Here is a sneak peek at some potential future features of the Ocaml
compiler, discussed by their implementers in these Github Pull
Requests.
• [Stop supporting obsolete platforms]
• [{WIP} Deprecated optional arguments]
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[Stop supporting obsolete platforms]
https://github.com/ocaml/ocaml/pull/2024
[{WIP} Deprecated optional arguments]
https://github.com/ocaml/ocaml/pull/2027
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] mailto:alan.schmitt at polytechnique.org
[the archive] http://alan.petitepomme.net/cwn/
[RSS feed of the archives] http://alan.petitepomme.net/cwn/cwn.rss
[online] http://lists.idyll.org/listinfo/caml-news-weekly/
[Alan Schmitt] http://alan.petitepomme.net/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/caml-news-weekly/attachments/20180911/4257c591/attachment.htm>
-------------- next part --------------
--
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂, Mauna Loa Obs. 2018-08: 406.99, 2017-08: 405.07
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 528 bytes
Desc: not available
URL: <http://lists.idyll.org/pipermail/caml-news-weekly/attachments/20180911/4257c591/attachment-0001.pgp>
More information about the caml-news-weekly
mailing list