| Website | https://flaviusb.net |
| Pronouns | He/Him |
| Website | https://flaviusb.net |
| Pronouns | He/Him |
Even accepting the premise that AI produces useful writing (which no one should), using AI in education is like using a forklift at the gym. The weights do not actually need to be moved from place to place. That is not the work. The work is what happens within you.
Optics are bidirectional data accessors that capture data transformation patterns such as accessing subfields or iterating over containers. Profunctor optics are a particular choice of representation supporting modularity, meaning that we can construct accessors for complex structures by combining simpler ones. Profunctor optics have previously been studied only in an unenriched and non-mixed setting, in which both directions of access are modelled in the same category. However, functional programming languages are arguably better described by enriched categories; and we have found that some structures in the literature are actually mixed optics, with access directions modelled in different categories. Our work generalizes a classic result by Pastro and Street on Tambara theory and uses it to describe mixed V-enriched profunctor optics and to endow them with V-category structure. We provide some original families of optics and derivations, including an elementary one for traversals. Finally, we discuss a Haskell implementation.
Current status:
trait Fetch<const N: usize, const WORDSIZE: usize> {
fn fetch(&mut self, ip: usize) -> [u8; {N * WORDSIZE / std::mem::size_of::<u8>()}];
}
pub struct Mem<const M: usize> {
mem: [u8; M],
}
macro_rules! mkFetch {
($N:literal, $WORDSIZE:literal) => {
impl<const M: usize> Fetch<$N, $WORDSIZE> for Mem<M> {
fn fetch(&mut self, ip: usize) -> [u8; {$N * $WORDSIZE / std::mem::size_of::<u8>()}] {