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 Emoji.length == 2
> And here [2] is a JavaScript implementation.

Is it up to date?

The last commit to this repo was on July 16, 2015, and the code says it conforms to the 8.0 standard. But Unicode 9.0 came out in June 2016. The document in your link [1] indicates that there were changes in the text-segmentation rules in the 9.0 release. However, I can't say whether any of these affect the correctness of the code.

ggchappell··on Dole Food Had Too Many Shares
Is it this?

http://blog.arkency.com/2016/12/techniques-for-dealing-with-...

I haven't read it yet, but it looks worthwhile.

ggchappell··on Really big numbers
The post takes comments. Write one?
ggchappell··on Firefox 51.0
> Added support for WebGL 2, with advanced graphics rendering features like transform feedback, improved texturing capabilities, and a new sophisticated shading language

Can anyone explain that last bit. I know WebGL 2 goes with GLSL ES 3.0, but that seems to be the same ol' GLSL with a few tweaks. Is this "new sophisticated shading language" just overblown PR, or is there an actual new shading language?

ggchappell··on 2016's most-edited Wikipedia articles
> In your Beverly Gray example, it's all one editor who did not seem to realize that there is a preview button.

Wow. I count 4930 edits to that page, by a single account, over the 199-day period from January 20, 2016 to July 26, 2016. And then 56 edits by other accounts cleaning up after that one account -- an awful lot of them by just one other account -- with comments like "prune. excessive detail, excessive quotation, excessive referencing".

The result seems to be quite a nice page. I've noted in other contexts that a certain kind of two-author team can be very productive: one who can spew out mountains of verbiage, and one who can edit it down to something readable. Here we see the phenomenon at work once again.

ggchappell··on There is a blind spot in AI research
Key quote:

“People worry that computers will get too smart and take over the world, but the real problem is that they’re too stupid and they’ve already taken over the world.”

-- Pedro Domingos, in The Master Algorithm (2015)

ggchappell··on A Brief History of Who Ruined Burning Man
Interesting article. Thanks for the link.
ggchappell··on New Virus Breaks the Rules of Infection
Instead of thinking of this as a virus in pieces, might it be better to think of it as a symbiosis (with the "bio" part being deemphasized a bit)?
ggchappell··on Looks Can Kill: The Deadly Results of Flawed Design
I understand your point; but we should remember that the redesign of the shifter did not happen in isolation.

Car designers have been tinkering with controls for decades. Sometimes the addition of new ideas can be very helpful. For example, I had a Ford Taurus back in the late 90s. Buttons that had a "positive" effect had a convex portion; buttons with a "negative" effect were concave. Door locks, cruise control, etc., all worked this way. It was very easy to operate that car without looking, or in the dark.

Now add to that the computers-do-everything reality of the modern world. Controls that used to be directly hooked to some mechanism no longer are; software reads the control, and software initiates the desired effect. This means that the form of controls is no longer dictated by the mechanisms they relate to. Designers are free to design controls that users will find easy to use and intuitive.

And so designers have tried all kinds of things. But, alas, some of them turn out to be bad ideas. I don't say this excuses the design flaws at issue here, but I do think it does go a long way toward explaining them.

[Meanwhile, I have a another Ford Taurus. No convex/concave buttons. I have no idea why not. :-( ]

ggchappell··on David Chang’s Unified Theory of Deliciousness
Interesting thought.
ggchappell··on ‘2001: A Space Odyssey’ rendered in the style of Picasso
Cool.

It needs some kind of averaging with nearby frames (or whatever), to avoid the constant flicker in areas of more or less solid color.

ggchappell··on Python Generator comprehensions
> I think we should call them "generator comprehensions" again.

I think we already do. Perhaps not officially, but "generator comprehension" is a widely used term among Python folks, in my experience.

A quick Google offers no evidence to the contrary: https://encrypted.google.com/search?q=python%20%22generator%...

ggchappell··on What are people working on in coffee shops?
Interesting & fun. However, apparently none of these people were just fooling around, surfing, watching cat videos, or posting idiotic things on Reddit or Facebook or whatever-the-latest-trendy-site-is? I don't believe it.
ggchappell··on The Hidden Messages of Colonial Handwriting
> a homoiconic language like Hebrew

What does "homoiconic" mean in this context? (Google doesn't help.)

ggchappell··on Infosec's Jerk Problem (2013)
This is an excellent article.

> Hanlon’s Razor says “Never attribute to malice that which can be adequately explained by incompetence,” but I would add, “Never attribute to incompetence that which can be explained by differing incentive structures.”

That's profound & pretty thought-provoking.

Ternus's Razor, anyone?

ggchappell··on Who’s Right? The Debate Between Two Major Groups of AI Scientists
I think that a major issue overlooked in discussions like these is the effect of how interesting an idea is.

I could tell you that computing in 2029 is going to be more interconnected, more ubiquitous, with more surveillance and more ads -- but otherwise about the same. Or Ray Kurzweil could tell you that the future is going to be amazing!!! He is offered thousands of dollars to speak to crowds, gets book deals, etc. I am not. Because what he is saying is much more interesting than what I am saying.

But that does not mean that what he is saying is more likely to be true. What we have here is a battle of ideas where the best clickbait gets a huge advantage.

Not that this means Kurzweil is wrong, either. But it's something to keep in mind.

ggchappell··on Power to the Plaintiff
This is a tricky problem.

We need to remember what courts are all about. They take someone who is accused of something, and if they decide it is appropriate to do so, then they take away possessions and/or restrict freedom. That is a serious thing to do, particularly since any old person can be accused, whether they did anything wrong or not.

Thus, there are good reasons why the U.S. justice system is all about protecting the defendant. And even if the defendant is a company for whom the situation is all in a day's work, the principles still apply.

So watch out for language like this:

> But plaintiffs — the party who did nothing wrong — do not enjoy comparable protections.

On the contrary, you do not have to do something wrong to be a defendant. And the plaintiff may very well have done something wrong: false accusations, evidence tampering, etc. This is why we have court cases, and not simply mandated payment when one is at fault.

But the article is right about one thing: there is a problem here.

I wonder a lot why this issue is not solved at the level of judges. Surely, after years as a judge, one can tell when a defendant is BS'ing or needlessly prolonging a case. It seems simple enough to say, "Do this or be found in comtempt." Why isn't that the solution to so many instances of this problem?

ggchappell··on How to Hack an Election
That would be the case if they did in fact lose money based on this problem.

I don't know how common/significant such losses are. But it seems clear that lots of news organizations are betting heavily that such losses are less than the cost of ensuring that they publish only reliable news.

ggchappell··on Super Tiny Compiler
Nice, but it needs to say up front what it does (i.e., compile a Lisp-ish PL to a C-ish PL).

EDIT. After a bit of analysis:

The lexer is basically a state machine. Each kind of token consists entirely of characters in a single class, so the usual state machine is modified to give some states a while loop that goes through characters until the token ends.

The parser is basically recursive-descent. The grammar is awfully simple, so only one parsing function (walk) is needed.

The transformer traverses the AST, identifies function calls, and produces a new AST with function calls marked. I'm not sure why the transformer is written as a separate piece of code. It seems to me that the functionality it adds could easily be integrated into either the parser or the code generator. And then the compiler would be even tinier.

And the code generator traverses the transformed AST and spits out C-like code.

ggchappell··on How to Hack an Election
> The media seems generally unprepared for a coordinated campaign of fake tweets from accounts that don't have eggs as their avatar or #freeiphones in their profiles.

Why should they care? The purpose of a news business is to make money. If it works, then it works.

I think the real problem here is the incentive structure for a modern news business, as well as the network effects of sharing, links, etc.

ggchappell··on Strong Link Found Between Dementia and Common Anticholinergic Drugs (2015)
From your linked article:

> #1: Eat More Protein During the Day & Select Carbs at Night

> ... eating a meal of carbohydrates in the evening can help you go to sleep quickly.

This is curious. I've run across this advice before. I have also found, from repeated experiments, that eating starchy foods just before bed makes it harder for me to go to sleep. Maybe I have some weird body chemistry ....

ggchappell··on If a thing is worth doing, it is worth doing badly
Do you have a source for that?

EDIT. Perhaps it's really Terry Pratchett?

From Carpet People:

> If he concentrated, he could just hear Pismire playing the fluteharp; it was easy to tell, even with all the other instruments in the Deftmenes' own band, by the way the notes went all over the place without ever hitting the tune. Pismire always said there were some things you should care about enough to do badly.

Source: http://www.chrisjoneswriting.com/carpet-people.html

ggchappell··on The US has gone F&*%ing mad
Interesting point.
ggchappell··on Polish codebreakers 'cracked Enigma before Alan Turing'
This seems a little odd.

Yes, Alan Turing looms large in the public consciousness; his various Polish contemporaries, not so much.

But to anyone who has looked into the history of these events, the work of the Polish is no secret, nor has their story been "lost".

For example, some years ago I visited the National Cryptologic Museum[1] in Fort Meade, MD. They were very clear that the enigma code was cracked primarily through the efforts of Polish cryptologists.

[1] Highly recommended. They have -- among many other interesting things -- an actual enigma machine, and they let you type on it! (Well, they let me type on it, anyway.)

ggchappell··on How to Write Telegrams Properly (1928)
Lots of interesting things here.

One of them:

> If the telegram is packed full of unnecessary words, ... the sender has been guilty of economic waste. ... He added to the volume of traffic ....

And yet:

> But when you think of telegraphing someone to "reply at once," you may very well save the cost of an unnecessary word and write it, "reply immediately," ....

So, in order to reduce traffic volume, we are counseled to replace 6 letters and a very brief pause with 11 letters.

I think the writer had trouble distinguishing between trying not to overburden the telegraph system vs. hacking its cost structure.

Also, here is the first sentence I quoted above, in full (emphasis is mine):

> If the telegram is packed full of unnecessary words, words which might be omitted without impairing the sense of the message, the sender has been guilty of economic waste.

The phrase that I have italicized is completely unnecessary. Of course, the writer was not composing a telegram. Still, I think this is just a bit ironic.

ggchappell··on “GOTO Considered Harmful” Considered Harmful (1987) [pdf]
> Didn't they know functions in 1987? ;)

In all seriousness: only just barely. I entered the undergraduate C.S. program at the U. of Kansas in 1983. The faculty were constantly saying, "We're doing structured programming now!" -- as if they weren't quite convinced yet, and needed to remind themselves.

I think this letter does correctly point out that, while simple selection & iteration constructs are sufficient to do anything we want, concise, readable code requires more. And so now we have -- yes -- return, and also break, exceptions, etc. (I'm rather surprised that the idea of a multi-level break, which has been proposed for more than one PL, has never really caught on.)

P.S. Perhaps we could title your comment " 'GOTO Considered Harmful' Considered Harmful" Considered Harmful.

ggchappell··on CSS Variables: Why Should You Care?
After reading, I'm still not sure why I should care.

I've been using "CSS variables" for years -- in less. If I'm modifying CSS on the fly in JS, then I don't need CSS variables; I have JavaScript variables.

Don't get me wrong: I'm not against this change. CSS has been a rather unexpressive language for some time; removing that deficiency can hardly be called a bad thing, as long as the change is consistent across browsers.

So, if someone wants to use this idea, well, good for them. But I've gotten along find without this feature for a long time. I don't see any particular reason to start using it now.

ggchappell··on Criticism of “Research Parasites” Moves Medical Journal in Wrong Direction
No, of course he wasn't saying that. But there is a problem with the reward structure of the system.

Scientists have to eat and pay the bills, too. Unless you're really rich, it's tough to do much serious science in your spare time on weekends, paying for equipment from your own pocket. So the idea is that a scientist gets a job that pays him/her to do science. The system rewards scientists who advance knowledge and penalizes those who do not.

How do we determine whom to reward? It is extremely difficult to evaluate most scientists' work unless you are an expert in the same field. So we let peer reviewers evaluate the work, and reward scientists for publications in prestigious peer-reviewed journals.

The problem is that these incentives work against some kinds of sharing.

It's not all bad. A scientist whose work never sees the light of day is fired; no publications means no job. But sharing of ideas apart from those that are necessarily published is something the system tends to punish.

What to do about it? It's easy to propose some radical revision of the system. But we still have to deal with the question of how to evaluate the work of someone whose ideas can only really be understood after a decade of specialized study.

ggchappell··on Lexical Distance Among the Languages of Europe
Would you say that more recent methods allow us to talk about degree of language similarity in a way that is objective enough and meaningful/useful enough that the results are not "for entertainment value only"?
ggchappell··on The Top Things Wrong with JavaScript
This is a nice little article. But I have a different perspective on a number of these issues. My thoughts:

> 1) There is no integer type!

Yup, problem. See also Lua. [I suppose in JS one could create a typed array and use the items as integer-typed variables (?). But who wants to do that?]

> 2) JavaScript’s loose typing and aggressive coercions exhibit odd behaviour.

I call this a non-issue. If a give-me-this-object function has the possibility of failure, then it should return a truthy value on success and a falsy value on failure. But in all other circumstances, just avoid the implicit type conversions.

> 3) Automatic semicolon insertion.

Yeah, it was tried in JS and in Go. I think it turned out to be a bad idea in both cases. Let's not build it into any more PLs, okay?

> 4) JavaScript is seriously abused.

Not a problem with JavaScript.

There are many idiots in the world. Try not to let them ruin your day.

> 5) JavaScript is highly dependent on global variables.

I think this is a problem with common JavaScript APIs, not JavaScript per se. But, yes, it is a problem.

> 6) JavaScript code can fail silently due to syntactical slip-ups.

Yes, that's annoying.

> 7) Prototype objects do not scale well to large applications.

Hmmm ... no explanation. I'm not sure exactly what the issue is. But then I've never written any large-scale JS code based on a hardcore OO design philosophy.

And later:

> ... [ES6] classes are not as completely fleshed out as you would find in Smalltalk and C++, for example.

The "completely fleshed out" classes in C++ are insanely complicated, with whole books covering their details & pitfalls. Let's not go there. And the Smalltalk OO model has been largely abandoned for years -- perhaps for good reason?

> 8) Asynchronous programming in JavaScript is very messy.

Sure, but I think of this as more of a challenge. We're really just learning the ins & outs of large-scale asynchronous code. I look forward to seeing how JS and other PLs evolve to handle these issues.

> 9) ... Lisp is a wonderful language and by extension, so is JavaScript. But JavaScript is nothing like Lisp!

Is this a problem?

> 10) The main draw of JavaScript is actually in frameworks like Node.js and AngularJS. If not for them, why would you use JavaScript???

Because it's the only PL with native support in all major web browsers?

← PreviousPage 2 of 34Next →