Merge branch 'research-unhelp' into research-tome

This commit is contained in:
Curtis Yarvin 2018-05-22 23:44:09 -07:00
commit 0037e50ec3
8 changed files with 87 additions and 80 deletions

View File

@ -1709,7 +1709,7 @@
=> ~(. he moz ses) => ~(. he moz ses)
=- [wrap=- +] =- [wrap=- +]
=+ he-arm=he-type =+ he-arm=he-type
|% +- $ |@ +- $
|: +<.he-arm |: +<.he-arm
^- (quip move _..he) ^- (quip move _..he)
he-abet:(he-arm +<) he-abet:(he-arm +<)

View File

@ -43,7 +43,7 @@
{$1 lac/(map @tas hood-part)} :: {$1 lac/(map @tas hood-part)} ::
++ hood-good :: extract specific ++ hood-good :: extract specific
=+ hed=$:hood-head =+ hed=$:hood-head
|% +- $ |@ +- $
|: paw=$:hood-part |: paw=$:hood-part
?- hed ?- hed
$drum ?>(?=($drum -.paw) `part:hood-drum`paw) $drum ?>(?=($drum -.paw) `part:hood-drum`paw)
@ -56,7 +56,7 @@
++ hood-head _-:$:hood-part :: initialize state ++ hood-head _-:$:hood-part :: initialize state
++ hood-make :: ++ hood-make ::
=+ $:{our/@p hed/hood-head} :: =+ $:{our/@p hed/hood-head} ::
|% +- $ |@ +- $
?- hed ?- hed
$drum (make:hood-drum our) $drum (make:hood-drum our)
$helm *part:hood-helm $helm *part:hood-helm
@ -87,7 +87,7 @@
== :: == ::
++ able :: find+make part ++ able :: find+make part
=+ hed=$:hood-head =+ hed=$:hood-head
|% +- $ |@ +- $
=+ rep=(~(get by lac) hed) =+ rep=(~(get by lac) hed)
=+ par=?^(rep u.rep `hood-part`(hood-make our.hid hed)) =+ par=?^(rep u.rep `hood-part`(hood-make our.hid hed))
((hood-good hed) par) ((hood-good hed) par)
@ -95,7 +95,7 @@
:: ::
++ ably :: save part ++ ably :: save part
=+ $:{(list) hood-part} =+ $:{(list) hood-part}
|% +- $ |@ +- $
[(flop +<-) %_(+> lac (~(put by lac) +<+< +<+))] [(flop +<-) %_(+> lac (~(put by lac) +<+< +<+))]
-- --
:: :: :: :: :: ::

View File

@ -246,7 +246,7 @@
:: ::
++ or ++ or
=+ typ=$:|-($@(@tas {@tas $})) =+ typ=$:|-($@(@tas {@tas $}))
|% +- $ |@ +- $
|= con/coin |= con/coin
::^- _(snag *@ (turn (limo typ) |*(a/@tas [a (odo:raid:wired a)]))) ::^- _(snag *@ (turn (limo typ) |*(a/@tas [a (odo:raid:wired a)])))
?> ?=($$ -.con) ?> ?=($$ -.con)

View File

@ -8,6 +8,7 @@
:: :: :: :: :: ::
:::: :: :: :::: :: ::
:: :: :: :: :: ::
!:
|% |%
++ foil :: ship allocation map ++ foil :: ship allocation map
|* a=mold :: entry mold |* a=mold :: entry mold
@ -196,7 +197,7 @@
:: ::
++ fo ++ fo
|_ (foil $@(~ *)) |_ (foil $@(~ *))
++ nth :: index +- nth :: index
|= a/@u ^- (pair (unit @u) @u) |= a/@u ^- (pair (unit @u) @u)
?: (lth a ~(wyt in und)) ?: (lth a ~(wyt in und))
=+ out=(snag a (sort ~(tap in und) lth)) =+ out=(snag a (sort ~(tap in und) lth))
@ -207,34 +208,8 @@
?: =(0 a) [(some ctr) a] ?: =(0 a) [(some ctr) a]
$(a (dec a), +<.nth new) $(a (dec a), +<.nth new)
:: ::
+- fin +< :: abet +- fit |=(a/@u &((lte min a) (lte a max))) :: in range
++ new :: alloc +- gud :: invariant
?: =(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(max +(max)) ctr) ?& (fit(max +(max)) ctr)
(~(all in und) fit(max ctr)) (~(all in und) fit(max ctr))
(~(all in ove) fit(min ctr)) (~(all in ove) fit(min ctr))
@ -250,6 +225,34 @@
?:((~(has by box) min) 1 0) ?:((~(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))
-- --
-- --
:: :: :: :: :: ::

View File

@ -767,7 +767,7 @@
++ multi-homo ++ multi-homo
|* a=(list (list)) |* a=(list (list))
^+ =< $ ^+ =< $
|% +- $ ?:(*? ~ [i=(homo (snag 0 a)) t=$]) |@ +- $ ?:(*? ~ [i=(homo (snag 0 a)) t=$])
-- --
a a
:: ::

View File

@ -64,14 +64,14 @@
++ heads |*(a/(pole) ?~(a a [-<.a (heads +.a)])) ++ heads |*(a/(pole) ?~(a a [-<.a (heads +.a)]))
++ fork-clams ++ fork-clams
=+ $:{a/(pair _{term *} (pole _{term *}))} =+ $:{a/(pair _{term *} (pole _{term *}))}
|% +- $ |@ +- $
?~ q.a p.a ?~ q.a p.a
?(p.a (fork-clams q.a)) ?(p.a (fork-clams q.a))
-- --
:: ::
++ normalize ++ normalize
=+ $:{a/_{@ *}} =+ $:{a/_{@ *}}
|% +- $ |@ +- $
|= b/* |= b/*
^+ [?@(- . .)]:(a b) ^+ [?@(- . .)]:(a b)
(a b) (a b)

View File

@ -242,19 +242,19 @@
|* {a/$-(* *) b/$-(* *)} |* {a/$-(* *) b/$-(* *)}
=< +:|.((a (b))) :: type check =< +:|.((a (b))) :: type check
=+ c=+<.b =+ c=+<.b
|% +- $ (a (b c)) |@ +- $ (a (b c))
-- --
:: ::
++ cury :: curry left ++ cury :: curry left
|* {a/$-(^ *) b/*} |* {a/$-(^ *) b/*}
=+ c=+<+.a =+ c=+<+.a
|% +- $ (a b c) |@ +- $ (a b c)
-- --
:: ::
++ curr :: curry right ++ curr :: curry right
|* {a/$-(^ *) c/*} |* {a/$-(^ *) c/*}
=+ b=+<+.a =+ b=+<+.a
|% +- $ (a b c) |@ +- $ (a b c)
-- --
:: ::
++ fore |*(a/$-(* *) |*(b/$-(* *) (pair a b))) :: pair before ++ fore |*(a/$-(* *) |*(b/$-(* *) (pair a b))) :: pair before
@ -654,7 +654,7 @@
++ homo :: homogenize ++ homo :: homogenize
|* a/(list) |* a/(list)
^+ =< $ ^+ =< $
|% +- $ ?:(*? ~ [i=(snag 0 a) t=$]) |@ +- $ ?:(*? ~ [i=(snag 0 a) t=$])
-- --
a a
:: ::
@ -686,7 +686,7 @@
++ limo :: listify ++ limo :: listify
|* a/* |* a/*
^+ =< $ ^+ =< $
|% +- $ ?~(a ~ ?:(*? [i=-.a t=$] $(a +.a))) |@ +- $ ?~(a ~ ?:(*? [i=-.a t=$] $(a +.a)))
-- --
a a
:: ::
@ -834,7 +834,7 @@
:: ::
++ welp :: faceless weld ++ welp :: faceless weld
=| {* *} =| {* *}
|% |@
+- $ +- $
?~ +<- ?~ +<-
+<-(. +<+) +<-(. +<+)
@ -843,7 +843,7 @@
:: ::
++ zing :: promote ++ zing :: promote
=| * =| *
|% |@
+- $ +- $
?~ +< ?~ +<
+< +<
@ -1231,7 +1231,8 @@
:: ::
++ in :: set engine ++ in :: set engine
~/ %in ~/ %in
|_ a/(tree) :: (set) =| a/(tree) :: (set)
|@
+- all :: logical AND +- all :: logical AND
~/ %all ~/ %all
|* b/$-(* ?) |* b/$-(* ?)
@ -1296,7 +1297,7 @@
+- dif :: difference +- dif :: difference
~/ %dif ~/ %dif
=+ b=a =+ b=a
|% |@
+- $ +- $
|- ^+ a |- ^+ a
?~ b ?~ b
@ -1346,7 +1347,7 @@
+- int :: intersection +- int :: intersection
~/ %int ~/ %int
=+ b=a =+ b=a
|% |@
+- $ +- $
|- ^+ a |- ^+ a
?~ b ?~ b
@ -1409,7 +1410,7 @@
+- uni :: union +- uni :: union
~/ %uni ~/ %uni
=+ b=a =+ b=a
|% |@
+- $ +- $
?: =(a b) a ?: =(a b) a
|- ^+ a |- ^+ a
@ -1444,7 +1445,7 @@
~/ %by ~/ %by
=| a/(tree (pair)) :: (map) =| a/(tree (pair)) :: (map)
=* node ?>(?=(^ a) n.a) =* node ?>(?=(^ a) n.a)
|% |@
+- all :: logical AND +- all :: logical AND
~/ %all ~/ %all
|* b/$-(* ?) |* b/$-(* ?)
@ -1501,7 +1502,7 @@
+- dif :: difference +- dif :: difference
~/ %dif ~/ %dif
=+ b=a =+ b=a
|% |@
+- $ +- $
|- ^+ a |- ^+ a
?~ b ?~ b
@ -1572,7 +1573,7 @@
+- int :: intersection +- int :: intersection
~/ %int ~/ %int
=+ b=a =+ b=a
|% |@
+- $ +- $
|- ^+ a |- ^+ a
?~ b ?~ b
@ -1660,7 +1661,7 @@
+- uni :: union, merge +- uni :: union, merge
~/ %uni ~/ %uni
=+ b=a =+ b=a
|% |@
+- $ +- $
|- ^+ a |- ^+ a
?~ b ?~ b
@ -1682,7 +1683,7 @@
:: ::
+- uno :: general union +- uno :: general union
=+ b=a =+ b=a
|% |@
+- $ +- $
|* meg/$-({* * *} *) |* meg/$-({* * *} *)
|- ^+ a |- ^+ a
@ -1733,7 +1734,8 @@
:: :: :: ::
:: ::
++ ja :: jar engine ++ ja :: jar engine
|_ a/(tree (pair * (list))) :: (jar) =| a/(tree (pair * (list))) :: (jar)
|@
+- get :: gets list by key +- get :: gets list by key
|* b/* |* b/*
=+ c=(~(get by a) b) =+ c=(~(get by a) b)
@ -1745,7 +1747,8 @@
(~(put by a) b [c d]) (~(put by a) b [c d])
-- --
++ ju :: jug engine ++ ju :: jug engine
|_ a/(tree (pair * (tree))) :: (jug) =| a/(tree (pair * (tree))) :: (jug)
|@
+- del :: del key-set pair +- del :: del key-set pair
|* {b/* c/*} |* {b/* c/*}
^+ a ^+ a
@ -1784,7 +1787,8 @@
:: :: :: ::
:: ::
++ to :: queue engine ++ to :: queue engine
|_ a/(tree) :: (qeu) =| a/(tree) :: (qeu)
|@
+- bal +- bal
|- ^+ a |- ^+ a
?~ a ~ ?~ a ~
@ -1886,7 +1890,7 @@
++ le :: construct list ++ le :: construct list
|* a/(list) |* a/(list)
^+ =< $ ^+ =< $
|% +- $ ?:(*? ~ [i=(snag 0 a) t=$]) |@ +- $ ?:(*? ~ [i=(snag 0 a) t=$])
-- --
a a
:: :: :: ::
@ -3714,7 +3718,7 @@
{$2 p/(list tank)} :: stack trace {$2 p/(list tank)} :: stack trace
== :: == ::
++ wonk =+ veq=$:edge :: product from edge ++ 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 :: conditional comp
~/ %bend ~/ %bend
=+ raq=|*({a/* b/*} [~ u=[a b]]) =+ raq=|*({a/* b/*} [~ u=[a b]])
|% |@
+- $ +- $
~/ %fun ~/ %fun
|* {vex/edge sab/rule} |* {vex/edge sab/rule}
@ -4434,7 +4438,7 @@
++ comp ++ comp
~/ %comp ~/ %comp
=+ raq=|*({a/* b/*} [a b]) :: arbitrary compose =+ raq=|*({a/* b/*} [a b]) :: arbitrary compose
|% |@
+- $ +- $
~/ %fun ~/ %fun
|* {vex/edge sab/rule} |* {vex/edge sab/rule}
@ -4563,7 +4567,7 @@
++ here :: place-based apply ++ here :: place-based apply
~/ %here ~/ %here
=+ [hez=|=({a/pint b/*} [a b]) sef=*rule] =+ [hez=|=({a/pint b/*} [a b]) sef=*rule]
|% |@
+- $ +- $
~/ %fun ~/ %fun
|= tub/nail |= tub/nail
@ -4624,7 +4628,7 @@
:: ::
++ knee :: callbacks ++ knee :: callbacks
=| {gar/* sef/_|.(*rule)} =| {gar/* sef/_|.(*rule)}
|% +- $ |@ +- $
|= tub/nail |= tub/nail
^- (like _gar) ^- (like _gar)
((sef) tub) ((sef) tub)
@ -5650,7 +5654,7 @@
++ mule :: typed virtual ++ mule :: typed virtual
~/ %mule ~/ %mule
=+ taq=|.(**) =+ taq=|.(**)
|% +- $ |@ +- $
=+ mud=(mute taq) =+ mud=(mute taq)
?- -.mud ?- -.mud
%& [%& p=$:taq] %& [%& p=$:taq]
@ -8617,7 +8621,7 @@
:: ::
++ lead ++ lead
=+ [sem=@tas out=[** $:life]] =+ [sem=@tas out=[** $:life]]
|% +- $ |@ +- $
[[sem -.out] +.out] [[sem -.out] +.out]
-- --
:: ::
@ -8631,7 +8635,7 @@
=+ =< $ =+ =< $
$: etc/_^|(|:(** $:{* life})) $: etc/_^|(|:(** $:{* life}))
== ==
|% +- $ |@ +- $
|* bud/* |* bud/*
^+ [bud vit] ^+ [bud vit]
?: =(~ bud) [bud vit] ?: =(~ bud) [bud vit]
@ -8658,7 +8662,7 @@
tri/_^|(|:(** $:{* life})) tri/_^|(|:(** $:{* life}))
qua/_^|(|:(** $:{* life})) qua/_^|(|:(** $:{* life}))
== ==
|% +- $ |@ +- $
|* bud/* |* bud/*
=^ yal vit (one -.bud) =^ yal vit (one -.bud)
=^ ves vit (two +<.bud) =^ ves vit (two +<.bud)
@ -8671,7 +8675,7 @@
=+ =< $ =+ =< $
$: etc/_^|(|:(** $:{* life})) $: etc/_^|(|:(** $:{* life}))
== ==
|% +- $ |@ +- $
|* bud/* |* bud/*
^+ [bud vit] ^+ [bud vit]
?: =(~ bud) [bud vit] ?: =(~ bud) [bud vit]
@ -8690,7 +8694,7 @@
two/_^|(|:(** $:{* life})) two/_^|(|:(** $:{* life}))
tri/_^|(|:(** $:{* life})) tri/_^|(|:(** $:{* life}))
== ==
|% +- $ |@ +- $
|* bud/* |* bud/*
=^ yal vit (one -.bud) =^ yal vit (one -.bud)
=^ ves vit (two +<.bud) =^ ves vit (two +<.bud)
@ -8732,7 +8736,7 @@
$: one/_^|(|:(** $:{* life})) $: one/_^|(|:(** $:{* life}))
two/_^|(|:(** $:{* life})) two/_^|(|:(** $:{* life}))
== ==
|% +- $ |@ +- $
|* bud/* |* bud/*
=^ yal vit (one -.bud) =^ yal vit (one -.bud)
=^ ves vit (two +.bud) =^ ves vit (two +.bud)
@ -9071,7 +9075,7 @@
-- --
++ def ++ def
=+ deft:arc =+ deft:arc
|% +- $ |@ +- $
=> +< => +<
|% |%
++ pord |*(* (form +< *nock)) :: wrap mint formula ++ pord |*(* (form +< *nock)) :: wrap mint formula
@ -9128,7 +9132,7 @@
:: ::
++ bin ++ bin
=+ deft:lib =+ deft:lib
|% +- $ |@ +- $
=> +< => +<
|% |%
++ rame ++ rame
@ -9147,7 +9151,7 @@
++ eclo (ecco gelp) ++ eclo (ecco gelp)
++ ecco ++ ecco
=+ rame =+ rame
|% +- $ |@ +- $
=> +< => +<
|: $:{rum/clom rig/(list (pair wing hoon))} |: $:{rum/clom rig/(list (pair wing hoon))}
^- foat ^- foat
@ -9162,7 +9166,7 @@
:: ::
++ oc ++ oc
=+ inc=(bin:ad) =+ inc=(bin:ad)
|% +- $ |@ +- $
=> inc => inc
|% |%
++ echo ++ echo
@ -13020,20 +13024,20 @@
:: ::
++ toad :: untrap parser exp ++ toad :: untrap parser exp
=+ har=expa =+ har=expa
|% +- $ |@ +- $
=+ dur=(ifix [lit rit] $:har(tol |)) =+ dur=(ifix [lit rit] $:har(tol |))
?:(tol ;~(pose ;~(pfix gap $:har(tol &)) dur) dur) ?:(tol ;~(pose ;~(pfix gap $:har(tol &)) dur) dur)
-- --
:: ::
++ rune :: build rune ++ rune :: build rune
=+ [dif=*rule tuq=** har=expa] =+ [dif=*rule tuq=** har=expa]
|% +- $ |@ +- $
;~(pfix dif (stag tuq (toad har))) ;~(pfix dif (stag tuq (toad har)))
-- --
:: ::
++ runo :: rune plus ++ runo :: rune plus
=+ [dif=*rule hil=** tuq=** har=expa] =+ [dif=*rule hil=** tuq=** har=expa]
|% +- $ |@ +- $
;~(pfix dif (stag hil (stag tuq (toad har)))) ;~(pfix dif (stag hil (stag tuq (toad har))))
-- --
:: ::

View File

@ -1057,7 +1057,7 @@
++ abet ..handle ++ abet ..handle
++ done . ++ done .
++ teba =+ a=$-(* _..handle) ++ teba =+ a=$-(* _..handle)
|% +- $ |@ +- $
|*(b/* %_(done ..handle (a b))) |*(b/* %_(done ..handle (a b)))
-- --
++ del-deps (teba ^del-deps) ++ del-deps (teba ^del-deps)
@ -1617,7 +1617,7 @@
..ix(wix (~(del by wix) ire)) ..ix(wix (~(del by wix) ire))
:: ::
++ teba =+ a=$-(* _..ix) ++ teba =+ a=$-(* _..ix)
|% +- $ |@ +- $
|*(b/* %_(done ..ix (a b))) |*(b/* %_(done ..ix (a b)))
-- --
++ give-json (teba ^give-json) ++ give-json (teba ^give-json)
@ -1798,7 +1798,7 @@
:: XX block reqs until correct core checked in? :: XX block reqs until correct core checked in?
++ warn |=(a/tang ((slog (flop a)) abet)) ++ warn |=(a/tang ((slog (flop a)) abet))
++ with =+ $:{a/vase b/$-(vase 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] ++ root-beak `beak`[our %home da+now]
:: ::
:: Main :: Main