Regular readers may recall that everything clever and pertinent that appears here derives from the inspiration, suggestion, or flat-out dictation of Margaret. She influences whatever I write, but up to now has been caught online only obliquely (for instance, David Weinberger awarded her an arbitrary winner certificate
in some long-forgotten JOHO contest, and though the contest itself ebbed from memory, Margaret has cherished the knowledge that somehow, somewhere, someone recognized her as a winner).
All that has changed, now that the hi monkey website has immortalized Margaret’s affection for its eponymous terrycloth primate. Now, millions (if not billions) of web viewers will see Margaret (and Si, in one photo) promenading the monkey around Nantucket Island in pictures from last summer. (Margaret disclaims responsibility for typographical errors.) Can movie offers be far behind?
Posted by AKMA at December 27, 2002 08:56 AM | TrackBackthe book series, the magazine features, the movies, plays, mini-series and tv sitcome is just right around the corner!
Posted by: monkey at December 28, 2002 05:08 PMoh so very nice. margaret and si, not the monkey.
Posted by: Clifton D. Healy at December 30, 2002 10:26 AMokay. why did it do that?
Posted by: Clifton D. Healy at December 30, 2002 10:27 AMBeing able to understand that basic idea opens up a vast amount of power that can be used and abused, and we're going to look at a few of the better ways to deal with it in this article.
Posted by: Elias at January 12, 2004 11:50 PMTo address this issue, we turn to the second place to put variables, which is called the Heap. If you think of the Stack as a high-rise apartment building somewhere, variables as tenets and each level building atop the one before it, then the Heap is the suburban sprawl, every citizen finding a space for herself, each lot a different size and locations that can't be readily predictable. For all the simplicity offered by the Stack, the Heap seems positively chaotic, but the reality is that each just obeys its own rules.
Posted by: Laura at January 12, 2004 11:51 PMA variable leads a simple life, full of activity but quite short (measured in nanoseconds, usually). It all begins when the program finds a variable declaration, and a variable is born into the world of the executing program. There are two possible places where the variable might live, but we will venture into that a little later.
Posted by: Theodosius at January 12, 2004 11:51 PMSince the Heap has no definite rules as to where it will create space for you, there must be some way of figuring out where your new space is. And the answer is, simply enough, addressing. When you create new space in the heap to hold your data, you get back an address that tells you where your new space is, so your bits can move in. This address is called a Pointer, and it's really just a hexadecimal number that points to a location in the heap. Since it's really just a number, it can be stored quite nicely into a variable.
Posted by: Gabriel at January 13, 2004 09:18 AMWhen compared to the Stack, the Heap is a simple thing to understand. All the memory that's left over is "in the Heap" (excepting some special cases and some reserve). There is little structure, but in return for this freedom of movement you must create and destroy any boundaries you need. And it is always possible that the heap might simply not have enough space for you.
Posted by: Phillip at January 13, 2004 09:18 AMThe rest of our conversion follows a similar vein. Instead of going through line by line, let's just compare end results: when the transition is complete, the code that used to read:
Posted by: Edith at January 13, 2004 09:19 AM