Eliminate ~, &, |.

This commit is contained in:
C. Guy Yarvin 2015-12-07 18:04:19 -08:00
parent 7ef90d28ec
commit 5a1c0f1a41

View File

@ -2808,9 +2808,9 @@
+- bal +- bal
|- ^+ a |- ^+ a
?~ a ~ ?~ a ~
?. |(?=(~ l.a) (vor n.a n.l.a)) ?. |(?=($~ l.a) (vor n.a n.l.a))
$(a [n.l.a l.l.a $(a [n.a r.l.a r.a])]) $(a [n.l.a l.l.a $(a [n.a r.l.a r.a])])
?. |(?=(~ r.a) (vor n.a n.r.a)) ?. |(?=($~ r.a) (vor n.a n.r.a))
$(a [n.r.a $(a [n.a l.a l.r.a]) r.r.a]) $(a [n.r.a $(a [n.a l.a l.r.a]) r.r.a])
a a
:: ::
@ -3050,7 +3050,7 @@
|- ^- (like @t) |- ^- (like @t)
?: =(0 daf) ?: =(0 daf)
[p=p.tub q=[~ u=[p=fad q=tub]]] [p=p.tub q=[~ u=[p=fad q=tub]]]
?: |(?=(~ q.tub) !=((end 3 1 daf) i.q.tub)) ?: |(?=($~ q.tub) !=((end 3 1 daf) i.q.tub))
(fail tub) (fail tub)
$(p.tub (lust i.q.tub p.tub), q.tub t.q.tub, daf (rsh 3 1 daf)) $(p.tub (lust i.q.tub p.tub), q.tub t.q.tub, daf (rsh 3 1 daf))
:: ::
@ -4740,8 +4740,8 @@
?~ bur ~ ?~ bur ~
:_ $(bur t.bur) :_ $(bur t.bur)
?- -.i.bur ?- -.i.bur
& i.bur {$&} i.bur
| [%| q.i.bur p.i.bur] {$|} [%| q.i.bur p.i.bur]
== ==
:: ::
++ diff :: generate patch ++ diff :: generate patch
@ -4799,7 +4799,7 @@
=+ ^= zes =+ ^= zes
=+ [inx=0 zes=*(list {p+@ud q+@ud})] =+ [inx=0 zes=*(list {p+@ud q+@ud})]
|- ^+ zes |- ^+ zes
?: |(?=(~ gay) (gth inx p.gox)) zes ?: |(?=($~ gay) (gth inx p.gox)) zes
?. (lonk inx i.gay) $(gay t.gay) ?. (lonk inx i.gay) $(gay t.gay)
?. (hink inx i.gay) $(inx +(inx)) ?. (hink inx i.gay) $(inx +(inx))
$(inx +(inx), gay t.gay, zes [[inx i.gay] zes]) $(inx +(inx), gay t.gay, zes [[inx i.gay] zes])
@ -4940,7 +4940,7 @@
|- ^+ + |- ^+ +
?~ hel ?~ hel
?~ hev ?~ hev
?>(?=(~ lcs) +) ?>(?=($~ lcs) +)
$(hev t.hev, rag (done %| ~ [i.hev ~])) $(hev t.hev, rag (done %| ~ [i.hev ~]))
?~ hev ?~ hev
$(hel t.hel, rag (done %| [i.hel ~] ~)) $(hel t.hel, rag (done %| [i.hel ~] ~))
@ -6214,7 +6214,7 @@
rud rud
rux rux
:: ::
++ rf `tape`[?-(a & '&', | '|', * !!) ~] ++ rf `tape`[?-(a $& '&', $| '|', * !!) ~]
++ rn `tape`[?>(=(0 a) '~') ~] ++ rn `tape`[?>(=(0 a) '~') ~]
++ rt `tape`['\'' (weld (mesc (trip a)) `tape`['\'' ~])] ++ rt `tape`['\'' (weld (mesc (trip a)) `tape`['\'' ~])]
++ rta rt ++ rta rt
@ -6485,7 +6485,8 @@
|= rad+? |= rad+?
|= lot+coin ^- twig |= lot+coin ^- twig
?- -.lot ?- -.lot
~ ?:(rad [%dtzz p.lot] [%dtzy p.lot]) $~
?:(rad [%dtzz p.lot] [%dtzy p.lot])
:: ::
$blob $blob
?: rad ?: rad
@ -6740,13 +6741,13 @@
++ blue ++ blue
|= gen+twig |= gen+twig
^- twig ^- twig
?. &(?=(| -.tig) ?=(~ p.tig)) gen ?. &(?=($| -.tig) ?=($~ p.tig)) gen
[%tsgr [~ 3] gen] [%tsgr [~ 3] gen]
:: ::
++ pink ++ pink
|= tyl+tile |= tyl+tile
^- tile ^- tile
?. &(?=(| -.tig) ?=(~ p.tig)) tyl ?. &(?=($| -.tig) ?=($~ p.tig)) tyl
?- -.tyl ?- -.tyl
?($leaf $axil) tyl ?($leaf $axil) tyl
$herb [%herb [%tsgr [~ 3] p.tyl]] $herb [%herb [%tsgr [~ 3] p.tyl]]
@ -6940,8 +6941,8 @@
:: ::
{$reed *} {$reed *}
?- nag ?- nag
& [%wtpt [[%& axe] ~] $(sec p.sec, nag |) $(sec q.sec, nag [& &])] {$&} [%wtpt [[%& axe] ~] $(sec p.sec, nag |) $(sec q.sec, nag [& &])]
| $(sec p.sec) {$|} $(sec p.sec)
^ $(sec q.sec) ^ $(sec q.sec)
* !! * !!
== ==
@ -7165,7 +7166,7 @@
:: ::
{$smcl *} {$smcl *}
?- q.gen ?- q.gen
~ [%zpzp ~] $~ [%zpzp ~]
{* $~} i.q.gen {* $~} i.q.gen
^ ^
:+ %tsls :+ %tsls
@ -7175,7 +7176,7 @@
?- yex ?- yex
{* $~} [%tsgr [~ 3] i.yex] {* $~} [%tsgr [~ 3] i.yex]
{* ^} [%cnhp [~ 2] [%tsgr [~ 3] i.yex] $(yex t.yex) ~] {* ^} [%cnhp [~ 2] [%tsgr [~ 3] i.yex] $(yex t.yex) ~]
~ !! $~ !!
== ==
== ==
:: ::
@ -7233,11 +7234,11 @@
{$smsg *} :: ;~ {$smsg *} :: ;~
|- ^- twig |- ^- twig
?- q.gen ?- q.gen
~ ~|(%open-smsg !!) $~ ~|(%open-smsg !!)
^ ^
:+ %tsgr [%ktts %v ~ 1] :: => v=. :+ %tsgr [%ktts %v ~ 1] :: => v=.
|- ^- twig :: |- ^- twig ::
?: ?=(~ t.q.gen) :: ?: ?=($~ t.q.gen) ::
[%tsgr [%cnzy %v] i.q.gen] :: =>(v {i.q.gen}) [%tsgr [%cnzy %v] i.q.gen] :: =>(v {i.q.gen})
:+ %tsls [%ktts %a $(q.gen t.q.gen)] :: =+ ^= a :+ %tsls [%ktts %a $(q.gen t.q.gen)] :: =+ ^= a
:+ %tsls :: {$(q.gen t.q.gen)} :+ %tsls :: {$(q.gen t.q.gen)}
@ -7868,12 +7869,13 @@
:+ %list :+ %list
(cat 3 p.i.p.i.t.p.u.may p.i.t.p.i.t.p.u.may) (cat 3 p.i.p.i.t.p.u.may p.i.t.p.i.t.p.u.may)
q.i.p.i.t.p.u.may q.i.p.i.t.p.u.may
?: ?& ?= $: $: $plot ?: ?& ?= $^
_: _: $plot
{$face *} {$face *}
{$face * $stop *} {$face * $stop *}
{{$face * $stop *} $~} {{$face * $stop *} $~}
== ==
~ $~
== ==
t.p.u.may t.p.u.may
=(p.q.ham p.q.i.t.p.i.t.p.u.may) =(p.q.ham p.q.i.t.p.i.t.p.u.may)
@ -8232,7 +8234,7 @@
waf waf
~| [%hang-on p.i.goy] ~| [%hang-on p.i.goy]
=+ yeq=(~(get by dab) p.i.goy) =+ yeq=(~(get by dab) p.i.goy)
?< ?=(~ yeq) ?< ?=($~ yeq)
?- -.u.yeq ?- -.u.yeq
$ash $ash
?> ?=({$ash *} q.i.goy) ?> ?=({$ash *} q.i.goy)
@ -8258,8 +8260,8 @@
:: ::
++ harp ++ harp
|= dab=(map term foot) |= dab=(map term foot)
^- ?(~ ^) ^- ?($~ ^)
?: ?=(~ dab) ?: ?=($~ dab)
~ ~
=+ ^= vad =+ ^= vad
?+ -.q.n.dab !! ?+ -.q.n.dab !!
@ -8654,7 +8656,7 @@
++ bake ++ bake
|= dab+(map term foot) |= dab+(map term foot)
^- * ^- *
?: ?=(~ dab) ?: ?=($~ dab)
~ ~
=+ ^= vad =+ ^= vad
?+ -.q.n.dab !! ?+ -.q.n.dab !!
@ -8725,7 +8727,7 @@
|= {dab+(map term foot) hem+(map term foot)} |= {dab+(map term foot) hem+(map term foot)}
^- ? ^- ?
?- dab ?- dab
~ =(hem ~) $~ =(hem ~)
^ ^
?& ?=(^ hem) ?& ?=(^ hem)
=(p.n.dab p.n.hem) =(p.n.dab p.n.hem)
@ -8938,7 +8940,7 @@
== ==
:: ::
++ reco ++ reco
|* fuy=_|=(p=type p) |* fuy=__(|=(p+type p))
=+ por=repo =+ por=repo
=+ yot=(fuy por) =+ yot=(fuy por)
?: =(yot por) ?: =(yot por)
@ -8982,8 +8984,8 @@
=+ zar=$(hyp t.hyp) =+ zar=$(hyp t.hyp)
=+ ^= syp =+ ^= syp
?- -.q.zar ?- -.q.zar
& p.q.zar {$&} p.q.zar
| (fire (turn q.q.zar |=({p+type q+foot} [p [%ash ~ 1]]))) {$|} (fire (turn q.q.zar |=({p+type q+foot} [p [%ash ~ 1]])))
== ==
?- i.hyp ?- i.hyp
{$& *} {$& *}
@ -10185,18 +10187,17 @@
(stag %leaf bisk:so) (stag %leaf bisk:so)
:- ['a' 'z'] :- ['a' 'z']
;~ pose ;~ pose
%+ sear
|=(a+tile `(unit tile)`~)
(stag %bark ;~(plug sym ;~(pfix tis toil))) (stag %bark ;~(plug sym ;~(pfix tis toil)))
(stag %herb wide) (stag %herb wide)
== ==
:- '$' :- '$'
;~ pose
(noil |)
(stag %herb wide) (stag %herb wide)
==
:- '|' :- '|'
(stag %leaf (stag %f (cold | bar))) fail
:- '~' :- '~'
(stag %leaf (stag %n (cold ~ sig))) fail
== ==
++ wart ++ wart
|* zor=rule |* zor=rule
@ -10571,8 +10572,8 @@
|= a+duct |= a+duct
%- bind :_ |=(b=(pair arvo worm) [`move`[a p.b] q.b]) %- bind :_ |=(b=(pair arvo worm) [`move`[a p.b] q.b])
=- ?- -.har =- ?- -.har
| ~& [%dead-card p.har] ~ :: XX properly log? {$|} ~& [%dead-card p.har] ~ :: XX properly log?
& (some p.har) {$&} (some p.har)
== ==
^= har ^- (each (pair arvo worm) term) ^= har ^- (each (pair arvo worm) term)
=^ caq p.sew (~(spot wa p.sew) 3 wec) =^ caq p.sew (~(spot wa p.sew) 3 wec)