News for hackers. Stuff that matters.
Re:Show HN: a Lisp that uses JSON instead of S-expressions (... by lisper on Tuesday November 29, 2011 @02:11PM (#3291686)
The phrase "permit pointers inside the vectors" doesn't really make sense. Vectors are just ordered collections of objects. They don't have insides and outsides, except insofar as the objects contained by the vector could be (but usually aren't) considered "inside" the vector. Lisp vectors are usually implemented as arrays of pointers, so in that sense pointers are "permitted" inside vectors. But I'm guessing that's not what you meant. (I have no idea what you actually meant.)
Re:Show HN: a Lisp that uses JSON instead of S-expressions (... by akkartik on Tuesday November 29, 2011 @02:40PM (#3291826)

  (a (b (c . nil))
  ^  ^
  |  |
  |  |
  A  B
If you implement lists as vectors with car/cdr (I'm still thinking about your other questions) and choose to have cdr not copy results out of the original cell, you can end up in the (rope-like) situation above with pointer B (value (b c)) in addition to pointer A (value (a b c)). But that makes GC inefficient. For a vector to be GC'd you have to know what internal pointers it has, and then you have to make the choice to copy them out if they're 'toward the end', or to leave the vector uncollected.

(ignore pointers to a, b, and c.)

Re:Show HN: a Lisp that uses JSON instead of S-expressions (... by lisper on Tuesday November 29, 2011 @02:49PM (#3291862)
Ah. What you are calling a "pointer to the inside of a vector" is actually called a displaced vector. It's a standard Common Lisp feature, and no problem for modern GCs.
Re:Show HN: a Lisp that uses JSON instead of S-expressions (... by ori_b on Tuesday November 29, 2011 @05:35PM (#3292601)
It does mean that you are potentially keeping around masses of data when you only care about one or two elements. Normally not an issue, but normally internal pointers ("displaced arrays") aren't a central organizational concept in a language.
Re:Show HN: a Lisp that uses JSON instead of S-expressions (... by akkartik on Tuesday November 29, 2011 @03:07PM (#3291926)
Interesting! Thanks.