Hacker Newsnew | past | comments | ask | show | jobs | submit | secondcoming's commentslogin

all your GPUs are belong to us

Is this still true? New versions of protobuf allow codegen of `std::string_view` rather than `const std::string&` (which forces a copy) of `string` and `repeated byte` fields.

https://protobuf.dev/reference/cpp/string-view/


It allows avoiding allocations, but it doesn't allow using serialised data as a backing memory for an in-language type. Protobuf varints have to be decoded and written out somewhere. They cannot be lazily decoded efficiently either: order of fields in the serialised message is unspecified, hence it either need to iterate message over and over finding one on demand or build a map of offsets, which negates any wins zero-copy strives to achieve.

This is true but the relative overhead of this is highly dependent on the protobuf structure in one's schema. For example, fixed integer fields don't need to be decoded (including repeated fixed ints), and the main idea of the "zero copy" here is avoiding copying string and bytes fields. If your protobufs are mostly varints then yes they all have to be decoded, if your protobufs contain a lot of string/bytes data then most of the decoded overhead could be memory copies for this data rather than varint decoding.

In some message schemas even though this isn't truly zero copy it may be close to it in terms of actual overhead and CPU time, in other schemas it doesn't help at all.


The win could be only decoding the fields you actually care about, rather than all fields.

It's the same for any other high performance decoding of TLV formats (FIX in finance for instance).


Those field accessors take and return string_view but they still copy. The official C++ library always owns the data internally and never aliases except in one niche use case: the field type is Cord, the input is large and meets some other criteria, and the caller had used kParseWithAliasing, which is undocumented.

To a very close approximation you can say that the official protobuf C++ library always copies and owns strings.


Well that is very disappointing news.

Even the decoder makes a copy even though it's returning a string_view? What's the point then.

I can understand encoders having to make copies, but not in a decoder.


Google really dropped the ball with protobuf when they took so long to make them zero-copy. There are 3rd party implementations popping up now and a real risk of future wire-level incompatibilities across languages.

"zero copy" in this context just means that the contents of the input buffer are aliased to string fields in the decoded representation. This is a language-level feature and has nothing to do with the wire format.

If a user of S3 knows that directories aren't real why would they expect directory-related normalisation to happen?

Precisely because of it. On Linux, /bin/bash, //bin/bash and /bin//bash are the exact same file, the same inode. They look somewhat off to people, but they're entirely harmless, so cleaning that up is an aesthetic choice, not something important.

On S3 they're different. Using the wrong paths causes weird issues, like not finding things you expect you find, or storing multiple versions of the same data out of sync.

Normalizing // to / means making S3 behave more like people expect.


What even is a 'clobber build'?

Sorry for being unclear. I'm using Firefox build system lingo without explanations. It's from the command `./mach clobber`, which is similar but not the same as `make clean`. I use 'clobber build' as "a build with no existing build state" and the qualifiers "cold" and "warm" to indicate if cache is empty or filled.

Ah ok, thanks

How long would it take for the heat to be depleted? Humans have only managed to drill something like 12km into the earth because it gets too hot to go further.

If it were possible to access all of the Earth's stored geothermal energy, probably a very, very, very long time.

But if we're open to applying a quantitative timescale threshold to the thought experiment, at which we can argue geothermal is renewable, that raises the question for nuclear. If we could access all fissile uranium and thorium on Earth, how long would it take for us to deplete its stored energy? Does that mean nuclear energy is renewable?


I find that sometimes changing the font in my IDE can give me an inexplicable boost

> Imaging being able to work on a branch stacked on a coworkers branch while you’re both constantly modifying them

I think that's something I don't want to imagine


The advantage of VMs is that you can nuke them and be done with it if you need to.

I use my personal laptop for $WORK and everything work related is done via the VM.


I can do that too by just rm-rf the agents home directory


> If collapse happens, it notes the UK does not have the ability to absorb global shocks through higher domestic output. It lacks enough land to feed its population or rear livestock to maintain current consumption patterns and price levels.

Yet they're pushing to use farmland for solar farms and social housing.

There's a real hatred of farmers among the UK Leftist/Green crowd.


Farmland is ~69% of the total area of the UK with it being quite stable in the last decade, and most of that being grassland. Solar accounts for ~0.1% of (former) agricultural land, and after 2030 it should be around ~0.6%. The Land Use Framework aims for 1% of land (mainly agricultural, so ~1.5% of ag) for renewables by 2050. Housing doesn't have as comparable figures, but I'm envelope mathing it to about 1.5% by 2050 again. Which makes 3% of ag land, of which crops are roughly 1/3rd, and google says 60% of solar is on good crop land. So a reduction of up to ~6% at the top end.

There are a few flip-sides here - things that many don't like to hear or acknowledge:

There are alternate diets that are suitably nutritious that are achievable on this land, largely by reducing meat consumption. Meat production uses much more land than other food sources, and a lot of that is input crops. Its inefficient. A change in diet can make the UK self-sufficient on much less land.

Solar is a developing technology; it will improve, requiring less land for the same production. If long term trends push up the value of crops and down solar production, the panels can be removed and crops grown instead - its either/or but it is reversible. This is especially important for bringing in non-solar power sources which take longer to realise (nuclear, tidal). I will also note that solar farms are built on the good crop land because it is convenient and the price is right. We will see south facing hills covered soon enough.

Housing and social housing are the same problem; where housing prices are so high compared to salaries, social housing demand increases. Building houses - any houses - solves the problem. The question of density, location, style is a question about what kind of problems we want in 10-20 years time. High rises did not work well at all.


> > It lacks enough land to feed its population or rear livestock to maintain current consumption patterns and price levels.

> Yet they're pushing to use farmland for solar farms and social housing.

Cities, you may note, never ever make enough food to feed themselves. Always been true, everywhere and everywhen since the invention of the city.

Farmers choosing between cash crops and food crops was literally a game the teachers got the kids to play when I was in school in the 90s. Cash crops, and PV is kinda a cash crop, let you make enough money to buy food. That said, how much money depends on what industry you have to use the power, because nobody else in the world will care for the £ if the UK employment consists entirely of baristas, hairdressers, and Amazon warehouse staff/delivery drivers.

The biggest problem with using farmland for social housing is that a lot of the good farmland is a flood risk.

But the only case where the UK has to care that it doesn't make enough to feed itself is if the economy becomes an autarky, at which point it cannot help but suffer a massive population reduction because it's a small island quite close to the arctic circle which has spent or depleted most of its natural resources, first the wood (1600s-1700s), then the coal (1930s or so), then the fish (1980s or so), then the natural gas (early 2000s).


I don't think it's been possible to feed the UK domestically since before WW2.

I note you put the word "social" in there; very little social housing is being built, it's mostly private. Agrivoltaics are also possible, but of course everyone would rather do the politics of emotions ("hate farmers") than discuss the issues. Such as how we grow enough electricity, too.


https://animal.law.harvard.edu/wp-content/uploads/Eating-Awa...

This covers moving the UK to self-sustain by reducing animal products and repurposing animal feed cropland to direct consumption cropland; it also covers reforestation.

So while it isn't possible today, its possible to become possible without relying on any technological advancements.


> I don't think it's been possible to feed the UK domestically since before WW2.

Of course you can, I know people being almost self sustainable right now on very little land. It is hard, frugal but highly rewarding and we have evolved to do it since very recently.

Energy and heating is a bit more complicated. We obviously cannot burn wood or coal like we use to because this is actually very damaging to the planet. So this is where technology has to play a bigger role.


Farming might feel rewarding while watching someone else do the hard work. I watched and had to help my grandparents do it and went through my own decade of "farming" and it never gets easier and you only get older.


> ... "it never gets easier and you only get older."

Hence why traditionally farmers either had large families, hired outside workers, or most often did both.

(Source: I grew up in rancher/farmer territory and earned some of my earliest "spending money" working for local farmers or ranchers during harvest season.)


> Of course you can, I know people being almost self sustainable right now on very little land.

Please run the numbers for UK farmland divided by UK population.


The farmers are the ones selling the land off and living off the million pound proceeds

Farmland is worth £100/acre/year, at most that’s £3k an acre. But people pay £10k because it’s a way to avoid tax and if you get the right planning permission a way of making millions.


There's certainly a justified hatred of faux-farmers of convenience such as Clarkson et al.

I suspect that's the hatred being mischaracterised and amplified by the GBNews Farrage crowd.


No. It's because farmers sometimes pollute rivers (despite household sewage being pumped into UK rivers daily), want to kill badgers to stop TB spreading, and because they work large areas of land they're obviously wealthy.


Sure, someone always believes such things, .. is that really widespread and a core belief of the "the UK Leftist/Green crowd." ?

The constant observation made about the UK is there's always an excess amplification of what various groups are alleged to believe.

Last I checked, the current King is in the "Leftist/Green" camp and pro-farmer. (by default, he'd be "UK" and not a "crowd" though).


Is there any strong evidence that killing badgers reduces bovine TB?


To his credit Clarkson has done more form farming with his show than countryfile or the archers has done in decades.

He bought it as a tax break, but I’d leave not ire for “farmers” like the musician and vacuum cleaner salesman.

Nothing caused me to laugh more at the “woe is the millionaire march” than seeing Lloyd Webber and his dog out on the march.


> vacuum cleaner salesman.

Dyson? Sure - he seems performative (from afar, I'm antipodean to this BTW) with his industrialised strawberry wheels etc.

> the musician

Lost me .. I'm sure the UK has a few gumbooted millionaire class rockers / composers - I'm guessing that's a throw at the impresario of musical theatre with a life peerage who is rarely seen cutting hay.

I'm not sure I'd class either of those as farmers (by our local understanding), and Clarkson smacks of content farmer cos player more than generationally consistent production farmer .. but perhaps he might get there.


Andrew Lloyd Webber. Billionaire composer of musicals like cats and phantom. Also a farmer apparently, owning thousands of acres and befitting from the tax breaks and hope value.

They either employ people to farm the land (like Clarkson did I to 2019, and indeed stop does), or rent the land out for a tiny return on investment in the 1-2% range while avoiding the only tax that even attempts to fight against the aristocracy


Sure, land owner .. not farmer, as the term is used here.


He owns thousands of acres of farmland and benefits from the tax breaks, hence him turning up protesting removing those tax breaks.


There’s no real hatred of farmers on the left, other than the fact that farmers generally vote small-c conservative.

There’s certainly a hatred of land owners, and vast amounts of UK farm land is privately owned, renting the land to farmers. It’s the right wing parties and press that takes that to mean that the left hate farmers.


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: