Unify the various defs.txt files...

Work in progress.  THis is broken now.
This commit is contained in:
Simon Forman 2023-02-14 07:55:09 -08:00
parent a828169b34
commit e35ecea25e
2 changed files with 23 additions and 5 deletions

View File

@ -24,8 +24,10 @@ b [i] dip i
binary unary popd binary unary popd
ccccons ccons ccons ccccons ccons ccons
ccons cons cons ccons cons cons
clear [] swaack pop
cleave fork popdd cleave fork popdd
clop cleave popdd clop cleave popdd
cmp [[>] swap] dipd [ifte] ccons [=] swons ifte
codi cons dip codi cons dip
codireco codi reco codireco codi reco
dinfrirst dip infrst dinfrirst dip infrst
@ -39,6 +41,7 @@ dupdd [dup] dipd
dupdip dupd dip dupdip dupd dip
dupdipd dup dipd dupdipd dup dipd
enstacken stack [clear] dip enstacken stack [clear] dip
first uncons pop
flatten <{} [concat] step flatten <{} [concat] step
fork [i] app2 fork [i] app2
fourth rest third fourth rest third
@ -52,6 +55,7 @@ ii [dip] dupdip i
infra swons swaack [i] dip swaack infra swons swaack [i] dip swaack
infrst infra first infrst infra first
make_generator [codireco] ccons make_generator [codireco] ccons
mod %
neg 0 swap - neg 0 swap -
not [true] [false] branch not [true] [false] branch
nulco [nullary] cons nulco [nullary] cons
@ -71,6 +75,7 @@ quoted [unit] dip
range [0 <=] [-- dup] anamorphism range [0 <=] [-- dup] anamorphism
range_to_zero unit [down_to_zero] infra range_to_zero unit [down_to_zero] infra
reco rest cons reco rest cons
rest uncons popd
reverse <{} shunt reverse <{} shunt
roll> swap swapd roll> swap swapd
roll< swapd swap roll< swapd swap
@ -121,6 +126,6 @@ _mape popd reverse
_map0 [_map1] dipd _map2 _map0 [_map1] dipd _map2
_map1 stackd shift _map1 stackd shift
_map2 [infrst] cons dipd roll< swons _map2 [infrst] cons dipd roll< swons
xor [not not] [not] branch _\/_ [not not] [not] branch
and [pop false] [not not] branch /\ [pop false] [not not] branch
or [not not] [pop true] branch \/ [not not] [pop true] branch

View File

@ -1,3 +1,9 @@
eq [false] [true] [false] cmp
gt [true] [false] [false] cmp
lt [false] [false] [true] cmp
neq [true] [false] [true] cmp
le [false] [true] [true] cmp
ge [true] [true] [false] cmp
-- 1 - -- 1 -
? dup bool ? dup bool
&& nulco [nullary [false]] dip branch && nulco [nullary [false]] dip branch
@ -26,7 +32,8 @@ codi cons dip
codireco codi reco codireco codi reco
dinfrirst dip infrst dinfrirst dip infrst
dipd [dip] codi dipd [dip] codi
disenstacken ? [uncons ?] loop pop disenstacken swaack pop
divmod [/] [%] clop
down_to_zero [0 >] [dup --] while down_to_zero [0 >] [dup --] while
drop [rest] times drop [rest] times
dupd [dup] dip dupd [dup] dip
@ -52,6 +59,7 @@ mod %
neg 0 swap - neg 0 swap -
not [true] [false] branch not [true] [false] branch
nulco [nullary] cons nulco [nullary] cons
null [] concat bool not
nullary [stack] dinfrirst nullary [stack] dinfrirst
of swap at of swap at
pam [i] map pam [i] map
@ -64,7 +72,7 @@ popopd [popop] dip
popopdd [popop] dipd popopdd [popop] dipd
product 1 swap [*] step product 1 swap [*] step
quoted [unit] dip quoted [unit] dip
range [0 <=] [1 - dup] anamorphism range [0 <=] [-- dup] anamorphism
range_to_zero unit [down_to_zero] infra range_to_zero unit [down_to_zero] infra
reco rest cons reco rest cons
rest uncons popd rest uncons popd
@ -79,6 +87,7 @@ second rest first
shift uncons [swons] dip shift uncons [swons] dip
shunt [swons] step shunt [swons] step
size [pop ++] step_zero size [pop ++] step_zero
small dup null [rest null] [pop true] branch
spiral_next [[[abs] ii <=] [[<>] [pop !-] ||] &&] [[!-] [[++]] [[--]] ifte dip] [[pop !-] [--] [++] ifte] ifte spiral_next [[[abs] ii <=] [[<>] [pop !-] ||] &&] [[!-] [[++]] [[--]] ifte dip] [[pop !-] [--] [++] ifte] ifte
split_at [drop] [take] clop split_at [drop] [take] clop
split_list [take reverse] [drop] clop split_list [take reverse] [drop] clop
@ -99,6 +108,7 @@ unary nullary popd
uncons [first] [rest] cleave uncons [first] [rest] cleave
unit [] cons unit [] cons
unquoted [i] dip unquoted [i] dip
unstack [[] swaack] dip swoncat swaack pop
unswons uncons swap unswons uncons swap
while swap nulco dupdipd concat loop while swap nulco dupdipd concat loop
x dup i x dup i
@ -116,3 +126,6 @@ _mape popd reverse
_map0 [_map1] dipd _map2 _map0 [_map1] dipd _map2
_map1 stackd shift _map1 stackd shift
_map2 [infrst] cons dipd roll< swons _map2 [infrst] cons dipd roll< swons
_\/_ [not not] [not] branch
/\ [pop false] [not not] branch
\/ [not not] [pop true] branch