diff --git a/app/dojo.hoon b/app/dojo.hoon index 9dbd486a3..293fcf646 100644 --- a/app/dojo.hoon +++ b/app/dojo.hoon @@ -1709,7 +1709,7 @@ => ~(. he moz ses) =- [wrap=- +] =+ he-arm=he-type - |% +- $ + |@ +- $ |: +<.he-arm ^- (quip move _..he) he-abet:(he-arm +<) diff --git a/app/hood.hoon b/app/hood.hoon index d3a5dd8e8..5e71e7f64 100644 --- a/app/hood.hoon +++ b/app/hood.hoon @@ -43,7 +43,7 @@ {$1 lac/(map @tas hood-part)} :: ++ hood-good :: extract specific =+ hed=$:hood-head - |% +- $ + |@ +- $ |: paw=$:hood-part ?- hed $drum ?>(?=($drum -.paw) `part:hood-drum`paw) @@ -56,7 +56,7 @@ ++ hood-head _-:$:hood-part :: initialize state ++ hood-make :: =+ $:{our/@p hed/hood-head} :: - |% +- $ + |@ +- $ ?- hed $drum (make:hood-drum our) $helm *part:hood-helm @@ -87,7 +87,7 @@ == :: ++ able :: find+make part =+ hed=$:hood-head - |% +- $ + |@ +- $ =+ rep=(~(get by lac) hed) =+ par=?^(rep u.rep `hood-part`(hood-make our.hid hed)) ((hood-good hed) par) @@ -95,7 +95,7 @@ :: ++ ably :: save part =+ $:{(list) hood-part} - |% +- $ + |@ +- $ [(flop +<-) %_(+> lac (~(put by lac) +<+< +<+))] -- :: :: :: diff --git a/lib/hall.hoon b/lib/hall.hoon index 2adfb5ce3..7a22790a6 100644 --- a/lib/hall.hoon +++ b/lib/hall.hoon @@ -246,7 +246,7 @@ :: ++ or =+ typ=$:|-($@(@tas {@tas $})) - |% +- $ + |@ +- $ |= con/coin ::^- _(snag *@ (turn (limo typ) |*(a/@tas [a (odo:raid:wired a)]))) ?> ?=($$ -.con) diff --git a/lib/hood/womb.hoon b/lib/hood/womb.hoon index 710bf51b7..a50ff973f 100644 --- a/lib/hood/womb.hoon +++ b/lib/hood/womb.hoon @@ -8,6 +8,7 @@ :: :: :: :::: :: :: :: :: :: +!: |% ++ foil :: ship allocation map |* a=mold :: entry mold @@ -196,7 +197,7 @@ :: ++ fo |_ (foil $@(~ *)) - ++ nth :: index + +- nth :: index |= a/@u ^- (pair (unit @u) @u) ?: (lth a ~(wyt in und)) =+ out=(snag a (sort ~(tap in und) lth)) @@ -207,34 +208,8 @@ ?: =(0 a) [(some ctr) a] $(a (dec a), +<.nth new) :: - +- fin +< :: abet - ++ new :: alloc - ?: =(ctr +(max)) +< - =. ctr +(ctr) - ?. (~(has in ove) ctr) +< - new(ove (~(del in ove) ctr)) - :: - +- get :: nullable - |= a/@p ^+ ?~(box ~ q.n.box) - (fall (~(get by box) (neis a)) ~) - :: - +- put - |* {a/@u b/*} ^+ fin :: b/_(~(got by box)) - ~| put+[a fin] - ?> (fit a) - =; adj adj(box (~(put by box) a b)) - ?: (~(has in box) a) fin - ?: =(ctr a) new - ?: (lth a ctr) - ?. (~(has in und) a) fin - fin(und (~(del in und) a)) - ?. =(a ctr:new) :: heuristic - fin(ove (~(put in ove) a)) - =+ n=new(+< new) - n(und (~(put in und.n) ctr)) - :: - ++ fit |=(a/@u &((lte min a) (lte a max))) :: in range - ++ gud :: invariant + +- fit |=(a/@u &((lte min a) (lte a max))) :: in range + +- gud :: invariant ?& (fit(max +(max)) ctr) (~(all in und) fit(max ctr)) (~(all in ove) fit(min ctr)) @@ -250,6 +225,34 @@ ?:((~(has by box) min) 1 0) == == + :: + +- fin +< :: abet + :: + +- get :: nullable + |= a/@p ^+ ?~(box ~ q.n.box) + (fall (~(get by box) (neis a)) ~) + :: + +- put + |* {a/@u b/*} ^+ fin :: b/_(~(got by box)) + ~| put+[a fin] + :: ?> (fit a) + =; adj adj(box (~(put by box) a b)) + ?: (~(has in box) a) fin + ?: =(ctr a) new + ?: (lth a ctr) + ?. (~(has in und) a) fin + fin(und (~(del in und) a)) + ?. =(a ctr:new) :: heuristic + fin(ove (~(put in ove) a)) + =+ n=new(+< new) + n(und (~(put in und.n) ctr)) + :: + +- new :: alloc + |- ^+ +>- + ?: =(ctr +(max)) +>- + =. ctr +(ctr) + ?. (~(has in ove) ctr) +>- + $(ove (~(del in ove) ctr)) -- -- :: :: :: diff --git a/lib/new-hoon.hoon b/lib/new-hoon.hoon index 6d3438dc4..27f8adb3e 100644 --- a/lib/new-hoon.hoon +++ b/lib/new-hoon.hoon @@ -767,7 +767,7 @@ ++ multi-homo |* a=(list (list)) ^+ =< $ - |% +- $ ?:(*? ~ [i=(homo (snag 0 a)) t=$]) + |@ +- $ ?:(*? ~ [i=(homo (snag 0 a)) t=$]) -- a :: diff --git a/sur/twitter.hoon b/sur/twitter.hoon index ef1a03c1b..9ba9ac9ab 100644 --- a/sur/twitter.hoon +++ b/sur/twitter.hoon @@ -64,14 +64,14 @@ ++ heads |*(a/(pole) ?~(a a [-<.a (heads +.a)])) ++ fork-clams =+ $:{a/(pair _{term *} (pole _{term *}))} - |% +- $ + |@ +- $ ?~ q.a p.a ?(p.a (fork-clams q.a)) -- :: ++ normalize =+ $:{a/_{@ *}} - |% +- $ + |@ +- $ |= b/* ^+ [?@(- . .)]:(a b) (a b) diff --git a/sys/hoon.hoon b/sys/hoon.hoon index f4acbd54f..410eaaa39 100644 --- a/sys/hoon.hoon +++ b/sys/hoon.hoon @@ -242,19 +242,19 @@ |* {a/$-(* *) b/$-(* *)} =< +:|.((a (b))) :: type check =+ c=+<.b - |% +- $ (a (b c)) + |@ +- $ (a (b c)) -- :: ++ cury :: curry left |* {a/$-(^ *) b/*} =+ c=+<+.a - |% +- $ (a b c) + |@ +- $ (a b c) -- :: ++ curr :: curry right |* {a/$-(^ *) c/*} =+ b=+<+.a - |% +- $ (a b c) + |@ +- $ (a b c) -- :: ++ fore |*(a/$-(* *) |*(b/$-(* *) (pair a b))) :: pair before @@ -654,7 +654,7 @@ ++ homo :: homogenize |* a/(list) ^+ =< $ - |% +- $ ?:(*? ~ [i=(snag 0 a) t=$]) + |@ +- $ ?:(*? ~ [i=(snag 0 a) t=$]) -- a :: @@ -686,7 +686,7 @@ ++ limo :: listify |* a/* ^+ =< $ - |% +- $ ?~(a ~ ?:(*? [i=-.a t=$] $(a +.a))) + |@ +- $ ?~(a ~ ?:(*? [i=-.a t=$] $(a +.a))) -- a :: @@ -834,7 +834,7 @@ :: ++ welp :: faceless weld =| {* *} - |% + |@ +- $ ?~ +<- +<-(. +<+) @@ -843,7 +843,7 @@ :: ++ zing :: promote =| * - |% + |@ +- $ ?~ +< +< @@ -1231,7 +1231,8 @@ :: ++ in :: set engine ~/ %in - |_ a/(tree) :: (set) + =| a/(tree) :: (set) + |@ +- all :: logical AND ~/ %all |* b/$-(* ?) @@ -1296,7 +1297,7 @@ +- dif :: difference ~/ %dif =+ b=a - |% + |@ +- $ |- ^+ a ?~ b @@ -1346,7 +1347,7 @@ +- int :: intersection ~/ %int =+ b=a - |% + |@ +- $ |- ^+ a ?~ b @@ -1409,7 +1410,7 @@ +- uni :: union ~/ %uni =+ b=a - |% + |@ +- $ ?: =(a b) a |- ^+ a @@ -1444,7 +1445,7 @@ ~/ %by =| a/(tree (pair)) :: (map) =* node ?>(?=(^ a) n.a) - |% + |@ +- all :: logical AND ~/ %all |* b/$-(* ?) @@ -1501,7 +1502,7 @@ +- dif :: difference ~/ %dif =+ b=a - |% + |@ +- $ |- ^+ a ?~ b @@ -1572,7 +1573,7 @@ +- int :: intersection ~/ %int =+ b=a - |% + |@ +- $ |- ^+ a ?~ b @@ -1660,7 +1661,7 @@ +- uni :: union, merge ~/ %uni =+ b=a - |% + |@ +- $ |- ^+ a ?~ b @@ -1682,7 +1683,7 @@ :: +- uno :: general union =+ b=a - |% + |@ +- $ |* meg/$-({* * *} *) |- ^+ a @@ -1733,7 +1734,8 @@ :: :: :: ++ ja :: jar engine - |_ a/(tree (pair * (list))) :: (jar) + =| a/(tree (pair * (list))) :: (jar) + |@ +- get :: gets list by key |* b/* =+ c=(~(get by a) b) @@ -1745,7 +1747,8 @@ (~(put by a) b [c d]) -- ++ ju :: jug engine - |_ a/(tree (pair * (tree))) :: (jug) + =| a/(tree (pair * (tree))) :: (jug) + |@ +- del :: del key-set pair |* {b/* c/*} ^+ a @@ -1784,7 +1787,8 @@ :: :: :: ++ to :: queue engine - |_ a/(tree) :: (qeu) + =| a/(tree) :: (qeu) + |@ +- bal |- ^+ a ?~ a ~ @@ -1886,7 +1890,7 @@ ++ le :: construct list |* a/(list) ^+ =< $ - |% +- $ ?:(*? ~ [i=(snag 0 a) t=$]) + |@ +- $ ?:(*? ~ [i=(snag 0 a) t=$]) -- a :: :: @@ -3714,7 +3718,7 @@ {$2 p/(list tank)} :: stack trace == :: ++ wonk =+ veq=$:edge :: product from edge - |% +- $ ?~(q.veq !! p.u.q.veq) :: + |@ +- $ ?~(q.veq !! p.u.q.veq) :: -- :: -- => :: :: @@ -4415,7 +4419,7 @@ ++ bend :: conditional comp ~/ %bend =+ raq=|*({a/* b/*} [~ u=[a b]]) - |% + |@ +- $ ~/ %fun |* {vex/edge sab/rule} @@ -4434,7 +4438,7 @@ ++ comp ~/ %comp =+ raq=|*({a/* b/*} [a b]) :: arbitrary compose - |% + |@ +- $ ~/ %fun |* {vex/edge sab/rule} @@ -4563,7 +4567,7 @@ ++ here :: place-based apply ~/ %here =+ [hez=|=({a/pint b/*} [a b]) sef=*rule] - |% + |@ +- $ ~/ %fun |= tub/nail @@ -4624,7 +4628,7 @@ :: ++ knee :: callbacks =| {gar/* sef/_|.(*rule)} - |% +- $ + |@ +- $ |= tub/nail ^- (like _gar) ((sef) tub) @@ -5650,7 +5654,7 @@ ++ mule :: typed virtual ~/ %mule =+ taq=|.(**) - |% +- $ + |@ +- $ =+ mud=(mute taq) ?- -.mud %& [%& p=$:taq] @@ -8617,7 +8621,7 @@ :: ++ lead =+ [sem=@tas out=[** $:life]] - |% +- $ + |@ +- $ [[sem -.out] +.out] -- :: @@ -8631,7 +8635,7 @@ =+ =< $ $: etc/_^|(|:(** $:{* life})) == - |% +- $ + |@ +- $ |* bud/* ^+ [bud vit] ?: =(~ bud) [bud vit] @@ -8658,7 +8662,7 @@ tri/_^|(|:(** $:{* life})) qua/_^|(|:(** $:{* life})) == - |% +- $ + |@ +- $ |* bud/* =^ yal vit (one -.bud) =^ ves vit (two +<.bud) @@ -8671,7 +8675,7 @@ =+ =< $ $: etc/_^|(|:(** $:{* life})) == - |% +- $ + |@ +- $ |* bud/* ^+ [bud vit] ?: =(~ bud) [bud vit] @@ -8690,7 +8694,7 @@ two/_^|(|:(** $:{* life})) tri/_^|(|:(** $:{* life})) == - |% +- $ + |@ +- $ |* bud/* =^ yal vit (one -.bud) =^ ves vit (two +<.bud) @@ -8732,7 +8736,7 @@ $: one/_^|(|:(** $:{* life})) two/_^|(|:(** $:{* life})) == - |% +- $ + |@ +- $ |* bud/* =^ yal vit (one -.bud) =^ ves vit (two +.bud) @@ -9071,7 +9075,7 @@ -- ++ def =+ deft:arc - |% +- $ + |@ +- $ => +< |% ++ pord |*(* (form +< *nock)) :: wrap mint formula @@ -9128,7 +9132,7 @@ :: ++ bin =+ deft:lib - |% +- $ + |@ +- $ => +< |% ++ rame @@ -9147,7 +9151,7 @@ ++ eclo (ecco gelp) ++ ecco =+ rame - |% +- $ + |@ +- $ => +< |: $:{rum/clom rig/(list (pair wing hoon))} ^- foat @@ -9162,7 +9166,7 @@ :: ++ oc =+ inc=(bin:ad) - |% +- $ + |@ +- $ => inc |% ++ echo @@ -13020,20 +13024,20 @@ :: ++ toad :: untrap parser exp =+ har=expa - |% +- $ + |@ +- $ =+ dur=(ifix [lit rit] $:har(tol |)) ?:(tol ;~(pose ;~(pfix gap $:har(tol &)) dur) dur) -- :: ++ rune :: build rune =+ [dif=*rule tuq=** har=expa] - |% +- $ + |@ +- $ ;~(pfix dif (stag tuq (toad har))) -- :: ++ runo :: rune plus =+ [dif=*rule hil=** tuq=** har=expa] - |% +- $ + |@ +- $ ;~(pfix dif (stag hil (stag tuq (toad har)))) -- :: diff --git a/sys/vane/eyre.hoon b/sys/vane/eyre.hoon index e853ceb7f..b97fd6d9b 100644 --- a/sys/vane/eyre.hoon +++ b/sys/vane/eyre.hoon @@ -1057,7 +1057,7 @@ ++ abet ..handle ++ done . ++ teba =+ a=$-(* _..handle) - |% +- $ + |@ +- $ |*(b/* %_(done ..handle (a b))) -- ++ del-deps (teba ^del-deps) @@ -1617,7 +1617,7 @@ ..ix(wix (~(del by wix) ire)) :: ++ teba =+ a=$-(* _..ix) - |% +- $ + |@ +- $ |*(b/* %_(done ..ix (a b))) -- ++ give-json (teba ^give-json) @@ -1798,7 +1798,7 @@ :: XX block reqs until correct core checked in? ++ warn |=(a/tang ((slog (flop a)) abet)) ++ with =+ $:{a/vase b/$-(vase abet)} - |% +- $ |=(c/vase (b (slam a c))) -- + |@ +- $ |=(c/vase (b (slam a c))) -- ++ root-beak `beak`[our %home da+now] :: :: Main