HNHacker News
TopNewBestAskShowJobs

ggchappell

2,759 karma · joined February 27, 2009

Glenn G. Chappell

I'm a C.S. prof. at the University of Alaska. If you want contact info, Google finds me pretty easily.

submissionscomments
ggchappell··on Pony is an open-source, actor-model, high performance programming language
Wow, so maybe the no-deadlock guarantee really does say something nontrivial. Thanks for the heads up.
ggchappell··on Pony is an open-source, actor-model, high performance programming language
Actually, I think you've noted a significant issue: Pony looks to have been designed, at least in part, based on a sound theoretical foundation provided by modern type theory, semantics, etc. However, the documentation does not use the standard terminology of these fields. As a result, it is difficult to evaluate some of the claims that are made.
ggchappell··on Pony is an open-source, actor-model, high performance programming language
Yes, that's probably what is meant.

So the point is that a program will never crash due to an exception.

ggchappell··on Pony is an open-source, actor-model, high performance programming language
Yes, that's probably it.

Or to put it more simply: an exception will never crash a program.

ggchappell··on Pony is an open-source, actor-model, high performance programming language
Yes, but, as I noted, Pony has type unions (http://tutorial.ponylang.org/types/type-expressions/). So you can roll your own Maybe types.

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.

ggchappell··on Pony is an open-source, actor-model, high performance programming language
That's a good point.

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."

ggchappell··on Pony is an open-source, actor-model, high performance programming language
> ... there are no deadlocks by name (just other problems).

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

ggchappell··on Pony is an open-source, actor-model, high performance programming language
Ah, I guess I misunderstood. From the tutorial:

> 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 ....)

ggchappell··on Pony is an open-source, actor-model, high performance programming language
I shall refer to a higher authority:

> 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.
ggchappell··on Pony is an open-source, actor-model, high performance programming language
This looks interesting.

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.

ggchappell··on Pony is an open-source, actor-model, high performance programming language
Strongly agree. The main webpage for any programming language should always include a bit of sample code -- generally a short but nontrivial complete program.
ggchappell··on I run a SV startup but refuse to own a cellphone
That's kinda what an iPod Touch is, right? (The question mark is not rhetorical.)
ggchappell··on How Blue Lights on Train Platforms Combat Tokyo’s Suicide Epidemic
> So they don't know how blue lights do anything.

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.

ggchappell··on This Christmas, give the gift of a blameless life to someone you love
Nope, not sarcasm. I couldn't figure out what to call it. Then you reminded me. Thanks. Really. :-)

EDIT. We need a standard symbol for "I'm not being sarcastic". (Of course, then people may start using it sarcastically.)

ggchappell··on How the Universal Symbols for Escalators, Restrooms, and Transport Were Designed
Thanks!

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.)

ggchappell··on This Christmas, give the gift of a blameless life to someone you love
> I would call it satire, i.e. putting a humourous spin on a serious subject.

Ah, right. That's what it's called. Thanks for reminding us all about a sadly underused word.

ggchappell··on This Christmas, give the gift of a blameless life to someone you love
It's a humor piece that attempts to get us to think about the issue. The quote is invented. The product is not real. But the ideas are -- hopefully -- thought provoking one.

EDIT. As user tremon noted, there is a word for this: the piece is satire.

ggchappell··on Dow and DuPont to merge
> I don't understand why as a society we would want a megacompany ....

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.

ggchappell··on Repair is a Radical Act
Some nice thoughts.

> 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.

ggchappell··on The Marshall Islands Are Disappearing
I don't recall ever seeing a video clip quite like the one at the top of this article. (Aren't camera drones cool!)
ggchappell··on Jessica Livingston
Footnote #3 is worth pointing out, I think:

> 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.

ggchappell··on Campus Activists Weaponize ‘Safe Space’
Watch out for that word "they". The students who were quoted sounded childish. Plenty of students don't sound that way. But maturity is boring. It doesn't sell. So those people don't get quoted.
ggchappell··on The Imprisoner’s Dilemma
I'm a little worried about this article. It seems to me that it might be emphasizing certain aspects of the data that tend to support a conclusion that is relatively popular in many circles. (Indeed, I'd like to see the U.S. imprison fewer people; but that doesn't mean we should distort the data.)

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.

ggchappell··on I Tried to Buy an Actual Barrel of Crude Oil
> It only becomes odorless at deadly concentrations.

That is really strange. Because at non-deadly concentrations it seriously stinks. Do you know why it has this weird backwards smelliness property?

ggchappell··on This Mysterious Colorado Mining Town Seems to Run on Its Own Frequency
> Looking through windows into homes, they saw dining tables with cups, saucers, and cutlery all laid out—but covered in years worth of dust.

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?

ggchappell··on Not Your Father’s FORTRAN
<ahem> My mother was a FORTRAN programmer in the early 1960s. :-P
ggchappell··on A Penny for Your Books
> In 2014, publishers sold just over 2.7 billion books domestically, ....

Estimating the U.S. population at 320 million, that's about 8.4 books per person per year -- higher than I would have expected.

ggchappell··on Work on stuff that matters, first principles (2009)
> I spent a lot of last year urging people to work on stuff that matters.

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.

ggchappell··on The Case for Startups to Make Transparency the Top Priority
The article seems to confuse management's transparency to employees with a company's transparency to the public. These are very different things, and I think one can make a good case for pursuing the former assiduously, while being cautious with the latter.
ggchappell··on A Disadvantaged Start Hurts Boys More Than Girls
Good point. As others have noted, the use of "than" might not be a problem at all. But the issue you bring up certainly is.

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.

← PreviousPage 3 of 34Next →