HNHacker News
TopNewBestAskShowJobs

pencilguin

396 karma · joined October 16, 2022

submissionscomments
pencilguin··on Ask HN: Was Donald Knuth completely wrong about good programming practice?
I frequently encourage programmers to delete comments. Any comment that answers "what" instead of "why" is a problem solved by deletion.
pencilguin··on RISC-V: The Last ISA?
"that & bool", yielding either zero or "that", is common enough, by itself, to matter.
pencilguin··on Roger Penrose: “Consciousness must be beyond computable physics”
Yes, this is what is silly.

That is not to say it's impossible that we, uniquely, possess the consciousness gene. Possession by demons is technically possible, too, and equally silly.

pencilguin··on What’s so great about functional programming anyway?
Great, but anybody who says correctness is the point of types has completely failed to understand what types are for.

Good types do work for you, so that you don't need to write the code to do that work. Correctness is a side effect, because being wrong would take more work.

pencilguin··on What’s so great about functional programming anyway?
Every big enough system has a few parts that would fit OOP, and a few parts that would fit FP. If your language supports those, then great, use those for them.

The overwhelming majority of problems do not fit OO, and using OOP on them makes a mess. Similarly, FP.

pencilguin··on Roger Penrose: “Consciousness must be beyond computable physics”
I read

  Continue reading

  Subscribe today

  with a 12-week introductory offer
pencilguin··on A Six-Figure Income Is Needed Just to Afford the Typical US Home
In 1970, there was still a middle class. Income was distributed according to the classic bell curve. Today, income is strictly bimodal. The lower-income lobe is the permanent underclass. The ragged tail of the upper class manages assets of ten million dollars or more.

Politically, it has been very useful to convince underclass voters that they are middle or even, often, upper class, and get them voting against measures that would benefit the underclass including themselves. Trump supporters helped institute policies that massively benefit the actual upper class, at their own expense.

pencilguin··on Less is exponentially more (2012)
In existing code bases, new subsystems can be fully modern.

Old code can be modernized incrementally, e.g. replacing uses of naked pointers with smart pointers and then deleting destructor code, or replacing C-style for-loops with modern range-style for-loops or calls to standard algorithms, passing a lambda. Many class declarations can be eliminated by using lambdas inline. A sweep throughout a big codebase just modernizing one kind of thing may take only a few days. This typically results in deleting a great deal of code, and all the bugs in the deleted code evaporate.

Deleting masses of code always feels great.

pencilguin··on RISC-V: The Last ISA?
It is a good way to turn optimizations into gross pessimizations.
pencilguin··on A Six-Figure Income Is Needed Just to Afford the Typical US Home
The US doesn't have a middle class anymore. People taking six figures are just higher up in the underclass. They are still incomprehensibly far from the upper class.
pencilguin··on Roger Penrose: “Consciousness must be beyond computable physics”
This has to be the silliest thing he has promoted, unless he is saying that (e.g.) quantum physics will not end up being computable. Consciousness as implemented relies on cellular processes, some of which necessarily involve quantum phenomena. It is funny to single out consciousness from among myriad other sorts of biological activity and behavior.
pencilguin··on RISC-V: The Last ISA?
Judging from the number of instructions in all its necessary extensions, RISC-V is RISC in name only. ARM ("Acorn RISC Machine") instructions are as absurdly many as x86's, which does not even pretend to be RISC. So it is silly to say RISC has won.
pencilguin··on RISC-V: The Last ISA?
RV is an open-ended collection of ISAs. Do not doubt that the number of instructions will grow as large as is found in x86 and ARM, making a mockery of the "R".

I am ready for the successor, Risc-6, already. It can retain most details of RISC-V while fixing its more glaring deficiencies. It is not a mistake to optimize an ISA for use in undergraduate courses, but probably is one to use identically the same ISA industrially.

I don't know if the worst deficiency is the need to fuse up to 5 consecutive instructions to get useful operations per clock cycle to a competitive level.

While fixing serious problems, numerous smaller incidentals could be patched, such as having chosen the architectural representation of "true" to be 1 instead of -1.

pencilguin··on How the War Was Won
Japanese codes were transparent before and throughout the war. They were not Enigma codes.

It was well known exactly when the Japanese planned to start the Pacific War, though intercepts did not say where. Many in the Navy were sure it would be at Pearl Harbor. Notably, the militarily useless battleships were there, but not the aircraft carriers.

pencilguin··on How the War Was Won
The Pacific theatre was a whole other war fought simultaneously with the latter half of the other one.

The Soviets killed up to 15 million of their own before the war even started. (This number may be an overestimate because most locales had been required to overreport their own population over the past century, such that when an accurate census was conducted, the new number lacked both those killed and also the overreports.) How many million Ukrainians were deliberately starved before the war? 2 million? 4 million? (We may compare this to Churchill personally arranging to starve 3 million in and near what is now Bangladesh, around that time.)

Neither Germans nor Soviets saw any reason to bother feeding or sheltering their POWs. Soviet POWs were treated as deserters and sent to the GULag on their return, along with many thousands of Cossacks who had escaped well before the war, and were rounded up and sent back.

We need not doubt that there was a great deal of ineptitude in the Soviet officer corps, which had been mostly exterminated before the war and then repopulated according to purely political criteria. And, we need not doubt extreme disregard for the lives of conscripts, both Soviet and many, many others shanghaied from occupied territory.

None of this is to minimize the heroism of the people sent to fight against the Nazis, subject to attacks both from their own government and from a foreign invader. Fairly early in the war (1940?) the NKVD was ordered to abandon its quota of deserters to be shot from the rear for not advancing eagerly enough.

pencilguin··on Researchers generate hydrogen more efficiently from water
It is a fact that almost half the US voting population is ready and willing to vote in somebody who would arrange never to leave office. Numerous billionaires support that outcome.
pencilguin··on Researchers generate hydrogen more efficiently from water
Ammonia trains might be a better answer.
pencilguin··on GPS does not account for leap seconds (2002)
They do overlap. Each TAI second starts at exactly the same time as a UTC second. Or two of them, sometimes.

Negative leap seconds are even worse than regular leap seconds.

pencilguin··on GPS does not account for leap seconds (2002)
Millions of apps are committed to UTC, and will not be fixed.

Fixing UTC just means not announcing any more leap seconds. Not doing a harmful thing anymore is always the best fix.

pencilguin··on GPS does not account for leap seconds (2002)
Leap seconds are an abomination. Anybody who needs astronomical time is not using UTC anyway. If necessary, we could have a leap minute in a century or two.

Google's 24-hour smear makes leap seconds, bad enough already, ever so much worse.

We could fix the problem just by never announcing another one.

pencilguin··on Researchers generate hydrogen more efficiently from water
Regional collapses have happened. This will be the first global collapse.

If it happens, it will be much earlier than you hope, as millions, then tens of millions, then hundreds of millions force their way across borders, and fascist governments ride that into power and then start a global thermonuclear war. The refugees will only be fleeing crop failure and increasingly murderous kleptocratic government.

It is already starting. Lots of governments are flirting with dictatorship, and many have got there already. US and Brazil have drawn back a hairsbreadth from the brink, but for how long?

pencilguin··on Vast Majority of People Who Invest in Bitcoin Inevitably Lose Money, Study Shows
"The market can remain irrational longer than you can remain solvent."

Irrational is contrary to efficient.

pencilguin··on Researchers generate hydrogen more efficiently from water
Not if they are careful enough.
pencilguin··on Vast Majority of People Who Invest in Bitcoin Inevitably Lose Money, Study Shows
Maybe you are not clear on what "zero sum" means?

But of course bitcoin is technically negative-sum, because miners don't pay in, but do cash out. And, some fraction of coin is lost and so not cashed out. Whoever can't cash out donated their stake.

When it gets where it has been more or less constantly falling for long enough, and everybody wants out, it will fall at an increasing rate, and everybody still holding donated their stake, too.

pencilguin··on Researchers generate hydrogen more efficiently from water
That is an interesting alternative.

You need a battery that tolerates many many cycles, and being charged at 100x its usual discharge rate. Maybe a molten CaSb battery, from Ambri.

I guess if all the cars can be wired to take in power, you just need a short stretch of 3rd rail at each charge point, say 60 m, not 1600. If each car has its own battery and drive motors, they don't need to be wired together. Relative charge rate goes to 10,000x, but the grid load stays the same.

pencilguin··on Researchers generate hydrogen more efficiently from water
Mine works down to a remarkably low temperature, but at that temperature is able to extract much less heat than the house needs to stay warm at that outside temperature. So I still burn a noticeable amount of propane, in bursts.

A fuel cell driving a heat pump is an interesting notion. The "waste heat" from the fuel cell is not wasted, here. If half the contained energy drives the heat pump at, say, 3x, you get 1.5x vs just burning it.

The extra expense of the fuel cell and heat pump seem hard to justify unless you have other uses for them. This is to say that hydrogen for home heating is unlikely to be important.

pencilguin··on Researchers generate hydrogen more efficiently from water
As cost to produce falls, it will be used in more places. Ways to store and transport energy will be among those.

LH2 is very attractive as aircraft fuel.

But I take your point: for other uses, the production efficiency counts more. Conversion to raw heat is pretty good, losing only what it takes to split the H2 and the O2, and then whatever of that heat you fail to direct to the end use, e.g. the steam that rises past the sides of your saucepan.

pencilguin··on Researchers generate hydrogen more efficiently from water
There are already places where being without a cooling method other than sweating would be fatal, at least one day of the year.

In many more places, crops are failing.

People necessarily leaving these places will need to go where other people already are.

pencilguin··on Researchers generate hydrogen more efficiently from water
The weight of one extra car will increase the operating cost of a 100-car train by 1%, give or take a bit. Using cheap hydrogen instead of expensive kerosene may save much more than that. Moving light hydrogen instead of heavy kerosene may save more than that.

If the electricity could be delivered directly to the train, the energy used would be cheaper, but installing (and replacing "shrinkage" of) many thousands of miles of "third rail" would cost a lot.

The hydrogen is not yet cheaper than the kerosene, but costs on that side are falling fast.

pencilguin··on Vast Majority of People Who Invest in Bitcoin Inevitably Lose Money, Study Shows
Anybody who doesn't "disbelieve the efficient markets hypothesis" isn't paying attention.

NRGV ("Energy Vault") was trading at a $2.4B market cap less than a year ago, and are now at $0.4B, still radically overpriced. Their product was an obvious scam before, then they pivoted to another obvious scam. The only way their stock could have any legitimate value would be if they still had $0.4B in cash, and could be prevented from squandering it. All perfectly legal, apparently.

Same for fusion startups. (It is just barely possible that Helion could have value.) Kyoto Fusioneering builds equipment to use in fusion startups' sham demos, and provides a conduit for dumb VC money into the pockets of startup founders and VCs who invest in it. All perfectly legal, apparently.

← PreviousPage 3 of 16Next →