mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-11 04:48:00 +03:00
Not compiling, but finished first stage of adding fuss.
This commit is contained in:
parent
e8ff568692
commit
1f5faa5894
139
arvo/hoon.hoon
139
arvo/hoon.hoon
@ -119,20 +119,27 @@
|
|||||||
?~ a ~ ::
|
?~ a ~ ::
|
||||||
?@ b ~ ::
|
?@ b ~ ::
|
||||||
[i=(-.a -.b) t=$(a +.a, b +.b)] ::
|
[i=(-.a -.b) t=$(a +.a, b +.b)] ::
|
||||||
|
++ opal :: limb match
|
||||||
|
$% {$& p/span} :: leg
|
||||||
|
{$| p/axis q/(set {p/span q/foot})} :: arm
|
||||||
|
== ::
|
||||||
++ pass @ :: public key
|
++ pass @ :: public key
|
||||||
++ path (list knot) :: filesys location
|
++ path (list knot) :: filesys location
|
||||||
++ pint {p/{p/@ q/@} q/{p/@ q/@}} :: line+column range
|
++ pint {p/{p/@ q/@} q/{p/@ q/@}} :: line+column range
|
||||||
|
++ palo (pair vein opal) :: wing trace, match
|
||||||
|
++ pale (pair axis palo) :: natural match
|
||||||
++ pole |* a/$+(* *) :: nameless list
|
++ pole |* a/$+(* *) :: nameless list
|
||||||
$@($~ {a (pole a)}) ::
|
$@($~ {a (pole a)}) ::
|
||||||
|
++ poll :: natural activation
|
||||||
|
%^ trel axis :: leg activated
|
||||||
|
(unit axis) :: call axis
|
||||||
|
(list (pair span foot)) ::
|
||||||
|
++ polo (each poll (pair span nock)) :: general match
|
||||||
++ pony %+ each :: new pull result
|
++ pony %+ each :: new pull result
|
||||||
%+ pair :: normal
|
palo :: natural result
|
||||||
vein :: wing trace
|
|
||||||
$% {$& p/span} :: leg
|
|
||||||
{$| p/axis q/(set {p/span q/foot})} :: arm
|
|
||||||
== ::
|
|
||||||
%+ each :: abnormal
|
%+ each :: abnormal
|
||||||
@ud :: unmatched, skips
|
@ud :: unmatched / skips
|
||||||
(pair span nock) :: functional
|
(pair span nock) :: synthetic match
|
||||||
++ port $: p/axis ::
|
++ port $: p/axis ::
|
||||||
$= q ::
|
$= q ::
|
||||||
$% {$& p/span} ::
|
$% {$& p/span} ::
|
||||||
@ -340,14 +347,20 @@
|
|||||||
$% {$atom p/term q/(unit @)} :: atom / constant
|
$% {$atom p/term q/(unit @)} :: atom / constant
|
||||||
{$cell p/span q/span} :: ordered pair
|
{$cell p/span q/span} :: ordered pair
|
||||||
{$core p/span q/coil} :: object
|
{$core p/span q/coil} :: object
|
||||||
{$face p/tusk q/span} :: namespace
|
{$face p/tusk q/span} :: namespace (old)
|
||||||
|
{$fuss p/?@(term tool) q/span} :: namespace (new)
|
||||||
{$fork p/(set span)} :: union
|
{$fork p/(set span)} :: union
|
||||||
{$hold p/span q/twig} :: lazy evaluation
|
{$hold p/span q/twig} :: lazy evaluation
|
||||||
== ::
|
== ::
|
||||||
|
++ tart (each (pair vein span) (pair span nock)) :: true/false alias
|
||||||
++ tone $% {$0 p/*} :: success
|
++ tone $% {$0 p/*} :: success
|
||||||
{$1 p/(list)} :: blocks
|
{$1 p/(list)} :: blocks
|
||||||
{$2 p/(list {@ta *})} :: error ~_s
|
{$2 p/(list {@ta *})} :: error ~_s
|
||||||
== ::
|
== ::
|
||||||
|
++ tool :: complex
|
||||||
|
$: p/(map term (unit tart)) :: definitions
|
||||||
|
q/(list (pair span nock)) :: bridges
|
||||||
|
== ::
|
||||||
++ toon $% {$0 p/*} :: success
|
++ toon $% {$0 p/*} :: success
|
||||||
{$1 p/(list)} :: blocks
|
{$1 p/(list)} :: blocks
|
||||||
{$2 p/(list tank)} :: stack trace
|
{$2 p/(list tank)} :: stack trace
|
||||||
@ -6275,6 +6288,24 @@
|
|||||||
%void
|
%void
|
||||||
[%face sag der]
|
[%face sag der]
|
||||||
::
|
::
|
||||||
|
::
|
||||||
|
++ face :: make %face span
|
||||||
|
~/ %face
|
||||||
|
|= {sag/tusk der/span}
|
||||||
|
^- span
|
||||||
|
?: =(%void der)
|
||||||
|
%void
|
||||||
|
[%face sag der]
|
||||||
|
::
|
||||||
|
++ fuss :: make %face span
|
||||||
|
~/ %fuss
|
||||||
|
|= {giz/?@(term tool) der/span}
|
||||||
|
^- span
|
||||||
|
?: =(%void der)
|
||||||
|
%void
|
||||||
|
[%fuss giz der]
|
||||||
|
::
|
||||||
|
::
|
||||||
++ bool `span`(fork [%atom %f `0] [%atom %f `1] ~) :: make loobeal
|
++ bool `span`(fork [%atom %f `0] [%atom %f `1] ~) :: make loobeal
|
||||||
++ fork :: make %fork span
|
++ fork :: make %fork span
|
||||||
~/ %fork
|
~/ %fork
|
||||||
@ -6308,7 +6339,7 @@
|
|||||||
[%8 p.mal buz]
|
[%8 p.mal buz]
|
||||||
?: =({$0 $1} buz)
|
?: =({$0 $1} buz)
|
||||||
mal
|
mal
|
||||||
[%7 mal buz] :: informative default
|
[%7 mal buz]
|
||||||
::
|
::
|
||||||
++ cond :: ?: compile
|
++ cond :: ?: compile
|
||||||
~/ %cond
|
~/ %cond
|
||||||
@ -7703,6 +7734,10 @@
|
|||||||
{$face *}
|
{$face *}
|
||||||
=+ yad=$(sut q.sut)
|
=+ yad=$(sut q.sut)
|
||||||
?^(p.sut yad [p.yad [%face p.sut q.yad]])
|
?^(p.sut yad [p.yad [%face p.sut q.yad]])
|
||||||
|
::
|
||||||
|
{$fuss *}
|
||||||
|
=+ yad=$(sut q.sut)
|
||||||
|
?^(p.sut yad [p.yad [%face p.sut q.yad]])
|
||||||
::
|
::
|
||||||
{$fork *}
|
{$fork *}
|
||||||
=+ yed=(~(tap in p.sut))
|
=+ yed=(~(tap in p.sut))
|
||||||
@ -7785,6 +7820,7 @@
|
|||||||
|=(* (biff ^$(sut q.sut) |=(* `[+>+< +<])))
|
|=(* (biff ^$(sut q.sut) |=(* `[+>+< +<])))
|
||||||
{$core *} (biff $(sut p.sut) |=(* `[p.r.q.sut +<]))
|
{$core *} (biff $(sut p.sut) |=(* `[p.r.q.sut +<]))
|
||||||
{$face *} $(sut repo)
|
{$face *} $(sut repo)
|
||||||
|
{$fuss *} $(sut repo)
|
||||||
{$fork *} =+ yed=(~(tap in p.sut))
|
{$fork *} =+ yed=(~(tap in p.sut))
|
||||||
|- ^- (unit)
|
|- ^- (unit)
|
||||||
?~ yed ~
|
?~ yed ~
|
||||||
@ -7853,6 +7889,7 @@
|
|||||||
::
|
::
|
||||||
{$core *} ?:(?=(?({$atom *} {$cell *}) ref) sut sint)
|
{$core *} ?:(?=(?({$atom *} {$cell *}) ref) sut sint)
|
||||||
{$face *} (face p.sut dext(sut q.sut))
|
{$face *} (face p.sut dext(sut q.sut))
|
||||||
|
{$fuss *} (fuss p.sut dext(sut q.sut))
|
||||||
{$fork *} (fork (turn (~(tap in p.sut)) |=(span dext(sut +<))))
|
{$fork *} (fork (turn (~(tap in p.sut)) |=(span dext(sut +<))))
|
||||||
{$hold *} ?< (~(has in bix) [sut ref])
|
{$hold *} ?< (~(has in bix) [sut ref])
|
||||||
dext(sut repo, bix (~(put in bix) [sut ref]))
|
dext(sut repo, bix (~(put in bix) [sut ref]))
|
||||||
@ -7865,6 +7902,7 @@
|
|||||||
?+ ref !!
|
?+ ref !!
|
||||||
{$core *} sut
|
{$core *} sut
|
||||||
{$face *} dext(ref repo(sut ref))
|
{$face *} dext(ref repo(sut ref))
|
||||||
|
{$fuss *} dext(ref repo(sut ref))
|
||||||
{$fork *} =+ yed=(~(tap in p.ref))
|
{$fork *} =+ yed=(~(tap in p.ref))
|
||||||
|- ^- span
|
|- ^- span
|
||||||
?~ yed sut
|
?~ yed sut
|
||||||
@ -7963,6 +8001,17 @@
|
|||||||
^- (pair span span)
|
^- (pair span span)
|
||||||
(~(mull et hyp rig) gol dox)
|
(~(mull et hyp rig) gol dox)
|
||||||
::
|
::
|
||||||
|
++ felt
|
||||||
|
|= lap/opal
|
||||||
|
^- span
|
||||||
|
?- -.lap
|
||||||
|
$& p.lap
|
||||||
|
$| %- fire
|
||||||
|
%+ turn (~(tap in q.lap))
|
||||||
|
|= {a/span b/foot}
|
||||||
|
[a [%ash %$ 1]]
|
||||||
|
==
|
||||||
|
::
|
||||||
++ find
|
++ find
|
||||||
|= {way/vial hyp/wing}
|
|= {way/vial hyp/wing}
|
||||||
~+
|
~+
|
||||||
@ -7982,17 +8031,10 @@
|
|||||||
::
|
::
|
||||||
$&
|
$&
|
||||||
=> :_ +
|
=> :_ +
|
||||||
:* axe=`axis`1
|
:* ref=(felt q.p.mor)
|
||||||
|
axe=`axis`1
|
||||||
lon=p.p.mor
|
lon=p.p.mor
|
||||||
heg=?^(i.hyp i.hyp [%| p=0 q=(some i.hyp)])
|
heg=?^(i.hyp i.hyp [%| p=0 q=(some i.hyp)])
|
||||||
^- ref/span
|
|
||||||
?- -.q.p.mor
|
|
||||||
$& p.q.p.mor
|
|
||||||
$| %- fire
|
|
||||||
%+ turn (~(tap in q.q.p.mor))
|
|
||||||
|= {a/span b/foot}
|
|
||||||
[a [%ash %$ 1]]
|
|
||||||
==
|
|
||||||
==
|
==
|
||||||
?: ?=($& -.heg)
|
?: ?=($& -.heg)
|
||||||
[%& [`p.heg lon] %& (peek(sut ref) way p.heg)]
|
[%& [`p.heg lon] %& (peek(sut ref) way p.heg)]
|
||||||
@ -8063,6 +8105,34 @@
|
|||||||
?~ hit
|
?~ hit
|
||||||
$(ref q.ref, axe 1, lon [~ `axe lon])
|
$(ref q.ref, axe 1, lon [~ `axe lon])
|
||||||
^$(sut q.ref, hyp u.hit, nol [~ `axe lon])
|
^$(sut q.ref, hyp u.hit, nol [~ `axe lon])
|
||||||
|
::
|
||||||
|
{$fuss *}
|
||||||
|
=< main
|
||||||
|
|%
|
||||||
|
++ done here(ref q.ref)
|
||||||
|
++ main
|
||||||
|
?: ?=($~ q.heg) done
|
||||||
|
?@ p.ref
|
||||||
|
?:(=(u.q.heg p.ref) done lose)
|
||||||
|
=% tyr/(unit (unit tart)) (~(get by p.p.ref) u.q.heg)
|
||||||
|
?~ tyr next
|
||||||
|
?~ u.tyr skip
|
||||||
|
?. =(0 p.heg) next(p.heg (dec p.heg))
|
||||||
|
?- -.u.u.tyr
|
||||||
|
$& [%& (weld p.p.u.u.tyr `vein`[~ `axe lon])]
|
||||||
|
$| [%| p.p.u.u.tyr (comb [%0 axe] q.p.u.u.tyr)]
|
||||||
|
==
|
||||||
|
++ next
|
||||||
|
|- ^- pony
|
||||||
|
?~ q.p.u.u.tyr done
|
||||||
|
=+ fid=$(ref p.i.q.p.u.u.tyr, lon ~, axe 1)
|
||||||
|
?: ?=({$| $& *} fid)
|
||||||
|
$(q.p.u.u.tyr t.q.p.u.u.tyr, p.heg p.p.fid)
|
||||||
|
=+ vat=(fine (ride fid))
|
||||||
|
[%| %| p.vat (comb q.vat (comb [%0 axe] q.i.q.p.u.u.tyr))]
|
||||||
|
::
|
||||||
|
++ skip $(ref q.ref, p.heg +(p.heg))
|
||||||
|
--
|
||||||
::
|
::
|
||||||
{$fork *}
|
{$fork *}
|
||||||
=+ yed=(~(tap in p.ref))
|
=+ yed=(~(tap in p.ref))
|
||||||
@ -8084,6 +8154,16 @@
|
|||||||
--
|
--
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
|
++ fine
|
||||||
|
|= {luc/polo hej/(list (pair axis nock))}
|
||||||
|
^- (pair span nock)
|
||||||
|
?- -.luc
|
||||||
|
%| p.luc
|
||||||
|
%& :- (fire r.p.luc)
|
||||||
|
=+ (hike p.p.luc hec)
|
||||||
|
?~(q.p.luc - [%9 u.q.p.luc -])
|
||||||
|
==
|
||||||
|
::
|
||||||
++ fire
|
++ fire
|
||||||
|= hag/(list {p/span q/foot})
|
|= hag/(list {p/span q/foot})
|
||||||
^- span
|
^- span
|
||||||
@ -8131,6 +8211,7 @@
|
|||||||
::
|
::
|
||||||
{$core *} [%0 0]
|
{$core *} [%0 0]
|
||||||
{$face *} $(sut q.sut)
|
{$face *} $(sut q.sut)
|
||||||
|
{$fuss *} $(sut q.sut)
|
||||||
{$fork *} =+ yed=(~(tap in p.sut))
|
{$fork *} =+ yed=(~(tap in p.sut))
|
||||||
|- ^- nock
|
|- ^- nock
|
||||||
?~(yed [%1 1] (flor ^$(sut i.yed) $(yed t.yed)))
|
?~(yed [%1 1] (flor ^$(sut i.yed) $(yed t.yed)))
|
||||||
@ -8170,6 +8251,7 @@
|
|||||||
::
|
::
|
||||||
{$core *} $(sut repo)
|
{$core *} $(sut repo)
|
||||||
{$face *} (face p.sut $(sut q.sut))
|
{$face *} (face p.sut $(sut q.sut))
|
||||||
|
{$fuss *} (fuss p.sut $(sut q.sut))
|
||||||
{$fork *} (fork (turn (~(tap in p.sut)) |=(span ^$(sut +<))))
|
{$fork *} (fork (turn (~(tap in p.sut)) |=(span ^$(sut +<))))
|
||||||
{$hold *}
|
{$hold *}
|
||||||
?: (~(has in bix) [sut ref])
|
?: (~(has in bix) [sut ref])
|
||||||
@ -8357,6 +8439,7 @@
|
|||||||
{$cell *} |($(sut p.sut) $(sut q.sut))
|
{$cell *} |($(sut p.sut) $(sut q.sut))
|
||||||
{$core *} $(sut p.sut)
|
{$core *} $(sut p.sut)
|
||||||
{$face *} $(sut q.sut)
|
{$face *} $(sut q.sut)
|
||||||
|
{$fuss *} $(sut q.sut)
|
||||||
{$fork *} (lien (~(tap in p.sut)) |=(span ^$(sut +<)))
|
{$fork *} (lien (~(tap in p.sut)) |=(span ^$(sut +<)))
|
||||||
{$hold *} |((~(has in gil) sut) $(gil (~(put in gil) sut), sut repo))
|
{$hold *} |((~(has in gil) sut) $(gil (~(put in gil) sut), sut repo))
|
||||||
$noun |
|
$noun |
|
||||||
@ -8579,6 +8662,7 @@
|
|||||||
== ==
|
== ==
|
||||||
==
|
==
|
||||||
{$face *} dext(sut q.sut)
|
{$face *} dext(sut q.sut)
|
||||||
|
{$fuss *} dext(sut q.sut)
|
||||||
{$fork *} ?. ?=(?({$atom *} $noun {$cell *} {$core *}) ref) sint
|
{$fork *} ?. ?=(?({$atom *} $noun {$cell *} {$core *}) ref) sint
|
||||||
(lien (~(tap in p.sut)) |=(span dext(tel |, sut +<)))
|
(lien (~(tap in p.sut)) |=(span dext(tel |, sut +<)))
|
||||||
{$hold *} ?: (~(has in seg) sut) |
|
{$hold *} ?: (~(has in seg) sut) |
|
||||||
@ -8599,6 +8683,7 @@
|
|||||||
{$cell *} |
|
{$cell *} |
|
||||||
{$core *} dext(ref repo(sut ref))
|
{$core *} dext(ref repo(sut ref))
|
||||||
{$face *} dext(ref q.ref)
|
{$face *} dext(ref q.ref)
|
||||||
|
{$fuss *} dext(ref q.ref)
|
||||||
{$fork *} (levy (~(tap in p.ref)) |=(span sint(ref +<)))
|
{$fork *} (levy (~(tap in p.ref)) |=(span sint(ref +<)))
|
||||||
{$hold *} ?: (~(has in reg) ref) &
|
{$hold *} ?: (~(has in reg) ref) &
|
||||||
?: (~(has in gil) [sut ref]) &
|
?: (~(has in gil) [sut ref]) &
|
||||||
@ -8710,6 +8795,7 @@
|
|||||||
?- sut
|
?- sut
|
||||||
{$core *} [%cell %noun p.sut]
|
{$core *} [%cell %noun p.sut]
|
||||||
{$face *} q.sut
|
{$face *} q.sut
|
||||||
|
{$fuss *} q.sut
|
||||||
{$hold *} (rest [[p.sut q.sut] ~])
|
{$hold *} (rest [[p.sut q.sut] ~])
|
||||||
$noun (fork [%atom %$ ~] [%cell %noun %noun] ~)
|
$noun (fork [%atom %$ ~] [%cell %noun %noun] ~)
|
||||||
* ~|(%repo-fltt !!)
|
* ~|(%repo-fltt !!)
|
||||||
@ -8729,12 +8815,9 @@
|
|||||||
==
|
==
|
||||||
~
|
~
|
||||||
::
|
::
|
||||||
++ seek
|
++ ride
|
||||||
|= hyp/wing
|
|= fid/pony
|
||||||
^- %+ each
|
^- polo
|
||||||
(trel axis (unit axis) (list (pair span foot)))
|
|
||||||
(pair span nock)
|
|
||||||
=+ fid=(find %read hyp)
|
|
||||||
?- -.fid
|
?- -.fid
|
||||||
$& :+ %& (tend p.p.fid)
|
$& :+ %& (tend p.p.fid)
|
||||||
?- -.q.p.fid
|
?- -.q.p.fid
|
||||||
@ -8746,6 +8829,11 @@
|
|||||||
$& ~|([%find hyp] !!)
|
$& ~|([%find hyp] !!)
|
||||||
== ==
|
== ==
|
||||||
::
|
::
|
||||||
|
++ seek
|
||||||
|
|= hyp/wing
|
||||||
|
^- polo
|
||||||
|
(ride (find %read hyp))
|
||||||
|
::
|
||||||
++ take
|
++ take
|
||||||
|= {vit/vein duz/$+(span span)}
|
|= {vit/vein duz/$+(span span)}
|
||||||
^- (pair axis span)
|
^- (pair axis span)
|
||||||
@ -8757,6 +8845,7 @@
|
|||||||
|- ^- span
|
|- ^- span
|
||||||
?+ sut ^$(vit t.vit)
|
?+ sut ^$(vit t.vit)
|
||||||
{$face *} (face p.sut ^$(vit t.vit, sut q.sut))
|
{$face *} (face p.sut ^$(vit t.vit, sut q.sut))
|
||||||
|
{$fuss *} (fuss p.sut ^$(vit t.vit, sut q.sut))
|
||||||
{$fork *} (fork (turn (~(tap in p.sut)) |=(span ^$(sut +<))))
|
{$fork *} (fork (turn (~(tap in p.sut)) |=(span ^$(sut +<))))
|
||||||
{$hold *} $(sut repo)
|
{$hold *} $(sut repo)
|
||||||
==
|
==
|
||||||
@ -8776,6 +8865,7 @@
|
|||||||
$(sut repo)
|
$(sut repo)
|
||||||
(core $(sut p.sut, u.i.vit lat) q.sut)
|
(core $(sut p.sut, u.i.vit lat) q.sut)
|
||||||
{$face *} (face p.sut $(sut q.sut))
|
{$face *} (face p.sut $(sut q.sut))
|
||||||
|
{$fuss *} (fuss p.sut $(sut q.sut))
|
||||||
{$fork *} (fork (turn (~(tap in p.sut)) |=(span ^$(sut +<))))
|
{$fork *} (fork (turn (~(tap in p.sut)) |=(span ^$(sut +<))))
|
||||||
{$hold *} ?: (~(has in vil) sut)
|
{$hold *} ?: (~(has in vil) sut)
|
||||||
%void
|
%void
|
||||||
@ -8816,6 +8906,7 @@
|
|||||||
{$cell *} (cell $(sut p.sut) $(sut q.sut))
|
{$cell *} (cell $(sut p.sut) $(sut q.sut))
|
||||||
{$core *} ?>(|(=(%gold p.q.sut) =(%lead yoz)) sut(p.q yoz))
|
{$core *} ?>(|(=(%gold p.q.sut) =(%lead yoz)) sut(p.q yoz))
|
||||||
{$face *} (face p.sut $(sut q.sut))
|
{$face *} (face p.sut $(sut q.sut))
|
||||||
|
{$fuss *} (fuss p.sut $(sut q.sut))
|
||||||
{$fork *} (fork (turn (~(tap in p.sut)) |=(span ^$(sut +<))))
|
{$fork *} (fork (turn (~(tap in p.sut)) |=(span ^$(sut +<))))
|
||||||
{$hold *} $(sut repo)
|
{$hold *} $(sut repo)
|
||||||
==
|
==
|
||||||
|
Loading…
Reference in New Issue
Block a user