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

Wow. So this is what an actual book review by someone that knows how to actually write looks like. Yes, Tolkien is a literary mastermind, but set that aside for a minute: I feel lucky to have read the review itself.

If modern book reviews in mainstream media were still written this well, I think more people would read books!

comment 3y ago · link · parent

You are excluding startup time. Loading the interpreter/runtime and initial JIT pass is slow. For many codebases, the compilation time is actually dominated by the time it takes the interpreter to get going.

comment 3y ago · link · parent

Oh there are a ton of interposer boards you can buy shipped direct from China that add CarPlay to an existing oem head unit the same way you can get reverse camera support (high jacking the video output when a certain but is pressed or the gear shift changes). It’s just that they all have massive quirks. I’ve seen the Porsche Classic CarPlay retrofit and it’s absolutely the best, but these third party solutions are available for most makes and models but all have to a of quirks and idiosyncrasies that are never presented up front.

comment 3y ago · link · parent

Thanks for sharing that link - it’s quite a thorough write up! I wish there were things of like quality for CarPlay retrofits.

comment 3y ago · link · parent

I posted this elsewhere, but sharing here too:

This link has an absolutely terrific comparison of tradeoffs involved in lowering vehicle weight, compares ICE to EV weight profiles, and puts the current price per kg of weight saved for ICE vehicles at $5/kg while forecasting that EVs will reach price parity on that metric by 2030.

https://www.lightmetalage.com/news/industry-news/automotive/...

comment 3y ago · link · parent

Yeah, I was excluding ABS and traction control because I was only enumerating non-safety features (and including audio systems under infotainment). I’m curious how much weight airbags add – having replaced the modules before, they’re pretty lightweight… though I’m sure the numbers add up.

Incidentally, you might be surprised to learn how localized some of these amenities are. In some other countries I lived in or visited, I know of “brand name” dealerships (ok, I’ll call them out, it was Chevrolet) selling cars (the same models available in the states and in Europe!) without ABS as standard – let alone traction control, automatic transmission, or (on other models?) power windows.

Edit: this link has an absolutely terrific comparison of tradeoffs involved in lowering vehicle weight, compares ICE to EV weight profiles, and puts the current price per kg of weight saved for ICE vehicles at $5/kg while forecasting that EVs will reach price parity on that metric by 2030. Definitely recommend reading!

https://www.lightmetalage.com/news/industry-news/automotive/...

comment 3y ago · link · parent

I know the Roadster and the Taycan have trannies/gears. Don’t know of any others, though.

But I didn’t say EVs don’t have diffs, it’s just that automatic transmission losses are on top of differential losses (and were pretty bad before the modern era of much better ZF and similar/knockoff designs?).

Edit: this link answered my questions on drivetrain power losses: https://www.motortrend.com/how-to/modp-1005-drivetrain-power...

comment 3y ago · link · parent

I was under the impression the bigger weight gains were not so much thanks to safety as they were due to amenities that have become essentials. Things like air conditioning, awd (if you consider it to not be strictly a safety feature), automatic transmissions, larger wheels (though many are now aluminum) and the tires for them, power steering, infotainment systems and their wiring harnesses, sun/moon roofs, bigger/more comfortable seats, etc. But emissions-related things also come to mind, such as catalytic converters, dpf/gpf, improved exhaust systems, longer exhaust piping and larger chambers, def, etc.

(I did note that cars are made of lighter materials, such as fiberglass, composites, and aluminum.)

Edit: I do think that while the range of vehicle sizes may not have changed too drastically, the probability distribution curve has. Station wagons were never “in” the way SUVs are, sedans are basically on their way out (though the newest “CUVs” are really just sedans with weird profiles and jacked high up), and pickups were not a suburban mainstay.

comment 3y ago · link · parent

> given things like transmission losses, etc

I was completely confused for several moments there because I was thinking of automotive transmissions (which cause efficiency losses in regular cars but aren't used in (the vast majority of) EVs), then I realized you meant electric/infrastructural transmission losses. Right.

comment 3y ago · link · parent

The article misses the biggest reason why batteries (and EVs) are so heavy: it's because the cars themselves are heavy [0].

The article notes "Passenger vehicles already got around 35% heavier between 1980 to 2022" but doesn't note that this is despite the material we make cars out of getting lighter and thinner. Cars have gotten enormous and enormous cars take enormous (and therefore heavy) batteries to get equivalent range out of.

[0]: https://qz.com/2154558/big-electric-trucks-and-suvs-are-the-...

comment 3y ago · link · parent

> Completely ignore regenerative braking - bias?

The second half of the article is all about regenerative braking!

comment 3y ago · link · parent

Sorry, not callback hell (that's what JS had before async/await) but certainly not code that linearly handles a connection from start to end, either. (Threaded code is certainly "linear" but I meant from the perspective of walking through the lifetime of a connection, one connection at a time linearly.)

comment 3y ago · link · parent

Thanks. Perhaps I did go overboard with that disclaimer.. probably because I myself made the mistake of initially using [0] the oh-so-convenient tokio::io::copy() instead of writing my own copy method that would drop the other half of the connection when one side was closed.

The copy_with_abort() routine is still taking the easy way out in this not-optimized-for-heavy-production-use sample because it uses a broadcast channel per connection to reactively signal that the other half of the connection should be closed (rather than timing out every x ms to see if an abort flag has been set). In the real world, I'd probably replace the join! macro with a manual event loop to be able to do the same but without creating a broadcast channel per-connection.

(I maintain an extremely lightweight "awaitable bools" library for rust [1] that is perfect for this kind of thing (roughly equivalent to a "bounded broadcast_channel<()> of queue length 1, but each "channel" is only a single (optionally stack-allocated) byte) — but it's for event loops in synchronous code and not async executor compatible.)

[0]: https://github.com/mqudsi/tcpproxy/commit/0164ef836a49f2f738...

[1]: https://github.com/neosmart/rsevents

comment 3y ago · link · parent

If anyone is interested in a real-world but still meant for educational purposes example (a la minix), I wrote a generic tcp proxy in rust/tokio some years ago, specifically for use as a teaching example to demonstrate how to correctly handle what would, at first blush, seem to be an incredibly straightforward task: https://github.com/mqudsi/tcpproxy

I've updated it over the years (moving from chaining futures to using async, using the latest tokio, etc) to keep it relevant.

In particular, correctly splitting a duplex connection into send/receive streams and then aborting one side of the connection when the other closes without missing events is trickier than it should be.

comment 3y ago · link · parent

You still need async (or an event loop model) because otherwise your threads will block waiting for the io_uring result when they could be put to better use (namely submitting new io_uring jobs or conveying the results of completed ones).

Note that the io_uring approach isn't too different (just more universalized) than how Windows has always implemented async operations (with overlapped and io completion ports). Code written for that environment originally just used the event loop model but it's easier/better ergonomics to wrap it in async and use that instead (e.g. how C#'s async/await works) because you can avoid callback hell, state passing, etc. and just write code "linearly" with cooperative yield points invisibly stashing and retrieving the "stack" for you.

comment 3y ago · link · parent

The only context in which the technical difference between memory and disk can be glossed over is one where the audience is made of laypersons that wouldn’t understand the first thing about seekable vs random-access memory in the first place.

A tech-illiterate author/editor is the much more plausible explanation.

comment 3y ago · link · parent

Gasoline in the USA was (is?) priced to the third decimal place (always a 9).

comment 3y ago · link · parent

> Social systems have a way of changing underneath you until it collapses.

From the beginning of time until now the statement was that you held power/money until it was taken from you or until you died (and you couldn't take anything with you regardless of how many riches you were buried with).

You want to, of your own free will and volition, reduce it to just the "until it's taken away from you" part. Which leads me to conclude that either your viewpoint is incredibly naïve or you are at the very, very top of the totem pole and wish to preserve the status quo as long as possible.

comment 3y ago · link · parent

> We are heading for extinction as a species, and under such circumstances [...]

We absolutely are not headed towards extinction as a species. We are like cockroaches and the human species will survive. Using "oh no, the human race is dying out altogether and we must preserve it all costs" is a ridiculous argument.

> [..] it makes sense to cause local ecosystem damage in the form of flooding.

It isn't just the (risk of) flooding. It's hubris to believe we can actually foresee all the second-order ramifications from such large-scale terraforming projects. (Hydroelectric) dams have devastated the local wildlife, transformed the surrounding permaculture for the worse, and set off horrible chain reactions with devastating consequences for the local flora and fauna which have global ramifications down the line, as we are discovering today. Nothing happens in a bubble.

This same argument was once made of fossil fuel emissions (when we thought that smog in the biggest industrial cities was our biggest problem and outsourcing them to developing nations was a great win-win /s). That obviously wasn't true. Why would you wish to repeat the same mistake?

comment 3y ago · link · parent

The only universal equalizer that has held for eternity is that we all die. Look at the power and wealth amassed by hegemons over the millennia. The world we live in would be unrecognizable (in the worst way imaginable) if those with unlimited wealth and power also had unlimited life.

comment 3y ago · link · parent

That's not a fair reply at all. If we don't care about the ecology, then we might as well just continue to use petroleum!

comment 3y ago · link · parent

> On a separate topic: this is the second site in a row where the full-screen "we respect your privacy click here to agree" banner won't actually let me scroll down to any of the buttons.

https://chrome.google.com/webstore/detail/behind-the-overlay...

comment 3y ago · link · parent

Not really; it’s all I could actually think reading the article (before I saw the comments) when it said “a darker Go Away Green” and talked about transitioning between different shades of the blue. It’s just not a color at all, but a family of colors used for a specific purpose. Still interesting but not like I came in expecting.

What did I come in expecting? A specific shade that was A/B and panel tested and perhaps shown in eye-tracking studies to minimize the attention drawn to objects painted in that particular shade. A family of colors makes more sense (because there isn’t any one right answer for all scenes), but it’s still not an “invented color” - and notice that I’m not quibbling about the “invented” bit by saying it’s been used before or it was always there but they just discovered/names it.

comment 3y ago · link · parent

> Is the Apple password manager available on non-Apple devices?

As of last month or so, it is now available on Windows as well.

comment 3y ago · link · parent

Not really. Firefox blocks more things out of the box for a better browsing experience than Chrome does. But I admit that there’s a good chance that at least some not-insignificant percentage of those 41% wouldn’t notice and realize that they would need to install uBlock to use Chrome comparably.

comment 3y ago · link · parent

I would argue that Electron webapps shouldn’t really count towards the browser marketshare. If would be nice to have a Firefox version, but it doesn’t matter precisely because the end user is not choosing the browser - the company pushing the product is. And let’s be honest: nerdy HN users aside, Joe Schmoe has no clue Teams is a web app running in an emasculated browser at all.

comment 3y ago · link · parent

I don’t think anyone is disagreeing. But that’s not what “claim to fame” means.

comment 3y ago · link · parent

Archive link: https://archive.is/RiSK2

comment 3y ago · link · parent

Tip: There are only four icons - I would expect them to be embedded in the README (or whatever different landing page you chose for this post) because as it currently stands, your link points to nothing of value and one must hunt through the repo to find the icons (individually).
1
515253
277