HNHacker News
TopNewBestAskShowJobs

lstamour

4,318 karma · joined April 27, 2013

submissionscomments
lstamour··on iPhone 16 Pro and iPhone 16 Pro Max
“Even” or “odd” number isn’t as applicable as it sounds, though I do remember if you were an “s” year or not. It was iPhone 3G, 3G S, 4, 4S, 5, 5S, 6, 6S, 7, 8/X, XS, 11, and standard annual numbering from the 11 on. In early days you’d ask if you were an “S” year or not. Only since the 11 could you ask whether you were “even” or “odd” without it meaning upgrades every 4 years.

What’s changed is that Apple increments the model number every year instead of every two years, and you can probably blame Samsung for that a bit. Your friends probably still upgrade every 4 years like we almost always used to. I remember getting the 3G for the network improvement, the 3G S for the speed bump and video recording, the 4 for Siri, the 4S for a speed bump, … back then it was often the case that the non-S model was a new design with last year’s chip, and the S model was a speed bump with last year’s design.

If anything’s changed, it’s that they often spec bump the processor every year in minor ways, instead of every 2 years, and the increases are steadily more incremental than they used to be. If you ask me, it’s because Apple doesn’t have competition in the mobile phone CPU space yet. (Or ever, while Qualcomm holds so many patents…)

Also it’s more clear than ever before that the iPhone X, Max, Pro series are all ways to ask for more money for the exact same chip/product. Some years the Pro is significantly faster because it gets the new CPU first, but by the next year both Pro and non-Pro end up getting the same CPU for cost reasons. It’s telling that most years Apple doesn’t claim a speed increase between the Pro and non-Pro models. For example, if I recall correctly the only difference for the iPhone 13 was actually software. Likewise in this generation (16) it feels like the only difference between Pro and non-Pro is the SoC binning and the binning of the quality of the OLED in minor ways.

lstamour··on Serverless-registry: A Docker registry backed by Workers and R2
I should preface this by saying that I figure you know all this, but I'm laying it out anyway. :)

Theoretically (I haven't read the parent article yet) it's just GET and HEAD requests for a Docker Registry[1], so if CloudFlare or another CDN supports large binary files, you could cache the images from the low cost box.

That said, obviously I'm suggesting adding "cloud" CDN infrastructure to your tiny ARM box. In a more normal scenario, most would probably pick a free Docker Registry and just upload a mirror of the images to multiple registries to spread out the bandwidth load. E.g. Docker Hub, GitHub, etc.

For a better solution, don't serve 10GB container images. Instead, start from someone else's 10GB container image and add the layers you need on top of it. Or consider a solution where you don't need to ship 10GB of data in your application, but could perhaps side-load only the necessary data.

Another workaround: because Docker images can be pushed and pulled with identical signatures, it's also possible to encourage your end users to keep their own Docker registry of the image and refer to it from an internal or private copy of the image. This is a best practice for pretty much every kind of production deployment of a Docker container, so you don't have 100s of boxes pulling from your shared infrastructure, and leads to more reliable Docker deployments. An example is, in fact, pulling an image - because it stores a copy locally that you can refer to and run multiple containers at the same time from one local image. Pretty much every container image deployment I refer to in production, I prefer to use a privately mirrored copy instead of pulling from a source repository directly. Maybe it's just me? :)

[1]: https://ochagavia.nl/blog/using-s3-as-a-container-registry/

lstamour··on Will Figma become an awkward middle ground?
Well, I'm not sure of other syntaxes to make it simpler, but you could use a CSS variable to make it a little easier: https://developer.mozilla.org/en-US/docs/Web/CSS/var Especially if you re-use the same padding values for multiple parts of the page/site. Then you won't have to update values in 3 different places for each padding/font-size/whatever rule. Instead just set the variable for each @media width and then in your later rules, use the single variable to refer to the correct value for all breakpoints.

Also, some units cascade. So if you set the top-level or parent to a particular size, then child elements inside can inherit (or ignore) the unit. This means at a top level you can set your font-size for each @media width, and then use relative units and it will inherit down. But that only works for very small websites, because it introduces subtle bugs as you incorporate more controls from people not aware of your particular practice.

lstamour··on Will Figma become an awkward middle ground?
If you want responsive page elements that change styling as you reflow the page, we have that now - container queries - https://developer.chrome.com/blog/css-ui-ecommerce-cq but it's still somewhat new, and nobody's existing design systems support them yet. People (myself included sometimes) still prefer using JavaScript for this stuff. It'll change over time, though. (Also I've been wishing for this for almost two decades now, so I'm glad to see it arrive!)

Edit: Though even simpler than that is the width media query, which I think you might be looking for: https://developer.mozilla.org/en-US/docs/Web/CSS/@media/widt...

lstamour··on Refined GitHub: GitHub a lot and notice many annoyances we'd like to fix
I would hesitate before installing any extension that wants access to GitHub, especially if it auto-updates. I know, IDE extensions are even better methods of attack and we often don't think twice about auto-updating those, but still. Something about giving a third-party extension access to my GitHub to do whatever seems a bit fishy. Just me, tho.
lstamour··on You've Read Your Last Free Article, Such Is the Nature of Mortality
It’s like cheap Canadian cellphone or internet plans - you have to wait until a news org offers a deal, then sign up for it. Managed to get cheap NYT and WSJ subs from it. You have to cancel when the price goes up and then accept the offer at cancellation to keep your low price for one more year, forever.

Honestly, if my local library offered more online news subscriptions, I would much prefer that. How we ended up in this scenario where everyone, even Medium, shows me a paywall with high subscription fees to bypass it is not sustainable worldwide in the long run. I don’t mind paying for content, but keep it reasonable!

lstamour··on Eden Abhez: The strangest hit songwriter
I’m not sure either about the legal trouble, but I’d also recommend https://www.iowasource.com/2020/12/02/eden-ahbez/ for some anecdotes.
lstamour··on Potential ozone depletion from satellite demise during atmospheric reentry
Well, here's an actual photo they could have used: https://www.japantimes.co.jp/news/2024/05/29/japan/science-h...

And here is an earlier rendering from 2021: https://www.japantimes.co.jp/news/2021/12/31/national/japan-...

And it only took a simple Google search to find, from a reputable news source.

lstamour··on You'll regret using natural keys
> Some modern systems also technically allow FK on alternate keys

As far as I can tell, all modern systems allow it, as it is part of the SQL standard that foreign keys can be either primary keys or unique indexes. Here's a brief quotation from a copy of ISO/IEC 9075-2:1999 (not the latest version) that I randomly found online:

> If the <referenced table and columns> specifies a <reference column list>, then the set of <column name>s contained in that <reference column list> shall be equal to the set of <column name>s contained in the <unique column list> of a unique constraint of the referenced table.

So it mentions unique constraints first. Then afterward it says:

> If the <referenced table and columns> does not specify a <reference column list>, then the table descriptor of the referenced table shall include a unique constraint that specifies PRIMARY KEY.

If I'm reading this right, it means that in the base case, where you specify the column to reference, it can be any unique constraint, where a primary key is just another possible unique constraint (as all primary keys are by definition unique). And only if you don't specify the fields to reference does it then fall back to the primary key instead of a named unique constraint.

I'm not disagreeing with you entirely - it's true that often there's an assumption in database theory that primary keys are natural and foreign keys are primary keys. But this isn't a hard requirement in practice or in theory, and it partly depends on the foreign key's purpose, why you need it in the first place. This StackOverflow answer also explains it well: https://softwareengineering.stackexchange.com/a/254566

I should add that there is also a set of database design wisdom that suggests you should never use database constraints such as foreign keys, only app/api constraints, but that's a whole different tangent.

lstamour··on Recall: Stealing everything you've ever typed or viewed on your own Windows PC
It’s enabled by default on a select number of laptops they sell, and no one else has access to it yet. But they plan to roll it out further. I’d personally hoped for some kind of “Secure Enclave” such that only certain processes could be run, but this is about what I would expect of someone shipping a minimum viable product because AI is a hot buzzword. Weirdly, even AI could theoretically solve some of the privacy issues simply by looking for PII and removing them. Extra weirdly, this would have been more secure if they uploaded screenshots to the cloud, because access could be better monitored there and exfiltration limited.
lstamour··on How the voices for ChatGPT were chosen
The full episode is even better, the clip above ends a minute early...
lstamour··on No one buys books
OverDrive is a strong player but they’re still a commodity. Publishers and libraries can use other lending platforms if and when they emerge as stronger competitors. This article serves as a good overview: https://openeducationalberta.ca/ciicm/chapter/public-library...

The problem is the publishers - they don’t always sign on to provide books to every new platform and don’t always release to every platform. But other platforms do exist: https://bookriot.com/comparing-public-library-ebook-platform...

lstamour··on 3rd Edition of Programming: Principles and Practice Using C++ by Stroustrup
Could be missed if there was a mix of typed by hand and auto-inserted by IDE headers, plus maybe a setting that collapses (folds) imports by default... and clang-format wasn't run on save? ;-)
lstamour··on 3rd Edition of Programming: Principles and Practice Using C++ by Stroustrup
Not just that but when ISBNs were first introduced, it was common thought that they were used for cash register price scanning rather than computer-controlled inventory, so a number of early books had ISBNs re-used by publishers and it wasn't caught because they were meant to be the same price. These days you often see two barcodes on books, one is the ISBN and the other is the price.
lstamour··on ETag and HTTP Caching
Yeah, I’ve never really heard of “weak etags” before in any sort of common usage of the term. Honestly, most people tend to skip etags by embedding hashes in filenames directly, this way you can avoid any bad proxies serving up stale content or dropping headers. It’s rare these days to be an issue given the use of TLS end-to-end encryption, but I’m sure it still occasionally happens. And yes, the more serious approach to possibly poorly formatted JSON is to “normalize it” into the expected format. It’s less about caching and more about ensuring what you serve to your front end is consistent, even if you are liberal in what inputs you can handle. E.g. if someone gives you XML, rather than write a front end that can handle both XML and JSON, pull the data out of both and make your own JSON later.
lstamour··on ETag and HTTP Caching
I could probably write one pretty quick, under the assumption that we are storing only JS-compatible JSON with no encoding hiccups (JSON sadly isn’t as standard as it appears at first glance…) just hash(JSON.stringify(JSON.parse(fileText))) and you’re done. This assumes the same parse and serialize methods are expected to be used at both ends, that they only normalize formatting and that you don’t have to worry about number representation doing weird things. I wouldn’t actually sort keys as sorting is technically a change in behavior and good browsers today do not re-order object keys for you, though your code can do that, of course. I considered skipping the second JSON serialize, but it makes a buffer out of an object so it’s easy enough to use. One could imagine a more efficient approach would modify the hashing to occur against buffer chunks of the JSON, but intentionally skip the whitespace. This avoids unintentional data serialization but obviously the parsing routine would have to match the recipient exactly to work correctly. And it still assumes you’re receiving oddly formatted but valid JSON, which doesn’t sound like a safe assumption to make. If your JSON varies in format I wouldn’t ever want to assume I’d be able to parse it correctly. I mean, what if a return character slips in by mistake amongst all the newlines?
lstamour··on ETag and HTTP Caching
One more example, if your request contains a batch of operations, you generally have to return 200, or maybe 204, if it was successfully received and should not be retried in full. In the response body, you might give other response codes for specific errors or failures to retry in a new request. So it can easily make sense to return 200 when there are e.g. partial failures and partial success and the request was properly formatted, authorized and acted upon.
lstamour··on 65 years ago, America announced the names of its first astronauts
I won't say these are the best sources, but https://en.wikipedia.org/wiki/Budget_of_NASA and https://en.wikipedia.org/wiki/Military_budget_of_the_United_... suggest that at its peak during the space race, NASA spending reached 4% of the government budget while if I'm reading the charts correctly, the government routinely spends up to 4% on the millitary every year since. I'd personally classify the Apollo program then as a rounding error as I pay more than that in sales tax and often don't notice... and that was at its peak.
lstamour··on Roku files patent to inject ads via HDMI
Also, the screens spying on you and showing ads are often very subtle about it. They don't tell you every time they take a screenshot, they don't make a loud "click" sound, they don't advertise it. They're not even legally obligated to do anything other than tell you about it in buried legalese. LG will say you need to agree to new privacy terms so that you can use the "microphone" button on your remote control, for example. I persist in ignoring that one, but I'm sure others wouldn't and haven't. Amazon lately has been blatant with how much advertising is ruining their services and sticks, to the point where I don't go to Amazon to search for products now, they've just ruined it. Not every spying, advertising-laden service provider is as obvious as Amazon about it, though.
lstamour··on Roku files patent to inject ads via HDMI
Most people don't want an extra box or dongle? Everyone likes devices you can just plug in, push some remote buttons, and you're done. Even when the set top box works, something inevitably goes awry, such as audio issues non-HDMI sound output, or not seeing video because the soundbar isn't connected to the box or dongle, and so on and so on. Remember those households with the blinking 12 on the VCR? Yeah, folks just want to watch their movies, they don't need to know how this stuff works, even the basics. I know too many people who watch movies on Netflix on an iPad because it's easier to do that than to configure their smart projector every time. We really haven't made technology that much easier to use yet, but it's getting closer, maybe.
lstamour··on FFmpeg 7.0
7.0 is now available: https://github.com/microsoft/winget-pkgs/pull/147886
lstamour··on FFmpeg 7.0
The winget community repo is open source: https://github.com/microsoft/winget-pkgs/tree/master/manifes...
lstamour··on Roll-Invert-Unroll: An easier way to replace a duvet cover
https://www.extrapetite.com/2021/03/how-to-put-duvet-cover-b... Might make a bit more sense, but I’m still trying to follow it myself. I’ll have to try it to get it, I think.
lstamour··on IrfanView
That’s the “Preview pane” in explorer. It only supports the file types you could preview in explorer, it only “opens” the file currently selected in Explorer, and didn’t let you zoom in or inspect the image in any way that I recall. It was a plain preview that was supported (in ME) by the integrations Explorer had with Internet Explorer, I believe. Often installing IrfanView let you preview more file types in Explorer, and you could open more than one, display them full screen, edit them, resize them, and more…
lstamour··on What Boeing did to all the guys who remember how to build a plane
The article above and every other article I've read says, "he was found in his truck". That's a personal vehicle, and assuming it was locked, enough to suggest that it was self-inflicted.
lstamour··on Misunderstanding about the details of how Apply Pay works
> I do wish there was a truly open payment solution though that doesn't require me to trust a big tech party.

Cash? Everything else needs a relying party of some kind in order to facilitate the transaction. If it's a credit card or digital wallet, the transaction passes through the credit card or debit card networks, and your info is logged and, depending on laws, potentially re-sold.

Don't get me wrong, I sometimes feel like Google shouldn't know my location either, but if my cell carrier already knows my location, I actually trust Google to not resell my location more than my cell carrier - it's worth more to Google if they're the only ones with that information and the same applies to Apple.

Another way of putting it, rules and regulations, strictly enforced and updated, is probably the only way to prevent tracking and abuse by legitimate big actors.

lstamour··on Canva has acquired Affinity in an effort to compete with Adobe
FCP X’s simple timeline which chains clips together making edits easy, though some would call this an anti-feature.

After Effects simplicity compared to the hellscape that can be node-based VG work. I mean, the programmer in me loves nodes, I even used MaxMSP frequently… and Origami. But the simplicity of After Effects is really nice and it has like every plugin in existence.

Don’t get me wrong, I use DaVinci with the quick editor and have considered buying other gear to make it work better, but… it’s really kinda a jack-of-all-trades, master-of-color-grading app. There’s a lot still to wish for.

lstamour··on Canva has acquired Affinity in an effort to compete with Adobe
> On the other hand you are overlooking fundamentals where Affinity is so much better than Adobe - stability, speed, connection between the software.

I think others would argue on that last point that Adobe is more than halfway there since Creative Suite and has plans to finish the job with Adobe Express, though we’ll see if they come to fruition.

> It seems biggest issue Affinity has are networking effects/inertia of the industry unvilling to change.

This I agree with, 100%. And now Affinity will have a third struggle in that they are poised to go subscription and lose the pricing model advantage too. Even if they don’t change the pricing model, eventually you’ll need a Canva account to use the apps, ongoing annual support fees, and so on.

lstamour··on Canva has acquired Affinity in an effort to compete with Adobe
Good point. And I should clarify, I’m not a filmmaker and mostly edit screen recordings and home movies. For that, I find that Resolve and Final Cut Pro work equally well and equally poorly. There’s a lot of room in video editing for further innovation, particularly if A.I. or automation can help simplify repetitive tasks. Premiere isn’t the best example of Adobe’s video tools - that title probably belongs to After Effects, an app inexplicably unique in its ease of editing and producing motion video graphics. No need to deal with translating your ideas into Nodes to get it working in Resolve. No need to try to fit within the limitations of titles and effects in FCP, etc. After Effects is Premiere’s killer app.
lstamour··on Canva has acquired Affinity in an effort to compete with Adobe
I’m less convinced. The text features and even how frames resize images were either annoying or lacking when I last used Publisher. Yes, I used it, and yes, it worked. But it’s no contest that in the details, InDesign has more features that are (in some cases) better thought out or for text rendering, just really good. At the moment the two best ways I know of to render text are (1) any Adobe product with their text engine and (2) LaTeX via something like XeTeX, but Adobe’s still wins for ease of use. Maybe third place would go to the Safari web browser if you use the right CSS and presumably export to PDF, though using it to export PDFs isn’t as user-friendly as iOS Share panel, Chrome or Prince - for PDF export, at least. Note that these statements are subjective on my part, I’d welcome evidence to the contrary as a sign of progress away from the Adobe hegemony. ;-)
← PreviousPage 2 of 34Next →