News for hackers. Stuff that matters.

tverlinden

Re:Programmer Creates An AI To (Not Quite) Beat NES Games on Monday April 15, 2013 @04:13PM (#5553982)
From the paper, written by the same person who made the video: "The result is not impressive at all; the main goal here is to reduce the opponent's health, but our objective function can only track bytes that go up."

I can't watch the video at the moment but I imagine the paper goes much farther in-depth with the internals of this AI.

Re:Ask HN: Why my Ask HN is gone? on Sunday February 03, 2013 @03:46PM (#5161078)
It's still on the list, at #363 as of this posting.

It can also still be reached here: http://news.ycombinator.com/item?id=5160680

As to why it's so low on the list, I'm not sure.

Re:Why Lisp? 3 answers on Wednesday December 12, 2012 @11:56PM (#4914271)
Try telling that to a Forth programmer. ;)

But seriously, now. Reverse Polish notation is plenty intuitive as long as you don't get too crazy with what you put on the stack.

For example,

  (7**3 + 9*7) / 2
might be rendered:

  7 3 ** 9 7 * + 2 /
That is, "Take 7 and 3 and exponentiate, take 9 and 7 and multiply, then add the two numbers, take the answer and 2 and divide." Parentheses or extra spacing could easily be used to increase readability (though parentheses are never required in RPN; they're purely aesthetic), if that's too much to swallow:

  (((7 3 **) (9 7 *) +) 2 /)
...But really it's just a matter of what you're used to.

P.S. You'll notice that with parentheses RPN looked remarkably Lisp-like. This isn't a coincidence. The core difference between prefix notation as used by Lisp and RPN is that operators in RPN may only take two arguments (it's more complicated in languages like Forth, but since we're talking about arithmetic here we can safely make this assertion). This is the tradeoff RPN makes: losing the ability to have n number of arguments per operator, for the ability to ditch those parentheses for good.

It should also be clear that one could easily have a Lisp-like syntax similar in appearance to the RPN with parentheses above (though with Lisp's ability to have more than two arguments), but just happening to put operators at the end. Conversely, one could have an RPN where operators are at the front, which is actually the concept behind Polish notation, where RPN stems from: http://en.wikipedia.org/wiki/Polish_notation

On a final note, since RPN is read from left-to-right exclusively, a speaker of an RTL language would actually be worse off. The perceived unintuitiveness is more because English is a subject-verb-object language, whereas RPN is subject-object-verb.

Re:Hacker Workspaces on Sunday June 17, 2012 @03:13PM (#4123575)
Only some people work solely in the command line, therefore that advice is worthless? I don't follow your logic here.
Re:Learning VIM while playing a game on Monday April 23, 2012 @09:24AM (#3878619)
vi, which vim is based on, was programmed on the ADM-3A terminal, where the arrow keys are on the H, J, K, and L keys.

http://www.catonmat.net/images/why-vim-uses-hjkl/lsi-adm-3a....

http://www.catonmat.net/images/why-vim-uses-hjkl/adm-3a-hjkl...