neo: add comments

This commit is contained in:
Liam Fitzgerald 2024-04-10 10:39:46 -04:00
parent 2cd20697e4
commit f5e136e5fa
2 changed files with 70 additions and 4 deletions

View File

@ -9,7 +9,7 @@
|_ [=bowl:neo =ever:neo state-vase=vase *] |_ [=bowl:neo =ever:neo state-vase=vase *]
++ poke ++ poke
|= [=stud:neo vax=vase] |= [=stud:neo vax=vase]
`state-vase !!
++ init ++ init
|= vas=(unit vase) |= vas=(unit vase)
`(need vas) `(need vas)

View File

@ -16,37 +16,72 @@
:: ::
:: ::
|% |%
:: $care: Perspective
::
+$ care +$ care
$? %x :: single node $? %x :: single node
%y :: single node and immediate children %y :: single node and immediate children
%z :: single node and all descendants %z :: single node and all descendants
== ==
:: $tour: perspective and shrub
::
+$ tour [=care =pith] +$ tour [=care =pith]
:: $block: call-stack state for blocking semantics
::
+$ block [get=(set tour) err=(unit tang)] +$ block [get=(set tour) err=(unit tang)]
+$ curb @ud :: blocking request ID :: $halt: Currently blocked flows and indices
::
+$ halt +$ halt
$: by-tour=(map tour flow) $: by-tour=(map tour flow)
by-flow=(jug flow tour) by-flow=(jug flow tour)
clog=(map flow (qeu move)) clog=(map flow (qeu move))
== ==
:: $flow: Call direction
::
:: .p is the source
:: .q is the destination
::
+$ flow (pair pith pith) +$ flow (pair pith pith)
:: $disk: Reference to a suite of code
::
:: If sig case, then refers to the %std disk
+$ disk +$ disk
$@(~ [=ship =term]) $@(~ [=ship =term])
:: $tack: Type of code being distributed
::
:: %con: CONverter of protocols
:: %imp: IMPlemenation of shrub
:: %pro: PROtocol (type)
::
+$ tack +$ tack
?(%con %imp %pro) ?(%con %imp %pro)
:: $post: Name of code being distributed
::
+$ post (pair tack stud) +$ post (pair tack stud)
::
:: +get-stud-name: Get name for $stud
::
++ get-stud-name ++ get-stud-name
|= =stud |= =stud
?@ stud stud ?@ stud stud
mark.stud mark.stud
:: +drive: Path multiplexer core
::
++ drive ++ drive
|% |%
:: +en:drive: Multiplex several paths into one
::
:: See also: (+de:drive)
++ en ++ en
=| res=pith =| res=pith
|= ps=(list pith) |= ps=(list pith)
?~ ps ?~ ps
res res
$(res (welp res [%ud (lent i.ps)] i.ps), ps t.ps) $(res (welp res [%ud (lent i.ps)] i.ps), ps t.ps)
:: +de:drive: Demultiplex one path into several
::
:: See also: (+en:drive)
++ de ++ de
=| res=(list pith) =| res=(list pith)
|= pax=(pole iota) |= pax=(pole iota)
@ -58,9 +93,15 @@
`[pith (pole iota)]`[(scag [len rest]:pax) (slag [len rest]:pax)] `[pith (pole iota)]`[(scag [len rest]:pax) (slag [len rest]:pax)]
$(res [nex res]) $(res [nex res])
-- --
:: :: +ford: Container for build system bootstrapping
++ ford ++ ford
|% |%
:: +riff:ford: Constant build system node
::
:: Required for bootstrapping. This is used to put the reef and
:: other ford combinators into the build system to bootstrap
:: everything else. To update a riff, simply %make over the top
::
++ riff ++ riff
^- firm ^- firm
|% |%
@ -84,28 +125,39 @@
`!>(`[cache=(unit vase) ~]`[`ref ~]) `!>(`[cache=(unit vase) ~]`[`ref ~])
-- --
-- --
:: +dep:ford: $fief for a ford dependency
::
:: Handy shortcut to specifiy a dependency in the build system
++ dep `fief`[& %x %ford-in %ford-out] ++ dep `fief`[& %x %ford-in %ford-out]
:: +get-output: pull build resuit of dependency
::
++ get-output ++ get-output
|= [=bowl =term] |= [=bowl =term]
^- (unit vase) ^- (unit vase)
=+ !<([vax=(unit vase) *] q.pail.q:(~(got by deps.bowl) term)) =+ !<([vax=(unit vase) *] q.pail.q:(~(got by deps.bowl) term))
vax vax
::
++ run ++ run
|= txt=@t |= txt=@t
(scan (trip txt) (rein *name)) (scan (trip txt) (rein *name))
:: $lib:ford: Specification of library import
::
+$ lib +$ lib
[face=term =name] [face=term =name]
:: $pro:ford: Specification of protocol import
::
+$ pro +$ pro
[face=term =stud] [face=term =stud]
+$ vale +$ vale
[face=term =stud] [face=term =stud]
:: $file:ford: Code with imports
::
+$ file +$ file
$: pro=(list pro) $: pro=(list pro)
:: grab=(list :: grab=(list
lib=(list lib) lib=(list lib)
=hoon =hoon
== ==
:: +rein:ford: Parse code with imports
++ rein ++ rein
|= =name |= =name
=< apex =< apex
@ -123,11 +175,21 @@
;~(pfix cen ;~(plug (star ket) stip)) :: relative ;~(pfix cen ;~(plug (star ket) stip)) :: relative
;~(plug ;~(pfix fas sig fed:ag) stip) :: absolute ;~(plug ;~(pfix fas sig fed:ag) stip) :: absolute
== ==
:: +std:rein:ford: Parse import directive
::
:: Either name:~ship/desk
:: or name (from %std disk)
::
++ std ++ std
;~ pose ;~ pose
;~(plug sym ;~(pfix col sig fed:ag) ;~(pfix fas sym)) ;~(plug sym ;~(pfix col sig fed:ag) ;~(pfix fas sym))
sym sym
== ==
:: +pro:rein:ford: Parse protocol import directive
::
:: /@ foo=bar :: imports %bar protocol from %std disk with name foo
:: /@ bar :: imports %bar protocol from %std disk with name bar
::
++ pro ++ pro
:: ^- $-(nail (like ^pro)) :: ^- $-(nail (like ^pro))
%+ rune pat %+ rune pat
@ -173,9 +235,13 @@
hone hone
== ==
-- --
:: +with-face: Decorate vase with face
::
++ with-face ++ with-face
|= [fac=@tas =vase] |= [fac=@tas =vase]
vase(p [%face fac p.vase]) vase(p [%face fac p.vase])
:: +with-faces: Decorate vases with faces, slopped onto reef
::
++ with-faces ++ with-faces
|= [reef=vase faces=(list (pair term vase))] |= [reef=vase faces=(list (pair term vase))]
?~ faces ?~ faces