2,759 karma · joined February 27, 2009
I'm a C.S. prof. at the University of Alaska. If you want contact info, Google finds me pretty easily.
So the point is that a program will never crash due to an exception.
Or to put it more simply: an exception will never crash a program.
From the page I linked above:
> var x: (String | None)
> Here we have an example of using a union to express an optional type, where x might be a String, but it also might be None.
That's pretty clearly a Maybe.
But I do see where the claim is coming from. Pony is aimed at the same kind of compile-to-bare-metal that we do with C, C++, Fortran, etc. Furthermore, Pony's design explicitly deals with many of the issues that get in the way of aggressive optimization in other PLs: pointer aliasing, dynamic type checking, data races, etc.
So Pony was clearly designed with high performance in mind. And it seems likely to me that the efforts made in that direction are practical, workable ones.
But that is not the same as saying, "We can write a Pony compiler that generates fast code." And it is certainly not the same as, "We have written a Pony compiler that generates fast code."
Okay, supposing we have a definition of deadlock that agrees with your usage: sure. But then these "other problems" you mention will have exactly the same practical effect as deadlock, right? A program will hang, sometimes unpredictably, based on more or less random decisions made by some low-level scheduling algorithm.
And in that case, Pony's guarantee of no deadlock is (1) completely correct, and (2) completely meaningless, from the point of view of a programmer whose concern is that his code will behave as required.
Am I wrong? EDIT. Maybe: https://news.ycombinator.com/item?id=10903876
> Pony often uses the primitive None to indicate that something has "no value".
So that is not a special value that we can assign to any variable.
"None" would seem to be pretty pointless all by itself, but I guess we could do a union of any old type with "None", to get a result much like Haskell's "Maybe". And then the Pony type system would give us much the same guarantees as Haskell's would; so we get a nullable variable that still allows for typesafe operations -- e.g., dereferencing, if applicable. (I guess ....)
> A set of processes is deadlocked if each process in the set is waiting for an event that only another process in the set can cause.
That is from Modern Operating Systems, 4th ed. (2015), by A.S. Tanenbaum & H. Bos, page 439. (By "process" they really mean "process or thread".)
One way for thread A to wait on thread B is as you said: thread A can request a lock that thread B currently owns; then A waits for B. So requesting locks in opposite orders can result in deadlock. But of course if there are no locks, then no such waiting occurs, and so deadlock from this cause is impossible.
But there are other ways to wait. If var_a and var_b are shared variables, then code like the following might result in deadlock (The following code is in C; to simplify things, I'm assuming that data races and memory-access ordering are not issues.)
Thread A does:
var_a = 1;
while (var_b != 0) ;
var_a = 0;
And thread B does: var_b = 1;
while (var_a != 0) ;
var_b = 0;
If Pony is capable of executing code like the above, then deadlock is possible.There are a few things I wonder about. From the first page of the tutorial (http://tutorial.ponylang.org/):
> It's exception safe. There are no runtime exceptions. All exceptions have defined semantics, and they are always handled.
This seems contradictory. Are there exceptions or not? EDIT. Apparently there are (http://tutorial.ponylang.org/expressions/exceptions/). But then I don't understand what the above means.
> It's deadlock free. This one is easy, because Pony has no locks at all!
This is nonsense. Deadlock happens when multiple processes/threads are waiting for each other. It is not caused by locks.
From another tutorial page (http://tutorial.ponylang.org/types/static-vs-dynamic/):
> There's no such thing as null, so your program will never try to dereference null.
But there is "None" (http://tutorial.ponylang.org/types/primitives/). How is "None" so different from this "null" that we want to avoid?
On the positive side:
As I said this looks interesting. The type system appears to have been well thought out. Intersections look like a sane way to provide functionality that other PLs either implement poorly (perhaps via "multiple inheritance"), or simply disallow.
And if the type system really does offer all the claimed guarantees, then it is a very good thing indeed.
The partial applications, the concurrency model, and the handling of immutability are also clearly features that someone has given a lot of thought to. I cannot judge the results at this point, but I like well-thought-out things. :-) And the notion of "apply", along with the shortcut syntax, seems like it provides a standard, easy to understand way to make lot of code pretty simple.
I hope to be able to look into this PL more closely in the near future.
It appears that they also don't know whether the blue lights prevent suicides, or merely relocate them to somewhere besides train stations.
Regardless, reducing the number of suicides in train stations is not a bad goal ...
> Part of the reason the city concentrates its efforts here is because such “human accidents” are costly and can disrupt tens of thousands of passengers for up to an hour, weekly or even daily.
... but it is not really a goal that is motivated by concern for the people who might kill themselves.
EDIT. We need a standard symbol for "I'm not being sarcastic". (Of course, then people may start using it sarcastically.)
Note, FTA:
> They changed one of the three male figures riding in an elevator to a female figure.
In the link you posted, the three figures in the elevator are all Helvetica Man. OTOH, the "nursery" symbol is a baby, not a bottle. So it's not the original symbol set, but it might not be the most up-to-date, either.
EDIT. The "exit" symbol is interesting. It's a circle split vertically. I don't recall ever seeing that before. (Or perhaps I saw it, but had no idea what it meant.)
Ah, right. That's what it's called. Thanks for reminding us all about a sadly underused word.
EDIT. As user tremon noted, there is a word for this: the piece is satire.
We probably wouldn't. But these are companies, not the government. They're allowed to do things we don't like.
Yes, there is antitrust law. The U.S. Government gets to rule on whether the merger is legal, but not whether it is good for society.
> All you need is a sewing kit and a set of repair instructions.
Or, more practically for most of us, you pay some guy to repair your stuff.
Look around. There are little shops all over offering services like zipper replacement. They often don't charge much. Make use of them. And when buying a product, consider how repairable it is.
> The existence of people like Jessica is not just something the mainstream media needs to learn to acknowledge, but something feminists need to learn to acknowledge as well. There are successful women who don't like to fight. Which means if the public conversation about women consists of fighting, their voices will be silenced.
> There's a sort of Gresham's Law of conversations. If a conversation reaches a certain level of incivility, the more thoughtful people start to leave.
I imagine that this idea applies to many situations. Replace "feminists" and "[successful] women" with something else.
In particular, the conclusions are largely about the marginal effect of increased incarceration rates in the last couple of decades. So: we should not imprison more people than we are now. Fine. But that is not the same as saying that the huge increase in incarceration since the mid-1970s did not cause a large -- and highly beneficial -- decrease in crime.
According to the graphs, incarceration rates went up by about 60% in the 1990s and have remained more or less flat ever since. But rates more than doubled in the 1980s. This fact, and its possible impact on crime rates, apparently go completely unexamined in the article.
So don't think this article is up to the usual standards of fivethirtyeight.com -- unless I'm missing something.
That is really strange. Because at non-deadly concentrations it seriously stinks. Do you know why it has this weird backwards smelliness property?
Why would this happen? I can understand it in -- say -- the towns around Chernobyl. When someone with a machine gun show up at your door and says, "You need to leave now," well, then you leave. But people left Victor because there was no more money to be made. Wouldn't they want to take their valuable items with them when they left?
Estimating the U.S. population at 320 million, that's about 8.4 books per person per year -- higher than I would have expected.
Is there some article/post where O'Reilly gives the background?
In the article, the above sentence contains a link, but it is surprisingly unhelpful. It leads to a Google search. The first hit is this article. The second is a video I have neither the time nor the inclination to watch. The third is basically a collection of quotes. The fourth and fifth are comments on a talk O'Reilly gave. The sixth is just a wrapper around a link to this article. The seventh is another comment on a talk. The eighth is another video. And I'm getting tired of clicking on useless links.
EDIT. If you look carefully, you can see that the sentence is not actually ambiguous. The word "which" is followed by a singular verb: "has". So the antecedent cannot be "families" or "mothers", which are plural; it must be the clause: "... being raised ....".
However, I still agree that the sentence should be restated. Making people think hard to figure out the antecedent of a pronoun, is hardly the way to communicate effectively.