Better HN
topnewbestaskshowjobs
Log inSign up

throwawaylinux

3,517 karma · joined Jul 23, 2021 (5y ago) · 2,823 submissions

Submissions

comment 3y ago · link · parent

Makes sense. Reddit moderators are even more deluded about where the site's value is than they portray its owners to be. It is certainly not in the moderation work, which many do to satisfy their need for power over others, and for each moderator there are 100 sycophants and narcissists lined up to take their place.

The value is in the users, the people who create content. And to that end the freest, fairest, and most democratic choice is the individual's private decision to participate. Closing subs to protest takes that choice out of the hands of the user. Make organic posts to the site to raise awareness of any particular issue or cause you like, and let those get viewed and voted as they will. But using moderator powers to make these statements is an abuse of power and abuse of the user base, and it's exactly what I would expect from the archetype reddit moderator. I wouldn't be too upset to see a few get their comeuppance for it.

I say this as someone who dislikes the reddit organization, the CEO, their lies and underhandedness, has been proudly perma banned from there, and would get some petty satisfaction from reading about them crashing and burning. But if people like it and want to use it and continue to participate in their communities they are a part of there, they should be permitted to.

comment 3y ago · link · parent

RISC vs CISC was intimately about implementation. John Cocke's project came about because the complexity of mainframe and other CISC ISAs made implementation difficult, as did the other RISC efforts that soon followed it.

One part of it was certainly about quantitatively adding instructions that could be used (by the programmer / compiler), but that was inextricably linked to the other side of the coin which is to define instructions that could be implemented in a performant way. Instruction complexity, addressing modes, lack of load-op, etc were all based on simplicity and high frequency pipelining. To a fault in some cases, famously branch delay slots in Stanford's architecture, a choice only explainable as a decision to complicate the ISA in order to make (contemporary) implementations simpler. Others as well though -- it's not that compilers were incapable of using or benefiting from load-op instructions for example. It's just that they were harder to implement.

comment 3y ago · link · parent

It's not increasing policing, just increasing prosections and penalties.

But yes it would also be good to also strip money and welfare from offenders and force them to pay restitution to their victims, thereby reducing the hurt from their crimes.

comment 3y ago · link · parent

You really think cheap housing is a big factor? You're looking to attract investors, entrepreneurs, and highly skilled engineers. You might stand to be a little cheaper than the bay area, but Detroit cheap isn't necessary surely. You actually want "nice" areas, and you'd want to have rapidly rising property values to encourage people to buy in and stay in the community.

Silicon valley isn't silicon valley because it had cheap property or cafes or internet cables -- lots of places had cheap housing, and the internet didn't exist when SV was kicking off. The reasons are (among other things) that it is close to some of the best technology universities in the world, had significant defense and government technology opportunities and investment over a hundred years or so. You can't just spend a few billion and pop up a new one of those somewhere.

And I'm speculating here, but the hip vibe of California and San Francisco in the 60s and 70s, and the relatively large proportion of Asian immigrants at the time quite possibly helped to draw in young, creative, talented people. Also something that's difficult to conjure up out of nowhere. It's actually a confluence of things that won't be possible to reproduce again because hundreds of cities are trying to do it so there will be no such singular center of gravity.

comment 3y ago · link · parent

A city is a large scale government program by definition. Of course a "new silicon valley" needs conducive government infrastructure, laws, support, that is necessary. But not sufficient. You can't just government programme you way to the next silicon valley.

comment 3y ago · link · parent

Every city thinks they could be the "next silicon valley" because how hard can it be? Just need some office buildings and internet cables.

comment 3y ago · link · parent

> Make the theft of the bike unpalatable without increasing the amount of policing in NA please.

Have prosecutors strongly prosecute property crimes?

comment 3y ago · link · parent

But how do we stop someone from stealing your bicycle?

comment 3y ago · link · parent

`lock ; xadd` isn't really fundamentally different than `ll ; add ; sc; b again`

The latter is a bit clunky but the core more or less implements them in the same way. Acquire a line exclusive, load value, increment it, write it back. And you can hold the line exclusive such that the conditional store failure cause is mostly a formality, and can't actually become an infinite loop.

No general purpose atomics are done by shipping the operation to the cache or to memory controllers, it just doesn't work[*]. So even if they look slightly different in the core, they all end up looking exactly the same at the caches and coherency protocols, and that is where atomics are slow. Well any sharing of cache lines updates really.

[*] EDIT: That is to say it doesn't work for performance, for many reasons. Some CPUs do have "remote atomics" something like that which does exactly this, but they are not intended to be broadly used.

comment 3y ago · link · parent

It seems to be a state that can send stale data to loads, but will get invalidated if the CPU performs a barrier.

It doesn't work of course, obviously because there is no forward progress. CPU1 can order all previous stores, then later store some flag or lock variable, and that will never propagate to CPU2 spinning on that waiting for the value.

But also because CPU2 and CPU3 can see different values depending on the state of their caches. If one had no such line and the other had a valid-stale line, then they will end up seeing different values. And the writeback out of CPU1's cache needs to write back and invalidate all possible older such written-to lines. By the time you make it work, it's not a cache it's a store queue but worse because it has to do all these coherency operations and barriers have to walk it and flash or flush it, etc.

comment 3y ago · link · parent

> I don't know what you want.

I don't want anything, I was correcting your misconceptions.

> Well, if I go by "if it's part of the memory model then it's not stale", then you can allow a relaxed ordering on single addresses without having stale data.

I don't know what you're talking about. Memory ordering is not about ordering of a single address. That's cache coherency.

[snip]

> I'm pretty sure the entire point of acquire is that you can't reorder reads from after it to before it.

And you're still wrong. Acquire barrier can be required even if you receive coherency updates in a sequential order. Barriers in modern processors do not flush, invalidate, or perform coherency operations.

This is what I mean by you can't just handwave with a basic idea about the programming semantics (which aren't particularly complicated). It's easy to think up some vaguely plausible sounding implementation of those things, but the reality is infinitely more complicated. Real cache coherency protocols are verified with formal proofs, and not because they are easy. I guarantee if you handwave a new coherency state or give up some property of coherency, you will have bugs.

comment 3y ago · link · parent

Your example was hard to follow. What do you mean exactly. Write it in terms of memory operations performed and values observed by each CPU and address, with assertions that are or are not violated according to your example.

comment 3y ago · link · parent

> I think I was unclear when I said "the cache line". I meant the one containing a releasing store.

Not sure what you mean by that.

> Let me try wording it a different way. A store_release requires all previous writes to be ordered before it. This obviously includes other memory addresses, but its own memory address isn't an exception. So even without cache consistency as a general rule, the nature of a release gives you all the ordering you need in this situation.

We're talking about cache coherency, not memory consistency. Coherency is not about ordering, it's about ensuring agents don't see stale data.

> So I meant acquire but I think there's also a clear solution based on exactly what I said.

The same goes for acquire though.

> The lines that could possibly be affected by the FIFO are all in the "Shared but maybe stale" state. Consume turns those into Invalid. So any read that's from after the Consume, reordered before it, should see those lines as Invalid.

Implementation of CPU memory pipelines and cache coherency aren't really something you can just get a bit of a feel for and then handwave about.

comment 3y ago · link · parent

> In that example I don't think anything really changes. With cache coherency a release barrier makes sure all previous stores are committed to L1, and by implication any old versions of the cache line have been invalidated.

That is not what a release barrier does.

> Without cache coherency a release barrier makes sure all previous stores are committed to L1, and explicitly says that any old versions of the cache line have been invalidated.

That is not a "normal barrier" though, writeback and invalidate operations are software coherency.

> If you had a design a lot like MESI, you wouldn't really need release semantics,

This is not the case. Release barrier can be required even if your cache coherency operations completed in FIFO order, because reordering could be done before cache coherency.

comment 3y ago · link · parent

> How would you do cache coherency in software? I don't follow.

Hardware caches which are not coherent require e.g., writeback and flushes to be coherent with other agents.

> When you read address X that refers to address Y, it's impossible to read Y and know it's the version that X refers to (or a more recent version). I would call that Y being "stale, as per the memory model". I'm pretty sure that's a normal use of the word "stale" in the context of memory models?

It isn't, because it's relative. "Most recent" is according to the observer, and if you couldn't previously observe something that is "newer" (within the rules of memory consistency model), then it is not stale.

> Imagine a CPU with a weak memory model, where multithreaded code without memory barriers loses the property of always seeing the same order of accesses to a specific address. That would break some things, but that code was broken anyway.

Not same order of access, same order of stores. If memory location x receives two stores, A and B, and CPU1 sees A, B and CPU2 sees B, A, now one thinks the location contains B and the other thinks it contains A. In the end, all CPUs can see different values at all memory locations. A normal barrier doesn't solve this, the stores are already done.

comment 3y ago · link · parent

Oh yes that must be right, I wasn't thinking (or thinking about consistency ordering). Good catch.

comment 3y ago · link · parent

> A system without cache coherency can still promise that updates won't be lost. There are lots of way to write rules around update propagation, and cache coherency is just one of them.

Not without coherency performed in software though, which is the point.

> Cache coherency doesn't protect you from stale data unless you only read one memory address ever.

It does. Observing updates to different locations in other than sequential order does not mean the data is stale. I guess that's also colloquial language issue. The data is up to date according to the constraints of the memory model.

> That depends on the memory model. You could have a system that doesn't guarantee cache coherency in general but works fine if you put in ordinary memory barriers.

What property of cache coherency could you lose and still have it working?

comment 3y ago · link · parent

The evidence was flimsy that vaccinations prevented trasmission of the disease, but that didn't stop all the "experts" spreading damaging misinformation about it though. Therefore evidence was not among the criteria that governed their decision making, so their decisions about ivermectin must have been motivated by something else.

comment 3y ago · link · parent

Yeah, no mask at all it seems.

comment 3y ago · link · parent

Well no, if you don't have a coherent system then your memory operations aren't reliable. You can lose updates or read stale data. Look at what software has to do in incoherent systems, specific flush and invalidate points which is not the same as ordering barriers.

Your CPU guarantees a lot, cache coherency to start with. But also a very well defined ordering model and ordering instructions. It's not necessarily trivial to program for, but that doesn't mean you can't trust it.

comment 3y ago · link · parent

It never presents an incoherent view to software.

I'm using coherency as in the term of art, not a colloquial meaning. Every agent observes stores to a location in the same order[*]. Cache coherency says nothing about observed ordering of stores to different locations.

[*] Although store forwarding throws a bit of a spanner in that definition, there can still be reordering occurring absent that local reordering.

comment 3y ago · link · parent

> You can't trust the hardware coherency protocol to do much for you until you follow the platform-specific rules to tell the CPU to make something act coherent.

If software has to perform some operation to maintain coherency then you hardware is not cache coherent. Which some aren't, and especially some sub-sets of operations aren't (instruction cache vs data ops, or CPU vs DMA). But for load/store operations by CPUs, they're all coherent.

Barrier/fence instructions are about enforcing ordering on when memory operations to more than one location can be performed or become visible, with respect to one another.

comment 3y ago · link · parent

They are secular indulgences. Complete fraud used to facilitate bribery and shift blame.

comment 3y ago · link · parent

You sound a little too defensive there, perhaps thou protests too much?

Only joking, but no it is not "projection". It is definition. It goes something like "people do what they want to so if they donate something to others it is because they wanted to do it and therefore it was not selfless."

It's a pretty stupid and pointless definition though, probably sprung from someone's need to economicsify human nature. Even then you can easily get around it by defining selflessness to be the selfish need to give to others.

comment 3y ago · link · parent

Not for all goods and services, no. It's not just the basic necessities for life though.

And I'd assert it's not mostly due to income inequality.

comment 3y ago · link · parent

> Post scarcity doesn’t mean “I dream of a palace and it appears.” It means basic necessities of life are available to all without everyone laboring. I think we are actually there, but have induced a scarcity economy with extreme imbalances and fake incentives to toil for toils sake.

To be clear, that is according to the definition you've made up. The commonly understood definition includes many or most of peoples' desires. Travel, housing, vacations, iphones, advanced health care, entertainment, higher education, etc.

> I think we are actually there, but have induced a scarcity economy with extreme imbalances and fake incentives to toil for toils sake.

Even in western countries, millions of people are struggling with basic costs of housing, energy, and even food. I mean people who actually work many hours every day and earn money are struggling with these things. We seem to be a long way off it even for your "basic necessities" definition.

comment 3y ago · link · parent

> Artists will continue to make art because it’s a compulsion. But I wish we had a world that was less oriented towards rewarding meaningless toil and would at least allow our born artists, writers, and creators the chance to do their obsessions to our benefit.

Everybody is an artist, and everybody can create and share art for themselves and the people around them. That is art at is best, in my opinion. Commercialization and mass production and display and distribution of "art" is what degrades it for me.

> Especially as we move post scarcity, I hope we can build a WPA like entity - perhaps, in a crazy twist, funded by AI?

Post-scarcity will never happen because even the people with mansions in many countries, billion-dollar yachts, and fleets of private airplanes do not have enough. And 10 billion people can't even live like them. Why would the people who own most of the capital suddenly collectively decide they would like to share the production with the rest of the world?

But if it did happen, we should not pay artists for art. We should give everybody enough so that if anybody wanted to paint a picture or hammer some metal into a horseshoe or knit a sweater or write some assembly code, they could do so.

comment 3y ago · link · parent

The even bigger reality is that people chase money and follow orders, even going against their better judgement or the interests of those they are charged to care for.

Anybody who believes there is an almighty assembly of "experts" out there with super-human integrity, incorruptibility, and infallibility, is sadly deluded.

comment 3y ago · link · parent

Even if that vapid saying was in any way a rule, we already know they are malicious -- this is the same person who silently edited the content of users' posts.

comment 3y ago · link · parent

It's hilarious to me that people are so petrified of wrongthink. Must not ask the wrong questions, it could be "harmful".

And the answer is not to teach people better critical thinking and fact finding skills or to teach people ways to accept and cope with the fact that other people have different opinions about things than they do. It is to convince them they will be hurt by these things and must turn to others to protect them and prevent them being exposed to such dangerous things, like like those comedy sketches of parents covering their childrens' eyes and ears when they see something profane.

1
91011
95