ska: de-unitize +darn:so, decouple from opcode %10 semantics

This commit is contained in:
Joe Bryan 2024-06-10 20:57:04 -04:00
parent 026f27d253
commit 3d36f50ea3
2 changed files with 29 additions and 42 deletions

View File

@ -246,11 +246,8 @@
?~ coal pale-loop(pale t.pale)
?. (~(huge so i.coal) park) $(coal t.coal)
=/ naut
=/ bake (~(darn so [| ~]) 2 batt)
?> ?=(^ bake)
=/ folk (~(darn so u.bake) a.pare.clue i.coal)
?> ?=(^ folk)
u.folk
=/ bake (~(darn so [| ~]) 2 batt) :: XX [[& |] batt ~]
(~(darn so bake) a.pare.clue i.coal)
::
=> =* dot .
!@ jet.verb
@ -573,11 +570,10 @@
?: =(0 a.form) [[[%not 0] [~ | ~]] gen]
=^ [twig=nomm bite=naan] gen $(form p.form)
=^ [tree=nomm hole=naan] gen $(form b.form)
=/ salt (~(darn so sock.hole) a.form sock.bite)
?~ salt [[[%ten a.form twig tree] [~ | ~]] gen]
:_ gen
:- [%ten a.form twig tree]
[(~(put qui prot.hole) a.form prot.bite) u.salt]
:+ [%ten a.form twig tree]
(~(put qui prot.hole) a.form prot.bite)
(~(darn so sock.hole) a.form sock.bite)
::
[%11 h=@ f=*]
=^ [then=nomm bite=naan] gen $(form f.form)

View File

@ -299,41 +299,32 @@
:: update mask and data at an axis into a sock
++ darn
|= [axe=@ two=sock]
^- (unit sock)
?: =(0 axe) ~
|- ^- (unit sock)
?: =(1 axe) `two
?@ data.one
?> ?=(@ cape.one)
?: cape.one ~
=/ luck $(axe (mas axe))
?~ luck ~
?- (cap axe)
%2 `[[cape.u.luck |] data.u.luck ~]
%3 `[[| cape.u.luck] ~ data.u.luck]
==
?@ cape.one
?- (cap axe)
%2
=/ luck $(axe (mas axe), data.one -.data.one)
?~ luck ~
`[[cape.u.luck cape.one] data.u.luck +.data.one]
?< =(0 axe)
|- ^- sock
?: =(1 axe) two
=+ [now lat]=[(cap axe) (mas axe)]
?^ cape.one
?- now
%2 =/ n $(axe lat, one [-.cape -.data]:one)
[[cape.n +.cape.one] data.n +.data.one]
::
%3
=/ luck $(axe (mas axe), data.one +.data.one)
?~ luck ~
`[[cape.one cape.u.luck] -.data.one data.u.luck]
%3 =/ n $(axe lat, one [+.cape +.data]:one)
[[-.cape.one cape.n] -.data.one data.n]
==
?- (cap axe)
%2
=/ luck $(axe (mas axe), cape.one -.cape.one, data.one -.data.one)
?~ luck ~
`[[cape.u.luck +.cape.one] data.u.luck +.data.one]
::
%3
=/ luck $(axe (mas axe), cape.one +.cape.one, data.one +.data.one)
?~ luck ~
`[[-.cape.one cape.u.luck] -.data.one data.u.luck]
?: &(cape.one ?=(^ data.one))
?- now
%2 =/ n $(axe lat, data.one -.data.one)
:- ?:(?=(%& cape.n) & [cape.n &])
[data.n +.data.one]
::
%3 =/ n $(axe lat, data.one +.data.one)
:- ?:(?=(%& cape.n) & [& cape.n])
[-.data.one data.n]
==
=/ n $(axe lat)
?- now
%2 [[cape.n |] data.n ~]
%3 [[| cape.n] ~ data.n]
==
--
:: apt assertion