4,328 karma · joined August 11, 2015
- GitHub: https://github.com/obi1kenobi/trustfall
- conference talk: https://www.hytradboi.com/2022/how-to-query-almost-everything
- web demo: https://play.predr.ag/hackernews
Creator of `cargo-semver-checks`, a linter for semantic versioning of Rust crates: https://crates.io/crates/cargo-semver-checks
Blog: https://predr.ag/blog/
Mastodon: `@predrag@hachyderm.io`
Twitter: https://twitter.com/PredragGruevski
Talks: https://predr.ag/talks/
First, that quote is referring to human-made systems, not natural ones (as is the rest of the essay!) and I think our views align on whether human systems regularly work.
Second, natural systems (and all complex-enough systems) are always running in some degraded fashion. So what "working" means is ambiguous: they are broken, yet accomplishing the goal. The quote from the essay refers to "working" in the "free of faults" sense, in which I again think our views align.
Click the bubbles and they pop! Very satisfying :)
Might be more than ten thousand, even, based on the reactions :)
# All the code is wrapped in a main function that gets called at the
# bottom of the file, so that a truncated partial download doesn't end
# up executing half a script.That's just my style of writing, you can check my pre-GPT posts and compare if you'd like.
But I do appreciate precise language and the desire to help people learn new things, so thanks for helping make the distinction between MIMO and beamforming clear! I hope at least a few more people know about it now thanks to your comments.
(I'm the author of the post btw)
But it could be rain helping close a circuit on a rusty antenna connector port. Or rain improving the grounding of some neighboring circuit that otherwise drains through the metal scaffolding the antenna is attached to. Or rain attenuating a neighbor's own Wi-Fi that otherwise might have been aggressively transmitting on the same channel as our units.
The rain and the Wi-Fi devices were clearly related. How they were related, was not clear. Aging hardware rusts, breaks, gets yanked around or unseated or pulled out of the ground, or has water enter in places where it shouldn't be.
I was already running diagnostics on everything to figure out which devices might be faulty (local AP, local bridge unit, local antenna, remote antenna, remote bridge unit, remote switch, remote modem/router, upstream connection to ISP) so checking for "update gone wrong" was a 3 second job: I was already in the admin UI, so check logs, nope, no recent updates, done. I'd rather spend 3 seconds checking something that probably isn't the problem but I can know for sure in 3 seconds than risk climbing precariously up a scaffold 30ft in the air only to realize it was just something I could have solved at a keyboard instead.
Risk/reward. Low risk, low reward is okay too if it's super fast and already on the way.
I don't recall them being able to change data rates very much (if at all) because the ones at the beginning of the story were 802.11g devices, and 802.11g didn't have channel bonding capability or similar tricks up its sleeve. Newer equipment definitely has more options like this.
This story happened a bit over 10 years ago at this point. At the time of the story, the Wi-Fi bridge was already almost 10 years old -- we'd had the same equipment since I first remember getting internet at home.
That means the antennas at the start of the story were mid-2000s mid-tier consumer level equipment. I don't think a 16-17dB antenna would have been $35 at the time, in either mid-2000s dollars or in today's dollars. I also grew up in a country much poorer than the US, where $35 could feed a family for a week.
At the end of the post, we upgraded to 802.11n antennas (but still tech from 10+ years ago) which solved the problem by being newer, nicer, and having beamforming + MIMO capability which let them be more tolerant of obstacles (effectively, get more dB at the same emitted power level).
Past ~300ft/100m, you need a repeater even for Ethernet. We would have needed at least one repeater somewhere along the line, which adds even more cost and complexity on top of needing to get permits from the city and approvals from all the neighbors in between. Anyone that says "just go get a permit from the city" has never tried doing it.
"Just" move it higher vs replace ~10yr old (at the time) equipment with newer, faster equipment that doesn't have the problem? Easy answer if you ask me, and I'd make the same choice again with ~10yrs of retrospect -- the same 802.11n antennas are still there today!
Plastic drones with plastic propellers are still visible on radar because the tiny propellers spin super fast, so they light up like a Christmas tree on Doppler radar because the approaching vs receding velocities of the blades are so different.
Like I said in a reply to a sibling to your comment, the gear was ~10yrs old at the time and had been working fine until then. It was perched in a very inconvenient spot because it had to "look around the corner" of the building, so checking the line of sight wasn't just a case of looking out the window.
I went in order of "most likely to be the problem, weighted by how easy they were to check." This is a debugging strategy that has served me well, and I don't regret using it that time either.
I didn't think to check the line of sight because I was primed by the fact the bridge had been running fine for 10 years. With networking gear that old, it seemed more likely that a device/cable/power brick had just gone bad with age.
Also, the antenna is on some metal scaffolding propped out 6ft past the edge of our balcony, because it needs to "look around the corner" of the building. It's 30ft in the air, and checking the line of sight involved climbing up there. It certainly wasn't the easiest nor the likeliest thing to check, so I didn't check it first.
Multiple people in the comments just here on HN have mentioned having weird situations caused by routers that had gone bad. I imagine most of their routers weren't 10 years old when they started acting up. How old is your router?
Beamforming is cool and magical, and MIMO even more so. The post wasn't intended as a primer on wireless technology, just as a fun read for folks to enjoy. I tried to sprinkle in some nerd-snipe-quality technical detail and offer links for folks who might want to dig in, and MIMO is explicitly discussed in both the 802.11n and in the several links on beamforming I provided.
I barely managed to explain beamforming without that sidenote turning into a paragraph of its own. I don't think I could have done MIMO justice in a sidenote.
Also, I hate operational (ongoing) solutions to problems. Pruning it would have been exactly that kind of solution -- we'd have had to prune it regularly or else it would have kept being a problem every so often.
The hardware fix was easier: our equipment was already a bit old and slow, the upgrade fixed the rain problem while also making it faster, and it's not something we've had to tweak since. I've long since moved out, but my parents still use that same 802.11n bridge today!
Rough rule of thumb, a consumer-grade directional antenna (at least at the time, maybe they've improved in the last 10yrs) will give your signal strength a one-digit multiplier (say ~8x), meaning ~7-10dB. But that n^2 means that improvement only takes you 2-3x farther, not 8x.
Here we're talking about ~100x the distance, which would need a 10000x = 40dB improvement in signal strength. AFAIK an antenna like that would cost more than the entire city block where I grew up
But you seem to be implying that `std::unordered_map` is the default choice one would use, which in my experience is not accurate -- it is well-known to have serious perf shortcomings, and everyone I know uses some other implementation by default. Even so, the delta from `std::unordered_map` to the improved hashtable in the blog post is impressive, and just shy of 10x.
Graph algorithms frequently have 10x improvements from one state-of-the-art approach to the next -- for example, here's one from my own research[1]. The delta between state-of-the-art and "good default" in graph algorithms would often be around 100-1000x. And comparing state-of-the-art to the equivalent of an `std::unordered_map` would be another 10-100x on top of that, so 1000-100000x total.
- It's hard to find a "good-enough" graph implementation. The best hashtable is only a handful of percent better than the built-in ones. The best graph impl is 1000x or more better than any generic built-in one could be, so there's much more incentive to specialize (and people already specialize hashtables for just a handful of percent speedup!)
- The baseline complexity level of implementing a reasonable hashtable is fairly high, even if for a small dataset. The baseline complexity of implementing a graph algorithm for a small dataset is pretty low, and the real problems come in later / at larger scale. So in graphs there's less incentive to learn a complex library's API when "I could just hack it myself," unlike for hashtables where the API is simple and doing it myself is much harder.
I'm thrilled I'll be able to point folks to a much more in-depth analysis like the one here, instead of saying some variation of "it's really hard to do it well" and having them just take my word for it.
I'm the Trustfall maintainer, happy to answer questions about the query engine or how oxlint or cargo-semver-checks use it.
I also recently gave a talk at P99 CONF on how cargo-semver-checks used Trustfall's optimizations API to get a 2000x speedup: https://www.youtube.com/watch?v=Fqo8r4bInsk