Hi Alex,

On Sun, Sep 26, 2010 at 3:11 PM, Alexander Burger <a...@software-lab.de> wro=
te:
>
> Note that - as opposed to association lists - the key is in the CDR of
> the cell. This has advantages when manipulating the value, because the
> CAR of a cell is a variable ('var' called in the documentation).
>
> Searching for a property by a key goes through the list, and looks for a
> CDR that is '=3D=3D' (pointer equal) to the key. When a property is found=
,
> it is moved to the front of the list, as a side effect to accelerate
> further accesses (last recently used scheme).

thank you for this.

>
>
>> 2) how are symbol properties stored in the db?
>
> The whole symbol (value and properties) is simply stored in the PLIO
> format, a binary serialization format. The name of an external symbol
> determines its location, at which offset into which file it resides.
>
> The PLIO format is also used by other functions like 'pr', 'rd', 'tell',
> 'hear' etc. You can experiment with it also outside the database context
> by writing it to a plain file:
>
> =A0 : (put 'A 'a 1) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 # Create some=
 properties for 'A'
> =A0 -> 1
> =A0 : (put 'A 'b 2)
> =A0 -> 2
> =A0 : (put 'A 'c 3)
> =A0 -> 3
>
> =A0 : (getl 'A) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 # See the=
 property list
> =A0 -> ((3 . c) (2 . b) (1 . a))
>
> =A0 : (out 'a (pr (getl 'A))) =A0 =A0 =A0 =A0 =A0 # Print property list t=
o file "a"
> =A0 -> ((3 . c) (2 . b) (1 . a))
>
> =A0 : (hd 'a) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 # Hexdu=
mp of the PLIO representation
> =A0 00000000 =A001 01 04 06 02 05 63 01 04 04 02 05 62 01 04 02 =A0......=
c.....b...
> =A0 00000010 =A002 05 61 03 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0..a.
> =A0 -> NIL
>
> Does this help?

helped a lot.

it became clearer too after reading the answer to the second question.
that and reading the source in sym.c of doGetl.

i'm still on the path of trying to see all the little details.

thank you much.

/e
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Reply via email to