HNHacker News
TopNewBestAskShowJobs

lambdaone

1,743 karma · joined October 28, 2021

submissionscomments
lambdaone··on Switch bouncing reference traces for a variety of different switches
A bit of analog low-pass filtering and electrical hysteresis definitely helps reject EMI - but you shouldn't use these alone to do debouncing as if you do, you introduce substantial latency for both up and down transitions. The (very simple) software algorithm described above gives you both low latency and complete resistance to bouncing. Combining the two is a complete solution.
lambdaone··on Switch bouncing reference traces for a variety of different switches
The system is hit so violently that it goes into a non-linear regime, repeatedly hitting the end-stops of its motion. Consider how adding even a small amount of nonlinearity to a simple harmonic oscillator can create chaos, and I think you should be able to see how this generates chaos.
lambdaone··on Switch bouncing reference traces for a variety of different switches
Doing it right (via the algorithm above) is a trivial few lines of code. The thinking behind the state machine that gives both high reliability and low latency isn't trivial. It is, however, obvious once you know the trick of maintaining an extra auxiliary variable in addition to counter/timer variables, and understand that you don't need to wait for the bouncing to finish before registering a change. Think sort algorithms; everyone comes up with bubblesort first, but you can do much, much better with only tiny changes after a bit of thought.
lambdaone··on Switch bouncing reference traces for a variety of different switches
I do something very similar, but use two time constants. One to determine how many consecutive samples are needed to change from the established state, and a second one, as suggested here, to ignore subsequent input for a bit after a registered state change to allow for bouncing before going back to the receptive state. This is a bit more robust, as practical systems are always at the mercy of occasional glitches in electromagnetically noisy environments.

With well-chosen constants, I've found similar behaviour to the above; low latency and high performance at once.

lambdaone··on Learning a Driving Simulator (2016)
Perhaps a glimpse at the atmosphere of optimism at the time of Musk's pushing of FSD?
lambdaone··on Are polynomial features the root of all evil? (2024)
For large polynomial degree, this seems to me to be very similar to the P-spline method with a very large number of parameters.
lambdaone··on A unique sound alleviates motion sickness
Self-experimentation! Excellent.
lambdaone··on Fossil fuels fall below 50% of US electricity for the first month on record
This is one of the things I was talking about when I said "simplifying".

That's exactly their motivation, yes. Resisting it requires political will, or we will continue to let the increasingly irrelevant tail wag the dog.

There is definitely a case for subsidising the existence of mostly-idle gas plants to make the costs of keeping them around profitable for the medium term (you can think of them roughly as playing the role of a battery), but indefinitely subsidising the equivalent of buggy-whip manufacturers is not a long-term solution for the economy.

lambdaone··on Can rotation solve the Hubble Puzzle?
Below the Planck distance, "closer" ceases to be a meaningful concept. Similarly, distances larger than the size of the observable universe may also be meaningless.
lambdaone··on Fossil fuels fall below 50% of US electricity for the first month on record
One thing which has not been mentioned in this discussion is that the wholesale market price of power at any given time is substantially driven by the marginal cost of generation.

When renewables (including storage) can't take up the entire load of the system, that marginal generation is nowadays going to be gas power, and right now the global price of gas is unprecedentedly high.

To simplify things somewhat; the larger the fraction of the time gas generation can be turned off, the lower the annualised price of electricity will be. At the moment, we are already seeing renewables taking up 100% of the load for short periods. As more renewable capacity gets built, those periods will get longer and longer, this effect will get ever larger. In some countries this effect is expected to become significant within the next five years, even at current rates of progress, and will only get better as time goes on.

Lower annualised electrical prices will be good for the economy and the individual, and encouraging this should be a priority for any rational government which thinks more than a few years ahead.

lambdaone··on Flat origami is Turing complete (2023)
My understanding of this is that P-completeness for a problem implies that any problem in P can be transformed into it with a polynomial-time reduction. Deterministic Turing machines (more precisely, the problem of determining the future state of a deterministic Turing machine) are in P.
lambdaone··on A unique sound alleviates motion sickness
So quite literally mains hum, at least in countries with 50 Hz systems, since the magnetostriction effect makes the second harmonic dominant.
lambdaone··on Clean energy projects prioritised for grid connections
Grid connection delays are an absolute nightmare in the UK. Among other things, it's holding up house-building and thus making the housing crisis worse. This is at least a start in trying to get to grips with the problem.
lambdaone··on Zoom outage caused by accidental 'shutting down' of the zoom.us domain
That's a really fantastic typo. I know it was unintentional, but still...
lambdaone··on Wikipedia is giving AI developers its data to fend off bot scrapers
Kaggle certainly seems like a good route for this, making it easy for the many people who merely want Wikipedia data, who will now follow the path of least resistance to get it.

I doubt it will discourage the true large-scale bad actors for whom Wikipedia is only a tiny subset of what they are trying to download, and are sufficiently well-resourced that they can't be bothered to special-case it.

It'll be interesting to see how this plays out.

lambdaone··on New study reveals wealth inequality was never inevitable
Fascinating work. I'm in the process of reading David Graeber's The Dawn of Everything, so this is timely for me.
lambdaone··on Fake images that fooled the world
It's an entertainment article, and doesn't make any claim to be anything else. I'm not sure what you would prefer in its place; can you give any examples of what you would consider to be a suitable treatment of this topic?
lambdaone··on Remembering John Conway's FRACTRAN, a ridiculous, yet surprisingly deep language
I was there. I drew the artwork for the poster for the talk that got pinned up on noticeboards around the univrsity. I met Conway a handful of times, mostly at DAMTP, and he was always interesting, always with new ideas.
lambdaone··on High tariffs didn't make the U.S. rich in the 19th century. They won't this time
I feel the words "might" and "some" are doing a lot of heavy lifting in that sentence. The downsides of tariffs, though, are not hypothetical.
lambdaone··on Pakistan's 22 GW Solar Shock: How a Fragile State Went Full Clean Energy
Either local solar panels, grid power, or a combination of both, yes. And of course solar panels can also indirectly "store" power by simply reducing demand on hydro resources during the day, allowing water to back up for night-time use.
lambdaone··on Obituary for Cyc
In spite of all of this, Cycorp is still in business, and have pivoted to healthcare automation, including apparently insurance denials. I wonder if the full Cyc knowledg base will ever end up being released to the public domain, or whether it will simply fade away into nonexistence as proprietary data?
lambdaone··on Pakistan's 22 GW Solar Shock: How a Fragile State Went Full Clean Energy
Generation and storage definitely should go hand in hand, but I think the Pakistani authorities' desire is simply to have something better than the alternative of not having it. At least Pakistan has plenty of hydropower installations that could potentially be adapted to act as energy storage.
lambdaone··on Pakistan's 22 GW Solar Shock: How a Fragile State Went Full Clean Energy
This is fascinating. As the article says, sometimes the most unglamorous things can be among the most interesting.
lambdaone··on Wikipedia is struggling with voracious AI bot crawlers
It's not just Wikipedia - the entire rest of the open-access web is suffering with them.

I think the most interesting thing here is that it shows that the companies doing these crawls simply don't care who they hurt, as they actively take measures to prevent their victims from stopping them by using multiple IP addresses, snowshoe crawling, evading fingerprinting, and so on.

For Wikipedia, there's a solution served up to them on a plate. But they simply can't be bothered to take it.

And this in turn shows the overall moral standards of those companies - it's the wild west out there, where the weak go to the wall, and those inflicting the damage know what they're doing, and just don't care. Sociopaths.

lambdaone··on Taming the UB Monsters in C++
This is why Rust is the leading alternative to C/C++; it was designed from the start to both call and be called from other languages to enable progressive migration, rather than requiring an incompatible and impractical big bang change that would never happen.

The mitigations in the cited article are good too, but they don't replace the need for safer languages.

lambdaone··on Taming the UB Monsters in C++
There is some really promising-looking work on using a mixture of LLMs and formal proof techniques and/or unit testing to perform reliable and idiomatic translation from unsafe to safe languages. See, for example, https://arxiv.org/abs/2503.12511v2 and https://arxiv.org/abs/2409.10506, and https://arxiv.org/abs/2503.17741v1

The nice thing about this approach is that the LLMs don't need to be flawless for it to work, as the formal analysis / unit testing will keep their errors at bay - they just need to be good enough to eventually output something that passes the tests.

lambdaone··on How to Secure Existing C and C++ Software Without Memory Safety [pdf]
It's already been demonstrated to be insufficient; otherwise Apple software would now be impregnable. That's not to say these protections are a bad idea; they should be universal as they substantially reduce the existing attack surface - but the paper massively over-sells them as a panacea.
lambdaone··on How to Secure Existing C and C++ Software Without Memory Safety [pdf]
From the cited paper:

"These four types of integrity, do not establish memory safety, but merely attempt to contain the effects of its absence; therefore, attackers will still be able to change software behavior by corrupting memory."

and the paper then goes on to say, about Apple's implementation of the cited techniques:

"This intuition is borne out by experience: in part as a result of Apple’s deployment of these defenses since 2019, the incidence of RCE attacks on Apple client software has decreased significantly—despite strong attack pressure—and the market value of such attacks risen sharply."

"Decreased significantly" is not "eliminated"; indeed, you could paraphrase this as "the combination of these techniques has already been shown to be insufficient for security guarantees".

Which is not to say that these mitigations are a bad idea; but I think their benefits are significantly over-sold in the paper.

lambdaone··on Taming the UB Monsters in C++
I don't doubt that most of the gazillion of so lines of legacy C++ will never be rewritten. But critical infrastructure - and there's a lot of it - most certainly needs to be either rewritten in safer languages, or somehow proved correct, and starting new projects in C++ just seems to me to be an unwise move when there are mature safer alternatives like Rust.

Human civilization is now so totally dependent on fragile, buggy software, and active threats against that software increasing so rapidly, that we will look back on this era as we do on the eras of exploding steam engines, collapsing medieval cathedrals, cities that were built out of flammable materials, or earthquake-unsafe buildings in fault zones.

This doesn't mean that safer C++ isn't a good idea; but it's also clear that C++ is unlikely ever to become a safe language; it's too riddled with holes, and the codebase built on those holes too vast, for all the problems to be fixed.

lambdaone··on First-of-its-kind trial enables paralysed man to stand via stem cell injection
Possibly enables him to stand, according to the article - several other patients weren't helped by the treatment, and in the case that showed a positive effect the researchers currently can't eliminate the possibility of natural recovery causing the improvement.

But it's promising work, shows the treatment seems at least to be safe, and more research will no doubt follow to clarify this.

← PreviousPage 12 of 18Next →