146 karma · joined January 26, 2016
Do not agree. That's not an optimization it's just false reasoning. Reasonable would be to either ignore it so the code depends on the uniitialized data, whatever it is, or to flag an error. Also according to the standard, static variable of arithmetic type are initialized to zero by default so there is no UB at all.
Second example has the same problem.
Third example has, for example, assumptions that C does not let the compiler make e.g. that z is a restricted pointer. Imagine that f(int c) { z = getsamepointer(); z +=1;return *z; }
And none of those optimizations existed in the 1980s.
Returning a pointer is certainly a use. In any event, the prevailing interpretation makes it impossible to write a defined memory allocator in C.
If a program writes through a dangling pointer and clobbers a return address, the programmer made an error and unpredictable results follow. C is inherently memory unsafe. No UB based labrynth of optimizations can change that. It is not designed to be memory safe: it has other design goals.
There is no free market in labor under the rule of "do this work or I will whip you to death or worse." There is no free market in real-estate under the "we are going to murder your entire community and take the land". You have a misleading story about economics/government which only works if you discount the brutal grotesque treatment of captive labor as if the human beings caught up in the machinery of slavery don't matter. That's not just bad history, it is morally repellent.
Except for the iceberg, the Titanic sailed safely. You don't know anything about the economics of US slavery - which was enormously big business and affected the entire development of the US economy.
Your theory about stealing native american land is ridiculous. There is no free market if your economy depends on piracy. You're trying to use some legalistic card trick to pretend that something is not what it is.
Married women had no property rights: therefore they could not be participants in a free market.
You have a narrative totally at variance with actual history, but it fits some ideological point you want to make. You would be better off trying to understand why your ideology is so incompatible with empirical reality. The end.
That's the funny part of Paxos. Paxos is specifically sold as a multi-proposer protocol. The most subtle and hard to understand part of the protocol is the clever 2 phase proposal election with value inheritance. But it's all pointless because in order to make the system work you need a single coordinator you elect using timeouts or reliable message protocols.
If I was cynical, I might guess that the purpose of Paxos these days is to generate expenses and technical failures for Google's competitors.
https://www.yodaiken.com/2018/07/16/practical-uses-of-synchr...
Viewstamps depends, implicitly, on timeouts. You send a message a number of times and if you don't get a response, you abort. In the completely asynchronous world, there is no way to do that.
The key is to decide whether timeouts work in your network. If timeouts don't work and you don't have some reliable message protocol, then nothing works. If timeouts do work, then a completely simple obvious brute force algorithm works. In this algorithm, we have leader/coordinator election. The leader then polls the acceptors for the highest sequence number of a committed message and recovers all missing messages. Then the leader starts sending new messages - increasing the same sequence number. The old leader, if it recovers should know that its lease as leader has timed out, but if it does not it cannot get acks from a majority of acceptors for a new message because a majority have signed on to the new leader. There is no "value" competition - only a competition for the id of the new leader during leader election. We don't need Paxos at all.
A large part of the population was forced to enage in hard labor for nothing under a terroristic regime - creating an enormous amount of value (by 1860, the "mortgage" value of US slaves was greater than the value of the entire industrial plant). Women had no property rights. There was an ongoing genocide of native americans and wholesale siezure of their property.
If an acceptor does not receive a message from the coordinator over a sufficient period,it times out and tries to trigger a new coordinator election
Coordinator election: try for t time units to get a majority of acceptors to accept your proposal to be coordinator. give up on timeout or notification that there is a running coordinator.
This is the simplest method and not the most efficienct, but it is both live and safe.
Chang/Maxemchuk propose to make stage 2 more efficient that acceptors be arranged in a cycle and messages from the coordinator be numbered sequentially. Then each acceptor takes a turn to broadcast its accept but only does it if it has seen all prior (lower numbered) messages and their accept message responses. on each cycle completion, the coordinator can commit the first message in the cycle.
https://www.yodaiken.com/wp-content/uploads/2016/10/paxos.pt...
Embarrassingly badly written Lua code for the simulator https://github.com/yodaikenv/consensus
The key to me is that once you accept the need for leader election, you have much simpler alternatives and can toss away the rest of paxos.
The really annoying thing is that "Paxos Made Simple" begins by outlining the algorithm as a solution for a completely async network (unlike real networks) but then towards the end, just blows that off and falls back on timeouts. But if you have timeouts there are far simpler and more efficient solutions.
FWIW: FLP is a silly "theorem" that says "if you can't tell the difference between a system that has crashed and one that is slow - why then you can't tell the difference."
And I love the idea that crying fire in a theater is exercise of a right. I suppose fraud is simply exercising rights?
Oh come on.