News for hackers. Stuff that matters.
Re:The Machine That Builds Itself: The Strengths of the Lisp... by arknave on Monday July 02, 2018 @03:52AM (#17439949)
> "Lists, which are a generalization of graphs, are extraordinarily well supported by Lisp."

I always thought of linked lists as a special kind of graph, where each node except the head and tail had exactly one incoming edge and one outgoing edge. What's a better way to think of this in terms of LISP?

Re:The Machine That Builds Itself: The Strengths of the Lisp... by thaumasiotes on Monday July 02, 2018 @04:28AM (#17440100)
Internally a Lisp list is a binary tree in which left children are leaves storing a value and right children aren't leaves (except the terminus) and don't store values.

Or rather, there is a structure called a cons cell which consists of two pointers, "left" and "right"; a cons cell in which the right pointer is NIL is a list; and a cons cell in which the right pointer points to a list is also a list. The values in the list are whatever is pointed to by the left pointers.

If you diagram this out, you'll find that your mental image is basically accurate already. It seems difficult to describe lists of this form as a "generalization" of graphs.

Re:The Machine That Builds Itself: The Strengths of the Lisp... by mirekrusin on Monday July 02, 2018 @04:27AM (#17440096)
An array of bits is generalisation of everything.