Remove 151, standardize on 143.

This commit is contained in:
C. Guy Yarvin 2017-09-27 17:40:12 -07:00
parent 9253613738
commit 9c22f7e08b
180 changed files with 1404 additions and 19322 deletions

179
Makefile
View File

@ -175,7 +175,6 @@ N_OFILES=\
noun/vortex.o \ noun/vortex.o \
noun/zave.o noun/zave.o
J_A_OFILES=\ J_A_OFILES=\
jets/a/add.o \ jets/a/add.o \
jets/a/dec.o \ jets/a/dec.o \
@ -275,6 +274,7 @@ J_E_OFILES=\
jets/e/rd.o \ jets/e/rd.o \
jets/e/rq.o \ jets/e/rq.o \
jets/e/rs.o \ jets/e/rs.o \
jets/e/rh.o \
jets/e/rub.o \ jets/e/rub.o \
jets/e/scr.o \ jets/e/scr.o \
jets/e/shax.o \ jets/e/shax.o \
@ -302,8 +302,10 @@ J_F_OFILES=\
jets/f/flip.o \ jets/f/flip.o \
jets/f/flor.o \ jets/f/flor.o \
jets/f/fork.o \ jets/f/fork.o \
jets/f/help.o \
jets/f/hike.o \ jets/f/hike.o \
jets/f/look.o \ jets/f/look.o \
jets/f/loot.o
J_F_OFILES_UT=\ J_F_OFILES_UT=\
jets/f/ut.o \ jets/f/ut.o \
@ -321,7 +323,7 @@ J_F_OFILES_UT=\
jets/f/ut_mull.o \ jets/f/ut_mull.o \
jets/f/ut_nest.o \ jets/f/ut_nest.o \
jets/f/ut_peek.o \ jets/f/ut_peek.o \
jets/f/ut_perk.o \ jets/f/ut_peel.o \
jets/f/ut_play.o \ jets/f/ut_play.o \
jets/f/ut_repo.o \ jets/f/ut_repo.o \
jets/f/ut_rest.o \ jets/f/ut_rest.o \
@ -344,178 +346,7 @@ J_OFILES=\
$(J_G_OFILES) \ $(J_G_OFILES) \
jets/tree.o jets/tree.o
M_A_OFILES=\ BASE_OFILES=$(N_OFILES) $(J_OFILES)
mets/a/add.o \
mets/a/dec.o \
mets/a/div.o \
mets/a/gte.o \
mets/a/gth.o \
mets/a/lte.o \
mets/a/lth.o \
mets/a/mod.o \
mets/a/mul.o \
mets/a/sub.o
M_B_OFILES=\
mets/b/bind.o \
mets/b/clap.o \
mets/b/drop.o \
mets/b/flop.o \
mets/b/lent.o \
mets/b/levy.o \
mets/b/lien.o \
mets/b/murn.o \
mets/b/need.o \
mets/b/reap.o \
mets/b/reel.o \
mets/b/roll.o \
mets/b/skid.o \
mets/b/skim.o \
mets/b/skip.o \
mets/b/scag.o \
mets/b/slag.o \
mets/b/snag.o \
mets/b/sort.o \
mets/b/turn.o \
mets/b/weld.o
M_C_OFILES=\
mets/c/bex.o \
mets/c/xeb.o \
mets/c/can.o \
mets/c/cap.o \
mets/c/cat.o \
mets/c/con.o \
mets/c/cut.o \
mets/c/dor.o \
mets/c/dvr.o \
mets/c/dis.o \
mets/c/end.o \
mets/c/gor.o \
mets/c/hor.o \
mets/c/lsh.o \
mets/c/mas.o \
mets/c/met.o \
mets/c/mix.o \
mets/c/mug.o \
mets/c/muk.o \
mets/c/peg.o \
mets/c/po.o \
mets/c/pow.o \
mets/c/rap.o \
mets/c/rep.o \
mets/c/rip.o \
mets/c/rsh.o \
mets/c/sqt.o \
mets/c/vor.o
M_D_OFILES=\
mets/d/in_has.o \
mets/d/in_int.o \
mets/d/in_gas.o \
mets/d/in_mer.o \
mets/d/in_put.o \
mets/d/in_tap.o \
mets/d/in_uni.o \
mets/d/in_wyt.o \
mets/d/in_bif.o \
mets/d/in_dif.o \
mets/d/by_gas.o \
mets/d/by_get.o \
mets/d/by_has.o \
mets/d/by_int.o \
mets/d/by_put.o \
mets/d/by_uni.o \
mets/d/by_bif.o \
mets/d/by_dif.o
M_E_OFILES=\
mets/e/aes_ecb.o \
mets/e/aes_cbc.o \
mets/e/aesc.o \
mets/e/cue.o \
mets/e/fl.o \
mets/e/jam.o \
mets/e/mat.o \
mets/e/mink.o \
mets/e/mule.o \
mets/e/parse.o \
mets/e/rd.o \
mets/e/rq.o \
mets/e/rs.o \
mets/e/rh.o \
mets/e/rub.o \
mets/e/scr.o \
mets/e/shax.o \
mets/e/lore.o \
mets/e/loss.o \
mets/e/lune.o \
mets/e/trip.o
M_E_OFILES_ED=\
mets/e/ed_puck.o \
mets/e/ed_sign.o \
mets/e/ed_veri.o \
mets/e/ed_shar.o
M_F_OFILES=\
mets/f/al.o \
mets/f/ap.o \
mets/f/cell.o \
mets/f/comb.o \
mets/f/cons.o \
mets/f/core.o \
mets/f/face.o \
mets/f/fitz.o \
mets/f/flan.o \
mets/f/flip.o \
mets/f/flor.o \
mets/f/fork.o \
mets/f/help.o \
mets/f/hike.o \
mets/f/look.o \
mets/f/loot.o
M_F_OFILES_UT=\
mets/f/ut.o \
mets/f/ut_burn.o \
mets/f/ut_buss.o \
mets/f/ut_conk.o \
mets/f/ut_crop.o \
mets/f/ut_find.o \
mets/f/ut_fire.o \
mets/f/ut_fish.o \
mets/f/ut_fuse.o \
mets/f/ut_gain.o \
mets/f/ut_lose.o \
mets/f/ut_mint.o \
mets/f/ut_mull.o \
mets/f/ut_nest.o \
mets/f/ut_peek.o \
mets/f/ut_peel.o \
mets/f/ut_play.o \
mets/f/ut_repo.o \
mets/f/ut_rest.o \
mets/f/ut_tack.o \
mets/f/ut_toss.o \
mets/f/ut_wrap.o
M_G_OFILES=\
mets/g/down.o
M_OFILES=\
$(M_A_OFILES) \
$(M_B_OFILES) \
$(M_C_OFILES) \
$(M_D_OFILES) \
$(M_E_OFILES) \
$(M_E_OFILES_ED) \
$(M_F_OFILES) \
$(M_F_OFILES_UT) \
$(M_G_OFILES) \
mets/tree.o
BASE_OFILES=$(N_OFILES) $(J_OFILES) $(M_OFILES)
OUT_OFILES=\ OUT_OFILES=\
outside/jhttp/http_parser.o \ outside/jhttp/http_parser.o \

View File

@ -31,7 +31,3 @@
# include "jets/k.h" // u3k: jets (transfer, args) # include "jets/k.h" // u3k: jets (transfer, args)
# include "jets/q.h" // u3q: jets (retain, args) # include "jets/q.h" // u3q: jets (retain, args)
# include "jets/w.h" // u3w: jets (retain, core) # include "jets/w.h" // u3w: jets (retain, core)
# include "jets/l.h" // u3k: jets (transfer, args)
# include "jets/g.h" // u3q: jets (retain, args)
# include "jets/y.h" // u3w: jets (retain, core)

View File

@ -68,7 +68,7 @@
/* u3kdi_tap(): map/set convert to list. (solves by_tap also.) /* u3kdi_tap(): map/set convert to list. (solves by_tap also.)
*/ */
u3_noun u3_noun
u3kdi_tap(u3_noun a, u3_noun b); u3kdi_tap(u3_noun a);
/* u3kdi_put(): put in set. /* u3kdi_put(): put in set.
*/ */
@ -80,7 +80,7 @@
u3_noun u3_noun
u3kdi_uni(u3_noun a, u3_noun b); u3kdi_uni(u3_noun a, u3_noun b);
# define u3kdb_tap(a, b) u3kdi_tap(a, b) # define u3kdb_tap(a) u3kdi_tap(a)
/* u3ke: tier 5 functions /* u3ke: tier 5 functions
*/ */
@ -104,6 +104,11 @@
u3_noun u3_noun
u3kf_fork(u3_noun yed); u3kf_fork(u3_noun yed);
/* u3kz_fork(): build %fork span.
*/
u3_noun
u3kz_fork(u3_noun yed);
/* u3kfu_repo(): /* u3kfu_repo():
*/ */
u3_noun u3_noun

View File

@ -88,7 +88,7 @@
u3_noun u3qdi_int(u3_noun, u3_noun); u3_noun u3qdi_int(u3_noun, u3_noun);
u3_noun u3qdi_mer(u3_noun, u3_noun); u3_noun u3qdi_mer(u3_noun, u3_noun);
u3_noun u3qdi_put(u3_noun, u3_noun); u3_noun u3qdi_put(u3_noun, u3_noun);
u3_noun u3qdi_tap(u3_noun, u3_noun); u3_noun u3qdi_tap(u3_noun);
u3_noun u3qdi_uni(u3_noun, u3_noun); u3_noun u3qdi_uni(u3_noun, u3_noun);
u3_noun u3qdi_wyt(u3_noun); u3_noun u3qdi_wyt(u3_noun);
@ -174,6 +174,18 @@
u3_noun u3qeq_gte(u3_atom, u3_atom); u3_noun u3qeq_gte(u3_atom, u3_atom);
u3_noun u3qeq_gth(u3_atom, u3_atom); u3_noun u3qeq_gth(u3_atom, u3_atom);
u3_noun u3qes_add(u3_atom, u3_atom, u3_atom);
u3_noun u3qes_sub(u3_atom, u3_atom, u3_atom);
u3_noun u3qes_mul(u3_atom, u3_atom, u3_atom);
u3_noun u3qes_div(u3_atom, u3_atom, u3_atom);
u3_noun u3qes_sqt(u3_atom, u3_atom);
u3_noun u3qes_fma(u3_atom, u3_atom, u3_atom, u3_atom);
u3_noun u3qes_lth(u3_atom, u3_atom);
u3_noun u3qes_lte(u3_atom, u3_atom);
u3_noun u3qes_equ(u3_atom, u3_atom);
u3_noun u3qes_gte(u3_atom, u3_atom);
u3_noun u3qes_gth(u3_atom, u3_atom);
/** Tier 6. /** Tier 6.
**/ **/
u3_noun u3qf_bull(u3_noun, u3_noun); u3_noun u3qf_bull(u3_noun, u3_noun);
@ -192,8 +204,10 @@
u3_noun u3qf_forq(u3_noun, u3_noun); u3_noun u3qf_forq(u3_noun, u3_noun);
u3_noun u3qf_fork(u3_noun); u3_noun u3qf_fork(u3_noun);
u3_noun u3qf_grof(u3_noun); u3_noun u3qf_grof(u3_noun);
u3_noun u3qf_help(u3_noun, u3_noun);
u3_noun u3qf_hike(u3_noun, u3_noun); u3_noun u3qf_hike(u3_noun, u3_noun);
u3_noun u3qf_look(u3_noun, u3_noun); u3_noun u3qf_look(u3_noun, u3_noun);
u3_noun u3qf_loot(u3_noun, u3_noun);
u3_noun u3qf_slot(u3_atom, u3_noun); u3_noun u3qf_slot(u3_atom, u3_noun);
u3_noun u3qf_type(u3_noun); u3_noun u3qf_type(u3_noun);
@ -212,6 +226,7 @@
# define u3qfu_van_fab 119 # define u3qfu_van_fab 119
u3_noun u3qfu_burn(u3_noun, u3_noun); u3_noun u3qfu_burn(u3_noun, u3_noun);
u3_noun u3qfu_busk(u3_noun, u3_noun, u3_noun);
u3_noun u3qfu_buss(u3_noun, u3_noun, u3_noun, u3_noun); u3_noun u3qfu_buss(u3_noun, u3_noun, u3_noun, u3_noun);
u3_noun u3qfu_bust(u3_noun, u3_noun, u3_noun); u3_noun u3qfu_bust(u3_noun, u3_noun, u3_noun);
u3_noun u3qfu_conk(u3_noun, u3_noun, u3_noun); u3_noun u3qfu_conk(u3_noun, u3_noun, u3_noun);
@ -237,7 +252,7 @@
u3_noun u3qfu_nost(u3_noun, u3_noun, u3_noun, u3_noun); u3_noun u3qfu_nost(u3_noun, u3_noun, u3_noun, u3_noun);
u3_noun u3qfu_orth(u3_noun, u3_noun, u3_noun); u3_noun u3qfu_orth(u3_noun, u3_noun, u3_noun);
u3_noun u3qfu_peek(u3_noun, u3_noun, u3_noun, u3_noun); u3_noun u3qfu_peek(u3_noun, u3_noun, u3_noun, u3_noun);
u3_noun u3qfu_perk(u3_noun, u3_noun, u3_noun, u3_noun); u3_noun u3qfu_peel(u3_noun, u3_noun, u3_noun, u3_noun);
u3_noun u3qfu_play(u3_noun, u3_noun, u3_noun); u3_noun u3qfu_play(u3_noun, u3_noun, u3_noun);
u3_noun u3qfu_repo(u3_noun, u3_noun); u3_noun u3qfu_repo(u3_noun, u3_noun);
u3_noun u3qfu_rest(u3_noun, u3_noun, u3_noun); u3_noun u3qfu_rest(u3_noun, u3_noun, u3_noun);
@ -248,3 +263,81 @@
u3_noun u3qfu_tack(u3_noun, u3_noun, u3_noun, u3_noun); u3_noun u3qfu_tack(u3_noun, u3_noun, u3_noun, u3_noun);
u3_noun u3qfu_toss(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); u3_noun u3qfu_toss(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun);
u3_noun u3qfu_wrap(u3_noun, u3_noun, u3_noun); u3_noun u3qfu_wrap(u3_noun, u3_noun, u3_noun);
u3_noun u3qz_bull(u3_noun, u3_noun);
u3_noun u3qz_cell(u3_noun, u3_noun);
u3_noun u3qz_comb(u3_noun, u3_noun);
u3_noun u3qz_cons(u3_noun, u3_noun);
u3_noun u3qz_core(u3_noun, u3_noun);
u3_noun u3qz_cube(u3_noun, u3_noun);
u3_noun u3qz_face(u3_noun, u3_noun);
u3_noun u3qz_fine(u3_noun, u3_noun, u3_noun);
u3_noun u3qz_fitz(u3_noun, u3_noun);
u3_noun u3qz_flan(u3_noun, u3_noun);
u3_noun u3qz_flay(u3_noun);
u3_noun u3qz_flip(u3_noun);
u3_noun u3qz_flor(u3_noun, u3_noun);
u3_noun u3qz_forq(u3_noun, u3_noun);
u3_noun u3qz_fork(u3_noun);
u3_noun u3qz_grof(u3_noun);
u3_noun u3qz_help(u3_noun, u3_noun);
u3_noun u3qz_hike(u3_noun, u3_noun);
u3_noun u3qz_look(u3_noun, u3_noun);
u3_noun u3qz_loot(u3_noun, u3_noun);
u3_noun u3qz_slot(u3_atom, u3_noun);
u3_noun u3qz_type(u3_noun);
u3_noun u3qzl_bunt(u3_noun, u3_noun);
u3_noun u3qzl_whip(u3_noun, u3_noun, u3_noun);
u3_noun u3qzp_hack(u3_noun, u3_noun);
u3_noun u3qzp_late(u3_noun);
u3_noun u3qzp_open(u3_noun, u3_noun);
u3_noun u3qzp_rake(u3_noun);
# define u3qzu_van_fan 28
# define u3qzu_van_rib 58
# define u3qzu_van_vrf 59
# define u3qzu_van_vet 118
# define u3qzu_van_fab 119
u3_noun u3qzu_burn(u3_noun, u3_noun);
u3_noun u3qzu_busk(u3_noun, u3_noun, u3_noun);
u3_noun u3qzu_buss(u3_noun, u3_noun, u3_noun, u3_noun);
u3_noun u3qzu_bust(u3_noun, u3_noun, u3_noun);
u3_noun u3qzu_conk(u3_noun, u3_noun, u3_noun);
u3_noun u3qzu_crop(u3_noun, u3_noun, u3_noun);
u3_noun u3qzu_cull(u3_noun, u3_noun, u3_noun, u3_atom, u3_noun);
u3_noun u3qzu_duck(u3_noun, u3_noun);
u3_noun u3qzu_dung(u3_noun, u3_noun cap, u3_noun);
u3_noun u3qzu_dunq(u3_noun, const c3_c*, u3_noun);
void u3qzu_dump(u3_noun, const c3_c*, u3_noun);
u3_noun u3qzu_fond(u3_noun, u3_noun, u3_noun, u3_noun);
u3_noun u3qzu_finc(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun);
u3_noun u3qzu_fink(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun);
u3_noun u3qzu_fire(u3_noun, u3_noun, u3_noun);
u3_noun u3qzu_firm(u3_noun, u3_noun, u3_noun);
u3_noun u3qzu_fish(u3_noun, u3_noun, u3_atom);
u3_noun u3qzu_fuse(u3_noun, u3_noun, u3_noun);
u3_noun u3qzu_gain(u3_noun, u3_noun, u3_noun);
u3_noun u3qzu_heal(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun);
u3_noun u3qzu_lose(u3_noun, u3_noun, u3_noun);
u3_noun u3qzu_mint(u3_noun, u3_noun, u3_noun, u3_noun);
u3_noun u3qzu_mull(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun);
u3_noun u3qzu_nest(u3_noun, u3_noun, u3_noun, u3_noun);
u3_noun u3qzu_nost(u3_noun, u3_noun, u3_noun, u3_noun);
u3_noun u3qzu_orth(u3_noun, u3_noun, u3_noun);
u3_noun u3qzu_peek(u3_noun, u3_noun, u3_noun, u3_noun);
u3_noun u3qzu_peel(u3_noun, u3_noun, u3_noun, u3_noun);
u3_noun u3qzu_play(u3_noun, u3_noun, u3_noun);
u3_noun u3qzu_repo(u3_noun, u3_noun);
u3_noun u3qzu_rest(u3_noun, u3_noun, u3_noun);
u3_noun u3qzu_shep(u3_noun, const c3_c*, u3_noun, u3_noun);
u3_noun u3qzu_shew(u3_noun, u3_noun);
u3_noun u3qzu_sift(u3_noun, u3_noun, u3_noun);
u3_noun u3qzu_snub(u3_noun, u3_noun, u3_noun);
u3_noun u3qzu_tack(u3_noun, u3_noun, u3_noun, u3_noun);
u3_noun u3qzu_toss(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun);
u3_noun u3qzu_wrap(u3_noun, u3_noun, u3_noun);

View File

@ -204,6 +204,18 @@
u3_noun u3weq_gte(u3_noun); u3_noun u3weq_gte(u3_noun);
u3_noun u3weq_gth(u3_noun); u3_noun u3weq_gth(u3_noun);
u3_noun u3wes_add(u3_noun);
u3_noun u3wes_sub(u3_noun);
u3_noun u3wes_mul(u3_noun);
u3_noun u3wes_div(u3_noun);
u3_noun u3wes_sqt(u3_noun);
u3_noun u3wes_fma(u3_noun);
u3_noun u3wes_lth(u3_noun);
u3_noun u3wes_lte(u3_noun);
u3_noun u3wes_equ(u3_noun);
u3_noun u3wes_gte(u3_noun);
u3_noun u3wes_gth(u3_noun);
/** Tier 6. /** Tier 6.
**/ **/
u3_noun u3wf_bull(u3_noun); u3_noun u3wf_bull(u3_noun);
@ -221,8 +233,10 @@
u3_noun u3wf_flor(u3_noun); u3_noun u3wf_flor(u3_noun);
u3_noun u3wf_forq(u3_noun); u3_noun u3wf_forq(u3_noun);
u3_noun u3wf_fork(u3_noun); u3_noun u3wf_fork(u3_noun);
u3_noun u3wf_help(u3_noun);
u3_noun u3wf_hike(u3_noun); u3_noun u3wf_hike(u3_noun);
u3_noun u3wf_look(u3_noun); u3_noun u3wf_look(u3_noun);
u3_noun u3wf_loot(u3_noun);
u3_noun u3wfl_bunt(u3_noun); u3_noun u3wfl_bunt(u3_noun);
u3_noun u3wfl_whip(u3_noun); u3_noun u3wfl_whip(u3_noun);
@ -251,7 +265,7 @@
u3_noun u3wfu_mull(u3_noun); u3_noun u3wfu_mull(u3_noun);
u3_noun u3wfu_nest(u3_noun); u3_noun u3wfu_nest(u3_noun);
u3_noun u3wfu_peek(u3_noun); u3_noun u3wfu_peek(u3_noun);
u3_noun u3wfu_perk(u3_noun); u3_noun u3wfu_peel(u3_noun);
u3_noun u3wfu_play(u3_noun); u3_noun u3wfu_play(u3_noun);
u3_noun u3wfu_repo(u3_noun); u3_noun u3wfu_repo(u3_noun);
u3_noun u3wfu_rest(u3_noun); u3_noun u3wfu_rest(u3_noun);
@ -259,6 +273,60 @@
u3_noun u3wfu_toss(u3_noun); u3_noun u3wfu_toss(u3_noun);
u3_noun u3wfu_wrap(u3_noun); u3_noun u3wfu_wrap(u3_noun);
u3_noun u3wz_bull(u3_noun);
u3_noun u3wz_cell(u3_noun);
u3_noun u3wz_comb(u3_noun);
u3_noun u3wz_cons(u3_noun);
u3_noun u3wz_core(u3_noun);
u3_noun u3wz_cube(u3_noun);
u3_noun u3wz_face(u3_noun);
u3_noun u3wz_fine(u3_noun);
u3_noun u3wz_fitz(u3_noun);
u3_noun u3wz_flan(u3_noun);
u3_noun u3wz_flay(u3_noun);
u3_noun u3wz_flip(u3_noun);
u3_noun u3wz_flor(u3_noun);
u3_noun u3wz_forq(u3_noun);
u3_noun u3wz_fork(u3_noun);
u3_noun u3wz_help(u3_noun);
u3_noun u3wz_hike(u3_noun);
u3_noun u3wz_look(u3_noun);
u3_noun u3wz_loot(u3_noun);
u3_noun u3wzl_bunt(u3_noun);
u3_noun u3wzl_whip(u3_noun);
u3_noun u3wzp_hack(u3_noun);
u3_noun u3wzp_late(u3_noun);
u3_noun u3wzp_open(u3_noun);
u3_noun u3wzp_rake(u3_noun);
u3_noun u3wzu_burn(u3_noun);
u3_noun u3wzu_busk(u3_noun);
u3_noun u3wzu_bust(u3_noun);
u3_noun u3wzu_conk(u3_noun);
u3_noun u3wzu_crop(u3_noun);
u3_noun u3wzu_cull(u3_noun);
u3_noun u3wzu_duck(u3_noun);
u3_noun u3wzu_find(u3_noun);
u3_noun u3wzu_fond(u3_noun);
u3_noun u3wzu_fink(u3_noun);
u3_noun u3wzu_fire(u3_noun);
u3_noun u3wzu_firm(u3_noun);
u3_noun u3wzu_fish(u3_noun);
u3_noun u3wzu_fuse(u3_noun);
u3_noun u3wzu_heal(u3_noun);
u3_noun u3wzu_mint(u3_noun);
u3_noun u3wzu_mull(u3_noun);
u3_noun u3wzu_nest(u3_noun);
u3_noun u3wzu_peek(u3_noun);
u3_noun u3wzu_peel(u3_noun);
u3_noun u3wzu_play(u3_noun);
u3_noun u3wzu_repo(u3_noun);
u3_noun u3wzu_rest(u3_noun);
u3_noun u3wzu_snub(u3_noun);
u3_noun u3wzu_toss(u3_noun);
u3_noun u3wzu_wrap(u3_noun);
/** Tier 7. /** Tier 7.
**/ **/

View File

@ -5,6 +5,7 @@
/* internal functions /* internal functions
*/ */
static
u3_noun _b_bif_putroot(u3_noun a, u3_noun _b_bif_putroot(u3_noun a,
u3_noun b) u3_noun b)
{ {

View File

@ -5,6 +5,7 @@
/* internal functions /* internal functions
*/ */
static
u3_noun _b_dif_join(u3_noun d, u3_noun _b_dif_join(u3_noun d,
u3_noun e) u3_noun e)
{ {

View File

@ -5,6 +5,7 @@
/* internal functions /* internal functions
*/ */
static
u3_noun _i_bif_putroot(u3_noun a, u3_noun _i_bif_putroot(u3_noun a,
u3_noun b) u3_noun b)
{ {

View File

@ -5,6 +5,7 @@
/* internal functions /* internal functions
*/ */
static
u3_noun _i_dif_join(u3_noun d, u3_noun _i_dif_join(u3_noun d,
u3_noun e) u3_noun e)
{ {

View File

@ -27,31 +27,29 @@
} }
u3_noun u3_noun
u3qdi_tap(u3_noun a, u3qdi_tap(u3_noun a)
u3_noun b)
{ {
return _tap_in(a, u3k(b)); return _tap_in(a, u3_nul);
} }
u3_noun u3_noun
u3wdi_tap(u3_noun cor) u3wdi_tap(u3_noun cor)
{ {
u3_noun a, b; u3_noun a;
if ( c3n == u3r_mean(cor, u3x_sam, &b, u3x_con_sam, &a, 0) ) { if ( c3n == u3r_mean(cor, u3x_con_sam, &a, 0) ) {
return u3m_bail(c3__exit); return u3m_bail(c3__exit);
} else { } else {
return u3qdi_tap(a, b); return u3qdi_tap(a);
} }
} }
u3_noun u3_noun
u3kdi_tap(u3_noun a, u3kdi_tap(u3_noun a)
u3_noun b)
{ {
u3_weak c = u3qdi_tap(a, b); u3_weak b = u3qdi_tap(a);
u3z(a); u3z(b); u3z(a);
if ( u3_none == c ) { if ( u3_none == b ) {
return u3m_bail(c3__exit); return u3m_bail(c3__exit);
} }
else return c; else return b;
} }

View File

@ -78,7 +78,7 @@
/* bend /* bend
*/ */
u3_noun static u3_noun
_cqe_bend_fun(u3_noun raq, _cqe_bend_fun(u3_noun raq,
u3_noun vex, u3_noun vex,
u3_noun sab) u3_noun sab)
@ -148,7 +148,7 @@
/* cold /* cold
*/ */
u3_noun static u3_noun
_cqe_cold_fun(u3_noun cus, _cqe_cold_fun(u3_noun cus,
u3_noun sef, u3_noun sef,
u3_noun tub) u3_noun tub)
@ -193,7 +193,7 @@
/* cook /* cook
*/ */
u3_noun static u3_noun
_cqe_cook_fun(u3_noun poq, _cqe_cook_fun(u3_noun poq,
u3_noun sef, u3_noun sef,
u3_noun tub) u3_noun tub)
@ -240,7 +240,7 @@
/* comp /* comp
*/ */
u3_noun static u3_noun
_cqe_comp_fun(u3_noun raq, _cqe_comp_fun(u3_noun raq,
u3_noun vex, u3_noun vex,
u3_noun sab) u3_noun sab)
@ -301,7 +301,7 @@
/* easy /* easy
*/ */
u3_noun static u3_noun
_cqe_easy_fun(u3_noun huf, _cqe_easy_fun(u3_noun huf,
u3_noun tub) u3_noun tub)
{ {
@ -313,8 +313,9 @@
u3k(huf), u3k(huf),
u3k(tub)); u3k(tub));
} }
u3_noun u3_noun
u3we_easy_fun(u3_noun cor) u3we_easy_fun(u3_noun cor)
{ {
u3_noun van, huf, tub; u3_noun van, huf, tub;
@ -329,7 +330,7 @@ u3we_easy_fun(u3_noun cor)
/* glue /* glue
*/ */
u3_noun static u3_noun
_cqe_glue_fun(u3_noun bus, _cqe_glue_fun(u3_noun bus,
u3_noun vex, u3_noun vex,
u3_noun sab) u3_noun sab)
@ -406,7 +407,7 @@ u3we_easy_fun(u3_noun cor)
/* here /* here
*/ */
u3_noun static u3_noun
_cqe_here_fun(u3_noun hez, _cqe_here_fun(u3_noun hez,
u3_noun sef, u3_noun sef,
u3_noun tub) u3_noun tub)
@ -462,7 +463,7 @@ u3we_easy_fun(u3_noun cor)
/* just /* just
*/ */
u3_noun static u3_noun
_cqe_just_fun(u3_noun daf, _cqe_just_fun(u3_noun daf,
u3_noun tub) u3_noun tub)
{ {
@ -498,7 +499,7 @@ u3we_easy_fun(u3_noun cor)
/* mask /* mask
*/ */
u3_noun static u3_noun
_cqe_mask_fun(u3_noun bud, _cqe_mask_fun(u3_noun bud,
u3_noun tub) u3_noun tub)
{ {
@ -536,7 +537,7 @@ u3we_easy_fun(u3_noun cor)
} }
/* pfix /* pfix
*/ */
u3_noun static u3_noun
_cqe_pfix(u3_noun vex, _cqe_pfix(u3_noun vex,
u3_noun sab) u3_noun sab)
{ {
@ -577,7 +578,7 @@ u3we_easy_fun(u3_noun cor)
/* plug /* plug
*/ */
u3_noun static u3_noun
_cqe_plug(u3_noun vex, _cqe_plug(u3_noun vex,
u3_noun sab) u3_noun sab)
{ {
@ -668,7 +669,7 @@ u3we_easy_fun(u3_noun cor)
/* sfix /* sfix
*/ */
u3_noun static u3_noun
_cqe_sfix(u3_noun vex, _cqe_sfix(u3_noun vex,
u3_noun sab) u3_noun sab)
{ {
@ -722,7 +723,7 @@ u3we_easy_fun(u3_noun cor)
/* shim /* shim
*/ */
u3_noun static u3_noun
_cqe_shim_fun(u3_noun zep, _cqe_shim_fun(u3_noun zep,
u3_noun tub) u3_noun tub)
{ {
@ -768,7 +769,7 @@ u3we_easy_fun(u3_noun cor)
/* stag /* stag
*/ */
u3_noun static u3_noun
_cqe_stag_fun(u3_noun gob, _cqe_stag_fun(u3_noun gob,
u3_noun sef, u3_noun sef,
u3_noun tub) u3_noun tub)
@ -840,7 +841,7 @@ u3we_easy_fun(u3_noun cor)
} }
} }
u3_noun static u3_noun
_cqe_stew_fun(u3_noun hel, _cqe_stew_fun(u3_noun hel,
u3_noun tub) u3_noun tub)
{ {
@ -911,7 +912,7 @@ u3we_easy_fun(u3_noun cor)
/* stir /* stir
*/ */
u3_noun static u3_noun
_cqe_stir_fun(u3_noun rud, _cqe_stir_fun(u3_noun rud,
u3_noun raq, u3_noun raq,
u3_noun fel, u3_noun fel,

View File

@ -7,7 +7,7 @@
#include <errno.h> #include <errno.h>
#include <crypto_scrypt.h> #include <crypto_scrypt.h>
int _crypto_scrypt(const uint8_t *, size_t, const uint8_t *, size_t, static int _crypto_scrypt(const uint8_t *, size_t, const uint8_t *, size_t,
uint64_t, uint32_t, uint32_t, uint8_t *, size_t); uint64_t, uint32_t, uint32_t, uint8_t *, size_t);
/* functions /* functions
@ -208,7 +208,7 @@ int _crypto_scrypt(const uint8_t *, size_t, const uint8_t *, size_t,
* *
* Return 0 on success; or -1 on error. * Return 0 on success; or -1 on error.
*/ */
int static int
_crypto_scrypt(const uint8_t * passwd, size_t passwdlen, _crypto_scrypt(const uint8_t * passwd, size_t passwdlen,
const uint8_t * salt, size_t saltlen, uint64_t N, uint32_t r, uint32_t p, const uint8_t * salt, size_t saltlen, uint64_t N, uint32_t r, uint32_t p,
uint8_t * buf, size_t buflen) uint8_t * buf, size_t buflen)

View File

@ -590,7 +590,7 @@
_open_do_pqrs(sgcn) // ~% _open_do_pqrs(sgcn) // ~%
{ {
return u3nt(c3__sggl, return u3nt(c3__sggl,
u3nq(c3__fast, u3nq(c3__sgcn,
c3__clls, c3__clls,
u3nt(c3__dtzz, u3_blip, u3k(p_gen)), u3nt(c3__dtzz, u3_blip, u3k(p_gen)),
u3nt(u3nc(c3__zpts, u3k(q_gen)), u3nt(u3nc(c3__zpts, u3k(q_gen)),
@ -609,7 +609,7 @@
_open_do_pq(sgls) // ~+ _open_do_pq(sgls) // ~+
{ {
return u3nt(c3__sggr, return u3nt(c3__sggr,
u3nq(c3__memo, c3__dtzz, u3_blip, u3k(p_gen)), u3nq(c3__sgls, c3__dtzz, u3_blip, u3k(p_gen)),
u3k(q_gen)); u3k(q_gen));
} }
_open_do_pqr(sgpm) // ~& _open_do_pqr(sgpm) // ~&
@ -987,7 +987,7 @@
/* boilerplate /* boilerplate
*/ */
u3_noun static u3_noun
_ap_core(u3_noun ter, _ap_core(u3_noun ter,
u3_noun gen) u3_noun gen)
{ {

View File

@ -109,6 +109,8 @@
} }
/* functions /* functions
*/ */
u3_noun u3_noun

View File

@ -4,7 +4,7 @@
#include "all.h" #include "all.h"
extern void extern void
u3_lo_tank(c3_l tab_l, u3_noun tac); u3_pier_tank(c3_l tab_l, u3_noun tac);
// duck: create a duck core for mean. // duck: create a duck core for mean.
@ -66,8 +66,9 @@
sprintf(ugh_c, "%s: %s: 0x%8x:", sprintf(ugh_c, "%s: %s: 0x%8x:",
paz_c, pfix_c, u3r_mug(typ)); paz_c, pfix_c, u3r_mug(typ));
#if 0
u3_lo_tank(0, u3n_kick_on(u3qfu_dunq(van, ugh_c, typ))); u3_pier_tank(0, u3n_kick_on(u3qfu_dunq(van, ugh_c, typ)));
#endif
} }
// shew: create a show core for mean // shew: create a show core for mean

View File

@ -53,7 +53,7 @@
u3_noun sut, u3_noun sut,
u3_noun gil) u3_noun gil)
{ {
u3_noun p_sut, q_sut, pq_sut, qq_sut, rq_sut, prq_sut, qrq_sut; u3_noun p_sut, q_sut, pq_sut, qq_sut, rq_sut, sq_sut, psq_sut, qsq_sut;
if ( c3n == u3du(sut) ) switch ( sut ) { if ( c3n == u3du(sut) ) switch ( sut ) {
default: return u3m_bail(c3__fail); default: return u3m_bail(c3__fail);
@ -98,8 +98,8 @@
} }
} }
case c3__core: u3x_cell(u3t(sut), &p_sut, &q_sut); case c3__core: u3x_cell(u3t(sut), &p_sut, &q_sut);
u3x_trel(q_sut, &pq_sut, &qq_sut, &rq_sut); u3x_qual(q_sut, &pq_sut, &qq_sut, &rq_sut, &sq_sut);
u3x_cell(rq_sut, &prq_sut, &qrq_sut); u3x_cell(sq_sut, &psq_sut, &qsq_sut);
{ {
u3_noun pay = _burn_in(van, p_sut, gil); u3_noun pay = _burn_in(van, p_sut, gil);
@ -107,19 +107,20 @@
return u3_nul; return u3_nul;
} }
else { else {
u3_noun ret = u3nt(u3_nul, u3k(prq_sut), u3k(u3t(pay))); u3_noun ret = u3nt(u3_nul, u3k(psq_sut), u3k(u3t(pay)));
u3z(pay); u3z(pay);
return ret; return ret;
} }
} }
case c3__help:
case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut);
{ {
return _burn_in(van, q_sut, gil); return _burn_in(van, q_sut, gil);
} }
case c3__fork: p_sut = u3t(sut); case c3__fork: p_sut = u3t(sut);
{ {
u3_noun yed = u3qdi_tap(p_sut, u3_nul); u3_noun yed = u3qdi_tap(p_sut);
u3_noun ret = _burn_fork(van, yed, gil); u3_noun ret = _burn_fork(van, yed, gil);
u3z(yed); u3z(yed);
@ -144,7 +145,7 @@
} }
} }
u3_noun static u3_noun
_cqfu_burn(u3_noun van, _cqfu_burn(u3_noun van,
u3_noun sut) u3_noun sut)
{ {
@ -165,7 +166,7 @@
u3qfu_burn(u3_noun van, u3qfu_burn(u3_noun van,
u3_noun sut) u3_noun sut)
{ {
c3_m fun_m = c3__burn + !!u3r_at(u3qfu_van_vet, van); c3_m fun_m = 144 + c3__burn + ((!!u3r_at(u3qfu_van_vet, van)) << 8);
u3_noun pro = u3z_find(fun_m, sut); u3_noun pro = u3z_find(fun_m, sut);
if ( u3_none != pro ) { if ( u3_none != pro ) {

View File

@ -6,7 +6,7 @@
/* logic /* logic
*/ */
u3_noun static u3_noun
_cqfu_buss(u3_noun van, _cqfu_buss(u3_noun van,
u3_noun sut, u3_noun sut,
u3_noun cog, u3_noun cog,
@ -23,6 +23,20 @@
0)); 0));
} }
static u3_noun
_cqfu_busk(u3_noun van,
u3_noun sut,
u3_noun gen)
{
u3_noun von = u3i_molt(u3k(van), u3x_sam, u3k(sut), 0);
u3_noun gat = u3j_hook(von, "busk");
return u3n_kick_on(u3i_molt(gat,
u3x_sam,
u3k(gen),
0));
}
/* boilerplate /* boilerplate
*/ */
u3_noun u3_noun
@ -51,3 +65,29 @@
{ {
return _cqfu_buss(van, sut, cog, gen); return _cqfu_buss(van, sut, cog, gen);
} }
u3_noun
u3wfu_busk(u3_noun cor)
{
u3_noun sut, gen, van;
if ( (c3n == u3r_mean(cor, u3x_sam, &gen,
u3x_con, &van,
0)) ||
(u3_none == (sut = u3r_at(u3x_sam, van))) )
{
return u3m_bail(c3__fail);
} else {
return _cqfu_busk(van, sut, gen);
}
}
u3_noun
u3qfu_busk(u3_noun van,
u3_noun sut,
u3_noun gen)
{
return _cqfu_busk(van, sut, gen);
}

View File

@ -6,13 +6,17 @@
/* logic /* logic
*/ */
u3_noun static u3_noun
_cqfu_conk(u3_noun van, _cqfu_conk(u3_noun van,
u3_noun sut, u3_noun sut,
u3_noun got) u3_noun got)
{ {
if ( c3y == u3ud(got) ) { if ( c3y == u3ud(got) ) {
return u3qf_face(got, sut); u3_noun nux = u3nc(u3_nul, u3k(got));
u3_noun ret = u3qf_face(nux, sut);
u3z(nux);
return ret;
} }
else switch ( u3h(got) ) { else switch ( u3h(got) ) {
default: return u3m_bail(c3__fail); default: return u3m_bail(c3__fail);
@ -22,8 +26,10 @@
} }
case 1: { case 1: {
u3_noun cok = _cqfu_conk(van, sut, u3t(u3t(got))); u3_noun cok = _cqfu_conk(van, sut, u3t(u3t(got)));
u3_noun ret = u3qf_face(u3h(u3t(got)), cok); u3_noun nux = u3k(u3h(u3t(got)));
u3_noun ret = u3qf_face(nux, cok);
u3z(nux);
u3z(cok); u3z(cok);
return ret; return ret;
} }

View File

@ -142,6 +142,14 @@
} }
else return _crop_sint(van, sut, ref, bix); else return _crop_sint(van, sut, ref, bix);
} }
case c3__help: u3x_cell(u3t(sut), &p_sut, &q_sut);
{
u3_noun foz = _crop_dext(van, q_sut, ref, bix);
u3_noun ret = u3qf_help(p_sut, foz);
u3z(foz);
return ret;
}
case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut);
{ {
u3_noun foz = _crop_dext(van, q_sut, ref, bix); u3_noun foz = _crop_dext(van, q_sut, ref, bix);
@ -152,7 +160,7 @@
} }
case c3__fork: p_sut = u3t(sut); case c3__fork: p_sut = u3t(sut);
{ {
u3_noun yed = u3qdi_tap(p_sut, u3_nul); u3_noun yed = u3qdi_tap(p_sut);
u3_noun ret = u3kf_fork(_crop_dext_fork(van, yed, ref, bix)); u3_noun ret = u3kf_fork(_crop_dext_fork(van, yed, ref, bix));
u3z(yed); u3z(yed);
@ -196,13 +204,14 @@
default: return u3m_bail(c3__fail); default: return u3m_bail(c3__fail);
case c3__core: case c3__core:
case c3__help:
case c3__face: u3x_cell(u3t(ref), &p_ref, &q_ref); case c3__face: u3x_cell(u3t(ref), &p_ref, &q_ref);
{ {
return _crop_dext(van, sut, q_ref, bix); return _crop_dext(van, sut, q_ref, bix);
} }
case c3__fork: p_ref = u3t(ref); case c3__fork: p_ref = u3t(ref);
{ {
u3_noun yed = u3qdi_tap(p_ref, u3_nul); u3_noun yed = u3qdi_tap(p_ref);
u3_noun ret = _crop_sint_fork(van, sut, yed, bix); u3_noun ret = _crop_sint_fork(van, sut, yed, bix);
u3z(yed); u3z(yed);
@ -219,7 +228,7 @@
} }
} }
u3_noun static u3_noun
_cqfu_crop(u3_noun van, _cqfu_crop(u3_noun van,
u3_noun sut, u3_noun sut,
u3_noun ref) u3_noun ref)
@ -248,7 +257,7 @@
u3_noun sut, u3_noun sut,
u3_noun ref) u3_noun ref)
{ {
c3_m fun_m = c3__crop + !!u3r_at(u3qfu_van_vet, van); c3_m fun_m = 144 + c3__crop + ((!!u3r_at(u3qfu_van_vet, van)) << 8);
u3_noun pro = u3z_find_2(fun_m, sut, ref); u3_noun pro = u3z_find_2(fun_m, sut, ref);
if ( u3_none != pro ) { if ( u3_none != pro ) {

View File

@ -71,17 +71,29 @@
if ( 0 == p_heg ) { if ( 0 == p_heg ) {
return u3nq return u3nq
(c3y, (c3y,
u3_nul,
u3nt(u3_nul, u3nt(u3_nul,
u3nc(u3_nul, u3k(axe)), u3nc(u3_nul, u3k(axe)),
u3k(lon)), u3k(lon)),
c3y, u3nc(c3y, u3k(sut)));
u3k(sut));
} }
else { else {
return u3nt return u3nt
(c3n, c3y, u3qa_dec(p_heg)); (c3n, c3y, u3qa_dec(p_heg));
} }
} }
static u3_noun
_find_join(u3_noun a,
u3_noun b)
{
if ( c3y == u3r_sing(a, b) ) {
return u3k(a);
} else {
return u3kb_weld(u3k(a), u3nc(c3_s2('|', '|'), u3k(b)));
}
}
static u3_noun static u3_noun
_find_buck_lose(u3_noun van, _find_buck_lose(u3_noun van,
u3_noun sut, u3_noun sut,
@ -161,17 +173,17 @@
u3_noun lon, u3_noun lon,
u3_noun gil) u3_noun gil)
{ {
u3_noun p_sut, q_sut, pq_sut, qq_sut, rq_sut, prq_sut, qrq_sut; u3_noun p_sut, q_sut, pq_sut, qq_sut, rq_sut, sq_sut, psq_sut, qsq_sut;
u3x_cell(u3t(sut), &p_sut, &q_sut); u3x_cell(u3t(sut), &p_sut, &q_sut);
u3x_trel(q_sut, &pq_sut, &qq_sut, &rq_sut); u3x_qual(q_sut, &pq_sut, &qq_sut, &rq_sut, &sq_sut);
u3x_cell(rq_sut, &prq_sut, &qrq_sut); u3x_cell(sq_sut, &psq_sut, &qsq_sut);
{ {
if ( u3_nul == q_heg ) { if ( u3_nul == q_heg ) {
return _find_buck_here(van, sut, way, p_heg, q_heg, axe, lon, gil); return _find_buck_here(van, sut, way, p_heg, q_heg, axe, lon, gil);
} }
else { else {
u3_noun zem = u3qf_look(u3t(q_heg), qrq_sut); u3_noun zem = u3qf_loot(u3t(q_heg), qsq_sut);
if ( (u3_nul != zem) && (0 != p_heg) ) { if ( (u3_nul != zem) && (0 != p_heg) ) {
u3_noun ped; u3_noun ped;
@ -187,27 +199,31 @@
u3_noun u_zem = u3t(zem); u3_noun u_zem = u3t(zem);
u3_noun pu_zem = u3h(u_zem); u3_noun pu_zem = u3h(u_zem);
u3_noun qu_zem = u3t(u_zem); u3_noun qu_zem = u3t(u_zem);
u3_noun pqu_zem = u3h(qu_zem);
u3_noun qqu_zem = u3t(qu_zem);
u3_noun mut; u3_noun mut;
u3_noun pro; u3_noun pro;
mut = u3nt(c3__core, mut = u3nt(c3__core,
u3k(p_sut), u3k(p_sut),
u3nt(c3__gold, u3nq(c3__gold,
u3k(qq_sut), u3k(qq_sut),
u3k(rq_sut))); u3k(rq_sut),
u3k(sq_sut)));
pro = u3nt pro = u3nq
(c3y, (c3y,
u3k(pqu_zem),
u3nc(u3nc(u3_nul, u3k(axe)), u3k(lon)), u3nc(u3nc(u3_nul, u3k(axe)), u3k(lon)),
u3nt(c3n, u3nt(c3n,
u3qc_peg(2, pu_zem), u3qc_peg(2, pu_zem),
u3nt(u3nc(mut, u3k(qu_zem)), u3_nul, u3_nul))); u3nt(u3nc(mut, u3k(qqu_zem)), u3_nul, u3_nul)));
u3z(zem); u3z(zem);
return pro; return pro;
} }
else { else {
u3_noun pec = u3qfu_perk(van, sut, way, pq_sut); u3_noun pec = u3qfu_peel(van, sut, way, pq_sut);
u3_noun pro; u3_noun pro;
if ( c3n == u3h(pec) ) { if ( c3n == u3h(pec) ) {
@ -262,18 +278,24 @@
else { else {
u3_noun pp_hax = u3t(p_hax); // {span nock} u3_noun pp_hax = u3t(p_hax); // {span nock}
u3_noun pp_yor = u3t(p_yor); // {span nock} u3_noun pp_yor = u3t(p_yor); // {span nock}
u3_noun ppp_hax = u3h(pp_hax); // span u3_noun ppp_hax = u3h(pp_hax); // wain
u3_noun ppp_yor = u3h(pp_yor); // span u3_noun ppp_yor = u3h(pp_yor); // wain
u3_noun qpp_hax = u3h(pp_hax); // nock u3_noun qpp_hax = u3t(pp_hax);
u3_noun qpp_yor = u3h(pp_yor); // nock u3_noun qpp_yor = u3t(pp_yor);
u3_noun pqpp_hax = u3h(qpp_hax); // span
u3_noun pqpp_yor = u3h(qpp_yor); // span
u3_noun qqpp_hax = u3t(qpp_hax); // nock
u3_noun qqpp_yor = u3t(qpp_yor); // nock
if ( c3n == u3r_sing(qpp_hax, qpp_yor) ) { if ( c3n == u3r_sing(qqpp_hax, qqpp_yor) ) {
return u3m_error("find-fork-c"); return u3m_error("find-fork-c");
} }
return u3nq(c3n, return u3nq(c3n,
c3n, c3n,
u3kf_fork(u3nt(u3k(ppp_hax), u3k(ppp_yor), u3_nul)), _find_join(ppp_hax, ppp_yor),
u3k(qpp_hax)); u3nc(
u3kf_fork(u3nt(u3k(pqpp_hax), u3k(pqpp_yor), u3_nul)),
u3k(qqpp_hax)));
} }
} }
} }
@ -282,46 +304,52 @@
return u3m_error("find-fork-d"); return u3m_error("find-fork-d");
} }
else { else {
u3_noun p_hax = u3t(hax); // {vein opal} u3_noun p_hax = u3t(hax); // {wain vein opal}
u3_noun p_yor = u3t(yor); // {vein opal} u3_noun p_yor = u3t(yor); // {wain vein opal}
u3_noun pp_hax = u3h(p_hax); // vein u3_noun pp_hax = u3h(p_hax); // wain
u3_noun pp_yor = u3h(p_yor); // vein u3_noun pp_yor = u3h(p_yor); // wain
u3_noun qp_hax = u3t(p_hax); // opal u3_noun qp_hax = u3t(p_hax); // {vein opal}
u3_noun qp_yor = u3t(p_yor); // opal u3_noun qp_yor = u3t(p_yor); // {vein opal}
u3_noun pqp_hax = u3h(qp_hax); // vein
u3_noun pqp_yor = u3h(qp_yor); // vein
u3_noun qqp_hax = u3t(qp_hax); // opal
u3_noun qqp_yor = u3t(qp_yor); // opal
if ( c3n == u3r_sing(pp_hax, pp_yor) ) { if ( c3n == u3r_sing(pqp_hax, pqp_yor) ) {
return u3m_error("find-fork-e"); return u3m_error("find-fork-e");
} }
else { else {
if ( c3y == u3h(qp_hax) ) { if ( c3y == u3h(qqp_hax) ) {
if ( c3y != u3h(qp_yor) ) { if ( c3y != u3h(qqp_yor) ) {
return u3m_error("find-fork-f"); return u3m_error("find-fork-f");
} else { } else {
u3_noun pqp_hax = u3t(qp_hax); // span u3_noun pqqp_hax = u3t(qqp_hax); // span
u3_noun pqp_yor = u3t(qp_yor); // span u3_noun pqqp_yor = u3t(qqp_yor); // span
return return
u3nq(c3y, u3nq(c3y,
u3k(pp_hax), _find_join(pp_hax, pp_yor),
c3y, u3k(pqp_hax),
u3kf_fork(u3nt(u3k(pqp_hax), u3k(pqp_yor), u3_nul))); u3nc(c3y, u3kf_fork
(u3nt(u3k(pqqp_hax), u3k(pqqp_yor), u3_nul))));
} }
} }
else if ( c3n != u3h(qp_yor) ) { else if ( c3n != u3h(qqp_yor) ) {
return u3m_error("find-fork-g"); return u3m_error("find-fork-g");
} else { } else {
u3_noun pqp_hax = u3h(u3t(qp_hax)); // axis u3_noun pqqp_hax = u3h(u3t(qqp_hax)); // axis
u3_noun pqp_yor = u3h(u3t(qp_yor)); // axis u3_noun pqqp_yor = u3h(u3t(qqp_yor)); // axis
u3_noun qqp_hax = u3t(u3t(qp_hax)); // (set {span foot}) u3_noun qqqp_hax = u3t(u3t(qqp_hax)); // (set {span foot})
u3_noun qqp_yor = u3t(u3t(qp_yor)); // (set {span foot}) u3_noun qqqp_yor = u3t(u3t(qqp_yor)); // (set {span foot})
if ( c3n == u3r_sing(pqp_hax, pqp_yor) ) { if ( c3n == u3r_sing(pqqp_hax, pqqp_yor) ) {
return u3m_error("find-fork-h"); return u3m_error("find-fork-h");
} else { } else {
return return
u3nt(c3y, u3nq(c3y,
u3k(pp_hax), u3_nul,
u3nt(c3n, u3k(pqp_hax), u3qdi_uni(qqp_hax, qqp_yor))); u3k(pqp_hax),
u3nt(c3n, u3k(pqqp_hax), u3qdi_uni(qqqp_hax, qqqp_yor)));
} }
} }
} }
@ -385,7 +413,7 @@
u3_noun gil) u3_noun gil)
{ {
u3_noun p_sut = u3t(sut); u3_noun p_sut = u3t(sut);
u3_noun yed = u3qdi_tap(p_sut, u3_nul); u3_noun yed = u3qdi_tap(p_sut);
u3_noun wiz; u3_noun wiz;
u3_noun ret; u3_noun ret;
@ -411,6 +439,7 @@
u3_noun gil) u3_noun gil)
{ {
if ( u3_nul == qp_sut ) { if ( u3_nul == qp_sut ) {
// if ( 1 ) {
u3_noun nol = u3nc(u3_nul, u3k(lon)); u3_noun nol = u3nc(u3_nul, u3k(lon));
u3_noun ret = _find_buck(van, q_sut, way, p_heg, q_heg, axe, nol, gil); u3_noun ret = _find_buck(van, q_sut, way, p_heg, q_heg, axe, nol, gil);
u3z(nol); u3z(nol);
@ -419,8 +448,8 @@
else { else {
u3_noun iqp_sut = u3h(qp_sut); // twig u3_noun iqp_sut = u3h(qp_sut); // twig
u3_noun tiv = u3qfu_mint // (pair span nock) u3_noun tiv = u3qfu_mint // (pair span nock)
(van, sut, c3__noun, iqp_sut); (van, q_sut, c3__noun, iqp_sut);
u3_noun tqp_sut = u3t(qp_sut); // (list (pair span nock)) u3_noun tqp_sut = u3t(qp_sut); // (list twig)
u3_noun p_tiv = u3h(tiv); // span u3_noun p_tiv = u3h(tiv); // span
u3_noun q_tiv = u3t(tiv); // nock u3_noun q_tiv = u3t(tiv); // nock
u3_noun fid = _find_buck // pony u3_noun fid = _find_buck // pony
@ -434,7 +463,7 @@
u3_noun ret; u3_noun ret;
ret = _find_buck_face_next ret = _find_buck_face_next
(van, sut, q_sut, tqp_sut, way, p_heg, q_heg, u3t(u3t(fid)), lon, gil); (van, sut, q_sut, tqp_sut, way, u3t(u3t(fid)), q_heg, axe, lon, gil);
u3z(fid); u3z(fid);
u3z(tiv); u3z(tiv);
return ret; return ret;
@ -444,22 +473,25 @@
u3_noun vat; // (pair span nock) u3_noun vat; // (pair span nock)
u3_noun ret; u3_noun ret;
u3_noun dog = u3nc(0, u3k(axe)); // nock u3_noun dog = u3nc(0, u3k(axe)); // nock
u3_noun wan;
if ( c3y == u3h(fid) ) { if ( c3y == u3h(fid) ) {
tor = u3k(fid); wan = u3k(u3h(u3t(fid)));
tor = u3nc(c3y, u3k(u3t(u3t(fid))));
} else { } else {
wan = u3k(u3h(u3t(u3t(fid))));
tor = u3nc(c3n, u3k(u3t(u3t(fid)))); tor = u3nc(c3n, u3k(u3t(u3t(fid))));
} }
u3z(fid); u3z(fid);
vat = u3qfu_fine(van, q_sut, tor); vat = u3qfu_fine(van, sut, tor);
u3z(tor); u3z(tor);
ret = u3nq ret = u3nq
(c3n, (c3n,
c3n, c3n,
u3k(u3h(vat)), wan,
u3qf_comb(u3t(vat), u3qf_comb(dog, q_tiv))); u3nc(u3k(u3h(vat)), u3qf_comb(u3qf_comb(dog, q_tiv), u3t(vat))));
u3z(vat); u3z(vat);
u3z(dog); u3z(dog);
@ -481,8 +513,10 @@
u3_noun gil) u3_noun gil)
{ {
u3_noun p_sut, q_sut; u3_noun p_sut, q_sut;
u3_noun pp_sut, qp_sut;
u3x_cell(u3t(sut), &p_sut, &q_sut); u3x_cell(u3t(sut), &p_sut, &q_sut);
u3x_cell(p_sut, &pp_sut, &qp_sut);
if ( u3_nul == q_heg ) { if ( u3_nul == q_heg ) {
return _find_buck_here(van, q_sut, way, p_heg, q_heg, axe, lon, gil); return _find_buck_here(van, q_sut, way, p_heg, q_heg, axe, lon, gil);
@ -490,8 +524,8 @@
else { else {
u3_noun uq_heg = u3t(q_heg); // term u3_noun uq_heg = u3t(q_heg); // term
if ( c3y == u3ud(p_sut) ) { if ( c3y == u3ud(qp_sut) ) {
if ( c3y == u3r_sing(p_sut, uq_heg) ) { if ( c3y == u3r_sing(qp_sut, uq_heg) ) {
return _find_buck_here(van, q_sut, way, p_heg, q_heg, axe, lon, gil); return _find_buck_here(van, q_sut, way, p_heg, q_heg, axe, lon, gil);
} }
else { else {
@ -499,18 +533,20 @@
} }
} }
else { else {
u3_noun pp_sut = u3h(p_sut); // (map term (unit port)) u3_noun pqp_sut = u3h(qp_sut); // (map term {wain (unit twig)})
u3_noun qp_sut = u3t(p_sut); // (list (pair span nock)) u3_noun qqp_sut = u3t(qp_sut); // (list (pair span nock))
u3_noun tyr = u3qdb_get(pp_sut, uq_heg); // (unit (unit port)) u3_noun tyr = u3qdb_get(pqp_sut, uq_heg); // (unit {wain (unit twig)})
if ( u3_nul == tyr ) { if ( u3_nul == tyr ) {
return _find_buck_face_next return _find_buck_face_next
(van, sut, q_sut, qp_sut, way, p_heg, q_heg, axe, lon, gil); (van, sut, q_sut, qqp_sut, way, p_heg, q_heg, axe, lon, gil);
} }
else { else {
u3_noun u_tyr = u3t(tyr); // (unit port) u3_noun u_tyr = u3t(tyr); // (pair wain (unit twig))
u3_noun pu_tyr = u3h(u_tyr);
u3_noun qu_tyr = u3t(u_tyr);
if ( u3_nul == u_tyr ) { if ( u3_nul == qu_tyr ) {
u3_noun nol = u3nc(u3_nul, u3k(lon)); u3_noun nol = u3nc(u3_nul, u3k(lon));
u3_noun dep = u3qa_inc(p_heg); u3_noun dep = u3qa_inc(p_heg);
u3_noun ret = _find_buck u3_noun ret = _find_buck
@ -522,8 +558,8 @@
return ret; return ret;
} }
else { else {
u3_noun uu_tyr = u3t(u_tyr); u3_noun uqu_tyr = u3t(qu_tyr);
u3_noun tor = u3qfu_fund(van, sut, way, uu_tyr); u3_noun tor = u3qfu_fund(van, sut, way, uqu_tyr);
if ( c3y == u3h(tor) ) { if ( c3y == u3h(tor) ) {
u3_noun p_tor = u3t(tor); // (pair vein opal) u3_noun p_tor = u3t(tor); // (pair vein opal)
@ -533,7 +569,7 @@
u3nt(u3_nul, u3nc(u3_nul, u3k(axe)), u3k(lon)); u3nt(u3_nul, u3nc(u3_nul, u3k(axe)), u3k(lon));
u3_noun ret; u3_noun ret;
ret = u3nt(c3y, u3qb_weld(pp_tor, nol), u3k(qp_tor)); ret = u3nq(c3y, u3_nul, u3qb_weld(pp_tor, nol), u3k(qp_tor));
u3z(nol); u3z(nol);
u3z(tor); u3z(tor);
u3z(tyr); u3z(tyr);
@ -546,7 +582,10 @@
u3_noun dog = u3nc(0, u3k(axe)); // nock u3_noun dog = u3nc(0, u3k(axe)); // nock
u3_noun ret; u3_noun ret;
ret = u3nq(c3n, c3n, u3k(pp_tor), u3qf_comb(dog, qp_tor)); ret = u3nq(c3n,
c3n,
u3k(pu_tyr),
u3nc(u3k(pp_tor), u3qf_comb(dog, qp_tor)));
u3z(dog); u3z(dog);
u3z(tor); u3z(tor);
u3z(tyr); u3z(tyr);
@ -600,6 +639,13 @@
// fprintf(stderr, "core\r\n"); // fprintf(stderr, "core\r\n");
return _find_buck_core(van, sut, way, p_heg, q_heg, axe, lon, gil); return _find_buck_core(van, sut, way, p_heg, q_heg, axe, lon, gil);
} }
case c3__help:
{
u3_noun fop = u3qfu_repo(van, sut);
u3_noun pro = _find_buck(van, fop, way, p_heg, q_heg, axe, lon, gil);
u3z(fop);
return pro;
}
case c3__face: case c3__face:
{ {
// fprintf(stderr, "face\r\n"); // fprintf(stderr, "face\r\n");
@ -636,13 +682,14 @@
u3_noun sut, // span u3_noun sut, // span
u3_noun way, // ?(%read %rite %free %both) u3_noun way, // ?(%read %rite %free %both)
u3_noun i_hyp, // limb u3_noun i_hyp, // limb
u3_noun p_mor) // palo u3_noun p_mor) // {wain palo}
{ {
u3_noun pp_mor = u3h(p_mor); // vein u3_noun qp_mor = u3t(p_mor); // palo
u3_noun qp_mor = u3t(p_mor); // opal u3_noun pqp_mor = u3h(qp_mor); // vein
u3_noun qqp_mor = u3t(qp_mor); // opal
{ {
u3_noun ref = u3qfu_felt(van, sut, qp_mor); u3_noun ref = u3qfu_felt(van, sut, qqp_mor);
u3_noun lon = u3k(pp_mor); u3_noun lon = u3k(pqp_mor);
u3_noun heg = (c3y == u3du(i_hyp)) u3_noun heg = (c3y == u3du(i_hyp))
? u3k(i_hyp) ? u3k(i_hyp)
: u3nq(c3n, 0, u3_nul, u3k(i_hyp)); : u3nq(c3n, 0, u3_nul, u3k(i_hyp));
@ -653,9 +700,9 @@
ret = u3nq ret = u3nq
(c3y, (c3y,
u3_nul,
u3nc(u3nc(u3_nul, u3k(p_heg)), u3k(lon)), u3nc(u3nc(u3_nul, u3k(p_heg)), u3k(lon)),
c3y, u3nc(c3y, u3qfu_peek(van, ref, way, p_heg)));
u3qfu_peek(van, ref, way, p_heg));
} }
else { else {
u3_noun p_heg = u3h(u3t(heg)); // @ud u3_noun p_heg = u3h(u3t(heg)); // @ud
@ -679,7 +726,7 @@
u3_noun hyp) u3_noun hyp)
{ {
if ( u3_nul == hyp ) { if ( u3_nul == hyp ) {
return u3nq(c3y, u3_nul, c3y, u3k(sut)); return u3nq(c3y, u3_nul, u3_nul, u3nc(c3y, u3k(sut)));
} }
else { else {
u3_noun i_hyp = u3h(hyp); u3_noun i_hyp = u3h(hyp);
@ -693,15 +740,18 @@
return mor; return mor;
} }
else { else {
u3_noun pp_mor = u3t(p_mor); // {span nock} u3_noun pp_mor = u3t(p_mor); // {wain span nock}
u3_noun ppp_mor = u3h(pp_mor); // span u3_noun ppp_mor = u3h(pp_mor);
u3_noun qpp_mor = u3h(pp_mor); // nock u3_noun qpp_mor = u3t(pp_mor);
u3_noun pqpp_mor = u3h(qpp_mor); // span
u3_noun qqpp_mor = u3t(qpp_mor); // nock
u3_noun gen = u3nt(c3__wing, u3k(i_hyp), u3_nul); u3_noun gen = u3nt(c3__wing, u3k(i_hyp), u3_nul);
u3_noun fex = u3qfu_mint(van, ppp_mor, c3__noun, gen); u3_noun fex = u3qfu_mint(van, pqpp_mor, c3__noun, gen);
u3_noun ret = u3nq(c3n, u3_noun ret = u3nq(c3n,
c3n, c3n,
u3k(u3h(fex)), u3k(ppp_mor),
u3qf_comb(qpp_mor, u3t(fex))); u3nc(u3k(u3h(fex)),
u3qf_comb(qqpp_mor, u3t(fex))));
u3z(fex); u3z(fex);
u3z(gen); u3z(gen);
u3z(mor); u3z(mor);
@ -725,10 +775,14 @@
u3_noun way, u3_noun way,
u3_noun hyp) u3_noun hyp)
{ {
return _find_pony(van, sut, way, hyp); u3_noun taf;
taf = _find_pony(van, sut, way, hyp);
return taf;
} }
u3_noun static u3_noun
_cqfu_find(u3_noun van, _cqfu_find(u3_noun van,
u3_noun sut, u3_noun sut,
u3_noun way, u3_noun way,
@ -741,11 +795,14 @@
} }
else { else {
if ( c3y == u3h(taf) ) { if ( c3y == u3h(taf) ) {
return taf; u3_noun fat = u3nc(c3y, u3k(u3t(u3t(taf))));
u3z(taf);
return fat;
} }
else { else {
if ( c3n == u3h(u3t(taf)) ) { if ( c3n == u3h(u3t(taf)) ) {
u3_noun fat = u3nc(c3n, u3k(u3t(u3t(taf)))); u3_noun fat = u3nc(c3n, u3k(u3t(u3t(u3t(taf)))));
u3z(taf); u3z(taf);
return fat; return fat;
@ -787,7 +844,7 @@
u3_noun way, u3_noun way,
u3_noun hyp) u3_noun hyp)
{ {
c3_m fun_m = c3__find + !!u3r_at(u3qfu_van_vet, van); c3_m fun_m = 144 + c3__find + ((!!u3r_at(u3qfu_van_vet, van)) << 8);
u3_noun pro = u3z_find_3(fun_m, sut, way, hyp); u3_noun pro = u3z_find_3(fun_m, sut, way, hyp);
if ( u3_none != pro ) { if ( u3_none != pro ) {
@ -825,7 +882,7 @@
u3_noun way, u3_noun way,
u3_noun hyp) u3_noun hyp)
{ {
c3_m fun_m = c3__fond + !!u3r_at(u3qfu_van_vet, van); c3_m fun_m = 144 + c3__fond + ((!!u3r_at(u3qfu_van_vet, van)) << 8);
u3_noun pro = u3z_find_3(fun_m, sut, way, hyp); u3_noun pro = u3z_find_3(fun_m, sut, way, hyp);
if ( u3_none != pro ) { if ( u3_none != pro ) {

View File

@ -140,7 +140,8 @@
} }
} }
} }
u3_noun
static u3_noun
_cqfu_fire(u3_noun van, _cqfu_fire(u3_noun van,
u3_noun sut, u3_noun sut,
u3_noun hag) u3_noun hag)

View File

@ -92,6 +92,7 @@
case c3__core: { case c3__core: {
return u3nc(0, 0); return u3nc(0, 0);
} }
case c3__help:
case c3__face: { case c3__face: {
if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) {
return u3m_bail(c3__fail); return u3m_bail(c3__fail);
@ -101,7 +102,7 @@
} }
case c3__fork: p_sut = u3t(sut); case c3__fork: p_sut = u3t(sut);
{ {
u3_noun yed = u3qdi_tap(p_sut, u3_nul); u3_noun yed = u3qdi_tap(p_sut);
u3_noun ret = _fish_fork(van, yed, axe, vit); u3_noun ret = _fish_fork(van, yed, axe, vit);
u3z(yed); u3z(yed);
@ -133,7 +134,8 @@
} }
} }
} }
u3_noun
static u3_noun
_cqfu_fish(u3_noun van, _cqfu_fish(u3_noun van,
u3_noun sut, u3_noun sut,
u3_atom axe) u3_atom axe)
@ -164,7 +166,7 @@
u3_noun sut, u3_noun sut,
u3_noun axe) u3_noun axe)
{ {
c3_m fun_m = c3__fish + !!u3r_at(u3qfu_van_vet, van); c3_m fun_m = 144 + c3__fish + ((!!u3r_at(u3qfu_van_vet, van)) << 8);
u3_noun pro = u3z_find_2(fun_m, sut, axe); u3_noun pro = u3z_find_2(fun_m, sut, axe);
if ( u3_none != pro ) { if ( u3_none != pro ) {

View File

@ -124,6 +124,14 @@
{ {
return _fuse_repo(van, sut, ref, bix); return _fuse_repo(van, sut, ref, bix);
} }
case c3__help: u3x_cell(u3t(sut), &p_sut, &q_sut);
{
u3_noun vot = _fuse_in(van, q_sut, ref, bix);
u3_noun ret = u3qf_help(p_sut, vot);
u3z(vot);
return ret;
}
case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut);
{ {
u3_noun vot = _fuse_in(van, q_sut, ref, bix); u3_noun vot = _fuse_in(van, q_sut, ref, bix);
@ -134,7 +142,7 @@
} }
case c3__fork: p_sut = u3t(sut); case c3__fork: p_sut = u3t(sut);
{ {
u3_noun yed = u3qdi_tap(p_sut, u3_nul); u3_noun yed = u3qdi_tap(p_sut);
u3_noun ret = u3kf_fork(_fuse_in_fork(van, yed, ref, bix)); u3_noun ret = u3kf_fork(_fuse_in_fork(van, yed, ref, bix));
u3z(yed); u3z(yed);
@ -164,7 +172,7 @@
} }
} }
u3_noun static u3_noun
_cqfu_fuse(u3_noun van, _cqfu_fuse(u3_noun van,
u3_noun sut, u3_noun sut,
u3_noun ref) u3_noun ref)
@ -193,7 +201,7 @@
u3_noun sut, u3_noun sut,
u3_noun ref) u3_noun ref)
{ {
c3_m fun_m = c3__fuse + !!u3r_at(u3qfu_van_vet, van); c3_m fun_m = 144 + c3__fuse + ((!!u3r_at(u3qfu_van_vet, van)) << 8);
u3_noun pro = u3z_find_2(fun_m, sut, ref); u3_noun pro = u3z_find_2(fun_m, sut, ref);
if ( u3_none != pro ) { if ( u3_none != pro ) {

View File

@ -148,17 +148,17 @@
return u3m_bail(c3__fail); return u3m_bail(c3__fail);
} }
else { else {
u3_noun qn_dab = u3t(n_dab); u3_noun qqn_dab = u3t(u3t(n_dab));
u3_noun vad; u3_noun vad;
switch ( u3h(qn_dab) ) { switch ( u3h(qqn_dab) ) {
default: return u3m_bail(c3__exit); default: return u3m_bail(c3__exit);
case c3__ash: { case c3__ash: {
vad = _mint_brew(van, sut, c3y, u3t(qn_dab)); vad = _mint_brew(van, sut, c3y, u3t(qqn_dab));
break; break;
} }
case c3__elm: { case c3__elm: {
vad = _mint_brew(van, sut, c3n, u3t(qn_dab)); vad = _mint_brew(van, sut, c3n, u3t(qqn_dab));
break; break;
} }
} }
@ -181,29 +181,71 @@
} }
} }
static u3_noun
_mint_hope(u3_noun van,
u3_noun sut,
u3_noun dom)
{
if ( (u3_nul == dom) ) {
return 0;
}
else {
u3_noun n_dom, l_dom, r_dom;
u3r_trel(dom, &n_dom, &l_dom, &r_dom);
if ( c3n == u3du(n_dom) ) {
return u3m_bail(c3__fail);
}
else {
u3_noun qqn_dom = u3t(u3t(n_dom));
u3_noun dov;
dov = _mint_harp(van, sut, qqn_dom);
if ( (u3_nul == l_dom) && (u3_nul == r_dom) ) {
return dov;
}
else if ( (u3_nul == l_dom) ) {
return u3nc(dov, _mint_hope(van, sut, r_dom));
}
else if ( (u3_nul == r_dom) ) {
return u3nc(dov, _mint_hope(van, sut, l_dom));
}
else {
return u3nt(dov,
_mint_hope(van, sut, l_dom),
_mint_hope(van, sut, r_dom));
}
}
}
}
static u3_noun static u3_noun
_mint_grow(u3_noun van, _mint_grow(u3_noun van,
u3_noun sut, u3_noun sut,
u3_noun gol, u3_noun gol,
u3_atom mel, u3_atom mel,
u3_noun ruf, u3_noun ruf,
u3_noun dab) u3_noun wan,
u3_noun dom)
{ {
u3_noun dan = _mint_in(van, sut, c3__noun, ruf); u3_noun dan = _mint_in(van, sut, c3__noun, ruf);
u3_noun p_dan = u3h(dan); u3_noun p_dan = u3h(dan);
u3_noun q_dan = u3t(dan); u3_noun q_dan = u3t(dan);
u3_noun toc = _mint_core(u3k(p_dan), u3_noun toc = _mint_core(u3k(p_dan),
u3nt(c3__gold, u3nq(c3__gold,
u3k(p_dan), u3k(p_dan),
u3k(wan),
u3nc(u3_nul, u3nc(u3_nul,
u3k(dab)))); u3k(dom))));
u3_noun dez = _mint_harp(van, toc, dab); u3_noun dez = _mint_hope(van, toc, dom);
u3_noun zod = u3nc(1, dez); u3_noun zod = u3nc(1, dez);
u3_noun cot = _mint_core(u3k(p_dan), u3_noun cot = _mint_core(u3k(p_dan),
u3nt(mel, u3nq(mel,
u3k(p_dan), u3k(p_dan),
u3k(wan),
u3nc(u3k(dez), u3nc(u3k(dez),
u3k(dab)))); u3k(dom))));
u3_noun ret = u3nc(_mint_nice(van, gol, cot), u3_noun ret = u3nc(_mint_nice(van, gol, cot),
u3qf_cons(zod, q_dan)); u3qf_cons(zod, q_dan));
@ -392,7 +434,7 @@
return ret; return ret;
} }
case c3__fits: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__wtts: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mint_used(); _mint_used();
{ {
u3_noun heb = u3nc(c3__herb, u3k(p_gen)); u3_noun heb = u3nc(c3__herb, u3k(p_gen));
@ -415,7 +457,7 @@
return ret; return ret;
} }
case c3__if: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); case c3__wtcl: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen);
_mint_used(); _mint_used();
{ {
u3_noun bol = _mint_bean(); u3_noun bol = _mint_bean();
@ -448,7 +490,7 @@
return ret; return ret;
} }
case c3__cons: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__clhp: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mint_used(); _mint_used();
{ {
u3_noun hed = _mint_in(van, sut, c3__noun, p_gen); u3_noun hed = _mint_in(van, sut, c3__noun, p_gen);
@ -465,7 +507,7 @@
return ret; return ret;
} }
case c3__same: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__dtts: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mint_used(); _mint_used();
{ {
u3_noun typ = _mint_nice(van, gol, _mint_bean()); u3_noun typ = _mint_nice(van, gol, _mint_bean());
@ -486,7 +528,7 @@
return ret; return ret;
} }
case c3__deep: p_gen = u3t(gen); case c3__dtwt: p_gen = u3t(gen);
_mint_used(); _mint_used();
{ {
u3_noun typ = _mint_nice(van, gol, _mint_bean()); u3_noun typ = _mint_nice(van, gol, _mint_bean());
@ -495,7 +537,7 @@
u3nc(3, _mint_corn(van, sut, p_gen))); u3nc(3, _mint_corn(van, sut, p_gen)));
} }
case c3__wish: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__dtkt: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mint_used(); _mint_used();
{ {
u3_noun nog = u3nc(c3__bunt, u3k(p_gen)); u3_noun nog = u3nc(c3__bunt, u3k(p_gen));
@ -511,7 +553,7 @@
return ret; return ret;
} }
case c3__bump: p_gen = u3t(gen); case c3__dtls: p_gen = u3t(gen);
_mint_used(); _mint_used();
{ {
u3_noun tom = u3nt(c3__atom, u3_blip, u3_nul); u3_noun tom = u3nt(c3__atom, u3_blip, u3_nul);
@ -534,7 +576,7 @@
return ret; return ret;
} }
case c3__nock: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__dttr: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mint_used(); _mint_used();
{ {
u3_noun one = _mint_corn(van, sut, p_gen); u3_noun one = _mint_corn(van, sut, p_gen);
@ -560,7 +602,7 @@
return u3k(u3t(gen)); return u3k(u3t(gen));
} }
case c3__iron: p_gen = u3t(gen); case c3__ktbr: p_gen = u3t(gen);
_mint_used(); _mint_used();
{ {
u3_noun ryd = _mint_in(van, sut, gol, p_gen); u3_noun ryd = _mint_in(van, sut, gol, p_gen);
@ -571,7 +613,7 @@
return pro; return pro;
} }
case c3__zinc: p_gen = u3t(gen); case c3__ktpm: p_gen = u3t(gen);
_mint_used(); _mint_used();
{ {
u3_noun ryd = _mint_in(van, sut, gol, p_gen); u3_noun ryd = _mint_in(van, sut, gol, p_gen);
@ -582,7 +624,7 @@
return pro; return pro;
} }
case c3__lead: p_gen = u3t(gen); case c3__ktwt: p_gen = u3t(gen);
_mint_used(); _mint_used();
{ {
u3_noun ryd = _mint_in(van, sut, gol, p_gen); u3_noun ryd = _mint_in(van, sut, gol, p_gen);
@ -593,7 +635,18 @@
return pro; return pro;
} }
case c3__name: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__help: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mint_used();
{
u3_noun hum = _mint_in(van, sut, gol, q_gen);
u3_noun ret = u3nc(u3qf_help(p_gen, u3k(u3h(hum))),
u3k(u3t(hum)));
u3z(hum);
return ret;
}
case c3__ktts: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mint_used(); _mint_used();
{ {
u3_noun vat = _mint_in(van, sut, gol, q_gen); u3_noun vat = _mint_in(van, sut, gol, q_gen);
@ -605,7 +658,13 @@
return ret; return ret;
} }
case c3__burn: p_gen = u3t(gen); case c3__tune: p_gen = u3t(gen);
_mint_used();
{
return u3nc(u3qf_face(p_gen, sut), u3nc(0, 1));
}
case c3__ktsg: p_gen = u3t(gen);
_mint_used(); _mint_used();
{ {
u3_noun nef = _mint_in(van, sut, gol, p_gen); u3_noun nef = _mint_in(van, sut, gol, p_gen);
@ -630,7 +689,7 @@
return ret; return ret;
} }
case c3__like: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__ktls: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mint_used(); _mint_used();
{ {
u3_noun huz = u3qfu_play(van, sut, p_gen); u3_noun huz = u3qfu_play(van, sut, p_gen);
@ -642,7 +701,7 @@
return ret; return ret;
} }
case c3__per: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__tsgr: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mint_used(); _mint_used();
{ {
u3_noun fid = _mint_in(van, sut, c3__noun, p_gen); u3_noun fid = _mint_in(van, sut, c3__noun, p_gen);
@ -660,7 +719,7 @@
return ret; return ret;
} }
case c3__aka: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); case c3__tstr: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen);
_mint_used(); _mint_used();
{ {
u3_noun boc = u3qfu_buss(van, sut, p_gen, q_gen); u3_noun boc = u3qfu_buss(van, sut, p_gen, q_gen);
@ -670,24 +729,34 @@
return ret; return ret;
} }
case c3__make: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__tscm: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mint_used();
{
u3_noun boc = u3qfu_busk(van, sut, p_gen);
u3_noun ret = _mint_in(van, boc, gol, q_gen);
u3z(boc);
return ret;
}
case c3__cnts: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mint_used(); _mint_used();
{ {
return _mint_cnts(van, sut, gol, p_gen, q_gen); return _mint_cnts(van, sut, gol, p_gen, q_gen);
} }
case c3__core: p_gen = u3t(gen); case c3__brcn: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mint_used(); _mint_used();
{ {
u3_noun ruf = u3nc(u3_nul, 1); u3_noun ruf = u3nc(u3_nul, 1);
ret = _mint_grow(van, sut, gol, c3__gold, ruf, p_gen); ret = _mint_grow(van, sut, gol, c3__gold, ruf, p_gen, q_gen);
u3z(ruf); u3z(ruf);
return ret; return ret;
} }
case c3__peep: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__sgzp: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mint_used(); _mint_used();
{ {
u3_noun typ = u3qfu_play(van, sut, p_gen); u3_noun typ = u3qfu_play(van, sut, p_gen);
@ -703,7 +772,7 @@
return ret; return ret;
} }
case c3__hint: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__sggr: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mint_used(); _mint_used();
{ {
u3_noun hum = _mint_in(van, sut, gol, q_gen); u3_noun hum = _mint_in(van, sut, gol, q_gen);
@ -722,7 +791,7 @@
return ret; return ret;
} }
case c3__code: p_gen = u3t(gen); case c3__zpts: p_gen = u3t(gen);
_mint_used(); _mint_used();
{ {
u3_noun von = u3i_molt(u3k(van), u3qfu_van_vet, c3n, 0); u3_noun von = u3i_molt(u3k(van), u3qfu_van_vet, c3n, 0);
@ -732,7 +801,7 @@
return u3nc(c3__noun, u3nc(1, sev)); return u3nc(c3__noun, u3nc(1, sev));
} }
case c3__cool: p_gen = u3t(gen); case c3__ktcn: p_gen = u3t(gen);
_mint_used(); _mint_used();
{ {
u3_noun von = u3i_molt(u3k(van), u3qfu_van_fab, c3n, 0); u3_noun von = u3i_molt(u3k(van), u3qfu_van_fab, c3n, 0);
@ -742,7 +811,7 @@
return ret; return ret;
} }
case c3__twig: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__zpcm: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mint_used(); _mint_used();
{ {
return u3nc(_mint_nice(van, return u3nc(_mint_nice(van,
@ -765,7 +834,7 @@
return ret; return ret;
} }
case c3__spit: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__zpsm: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mint_used(); _mint_used();
{ {
u3_noun vos = _mint_in(van, sut, c3__noun, q_gen); u3_noun vos = _mint_in(van, sut, c3__noun, q_gen);
@ -804,6 +873,7 @@
} }
case c3__fail: case c3__fail:
case c3__zpzp:
_mint_used(); _mint_used();
{ {
return u3nt(c3__void, 0, 0); return u3nt(c3__void, 0, 0);
@ -811,7 +881,7 @@
} }
} }
u3_noun static u3_noun
_cqfu_mint(u3_noun van, _cqfu_mint(u3_noun van,
u3_noun sut, u3_noun sut,
u3_noun gol, u3_noun gol,
@ -845,7 +915,7 @@
u3_noun gol, u3_noun gol,
u3_noun gen) u3_noun gen)
{ {
c3_m fun_m = c3__mint; c3_m fun_m = 144 + c3__mint;
u3_noun vrf = u3r_at(u3qfu_van_vrf, van); u3_noun vrf = u3r_at(u3qfu_van_vrf, van);
u3_noun pro = u3z_find_4(fun_m, vrf, sut, gol, gen); u3_noun pro = u3z_find_4(fun_m, vrf, sut, gol, gen);

View File

@ -98,13 +98,13 @@
u3m_bail(c3__fail); u3m_bail(c3__fail);
} }
else { else {
u3_noun qn_dab = u3t(n_dab); u3_noun qqn_dab = u3t(u3t(n_dab));
u3_noun vad; u3_noun vad;
switch ( u3h(qn_dab) ) { switch ( u3h(qqn_dab) ) {
default: u3m_bail(c3__exit); default: u3m_bail(c3__exit);
case c3__ash: { case c3__ash: {
vad = _mull_in(van, sut, c3__noun, dox, u3t(qn_dab)); vad = _mull_in(van, sut, c3__noun, dox, u3t(qqn_dab));
break; break;
} }
case c3__elm: { case c3__elm: {
@ -131,6 +131,41 @@
} }
} }
static void
_mull_balk(u3_noun van,
u3_noun sut,
u3_noun dox,
u3_noun dom)
{
if ( u3_nul != dom ) {
u3_noun n_dom, l_dom, r_dom;
u3r_trel(dom, &n_dom, &l_dom, &r_dom);
if ( c3n == u3du(n_dom) ) {
u3m_bail(c3__fail);
}
else {
u3_noun qqn_dom = u3t(u3t(n_dom));
_mull_bake(van, sut, dox, qqn_dom);
if ( (u3_nul == l_dom) && (u3_nul == r_dom) ) {
return;
}
else if ( (u3_nul == l_dom) ) {
_mull_balk(van, sut, dox, r_dom);
}
else if ( (u3_nul == r_dom) ) {
_mull_balk(van, sut, dox, l_dom);
}
else {
_mull_balk(van, sut, dox, l_dom);
_mull_balk(van, sut, dox, r_dom);
}
}
}
}
static u3_noun static u3_noun
_mull_grow(u3_noun van, _mull_grow(u3_noun van,
u3_noun sut, u3_noun sut,
@ -138,32 +173,37 @@
u3_noun dox, u3_noun dox,
u3_atom mel, u3_atom mel,
u3_noun ruf, u3_noun ruf,
u3_noun dab) u3_noun wan,
u3_noun dom)
{ {
u3_noun dan = _mull_in(van, sut, c3__noun, dox, ruf); u3_noun dan = _mull_in(van, sut, c3__noun, dox, ruf);
u3_noun p_dan = u3h(dan); u3_noun p_dan = u3h(dan);
u3_noun q_dan = u3t(dan); u3_noun q_dan = u3t(dan);
u3_noun p_toc = _mull_core(u3k(p_dan), u3_noun p_toc = _mull_core(u3k(p_dan),
u3nt(c3__gold, u3nq(c3__gold,
u3k(p_dan), u3k(p_dan),
u3nc(u3_nul, u3k(dab)))); u3k(wan),
u3nc(u3_nul, u3k(dom))));
u3_noun q_toc = _mull_core(u3k(q_dan), u3_noun q_toc = _mull_core(u3k(q_dan),
u3nt(c3__gold, u3nq(c3__gold,
u3k(q_dan), u3k(q_dan),
u3nc(u3_nul, u3k(dab)))); u3k(wan),
u3nc(u3_nul, u3k(dom))));
u3_noun p_ret = _mull_core(u3k(p_dan), u3_noun p_ret = _mull_core(u3k(p_dan),
u3nt(u3k(mel), u3nq(u3k(mel),
u3k(p_dan), u3k(p_dan),
u3k(wan),
u3nc(u3nc(u3_nul, u3_nul), u3nc(u3nc(u3_nul, u3_nul),
u3k(dab)))); u3k(dom))));
u3_noun q_ret = _mull_core(u3k(q_dan), u3_noun q_ret = _mull_core(u3k(q_dan),
u3nt(u3k(mel), u3nq(u3k(mel),
u3k(q_dan), u3k(q_dan),
u3k(wan),
u3nc(u3nc(u3_nul, u3_nul), u3nc(u3nc(u3_nul, u3_nul),
u3k(dab)))); u3k(dom))));
u3_noun ret = u3nc(_mull_nice(van, gol, p_ret), q_ret); u3_noun ret = u3nc(_mull_nice(van, gol, p_ret), q_ret);
_mull_bake(van, p_toc, q_toc, dab); _mull_balk(van, p_toc, q_toc, dom);
u3z(q_toc); u3z(q_toc);
u3z(p_toc); u3z(p_toc);
@ -345,7 +385,7 @@
return ret; return ret;
} }
case c3__fits: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__wtts: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mull_used(); _mull_used();
{ {
u3_noun heb = u3nc(c3__herb, u3k(p_gen)); u3_noun heb = u3nc(c3__herb, u3k(p_gen));
@ -373,7 +413,7 @@
return _mull_both(van, gol, _mull_bean()); return _mull_both(van, gol, _mull_bean());
} }
case c3__if: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); case c3__wtcl: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen);
_mull_used(); _mull_used();
{ {
u3_noun bol = _mull_bean(); u3_noun bol = _mull_bean();
@ -423,7 +463,7 @@
return ret; return ret;
} }
case c3__cons: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__clhp: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mull_used(); _mull_used();
{ {
u3_noun hed = _mull_in(van, sut, c3__noun, dox, p_gen); u3_noun hed = _mull_in(van, sut, c3__noun, dox, p_gen);
@ -438,7 +478,7 @@
return ret; return ret;
} }
case c3__same: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__dtts: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mull_used(); _mull_used();
{ {
u3_noun hed = _mull_in(van, sut, c3__noun, dox, p_gen); u3_noun hed = _mull_in(van, sut, c3__noun, dox, p_gen);
@ -450,7 +490,7 @@
return _mull_both(van, gol, _mull_bean()); return _mull_both(van, gol, _mull_bean());
} }
case c3__deep: p_gen = u3t(gen); case c3__dtwt: p_gen = u3t(gen);
_mull_used(); _mull_used();
{ {
u3_noun vay = _mull_in(van, sut, c3__noun, dox, p_gen); u3_noun vay = _mull_in(van, sut, c3__noun, dox, p_gen);
@ -459,7 +499,7 @@
return _mull_both(van, gol, _mull_bean()); return _mull_both(van, gol, _mull_bean());
} }
case c3__wish: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__dtkt: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mull_used(); _mull_used();
{ {
u3_noun nog = u3nc(c3__bunt, u3k(p_gen)); u3_noun nog = u3nc(c3__bunt, u3k(p_gen));
@ -472,7 +512,7 @@
return ret; return ret;
} }
case c3__bump: p_gen = u3t(gen); case c3__dtls: p_gen = u3t(gen);
_mull_used(); _mull_used();
{ {
u3_noun wuq = u3nt(c3__atom, u3_blip, u3_nul); u3_noun wuq = u3nt(c3__atom, u3_blip, u3_nul);
@ -490,7 +530,7 @@
return _mull_both(van, gol, typ); return _mull_both(van, gol, typ);
} }
case c3__nock: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__dttr: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mull_used(); _mull_used();
{ {
u3_noun hed = _mull_in(van, sut, c3__noun, dox, p_gen); u3_noun hed = _mull_in(van, sut, c3__noun, dox, p_gen);
@ -515,7 +555,7 @@
return u3nc(u3k(p_gen), u3k(p_gen)); return u3nc(u3k(p_gen), u3k(p_gen));
} }
case c3__iron: p_gen = u3t(gen); case c3__ktbr: p_gen = u3t(gen);
_mull_used(); _mull_used();
{ {
u3_noun vat = _mull_in(van, sut, gol, dox, p_gen); u3_noun vat = _mull_in(van, sut, gol, dox, p_gen);
@ -530,7 +570,7 @@
return pro; return pro;
} }
case c3__zinc: p_gen = u3t(gen); case c3__ktpm: p_gen = u3t(gen);
_mull_used(); _mull_used();
{ {
u3_noun vat = _mull_in(van, sut, gol, dox, p_gen); u3_noun vat = _mull_in(van, sut, gol, dox, p_gen);
@ -545,7 +585,7 @@
return pro; return pro;
} }
case c3__lead: p_gen = u3t(gen); case c3__ktwt: p_gen = u3t(gen);
_mull_used(); _mull_used();
{ {
u3_noun vat = _mull_in(van, sut, gol, dox, p_gen); u3_noun vat = _mull_in(van, sut, gol, dox, p_gen);
@ -560,7 +600,18 @@
return pro; return pro;
} }
case c3__name: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__help: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mull_used();
{
u3_noun vat = _mull_in(van, sut, gol, dox, q_gen);
u3_noun ret = u3nc(u3qf_help(p_gen, u3h(vat)),
u3qf_help(p_gen, u3t(vat)));
u3z(vat);
return ret;
}
case c3__ktts: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mull_used(); _mull_used();
{ {
u3_noun vat = _mull_in(van, sut, gol, dox, q_gen); u3_noun vat = _mull_in(van, sut, gol, dox, q_gen);
@ -571,13 +622,20 @@
return ret; return ret;
} }
case c3__burn: p_gen = u3t(gen); case c3__tune: p_gen = u3t(gen);
_mull_used();
{
return u3nc(u3qf_face(p_gen, sut),
u3qf_face(p_gen, dox));
}
case c3__ktsg: p_gen = u3t(gen);
_mull_used(); _mull_used();
{ {
return _mull_in(van, sut, gol, dox, p_gen); return _mull_in(van, sut, gol, dox, p_gen);
} }
case c3__like: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__ktls: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mull_used(); _mull_used();
{ {
u3_noun p_hif = _mull_nice(van, gol, u3qfu_play(van, sut, p_gen)); u3_noun p_hif = _mull_nice(van, gol, u3qfu_play(van, sut, p_gen));
@ -589,7 +647,7 @@
return ret; return ret;
} }
case c3__per: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__tsgr: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mull_used(); _mull_used();
{ {
u3_noun lem = _mull_in(van, sut, c3__noun, dox, p_gen); u3_noun lem = _mull_in(van, sut, c3__noun, dox, p_gen);
@ -601,7 +659,7 @@
return ret; return ret;
} }
case c3__aka: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); case c3__tstr: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen);
_mull_used(); _mull_used();
{ {
u3_noun boc = u3qfu_buss(van, sut, p_gen, q_gen); u3_noun boc = u3qfu_buss(van, sut, p_gen, q_gen);
@ -614,24 +672,37 @@
return ret; return ret;
} }
case c3__make: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__tscm: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mull_used();
{
u3_noun boc = u3qfu_busk(van, sut, p_gen);
u3_noun nuf = u3qfu_busk(van, dox, p_gen);
u3_noun ret = _mull_in(van, boc, gol, nuf, q_gen);
u3z(boc);
u3z(nuf);
return ret;
}
case c3__cnts: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mull_used(); _mull_used();
{ {
return _mull_cnts(van, sut, gol, dox, p_gen, q_gen); return _mull_cnts(van, sut, gol, dox, p_gen, q_gen);
} }
case c3__core: p_gen = u3t(gen); case c3__brcn: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mull_used(); _mull_used();
{ {
u3_noun ruf = u3nc(u3_nul, 1); u3_noun ruf = u3nc(u3_nul, 1);
ret = _mull_grow(van, sut, gol, dox, c3__gold, ruf, p_gen); ret = _mull_grow(van, sut, gol, dox, c3__gold, ruf, p_gen, q_gen);
u3z(ruf); u3z(ruf);
return ret; return ret;
} }
case c3__peep: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__sgzp: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mull_used(); _mull_used();
{ {
u3_noun typ = u3qfu_play(van, sut, p_gen); u3_noun typ = u3qfu_play(van, sut, p_gen);
@ -648,13 +719,13 @@
return ret; return ret;
} }
case c3__hint: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__sggr: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mull_used(); _mull_used();
{ {
return _mull_in(van, sut, gol, dox, q_gen); return _mull_in(van, sut, gol, dox, q_gen);
} }
case c3__twig: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__zpcm: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mull_used(); _mull_used();
{ {
u3_noun p_ret = u3qfu_play(van, sut, p_gen); u3_noun p_ret = u3qfu_play(van, sut, p_gen);
@ -676,13 +747,13 @@
return ret; return ret;
} }
case c3__code: p_gen = u3t(gen); case c3__zpts: p_gen = u3t(gen);
_mull_used(); _mull_used();
{ {
return _mull_both(van, gol, c3__noun); return _mull_both(van, gol, c3__noun);
} }
case c3__cool: p_gen = u3t(gen); case c3__ktcn: p_gen = u3t(gen);
_mull_used(); _mull_used();
{ {
u3_noun von = u3i_molt(u3k(van), u3qfu_van_fab, c3n, 0); u3_noun von = u3i_molt(u3k(van), u3qfu_van_fab, c3n, 0);
@ -692,7 +763,7 @@
return ret; return ret;
} }
case c3__spit: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__zpsm: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mull_used(); _mull_used();
{ {
u3_noun p_zur = u3qfu_play(van, sut, p_gen); u3_noun p_zur = u3qfu_play(van, sut, p_gen);
@ -711,6 +782,7 @@
case c3__lost: case c3__lost:
case c3__fail: case c3__fail:
case c3__zpzp:
_mull_used(); _mull_used();
{ {
return u3nc(c3__void, c3__void); return u3nc(c3__void, c3__void);
@ -718,7 +790,7 @@
} }
} }
u3_noun static u3_noun
_cqfu_mull(u3_noun van, _cqfu_mull(u3_noun van,
u3_noun sut, u3_noun sut,
u3_noun gol, u3_noun gol,
@ -755,7 +827,7 @@
u3_noun dox, u3_noun dox,
u3_noun gen) u3_noun gen)
{ {
c3_m fun_m = c3__mull + !!u3r_at(u3qfu_van_vet, van); c3_m fun_m = 144 + c3__mull + ((!!u3r_at(u3qfu_van_vet, van)) << 8);
u3_noun pro = u3z_find_4(fun_m, sut, gol, dox, gen); u3_noun pro = u3z_find_4(fun_m, sut, gol, dox, gen);
if ( u3_none != pro ) { if ( u3_none != pro ) {

View File

@ -13,7 +13,7 @@
_nest_dext(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); _nest_dext(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun, u3_noun, u3_noun);
static u3_noun static u3_noun
_nest_clip(u3_noun van, _nest_deep(u3_noun van,
u3_noun sut, u3_noun sut,
u3_noun tel, u3_noun tel,
u3_noun ref, u3_noun ref,
@ -28,35 +28,35 @@
} else { } else {
u3_noun n_dab, l_dab, r_dab; u3_noun n_dab, l_dab, r_dab;
u3_noun n_hem, l_hem, r_hem; u3_noun n_hem, l_hem, r_hem;
u3_noun pn_hem, qn_hem, pn_dab, qn_dab; u3_noun pn_hem, pqn_hem, qqn_hem, pn_dab, pqn_dab, qqn_dab;
u3x_trel(dab, &n_dab, &l_dab, &r_dab); u3x_trel(dab, &n_dab, &l_dab, &r_dab);
u3x_trel(hem, &n_hem, &l_hem, &r_hem); u3x_trel(hem, &n_hem, &l_hem, &r_hem);
if ( (c3n == _nest_clip(van, sut, tel, ref, l_dab, l_hem, gil)) || if ( (c3n == _nest_deep(van, sut, tel, ref, l_dab, l_hem, gil)) ||
(c3n == _nest_clip(van, sut, tel, ref, r_dab, r_hem, gil)) ) (c3n == _nest_deep(van, sut, tel, ref, r_dab, r_hem, gil)) )
{ {
return c3n; return c3n;
} }
u3x_cell(n_dab, &pn_dab, &qn_dab); u3x_trel(n_dab, &pn_dab, &pqn_dab, &qqn_dab);
u3x_cell(n_hem, &pn_hem, &qn_hem); u3x_trel(n_hem, &pn_hem, &pqn_hem, &qqn_hem);
if ( c3n == u3r_sing(pn_dab, pn_hem) ) { if ( c3n == u3r_sing(pn_dab, pn_hem) ) {
return c3n; return c3n;
} else { } else {
if ( (c3n == u3du(qn_dab)) || (c3n == u3du(qn_hem)) ) { if ( (c3n == u3du(qqn_dab)) || (c3n == u3du(qqn_hem)) ) {
return u3m_bail(c3__fail); return u3m_bail(c3__fail);
} }
else switch ( u3h(qn_dab) ) { else switch ( u3h(qqn_dab) ) {
default: return u3m_bail(c3__exit); default: return u3m_bail(c3__exit);
case c3__ash: { case c3__ash: {
if ( c3__ash != u3h(qn_hem) ) { if ( c3__ash != u3h(qqn_hem) ) {
return c3n; return c3n;
} else { } else {
u3_noun pqn_dab = u3t(qn_dab); u3_noun qqqn_dab = u3t(qqn_dab);
u3_noun pqn_hem = u3t(qn_hem); u3_noun qqqn_hem = u3t(qqn_hem);
u3_noun vis = u3qfu_play(van, sut, pqn_dab); u3_noun vis = u3qfu_play(van, sut, qqqn_dab);
u3_noun lon = u3qfu_play(van, ref, pqn_hem); u3_noun lon = u3qfu_play(van, ref, qqqn_hem);
u3_noun ret = _nest_dext(van, vis, tel, lon, u3_nul, u3_nul, gil); u3_noun ret = _nest_dext(van, vis, tel, lon, u3_nul, u3_nul, gil);
@ -66,13 +66,50 @@
} }
} }
case c3__elm: { case c3__elm: {
return u3r_sing(qn_dab, qn_hem); return u3r_sing(qqn_dab, qqn_hem);
} }
} }
} }
} }
} }
static u3_noun
_nest_dope(u3_noun van,
u3_noun sut,
u3_noun tel,
u3_noun ref,
u3_noun dom,
u3_noun vim,
u3_noun gil)
{
if ( u3_nul == dom ) {
return u3r_sing(u3_nul, vim);
} else if ( u3_nul == vim ) {
return c3n;
} else {
u3_noun n_dom, l_dom, r_dom;
u3_noun n_vim, l_vim, r_vim;
u3_noun pn_vim, pqn_vim, qqn_vim, pn_dom, pqn_dom, qqn_dom;
u3x_trel(dom, &n_dom, &l_dom, &r_dom);
u3x_trel(vim, &n_vim, &l_vim, &r_vim);
if ( (c3n == _nest_dope(van, sut, tel, ref, l_dom, l_vim, gil)) ||
(c3n == _nest_dope(van, sut, tel, ref, r_dom, r_vim, gil)) )
{
return c3n;
}
u3x_trel(n_dom, &pn_dom, &pqn_dom, &qqn_dom);
u3x_trel(n_vim, &pn_vim, &pqn_vim, &qqn_vim);
if ( c3n == u3r_sing(pn_dom, pn_vim) ) {
return c3n;
} else {
return _nest_deep(van, sut, tel, ref, qqn_dom, qqn_vim, gil);
}
}
}
static u3_noun static u3_noun
_nest_cong(u3_noun van, _nest_cong(u3_noun van,
u3_noun sut, u3_noun sut,
@ -81,19 +118,19 @@
u3_noun gil) u3_noun gil)
{ {
u3_noun p_sut, q_sut, p_ref, q_ref; u3_noun p_sut, q_sut, p_ref, q_ref;
u3_noun pq_sut, qq_sut, rq_sut; u3_noun pq_sut, qq_sut, rq_sut, sq_sut;
u3_noun pq_ref, qq_ref, rq_ref; u3_noun pq_ref, qq_ref, rq_ref, sq_ref;
u3_noun prq_sut, qrq_sut, prq_ref, qrq_ref; u3_noun psq_sut, qsq_sut, psq_ref, qsq_ref;
u3_noun ret; u3_noun ret;
u3x_trel(sut, 0, &p_sut, &q_sut); u3x_trel(sut, 0, &p_sut, &q_sut);
u3x_trel(ref, 0, &p_ref, &q_ref); u3x_trel(ref, 0, &p_ref, &q_ref);
u3x_trel(q_sut, &pq_sut, &qq_sut, &rq_sut); u3x_qual(q_sut, &pq_sut, &qq_sut, &rq_sut, &sq_sut);
u3x_trel(q_ref, &pq_ref, &qq_ref, &rq_ref); u3x_qual(q_ref, &pq_ref, &qq_ref, &rq_ref, &sq_ref);
u3x_cell(rq_sut, &prq_sut, &qrq_sut); u3x_cell(sq_sut, &psq_sut, &qsq_sut);
u3x_cell(rq_ref, &prq_ref, &qrq_ref); u3x_cell(sq_ref, &psq_ref, &qsq_ref);
if ( c3y == u3r_sing(q_sut, q_ref) ) { if ( c3y == u3r_sing(q_sut, q_ref) ) {
return _nest_dext(van, p_sut, tel, p_ref, u3_nul, u3_nul, gil); return _nest_dext(van, p_sut, tel, p_ref, u3_nul, u3_nul, gil);
@ -134,7 +171,7 @@
u3nc(c3__gold, u3nc(c3__gold,
u3k(u3t(q_ref)))); u3k(u3t(q_ref))));
ret = _nest_clip(van, tus, tel, fer, qrq_sut, qrq_ref, zoc); ret = _nest_dope(van, tus, tel, fer, qsq_sut, qsq_ref, zoc);
u3z(fer); u3z(fer);
u3z(tus); u3z(tus);
u3z(zoc); u3z(zoc);
@ -246,6 +283,7 @@
else return _nest_sint(van, sut, tel, ref, seg, reg, gil); else return _nest_sint(van, sut, tel, ref, seg, reg, gil);
} }
} }
case c3__help:
case c3__face: { case c3__face: {
if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) {
return u3m_bail(c3__fail); return u3m_bail(c3__fail);
@ -271,7 +309,7 @@
} }
{ {
u3_noun dey = u3qdi_tap(p_sut, u3_nul); u3_noun dey = u3qdi_tap(p_sut);
u3_noun yed = dey; u3_noun yed = dey;
while ( u3_nul != yed ) { while ( u3_nul != yed ) {
@ -357,7 +395,7 @@
} }
{ {
c3_m fun_m = c3__nest + !!u3r_at(u3qfu_van_vet, van); c3_m fun_m = 144 + c3__nest + ((!!u3r_at(u3qfu_van_vet, van)) << 8);
u3_noun pro = u3z_find_2(fun_m, sut, ref); u3_noun pro = u3z_find_2(fun_m, sut, ref);
if ( u3_none != pro ) { if ( u3_none != pro ) {
@ -409,6 +447,7 @@
u3z(gam); u3z(gam);
return hiv; return hiv;
} }
case c3__help:
case c3__face: { case c3__face: {
if ( c3n == u3r_trel(ref, 0, &p_ref, &q_ref) ) { if ( c3n == u3r_trel(ref, 0, &p_ref, &q_ref) ) {
return u3m_bail(c3__fail); return u3m_bail(c3__fail);
@ -418,7 +457,7 @@
} }
case c3__fork: p_ref = u3t(ref); case c3__fork: p_ref = u3t(ref);
{ {
u3_noun dey = u3qdi_tap(p_ref, u3_nul); u3_noun dey = u3qdi_tap(p_ref);
u3_noun yed = dey; u3_noun yed = dey;
while ( u3_nul != yed ) { while ( u3_nul != yed ) {
@ -465,7 +504,7 @@
} }
} }
u3_noun static u3_noun
_cqfu_nest(u3_noun van, _cqfu_nest(u3_noun van,
u3_noun sut, u3_noun sut,
u3_noun tel, u3_noun tel,

View File

@ -6,7 +6,7 @@
/* logic /* logic
*/ */
u3_noun static u3_noun
_cqfu_peek(u3_noun, u3_noun, u3_noun, u3_atom); _cqfu_peek(u3_noun, u3_noun, u3_noun, u3_atom);
static u3_noun static u3_noun
@ -83,7 +83,7 @@
u3_atom lat = u3qc_mas(axe); u3_atom lat = u3qc_mas(axe);
if ( 3 == now ) { if ( 3 == now ) {
u3_noun pec = u3qfu_perk(van, sut, way, pq_sut); u3_noun pec = u3qfu_peel(van, sut, way, pq_sut);
u3_noun sam = u3h(pec); u3_noun sam = u3h(pec);
u3_noun con = u3t(pec); u3_noun con = u3t(pec);
@ -128,6 +128,7 @@
return pro; return pro;
} }
} }
case c3__help:
case c3__face: { case c3__face: {
if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) {
return u3m_bail(c3__fail); return u3m_bail(c3__fail);
@ -137,7 +138,7 @@
} }
case c3__fork: p_sut = u3t(sut); case c3__fork: p_sut = u3t(sut);
{ {
u3_noun yed = u3qdi_tap(p_sut, u3_nul); u3_noun yed = u3qdi_tap(p_sut);
u3_noun ret = u3kf_fork(_peek_fork(van, yed, way, axe, gil)); u3_noun ret = u3kf_fork(_peek_fork(van, yed, way, axe, gil));
u3z(yed); u3z(yed);
@ -161,7 +162,7 @@
} }
} }
u3_noun static u3_noun
_cqfu_peek(u3_noun van, _cqfu_peek(u3_noun van,
u3_noun sut, u3_noun sut,
u3_noun way, u3_noun way,
@ -199,7 +200,7 @@
u3_noun way, u3_noun way,
u3_noun axe) u3_noun axe)
{ {
c3_m fun_m = c3__peek + !!u3r_at(u3qfu_van_vet, van); c3_m fun_m = 144 + c3__peek + ((!!u3r_at(u3qfu_van_vet, van)) << 8);
u3_noun pro = u3z_find_3(fun_m, sut, way, axe); u3_noun pro = u3z_find_3(fun_m, sut, way, axe);
if ( u3_none != pro ) { if ( u3_none != pro ) {

View File

@ -1,55 +0,0 @@
/* j/6/ut_perk.c
**
*/
#include "all.h"
/* logic
*/
u3_noun
_cqfu_perk(u3_noun van,
u3_noun sut,
u3_noun way,
u3_noun met)
{
if ( c3__gold == met ) {
return u3nc(c3y, c3y);
}
else switch ( way ) {
default: return u3m_bail(c3__fail);
case c3__both: return u3nc(c3n, c3n);
case c3__free: return u3nc(c3y, c3y);
case c3__read: return u3nc(((met == c3__zinc) ? c3y : c3n), c3n);
case c3__rite: return u3nc(((met == c3__iron) ? c3y : c3n), c3n);
}
}
/* boilerplate
*/
u3_noun
u3wfu_perk(u3_noun cor)
{
u3_noun sut, way, met, van;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &way,
u3x_sam_3, &met,
u3x_con, &van,
0)) ||
(u3_none == (sut = u3r_at(u3x_sam, van))) )
{
return u3m_bail(c3__fail);
} else {
return _cqfu_perk(van, sut, way, met);
}
}
u3_noun
u3qfu_perk(u3_noun van,
u3_noun sut,
u3_noun way,
u3_noun met)
{
return _cqfu_perk(van, sut, way, met);
}

View File

@ -148,15 +148,17 @@
u3_noun sut, u3_noun sut,
u3_atom mel, u3_atom mel,
u3_noun ruf, u3_noun ruf,
u3_noun dab) u3_noun wan,
u3_noun dom)
{ {
u3_noun dan = _play_in(van, sut, ruf); u3_noun dan = _play_in(van, sut, ruf);
return _play_core(dan, return _play_core(dan,
u3nt(u3k(mel), u3nq(u3k(mel),
u3k(dan), u3k(dan),
u3k(wan),
u3nc(u3nc(u3_nul, u3_nul), u3nc(u3nc(u3_nul, u3_nul),
u3k(dab)))); u3k(dom))));
} }
static u3_noun static u3_noun
@ -202,7 +204,7 @@
u3_noun zix = u3qfu_shep(van, "gene", 'q', u3k(gen)); u3_noun zix = u3qfu_shep(van, "gene", 'q', u3k(gen));
u3t_push(u3nc(c3__mean, zix)); u3t_push(u3nc(c3__mean, zix));
return u3m_error("play-open"); return u3m_error("play-open-z");
} }
ret = _play_x(van, sut, rex); ret = _play_x(van, sut, rex);
u3z(rex); u3z(rex);
@ -225,13 +227,13 @@
else switch ( u3h(gen) ) { else switch ( u3h(gen) ) {
default: goto open; default: goto open;
case c3__fits: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__wtts: u3x_cell(u3t(gen), &p_gen, &q_gen);
_play_used(); _play_used();
{ {
return _play_bean(); return _play_bean();
} }
case c3__if: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); case c3__wtcl: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen);
_play_used(); _play_used();
{ {
u3_noun fex = u3qfu_gain(van, sut, p_gen); u3_noun fex = u3qfu_gain(van, sut, p_gen);
@ -247,7 +249,7 @@
return ret; return ret;
} }
case c3__cons: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__clhp: u3x_cell(u3t(gen), &p_gen, &q_gen);
_play_used(); _play_used();
{ {
u3_noun dis = _play_x(van, sut, p_gen); u3_noun dis = _play_x(van, sut, p_gen);
@ -259,7 +261,7 @@
return ret; return ret;
} }
case c3__wish: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__dtkt: u3x_cell(u3t(gen), &p_gen, &q_gen);
_play_used(); _play_used();
{ {
u3_noun nog = u3nc(c3__bunt, u3k(p_gen)); u3_noun nog = u3nc(c3__bunt, u3k(p_gen));
@ -269,19 +271,19 @@
return ret; return ret;
} }
case c3__deep: p_gen = u3t(gen); case c3__dtwt: p_gen = u3t(gen);
_play_used(); _play_used();
{ {
return _play_bean(); return _play_bean();
} }
case c3__same: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__dtts: u3x_cell(u3t(gen), &p_gen, &q_gen);
_play_used(); _play_used();
{ {
return _play_bean(); return _play_bean();
} }
case c3__bump: p_gen = u3t(gen); case c3__dtls: p_gen = u3t(gen);
_play_used(); _play_used();
{ {
return u3nt(c3__atom, u3_blip, u3_nul); return u3nt(c3__atom, u3_blip, u3_nul);
@ -293,7 +295,7 @@
return _play_rock(p_gen, q_gen); return _play_rock(p_gen, q_gen);
} }
case c3__nock: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__dttr: u3x_cell(u3t(gen), &p_gen, &q_gen);
_play_used(); _play_used();
{ {
return c3__noun; return c3__noun;
@ -311,7 +313,7 @@
return u3k(p_gen); return u3k(p_gen);
} }
case c3__iron: p_gen = u3t(gen); case c3__ktbr: p_gen = u3t(gen);
_play_used(); _play_used();
{ {
u3_noun boc = _play_x(van, sut, p_gen); u3_noun boc = _play_x(van, sut, p_gen);
@ -321,7 +323,7 @@
return pro; return pro;
} }
case c3__zinc: p_gen = u3t(gen); case c3__ktpm: p_gen = u3t(gen);
_play_used(); _play_used();
{ {
u3_noun boc = _play_x(van, sut, p_gen); u3_noun boc = _play_x(van, sut, p_gen);
@ -331,7 +333,7 @@
return pro; return pro;
} }
case c3__lead: p_gen = u3t(gen); case c3__ktwt: p_gen = u3t(gen);
_play_used(); _play_used();
{ {
u3_noun boc = _play_x(van, sut, p_gen); u3_noun boc = _play_x(van, sut, p_gen);
@ -341,7 +343,17 @@
return pro; return pro;
} }
case c3__name: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__help: u3x_cell(u3t(gen), &p_gen, &q_gen);
_play_used();
{
u3_noun boc = _play_x(van, sut, q_gen);
u3_noun ret = u3qf_help(p_gen, boc);
u3z(boc);
return ret;
}
case c3__ktts: u3x_cell(u3t(gen), &p_gen, &q_gen);
_play_used(); _play_used();
{ {
u3_noun boc = _play_x(van, sut, q_gen); u3_noun boc = _play_x(van, sut, q_gen);
@ -351,19 +363,25 @@
return ret; return ret;
} }
case c3__burn: p_gen = u3t(gen); case c3__tune: p_gen = u3t(gen);
_play_used();
{
return u3qf_face(p_gen, sut);
}
case c3__ktsg: p_gen = u3t(gen);
_play_used(); _play_used();
{ {
return _play_x(van, sut, p_gen); return _play_x(van, sut, p_gen);
} }
case c3__like: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__ktls: u3x_cell(u3t(gen), &p_gen, &q_gen);
_play_used(); _play_used();
{ {
return _play_x(van, sut, p_gen); return _play_x(van, sut, p_gen);
} }
case c3__per: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__tsgr: u3x_cell(u3t(gen), &p_gen, &q_gen);
_play_used(); _play_used();
{ {
u3_noun boc = _play_x(van, sut, p_gen); u3_noun boc = _play_x(van, sut, p_gen);
@ -373,7 +391,7 @@
return ret; return ret;
} }
case c3__aka: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); case c3__tstr: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen);
_play_used(); _play_used();
{ {
u3_noun boc = u3qfu_buss(van, sut, p_gen, q_gen); u3_noun boc = u3qfu_buss(van, sut, p_gen, q_gen);
@ -383,23 +401,33 @@
return ret; return ret;
} }
case c3__make: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__tscm: u3x_cell(u3t(gen), &p_gen, &q_gen);
_play_used();
{
u3_noun boc = u3qfu_busk(van, sut, p_gen);
u3_noun ret = _play_x(van, boc, q_gen);
u3z(boc);
return ret;
}
case c3__cnts: u3x_cell(u3t(gen), &p_gen, &q_gen);
_play_used(); _play_used();
{ {
return _play_cnts(van, sut, p_gen, q_gen); return _play_cnts(van, sut, p_gen, q_gen);
} }
case c3__core: p_gen = u3t(gen); case c3__brcn: u3x_cell(u3t(gen), &p_gen, &q_gen);
_play_used(); _play_used();
{ {
u3_noun ruf = u3nc(u3_nul, 1); u3_noun ruf = u3nc(u3_nul, 1);
u3_noun ret = _play_grow(van, sut, c3__gold, ruf, p_gen); u3_noun ret = _play_grow(van, sut, c3__gold, ruf, p_gen, q_gen);
u3z(ruf); u3z(ruf);
return ret; return ret;
} }
case c3__peep: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__sgzp: u3x_cell(u3t(gen), &p_gen, &q_gen);
_play_used(); _play_used();
{ {
u3_noun typ = u3qfu_play(van, sut, p_gen); u3_noun typ = u3qfu_play(van, sut, p_gen);
@ -416,19 +444,19 @@
return ret; return ret;
} }
case c3__hint: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__sggr: u3x_cell(u3t(gen), &p_gen, &q_gen);
_play_used(); _play_used();
{ {
return _play_x(van, sut, q_gen); return _play_x(van, sut, q_gen);
} }
case c3__code: p_gen = u3t(gen); case c3__zpts: p_gen = u3t(gen);
_play_used(); _play_used();
{ {
return c3__noun; return c3__noun;
} }
case c3__cool: p_gen = u3t(gen); case c3__ktcn: p_gen = u3t(gen);
{ {
u3_noun von = u3i_molt(u3k(van), u3qfu_van_fab, c3n, 0); u3_noun von = u3i_molt(u3k(van), u3qfu_van_fab, c3n, 0);
u3_noun ret = _play_x(von, sut, p_gen); u3_noun ret = _play_x(von, sut, p_gen);
@ -437,7 +465,7 @@
return ret; return ret;
} }
case c3__twig: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__zpcm: u3x_cell(u3t(gen), &p_gen, &q_gen);
_play_used(); _play_used();
{ {
return _play_x(van, sut, p_gen); return _play_x(van, sut, p_gen);
@ -455,7 +483,7 @@
return ret; return ret;
} }
case c3__spit: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__zpsm: u3x_cell(u3t(gen), &p_gen, &q_gen);
_play_used(); _play_used();
{ {
u3_noun zur = _play_x(van, sut, p_gen); u3_noun zur = _play_x(van, sut, p_gen);
@ -470,6 +498,7 @@
case c3__lost: case c3__lost:
case c3__fail: case c3__fail:
case c3__zpzp:
_play_used(); _play_used();
{ {
return c3__void; return c3__void;
@ -477,7 +506,7 @@
} }
} }
u3_noun static u3_noun
_cqfu_play(u3_noun van, _cqfu_play(u3_noun van,
u3_noun sut, u3_noun sut,
u3_noun gen) u3_noun gen)

View File

@ -34,6 +34,7 @@
return u3nt(c3__cell, c3__noun, u3k(p_sut)); return u3nt(c3__cell, c3__noun, u3k(p_sut));
} }
} }
case c3__help:
case c3__face: { case c3__face: {
if ( c3n == u3r_cell(u3t(sut), &p_sut, &q_sut)) { if ( c3n == u3r_cell(u3t(sut), &p_sut, &q_sut)) {
return u3m_bail(c3__fail); return u3m_bail(c3__fail);

View File

@ -26,7 +26,7 @@
u3_noun gar) u3_noun gar)
{ {
u3_noun gun = u3qdi_gas(u3_nul, gar); u3_noun gun = u3qdi_gas(u3_nul, gar);
u3_noun yed = u3qdi_tap(gun, u3_nul); u3_noun yed = u3qdi_tap(gun);
u3z(gun); u3z(gun);
return yed; return yed;
@ -58,20 +58,17 @@
} }
} }
u3_noun static u3_noun
_cqfu_rest(u3_noun van, _cqfu_rest(u3_noun van,
u3_noun sut, u3_noun sut,
u3_noun leg) u3_noun leg)
{ {
u3_noun fan = u3r_at(u3qfu_van_fan, van); u3_noun fan = u3r_at(u3qfu_van_fan, van);
#if 1
if ( c3y == _rest_hit_fan(fan, leg) ) { if ( c3y == _rest_hit_fan(fan, leg) ) {
return u3m_error("rest-loop"); return u3m_error("rest-loop");
} }
else else {
#endif
{
u3_noun naf = u3qdi_gas(fan, leg); u3_noun naf = u3qdi_gas(fan, leg);
u3_noun nav = u3i_molt(u3k(van), u3qfu_van_fan, u3k(naf), 0); u3_noun nav = u3i_molt(u3k(van), u3qfu_van_fan, u3k(naf), 0);
u3_noun mez = _rest_in(nav, leg); u3_noun mez = _rest_in(nav, leg);
@ -103,7 +100,7 @@
u3_noun sut, u3_noun sut,
u3_noun leg) u3_noun leg)
{ {
c3_m fun_m = c3__rest + !!u3r_at(u3qfu_van_vet, van); c3_m fun_m = 144 + c3__rest + ((!!u3r_at(u3qfu_van_vet, van)) << 8);
u3_noun pro = u3z_find_2(fun_m, sut, leg); u3_noun pro = u3z_find_2(fun_m, sut, leg);
if ( u3_none != pro ) { if ( u3_none != pro ) {

View File

@ -45,7 +45,7 @@
/* functions /* functions
*/ */
static u3_noun u3_noun
_cqfu_toss(u3_noun van, _cqfu_toss(u3_noun van,
u3_noun sut, u3_noun sut,
u3_noun peh, u3_noun peh,

View File

@ -32,9 +32,9 @@
case c3__core: u3x_cell(u3t(sut), &p_sut, &q_sut); case c3__core: u3x_cell(u3t(sut), &p_sut, &q_sut);
{ {
u3_noun pq_sut, qq_sut, rq_sut; u3_noun pq_sut, qq_sut, rq_sut, sq_sut;
if ( c3n == u3r_trel(q_sut, &pq_sut, &qq_sut, &rq_sut) ) { if ( c3n == u3r_qual(q_sut, &pq_sut, &qq_sut, &rq_sut, &sq_sut) ) {
return u3m_bail(c3__fail); return u3m_bail(c3__fail);
} }
else if ( c3__gold != pq_sut ) { else if ( c3__gold != pq_sut ) {
@ -43,14 +43,15 @@
else { else {
return u3nt(c3__core, return u3nt(c3__core,
u3k(p_sut), u3k(p_sut),
u3nt(u3k(yoz), u3nq(u3k(yoz),
u3k(qq_sut), u3k(qq_sut),
u3k(rq_sut))); u3k(rq_sut),
u3k(sq_sut)));
} }
} }
case c3__fork: p_sut = u3t(sut); case c3__fork: p_sut = u3t(sut);
{ {
u3_noun yed = u3qdi_tap(p_sut, u3_nul); u3_noun yed = u3qdi_tap(p_sut);
u3_noun ret = u3kf_fork(_wrap_fork(van, yed, yoz)); u3_noun ret = u3kf_fork(_wrap_fork(van, yed, yoz));
u3z(yed); u3z(yed);

View File

@ -6,9 +6,9 @@
#include <node.h> #include <node.h>
#include <buffer.h> #include <buffer.h>
u3_noun node_to_noun(cmark_node * nod); static u3_noun node_to_noun(cmark_node * nod);
u3_noun list_elems_to_noun(cmark_node * nod) static u3_noun list_elems_to_noun(cmark_node * nod)
{ {
u3_noun elems = u3_nul; u3_noun elems = u3_nul;
@ -20,17 +20,17 @@ u3_noun list_elems_to_noun(cmark_node * nod)
return elems; return elems;
} }
u3_noun document_to_noun(cmark_node * nod) static u3_noun document_to_noun(cmark_node * nod)
{ {
return list_elems_to_noun(nod); return list_elems_to_noun(nod);
} }
u3_noun block_quote_to_noun(cmark_node * nod) static u3_noun block_quote_to_noun(cmark_node * nod)
{ {
return u3nc(u3nc(c3__bloq,u3_nul),list_elems_to_noun(nod)); return u3nc(u3nc(c3__bloq,u3_nul),list_elems_to_noun(nod));
} }
u3_noun list_to_noun(cmark_node * nod) static u3_noun list_to_noun(cmark_node * nod)
{ {
return return
u3nc( u3nc(
@ -46,12 +46,12 @@ u3_noun list_to_noun(cmark_node * nod)
list_elems_to_noun(nod)); list_elems_to_noun(nod));
} }
u3_noun list_item_to_noun(cmark_node * nod) static u3_noun list_item_to_noun(cmark_node * nod)
{ {
return u3nc(u3nc(c3__item,u3_nul),list_elems_to_noun(nod)); return u3nc(u3nc(c3__item,u3_nul),list_elems_to_noun(nod));
} }
u3_noun code_block_to_noun(cmark_node * nod) static u3_noun code_block_to_noun(cmark_node * nod)
{ {
u3_atom str = u3i_string((c3_c *) nod->string_content.ptr); /* XX u3i_bytes */ u3_atom str = u3i_string((c3_c *) nod->string_content.ptr); /* XX u3i_bytes */
u3_noun res = u3_noun res =
@ -70,7 +70,7 @@ u3_noun code_block_to_noun(cmark_node * nod)
return res; return res;
} }
u3_noun html_to_noun(cmark_node * nod) static u3_noun html_to_noun(cmark_node * nod)
{ {
u3_atom str = u3i_string((c3_c *) nod->string_content.ptr); /* XX u3i_bytes */ u3_atom str = u3i_string((c3_c *) nod->string_content.ptr); /* XX u3i_bytes */
u3_noun res = u3nc(c3__html, u3qe_lore(str)); u3_noun res = u3nc(c3__html, u3qe_lore(str));
@ -78,63 +78,63 @@ u3_noun html_to_noun(cmark_node * nod)
return res; return res;
} }
u3_noun paragraph_to_noun(cmark_node * nod) static u3_noun paragraph_to_noun(cmark_node * nod)
{ {
return u3nc(c3__para, list_elems_to_noun(nod)); return u3nc(c3__para, list_elems_to_noun(nod));
} }
u3_noun header_to_noun(cmark_node * nod) static u3_noun header_to_noun(cmark_node * nod)
{ {
/* see also nod->as.header.setext */ /* see also nod->as.header.setext */
return u3nt(c3__head, nod->as.header.level, list_elems_to_noun(nod)); return u3nt(c3__head, nod->as.header.level, list_elems_to_noun(nod));
} }
u3_noun hrule_to_noun(cmark_node * nod) static u3_noun hrule_to_noun(cmark_node * nod)
{ {
return u3nc(c3__hrul, u3_nul); return u3nc(c3__hrul, u3_nul);
} }
u3_noun reference_def_to_noun(cmark_node * nod) static u3_noun reference_def_to_noun(cmark_node * nod)
{ {
return u3nc(c3__defn, u3_nul); return u3nc(c3__defn, u3_nul);
} }
u3_noun text_to_noun(cmark_node * nod) static u3_noun text_to_noun(cmark_node * nod)
{ {
return u3nc(u3_blip, u3i_tape((c3_c *) cmark_chunk_to_cstr(&nod->as.literal))); return u3nc(u3_blip, u3i_tape((c3_c *) cmark_chunk_to_cstr(&nod->as.literal)));
} }
u3_noun softbreak_to_noun(cmark_node * nod) // XXX static u3_noun softbreak_to_noun(cmark_node * nod) // XXX
{ {
return u3nt(0, 10, 0); return u3nt(0, 10, 0);
} }
u3_noun linebreak_to_noun(cmark_node * nod) static u3_noun linebreak_to_noun(cmark_node * nod)
{ {
return u3nc(c3__line, u3_nul); return u3nc(c3__line, u3_nul);
} }
u3_noun inline_code_to_noun(cmark_node * nod) static u3_noun inline_code_to_noun(cmark_node * nod)
{ {
return u3nc(c3__code, u3i_tape((c3_c *) cmark_chunk_to_cstr(&nod->as.literal))); return u3nc(c3__code, u3i_tape((c3_c *) cmark_chunk_to_cstr(&nod->as.literal)));
} }
u3_noun inline_html_to_noun(cmark_node * nod) // XXX static u3_noun inline_html_to_noun(cmark_node * nod) // XXX
{ {
return u3nc(c3__htmt, u3i_string((c3_c *) cmark_chunk_to_cstr(&nod->as.literal))); return u3nc(c3__htmt, u3i_string((c3_c *) cmark_chunk_to_cstr(&nod->as.literal)));
} }
u3_noun emph_to_noun(cmark_node * nod) static u3_noun emph_to_noun(cmark_node * nod)
{ {
return u3nc(u3nc(c3__emph, c3n), list_elems_to_noun(nod)); return u3nc(u3nc(c3__emph, c3n), list_elems_to_noun(nod));
} }
u3_noun strong_to_noun(cmark_node * nod) static u3_noun strong_to_noun(cmark_node * nod)
{ {
return u3nc(u3nc(c3__emph, c3y), list_elems_to_noun(nod)); return u3nc(u3nc(c3__emph, c3y), list_elems_to_noun(nod));
} }
u3_noun link_to_noun(cmark_node * nod) static u3_noun link_to_noun(cmark_node * nod)
{ {
return u3nc(u3nt(c3__link, return u3nc(u3nt(c3__link,
nod->as.link.url nod->as.link.url
@ -146,7 +146,7 @@ u3_noun link_to_noun(cmark_node * nod)
list_elems_to_noun(nod)); list_elems_to_noun(nod));
} }
u3_noun image_to_noun(cmark_node * nod) static u3_noun image_to_noun(cmark_node * nod)
{ {
return u3nc(u3nt(c3__blot, return u3nc(u3nt(c3__blot,
u3i_tape((c3_c *) nod->as.link.url), u3i_tape((c3_c *) nod->as.link.url),
@ -156,7 +156,7 @@ u3_noun image_to_noun(cmark_node * nod)
list_elems_to_noun(nod)); list_elems_to_noun(nod));
} }
u3_noun node_to_noun(cmark_node * nod) static u3_noun node_to_noun(cmark_node * nod)
{ {
if (!nod) { if (!nod) {
fprintf(stderr, "markdown null node"); fprintf(stderr, "markdown null node");

File diff suppressed because it is too large Load Diff

View File

@ -1,56 +0,0 @@
/* j/1/add.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3ga_add(u3_atom a,
u3_atom b)
{
if ( _(u3a_is_cat(a)) && _(u3a_is_cat(b)) ) {
c3_w c = a + b;
return u3i_words(1, &c);
}
else if ( 0 == a ) {
return u3k(b);
}
else {
mpz_t a_mp, b_mp;
u3r_mp(a_mp, a);
u3r_mp(b_mp, b);
mpz_add(a_mp, a_mp, b_mp);
mpz_clear(b_mp);
return u3i_mp(a_mp);
}
}
u3_noun
u3ya_add(u3_noun cor)
{
u3_noun a, b;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0)) ||
(c3n == u3ud(a)) ||
(c3n == u3ud(b) && a != 0) )
{
return u3m_bail(c3__exit);
} else {
return u3ga_add(a, b);
}
}
u3_noun
u3la_add(u3_noun a,
u3_noun b)
{
u3_noun c = u3ga_add(a, b);
u3z(a); u3z(b);
return c;
}

View File

@ -1,47 +0,0 @@
/* j/1/dec.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3ga_inc(u3_atom a)
{
return u3i_vint(u3k(a));
}
u3_noun
u3ga_dec(u3_atom a)
{
if ( 0 == a ) {
return u3m_error("decrement-underflow");
}
else {
if ( _(u3a_is_cat(a)) ) {
return a - 1;
}
else {
mpz_t a_mp;
u3r_mp(a_mp, a);
mpz_sub_ui(a_mp, a_mp, 1);
return u3i_mp(a_mp);
}
}
}
u3_noun
u3ya_dec(u3_noun cor)
{
u3_noun a;
if ( (u3_none == (a = u3r_at(u3x_sam, cor))) ||
(c3n == u3ud(a)) )
{
return u3m_bail(c3__exit);
} else {
return u3ga_dec(a);
}
}

View File

@ -1,46 +0,0 @@
/* j/1/div.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3ga_div(u3_atom a,
u3_atom b)
{
if ( 0 == b ) {
return u3m_bail(c3__exit);
}
else {
if ( _(u3a_is_cat(a)) && _(u3a_is_cat(b)) ) {
return a / b;
}
else {
mpz_t a_mp, b_mp;
u3r_mp(a_mp, a);
u3r_mp(b_mp, b);
mpz_tdiv_q(a_mp, a_mp, b_mp);
mpz_clear(b_mp);
return u3i_mp(a_mp);
}
}
}
u3_noun
u3ya_div(u3_noun cor)
{
u3_noun a, b;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0)) ||
(c3n == u3ud(a)) ||
(c3n == u3ud(b)) )
{
return u3m_bail(c3__exit);
} else {
return u3ga_div(a, b);
}
}

View File

@ -1,44 +0,0 @@
/* j/1/gte.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3ga_gte(u3_atom a,
u3_atom b)
{
if ( _(u3a_is_cat(a)) && _(u3a_is_cat(b)) ) {
return __(a >= b);
}
else {
mpz_t a_mp, b_mp;
u3_noun cmp;
u3r_mp(a_mp, a);
u3r_mp(b_mp, b);
cmp = (mpz_cmp(a_mp, b_mp) >= 0) ? c3y : c3n;
mpz_clear(a_mp);
mpz_clear(b_mp);
return cmp;
}
}
u3_noun
u3ya_gte(u3_noun cor)
{
u3_noun a, b;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0)) ||
(c3n == u3ud(a)) ||
(c3n == u3ud(b)) )
{
return u3m_bail(c3__exit);
} else {
return u3ga_gte(a, b);
}
}

View File

@ -1,54 +0,0 @@
/* j/1/gth.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3ga_gth(u3_atom a,
u3_atom b)
{
if ( _(u3a_is_cat(a)) && _(u3a_is_cat(b)) ) {
return __(a > b);
}
else {
mpz_t a_mp, b_mp;
u3_noun cmp;
u3r_mp(a_mp, a);
u3r_mp(b_mp, b);
cmp = (mpz_cmp(a_mp, b_mp) > 0) ? c3y : c3n;
mpz_clear(a_mp);
mpz_clear(b_mp);
return cmp;
}
}
u3_noun
u3ya_gth(u3_noun cor)
{
u3_noun a, b;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0)) ||
(c3n == u3ud(a)) ||
(c3n == u3ud(b)) )
{
return u3m_bail(c3__exit);
} else {
return u3ga_gth(a, b);
}
}
u3_noun
u3la_gth(u3_noun a,
u3_noun b)
{
u3_noun c = u3ga_gth(a, b);
u3z(a); u3z(b);
return c;
}

View File

@ -1,53 +0,0 @@
/* j/1/lte.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3ga_lte(u3_atom a,
u3_atom b)
{
if ( _(u3a_is_cat(a)) && _(u3a_is_cat(b)) ) {
return __(a <= b);
}
else {
mpz_t a_mp, b_mp;
u3_noun cmp;
u3r_mp(a_mp, a);
u3r_mp(b_mp, b);
cmp = (mpz_cmp(a_mp, b_mp) <= 0) ? c3y : c3n;
mpz_clear(a_mp);
mpz_clear(b_mp);
return cmp;
}
}
u3_noun
u3ya_lte(u3_noun cor)
{
u3_noun a, b;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0)) ||
(c3n == u3ud(a)) ||
(c3n == u3ud(b)) )
{
return u3m_bail(c3__exit);
} else {
return u3ga_lte(a, b);
}
}
u3_noun
u3la_lte(u3_noun a,
u3_noun b)
{
u3_noun c = u3ga_lte(a, b);
u3z(a); u3z(b);
return c;
}

View File

@ -1,50 +0,0 @@
/* j/1/lth.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3ga_lth(u3_atom a,
u3_atom b)
{
if ( _(u3a_is_cat(a)) && _(u3a_is_cat(b)) ) {
return __(a < b);
}
else if ( 0 == a ) {
return c3y;
}
else if ( 0 == b ) {
return c3n;
}
else {
mpz_t a_mp, b_mp;
u3_noun cmp;
u3r_mp(a_mp, a);
u3r_mp(b_mp, b);
cmp = (mpz_cmp(a_mp, b_mp) < 0) ? c3y : c3n;
mpz_clear(a_mp);
mpz_clear(b_mp);
return cmp;
}
}
u3_noun
u3ya_lth(u3_noun cor)
{
u3_noun a, b;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0)) ||
(c3n == u3ud(b) && a != 0) ||
(c3n == u3ud(a) && b != 0) )
{
return u3m_bail(c3__exit);
} else {
return u3ga_lth(a, b);
}
}

View File

@ -1,48 +0,0 @@
/* j/1/mod.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3ga_mod(u3_atom a,
u3_atom b)
{
#if 0
if ( b == 3 && a == 2684227708 ) {
printf("dword at 0x27ff84ff8 is %" PRIu64 "\r\n", *(c3_d *)0x27ff84ff8);
*(c3_d *)0x27ff84ff8 = 25;
printf("see, we modified it\r\n");
}
#endif
if ( 0 == b ) {
return u3m_bail(c3__exit);
} else {
mpz_t a_mp, b_mp;
u3r_mp(a_mp, a);
u3r_mp(b_mp, b);
mpz_tdiv_r(a_mp, a_mp, b_mp);
mpz_clear(b_mp);
return u3i_mp(a_mp);
}
}
u3_noun
u3ya_mod(u3_noun cor)
{
u3_noun a, b;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0)) ||
(c3n == u3ud(a)) ||
(c3n == u3ud(b)) )
{
return u3m_bail(c3__exit);
} else {
return u3ga_mod(a, b);
}
}

View File

@ -1,56 +0,0 @@
/* j/1/mul.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3ga_mul(u3_atom a,
u3_atom b)
{
if ( _(u3a_is_cat(a)) && _(u3a_is_cat(b)) ) {
c3_d c = ((c3_d) a) * ((c3_d) b);
return u3i_chubs(1, &c);
}
else if ( 0 == a ) {
return 0;
}
else {
mpz_t a_mp, b_mp;
u3r_mp(a_mp, a);
u3r_mp(b_mp, b);
mpz_mul(a_mp, a_mp, b_mp);
mpz_clear(b_mp);
return u3i_mp(a_mp);
}
}
u3_noun
u3ya_mul(u3_noun cor)
{
u3_noun a, b;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0)) ||
(c3n == u3ud(a)) ||
(c3n == u3ud(b) && a != 0) )
{
return u3m_bail(c3__exit);
} else {
return u3ga_mul(a, b);
}
}
u3_noun
u3la_mul(u3_noun a,
u3_noun b)
{
u3_noun c = u3ga_mul(a, b);
u3z(a); u3z(b);
return c;
}

View File

@ -1,64 +0,0 @@
/* j/1/sub.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3ga_sub(u3_atom a,
u3_atom b)
{
if ( _(u3a_is_cat(a)) && _(u3a_is_cat(b)) ) {
if ( a < b ) {
return u3m_error("subtract-underflow");
}
else return (a - b);
}
else if ( 0 == b ) {
return u3k(a);
}
else {
mpz_t a_mp, b_mp;
u3r_mp(a_mp, a);
u3r_mp(b_mp, b);
if ( mpz_cmp(a_mp, b_mp) < 0 ) {
mpz_clear(a_mp);
mpz_clear(b_mp);
return u3m_error("subtract-underflow");
}
mpz_sub(a_mp, a_mp, b_mp);
mpz_clear(b_mp);
return u3i_mp(a_mp);
}
}
u3_noun
u3ya_sub(u3_noun cor)
{
u3_noun a, b;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0)) ||
(c3n == u3ud(b)) ||
(c3n == u3ud(a) && b != 0) )
{
return u3m_bail(c3__exit);
} else {
return u3ga_sub(a, b);
}
}
u3_noun
u3la_sub(u3_noun a,
u3_noun b)
{
u3_noun c = u3ga_sub(a, b);
u3z(a); u3z(b);
return c;
}

View File

@ -1,30 +0,0 @@
/* j/2/bind.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gb_bind(u3_noun a,
u3_noun b)
{
if ( 0 == a ) {
return 0;
} else {
return u3nc(0, u3n_slam_on(u3k(b), u3k(u3t(a))));
}
}
u3_noun
u3yb_bind(u3_noun cor)
{
u3_noun a, b;
if ( c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0) ) {
return u3m_bail(c3__exit);
} else {
return u3gb_bind(a, b);
}
}

View File

@ -1,36 +0,0 @@
/* j/2/clap.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gb_clap(u3_noun a,
u3_noun b,
u3_noun c)
{
if ( 0 == a ) {
return u3k(b);
}
else if ( 0 == b ) {
return u3k(a);
}
else {
return u3nc(0, u3n_slam_on(u3k(c), u3nc(u3k(u3t(a)), u3k(u3t(b)))));
}
}
u3_noun
u3yb_clap(u3_noun cor)
{
u3_noun a, b, c;
if ( c3n == u3r_mean(cor, u3x_sam_2, &a,
u3x_sam_6, &b,
u3x_sam_7, &c, 0) ) {
return u3m_bail(c3__exit);
} else {
return u3gb_clap(a, b, c);
}
}

View File

@ -1,30 +0,0 @@
/* j/2/drop.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gb_drop(u3_noun a)
{
if ( 0 == a ) {
return u3_nul;
}
else {
return u3nc(0, u3k(u3t(a)));
}
}
u3_noun
u3yb_drop(u3_noun cor)
{
u3_noun a;
if ( u3_none == (a = u3r_at(u3x_sam, cor)) ) {
return u3_none;
} else {
return u3gb_drop(a);
}
}

View File

@ -1,48 +0,0 @@
/* j/2/flop.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gb_flop(u3_noun a)
{
u3_noun b = 0;
while ( 1 ) {
if ( u3_nul == a ) {
return b;
}
else if ( c3n == u3du(a) ) {
u3z(b);
return u3m_bail(c3__exit);
}
else {
b = u3nc(u3k(u3h(a)), b);
a = u3t(a);
}
}
}
u3_noun
u3yb_flop(u3_noun cor)
{
u3_noun a;
if ( u3_none == (a = u3r_at(u3x_sam, cor)) ) {
return u3m_bail(c3__exit);
} else {
return u3gb_flop(a);
}
}
u3_noun
u3lb_flop(u3_noun a)
{
u3_noun b = u3gb_flop(a);
u3z(a);
return b;
}

View File

@ -1,47 +0,0 @@
/* j/2/lent.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gb_lent(u3_noun a)
{
u3_noun len = 0;
while ( 1 ) {
if ( 0 == a ) {
return len;
}
else if ( c3n == u3du(a) ) {
u3z(len);
return u3m_bail(c3__exit);
}
else {
len = u3i_vint(len);
a = u3t(a);
}
}
}
u3_noun
u3yb_lent(u3_noun cor)
{
u3_noun a;
if ( u3_none == (a = u3r_at(u3x_sam, cor)) ) {
return u3m_bail(c3__exit);
} else {
return u3gb_lent(a);
}
}
u3_noun
u3lb_lent(u3_noun a)
{
u3_noun b = u3gb_lent(a);
u3z(a);
return b;
}

View File

@ -1,39 +0,0 @@
/* j/2/levy.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gb_levy(u3_noun a,
u3_noun b)
{
if ( 0 == a ) {
return c3y;
} else {
u3_noun loz;
if ( c3n == u3du(a) ) {
return u3m_bail(c3__exit);
}
else switch ( (loz = u3n_slam_on(u3k(b), u3k(u3h(a)))) ) {
case c3y: return u3gb_levy(u3t(a), b);
case c3n: return c3n;
default: u3z(loz);
return u3m_bail(c3__exit);
}
}
}
u3_noun
u3yb_levy(u3_noun cor)
{
u3_noun a, b;
if ( c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0) ) {
return u3m_bail(c3__exit);
} else {
return u3gb_levy(a, b);
}
}

View File

@ -1,39 +0,0 @@
/* j/2/lien.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gb_lien(u3_noun a,
u3_noun b)
{
if ( 0 == a ) {
return c3n;
} else {
u3_noun loz;
if ( c3n == u3du(a) ) {
return u3m_bail(c3__exit);
}
else switch ( (loz = u3n_slam_on(u3k(b), u3k(u3h(a)))) ) {
case c3y: return c3y;
case c3n: return u3gb_lien(u3t(a), b);
default: u3z(loz);
return u3m_bail(c3__exit);
}
}
}
u3_noun
u3yb_lien(u3_noun cor)
{
u3_noun a, b;
if ( c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0) ) {
return u3m_bail(c3__exit);
} else {
return u3gb_lien(a, b);
}
}

View File

@ -1,46 +0,0 @@
/* j/2/murn.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gb_murn(u3_noun a, u3_noun b)
{
if ( 0 == a ) {
return a;
}
else if ( c3n == u3du(a) ) {
return u3m_bail(c3__exit);
}
else {
u3_noun one = u3n_slam_on(u3k(b), u3k(u3h(a)));
u3_noun two = u3gb_murn(u3t(a), b);
u3_noun nex;
switch ( u3ud(one) ) {
case c3y: u3z(one);
return two;
case c3n: nex = u3nc(u3k(u3t(one)), two);
u3z(one);
return nex;
default: u3z(one);
u3z(two);
return u3_none;
}
}
}
u3_noun
u3yb_murn(u3_noun cor)
{
u3_noun a, b;
if ( c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0) ) {
return u3m_bail(c3__exit);
} else {
return u3gb_murn(a, b);
}
}

View File

@ -1,30 +0,0 @@
/* j/2/need.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gb_need(u3_noun a)
{
if ( 0 == a ) {
return u3m_bail(c3__exit);
}
else {
return u3k(u3t(a));
}
}
u3_noun
u3yb_need(u3_noun cor)
{
u3_noun a;
if ( u3_none == (a = u3r_at(u3x_sam, cor)) ) {
return u3m_bail(c3__exit);
} else {
return u3gb_need(a);
}
}

View File

@ -1,41 +0,0 @@
/* j/2/reap.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gb_reap(u3_atom a,
u3_noun b)
{
if ( !_(u3a_is_cat(a)) ) {
return u3m_bail(c3__fail);
}
else {
u3_noun acc = u3_nul;
c3_w i_w = a;
while ( i_w ) {
acc = u3nc(u3k(b), acc);
i_w--;
}
return acc;
}
}
u3_noun
u3yb_reap(u3_noun cor)
{
u3_noun a, b;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0)) ||
(c3n == u3ud(a)) )
{
return u3m_bail(c3__exit);
} else {
return u3gb_reap(a, b);
}
}

View File

@ -1,36 +0,0 @@
/* j/2/reel.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gb_reel(u3_noun a,
u3_noun b)
{
if ( 0 == a ) {
return u3k(u3r_at(u3x_sam_3, b));
}
else if ( c3n == u3du(a) ) {
return u3m_bail(c3__exit);
}
else {
u3_noun gim = u3k(u3h(a));
u3_noun hur = u3gb_reel(u3t(a), b);
return u3n_slam_on(u3k(b), u3nc(gim, hur));
}
}
u3_noun
u3yb_reel(u3_noun cor)
{
u3_noun a, b;
if ( c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0) ) {
return u3m_bail(c3__exit);
} else {
return u3gb_reel(a, b);
}
}

View File

@ -1,46 +0,0 @@
/* j/2/roll.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gb_roll(u3_noun a,
u3_noun b)
{
if ( 0 == a ) {
return u3k(u3r_at(u3x_sam_3, b));
}
else if ( c3n == u3du(a) ) {
return u3m_bail(c3__exit);
}
else {
u3_noun gim = u3k(u3h(a));
u3_noun zor = u3k(u3r_at(u3x_sam_3, b));
u3_noun daz = u3n_slam_on(u3k(b), u3nc(gim, zor));
u3_noun vel = u3i_molt(u3k(b), u3x_sam_3, daz, 0);
if ( u3_none == vel ) {
return u3m_bail(c3__exit);
} else {
u3_noun hox = u3gb_roll(u3t(a), vel);
u3z(vel);
return hox;
}
}
}
u3_noun
u3yb_roll(u3_noun cor)
{
u3_noun a, b;
if ( c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0) ) {
return u3m_bail(c3__exit);
} else {
return u3gb_roll(a, b);
}
}

View File

@ -1,52 +0,0 @@
/* j/2/scag.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gb_scag(u3_atom a,
u3_noun b)
{
if ( u3_nul == b ) {
return u3_nul;
}
else if ( !_(u3a_is_cat(a)) ) {
return u3m_bail(c3__fail);
}
else {
u3_noun acc = u3_nul;
c3_w i_w = a;
if ( !i_w )
return u3_nul;
while ( i_w ) {
if ( c3n == u3du(b) ) {
return u3lb_flop(acc);
}
acc = u3nc(u3k(u3h(b)), acc);
b = u3t(b);
i_w--;
}
return u3lb_flop(acc);
}
}
u3_noun
u3yb_scag(u3_noun cor)
{
u3_noun a, b;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0)) ||
(c3n == u3ud(a) && u3_nul != b) )
{
return u3m_bail(c3__exit);
} else {
return u3gb_scag(a, b);
}
}

View File

@ -1,44 +0,0 @@
/* j/2/skid.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gb_skid(u3_noun a,
u3_noun b)
{
if ( 0 == a ) {
return u3nc(u3_nul, u3_nul);
}
else if ( c3n == u3du(a) ) {
return u3m_bail(c3__exit);
} else {
u3_noun acc = u3gb_skid(u3t(a), b);
u3_noun hoz = u3n_slam_on(u3k(b), u3k(u3h(a)));
switch ( hoz ) {
case c3y: acc = u3nc(u3nc(u3k(u3h(a)), u3h(acc)), u3t(acc));
break;
case c3n: acc = u3nc(u3h(acc), u3nc(u3k(u3h(a)), u3t(acc)));
break;
default: u3z(hoz);
return u3m_bail(c3__exit);
}
u3z(hoz);
return acc;
}
}
u3_noun
u3yb_skid(u3_noun cor)
{
u3_noun a, b;
if ( c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0) ) {
return u3m_bail(c3__exit);
} else {
return u3gb_skid(a, b);
}
}

View File

@ -1,43 +0,0 @@
/* j/2/skim.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gb_skim(u3_noun a,
u3_noun b)
{
if ( 0 == a ) {
return a;
}
else if ( c3n == u3du(a) ) {
return u3m_bail(c3__exit);
} else {
u3_noun hoz = u3n_slam_on(u3k(b), u3k(u3h(a)));
u3_noun vyr = u3gb_skim(u3t(a), b);
switch ( hoz ) {
case c3y: return u3nc(u3k(u3h(a)), vyr);
case c3n: return vyr;
default: u3z(hoz);
u3z(vyr);
return u3m_bail(c3__exit);
}
}
}
u3_noun
u3yb_skim(
u3_noun cor)
{
u3_noun a, b;
if ( c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0) ) {
return u3m_bail(c3__exit);
} else {
return u3gb_skim(a, b);
}
}

View File

@ -1,42 +0,0 @@
/* j/2/skip.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gb_skip(u3_noun a,
u3_noun b)
{
if ( 0 == a ) {
return a;
}
else if ( c3n == u3du(a) ) {
return u3_none;
} else {
u3_noun hoz = u3n_slam_on(u3k(b), u3k(u3h(a)));
u3_noun vyr = u3gb_skip(u3t(a), b);
switch ( hoz ) {
case c3y: return vyr;
case c3n: return u3nc(u3k(u3h(a)), vyr);
default: u3z(hoz);
u3z(vyr);
return u3_none;
}
}
}
u3_noun
u3yb_skip(u3_noun cor)
{
u3_noun a, b;
if ( c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0) ) {
return u3_none;
} else {
return u3gb_skip(a, b);
}
}

View File

@ -1,43 +0,0 @@
/* j/2/slag.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gb_slag(u3_atom a, u3_noun b)
{
if ( u3_nul == b ) {
return u3_nul;
}
else if ( !_(u3a_is_cat(a)) ) {
return u3m_bail(c3__fail);
}
else {
c3_w len_w = a;
while ( len_w ) {
if ( c3n == u3du(b) ) {
return u3_nul;
}
b = u3t(b);
len_w--;
}
return u3k(b);
}
}
u3_noun
u3yb_slag(u3_noun cor)
{
u3_noun a, b;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0)) ||
(c3n == u3ud(a) && u3_nul != b) )
{
return u3m_bail(c3__exit);
} else {
return u3gb_slag(a, b);
}
}

View File

@ -1,44 +0,0 @@
/* j/2/snag.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gb_snag(u3_atom a,
u3_noun b)
{
if ( !_(u3a_is_cat(a)) ) {
return u3m_bail(c3__fail);
}
else {
c3_w len_w = a;
while ( len_w ) {
if ( c3n == u3du(b) ) {
return u3m_bail(c3__exit);
}
b = u3t(b);
len_w--;
}
if ( c3n == u3du(b) ) {
return u3m_bail(c3__exit);
}
return u3k(u3h(b));
}
}
u3_noun
u3yb_snag(u3_noun cor)
{
u3_noun a, b;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0)) ||
(c3n == u3ud(a)) )
{
return u3m_bail(c3__exit);
} else {
return u3gb_snag(a, b);
}
}

View File

@ -1,28 +0,0 @@
/* j/2/sort.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gb_sort(u3_noun a,
u3_noun b)
{
// must think about
//
return u3m_bail(c3__fail);
}
u3_noun
u3yb_sort(u3_noun cor)
{
u3_noun a, b;
if ( c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0) ) {
return u3m_bail(c3__exit);
} else {
return u3gb_sort(a, b);
}
}

View File

@ -1,36 +0,0 @@
/* j/2/turn.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gb_turn(u3_noun a, u3_noun b)
{
if ( 0 == a ) {
return a;
}
else if ( c3n == u3du(a) ) {
return u3m_bail(c3__exit);
}
else {
u3_noun one = u3n_slam_on(u3k(b), u3k(u3h(a)));
u3_noun two = u3gb_turn(u3t(a), b);
return u3nc(one, two);
}
}
u3_noun
u3yb_turn(u3_noun cor)
{
u3_noun a, b;
if ( c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0) ) {
return u3m_bail(c3__exit);
} else {
return u3gb_turn(a, b);
}
}

View File

@ -1,43 +0,0 @@
/* j/2/weld.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gb_weld(u3_noun a,
u3_noun b)
{
if ( 0 == a ) {
return u3k(b);
}
else if ( c3n == u3du(a) ) {
return u3m_bail(c3__exit);
}
else {
return u3nc(u3k(u3h(a)), u3gb_weld(u3t(a), b));
}
}
u3_noun
u3yb_weld(u3_noun cor)
{
u3_noun a, b;
if ( c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0) ) {
return u3m_bail(c3__exit);
} else {
return u3gb_weld(a, b);
}
}
u3_noun
u3lb_weld(u3_noun a,
u3_noun b)
{
u3_noun c = u3gb_weld(a, b);
u3z(a); u3z(b);
return c;
}

View File

@ -1,37 +0,0 @@
/* j/3/bex.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gc_bex(u3_atom a)
{
mpz_t a_mp;
if ( !_(u3a_is_cat(a)) ) {
return u3m_bail(c3__fail);
}
else {
mpz_init_set_ui(a_mp, 1);
mpz_mul_2exp(a_mp, a_mp, a);
return u3i_mp(a_mp);
}
}
u3_noun
u3yc_bex(u3_noun cor)
{
u3_noun a;
if ( (u3_none == (a = u3r_at(u3x_sam, cor))) ||
(c3n == u3ud(a)) )
{
return u3m_bail(c3__exit);
} else {
return u3gc_bex(a);
}
}

View File

@ -1,84 +0,0 @@
/* j/3/can.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gc_can(u3_atom a,
u3_noun b)
{
if ( !_(u3a_is_cat(a)) || (a >= 32) ) {
return u3m_bail(c3__fail);
}
else {
c3_g a_g = a;
c3_w tot_w = 0;
c3_w* sal_w;
/* Measure and validate the slab required.
*/
{
u3_noun cab = b;
while ( 1 ) {
u3_noun i_cab, pi_cab, qi_cab;
if ( 0 == cab ) {
break;
}
if ( c3n == u3du(cab) ) return u3m_bail(c3__fail);
i_cab = u3h(cab);
if ( c3n == u3du(i_cab) ) return u3m_bail(c3__fail);
pi_cab = u3h(i_cab);
qi_cab = u3t(i_cab);
if ( c3n == u3a_is_cat(pi_cab) ) return u3m_bail(c3__fail);
if ( c3n == u3ud(qi_cab) ) return u3m_bail(c3__fail);
if ( (tot_w + pi_cab) < tot_w ) return u3m_bail(c3__fail);
tot_w += pi_cab;
cab = u3t(cab);
}
if ( 0 == tot_w ) {
return 0;
}
if ( 0 == (sal_w = u3a_slaq(a_g, tot_w)) ) {
return u3m_bail(c3__fail);
}
}
/* Chop the list atoms in.
*/
{
u3_noun cab = b;
c3_w pos_w = 0;
while ( 0 != cab ) {
u3_noun i_cab = u3h(cab);
u3_atom pi_cab = u3h(i_cab);
u3_atom qi_cab = u3t(i_cab);
u3r_chop(a_g, 0, pi_cab, pos_w, sal_w, qi_cab);
pos_w += pi_cab;
cab = u3t(cab);
}
}
return u3a_malt(sal_w);
}
}
u3_noun
u3yc_can(u3_noun cor)
{
u3_noun a, b;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0)) ||
(c3n == u3ud(a)) )
{
return u3m_bail(c3__fail);
} else {
return u3gc_can(a, b);
}
}

View File

@ -1,36 +0,0 @@
/* j/3/cap.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gc_cap(u3_atom a)
{
c3_w met_w = u3r_met(0, a);
if ( met_w < 2 ) {
return u3m_bail(c3__exit);
}
else if ( (1 == u3r_bit((met_w - 2), a)) ) {
return 3;
} else {
return 2;
}
}
u3_noun
u3yc_cap(u3_noun cor)
{
u3_noun a;
if ( (u3_none == (a = u3r_at(u3x_sam, cor))) ||
(c3n == u3ud(a)) )
{
return u3m_bail(c3__exit);
} else {
return u3gc_cap(a);
}
}

View File

@ -1,58 +0,0 @@
/* j/3/cat.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gc_cat(u3_atom a,
u3_atom b,
u3_atom c)
{
if ( !_(u3a_is_cat(a)) || (a >= 32) ) {
return u3m_bail(c3__fail);
}
else {
c3_g a_g = a;
c3_w lew_w = u3r_met(a_g, b);
c3_w ler_w = u3r_met(a_g, c);
c3_w all_w = (lew_w + ler_w);
if ( 0 == all_w ) {
return 0;
} else {
c3_w* sal_w = u3a_slaq(a_g, all_w);
if ( 0 == sal_w ) {
return u3m_bail(c3__fail);
}
else {
u3r_chop(a_g, 0, lew_w, 0, sal_w, b);
u3r_chop(a_g, 0, ler_w, lew_w, sal_w, c);
}
// return u3a_moot(sal_w);
return u3a_malt(sal_w);
}
}
}
u3_noun
u3yc_cat(u3_noun cor)
{
u3_noun a, b, c;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a,
u3x_sam_6, &b,
u3x_sam_7, &c, 0)) ||
(c3n == u3ud(a)) ||
(c3n == u3ud(b)) ||
(c3n == u3ud(c)) )
{
return u3m_bail(c3__exit);
} else {
return u3gc_cat(a, b, c);
}
}

View File

@ -1,51 +0,0 @@
/* j/3/con.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gc_con(u3_atom a,
u3_atom b)
{
c3_w lna_w = u3r_met(5, a);
c3_w lnb_w = u3r_met(5, b);
if ( (lna_w == 0) && (lnb_w == 0) ) {
return 0;
} else {
c3_w len_w = c3_max(lna_w, lnb_w);
c3_w* sal_w = u3a_slab(len_w);
if ( 0 == sal_w ) {
return u3m_bail(c3__fail);
}
else {
c3_w i_w;
u3r_chop(5, 0, lna_w, 0, sal_w, a);
for ( i_w = 0; i_w < lnb_w; i_w++ ) {
sal_w[i_w] |= u3r_word(i_w, b);
}
// return u3a_moot(sal_w);
return u3a_malt(sal_w);
}
}
}
u3_noun
u3yc_con(u3_noun cor)
{
u3_noun a, b;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0)) ||
(c3n == u3ud(a)) ||
(c3n == u3ud(b)) )
{
return u3m_bail(c3__exit);
} else {
return u3gc_con(a, b);
}
}

View File

@ -1,71 +0,0 @@
/* j/3/cut.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gc_cut(u3_atom a,
u3_atom b,
u3_atom c,
u3_atom d)
{
if ( !_(u3a_is_cat(a)) || (a >= 32) ) {
return u3m_bail(c3__fail);
}
if ( !_(u3a_is_cat(b)) ) {
return 0;
}
if ( !_(u3a_is_cat(c)) ) {
c = 0x7fffffff;
}
{
c3_g a_g = a;
c3_w b_w = b;
c3_w c_w = c;
c3_w len_w = u3r_met(a_g, d);
if ( (0 == c_w) || (b_w >= len_w) ) {
return 0;
}
if ( b_w + c_w > len_w ) {
c_w = (len_w - b_w);
}
if ( (b_w == 0) && (c_w == len_w) ) {
return u3k(d);
}
else {
c3_w* sal_w = u3a_slaq(a_g, c_w);
if ( 0 == sal_w ) {
return u3m_bail(c3__fail);
}
u3r_chop(a_g, b_w, c_w, 0, sal_w, d);
return u3a_malt(sal_w);
}
}
}
u3_noun
u3yc_cut(u3_noun cor)
{
u3_noun a, b, c, d;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a,
u3x_sam_12, &b,
u3x_sam_13, &c,
u3x_sam_7, &d, 0)) ||
(c3n == u3ud(a)) ||
(c3n == u3ud(b)) ||
(c3n == u3ud(c)) ||
(c3n == u3ud(d)) )
{
return u3m_bail(c3__exit);
} else {
return u3gc_cut(a, b, c, d);
}
}

View File

@ -1,51 +0,0 @@
/* j/3/dis.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gc_dis(u3_atom a,
u3_atom b)
{
c3_w lna_w = u3r_met(5, a);
c3_w lnb_w = u3r_met(5, b);
if ( (lna_w == 0) && (lnb_w == 0) ) {
return 0;
} else {
c3_w len_w = c3_max(lna_w, lnb_w);
c3_w* sal_w = u3a_slab(len_w);
if ( 0 == sal_w ) {
return u3m_bail(c3__fail);
}
else {
c3_w i_w;
u3r_chop(5, 0, lna_w, 0, sal_w, a);
for ( i_w = 0; i_w < len_w; i_w++ ) {
sal_w[i_w] &= (i_w >= lnb_w) ? 0 : u3r_word(i_w, b);
}
return u3a_malt(sal_w);
}
}
}
u3_noun
u3yc_dis(u3_noun cor)
{
u3_noun a, b;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0)) ||
(c3n == u3ud(a)) ||
(c3n == u3ud(b)) )
{
return u3m_bail(c3__exit);
} else {
return u3gc_dis(a, b);
}
}

View File

@ -1,49 +0,0 @@
/* j/3/dor.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gc_dor(u3_atom a,
u3_atom b)
{
if ( c3y == u3r_sing(a, b) ) {
return c3y;
}
else {
if ( c3y == u3ud(a) ) {
if ( c3y == u3ud(b) ) {
return u3ga_lth(a, b);
}
else {
return c3y;
}
}
else {
if ( c3y == u3ud(b) ) {
return c3n;
}
else {
if ( c3y == u3r_sing(u3h(a), u3h(b)) ) {
return u3gc_dor(u3t(a), u3t(b));
}
else return u3gc_dor(u3h(a), u3h(b));
}
}
}
}
u3_noun
u3yc_dor(u3_noun cor)
{
u3_noun a, b;
if ( c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0) ) {
return u3m_bail(c3__exit);
} else {
return u3gc_dor(a, b);
}
}

View File

@ -1,45 +0,0 @@
/* j/3/dvr.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gc_dvr(u3_atom a,
u3_atom b)
{
if ( 0 == b) {
return u3m_bail(c3__exit);
}
else {
if ( _(u3a_is_cat(a)) && _(u3a_is_cat(b)) ) {
return u3nc(a / b, a % b);
}
else {
mpz_t a_mp, b_mp;
u3r_mp(a_mp, a);
u3r_mp(b_mp, b);
mpz_tdiv_qr(a_mp, b_mp, a_mp, b_mp);
return u3nc(u3k(u3i_mp(a_mp)), u3k(u3i_mp(b_mp)));
}
}
}
u3_noun
u3yc_dvr(u3_noun cor)
{
u3_noun a, b;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0)) ||
(c3n == u3ud(a)) )
{
return u3m_bail(c3__exit);
} else {
return u3gc_dvr(a, b);
}
}

View File

@ -1,60 +0,0 @@
/* j/3/end.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gc_end(u3_atom a,
u3_atom b,
u3_atom c)
{
if ( !_(u3a_is_cat(a)) || (a >= 32) ) {
return u3m_bail(c3__fail);
}
else if ( !_(u3a_is_cat(b)) ) {
return u3k(c);
}
else {
c3_g a_g = a;
c3_w b_w = b;
c3_w len_w = u3r_met(a_g, c);
if ( 0 == b_w ) {
return 0;
}
else if ( b_w >= len_w ) {
return u3k(c);
}
else {
c3_w* sal_w = u3a_slaq(a_g, b_w);
if ( 0 == sal_w ) {
return u3m_bail(c3__fail);
}
u3r_chop(a_g, 0, b_w, 0, sal_w, c);
return u3a_malt(sal_w);
}
}
}
u3_noun
u3yc_end(u3_noun cor)
{
u3_noun a, b, c;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a,
u3x_sam_6, &b,
u3x_sam_7, &c, 0)) ||
(c3n == u3ud(a)) ||
(c3n == u3ud(b)) ||
(c3n == u3ud(c)) )
{
return u3m_bail(c3__exit);
} else {
return u3gc_end(a, b, c);
}
}

View File

@ -1,32 +0,0 @@
/* j/3/gor.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gc_gor(u3_noun a,
u3_noun b)
{
c3_w c_w = u3r_mug(a);
c3_w d_w = u3r_mug(b);
if ( c_w == d_w ) {
return u3gc_dor(a, b);
}
else return (c_w < d_w) ? c3y : c3n;
}
u3_noun
u3yc_gor(u3_noun cor)
{
u3_noun a, b;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0)) ) {
return u3m_bail(c3__exit);
} else {
return u3gc_gor(a, b);
}
}

View File

@ -1,46 +0,0 @@
/* j/3/hor.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gc_hor(u3_noun a,
u3_noun b)
{
if ( c3y == u3ud(a) ) {
if ( c3y == u3ud(b) ) {
return u3gc_gor(a, b);
} else {
return c3y;
}
} else {
if ( c3y == u3ud(b) ) {
return c3n;
}
else {
u3_noun h_a = u3h(a);
u3_noun h_b = u3h(b);
if ( c3y == u3r_sing(h_a, h_b) ) {
return u3gc_gor(u3t(a), u3t(b));
} else {
return u3gc_gor(h_a, h_b);
}
}
}
}
u3_noun
u3yc_hor(u3_noun cor)
{
u3_noun a, b;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0)) ) {
return u3m_bail(c3__exit);
} else {
return u3gc_hor(a, b);
}
}

View File

@ -1,71 +0,0 @@
/* j/3/lsh.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gc_lsh(u3_atom a,
u3_atom b,
u3_atom c)
{
if ( !_(u3a_is_cat(a)) || (a >= 32) ) {
return u3m_bail(c3__fail);
}
else if ( !_(u3a_is_cat(b)) ) {
return u3m_bail(c3__fail);
}
else {
c3_g a_g = a;
c3_w b_w = b;
c3_w len_w = u3r_met(a_g, c);
if ( 0 == len_w ) {
return 0;
}
else if ( (b_w + len_w) < len_w ) {
return u3m_bail(c3__exit);
}
else {
c3_w* sal_w = u3a_slaq(a_g, (b_w + len_w));
if ( 0 == sal_w ) {
return u3m_bail(c3__fail);
}
u3r_chop(a_g, 0, len_w, b_w, sal_w, c);
// return u3a_moot(sal_w);
return u3a_malt(sal_w);
}
}
}
u3_noun
u3yc_lsh(u3_noun cor)
{
u3_noun a, b, c;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a,
u3x_sam_6, &b,
u3x_sam_7, &c, 0)) ||
(c3n == u3ud(a)) ||
(c3n == u3ud(b)) ||
(c3n == u3ud(c)) )
{
return u3m_bail(c3__exit);
} else {
return u3gc_lsh(a, b, c);
}
}
u3_noun
u3lc_lsh(u3_noun a,
u3_noun b,
u3_noun c)
{
u3_noun d = u3gc_lsh(a, b, c);
u3z(a); u3z(b); u3z(c);
return d;
}

View File

@ -1,45 +0,0 @@
/* j/3/mas.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gc_mas(u3_atom a)
{
c3_w b_w;
u3_atom c, d, e, f;
b_w = u3r_met(0, a);
if ( b_w < 2 ) {
return u3m_bail(c3__exit);
}
else {
c = u3gc_bex((b_w - 1));
d = u3gc_bex((b_w - 2));
e = u3ga_sub(a, c);
f = u3gc_con(e, d);
u3z(c);
u3z(d);
u3z(e);
return f;
}
}
u3_noun
u3yc_mas(u3_noun cor)
{
u3_noun a;
if ( (u3_none == (a = u3r_at(u3x_sam, cor))) ||
(c3n == u3ud(a)) )
{
return u3m_bail(c3__exit);
} else {
return u3gc_mas(a);
}
}

View File

@ -1,42 +0,0 @@
/* j/3/met.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gc_met(u3_atom a,
u3_atom b)
{
if ( 0 == b ) {
return 0;
}
else if ( !_(u3a_is_cat(a)) || (a >= 32) ) {
return 1;
}
else {
c3_w met_w = u3r_met(a, b);
if ( !_(u3a_is_cat(met_w)) ) {
return u3i_words(1, &met_w);
}
else return u3r_met(a, b);
}
}
u3_noun
u3yc_met(u3_noun cor)
{
u3_noun a, b;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0)) ||
(c3n == u3ud(b)) ||
(c3n == u3ud(a) && 0 != b) )
{
return u3m_bail(c3__exit);
} else {
return u3gc_met(a, b);
}
}

View File

@ -1,51 +0,0 @@
/* j/3/mix.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gc_mix(u3_atom a,
u3_atom b)
{
c3_w lna_w = u3r_met(5, a);
c3_w lnb_w = u3r_met(5, b);
if ( (lna_w == 0) && (lnb_w == 0) ) {
return 0;
} else {
c3_w len_w = c3_max(lna_w, lnb_w);
c3_w* sal_w = u3a_slab(len_w);
if ( 0 == sal_w ) {
return u3m_bail(c3__fail);
}
else {
c3_w i_w;
u3r_chop(5, 0, lna_w, 0, sal_w, a);
for ( i_w = 0; i_w < lnb_w; i_w++ ) {
sal_w[i_w] ^= u3r_word(i_w, b);
}
return u3a_malt(sal_w);
}
}
}
u3_noun
u3yc_mix(u3_noun cor)
{
u3_noun a, b;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0)) ||
(c3n == u3ud(a)) ||
(c3n == u3ud(b)) )
{
return u3m_bail(c3__exit);
} else {
return u3gc_mix(a, b);
}
}

View File

@ -1,19 +0,0 @@
/* j/3/mug.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3yc_mug(u3_noun cor)
{
u3_noun sam;
if ( u3_none == (sam = u3r_at(u3x_sam, cor)) ) {
return u3m_bail(c3__exit);
} else {
return u3r_mug(sam);
}
}

View File

@ -1,54 +0,0 @@
/* j/c/muk.c
**
*/
#include "all.h"
#include <MurmurHash3.h>
/* functions
*/
u3_noun
u3gc_muk(u3_atom seed,
u3_atom len,
u3_atom key)
{
c3_w seed_w;
c3_w len_w;
c3_y *key_y;
c3_w out_w;
c3_assert(u3r_met(5, seed) <= 1);
c3_assert(u3r_met(0, len) <= 31);
c3_assert(u3r_met(3, key) <= len);
seed_w = u3r_word(0, seed);
len_w = u3r_word(0, len);
if (len_w > 0) { /* can't u3a_calloc 0 bytes */
key_y = u3a_calloc(sizeof(c3_y), len);
} else {
key_y = 0;
}
u3r_bytes(0, len, key_y, key);
MurmurHash3_x86_32(key_y, len, seed_w, &out_w);
u3a_free(key_y);
return u3i_words(1, &out_w);
}
u3_noun
u3yc_muk(u3_noun cor)
{
u3_noun seed, len, key;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &seed,
u3x_sam_6, &len,
u3x_sam_7, &key, 0)) ||
(c3n == u3ud(seed)) ||
(c3n == u3ud(len)) ||
(c3n == u3ud(key)) )
{
return u3m_bail(c3__exit);
} else {
return u3gc_muk(seed, len, key);
}
}

View File

@ -1,50 +0,0 @@
/* j/3/peg.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gc_peg(u3_atom a,
u3_atom b)
{
if ( 1 == b ) {
return u3k(a);
}
u3_atom c, d, e, f, g, h;
c = u3r_met(0, b);
d = u3ga_dec(c);
e = u3gc_lsh(0, d, 1);
f = u3ga_sub(b, e);
g = u3gc_lsh(0, d, a);
h = u3ga_add(f, g);
u3z(c);
u3z(d);
u3z(e);
u3z(f);
u3z(g);
return h;
}
u3_noun
u3yc_peg(u3_noun cor)
{
u3_noun a, b;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0)) ||
(0 == a) ||
(0 == b) ||
(c3n == u3ud(b)) ||
(c3n == u3ud(a) && b != 1) )
{
return u3m_bail(c3__exit);
} else {
return u3gc_peg(a, b);
}
}

View File

@ -1,104 +0,0 @@
/* j/3/po.c
**
*/
#include "all.h"
// good old linear search
//
static u3_noun
_po_find(u3_noun buf,
u3_noun a)
{
if ( !_(u3a_is_cat(a)) ) {
return u3_nul;
}
else {
c3_w i_w;
c3_w a_w = a;
for ( i_w = 0; i_w < 256; i_w++ ) {
c3_y byt_y[3];
c3_w but_w;
u3r_bytes((i_w * 3), 3, byt_y, buf);
but_w = (byt_y[0] | (byt_y[1] << 8) | (byt_y[2] << 16));
if ( but_w == a_w ) {
return u3nc(u3_nul, i_w);
}
}
return u3_nul;
}
}
u3_noun
u3ycp_ins(u3_noun cor)
{
u3_noun x, a, buf;
if ( (c3n == u3r_mean(cor, u3x_sam, &a, u3x_con_sam, &x, 0)) ||
(c3n == u3du(x)) ||
(c3n == u3ud(buf = u3h(x))) ||
(c3n == u3ud(a)) )
{
return u3m_bail(c3__exit);
} else {
return _po_find(buf, a);
}
}
u3_noun
u3ycp_ind(u3_noun cor)
{
u3_noun x, a, buf;
if ( (c3n == u3r_mean(cor, u3x_sam, &a, u3x_con_sam, &x, 0)) ||
(c3n == u3du(x)) ||
(c3n == u3ud(buf = u3t(x))) ||
(c3n == u3ud(a)) )
{
return u3m_bail(c3__exit);
} else {
return _po_find(buf, a);
}
}
u3_noun
u3ycp_tos(u3_noun cor)
{
u3_noun x, a, buf;
if ( (c3n == u3r_mean(cor, u3x_sam, &a, u3x_con_sam, &x, 0)) ||
(c3n == u3du(x)) ||
(c3n == u3ud(buf = u3h(x))) ||
(c3n == u3ud(a)) ||
(a >= 256) )
{
return u3m_bail(c3__exit);
}
else {
c3_y byt_y[3];
u3r_bytes((a * 3), 3, byt_y, buf);
return (byt_y[0] | (byt_y[1] << 8) | (byt_y[2] << 16));
}
}
u3_noun
u3ycp_tod(u3_noun cor)
{
u3_noun x, a, buf;
if ( (c3n == u3r_mean(cor, u3x_sam, &a, u3x_con_sam, &x, 0)) ||
(c3n == u3du(x)) ||
(c3n == u3ud(buf = u3t(x))) ||
(c3n == u3ud(a)) ||
(a >= 256) )
{
return u3m_bail(c3__exit);
} else {
c3_y byt_y[3];
u3r_bytes((a * 3), 3, byt_y, buf);
return (byt_y[0] | (byt_y[1] << 8) | (byt_y[2] << 16));
}
}

View File

@ -1,38 +0,0 @@
/* j/3/pow.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gc_pow(u3_atom a,
u3_atom b)
{
if ( !_(u3a_is_cat(b)) ) {
return u3m_bail(c3__fail);
}
else {
mpz_t a_mp;
u3r_mp(a_mp, a);
mpz_pow_ui(a_mp, a_mp, b);
return u3i_mp(a_mp);
}
}
u3_noun
u3yc_pow(u3_noun cor)
{
u3_noun a, b;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0)) ||
(c3n == u3ud(a)) )
{
return u3m_bail(c3__exit);
} else {
return u3gc_pow(a, b);
}
}

View File

@ -1,88 +0,0 @@
/* j/3/rap.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gc_rap(u3_atom a,
u3_noun b)
{
if ( !_(u3a_is_cat(a)) || (a >= 32) ) {
return u3m_bail(c3__exit);
}
else {
c3_g a_g = a;
c3_w tot_w = 0;
c3_w* sal_w;
/* Measure and validate the slab required.
*/
{
u3_noun cab = b;
while ( 1 ) {
u3_noun h_cab;
c3_w len_w;
if ( 0 == cab ) {
break;
}
else if ( c3n == u3du(cab) ) {
return u3m_bail(c3__exit);
}
else if ( c3n == u3ud(h_cab = u3h(cab)) ) {
return u3m_bail(c3__exit);
}
else if ( (tot_w + (len_w = u3r_met(a_g, h_cab))) < tot_w ) {
return u3m_bail(c3__fail);
}
tot_w += len_w;
cab = u3t(cab);
}
if ( 0 == tot_w ) {
return 0;
}
if ( 0 == (sal_w = u3a_slaq(a_g, tot_w)) ) {
return u3m_bail(c3__fail);
}
}
/* Chop the list atoms in.
*/
{
u3_noun cab = b;
c3_w pos_w = 0;
while ( 0 != cab ) {
u3_noun h_cab = u3h(cab);
c3_w len_w = u3r_met(a_g, h_cab);
u3r_chop(a_g, 0, len_w, pos_w, sal_w, h_cab);
pos_w += len_w;
cab = u3t(cab);
}
}
// return u3a_moot(sal_w);
return u3a_malt(sal_w);
}
}
u3_noun
u3yc_rap(u3_noun cor)
{
u3_noun a, b;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0)) ||
(c3n == u3ud(a)) )
{
return u3m_bail(c3__exit);
} else {
u3_noun pro;
pro = u3gc_rap(a, b);
return pro;
}
}

View File

@ -1,87 +0,0 @@
/* j/3/rep.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gc_rep(u3_atom a,
u3_noun b)
{
if ( !_(u3a_is_cat(a)) || (a >= 32) ) {
return u3m_bail(c3__exit);
}
else {
c3_g a_g = a;
c3_w tot_w = 0;
c3_w* sal_w;
/* Measure and validate the slab required.
*/
{
u3_noun cab = b;
while ( 1 ) {
u3_noun h_cab;
c3_w len_w;
if ( 0 == cab ) {
break;
}
else if ( c3n == u3du(cab) ) {
return u3m_bail(c3__exit);
}
else if ( c3n == u3ud(h_cab = u3h(cab)) ) {
return u3m_bail(c3__exit);
}
else if ( (tot_w + (len_w = u3r_met(a_g, h_cab))) < tot_w ) {
return u3m_bail(c3__fail);
}
tot_w++;
cab = u3t(cab);
}
if ( 0 == tot_w ) {
return 0;
}
if ( 0 == (sal_w = u3a_slaq(a_g, tot_w)) ) {
return u3m_bail(c3__fail);
}
}
/* Chop the list atoms in.
*/
{
u3_noun cab = b;
c3_w pos_w = 0;
while ( 0 != cab ) {
u3_noun h_cab = u3h(cab);
u3r_chop(a_g, 0, 1, pos_w, sal_w, h_cab);
pos_w++;
cab = u3t(cab);
}
}
// return u3a_moot(sal_w);
return u3a_malt(sal_w);
}
}
u3_noun
u3yc_rep(u3_noun cor)
{
u3_noun a, b;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0)) ||
(c3n == u3ud(a)) )
{
return u3m_bail(c3__exit);
} else {
u3_noun pro;
pro = u3gc_rep(a, b);
return pro;
}
}

View File

@ -1,83 +0,0 @@
/* j/3/rip.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gc_rip(u3_atom a,
u3_atom b)
{
if ( !_(u3a_is_cat(a)) || (a >= 32) ) {
return u3m_bail(c3__fail);
}
else {
u3_noun pir = u3_nul;
c3_g a_g = a;
c3_w i_w;
if ( a_g < 5 ) {
c3_w met_w = u3r_met(a_g, b);
c3_w mek_w = ((1 << (1 << a_g)) - 1);
for ( i_w = 0; i_w < met_w; i_w++ ) {
c3_w pat_w = (met_w - (i_w + 1));
c3_w bit_w = (pat_w << a_g);
c3_w wor_w = (bit_w >> 5);
c3_w sif_w = (bit_w & 31);
c3_w src_w = u3r_word(wor_w, b);
c3_w rip_w = ((src_w >> sif_w) & mek_w);
pir = u3nc(rip_w, pir);
}
return pir;
}
else {
c3_w met_w = u3r_met(a_g, b);
c3_w len_w = u3r_met(5, b);
c3_g san_g = (a_g - 5);
c3_w san_w = 1 << san_g;
c3_w dif_w = (met_w << san_g) - len_w;
c3_w tub_w = ((dif_w == 0) ? san_w : (san_w - dif_w));
for ( i_w = 0; i_w < met_w; i_w++ ) {
c3_w pat_w = (met_w - (i_w + 1));
c3_w wut_w = (pat_w << san_g);
c3_w sap_w = ((0 == i_w) ? tub_w : san_w);
c3_w* sal_w = u3a_slab(sap_w);
if ( 0 == sal_w ) {
return u3m_bail(c3__fail);
} else {
c3_w j_w;
u3_atom rip;
for ( j_w = 0; j_w < sap_w; j_w++ ) {
sal_w[j_w] = u3r_word(wut_w + j_w, b);
}
rip = u3a_malt(sal_w);
pir = u3nc(rip, pir);
}
len_w -= san_w;
}
}
return pir;
}
}
u3_noun
u3yc_rip(u3_noun cor)
{
u3_noun a, b;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0)) ||
(c3n == u3ud(a)) ||
(c3n == u3ud(b)) )
{
return u3m_bail(c3__exit);
} else {
return u3gc_rip(a, b);
}
}

View File

@ -1,68 +0,0 @@
/* j/3/rsh.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gc_rsh(u3_atom a,
u3_atom b,
u3_atom c)
{
if ( !_(u3a_is_cat(a)) || (a >= 32) ) {
return u3m_bail(c3__fail);
}
else if ( !_(u3a_is_cat(b)) ) {
return 0;
}
else {
c3_g a_g = a;
c3_w b_w = b;
c3_w len_w = u3r_met(a_g, c);
if ( b_w >= len_w ) {
return 0;
}
else {
c3_w* sal_w = u3a_slaq(a_g, (len_w - b_w));
if ( 0 == sal_w ) {
return u3m_bail(c3__fail);
}
u3r_chop(a_g, b_w, (len_w - b_w), 0, sal_w, c);
// return u3a_moot(sal_w);
return u3a_malt(sal_w);
}
}
}
u3_noun
u3yc_rsh(u3_noun cor)
{
u3_noun a, b, c;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a,
u3x_sam_6, &b,
u3x_sam_7, &c, 0)) ||
(c3n == u3ud(a)) ||
(c3n == u3ud(b)) ||
(c3n == u3ud(c)) )
{
return u3m_bail(c3__exit);
} else {
return u3gc_rsh(a, b, c);
}
}
u3_noun
u3lc_rsh(u3_noun a,
u3_noun b,
u3_noun c)
{
u3_noun d = u3gc_rsh(a, b, c);
u3z(a); u3z(b); u3z(c);
return d;
}

View File

@ -1,33 +0,0 @@
/* j/3/sqt.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gc_sqt(u3_atom a)
{
mpz_t a_mp, b_mp;
u3r_mp(a_mp, a);
mpz_init(b_mp);
mpz_sqrtrem(a_mp, b_mp, a_mp);
return u3nc(u3k(u3i_mp(a_mp)), u3k(u3i_mp(b_mp)));
}
u3_noun
u3yc_sqt(u3_noun cor)
{
u3_noun a;
if ( (u3_none == (a = u3r_at(u3x_sam, cor))) ||
(c3n == u3ud(a)) )
{
return u3m_bail(c3__exit);
} else {
return u3gc_sqt(a);
}
}

View File

@ -1,31 +0,0 @@
/* j/3/vor.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gc_vor(u3_atom a,
u3_atom b)
{
c3_w c_w = u3r_mug(u3r_mug(a));
c3_w d_w = u3r_mug(u3r_mug(b));
if ( c_w == d_w ) {
return u3gc_dor(a, b);
}
else return (c_w < d_w) ? c3y : c3n;
}
u3_noun
u3yc_vor(u3_noun cor)
{
u3_noun a, b;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0)) ) {
return u3m_bail(c3__exit);
} else {
return u3gc_vor(a, b);
}
}

View File

@ -1,42 +0,0 @@
/* j/3/xeb.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gc_xeb(u3_atom a)
{
mpz_t a_mp;
if ( __(u3a_is_dog(a)) ) {
u3r_mp(a_mp, a);
c3_d x = mpz_sizeinbase(a_mp, 2);
mpz_t b_mp;
mpz_init_set_ui(b_mp, x);
return u3i_mp(b_mp);
}
else {
mpz_init_set_ui(a_mp, a);
c3_d x = mpz_sizeinbase(a_mp, 2);
mpz_t b_mp;
mpz_init_set_ui(b_mp, x);
return u3i_mp(b_mp);
}
}
u3_noun
u3yc_xeb(u3_noun cor)
{
u3_noun a;
if ( (u3_none == (a = u3r_at(u3x_sam, cor))) ||
(c3n == u3ud(a)) )
{
return u3m_bail(c3__exit);
} else {
return u3gc_xeb(a);
}
}

View File

@ -1,82 +0,0 @@
/* jets/d/by_bif.c
**
*/
#include "all.h"
/* internal functions
*/
static
u3_noun _b_bif_putroot(u3_noun a,
u3_noun b)
{
if ( u3_nul == a) {
return u3nt(u3k(b), u3_nul, u3_nul);
}
else {
u3_noun n_a, l_a, r_a;
u3_noun p_n_a, q_n_a;
u3_noun p_b, q_b;
if ( (c3n == u3r_trel(a, &n_a, &l_a, &r_a))
|| (c3n == u3r_cell(b, &p_b, &q_b))
|| (c3n == u3r_cell(n_a, &p_n_a, &q_n_a)) ) {
return u3m_bail(c3__exit);
}
else if ( c3y == u3r_sing(p_b, p_n_a) ) {
return u3nt(u3k(b), u3k(l_a), u3k(r_a));
}
else {
u3_noun c, n_c, l_c, r_c;
u3_noun d;
if ( c3y == u3gc_gor(p_b, p_n_a) ) {
c = _b_bif_putroot(l_a, b);
u3r_trel(c, &n_c, &l_c, &r_c);
d = u3nt(u3k(n_c),
u3k(l_c),
u3nt(u3k(n_a), u3k(r_c), u3k(r_a))
);
u3z(c);
return d;
} else {
c = _b_bif_putroot(r_a, b);
u3r_trel(c, &n_c, &l_c, &r_c);
d = u3nt(u3k(n_c),
u3nt(u3k(n_a), u3k(l_a), u3k(l_c)),
u3k(r_c)
);
u3z(c);
return d;
}
}
}
}
/* functions
*/
u3_noun u3ydb_bif(u3_noun cor)
{
u3_noun a, b;
if ( c3n == u3r_mean(cor, u3x_sam, &b, u3x_con_sam, &a, 0) ) {
return u3m_bail(c3__exit);
} else {
return u3gdb_bif(a, b);
}
}
u3_noun u3gdb_bif(u3_noun a,
u3_noun b)
{
u3_noun c, n_c, l_c, r_c;
u3_noun d;
c = _b_bif_putroot(a, b);
u3r_trel(c, &n_c, &l_c, &r_c);
d = u3nc(u3k(l_c), u3k(r_c));
u3z(c);
return d;
}
/*
u3_weak u3ldi_bif(u3_noun a, u3_noun b);
*/

View File

@ -1,86 +0,0 @@
/* jets/d/by_dif.c
**
*/
#include "all.h"
/* internal functions
*/
static
u3_noun _b_dif_join(u3_noun d,
u3_noun e)
{
if ( u3_nul == d ) {
return u3k(e);
} else if (u3_nul == e) {
return u3k(d);
} else {
u3_noun n_d, l_d, r_d;
u3_noun n_e, l_e, r_e;
u3_noun p_n_d, q_n_d;
u3_noun p_n_e, q_n_e;
if ( c3n == u3r_trel(d, &n_d, &l_d, &r_d)
|| c3n == u3r_trel(e, &n_e, &l_e, &r_e)
|| c3n == u3r_cell(n_d, &p_n_d, &q_n_d)
|| c3n == u3r_cell(n_e, &p_n_e, &q_n_e) ) {
return u3m_bail(c3__exit);
} else {
if ( c3y == u3gc_vor(p_n_d, p_n_e) ) {
return u3nt(u3k(n_d),
u3k(l_d),
_b_dif_join(u3k(r_d), u3k(e)));
} else {
return u3nt(u3k(n_e),
_b_dif_join(u3k(d), u3k(l_e)),
u3k(r_e));
}
}
}
}
/* functions
*/
u3_noun u3ydb_dif(u3_noun cor)
{
u3_noun a, b;
if ( c3n == u3r_mean(cor, u3x_sam, &b, u3x_con_sam, &a, 0) ) {
return u3m_bail(c3__exit);
} else {
return u3gdb_dif(a, b);
}
}
u3_noun u3gdb_dif(u3_noun a,
u3_noun b)
{
if ( u3_nul == b ) {
return u3k(a);
} else {
u3_noun n_b, l_b, r_b;
u3_noun c, l_c, r_c;
if ( c3n == u3r_trel(b, &n_b, &l_b, &r_b) ) {
return u3m_bail(c3__exit);
} else {
c = u3gdb_bif(a, n_b);
if ( c3n == u3r_cell(c, &l_c, &r_c) ) {
return u3m_bail(c3__exit);
} else {
u3_noun d;
u3_noun e;
d = u3gdb_dif(l_c, l_b);
e = u3gdb_dif(r_c, r_b);
u3z(c);
return _b_dif_join(d, e);
}
}
}
}
/*
u3_weak u3ldb_dif(u3_noun a, u3_noun b);
*/

View File

@ -1,65 +0,0 @@
/* j/4/gas.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gdb_gas(u3_noun a,
u3_noun b)
{
if ( u3_nul == b ) {
return u3k(a);
}
else {
if ( c3n == u3du(b) ) {
return u3m_bail(c3__exit);
} else {
u3_noun i_b = u3h(b);
u3_noun t_b = u3t(b);
if ( c3n == u3du(i_b) ) {
return u3m_bail(c3__exit);
} else {
u3_noun pi_b = u3h(i_b);
u3_noun qi_b = u3t(i_b);
u3_noun c;
if ( u3_none == (c = u3gdb_put(a, pi_b, qi_b)) ) {
return u3m_bail(c3__exit);
} else {
u3_noun d = u3gdb_gas(c, t_b);
u3z(c);
return d;
}
}
}
}
}
u3_noun
u3ydb_gas(u3_noun cor)
{
u3_noun a, b;
if ( c3n == u3r_mean(cor, u3x_sam, &b, u3x_con_sam, &a, 0) ) {
return u3m_bail(c3__exit);
} else {
return u3gdb_gas(a, b);
}
}
u3_noun
u3ldb_gas(u3_noun a,
u3_noun b)
{
u3_weak c = u3gdb_gas(a, b);
u3z(a); u3z(b);
if ( u3_none == c ) {
return u3m_bail(c3__exit);
}
else return c;
}

View File

@ -1,77 +0,0 @@
/* j/4/by_get.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gdb_get(u3_noun a,
u3_noun b)
{
if ( u3_nul == a ) {
return u3_nul;
}
else {
u3_noun l_a, n_a, r_a;
u3_noun pn_a, qn_a;
if ( (c3n == u3r_trel(a, &n_a, &l_a, &r_a)) ||
(c3n == u3r_cell(n_a, &pn_a, &qn_a) ) )
{
return u3m_bail(c3__exit);
}
else {
if ( (c3y == u3r_sing(b, pn_a)) ) {
return u3nc(u3_nul, u3k(qn_a));
}
else {
if ( c3y == u3gc_gor(b, pn_a) ) {
return u3gdb_get(l_a, b);
}
else return u3gdb_get(r_a, b);
}
}
}
}
u3_noun
u3ydb_get(u3_noun cor)
{
u3_noun a, b;
if ( c3n == u3r_mean(cor, u3x_sam, &b, u3x_con_sam, &a, 0) ) {
return u3m_bail(c3__exit);
} else {
return u3gdb_get(a, b);
}
}
u3_weak
u3ldb_get(u3_noun a,
u3_noun b)
{
u3_noun c = u3gdb_get(a, b);
u3z(a); u3z(b);
if ( c3n == u3r_du(c) ) {
u3z(c);
return u3_none;
} else {
u3_noun pro = u3k(u3t(c));
u3z(c);
return pro;
}
}
u3_noun
u3ldb_got(u3_noun a,
u3_noun b)
{
u3_weak c = u3ldb_get(a, b);
if ( u3_none == c ) {
return u3m_bail(c3__exit);
}
else return c;
}

View File

@ -1,61 +0,0 @@
/* j/4/by_has.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3gdb_has(u3_noun a,
u3_noun b)
{
if ( u3_nul == a ) {
return c3n;
}
else {
u3_noun l_a, n_a, r_a;
u3_noun pn_a, qn_a;
if ( (c3n == u3r_trel(a, &n_a, &l_a, &r_a)) ||
(c3n == u3r_cell(n_a, &pn_a, &qn_a)) )
{
return u3m_bail(c3__exit);
}
else {
if ( (c3y == u3r_sing(b, pn_a)) ) {
return c3y;
}
else {
if ( c3y == u3gc_gor(b, pn_a) ) {
return u3gdb_has(l_a, b);
}
else return u3gdb_has(r_a, b);
}
}
}
}
u3_noun
u3ydb_has(u3_noun cor)
{
u3_noun a, b;
if ( c3n == u3r_mean(cor, u3x_sam, &b, u3x_con_sam, &a, 0) ) {
return u3m_bail(c3__exit);
} else {
return u3gdb_has(a, b);
}
}
u3_noun
u3ldb_has(u3_noun a,
u3_noun b)
{
u3_weak c = u3gdb_has(a, b);
u3z(a); u3z(b);
if ( u3_none == c ) {
return u3m_bail(c3__exit);
}
else return c;
}

View File

@ -1,105 +0,0 @@
/* j/4/by_int.c
** XXX THIS IS DISABLED
** specifically, s/hor/gor/g (already done?)
** and eliminate memory leaks
*/
#include "all.h"
/* functions
*/
u3_noun
u3gdb_int(u3_noun a,
u3_noun b)
{
if ( u3_nul == a ) {
return u3k(u3_nul);
}
else if ( u3_nul == b ) {
return u3k(u3_nul);
}
else {
u3_noun l_a, n_a, r_a, lr_a, p_n_a, q_n_a;
u3_noun l_b, n_b, r_b, lr_b, p_n_b, q_n_b;
if ( (c3n == u3r_cell(a, &n_a, &lr_a)) ) {
return u3m_bail(c3__exit);
}
else if ( (c3n == u3r_cell(b, &n_b, &lr_b)) ) {
return u3m_bail(c3__exit);
}
else if ( c3n == u3r_cell(lr_a, &l_a, &r_a) ) {
return u3m_bail(c3__exit);
}
else if ( c3n == u3r_cell(lr_b, &l_b, &r_b) ) {
return u3m_bail(c3__exit);
}
else if ( c3n == u3r_cell(n_a, &p_n_a, &q_n_a) ) {
return u3m_bail(c3__exit);
}
else if ( c3n == u3r_cell(n_b, &p_n_b, &q_n_b) ) {
return u3m_bail(c3__exit);
}
else if ( c3y == u3gc_vor(p_n_a, p_n_b) ) {
if ( c3y == u3r_sing(p_n_a, p_n_b) ) {
return u3nt(
u3k(n_b),
u3gdb_int(u3k(l_a), u3k(l_b)),
u3gdb_int(u3k(r_a), u3k(r_b)));
}
else if ( c3y == u3gc_gor(p_n_b, p_n_a) ) {
return u3gdb_uni(
u3gdb_int(u3k(l_a),
u3nt(u3k(n_b),
u3k(l_b),
u3k(u3_nul))),
u3gdb_int(u3k(a),
u3k(r_b)));
}
else {
return u3gdb_uni(
u3gdb_int(u3k(r_a),
u3nt(u3k(n_b),
u3k(u3_nul),
u3k(r_b))),
u3gdb_int(u3k(a),
u3k(l_b)));
}
}
else if ( c3y == u3r_sing(p_n_b, p_n_a) ) {
return u3nt(
u3k(n_b),
u3gdb_int(u3k(l_b), u3k(l_a)),
u3gdb_int(u3k(r_b), u3k(r_a)));
}
else if ( c3y == u3gc_gor(p_n_a, p_n_b) ) {
return u3gdb_uni(
u3gdb_int(u3k(l_b),
u3nt(u3k(n_a),
u3k(l_a),
u3k(u3_nul))),
u3gdb_int(u3k(a),
u3k(r_a)));
}
else {
return u3gdb_uni(
u3gdb_int(u3k(r_b),
u3nt(u3k(n_a),
u3k(u3_nul),
u3k(r_a))),
u3gdb_int(u3k(a),
u3k(l_a)));
}
}
}
u3_noun
u3ydb_int(u3_noun cor)
{
u3_noun a, b;
if ( c3n == u3r_mean(cor, u3x_sam, &b, u3x_con_sam, &a, 0) ) {
return u3m_bail(c3__exit);
} else {
return u3gdb_int(a, b);
}
}

Some files were not shown because too many files have changed in this diff Show More