Understanding - PI_2019 (Library)


#1

Comparing two objects (or data strings) is a prerequisite when your Conversation needs to verify 2 different sets of information - to explain the commands used we will assume we are comparing an apple and a pear but you could change this to anything the function of comparing two things won’t change.

In essence, this library contains thirteen commands strings

  1. '; {!important} this instructs that’s objects enclosed within ‘’ are !important

  2. itm_0; {X} Simply put this informs that itm_0 is ‘X’ value within the Conversation - the braces ensure it is treated as authoritative.

  3. itm_1; {Y} Simply put this informs that itm_0 is ‘Y’ value within the Conversation - the braces ensure it is treated as authoritative.

  4. itm_0; { C_var(X+Y) } here we transform the value of itm_0 into a variable string comprised of 'X' + 'Y' this means the values of ‘X’ & the values of ‘Y’
    if printed;
    X=Apple,name / fruit,yes / red,colour / green,colour / Y=Pear,name / fruit,yes / green,colour / seeds,yes /

  5. itm_1; { C_var(Y+X) here we transform the value of itm_0 into a variable string comprised of 'Y' + 'X' this means the values of ‘Y’ & the values of ‘X’
    if printed;
    Y=Pear,name / fruit,yes / green,colour / seeds,yes /X=Apple,name / fruit,yes / red,colour / green,colour /

  6. X+Y; var_$PI-A While above we have created a variable string using C_var( ) we also need variable statement in-this-case $PI-A this is needed for reference. NOTE: a variable statement is a fix object variable i.e a object which state will remain constant.

  7. Y+X; var_$PI-B While above we have created a variable string using C_var( ) we also need variable statement in-this-case $PI-B this is needed for reference.

  8. sort; {the act of separating things and putting them in a particular order} this command is states the Oxford Dictionary of the word sort, to ensure correct interpretation later on,

  9. SORT; inpr_{ C [X, itm_0 -- Y, itm_1] }_bnd Here our variable objects are sorted using our variable statements. inpr_{ } enclosed the command as a result we know that it is an authorised interpretable object (the abstract values created beforehand) this object should be treated as fluid as denoted by C [ ] fluid in this contexts simply means available for many interpretations. Within this container are the following; X, itm_0 connected using - - to Y, itm_1 essentially transforming both sets of objects into one, the process could also be achieved with an array but is unnecessary for small data sets.

  10. SET; $PI-A + $PI-B Here we connect our fixed variable statements as the value of SET this enable easier comparison at a later stage.

  11. MATCH; { SORT -- SET; MM00_ C#{C_POST} As this library is designed to pair similarities, our next step is creating a “match” instruction. As a precaution we authorise our instruction using { } next we’ll load our sorted object variables, before connecting them - - to our fixed variable statement SET This sets the stage for DeadLetter to pull variables are specified by the value set in your conversation for MM00_ the final stage is to tokenise the MATCH using C#{ } with the variables held in isolation using C_POST

  12. C_POST; C_inpr( MM* ) finally the output is named MM* and while unnecessary is enclosed with an explicit interpretable outcome statement C_inpr( )

  13. ?DRP -- {//POST 'C#{MM*}' output} simply put this is a POST statement but let’s break it down. By enclosing it within { } the command string is treated as authoritative. The // informs that the next statement is a qualified address. POST is taken at its literal meaning (to post ‘something’) the ' ' inform that the contained string is !important as defined earlier in the library. C#{ } denotes an tokenised object, in this case it’s the output, it’s defined towards the end of the library & represented as MM* closing this string is output a necessary statement to ensure our tokenised object is posted.


If we set the value of MM00_ to “shape_sphere” the value of MM* will become;

shape_sphere = 'apple' yes / pear no 


You can view the entire offical DeadLetter library here -https://libs.deadletter.io/PI_2019.txt