mirror of
https://github.com/urbit/shrub.git
synced 2024-11-30 22:15:47 +03:00
change some comments, add %tomb
This commit is contained in:
parent
b9bdf40b33
commit
83fb81ee72
@ -1,23 +1,23 @@
|
|||||||
/@ txt :: @t
|
/@ txt :: @t
|
||||||
/@ diary :: name=@t
|
/@ diary :: name=@t
|
||||||
/@ diary-diff :: ?([%del-entry id=@da] [%put-entry id=@da =txt])
|
/@ diary-diff :: ?([%put-entry id=@da =txt] [%del-entry id=@da])
|
||||||
::
|
::
|
||||||
:: outer core of a shrub: define state, pokes,
|
:: outer core of a shrub: define state, pokes,
|
||||||
:: dependencies, and kids
|
:: dependencies, and kids
|
||||||
^- kook:neo
|
^- kook:neo
|
||||||
|%
|
|%
|
||||||
::
|
::
|
||||||
:: diary's state is %only a %diary, just a @t
|
:: diary's state is a %diary, just a @t
|
||||||
++ state
|
++ state
|
||||||
^- curb:neo
|
^- curb:neo
|
||||||
[%only %diary]
|
[%pro %diary]
|
||||||
::
|
::
|
||||||
:: diary takes pokes with stud %diary-diff
|
:: diary takes pokes with stud %diary-diff
|
||||||
++ poke
|
++ poke
|
||||||
^- (set stud:neo)
|
^- (set stud:neo)
|
||||||
(sy %diary-diff ~)
|
(sy %diary-diff ~)
|
||||||
::
|
::
|
||||||
:: constrain shrubs below diary in the namespace tree
|
:: constrain shrubs below diary in the namespace
|
||||||
:: by defining the types of their state and pokes
|
:: by defining the types of their state and pokes
|
||||||
++ kids
|
++ kids
|
||||||
:: kids:neo is a (unit port:neo)
|
:: kids:neo is a (unit port:neo)
|
||||||
@ -32,8 +32,9 @@
|
|||||||
%- ~(gas by *lads:neo)
|
%- ~(gas by *lads:neo)
|
||||||
:~ :- :: pish:neo
|
:~ :- :: pish:neo
|
||||||
:: to simplify: [%.n @da] means the kid's
|
:: to simplify: [%.n @da] means the kid's
|
||||||
:: path ends with a @da, and %.n is there
|
:: path contains any @da, and %.n is there
|
||||||
:: as boilerplate to complete the pish:neo
|
:: to signify that the pith can not have more
|
||||||
|
:: fields afterwards
|
||||||
[[%.n %da] %.n]
|
[[%.n %da] %.n]
|
||||||
:: lash:neo is (pair curb:neo (set stud:neo))
|
:: lash:neo is (pair curb:neo (set stud:neo))
|
||||||
:: curb:neo defines the kids' state
|
:: curb:neo defines the kids' state
|
||||||
@ -69,11 +70,8 @@
|
|||||||
:: assert the poke comes from our ship
|
:: assert the poke comes from our ship
|
||||||
:: src.bowl:neo is (pair ship pith)
|
:: src.bowl:neo is (pair ship pith)
|
||||||
?> =(our ship.src):bowl
|
?> =(our ship.src):bowl
|
||||||
?- -.act
|
?- -.act
|
||||||
%del-entry
|
%put-entry
|
||||||
[~ [%diary !>(state)]]
|
|
||||||
::
|
|
||||||
%put-entry
|
|
||||||
:_ [%diary !>(state)]
|
:_ [%diary !>(state)]
|
||||||
:: create list of one card:neo
|
:: create list of one card:neo
|
||||||
:: card:neo is (pair pith:neo note:neo)
|
:: card:neo is (pair pith:neo note:neo)
|
||||||
@ -96,10 +94,19 @@
|
|||||||
`[%txt !>(txt.act)]
|
`[%txt !>(txt.act)]
|
||||||
:: conf:neo is (map term pith:neo)
|
:: conf:neo is (map term pith:neo)
|
||||||
:: declare this new shrub's dependencies,
|
:: declare this new shrub's dependencies,
|
||||||
:: which are also shrubs
|
:: which are also shrubs;
|
||||||
|
:: in this case, none
|
||||||
~
|
~
|
||||||
==
|
==
|
||||||
==
|
==
|
||||||
|
%del-entry
|
||||||
|
:_ [%diary !>(state)]
|
||||||
|
:~ :- %+ welp
|
||||||
|
here.bowl
|
||||||
|
~[[%da id.act]]
|
||||||
|
^- note:neo
|
||||||
|
[%tomb ~]
|
||||||
|
==
|
||||||
==
|
==
|
||||||
--
|
--
|
||||||
--
|
--
|
||||||
|
Loading…
Reference in New Issue
Block a user