Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Hashlife and anything else implemented by Norvig, he's one of the best programmers that I've had the pleasure of reading code from.

Plenty of tricks to be learned there, as well as fantastic structure.



Agreed, his code shows craft at every level.

Is a hashlife by him on the web? The first page of google results only turned up an older comment by you.


It used to be, let me see if I can dig it up.

Grr, nope :( That sucks.

Ok, so try this instead:

http://norvig.com/sudoku.html

Not quite as satisfying but it gives you the general idea, his whole approach is elegant and super direct.


Oh well, thanks! I'll read the Sudoku solver after I get around to writing my own -- it helps to keep you from just nodding along.


I sent an email to see if I'm either mis-remembering or it got taken down.

Ok, received answer from Peter Norvig, I must have mis-remembered who wrote what I read, but in the interest of completeness here is a life implementation by Peter Norvig (but not hashlife):

https://github.com/norvig/pytudes/blob/master/Life.ipynb


Nice. I saw one working like that in Clojure and rewrote it in my own Lisp: https://github.com/darius/squeam/blob/master/eg/bag-life.scm (the bag is like Python's Counter).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: