wahern
Joined 12 years ago
Joined 12 years ago
It's an extension to TCP that, similar to QUIC, allows you to use multiple address/port pairs to transmit data over a single logical stream. Both client/initiator and server/listener have to opt into the extension. This might need to be enabled explicitly by the application[1], which Go apparently does for you, or judging from other posts may be enabled by default systemwide, depending on your platform.
AFAIU, a major user of MPTCP is Apple and the iPhone, and the ubiquity of iPhone clients motivated implementation in and deployment on Linux servers.
[1] https://docs.kernel.org/networking/mptcp.html#sockets-api
Notwithstanding that they were examples of extra-legal discrimination (in the sense of not being direct legal prohibitions), racial covenants and red lining also didn't just effect black Americans, though nationwide they were disproportionately impacted. I only point that out because most people would say it was incongruous to claim Jews or Polish or Asians were legally prohibited from owning land in many areas.
I think it's an important distinction because there are vestiges of redlining that persist today. First time homeowner mortgage subsidies, the first major stepping stone for building wealth for most people, effectively exclude many kinds of multiunit housing, such as condos and, IIRC until recently, attached housing like duplexes. This disproportionately impacts prospective urban black homeowners, and quite deliberately. Likewise, IIUC prefabbed homes or similar are excluded, which disproportionately impacts poor rural whites and blacks alike. There are legitimate concerns behind those restrictions, such as developer and rental fraud, just as nominally there were legitimate concerns behind redlining, namely sustainability of property valuations. Though in all these cases it's obvious the reason they persist(ed) as-is is for largely discriminatory reasons, as the legitimate substance of the concerns could be addressed. At the same time, we wouldn't say they legally prohibit ownership; if you're wealthy enough they're no impediment at all, just like redlining and covenants were no impediment if you were wealthy enough (racial covenants could be overcome by just buying up all the adjacent property so there was no other property owner to enforce the covenant; the government couldn't by itself enforce such covenants, only adjoining property owner "beneficiaries").
Perhaps counterintuitively, black letter property law was one of the legal areas most resilient to both racial and sex discrimination. The 1800s saw some regression, but that didn't last long, often because courts themselves couldn't tolerate the illogic. People criticize it, but property is indeed sacrosanct to American legal and political culture, and it was very difficult to carve out exceptions that permitted blacks and women to be excluded without threatening the underlying principles of the system that secured owners' rights. That's why prejudiced treatment tended to come in the form of private, regulatory, or extra-legal discrimination, which arguably persists today in the form of restrictive zoning and related development policies which not coincidentally are impediments to free & clear property ownership, just enough to be tolerable to the well-off while disproportionately impacting the real targets.
int foo(int (*bar)[10])
In particular, sizeof(*bar) and (in C2y) countof(*bar) will do the correct thing. But you need to dereference bar almost every to use it properly, and unfortunately sizeof(bar) instead of sizeof(*bar) will compile cleanly, though countof(bar) is guaranteed to fail.The dilemma is C's array to pointer decaying semantics. C2y will try to roll that back somewhat (a[i] will no longer be identical to i[a] via the a[i] == a + i == i + a transitive relation), but there's only so much you can do in that regard, especially for array passing, without new syntax or silently breaking alot of valid, proper, carefully written C code. There's too much that can fall through the cracks by relying on non-standard compiler heuristics to substitute for proper typing.
[1] Strictly speaking a VLA can only be created as automatic storage objects, but a VMT can type dynamically allocated (malloc'd) memory. But the syntax looks like a pointer to a VLA because it originates from the need to pass actual VLAs as parameters.
IIRC, one of the problems there is how to generalize it to, e.g., struct members. (Maybe you can speak to that.) The approach adopted by C99[1], being based on dependent typing, was I think better conceptually. But despite dependent typing being awesome, it manifestly was and still remains a tough sell to compiler implementors, so VLAs/VMTs have languished in C and have yet to be fully developed. I think I'd agree C would have been better off with the approach you suggest. Adoption likely would have been quicker, and it could have been implemented in full almost immediately.[2] The consolation prize is that hopefully C will soon see some progression on the VMT front, specifically the proposals under discussion on the committee for forward-referencing in function parameter VMTs and VMT struct array members. The final piece of that puzzle would be addressing the scary syntax for VLA passing, which feels error prone (C2y countof operator semantics help a little bit).
[1] Tom MacDonald, Variable Length Arrays, December 1989, http://jclt.iecc.com/Jct13.pdf#page=67
[2] Ironically GCC already had nascent VLA support, which may have helped nudge the C99 committee toward that instead of adopting Ritchie's approach. But the fat pointer approach has a more obvious and straight-forward implementation.
Ironically C is the only language in that list with a dependent type. It's not _Generic, of course, but variable-length arrays (VLAs), which neither C++, Rust, nor Zig have.
Go does a great job of making these impose minimal cost, both technically and cognitively, on typical platforms, from server (including many "embedded" server environments) to desktop to smartphone. That's why it has such a sophisticated yet largely transparent user space threading layer. But it's very difficult and usually impractical for Go to target extremely resource constrained environments without exposing and crippling it's core abstractions. Some people are willing to contort Go to fit that space, but perhaps that's because their vision of what makes Go, Go, differs from the creators' and core maintainers' understanding of Go.
Doing so can prevent regulatory capture and shelter enforcement from the vicissitudes of politics. It also doesn't require maintaining a government workforce. OTOH, you have to be careful what you ask for. Unless a law is very narrowly tailored then ubiquitous enforcement can have it's own problems, e.g. CEQA.
Same thing applies to mental arithmetic. There are techniques for doing this. IIRC, ironically there's a famous case of someone who claimed to have memorized some hundreds of thousands digits of Pi but was suspected of using mental arithmetic techniques when reciting them.
Still, your point stands. People do embellish these kinds of stories based on stereotypes. It's certainly possible, but any particular anecdote may still be suspect.
EDIT: The radio show was Science Friday, October 15th episode, "Why do politicians talk like that?", https://www.wnycstudios.org/podcasts/science-friday/articles...
Is it impractical to never send a message through Google? Probably, depending on the circles you communicate in. But that's not the same thing as saying it's impractical to avoid Google for most of your messages, and certainly not the same as saying you can't avoid GMail for anything.
That doesn't track. Apple iPhones are a major user of MPTCP and they report the majority of requests supporting MPTCP, IIRC 70+%.