@WardBrian just reminded me I never posted the notes from last meeting. Sorry about that. Feel free to edit or send me edits if I got things wrong.
Minutes for 9 September 2021
Status reports
Tuples
A high % of this project is done, but @rybern reports some residual issues:
- nested containers with constraints
- code gen is complicated
- need to work out code for new matrix type
- TO-DO: rewrite code gen (mostly done)
- TO-DO: parser warning messages
Nested constraints
@WardBrian is working on a spec. There are lots of issues around offset/multiplier not being constraining and how much flexibility we want to allow in composing transforms. So far the only ones we can think of that are reasonable are offset/multiplier (applies first when unconstraining) and lower/upper bounds. And maybe ordered
and positive_ordered
types.
There’s an issue of whether to work toward user-defined constraints and Jacobian adjustments or whether to just keep our built-ins.
Closures
@rok_cesnovar reported these are almost done in both stanc3 and with the C++ code gen. This seems to be blocked in code review. There are a few deviations from the design doc that need to be included in the doc or at least listed before we write the reference manual and user’s guide doc. It needs larger-scale testing on both eh math library side (@nhuurre has a PR) and in stanc3 (ditto).
OpenCL optimizations
@rok_cesnovar reports these are just waiting on the varmint work to land in the math lib. It then needs a guide on how to add a simple signature.
Varmat
This is a huge efficiency gain from representing matrices as a matrix of values and a matrix of adjoints. It’s largely taking place in the math lib, but the language needs to figure out where it’s safe to use a varmat. @stevebronder has a work-in-progress PR for Stanc3 on this. He says it’s taking a very conservative, safety-first approach. This is running into the precompiled headers (PCH) issues during testing. @rok_cesnovar says all the files are tested, but it’s just Stan without CmdStan running end to end.
General comments
@avehtari suggested we should be more organized around reporting progress so users know which language features are coming. I really wish we had features coming out fast enough this was more of a problem! The issue came up of where to do that: (a) stanc3 wiki, (b) readme.md for stanc3, or (c) GitHub projects.
Documentation issue arising from RStan and CmdStan being at different versions. We need a way for users to easily access doc for the version they’re using and going forward, each new feature should be listed with the version it was introduced so everyone could read the most recent doc. This probably won’t be too much work to maintain, but it’d be a huge amount of work to do the first time.
@WardBrian brought up deprecation schedule and we had a long discussion around how it’ll make maintenance easier, how we can convert old code with the pretty printer, and how we should have a concrete schedule. Since the meeting, he’s turned this into a design doc that’s ready for comments.
@rybern pointed out that the main issue with overloading and supporting variadic functions is technical debt in the type checker, which handles user-defined and system functions differently. @WardBrian has been looking into that. The solution will probably involve more type variables and less explicit instantiation.
What is the syntax for structs going to look like? Perhaps this discussion is premature until we have tuples implemented. The implementation should just follow tuples. We probably don’t want ways to easily partially instantiate structs, though that discussion is ongoing.
How do we plug in external functions? @rok_cesnovar has a Stanc3 issue (#712) for this.
We generally preferred _qf
to _icdf
for inverse cdfs (aka quantile functions).