News for hackers. Stuff that matters.

cscmsg

Re:Show HN: Lex Cloak, detect and redact PII in PDFs, runs locally on Wednesday November 18, 2026 @11:24AM (#50548247)
A colleague asked me to redact some sensitive documents before sending them to AI for analysis. I considered Adobe and other tools, but none could detect personal data (PII) automatically without sending it to a large AI model. The documents also had low-quality scanned pages, bar codes, signatures, rotated and skewed pages. I set out to solve each of those challenges in a user-friendly way. The result was Lex Cloak, an application that continues to evolve.

Lex Cloak is a desktop app for Windows and Macs. We run OCR (Tesseract) on every page to read the text. We found the embedded document text layer was often inaccurate and unreliable. The application then finds categories of PII based on pattern rules and a small machine learning model (BERT) trained on names. It runs ONNX Runtime locally, no LLM. Other model enhancements detect barcodes and signatures.

The user reviews the matches and either removes false positives or adds further redactions. Each match has a confidence score. Lex Cloak also handles other "gotchas", such as hidden text (white-on-white), text under a previous black-box redaction, and document metadata.

Local processing means you can work entirely offline. The only network call is an occasional license check and software update version check. Lex Cloak was designed to run on average laptops and handle PDF documents hundreds of pages long.

Scanning is free, and so are the first three documents. No account, password or payment necessary. After that it's $35 per month.

Re:Why Bother with Lint Rules If AI Writes the Code? on Sunday September 20, 2026 @10:14PM (#49782296)
A lint rule is only enforceable if the agent can't edit the rule. Prompt files are guidance because the model can ignore them. A config file is just another file in the repo and an agent can find ways to bypass that. I've seen my agent code around it or quietly loosen the config instead of fixing the code.

My solution was putting the hook and lint configuration where the agent can't write to it. That was more effort to set up, but it seems to work.

Re:Show HN: Why is a fly so hard to swat? on Wednesday September 16, 2026 @11:45AM (#49728816)
I was at my desk when a large and very loud fly started circling my head and tapping the screen. I swatted it but missed every time, so I casually asked my AI assistant why. That kicked off an interesting thread.

I was surprised to learn that a fly does not curve. It flies a straight run, turns 90 degrees in 0.05s, then flies straight again (Wagner 1986 for houseflies; Tammero and Dickinson 2002 for fruit flies).

I also learned that each straight section has random duration (obstacles excepted). The pattern is exponential, which makes it very hard to predict. Watching it for longer really doesn't help.

Human reaction time is 0.15s at the fast end, so even if you guess correctly, it may still be gone. However, you still have a chance, which is why we keep coming back, in the game and in real life.

The resting fly research is Card and Dickinson (2008). It shifts position to jump away from the swatter and is off the wall in 0.2s, before your arm has moved. So standard advice is to aim a little ahead of where it faces.

The parameters are printed on the page. Depth is not modeled and the page says so.

20 swats, then you see your percentage score. I'm getting better, but still top out at about 25%.

It's plain JavaScript with no framework and no dependencies. Tests are node --test with nothing to install. No cookies... because they attract flies :)