Sign in

P-Y

@p-y.wtf
1.7K followers 405 following 981 posts

p-y.wtf | Android Eng @Square | instagram.com/py.ricau | LeakCanary, Radiography, square/logcat, square/PAPA. He/Him

PostsRepliesMedia
P-Y @p-y.wtf · 02/10/2026
It's 2026 and Android Studio stills loads projects with the "Android" view that hides your actual project structure and doesn't display the location of the files you open. Still treating Android devs like babies who shouldn't see a file that the Android team didn't think was important
2233
Reposted by P-Y
Karl Bode @karlbode.com · 29/09/2026
Meta's "Muse" launched with a nasty zero day flaw that gave hackers the ability to spy on Mac users, openly gives root access to people pretending to be Muse agents, and invited strangers over to another guy's house without telling him
karlbode.com
Meta's Latest AI Product Is A Terrifying And Hilarious Mess
Authoritarian-friendly mass surveillance has never been more adorable
512068822
P-Y @p-y.wtf · 30/09/2026
Don't sell yourself short, it rounds up to 34% 😉 Nicely done!
020
P-Y @p-y.wtf · 30/09/2026
Do you think you could have a word with the entirety of French white collar leadership?
031
Reposted by P-Y
Antoine Sabot-Durand @antoine.sabot-durand.net · 25/09/2026
The shortest explanation I saw for #Jev vs #LLM
054
P-Y @p-y.wtf · 23/09/2026
Is there something memetic leading to wanting to do fancy rice krispies? Yesterday I asked gemini for exactly that! It suggested rice krispies demi spheres with caramel hearts inside, covered with a chocolate glaze.
001
P-Y @p-y.wtf · 22/09/2026
Yep! IIRC a jack has a power diff between mic & ground, enough to charge capacitors. The reader reads the magnetic stripe, encrypts it with a unique key, then sends that to phone as audio input as a target frequency.. slowing down as the capacitors lose charge
110
P-Y @p-y.wtf · 20/09/2026
Ever seen the inside of a Square credit card magstripe reader?
140
P-Y @p-y.wtf · 15/09/2026
Abject what now?!
011
P-Y @p-y.wtf · 14/09/2026
Watching Mando & Grogu, and I'm sorry but Grogu's animation is shit. I get that it's intentional, but the result just doesn't feel great to me
000
P-Y @p-y.wtf · 14/09/2026
One interesting idea there as well is how this could be used for LLM based support to help you make changes in an app, without having to rebuild a whole first class dedicated MCP (plus maybe it's cool seeing the tool show you how it's doing things)
000
Reposted by P-Y
Jason K Pargin, author @jasonkpargin.bsky.social · 02/09/2026
If you can just turn your addictions into a paying job you will never rest a day in your life
218911
P-Y @p-y.wtf · 31/08/2026
One obvious piece missing with the ring is closing the loop, i.e. an agent answering / asking a clarification. Playing audio on phone / headphones is an obvious one. But just for the fun of it I want to buy this and have the agent send text to it www.vestaboard.com/note
vestaboard.com
Vestaboard Note — The Small Playful Messaging Display | From $999
45 characters across beautifully spinning flaps. Sits on a shelf, desk, or wall. WiFi-connected, controlled from your phone. The perfect gift. From $999.
000
P-Y @p-y.wtf · 31/08/2026
At this point it's a really fucking magical experience to be biking back home and just saying "open up the gate" a bit ahead without stopping or having to pick up the phone while riding
110
P-Y @p-y.wtf · 31/08/2026
That release is amazing! First, the UI breaking down what happens on clicks is a lot clearer. + I love that webhook only => latency 📉 Getting good results with gemini-3.7-flash, especially with the past N turns as input to the voice transcription context.
100
P-Y @p-y.wtf · 27/08/2026
smallest* Though I don't particularly care about the shape of this, I just want to have a webhook that fires as soon as the audio is available, and to throw that into my own transcribe + agent loop
000
P-Y @p-y.wtf · 27/08/2026
For those who want to own the whole pipeline, any chance we can get the webhook to fire ASAP instead of waiting for transcribe + agent loop? Smaller change that'd help for me would be this: github.com/coredevices/...
github.com
Index webhook: send Recording-only payloads without waiting for transcription by pyricau · Pull Request #382 · coredevices/mobileapp
PR description written manually, targeting human consumption. Code changes driven by Claude, I reviewed the change which seemed small enough and looked correct. Today, the Index 01 webhook is calle...
200
P-Y @p-y.wtf · 27/08/2026
Asking Claude to find a with minimal gradient route..
000
P-Y @p-y.wtf · 24/08/2026
Early still, but at the top here is the outcome written by an agent investigating a leak, following a method enforced via MCP. The same process holds the UI and the MCP, which means the agent can show its investigation in context and you can poke around.
190
P-Y @p-y.wtf · 22/08/2026
Btw, on the "halts the jvm for a few seconds" note: one (hacky) Android trick to avoid that has been forking the process, and dumping from the forked process (which has a - mostly shared - copy of the memory). I don't know if that's feasible on a jvm though. Also assumes fork is faster than dump.
110
P-Y @p-y.wtf · 20/08/2026
Here's what the UI looks like in the desktop tool
010
P-Y @p-y.wtf · 20/08/2026
Digging some more on the hprof stripping, Claude found the main cause for small allocations (repeated unboxing of long object ids) and fixed it: github.com/square/leakc... On the same 1.4 GB dump, hprof-redact allocates 2,347 MB, Shark was doing 437 Mb and now.. only 5.8 Mb.
github.com
Look a wrapper class up without boxing its class id by pyricau · Pull Request #2960 · square/leakcanary
While benchmarking HprofPrimitiveArrayStripper against hprof-redact I noticed the bytes it allocates grow with the heap dump, and traced it to one boxed Long per record. What it was Whether an inst...
000
P-Y @p-y.wtf · 20/08/2026
I had not! That's definitely cool & super interesting. I like the browser support via rust => web assembly! Did you document some of the architecture decisions to keep memory pressure low?
100
P-Y @p-y.wtf · 20/08/2026
Thanks Ingo for suggesting "stuck", I really like how it conveys "we expected this to be GCed but it's stuck in the heap due to a faulty reference"
110
P-Y @p-y.wtf · 20/08/2026
The next release of LeakCanary will update its vocabulary. Instead of "Leaking: Yes / No", object status will be reported with "Verdict: Stuck / Expected". This aims to help folks (& agents) grasp that a leak is a faulty reference, rather than any given object
180
P-Y @p-y.wtf · 20/08/2026
Next step for me is work on the ability to define allow lists based on "owner patterns", e.g. "strings referenced by MyDao.queryTemplate should not be cleared" I think I can do that with minimal memory footprint (i.e. not having to build the heap graph) with 3 linear scans of the dump
100
P-Y @p-y.wtf · 20/08/2026
Thanks for the link, it was great to compare the impl and bring fixes & improvements back into LeakCanary/Shark github.com/square/leakc...
github.com
Strip heap dumps that Android wrote, arrays too big for an Int, and gzipped ones by pyricau · Pull Request #2959 · square/leakcanary
Five things found while comparing HprofPrimitiveArrayStripper against hprof-redact, one commit each. Wrapped primitives were left alone on Android Stripping is meant to zero the value every primiti...
100
P-Y @p-y.wtf · 20/08/2026
I ran benchmarks comparing shark's stripping vs hprof-redact, in those benchmarks LeakCanary/Shark is 3x to 4x faster, with significantly less GC churn. That's assuming you trust Claude with running JVM benchmarks :)
100
P-Y @p-y.wtf · 20/08/2026
- The transformer utility is nice, but same as above, "transformUtf8String()" is only for symbols. Use "transformByteArray()" for PII etc. - support for gzip in & gzip out, that's nice!
100
P-Y @p-y.wtf · 20/08/2026
Nice! I asked Claude to compare the impls & runtime behaviors, to see if there was anything I could copy. Feedback on hprof-redact (cc @mostlynerdless.de ) - "zero-strings" and "drop-strings" only clears up symbol strings, not any java.lang.String backing arrays (the "zero" option does that well)
100
P-Y @p-y.wtf · 19/08/2026
Haha that one was triggering for me, because I could never remember its meaning and then I'd realize and get angry because "a11y" is anything but accessible
020
P-Y @p-y.wtf · 19/08/2026
It's one of the better ones, as it's actually leet readable. Also it paved the way for Mobile o11y aka mo11y and that one sure is fun.
120
P-Y @p-y.wtf · 19/08/2026
Me: "Ajoute du sel et du lait sur la liste de course" Index01: "sur la petite croute" Trying again: "sur les secours" This voice recognition thing isn't quite there yet
020
P-Y @p-y.wtf · 16/08/2026
"This additional privacy is most effective on sites hosted by big CDNs because the IP address doesn’t imply a particular website." Thanks for those details! I had read about ECH in passing and was wondering how much that helped given IP addresses are still visible. Big CDNs is a great answer
120
P-Y @p-y.wtf · 15/08/2026
Also, while it should work on jvm heap dumps, and IIRC I tested a few examples, I never did run this on a real large jvm heap dump, only Android.
000
P-Y @p-y.wtf · 15/08/2026
It's a little too good at removing things, clearing byte arrays means no strings at all except symbols, so e.g. thread names or container names are gone. I've been wondering if I could find a middle ground and allow-list some strings, but it's tricky without a graph traversal
110
P-Y @p-y.wtf · 15/08/2026
This code is a little funky because it tries to do all this by streaming the file, without actually loading the heap dump contents, for speed & minimal memory usage, we use it in prod.
100
P-Y @p-y.wtf · 15/08/2026
It's part of the shark-hprof artifact, it's also an available function in shark-cli which is in homebrew. You could use that, but I assume you already have your own hprof parser, so you could just rip off the code (it's Apache 2): github.com/square/leakc...
github.com
leakcanary/shark/shark-hprof/src/main/java/shark/HprofPrimitiveArrayStripper.kt at main · square/leakcanary
A memory leak detection library for Android. Contribute to square/leakcanary development by creating an account on GitHub.
210
P-Y @p-y.wtf · 14/08/2026
Out of curiosity, how do you handle the fact that heap dumps can contain secrets and PII? A little while ago I built a hprof stripper that zeroes out all primitive arrays. Curious if there are other approaches.
110
Reposted by P-Y
Nicolas Roard @camaelon.bsky.social · 12/08/2026
The clouds lifted up at the right time -- always an amazing sight
192
P-Y @p-y.wtf · 12/08/2026
I need to think of an opposite, objects that are correctly retained. In a path from gc roots to a stuck instance, the faulty reference marks the transition from a top subpath of "active" (?) objects to a bottom subpath of stuck objects
100
P-Y @p-y.wtf · 12/08/2026
Yeah zombie came up and makes sense but it takes a few hops to understand the meaning. I love "stuck" though, thanks! Clear & simple.
120
P-Y @p-y.wtf · 12/08/2026
None of the other Java heap tools have this concept. JProfiler (cc @ingokegel.bsky.social) apparently mentions "faulty references" in its dominator tree guidance (I like "faulty"!) I kinda like "Garbage" for this but might be confusing because Garbage normally gets collected. "Obsolete"?
310
P-Y @p-y.wtf · 12/08/2026
"Leaking" canditades: Dead / Garbage / Expired / Defunct / Obsolete / Stale / Abandonned "Not leaking" candidates: Active / Live / Fresh / In use / Needed
200
P-Y @p-y.wtf · 12/08/2026
The "leak" is typically a single bad reference that should have been cleared, which leads to a whole group of objects being retained. I don't like "Leaking" as an object status, as it steers attention towards the leaking objects, whereas I'd rather have people look for the bad reference
100
P-Y @p-y.wtf · 12/08/2026
LeakCanary has framework specific knowledge and can report objects as "leaking" / "not leaking" / "unknown" based on state (e.g. an activity having a "destroyed" boolean field). "Leaking" means "should be been GCed but is retained". I'm looking into alternative words to carry this meaning #help
121
P-Y @p-y.wtf · 12/08/2026
I can buy that. And I can definitely apply taste and steer towards improvements, but ideally I'd come up with guidelines that yield better defaults. Have you found ways to steer towards better UX?
000
P-Y @p-y.wtf · 11/08/2026
Who's been training the LLMs to use acronyms everywhere? It was hard enough when my peers did it, but now the agents just straight up invent their own and drop them everywhere without ever showing you the association
130
P-Y @p-y.wtf · 11/08/2026
010
P-Y @p-y.wtf · 11/08/2026
I think Claude is a little mad at me: > I left "stochastic parrot" alone — you've picked it twice and it's your call; I've said what I think. (can't help but remind me of @mekka.mekka-tech.com 's frequent "I've said what I said")
100