in reply to RE: More About Memory -- case study
in thread More About Memory -- case study

The best way to describe it would be to say that I store the alphabet as a singly linked list, with a few pointers to "well used" parts so that I don't always start at the beginning. Pointers to "A" (the song), "L" (el-em-en-o-pee), "T" (I guess because of the hard sound), and "X" (xyz).

When going backwards, I did a section, went back to my closest pointer, went forward until I found my last backwards, keeping as much as I could in a small short term memory space (say an array of 5 to 7 elements).

As a side note, doing the alphabet forward was not traversing each element as I needed it, but a rather efficient block load which pulled in a "mouthful" of elements, spitting them out autonomously so that there were no I/O blocking.

Damn I feel geeky. 8)

=Blue
...you might be eaten by a grue...

  • Comment on RE: RE: More About Memory -- case study

Replies are listed 'Best First'.
RE: RE: RE: More About Memory -- case study
by japhy (Canon) on Oct 20, 2000 at 00:32 UTC
    <cite> When going backwards, I did a section, went back to my closest pointer, went forward until I found my last backwards, keeping as much as I could in a small short term memory space (say an array of 5 to 7 elements). </cite> Yes, this is because you know the proximity of some of the letter. The node for 's' might look like:
    s => { next => 't', near => 'r', }


    $_="goto+F.print+chop;\n=yhpaj";F1:eval
      I agree. I'd put it a little more like:

      s => { next => 't' nearPrev => 'qr' nearNext => 't' }
      With the size of the nearPrev and nearNext dependant on the letters. M would be in the whole "lmnop" cluster.

      For numbers, I would also have a "prev" which is undefined for letters.

      Now, I've found all of this facinating (really!), but how can use something like this? We've talked about associations for numbers, letters, and words.

      One interesting project would be a Perl program that plays word association, and learns from playing with others. Instead of just a "next", it would be most interesting to me if it had a "context" it tried to stay in (usually) also.

      Well, I've got a weekend in front of me...

      =Blue
      ...you might be eaten by a grue...