Better HN
topnewbestaskshowjobs
Log inSign up

ComputerGuru

32,383 karma · joined Jan 3, 2008 (18y ago) · 8,295 submissions

mqudsi on most sites.
Submissions

comment 3y ago · link · parent

Why is your milk so expensive compared to the USA? After an extended price hike due to the volatility of core consumer goods inflation, a 3.78L US gallon of milk is now back to sub-4 USD.

comment 3y ago · link · parent

This is uncannily reminiscent of Asimov’s Nightfall – a real gem if you haven’t had the pleasure of reading this short story before!

http://www.whitehole.net/storyPages/files/misc/Nightfall.pdf

comment 3y ago · link · parent

DNS is really easy to redirect (at the firewall level) since it goes over UDP. The growing problem is DNS over HTTPS, which uses certificates and tcp and is much harder to redirect (without setting up a MITM and distributing the CA to all devices). Fortunately just blocking the DoH domains at the DNS level works, but unlike the global udp port 53 redirect, it’s a cat-and-mouse game.

comment 3y ago · link · parent

> and using either […] as backend [emphasis added] is a nice alternative.

Both those links are to alternative YT frontends, though?

comment 3y ago · link · parent

> An RPi 4 can encrypt/decrypt AES-256-GCM at more than 300 Mbit/s, according to my rough measurements. That's per core, of which it has four.

But the bottleneck is usually in terminating and establishing SSL connections?

comment 3y ago · link · parent

I have asked this question repeatedly every time someone mentions inspecting TV meteor requests via a LAN proxy and never received a satisfactory answer..

If there are known exploits for the TV (a bunch are now running old and unpatched Android), the answer is easy enough (root it and do what you want - though that opens different and maybe easier options for ad stripping), but I’ve heard of it on Apple TV where jailbreaking isn’t so easy. Perhaps MDM deployments?

comment 3y ago · link · parent

Fwiw I’m familiar with docker and I certainly wouldn’t have understood it that way if you hadn’t said so. I wonder why they can’t just upstream the web gui either in addition or instead of the existing one.

comment 3y ago · link · parent

I never heard of reshade before but that is quite crazy. The only explanation I can think of is that the backend they connect to implements TLS 1.3 but in a broken way (because the client crypto lib would otherwise fall back to TLS 1.2 on its own) which really makes you wonder just how broken the crypto impl on their servers is and how many vulnerabilities they’re wide open to.

comment 3y ago · link · parent

Hey, that’s really cool! Upvoted! ¿What binary formats are supported? - I couldn’t see that in the README and I’m guessing it isn’t universal (though I could be wrong!).

As for this specific context, presumably at least the bulk of the fields are shared between YouTube clients across architectures and platforms - it might be easier to just run the dump against binaries extracted from the YouTube apk than getting the specific Apple TV YouTube app binary. (For iPhone, you can just make a full iTunes backup but for Apple TV I imagine you’re going to need to do some forensic binary spelunking.)

comment 3y ago · link · parent

It sounds like you didn’t have persistent data, and were only offering compute? If there’s no need for a coherent master view accessible/writeable from all the clusters, there would be no reason to use multi-region cluster whatsoever.

comment 3y ago · link · parent

I said as much, though. Read again. I had a caveat about when you start limiting your frame rate.

comment 3y ago · link · parent

Yes, but in practice, no. These games are usually coded as a loop that runs with full CPU as fast as it can (unless capped, which the old one wasn’t), using as much cpu as is available. In that case, the fps is a side effect of how long the loop takes to run each pass (which is what happened here) - i.e. you don’t determine the fps, the fps is a result of how complicated or (in)efficient your code is. So going from running at 30 fps because it was so poorly coded and made such inefficient use of the cpu to running at 6000 fps because it now completes each loop pass that much faster, the cpu usage is actually the same.

Now if your code is so optimized that it can run at 6000 fps, at that point you can say “gee, I don’t need this many updates a second, let me cap it to x frames per second.” But how do you do that? The GPU is grabbing finished frames out of the buffer at its own pace, whether you are generating them at 6k/sec or just 5/sec. To cap your cpu consumption you would usually say “we need a new frame every 0.015s to always have a new frame ready for the GPU so that the screen updates sixty times a second, so if we finish a frame in 0.001s instead, sleep (effectively yielding cpu consumption to other processes) for 0.01 seconds after we run through the loop” - but while that may work for some things, there are other stuff that need to happen “in real-time” such as reloading the audio buffer (to avoid pauses or corrupted/garbled audio), etc and you also can’t rely on the system to actually wake you before 0.015s even though you asked it to wake you after just 0.01s to be extra safe.

Tl;dr, yes, once your code is running at 6k fps, then capping it to reduce consumption is an option, but running at 6k fps doesn’t actually increase cpu vs inefficiently running at 30fps.

comment 3y ago · link · parent

I agree with the main points in the post and certainly understand how they could push one in the direction that htmx has taken, but for me (and I posted a long comment along these lines as a reply in this thread elsewhere) the benefit of TypeScript isn't just the type safety but also that it forces you to explicitly provide more strongly-structured, parseable context info (regarding your intent in the codebase) that can be used to further empower static analysis tools (whether it's the TypeScript compiler or various linters à la eslint and co) to pick up on discrepancies between what the code is supposed to do and what the code does.

I view JS as a particularly unreliable language to build solid (as in dependable, consistent, coherent, and sound) projects in, and the various build tools are just ways to at least partially overcome those inherent shortcomings of the language. Transpiling from ESNext to ES5, merging disparate source components, etc are all just icing on the cake and not the real reason to use TypeScript (though I am surprised that the article talked about its ECMAScript version restrictions caused by IE11 support but didn't talk about how w/ TypeScript you can use language-level (not library-level) features such as the spread operator, for ... of, async/await, etc. and have them automatically converted/transpiled to functional equivalents that work on ES5 browsers).

Just look at how the various @typescript-eslint/* packages can supplant basic eslint rules, replacing them with more precise variants¹ by using the extra information provided by the TypeScript AST instead of just the info surfaced by the JavaScript AST.

¹ Let alone the existence of the hundreds of additional lints that are only possible for TypeScript codebases.

comment 3y ago · link · parent

Me too, but it's usually because of the weird way TypeScript was built as a thin veneer over JavaScript. Unlike a proper strongly-type, statically-compiled language with a consistent underlying framework where unsound behavior is adversarially sought out and eliminated in the very design of the language from the start, TypeScript started off as just bolting types on to JavaScript and progressed to actually sanity checking the code that a JavaScript runtime happily accepts.

I just ran into a case yesterday where some code ported from JavaScript to TypeScript five or more years ago once more wouldn't compile after upgrading from TypeScript 5.1.x to 5.2.x and in this case it was a DOM event handler that for some reason (probably copy-and-paste from another location in the codebase) had a `return foo;` in a couple of the conditional statements in the event handler callback. Now obviously event handlers don't return anything, and anything they do return is ignored (perfectly normal for JavaScript). TypeScript didn't error out on that, but it did error out because not all the code paths returned a value, so it was no longer able to infer the return type.

A function (that returns a value) that can execute along some logic path without returning a value is a soundness issue. Granted it didn't actually cause any problems (as the return value was always ignored in all cases, the solution was to just remove the `return` statements that never should have been there) but tsc incidentally caught something funky that never should have been in the code in the first place.

So if you view incremental tsc releases as "tightening down all the bolts" then I think its behavior makes sense. I wish tsc caught everything from the start, but I'm only ever happy to see that my code no longer compiles because it means that something tsc *wrongly* accepted before is now being caught - which usually means that potentially errant runtime behavior has been identified and this is a chance for me to correct it. Which is, after all, the whole point of turning JavaScript into a compiled language - so I can catch errors (or at least as many as the TypeScript language is empowered to and the TypeScript compiler is smart enough to) at compile-time rather than at run-time.

(But I'm not primarily a web developer, I hate loosely-typed languages, I absolutely abhor runtime errors, and I think any soundness holes in a language should be treated alarm bells left and right, so perhaps my opinion is not actually reflective of the average webdev.)

comment 3y ago · link · parent

> NPR is still pretty fun to listen to occasionally.

Agreed but with heavy emphasis on "occasionally."

I grew up listening to NPR. It's not the same any more - and not just compared to way back when but even when compared to a mere ten years ago. The amount of (relatively subpar) content that is purely picked and broadcast for the purpose of showcasing <instance of behavior or existence of person meeting certain carefully selected bullet points determined by the political policy of the broadcasting station> makes the signal-to-noise ratio for non-agenda-sharing listeners rather poor.

It's a real shame because there are such treasures on there that drown in the sea of subpar content picked only because it serves the agenda of the station in question, and doubly-so because the national NPR w/ independently run regional stations model is absolutely terrific for promoting local journalism.

comment 3y ago · link · parent

I don't know how much you know about water filtration plants, but in the real world everything is a series of filters, each more fine-grained than the one before it. You would never use this on unfiltered ocean or waste water - it would be yet-another-stage in the filtration pipeline, after many of the others and possibly before a few more.

comment 3y ago · link · parent

No, that's very possible. The problem is our obsession with making everything single-serve and disposable. I think this is what you are looking for:

https://www.amazon.com/s?k=stainless+steel+tea+infuser+ball

comment 3y ago · link · parent

I’ve never seen a consumer device with chassis intrusion enabled by default. Were these maybe volume orders for a business account? Those can come with whatever configuration IT wants.

comment 3y ago · link · parent

What are you into? Language, technology, purpose, provenance, etc?

comment 3y ago · link · parent

This concept is so foreign to anyone in the USA where Zelle was only just invented and there was no mechanism for individuals (non-business-entities) to make ACH payments.

comment 3y ago · link · parent

I was under the impression if you don’t declare it then there is no legal burden on the government to return it to you, whether you have a reasonable explanation or not. Whereas if you declare it and have a reasonable story/sufficient paperwork they can’t/shouldn’t take it.

The point being that in cases where there is no funny business (at least in your opinion), you are strictly better off declaring it than taking your chances on not doing so.

comment 3y ago · link · parent

Does “freely enter” have a legal definition? Because you are “free to enter” but need to declare. Just like you are “free to enter” but need to declare if you have an orange you purchased from the States making a return journey back into the States.

comment 3y ago · link · parent

Yeah, I know what you mean. We live in amazing but somehow less exciting times.

comment 3y ago · link · parent

Yeah, I think I was mentally doing more comparison to cars from the 70s rather than the 80s. Thanks for thinking this through “aloud” with me; I enjoyed it!

comment 3y ago · link · parent

I spent a couple of hours reading through reviews there on your suggestion - thank you!

But I feel like I would only read those reviews after finishing the book myself as part of a post-read “imaginary book club session” because, as you say, it seems the reviews really do stand in for reading the books!

comment 3y ago · link · parent

So Illinois has St Louis Cardinals MLB plates, presumably for downstate residents that relate to STL more than Chicago… I guess in addition to being a question of state pride it’s probably also a matter of public safety that they don’t have Green Bay Packers NFL plates for Lake and McHenry residents, though!

comment 3y ago · link · parent

> Also, I can't decide if "whiskey plates" are useful in any real way

Whiskey plates give police permission to pull over the (driver of the) vehicle and perform a sobriety test at any time, without (additional) cause.

comment 3y ago · link · parent

Driving drunk can be life destroying in most parts of the country.

comment 3y ago · link · parent

Is the “NY Times Book Review” a separate publication or just the books section of NYT? Because NYT and WaPo book reviews are hugely disappointing to me.

comment 3y ago · link · parent

Tangentially related: I posted a shebang for scripting in rust some years ago, if anyone is interested: https://neosmart.net/blog/self-compiling-rust-code/
1
505152
277