mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-17 11:51:32 +03:00
++nest fully repaired.
This commit is contained in:
parent
533b8c8627
commit
56d30bd9fc
108
arvo/hoon.hoon
108
arvo/hoon.hoon
@ -275,7 +275,6 @@
|
|||||||
{$ktbr p/twig} :: %gold core to %iron
|
{$ktbr p/twig} :: %gold core to %iron
|
||||||
{$ktdt p/twig q/twig} :: cast q to span (p q)
|
{$ktdt p/twig q/twig} :: cast q to span (p q)
|
||||||
{$ktls p/twig q/twig} :: cast q to p, verify
|
{$ktls p/twig q/twig} :: cast q to p, verify
|
||||||
{$kthx p/twig q/twig} :: experimental cast
|
|
||||||
{$kthp p/twig q/twig} :: cast q to icon of p
|
{$kthp p/twig q/twig} :: cast q to icon of p
|
||||||
{$ktpm p/twig} :: %gold core to %zinc
|
{$ktpm p/twig} :: %gold core to %zinc
|
||||||
{$ktsg p/twig} :: p as static constant
|
{$ktsg p/twig} :: p as static constant
|
||||||
@ -658,14 +657,14 @@
|
|||||||
::
|
::
|
||||||
++ homo :: homogenize
|
++ homo :: homogenize
|
||||||
|* a/(list)
|
|* a/(list)
|
||||||
^# =< $
|
^+ =< $
|
||||||
|% +- $ ?:(*? ~ [i=(snag 0 a) t=$])
|
|% +- $ ?:(*? ~ [i=(snag 0 a) t=$])
|
||||||
--
|
--
|
||||||
a
|
a
|
||||||
::
|
::
|
||||||
++ limo :: listify
|
++ limo :: listify
|
||||||
|* a/*
|
|* a/*
|
||||||
^# =< $
|
^+ =< $
|
||||||
|% +- $ ?~(a ~ ?:(*? [i=-.a t=$] $(a +.a)))
|
|% +- $ ?~(a ~ ?:(*? [i=-.a t=$] $(a +.a)))
|
||||||
--
|
--
|
||||||
a
|
a
|
||||||
@ -2839,19 +2838,19 @@
|
|||||||
::
|
::
|
||||||
++ li :: list from raw noun
|
++ li :: list from raw noun
|
||||||
|* a/*
|
|* a/*
|
||||||
^#((homo (limo a)) a)
|
^+((homo (limo a)) a)
|
||||||
::
|
::
|
||||||
++ mo :: map from raw noun
|
++ mo :: map from raw noun
|
||||||
|* a/*
|
|* a/*
|
||||||
(malt ^#((homo (limo a)) a))
|
(malt ^+((homo (limo a)) a))
|
||||||
::
|
::
|
||||||
++ malt :: map from raw list
|
++ malt :: map from raw list
|
||||||
|* a/(list)
|
|* a/(list)
|
||||||
(molt ^#(*(list {p/_-<.a q/_->.a}) a))
|
(molt `(list {p/_-<.a q/_->.a})`a)
|
||||||
::
|
::
|
||||||
++ molt :: map from pair list
|
++ molt :: map from pair list
|
||||||
|* a/(list (pair))
|
|* a/(list (pair))
|
||||||
(~(gas by ^#(*(map _p.i.-.a _q.i.-.a) ~)) a)
|
(~(gas by `(map _p.i.-.a _q.i.-.a)`~) a)
|
||||||
::
|
::
|
||||||
++ sa :: make a set
|
++ sa :: make a set
|
||||||
|* a/(list)
|
|* a/(list)
|
||||||
@ -7758,7 +7757,6 @@
|
|||||||
%moot moot
|
%moot moot
|
||||||
%mull mull
|
%mull mull
|
||||||
%nest nest
|
%nest nest
|
||||||
%nost nost
|
|
||||||
%play play
|
%play play
|
||||||
%peek peek
|
%peek peek
|
||||||
%repo repo
|
%repo repo
|
||||||
@ -8177,12 +8175,6 @@
|
|||||||
::
|
::
|
||||||
{$ktls *}
|
{$ktls *}
|
||||||
=+(hif=(nice (play p.gen)) [hif q:$(gen q.gen, gol hif)])
|
=+(hif=(nice (play p.gen)) [hif q:$(gen q.gen, gol hif)])
|
||||||
::
|
|
||||||
{$kthx *}
|
|
||||||
=+ hif=(nice (play p.gen))
|
|
||||||
=+ fid=$(gen q.gen, gol %noun)
|
|
||||||
?> (nost(sut hif) & p.fid)
|
|
||||||
[hif q.fid]
|
|
||||||
::
|
::
|
||||||
{$ktpm *} =+(vat=$(gen p.gen) [(wrap(sut p.vat) %zinc) q.vat])
|
{$ktpm *} =+(vat=$(gen p.gen) [(wrap(sut p.vat) %zinc) q.vat])
|
||||||
{$ktsg *}
|
{$ktsg *}
|
||||||
@ -8339,10 +8331,6 @@
|
|||||||
{$ktls *}
|
{$ktls *}
|
||||||
=+ hif=[p=(nice (play p.gen)) q=(play(sut dox) p.gen)]
|
=+ hif=[p=(nice (play p.gen)) q=(play(sut dox) p.gen)]
|
||||||
=+($(gen q.gen, gol p.hif) hif)
|
=+($(gen q.gen, gol p.hif) hif)
|
||||||
::
|
|
||||||
{$kthx *}
|
|
||||||
=+ hif=[p=(nice (play p.gen)) q=(play(sut dox) p.gen)]
|
|
||||||
=+($(gen q.gen, gol p.hif) hif)
|
|
||||||
::
|
::
|
||||||
{$ktpm *}
|
{$ktpm *}
|
||||||
=+(vat=$(gen p.gen) [(wrap(sut p.vat) %zinc) (wrap(sut q.vat) %zinc)])
|
=+(vat=$(gen p.gen) [(wrap(sut p.vat) %zinc) (wrap(sut q.vat) %zinc)])
|
||||||
@ -8459,10 +8447,14 @@
|
|||||||
--
|
--
|
||||||
::
|
::
|
||||||
++ meet |=(ref/span &((nest | ref) (nest(sut ref) | sut)))
|
++ meet |=(ref/span &((nest | ref) (nest(sut ref) | sut)))
|
||||||
++ nost
|
++ mite |=(ref/span |((nest | ref) (nest(sut ref) | sut)))
|
||||||
~/ %nost
|
++ nest
|
||||||
|
~/ %nest
|
||||||
|= {tel/? ref/span}
|
|= {tel/? ref/span}
|
||||||
~& %nost
|
=| $: seg/(set span) :: degenerate sut
|
||||||
|
reg/(set span) :: degenerate ref
|
||||||
|
gil/(set {p/span q/span}) :: assume nest
|
||||||
|
==
|
||||||
=< dext
|
=< dext
|
||||||
|%
|
|%
|
||||||
++ cong
|
++ cong
|
||||||
@ -8478,9 +8470,9 @@
|
|||||||
?&
|
?&
|
||||||
?|(=(p.q.sut p.q.ref) =(%gold p.q.ref))
|
?|(=(p.q.sut p.q.ref) =(%gold p.q.ref))
|
||||||
::
|
::
|
||||||
?| (~(has in gul) [sut ref])
|
?| (~(has in gil) [sut ref])
|
||||||
%+ %= cram
|
%+ %= cram
|
||||||
gul (~(put in gul) [sut ref])
|
gil (~(put in gil) [sut ref])
|
||||||
sut sut(p q.q.sut, p.q %gold)
|
sut sut(p q.q.sut, p.q %gold)
|
||||||
ref ref(p q.q.ref, p.q %gold)
|
ref ref(p q.q.ref, p.q %gold)
|
||||||
==
|
==
|
||||||
@ -8526,13 +8518,15 @@
|
|||||||
==
|
==
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ dare
|
++ dext
|
||||||
?& !(~(has in meg) [sut ref])
|
|
||||||
dext(tel |, meg (~(put in meg) [sut ref]))
|
|
||||||
==
|
|
||||||
::
|
|
||||||
++ dear
|
|
||||||
^- ?
|
^- ?
|
||||||
|
=- ?: - &
|
||||||
|
?: tel
|
||||||
|
:: ~_ (dunk %need)
|
||||||
|
:: ~_ (dunk(sut ref) %have)
|
||||||
|
~|(%nest-fail !!)
|
||||||
|
|
|
||||||
|
?: =(sut ref) &
|
||||||
?- sut
|
?- sut
|
||||||
$void sint
|
$void sint
|
||||||
$noun &
|
$noun &
|
||||||
@ -8548,60 +8542,46 @@
|
|||||||
?. ?=({$cell *} ref)
|
?. ?=({$cell *} ref)
|
||||||
sint
|
sint
|
||||||
?&
|
?&
|
||||||
dext(sut p.sut, ref p.ref)
|
dext(sut p.sut, ref p.ref, seg ~, reg ~)
|
||||||
dext(sut q.sut, ref q.ref)
|
dext(sut q.sut, ref q.ref, seg ~, reg ~)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
{$core *}
|
{$core *}
|
||||||
?. ?=({$core *} ref)
|
?. ?=({$core *} ref)
|
||||||
sint
|
sint
|
||||||
cong
|
cong(seg ~, reg ~)
|
||||||
::
|
::
|
||||||
{$face *} dext(sut q.sut)
|
{$face *} dext(sut q.sut)
|
||||||
{$fork *}
|
{$fork *}
|
||||||
?. ?=(?({$atom *} $noun {$cell *} {$core *}) ref)
|
?. ?=(?({$atom *} $noun {$cell *} {$core *}) ref)
|
||||||
sint
|
sint
|
||||||
|(dare(sut p.sut) dare(sut q.sut))
|
|(dext(sut p.sut) dext(sut q.sut))
|
||||||
::
|
::
|
||||||
{$hold *} dext(sut repo)
|
{$hold *}
|
||||||
==
|
?: (~(has in seg) sut) |
|
||||||
::
|
?: (~(has in gil) [sut ref]) &
|
||||||
++ dext
|
dext(sut repo, seg (~(put in seg) sut), gil (~(put in gil) [sut ref]))
|
||||||
^- ?
|
|
||||||
=- ?: tyn
|
|
||||||
&
|
|
||||||
?: tel
|
|
||||||
~_ (dunk %need)
|
|
||||||
~_ (dunk(sut ref) %have)
|
|
||||||
~|(%nost-fail !!)
|
|
||||||
|
|
|
||||||
^= tyn
|
|
||||||
?: =(sut ref) &
|
|
||||||
dear
|
|
||||||
::
|
|
||||||
++ sore
|
|
||||||
?| (~(has in gem) [sut ref])
|
|
||||||
dext(gem (~(put in gem) [sut ref]))
|
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ sint
|
++ sint
|
||||||
^- ?
|
^- ?
|
||||||
?- ref
|
?- ref
|
||||||
{$atom *} |
|
|
||||||
{$cell *} |
|
|
||||||
{$fork *} &(sore(ref p.ref) sore(ref q.ref))
|
|
||||||
{$hold *} dext(ref repo(sut ref))
|
|
||||||
$noun |
|
$noun |
|
||||||
$void &
|
$void &
|
||||||
* dext(ref repo(sut ref))
|
{$atom *} |
|
||||||
|
{$cell *} |
|
||||||
|
{$core *} dext(ref repo(sut ref))
|
||||||
|
{$face *} dext(ref q.ref)
|
||||||
|
{$fork *} &(sint(ref p.ref) sint(ref q.ref))
|
||||||
|
{$hold *} ?: (~(has in reg) ref) &
|
||||||
|
?: (~(has in gil) [sut ref]) &
|
||||||
|
%= dext
|
||||||
|
ref repo(sut ref)
|
||||||
|
reg (~(put in reg) ref)
|
||||||
|
gil (~(put in gil) [sut ref])
|
||||||
|
==
|
||||||
==
|
==
|
||||||
--
|
--
|
||||||
|
|
||||||
++ nest
|
|
||||||
~/ %nest
|
|
||||||
|= {tel/? ref/span}
|
|
||||||
^- ?
|
|
||||||
!!
|
|
||||||
::
|
::
|
||||||
++ perk
|
++ perk
|
||||||
|= {way/?($read $rite $both $free) met/?($gold $iron $lead $zinc)}
|
|= {way/?($read $rite $both $free) met/?($gold $iron $lead $zinc)}
|
||||||
@ -8678,7 +8658,6 @@
|
|||||||
{$dtwt *} bool
|
{$dtwt *} bool
|
||||||
{$ktbr *} (wrap(sut $(gen p.gen)) %iron)
|
{$ktbr *} (wrap(sut $(gen p.gen)) %iron)
|
||||||
{$ktls *} $(gen p.gen)
|
{$ktls *} $(gen p.gen)
|
||||||
{$kthx *} $(gen p.gen)
|
|
||||||
{$ktpm *} (wrap(sut $(gen p.gen)) %zinc)
|
{$ktpm *} (wrap(sut $(gen p.gen)) %zinc)
|
||||||
{$ktsg *} $(gen p.gen)
|
{$ktsg *} $(gen p.gen)
|
||||||
{$ktts *} (conk(sut $(gen q.gen)) p.gen)
|
{$ktts *} (conk(sut $(gen q.gen)) p.gen)
|
||||||
@ -9467,7 +9446,6 @@
|
|||||||
['.' (rune dot %ktdt expb)]
|
['.' (rune dot %ktdt expb)]
|
||||||
['-' (rune hep %kthp expb)]
|
['-' (rune hep %kthp expb)]
|
||||||
['+' (rune lus %ktls expb)]
|
['+' (rune lus %ktls expb)]
|
||||||
['#' (rune hax %kthx expb)]
|
|
||||||
['&' (rune pam %ktpm expa)]
|
['&' (rune pam %ktpm expa)]
|
||||||
['~' (rune sig %ktsg expa)]
|
['~' (rune sig %ktsg expa)]
|
||||||
['=' (rune tis %ktts expg)]
|
['=' (rune tis %ktts expg)]
|
||||||
|
Loading…
Reference in New Issue
Block a user