OCaml Weekly News

Previous Week Up Next Week


Here is the latest OCaml Weekly News, for the week of August 16 to 23, 2022.

Table of Contents

Writing a transpiler from PHP to polyglot PHP+C code

Deep in this thread, Olle Härstedt announced

Made a small prototype here, very standard thing: https://github.com/olleharstedt/pholyglot/tree/main/src

Parser and lexer in Menhir, AST that represents the subset PHP lang, then I'd have to iterate over it to infer some types, transform to polyglot AST and from there to string.

The one thing to make it more professional would be proper error messages for the end user… But you have to carry file and line in the AST, right? Maybe I can google around. :thinking:

How to speed up this function?

Deep in a huge discussion, Yaron Minsky said

From our perspective at Jane Street, unboxed types is a very high priority. A large slice of the team is thinking about it, and Chris Casinghino and Richard Eisenberg have joined recently and have it as their primary focus, along with Antal.

In terms of when it makes it upstream, that's less clear. We're working hard on getting out some initial versions done, and we plan on iterating internally, where it's easier for us to try things out and then change them as we go. Once we have a design that we really believe in, we intend to propose it upstream, but how quickly that goes (and whether it's successful at all!) depends on whether upstream maintainers and the larger community find the improvements compelling.

In any case, I find this conversation encouraging, since it suggests there's some real hunger for improvements in this space.

I expect ICFP in particular to be a good opportunity for people to learn more about the work we're doing both here, and also on type-safe stack allocation. (For what it's worth, the latter is already in production internally and looks very promising.)

If you'll be at ICFP:


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.