Hot take: optics are better abstraction than lenses, in *all* use cases. Why? They make explicit all the things you're implicitly thinking about anyway when using lenses. I think they are really important in shaping how we think about bidirectional maps. A short thread. 👇 1/9

Optics make explicit 1) the internal state (residual) and 2) the fact that you need to have the base category either be Cartesian, or at the very least have the "get" maps be comonoid homomorphisms. Let's look at the state/residual.
2/9
In lenses, this state is always the same as the input and is implicit. This can be seen by repackaging the get map from get: X → Y to Δₓ;(get×X):X e→ Y×X. Now our new get map (in addition to computing the output) passes through the input. This is good for a few reasons. 3/9
First, this pleasantly symmetric with the put:X×Y'→X'. But also, this new map is now exactly the "left" map of an optic too. (It turns out put was all along the "right" map). This tells us that the passed-through input is actually the state we're remembering. 4/9
But most importantly, this formulation is now explicit in the use of the copy map Δₓ:X → X×X, which you might have not realized is needed if you were just thinking about the standard get-put formulation. Furthermore, when you were composing lenses, ... 5/9
the formulation of the composite of the put maps was always much more complex than get maps. But now it's obvious why you needed to do that: you were juggling the internal state/residual around, because it had to agree with the input. 6/9
But you don't need to do that with optics (and that's the whole idea): you can *choose* the internal state you want.
With lenses you're using a specific state anyway, but you aren't given the conceptual tools to talk about it.
But let's stop here and see what we've done. 7/9
Observe that we didn't really "add" any complexity so far. All we've done is distilled what was already there and gave it a name. That's the whole idea behind of a lot of category theory. 8/9
Now, we still have to pack up this new construction and be precise in its definition. That's exactly what the coend in the optic definition does. It might even look scary, but it turns out the coend is saying some incredibly natural things. But that's for some other time. 9/9
References:
Optics: https://t.co/nWBhDR0Hut
Generalized Lens Categories: https://t.co/C0gB06B9DE
Also, this perspective was first shared with me here: https://t.co/ThvRcV2j3t
Also, I should add a caveat that I'm not necessarily talking about *mixed* optics. These seem like a complex beast that I don't yet understand fully.

More from Health

1/
Remember woman who tuk multiple @SriSriTattva products 4 range of problems frm diabetes 2 gas 2 liver disease & developed liver failure, listed for liver transplant?
Here is original thread:
https://t.co/PXxI1Slyv2
23 samples, Analysis results
#MedTwitter #livertwitter


2/
Before I go into results, I must say this was overwhelming. There was SO MUCH the lab identified, impossible to put everything here. So I made a summary. At the end of this thread, I have linked a full analysis described in Excel format. Some results were VERY concerning

3/
How did we analyse?
Here R links 2 methods
They R high end, done under strict protocols
Frm Ministry of Forest, Environment, Climate / NABL approvd Lab
ICP-OES https://t.co/O1CLhqVQAu
GC MSMS https://t.co/zRJoXyWQIr
FTIR https://t.co/goAembQ08p
Here is list V analysed 👇


4/
Sample names written on top (each column).
First 5 samples: C what we identified in #Ayurveda #medicines
Antibiotics
Steroids (anabolic/synthetic)
#NARCOTICS - LSD, Morphine
Blood thinners (possible reason Y bleeding tests were off the roof in the patient)
Heavy metals!


5/
Next 5 samples (total 10 now)
Mercury is clear winner. Almost all samples
See controlled substances - Butyrolactones https://t.co/CPz0FwPEOm, methylamine https://t.co/OZnXY7U9UQ
Alcohols, industrial solvents
Rare metals - cobalt, lithium
Again lots of blood thinners
#Ayush

You May Also Like

"I really want to break into Product Management"

make products.

"If only someone would tell me how I can get a startup to notice me."

Make Products.

"I guess it's impossible and I'll never break into the industry."

MAKE PRODUCTS.

Courtesy of @edbrisson's wonderful thread on breaking into comics –
https://t.co/TgNblNSCBj – here is why the same applies to Product Management, too.


There is no better way of learning the craft of product, or proving your potential to employers, than just doing it.

You do not need anybody's permission. We don't have diplomas, nor doctorates. We can barely agree on a single standard of what a Product Manager is supposed to do.

But – there is at least one blindingly obvious industry consensus – a Product Manager makes Products.

And they don't need to be kept at the exact right temperature, given endless resource, or carefully protected in order to do this.

They find their own way.
Recently, the @CNIL issued a decision regarding the GDPR compliance of an unknown French adtech company named "Vectaury". It may seem like small fry, but the decision has potential wide-ranging impacts for Google, the IAB framework, and today's adtech. It's thread time! 👇

It's all in French, but if you're up for it you can read:
• Their blog post (lacks the most interesting details):
https://t.co/PHkDcOT1hy
• Their high-level legal decision: https://t.co/hwpiEvjodt
• The full notification: https://t.co/QQB7rfynha

I've read it so you needn't!

Vectaury was collecting geolocation data in order to create profiles (eg. people who often go to this or that type of shop) so as to power ad targeting. They operate through embedded SDKs and ad bidding, making them invisible to users.

The @CNIL notes that profiling based off of geolocation presents particular risks since it reveals people's movements and habits. As risky, the processing requires consent — this will be the heart of their assessment.

Interesting point: they justify the decision in part because of how many people COULD be targeted in this way (rather than how many have — though they note that too). Because it's on a phone, and many have phones, it is considered large-scale processing no matter what.