HNHacker News
TopNewBestAskShowJobs

patrakov

1,586 karma · joined December 21, 2020

submissionscomments
patrakov··on Show HN: WhatToBuy – Describe your situation, get AI-curated shopping carts
"Cebu, Philippines" would be a good-enough approximation.
patrakov··on Show HN: WhatToBuy – Describe your situation, get AI-curated shopping carts
You need to filter out unavailable and obsolete products.

My prompt (in Fast mode, as a guest):

""" I need to take a trip to Turkey for a week. I would like to take a camera with me, but my Nikon Coolpix P1100 is too heavy for that (1.5 kg). I do need some zoom, let's say up to 250 mm but the exact maximum focal length is negotiable. """

The model seemingly failed to realize that the request is about a high-zoom compact camera. Only one of three different suggestions featured a compact camera, "Canon - PowerShot ELPH 360 HS - A Full HD Video 20.2-Megapixel Digital Camera - Black", on BestBuy (https://www.bestbuy.com/product/p/J7C86SHZLX), and it's unavailable there. So, zero success, but the 10-year-old camera suggested does fit the bill if still available from elsewhere.

patrakov··on My minute-by-minute response to the LiteLLM malware attack
Not speaking on behalf of PSF, but to me, it looks like a no-go, as some packages are maintained, legitimately, by people from sanctioned countries, with no way to pay any amount outside their country.
patrakov··on Debunking Zswap and Zram Myths
> Is there an experiment you'd recommend to reliably show this behavior on such a SSD?

  fio --name 4k-write --rw=write --bs=4k --size=1G --filename=fio.file --ioengine=libaio --sync=1 --time_based --runtime=60 --write_iops_log=ssd --log_avg_msec=1000 --randrepeat=0 --refill_buffers=1
Then examine ssd_iops.1.log.

Results from Apacer AS350 1TB: https://pastebin.com/F6pr5g29 - the first field is the timestamp in milliseconds, the second one is the write IOs completed since the previous line.

EDIT: I was told that the test above is invalid and that I should add --direct=1. OK, here is the new log, showing the same: https://pastebin.com/Wyw6r9TC - note that some timestamps are completely missing, indicating that the SSD performed zero IOs in that second.

You may want to repeat the experiment a few times.

patrakov··on I quit editing photos
Here is my take, as a person who attended multiple photo editing courses from professional award-winning photographers:

* Shooting intentionally for further processing is not the same as shooting for the best out-of-camera look.

* One needs to critique a photo before editing it. This YouTube video comes with a good-enough checklist: https://www.youtube.com/watch?v=C0tQB6BVpc4

* ART (https://artraweditor.github.io/) at this point, if the AI masking and denoising one-time setup has been done (see https://artraweditor.github.io/AItools), is so good that many Lightroom courses apply almost 1:1 to it.

patrakov··on Debunking Zswap and Zram Myths
1. Thanks for partially (in paragraph 4 but not paragraph 5) preempting the obvious objection. Distinguishing between disk reads and writes is very important for consumer SSDs, and you quoted exactly the right metric in paragraph 4: reduction of writes, almost regardless of the total I/O. Reads without writes are tolerable. Writes stall everything badly.

2. The comparison in paragraph 4 is between no-swap and zswap, and the results are plausible. But the relevant comparison here is a three-way one, between no-swap, zram, and zswap.

3. It's important to tune earlyoom "properly" when using zram as the only swap. Setting the "-m" argument too low causes earlyoom to miss obvious overloads that thrash the disk through page cache and memory-mapped files. On the other hand, with earlyoom, I could not find the right balance between unexpected OOM kills and missing the brownouts, simply because, with earlyoomd, the usage levels of RAM and zram-based swap are the only signals available for a decision. Perhaps systemd-oomd will fare better. The article does mention the need for tuning the userspace OOM killer to an uncomfortable degree.

I have already tried zswap with a swap file on a bad SSD, but, admittedly, not together with earlyoomd. With an SSD that cannot support even 10 MB/s of synchronous writes, it browns out, while zram + earlyoomd can be tuned not to brown out (at the expense of OOM kills on a subjectively perfectly well performing system). I will try backing-store-less zswap when it's ready.

And I agree that, on an enterprise SSD like Micron 7450 PRO, zswap is the way to go - and I doubt that Meta uses consumer SSDs.

patrakov··on Debunking Zswap and Zram Myths
User here, who also acts as a Level 2 support for storage.

The article contains some solid logic plus an assumption that I disagree with.

Solid logic: you should prefer zswap if you have a device that can be used for swap.

Solid logic: zram + other swap = bad due to LRU inversion (zram becomes a dead weight in memory).

Advice that matches my observations: zram works best when paired with a user-space OOM killer.

Bold assumption: everybody who has an SSD has a device that can be used for swap.

The assumption is simply false, and not due to the "SSD wear" argument. Many consumer SSDs, especially DRAMless ones (e.g., Apacer AS350 1TB, but also seen on Crucial SSDs), under synchronous writes, will regularly produce latency spikes of 10 seconds or more, due to the way they need to manage their cells. This is much worse than any HDD. If a DRAMless consumer SSD is all that you have, better use zram.

patrakov··on FCC updates covered list to include foreign-made consumer routers
Prediction: there will appear new "Made in the USA" routers that differ from some Chinese model only by the label. Already the case in Russia for e.g. powerbanks.
patrakov··on Systemd's New Feature Brings Age Verification Option to Linux
Misleading title. Optional birth date declaration in a newly standardized place, not age verification.
patrakov··on A most elegant TCP hole punching algorithm
Exactly. And look, the linked Python script only solves one problem: making both firewalls believe that the party behind them is the one who initiated the connection. Address/port mangling is not addressed at all, both public addresses need to be provided externally.

And it's simply not true that there is no NAT in the wild with IPv6: every OPNsense installation with two uplinks and the need for anything better than an "arbitrary and uncontrollable" choice of the correct uplink for each outbound connection needs network prefix translation, as the residential dual-homing story for IPv6 is vaporware otherwise. NPT is used not for address space conservation, but to defer the decision about the correct source address to the router that has the knowledge of the correct policy.

And in this sense, IPv6 is worse than IPv4: there are too many people assuming no firewall and no NAT for IPv6, and designing their applications based on these almost-working (but de-facto now broken) premises. The correct premises are the same as for IPv4.

patrakov··on A most elegant TCP hole punching algorithm
No, it isn't. Many middleboxes (including OpenWrt by default) drop unsolicited inbound TCP connections even on IPv6, and therefore the same hole-punching algorithm is needed. The hole being punched is in the stateful firewall's connection tracker, not in the NAT. Basically, both parties need to convince their router that it is an outgoing connection initiated by them, not a prohibited-by-policy incoming connection.
patrakov··on Don't post generated/AI-edited comments. HN is for conversation between humans
On HN, I sometimes used AI to change the tone of my comments - e.g., to add sarcasm or extra-polished corporate-speak for comical effect. OK, now I won't.
patrakov··on Show HN: What's my JND? – a colour guessing game
Another issue is that it discards the color pair if the generated coordinates fall outside 100% sRGB. The problem here is that many low-end laptop displays cover significantly less than 100% sRGB, but come with the correct primaries in the EDID, thus causing browsers to display colors correctly if they can and clip colors if they can't. Colors too close to the sRGB boundary will be clipped in your game - different colors generated, different colors when converted to sRGB, same color on the screen because it is out of the screen gamut. Maybe it makes sense to avoid colors with more than 60% saturation?
patrakov··on Show HN: What's my JND? – a colour guessing game
It's worse.

The code contains a function that, given the target ΔE, generates two colors in floating-point Oklab representation, separated by that distance. But there is no check whether the two generated colors end up rounding to exactly the same one on 8-bit displays. So, I was asked to find a boundary (while the claim was that there were two distinct colors 0.0013 ΔE apart) between RGB(80, 83, 152) and RGB(80, 83, 152). Obviously unfair.

patrakov··on LLMs work best when the user defines their acceptance criteria first
Evil voice: "I don't mind not getting credits for the story points. The story was AI-generated anyway."
patrakov··on Motorola GrapheneOS devices will be bootloader unlockable/relockable
Speaking about the Philippines here.

First, how about Philippine National Bank? Compare snapshots of their front page, https://www.pnb.com.ph/, on web.archive.org, and see that they have completely removed the link to their Internet Banking system. Only Mobile Banking remains.

See also https://web.archive.org/web/20220605084957/https://portal.pn...

Also, Metrobank threatens to make it impossible to log into their online banking website without the mobile app installed. This is already officially the case for their corporate banking, but it's just TOTP with a non-extractable (on a non-rooted phone) seed and some anti-root checks under the hood.

Finally, the following mobile wallets and "digital banks" are app-only: GCash, Maya, GoTyme Bank. The first two are the only ways to pay for water here, other than going to a kiosk where someone else would use their GCash account to process your payment.

patrakov··on Motorola GrapheneOS devices will be bootloader unlockable/relockable
We are talking about banking and pseudo-banking apps with the following typical features:

* A wallet for QR-code based payments backed by a national standard for their content and by the money in your bank account;

* A software implementation of an NFC-enabled credit or debit card, or sometimes with a magnetic strip emulation in addition to that;

* An interface to transfer money to other bank accounts in the same country or abroad, or to convert between local and foreign currency if you have a foreign currency bank account;

* A way to pay common utility bills - in some cases, by scanning the QR code on the bill;

* A way to manage banking and investment accounts - e.g., if you want an extra savings account in Japanese yen with a new debit card attached to it, tap a few times and it's there;

* A chat with bank representatives - for example, to provide supporting documents by photographing them, without ever visiting the bank;

* A second factor (as in 2FA) to approve money transfers initiated from the desktop web browser, meeting the bank standards where TOTP can't meet them (e.g., due to the legal requirement to say what transaction the code is for).

The real problem is that many banks are deprecating their browser-based interfaces and are turning app-only.

patrakov··on You Want to Visit the UK? You Better Have a Google Play or App Store Account
The most important part was left out: was the application successful in the end, and how long did it take?
patrakov··on I found a vulnerability. they found a lawyer
The question is who defines security.

I, as a self-proclaimed dictator of my empire, require, in the name of national security, all chat applications developed or deployed in my empire to send copies of all chat messages to the National Archive for backup in a form encrypted to the well-known National Archive public key. I appoint Professional Software Engineers to inspect and certify apps to actually do that. Distribution of non-certified applications to the public or other forms of their deployment is prohibited and is punishable by jail time, as well as issuing a false certification.

Sounds familiar?

The difference from civil engineering is that governments do not (yet?) require a remotely triggerable bomb to be planted under every bridge, which would, arguably, help in a war, while they are very close to this in software. They do something similar routinely with manufacturing equipment - mandatory self-disabling upon detecting (via GPS) operation in countries under sanctions.

patrakov··on Show HN: Cancel Me – A browser game which parodies dark cancellation patterns
To unsubscribe from our mailing list, click >here<

...and the link says "For security reasons, it is prohibited to visit this website from foreign countries."

Not fit for the game, though, as everything is implemented client-side.

patrakov··on ai;dr
There is another correct way. Denote the general topic, ask it to ask you questions that would be needed to write it. Discard the final output, write something yourself based on what it asked.

Example (minus the final review): https://chatgpt.com/share/698e417a-4448-8011-9c29-12c9b91318...

I still think that the final review written by ChatGPT is a bit off. But at least, it asked mostly the right questions.

patrakov··on Show HN: RAG chunk size "best practices" failed on legal text – I benchmarked it
Now that you have 5K docs, can you try estimating the statistical uncertainty of the Recall@5 and MRR metrics measured via smaller datasets? Just make some different 400-document subsets of the whole 5K HotpotQA dataset and recalculate the metrics.
patrakov··on I scanned 2,500 Hugging Face models for malware/issues. Here is the data
The single --force flag is not a good design decision. Please break it up (EDIT: I see you already did it partially in veritensor.yaml). Right now, according to the description, it suppresses detection of both genuinely non-commercial/AGPL models and models with inconsistent licensing data. Also, I might accept AGPL but not CC-BY-NC.

Probably, it would be better to split it into --accept-model-license=AGPL --accept-inconsistent-licensing --ignore-layer-license-metadata --ignore-rce-vector=os.system and so on.

patrakov··on IPv6 is not insecure because it lacks a NAT
IPv6 without NAT is not insecure; I can and do have a stateful firewall that denies unwanted inbound connections. But it does not matter if my auditors think otherwise and the whole Internet tells me that arguing with them will end my career.
patrakov··on The Vietnam government has banned rooted phones from using any banking app
Your words can be reasonably interpreted as "that phone must be an iPhone"; did you actually mean this?
patrakov··on Ask HN: Have you been falsely accused of AI-generated content?
I got a YouTube video in my recommendations where a professional photographer mentions exactly this problem: https://www.youtube.com/watch?v=V7v6SM8fHGQ

It is AI witch hunt now, it was Photoshop witch hunt before. Nothing new.

patrakov··on Nokia N900 Necromancy
No, it belonged to an alternative universe - and, arguably, a better one.
patrakov··on UK House of Lords attempting to ban use of VPNs by anyone under 16
I guess we will see a jump in the number of foreign eSIMs sold to UK minors.
patrakov··on Reddit Partially Down
On downdetector.com, an AWS outage has approximately the same start time. Related?
patrakov··on Free software scares normal people
In this case, the product owner had a wrong idea of what's minimum viable, and his idea was faithfully implemented, plus a warning in the app to call me in specific incompatible cases.

Later the missing pieces were added, we had "two buttons" and the resulting user confusion because they did not know and could not be taught whether a container makes sense for a particular lab.

← PreviousPage 2 of 22Next →