HNHacker News
TopNewBestAskShowJobs

titzer

20,202 karma · joined August 24, 2013

WebAssembly co-founder, former V8 compiler techlead and engineer.

My programming language: http://github.com/titzer/virgil My newest Wasm engine: http://github.com/titzer/wizard-engine

submissionscomments
titzer··on Most data centers refusing to say how much water, electricity they use
FTA:

> According to the latest figures from Statistics Netherlands (CBS), data centers used 5.1 billion kilowatt-hours of electricity in the Netherlands in 2024. That is 4.6 percent of the country’s total electricity consumption, a near doubling in five years. Grid operator TenneT projects that data centers will consume 10 to 15 percent of the Netherlands’ electricity by 2030.

Yeah, so 2030 sounds like a long way off. It's 3 years away. We are not going to be meeting any climate targets.

titzer··on AI companies leak data to advertisers [pdf]
Not surprised. Just wait until they bake the goddamn advertising right into the model.
titzer··on The Test
You're talking millionaire problems and I'm talking billionaire problems. You're not getting to the billionaire class through any self-started farming business.

Billionaires are sitting in board rooms paying millionaires to deal with all that bullshit why they are just trading stocks left and right and play shell games with businesses. They're at a completely different level of capital class and wouldn't touch a blade of grass.

titzer··on The Test
I guess you'll be avoiding any thoughts that require you to do basic mental arithmetic from here on out. It actually won't be as blissful as you think. Trust me, no one envies your inner world.
titzer··on The Test
> "Hey Claude, can you be smarter than me and tell me what I should tell you to get the thing I don't know I want yet?"

I'm so glad you asked! Many smart people are now eating Snickers Bars(tm)! For you, I think, to get ahead of this trend, it would be the perfect smart person choice right now. It's nutty and has this amazing new invention called Nougat and chocolate!

Here's how it works. First you have to use your fingers to tear open the wrapper. Don't worry, the wrapper isn't going to hurt you. It might be a little effort, but you'll get it. Then you take a bite. Try to use your back teeth to chew it a little. Yeah, I know it's work, but it's good for you. And then just swallow it down!

Anything else I can help with?

titzer··on The Test
These people get wealthy by making a pyramid-shaped apparatus that funnels the actual productive output of their employees up to them.

> like expecting to use my lawn for your picnic or vegetable garden if I pay you to mow it twice a week.

The analogy is flawed. It'd be more apt if you were selling grass clippings and they were paid to run the business of growing and cutting the grass. If you just own the land and call the shots, then sure, you're doing work too, but ultimately the resource that is of value to other people is primarily produced by the work of others. You've created an apparatus and put in work, and have earned (in some sense) compensation for enabling that. That's what most people would agree is equitable. But now we have corporations and stock; that adds a whole other dimension to this where you have a side hustle of selling future revenues in the form of stock on the open market, but retain privileged stock for yourself. The price of that stock goes up, you get disproportionately rewarded for that price increase. But even worse, when the market has a lot of money available for speculation, it can inflate the price of the stock far beyond what your employees can supply in terms of grass clippings (inflated price/earnings ratio). Your employees get zero of that inflated speculation bubble, but are absolutely the underlying value. In today's hyper growth world, the disconnection between revenue, growth, and valuations is worse than ever. Billionaires exist in this super-inflated valuation bubble that is completely disconnected from the grass clippings business.

titzer··on The Test
> Wealth is created.

What creates wealth? Mining raw materials? Work? Ideas? Services? Do you think any billionaire has created this wealth in these ways? No, they "create" a billion dollars by creating not value, but valuation. If it's a public company, they issue stock, which people buy for money. In the open market, the price of the stock goes up. Their valuation goes up. Their currency goes up.

Billionaires become billionaires by creating indirections of wealth. They create currencies. Like bankers, they create wealth by lending money they don't have. Those stock certificates are a currency, and trading the currency on the open market pumps up its valuation. Who buys it? People who think they too can make money off it in the future. Who pays them back? Maybe with dividends? Who makes those dividends? Who creates revenue? Mostly the organization they create.

There aren't words you say sitting around your desk that will create a billion dollars. But the desks they sit at, they can say words and a billion dollars are "created." I think that's what you don't want to admit. Their decisions are just amplified by a huge apparatus that they sit at, and the market scrambling to snip off a little profit by trading their stock in the future.

Sure they have businesses and things, but holy cow, we lionize the words they say around desks like it's some kind of magic holiness. I just don't get it.

titzer··on The Test
> Makes no sense.

It makes no sense if you reason backward from "I should be allowed to have infinite dollars" as a premise. You simply can't do enough work to create a billion dollars[1]. It is just not physically possible to create that much value through sheer effort, nor is it even possible to keep that much value stored anywhere you can physically defend yourself. We're not talking about some chest of gold you keep in a bedroom closet in your very big house. It's so much more than that. Every billionaire is a beneficiary of a large organization of hundreds, usually thousands of people, that they've managed to put themselves at the top of or make a direct beneficiary of, or owns a special kind of currency that the markets have inflated to a valuation. Similarly, defending the integrity of a sprawling set of assets like that takes a virtual army of security, even if it's just the stock certificates you supposedly have in your name.

And I reject the premise that there isn't a limit on ownership. Ownership is a social construct. Ownership requires a functioning justice system and police force to maintain. Both of said things are collectively agreed upon social contracts that absolutely are negotiated. If you disagree, then by all means, build a moat around your island with a trillion gold bars and man it with automated sentry guns. No one does that because we've negotiated a system that actively helps wealthy people maintain their wealth and defends them against pitchforks, which have a nasty habit of turning up when said justice and organization breaks down and leads to anarchy.

Don't want anarchy where rich people a lynched by mobs? Well, yeah, that's why we negotiate limits. I'm saying the social contract just doesn't let you have more than a billion dollars.

[1] And incidentally, one cannot even enjoy that much wealth, even if they dedicated themselves to it! The kind of enjoyments that us regular people enjoy, like hockey games and surf trips, wouldn't even put a dent in a billion dollars, even if done for a lifetime. It's absurd that we think hundred million dollar yachts and private jets for the lucky ones are a birthright of our system or something. Because that's what we're really talking about--obscene wealth, not just living comfortably.

titzer··on The Test
I don't think it's unreasonable to limit a person's total wealth to, say, 100x the median person's lifetime earnings. In America, the median income is about $50k/yr. So 40 years as a wage earner means $2 million. With compounded interest, inflation, and wage growth, it's still under $10 million. So if we capped individual net worth at 100x that, it'd be $1 billion.

The fact that we live in a society where people don't bat an eyelash at people who have literally 100,000x the median lifetime earnings of a person (literally, 1000x what I personally consider reasonable) and yet want more says that our society has passed one of these absurdity tests and just suck down whatever stupid propaganda they promulgate.

titzer··on I'm Tired of Being on the Network
> I can't name a single reason I'd upgrade

Oh, I can. The next version of Android won't run on my current phone, and the official FLIR ONE app that drives the plug-in IR camera that I use to hunt for cold spots in my house for better insulation decided it would uninstall itself because they won't support "old" Android--I mean, they won't support the Android they already support.

So my phone just existing for too long has caused the software to commit suicide, making another piece of hardware I paid good money for not work anymore.

That's not so much a reason to "upgrade" as throw good money after bad money by buying a phone that I don't need to get an OS I don't want.

I mean, they could have just left the goddamn app alone. But they didn't.

titzer··on Meta VR Glasses
Is it just me or do those angles deliberately obscure how thick it is lens-wise? I have a pair of X-real airs, 2 years old now, and they're pretty thick. They're 1/4th the price and basically work as a head-mounted display. Is that what this, but way fancier and more sleek?
titzer··on There is no epidemic of loneliness, but there is an epidemic of scurvy
The don't get a direct kickback, but there is an absolutely massive campaign to influence prescription decisions right out in the open:

https://www.bmj.com/content/385/bmj.q781

FTA:

> Some 57% of US doctors received more than $12bn in payments related to medical drugs or devices from manufacturers between 2013 and 2022, an analysis has found.1 “Despite evidence that financial conflicts of interest may influence physician prescribing and may damage patients’ trust in medical professionals, such payments remain pervasive,” says the letter in JAMA.

titzer··on 'We hacked the FBI:' Hackers say they have data on all FBI employees
And the city wonders why I don't want to put my credit card info in their crappy parking app and would instead prefer to put a quarter into the meter for 30 mins.
titzer··on AMD's random number generator can't generate a 0?
Parent is right. Use of uninitialized memory is UB, and incidentally, the type of UB that the C standard is not working to define, but is relying on sanitizers to find in source programs, since it is considered always a bug.

This entire thread has a lot of "no security issues have ever been found in my code, and I test a lot. Therefore no bugs will ever exist in my code and we're all safe." To see you doing this in an explicitly security-conscious setting is distressing.

If anything, I see assertions like this and juxtaposed with blatant, willful misunderstanding of how C and C compilers work and it does the opposite of inspiring confidence.

Look at CVE-2009-1897; this is the classic example of how C compilers are happy to try to optimize code in the face of UB and lead to worse problems.

> If the above code has any but one of the above 16 outputs

I don't think you understand how insane optimizations in the face of UB can be. Just go look at this issue:

https://github.com/llvm/llvm-project/issues/174844?utm_sourc...

titzer··on What Sun got wrong
Agreed. When I was in the labs (2007 - 2010), my workstation was an AMD with Solaris on it, with a modern window manager and all, with IntelliJ and a great development environment. I almost didn't know it was Linux. But by then the ship had long sailed.
titzer··on Turn off and restrict access to Apple Intelligence features on Mac
> disk space

I honestly do not understand what the 28GB Tahoe update contained. Like, I cannot imagine what all the code does. It'd take a lifetime to actually go through it all, and yet, here I am just using the same programs I did before it, just with rounder corners and some other pretty things. Actually wait, fewer programs, because some things break or have markedly less functionality.

titzer··on NASA’s Mars Sample Return mission is dead
The way things look, everyone in Trump's orbit is just grifting off the government directly or using it to their personal advantage, including his own children. He literally said "Every time my kids invest in a stock, they have inside information."
titzer··on Attention is all you have
Ok but why "find me a book that explains how car insurance works" no find book that explains how car insurance works but find exactly one car insurance company?

...because advertising

titzer··on Attention is all you have
> every other modern app tries to claw your eyes out.

They do, and it's annoying that even apps for "real work" do the same thing by flashing notifications/tips in your face, advertising a new feature you don't want to use right now, or warning you that everything is about to break soon.

titzer··on What Sun got wrong
I worked at Sun labs and used a Sun Ray daily for a whole summer. It worked...OK. Definitely not "Incredibly well". We had a network of a few hundred Sun Rays and two E10Ks backing it. More than a million for the servers and $1000k a piece for the Sun Rays was not cheap. Basically any $1000 laptop was more powerful, without the need for a crazy powerful Sun server. The experience of taking out my ID card, walking down the hall to another cubicle and popping it in and getting my session was magical. But I did that less than once a week, so I don't think it was overall worth it. The Sun Rays also had a pretty crappy LCD, about 1-2 years behind the SoTA.

It was a cool idea. It will keep coming back again and again. But at Sun's price points around the early 2000s, it was a loser, and I actually agree with the market in this instance. Sun Ray was a flop.

titzer··on What Sun got wrong
I interned for Sun and then worked as an MTS in Sun Labs for a couple of years. I miss Sun; I think they were very much an engineer's company that was spoiled by two things: big success in the early workstation market, and the dumb luck of the dot com boom. Sun hardware was solid (even though they fell behind the curve because of mismanagement of a couple of CPU lines), and its kernel (Solaris) was one of the well-engineered kernels ever. While any business makes some bad business decisions from time to time, one thing that was fatal was a crippling enterprise focus that failed to understand the huge growth opportunity that OSS and Linux represented. It was growth in a direction they not only didn't understand, but refused to understand, study, or adapt to.

Sun's heyday was in the boom. The fish were jumping in the boat. So naturally they were building bigger and bigger boats.

There was always the one-off ideas that might have gone here or there, but that core server cow just seemed like an endless source of cash. Thus they neglected the workstation market and ironically, the market for anything bigger than one single server rack. They didn't understand horizontal scaling, and the rise of cheap-but-replaceable consumer hardware like how Google did things was alien to them. They poo-poo'ed Linux, they killed and then unkilled Solaris x86, and a number of other things.

I do miss Sun though. As far as engineering goes, they were a very serious company full of serious engineers. Basically the polar opposite of 10X tech bros and startup culture.

titzer··on ChatGPT now knows what you do on other websites via ad collector
It's because capitalism won the (absurd black-and-white framing of the) cold war, with America as its the biggest winner. We don't even recognize the level of propaganda that has gone into convincing us all that "markets" are the best optimizer ever designed and that profit equals morality--we just accept these as base principles without questioning them. Surveillance produces profit? Well let's have more then.
titzer··on Fujitsu launches made-in-Japan next-generation CPU FUJITSU-MONAKA
They actually do not in that article. I had to look elsewhere to find that out. Weird, one would expect that a big announcement like this would probably need to be vetted against licensing agreements with Arm that would probably want that fact to be prominently highlighted in press releases.
titzer··on The American Religion of Self-Storage Facilities
Well, for generations now, exponential growth in all things has been state policy and it was good (tm). Because of population growth, there's always a shortage of housing. Population is projected to peak this century. Whatever will we do when there are already enough houses for everyone to have one?
titzer··on Small programming tricks
I keep a ~/scratch.txt file and a bash alias "scratch" that will just grep it. Then I put a lot of relatively infrequently-used but often-forgetten command recipes in there, so that I can just do "scratch keygen" or whatever and it will find it. It persists longer than bash history.

If anything, I wish I had paid a lot more attention to this in the early days and made a nicer shell environment full of my own utilities, as I felt my skills just kind of slowly erode over the years with each migration. Make a nice little nest for yourself and curate those tools as your own (text) UI.

titzer··on Compiler Can Undo Your Security Checks
Thanks for pointing to this. I'm surprised the specification verbiage differs so much between the two standards. However I think the language for C is aspirational and there are cases where compiler optimizations will fail this.
titzer··on Compiler Can Undo Your Security Checks
> I don't know where it is that people have imagined this is something the C and C++ language designers went out of their way to foist upon you.

They did. Most other languages, the vast majority of which are also memory safe languages, go out of their way to do the opposite, and give meaning even to erroneous programs. Some things slip through the cracks, and generally language designers and implementers work hard to get rid of UB.

C/C++ is the only ecosystem that has fully embraced UB as a way of life. They are the only compilers that make full use of "UB is bad and cannot ever happen" as a core tenet in how optimizations are designed. Rust UB is at least a little different. Rust UB can only be the result of unsafe code and is meant to be limited in blast radius, and is absolutely not meant as a loophole for compilers to just do whatever to make the code faster.

C/C++ have a surprisingly large set of UB, too. Thankfully, the rest of the software world is rising up and the committees are starting to make things like gasp signed arithmetic overflow into defined behavior.

But don't hold your breath.

titzer··on Compiler Can Undo Your Security Checks
I don't think this is true. You're going to have to point to the exact place in the spec that says this, because optimizations in the presence of UB in most compilers make absolutely no assumptions.
titzer··on Compiler Can Undo Your Security Checks
> The compiler is allowed to transform your code if it can prove that the result would interact with the outside world in exactly the same way

Well, in C/C++, as soon as your program has one UB bug, the compiler has absolutely no obligation whatsoever.

titzer··on The EPA is planning to scrap public review rules for data center pollution
> Most of that sort of industry is in poorer sections of states where the municipalities are constantly being hamstrung by their own state

Oh yes, the well-known path to riches by being a toxic dumping ground.

Page 1 of 34Next →