HN user

wizerno

237 karma
Posts14
Comments34
View on HN

Does anyone else miss the functionality of the Android WhatsApp widget [1] on iOS? Being able to read messages without sending read receipts via the widget is a great feature. The iOS notification 'peek' is a clumsy substitute.

Is this a fundamental limitation of iOS widgets/APIs, or just something WhatsApp hasn't implemented? Curious if others have found better ways to handle this on iPhone.

[1] https://www.tomsguide.com/how-to/how-to-use-the-WhatsApp-wid...

Gregglogger 2 years ago

It looks like you're correct -- Gregglogger relies on pynput, and its behavior on macOS aligns with the library's documented limitations [1]:

Recent versions of macOS restrict monitoring of the keyboard for security reasons. For that reason, one of the following must be true:

- The process must run as root.

- Your application must be whitelisted under "Enable access for assistive devices." Note that this might require packaging your application, since otherwise the entire Python installation must be whitelisted.

- On macOS versions after Mojave, you may also need to whitelist your terminal application if running your script from a terminal.

[1] https://pynput.readthedocs.io/en/stable/limitations.html#mac...

I wonder if they'll index more repositories over time. As it stands, there's no clear way to tell what's indexed versus what's not. A transparent way to see the scope of coverage would be incredibly helpful for users.

As someone who's fascinated by formal verification and who's early in their career, what advice do senior folks who have been using TLA+ have?

TLA+ isn't taught in most universities and while I've read about so many interesting applications, I'm yet to convince myself that someone would hire me for knowing it rather than just teaching it to me on the job. Any tips to get started would also be appreciated!

If you're referring to the StackOverflow example from the article, it's different because they follow `/questions/:id/:slug`. Keeping slug at the end makes it a lot easier to delete while keeping it readable.

An example of a not-so-great URL design: Amazon product links have an optional slug before everything else like `{slug}/dp/{id}`. So you end up copying a gigantic URL everytime you wish to share a product unless you use the share product button to get the shortened link.

This is so important and underrated in life.

"This is what I infer when I see someone who is comfortable in their unique strangeness, too. There probably exists someone who enabled that evolution of personality. A parent, a friend group, a spouse. It is rare for people to come into themselves if no one is excited and curious about their core, their potential. We need someone who gives us space to unfold."

Barring a bunch of tables, I don't see how this is helpful. There's no mention of how key metrics were calculated either.

I suspect everything after "This comprehensive analysis offers insights..." is written with the help of an LLM too.

TLDR; Garbage Collection.

In an SSD, a write operation can only be done when the page is already erased. However, the unit of read/write operations are a page, while the unit of erase operation is a block. That means for a disk write, a naive implementation needs to read the whole block, erase the block, then write updated data back to the block, which is unacceptable. Furthermore, blocks should wear out uniformly, otherwise, the SSD would lose capacity.

To tackle these problems, SSD introduces Flash Translation Layer (FTL) which helps to build an illusion of random access device. To achieve this, FTL employs an approach very similar to LSM trees. Writes are always written to new, already erased pages, while in the background, garbage collects (GC) outdated data. FTL needs to keep a map from the user’s logical address to physical address on SSD, both in-memory and persistently.

So to answer your question, why are sequential writes are faster than random writes on SSDs? Because the address map table is smaller since new data is consecutive in larger chunks. Garbage Collection is simpler and only metadata needs to be updated. Erasing a block is required anyway.