mirror of
https://github.com/urbit/shrub.git
synced 2024-12-24 03:14:30 +03:00
Merge branch 'develop' into drum-crash
This commit is contained in:
commit
d9435e9d31
@ -5,7 +5,6 @@
|
|||||||
:: keep relevant mark conversions in cache for performance
|
:: keep relevant mark conversions in cache for performance
|
||||||
::
|
::
|
||||||
/$ blit-to-json %blit %json
|
/$ blit-to-json %blit %json
|
||||||
/$ json-to-blit %json %blit
|
|
||||||
/$ json-to-task %json %herm-task
|
/$ json-to-task %json %herm-task
|
||||||
::
|
::
|
||||||
=, jael
|
=, jael
|
||||||
|
@ -729,11 +729,7 @@
|
|||||||
::
|
::
|
||||||
%- (trace 1 |.("make cast {<a>} -> {<b>}"))
|
%- (trace 1 |.("make cast {<a>} -> {<b>}"))
|
||||||
=^ old=vase nub (build-fit %mar a)
|
=^ old=vase nub (build-fit %mar a)
|
||||||
?: =/ ram (mule |.((slap old !,(*hoon grow))))
|
?: (has-arm %grow b old)
|
||||||
?: ?=(%| -.ram) %.n
|
|
||||||
=/ lab (mule |.((slob b p.p.ram)))
|
|
||||||
?: ?=(%| -.lab) %.n
|
|
||||||
p.lab
|
|
||||||
:: +grow core has .b arm; use that
|
:: +grow core has .b arm; use that
|
||||||
::
|
::
|
||||||
%+ gain-leak cast+a^b
|
%+ gain-leak cast+a^b
|
||||||
@ -749,8 +745,9 @@
|
|||||||
:: try direct +grab
|
:: try direct +grab
|
||||||
::
|
::
|
||||||
=^ new=vase nub (build-fit %mar b)
|
=^ new=vase nub (build-fit %mar b)
|
||||||
|
=/ arm=? (has-arm %grab a new)
|
||||||
=/ rab (mule |.((slap new tsgl/[limb/a limb/%grab])))
|
=/ rab (mule |.((slap new tsgl/[limb/a limb/%grab])))
|
||||||
?: &(?=(%& -.rab) ?=(^ q.p.rab))
|
?: &(arm ?=(%& -.rab) ?=(^ q.p.rab))
|
||||||
%+ gain-leak cast+a^b
|
%+ gain-leak cast+a^b
|
||||||
|= nob=state
|
|= nob=state
|
||||||
%- (trace 4 |.("{<a>} -> {<b>}: +{(trip a)}:grab:{(trip b)}"))
|
%- (trace 4 |.("{<a>} -> {<b>}: +{(trip a)}:grab:{(trip b)}"))
|
||||||
@ -759,11 +756,11 @@
|
|||||||
:: try +jump
|
:: try +jump
|
||||||
::
|
::
|
||||||
=/ jum (mule |.((slap old tsgl/[limb/b limb/%jump])))
|
=/ jum (mule |.((slap old tsgl/[limb/b limb/%jump])))
|
||||||
?: ?=(%& -.jum)
|
?: &((has-arm %jump a old) ?=(%& -.jum))
|
||||||
=/ via !<(mark p.jum)
|
=/ via !<(mark p.jum)
|
||||||
%- (trace 4 |.("{<a>} -> {<b>}: via {<via>} per +jump:{(trip a)}"))
|
%- (trace 4 |.("{<a>} -> {<b>}: via {<via>} per +jump:{(trip a)}"))
|
||||||
(compose-casts a via b)
|
(compose-casts a via b)
|
||||||
?: ?=(%& -.rab)
|
?: &(arm ?=(%& -.rab))
|
||||||
=/ via !<(mark p.rab)
|
=/ via !<(mark p.rab)
|
||||||
%- (trace 4 |.("{<a>} -> {<b>}: via {<via>} per +grab:{(trip b)}"))
|
%- (trace 4 |.("{<a>} -> {<b>}: via {<via>} per +grab:{(trip b)}"))
|
||||||
(compose-casts a via b)
|
(compose-casts a via b)
|
||||||
@ -787,6 +784,15 @@
|
|||||||
%+ slap
|
%+ slap
|
||||||
(with-faces uno+uno dos+dos ~)
|
(with-faces uno+uno dos+dos ~)
|
||||||
!,(*hoon |=(_+<.uno (dos (uno +<))))
|
!,(*hoon |=(_+<.uno (dos (uno +<))))
|
||||||
|
::
|
||||||
|
++ has-arm
|
||||||
|
|= [arm=@tas =mark core=vase]
|
||||||
|
^- ?
|
||||||
|
=/ rib (mule |.((slap core [%wing ~[arm]])))
|
||||||
|
?: ?=(%| -.rib) %.n
|
||||||
|
=/ lab (mule |.((slob mark p.p.rib)))
|
||||||
|
?: ?=(%| -.lab) %.n
|
||||||
|
p.lab
|
||||||
:: +build-tube: produce a $tube mark conversion gate from .a to .b
|
:: +build-tube: produce a $tube mark conversion gate from .a to .b
|
||||||
::
|
::
|
||||||
++ build-tube
|
++ build-tube
|
||||||
|
Loading…
Reference in New Issue
Block a user