HNHacker News
TopNewBestAskShowJobs

cjp

75 karma · joined February 17, 2008

submissionscomments
cjp··on SSH Tricks
Use mkdir -p to avoid failing if .ssh already exists.

    ssh user@host "mkdir -p .ssh && cat >> .ssh/authorized_keys" < ~/.ssh/id_rsa.pub
cjp··on What's a Closure?
SPOILERS

I created a successful bothC function that looks more like the simplified version of seqC, calling fC first. But when I switch to calling gC first, I get the following failures. Am I missing something, or is this a bug in the unit test?

  PASSED No JSLint errors
  PASSED bothC(S, S, A, B) === undefined
  PASSED output === "SSA"
  PASSED bothC(S, F, A, B) === undefined
  FAILED output === "SSASFB"
  PASSED bothC(F, S, A, B) === undefined
  FAILED output === "SSASFBFSB"
  PASSED bothC(F, F, A, B) === undefined
  FAILED output === "SSASFBFSBFFB"
cjp··on What's a Closure?
My first attempt was about the same, until I realized I missed a requirement:

> Your function bothC should call both fC and gC no matter what

What happens in your code if fC fails?

cjp··on "A calorie is a calorie" violates the second law of thermodynamics
Negative. You miss the entire point of the article.

Why are people consuming 6000 calories? They are always hungry and eat too much food.

Why are they always hungry? They eat and drink too many carbohydrates. Too many carbohydrates leads to high blood sugar which leads to too much insulin. After the insulin does its job, the blood sugar crashes causing hunger. The cycle repeats, causing problems including insulin resistance, excess fat storage and type 2 diabetes.

What is the solution? Don't consume carbohydrates and avoid the hunger/sugar/insulin cycle.

cjp··on The Turing Test: Transcripts of the best attempts
I was bored so I whipped up a (very hacky) python script to read the log.

http://gist.github.com/267399

cjp··on Ask HN: P=NP, what do you do?
It's turtles. Turtles I say. Turtles all the way down!
← PreviousPage 2 of 2