News for hackers. Stuff that matters.

pillmuncher

From Sterling and Shapiro's "The Art of Prolog" a procedure to concat two difference lists in O(1) time (from memory):

    append_dl(A - B, B - C, A - C).
Prolog. It fits my brain.
Re:Ask HN: ______ is to Python as K&R is to C? on Saturday April 30, 2011 @10:43AM (#2500714)
I recommend The Python Cookbook: http://oreilly.com/catalog/9780596001674. It's not a reference in the sense that it shows you the language syntax or tells you the details of the standard library, but it shows how experienced Pythonistas do things in a way that might not be obvious to you if you come from a language like C or Java, or until you're Dutch.
Re:Ask HN: Inspirational movies on Wednesday November 17, 2010 @05:54AM (#1913792)
"2001: A Space Odyssey" - Stanley Kubrick

"Eat Drink Man Woman" - Ang Lee

"The Ice Storm" - Ang Lee

"Wonder Boys" - Curtis Hanson

"The Apartment" - Billy Wilder

Re:Ask HN: Any good math jokes? on Sunday November 07, 2010 @05:20AM (#1879105)
An engineer, a physicist and a mathematician want to catch a lion. The engineer goes to Africa, builds a cage and traps the lion in it. The physicist builds a fence around Africa and pronounces: "I've trapped the lion". The mathematician builds a cage, climbs inside and pronounces: "I am outside".