HNHacker News
TopNewBestAskShowJobs

gwilliams

19 karma · joined September 29, 2010

submissionscomments
gwilliams··on An improvised Lego device helped scientists conduct tests at CERN
'Stone'? You mean 'brick'.
gwilliams··on An improvised Lego device helped scientists conduct tests at CERN
Lego's argument always struck me as absurd. Imagine Ford doing the same thing: "Please refer to our vehicles as 'Ford vehicles' or 'cars', and not 'Fords'. By doing so..."
gwilliams··on The vast but little-known fund of the Mormon Church
That could hardly be farther from the truth.

The church does have extrabiblical volumes of scripture, which also testify of Christ and go into more depth, but every doctrine of the church is in harmony with the Old and New Testaments. Members believe it is only by faith in Christ and by good works that they can be saved.

gwilliams··on The vast but little-known fund of the Mormon Church
They don't get wealthy from it.

Those who work for the church full time (with the exception of missionaries) receive a stipend to cover their living expenses and not much else.

gwilliams··on Algo Deck: an open-source collection of 200 cards on algorithms
boolean checkExactlyOneBitSet(int num) {

return (num & (num - 1)) == 0;

}

That looks like it'll fail when num == 0. I think it should be:

  return num && ((num & (num - 1)) == 0);
gwilliams··on Don't rinse with water straight after toothbrushing
This advice ought to be printed on every tube of toothpaste.
gwilliams··on Screen Art: Wargames (2010)
From IMDB:

"The computer name WOPR used in the movie was a joke based on a real computer once used to predict war strategies at NORAD which was called "BRGR". The Burger King "Whopper" is a "Burger"."

gwilliams··on Data Structure and Algorithms Problems from Interviews
The posted solution to fibonacci (in the rss image for this hn article) appears wrong. fib(0) will return 0 instead of 1.
gwilliams··on Raspberry Pi Model 3A+
Yes.
gwilliams··on The Periodic Table of Data Structures [pdf]
This reminds me of the effort to enumerate all ways of tying a necktie: http://www.tcm.phy.cam.ac.uk/~tmf20/tieknots.shtml
gwilliams··on Ask HN: What's your favorite elegant/beautiful algorithm?
icgrep (http://www.icgrep.com) has a clever approach to searching text for arbitrary sets of characters in a parallel manner. If 128-bit registers are available and we're processing 8-bit characters (for example), the next 128 characters from a file are first loaded into 8 SIMD registers. Then a bitwise transposition is performed so that r0 contains bit 0 of each input character, r1 contains bit 1, etc., up to r7. Then with a series of logic operations across those registers (imagine the sum-of-product result of a k-map of characters of interest), searches for any arbitrary subset of characters can be performed in parallel, leaving 1s in the corresponding position of the result register for each match and 0s elsewhere. icgrep supports full regex patterns and Unicode (using 21 registers instead of 8), but what interests me are the elegant transpose and logic steps.
gwilliams··on Shoppers Love Rewards Credit Cards, Retailers Hate Them
When I operated a store in Canada, Amex would hold on to the money for an extra 30 days beyond the next monthly reimbursement cycle, unlike Visa/MC.
gwilliams··on Ask HN: What information do you consider before investing in a stock?
I consider how predictable the dividend is.
gwilliams··on How To Make Any 3rd Grader Love Math
This would be a bit more fun with word problems involving the time turner, potions, etc.

"Fluffy has three heads, and each head can eat two bowls in a sitting...how many bowls should Hermione fill to satisfy him?"

gwilliams··on Ask HN: Would a game to teach Bash & *nix be worth-while?
How about a game to teach regex? That would be awesome. "Write a regex that will match xxx and yyy but not zzz", for example.
gwilliams··on Little, black, different
When I read the headline, I assumed the article would be about a late actor. :/
gwilliams··on First improvement of fundamental algorithm in 10 years
Couldn't this problem be simplified by considering the nodes and paths to be a resistor network, and solving for the effective resistance between the source and drain nodes?