From 890c7fadd2e1217cafeb0dfe0db09390f0a51a67 Mon Sep 17 00:00:00 2001 From: Jared Hance Date: Tue, 20 May 2014 15:42:57 -0400 Subject: [PATCH 001/137] Implement stream cipher and some other misc details for crub --- v/raft.c | 2 +- v/reck.c | 4 ++-- v/sist.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/v/raft.c b/v/raft.c index 427ca25fef..b7bfa5596c 100644 --- a/v/raft.c +++ b/v/raft.c @@ -1749,7 +1749,7 @@ u2_raft_work(u2_reck* rec_u) ron = u2_cke_jam(u2nc(u2k(rec_u->now), ovo)); c3_assert(rec_u->key); - ron = u2_dc("en:crua", u2k(rec_u->key), ron); + ron = u2_dc("en:crub", u2k(rec_u->key), ron); len_w = u2_cr_met(5, ron); bob_w = c3_malloc(len_w * 4L); diff --git a/v/reck.c b/v/reck.c index c573aa4f59..05ebd81077 100644 --- a/v/reck.c +++ b/v/reck.c @@ -495,8 +495,8 @@ u2_reck_init(u2_reck* rec_u, c3_w kno_w, u2_noun ken) } #if 0 rec_u->toy.sham = u2_reck_wish(rec_u, "sham"); - rec_u->toy.shen = u2_reck_wish(rec_u, "en:crua"); - rec_u->toy.shed = u2_reck_wish(rec_u, "de:crua"); + rec_u->toy.shen = u2_reck_wish(rec_u, "en:crub"); + rec_u->toy.shed = u2_reck_wish(rec_u, "de:crub"); rec_u->toy.cyst = u2_reck_wish(rec_u, "cyst"); #endif u2_reck_time(rec_u); diff --git a/v/sist.c b/v/sist.c index ce6d8f1033..fef531f466 100644 --- a/v/sist.c +++ b/v/sist.c @@ -996,7 +996,7 @@ _sist_rest(u2_reck* rec_u) if ( rec_u->key ) { u2_noun dep; - dep = u2_dc("de:crua", u2k(rec_u->key), ron); + dep = u2_dc("de:crub", u2k(rec_u->key), ron); if ( u2_no == u2du(dep) ) { uL(fprintf(uH, "record (%s) is corrupt (k)\n", ful_c)); u2_lo_bail(rec_u); From 17921b2643522947b79501941e6b76864f00add7 Mon Sep 17 00:00:00 2001 From: Jared Hance Date: Thu, 22 May 2014 10:00:51 -0400 Subject: [PATCH 002/137] Some fixes (not completely tested). Note: There are printfs to remove from ames later. --- v/sist.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/v/sist.c b/v/sist.c index fef531f466..8b915fe115 100644 --- a/v/sist.c +++ b/v/sist.c @@ -432,14 +432,14 @@ _sist_bask(c3_c* pop_c, u2_bean may) } #endif -/* _sist_rand(): fill a 256-bit (8-word) buffer. +/* _sist_rand(): fill a 512-bit (16-word) buffer. */ static void _sist_rand(u2_reck* rec_u, c3_w* rad_w) { c3_i fid_i = open(DEVRANDOM, O_RDONLY); - if ( 32 != read(fid_i, (c3_y*) rad_w, 32) ) { + if ( 64 != read(fid_i, (c3_y*) rad_w, 64) ) { c3_assert(!"lo_rand"); } close(fid_i); @@ -565,7 +565,7 @@ _sist_zest(u2_reck* rec_u) // Generate a 31-bit salt. // { - c3_w rad_w[8]; + c3_w rad_w[16]; _sist_rand(rec_u, rad_w); sal_l = (0x7fffffff & rad_w[0]); @@ -574,7 +574,7 @@ _sist_zest(u2_reck* rec_u) // Create and save a passcode. // { - c3_w rad_w[8]; + c3_w rad_w[16]; u2_noun pas; _sist_rand(rec_u, rad_w); @@ -1164,10 +1164,10 @@ _sist_rest(u2_reck* rec_u) static u2_noun _sist_zen(u2_reck* rec_u) { - c3_w rad_w[8]; + c3_w rad_w[16]; _sist_rand(rec_u, rad_w); - return u2_ci_words(8, rad_w); + return u2_ci_words(16, rad_w); } /* u2_sist_boot(): restore or create. From d079afd50019ca6c01e3604d80078836b47367c2 Mon Sep 17 00:00:00 2001 From: Jared Hance Date: Thu, 22 May 2014 11:22:13 -0400 Subject: [PATCH 003/137] Crub implementation that seems to be working. --- v/sist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v/sist.c b/v/sist.c index 8b915fe115..86d5142fcc 100644 --- a/v/sist.c +++ b/v/sist.c @@ -374,7 +374,7 @@ _sist_cask(u2_reck* rec_u, c3_c* dir_c, u2_bean nun) static u2_noun _sist_text(u2_reck* rec_u, c3_c* pom_c) { - c3_c paw_c[60]; + c3_c paw_c[180]; u2_noun say; uH; @@ -383,7 +383,7 @@ _sist_text(u2_reck* rec_u, c3_c* pom_c) paw_c[0] = 0; fpurge(stdin); - fgets(paw_c, 59, stdin); + fgets(paw_c, 179, stdin); if ( '\n' == paw_c[0] ) { continue; From 266e9af0369bb2dd08ebc08a85c1f5c464353353 Mon Sep 17 00:00:00 2001 From: Jared Hance Date: Wed, 28 May 2014 11:38:32 -0400 Subject: [PATCH 004/137] Fix messages for keygen to say ECC. --- v/sist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v/sist.c b/v/sist.c index 86d5142fcc..1ebef929da 100644 --- a/v/sist.c +++ b/v/sist.c @@ -1187,7 +1187,7 @@ u2_sist_boot(void) u2_lo_bail(u2A); } u2_noun ten = _sist_zen(u2A); - uL(fprintf(uH, "generating 2048-bit RSA pair...\n")); + uL(fprintf(uH, "generating two 256-bit ECC keypairs...\n")); pig = u2nq(c3__make, u2_nul, 11, ten); } From e7bf9b5452efdcd1d5b30b61af7edbb4544971fd Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Fri, 27 Nov 2015 11:37:06 -0800 Subject: [PATCH 005/137] Removed unused code. --- jets/f/ut_find.c | 362 ----------------------------------------------- jets/tree.c | 2 - 2 files changed, 364 deletions(-) diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c index 47d4d80a09..a0fa0f645b 100644 --- a/jets/f/ut_find.c +++ b/jets/f/ut_find.c @@ -6,318 +6,6 @@ /* logic */ - static u3_noun - _fino_in(u3_noun van, - u3_noun sut, - u3_noun dep, - u3_noun way, - u3_noun cog, - u3_noun gil) - { - u3_noun p_sut, q_sut; - - if ( c3y == u3ud(sut) ) { - return u3nc(u3k(dep), u3_nul); - } - else switch ( u3h(sut) ) { - default: return u3nc(u3k(dep), u3_nul); - - case c3__bull: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { - return u3m_bail(c3__fail); - } - else { - if ( c3n == u3r_sing(cog, u3h(p_sut)) ) { - return _fino_in(van, q_sut, dep, way, cog, gil); - } - else { - if ( 0 == dep ) { - return u3nc(0, - u3nt(u3_nul, - 1, - u3nt(2, u3k(p_sut), - u3k(q_sut)))); - } else { - return _fino_in(van, q_sut, u3qa_dec(dep), way, cog, gil); - } - } - } - } - case c3__cell: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { - return u3m_bail(c3__fail); - } else { - u3_noun taf = _fino_in(van, p_sut, dep, way, cog, gil); - u3_noun p_taf = u3h(taf); - u3_noun q_taf = u3t(taf); - u3_noun ret; - - if ( u3_nul == q_taf ) { - u3_noun bov = _fino_in(van, q_sut, p_taf, way, cog, gil); - u3_noun p_bov = u3h(bov); - u3_noun q_bov = u3t(bov); - - if ( u3_nul == q_bov ) { - ret = u3k(bov); - } - else { - u3_noun puq_bov, quq_bov; - - u3r_mean(q_bov, 6, &puq_bov, 7, &quq_bov, 0); - ret = u3nq(u3k(p_bov), - u3_nul, - u3qc_peg(3, puq_bov), - u3k(quq_bov)); - } - u3z(bov); - } - else { - u3_noun puq_taf, quq_taf; - - u3r_mean(q_taf, 6, &puq_taf, 7, &quq_taf, 0); - ret = u3nq(u3k(p_taf), - u3_nul, - u3qc_peg(2, puq_taf), - u3k(quq_taf)); - } - u3z(taf); - return ret; - } - } - case c3__core: { - u3_noun pq_sut, qq_sut, rq_sut; - u3_noun prq_sut, qrq_sut; - - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) || - (c3n == u3r_trel(q_sut, &pq_sut, &qq_sut, &rq_sut)) || - (c3n == u3r_cell(rq_sut, &prq_sut, &qrq_sut)) ) - { - return u3m_bail(c3__fail); - } else { - u3_noun zem = u3qf_look(cog, qrq_sut); - - if ( (u3_nul != zem) && (0 != dep) ) { - u3_noun ped; - - ped = u3qa_dec(dep); - u3z(dep); dep = ped; - - u3z(zem); - zem = u3_nul; - } - - if ( u3_nul == zem ) { - u3_noun taf = _fino_in(van, p_sut, dep, way, cog, gil); - u3_noun p_taf = u3h(taf); - u3_noun q_taf = u3t(taf); - - if ( u3_nul == q_taf ) { - u3z(taf); - return u3nc(u3k(dep), u3_nul); - } - else { - u3_noun puq_taf, quq_taf; - u3_noun pro; - - u3r_mean(q_taf, 6, &puq_taf, 7, &quq_taf, 0); - - if ( c3n == u3qfu_park(van, sut, way, puq_taf) ) - { - u3_noun weh = u3qfu_shep(van, "way", 'a', u3k(way)); - u3_noun waz = u3qfu_shep(van, "axis", 'd', u3k(puq_taf)); - - u3t_push(u3nc(c3__mean, weh)); - u3t_push(u3nc(c3__mean, waz)); - return u3m_error("find-park"); - } - else { - pro = u3nq(u3k(p_taf), - u3_nul, - u3qc_peg(3, puq_taf), - u3k(quq_taf)); - - u3z(taf); - return pro; - } - } - } - else { - u3_noun u_zem = u3t(zem); - u3_noun pu_zem = u3h(u_zem); - u3_noun qu_zem = u3t(u_zem); - u3_noun mut; - u3_noun pro; - - mut = u3nt(c3__core, - u3k(p_sut), - u3nt(c3__gold, - u3k(qq_sut), - u3k(rq_sut))); - - pro = u3nc(0, - u3nq(u3_nul, - 1, - 1, - u3nc(u3qc_peg(2, pu_zem), - u3nc(u3nc(mut, u3k(qu_zem)), - u3_nul)))); - u3z(zem); - return pro; - } - } - } - case c3__face: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { - return u3m_bail(c3__fail); - } else { - if ( c3n == u3r_sing(cog, p_sut) ) { - return u3nc(u3k(dep), u3_nul); - } else { - if ( 0 == dep ) { - return u3nc(0, u3nq(u3_nul, 1, 0, u3k(q_sut))); - } else { - return u3nc - (u3qa_dec(dep), u3_nul); - } - } - } - } - case c3__cube: { - u3_noun fop = u3qfu_repo(van, sut); - u3_noun pro = _fino_in(van, fop, dep, way, cog, gil); - - u3z(fop); - return pro; - } - case c3__fork: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { - return u3m_bail(c3__fail); - } - - if ( (c3y == u3qdi_has(gil, q_sut)) ) { - return _fino_in(van, p_sut, dep, way, cog, gil); - } - else if ( (c3y == u3qdi_has(gil, p_sut)) ) { - return _fino_in(van, q_sut, dep, way, cog, gil); - } - else { - u3_noun hax = _fino_in(van, p_sut, dep, way, cog, gil); - u3_noun yor = _fino_in(van, q_sut, dep, way, cog, gil); - u3_noun p_hax = u3h(hax); - u3_noun p_yor = u3h(yor); - u3_noun q_hax = u3t(hax); - u3_noun q_yor = u3t(yor); - u3_noun puq_hax, quq_hax; - u3_noun puq_yor, quq_yor; - u3_noun ret = 0; - - if ( u3_nul != q_hax ) { - u3r_mean(q_hax, 6, &puq_hax, 7, &quq_hax, 0); - } - if ( u3_nul != q_yor ) { - u3r_mean(q_yor, 6, &puq_yor, 7, &quq_yor, 0); - } - - if ( c3y == u3r_sing(hax, yor) ) { - ret = u3k(hax); - } - else { - if ( (c3n == u3r_sing(p_hax, p_yor)) || - ((u3_nul == q_hax) || (u3_nul == q_yor)) || - (c3n == u3r_sing(puq_hax, puq_yor)) || - (c3n == u3r_sing(u3h(quq_hax), u3h(quq_yor))) ) - { - return u3m_error("find-fork"); - } - switch ( u3h(quq_hax) ) { - case 0: { - u3_noun pquq_hax = u3t(quq_hax); - u3_noun pquq_yor = u3t(quq_yor); - - ret = u3nc(u3k(p_hax), - u3nq(u3_nul, - u3k(puq_hax), - 0, - u3qf_fork(pquq_hax, pquq_yor))); - break; - } - case 1: { - u3_noun pquq_hax, qquq_hax, pquq_yor, qquq_yor; - - u3x_cell(u3t(quq_hax), &pquq_hax, &qquq_hax); - u3x_cell(u3t(quq_yor), &pquq_yor, &qquq_yor); - - if ( c3n == u3r_sing(pquq_hax, pquq_yor) ) { - return u3m_error("find-fork"); - } else { - ret = u3nc(u3k(p_hax), - u3nq(u3_nul, - u3k(puq_hax), - 1, - u3nc(u3k(pquq_hax), - u3qb_weld(qquq_hax, qquq_yor)))); - break; - } - } - case 2: { - u3_noun pquq_hax, qquq_hax, pquq_yor, qquq_yor; - u3_noun ppquq_hax, qpquq_hax, rpquq_hax, spquq_hax; - u3_noun ppquq_yor, qpquq_yor, rpquq_yor, spquq_yor; - - u3x_cell(u3t(quq_hax), &pquq_hax, &qquq_hax); - u3x_cell(u3t(quq_yor), &pquq_yor, &qquq_yor); - u3x_qual(pquq_hax, - &ppquq_hax, &qpquq_hax, &rpquq_hax, &spquq_hax); - u3x_qual(pquq_yor, - &ppquq_yor, &qpquq_yor, &rpquq_yor, &spquq_yor); - - if ( (c3n == u3r_sing(ppquq_hax, ppquq_yor)) || - (c3n == u3r_sing(qpquq_hax, qpquq_yor)) || - (c3n == u3r_sing(rpquq_hax, rpquq_yor)) ) - { - return u3m_error("find-fork"); - } - else { - ret = u3nc(u3k(p_hax), - u3nq(u3_nul, - u3k(puq_hax), - 2, - u3nc(u3nq(u3k(ppquq_hax), - u3k(qpquq_hax), - u3k(rpquq_hax), - u3qf_fork(spquq_hax, - spquq_yor)), - u3qf_fork(qquq_hax, qquq_yor)))); - break; - } - } - } - } - u3z(yor); - u3z(hax); - - return ret; - } - } - case c3__hold: p_sut = u3t(sut); - { - if ( (c3y == u3qdi_has(gil, sut)) ) { - return u3nc(u3k(dep), u3_nul); - } - else { - u3_noun zoc = u3qdi_put(gil, sut); - u3_noun fop = u3qfu_repo(van, sut); - u3_noun pro = _fino_in(van, fop, dep, way, cog, zoc); - - u3z(fop); - u3z(zoc); - - return pro; - } - } - } - } - static u3_noun _find_in(u3_noun van, u3_noun sut, @@ -618,56 +306,6 @@ return _find_in(van, sut, dep, way, cog, u3_nul); } - u3_noun - _cqfu_fino(u3_noun van, - u3_noun sut, - u3_noun dep, - u3_noun way, - u3_noun cog) - { - return _fino_in(van, sut, dep, way, cog, u3_nul); - } - -/* boilerplate -*/ - u3_noun - u3wfu_fino(u3_noun cor) - { - u3_noun sut, dep, way, cog, van; - - if ( (c3n == u3r_mean(cor, u3x_sam_2, &dep, - u3x_sam_6, &way, - u3x_sam_7, &cog, - u3x_con, &van, - 0)) || - (u3_none == (sut = u3r_at(u3x_sam, van))) ) - { - return u3m_bail(c3__fail); - } else { - return _cqfu_fino(van, sut, dep, way, cog); - } - } - - u3_noun - u3qfu_fino(u3_noun van, - u3_noun sut, - u3_noun dep, - u3_noun way, - u3_noun cog) - { - c3_m fun_m = c3__fino; - u3_noun pro = u3z_find_4(fun_m, sut, dep, way, cog); - - if ( u3_none != pro ) { - return pro; - } - else { - pro = _cqfu_fino(van, sut, dep, way, cog); - - return u3z_save_4(fun_m, sut, dep, way, cog, pro); - } - } - /* boilerplate */ diff --git a/jets/tree.c b/jets/tree.c index ffc5cdba0e..51c008a76a 100644 --- a/jets/tree.c +++ b/jets/tree.c @@ -353,7 +353,6 @@ static u3j_harm _mood__hoon__ut_conk_a[] = {{".2", u3wfu_conk}, {}}; static u3j_harm _mood__hoon__ut_crop_a[] = {{".2", u3wfu_crop}, {}}; static u3j_harm _mood__hoon__ut_cull_a[] = {{".2", u3wfu_cull}, {}}; static u3j_harm _mood__hoon__ut_find_a[] = {{".2", u3wfu_find}, {}}; -static u3j_harm _mood__hoon__ut_fino_a[] = {{".2", u3wfu_fino}, {}}; static u3j_harm _mood__hoon__ut_fink_a[] = {{".2", u3wfu_fink}, {}}; static u3j_harm _mood__hoon__ut_fire_a[] = {{".2", u3wfu_fire}, {}}; static u3j_harm _mood__hoon__ut_firm_a[] = {{".2", u3wfu_firm}, {}}; @@ -381,7 +380,6 @@ static u3j_core _mood__hoon__ut_d[] = { "crop", _mood__hoon__ut_crop_a }, { "cull", _mood__hoon__ut_cull_a }, { "find", _mood__hoon__ut_find_a }, - { "fino", _mood__hoon__ut_fino_a }, { "fink", _mood__hoon__ut_fink_a }, { "fire", _mood__hoon__ut_fire_a }, { "firm", _mood__hoon__ut_firm_a }, From 6748e109dce4f964d1a8172838f04fb4aa146278 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Fri, 27 Nov 2015 12:29:33 -0800 Subject: [PATCH 006/137] Advanced to stage 162 with basic, non-functional ++limb changes. --- jets/f/ut_seek.c | 17 +++++++++++++++++ jets/tree.c | 5 +++++ 2 files changed, 22 insertions(+) diff --git a/jets/f/ut_seek.c b/jets/f/ut_seek.c index dad395b51e..07c418cb75 100644 --- a/jets/f/ut_seek.c +++ b/jets/f/ut_seek.c @@ -193,6 +193,23 @@ u3z(hud); } } + else if ( 2 == u3h(yip) ) { + u3_noun p_yip, q_yip, hud; + + if ( c3n == u3r_cell(u3t(yip), &p_yip, &q_yip) ) { + return u3m_bail(c3__fail); + } + hud = u3qfu_fink(van, syp, p_yip, way, u3t(q_yip)); + { + u3_noun p_hud, q_hud; + + u3r_cell(hud, &p_hud, &q_hud); + + ret = u3nc(u3qc_peg(p_zar, p_hud), + u3k(q_hud)); + u3z(hud); + } + } else { u3_noun p_yip = u3t(yip); diff --git a/jets/tree.c b/jets/tree.c index 51c008a76a..08dbded628 100644 --- a/jets/tree.c +++ b/jets/tree.c @@ -573,12 +573,17 @@ static u3j_core _mood_d[] = {} }; +static u3j_core _k162_d[] = + { { "mood", 0, _mood_d }, + {} + }; static u3j_core _k163_d[] = { { "mood", 0, _mood_d }, {} }; static u3j_core _d[] = { + { "k162", 0, _k162_d}, { "k163", 0, _k163_d}, {} }; From 5791716cfae239edb9f26629f231ab3b49d8b596 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Fri, 27 Nov 2015 12:51:28 -0800 Subject: [PATCH 007/137] 162 cleansed of %| limbs. --- jets/f/ut_seek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jets/f/ut_seek.c b/jets/f/ut_seek.c index 07c418cb75..cda2fc4230 100644 --- a/jets/f/ut_seek.c +++ b/jets/f/ut_seek.c @@ -142,7 +142,7 @@ if ( c3y == u3du(i_hyp) ) { yip = u3k(i_hyp); } else { - yip = u3nt(c3n, 0, u3k(i_hyp)); + yip = u3nt(2, 0, u3nc(u3_nul, u3k(i_hyp))); } zar = _cqfu_seek(van, sut, way, t_hyp); From 3abf0cee358cfcb87b218f699d73a82a5129ed67 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Fri, 27 Nov 2015 13:10:28 -0800 Subject: [PATCH 008/137] Now back to generating trivial %|. --- jets/f/ut_seek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jets/f/ut_seek.c b/jets/f/ut_seek.c index cda2fc4230..1ca207a0f4 100644 --- a/jets/f/ut_seek.c +++ b/jets/f/ut_seek.c @@ -182,7 +182,7 @@ if ( c3n == u3r_cell(u3t(yip), &p_yip, &q_yip) ) { return u3m_bail(c3__fail); } - hud = u3qfu_fink(van, syp, p_yip, way, q_yip); + hud = u3qfu_fink(van, syp, p_yip, way, u3t(q_yip)); { u3_noun p_hud, q_hud; From 8c9bbb464f1f0ad9e6c320b12d75be55b6161e17 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Fri, 27 Nov 2015 13:59:32 -0800 Subject: [PATCH 009/137] In 161, new limb, cleansed of tmp structures. --- jets/f/ut_seek.c | 19 +------------------ jets/tree.c | 5 +++++ 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/jets/f/ut_seek.c b/jets/f/ut_seek.c index 1ca207a0f4..00918415d5 100644 --- a/jets/f/ut_seek.c +++ b/jets/f/ut_seek.c @@ -142,7 +142,7 @@ if ( c3y == u3du(i_hyp) ) { yip = u3k(i_hyp); } else { - yip = u3nt(2, 0, u3nc(u3_nul, u3k(i_hyp))); + yip = u3nt(c3n, 0, u3nc(u3_nul, u3k(i_hyp))); } zar = _cqfu_seek(van, sut, way, t_hyp); @@ -193,23 +193,6 @@ u3z(hud); } } - else if ( 2 == u3h(yip) ) { - u3_noun p_yip, q_yip, hud; - - if ( c3n == u3r_cell(u3t(yip), &p_yip, &q_yip) ) { - return u3m_bail(c3__fail); - } - hud = u3qfu_fink(van, syp, p_yip, way, u3t(q_yip)); - { - u3_noun p_hud, q_hud; - - u3r_cell(hud, &p_hud, &q_hud); - - ret = u3nc(u3qc_peg(p_zar, p_hud), - u3k(q_hud)); - u3z(hud); - } - } else { u3_noun p_yip = u3t(yip); diff --git a/jets/tree.c b/jets/tree.c index 08dbded628..d30b058ca7 100644 --- a/jets/tree.c +++ b/jets/tree.c @@ -573,6 +573,10 @@ static u3j_core _mood_d[] = {} }; +static u3j_core _k161_d[] = + { { "mood", 0, _mood_d }, + {} + }; static u3j_core _k162_d[] = { { "mood", 0, _mood_d }, {} @@ -583,6 +587,7 @@ static u3j_core _k163_d[] = }; static u3j_core _d[] = { + { "k161", 0, _k161_d}, { "k162", 0, _k162_d}, { "k163", 0, _k163_d}, {} From df4a16167961294177aca4a9488353f420517e2b Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Fri, 27 Nov 2015 15:00:54 -0800 Subject: [PATCH 010/137] About to switch over to new, modern fino. --- include/jets/q.h | 1 + include/jets/w.h | 1 + 2 files changed, 2 insertions(+) diff --git a/include/jets/q.h b/include/jets/q.h index 27c24fa5bb..f0c1cc814b 100644 --- a/include/jets/q.h +++ b/include/jets/q.h @@ -202,6 +202,7 @@ u3_noun u3qfu_dunq(u3_noun, const c3_c*, u3_noun); u3_noun u3qfu_find(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); u3_noun u3qfu_fino(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); + u3_noun u3qfu_finc(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); u3_noun u3qfu_fink(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); u3_noun u3qfu_fire(u3_noun, u3_noun, u3_noun); u3_noun u3qfu_firm(u3_noun, u3_noun, u3_noun); diff --git a/include/jets/w.h b/include/jets/w.h index f46dcafc4d..ea1d1d1ad4 100644 --- a/include/jets/w.h +++ b/include/jets/w.h @@ -219,6 +219,7 @@ u3_noun u3wfu_crop(u3_noun); u3_noun u3wfu_cull(u3_noun); u3_noun u3wfu_duck(u3_noun); + u3_noun u3wfu_finc(u3_noun); u3_noun u3wfu_find(u3_noun); u3_noun u3wfu_fino(u3_noun); u3_noun u3wfu_fink(u3_noun); From 3e24182ee90cfea819a02219d174855333e62ad7 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Fri, 27 Nov 2015 15:13:40 -0800 Subject: [PATCH 011/137] Ready to switch over to new find/fino. --- jets/f/ut_find.c | 728 ++++++++++++++++++++++++++++++++++++++++++++++- jets/tree.c | 4 - 2 files changed, 719 insertions(+), 13 deletions(-) diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c index a0fa0f645b..543a260158 100644 --- a/jets/f/ut_find.c +++ b/jets/f/ut_find.c @@ -3,9 +3,719 @@ */ #include "all.h" +#if 0 + static u3_noun + _fino_in(u3_noun van, + u3_noun sut, + u3_noun dep, + u3_noun way, + u3_noun cug, + u3_noun gil) + { + u3_noun p_sut, q_sut; + + if ( c3y == u3ud(sut) ) { + return u3nc(u3k(dep), u3_nul); + } + else switch ( u3h(sut) ) { + default: return u3nc(u3k(dep), u3_nul); + + case c3__bull: { + if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { + return u3m_bail(c3__fail); + } + else { + if ( (c3n == u3du(cug)) || + (c3n == u3r_sing(u3t(cug), u3h(p_sut))) ) { + return _fino_in(van, q_sut, dep, way, cug, gil); + } + else { + if ( 0 == dep ) { + return u3nc(0, + u3nt(u3_nul, + 1, + u3nt(2, u3k(p_sut), + u3k(q_sut)))); + } else { + return _fino_in(van, q_sut, u3qa_dec(dep), way, cug, gil); + } + } + } + } + case c3__cell: { + if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { + return u3m_bail(c3__fail); + } else { + u3_noun taf = _fino_in(van, p_sut, dep, way, cug, gil); + u3_noun p_taf = u3h(taf); + u3_noun q_taf = u3t(taf); + u3_noun ret; + + if ( u3_nul == q_taf ) { + u3_noun bov = _fino_in(van, q_sut, p_taf, way, cug, gil); + u3_noun p_bov = u3h(bov); + u3_noun q_bov = u3t(bov); + + if ( u3_nul == q_bov ) { + ret = u3k(bov); + } + else { + u3_noun puq_bov, quq_bov; + + u3r_mean(q_bov, 6, &puq_bov, 7, &quq_bov, 0); + ret = u3nq(u3k(p_bov), + u3_nul, + u3qc_peg(3, puq_bov), + u3k(quq_bov)); + } + u3z(bov); + } + else { + u3_noun puq_taf, quq_taf; + + u3r_mean(q_taf, 6, &puq_taf, 7, &quq_taf, 0); + ret = u3nq(u3k(p_taf), + u3_nul, + u3qc_peg(2, puq_taf), + u3k(quq_taf)); + } + u3z(taf); + return ret; + } + } + case c3__core: { + u3_noun pq_sut, qq_sut, rq_sut; + u3_noun prq_sut, qrq_sut; + + if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) || + (c3n == u3r_trel(q_sut, &pq_sut, &qq_sut, &rq_sut)) || + (c3n == u3r_cell(rq_sut, &prq_sut, &qrq_sut)) ) + { + return u3m_bail(c3__fail); + } else { + u3_noun zem = (c3n == u3du(cug)) + ? u3_nul + : u3qf_look(u3t(cug), qrq_sut); + + if ( (u3_nul != zem) && (0 != dep) ) { + u3_noun ped; + + ped = u3qa_dec(dep); + u3z(dep); dep = ped; + + u3z(zem); + zem = u3_nul; + } + + if ( u3_nul == zem ) { + u3_noun taf = _fino_in(van, p_sut, dep, way, cug, gil); + u3_noun p_taf = u3h(taf); + u3_noun q_taf = u3t(taf); + + if ( u3_nul == q_taf ) { + u3z(taf); + return u3nc(u3k(dep), u3_nul); + } + else { + u3_noun puq_taf, quq_taf; + u3_noun pro; + + u3r_mean(q_taf, 6, &puq_taf, 7, &quq_taf, 0); + + if ( c3n == u3qfu_park(van, sut, way, puq_taf) ) + { + u3_noun weh = u3qfu_shep(van, "way", 'a', u3k(way)); + u3_noun waz = u3qfu_shep(van, "axis", 'd', u3k(puq_taf)); + + u3t_push(u3nc(c3__mean, weh)); + u3t_push(u3nc(c3__mean, waz)); + return u3m_error("find-park"); + } + else { + pro = u3nq(u3k(p_taf), + u3_nul, + u3qc_peg(3, puq_taf), + u3k(quq_taf)); + + u3z(taf); + return pro; + } + } + } + else { + u3_noun u_zem = u3t(zem); + u3_noun pu_zem = u3h(u_zem); + u3_noun qu_zem = u3t(u_zem); + u3_noun mut; + u3_noun pro; + + mut = u3nt(c3__core, + u3k(p_sut), + u3nt(c3__gold, + u3k(qq_sut), + u3k(rq_sut))); + + pro = u3nc(0, + u3nq(u3_nul, + 1, + 1, + u3nc(u3qc_peg(2, pu_zem), + u3nc(u3nc(mut, u3k(qu_zem)), + u3_nul)))); + u3z(zem); + return pro; + } + } + } + case c3__face: { + if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { + return u3m_bail(c3__fail); + } else { + if ( (c3n == u3du(cug)) || (c3n == u3r_sing(u3t(cug), p_sut)) ) { + return u3nc(u3k(dep), u3_nul); + } else { + if ( 0 == dep ) { + return u3nc(0, u3nq(u3_nul, 1, 0, u3k(q_sut))); + } else { + return u3nc + (u3qa_dec(dep), u3_nul); + } + } + } + } + case c3__cube: { + u3_noun fop = u3qfu_repo(van, sut); + u3_noun pro = _fino_in(van, fop, dep, way, cug, gil); + + u3z(fop); + return pro; + } + case c3__fork: { + if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { + return u3m_bail(c3__fail); + } + + if ( (c3y == u3qdi_has(gil, q_sut)) ) { + return _fino_in(van, p_sut, dep, way, cug, gil); + } + else if ( (c3y == u3qdi_has(gil, p_sut)) ) { + return _fino_in(van, q_sut, dep, way, cug, gil); + } + else { + u3_noun hax = _fino_in(van, p_sut, dep, way, cug, gil); + u3_noun yor = _fino_in(van, q_sut, dep, way, cug, gil); + u3_noun p_hax = u3h(hax); + u3_noun p_yor = u3h(yor); + u3_noun q_hax = u3t(hax); + u3_noun q_yor = u3t(yor); + u3_noun puq_hax, quq_hax; + u3_noun puq_yor, quq_yor; + u3_noun ret = 0; + + if ( u3_nul != q_hax ) { + u3r_mean(q_hax, 6, &puq_hax, 7, &quq_hax, 0); + } + if ( u3_nul != q_yor ) { + u3r_mean(q_yor, 6, &puq_yor, 7, &quq_yor, 0); + } + + if ( c3y == u3r_sing(hax, yor) ) { + ret = u3k(hax); + } + else { + if ( (c3n == u3r_sing(p_hax, p_yor)) || + ((u3_nul == q_hax) || (u3_nul == q_yor)) || + (c3n == u3r_sing(puq_hax, puq_yor)) || + (c3n == u3r_sing(u3h(quq_hax), u3h(quq_yor))) ) + { + return u3m_error("find-fork"); + } + switch ( u3h(quq_hax) ) { + case 0: { + u3_noun pquq_hax = u3t(quq_hax); + u3_noun pquq_yor = u3t(quq_yor); + + ret = u3nc(u3k(p_hax), + u3nq(u3_nul, + u3k(puq_hax), + 0, + u3qf_fork(pquq_hax, pquq_yor))); + break; + } + case 1: { + u3_noun pquq_hax, qquq_hax, pquq_yor, qquq_yor; + + u3x_cell(u3t(quq_hax), &pquq_hax, &qquq_hax); + u3x_cell(u3t(quq_yor), &pquq_yor, &qquq_yor); + + if ( c3n == u3r_sing(pquq_hax, pquq_yor) ) { + return u3m_error("find-fork"); + } else { + ret = u3nc(u3k(p_hax), + u3nq(u3_nul, + u3k(puq_hax), + 1, + u3nc(u3k(pquq_hax), + u3qb_weld(qquq_hax, qquq_yor)))); + break; + } + } + case 2: { + u3_noun pquq_hax, qquq_hax, pquq_yor, qquq_yor; + u3_noun ppquq_hax, qpquq_hax, rpquq_hax, spquq_hax; + u3_noun ppquq_yor, qpquq_yor, rpquq_yor, spquq_yor; + + u3x_cell(u3t(quq_hax), &pquq_hax, &qquq_hax); + u3x_cell(u3t(quq_yor), &pquq_yor, &qquq_yor); + u3x_qual(pquq_hax, + &ppquq_hax, &qpquq_hax, &rpquq_hax, &spquq_hax); + u3x_qual(pquq_yor, + &ppquq_yor, &qpquq_yor, &rpquq_yor, &spquq_yor); + + if ( (c3n == u3r_sing(ppquq_hax, ppquq_yor)) || + (c3n == u3r_sing(qpquq_hax, qpquq_yor)) || + (c3n == u3r_sing(rpquq_hax, rpquq_yor)) ) + { + return u3m_error("find-fork"); + } + else { + ret = u3nc(u3k(p_hax), + u3nq(u3_nul, + u3k(puq_hax), + 2, + u3nc(u3nq(u3k(ppquq_hax), + u3k(qpquq_hax), + u3k(rpquq_hax), + u3qf_fork(spquq_hax, + spquq_yor)), + u3qf_fork(qquq_hax, qquq_yor)))); + break; + } + } + } + } + u3z(yor); + u3z(hax); + + return ret; + } + } + case c3__hold: p_sut = u3t(sut); + { + if ( (c3y == u3qdi_has(gil, sut)) ) { + return u3nc(u3k(dep), u3_nul); + } + else { + u3_noun zoc = u3qdi_put(gil, sut); + u3_noun fop = u3qfu_repo(van, sut); + u3_noun pro = _fino_in(van, fop, dep, way, cug, zoc); + + u3z(fop); + u3z(zoc); + + return pro; + } + } + } + } + + static u3_noun + _find_in(u3_noun van, + u3_noun sut, + u3_noun dep, + u3_noun way, + u3_noun cug, + u3_noun gil) + { + u3_noun p_sut, q_sut, pp_sut, qp_sut, rp_sut, sp_sut; + + if ( c3y == u3ud(sut) ) { + return u3nc(u3k(dep), u3_nul); + } + else switch ( u3h(sut) ) { + default: return u3nc(u3k(dep), u3_nul); + + case c3__bull: { + if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) || + (c3n == u3r_qual(p_sut, &pp_sut, &qp_sut, &rp_sut, &sp_sut)) ) + { + return u3m_bail(c3__fail); + } + else { + if ( (c3n == u3du(cug)) || (c3n == u3r_sing(u3t(cug), pp_sut)) ) { + return _find_in + (van, q_sut, dep, way, cug, gil); + } + else { + if ( 0 == dep ) { + return u3nc(0, + u3nq(u3_nul, + u3k(rp_sut), + c3y, + u3k(sp_sut))); + } else { + return _find_in(van, q_sut, u3qa_dec(dep), way, cug, gil); + return u3nc(u3qa_dec(dep), u3_nul); + } + } + } + } + case c3__cell: { + if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { + return u3m_bail(c3__fail); + } else { + u3_noun taf = _find_in(van, p_sut, dep, way, cug, gil); + u3_noun p_taf = u3h(taf); + u3_noun q_taf = u3t(taf); + u3_noun ret; + + if ( u3_nul == q_taf ) { + u3_noun bov = _find_in(van, q_sut, p_taf, way, cug, gil); + u3_noun p_bov = u3h(bov); + u3_noun q_bov = u3t(bov); + + if ( u3_nul == q_bov ) { + ret = u3k(bov); + } + else { + u3_noun puq_bov, quq_bov; + + u3r_mean(q_bov, 6, &puq_bov, 7, &quq_bov, 0); + ret = u3nq(u3k(p_bov), + u3_nul, + u3qc_peg(3, puq_bov), + u3k(quq_bov)); + } + u3z(bov); + } + else { + u3_noun puq_taf, quq_taf; + + u3r_mean(q_taf, 6, &puq_taf, 7, &quq_taf, 0); + ret = u3nq(u3k(p_taf), + u3_nul, + u3qc_peg(2, puq_taf), + u3k(quq_taf)); + } + u3z(taf); + return ret; + } + } + case c3__core: { + u3_noun pq_sut, qq_sut, rq_sut; + u3_noun prq_sut, qrq_sut; + + if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) || + (c3n == u3r_trel(q_sut, &pq_sut, &qq_sut, &rq_sut)) || + (c3n == u3r_cell(rq_sut, &prq_sut, &qrq_sut)) ) + { + return u3m_bail(c3__fail); + } else { + u3_noun zem = (c3n == u3du(cug)) + ? u3_nul + : u3qf_look(u3t(cug), qrq_sut); + + if ( (u3_nul != zem) && (0 != dep) ) { + u3_noun ped; + + ped = u3qa_dec(dep); + u3z(dep); dep = ped; + + u3z(zem); + zem = u3_nul; + } + + if ( u3_nul == zem ) { + u3_noun taf = _find_in(van, p_sut, dep, way, cug, gil); + u3_noun p_taf = u3h(taf); + u3_noun q_taf = u3t(taf); + + if ( u3_nul == q_taf ) { + u3z(taf); + return u3nc(u3k(dep), u3_nul); + } + else { + u3_noun puq_taf, quq_taf; + u3_noun pro; + + u3r_mean(q_taf, 6, &puq_taf, 7, &quq_taf, 0); + + if ( c3n == u3qfu_park(van, sut, way, puq_taf) ) + { + u3_noun weh = u3qfu_shep + (van, "way", 'a', u3k(way)); + u3_noun waz = u3qfu_shep + (van, "axis", 'd', u3k(puq_taf)); + + u3t_push(u3nc(c3__mean, weh)); + u3t_push(u3nc(c3__mean, waz)); + return u3m_error("find-park"); + } + else { + pro = u3nq(u3k(p_taf), + u3_nul, + u3qc_peg(3, puq_taf), + u3k(quq_taf)); + + u3z(taf); + return pro; + } + } + } + else { + u3_noun u_zem = u3t(zem); + u3_noun pu_zem = u3h(u_zem); + u3_noun qu_zem = u3t(u_zem); + u3_noun mut; + u3_noun pro; + + mut = u3nt(c3__core, + u3k(p_sut), + u3nt(c3__gold, + u3k(qq_sut), + u3k(rq_sut))); + + pro = u3nc(0, + u3nq(u3_nul, + 1, + c3n, + u3nc(u3qc_peg(2, pu_zem), + u3nc(u3nc(mut, u3k(qu_zem)), + u3_nul)))); + u3z(zem); + return pro; + } + } + } + case c3__face: { + if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { + return u3m_bail(c3__fail); + } else { + if ( (c3n == u3du(cug)) || (c3n == u3r_sing(u3t(cug), p_sut)) ) { + return u3nc(u3k(dep), u3_nul); + } else { + if ( 0 == dep ) { + return u3nc(0, + u3nq(u3_nul, + 1, + c3y, + u3k(q_sut))); + } else { + return u3nc(u3qa_dec(dep), u3_nul); + } + } + } + } + case c3__cube: { + u3_noun fop = u3qfu_repo(van, sut); + u3_noun pro = _find_in(van, fop, dep, way, cug, gil); + + u3z(fop); + return pro; + } + case c3__fork: { + if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { + return u3m_bail(c3__fail); + } + + if ( (c3y == u3qdi_has(gil, q_sut)) ) { + return _find_in(van, p_sut, dep, way, cug, gil); + } + else if ( (c3y == u3qdi_has(gil, p_sut)) ) { + return _find_in(van, q_sut, dep, way, cug, gil); + } + else { + u3_noun hax = _find_in(van, p_sut, dep, way, cug, gil); + u3_noun yor = _find_in(van, q_sut, dep, way, cug, gil); + u3_noun p_hax = u3h(hax); + u3_noun p_yor = u3h(yor); + u3_noun q_hax = u3t(hax); + u3_noun q_yor = u3t(yor); + u3_noun puq_hax, quq_hax; + u3_noun puq_yor, quq_yor; + u3_noun ret = 0; + + if ( u3_nul != q_hax ) { + u3r_mean(q_hax, 6, &puq_hax, 7, &quq_hax, 0); + } + if ( u3_nul != q_yor ) { + u3r_mean(q_yor, 6, &puq_yor, 7, &quq_yor, 0); + } + + if ( c3y == u3r_sing(hax, yor) ) { + ret = u3k(hax); + } + else { + if ( (c3n == u3r_sing(p_hax, p_yor)) || + ((u3_nul == q_hax) || (u3_nul == q_yor)) || + (c3n == u3r_sing(puq_hax, puq_yor)) || + (c3n == u3r_sing(u3h(quq_hax), u3h(quq_yor))) ) + { + return u3m_error("find-fork"); + } + switch ( u3h(quq_hax) ) { + case c3y: { + u3_noun pquq_hax = u3t(quq_hax); + u3_noun pquq_yor = u3t(quq_yor); + + ret = u3nc(u3k(p_hax), + u3nq(u3_nul, + u3k(puq_hax), + c3y, + u3qf_fork(pquq_hax, pquq_yor))); + break; + } + case c3n: { + u3_noun pquq_hax, qquq_hax, pquq_yor, qquq_yor; + + u3x_cell(u3t(quq_hax), &pquq_hax, &qquq_hax); + u3x_cell(u3t(quq_yor), &pquq_yor, &qquq_yor); + + if ( c3n == u3r_sing(pquq_hax, pquq_yor) ) { + return u3m_error("find-fork"); + } else { + ret = u3nc(u3k(p_hax), + u3nq(u3_nul, + u3k(puq_hax), + c3n, + u3nc(u3k(pquq_hax), + u3qb_weld + (qquq_hax, qquq_yor)))); + break; + } + } + } + } + u3z(yor); + u3z(hax); + + return ret; + } + } + case c3__hold: p_sut = u3t(sut); + { + if ( (c3y == u3qdi_has(gil, sut)) ) { + return u3nc(u3k(dep), u3_nul); + } + else { + u3_noun zoc = u3qdi_put(gil, sut); + u3_noun fop = u3qfu_repo(van, sut); + u3_noun pro = _find_in(van, fop, dep, way, cug, zoc); + + u3z(fop); + u3z(zoc); + + return pro; + } + } + } + } + + u3_noun + _cqfu_find(u3_noun van, + u3_noun sut, + u3_noun dep, + u3_noun way, + u3_noun cug) + { + return _find_in(van, sut, dep, way, cug, u3_nul); + } + + u3_noun + _cqfu_fino(u3_noun van, + u3_noun sut, + u3_noun dep, + u3_noun way, + u3_noun cug) + { + return _fino_in(van, sut, dep, way, cug, u3_nul); + } + +/* boilerplate +*/ + u3_noun + u3wfu_fino(u3_noun cor) + { + u3_noun sut, dep, way, cug, van; + + if ( (c3n == u3r_mean(cor, u3x_sam_2, &dep, + u3x_sam_6, &way, + u3x_sam_7, &cug, + u3x_con, &van, + 0)) || + (u3_none == (sut = u3r_at(u3x_sam, van))) ) + { + return u3m_bail(c3__fail); + } else { + return _cqfu_fino(van, sut, dep, way, cug); + } + } + + u3_noun + u3qfu_fino(u3_noun van, + u3_noun sut, + u3_noun dep, + u3_noun way, + u3_noun cug) + { + c3_m fun_m = c3__fino; + u3_noun pro = u3z_find_4(fun_m, sut, dep, way, cug); + + if ( u3_none != pro ) { + return pro; + } + else { + pro = _cqfu_fino(van, sut, dep, way, cug); + + return u3z_save_4(fun_m, sut, dep, way, cug, pro); + } + } + + +/* boilerplate +*/ + u3_noun + u3wfu_find(u3_noun cor) + { + u3_noun sut, dep, way, cug, van; + + if ( (c3n == u3r_mean(cor, u3x_sam_2, &dep, + u3x_sam_6, &way, + u3x_sam_7, &cug, + u3x_con, &van, + 0)) || + (u3_none == (sut = u3r_at(u3x_sam, van))) ) + { + return u3m_bail(c3__fail); + } else { + return _cqfu_find(van, sut, dep, way, cug); + } + } + + u3_noun + u3qfu_find(u3_noun van, + u3_noun sut, + u3_noun dep, + u3_noun way, + u3_noun cug) + { + c3_m fun_m = c3__find; + u3_noun pro = u3z_find_4(fun_m, sut, dep, way, cug); + + if ( u3_none != pro ) { + return pro; + } + else { + pro = _cqfu_find(van, sut, dep, way, cug); + + return u3z_save_4(fun_m, sut, dep, way, cug, pro); + } + } +#endif /* logic */ + static u3_noun _find_in(u3_noun van, u3_noun sut, @@ -301,9 +1011,9 @@ u3_noun sut, u3_noun dep, u3_noun way, - u3_noun cog) + u3_noun cug) { - return _find_in(van, sut, dep, way, cog, u3_nul); + return _find_in(van, sut, dep, way, cug, u3_nul); } @@ -312,18 +1022,18 @@ u3_noun u3wfu_find(u3_noun cor) { - u3_noun sut, dep, way, cog, van; + u3_noun sut, dep, way, cug, van; if ( (c3n == u3r_mean(cor, u3x_sam_2, &dep, u3x_sam_6, &way, - u3x_sam_7, &cog, + u3x_sam_7, &cug, u3x_con, &van, 0)) || (u3_none == (sut = u3r_at(u3x_sam, van))) ) { return u3m_bail(c3__fail); } else { - return _cqfu_find(van, sut, dep, way, cog); + return _cqfu_find(van, sut, dep, way, cug); } } @@ -332,17 +1042,17 @@ u3_noun sut, u3_noun dep, u3_noun way, - u3_noun cog) + u3_noun cug) { c3_m fun_m = c3__find; - u3_noun pro = u3z_find_4(fun_m, sut, dep, way, cog); + u3_noun pro = u3z_find_4(fun_m, sut, dep, way, cug); if ( u3_none != pro ) { return pro; } else { - pro = _cqfu_find(van, sut, dep, way, cog); + pro = _cqfu_find(van, sut, dep, way, cug); - return u3z_save_4(fun_m, sut, dep, way, cog, pro); + return u3z_save_4(fun_m, sut, dep, way, cug, pro); } } diff --git a/jets/tree.c b/jets/tree.c index d30b058ca7..3e1183ef20 100644 --- a/jets/tree.c +++ b/jets/tree.c @@ -352,8 +352,6 @@ static u3j_harm _mood__hoon__ut_bust_a[] = {{".2", u3wfu_bust}, {}}; static u3j_harm _mood__hoon__ut_conk_a[] = {{".2", u3wfu_conk}, {}}; static u3j_harm _mood__hoon__ut_crop_a[] = {{".2", u3wfu_crop}, {}}; static u3j_harm _mood__hoon__ut_cull_a[] = {{".2", u3wfu_cull}, {}}; -static u3j_harm _mood__hoon__ut_find_a[] = {{".2", u3wfu_find}, {}}; -static u3j_harm _mood__hoon__ut_fink_a[] = {{".2", u3wfu_fink}, {}}; static u3j_harm _mood__hoon__ut_fire_a[] = {{".2", u3wfu_fire}, {}}; static u3j_harm _mood__hoon__ut_firm_a[] = {{".2", u3wfu_firm}, {}}; static u3j_harm _mood__hoon__ut_fish_a[] = {{".2", u3wfu_fish}, {}}; @@ -379,8 +377,6 @@ static u3j_core _mood__hoon__ut_d[] = { "conk", _mood__hoon__ut_conk_a }, { "crop", _mood__hoon__ut_crop_a }, { "cull", _mood__hoon__ut_cull_a }, - { "find", _mood__hoon__ut_find_a }, - { "fink", _mood__hoon__ut_fink_a }, { "fire", _mood__hoon__ut_fire_a }, { "firm", _mood__hoon__ut_firm_a }, { "fish", _mood__hoon__ut_fish_a }, From 12be0be7c2d6fc895f0cf7b5cba04fa318129f6d Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sat, 28 Nov 2015 06:03:01 -0800 Subject: [PATCH 012/137] Fino jetted. --- jets/f/ut_find.c | 5 +++-- jets/tree.c | 2 ++ noun/jets.c | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c index 543a260158..1527847877 100644 --- a/jets/f/ut_find.c +++ b/jets/f/ut_find.c @@ -3,7 +3,6 @@ */ #include "all.h" -#if 0 static u3_noun _fino_in(u3_noun van, u3_noun sut, @@ -318,7 +317,7 @@ } } } - +#if 0 static u3_noun _find_in(u3_noun van, u3_noun sut, @@ -620,6 +619,7 @@ { return _find_in(van, sut, dep, way, cug, u3_nul); } +#endif u3_noun _cqfu_fino(u3_noun van, @@ -674,6 +674,7 @@ /* boilerplate */ +#if 0 u3_noun u3wfu_find(u3_noun cor) { diff --git a/jets/tree.c b/jets/tree.c index 3e1183ef20..fd67df78e6 100644 --- a/jets/tree.c +++ b/jets/tree.c @@ -352,6 +352,7 @@ static u3j_harm _mood__hoon__ut_bust_a[] = {{".2", u3wfu_bust}, {}}; static u3j_harm _mood__hoon__ut_conk_a[] = {{".2", u3wfu_conk}, {}}; static u3j_harm _mood__hoon__ut_crop_a[] = {{".2", u3wfu_crop}, {}}; static u3j_harm _mood__hoon__ut_cull_a[] = {{".2", u3wfu_cull}, {}}; +static u3j_harm _mood__hoon__ut_fino_a[] = {{".2", u3wfu_fino, c3n}, {}}; static u3j_harm _mood__hoon__ut_fire_a[] = {{".2", u3wfu_fire}, {}}; static u3j_harm _mood__hoon__ut_firm_a[] = {{".2", u3wfu_firm}, {}}; static u3j_harm _mood__hoon__ut_fish_a[] = {{".2", u3wfu_fish}, {}}; @@ -377,6 +378,7 @@ static u3j_core _mood__hoon__ut_d[] = { "conk", _mood__hoon__ut_conk_a }, { "crop", _mood__hoon__ut_crop_a }, { "cull", _mood__hoon__ut_cull_a }, + { "fino", _mood__hoon__ut_fino_a }, { "fire", _mood__hoon__ut_fire_a }, { "firm", _mood__hoon__ut_firm_a }, { "fish", _mood__hoon__ut_fish_a }, diff --git a/noun/jets.c b/noun/jets.c index acc70703a9..05819f5f39 100644 --- a/noun/jets.c +++ b/noun/jets.c @@ -407,7 +407,7 @@ _cj_kick_z(u3_noun cor, u3j_core* cop_u, u3j_harm* ham_u, u3_atom axe) return u3m_bail(c3__fail); } else { -#if 1 +#if 0 fprintf(stderr, "test: %s %s\r\n", cop_u->cos_c, (!strcmp(".2", ham_u->fcs_c)) ? "$" : ham_u->fcs_c); From db4188d10556b5bced94017729286319a37123d5 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sat, 28 Nov 2015 13:08:52 -0800 Subject: [PATCH 013/137] Fixed up weird broken find. --- jets/f/ut_find.c | 690 ----------------------------------------------- jets/f/ut_fink.c | 54 +++- jets/f/ut_seek.c | 2 +- jets/tree.c | 4 +- 4 files changed, 46 insertions(+), 704 deletions(-) diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c index 1527847877..5bc8d26142 100644 --- a/jets/f/ut_find.c +++ b/jets/f/ut_find.c @@ -317,309 +317,6 @@ } } } -#if 0 - static u3_noun - _find_in(u3_noun van, - u3_noun sut, - u3_noun dep, - u3_noun way, - u3_noun cug, - u3_noun gil) - { - u3_noun p_sut, q_sut, pp_sut, qp_sut, rp_sut, sp_sut; - - if ( c3y == u3ud(sut) ) { - return u3nc(u3k(dep), u3_nul); - } - else switch ( u3h(sut) ) { - default: return u3nc(u3k(dep), u3_nul); - - case c3__bull: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) || - (c3n == u3r_qual(p_sut, &pp_sut, &qp_sut, &rp_sut, &sp_sut)) ) - { - return u3m_bail(c3__fail); - } - else { - if ( (c3n == u3du(cug)) || (c3n == u3r_sing(u3t(cug), pp_sut)) ) { - return _find_in - (van, q_sut, dep, way, cug, gil); - } - else { - if ( 0 == dep ) { - return u3nc(0, - u3nq(u3_nul, - u3k(rp_sut), - c3y, - u3k(sp_sut))); - } else { - return _find_in(van, q_sut, u3qa_dec(dep), way, cug, gil); - return u3nc(u3qa_dec(dep), u3_nul); - } - } - } - } - case c3__cell: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { - return u3m_bail(c3__fail); - } else { - u3_noun taf = _find_in(van, p_sut, dep, way, cug, gil); - u3_noun p_taf = u3h(taf); - u3_noun q_taf = u3t(taf); - u3_noun ret; - - if ( u3_nul == q_taf ) { - u3_noun bov = _find_in(van, q_sut, p_taf, way, cug, gil); - u3_noun p_bov = u3h(bov); - u3_noun q_bov = u3t(bov); - - if ( u3_nul == q_bov ) { - ret = u3k(bov); - } - else { - u3_noun puq_bov, quq_bov; - - u3r_mean(q_bov, 6, &puq_bov, 7, &quq_bov, 0); - ret = u3nq(u3k(p_bov), - u3_nul, - u3qc_peg(3, puq_bov), - u3k(quq_bov)); - } - u3z(bov); - } - else { - u3_noun puq_taf, quq_taf; - - u3r_mean(q_taf, 6, &puq_taf, 7, &quq_taf, 0); - ret = u3nq(u3k(p_taf), - u3_nul, - u3qc_peg(2, puq_taf), - u3k(quq_taf)); - } - u3z(taf); - return ret; - } - } - case c3__core: { - u3_noun pq_sut, qq_sut, rq_sut; - u3_noun prq_sut, qrq_sut; - - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) || - (c3n == u3r_trel(q_sut, &pq_sut, &qq_sut, &rq_sut)) || - (c3n == u3r_cell(rq_sut, &prq_sut, &qrq_sut)) ) - { - return u3m_bail(c3__fail); - } else { - u3_noun zem = (c3n == u3du(cug)) - ? u3_nul - : u3qf_look(u3t(cug), qrq_sut); - - if ( (u3_nul != zem) && (0 != dep) ) { - u3_noun ped; - - ped = u3qa_dec(dep); - u3z(dep); dep = ped; - - u3z(zem); - zem = u3_nul; - } - - if ( u3_nul == zem ) { - u3_noun taf = _find_in(van, p_sut, dep, way, cug, gil); - u3_noun p_taf = u3h(taf); - u3_noun q_taf = u3t(taf); - - if ( u3_nul == q_taf ) { - u3z(taf); - return u3nc(u3k(dep), u3_nul); - } - else { - u3_noun puq_taf, quq_taf; - u3_noun pro; - - u3r_mean(q_taf, 6, &puq_taf, 7, &quq_taf, 0); - - if ( c3n == u3qfu_park(van, sut, way, puq_taf) ) - { - u3_noun weh = u3qfu_shep - (van, "way", 'a', u3k(way)); - u3_noun waz = u3qfu_shep - (van, "axis", 'd', u3k(puq_taf)); - - u3t_push(u3nc(c3__mean, weh)); - u3t_push(u3nc(c3__mean, waz)); - return u3m_error("find-park"); - } - else { - pro = u3nq(u3k(p_taf), - u3_nul, - u3qc_peg(3, puq_taf), - u3k(quq_taf)); - - u3z(taf); - return pro; - } - } - } - else { - u3_noun u_zem = u3t(zem); - u3_noun pu_zem = u3h(u_zem); - u3_noun qu_zem = u3t(u_zem); - u3_noun mut; - u3_noun pro; - - mut = u3nt(c3__core, - u3k(p_sut), - u3nt(c3__gold, - u3k(qq_sut), - u3k(rq_sut))); - - pro = u3nc(0, - u3nq(u3_nul, - 1, - c3n, - u3nc(u3qc_peg(2, pu_zem), - u3nc(u3nc(mut, u3k(qu_zem)), - u3_nul)))); - u3z(zem); - return pro; - } - } - } - case c3__face: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { - return u3m_bail(c3__fail); - } else { - if ( (c3n == u3du(cug)) || (c3n == u3r_sing(u3t(cug), p_sut)) ) { - return u3nc(u3k(dep), u3_nul); - } else { - if ( 0 == dep ) { - return u3nc(0, - u3nq(u3_nul, - 1, - c3y, - u3k(q_sut))); - } else { - return u3nc(u3qa_dec(dep), u3_nul); - } - } - } - } - case c3__cube: { - u3_noun fop = u3qfu_repo(van, sut); - u3_noun pro = _find_in(van, fop, dep, way, cug, gil); - - u3z(fop); - return pro; - } - case c3__fork: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { - return u3m_bail(c3__fail); - } - - if ( (c3y == u3qdi_has(gil, q_sut)) ) { - return _find_in(van, p_sut, dep, way, cug, gil); - } - else if ( (c3y == u3qdi_has(gil, p_sut)) ) { - return _find_in(van, q_sut, dep, way, cug, gil); - } - else { - u3_noun hax = _find_in(van, p_sut, dep, way, cug, gil); - u3_noun yor = _find_in(van, q_sut, dep, way, cug, gil); - u3_noun p_hax = u3h(hax); - u3_noun p_yor = u3h(yor); - u3_noun q_hax = u3t(hax); - u3_noun q_yor = u3t(yor); - u3_noun puq_hax, quq_hax; - u3_noun puq_yor, quq_yor; - u3_noun ret = 0; - - if ( u3_nul != q_hax ) { - u3r_mean(q_hax, 6, &puq_hax, 7, &quq_hax, 0); - } - if ( u3_nul != q_yor ) { - u3r_mean(q_yor, 6, &puq_yor, 7, &quq_yor, 0); - } - - if ( c3y == u3r_sing(hax, yor) ) { - ret = u3k(hax); - } - else { - if ( (c3n == u3r_sing(p_hax, p_yor)) || - ((u3_nul == q_hax) || (u3_nul == q_yor)) || - (c3n == u3r_sing(puq_hax, puq_yor)) || - (c3n == u3r_sing(u3h(quq_hax), u3h(quq_yor))) ) - { - return u3m_error("find-fork"); - } - switch ( u3h(quq_hax) ) { - case c3y: { - u3_noun pquq_hax = u3t(quq_hax); - u3_noun pquq_yor = u3t(quq_yor); - - ret = u3nc(u3k(p_hax), - u3nq(u3_nul, - u3k(puq_hax), - c3y, - u3qf_fork(pquq_hax, pquq_yor))); - break; - } - case c3n: { - u3_noun pquq_hax, qquq_hax, pquq_yor, qquq_yor; - - u3x_cell(u3t(quq_hax), &pquq_hax, &qquq_hax); - u3x_cell(u3t(quq_yor), &pquq_yor, &qquq_yor); - - if ( c3n == u3r_sing(pquq_hax, pquq_yor) ) { - return u3m_error("find-fork"); - } else { - ret = u3nc(u3k(p_hax), - u3nq(u3_nul, - u3k(puq_hax), - c3n, - u3nc(u3k(pquq_hax), - u3qb_weld - (qquq_hax, qquq_yor)))); - break; - } - } - } - } - u3z(yor); - u3z(hax); - - return ret; - } - } - case c3__hold: p_sut = u3t(sut); - { - if ( (c3y == u3qdi_has(gil, sut)) ) { - return u3nc(u3k(dep), u3_nul); - } - else { - u3_noun zoc = u3qdi_put(gil, sut); - u3_noun fop = u3qfu_repo(van, sut); - u3_noun pro = _find_in(van, fop, dep, way, cug, zoc); - - u3z(fop); - u3z(zoc); - - return pro; - } - } - } - } - - u3_noun - _cqfu_find(u3_noun van, - u3_noun sut, - u3_noun dep, - u3_noun way, - u3_noun cug) - { - return _find_in(van, sut, dep, way, cug, u3_nul); - } -#endif u3_noun _cqfu_fino(u3_noun van, @@ -670,390 +367,3 @@ return u3z_save_4(fun_m, sut, dep, way, cug, pro); } } - - -/* boilerplate -*/ -#if 0 - u3_noun - u3wfu_find(u3_noun cor) - { - u3_noun sut, dep, way, cug, van; - - if ( (c3n == u3r_mean(cor, u3x_sam_2, &dep, - u3x_sam_6, &way, - u3x_sam_7, &cug, - u3x_con, &van, - 0)) || - (u3_none == (sut = u3r_at(u3x_sam, van))) ) - { - return u3m_bail(c3__fail); - } else { - return _cqfu_find(van, sut, dep, way, cug); - } - } - - u3_noun - u3qfu_find(u3_noun van, - u3_noun sut, - u3_noun dep, - u3_noun way, - u3_noun cug) - { - c3_m fun_m = c3__find; - u3_noun pro = u3z_find_4(fun_m, sut, dep, way, cug); - - if ( u3_none != pro ) { - return pro; - } - else { - pro = _cqfu_find(van, sut, dep, way, cug); - - return u3z_save_4(fun_m, sut, dep, way, cug, pro); - } - } -#endif - -/* logic -*/ - - static u3_noun - _find_in(u3_noun van, - u3_noun sut, - u3_noun dep, - u3_noun way, - u3_noun cog, - u3_noun gil) - { - u3_noun p_sut, q_sut, pp_sut, qp_sut, rp_sut, sp_sut; - - if ( c3y == u3ud(sut) ) { - return u3nc(u3k(dep), u3_nul); - } - else switch ( u3h(sut) ) { - default: return u3nc(u3k(dep), u3_nul); - - case c3__bull: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) || - (c3n == u3r_qual(p_sut, &pp_sut, &qp_sut, &rp_sut, &sp_sut)) ) - { - return u3m_bail(c3__fail); - } - else { - if ( c3n == u3r_sing(cog, pp_sut) ) { - return _find_in - (van, q_sut, dep, way, cog, gil); - } - else { - if ( 0 == dep ) { - return u3nc(0, - u3nq(u3_nul, - u3k(rp_sut), - c3y, - u3k(sp_sut))); - } else { - return _find_in(van, q_sut, u3qa_dec(dep), way, cog, gil); - return u3nc(u3qa_dec(dep), u3_nul); - } - } - } - } - case c3__cell: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { - return u3m_bail(c3__fail); - } else { - u3_noun taf = _find_in(van, p_sut, dep, way, cog, gil); - u3_noun p_taf = u3h(taf); - u3_noun q_taf = u3t(taf); - u3_noun ret; - - if ( u3_nul == q_taf ) { - u3_noun bov = _find_in(van, q_sut, p_taf, way, cog, gil); - u3_noun p_bov = u3h(bov); - u3_noun q_bov = u3t(bov); - - if ( u3_nul == q_bov ) { - ret = u3k(bov); - } - else { - u3_noun puq_bov, quq_bov; - - u3r_mean(q_bov, 6, &puq_bov, 7, &quq_bov, 0); - ret = u3nq(u3k(p_bov), - u3_nul, - u3qc_peg(3, puq_bov), - u3k(quq_bov)); - } - u3z(bov); - } - else { - u3_noun puq_taf, quq_taf; - - u3r_mean(q_taf, 6, &puq_taf, 7, &quq_taf, 0); - ret = u3nq(u3k(p_taf), - u3_nul, - u3qc_peg(2, puq_taf), - u3k(quq_taf)); - } - u3z(taf); - return ret; - } - } - case c3__core: { - u3_noun pq_sut, qq_sut, rq_sut; - u3_noun prq_sut, qrq_sut; - - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) || - (c3n == u3r_trel(q_sut, &pq_sut, &qq_sut, &rq_sut)) || - (c3n == u3r_cell(rq_sut, &prq_sut, &qrq_sut)) ) - { - return u3m_bail(c3__fail); - } else { - u3_noun zem = u3qf_look(cog, qrq_sut); - - if ( (u3_nul != zem) && (0 != dep) ) { - u3_noun ped; - - ped = u3qa_dec(dep); - u3z(dep); dep = ped; - - u3z(zem); - zem = u3_nul; - } - - if ( u3_nul == zem ) { - u3_noun taf = _find_in(van, p_sut, dep, way, cog, gil); - u3_noun p_taf = u3h(taf); - u3_noun q_taf = u3t(taf); - - if ( u3_nul == q_taf ) { - u3z(taf); - return u3nc(u3k(dep), u3_nul); - } - else { - u3_noun puq_taf, quq_taf; - u3_noun pro; - - u3r_mean(q_taf, 6, &puq_taf, 7, &quq_taf, 0); - - if ( c3n == u3qfu_park(van, sut, way, puq_taf) ) - { - u3_noun weh = u3qfu_shep - (van, "way", 'a', u3k(way)); - u3_noun waz = u3qfu_shep - (van, "axis", 'd', u3k(puq_taf)); - - u3t_push(u3nc(c3__mean, weh)); - u3t_push(u3nc(c3__mean, waz)); - return u3m_error("find-park"); - } - else { - pro = u3nq(u3k(p_taf), - u3_nul, - u3qc_peg(3, puq_taf), - u3k(quq_taf)); - - u3z(taf); - return pro; - } - } - } - else { - u3_noun u_zem = u3t(zem); - u3_noun pu_zem = u3h(u_zem); - u3_noun qu_zem = u3t(u_zem); - u3_noun mut; - u3_noun pro; - - mut = u3nt(c3__core, - u3k(p_sut), - u3nt(c3__gold, - u3k(qq_sut), - u3k(rq_sut))); - - pro = u3nc(0, - u3nq(u3_nul, - 1, - c3n, - u3nc(u3qc_peg(2, pu_zem), - u3nc(u3nc(mut, u3k(qu_zem)), - u3_nul)))); - u3z(zem); - return pro; - } - } - } - case c3__face: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { - return u3m_bail(c3__fail); - } else { - if ( c3n == u3r_sing(cog, p_sut) ) { - return u3nc(u3k(dep), u3_nul); - } else { - if ( 0 == dep ) { - return u3nc(0, - u3nq(u3_nul, - 1, - c3y, - u3k(q_sut))); - } else { - return u3nc(u3qa_dec(dep), u3_nul); - } - } - } - } - case c3__cube: { - u3_noun fop = u3qfu_repo(van, sut); - u3_noun pro = _find_in(van, fop, dep, way, cog, gil); - - u3z(fop); - return pro; - } - case c3__fork: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { - return u3m_bail(c3__fail); - } - - if ( (c3y == u3qdi_has(gil, q_sut)) ) { - return _find_in(van, p_sut, dep, way, cog, gil); - } - else if ( (c3y == u3qdi_has(gil, p_sut)) ) { - return _find_in(van, q_sut, dep, way, cog, gil); - } - else { - u3_noun hax = _find_in(van, p_sut, dep, way, cog, gil); - u3_noun yor = _find_in(van, q_sut, dep, way, cog, gil); - u3_noun p_hax = u3h(hax); - u3_noun p_yor = u3h(yor); - u3_noun q_hax = u3t(hax); - u3_noun q_yor = u3t(yor); - u3_noun puq_hax, quq_hax; - u3_noun puq_yor, quq_yor; - u3_noun ret = 0; - - if ( u3_nul != q_hax ) { - u3r_mean(q_hax, 6, &puq_hax, 7, &quq_hax, 0); - } - if ( u3_nul != q_yor ) { - u3r_mean(q_yor, 6, &puq_yor, 7, &quq_yor, 0); - } - - if ( c3y == u3r_sing(hax, yor) ) { - ret = u3k(hax); - } - else { - if ( (c3n == u3r_sing(p_hax, p_yor)) || - ((u3_nul == q_hax) || (u3_nul == q_yor)) || - (c3n == u3r_sing(puq_hax, puq_yor)) || - (c3n == u3r_sing(u3h(quq_hax), u3h(quq_yor))) ) - { - return u3m_error("find-fork"); - } - switch ( u3h(quq_hax) ) { - case c3y: { - u3_noun pquq_hax = u3t(quq_hax); - u3_noun pquq_yor = u3t(quq_yor); - - ret = u3nc(u3k(p_hax), - u3nq(u3_nul, - u3k(puq_hax), - c3y, - u3qf_fork(pquq_hax, pquq_yor))); - break; - } - case c3n: { - u3_noun pquq_hax, qquq_hax, pquq_yor, qquq_yor; - - u3x_cell(u3t(quq_hax), &pquq_hax, &qquq_hax); - u3x_cell(u3t(quq_yor), &pquq_yor, &qquq_yor); - - if ( c3n == u3r_sing(pquq_hax, pquq_yor) ) { - return u3m_error("find-fork"); - } else { - ret = u3nc(u3k(p_hax), - u3nq(u3_nul, - u3k(puq_hax), - c3n, - u3nc(u3k(pquq_hax), - u3qb_weld - (qquq_hax, qquq_yor)))); - break; - } - } - } - } - u3z(yor); - u3z(hax); - - return ret; - } - } - case c3__hold: p_sut = u3t(sut); - { - if ( (c3y == u3qdi_has(gil, sut)) ) { - return u3nc(u3k(dep), u3_nul); - } - else { - u3_noun zoc = u3qdi_put(gil, sut); - u3_noun fop = u3qfu_repo(van, sut); - u3_noun pro = _find_in(van, fop, dep, way, cog, zoc); - - u3z(fop); - u3z(zoc); - - return pro; - } - } - } - } - - u3_noun - _cqfu_find(u3_noun van, - u3_noun sut, - u3_noun dep, - u3_noun way, - u3_noun cug) - { - return _find_in(van, sut, dep, way, cug, u3_nul); - } - - -/* boilerplate -*/ - u3_noun - u3wfu_find(u3_noun cor) - { - u3_noun sut, dep, way, cug, van; - - if ( (c3n == u3r_mean(cor, u3x_sam_2, &dep, - u3x_sam_6, &way, - u3x_sam_7, &cug, - u3x_con, &van, - 0)) || - (u3_none == (sut = u3r_at(u3x_sam, van))) ) - { - return u3m_bail(c3__fail); - } else { - return _cqfu_find(van, sut, dep, way, cug); - } - } - - u3_noun - u3qfu_find(u3_noun van, - u3_noun sut, - u3_noun dep, - u3_noun way, - u3_noun cug) - { - c3_m fun_m = c3__find; - u3_noun pro = u3z_find_4(fun_m, sut, dep, way, cug); - - if ( u3_none != pro ) { - return pro; - } - else { - pro = _cqfu_find(van, sut, dep, way, cug); - - return u3z_save_4(fun_m, sut, dep, way, cug, pro); - } - } diff --git a/jets/f/ut_fink.c b/jets/f/ut_fink.c index 00d56a1346..716e2568fa 100644 --- a/jets/f/ut_fink.c +++ b/jets/f/ut_fink.c @@ -6,34 +6,66 @@ /* logic */ + static u3_noun + _fink_flee(u3_noun poy) + { + u3_noun p_poy = u3h(poy); + u3_noun q_poy = u3t(poy); + + switch ( u3h(q_poy) ) { + default: return u3m_bail(c3__fail); + case 0: { + u3_noun pq_poy = u3t(q_poy); + + return u3nt(u3k(p_poy), c3y, u3k(pq_poy)); + } + case 1: { + u3_noun pq_poy = u3h(u3t(q_poy)); + u3_noun qq_poy = u3t(u3t(q_poy)); + + return u3nq(u3k(p_poy), c3n, u3k(pq_poy), u3k(qq_poy)); + } + case 2: { + u3_noun pq_poy = u3h(u3t(q_poy)); + // u3_noun qq_poy = u3t(u3t(q_poy)); + // u3_noun ppq_poy = u3h(pq_poy); + // u3_noun qpq_poy = u3h(u3t(pq_poy)); + u3_noun rpq_poy = u3h(u3t(u3t(pq_poy))); + u3_noun spq_poy = u3t(u3t(u3t(pq_poy))); + + return u3nt(u3qc_peg(p_poy, rpq_poy), c3y, u3k(spq_poy)); + } + } + } + u3_noun _cqfu_fink(u3_noun van, u3_noun sut, u3_noun dep, u3_noun way, - u3_noun cog) + u3_noun cug) { // u3_noun dun = u3qfu_dunq(van, "type", sut); - u3_noun nuc = (u3_blip == cog) + u3_noun nuc = (u3_blip == cug) ? u3qfu_shew(van, u3nc(u3nc('c', u3i_string("find-limb")), '$')) - : u3qfu_shep(van, "find-limb", 'a', u3k(cog)); + : u3qfu_shep(van, "find-limb", 'a', u3k(cug)); u3_noun pro; // u3t_push(u3nc(c3__mean, dun)); u3t_push(u3nc(c3__mean, nuc)); { - u3_noun hoq = u3qfu_find(van, sut, dep, way, cog); + u3_noun hoq = u3qfu_fino(van, sut, dep, way, cug); u3_noun fin = u3t(hoq); if ( u3_nul == fin ) { - // u3m_p("cog", cog); + // u3m_p("cug", cug); return u3m_error("find-none"); } else { - pro = u3k(u3t(fin)); + pro = _fink_flee(u3t(fin)); u3z(hoq); } } @@ -48,18 +80,18 @@ u3_noun u3wfu_fink(u3_noun cor) { - u3_noun sut, dep, way, cog, van; + u3_noun sut, dep, way, cug, van; if ( (c3n == u3r_mean(cor, u3x_sam_2, &dep, u3x_sam_6, &way, - u3x_sam_7, &cog, + u3x_sam_7, &cug, u3x_con, &van, 0)) || (u3_none == (sut = u3r_at(u3x_sam, van))) ) { return u3m_bail(c3__fail); } else { - return _cqfu_fink(van, sut, dep, way, cog); + return _cqfu_fink(van, sut, dep, way, cug); } } @@ -68,7 +100,7 @@ u3_noun sut, u3_noun dep, u3_noun way, - u3_noun cog) + u3_noun cug) { - return _cqfu_fink(van, sut, dep, way, cog); + return _cqfu_fink(van, sut, dep, way, cug); } diff --git a/jets/f/ut_seek.c b/jets/f/ut_seek.c index 00918415d5..329593cc00 100644 --- a/jets/f/ut_seek.c +++ b/jets/f/ut_seek.c @@ -182,7 +182,7 @@ if ( c3n == u3r_cell(u3t(yip), &p_yip, &q_yip) ) { return u3m_bail(c3__fail); } - hud = u3qfu_fink(van, syp, p_yip, way, u3t(q_yip)); + hud = u3qfu_fink(van, syp, p_yip, way, q_yip); { u3_noun p_hud, q_hud; diff --git a/jets/tree.c b/jets/tree.c index fd67df78e6..931e49f01f 100644 --- a/jets/tree.c +++ b/jets/tree.c @@ -352,7 +352,7 @@ static u3j_harm _mood__hoon__ut_bust_a[] = {{".2", u3wfu_bust}, {}}; static u3j_harm _mood__hoon__ut_conk_a[] = {{".2", u3wfu_conk}, {}}; static u3j_harm _mood__hoon__ut_crop_a[] = {{".2", u3wfu_crop}, {}}; static u3j_harm _mood__hoon__ut_cull_a[] = {{".2", u3wfu_cull}, {}}; -static u3j_harm _mood__hoon__ut_fino_a[] = {{".2", u3wfu_fino, c3n}, {}}; +static u3j_harm _mood__hoon__ut_find_a[] = {{".2", u3wfu_find}, {}}; static u3j_harm _mood__hoon__ut_fire_a[] = {{".2", u3wfu_fire}, {}}; static u3j_harm _mood__hoon__ut_firm_a[] = {{".2", u3wfu_firm}, {}}; static u3j_harm _mood__hoon__ut_fish_a[] = {{".2", u3wfu_fish}, {}}; @@ -378,7 +378,7 @@ static u3j_core _mood__hoon__ut_d[] = { "conk", _mood__hoon__ut_conk_a }, { "crop", _mood__hoon__ut_crop_a }, { "cull", _mood__hoon__ut_cull_a }, - { "fino", _mood__hoon__ut_fino_a }, + { "find", _mood__hoon__ut_find_a }, { "fire", _mood__hoon__ut_fire_a }, { "firm", _mood__hoon__ut_firm_a }, { "fish", _mood__hoon__ut_fish_a }, From 62573101a8bbfa7a7f84b2bc34177b7837b32836 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sat, 28 Nov 2015 13:11:09 -0800 Subject: [PATCH 014/137] Correct last checkin. --- include/jets/q.h | 1 - include/jets/w.h | 2 -- jets/f/ut_find.c | 38 +++++++++++++++++++------------------- jets/f/ut_fink.c | 2 +- 4 files changed, 20 insertions(+), 23 deletions(-) diff --git a/include/jets/q.h b/include/jets/q.h index f0c1cc814b..3b5d1e4040 100644 --- a/include/jets/q.h +++ b/include/jets/q.h @@ -201,7 +201,6 @@ u3_noun u3qfu_dung(u3_noun, u3_noun cap, u3_noun); u3_noun u3qfu_dunq(u3_noun, const c3_c*, u3_noun); u3_noun u3qfu_find(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); - u3_noun u3qfu_fino(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); u3_noun u3qfu_finc(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); u3_noun u3qfu_fink(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); u3_noun u3qfu_fire(u3_noun, u3_noun, u3_noun); diff --git a/include/jets/w.h b/include/jets/w.h index ea1d1d1ad4..a2dc2cbb8c 100644 --- a/include/jets/w.h +++ b/include/jets/w.h @@ -219,9 +219,7 @@ u3_noun u3wfu_crop(u3_noun); u3_noun u3wfu_cull(u3_noun); u3_noun u3wfu_duck(u3_noun); - u3_noun u3wfu_finc(u3_noun); u3_noun u3wfu_find(u3_noun); - u3_noun u3wfu_fino(u3_noun); u3_noun u3wfu_fink(u3_noun); u3_noun u3wfu_fire(u3_noun); u3_noun u3wfu_firm(u3_noun); diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c index 5bc8d26142..57a01dfe12 100644 --- a/jets/f/ut_find.c +++ b/jets/f/ut_find.c @@ -4,7 +4,7 @@ #include "all.h" static u3_noun - _fino_in(u3_noun van, + _find_in(u3_noun van, u3_noun sut, u3_noun dep, u3_noun way, @@ -26,7 +26,7 @@ else { if ( (c3n == u3du(cug)) || (c3n == u3r_sing(u3t(cug), u3h(p_sut))) ) { - return _fino_in(van, q_sut, dep, way, cug, gil); + return _find_in(van, q_sut, dep, way, cug, gil); } else { if ( 0 == dep ) { @@ -36,7 +36,7 @@ u3nt(2, u3k(p_sut), u3k(q_sut)))); } else { - return _fino_in(van, q_sut, u3qa_dec(dep), way, cug, gil); + return _find_in(van, q_sut, u3qa_dec(dep), way, cug, gil); } } } @@ -45,13 +45,13 @@ if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { return u3m_bail(c3__fail); } else { - u3_noun taf = _fino_in(van, p_sut, dep, way, cug, gil); + u3_noun taf = _find_in(van, p_sut, dep, way, cug, gil); u3_noun p_taf = u3h(taf); u3_noun q_taf = u3t(taf); u3_noun ret; if ( u3_nul == q_taf ) { - u3_noun bov = _fino_in(van, q_sut, p_taf, way, cug, gil); + u3_noun bov = _find_in(van, q_sut, p_taf, way, cug, gil); u3_noun p_bov = u3h(bov); u3_noun q_bov = u3t(bov); @@ -107,7 +107,7 @@ } if ( u3_nul == zem ) { - u3_noun taf = _fino_in(van, p_sut, dep, way, cug, gil); + u3_noun taf = _find_in(van, p_sut, dep, way, cug, gil); u3_noun p_taf = u3h(taf); u3_noun q_taf = u3t(taf); @@ -184,7 +184,7 @@ } case c3__cube: { u3_noun fop = u3qfu_repo(van, sut); - u3_noun pro = _fino_in(van, fop, dep, way, cug, gil); + u3_noun pro = _find_in(van, fop, dep, way, cug, gil); u3z(fop); return pro; @@ -195,14 +195,14 @@ } if ( (c3y == u3qdi_has(gil, q_sut)) ) { - return _fino_in(van, p_sut, dep, way, cug, gil); + return _find_in(van, p_sut, dep, way, cug, gil); } else if ( (c3y == u3qdi_has(gil, p_sut)) ) { - return _fino_in(van, q_sut, dep, way, cug, gil); + return _find_in(van, q_sut, dep, way, cug, gil); } else { - u3_noun hax = _fino_in(van, p_sut, dep, way, cug, gil); - u3_noun yor = _fino_in(van, q_sut, dep, way, cug, gil); + u3_noun hax = _find_in(van, p_sut, dep, way, cug, gil); + u3_noun yor = _find_in(van, q_sut, dep, way, cug, gil); u3_noun p_hax = u3h(hax); u3_noun p_yor = u3h(yor); u3_noun q_hax = u3t(hax); @@ -307,7 +307,7 @@ else { u3_noun zoc = u3qdi_put(gil, sut); u3_noun fop = u3qfu_repo(van, sut); - u3_noun pro = _fino_in(van, fop, dep, way, cug, zoc); + u3_noun pro = _find_in(van, fop, dep, way, cug, zoc); u3z(fop); u3z(zoc); @@ -319,19 +319,19 @@ } u3_noun - _cqfu_fino(u3_noun van, + _cqfu_find(u3_noun van, u3_noun sut, u3_noun dep, u3_noun way, u3_noun cug) { - return _fino_in(van, sut, dep, way, cug, u3_nul); + return _find_in(van, sut, dep, way, cug, u3_nul); } /* boilerplate */ u3_noun - u3wfu_fino(u3_noun cor) + u3wfu_find(u3_noun cor) { u3_noun sut, dep, way, cug, van; @@ -344,25 +344,25 @@ { return u3m_bail(c3__fail); } else { - return _cqfu_fino(van, sut, dep, way, cug); + return _cqfu_find(van, sut, dep, way, cug); } } u3_noun - u3qfu_fino(u3_noun van, + u3qfu_find(u3_noun van, u3_noun sut, u3_noun dep, u3_noun way, u3_noun cug) { - c3_m fun_m = c3__fino; + c3_m fun_m = c3__find; u3_noun pro = u3z_find_4(fun_m, sut, dep, way, cug); if ( u3_none != pro ) { return pro; } else { - pro = _cqfu_fino(van, sut, dep, way, cug); + pro = _cqfu_find(van, sut, dep, way, cug); return u3z_save_4(fun_m, sut, dep, way, cug, pro); } diff --git a/jets/f/ut_fink.c b/jets/f/ut_fink.c index 716e2568fa..27e45db105 100644 --- a/jets/f/ut_fink.c +++ b/jets/f/ut_fink.c @@ -57,7 +57,7 @@ // u3t_push(u3nc(c3__mean, dun)); u3t_push(u3nc(c3__mean, nuc)); { - u3_noun hoq = u3qfu_fino(van, sut, dep, way, cug); + u3_noun hoq = u3qfu_find(van, sut, dep, way, cug); u3_noun fin = u3t(hoq); if ( u3_nul == fin ) { From b87a4080fc211ab9ddfd53423c09985cbbabb6ea Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sat, 28 Nov 2015 15:07:38 -0800 Subject: [PATCH 015/137] ++heal fully updated. --- jets/f/ut_heal.c | 61 ++++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/jets/f/ut_heal.c b/jets/f/ut_heal.c index 8c7107d26e..8eddd0a566 100644 --- a/jets/f/ut_heal.c +++ b/jets/f/ut_heal.c @@ -3,8 +3,6 @@ */ #include "all.h" - - /* internals */ static u3_noun @@ -13,7 +11,7 @@ static u3_noun _heal_by(u3_noun van, u3_noun sut, - u3_noun qog, + u3_noun qug, u3_noun ref) { u3_noun p_sut, q_sut; @@ -30,11 +28,12 @@ } case c3__bull: u3x_cell(u3t(sut), &p_sut, &q_sut); { - if ( c3y == u3r_sing(u3h(p_sut), u3t(qog)) ) { + if ( (c3y == u3du(u3t(qug))) && + (c3y == u3r_sing(u3h(p_sut), u3t(u3t(qug))) ) ) { return u3k(ref); } else { - u3_noun sub = _heal_by(van, q_sut, qog, ref); + u3_noun sub = _heal_by(van, q_sut, qug, ref); u3_noun ret; ret = u3qfu_busk(van, @@ -48,22 +47,23 @@ } case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); { - if ( c3y == u3r_sing(p_sut, u3t(qog)) ) { + if ( (c3n == u3du(u3t(qug))) || + (c3y == u3r_sing(p_sut, u3t(u3t(qug)))) ) { return u3qf_face(p_sut, ref); } else return u3m_error("heal-name"); } case c3__hold: { u3_noun rep = u3qfu_repo(van, sut); - u3_noun ret = _heal_by(van, rep, qog, ref); + u3_noun ret = _heal_by(van, rep, qug, ref); u3z(rep); return ret; } case c3__fork: u3x_cell(u3t(sut), &p_sut, &q_sut); { - u3_noun dis = _heal_by(van, p_sut, qog, ref); - u3_noun dat = _heal_by(van, q_sut, qog, ref); + u3_noun dis = _heal_by(van, p_sut, qug, ref); + u3_noun dat = _heal_by(van, q_sut, qug, ref); u3_noun ret = u3qf_fork(dis, dat); u3z(dis); @@ -77,7 +77,7 @@ _heal_to(u3_noun van, u3_noun sut, u3_noun gil, - u3_noun qog, + u3_noun qug, u3_noun ref, u3_atom now, u3_atom lat) @@ -94,7 +94,7 @@ case c3__bull: u3x_cell(u3t(sut), &p_sut, &q_sut); { - u3_noun sub = _heal_to(van, q_sut, gil, qog, ref, now, lat); + u3_noun sub = _heal_to(van, q_sut, gil, qug, ref, now, lat); u3_noun ret; ret = u3qfu_busk @@ -108,10 +108,10 @@ u3_noun ter, ret; if ( 2 == now ) { - ter = _heal_as(van, p_sut, qog, lat, ref); + ter = _heal_as(van, p_sut, qug, lat, ref); ret = u3qf_cell(ter, q_sut); } else { - ter = _heal_as(van, q_sut, qog, lat, ref); + ter = _heal_as(van, q_sut, qug, lat, ref); ret = u3qf_cell(p_sut, ter); } u3z(ter); @@ -123,7 +123,7 @@ if ( 3 != now ) { return u3m_error("heal-core"); } else { - u3_noun ter = _heal_as(van, p_sut, qog, lat, ref); + u3_noun ter = _heal_as(van, p_sut, qug, lat, ref); u3_noun ret = u3qf_core(ter, q_sut); u3z(ter); @@ -132,7 +132,7 @@ } case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); { - u3_noun dun = _heal_to(van, q_sut, gil, qog, ref, now, lat); + u3_noun dun = _heal_to(van, q_sut, gil, qug, ref, now, lat); u3_noun ret = u3qf_face(p_sut, dun); u3z(dun); @@ -140,8 +140,8 @@ } case c3__fork: u3x_cell(u3t(sut), &p_sut, &q_sut); { - u3_noun dis = _heal_to(van, p_sut, gil, qog, ref, now, lat); - u3_noun dat = _heal_to(van, q_sut, gil, qog, ref, now, lat); + u3_noun dis = _heal_to(van, p_sut, gil, qug, ref, now, lat); + u3_noun dat = _heal_to(van, q_sut, gil, qug, ref, now, lat); u3_noun ret = u3qf_fork(dis, dat); u3z(dis); @@ -156,7 +156,7 @@ else { u3_noun zoc = u3qdi_put(gil, sut); u3_noun rep = u3qfu_repo(van, sut); - u3_noun ret = _heal_to(van, rep, zoc, qog, ref, now, lat); + u3_noun ret = _heal_to(van, rep, zoc, qug, ref, now, lat); u3z(rep); u3z(zoc); @@ -168,7 +168,7 @@ repo: { u3_noun rep = u3qfu_repo(van, sut); - u3_noun ret = _heal_to(van, rep, gil, qog, ref, now, lat); + u3_noun ret = _heal_to(van, rep, gil, qug, ref, now, lat); u3z(rep); return ret; @@ -178,19 +178,19 @@ static u3_noun _heal_as(u3_noun van, u3_noun sut, - u3_noun qog, + u3_noun qug, u3_atom axe, u3_noun ref) { if ( 1 == axe ) { - if ( u3_nul == qog ) { + if ( u3_nul == qug ) { return u3k(ref); - } else return _heal_by(van, sut, qog, ref); + } else return _heal_by(van, sut, qug, ref); } else { u3_atom now = u3qc_cap(axe); u3_atom lat = u3qc_mas(axe); - u3_noun ret = _heal_to(van, sut, u3_nul, qog, ref, now, lat); + u3_noun ret = _heal_to(van, sut, u3_nul, qug, ref, now, lat); u3z(lat); return ret; @@ -202,11 +202,11 @@ u3_noun _cqfu_heal(u3_noun van, u3_noun sut, - u3_noun qog, + u3_noun qug, u3_noun axe, u3_noun ref) { - return _heal_as(van, sut, qog, axe, ref); + return _heal_as(van, sut, qug, axe, ref); } /* boilerplate @@ -214,9 +214,9 @@ u3_noun u3wfu_heal(u3_noun cor) { - u3_noun van, sut, qog, axe, ref; + u3_noun van, sut, qug, axe, ref; - if ( (c3n == u3r_mean(cor, u3x_sam_2, &qog, + if ( (c3n == u3r_mean(cor, u3x_sam_2, &qug, u3x_sam_6, &axe, u3x_sam_7, &ref, u3x_con, &van, @@ -226,16 +226,17 @@ { return u3m_bail(c3__fail); } else { - return _cqfu_heal(van, sut, qog, axe, ref); + return _cqfu_heal(van, sut, qug, axe, ref); } } u3_noun u3qfu_heal(u3_noun van, u3_noun sut, - u3_noun qog, + u3_noun qug, u3_noun axe, u3_noun ref) { - return _cqfu_heal(van, sut, qog, axe, ref); + return _cqfu_heal(van, sut, qug, axe, ref); } + From 7f0312b8b4507794695782fc909be75a1469a8ee Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Wed, 9 Dec 2015 15:24:29 -0800 Subject: [PATCH 016/137] With new type printer. --- jets/f/ut_nest.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index 438b16ce1d..6147584f5e 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -309,11 +309,11 @@ if ( (c3y == tyn) || (c3n == tel) ) { return tyn; } else { - // u3_noun dun = u3qfu_dunq(van, "need", sut); - // u3_noun niz = u3qfu_dunq(van, "have", ref); + u3_noun dun = u3qfu_dunq(van, "need", sut); + u3_noun niz = u3qfu_dunq(van, "have", ref); - // u3t_push(u3nc(c3__mean, dun)); - // u3t_push(u3nc(c3__mean, niz)); + u3t_push(u3nc(c3__mean, dun)); + u3t_push(u3nc(c3__mean, niz)); return u3m_error("type-fail"); } From 3fa4da229c98498fbbb9d514c9d16fb484b09e52 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Wed, 9 Dec 2015 17:05:01 -0800 Subject: [PATCH 017/137] Fixed trap bug. Still traditional syntax. --- jets/f/ut_nest.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index 6147584f5e..438b16ce1d 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -309,11 +309,11 @@ if ( (c3y == tyn) || (c3n == tel) ) { return tyn; } else { - u3_noun dun = u3qfu_dunq(van, "need", sut); - u3_noun niz = u3qfu_dunq(van, "have", ref); + // u3_noun dun = u3qfu_dunq(van, "need", sut); + // u3_noun niz = u3qfu_dunq(van, "have", ref); - u3t_push(u3nc(c3__mean, dun)); - u3t_push(u3nc(c3__mean, niz)); + // u3t_push(u3nc(c3__mean, dun)); + // u3t_push(u3nc(c3__mean, niz)); return u3m_error("type-fail"); } From dea5e57fb53c034a873f9872cb998ea6cab88aff Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Fri, 11 Dec 2015 20:20:25 -0800 Subject: [PATCH 018/137] Eradicate %kthx. --- jets/f/ut_mint.c | 23 ----------------------- jets/f/ut_mull.c | 12 ------------ jets/f/ut_play.c | 5 ----- 3 files changed, 40 deletions(-) diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index ee9655e733..57812fe11d 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -619,29 +619,6 @@ int FOO; u3z(zel); return ret; } - case c3__kthx: u3x_cell(u3t(gen), &p_gen, &q_gen); - _mint_used(); - { - u3_noun huz = u3qfu_play(van, sut, p_gen); - u3_noun hif = _mint_nice(van, gol, huz); - u3_noun zel = _mint_in(van, sut, hif, q_gen); - u3_noun ret = u3nc(hif, u3k(u3t(zel))); - -#if 0 - { - u3_noun goz = u3qfu_play(van, sut, q_gen); - u3_noun bar; - - FOO = 1; - fprintf(stderr, "\r\n"); - bar = u3qfu_nest(van, huz, c3n, goz); - fprintf(stderr, "kthx: bar %d\r\n", bar); - FOO = 0; - } -#endif - u3z(zel); - return ret; - } case c3__tsgr: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index d1df014428..04a76ef7c3 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -582,18 +582,6 @@ u3z(zel); return ret; } - case c3__kthx: u3x_cell(u3t(gen), &p_gen, &q_gen); - _mull_used(); - { - u3_noun p_hif = _mull_nice(van, gol, u3qfu_play(van, sut, p_gen)); - u3_noun q_hif = u3qfu_play(van, dox, p_gen); - - u3_noun zel = _mull_in(van, sut, p_hif, dox, q_gen); - u3_noun ret = u3nc(p_hif, q_hif); - - u3z(zel); - return ret; - } case c3__tsgr: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index 2ae8c27078..0a769b0674 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -325,11 +325,6 @@ { return _play_x(van, sut, p_gen); } - case c3__kthx: u3x_cell(u3t(gen), &p_gen, &q_gen); - _play_used(); - { - return _play_x(van, sut, p_gen); - } case c3__ktls: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { From 1f58424cdff2bc569e75a22139f76cae41f46ce1 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Fri, 11 Dec 2015 20:48:54 -0800 Subject: [PATCH 019/137] %kthp to %kthz. --- jets/f/ap.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/jets/f/ap.c b/jets/f/ap.c index 8670954978..2573f9d8b7 100644 --- a/jets/f/ap.c +++ b/jets/f/ap.c @@ -22,6 +22,19 @@ static u3_noun _open_in(u3_noun ter, u3_noun gen); +#if 0 + /* ~(. al gen) + */ + static u3_noun + _al_bore(u3_noun ter, + u3_noun gen) + { + u3_noun gat = u3j_hook(u3k(ter), "al"); + + return u3i_molt(gat, u3x_sam, u3nc(c3__herb, u3k(gen)), 0); + } +#endif + /* ~(. al gen) */ static u3_noun @@ -476,12 +489,14 @@ u3nq(c3__cnhp, u3k(p_gen), u3k(q_gen), u3_nul), u3k(q_gen)); } +#if 0 _open_do_pq(kthp) // ^- { return u3nt(c3__ktls, - _ap_bunt(_al_core(ter, p_gen), p_gen), + _ap_bunt(_al_bore(ter, p_gen), p_gen), u3k(q_gen)); } +#endif /*** **** ***/ @@ -776,7 +791,7 @@ _open_p (hxgr); _open_pq (ktdt); - _open_pq (kthp); +// _open_pq (kthp); _open_pq (sgts); // _open_pq (sgbr); From c80cfe27a252c566de978aa622870e78c0a6088a Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Fri, 11 Dec 2015 21:01:41 -0800 Subject: [PATCH 020/137] %kthp set up. --- jets/f/ap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/jets/f/ap.c b/jets/f/ap.c index 2573f9d8b7..a9daad23a9 100644 --- a/jets/f/ap.c +++ b/jets/f/ap.c @@ -21,7 +21,6 @@ static u3_noun _open_in(u3_noun ter, u3_noun gen); - #if 0 /* ~(. al gen) */ @@ -34,7 +33,6 @@ return u3i_molt(gat, u3x_sam, u3nc(c3__herb, u3k(gen)), 0); } #endif - /* ~(. al gen) */ static u3_noun @@ -791,7 +789,7 @@ _open_p (hxgr); _open_pq (ktdt); -// _open_pq (kthp); +// _open_pq (kthp); _open_pq (sgts); // _open_pq (sgbr); From cd6b7a3498fc605c7c27a9862c2799f3c70ec692 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sat, 12 Dec 2015 04:39:13 -0800 Subject: [PATCH 021/137] Replaced %wt macros. --- jets/tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jets/tree.c b/jets/tree.c index ffc5cdba0e..750ca1c818 100644 --- a/jets/tree.c +++ b/jets/tree.c @@ -408,6 +408,7 @@ static u3j_harm _mood__hoon__ut_a[] = {} }; +#if 0 static u3j_harm _mood__hoon__ap_a[] = { // {"hack", u3wfp_open}, // {"late", u3wfp_open}, @@ -416,7 +417,6 @@ static u3j_harm _mood__hoon__ap_a[] = {} }; -#if 0 static u3j_harm _mood__hoon__al_a[] = { {"bunt", u3wfl_bunt}, {"whip", u3wfl_whip}, @@ -562,7 +562,7 @@ static u3j_core _mood__hoon_d[] = { "hike", _mood__hoon_hike_a }, { "look", _mood__hoon_look_a }, - { "ap", _mood__hoon__ap_a }, + // { "ap", _mood__hoon__ap_a }, // { "al", _mood__hoon__al_a }, { "ut", _mood__hoon__ut_a, _mood__hoon__ut_d }, { "arvo", 0, _arvo_d }, From 5297707719ffb2230926eff8089f6b74a3519040 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sat, 12 Dec 2015 16:35:35 -0800 Subject: [PATCH 022/137] Properly disable ap jets. --- jets/f/ap.c | 2 ++ jets/tree.c | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/jets/f/ap.c b/jets/f/ap.c index a9daad23a9..7fdc6009ff 100644 --- a/jets/f/ap.c +++ b/jets/f/ap.c @@ -715,6 +715,8 @@ { u3_noun p_gen, q_gen, r_gen, s_gen; + return u3_none; + if ( c3y == u3ud(gen) ) { // printf("studly\n"); // u3_err("stud m", gen); diff --git a/jets/tree.c b/jets/tree.c index 750ca1c818..9e1baa4be4 100644 --- a/jets/tree.c +++ b/jets/tree.c @@ -408,7 +408,6 @@ static u3j_harm _mood__hoon__ut_a[] = {} }; -#if 0 static u3j_harm _mood__hoon__ap_a[] = { // {"hack", u3wfp_open}, // {"late", u3wfp_open}, @@ -416,7 +415,7 @@ static u3j_harm _mood__hoon__ap_a[] = {"rake", u3wfp_rake}, {} }; - +#if 0 static u3j_harm _mood__hoon__al_a[] = { {"bunt", u3wfl_bunt}, {"whip", u3wfl_whip}, @@ -562,7 +561,7 @@ static u3j_core _mood__hoon_d[] = { "hike", _mood__hoon_hike_a }, { "look", _mood__hoon_look_a }, - // { "ap", _mood__hoon__ap_a }, + { "ap", _mood__hoon__ap_a }, // { "al", _mood__hoon__al_a }, { "ut", _mood__hoon__ut_a, _mood__hoon__ut_d }, { "arvo", 0, _arvo_d }, From 39ebd7c14064231ebbdaeafc341f15c6bd963421 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 13 Dec 2015 21:05:59 -0800 Subject: [PATCH 023/137] %wtts mastered. --- include/c/motes.h | 1 + jets/f/ut_mint.c | 4 +++- jets/f/ut_mull.c | 4 +++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/c/motes.h b/include/c/motes.h index 4947654470..ba11c599ce 100644 --- a/include/c/motes.h +++ b/include/c/motes.h @@ -554,6 +554,7 @@ # define c3__jato c3_s4('j','a','t','o') # define c3__jet c3_s3('j','e','t') # define c3__jetd c3_s4('j','e','t','d') +# define c3__jtts c3_s4('j','t','t','s') # define c3__just c3_s4('j','u','s','t') # define c3__keep c3_s4('k','e','e','p') # define c3__kern c3_s4('k','e','r','n') diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index 57812fe11d..de44ea7001 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -395,7 +395,8 @@ int FOO; case c3__wtts: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { - u3_noun nob = u3qfl_bunt(van, p_gen); + u3_noun heb = u3nc(c3__herb, u3k(p_gen)); + u3_noun nob = u3qfl_bunt(van, heb); u3_noun dok = u3nc(c3__cnzz, u3k(q_gen)); u3_noun vol = _mint_corn(van, sut, dok); u3_noun axe = _mint_coke(vol); @@ -408,6 +409,7 @@ int FOO; u3z(wam); u3z(nob); u3z(dok); + u3z(heb); return ret; } diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index 04a76ef7c3..4146ca8871 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -352,7 +352,8 @@ case c3__wtts: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { - u3_noun nob = u3qfl_bunt(van, p_gen); + u3_noun heb = u3nc(c3__herb, u3k(p_gen)); + u3_noun nob = u3qfl_bunt(van, heb); u3_noun p_waz = u3qfu_play(van, sut, nob); u3_noun q_waz = u3qfu_play(van, dox, nob); u3_noun dok = u3nc(c3__cnzz, u3k(q_gen)); @@ -371,6 +372,7 @@ u3z(p_pov); u3z(q_pov); u3z(nob); u3z(dok); + u3z(heb); return _mull_both(van, gol, _mull_bean()); } From a6d9fa8b2dc068c3db03abe3223b460ceb8d8881 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 13 Dec 2015 21:06:19 -0800 Subject: [PATCH 024/137] No jtts. --- include/c/motes.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/c/motes.h b/include/c/motes.h index ba11c599ce..4947654470 100644 --- a/include/c/motes.h +++ b/include/c/motes.h @@ -554,7 +554,6 @@ # define c3__jato c3_s4('j','a','t','o') # define c3__jet c3_s3('j','e','t') # define c3__jetd c3_s4('j','e','t','d') -# define c3__jtts c3_s4('j','t','t','s') # define c3__just c3_s4('j','u','s','t') # define c3__keep c3_s4('k','e','e','p') # define c3__kern c3_s4('k','e','r','n') From b22e5127862941149b95e247e5e1531f324c7b9c Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 13 Dec 2015 23:00:48 -0800 Subject: [PATCH 025/137] See last commit. --- jets/f/ut_mint.c | 14 -------------- jets/f/ut_mull.c | 22 ---------------------- jets/f/ut_play.c | 13 ------------- 3 files changed, 49 deletions(-) diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index de44ea7001..7b7d5ec566 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -378,20 +378,6 @@ int FOO; return ret; } - case c3__bcpt: u3x_cell(u3t(gen), &p_gen, &q_gen); - _mint_used(); - { - u3_noun sep = u3qfu_seep(van, sut, c3__read, p_gen); - u3_noun axe = u3h(sep); - u3_noun rex = u3qfl_whip(van, q_gen, axe); - u3_noun ret = _mint_in(van, sut, gol, rex); - - u3z(sep); - u3z(rex); - - return ret; - } - case c3__wtts: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index 4146ca8871..44b50e5ffe 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -327,28 +327,6 @@ return ret; } - case c3__bcpt: u3x_cell(u3t(gen), &p_gen, &q_gen); - _mull_used(); - { - u3_noun sep = u3qfu_seep(van, sut, c3__read, p_gen); - u3_noun pox = u3qfu_seep(van, dox, c3__read, p_gen); - u3_noun axe = u3h(sep); - - if ( axe != u3h(pox) ) { - return u3m_error("mull-bonk-wing"); - } - else { - u3_noun rex = u3qfl_whip(van, q_gen, axe); - u3_noun ret = _mull_in(van, sut, gol, dox, rex); - - u3z(sep); - u3z(pox); - u3z(rex); - - return ret; - } - } - case c3__wtts: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index 0a769b0674..78bd2f4744 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -183,19 +183,6 @@ else switch ( u3h(gen) ) { default: goto open; - case c3__bcpt: u3x_cell(u3t(gen), &p_gen, &q_gen); - _play_used(); - { - u3_noun sep = u3qfu_seep(van, sut, c3__read, p_gen); - u3_noun axe = u3h(sep); - u3_noun rex = u3qfl_whip(van, q_gen, axe); - u3_noun ret = _play_x(van, sut, rex); - - u3z(sep); - u3z(rex); - - return ret; - } case c3__wtts: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { From 680e886a5df8fe4724eaab417cd1361cfb921664 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 20 Dec 2015 14:59:39 -0800 Subject: [PATCH 026/137] Solidly 161. --- jets/tree.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/jets/tree.c b/jets/tree.c index cfe8247907..23eefd068e 100644 --- a/jets/tree.c +++ b/jets/tree.c @@ -576,19 +576,9 @@ static u3j_core _k161_d[] = { { "mood", 0, _mood_d }, {} }; -static u3j_core _k162_d[] = - { { "mood", 0, _mood_d }, - {} - }; -static u3j_core _k163_d[] = - { { "mood", 0, _mood_d }, - {} - }; static u3j_core _d[] = { { "k161", 0, _k161_d}, - { "k162", 0, _k162_d}, - { "k163", 0, _k163_d}, {} }; From 8b699807fbb808f2272a156870a81c46030f9273 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 20 Dec 2015 15:55:24 -0800 Subject: [PATCH 027/137] About to merge last of lastcall. --- jets/tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jets/tree.c b/jets/tree.c index ce5f485069..473d57ac17 100644 --- a/jets/tree.c +++ b/jets/tree.c @@ -357,7 +357,7 @@ static u3j_harm _mood__hoon__ut_fire_a[] = {{".2", u3wfu_fire}, {}}; static u3j_harm _mood__hoon__ut_firm_a[] = {{".2", u3wfu_firm}, {}}; static u3j_harm _mood__hoon__ut_fish_a[] = {{".2", u3wfu_fish}, {}}; static u3j_harm _mood__hoon__ut_fuse_a[] = {{".2", u3wfu_fuse}, {}}; -static u3j_harm _mood__hoon__ut_heal_a[] = {{".2", u3wfu_heal}, {}}; +// static u3j_harm _mood__hoon__ut_heal_a[] = {{".2", u3wfu_heal}, {}}; static u3j_harm _mood__hoon__ut_mint_a[] = {{".2", u3wfu_mint}, {}}; static u3j_harm _mood__hoon__ut_mull_a[] = {{".2", u3wfu_mull}, {}}; static u3j_harm _mood__hoon__ut_nest_a[] = {{".2", u3wfu_nest}, {}}; @@ -383,7 +383,7 @@ static u3j_core _mood__hoon__ut_d[] = { "firm", _mood__hoon__ut_firm_a }, { "fish", _mood__hoon__ut_fish_a }, { "fuse", _mood__hoon__ut_fuse_a }, - { "heal", _mood__hoon__ut_heal_a }, + // { "heal", _mood__hoon__ut_heal_a }, { "mint", _mood__hoon__ut_mint_a }, { "mull", _mood__hoon__ut_mull_a }, { "nest", _mood__hoon__ut_nest_a }, From d58b0b58944f06c8ad7b813258cc9d1410d6d516 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 20 Dec 2015 21:05:19 -0800 Subject: [PATCH 028/137] Rename ugly non-runes. --- include/c/motes.h | 1 + jets/f/ut_mint.c | 16 +++++++++------- jets/f/ut_mull.c | 10 +++++----- jets/f/ut_play.c | 8 ++++---- 4 files changed, 19 insertions(+), 16 deletions(-) diff --git a/include/c/motes.h b/include/c/motes.h index 4947654470..52b2aad648 100644 --- a/include/c/motes.h +++ b/include/c/motes.h @@ -78,6 +78,7 @@ # define c3__blew c3_s4('b','l','e','w') # define c3__blin c3_s4('b','l','i','n') # define c3__blit c3_s4('b','l','i','t') +# define c3__blob c3_s4('b','l','o','b') # define c3__blog c3_s4('b','l','o','g') # define c3__bloq c3_s4('b','l','o','q') # define c3__blot c3_s4('b','l','o','t') diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index 7b7d5ec566..ba621d27ae 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -318,11 +318,13 @@ int FOO; u3_noun ret; if ( (c3__void == sut) && - !((c3y == u3du(gen)) && (c3__zpcb == u3h(gen))) ) + !((c3y == u3du(gen)) && ((c3__zpcb == u3h(gen)) || (c3__dbug == u3h(gen)))) ) { if ( (c3n == _mint_vet(van)) || ((c3y == u3du(gen)) && - ((c3__zpfs == u3h(gen)) || (c3__zpzp == u3h(gen)))) ) + ((c3__zpfs == u3h(gen)) || + (c3__lost == u3h(gen)) || + (c3__zpzp == u3h(gen)))) ) { return u3nt(c3__void, 0, 0); } @@ -383,7 +385,7 @@ int FOO; { u3_noun heb = u3nc(c3__herb, u3k(p_gen)); u3_noun nob = u3qfl_bunt(van, heb); - u3_noun dok = u3nc(c3__cnzz, u3k(q_gen)); + u3_noun dok = u3nc(c3__wing, u3k(q_gen)); u3_noun vol = _mint_corn(van, sut, dok); u3_noun axe = _mint_coke(vol); u3_noun wam = u3qfu_play(van, sut, nob); @@ -489,7 +491,7 @@ int FOO; u3z(sam); return ret; } - case c3__dtzz: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__blob: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { u3_noun boc = (c3n == u3ud(q_gen)) @@ -511,7 +513,7 @@ int FOO; return u3nc(_mint_nice(van, gol, c3__noun), u3nt(2, one, two)); } - case c3__dtzy: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__rock: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { u3_noun typ = u3qfu_play(van, sut, gen); @@ -758,7 +760,7 @@ int FOO; u3qfu_play(van, sut, p_gen)), u3nc(1, u3k(q_gen))); } - case c3__zpcb: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__dbug: u3x_cell(u3t(gen), &p_gen, &q_gen); { u3t_push(u3nc(c3__mean, _mint_loc(van, p_gen))); { @@ -807,7 +809,7 @@ int FOO; return ret; } - case c3__zpfs: p_gen = u3t(gen); + case c3__lost: p_gen = u3t(gen); _mint_used(); { if ( c3y == _mint_vet(van) ) { diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index 44b50e5ffe..8b0e43a1c6 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -334,7 +334,7 @@ u3_noun nob = u3qfl_bunt(van, heb); u3_noun p_waz = u3qfu_play(van, sut, nob); u3_noun q_waz = u3qfu_play(van, dox, nob); - u3_noun dok = u3nc(c3__cnzz, u3k(q_gen)); + u3_noun dok = u3nc(c3__wing, u3k(q_gen)); u3_noun p_syx = _mull_doke(van, sut, dok); u3_noun q_syx = _mull_doke(van, dox, dok); u3_noun p_pov = u3qfu_fish(van, p_waz, p_syx); @@ -455,7 +455,7 @@ u3z(vay); return _mull_both(van, gol, wuq); } - case c3__dtzz: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__blob: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { u3_noun tof = u3nt(c3__cube, @@ -477,7 +477,7 @@ return _mull_both(van, gol, c3__noun); } - case c3__dtzy: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__rock: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { u3_noun typ = u3qfu_play(van, sut, gen); @@ -700,7 +700,7 @@ return u3nc(_mull_nice(van, gol, p_ret), q_ret); } - case c3__zpcb: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__dbug: u3x_cell(u3t(gen), &p_gen, &q_gen); { u3_noun ret; @@ -741,7 +741,7 @@ return u3nc (_mull_nice(van, gol, p_ret), q_ret); } - case c3__zpfs: + case c3__lost: case c3__zpzp: _mull_used(); { diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index 78bd2f4744..bd5809c2b0 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -234,7 +234,7 @@ { return u3nc(c3__atom, u3_blip); } - case c3__dtzz: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__blob: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { u3_noun boc = (c3n == u3ud(q_gen)) @@ -250,7 +250,7 @@ { return c3__noun; } - case c3__dtzy: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__rock: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { if ( 'f' == p_gen ) { @@ -427,7 +427,7 @@ { return _play_x(van, sut, p_gen); } - case c3__zpcb: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__dbug: u3x_cell(u3t(gen), &p_gen, &q_gen); { u3_noun ret; @@ -459,7 +459,7 @@ return ret; } - case c3__zpfs: + case c3__lost: case c3__zpzp: _play_used(); { From a0423da33f9dd80a643a1e188de1697ba99c833d Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Mon, 21 Dec 2015 14:45:22 -0800 Subject: [PATCH 029/137] Fixed vet caching issue. --- jets/f/ut_burn.c | 2 +- jets/f/ut_crop.c | 2 +- jets/f/ut_cull.c | 2 +- jets/f/ut_find.c | 2 +- jets/f/ut_fish.c | 2 +- jets/f/ut_fuse.c | 2 +- jets/f/ut_mull.c | 2 +- jets/f/ut_nest.c | 2 +- jets/f/ut_peek.c | 2 +- jets/f/ut_rest.c | 2 +- jets/f/ut_seek.c | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/jets/f/ut_burn.c b/jets/f/ut_burn.c index cfb6e753ab..d6961647a8 100644 --- a/jets/f/ut_burn.c +++ b/jets/f/ut_burn.c @@ -88,7 +88,7 @@ u3qfu_burn(u3_noun van, u3_noun sut) { - c3_m fun_m = c3__burn; + c3_m fun_m = c3__burn + !!u3r_at(u3qfu_van_vet, van); u3_noun pro = u3z_find(fun_m, sut); if ( u3_none != pro ) { diff --git a/jets/f/ut_crop.c b/jets/f/ut_crop.c index eec42c4dd0..852e3306fe 100644 --- a/jets/f/ut_crop.c +++ b/jets/f/ut_crop.c @@ -242,7 +242,7 @@ u3_noun sut, u3_noun ref) { - c3_m fun_m = c3__crop; + c3_m fun_m = c3__crop + !!u3r_at(u3qfu_van_vet, van); u3_noun pro = u3z_find_2(fun_m, sut, ref); if ( u3_none != pro ) { diff --git a/jets/f/ut_cull.c b/jets/f/ut_cull.c index 1b9ae7bc5a..289599a209 100644 --- a/jets/f/ut_cull.c +++ b/jets/f/ut_cull.c @@ -189,7 +189,7 @@ u3_noun axe, u3_noun ref) { - c3_m fun_m = c3__cull; + c3_m fun_m = c3__cull + !!u3r_at(u3qfu_van_vet, van); u3_noun pro = u3z_find_4(fun_m, sut, pol, axe, ref); if ( u3_none != pro ) { diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c index 57a01dfe12..0616464da4 100644 --- a/jets/f/ut_find.c +++ b/jets/f/ut_find.c @@ -355,7 +355,7 @@ u3_noun way, u3_noun cug) { - c3_m fun_m = c3__find; + c3_m fun_m = c3__find + !!u3r_at(u3qfu_van_vet, van); u3_noun pro = u3z_find_4(fun_m, sut, dep, way, cug); if ( u3_none != pro ) { diff --git a/jets/f/ut_fish.c b/jets/f/ut_fish.c index 69ed028e40..dc58faba9c 100644 --- a/jets/f/ut_fish.c +++ b/jets/f/ut_fish.c @@ -150,7 +150,7 @@ u3_noun sut, u3_noun axe) { - c3_m fun_m = c3__fish; + c3_m fun_m = c3__fish + !!u3r_at(u3qfu_van_vet, van); u3_noun pro = u3z_find_2(fun_m, sut, axe); if ( u3_none != pro ) { diff --git a/jets/f/ut_fuse.c b/jets/f/ut_fuse.c index fb71caa1fa..4b407c30ba 100644 --- a/jets/f/ut_fuse.c +++ b/jets/f/ut_fuse.c @@ -183,7 +183,7 @@ u3_noun sut, u3_noun ref) { - c3_m fun_m = c3__fuse; + c3_m fun_m = c3__fuse + !!u3r_at(u3qfu_van_vet, van); u3_noun pro = u3z_find_2(fun_m, sut, ref); if ( u3_none != pro ) { diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index 8b0e43a1c6..da919d61a7 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -794,7 +794,7 @@ u3_noun dox, u3_noun gen) { - c3_m fun_m = c3__mull; + c3_m fun_m = c3__mull + !!u3r_at(u3qfu_van_vet, van); u3_noun pro = u3z_find_4(fun_m, sut, gol, dox, gen); if ( u3_none != pro ) { diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index 438b16ce1d..9105b2c073 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -332,7 +332,7 @@ } { - c3_m fun_m = c3__nest; + c3_m fun_m = c3__nest + !!u3r_at(u3qfu_van_vet, van); u3_noun pro = u3z_find_2(fun_m, sut, ref); if ( u3_none != pro ) { diff --git a/jets/f/ut_peek.c b/jets/f/ut_peek.c index 13c9dabdc8..af1ef806e1 100644 --- a/jets/f/ut_peek.c +++ b/jets/f/ut_peek.c @@ -183,7 +183,7 @@ u3_noun way, u3_noun axe) { - c3_m fun_m = c3__peek; + c3_m fun_m = c3__peek + !!u3r_at(u3qfu_van_vet, van); u3_noun pro = u3z_find_3(fun_m, sut, way, axe); if ( u3_none != pro ) { diff --git a/jets/f/ut_rest.c b/jets/f/ut_rest.c index edfb399ed3..5df63fd131 100644 --- a/jets/f/ut_rest.c +++ b/jets/f/ut_rest.c @@ -116,7 +116,7 @@ u3_noun sut, u3_noun leg) { - c3_m fun_m = c3__rest; + c3_m fun_m = c3__rest + !!u3r_at(u3qfu_van_vet, van); u3_noun pro = u3z_find_2(fun_m, sut, leg); if ( u3_none != pro ) { diff --git a/jets/f/ut_seek.c b/jets/f/ut_seek.c index 329593cc00..cfc7631fae 100644 --- a/jets/f/ut_seek.c +++ b/jets/f/ut_seek.c @@ -237,7 +237,7 @@ u3_noun way, u3_noun hyp) { - c3_m fun_m = c3__seek; + c3_m fun_m = c3__seek + !!u3r_at(u3qfu_van_vet, van); u3_noun pro = u3z_find_3(fun_m, sut, way, hyp); if ( u3_none != pro ) { From 715d69a9fb703f54ae56b18bc72ee3d2d1fa2712 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Mon, 21 Dec 2015 16:38:31 -0800 Subject: [PATCH 030/137] Disabled all wing traversal jerts. --- jets/f/ut_seek.c | 18 ++++++++++++++++++ jets/f/ut_tack.c | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/jets/f/ut_seek.c b/jets/f/ut_seek.c index cfc7631fae..52a2cdc000 100644 --- a/jets/f/ut_seek.c +++ b/jets/f/ut_seek.c @@ -230,7 +230,24 @@ return _cqfu_seek(van, sut, way, hyp); } } +#if 1 + u3_noun + u3qfu_seek(u3_noun van, + u3_noun sut, + u3_noun way, + u3_noun hyp) + { + u3_noun von = u3i_molt(u3k(van), u3x_sam, u3k(sut), 0); + u3_noun gat = u3j_hook(von, "seek"); + return u3n_kick_on(u3i_molt(gat, + u3x_sam_2, + u3k(way), + u3x_sam_3, + u3k(hyp), + 0)); + } +#else u3_noun u3qfu_seek(u3_noun van, u3_noun sut, @@ -249,6 +266,7 @@ return u3z_save_3(fun_m, sut, way, hyp, pro); } } +#endif u3_noun u3qfu_seep(u3_noun van, diff --git a/jets/f/ut_tack.c b/jets/f/ut_tack.c index cb7fab1333..da32ec5b55 100644 --- a/jets/f/ut_tack.c +++ b/jets/f/ut_tack.c @@ -3,7 +3,6 @@ */ #include "all.h" - u3_noun u3qfu_tack(u3_noun van, u3_noun sut, @@ -20,3 +19,4 @@ u3k(mur), 0)); } + From 0404c973f136a257d77b4ba7e9759f5ca951183f Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Tue, 22 Dec 2015 20:12:56 -0800 Subject: [PATCH 031/137] About to test ++feel. --- jets/f/ut_find.c | 1 + jets/f/ut_seek.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c index 0616464da4..d3ed1cfb7e 100644 --- a/jets/f/ut_find.c +++ b/jets/f/ut_find.c @@ -13,6 +13,7 @@ { u3_noun p_sut, q_sut; + c3_assert(0); if ( c3y == u3ud(sut) ) { return u3nc(u3k(dep), u3_nul); } diff --git a/jets/f/ut_seek.c b/jets/f/ut_seek.c index 52a2cdc000..4d84248ba6 100644 --- a/jets/f/ut_seek.c +++ b/jets/f/ut_seek.c @@ -125,6 +125,8 @@ u3_noun way, u3_noun hyp) { + c3_assert(0); + if ( u3_nul == hyp ) { return u3nt (1, c3y, u3k(sut)); From 25e76af8e865994e187b9190e5707af1d452a9f4 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Thu, 24 Dec 2015 00:20:22 -0800 Subject: [PATCH 032/137] new ++feel, almost perfect. --- jets/f/ut_nest.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index 9105b2c073..215698362d 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -117,13 +117,24 @@ } else { u3_noun zoc = u3qdi_put(gil, hud); +#if 0 u3_noun tus = u3nt(c3__core, u3k(qq_sut), u3k(q_sut)); u3_noun fer = u3nt(c3__core, u3k(qq_ref), u3k(q_ref)); +#else + u3_noun tus = u3nt(c3__core, + u3k(qq_sut), + u3nc(c3__gold, + u3k(u3t(q_sut)))); + u3_noun fer = u3nt(c3__core, + u3k(qq_ref), + u3nc(c3__gold, + u3k(u3t(q_ref)))); +#endif ret = _nest_cram(van, tus, tel, fer, qrq_sut, qrq_ref, zoc); u3z(fer); u3z(tus); From 03a6bc7f291d7081048a889d8dbe41dc4af5c09d Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Thu, 24 Dec 2015 13:14:59 -0800 Subject: [PATCH 033/137] Now with perfect ++feel. --- jets/f/ut_nest.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index 215698362d..71461512a9 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -57,6 +57,7 @@ u3_noun pqn_hem = u3t(qn_hem); u3_noun vis = u3qfu_play(van, sut, pqn_dab); u3_noun lon = u3qfu_play(van, ref, pqn_hem); + u3_noun ret = _nest_dext(van, vis, tel, lon, gil); u3z(vis); @@ -117,14 +118,6 @@ } else { u3_noun zoc = u3qdi_put(gil, hud); -#if 0 - u3_noun tus = u3nt(c3__core, - u3k(qq_sut), - u3k(q_sut)); - u3_noun fer = u3nt(c3__core, - u3k(qq_ref), - u3k(q_ref)); -#else u3_noun tus = u3nt(c3__core, u3k(qq_sut), u3nc(c3__gold, @@ -134,7 +127,7 @@ u3k(qq_ref), u3nc(c3__gold, u3k(u3t(q_ref)))); -#endif + ret = _nest_cram(van, tus, tel, fer, qrq_sut, qrq_ref, zoc); u3z(fer); u3z(tus); From 4651852406b3d6f7da27fd32243305d7999a20c4 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sat, 26 Dec 2015 06:44:32 -0500 Subject: [PATCH 034/137] Eliminate snubbing. --- Makefile | 2 +- include/jets/q.h | 2 +- include/jets/w.h | 2 +- jets/f/ut_mint.c | 37 +----------------- jets/f/ut_mull.c | 39 ++----------------- jets/f/ut_play.c | 36 +----------------- jets/f/ut_tack.c | 5 +-- jets/f/ut_toss.c | 97 ++++++++++++++++++++++++++++++++++++++++++++++++ jets/tree.c | 4 +- 9 files changed, 111 insertions(+), 113 deletions(-) create mode 100644 jets/f/ut_toss.c diff --git a/Makefile b/Makefile index ea695ad3a3..ba831607e5 100644 --- a/Makefile +++ b/Makefile @@ -316,7 +316,7 @@ J_F_OFILES_UT=\ jets/f/ut_seek.o \ jets/f/ut_swab.o \ jets/f/ut_tack.o \ - jets/f/ut_tock.o \ + jets/f/ut_toss.o \ jets/f/ut_wrap.o J_G_OFILES=\ diff --git a/include/jets/q.h b/include/jets/q.h index 3b5d1e4040..5b75946c5b 100644 --- a/include/jets/q.h +++ b/include/jets/q.h @@ -226,5 +226,5 @@ u3_noun u3qfu_sift(u3_noun, u3_noun, u3_noun); u3_noun u3qfu_snub(u3_noun, u3_noun, u3_noun); u3_noun u3qfu_tack(u3_noun, u3_noun, u3_noun, u3_noun); - u3_noun u3qfu_tock(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); diff --git a/include/jets/w.h b/include/jets/w.h index a2dc2cbb8c..1f9b46f127 100644 --- a/include/jets/w.h +++ b/include/jets/w.h @@ -237,7 +237,7 @@ u3_noun u3wfu_seek(u3_noun); u3_noun u3wfu_seep(u3_noun); u3_noun u3wfu_snub(u3_noun); - u3_noun u3wfu_tock(u3_noun); + u3_noun u3wfu_toss(u3_noun); u3_noun u3wfu_wrap(u3_noun); diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index ba621d27ae..3d4093d7ef 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -168,7 +168,7 @@ int FOO; u3_noun zil = u3qfu_mint(van, sut, c3__noun, qi_mew); u3_noun p_zil = u3h(zil); u3_noun q_zil = u3t(zil); - u3_noun wip = u3qfu_tock(van, sut, pi_mew, p_zil, rag); + u3_noun wip = u3qfu_toss(van, sut, pi_mew, p_zil, rag); u3z(rag); rag = u3k(u3t(wip)); @@ -648,7 +648,7 @@ int FOO; u3_noun q_lar = u3t(lar); u3_noun pq_lar = u3h(q_lar); u3_noun qq_lar = u3t(q_lar); - u3_noun mew = u3qfu_snub(van, sut, q_gen); + u3_noun mew = q_gen; u3_noun yom = _mint_edit(van, sut, mew, p_lar, u3k(qq_lar), u3_nul); u3_noun p_yom = u3h(yom); u3_noun q_yom = u3t(yom); @@ -657,22 +657,10 @@ int FOO; : u3nt(9, u3k(pq_lar), u3k(q_yom))); u3z(yom); - u3z(mew); u3z(lar); return ret; } - case c3__pmcl: u3x_cell(u3t(gen), &p_gen, &q_gen); - _mint_used(); - { - u3_noun ruf = u3nt(c3__clhp, - u3nc(u3_nul, 1), - u3k(p_gen)); - u3_noun ret = _mint_grow(van, sut, gol, c3__zinc, ruf, q_gen); - - u3z(ruf); - return ret; - } case c3__brcn: p_gen = u3t(gen); _mint_used(); { @@ -683,27 +671,6 @@ int FOO; return ret; } - case c3__pmcn: p_gen = u3t(gen); - _mint_used(); - { - u3_noun ruf = u3nc(u3_nul, 1); - - ret = _mint_grow(van, sut, gol, c3__lead, ruf, p_gen); - u3z(ruf); - - return ret; - } - case c3__pmls: u3x_cell(u3t(gen), &p_gen, &q_gen); - _mint_used(); - { - u3_noun ruf = u3nt(c3__clhp, - u3nc(u3_nul, 1), - u3k(p_gen)); - u3_noun ret = _mint_grow(van, sut, gol, c3__iron, ruf, q_gen); - - u3z(ruf); - return ret; - } case c3__sgzp: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index da919d61a7..9bb75e954c 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -247,8 +247,8 @@ u3_noun zil = _mull_in(van, sut, c3__noun, dox, qi_mew); u3_noun p_zil = u3h(zil); u3_noun q_zil = u3t(zil); - u3_noun cuf = u3qfu_tock(van, sut, pi_mew, p_zil, p_yom); - u3_noun dof = u3qfu_tock(van, sut, pi_mew, q_zil, q_yom); + u3_noun cuf = u3qfu_toss(van, sut, pi_mew, p_zil, p_yom); + u3_noun dof = u3qfu_toss(van, sut, pi_mew, q_zil, q_yom); if ( u3r_sing(u3h(cuf), u3h(dof)) ) { u3m_error("mull-bonk-a"); @@ -611,7 +611,7 @@ u3m_error("mull-bonk-e"); } { - u3_noun mew = u3qfu_snub(van, sut, q_gen); + u3_noun mew = q_gen; u3_noun yom = _mull_edit (van, sut, dox, mew, u3k(qq_lar), u3k(qq_vug)); @@ -621,24 +621,12 @@ u3z(von); u3z(yom); - u3z(mew); u3z(vug); u3z(lar); return u3nc(_mull_nice(van, gol, p_ret), q_ret); } } - case c3__pmcl: u3x_cell(u3t(gen), &p_gen, &q_gen); - _mull_used(); - { - u3_noun ruf = u3nt(c3__clhp, - u3nc(u3_nul, 1), - u3k(p_gen)); - u3_noun ret = _mull_grow(van, sut, gol, dox, c3__zinc, ruf, q_gen); - - u3z(ruf); - return ret; - } case c3__brcn: p_gen = u3t(gen); _mull_used(); { @@ -649,27 +637,6 @@ return ret; } - case c3__pmcn: p_gen = u3t(gen); - _mull_used(); - { - u3_noun ruf = u3nc(u3_nul, 1); - - ret = _mull_grow(van, sut, gol, dox, c3__lead, ruf, p_gen); - u3z(ruf); - - return ret; - } - case c3__pmls: u3x_cell(u3t(gen), &p_gen, &q_gen); - _mull_used(); - { - u3_noun ruf = u3nt(c3__clhp, - u3nc(u3_nul, 1), - u3k(p_gen)); - u3_noun ret = _mull_grow(van, sut, gol, dox, c3__iron, ruf, q_gen); - - u3z(ruf); - return ret; - } case c3__sgzp: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index bd5809c2b0..e4ee16dc56 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -89,7 +89,7 @@ u3_noun pi_mew = u3h(i_mew); u3_noun qi_mew = u3t(i_mew); u3_noun laf = _play_in(van, sut, qi_mew); - u3_noun ruz = u3qfu_tock(van, sut, pi_mew, laf, rag); + u3_noun ruz = u3qfu_toss(van, sut, pi_mew, laf, rag); u3z(laf); u3z(rag); @@ -346,27 +346,15 @@ u3_noun lar = _play_foil(sec); u3_noun q_lar = u3t(lar); u3_noun qq_lar = u3t(q_lar); - u3_noun mew = u3qfu_snub(van, sut, q_gen); + u3_noun mew = q_gen; u3_noun rag = _play_edit(van, sut, mew, u3k(qq_lar)); u3_noun ret = u3qfu_fire(van, sut, rag); u3z(rag); - u3z(mew); u3z(lar); return ret; } - case c3__pmcl: u3x_cell(u3t(gen), &p_gen, &q_gen); - _play_used(); - { - u3_noun ruf = u3nt(c3__clhp, - u3nc(u3_nul, 1), - u3k(p_gen)); - u3_noun ret = _play_grow(van, sut, c3__zinc, ruf, q_gen); - - u3z(ruf); - return ret; - } case c3__brcn: p_gen = u3t(gen); _play_used(); { @@ -376,26 +364,6 @@ u3z(ruf); return ret; } - case c3__pmcn: p_gen = u3t(gen); - _play_used(); - { - u3_noun ruf = u3nc(u3_nul, 1); - u3_noun ret = _play_grow(van, sut, c3__lead, ruf, p_gen); - - u3z(ruf); - return ret; - } - case c3__pmls: u3x_cell(u3t(gen), &p_gen, &q_gen); - _play_used(); - { - u3_noun ruf = u3nt(c3__clhp, - u3nc(u3_nul, 1), - u3k(p_gen)); - u3_noun ret = _play_grow(van, sut, c3__iron, ruf, q_gen); - - u3z(ruf); - return ret; - } case c3__sgzp: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { diff --git a/jets/f/ut_tack.c b/jets/f/ut_tack.c index da32ec5b55..d7df575ac4 100644 --- a/jets/f/ut_tack.c +++ b/jets/f/ut_tack.c @@ -6,7 +6,7 @@ u3_noun u3qfu_tack(u3_noun van, u3_noun sut, - u3_noun peh, + u3_noun hyp, u3_noun mur) { u3_noun von = u3i_molt(u3k(van), u3x_sam, u3k(sut), 0); @@ -14,9 +14,8 @@ return u3n_kick_on(u3i_molt(gat, u3x_sam_2, - u3k(peh), + u3k(hyp), u3x_sam_3, u3k(mur), 0)); } - diff --git a/jets/f/ut_toss.c b/jets/f/ut_toss.c new file mode 100644 index 0000000000..15973cf581 --- /dev/null +++ b/jets/f/ut_toss.c @@ -0,0 +1,97 @@ +/* j/6/toss.c +** +*/ +#include "all.h" + + +/* internals +*/ + static u3_noun + _toss_in(u3_noun van, + u3_noun sut, + u3_noun peh, + u3_noun mur, + u3_noun men) + { + if ( c3n == u3du(men) ) { + return u3nc(u3_nul, u3_nul); + } + else { + u3_noun i_men = u3h(men); + u3_noun pi_men = u3h(i_men); + u3_noun qi_men = u3t(i_men); + u3_noun t_men = u3t(men); + u3_noun geq = u3qfu_tack(van, pi_men, peh, mur); + u3_noun p_geq = u3h(geq); + u3_noun q_geq = u3t(geq); + u3_noun mox = _toss_in(van, sut, peh, mur, t_men); + u3_noun p_mox = u3h(mox); + u3_noun q_mox = u3t(mox); + u3_noun ret; + + ret = u3nc( + ( (u3_nul == p_mox) + ? u3nc(u3_nul, u3k(p_geq)) + : (c3n == u3r_sing(p_geq, u3t(p_mox))) + ? u3m_bail(c3__exit) + : u3k(p_mox) ), + u3nc(u3nc(u3k(q_geq), u3k(qi_men)), u3k(q_mox))); + + u3z(mox); + u3z(geq); + return ret; + } + } + +/* functions +*/ + u3_noun + _cqfu_toss(u3_noun van, + u3_noun sut, + u3_noun peh, + u3_noun mur, + u3_noun men) + { + u3_noun wib = _toss_in(van, sut, peh, mur, men); + u3_noun p_wib = u3h(wib); + u3_noun q_wib = u3t(wib); + + if ( u3_nul == p_wib ) { + return u3m_bail(c3__exit); + } else { + u3_noun ret = u3nc(u3k(u3t(p_wib)), u3k(q_wib)); + + u3z(wib); + return ret; + } + } + +/* boilerplate +*/ + u3_noun + u3wfu_toss(u3_noun cor) + { + u3_noun van, sut, peh, mur, men; + + if ( (c3n == u3r_mean(cor, u3x_sam_2, &peh, + u3x_sam_6, &mur, + u3x_sam_7, &men, + u3x_con, &van, + 0)) || + (u3_none == (sut = u3r_at(u3x_sam, van))) ) + { + return u3m_bail(c3__fail); + } else { + return _cqfu_toss(van, sut, peh, mur, men); + } + } + + u3_noun + u3qfu_toss(u3_noun van, + u3_noun sut, + u3_noun peh, + u3_noun mur, + u3_noun men) + { + return _cqfu_toss(van, sut, peh, mur, men); + } diff --git a/jets/tree.c b/jets/tree.c index ce5f485069..9c52d16f98 100644 --- a/jets/tree.c +++ b/jets/tree.c @@ -368,7 +368,7 @@ static u3j_harm _mood__hoon__ut_rest_a[] = {{".2", u3wfu_rest}, {}}; static u3j_harm _mood__hoon__ut_seek_a[] = {{".2", u3wfu_seek}, {}}; static u3j_harm _mood__hoon__ut_seep_a[] = {{".2", u3wfu_seep}, {}}; static u3j_harm _mood__hoon__ut_snub_a[] = {{".2", u3wfu_snub}, {}}; -static u3j_harm _mood__hoon__ut_tock_a[] = {{".2", u3wfu_tock}, {}}; +static u3j_harm _mood__hoon__ut_toss_a[] = {{".2", u3wfu_toss}, {}}; static u3j_harm _mood__hoon__ut_wrap_a[] = {{".2", u3wfu_wrap}, {}}; static u3j_core _mood__hoon__ut_d[] = @@ -394,7 +394,7 @@ static u3j_core _mood__hoon__ut_d[] = { "seek", _mood__hoon__ut_seek_a }, { "seep", _mood__hoon__ut_seep_a }, { "snub", _mood__hoon__ut_snub_a }, - { "tock", _mood__hoon__ut_tock_a }, + { "toss", _mood__hoon__ut_toss_a }, { "wrap", _mood__hoon__ut_wrap_a }, {} }; From 54774d3b3fb1466bcd9d02132e83ff6bb542e20b Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sat, 26 Dec 2015 06:44:56 -0500 Subject: [PATCH 035/137] Now unused. --- jets/f/ut_tock.c | 97 ------------------------------------------------ 1 file changed, 97 deletions(-) delete mode 100644 jets/f/ut_tock.c diff --git a/jets/f/ut_tock.c b/jets/f/ut_tock.c deleted file mode 100644 index 22846e687b..0000000000 --- a/jets/f/ut_tock.c +++ /dev/null @@ -1,97 +0,0 @@ -/* j/6/tock.c -** -*/ -#include "all.h" - - -/* internals -*/ - static u3_noun - _tock_in(u3_noun van, - u3_noun sut, - u3_noun peh, - u3_noun mur, - u3_noun men) - { - if ( c3n == u3du(men) ) { - return u3nc(u3_nul, u3_nul); - } - else { - u3_noun i_men = u3h(men); - u3_noun pi_men = u3h(i_men); - u3_noun qi_men = u3t(i_men); - u3_noun t_men = u3t(men); - u3_noun geq = u3qfu_tack(van, pi_men, peh, mur); - u3_noun p_geq = u3h(geq); - u3_noun q_geq = u3t(geq); - u3_noun mox = _tock_in(van, sut, peh, mur, t_men); - u3_noun p_mox = u3h(mox); - u3_noun q_mox = u3t(mox); - u3_noun ret; - - ret = u3nc( - ( (u3_nul == p_mox) - ? u3nc(u3_nul, u3k(p_geq)) - : (c3n == u3r_sing(p_geq, u3t(p_mox))) - ? u3m_bail(c3__exit) - : u3k(p_mox) ), - u3nc(u3nc(u3k(q_geq), u3k(qi_men)), u3k(q_mox))); - - u3z(mox); - u3z(geq); - return ret; - } - } - -/* functions -*/ - u3_noun - _cqfu_tock(u3_noun van, - u3_noun sut, - u3_noun peh, - u3_noun mur, - u3_noun men) - { - u3_noun wib = _tock_in(van, sut, peh, mur, men); - u3_noun p_wib = u3h(wib); - u3_noun q_wib = u3t(wib); - - if ( u3_nul == p_wib ) { - return u3m_bail(c3__exit); - } else { - u3_noun ret = u3nc(u3k(u3t(p_wib)), u3k(q_wib)); - - u3z(wib); - return ret; - } - } - -/* boilerplate -*/ - u3_noun - u3wfu_tock(u3_noun cor) - { - u3_noun van, sut, peh, mur, men; - - if ( (c3n == u3r_mean(cor, u3x_sam_2, &peh, - u3x_sam_6, &mur, - u3x_sam_7, &men, - u3x_con, &van, - 0)) || - (u3_none == (sut = u3r_at(u3x_sam, van))) ) - { - return u3m_bail(c3__fail); - } else { - return _cqfu_tock(van, sut, peh, mur, men); - } - } - - u3_noun - u3qfu_tock(u3_noun van, - u3_noun sut, - u3_noun peh, - u3_noun mur, - u3_noun men) - { - return _cqfu_tock(van, sut, peh, mur, men); - } From 8421df97e8e38bfdbcc71bcd2e0f622ac6a8121c Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sat, 26 Dec 2015 23:39:38 -0500 Subject: [PATCH 036/137] Rationalize jets. --- Makefile | 7 - jets/f/ut_busk.c | 51 ------- jets/f/ut_cull.c | 203 -------------------------- jets/f/ut_find.c | 370 ----------------------------------------------- jets/f/ut_fink.c | 106 -------------- jets/f/ut_heal.c | 242 ------------------------------- jets/f/ut_mint.c | 6 - jets/f/ut_perk.c | 90 ++++++++++++ jets/f/ut_sift.c | 31 ---- jets/f/ut_swab.c | 57 -------- jets/tree.c | 18 +-- 11 files changed, 92 insertions(+), 1089 deletions(-) delete mode 100644 jets/f/ut_busk.c delete mode 100644 jets/f/ut_cull.c delete mode 100644 jets/f/ut_find.c delete mode 100644 jets/f/ut_fink.c delete mode 100644 jets/f/ut_heal.c create mode 100644 jets/f/ut_perk.c delete mode 100644 jets/f/ut_sift.c delete mode 100644 jets/f/ut_swab.c diff --git a/Makefile b/Makefile index ba831607e5..55849e00ce 100644 --- a/Makefile +++ b/Makefile @@ -291,19 +291,13 @@ J_F_OFILES=\ J_F_OFILES_UT=\ jets/f/ut.o \ jets/f/ut_burn.o \ - jets/f/ut_busk.o \ - jets/f/ut_bust.o \ jets/f/ut_conk.o \ jets/f/ut_crop.o \ - jets/f/ut_cull.o \ - jets/f/ut_find.o \ - jets/f/ut_fink.o \ jets/f/ut_fire.o \ jets/f/ut_firm.o \ jets/f/ut_fish.o \ jets/f/ut_fuse.o \ jets/f/ut_gain.o \ - jets/f/ut_heal.o \ jets/f/ut_lose.o \ jets/f/ut_mint.o \ jets/f/ut_mull.o \ @@ -314,7 +308,6 @@ J_F_OFILES_UT=\ jets/f/ut_repo.o \ jets/f/ut_rest.o \ jets/f/ut_seek.o \ - jets/f/ut_swab.o \ jets/f/ut_tack.o \ jets/f/ut_toss.o \ jets/f/ut_wrap.o diff --git a/jets/f/ut_busk.c b/jets/f/ut_busk.c deleted file mode 100644 index 68a81da876..0000000000 --- a/jets/f/ut_busk.c +++ /dev/null @@ -1,51 +0,0 @@ -/* j/6/ut_busk.c -** -*/ -#include "all.h" - - -/* logic -*/ - u3_noun - _cqfu_busk(u3_noun van, - u3_noun sut, - u3_noun cog, - u3_noun hyp) - { - u3_noun sep = u3qfu_seep(van, sut, c3__both, hyp); - u3_noun bid = u3nt(u3k(cog), u3k(hyp), sep); - u3_noun ret = u3qf_bull(bid, sut); - - u3z(bid); - - return ret; - } - -/* boilerplate -*/ - u3_noun - u3wfu_busk(u3_noun cor) - { - u3_noun sut, cog, hyp, van; - - if ( (c3n == u3r_mean(cor, u3x_sam_2, &cog, - u3x_sam_3, &hyp, - u3x_con, &van, - 0)) || - (c3n == u3ud(cog)) || - (u3_none == (sut = u3r_at(u3x_sam, van))) ) - { - return u3m_bail(c3__fail); - } else { - return _cqfu_busk(van, sut, cog, hyp); - } - } - - u3_noun - u3qfu_busk(u3_noun van, - u3_noun sut, - u3_noun cog, - u3_noun hyp) - { - return _cqfu_busk(van, sut, cog, hyp); - } diff --git a/jets/f/ut_cull.c b/jets/f/ut_cull.c deleted file mode 100644 index 289599a209..0000000000 --- a/jets/f/ut_cull.c +++ /dev/null @@ -1,203 +0,0 @@ -/* j/6/cull.c -** -*/ -#include "all.h" - - -/* logic -*/ - u3_noun - _cqfu_cull(u3_noun, u3_noun, u3_noun, u3_atom, u3_noun); - - static u3_noun - _cull_in(u3_noun van, - u3_noun sut, - u3_noun pol, - u3_atom axe, - u3_noun ref, - u3_noun now, - u3_noun lat, - u3_noun vil) - { - u3_noun ret, p_sut, q_sut; - - if ( c3n == u3du(sut) ) switch ( sut ) { - default: return u3m_bail(c3__fail); - - case c3__noun: { - u3_noun pyr = u3qfu_repo(van, sut); - u3_noun yot = _cqfu_cull(van, pyr, pol, axe, ref); - - if ( c3y == u3r_sing(pyr, yot) ) { - ret = u3k(sut); - } else { - ret = u3k(yot); - } - u3z(pyr); - u3z(yot); - break; - } - case c3__void: { - ret = c3__void; - } - } - else switch ( u3h(sut) ) { - default: return u3m_bail(c3__fail); - - case c3__atom: { - ret = c3__void; - break; - } - case c3__bull: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - u3_noun hic = _cqfu_cull(van, q_sut, pol, axe, ref); - - if ( c3y == u3r_sing(hic, q_sut) ) { - ret = u3k(sut); - } else { - ret = u3qf_bull(p_sut, hic); - } - u3z(hic); - - break; - } - case c3__cell: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - u3_noun hub; - - if ( 2 == now ) { - hub = _cqfu_cull(van, p_sut, pol, lat, ref); - ret = u3qf_cell(hub, q_sut); - } else { - hub = _cqfu_cull(van, q_sut, pol, lat, ref); - ret = u3qf_cell(p_sut, hub); - } - u3z(hub); - break; - } - case c3__core: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - if ( 3 != now ) { - ret = u3k(sut); - } else { - u3_noun hub = _cqfu_cull(van, p_sut, pol, lat, ref); - - ret = u3qf_core(hub, q_sut); - - u3z(hub); - } - break; - } - case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - u3_noun hic = _cqfu_cull(van, q_sut, pol, axe, ref); - - if ( c3y == u3r_sing(hic, q_sut) ) { - ret = u3k(sut); - } else { - ret = u3qf_face(p_sut, hic); - } - u3z(hic); - - break; - } - case c3__fork: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - if ( c3y == u3qdi_has(vil, sut) ) { - return c3__void; - } else { - u3_noun zoc = u3qdi_put(vil, sut); - u3_noun sin = _cull_in(van, p_sut, pol, axe, ref, now, lat, zoc); - u3_noun dex = _cull_in(van, q_sut, pol, axe, ref, now, lat, zoc); - - ret = u3qf_fork(sin, dex); - u3z(sin); - u3z(dex); - u3z(zoc); - - return ret; - } - } - case c3__cube: - case c3__hold: - { - u3_noun pyr = u3qfu_repo(van, sut); - u3_noun yot = _cull_in(van, pyr, pol, axe, ref, now, lat, vil); - - if ( c3y == u3r_sing(pyr, yot) ) { - if ( c3__void == pyr ) { - ret = c3__void; - } - else ret = u3k(sut); - } else { - ret = u3k(yot); - } - u3z(pyr); - u3z(yot); - break; - } - } - u3z(lat); - return ret; - } - - u3_noun - _cqfu_cull(u3_noun van, - u3_noun sut, - u3_noun pol, - u3_atom axe, - u3_noun ref) - { - if ( 1 == axe ) { - if ( c3y == pol ) { - return u3qfu_fuse(van, sut, ref); - } else { - return u3qfu_crop(van, sut, ref); - } - } else { - u3_atom now = u3qc_cap(axe); - u3_atom lat = u3qc_mas(axe); - - return _cull_in(van, sut, pol, axe, ref, now, lat, u3_nul); - } - } - -/* boilerplate -*/ - u3_noun - u3wfu_cull(u3_noun cor) - { - u3_noun sut, axe, pol, ref, van; - - if ( (c3n == u3r_mean(cor, u3x_sam_2, &pol, - u3x_sam_6, &axe, - u3x_sam_7, &ref, - u3x_con, &van, 0)) || - (c3n == u3ud(axe)) || - (u3_none == (sut = u3r_at(u3x_sam, van))) ) - { - return u3m_bail(c3__fail); - } else { - return _cqfu_cull(van, sut, pol, axe, ref); - } - } - - u3_noun - u3qfu_cull(u3_noun van, - u3_noun sut, - u3_noun pol, - u3_noun axe, - u3_noun ref) - { - c3_m fun_m = c3__cull + !!u3r_at(u3qfu_van_vet, van); - u3_noun pro = u3z_find_4(fun_m, sut, pol, axe, ref); - - if ( u3_none != pro ) { - return pro; - } - else { - pro = _cqfu_cull(van, sut, pol, axe, ref); - - return u3z_save_4(fun_m, sut, pol, axe, ref, pro); - } - } diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c deleted file mode 100644 index d3ed1cfb7e..0000000000 --- a/jets/f/ut_find.c +++ /dev/null @@ -1,370 +0,0 @@ -/* j/6/find.c -** -*/ -#include "all.h" - - static u3_noun - _find_in(u3_noun van, - u3_noun sut, - u3_noun dep, - u3_noun way, - u3_noun cug, - u3_noun gil) - { - u3_noun p_sut, q_sut; - - c3_assert(0); - if ( c3y == u3ud(sut) ) { - return u3nc(u3k(dep), u3_nul); - } - else switch ( u3h(sut) ) { - default: return u3nc(u3k(dep), u3_nul); - - case c3__bull: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { - return u3m_bail(c3__fail); - } - else { - if ( (c3n == u3du(cug)) || - (c3n == u3r_sing(u3t(cug), u3h(p_sut))) ) { - return _find_in(van, q_sut, dep, way, cug, gil); - } - else { - if ( 0 == dep ) { - return u3nc(0, - u3nt(u3_nul, - 1, - u3nt(2, u3k(p_sut), - u3k(q_sut)))); - } else { - return _find_in(van, q_sut, u3qa_dec(dep), way, cug, gil); - } - } - } - } - case c3__cell: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { - return u3m_bail(c3__fail); - } else { - u3_noun taf = _find_in(van, p_sut, dep, way, cug, gil); - u3_noun p_taf = u3h(taf); - u3_noun q_taf = u3t(taf); - u3_noun ret; - - if ( u3_nul == q_taf ) { - u3_noun bov = _find_in(van, q_sut, p_taf, way, cug, gil); - u3_noun p_bov = u3h(bov); - u3_noun q_bov = u3t(bov); - - if ( u3_nul == q_bov ) { - ret = u3k(bov); - } - else { - u3_noun puq_bov, quq_bov; - - u3r_mean(q_bov, 6, &puq_bov, 7, &quq_bov, 0); - ret = u3nq(u3k(p_bov), - u3_nul, - u3qc_peg(3, puq_bov), - u3k(quq_bov)); - } - u3z(bov); - } - else { - u3_noun puq_taf, quq_taf; - - u3r_mean(q_taf, 6, &puq_taf, 7, &quq_taf, 0); - ret = u3nq(u3k(p_taf), - u3_nul, - u3qc_peg(2, puq_taf), - u3k(quq_taf)); - } - u3z(taf); - return ret; - } - } - case c3__core: { - u3_noun pq_sut, qq_sut, rq_sut; - u3_noun prq_sut, qrq_sut; - - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) || - (c3n == u3r_trel(q_sut, &pq_sut, &qq_sut, &rq_sut)) || - (c3n == u3r_cell(rq_sut, &prq_sut, &qrq_sut)) ) - { - return u3m_bail(c3__fail); - } else { - u3_noun zem = (c3n == u3du(cug)) - ? u3_nul - : u3qf_look(u3t(cug), qrq_sut); - - if ( (u3_nul != zem) && (0 != dep) ) { - u3_noun ped; - - ped = u3qa_dec(dep); - u3z(dep); dep = ped; - - u3z(zem); - zem = u3_nul; - } - - if ( u3_nul == zem ) { - u3_noun taf = _find_in(van, p_sut, dep, way, cug, gil); - u3_noun p_taf = u3h(taf); - u3_noun q_taf = u3t(taf); - - if ( u3_nul == q_taf ) { - u3z(taf); - return u3nc(u3k(dep), u3_nul); - } - else { - u3_noun puq_taf, quq_taf; - u3_noun pro; - - u3r_mean(q_taf, 6, &puq_taf, 7, &quq_taf, 0); - - if ( c3n == u3qfu_park(van, sut, way, puq_taf) ) - { - u3_noun weh = u3qfu_shep(van, "way", 'a', u3k(way)); - u3_noun waz = u3qfu_shep(van, "axis", 'd', u3k(puq_taf)); - - u3t_push(u3nc(c3__mean, weh)); - u3t_push(u3nc(c3__mean, waz)); - return u3m_error("find-park"); - } - else { - pro = u3nq(u3k(p_taf), - u3_nul, - u3qc_peg(3, puq_taf), - u3k(quq_taf)); - - u3z(taf); - return pro; - } - } - } - else { - u3_noun u_zem = u3t(zem); - u3_noun pu_zem = u3h(u_zem); - u3_noun qu_zem = u3t(u_zem); - u3_noun mut; - u3_noun pro; - - mut = u3nt(c3__core, - u3k(p_sut), - u3nt(c3__gold, - u3k(qq_sut), - u3k(rq_sut))); - - pro = u3nc(0, - u3nq(u3_nul, - 1, - 1, - u3nc(u3qc_peg(2, pu_zem), - u3nc(u3nc(mut, u3k(qu_zem)), - u3_nul)))); - u3z(zem); - return pro; - } - } - } - case c3__face: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { - return u3m_bail(c3__fail); - } else { - if ( (c3n == u3du(cug)) || (c3n == u3r_sing(u3t(cug), p_sut)) ) { - return u3nc(u3k(dep), u3_nul); - } else { - if ( 0 == dep ) { - return u3nc(0, u3nq(u3_nul, 1, 0, u3k(q_sut))); - } else { - return u3nc - (u3qa_dec(dep), u3_nul); - } - } - } - } - case c3__cube: { - u3_noun fop = u3qfu_repo(van, sut); - u3_noun pro = _find_in(van, fop, dep, way, cug, gil); - - u3z(fop); - return pro; - } - case c3__fork: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { - return u3m_bail(c3__fail); - } - - if ( (c3y == u3qdi_has(gil, q_sut)) ) { - return _find_in(van, p_sut, dep, way, cug, gil); - } - else if ( (c3y == u3qdi_has(gil, p_sut)) ) { - return _find_in(van, q_sut, dep, way, cug, gil); - } - else { - u3_noun hax = _find_in(van, p_sut, dep, way, cug, gil); - u3_noun yor = _find_in(van, q_sut, dep, way, cug, gil); - u3_noun p_hax = u3h(hax); - u3_noun p_yor = u3h(yor); - u3_noun q_hax = u3t(hax); - u3_noun q_yor = u3t(yor); - u3_noun puq_hax, quq_hax; - u3_noun puq_yor, quq_yor; - u3_noun ret = 0; - - if ( u3_nul != q_hax ) { - u3r_mean(q_hax, 6, &puq_hax, 7, &quq_hax, 0); - } - if ( u3_nul != q_yor ) { - u3r_mean(q_yor, 6, &puq_yor, 7, &quq_yor, 0); - } - - if ( c3y == u3r_sing(hax, yor) ) { - ret = u3k(hax); - } - else { - if ( (c3n == u3r_sing(p_hax, p_yor)) || - ((u3_nul == q_hax) || (u3_nul == q_yor)) || - (c3n == u3r_sing(puq_hax, puq_yor)) || - (c3n == u3r_sing(u3h(quq_hax), u3h(quq_yor))) ) - { - return u3m_error("find-fork"); - } - switch ( u3h(quq_hax) ) { - case 0: { - u3_noun pquq_hax = u3t(quq_hax); - u3_noun pquq_yor = u3t(quq_yor); - - ret = u3nc(u3k(p_hax), - u3nq(u3_nul, - u3k(puq_hax), - 0, - u3qf_fork(pquq_hax, pquq_yor))); - break; - } - case 1: { - u3_noun pquq_hax, qquq_hax, pquq_yor, qquq_yor; - - u3x_cell(u3t(quq_hax), &pquq_hax, &qquq_hax); - u3x_cell(u3t(quq_yor), &pquq_yor, &qquq_yor); - - if ( c3n == u3r_sing(pquq_hax, pquq_yor) ) { - return u3m_error("find-fork"); - } else { - ret = u3nc(u3k(p_hax), - u3nq(u3_nul, - u3k(puq_hax), - 1, - u3nc(u3k(pquq_hax), - u3qb_weld(qquq_hax, qquq_yor)))); - break; - } - } - case 2: { - u3_noun pquq_hax, qquq_hax, pquq_yor, qquq_yor; - u3_noun ppquq_hax, qpquq_hax, rpquq_hax, spquq_hax; - u3_noun ppquq_yor, qpquq_yor, rpquq_yor, spquq_yor; - - u3x_cell(u3t(quq_hax), &pquq_hax, &qquq_hax); - u3x_cell(u3t(quq_yor), &pquq_yor, &qquq_yor); - u3x_qual(pquq_hax, - &ppquq_hax, &qpquq_hax, &rpquq_hax, &spquq_hax); - u3x_qual(pquq_yor, - &ppquq_yor, &qpquq_yor, &rpquq_yor, &spquq_yor); - - if ( (c3n == u3r_sing(ppquq_hax, ppquq_yor)) || - (c3n == u3r_sing(qpquq_hax, qpquq_yor)) || - (c3n == u3r_sing(rpquq_hax, rpquq_yor)) ) - { - return u3m_error("find-fork"); - } - else { - ret = u3nc(u3k(p_hax), - u3nq(u3_nul, - u3k(puq_hax), - 2, - u3nc(u3nq(u3k(ppquq_hax), - u3k(qpquq_hax), - u3k(rpquq_hax), - u3qf_fork(spquq_hax, - spquq_yor)), - u3qf_fork(qquq_hax, qquq_yor)))); - break; - } - } - } - } - u3z(yor); - u3z(hax); - - return ret; - } - } - case c3__hold: p_sut = u3t(sut); - { - if ( (c3y == u3qdi_has(gil, sut)) ) { - return u3nc(u3k(dep), u3_nul); - } - else { - u3_noun zoc = u3qdi_put(gil, sut); - u3_noun fop = u3qfu_repo(van, sut); - u3_noun pro = _find_in(van, fop, dep, way, cug, zoc); - - u3z(fop); - u3z(zoc); - - return pro; - } - } - } - } - - u3_noun - _cqfu_find(u3_noun van, - u3_noun sut, - u3_noun dep, - u3_noun way, - u3_noun cug) - { - return _find_in(van, sut, dep, way, cug, u3_nul); - } - -/* boilerplate -*/ - u3_noun - u3wfu_find(u3_noun cor) - { - u3_noun sut, dep, way, cug, van; - - if ( (c3n == u3r_mean(cor, u3x_sam_2, &dep, - u3x_sam_6, &way, - u3x_sam_7, &cug, - u3x_con, &van, - 0)) || - (u3_none == (sut = u3r_at(u3x_sam, van))) ) - { - return u3m_bail(c3__fail); - } else { - return _cqfu_find(van, sut, dep, way, cug); - } - } - - u3_noun - u3qfu_find(u3_noun van, - u3_noun sut, - u3_noun dep, - u3_noun way, - u3_noun cug) - { - c3_m fun_m = c3__find + !!u3r_at(u3qfu_van_vet, van); - u3_noun pro = u3z_find_4(fun_m, sut, dep, way, cug); - - if ( u3_none != pro ) { - return pro; - } - else { - pro = _cqfu_find(van, sut, dep, way, cug); - - return u3z_save_4(fun_m, sut, dep, way, cug, pro); - } - } diff --git a/jets/f/ut_fink.c b/jets/f/ut_fink.c deleted file mode 100644 index 27e45db105..0000000000 --- a/jets/f/ut_fink.c +++ /dev/null @@ -1,106 +0,0 @@ -/* j/6/fink.c -** -*/ -#include "all.h" - - -/* logic -*/ - static u3_noun - _fink_flee(u3_noun poy) - { - u3_noun p_poy = u3h(poy); - u3_noun q_poy = u3t(poy); - - switch ( u3h(q_poy) ) { - default: return u3m_bail(c3__fail); - case 0: { - u3_noun pq_poy = u3t(q_poy); - - return u3nt(u3k(p_poy), c3y, u3k(pq_poy)); - } - case 1: { - u3_noun pq_poy = u3h(u3t(q_poy)); - u3_noun qq_poy = u3t(u3t(q_poy)); - - return u3nq(u3k(p_poy), c3n, u3k(pq_poy), u3k(qq_poy)); - } - case 2: { - u3_noun pq_poy = u3h(u3t(q_poy)); - // u3_noun qq_poy = u3t(u3t(q_poy)); - // u3_noun ppq_poy = u3h(pq_poy); - // u3_noun qpq_poy = u3h(u3t(pq_poy)); - u3_noun rpq_poy = u3h(u3t(u3t(pq_poy))); - u3_noun spq_poy = u3t(u3t(u3t(pq_poy))); - - return u3nt(u3qc_peg(p_poy, rpq_poy), c3y, u3k(spq_poy)); - } - } - } - - u3_noun - _cqfu_fink(u3_noun van, - u3_noun sut, - u3_noun dep, - u3_noun way, - u3_noun cug) - { - // u3_noun dun = u3qfu_dunq(van, "type", sut); - u3_noun nuc = (u3_blip == cug) - ? u3qfu_shew(van, - u3nc(u3nc('c', - u3i_string("find-limb")), - '$')) - : u3qfu_shep(van, "find-limb", 'a', u3k(cug)); - u3_noun pro; - - // u3t_push(u3nc(c3__mean, dun)); - u3t_push(u3nc(c3__mean, nuc)); - { - u3_noun hoq = u3qfu_find(van, sut, dep, way, cug); - u3_noun fin = u3t(hoq); - - if ( u3_nul == fin ) { - // u3m_p("cug", cug); - return u3m_error("find-none"); - } - else { - pro = _fink_flee(u3t(fin)); - u3z(hoq); - } - } - // u3t_drop(); - u3t_drop(); - - return pro; - } - -/* boilerplate -*/ - u3_noun - u3wfu_fink(u3_noun cor) - { - u3_noun sut, dep, way, cug, van; - - if ( (c3n == u3r_mean(cor, u3x_sam_2, &dep, - u3x_sam_6, &way, - u3x_sam_7, &cug, - u3x_con, &van, - 0)) || - (u3_none == (sut = u3r_at(u3x_sam, van))) ) - { - return u3m_bail(c3__fail); - } else { - return _cqfu_fink(van, sut, dep, way, cug); - } - } - - u3_noun - u3qfu_fink(u3_noun van, - u3_noun sut, - u3_noun dep, - u3_noun way, - u3_noun cug) - { - return _cqfu_fink(van, sut, dep, way, cug); - } diff --git a/jets/f/ut_heal.c b/jets/f/ut_heal.c deleted file mode 100644 index 8eddd0a566..0000000000 --- a/jets/f/ut_heal.c +++ /dev/null @@ -1,242 +0,0 @@ -/* j/6/heal.c -** -*/ -#include "all.h" - -/* internals -*/ - static u3_noun - _heal_as(u3_noun, u3_noun, u3_noun, u3_atom, u3_noun); - - static u3_noun - _heal_by(u3_noun van, - u3_noun sut, - u3_noun qug, - u3_noun ref) - { - u3_noun p_sut, q_sut; - - if ( c3n == u3du(sut) ) { - return u3m_error("heal-name"); - } - else switch ( u3h(sut) ) { - default: return u3m_error("heal-name"); - - case c3__core: - { - return u3k(ref); - } - case c3__bull: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - if ( (c3y == u3du(u3t(qug))) && - (c3y == u3r_sing(u3h(p_sut), u3t(u3t(qug))) ) ) { - return u3k(ref); - } - else { - u3_noun sub = _heal_by(van, q_sut, qug, ref); - u3_noun ret; - - ret = u3qfu_busk(van, - sub, - u3h(p_sut), - u3h(u3t(p_sut))); - - u3z(sub); - return ret; - } - } - case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - if ( (c3n == u3du(u3t(qug))) || - (c3y == u3r_sing(p_sut, u3t(u3t(qug)))) ) { - return u3qf_face(p_sut, ref); - } - else return u3m_error("heal-name"); - } - case c3__hold: { - u3_noun rep = u3qfu_repo(van, sut); - u3_noun ret = _heal_by(van, rep, qug, ref); - - u3z(rep); - return ret; - } - case c3__fork: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - u3_noun dis = _heal_by(van, p_sut, qug, ref); - u3_noun dat = _heal_by(van, q_sut, qug, ref); - u3_noun ret = u3qf_fork(dis, dat); - - u3z(dis); - u3z(dat); - return ret; - } - } - } - - static u3_noun - _heal_to(u3_noun van, - u3_noun sut, - u3_noun gil, - u3_noun qug, - u3_noun ref, - u3_atom now, - u3_atom lat) - { - u3_noun p_sut, q_sut; - - if ( c3n == u3du(sut) ) { - goto repo; - } - else switch ( u3h(sut) ) { - default: goto repo; - - case c3__atom: return c3__void; - - case c3__bull: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - u3_noun sub = _heal_to(van, q_sut, gil, qug, ref, now, lat); - u3_noun ret; - - ret = u3qfu_busk - (van, sub, u3h(p_sut), u3h(u3t(p_sut))); - - u3z(sub); - return ret; - } - case c3__cell: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - u3_noun ter, ret; - - if ( 2 == now ) { - ter = _heal_as(van, p_sut, qug, lat, ref); - ret = u3qf_cell(ter, q_sut); - } else { - ter = _heal_as(van, q_sut, qug, lat, ref); - ret = u3qf_cell(p_sut, ter); - } - u3z(ter); - return ret; - } - - case c3__core: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - if ( 3 != now ) { - return u3m_error("heal-core"); - } else { - u3_noun ter = _heal_as(van, p_sut, qug, lat, ref); - u3_noun ret = u3qf_core(ter, q_sut); - - u3z(ter); - return ret; - } - } - case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - u3_noun dun = _heal_to(van, q_sut, gil, qug, ref, now, lat); - u3_noun ret = u3qf_face(p_sut, dun); - - u3z(dun); - return ret; - } - case c3__fork: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - u3_noun dis = _heal_to(van, p_sut, gil, qug, ref, now, lat); - u3_noun dat = _heal_to(van, q_sut, gil, qug, ref, now, lat); - u3_noun ret = u3qf_fork(dis, dat); - - u3z(dis); - u3z(dat); - return ret; - } - - case c3__hold: { - if ( (c3y == u3qdi_has(gil, sut)) ) { - return c3__void; - } - else { - u3_noun zoc = u3qdi_put(gil, sut); - u3_noun rep = u3qfu_repo(van, sut); - u3_noun ret = _heal_to(van, rep, zoc, qug, ref, now, lat); - - u3z(rep); - u3z(zoc); - - return ret; - } - } - } - - repo: { - u3_noun rep = u3qfu_repo(van, sut); - u3_noun ret = _heal_to(van, rep, gil, qug, ref, now, lat); - - u3z(rep); - return ret; - } - } - - static u3_noun - _heal_as(u3_noun van, - u3_noun sut, - u3_noun qug, - u3_atom axe, - u3_noun ref) - { - if ( 1 == axe ) { - if ( u3_nul == qug ) { - return u3k(ref); - } else return _heal_by(van, sut, qug, ref); - } - else { - u3_atom now = u3qc_cap(axe); - u3_atom lat = u3qc_mas(axe); - u3_noun ret = _heal_to(van, sut, u3_nul, qug, ref, now, lat); - - u3z(lat); - return ret; - } - } - -/* functions -*/ - u3_noun - _cqfu_heal(u3_noun van, - u3_noun sut, - u3_noun qug, - u3_noun axe, - u3_noun ref) - { - return _heal_as(van, sut, qug, axe, ref); - } - -/* boilerplate -*/ - u3_noun - u3wfu_heal(u3_noun cor) - { - u3_noun van, sut, qug, axe, ref; - - if ( (c3n == u3r_mean(cor, u3x_sam_2, &qug, - u3x_sam_6, &axe, - u3x_sam_7, &ref, - u3x_con, &van, - 0)) || - (c3n == u3ud(axe)) || - (u3_none == (sut = u3r_at(u3x_sam, van))) ) - { - return u3m_bail(c3__fail); - } else { - return _cqfu_heal(van, sut, qug, axe, ref); - } - } - - u3_noun - u3qfu_heal(u3_noun van, - u3_noun sut, - u3_noun qug, - u3_noun axe, - u3_noun ref) - { - return _cqfu_heal(van, sut, qug, axe, ref); - } - diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index 3d4093d7ef..539e90e9e7 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -695,12 +695,6 @@ int FOO; if ( c3y == u3ud(p_gen) ) { bez = u3k(p_gen); } else { - #ifdef HUSH - bez = u3h(p_gen); - if(!(bez == c3__fast || bez == c3__memo)){ - return hum; - } - #endif bez = u3nc(u3k(u3h(p_gen)), _mint_corn(van, sut, u3t(p_gen))); } diff --git a/jets/f/ut_perk.c b/jets/f/ut_perk.c new file mode 100644 index 0000000000..0bbf878377 --- /dev/null +++ b/jets/f/ut_perk.c @@ -0,0 +1,90 @@ +/* j/6/ut_park.c +** +*/ +#include "all.h" + + +/* logic +*/ + u3_noun + _cqfu_park(u3_noun van, + u3_noun sut, + u3_noun way, + u3_atom axe) + { + if ( c3n == u3du(sut) || c3__core != u3h(sut) ) { + return u3m_bail(c3__fail); + } + // else if ( c3n == u3j_hook(u3k(van), "vet") ) { + else if ( c3n == u3r_at(u3qfu_van_vet, van) ) { + return c3y; + } + else { + u3_noun p_sut, q_sut, pq_sut; + + u3x_cell(u3t(sut), &p_sut, &q_sut); + u3x_cell(q_sut, &pq_sut, 0); + + if ( c3__both == way ) { + if ( c3__gold == pq_sut ) { + return c3y; + } else return c3n; + } + if ( c3__read == way ) { + switch ( pq_sut ) { + default: return u3m_bail(c3__fail); + + case c3__gold: return c3y; + case c3__lead: return c3n; + case c3__iron: return c3n; + case c3__zinc: return + c3a(!(u3r_sing(1, axe)), + u3r_sing(2, u3qc_cap(axe))); + } + } + else if ( c3__rite == way ) { + switch ( pq_sut ) { + default: return u3m_bail(c3__fail); + + case c3__gold: return c3y; + case c3__lead: return c3n; + case c3__iron: return + c3a(!(u3r_sing(1, axe)), + u3r_sing(2, u3qc_cap(axe))); + case c3__zinc: return c3n; + } + } + else if ( c3__free == way ) { return c3y; } + else return u3m_bail(c3__fail); + } + } + +/* boilerplate +*/ + u3_noun + u3wfu_park(u3_noun cor) + { + u3_noun sut, way, axe, van; + + if ( (c3n == u3r_mean(cor, u3x_sam_2, &way, + u3x_sam_3, &axe, + u3x_con, &van, + 0)) || + (c3n == u3ud(axe)) || + (u3_none == (sut = u3r_at(u3x_sam, van))) ) + { + return u3m_bail(c3__fail); + } else { + return _cqfu_park(van, sut, way, axe); + } + } + + u3_noun + u3qfu_park(u3_noun van, + u3_noun sut, + u3_noun way, + u3_noun axe) + { + return _cqfu_park(van, sut, way, axe); + } + diff --git a/jets/f/ut_sift.c b/jets/f/ut_sift.c deleted file mode 100644 index 9b09709689..0000000000 --- a/jets/f/ut_sift.c +++ /dev/null @@ -1,31 +0,0 @@ -/* j/6/sift.c -** -*/ -#include "all.h" - - -/* boilerplate -*/ - u3_noun - u3wfu_sift(u3_noun cor) - { - u3_noun sut, ref, van; - - if ( (c3n == u3r_mean(cor, u3x_sam, &ref, - u3x_con, &van, - 0)) || - (u3_none == (sut = u3r_at(u3x_sam, van))) ) - { - return u3m_bail(c3__fail); - } else { - return u3qfu_sift(van, sut, ref); - } - } - - u3_noun - u3qfu_sift(u3_noun van, - u3_noun sut, - u3_noun ref) - { - return u3k(ref); - } diff --git a/jets/f/ut_swab.c b/jets/f/ut_swab.c deleted file mode 100644 index d0e10d8f1d..0000000000 --- a/jets/f/ut_swab.c +++ /dev/null @@ -1,57 +0,0 @@ -/* j/6/swab.c -** -*/ -#include "all.h" - - -/* internals -*/ - -/* functions -*/ - u3_noun - _cqfu_snub(u3_noun van, - u3_noun sut, - u3_noun har) - { - if ( c3n == u3du(har) ) { - return u3_nul; - } else { - u3_noun i_har = u3h(har); - u3_noun t_har = u3t(har); - u3_noun pi_har = u3h(i_har); - u3_noun qi_har = u3t(i_har); - u3_noun peh = u3qb_flop(pi_har); - u3_noun ret = u3nc(u3nc(peh, u3k(qi_har)), - _cqfu_snub(van, sut, t_har)); - - return ret; - } - } - -/* boilerplate -*/ - u3_noun - u3wfu_snub(u3_noun cor) - { - u3_noun van, sut, har; - - if ( (c3n == u3r_mean(cor, u3x_sam, &har, - u3x_con, &van, - 0)) || - (u3_none == (sut = u3r_at(u3x_sam, van))) ) - { - return u3m_bail(c3__fail); - } else { - return _cqfu_snub(van, sut, har); - } - } - - u3_noun - u3qfu_snub(u3_noun van, - u3_noun sut, - u3_noun har) - { - return _cqfu_snub(van, sut, har); - } - diff --git a/jets/tree.c b/jets/tree.c index 9c52d16f98..59dcf624bc 100644 --- a/jets/tree.c +++ b/jets/tree.c @@ -347,17 +347,13 @@ static u3j_harm _mood__hoon_fork_a[] = {{".2", u3wf_fork}, {}}; static u3j_harm _mood__hoon_hike_a[] = {{".2", u3wf_hike}, {}}; static u3j_harm _mood__hoon_look_a[] = {{".2", u3wf_look}, {}}; -static u3j_harm _mood__hoon__ut_busk_a[] = {{".2", u3wfu_busk}, {}}; -static u3j_harm _mood__hoon__ut_bust_a[] = {{".2", u3wfu_bust}, {}}; +static u3j_harm _mood__hoon__ut_burn_a[] = {{".2", u3wfu_burn}, {}}; static u3j_harm _mood__hoon__ut_conk_a[] = {{".2", u3wfu_conk}, {}}; static u3j_harm _mood__hoon__ut_crop_a[] = {{".2", u3wfu_crop}, {}}; -static u3j_harm _mood__hoon__ut_cull_a[] = {{".2", u3wfu_cull}, {}}; -static u3j_harm _mood__hoon__ut_find_a[] = {{".2", u3wfu_find}, {}}; static u3j_harm _mood__hoon__ut_fire_a[] = {{".2", u3wfu_fire}, {}}; static u3j_harm _mood__hoon__ut_firm_a[] = {{".2", u3wfu_firm}, {}}; static u3j_harm _mood__hoon__ut_fish_a[] = {{".2", u3wfu_fish}, {}}; static u3j_harm _mood__hoon__ut_fuse_a[] = {{".2", u3wfu_fuse}, {}}; -static u3j_harm _mood__hoon__ut_heal_a[] = {{".2", u3wfu_heal}, {}}; static u3j_harm _mood__hoon__ut_mint_a[] = {{".2", u3wfu_mint}, {}}; static u3j_harm _mood__hoon__ut_mull_a[] = {{".2", u3wfu_mull}, {}}; static u3j_harm _mood__hoon__ut_nest_a[] = {{".2", u3wfu_nest}, {}}; @@ -365,25 +361,18 @@ static u3j_harm _mood__hoon__ut_park_a[] = {{".2", u3wfu_park}, {}}; static u3j_harm _mood__hoon__ut_peek_a[] = {{".2", u3wfu_peek}, {}}; static u3j_harm _mood__hoon__ut_play_a[] = {{".2", u3wfu_play}, {}}; static u3j_harm _mood__hoon__ut_rest_a[] = {{".2", u3wfu_rest}, {}}; -static u3j_harm _mood__hoon__ut_seek_a[] = {{".2", u3wfu_seek}, {}}; -static u3j_harm _mood__hoon__ut_seep_a[] = {{".2", u3wfu_seep}, {}}; -static u3j_harm _mood__hoon__ut_snub_a[] = {{".2", u3wfu_snub}, {}}; static u3j_harm _mood__hoon__ut_toss_a[] = {{".2", u3wfu_toss}, {}}; static u3j_harm _mood__hoon__ut_wrap_a[] = {{".2", u3wfu_wrap}, {}}; static u3j_core _mood__hoon__ut_d[] = { - { "busk", _mood__hoon__ut_busk_a }, - { "bust", _mood__hoon__ut_bust_a }, + { "burn", _mood__hoon__ut_burn_a }, { "conk", _mood__hoon__ut_conk_a }, { "crop", _mood__hoon__ut_crop_a }, - { "cull", _mood__hoon__ut_cull_a }, - { "find", _mood__hoon__ut_find_a }, { "fire", _mood__hoon__ut_fire_a }, { "firm", _mood__hoon__ut_firm_a }, { "fish", _mood__hoon__ut_fish_a }, { "fuse", _mood__hoon__ut_fuse_a }, - { "heal", _mood__hoon__ut_heal_a }, { "mint", _mood__hoon__ut_mint_a }, { "mull", _mood__hoon__ut_mull_a }, { "nest", _mood__hoon__ut_nest_a }, @@ -391,9 +380,6 @@ static u3j_core _mood__hoon__ut_d[] = { "peek", _mood__hoon__ut_peek_a }, { "play", _mood__hoon__ut_play_a }, { "rest", _mood__hoon__ut_rest_a }, - { "seek", _mood__hoon__ut_seek_a }, - { "seep", _mood__hoon__ut_seep_a }, - { "snub", _mood__hoon__ut_snub_a }, { "toss", _mood__hoon__ut_toss_a }, { "wrap", _mood__hoon__ut_wrap_a }, {} From 7e4f344a5178c81a9fdc0283bc0869d661ba1c8e Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sat, 26 Dec 2015 23:58:07 -0500 Subject: [PATCH 037/137] Remove funky semantics from %bull. --- jets/f/bull.c | 3 +- jets/f/ut_firm.c | 10 +------ jets/f/ut_fish.c | 6 +++- jets/f/ut_perk.c | 71 ++++++++++++------------------------------------ 4 files changed, 25 insertions(+), 65 deletions(-) diff --git a/jets/f/bull.c b/jets/f/bull.c index 1896d88a83..a460bb1cbc 100644 --- a/jets/f/bull.c +++ b/jets/f/bull.c @@ -10,8 +10,7 @@ u3qf_bull(u3_noun bid, u3_noun der) { - if ( (c3__void == der) || - (c3__void == u3t(u3t(u3t(bid)))) ) + if ( c3__void == der ) { return c3__void; } diff --git a/jets/f/ut_firm.c b/jets/f/ut_firm.c index ea3856dabd..d3f7d43dbd 100644 --- a/jets/f/ut_firm.c +++ b/jets/f/ut_firm.c @@ -34,15 +34,7 @@ } case c3__bull: u3x_cell(u3t(sut), &p_sut, &q_sut); { - u3_noun nun = u3r_at(u3h(u3t(u3t(p_sut))), dib); - - if ( u3_none == nun ) { - return c3n; - } else { - return c3a(_cqfu_firm(van, q_sut, dib), - _cqfu_firm(van, u3t(u3t(u3t(p_sut))), - nun)); - } + return _cqfu_firm(van, q_sut, dib); } case c3__cell: u3x_cell(u3t(sut), &p_sut, &q_sut); { diff --git a/jets/f/ut_fish.c b/jets/f/ut_fish.c index dc58faba9c..c9989ff056 100644 --- a/jets/f/ut_fish.c +++ b/jets/f/ut_fish.c @@ -35,7 +35,11 @@ return pro; } case c3__bull: { - return u3m_error("bull-fish"); + if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { + return u3m_bail(c3__fail); + } else { + return _fish_in(van, q_sut, axe, vit); + } } case c3__cell: { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { diff --git a/jets/f/ut_perk.c b/jets/f/ut_perk.c index 0bbf878377..cf326e7b82 100644 --- a/jets/f/ut_perk.c +++ b/jets/f/ut_perk.c @@ -1,4 +1,4 @@ -/* j/6/ut_park.c +/* j/6/ut_perk.c ** */ #include "all.h" @@ -7,84 +7,49 @@ /* logic */ u3_noun - _cqfu_park(u3_noun van, + _cqfu_perk(u3_noun van, u3_noun sut, u3_noun way, - u3_atom axe) + u3_noun met) { - if ( c3n == u3du(sut) || c3__core != u3h(sut) ) { - return u3m_bail(c3__fail); + if ( c3__gold == met ) { + return u3nc(c3y, c3y); } - // else if ( c3n == u3j_hook(u3k(van), "vet") ) { - else if ( c3n == u3r_at(u3qfu_van_vet, van) ) { - return c3y; - } - else { - u3_noun p_sut, q_sut, pq_sut; + else switch ( way ) { + default: return u3m_bail(c3__fail); - u3x_cell(u3t(sut), &p_sut, &q_sut); - u3x_cell(q_sut, &pq_sut, 0); - - if ( c3__both == way ) { - if ( c3__gold == pq_sut ) { - return c3y; - } else return c3n; - } - if ( c3__read == way ) { - switch ( pq_sut ) { - default: return u3m_bail(c3__fail); - - case c3__gold: return c3y; - case c3__lead: return c3n; - case c3__iron: return c3n; - case c3__zinc: return - c3a(!(u3r_sing(1, axe)), - u3r_sing(2, u3qc_cap(axe))); - } - } - else if ( c3__rite == way ) { - switch ( pq_sut ) { - default: return u3m_bail(c3__fail); - - case c3__gold: return c3y; - case c3__lead: return c3n; - case c3__iron: return - c3a(!(u3r_sing(1, axe)), - u3r_sing(2, u3qc_cap(axe))); - case c3__zinc: return c3n; - } - } - else if ( c3__free == way ) { return c3y; } - else 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_park(u3_noun cor) + u3wfu_perk(u3_noun cor) { - u3_noun sut, way, axe, van; + u3_noun sut, way, met, van; if ( (c3n == u3r_mean(cor, u3x_sam_2, &way, - u3x_sam_3, &axe, + u3x_sam_3, &met, u3x_con, &van, 0)) || - (c3n == u3ud(axe)) || (u3_none == (sut = u3r_at(u3x_sam, van))) ) { return u3m_bail(c3__fail); } else { - return _cqfu_park(van, sut, way, axe); + return _cqfu_perk(van, sut, way, met); } } u3_noun - u3qfu_park(u3_noun van, + u3qfu_perk(u3_noun van, u3_noun sut, u3_noun way, - u3_noun axe) + u3_noun met) { - return _cqfu_park(van, sut, way, axe); + return _cqfu_perk(van, sut, way, met); } From 8d1e7e11a07f0015b939d24a5d6464b6861a2a62 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 27 Dec 2015 00:43:40 -0500 Subject: [PATCH 038/137] New powers for $face. --- jets/f/face.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/jets/f/face.c b/jets/f/face.c index d14d200176..abec7b8f77 100644 --- a/jets/f/face.c +++ b/jets/f/face.c @@ -7,24 +7,24 @@ /* functions */ u3_noun - u3qf_face(u3_noun cog, + u3qf_face(u3_noun sag, u3_noun tip) { if ( c3__void == tip ) { return c3__void; } else return u3nt(c3__face, - u3k(cog), + u3k(sag), u3k(tip)); } u3_noun u3wf_face(u3_noun cor) { - u3_noun cog, tip; + u3_noun sag, tip; - if ( c3n == u3r_mean(cor, u3x_sam_2, &cog, u3x_sam_3, &tip, 0) ) { + if ( c3n == u3r_mean(cor, u3x_sam_2, &sag, u3x_sam_3, &tip, 0) ) { return u3m_bail(c3__fail); } else { - return u3qf_face(cog, tip); + return u3qf_face(sag, tip); } } From e518a4846e11cafa67af1c34e0e38f34a0f01ff1 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 27 Dec 2015 01:18:59 -0500 Subject: [PATCH 039/137] Disabled %bull. --- jets/f/ut_bust.c | 68 ------------------------------------------------ jets/f/ut_mint.c | 10 +++---- jets/f/ut_mull.c | 14 +++++----- jets/f/ut_play.c | 9 ++++--- 4 files changed, 16 insertions(+), 85 deletions(-) delete mode 100644 jets/f/ut_bust.c diff --git a/jets/f/ut_bust.c b/jets/f/ut_bust.c deleted file mode 100644 index f829bd6869..0000000000 --- a/jets/f/ut_bust.c +++ /dev/null @@ -1,68 +0,0 @@ -/* j/6/bust.c -** -*/ -#include "all.h" - - -/* logic -*/ - u3_noun - _cqfu_bust(u3_noun van, - u3_noun sut, - u3_noun dib) - { - u3_noun yam = u3qfu_burn(van, sut); - u3_noun yib = u3nc(u3nc(u3k(u3h(u3h(yam))), - u3k(dib)), - u3k(u3t(yam))); - u3_noun woo = u3nc(c3__cnzy, u3_blip); - u3_noun wox = u3qfu_mint(van, sut, c3__noun, woo); - u3_noun ret = u3n_nock_on(yib, u3k(u3t(wox))); - - if ( u3_none == ret ) { - return u3m_error("bust-nock"); - } - u3z(wox); - u3z(woo); - u3z(yam); - - return ret; - } - -/* boilerplate -*/ - u3_noun - u3wfu_bust(u3_noun cor) - { - u3_noun sut, dib, van; - - if ( (c3n == u3r_mean(cor, u3x_sam, &dib, u3x_con, &van, 0)) || - (u3_none == (sut = u3r_at(u3x_sam, van))) ) - { - return u3m_bail(c3__fail); - } else { - return _cqfu_bust(van, sut, dib); - } - } - - u3_noun - u3qfu_bust(u3_noun van, - u3_noun sut, - u3_noun dib) - { -#if 1 - return _cqfu_bust(van, sut, dib); -#else - c3_m fun_m = c3__bust; - u3_noun pro = u3z_find_2(fun_m, sut, dib); - - if ( u3_none != pro ) { - return pro; - } - else { - pro = _cqfu_bust(van, sut, dib); - - return u3z_save_2(fun_m, sut, dib, pro); - } -#endif - } diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index 539e90e9e7..571501ce11 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -629,14 +629,14 @@ int FOO; case c3__tstr: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); _mint_used(); { - u3_noun sep = u3qfu_seep(van, sut, c3__both, q_gen); - u3_noun bid = u3nt(u3k(p_gen), u3k(q_gen), sep); - u3_noun boc = u3qf_bull(bid, sut); + u3_noun sag = u3nt(u3nt(u3nc(u3k(p_gen), u3k(q_gen)), u3_nul, u3_nul), + u3_nul, + u3_nul); + u3_noun boc = u3qf_face(sag, sut); u3_noun ret = _mint_in(van, boc, gol, r_gen); - u3z(bid); + u3z(sag); u3z(boc); - return ret; } case c3__cnts: u3x_cell(u3t(gen), &p_gen, &q_gen); diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index 9bb75e954c..1391394780 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -576,16 +576,14 @@ case c3__tstr: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); _mull_used(); { - u3_noun sep = u3qfu_seep(van, sut, c3__both, q_gen); - u3_noun pox = u3qfu_seep(van, dox, c3__both, q_gen); - u3_noun bid = u3nt(u3k(p_gen), u3k(q_gen), sep); - u3_noun yub = u3nt(u3k(p_gen), u3k(q_gen), pox); - u3_noun boc = u3qf_bull(bid, sut); - u3_noun nuf = u3qf_bull(yub, dox); + u3_noun sag = u3nt(u3nt(u3nc(u3k(p_gen), u3k(q_gen)), u3_nul, u3_nul), + u3_nul, + u3_nul); + u3_noun boc = u3qf_face(sag, sut); + u3_noun nuf = u3qf_face(sag, dox); u3_noun ret = _mull_in(van, boc, gol, nuf, r_gen); - u3z(bid); - u3z(yub); + u3z(sag); u3z(boc); u3z(nuf); diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index e4ee16dc56..2784cacca9 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -329,12 +329,13 @@ case c3__tstr: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); _play_used(); { - u3_noun sep = u3qfu_seep(van, sut, c3__both, q_gen); - u3_noun bid = u3nt(u3k(p_gen), u3k(q_gen), sep); - u3_noun boc = u3qf_bull(bid, sut); + u3_noun sag = u3nt(u3nt(u3nc(u3k(p_gen), u3k(q_gen)), u3_nul, u3_nul), + u3_nul, + u3_nul); + u3_noun boc = u3qf_face(sag, sut); u3_noun ret = _play_x(van, boc, r_gen); - u3z(bid); + u3z(sag); u3z(boc); return ret; From eeab0af487c3bf01b55a2f2ecaa73985de5e2c69 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 27 Dec 2015 01:42:53 -0500 Subject: [PATCH 040/137] Fully abolish %bull. --- Makefile | 1 - jets/f/bull.c | 30 ---------- jets/f/ut_burn.c | 4 -- jets/f/ut_crop.c | 12 ---- jets/f/ut_firm.c | 4 -- jets/f/ut_fuse.c | 8 --- jets/f/ut_nest.c | 14 ----- jets/f/ut_peek.c | 7 --- jets/f/ut_repo.c | 7 --- jets/f/ut_seek.c | 150 ----------------------------------------------- jets/tree.c | 2 - 11 files changed, 239 deletions(-) delete mode 100644 jets/f/bull.c diff --git a/Makefile b/Makefile index 55849e00ce..d178fadbf8 100644 --- a/Makefile +++ b/Makefile @@ -272,7 +272,6 @@ J_E_OFILES_ED=\ J_F_OFILES=\ jets/f/al.o \ jets/f/ap.o \ - jets/f/bull.o \ jets/f/cell.o \ jets/f/comb.o \ jets/f/cons.o \ diff --git a/jets/f/bull.c b/jets/f/bull.c deleted file mode 100644 index a460bb1cbc..0000000000 --- a/jets/f/bull.c +++ /dev/null @@ -1,30 +0,0 @@ -/* j/6/bull.c -** -*/ -#include "all.h" - - -/* functions -*/ - u3_noun - u3qf_bull(u3_noun bid, - u3_noun der) - { - if ( c3__void == der ) - { - return c3__void; - } - else return u3nt - (c3__bull, u3k(bid), u3k(der)); - } - u3_noun - u3wf_bull(u3_noun cor) - { - u3_noun bid, der; - - if ( c3n == u3r_mean(cor, u3x_sam_2, &bid, u3x_sam_3, &der, 0) ) { - return u3m_bail(c3__fail); - } else { - return u3qf_bull(bid, der); - } - } diff --git a/jets/f/ut_burn.c b/jets/f/ut_burn.c index d6961647a8..bd7fff4a5c 100644 --- a/jets/f/ut_burn.c +++ b/jets/f/ut_burn.c @@ -25,10 +25,6 @@ default: return u3m_bail(c3__fail); case c3__atom: return 0; - case c3__bull: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - return _burn_in(van, q_sut, gil); - } case c3__cell: u3x_cell(u3t(sut), &p_sut, &q_sut); { return u3nc diff --git a/jets/f/ut_crop.c b/jets/f/ut_crop.c index 852e3306fe..4a3cf0a2f7 100644 --- a/jets/f/ut_crop.c +++ b/jets/f/ut_crop.c @@ -71,14 +71,6 @@ } else return _crop_sint(van, sut, ref, bix); } - case c3__bull: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - u3_noun foz = _crop_dext(van, q_sut, ref, bix); - u3_noun ret = u3qf_bull(p_sut, foz); - - u3z(foz); - return ret; - } case c3__cell: u3x_cell(u3t(sut), &p_sut, &q_sut); { if ( c3__atom == u3h(ref) ) { @@ -182,10 +174,6 @@ switch ( u3h(ref) ) { default: return u3m_bail(c3__fail); - case c3__bull: u3x_cell(u3t(ref), &p_ref, &q_ref); - { - return _crop_dext(van, sut, q_ref, bix); - } case c3__core: case c3__cube: { return u3k(sut); diff --git a/jets/f/ut_firm.c b/jets/f/ut_firm.c index d3f7d43dbd..d25a4b1fdb 100644 --- a/jets/f/ut_firm.c +++ b/jets/f/ut_firm.c @@ -32,10 +32,6 @@ { return u3ud(dib); } - case c3__bull: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - return _cqfu_firm(van, q_sut, dib); - } case c3__cell: u3x_cell(u3t(sut), &p_sut, &q_sut); { return c3a(u3du(dib), diff --git a/jets/f/ut_fuse.c b/jets/f/ut_fuse.c index 4b407c30ba..24840df924 100644 --- a/jets/f/ut_fuse.c +++ b/jets/f/ut_fuse.c @@ -72,14 +72,6 @@ } return _fuse_in(van, ref, sut, bix); } - case c3__bull: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - u3_noun vot = _fuse_in(van, q_sut, ref, bix); - u3_noun ret = u3qf_bull(p_sut, vot); - - u3z(vot); - return ret; - } case c3__cell: u3x_cell(u3t(sut), &p_sut, &q_sut); { u3_noun p_ref, q_ref; diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index 71461512a9..5a4ca066cd 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -208,13 +208,6 @@ } else return _nest_sint(van, sut, tel, ref, gil); } - case c3__bull: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { - return u3m_bail(c3__fail); - } else { - return _nest_dext(van, q_sut, tel, ref, gil); - } - } case c3__cell: { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { return u3m_bail(c3__fail); @@ -373,13 +366,6 @@ return u3m_bail(c3__fail); } case c3__atom: return c3n; - case c3__bull: { - if ( c3n == u3r_trel(ref, 0, &p_ref, &q_ref) ) { - return u3m_bail(c3__fail); - } else { - return _nest_dext(van, sut, tel, q_ref, gil); - } - } case c3__cell: return c3n; case c3__core: { u3_noun gam = u3qfu_repo(van, ref); diff --git a/jets/f/ut_peek.c b/jets/f/ut_peek.c index af1ef806e1..f08827d6b7 100644 --- a/jets/f/ut_peek.c +++ b/jets/f/ut_peek.c @@ -35,13 +35,6 @@ case c3__atom: { return c3__void; } - case c3__bull: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { - return u3m_bail(c3__fail); - } else { - return _peek_in(van, q_sut, way, axe, gil); - } - } case c3__cell: { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { return u3m_bail(c3__fail); diff --git a/jets/f/ut_repo.c b/jets/f/ut_repo.c index 9659b2f4fa..4f82cab0cb 100644 --- a/jets/f/ut_repo.c +++ b/jets/f/ut_repo.c @@ -25,13 +25,6 @@ return u3m_error("repo-flat"); } - case c3__bull: { - if ( c3n == u3r_cell(u3t(sut), &p_sut, &q_sut)) { - return u3m_bail(c3__fail); - } else { - return u3k(q_sut); - } - } case c3__core: { if ( c3n == u3r_cell(u3t(sut), &p_sut, &q_sut) ) { return u3m_bail(c3__fail); diff --git a/jets/f/ut_seek.c b/jets/f/ut_seek.c index 4d84248ba6..f0a171f23e 100644 --- a/jets/f/ut_seek.c +++ b/jets/f/ut_seek.c @@ -21,103 +21,6 @@ } } -#if 0 - static u3_noun - _seek_silk_yew( - u3_noun van, - u3_noun syx, - u3_noun qq_tor) - { - if ( u3_nul == qq_tor ) { - return u3_nul; - } - else { - u3_noun iqq_tor = u3h(qq_tor); - u3_noun qiqq_tor = u3t(iqq_tor); - u3_noun yon = _seek_silk_yew(van, syx, u3t(qq_tor)); - - if ( c3__yew != u3h(qiqq_tor) ) { - return yon; - } else { - u3_noun nuy = u3qf_look(syx, u3t(qiqq_tor)); - - if ( u3_nul == nuy ) { - return u3m_error("silk"); - } - else { - yon = u3nc(u3k(u3t(nuy)), yon); - u3z(nuy); - return yon; - } - } - } - } - static u3_noun - _seek_silk_yaw(u3_noun - u3_noun hey) - { - u3_atom axe = 0; - - while ( u3_nul != hey ) { - if ( axe == 0 ) { - axe = u3h(u3h(hey)); - } else if ( axe != u3h(u3h(hey)) ) { - return u3m_error("silk"); - } - hey = u3t(hey); - } - } - - static u3_noun - _seek_silk_fum(u3_noun - u3_noun hey, - u3_noun qq_tor) - { - if ( u3_nul == qq_tor ) { - return u3_nul; - } - c3_assert(u3_nul != hey); - return u3nc - (u3nc(u3k(u3h(u3h(qq_tor))), - u3k(u3t(u3h(hey)))), - _seek_silk_fum(u3t(hey), u3t(qq_tor))); - } - - static u3_noun - _seek_silk( - u3_noun van, - u3_noun syx, - u3_noun tor) - { - u3_noun p_tor, q_tor, pq_tor, qq_tor; - u3_noun hey, ret; - - u3r_cell(tor, &p_tor, &q_tor); - if ( c3y == u3h(q_tor) ) { - return u3_nul; - } - u3r_cell(u3t(q_tor), &pq_tor, &qq_tor); - - hey = _seek_silk_yew(van, syx, qq_tor); - if ( u3_nul == hey ) { - return u3_nul; - } - if ( u3kb_lent(u3k(hey)) != - u3kb_lent(u3k(qq_tor)) ) - { - return u3m_error("silk"); - } - - ret = u3nq - (u3_nul, - c3n, - u3qc_peg(pq_tor, _seek_silk_yaw(hey)), - _seek_silk_fum(hey, qq_tor)); - - u3z(hey); - return ret; - } -#endif u3_noun _cqfu_seek(u3_noun van, @@ -150,21 +53,6 @@ zar = _cqfu_seek(van, sut, way, t_hyp); u3r_cell(zar, &p_zar, &q_zar); -#if 0 - if ( c3y == u3h(yip) ) { - sic = u3_nul; - } else { - // sic = _seek_silk(van, u3h(u3t(yip)), zar); - sic = u3_nul; - } - if ( u3_nul != sic ) { - u3z(yip); - u3z(zar); - - return u3t(sic); - } -#endif - if ( c3y == u3h(q_zar) ) { syp = u3k(u3t(q_zar)); } else { @@ -270,41 +158,3 @@ } #endif - u3_noun - u3qfu_seep(u3_noun van, - u3_noun sut, - u3_noun way, - u3_noun hyp) - { - u3_noun zar = u3qfu_seek(van, sut, way, hyp); - u3_noun p_zar = u3h(zar); - u3_noun q_zar = u3t(zar); - - if ( c3y != u3h(q_zar) ) { - return u3m_bail(c3__exit); - } - else { - u3_noun ret = u3nc(u3k(p_zar), u3k(u3t(q_zar))); - - u3z(zar); - return ret; - } - } - - u3_noun - u3wfu_seep(u3_noun cor) - { - u3_noun sut, way, hyp, van; - - if ( (c3n == u3r_mean(cor, u3x_sam_2, &way, - u3x_sam_3, &hyp, - u3x_con, &van, - 0)) || - (u3_none == (sut = u3r_at(u3x_sam, van))) ) - { - return u3m_bail(c3__fail); - } else { - return u3qfu_seep(van, sut, way, hyp); - } - } - diff --git a/jets/tree.c b/jets/tree.c index 59dcf624bc..092bbbf908 100644 --- a/jets/tree.c +++ b/jets/tree.c @@ -331,7 +331,6 @@ static u3j_harm _mood__hoon_shay_a[] = {{".2", u3we_shay}, {}}; static u3j_harm _mood__hoon_shas_a[] = {{".2", u3we_shas}, {}}; static u3j_harm _mood__hoon_shal_a[] = {{".2", u3we_shal}, {}}; -static u3j_harm _mood__hoon_bull_a[] = {{".2", u3wf_bull}, {}}; static u3j_harm _mood__hoon_cell_a[] = {{".2", u3wf_cell}, {}}; static u3j_harm _mood__hoon_comb_a[] = {{".2", u3wf_comb}, {}}; static u3j_harm _mood__hoon_cons_a[] = {{".2", u3wf_cons}, {}}; @@ -527,7 +526,6 @@ static u3j_core _mood__hoon_d[] = { "shas", _mood__hoon_shas_a }, { "shal", _mood__hoon_shal_a }, - { "bull", _mood__hoon_bull_a }, { "cell", _mood__hoon_cell_a }, { "comb", _mood__hoon_comb_a }, { "cons", _mood__hoon_cons_a }, From adaa5c7403060e7b62d88c4748680bea470c589d Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 27 Dec 2015 15:17:04 -0500 Subject: [PATCH 041/137] Supporting but not yet generating c3__moat. --- include/c/motes.h | 5 +++-- jets/f/type.c | 3 +++ jets/f/ut_burn.c | 1 + jets/f/ut_crop.c | 27 +++++++++++++++++++++++++-- jets/f/ut_firm.c | 4 ++++ jets/f/ut_fish.c | 7 +++++++ jets/f/ut_fuse.c | 24 ++++++++++++++++++++++++ jets/f/ut_nest.c | 29 +++++++++++++++++++++++++++++ 8 files changed, 96 insertions(+), 4 deletions(-) diff --git a/include/c/motes.h b/include/c/motes.h index 52b2aad648..f106c75b2a 100644 --- a/include/c/motes.h +++ b/include/c/motes.h @@ -686,6 +686,7 @@ # define c3__miss c3_s4('m','i','s','s') # define c3__mix c3_s3('m','i','x') # define c3__mod c3_s3('m','o','d') +# define c3__moat c3_s4('m','o','a','t') # define c3__mold c3_s4('m','o','l','d') # define c3__mong c3_s4('m','o','n','g') # define c3__mono c3_s4('m','o','n','o') @@ -725,8 +726,8 @@ # define c3__new c3_s3('n','e','w') # define c3__newt c3_s4('n','e','w','t') # define c3__next c3_s4('n','e','x','t') -# define c3__nich c3_s4('n','i','b','h') -# define c3__nick c3_s4('n','i','b','k') +# define c3__nich c3_s4('n','i','c','h') +# define c3__nick c3_s4('n','i','c','k') # define c3__nil c3_s3('n','i','l') # define c3__nilk c3_s4('n','i','l','k') # define c3__no c3_s2('n','o') diff --git a/jets/f/type.c b/jets/f/type.c index f36b813e5e..a8aec7c123 100644 --- a/jets/f/type.c +++ b/jets/f/type.c @@ -23,6 +23,9 @@ case c3__atom: p_sut = u3t(sut); { } + case c3__moat: u3x_cell(u3t(sut), &p_sut, &q_sut); + { + } case c3__cell: u3x_cell(u3t(sut), &p_sut, &q_sut); { } diff --git a/jets/f/ut_burn.c b/jets/f/ut_burn.c index bd7fff4a5c..d02a718d56 100644 --- a/jets/f/ut_burn.c +++ b/jets/f/ut_burn.c @@ -25,6 +25,7 @@ default: return u3m_bail(c3__fail); case c3__atom: return 0; + case c3__moat: return 0; case c3__cell: u3x_cell(u3t(sut), &p_sut, &q_sut); { return u3nc diff --git a/jets/f/ut_crop.c b/jets/f/ut_crop.c index 4a3cf0a2f7..2c0cef1ef5 100644 --- a/jets/f/ut_crop.c +++ b/jets/f/ut_crop.c @@ -66,6 +66,22 @@ if ( c3__atom == u3h(ref) ) { return c3__void; } + else if ( c3__moat == u3h(ref) ) { + return c3__void; + } + else if ( c3__cell == u3h(ref) ) { + return u3k(sut); + } + else return _crop_sint(van, sut, ref, bix); + } + case c3__moat: + { + if ( c3__atom == u3h(ref) ) { + return c3__void; + } + else if ( c3__moat == u3h(ref) ) { + return c3__void; + } else if ( c3__cell == u3h(ref) ) { return u3k(sut); } @@ -76,6 +92,9 @@ if ( c3__atom == u3h(ref) ) { return u3k(sut); } + else if ( c3__moat == u3h(ref) ) { + return u3k(sut); + } else if ( c3__cell == u3h(ref) ) { u3x_cell(u3t(ref), &p_ref, &q_ref); @@ -93,7 +112,9 @@ } case c3__core: { - if ( (c3__atom == u3h(ref)) || (c3__cell == u3h(ref)) ) { + if ( (c3__atom == u3h(ref)) || + (c3__moat == u3h(ref)) || + (c3__cell == u3h(ref)) ) { return u3k(sut); } else return _crop_sint(van, sut, ref, bix); @@ -105,7 +126,9 @@ { return c3__void; } - else if ( (c3__atom == u3h(ref)) || (c3__cell == u3h(ref)) ) { + else if ( (c3__atom == u3h(ref)) || + (c3__moat == u3h(ref)) || + (c3__cell == u3h(ref)) ) { u3_noun foz = _crop_dext(van, q_sut, ref, bix); u3_noun ret; diff --git a/jets/f/ut_firm.c b/jets/f/ut_firm.c index d25a4b1fdb..d13b5925db 100644 --- a/jets/f/ut_firm.c +++ b/jets/f/ut_firm.c @@ -32,6 +32,10 @@ { return u3ud(dib); } + case c3__moat: u3x_cell(u3t(sut), &p_sut, &q_sut); + { + return u3ud(dib); + } case c3__cell: u3x_cell(u3t(sut), &p_sut, &q_sut); { return c3a(u3du(dib), diff --git a/jets/f/ut_fish.c b/jets/f/ut_fish.c index c9989ff056..1a7024fb9d 100644 --- a/jets/f/ut_fish.c +++ b/jets/f/ut_fish.c @@ -34,6 +34,13 @@ u3z(ton); return pro; } + case c3__moat: { + u3_noun ton = u3nt(3, 0, u3k(axe)); + u3_noun pro = u3qf_flip(ton); + + u3z(ton); + return pro; + } case c3__bull: { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { return u3m_bail(c3__fail); diff --git a/jets/f/ut_fuse.c b/jets/f/ut_fuse.c index 24840df924..1fafe7fa45 100644 --- a/jets/f/ut_fuse.c +++ b/jets/f/ut_fuse.c @@ -66,6 +66,30 @@ return u3k(sut); } else return u3k(ref); } + else if ( c3__moat == u3h(ref) ) { + if ( c3y == u3qf_fitz(u3h(u3t(ref)), u3t(sut)) ) { + return u3k(sut); + } else return u3k(ref); + } + else if ( c3__cell == u3h(ref) ) { + return c3__void; + } + } + return _fuse_in(van, ref, sut, bix); + } + case c3__moat: + { + if ( c3y == u3du(ref) ) { + if ( c3__atom == u3h(ref) ) { + if ( c3y == u3qf_fitz(u3t(ref), u3h(u3t(sut))) ) { + return u3k(sut); + } else return u3k(ref); + } + else if ( c3__moat == u3h(ref) ) { + if ( c3y == u3qf_fitz(u3h(u3t(ref)), u3h(u3t(sut))) ) { + return u3k(sut); + } else return u3k(ref); + } else if ( c3__cell == u3h(ref) ) { return c3__void; } diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index 5a4ca066cd..abedb6a27f 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -206,6 +206,33 @@ } return c3y; } + else if ( (c3y == u3du(ref)) && (c3__moat == u3h(ref)) ) { + if ( c3n == u3qf_fitz(u3t(sut), u3h(u3t(ref))) ) { + // u3_err("fitz: need", u3t(sut)); + // u3_err("fitz: have", u3t(ref)); + return c3n; + } + return c3y; + } + else return _nest_sint(van, sut, tel, ref, gil); + } + case c3__moat: { + if ( (c3y == u3du(ref)) && (c3__atom == u3h(ref)) ) { + if ( c3n == u3qf_fitz(u3h(u3t(sut)), u3t(ref)) ) { + // u3_err("fitz: need", u3t(sut)); + // u3_err("fitz: have", u3t(ref)); + return c3n; + } + return c3y; + } + else if ( (c3y == u3du(ref)) && (c3__moat == u3h(ref)) ) { + if ( c3n == u3qf_fitz(u3h(u3t(sut)), u3h(u3t(ref))) ) { + // u3_err("fitz: need", u3t(sut)); + // u3_err("fitz: have", u3t(ref)); + return c3n; + } + return c3y; + } else return _nest_sint(van, sut, tel, ref, gil); } case c3__cell: { @@ -261,6 +288,7 @@ default: return _nest_sint(van, sut, tel, ref, gil); case c3__atom: + case c3__moat: case c3__cell: case c3__cube: case c3__core: @@ -366,6 +394,7 @@ return u3m_bail(c3__fail); } case c3__atom: return c3n; + case c3__moat: return c3n; case c3__cell: return c3n; case c3__core: { u3_noun gam = u3qfu_repo(van, ref); From 67e95f963fa42c225bf2144fe0cdb7c8cfb9a7b6 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 27 Dec 2015 15:26:23 -0500 Subject: [PATCH 042/137] Generating entirely %moat. --- jets/f/ut_mint.c | 13 +++++-------- jets/f/ut_mull.c | 8 ++++---- jets/f/ut_peek.c | 3 +++ jets/f/ut_play.c | 12 ++++++------ noun/manage.c | 2 +- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index 571501ce11..96d3fa46ad 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -3,20 +3,17 @@ */ #include "all.h" - -int FOO; - /* logic */ static u3_noun _mint_in(u3_noun, u3_noun, u3_noun, u3_noun); static u3_noun - _mint_bean(void) + _mint_bean() { return u3nt(c3__fork, - u3nq(c3__cube, 0, c3__atom, 'f'), - u3nq(c3__cube, 1, c3__atom, 'f')); + u3nt(c3__cube, 0, u3nt(c3__moat, 'f', u3_nul)), + u3nt(c3__cube, 1, u3nt(c3__moat, 'f', u3_nul))); } static u3_noun @@ -482,7 +479,7 @@ int FOO; case c3__dtls: p_gen = u3t(gen); _mint_used(); { - u3_noun tom = u3nc(c3__atom, u3_blip); + u3_noun tom = u3nt(c3__moat, u3_blip, u3_nul); u3_noun sam = _mint_in(van, sut, tom, p_gen); ret = u3nc(_mint_nice(van, gol, tom), @@ -496,7 +493,7 @@ int FOO; { u3_noun boc = (c3n == u3ud(q_gen)) ? c3__noun - : u3nc(c3__atom, u3k(p_gen)); + : u3nt(c3__moat, u3k(p_gen), u3_nul); u3_noun typ = u3qf_cube(q_gen, boc); u3_noun ret = u3nc(_mint_nice(van, gol, typ), u3nc(1, u3k(q_gen))); diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index 1391394780..5b82ca346f 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -37,8 +37,8 @@ _mull_bean() { return u3nt(c3__fork, - u3nq(c3__cube, 0, c3__atom, 'f'), - u3nq(c3__cube, 1, c3__atom, 'f')); + u3nt(c3__cube, 0, u3nt(c3__moat, 'f', u3_nul)), + u3nt(c3__cube, 1, u3nt(c3__moat, 'f', u3_nul))); } static u3_noun @@ -449,7 +449,7 @@ case c3__dtls: p_gen = u3t(gen); _mull_used(); { - u3_noun wuq = u3nc(c3__atom, u3_blip); + u3_noun wuq = u3nt(c3__moat, u3_blip, u3_nul); u3_noun vay = _mull_in(van, sut, wuq, dox, p_gen); u3z(vay); @@ -462,7 +462,7 @@ u3k(q_gen), (c3y == u3du(q_gen)) ? c3__noun - : u3nc(c3__atom, u3k(p_gen))); + : u3nt(c3__moat, u3k(p_gen), u3_nul)); return _mull_both(van, gol, tof); } diff --git a/jets/f/ut_peek.c b/jets/f/ut_peek.c index f08827d6b7..3caa6d116b 100644 --- a/jets/f/ut_peek.c +++ b/jets/f/ut_peek.c @@ -35,6 +35,9 @@ case c3__atom: { return c3__void; } + case c3__moat: { + return c3__void; + } case c3__cell: { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { return u3m_bail(c3__fail); diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index 2784cacca9..8943bfaaae 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -12,11 +12,11 @@ _play_in(u3_noun, u3_noun, u3_noun); static u3_noun - _play_bean(void) + _play_bean() { return u3nt(c3__fork, - u3nq(c3__cube, 0, c3__atom, 'f'), - u3nq(c3__cube, 1, c3__atom, 'f')); + u3nt(c3__cube, 0, u3nt(c3__moat, 'f', u3_nul)), + u3nt(c3__cube, 1, u3nt(c3__moat, 'f', u3_nul))); } static u3_noun @@ -232,14 +232,14 @@ case c3__dtls: p_gen = u3t(gen); _play_used(); { - return u3nc(c3__atom, u3_blip); + return u3nt(c3__moat, u3_blip, u3_nul); } case c3__blob: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { u3_noun boc = (c3n == u3ud(q_gen)) ? c3__noun - : u3nc(c3__atom, u3k(p_gen)); + : u3nt(c3__moat, u3k(p_gen), u3_nul); u3_noun ret = u3qf_cube(q_gen, boc); u3z(boc); @@ -260,7 +260,7 @@ return _play_bean(); } } - else return u3nc(c3__atom, u3k(p_gen)); + else return u3nt(c3__moat, u3k(p_gen), u3_nul); } case c3__ktbr: p_gen = u3t(gen); _play_used(); diff --git a/noun/manage.c b/noun/manage.c index 68b430fb41..6c2673e0d0 100644 --- a/noun/manage.c +++ b/noun/manage.c @@ -605,8 +605,8 @@ u3m_bail(u3_noun how) switch ( how ) { #if 0 - case c3__fail: case c3__meme: + case c3__fail: #endif case c3__foul: case c3__oops: From 659eaf4061ff08e83a53af2df9190e533eb8d6ba Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 27 Dec 2015 16:01:10 -0500 Subject: [PATCH 043/137] %atom now fully converted to %moat. --- jets/f/ut_repo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jets/f/ut_repo.c b/jets/f/ut_repo.c index 4f82cab0cb..bc9148a192 100644 --- a/jets/f/ut_repo.c +++ b/jets/f/ut_repo.c @@ -17,7 +17,7 @@ case c3__noun: return u3nt(c3__fork, - u3nc(c3__atom, u3_blip), + u3nt(c3__moat, u3_blip, u3_nul), u3nt(c3__cell, c3__noun, c3__noun)); } else switch ( u3h(sut) ) { From 1d8e3fcee33a6c7c0eefc10f7f003dc7eb143c9a Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 27 Dec 2015 16:36:49 -0500 Subject: [PATCH 044/137] %moat is fully vanquished; %atom constants still vestigial. --- jets/f/type.c | 5 +---- jets/f/ut_burn.c | 1 - jets/f/ut_crop.c | 21 --------------------- jets/f/ut_firm.c | 6 +----- jets/f/ut_fish.c | 7 ------- jets/f/ut_fuse.c | 24 ------------------------ jets/f/ut_mint.c | 8 ++++---- jets/f/ut_mull.c | 8 ++++---- jets/f/ut_nest.c | 33 ++------------------------------- jets/f/ut_peek.c | 3 --- jets/f/ut_play.c | 10 +++++----- jets/f/ut_repo.c | 2 +- 12 files changed, 18 insertions(+), 110 deletions(-) diff --git a/jets/f/type.c b/jets/f/type.c index a8aec7c123..638e119285 100644 --- a/jets/f/type.c +++ b/jets/f/type.c @@ -20,10 +20,7 @@ else switch ( u3h(sut) ) { default: return u3m_bail(c3__fail); - case c3__atom: p_sut = u3t(sut); - { - } - case c3__moat: u3x_cell(u3t(sut), &p_sut, &q_sut); + case c3__atom: u3x_cell(u3t(sut), &p_sut, &q_sut); { } case c3__cell: u3x_cell(u3t(sut), &p_sut, &q_sut); diff --git a/jets/f/ut_burn.c b/jets/f/ut_burn.c index d02a718d56..bd7fff4a5c 100644 --- a/jets/f/ut_burn.c +++ b/jets/f/ut_burn.c @@ -25,7 +25,6 @@ default: return u3m_bail(c3__fail); case c3__atom: return 0; - case c3__moat: return 0; case c3__cell: u3x_cell(u3t(sut), &p_sut, &q_sut); { return u3nc diff --git a/jets/f/ut_crop.c b/jets/f/ut_crop.c index 2c0cef1ef5..226115000e 100644 --- a/jets/f/ut_crop.c +++ b/jets/f/ut_crop.c @@ -66,22 +66,6 @@ if ( c3__atom == u3h(ref) ) { return c3__void; } - else if ( c3__moat == u3h(ref) ) { - return c3__void; - } - else if ( c3__cell == u3h(ref) ) { - return u3k(sut); - } - else return _crop_sint(van, sut, ref, bix); - } - case c3__moat: - { - if ( c3__atom == u3h(ref) ) { - return c3__void; - } - else if ( c3__moat == u3h(ref) ) { - return c3__void; - } else if ( c3__cell == u3h(ref) ) { return u3k(sut); } @@ -92,9 +76,6 @@ if ( c3__atom == u3h(ref) ) { return u3k(sut); } - else if ( c3__moat == u3h(ref) ) { - return u3k(sut); - } else if ( c3__cell == u3h(ref) ) { u3x_cell(u3t(ref), &p_ref, &q_ref); @@ -113,7 +94,6 @@ case c3__core: { if ( (c3__atom == u3h(ref)) || - (c3__moat == u3h(ref)) || (c3__cell == u3h(ref)) ) { return u3k(sut); } @@ -127,7 +107,6 @@ return c3__void; } else if ( (c3__atom == u3h(ref)) || - (c3__moat == u3h(ref)) || (c3__cell == u3h(ref)) ) { u3_noun foz = _crop_dext(van, q_sut, ref, bix); u3_noun ret; diff --git a/jets/f/ut_firm.c b/jets/f/ut_firm.c index d13b5925db..0d50f2d131 100644 --- a/jets/f/ut_firm.c +++ b/jets/f/ut_firm.c @@ -28,11 +28,7 @@ else switch ( u3h(sut) ) { default: return u3m_bail(c3__fail); - case c3__atom: p_sut = u3t(sut); - { - return u3ud(dib); - } - case c3__moat: u3x_cell(u3t(sut), &p_sut, &q_sut); + case c3__atom: u3x_cell(u3t(sut), &p_sut, &q_sut); { return u3ud(dib); } diff --git a/jets/f/ut_fish.c b/jets/f/ut_fish.c index 1a7024fb9d..c9989ff056 100644 --- a/jets/f/ut_fish.c +++ b/jets/f/ut_fish.c @@ -34,13 +34,6 @@ u3z(ton); return pro; } - case c3__moat: { - u3_noun ton = u3nt(3, 0, u3k(axe)); - u3_noun pro = u3qf_flip(ton); - - u3z(ton); - return pro; - } case c3__bull: { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { return u3m_bail(c3__fail); diff --git a/jets/f/ut_fuse.c b/jets/f/ut_fuse.c index 1fafe7fa45..cd98c2645e 100644 --- a/jets/f/ut_fuse.c +++ b/jets/f/ut_fuse.c @@ -62,30 +62,6 @@ { if ( c3y == u3du(ref) ) { if ( c3__atom == u3h(ref) ) { - if ( c3y == u3qf_fitz(u3t(ref), u3t(sut)) ) { - return u3k(sut); - } else return u3k(ref); - } - else if ( c3__moat == u3h(ref) ) { - if ( c3y == u3qf_fitz(u3h(u3t(ref)), u3t(sut)) ) { - return u3k(sut); - } else return u3k(ref); - } - else if ( c3__cell == u3h(ref) ) { - return c3__void; - } - } - return _fuse_in(van, ref, sut, bix); - } - case c3__moat: - { - if ( c3y == u3du(ref) ) { - if ( c3__atom == u3h(ref) ) { - if ( c3y == u3qf_fitz(u3t(ref), u3h(u3t(sut))) ) { - return u3k(sut); - } else return u3k(ref); - } - else if ( c3__moat == u3h(ref) ) { if ( c3y == u3qf_fitz(u3h(u3t(ref)), u3h(u3t(sut))) ) { return u3k(sut); } else return u3k(ref); diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index 96d3fa46ad..79c8a26dbc 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -12,8 +12,8 @@ _mint_bean() { return u3nt(c3__fork, - u3nt(c3__cube, 0, u3nt(c3__moat, 'f', u3_nul)), - u3nt(c3__cube, 1, u3nt(c3__moat, 'f', u3_nul))); + u3nt(c3__cube, 0, u3nt(c3__atom, 'f', u3_nul)), + u3nt(c3__cube, 1, u3nt(c3__atom, 'f', u3_nul))); } static u3_noun @@ -479,7 +479,7 @@ case c3__dtls: p_gen = u3t(gen); _mint_used(); { - u3_noun tom = u3nt(c3__moat, u3_blip, u3_nul); + u3_noun tom = u3nt(c3__atom, u3_blip, u3_nul); u3_noun sam = _mint_in(van, sut, tom, p_gen); ret = u3nc(_mint_nice(van, gol, tom), @@ -493,7 +493,7 @@ { u3_noun boc = (c3n == u3ud(q_gen)) ? c3__noun - : u3nt(c3__moat, u3k(p_gen), u3_nul); + : u3nt(c3__atom, u3k(p_gen), u3_nul); u3_noun typ = u3qf_cube(q_gen, boc); u3_noun ret = u3nc(_mint_nice(van, gol, typ), u3nc(1, u3k(q_gen))); diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index 5b82ca346f..e33bd89aa0 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -37,8 +37,8 @@ _mull_bean() { return u3nt(c3__fork, - u3nt(c3__cube, 0, u3nt(c3__moat, 'f', u3_nul)), - u3nt(c3__cube, 1, u3nt(c3__moat, 'f', u3_nul))); + u3nt(c3__cube, 0, u3nt(c3__atom, 'f', u3_nul)), + u3nt(c3__cube, 1, u3nt(c3__atom, 'f', u3_nul))); } static u3_noun @@ -449,7 +449,7 @@ case c3__dtls: p_gen = u3t(gen); _mull_used(); { - u3_noun wuq = u3nt(c3__moat, u3_blip, u3_nul); + u3_noun wuq = u3nt(c3__atom, u3_blip, u3_nul); u3_noun vay = _mull_in(van, sut, wuq, dox, p_gen); u3z(vay); @@ -462,7 +462,7 @@ u3k(q_gen), (c3y == u3du(q_gen)) ? c3__noun - : u3nt(c3__moat, u3k(p_gen), u3_nul)); + : u3nt(c3__atom, u3k(p_gen), u3_nul)); return _mull_both(van, gol, tof); } diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index abedb6a27f..c68d677a62 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -199,36 +199,9 @@ case c3__atom: { if ( (c3y == u3du(ref)) && (c3__atom == u3h(ref)) ) { - if ( c3n == u3qf_fitz(u3t(sut), u3t(ref)) ) { - // u3_err("fitz: need", u3t(sut)); - // u3_err("fitz: have", u3t(ref)); - return c3n; - } - return c3y; - } - else if ( (c3y == u3du(ref)) && (c3__moat == u3h(ref)) ) { - if ( c3n == u3qf_fitz(u3t(sut), u3h(u3t(ref))) ) { - // u3_err("fitz: need", u3t(sut)); - // u3_err("fitz: have", u3t(ref)); - return c3n; - } - return c3y; - } - else return _nest_sint(van, sut, tel, ref, gil); - } - case c3__moat: { - if ( (c3y == u3du(ref)) && (c3__atom == u3h(ref)) ) { - if ( c3n == u3qf_fitz(u3h(u3t(sut)), u3t(ref)) ) { - // u3_err("fitz: need", u3t(sut)); - // u3_err("fitz: have", u3t(ref)); - return c3n; - } - return c3y; - } - else if ( (c3y == u3du(ref)) && (c3__moat == u3h(ref)) ) { if ( c3n == u3qf_fitz(u3h(u3t(sut)), u3h(u3t(ref))) ) { - // u3_err("fitz: need", u3t(sut)); - // u3_err("fitz: have", u3t(ref)); + // u3_err("fitz: need", u3h(u3t(sut))); + // u3_err("fitz: have", u3h(u3t(ref))); return c3n; } return c3y; @@ -288,7 +261,6 @@ default: return _nest_sint(van, sut, tel, ref, gil); case c3__atom: - case c3__moat: case c3__cell: case c3__cube: case c3__core: @@ -394,7 +366,6 @@ return u3m_bail(c3__fail); } case c3__atom: return c3n; - case c3__moat: return c3n; case c3__cell: return c3n; case c3__core: { u3_noun gam = u3qfu_repo(van, ref); diff --git a/jets/f/ut_peek.c b/jets/f/ut_peek.c index 3caa6d116b..f08827d6b7 100644 --- a/jets/f/ut_peek.c +++ b/jets/f/ut_peek.c @@ -35,9 +35,6 @@ case c3__atom: { return c3__void; } - case c3__moat: { - return c3__void; - } case c3__cell: { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { return u3m_bail(c3__fail); diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index 8943bfaaae..46d8c4dac1 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -15,8 +15,8 @@ _play_bean() { return u3nt(c3__fork, - u3nt(c3__cube, 0, u3nt(c3__moat, 'f', u3_nul)), - u3nt(c3__cube, 1, u3nt(c3__moat, 'f', u3_nul))); + u3nt(c3__cube, 0, u3nt(c3__atom, 'f', u3_nul)), + u3nt(c3__cube, 1, u3nt(c3__atom, 'f', u3_nul))); } static u3_noun @@ -232,14 +232,14 @@ case c3__dtls: p_gen = u3t(gen); _play_used(); { - return u3nt(c3__moat, u3_blip, u3_nul); + return u3nt(c3__atom, u3_blip, u3_nul); } case c3__blob: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { u3_noun boc = (c3n == u3ud(q_gen)) ? c3__noun - : u3nt(c3__moat, u3k(p_gen), u3_nul); + : u3nt(c3__atom, u3k(p_gen), u3_nul); u3_noun ret = u3qf_cube(q_gen, boc); u3z(boc); @@ -260,7 +260,7 @@ return _play_bean(); } } - else return u3nt(c3__moat, u3k(p_gen), u3_nul); + else return u3nt(c3__atom, u3k(p_gen), u3_nul); } case c3__ktbr: p_gen = u3t(gen); _play_used(); diff --git a/jets/f/ut_repo.c b/jets/f/ut_repo.c index bc9148a192..9711cdf1eb 100644 --- a/jets/f/ut_repo.c +++ b/jets/f/ut_repo.c @@ -17,7 +17,7 @@ case c3__noun: return u3nt(c3__fork, - u3nt(c3__moat, u3_blip, u3_nul), + u3nt(c3__atom, u3_blip, u3_nul), u3nt(c3__cell, c3__noun, c3__noun)); } else switch ( u3h(sut) ) { From 86768d7e0172e0d67c99e293efd2fc8d840d22ca Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 27 Dec 2015 22:18:25 -0500 Subject: [PATCH 045/137] Activate cubical atoms. Still generating %cube. --- jets/f/ut_crop.c | 28 ++++++++++++++++++++++++++-- jets/f/ut_fuse.c | 30 ++++++++++++++++++++++++++---- jets/f/ut_nest.c | 22 +++++++++++++++------- 3 files changed, 67 insertions(+), 13 deletions(-) diff --git a/jets/f/ut_crop.c b/jets/f/ut_crop.c index 226115000e..fb5c78ed03 100644 --- a/jets/f/ut_crop.c +++ b/jets/f/ut_crop.c @@ -61,10 +61,28 @@ else switch ( u3h(sut) ) { default: return u3m_bail(c3__fail); - case c3__atom: + case c3__atom: u3x_cell(u3t(sut), &p_sut, &q_sut); { if ( c3__atom == u3h(ref) ) { - return c3__void; + u3x_cell(u3t(ref), &p_ref, &q_ref); + + if ( c3y == u3du(q_sut) ) { + if ( c3y == u3du(q_ref) ) { + if ( c3y == u3r_sing(q_sut, q_ref) ) { + return c3__void; + } else { + return u3k(sut); + } + } else { + return c3__void; + } + } + else { + if ( c3y == u3du(q_ref) ) { + return u3k(sut); + } + else return c3__void; + } } else if ( c3__cell == u3h(ref) ) { return u3k(sut); @@ -106,6 +124,12 @@ { return c3__void; } + else if ( (c3__atom == u3h(ref)) && + (c3y == u3du(u3t(u3t(ref)))) && + (c3y == u3r_sing(p_sut, u3t(u3t(u3t(ref))))) ) + { + return c3__void; + } else if ( (c3__atom == u3h(ref)) || (c3__cell == u3h(ref)) ) { u3_noun foz = _crop_dext(van, q_sut, ref, bix); diff --git a/jets/f/ut_fuse.c b/jets/f/ut_fuse.c index cd98c2645e..d981d31fa7 100644 --- a/jets/f/ut_fuse.c +++ b/jets/f/ut_fuse.c @@ -58,13 +58,35 @@ else switch ( u3h(sut) ) { default: return u3m_bail(c3__fail); - case c3__atom: + case c3__atom: u3x_cell(u3t(sut), &p_sut, &q_sut); { if ( c3y == u3du(ref) ) { if ( c3__atom == u3h(ref) ) { - if ( c3y == u3qf_fitz(u3h(u3t(ref)), u3h(u3t(sut))) ) { - return u3k(sut); - } else return u3k(ref); + u3_noun p_ref, q_ref; + + u3x_cell(u3t(ref), &p_ref, &q_ref); + { + u3_noun foc = (c3y == u3qf_fitz(p_ref, p_sut)) + ? u3k(p_sut) + : u3k(p_ref); + + if ( c3y == u3du(q_sut) ) { + if ( c3y == u3du(q_ref) ) { + if ( c3y == u3r_sing(q_ref, q_sut) ) { + return u3nt(c3__atom, foc, u3k(q_sut)); + } + else { + u3z(foc); + return c3__void; + } + } + else { + return u3nt(c3__atom, foc, u3k(q_sut)); + } + } else { + return u3nt(c3__atom, foc, u3k(q_ref)); + } + } } else if ( c3__cell == u3h(ref) ) { return c3__void; diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index c68d677a62..fb9f4593bf 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -198,15 +198,23 @@ default: return u3m_bail(c3__fail); case c3__atom: { - if ( (c3y == u3du(ref)) && (c3__atom == u3h(ref)) ) { - if ( c3n == u3qf_fitz(u3h(u3t(sut)), u3h(u3t(ref))) ) { - // u3_err("fitz: need", u3h(u3t(sut))); - // u3_err("fitz: have", u3h(u3t(ref))); - return c3n; + if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { + return u3m_bail(c3__fail); + } + else { + if ( (c3y == u3du(ref)) && (c3__atom == u3h(ref)) ) { + if ( (c3n == u3qf_fitz(u3h(u3t(sut)), u3h(u3t(ref)))) || + ( (c3y == u3du(q_sut)) && + (c3n == u3r_sing(q_sut, u3t(u3t(ref)))) ) ) + { + // u3_err("fitz: need", u3h(u3t(sut))); + // u3_err("fitz: have", u3h(u3t(ref))); + return c3n; + } + return c3y; } - return c3y; + else return _nest_sint(van, sut, tel, ref, gil); } - else return _nest_sint(van, sut, tel, ref, gil); } case c3__cell: { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { From 52d6c1e2b4cc800345fdb3d9ee6717eb93ef1f3d Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Mon, 28 Dec 2015 03:45:12 -0500 Subject: [PATCH 046/137] Almost ready to kill %cube; hoon.hoon fitz cleansed. --- jets/f/ut_nest.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index fb9f4593bf..eb1aa16ad6 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -202,18 +202,23 @@ return u3m_bail(c3__fail); } else { - if ( (c3y == u3du(ref)) && (c3__atom == u3h(ref)) ) { - if ( (c3n == u3qf_fitz(u3h(u3t(sut)), u3h(u3t(ref)))) || + if ( c3y == u3r_pq(ref, c3__atom, &p_ref, &q_ref) ) { + if ( // (c3n == u3qf_fitz(p_sut, p_ref)) || ( (c3y == u3du(q_sut)) && - (c3n == u3r_sing(q_sut, u3t(u3t(ref)))) ) ) + ( (c3n == u3du(q_ref)) || + (c3n == u3r_sing(q_sut, q_ref)))) ) { - // u3_err("fitz: need", u3h(u3t(sut))); - // u3_err("fitz: have", u3h(u3t(ref))); return c3n; } return c3y; } - else return _nest_sint(van, sut, tel, ref, gil); + if ( (c3y == u3r_pq(ref, c3__cube, &p_ref, &q_ref)) ) { + if ( (c3y == u3du(q_sut)) && + (c3y == u3r_sing(u3t(q_sut), p_ref)) ) { + return c3y; + } + } + return _nest_sint(van, sut, tel, ref, gil); } } case c3__cell: { @@ -244,6 +249,10 @@ if ( c3y == u3r_pq(ref, c3__cube, &p_ref, &q_ref) ) { return u3r_sing(p_sut, p_ref); } + else if ( (c3y == u3r_pq(ref, c3__atom, &p_ref, &q_ref)) && + (c3y == u3du(q_ref)) ) { + return u3r_sing(p_sut, u3t(q_ref)); + } else return _nest_sint(van, sut, tel, ref, gil); } } From d5dd8d1321321381b96ad5152acc585341eaee4f Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Mon, 28 Dec 2015 15:53:10 -0500 Subject: [PATCH 047/137] Remove cubab. --- Makefile | 2 - jets/f/cube.c | 30 -------------- jets/f/type.c | 3 -- jets/f/ut_burn.c | 13 +++--- jets/f/ut_crop.c | 31 --------------- jets/f/ut_firm.c | 100 ----------------------------------------------- jets/f/ut_fish.c | 28 ++++++------- jets/f/ut_fuse.c | 13 ------ jets/f/ut_mint.c | 10 ++--- jets/f/ut_mull.c | 12 ++---- jets/f/ut_nest.c | 28 ------------- jets/f/ut_peek.c | 7 ---- jets/f/ut_play.c | 22 ++++++----- jets/f/ut_repo.c | 7 ---- jets/tree.c | 4 -- 15 files changed, 39 insertions(+), 271 deletions(-) delete mode 100644 jets/f/cube.c delete mode 100644 jets/f/ut_firm.c diff --git a/Makefile b/Makefile index d178fadbf8..d905b36782 100644 --- a/Makefile +++ b/Makefile @@ -276,7 +276,6 @@ J_F_OFILES=\ jets/f/comb.o \ jets/f/cons.o \ jets/f/core.o \ - jets/f/cube.o \ jets/f/face.o \ jets/f/fitz.o \ jets/f/flan.o \ @@ -293,7 +292,6 @@ J_F_OFILES_UT=\ jets/f/ut_conk.o \ jets/f/ut_crop.o \ jets/f/ut_fire.o \ - jets/f/ut_firm.o \ jets/f/ut_fish.o \ jets/f/ut_fuse.o \ jets/f/ut_gain.o \ diff --git a/jets/f/cube.c b/jets/f/cube.c deleted file mode 100644 index d42fe9a73e..0000000000 --- a/jets/f/cube.c +++ /dev/null @@ -1,30 +0,0 @@ -/* j/6/cube.c -** -*/ -#include "all.h" - - -/* functions -*/ - u3_noun - u3qf_cube(u3_noun dil, - u3_noun goq) - { - if ( c3__void == goq ) { - return c3__void; - } - else return u3nt(c3__cube, - u3k(dil), - u3k(goq)); - } - u3_noun - u3wf_cube(u3_noun cor) - { - u3_noun dil, goq; - - if ( c3n == u3r_mean(cor, u3x_sam_2, &dil, u3x_sam_3, &goq, 0) ) { - return u3m_bail(c3__fail); - } else { - return u3qf_cube(dil, goq); - } - } diff --git a/jets/f/type.c b/jets/f/type.c index 638e119285..7b6bad35cb 100644 --- a/jets/f/type.c +++ b/jets/f/type.c @@ -29,9 +29,6 @@ case c3__core: u3x_cell(u3t(sut), &p_sut, &q_sut); { } - case c3__cube: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - } case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); { } diff --git a/jets/f/ut_burn.c b/jets/f/ut_burn.c index bd7fff4a5c..f85147c9c3 100644 --- a/jets/f/ut_burn.c +++ b/jets/f/ut_burn.c @@ -24,7 +24,14 @@ else switch ( u3h(sut) ) { default: return u3m_bail(c3__fail); - case c3__atom: return 0; + case c3__atom: u3x_cell(u3t(sut), &p_sut, &q_sut); + { + if ( c3y == u3du(q_sut) ) { + return u3k(u3t(q_sut)); + } else { + return 0; + } + } case c3__cell: u3x_cell(u3t(sut), &p_sut, &q_sut); { return u3nc @@ -39,10 +46,6 @@ (u3k(prq_sut), _burn_in(van, p_sut, gil)); } - case c3__cube: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - return u3k(p_sut); - } case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); { return _burn_in(van, q_sut, gil); diff --git a/jets/f/ut_crop.c b/jets/f/ut_crop.c index fb5c78ed03..5393890aea 100644 --- a/jets/f/ut_crop.c +++ b/jets/f/ut_crop.c @@ -117,34 +117,6 @@ } else return _crop_sint(van, sut, ref, bix); } - case c3__cube: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - if ( (c3__cube == u3h(ref)) && - (c3y == u3r_sing(p_sut, u3h(u3t(ref)))) ) - { - return c3__void; - } - else if ( (c3__atom == u3h(ref)) && - (c3y == u3du(u3t(u3t(ref)))) && - (c3y == u3r_sing(p_sut, u3t(u3t(u3t(ref))))) ) - { - return c3__void; - } - else if ( (c3__atom == u3h(ref)) || - (c3__cell == u3h(ref)) ) { - u3_noun foz = _crop_dext(van, q_sut, ref, bix); - u3_noun ret; - - if ( c3y == u3qfu_firm(van, foz, p_sut) ) { - ret = u3qf_cube(p_sut, foz); - } - else ret = c3__void; - - u3z(foz); - return ret; - } - else return _crop_sint(van, sut, ref, bix); - } case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); { u3_noun foz = _crop_dext(van, q_sut, ref, bix); @@ -201,9 +173,6 @@ default: return u3m_bail(c3__fail); case c3__core: - case c3__cube: { - return u3k(sut); - } case c3__face: u3x_cell(u3t(ref), &p_ref, &q_ref); { return _crop_dext(van, sut, q_ref, bix); diff --git a/jets/f/ut_firm.c b/jets/f/ut_firm.c deleted file mode 100644 index 0d50f2d131..0000000000 --- a/jets/f/ut_firm.c +++ /dev/null @@ -1,100 +0,0 @@ -/* j/6/firm.c -** -*/ -#include "all.h" - - -/* logic -*/ - u3_noun - _cqfu_firm(u3_noun van, - u3_noun sut, - u3_noun dib) - { - u3_noun p_sut, q_sut; - - if ( c3n == u3du(sut) ) switch ( sut ) { - default: return u3m_bail(c3__fail); - - case c3__noun: - { - return c3y; - } - case c3__void: - { - return c3n; - } - } - else switch ( u3h(sut) ) { - default: return u3m_bail(c3__fail); - - case c3__atom: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - return u3ud(dib); - } - case c3__cell: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - return c3a(u3du(dib), - c3a(_cqfu_firm(van, p_sut, u3h(dib)), - _cqfu_firm(van, q_sut, u3t(dib)))); - } - case c3__core: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - u3_noun pq_sut, qq_sut, rq_sut, prq_sut, qrq_sut; - - u3x_trel(q_sut, &pq_sut, &qq_sut, &rq_sut); - u3x_cell(rq_sut, &prq_sut, &qrq_sut); - - return c3a(u3du(dib), - c3a(_cqfu_firm(van, p_sut, u3h(dib)), - ((u3_nul == prq_sut) ? u3m_error("firm-core") - : u3r_sing(prq_sut, - u3t(dib))))); - } - case c3__cube: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - return u3r_sing(dib, p_sut); - } - case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - return _cqfu_firm(van, q_sut, dib); - } - case c3__fork: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - return c3o(_cqfu_firm(van, p_sut, dib), - _cqfu_firm(van, q_sut, dib)); - } - case c3__hold: - { - u3_noun goy = u3qfu_repo(van, sut); - u3_noun ret = _cqfu_firm(van, goy, dib); - - u3z(goy); - return ret; - } - } - } - -/* boilerplate -*/ - u3_noun - u3wfu_firm(u3_noun cor) - { - u3_noun sut, dib, van; - - if ( (c3n == u3r_mean(cor, u3x_sam, &dib, u3x_con, &van, 0)) || - (u3_none == (sut = u3r_at(u3x_sam, van))) ) - { - return u3m_bail(c3__fail); - } else { - return _cqfu_firm(van, sut, dib); - } - } - - u3_noun - u3qfu_firm(u3_noun van, - u3_noun sut, - u3_noun dib) - { - return _cqfu_firm(van, sut, dib); - } diff --git a/jets/f/ut_fish.c b/jets/f/ut_fish.c index c9989ff056..e71e927a60 100644 --- a/jets/f/ut_fish.c +++ b/jets/f/ut_fish.c @@ -28,17 +28,20 @@ default: return u3m_bail(c3__fail); case c3__atom: { - u3_noun ton = u3nt(3, 0, u3k(axe)); - u3_noun pro = u3qf_flip(ton); - - u3z(ton); - return pro; - } - case c3__bull: { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { return u3m_bail(c3__fail); } else { - return _fish_in(van, q_sut, axe, vit); + if ( c3n == u3du(q_sut) ) { + u3_noun ton = u3nt(3, 0, u3k(axe)); + u3_noun pro = u3qf_flip(ton); + + u3z(ton); + return pro; + } else { + return u3nt(5, + u3nc(1, u3k(u3t(q_sut))), + u3nc(0, u3k(axe))); + } } } case c3__cell: { @@ -66,15 +69,6 @@ case c3__core: { return u3nc(0, 0); } - case c3__cube: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { - return u3m_bail(c3__fail); - } else { - return u3nt(5, - u3nc(1, u3k(p_sut)), - u3nc(0, u3k(axe))); - } - } case c3__face: { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { return u3m_bail(c3__fail); diff --git a/jets/f/ut_fuse.c b/jets/f/ut_fuse.c index d981d31fa7..73ac451478 100644 --- a/jets/f/ut_fuse.c +++ b/jets/f/ut_fuse.c @@ -113,19 +113,6 @@ { return _fuse_repo(van, sut, ref, bix); } - case c3__cube: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - u3_noun foz = _fuse_in(van, q_sut, ref, bix); - u3_noun ret; - - if ( c3n == u3qfu_firm(van, foz, p_sut) ) { - ret = c3__void; - } else { - ret = u3qf_cube(p_sut, foz); - } - u3z(foz); - return ret; - } case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); { u3_noun vot = _fuse_in(van, q_sut, ref, bix); diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index 79c8a26dbc..2b1e5f003b 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -12,8 +12,8 @@ _mint_bean() { return u3nt(c3__fork, - u3nt(c3__cube, 0, u3nt(c3__atom, 'f', u3_nul)), - u3nt(c3__cube, 1, u3nt(c3__atom, 'f', u3_nul))); + u3nq(c3__atom, 'f', u3_nul, 0), + u3nq(c3__atom, 'f', u3_nul, 1)); } static u3_noun @@ -491,14 +491,10 @@ case c3__blob: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { - u3_noun boc = (c3n == u3ud(q_gen)) - ? c3__noun - : u3nt(c3__atom, u3k(p_gen), u3_nul); - u3_noun typ = u3qf_cube(q_gen, boc); + u3_noun typ = u3qfu_play(van, sut, gen); u3_noun ret = u3nc(_mint_nice(van, gol, typ), u3nc(1, u3k(q_gen))); - u3z(boc); return ret; } case c3__dttr: u3x_cell(u3t(gen), &p_gen, &q_gen); diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index e33bd89aa0..3830efb520 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -37,8 +37,8 @@ _mull_bean() { return u3nt(c3__fork, - u3nt(c3__cube, 0, u3nt(c3__atom, 'f', u3_nul)), - u3nt(c3__cube, 1, u3nt(c3__atom, 'f', u3_nul))); + u3nq(c3__atom, 'f', u3_nul, 0), + u3nq(c3__atom, 'f', u3_nul, 1)); } static u3_noun @@ -458,13 +458,9 @@ case c3__blob: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { - u3_noun tof = u3nt(c3__cube, - u3k(q_gen), - (c3y == u3du(q_gen)) - ? c3__noun - : u3nt(c3__atom, u3k(p_gen), u3_nul)); + u3_noun typ = u3qfu_play(van, sut, gen); - return _mull_both(van, gol, tof); + return _mull_both(van, gol, typ); } case c3__dttr: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index eb1aa16ad6..338b8a327b 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -212,12 +212,6 @@ } return c3y; } - if ( (c3y == u3r_pq(ref, c3__cube, &p_ref, &q_ref)) ) { - if ( (c3y == u3du(q_sut)) && - (c3y == u3r_sing(u3t(q_sut), p_ref)) ) { - return c3y; - } - } return _nest_sint(van, sut, tel, ref, gil); } } @@ -242,20 +236,6 @@ else return _nest_sint(van, sut, tel, ref, gil); } } - case c3__cube: { - if ( c3n == u3r_trel(sut, 0, &p_sut, &q_sut) ) { - return u3m_bail(c3__fail); - } else { - if ( c3y == u3r_pq(ref, c3__cube, &p_ref, &q_ref) ) { - return u3r_sing(p_sut, p_ref); - } - else if ( (c3y == u3r_pq(ref, c3__atom, &p_ref, &q_ref)) && - (c3y == u3du(q_ref)) ) { - return u3r_sing(p_sut, u3t(q_ref)); - } - else return _nest_sint(van, sut, tel, ref, gil); - } - } case c3__face: { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { return u3m_bail(c3__fail); @@ -279,7 +259,6 @@ case c3__atom: case c3__cell: - case c3__cube: case c3__core: break; } @@ -391,13 +370,6 @@ u3z(gam); return hiv; } - case c3__cube: { - if ( c3n == u3r_trel(ref, 0, &p_ref, &q_ref) ) { - return u3m_bail(c3__fail); - } else { - return _nest_dext(van, sut, tel, q_ref, gil); - } - } case c3__face: { if ( c3n == u3r_trel(ref, 0, &p_ref, &q_ref) ) { return u3m_bail(c3__fail); diff --git a/jets/f/ut_peek.c b/jets/f/ut_peek.c index f08827d6b7..12f9d725ce 100644 --- a/jets/f/ut_peek.c +++ b/jets/f/ut_peek.c @@ -90,13 +90,6 @@ return pro; } } - case c3__cube: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { - return u3m_bail(c3__fail); - } else { - return _peek_in(van, q_sut, way, axe, gil); - } - } case c3__face: { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { return u3m_bail(c3__fail); diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index 46d8c4dac1..6106f28022 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -15,8 +15,18 @@ _play_bean() { return u3nt(c3__fork, - u3nt(c3__cube, 0, u3nt(c3__atom, 'f', u3_nul)), - u3nt(c3__cube, 1, u3nt(c3__atom, 'f', u3_nul))); + u3nq(c3__atom, 'f', u3_nul, 0), + u3nq(c3__atom, 'f', u3_nul, 1)); + } + + static u3_noun + _play_blob(u3_noun odo, u3_noun bob) + { + if ( c3y == u3ud(bob) ) { + return u3nq(c3__atom, u3k(odo), u3_nul, u3k(bob)); + } + else return u3nt(c3__cell, _play_blob(odo, u3h(bob)), + _play_blob(odo, u3t(bob))); } static u3_noun @@ -237,13 +247,7 @@ case c3__blob: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { - u3_noun boc = (c3n == u3ud(q_gen)) - ? c3__noun - : u3nt(c3__atom, u3k(p_gen), u3_nul); - u3_noun ret = u3qf_cube(q_gen, boc); - - u3z(boc); - return ret; + return _play_blob(p_gen, q_gen); } case c3__dttr: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); diff --git a/jets/f/ut_repo.c b/jets/f/ut_repo.c index 9711cdf1eb..32c13b3f4d 100644 --- a/jets/f/ut_repo.c +++ b/jets/f/ut_repo.c @@ -32,13 +32,6 @@ return u3nt(c3__cell, c3__noun, u3k(p_sut)); } } - case c3__cube: { - if ( c3n == u3r_cell(u3t(sut), &p_sut, &q_sut)) { - return u3m_bail(c3__fail); - } else { - return u3k(q_sut); - } - } case c3__face: { if ( c3n == u3r_cell(u3t(sut), &p_sut, &q_sut)) { return u3m_bail(c3__fail); diff --git a/jets/tree.c b/jets/tree.c index 092bbbf908..0e27295732 100644 --- a/jets/tree.c +++ b/jets/tree.c @@ -335,7 +335,6 @@ static u3j_harm _mood__hoon_cell_a[] = {{".2", u3wf_cell}, {}}; static u3j_harm _mood__hoon_comb_a[] = {{".2", u3wf_comb}, {}}; static u3j_harm _mood__hoon_cons_a[] = {{".2", u3wf_cons}, {}}; static u3j_harm _mood__hoon_core_a[] = {{".2", u3wf_core}, {}}; -static u3j_harm _mood__hoon_cube_a[] = {{".2", u3wf_cube}, {}}; static u3j_harm _mood__hoon_face_a[] = {{".2", u3wf_face}, {}}; static u3j_harm _mood__hoon_fitz_a[] = {{".2", u3wf_fitz}, {}}; static u3j_harm _mood__hoon_flan_a[] = {{".2", u3wf_flan}, {}}; @@ -350,7 +349,6 @@ static u3j_harm _mood__hoon__ut_burn_a[] = {{".2", u3wfu_burn}, {}}; static u3j_harm _mood__hoon__ut_conk_a[] = {{".2", u3wfu_conk}, {}}; static u3j_harm _mood__hoon__ut_crop_a[] = {{".2", u3wfu_crop}, {}}; static u3j_harm _mood__hoon__ut_fire_a[] = {{".2", u3wfu_fire}, {}}; -static u3j_harm _mood__hoon__ut_firm_a[] = {{".2", u3wfu_firm}, {}}; static u3j_harm _mood__hoon__ut_fish_a[] = {{".2", u3wfu_fish}, {}}; static u3j_harm _mood__hoon__ut_fuse_a[] = {{".2", u3wfu_fuse}, {}}; static u3j_harm _mood__hoon__ut_mint_a[] = {{".2", u3wfu_mint}, {}}; @@ -369,7 +367,6 @@ static u3j_core _mood__hoon__ut_d[] = { "conk", _mood__hoon__ut_conk_a }, { "crop", _mood__hoon__ut_crop_a }, { "fire", _mood__hoon__ut_fire_a }, - { "firm", _mood__hoon__ut_firm_a }, { "fish", _mood__hoon__ut_fish_a }, { "fuse", _mood__hoon__ut_fuse_a }, { "mint", _mood__hoon__ut_mint_a }, @@ -530,7 +527,6 @@ static u3j_core _mood__hoon_d[] = { "comb", _mood__hoon_comb_a }, { "cons", _mood__hoon_cons_a }, { "core", _mood__hoon_core_a }, - { "cube", _mood__hoon_cube_a }, { "face", _mood__hoon_face_a }, { "fitz", _mood__hoon_fitz_a }, { "flan", _mood__hoon_flan_a }, From b19fe30ae6313c8732a72612a611882f95ce48c0 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Mon, 28 Dec 2015 17:01:44 -0500 Subject: [PATCH 048/137] Cube type errors fully cleaned up. --- jets/f/ut_nest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index 338b8a327b..5856d6c85f 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -203,7 +203,7 @@ } else { if ( c3y == u3r_pq(ref, c3__atom, &p_ref, &q_ref) ) { - if ( // (c3n == u3qf_fitz(p_sut, p_ref)) || + if ( (c3n == u3qf_fitz(p_sut, p_ref)) || ( (c3y == u3du(q_sut)) && ( (c3n == u3du(q_ref)) || (c3n == u3r_sing(q_sut, q_ref)))) ) From d13e22c15662aca8e7a7c6f7c48a9e0e0484ca09 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Mon, 28 Dec 2015 23:03:05 -0500 Subject: [PATCH 049/137] Remove superfluous file. --- Makefile | 1 - jets/f/flay.c | 52 --------------------------------------------------- 2 files changed, 53 deletions(-) delete mode 100644 jets/f/flay.c diff --git a/Makefile b/Makefile index d905b36782..45b6faac2c 100644 --- a/Makefile +++ b/Makefile @@ -279,7 +279,6 @@ J_F_OFILES=\ jets/f/face.o \ jets/f/fitz.o \ jets/f/flan.o \ - jets/f/flay.o \ jets/f/flip.o \ jets/f/flor.o \ jets/f/fork.o \ diff --git a/jets/f/flay.c b/jets/f/flay.c deleted file mode 100644 index 44294ed58f..0000000000 --- a/jets/f/flay.c +++ /dev/null @@ -1,52 +0,0 @@ -/* j/6/flay.c -** -*/ -#include "all.h" - - -/* functions -*/ - static u3_noun - _flay_roll(u3_noun quz) - { - if ( c3n == u3du(quz) ) { - return c3__void; - } else { - u3_noun voo = _flay_roll(u3t(quz)); - u3_noun oon = u3qf_fork(u3h(u3h(quz)), voo); - - u3z(voo); - return oon; - } - } - - u3_noun - u3qf_flay(u3_noun pok) - { - u3_noun p_pok = u3h(pok); - u3_noun q_pok = u3t(pok); - u3_noun typ; - - switch ( u3h(q_pok) ) { - default: return u3m_bail(c3__fail); - - case c3y: typ = u3k(u3t(q_pok)); - break; - case c3n: typ = _flay_roll(u3t(u3t(q_pok))); - break; - } - return u3nc(u3k(p_pok), typ); - } - - u3_noun - u3wf_flay(u3_noun cor) - { - u3_noun pok; - - if ( (c3n == u3r_mean(cor, u3x_sam, &pok, 0)) || - (c3n == u3du(pok)) ) { - return u3m_bail(c3__fail); - } else { - return u3qf_flay(pok); - } - } From 5737d13bac2b92adccbe39085dd6d08ae68fe8a7 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Mon, 28 Dec 2015 23:03:41 -0500 Subject: [PATCH 050/137] Correct last checkin. --- jets/tree.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/jets/tree.c b/jets/tree.c index 0e27295732..a7d9c55f33 100644 --- a/jets/tree.c +++ b/jets/tree.c @@ -338,7 +338,6 @@ static u3j_harm _mood__hoon_core_a[] = {{".2", u3wf_core}, {}}; static u3j_harm _mood__hoon_face_a[] = {{".2", u3wf_face}, {}}; static u3j_harm _mood__hoon_fitz_a[] = {{".2", u3wf_fitz}, {}}; static u3j_harm _mood__hoon_flan_a[] = {{".2", u3wf_flan}, {}}; -static u3j_harm _mood__hoon_flay_a[] = {{".2", u3wf_flay}, {}}; static u3j_harm _mood__hoon_flip_a[] = {{".2", u3wf_flip}, {}}; static u3j_harm _mood__hoon_flor_a[] = {{".2", u3wf_flor}, {}}; static u3j_harm _mood__hoon_fork_a[] = {{".2", u3wf_fork}, {}}; @@ -530,7 +529,6 @@ static u3j_core _mood__hoon_d[] = { "face", _mood__hoon_face_a }, { "fitz", _mood__hoon_fitz_a }, { "flan", _mood__hoon_flan_a }, - { "flay", _mood__hoon_flay_a }, { "flip", _mood__hoon_flip_a }, { "flor", _mood__hoon_flor_a }, { "fork", _mood__hoon_fork_a }, From 8a601ffd19675f049bfd19f5d3135f185af40d14 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Tue, 29 Dec 2015 14:52:22 -0500 Subject: [PATCH 051/137] Change %rock to %sand. --- include/c/motes.h | 1 + include/noun/allocate.h | 1 + jets/f/ut_mint.c | 2 +- jets/f/ut_mull.c | 2 +- jets/f/ut_play.c | 2 +- 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/c/motes.h b/include/c/motes.h index f106c75b2a..5224d47b55 100644 --- a/include/c/motes.h +++ b/include/c/motes.h @@ -79,6 +79,7 @@ # define c3__blin c3_s4('b','l','i','n') # define c3__blit c3_s4('b','l','i','t') # define c3__blob c3_s4('b','l','o','b') +# define c3__blob c3_s4('b','l','o','b') # define c3__blog c3_s4('b','l','o','g') # define c3__bloq c3_s4('b','l','o','q') # define c3__blot c3_s4('b','l','o','t') diff --git a/include/noun/allocate.h b/include/noun/allocate.h index 4ad1e4c372..9f0b66c342 100644 --- a/include/noun/allocate.h +++ b/include/noun/allocate.h @@ -14,6 +14,7 @@ * U3_MEMORY_DEBUG is on, this should generally be on as well. */ # undef U3_CELLOC_TOGGLE + /* U3_PRINT_WATERMARK: print watermark information for each road */ # undef U3_PRINT_WATERMARK diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index 2b1e5f003b..55a5d3bee6 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -506,7 +506,7 @@ return u3nc(_mint_nice(van, gol, c3__noun), u3nt(2, one, two)); } - case c3__rock: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__sand: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { u3_noun typ = u3qfu_play(van, sut, gen); diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index 3830efb520..c4264deecf 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -473,7 +473,7 @@ return _mull_both(van, gol, c3__noun); } - case c3__rock: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__sand: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { u3_noun typ = u3qfu_play(van, sut, gen); diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index 6106f28022..435611d2ce 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -254,7 +254,7 @@ { return c3__noun; } - case c3__rock: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__sand: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { if ( 'f' == p_gen ) { From 0c5704bf02376d32a75e0cdd8b7fc0897b6a0e27 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Tue, 29 Dec 2015 16:52:51 -0500 Subject: [PATCH 052/137] Change %rock to %sand. --- jets/f/ut_mint.c | 2 +- jets/f/ut_mull.c | 2 +- jets/f/ut_play.c | 36 +++++++++++++++++++++++------------- 3 files changed, 25 insertions(+), 15 deletions(-) diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index 55a5d3bee6..0a6dee117c 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -488,7 +488,7 @@ u3z(sam); return ret; } - case c3__blob: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__rock: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { u3_noun typ = u3qfu_play(van, sut, gen); diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index c4264deecf..532d131855 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -455,7 +455,7 @@ u3z(vay); return _mull_both(van, gol, wuq); } - case c3__blob: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__rock: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { u3_noun typ = u3qfu_play(van, sut, gen); diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index 435611d2ce..a98027a5f0 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -20,13 +20,30 @@ } static u3_noun - _play_blob(u3_noun odo, u3_noun bob) + _play_rock(u3_noun odo, u3_noun bob) { if ( c3y == u3ud(bob) ) { return u3nq(c3__atom, u3k(odo), u3_nul, u3k(bob)); } - else return u3nt(c3__cell, _play_blob(odo, u3h(bob)), - _play_blob(odo, u3t(bob))); + else return u3nt(c3__cell, _play_rock(odo, u3h(bob)), + _play_rock(odo, u3t(bob))); + } + + static u3_noun + _play_sand(u3_noun odo, u3_noun bob) + { + if ( c3y == u3ud(bob) ) { + if ( 'f' == odo ) { + if ( (bob > 1) ) { + return u3m_bail(c3__exit); + } else { + return _play_bean(); + } + } + return u3nt(c3__atom, u3k(odo), u3_nul); + } + else return u3nt(c3__cell, _play_rock(odo, u3h(bob)), + _play_rock(odo, u3t(bob))); } static u3_noun @@ -244,10 +261,10 @@ { return u3nt(c3__atom, u3_blip, u3_nul); } - case c3__blob: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__rock: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { - return _play_blob(p_gen, q_gen); + return _play_rock(p_gen, q_gen); } case c3__dttr: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); @@ -257,14 +274,7 @@ case c3__sand: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { - if ( 'f' == p_gen ) { - if ( (q_gen > 1) ) { - return u3m_bail(c3__exit); - } else { - return _play_bean(); - } - } - else return u3nt(c3__atom, u3k(p_gen), u3_nul); + return _play_sand(p_gen, q_gen); } case c3__ktbr: p_gen = u3t(gen); _play_used(); From d6d94de3c9ccde4edd5022bb942349dc7d5bd3cd Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Thu, 31 Dec 2015 02:07:29 -0500 Subject: [PATCH 053/137] New, non-degenerate ++nost almost works, fails on ++homo. --- Makefile | 1 + include/c/motes.h | 1 + include/jets/q.h | 1 + jets/f/ut_mint.c | 19 ++ jets/f/ut_nost.c | 479 ++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 501 insertions(+) create mode 100644 jets/f/ut_nost.c diff --git a/Makefile b/Makefile index 45b6faac2c..3af05b7cab 100644 --- a/Makefile +++ b/Makefile @@ -298,6 +298,7 @@ J_F_OFILES_UT=\ jets/f/ut_mint.o \ jets/f/ut_mull.o \ jets/f/ut_nest.o \ + jets/f/ut_nost.o \ jets/f/ut_park.o \ jets/f/ut_peek.o \ jets/f/ut_play.o \ diff --git a/include/c/motes.h b/include/c/motes.h index 5224d47b55..75cff85525 100644 --- a/include/c/motes.h +++ b/include/c/motes.h @@ -738,6 +738,7 @@ # define c3__nop c3_s3('n','o','p') # define c3__noop c3_s4('n','o','o','p') # define c3__norm c3_s4('n','o','r','m') +# define c3__nost c3_s4('n','o','s','t') # define c3__not c3_s3('n','o','t') # define c3__note c3_s4('n','o','t','e') # define c3__noun c3_s4('n','o','u','n') diff --git a/include/jets/q.h b/include/jets/q.h index 5b75946c5b..9b81dffbe5 100644 --- a/include/jets/q.h +++ b/include/jets/q.h @@ -213,6 +213,7 @@ u3_noun u3qfu_mint(u3_noun, u3_noun, u3_noun, u3_noun); u3_noun u3qfu_mull(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); u3_noun u3qfu_nest(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_park(u3_noun, u3_noun, u3_noun, u3_noun); u3_noun u3qfu_peek(u3_noun, u3_noun, u3_noun, u3_noun); diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index 0a6dee117c..c9e3970097 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -109,6 +109,7 @@ { if ( (c3y == _mint_vet(van)) && (c3n == u3qfu_nest(van, gol, c3y, typ)) ) + // (c3n == u3qfu_nost(van, gol, c3y, typ)) ) { // u3_noun dun = u3qfu_dunq(van, "need", gol); // u3_noun niz = u3qfu_dunq(van, "have", typ); @@ -602,6 +603,24 @@ u3z(zel); return ret; } + case c3__kthx: u3x_cell(u3t(gen), &p_gen, &q_gen); + _mint_used(); + { + u3_noun huz = u3qfu_play(van, sut, p_gen); + u3_noun hif = _mint_nice(van, gol, huz); + u3_noun zel = _mint_in(van, sut, c3__noun, q_gen); + u3_noun kek = u3qfu_nost(van, hif, c3y, u3h(zel)); + + if ( c3n == kek ) { + return u3m_bail(c3__exit); + } + else { + u3_noun ret = u3nc(hif, u3k(u3t(zel))); + + u3z(zel); + return ret; + } + } case c3__tsgr: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { diff --git a/jets/f/ut_nost.c b/jets/f/ut_nost.c new file mode 100644 index 0000000000..29433b0569 --- /dev/null +++ b/jets/f/ut_nost.c @@ -0,0 +1,479 @@ +/* j/6/ut_nost.c +** +*/ +#include "all.h" + + +/* logic +*/ + /* forward + */ + static u3_noun + _nost_sint(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); + static u3_noun + _nost_dext(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); + + static u3_noun + _nost_cram(u3_noun van, + u3_noun sut, + u3_noun tel, + u3_noun ref, + u3_noun dab, + u3_noun hem, + u3_noun gil) + { + if ( u3_nul == dab ) { + return u3r_sing(u3_nul, hem); + } else if ( u3_nul == hem ) { + return c3n; + } else { + u3_noun n_dab, l_dab, r_dab; + u3_noun n_hem, l_hem, r_hem; + u3_noun pn_hem, qn_hem, pn_dab, qn_dab; + + u3x_trel(dab, &n_dab, &l_dab, &r_dab); + u3x_trel(hem, &n_hem, &l_hem, &r_hem); + + if ( (c3n == _nost_cram(van, sut, tel, ref, l_dab, l_hem, gil)) || + (c3n == _nost_cram(van, sut, tel, ref, r_dab, r_hem, gil)) ) + { + return c3n; + } + u3x_cell(n_dab, &pn_dab, &qn_dab); + u3x_cell(n_hem, &pn_hem, &qn_hem); + + if ( c3n == u3r_sing(pn_dab, pn_hem) ) { + return c3n; + } else { + if ( (c3n == u3du(qn_dab)) || (c3n == u3du(qn_hem)) ) { + return u3m_bail(c3__fail); + } + else switch ( u3h(qn_dab) ) { + default: return u3m_bail(c3__exit); + case c3__ash: { + if ( c3__ash != u3h(qn_hem) ) { + return c3n; + } else { + u3_noun pqn_dab = u3t(qn_dab); + u3_noun pqn_hem = u3t(qn_hem); + u3_noun vis = u3qfu_play(van, sut, pqn_dab); + u3_noun lon = u3qfu_play(van, ref, pqn_hem); + + u3_noun ret = _nost_dext(van, vis, tel, lon, u3_nul, u3_nul, gil); + + u3z(vis); + u3z(lon); + return ret; + } + } + case c3__elm: { + return u3r_sing(qn_dab, qn_hem); + } + } + } + } + } + + static u3_noun + _nost_cong(u3_noun van, + u3_noun sut, + u3_noun tel, + u3_noun ref, + u3_noun gil) + { + u3_noun p_sut, q_sut, p_ref, q_ref; + u3_noun pq_sut, qq_sut, rq_sut; + u3_noun pq_ref, qq_ref, rq_ref; + u3_noun prq_sut, qrq_sut, prq_ref, qrq_ref; + u3_noun ret; + + u3x_trel(sut, 0, &p_sut, &q_sut); + u3x_trel(ref, 0, &p_ref, &q_ref); + + u3x_trel(q_sut, &pq_sut, &qq_sut, &rq_sut); + u3x_trel(q_ref, &pq_ref, &qq_ref, &rq_ref); + + u3x_cell(rq_sut, &prq_sut, &qrq_sut); + u3x_cell(rq_ref, &prq_ref, &qrq_ref); + + if ( c3y == u3r_sing(q_sut, q_ref) ) { + return _nost_dext(van, p_sut, tel, p_ref, u3_nul, u3_nul, gil); + } + else if ( (c3n == _nost_dext + (van, qq_sut, tel, p_sut, u3_nul, u3_nul, gil)) || + (c3n == _nost_dext + (van, p_sut, tel, qq_sut, u3_nul, u3_nul, gil)) || + (c3n == _nost_dext + (van, qq_ref, tel, p_ref, u3_nul, u3_nul, gil)) ) + { + return c3n; + } + else { + if ( (pq_sut != pq_ref) && (c3__gold != pq_ref) ) { + return c3n; + } + else { + u3_noun hud = u3nc(u3k(sut), u3k(ref)); + + if ( (c3y == u3qdi_has(gil, hud)) ) { + u3z(hud); + + return c3y; + } + else { + u3_noun zoc = u3qdi_put(gil, hud); + u3_noun tus = u3nt(c3__core, + u3k(qq_sut), + u3nc(c3__gold, + u3k(u3t(q_sut)))); + + u3_noun fer = u3nt(c3__core, + u3k(qq_ref), + u3nc(c3__gold, + u3k(u3t(q_ref)))); + + ret = _nost_cram(van, tus, tel, fer, qrq_sut, qrq_ref, zoc); + u3z(fer); + u3z(tus); + u3z(zoc); + u3z(hud); + + if ( c3n == ret ) { + return c3n; + } + else { + switch ( pq_sut ) { + default: return u3m_bail(c3__fail); + + case c3__gold: { + return + c3a(_nost_dext(van, qq_sut, tel, qq_ref, u3_nul, u3_nul, gil), + _nost_dext(van, qq_ref, tel, qq_sut, u3_nul, u3_nul, gil)); + } + case c3__iron: { + u3_noun s_sam = u3qfu_peek(van, qq_sut, c3__rite, 2); + u3_noun r_sam = u3qfu_peek(van, qq_ref, c3__rite, 2); + u3_noun ret = _nost_dext + (van, r_sam, tel, s_sam, u3_nul, u3_nul, gil); + + u3z(r_sam); + u3z(s_sam); + return ret; + } + case c3__lead: { + return c3y; + } + case c3__zinc: { + u3_noun s_pal = u3qfu_peek(van, qq_sut, c3__read, 2); + u3_noun r_pal = u3qfu_peek(van, qq_ref, c3__read, 2); + u3_noun ret = _nost_dext + (van, s_pal, tel, r_pal, u3_nul, u3_nul, gil); + + u3z(r_pal); + u3z(s_pal); + + return ret; + } + } + } + } + } + } + } + + static u3_noun + _nost_dext_in(u3_noun van, + u3_noun sut, + u3_noun tel, + u3_noun ref, + u3_noun seg, + u3_noun reg, + u3_noun gil) + { + u3_noun p_sut, q_sut, p_ref, q_ref; + + if ( (c3n == u3du(sut)) ) switch ( sut ) { + default: return u3m_bail(c3__fail); + + case c3__noun: { + return c3y; + } + case c3__void: { + return _nost_sint(van, sut, tel, ref, seg, reg, gil); + } + } + else switch ( u3h(sut) ) { + default: return u3m_bail(c3__fail); + + case c3__atom: { + if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { + return u3m_bail(c3__fail); + } + else { + if ( c3y == u3r_pq(ref, c3__atom, &p_ref, &q_ref) ) { + if ( (c3n == u3qf_fitz(p_sut, p_ref)) || + ( (c3y == u3du(q_sut)) && + ( (c3n == u3du(q_ref)) || + (c3n == u3r_sing(q_sut, q_ref)))) ) + { + return c3n; + } + return c3y; + } + return _nost_sint(van, sut, tel, ref, seg, reg, gil); + } + } + case c3__cell: { + if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { + return u3m_bail(c3__fail); + } else { + if ( c3y == u3r_pq(ref, c3__cell, &p_ref, &q_ref) ) { + return c3a(_nost_dext(van, p_sut, tel, p_ref, u3_nul, u3_nul, gil), + _nost_dext(van, q_sut, tel, q_ref, u3_nul, u3_nul, gil)); + } + else return _nost_sint(van, sut, tel, ref, seg, reg, gil); + } + } + case c3__core: { + if ( c3n == u3r_trel(sut, 0, &p_sut, &q_sut) ) { + return u3m_bail(c3__fail); + } else { + if ( (c3y == u3r_pq(ref, c3__core, &p_ref, &q_ref)) ) { + return _nost_cong(van, sut, tel, ref, gil); + } + else return _nost_sint(van, sut, tel, ref, seg, reg, gil); + } + } + case c3__face: { + if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { + return u3m_bail(c3__fail); + } else { + return _nost_dext(van, q_sut, tel, ref, seg, reg, gil); + } + } + case c3__fork: { + if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { + return u3m_bail(c3__fail); + } + else { + if ( c3n == u3du(ref) ) switch ( ref ) { + default: return _nost_sint(van, sut, tel, ref, seg, reg, gil); + + case c3__noun: + break; + } + else switch ( u3h(ref) ) { + default: return _nost_sint(van, sut, tel, ref, seg, reg, gil); + + case c3__atom: + case c3__cell: + case c3__core: + break; + } + + return c3o(_nost_dext(van, p_sut, c3n, ref, seg, reg, gil), + _nost_dext(van, q_sut, c3n, ref, seg, reg, gil)); + } + } + case c3__hold: p_sut = u3t(sut); + { + if ( c3y == u3qdi_has(seg, sut) ) { + return c3n; + } + else { + u3_noun hud = u3nc(u3k(sut), u3k(ref)); + + if ( (c3y == u3qdi_has(gil, hud)) ) { + u3z(hud); + + return c3y; + } + else { + u3_noun gus = u3qdi_put(seg, sut); + u3_noun zoc = u3qdi_put(gil, hud); + u3_noun fop = u3qfu_repo(van, sut); + u3_noun hiv = _nost_dext(van, fop, tel, ref, gus, reg, zoc); + + u3z(hud); + u3z(fop); + u3z(zoc); + u3z(gus); + + return hiv; + } + } + } + } + } + + static u3_noun + _nost_dext_to(u3_noun van, + u3_noun sut, + u3_noun tel, + u3_noun ref, + u3_noun seg, + u3_noun reg, + u3_noun gil) + { + u3_noun tyn = _nost_dext_in(van, sut, tel, ref, seg, reg, gil); + + if ( (c3y == tyn) || (c3n == tel) ) { + return tyn; + } else { + // u3_noun dun = u3qfu_dunq(van, "need", sut); + // u3_noun niz = u3qfu_dunq(van, "have", ref); + + // u3t_push(u3nc(c3__mean, dun)); + // u3t_push(u3nc(c3__mean, niz)); + + return u3m_error("type-fail"); + } + } + + static u3_noun + _nost_dext(u3_noun van, + u3_noun sut, + u3_noun tel, + u3_noun ref, + u3_noun seg, + u3_noun reg, + u3_noun gil) + { + + if ( (c3y == u3r_sing(sut, ref)) ) { + return c3y; + } + + { + c3_m fun_m = c3__nost + !!u3r_at(u3qfu_van_vet, van); + u3_noun pro = u3z_find_2(fun_m, sut, ref); + + if ( u3_none != pro ) { + return pro; + } + else { + pro = _nost_dext_to(van, sut, tel, ref, seg, reg, gil); + + return u3z_save_2(fun_m, sut, ref, pro); + } + } + } + + static u3_noun + _nost_sint(u3_noun van, + u3_noun sut, + u3_noun tel, + u3_noun ref, + u3_noun seg, + u3_noun reg, + u3_noun gil) + { + u3_noun p_ref, q_ref; + + if ( (c3n == u3du(ref)) ) { + switch ( ref ) { + default: return u3m_bail(c3__fail); + + case c3__noun: return c3n; + case c3__void: return c3y; + } + } + else { + switch ( u3h(ref) ) { + default: { + return u3m_bail(c3__fail); + } + case c3__atom: return c3n; + case c3__cell: return c3n; + case c3__core: { + u3_noun gam = u3qfu_repo(van, ref); + u3_noun hiv = _nost_dext(van, sut, tel, gam, seg, reg, gil); + + u3z(gam); + return hiv; + } + case c3__face: { + if ( c3n == u3r_trel(ref, 0, &p_ref, &q_ref) ) { + return u3m_bail(c3__fail); + } else { + return _nost_dext(van, sut, tel, q_ref, seg, reg, gil); + } + } + case c3__fork: { + if ( (c3y == u3r_mean(ref, 6, &p_ref, 7, &q_ref, 0)) ) { + return c3a(_nost_dext(van, sut, c3n, p_ref, seg, reg, gil), + _nost_dext(van, sut, c3n, q_ref, seg, reg, gil)); + } + else return u3m_bail(c3__fail); + } + case c3__hold: { + if ( c3y == u3qdi_has(reg, ref) ) { + return c3y; + } + { + u3_noun hud = u3nc(u3k(sut), u3k(ref)); + + if ( (c3y == u3qdi_has(gil, hud)) ) { + u3z(hud); + + return c3y; + } else { + u3_noun gur = u3qdi_put(reg, ref); + u3_noun zoc = u3qdi_put(gil, hud); + u3_noun gam = u3qfu_repo(van, ref); + + { + u3_noun hiv = _nost_dext(van, sut, tel, gam, seg, gur, zoc); + + u3z(hud); + u3z(gam); + u3z(zoc); + u3z(gur); + + return hiv; + } + } + } + } + } + } + } + + u3_noun + _cqfu_nost(u3_noun van, + u3_noun sut, + u3_noun tel, + u3_noun ref) + { + return _nost_dext(van, sut, tel, ref, u3_nul, u3_nul, u3_nul); + } + +/* boilerplate +*/ + u3_noun + u3wfu_nost(u3_noun cor) + { + u3_noun sut, tel, ref, van; + + if ( (c3n == u3r_mean(cor, u3x_sam_2, &tel, + u3x_sam_3, &ref, + u3x_con, &van, + 0)) || + (c3n == u3ud(tel)) || (tel > 1) || + (u3_none == (sut = u3r_at(u3x_sam, van))) ) + { + return u3m_bail(c3__fail); + } else { + return _cqfu_nost(van, sut, tel, ref); + } + } + + u3_noun + u3qfu_nost(u3_noun van, + u3_noun sut, + u3_noun tel, + u3_noun ref) + { + return _cqfu_nost(van, sut, tel, ref); + } + From ba575650e459271a0ccade107176aa1d0b3201a5 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Thu, 31 Dec 2015 17:01:19 -0800 Subject: [PATCH 054/137] In the middle of rescuing ++low. --- jets/f/ut_mint.c | 2 ++ jets/f/ut_mull.c | 32 +++++++++++++++++++++----------- jets/f/ut_play.c | 5 +++++ 3 files changed, 28 insertions(+), 11 deletions(-) diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index c9e3970097..5e022d4822 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -612,6 +612,8 @@ u3_noun kek = u3qfu_nost(van, hif, c3y, u3h(zel)); if ( c3n == kek ) { + u3z(hif); + u3z(zel); return u3m_bail(c3__exit); } else { diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index 532d131855..eda15b8299 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -531,16 +531,6 @@ u3z(vat); return ret; } - case c3__ktzp: 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(u3qfu_conk(van, u3h(vat), p_gen), - u3qfu_conk(van, u3t(vat), p_gen)); - - u3z(vat); - return ret; - } case c3__ktsg: p_gen = u3t(gen); _mull_used(); { @@ -551,13 +541,33 @@ { u3_noun p_hif = _mull_nice(van, gol, u3qfu_play(van, sut, p_gen)); u3_noun q_hif = u3qfu_play(van, dox, p_gen); - u3_noun zel = _mull_in(van, sut, p_hif, dox, q_gen); u3_noun ret = u3nc(p_hif, q_hif); u3z(zel); return ret; } + case c3__kthx: u3x_cell(u3t(gen), &p_gen, &q_gen); + _mull_used(); + { + u3_noun p_hif = _mull_nice(van, gol, u3qfu_play(van, sut, p_gen)); + u3_noun q_hif = u3qfu_play(van, dox, p_gen); + u3_noun zel = _mull_in(van, sut, c3__noun, dox, q_gen); + u3_noun kek = u3qfu_nost(van, p_hif, c3y, u3h(zel)); + + if ( c3n == kek ) { + u3z(p_hif); + u3z(q_hif); + u3z(zel); + return u3m_bail(c3__exit); + } + else { + u3_noun ret = u3nc(p_hif, q_hif); + + u3z(zel); + return ret; + } + } case c3__tsgr: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index a98027a5f0..5df56ebca5 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -331,6 +331,11 @@ { return _play_x(van, sut, p_gen); } + case c3__kthx: u3x_cell(u3t(gen), &p_gen, &q_gen); + _play_used(); + { + return _play_x(van, sut, p_gen); + } case c3__tsgr: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { From 4d6cfe2c68c2ac1a4af41b95178eedcbd49cde7d Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Thu, 31 Dec 2015 20:49:01 -0800 Subject: [PATCH 055/137] Degenerate type appears vanquished, at least in C. --- jets/f/ut_mint.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index 5e022d4822..7b2f3a86c5 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -108,8 +108,8 @@ u3_noun typ) { if ( (c3y == _mint_vet(van)) && - (c3n == u3qfu_nest(van, gol, c3y, typ)) ) - // (c3n == u3qfu_nost(van, gol, c3y, typ)) ) + // (c3n == u3qfu_nest(van, gol, c3y, typ)) ) + (c3n == u3qfu_nost(van, gol, c3y, typ)) ) { // u3_noun dun = u3qfu_dunq(van, "need", gol); // u3_noun niz = u3qfu_dunq(van, "have", typ); @@ -609,9 +609,10 @@ u3_noun huz = u3qfu_play(van, sut, p_gen); u3_noun hif = _mint_nice(van, gol, huz); u3_noun zel = _mint_in(van, sut, c3__noun, q_gen); - u3_noun kek = u3qfu_nost(van, hif, c3y, u3h(zel)); - if ( c3n == kek ) { + if ( (c3y == _mint_vet(van)) && + (c3n == u3qfu_nost(van, hif, c3y, u3h(zel))) ) + { u3z(hif); u3z(zel); return u3m_bail(c3__exit); From 80e792ddacdca78611640f10f072891e3bbe97cd Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Fri, 1 Jan 2016 14:15:50 -0800 Subject: [PATCH 056/137] Now fully using new, non-degenerate ++nest. --- jets/f/ut_conk.c | 2 +- jets/f/ut_fire.c | 2 +- jets/f/ut_mull.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jets/f/ut_conk.c b/jets/f/ut_conk.c index b2142a2c44..abd586c194 100644 --- a/jets/f/ut_conk.c +++ b/jets/f/ut_conk.c @@ -34,7 +34,7 @@ if ( c3y == vet ) { u3_noun cel = u3nt(c3__cell, c3__noun, c3__noun); - if ( c3n == u3qfu_nest(van, cel, c3y, sut) ) { + if ( c3n == u3qfu_nost(van, cel, c3y, sut) ) { return u3m_bail(c3__fail); } u3z(cel); diff --git a/jets/f/ut_fire.c b/jets/f/ut_fire.c index a3c4ab04c3..85c214a949 100644 --- a/jets/f/ut_fire.c +++ b/jets/f/ut_fire.c @@ -59,7 +59,7 @@ if ( c3__ash == u3h(gat) ) { if ( (c3y == vet) && - (c3n == u3qfu_nest(van, qq_typ, c3y, p_typ)) ) + (c3n == u3qfu_nost(van, qq_typ, c3y, p_typ)) ) { #if 0 u3_noun dun = u3qfu_dunq(van, "need", qq_typ); diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index eda15b8299..41b4f7cd9f 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -119,7 +119,7 @@ u3_noun gol, u3_noun typ) { - if ( c3n == u3qfu_nest(van, gol, c3y, typ) ) { + if ( c3n == u3qfu_nost(van, gol, c3y, typ) ) { // u3_noun dun = u3qfu_dunq(van, "need", gol); // u3_noun niz = u3qfu_dunq(van, "have", typ); From 15c5f6c198f5c2b5a5a9c2afa5880efa6840bf2d Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Fri, 1 Jan 2016 14:47:07 -0800 Subject: [PATCH 057/137] ++nest fully repaired. --- Makefile | 1 - jets/f/ut_conk.c | 2 +- jets/f/ut_fire.c | 2 +- jets/f/ut_mint.c | 5 +- jets/f/ut_mull.c | 4 +- jets/f/ut_nest.c | 119 +++++++----- jets/f/ut_nost.c | 479 ----------------------------------------------- 7 files changed, 78 insertions(+), 534 deletions(-) delete mode 100644 jets/f/ut_nost.c diff --git a/Makefile b/Makefile index 3af05b7cab..45b6faac2c 100644 --- a/Makefile +++ b/Makefile @@ -298,7 +298,6 @@ J_F_OFILES_UT=\ jets/f/ut_mint.o \ jets/f/ut_mull.o \ jets/f/ut_nest.o \ - jets/f/ut_nost.o \ jets/f/ut_park.o \ jets/f/ut_peek.o \ jets/f/ut_play.o \ diff --git a/jets/f/ut_conk.c b/jets/f/ut_conk.c index abd586c194..b2142a2c44 100644 --- a/jets/f/ut_conk.c +++ b/jets/f/ut_conk.c @@ -34,7 +34,7 @@ if ( c3y == vet ) { u3_noun cel = u3nt(c3__cell, c3__noun, c3__noun); - if ( c3n == u3qfu_nost(van, cel, c3y, sut) ) { + if ( c3n == u3qfu_nest(van, cel, c3y, sut) ) { return u3m_bail(c3__fail); } u3z(cel); diff --git a/jets/f/ut_fire.c b/jets/f/ut_fire.c index 85c214a949..a3c4ab04c3 100644 --- a/jets/f/ut_fire.c +++ b/jets/f/ut_fire.c @@ -59,7 +59,7 @@ if ( c3__ash == u3h(gat) ) { if ( (c3y == vet) && - (c3n == u3qfu_nost(van, qq_typ, c3y, p_typ)) ) + (c3n == u3qfu_nest(van, qq_typ, c3y, p_typ)) ) { #if 0 u3_noun dun = u3qfu_dunq(van, "need", qq_typ); diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index 7b2f3a86c5..1402db9852 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -108,8 +108,7 @@ u3_noun typ) { if ( (c3y == _mint_vet(van)) && - // (c3n == u3qfu_nest(van, gol, c3y, typ)) ) - (c3n == u3qfu_nost(van, gol, c3y, typ)) ) + (c3n == u3qfu_nest(van, gol, c3y, typ)) ) { // u3_noun dun = u3qfu_dunq(van, "need", gol); // u3_noun niz = u3qfu_dunq(van, "have", typ); @@ -611,7 +610,7 @@ u3_noun zel = _mint_in(van, sut, c3__noun, q_gen); if ( (c3y == _mint_vet(van)) && - (c3n == u3qfu_nost(van, hif, c3y, u3h(zel))) ) + (c3n == u3qfu_nest(van, hif, c3y, u3h(zel))) ) { u3z(hif); u3z(zel); diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index 41b4f7cd9f..15377160e5 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -119,7 +119,7 @@ u3_noun gol, u3_noun typ) { - if ( c3n == u3qfu_nost(van, gol, c3y, typ) ) { + if ( c3n == u3qfu_nest(van, gol, c3y, typ) ) { // u3_noun dun = u3qfu_dunq(van, "need", gol); // u3_noun niz = u3qfu_dunq(van, "have", typ); @@ -553,7 +553,7 @@ u3_noun p_hif = _mull_nice(van, gol, u3qfu_play(van, sut, p_gen)); u3_noun q_hif = u3qfu_play(van, dox, p_gen); u3_noun zel = _mull_in(van, sut, c3__noun, dox, q_gen); - u3_noun kek = u3qfu_nost(van, p_hif, c3y, u3h(zel)); + u3_noun kek = u3qfu_nest(van, p_hif, c3y, u3h(zel)); if ( c3n == kek ) { u3z(p_hif); diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index 5856d6c85f..ea2ce0a1ce 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -9,9 +9,9 @@ /* forward */ static u3_noun - _nest_sint(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); + _nest_sint(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); static u3_noun - _nest_dext(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 _nest_cram(u3_noun van, @@ -35,7 +35,8 @@ u3x_trel(hem, &n_hem, &l_hem, &r_hem); if ( (c3n == _nest_cram(van, sut, tel, ref, l_dab, l_hem, gil)) || - (c3n == _nest_cram(van, sut, tel, ref, r_dab, r_hem, gil)) ) { + (c3n == _nest_cram(van, sut, tel, ref, r_dab, r_hem, gil)) ) + { return c3n; } u3x_cell(n_dab, &pn_dab, &qn_dab); @@ -58,7 +59,7 @@ u3_noun vis = u3qfu_play(van, sut, pqn_dab); u3_noun lon = u3qfu_play(van, ref, pqn_hem); - u3_noun ret = _nest_dext(van, vis, tel, lon, gil); + u3_noun ret = _nest_dext(van, vis, tel, lon, u3_nul, u3_nul, gil); u3z(vis); u3z(lon); @@ -96,11 +97,14 @@ u3x_cell(rq_ref, &prq_ref, &qrq_ref); if ( c3y == u3r_sing(q_sut, q_ref) ) { - return _nest_dext(van, p_sut, tel, p_ref, gil); + return _nest_dext(van, p_sut, tel, p_ref, u3_nul, u3_nul, gil); } - else if ( (c3n == _nest_dext(van, qq_sut, tel, p_sut, gil)) || - (c3n == _nest_dext(van, p_sut, tel, qq_sut, gil)) || - (c3n == _nest_dext(van, qq_ref, tel, p_ref, gil)) ) + else if ( (c3n == _nest_dext + (van, qq_sut, tel, p_sut, u3_nul, u3_nul, gil)) || + (c3n == _nest_dext + (van, p_sut, tel, qq_sut, u3_nul, u3_nul, gil)) || + (c3n == _nest_dext + (van, qq_ref, tel, p_ref, u3_nul, u3_nul, gil)) ) { return c3n; } @@ -143,13 +147,14 @@ case c3__gold: { return - c3a(_nest_dext(van, qq_sut, tel, qq_ref, gil), - _nest_dext(van, qq_ref, tel, qq_sut, gil)); + c3a(_nest_dext(van, qq_sut, tel, qq_ref, u3_nul, u3_nul, gil), + _nest_dext(van, qq_ref, tel, qq_sut, u3_nul, u3_nul, gil)); } case c3__iron: { u3_noun s_sam = u3qfu_peek(van, qq_sut, c3__rite, 2); u3_noun r_sam = u3qfu_peek(van, qq_ref, c3__rite, 2); - u3_noun ret = _nest_dext(van, r_sam, tel, s_sam, gil); + u3_noun ret = _nest_dext + (van, r_sam, tel, s_sam, u3_nul, u3_nul, gil); u3z(r_sam); u3z(s_sam); @@ -161,7 +166,8 @@ case c3__zinc: { u3_noun s_pal = u3qfu_peek(van, qq_sut, c3__read, 2); u3_noun r_pal = u3qfu_peek(van, qq_ref, c3__read, 2); - u3_noun ret = _nest_dext(van, s_pal, tel, r_pal, gil); + u3_noun ret = _nest_dext + (van, s_pal, tel, r_pal, u3_nul, u3_nul, gil); u3z(r_pal); u3z(s_pal); @@ -180,6 +186,8 @@ u3_noun sut, u3_noun tel, u3_noun ref, + u3_noun seg, + u3_noun reg, u3_noun gil) { u3_noun p_sut, q_sut, p_ref, q_ref; @@ -191,7 +199,7 @@ return c3y; } case c3__void: { - return _nest_sint(van, sut, tel, ref, gil); + return _nest_sint(van, sut, tel, ref, seg, reg, gil); } } else switch ( u3h(sut) ) { @@ -212,7 +220,7 @@ } return c3y; } - return _nest_sint(van, sut, tel, ref, gil); + return _nest_sint(van, sut, tel, ref, seg, reg, gil); } } case c3__cell: { @@ -220,10 +228,10 @@ return u3m_bail(c3__fail); } else { if ( c3y == u3r_pq(ref, c3__cell, &p_ref, &q_ref) ) { - return c3a(_nest_dext(van, p_sut, tel, p_ref, gil), - _nest_dext(van, q_sut, tel, q_ref, gil)); + return c3a(_nest_dext(van, p_sut, tel, p_ref, u3_nul, u3_nul, gil), + _nest_dext(van, q_sut, tel, q_ref, u3_nul, u3_nul, gil)); } - else return _nest_sint(van, sut, tel, ref, gil); + else return _nest_sint(van, sut, tel, ref, seg, reg, gil); } } case c3__core: { @@ -233,14 +241,14 @@ if ( (c3y == u3r_pq(ref, c3__core, &p_ref, &q_ref)) ) { return _nest_cong(van, sut, tel, ref, gil); } - else return _nest_sint(van, sut, tel, ref, gil); + else return _nest_sint(van, sut, tel, ref, seg, reg, gil); } } case c3__face: { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { return u3m_bail(c3__fail); } else { - return _nest_dext(van, q_sut, tel, ref, gil); + return _nest_dext(van, q_sut, tel, ref, seg, reg, gil); } } case c3__fork: { @@ -249,13 +257,13 @@ } else { if ( c3n == u3du(ref) ) switch ( ref ) { - default: return _nest_sint(van, sut, tel, ref, gil); + default: return _nest_sint(van, sut, tel, ref, seg, reg, gil); case c3__noun: break; } else switch ( u3h(ref) ) { - default: return _nest_sint(van, sut, tel, ref, gil); + default: return _nest_sint(van, sut, tel, ref, seg, reg, gil); case c3__atom: case c3__cell: @@ -263,28 +271,36 @@ break; } - return c3o(_nest_dext(van, p_sut, c3n, ref, gil), - _nest_dext(van, q_sut, c3n, ref, gil)); + return c3o(_nest_dext(van, p_sut, c3n, ref, seg, reg, gil), + _nest_dext(van, q_sut, c3n, ref, seg, reg, gil)); } } case c3__hold: p_sut = u3t(sut); { - u3_noun hud = u3nc(u3k(sut), u3k(ref)); + if ( c3y == u3qdi_has(seg, sut) ) { + return c3n; + } + else { + u3_noun hud = u3nc(u3k(sut), u3k(ref)); - if ( (c3y == u3qdi_has(gil, hud)) ) { - u3z(hud); + if ( (c3y == u3qdi_has(gil, hud)) ) { + u3z(hud); - return c3y; - } else { - u3_noun zoc = u3qdi_put(gil, hud); - u3_noun fop = u3qfu_rest(van, sut, p_sut); - u3_noun hiv = _nest_dext(van, fop, tel, ref, zoc); + return c3y; + } + else { + u3_noun gus = u3qdi_put(seg, sut); + u3_noun zoc = u3qdi_put(gil, hud); + u3_noun fop = u3qfu_repo(van, sut); + u3_noun hiv = _nest_dext(van, fop, tel, ref, gus, reg, zoc); - u3z(hud); - u3z(fop); - u3z(zoc); + u3z(hud); + u3z(fop); + u3z(zoc); + u3z(gus); - return hiv; + return hiv; + } } } } @@ -295,9 +311,11 @@ u3_noun sut, u3_noun tel, u3_noun ref, + u3_noun seg, + u3_noun reg, u3_noun gil) { - u3_noun tyn = _nest_dext_in(van, sut, tel, ref, gil); + u3_noun tyn = _nest_dext_in(van, sut, tel, ref, seg, reg, gil); if ( (c3y == tyn) || (c3n == tel) ) { return tyn; @@ -308,7 +326,7 @@ // u3t_push(u3nc(c3__mean, dun)); // u3t_push(u3nc(c3__mean, niz)); - return u3m_error("type-fail"); + return u3m_error("nest-fail"); } } @@ -317,6 +335,8 @@ u3_noun sut, u3_noun tel, u3_noun ref, + u3_noun seg, + u3_noun reg, u3_noun gil) { @@ -332,7 +352,7 @@ return pro; } else { - pro = _nest_dext_to(van, sut, tel, ref, gil); + pro = _nest_dext_to(van, sut, tel, ref, seg, reg, gil); return u3z_save_2(fun_m, sut, ref, pro); } @@ -344,6 +364,8 @@ u3_noun sut, u3_noun tel, u3_noun ref, + u3_noun seg, + u3_noun reg, u3_noun gil) { u3_noun p_ref, q_ref; @@ -365,7 +387,7 @@ case c3__cell: return c3n; case c3__core: { u3_noun gam = u3qfu_repo(van, ref); - u3_noun hiv = _nest_dext(van, sut, tel, gam, gil); + u3_noun hiv = _nest_dext(van, sut, tel, gam, seg, reg, gil); u3z(gam); return hiv; @@ -374,36 +396,39 @@ if ( c3n == u3r_trel(ref, 0, &p_ref, &q_ref) ) { return u3m_bail(c3__fail); } else { - return _nest_dext(van, sut, tel, q_ref, gil); + return _nest_dext(van, sut, tel, q_ref, seg, reg, gil); } } case c3__fork: { if ( (c3y == u3r_mean(ref, 6, &p_ref, 7, &q_ref, 0)) ) { - return c3a(_nest_dext(van, sut, c3n, p_ref, gil), - _nest_dext(van, sut, c3n, q_ref, gil)); + return c3a(_nest_dext(van, sut, c3n, p_ref, seg, reg, gil), + _nest_dext(van, sut, c3n, q_ref, seg, reg, gil)); } else return u3m_bail(c3__fail); } case c3__hold: { - p_ref = u3t(ref); + if ( c3y == u3qdi_has(reg, ref) ) { + return c3y; + } { - u3_noun hud = u3nc(u3k(sut), - u3k(ref)); + u3_noun hud = u3nc(u3k(sut), u3k(ref)); if ( (c3y == u3qdi_has(gil, hud)) ) { u3z(hud); return c3y; } else { + u3_noun gur = u3qdi_put(reg, ref); u3_noun zoc = u3qdi_put(gil, hud); u3_noun gam = u3qfu_repo(van, ref); { - u3_noun hiv = _nest_dext(van, sut, tel, gam, zoc); + u3_noun hiv = _nest_dext(van, sut, tel, gam, seg, gur, zoc); u3z(hud); u3z(gam); u3z(zoc); + u3z(gur); return hiv; } @@ -420,7 +445,7 @@ u3_noun tel, u3_noun ref) { - return _nest_dext(van, sut, tel, ref, u3_nul); + return _nest_dext(van, sut, tel, ref, u3_nul, u3_nul, u3_nul); } /* boilerplate diff --git a/jets/f/ut_nost.c b/jets/f/ut_nost.c deleted file mode 100644 index 29433b0569..0000000000 --- a/jets/f/ut_nost.c +++ /dev/null @@ -1,479 +0,0 @@ -/* j/6/ut_nost.c -** -*/ -#include "all.h" - - -/* logic -*/ - /* forward - */ - static u3_noun - _nost_sint(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); - static u3_noun - _nost_dext(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); - - static u3_noun - _nost_cram(u3_noun van, - u3_noun sut, - u3_noun tel, - u3_noun ref, - u3_noun dab, - u3_noun hem, - u3_noun gil) - { - if ( u3_nul == dab ) { - return u3r_sing(u3_nul, hem); - } else if ( u3_nul == hem ) { - return c3n; - } else { - u3_noun n_dab, l_dab, r_dab; - u3_noun n_hem, l_hem, r_hem; - u3_noun pn_hem, qn_hem, pn_dab, qn_dab; - - u3x_trel(dab, &n_dab, &l_dab, &r_dab); - u3x_trel(hem, &n_hem, &l_hem, &r_hem); - - if ( (c3n == _nost_cram(van, sut, tel, ref, l_dab, l_hem, gil)) || - (c3n == _nost_cram(van, sut, tel, ref, r_dab, r_hem, gil)) ) - { - return c3n; - } - u3x_cell(n_dab, &pn_dab, &qn_dab); - u3x_cell(n_hem, &pn_hem, &qn_hem); - - if ( c3n == u3r_sing(pn_dab, pn_hem) ) { - return c3n; - } else { - if ( (c3n == u3du(qn_dab)) || (c3n == u3du(qn_hem)) ) { - return u3m_bail(c3__fail); - } - else switch ( u3h(qn_dab) ) { - default: return u3m_bail(c3__exit); - case c3__ash: { - if ( c3__ash != u3h(qn_hem) ) { - return c3n; - } else { - u3_noun pqn_dab = u3t(qn_dab); - u3_noun pqn_hem = u3t(qn_hem); - u3_noun vis = u3qfu_play(van, sut, pqn_dab); - u3_noun lon = u3qfu_play(van, ref, pqn_hem); - - u3_noun ret = _nost_dext(van, vis, tel, lon, u3_nul, u3_nul, gil); - - u3z(vis); - u3z(lon); - return ret; - } - } - case c3__elm: { - return u3r_sing(qn_dab, qn_hem); - } - } - } - } - } - - static u3_noun - _nost_cong(u3_noun van, - u3_noun sut, - u3_noun tel, - u3_noun ref, - u3_noun gil) - { - u3_noun p_sut, q_sut, p_ref, q_ref; - u3_noun pq_sut, qq_sut, rq_sut; - u3_noun pq_ref, qq_ref, rq_ref; - u3_noun prq_sut, qrq_sut, prq_ref, qrq_ref; - u3_noun ret; - - u3x_trel(sut, 0, &p_sut, &q_sut); - u3x_trel(ref, 0, &p_ref, &q_ref); - - u3x_trel(q_sut, &pq_sut, &qq_sut, &rq_sut); - u3x_trel(q_ref, &pq_ref, &qq_ref, &rq_ref); - - u3x_cell(rq_sut, &prq_sut, &qrq_sut); - u3x_cell(rq_ref, &prq_ref, &qrq_ref); - - if ( c3y == u3r_sing(q_sut, q_ref) ) { - return _nost_dext(van, p_sut, tel, p_ref, u3_nul, u3_nul, gil); - } - else if ( (c3n == _nost_dext - (van, qq_sut, tel, p_sut, u3_nul, u3_nul, gil)) || - (c3n == _nost_dext - (van, p_sut, tel, qq_sut, u3_nul, u3_nul, gil)) || - (c3n == _nost_dext - (van, qq_ref, tel, p_ref, u3_nul, u3_nul, gil)) ) - { - return c3n; - } - else { - if ( (pq_sut != pq_ref) && (c3__gold != pq_ref) ) { - return c3n; - } - else { - u3_noun hud = u3nc(u3k(sut), u3k(ref)); - - if ( (c3y == u3qdi_has(gil, hud)) ) { - u3z(hud); - - return c3y; - } - else { - u3_noun zoc = u3qdi_put(gil, hud); - u3_noun tus = u3nt(c3__core, - u3k(qq_sut), - u3nc(c3__gold, - u3k(u3t(q_sut)))); - - u3_noun fer = u3nt(c3__core, - u3k(qq_ref), - u3nc(c3__gold, - u3k(u3t(q_ref)))); - - ret = _nost_cram(van, tus, tel, fer, qrq_sut, qrq_ref, zoc); - u3z(fer); - u3z(tus); - u3z(zoc); - u3z(hud); - - if ( c3n == ret ) { - return c3n; - } - else { - switch ( pq_sut ) { - default: return u3m_bail(c3__fail); - - case c3__gold: { - return - c3a(_nost_dext(van, qq_sut, tel, qq_ref, u3_nul, u3_nul, gil), - _nost_dext(van, qq_ref, tel, qq_sut, u3_nul, u3_nul, gil)); - } - case c3__iron: { - u3_noun s_sam = u3qfu_peek(van, qq_sut, c3__rite, 2); - u3_noun r_sam = u3qfu_peek(van, qq_ref, c3__rite, 2); - u3_noun ret = _nost_dext - (van, r_sam, tel, s_sam, u3_nul, u3_nul, gil); - - u3z(r_sam); - u3z(s_sam); - return ret; - } - case c3__lead: { - return c3y; - } - case c3__zinc: { - u3_noun s_pal = u3qfu_peek(van, qq_sut, c3__read, 2); - u3_noun r_pal = u3qfu_peek(van, qq_ref, c3__read, 2); - u3_noun ret = _nost_dext - (van, s_pal, tel, r_pal, u3_nul, u3_nul, gil); - - u3z(r_pal); - u3z(s_pal); - - return ret; - } - } - } - } - } - } - } - - static u3_noun - _nost_dext_in(u3_noun van, - u3_noun sut, - u3_noun tel, - u3_noun ref, - u3_noun seg, - u3_noun reg, - u3_noun gil) - { - u3_noun p_sut, q_sut, p_ref, q_ref; - - if ( (c3n == u3du(sut)) ) switch ( sut ) { - default: return u3m_bail(c3__fail); - - case c3__noun: { - return c3y; - } - case c3__void: { - return _nost_sint(van, sut, tel, ref, seg, reg, gil); - } - } - else switch ( u3h(sut) ) { - default: return u3m_bail(c3__fail); - - case c3__atom: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { - return u3m_bail(c3__fail); - } - else { - if ( c3y == u3r_pq(ref, c3__atom, &p_ref, &q_ref) ) { - if ( (c3n == u3qf_fitz(p_sut, p_ref)) || - ( (c3y == u3du(q_sut)) && - ( (c3n == u3du(q_ref)) || - (c3n == u3r_sing(q_sut, q_ref)))) ) - { - return c3n; - } - return c3y; - } - return _nost_sint(van, sut, tel, ref, seg, reg, gil); - } - } - case c3__cell: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { - return u3m_bail(c3__fail); - } else { - if ( c3y == u3r_pq(ref, c3__cell, &p_ref, &q_ref) ) { - return c3a(_nost_dext(van, p_sut, tel, p_ref, u3_nul, u3_nul, gil), - _nost_dext(van, q_sut, tel, q_ref, u3_nul, u3_nul, gil)); - } - else return _nost_sint(van, sut, tel, ref, seg, reg, gil); - } - } - case c3__core: { - if ( c3n == u3r_trel(sut, 0, &p_sut, &q_sut) ) { - return u3m_bail(c3__fail); - } else { - if ( (c3y == u3r_pq(ref, c3__core, &p_ref, &q_ref)) ) { - return _nost_cong(van, sut, tel, ref, gil); - } - else return _nost_sint(van, sut, tel, ref, seg, reg, gil); - } - } - case c3__face: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { - return u3m_bail(c3__fail); - } else { - return _nost_dext(van, q_sut, tel, ref, seg, reg, gil); - } - } - case c3__fork: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { - return u3m_bail(c3__fail); - } - else { - if ( c3n == u3du(ref) ) switch ( ref ) { - default: return _nost_sint(van, sut, tel, ref, seg, reg, gil); - - case c3__noun: - break; - } - else switch ( u3h(ref) ) { - default: return _nost_sint(van, sut, tel, ref, seg, reg, gil); - - case c3__atom: - case c3__cell: - case c3__core: - break; - } - - return c3o(_nost_dext(van, p_sut, c3n, ref, seg, reg, gil), - _nost_dext(van, q_sut, c3n, ref, seg, reg, gil)); - } - } - case c3__hold: p_sut = u3t(sut); - { - if ( c3y == u3qdi_has(seg, sut) ) { - return c3n; - } - else { - u3_noun hud = u3nc(u3k(sut), u3k(ref)); - - if ( (c3y == u3qdi_has(gil, hud)) ) { - u3z(hud); - - return c3y; - } - else { - u3_noun gus = u3qdi_put(seg, sut); - u3_noun zoc = u3qdi_put(gil, hud); - u3_noun fop = u3qfu_repo(van, sut); - u3_noun hiv = _nost_dext(van, fop, tel, ref, gus, reg, zoc); - - u3z(hud); - u3z(fop); - u3z(zoc); - u3z(gus); - - return hiv; - } - } - } - } - } - - static u3_noun - _nost_dext_to(u3_noun van, - u3_noun sut, - u3_noun tel, - u3_noun ref, - u3_noun seg, - u3_noun reg, - u3_noun gil) - { - u3_noun tyn = _nost_dext_in(van, sut, tel, ref, seg, reg, gil); - - if ( (c3y == tyn) || (c3n == tel) ) { - return tyn; - } else { - // u3_noun dun = u3qfu_dunq(van, "need", sut); - // u3_noun niz = u3qfu_dunq(van, "have", ref); - - // u3t_push(u3nc(c3__mean, dun)); - // u3t_push(u3nc(c3__mean, niz)); - - return u3m_error("type-fail"); - } - } - - static u3_noun - _nost_dext(u3_noun van, - u3_noun sut, - u3_noun tel, - u3_noun ref, - u3_noun seg, - u3_noun reg, - u3_noun gil) - { - - if ( (c3y == u3r_sing(sut, ref)) ) { - return c3y; - } - - { - c3_m fun_m = c3__nost + !!u3r_at(u3qfu_van_vet, van); - u3_noun pro = u3z_find_2(fun_m, sut, ref); - - if ( u3_none != pro ) { - return pro; - } - else { - pro = _nost_dext_to(van, sut, tel, ref, seg, reg, gil); - - return u3z_save_2(fun_m, sut, ref, pro); - } - } - } - - static u3_noun - _nost_sint(u3_noun van, - u3_noun sut, - u3_noun tel, - u3_noun ref, - u3_noun seg, - u3_noun reg, - u3_noun gil) - { - u3_noun p_ref, q_ref; - - if ( (c3n == u3du(ref)) ) { - switch ( ref ) { - default: return u3m_bail(c3__fail); - - case c3__noun: return c3n; - case c3__void: return c3y; - } - } - else { - switch ( u3h(ref) ) { - default: { - return u3m_bail(c3__fail); - } - case c3__atom: return c3n; - case c3__cell: return c3n; - case c3__core: { - u3_noun gam = u3qfu_repo(van, ref); - u3_noun hiv = _nost_dext(van, sut, tel, gam, seg, reg, gil); - - u3z(gam); - return hiv; - } - case c3__face: { - if ( c3n == u3r_trel(ref, 0, &p_ref, &q_ref) ) { - return u3m_bail(c3__fail); - } else { - return _nost_dext(van, sut, tel, q_ref, seg, reg, gil); - } - } - case c3__fork: { - if ( (c3y == u3r_mean(ref, 6, &p_ref, 7, &q_ref, 0)) ) { - return c3a(_nost_dext(van, sut, c3n, p_ref, seg, reg, gil), - _nost_dext(van, sut, c3n, q_ref, seg, reg, gil)); - } - else return u3m_bail(c3__fail); - } - case c3__hold: { - if ( c3y == u3qdi_has(reg, ref) ) { - return c3y; - } - { - u3_noun hud = u3nc(u3k(sut), u3k(ref)); - - if ( (c3y == u3qdi_has(gil, hud)) ) { - u3z(hud); - - return c3y; - } else { - u3_noun gur = u3qdi_put(reg, ref); - u3_noun zoc = u3qdi_put(gil, hud); - u3_noun gam = u3qfu_repo(van, ref); - - { - u3_noun hiv = _nost_dext(van, sut, tel, gam, seg, gur, zoc); - - u3z(hud); - u3z(gam); - u3z(zoc); - u3z(gur); - - return hiv; - } - } - } - } - } - } - } - - u3_noun - _cqfu_nost(u3_noun van, - u3_noun sut, - u3_noun tel, - u3_noun ref) - { - return _nost_dext(van, sut, tel, ref, u3_nul, u3_nul, u3_nul); - } - -/* boilerplate -*/ - u3_noun - u3wfu_nost(u3_noun cor) - { - u3_noun sut, tel, ref, van; - - if ( (c3n == u3r_mean(cor, u3x_sam_2, &tel, - u3x_sam_3, &ref, - u3x_con, &van, - 0)) || - (c3n == u3ud(tel)) || (tel > 1) || - (u3_none == (sut = u3r_at(u3x_sam, van))) ) - { - return u3m_bail(c3__fail); - } else { - return _cqfu_nost(van, sut, tel, ref); - } - } - - u3_noun - u3qfu_nost(u3_noun van, - u3_noun sut, - u3_noun tel, - u3_noun ref) - { - return _cqfu_nost(van, sut, tel, ref); - } - From 2402bb6cc711bf7a3804143de6f7e09d47c02599 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sat, 2 Jan 2016 22:20:24 -0800 Subject: [PATCH 058/137] Much cleanup. --- jets/f/ut_nest.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index ea2ce0a1ce..b1a43ab18b 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -14,7 +14,7 @@ _nest_dext(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); static u3_noun - _nest_cram(u3_noun van, + _nest_clip(u3_noun van, u3_noun sut, u3_noun tel, u3_noun ref, @@ -34,8 +34,8 @@ u3x_trel(dab, &n_dab, &l_dab, &r_dab); u3x_trel(hem, &n_hem, &l_hem, &r_hem); - if ( (c3n == _nest_cram(van, sut, tel, ref, l_dab, l_hem, gil)) || - (c3n == _nest_cram(van, sut, tel, ref, r_dab, r_hem, gil)) ) + if ( (c3n == _nest_clip(van, sut, tel, ref, l_dab, l_hem, gil)) || + (c3n == _nest_clip(van, sut, tel, ref, r_dab, r_hem, gil)) ) { return c3n; } @@ -109,7 +109,10 @@ return c3n; } else { - if ( (pq_sut != pq_ref) && (c3__gold != pq_ref) ) { + if ( (pq_sut != pq_ref) && + (c3__lead != pq_sut) && + (c3__gold != pq_ref) ) + { return c3n; } else { @@ -132,7 +135,7 @@ u3nc(c3__gold, u3k(u3t(q_ref)))); - ret = _nest_cram(van, tus, tel, fer, qrq_sut, qrq_ref, zoc); + ret = _nest_clip(van, tus, tel, fer, qrq_sut, qrq_ref, zoc); u3z(fer); u3z(tus); u3z(zoc); From 80455bcb6e6ab2ddf35809975b46a3262591bf82 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 3 Jan 2016 01:22:57 -0800 Subject: [PATCH 059/137] Devulcanization artifacts out of vanes. --- jets/f/ut_fire.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/jets/f/ut_fire.c b/jets/f/ut_fire.c index a3c4ab04c3..439186881c 100644 --- a/jets/f/ut_fire.c +++ b/jets/f/ut_fire.c @@ -76,22 +76,24 @@ } else { c3_assert(c3__elm == u3h(gat)); +#if 0 + u3_noun dun = u3qfu_dunq(van, "wild", typ); + u3_noun niz = u3qfu_dunq(van, "tame", dox); + u3t_push(u3nc(c3__mean, dun)); + u3t_push(u3nc(c3__mean, niz)); +#endif if ( (c3y == vet) && - // (c3n == u3r_sing(p_typ, qq_typ)) && (c3n == _fire_mull(van, typ, dox, t_gat)) ) { -#if 0 - u3_noun dun = u3qfu_dunq(van, "wild", typ); - u3_noun niz = u3qfu_dunq(van, "tame", dox); - - u3t_push(u3nc(c3__mean, dun)); - u3t_push(u3nc(c3__mean, niz)); -#endif return u3m_error("fire-wet"); } else { u3z(dox); +#if 0 + u3t_drop(); + u3t_drop(); +#endif return u3nc(u3k(typ), u3k(t_gat)); } } From 96956bb9734945b2d109a151056e16cd496ccca3 Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Mon, 4 Jan 2016 17:07:11 -0800 Subject: [PATCH 060/137] handle ._~~__ many/~[`n/0] compilation properly Type was atom/%n, whould be cube/[0 atom/%n] --- jets/f/ut_play.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index 2ae8c27078..ac418760f2 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -266,6 +266,13 @@ case c3__dtzy: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { + if ( 'n' == p_gen ) { + if ( (q_gen != 0) ) { + return u3m_bail(c3__exit); + } else { + return u3nq(c3__cube, q_gen, c3__atom, p_gen); + } + } if ( 'f' == p_gen ) { if ( (q_gen > 1) ) { return u3m_bail(c3__exit); From edb83507e4e564225a7bd7728cf76497fc2f37d0 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Mon, 4 Jan 2016 17:29:30 -0800 Subject: [PATCH 061/137] Hoon 151. --- jets/tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jets/tree.c b/jets/tree.c index a7d9c55f33..a0202aba90 100644 --- a/jets/tree.c +++ b/jets/tree.c @@ -548,13 +548,13 @@ static u3j_core _mood_d[] = {} }; -static u3j_core _k161_d[] = +static u3j_core _k151_d[] = { { "mood", 0, _mood_d }, {} }; static u3j_core _d[] = { - { "k161", 0, _k161_d}, + { "k151", 0, _k151_d}, {} }; From b4e0ce901cf7a3d0fc169ca912963518629765b1 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Wed, 6 Jan 2016 17:47:03 -0800 Subject: [PATCH 062/137] Still bedeviled by some devulc bugs. --- jets/f/ut_nest.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index b1a43ab18b..a6ebc47c4d 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -323,11 +323,11 @@ if ( (c3y == tyn) || (c3n == tel) ) { return tyn; } else { - // u3_noun dun = u3qfu_dunq(van, "need", sut); - // u3_noun niz = u3qfu_dunq(van, "have", ref); + u3_noun dun = u3qfu_dunq(van, "need", sut); + u3_noun niz = u3qfu_dunq(van, "have", ref); - // u3t_push(u3nc(c3__mean, dun)); - // u3t_push(u3nc(c3__mean, niz)); + u3t_push(u3nc(c3__mean, dun)); + u3t_push(u3nc(c3__mean, niz)); return u3m_error("nest-fail"); } From 8dc9eee9b0ef730a0571b49ca45c25bf8be2f197 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Wed, 6 Jan 2016 23:08:09 -0800 Subject: [PATCH 063/137] Retreated from ++hail:ap. --- jets/f/ut_nest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index a6ebc47c4d..f4d321ffaf 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -323,12 +323,13 @@ if ( (c3y == tyn) || (c3n == tel) ) { return tyn; } else { +#if 0 u3_noun dun = u3qfu_dunq(van, "need", sut); u3_noun niz = u3qfu_dunq(van, "have", ref); u3t_push(u3nc(c3__mean, dun)); u3t_push(u3nc(c3__mean, niz)); - +#endif return u3m_error("nest-fail"); } } From f5c42e451dad9860c8fc8155accf4534ccef0886 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Thu, 7 Jan 2016 16:38:11 -0800 Subject: [PATCH 064/137] Change ++seek to ++sick. --- include/jets/q.h | 2 +- jets/f/ut_mint.c | 31 +---------- jets/f/ut_mull.c | 34 +----------- jets/f/ut_play.c | 31 +---------- jets/f/ut_seek.c | 141 ++++------------------------------------------- 5 files changed, 15 insertions(+), 224 deletions(-) diff --git a/include/jets/q.h b/include/jets/q.h index 9b81dffbe5..eb4cba7e93 100644 --- a/include/jets/q.h +++ b/include/jets/q.h @@ -221,7 +221,7 @@ u3_noun u3qfu_repo(u3_noun, u3_noun); u3_noun u3qfu_rest(u3_noun, u3_noun, u3_noun); u3_noun u3qfu_seek(u3_noun, u3_noun, u3_noun, u3_noun); - u3_noun u3qfu_seep(u3_noun, u3_noun, u3_noun, u3_noun); + u3_noun u3qfu_sick(u3_noun, u3_noun, u3_noun, u3_noun); u3_noun u3qfu_shep(u3_noun, const c3_c*, u3_noun, u3_noun); u3_noun u3qfu_shew(u3_noun, u3_noun); u3_noun u3qfu_sift(u3_noun, u3_noun, u3_noun); diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index 1402db9852..ed5513d26f 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -40,34 +40,6 @@ } } - static u3_noun - _mint_foil(u3_noun pok) - { - u3_noun p_pok = u3h(pok); - u3_noun q_pok = u3t(pok); - u3_noun ret; - - if ( c3y == u3h(q_pok) ) { - u3_noun pq_pok = u3t(q_pok); - - ret = u3nc(u3k(p_pok), - u3nc(u3_nul, - u3nc(u3nc(u3k(pq_pok), - u3nt(c3__elm, u3_nul, 1)), - u3_nul))); - } - else { - u3_noun pq_pok = u3h(u3t(q_pok)); - u3_noun qq_pok = u3t(u3t(q_pok)); - - ret = u3nc(u3k(p_pok), - u3nc(u3k(pq_pok), - u3k(qq_pok))); - } - u3z(pok); - return ret; - } - static u3_noun _mint_cond(u3_noun pex, u3_noun yom, @@ -656,8 +628,7 @@ case c3__cnts: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { - u3_noun sec = u3qfu_seek(van, sut, c3__read, p_gen); - u3_noun lar = _mint_foil(sec); + u3_noun lar = u3qfu_sick(van, sut, c3__read, p_gen); u3_noun p_lar = u3h(lar); u3_noun q_lar = u3t(lar); u3_noun pq_lar = u3h(q_lar); diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index 15377160e5..f08054d2c4 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -55,34 +55,6 @@ return ret; } - static u3_noun - _mull_foil(u3_noun pok) - { - u3_noun p_pok = u3h(pok); - u3_noun q_pok = u3t(pok); - u3_noun ret; - - if ( c3y == u3h(q_pok) ) { - u3_noun pq_pok = u3t(q_pok); - - ret = u3nc(u3k(p_pok), - u3nc(u3_nul, - u3nc(u3nc(u3k(pq_pok), - u3nt(c3__elm, u3_nul, 1)), - u3_nul))); - } - else { - u3_noun pq_pok = u3h(u3t(q_pok)); - u3_noun qq_pok = u3t(u3t(q_pok)); - - ret = u3nc(u3k(p_pok), - u3nc(u3k(pq_pok), - u3k(qq_pok))); - } - u3z(pok); - return ret; - } - static u3_noun _mull_coke(u3_noun nug) { @@ -598,14 +570,12 @@ case c3__cnts: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { - u3_noun sec = u3qfu_seek(van, sut, c3__read, p_gen); - u3_noun suc = u3qfu_seek(van, dox, c3__read, p_gen); - u3_noun lar = _mull_foil(sec); + u3_noun lar = u3qfu_sick(van, sut, c3__read, p_gen); + u3_noun vug = u3qfu_sick(van, dox, c3__read, p_gen); u3_noun p_lar = u3h(lar); u3_noun q_lar = u3t(lar); u3_noun pq_lar = u3h(q_lar); u3_noun qq_lar = u3t(q_lar); - u3_noun vug = _mull_foil(suc); u3_noun p_vug = u3h(vug); u3_noun q_vug = u3t(vug); u3_noun pq_vug = u3h(q_vug); diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index 5df56ebca5..80daebf224 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -73,34 +73,6 @@ return ret; } - static u3_noun - _play_foil(u3_noun pok) - { - u3_noun p_pok = u3h(pok); - u3_noun q_pok = u3t(pok); - u3_noun ret; - - if ( c3y == u3h(q_pok) ) { - u3_noun pq_pok = u3t(q_pok); - - ret = u3nc(u3k(p_pok), - u3nc(u3_nul, - u3nc(u3nc(u3k(pq_pok), - u3nt(c3__elm, u3_nul, 1)), - u3_nul))); - } - else { - u3_noun pq_pok = u3h(u3t(q_pok)); - u3_noun qq_pok = u3t(u3t(q_pok)); - - ret = u3nc(u3k(p_pok), - u3nc(u3k(pq_pok), - u3k(qq_pok))); - } - u3z(pok); - return ret; - } - static u3_noun _play_edit(u3_noun van, u3_noun sut, @@ -362,8 +334,7 @@ case c3__cnts: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { - u3_noun sec = u3qfu_seek(van, sut, c3__read, p_gen); - u3_noun lar = _play_foil(sec); + u3_noun lar = u3qfu_sick(van, sut, c3__read, p_gen); u3_noun q_lar = u3t(lar); u3_noun qq_lar = u3t(q_lar); u3_noun mew = q_gen; diff --git a/jets/f/ut_seek.c b/jets/f/ut_seek.c index f0a171f23e..fd2e4f2086 100644 --- a/jets/f/ut_seek.c +++ b/jets/f/ut_seek.c @@ -4,123 +4,6 @@ #include "all.h" -/* logic -*/ - static u3_noun - _seek_flat(u3_noun wob) - { - if ( u3_nul == wob ) { - return u3_nul; - } else { - u3_noun i_wob = u3h(wob); - u3_noun t_wob = u3t(wob); - - return u3nc(u3nc(u3k(u3h(i_wob)), - u3nt(c3__ash, u3_nul, 1)), - _seek_flat(t_wob)); - } - } - - - u3_noun - _cqfu_seek(u3_noun van, - u3_noun sut, - u3_noun way, - u3_noun hyp) - { - c3_assert(0); - - if ( u3_nul == hyp ) { - return u3nt - (1, c3y, u3k(sut)); - } - else if ( c3n == u3du(hyp) ) { - return u3m_bail(c3__fail); - } - else { - u3_noun i_hyp = u3h(hyp); - u3_noun t_hyp = u3t(hyp); - u3_noun zar; - u3_noun p_zar, q_zar; - u3_noun yip, syp, ret; - - if ( c3y == u3du(i_hyp) ) { - yip = u3k(i_hyp); - } else { - yip = u3nt(c3n, 0, u3nc(u3_nul, u3k(i_hyp))); - } - - zar = _cqfu_seek(van, sut, way, t_hyp); - u3r_cell(zar, &p_zar, &q_zar); - - if ( c3y == u3h(q_zar) ) { - syp = u3k(u3t(q_zar)); - } else { - u3_noun pq_zar, qq_zar; - u3_noun wip; - - u3r_cell(u3t(q_zar), &pq_zar, &qq_zar); - wip = _seek_flat(qq_zar); - syp = u3qfu_fire(van, sut, wip); - - u3z(wip); - } - - if ( c3n == u3h(yip) ) { - u3_noun p_yip, q_yip, hud; - - if ( c3n == u3r_cell(u3t(yip), &p_yip, &q_yip) ) { - return u3m_bail(c3__fail); - } - hud = u3qfu_fink(van, syp, p_yip, way, q_yip); - { - u3_noun p_hud, q_hud; - - u3r_cell(hud, &p_hud, &q_hud); - - ret = u3nc(u3qc_peg(p_zar, p_hud), - u3k(q_hud)); - u3z(hud); - } - } - else { - u3_noun p_yip = u3t(yip); - - if ( c3n == u3ud(p_yip) ) { - return u3m_bail(c3__fail); - } - else { - ret = u3nt(u3qc_peg(p_zar, p_yip), - c3y, - u3qfu_peek(van, syp, way, p_yip)); - } - } - u3z(yip); - u3z(syp); - u3z(zar); - return ret; - } - } - -/* boilerplate -*/ - u3_noun - u3wfu_seek(u3_noun cor) - { - u3_noun sut, way, hyp, van; - - if ( (c3n == u3r_mean(cor, u3x_sam_2, &way, - u3x_sam_3, &hyp, - u3x_con, &van, - 0)) || - (u3_none == (sut = u3r_at(u3x_sam, van))) ) - { - return u3m_bail(c3__fail); - } else { - return _cqfu_seek(van, sut, way, hyp); - } - } -#if 1 u3_noun u3qfu_seek(u3_noun van, u3_noun sut, @@ -137,24 +20,20 @@ u3k(hyp), 0)); } -#else + u3_noun - u3qfu_seek(u3_noun van, + u3qfu_sick(u3_noun van, u3_noun sut, u3_noun way, u3_noun hyp) { - c3_m fun_m = c3__seek + !!u3r_at(u3qfu_van_vet, van); - u3_noun pro = u3z_find_3(fun_m, sut, way, hyp); + u3_noun von = u3i_molt(u3k(van), u3x_sam, u3k(sut), 0); + u3_noun gat = u3j_hook(von, "sick"); - if ( u3_none != pro ) { - return pro; - } - else { - pro = _cqfu_seek(van, sut, way, hyp); - - return u3z_save_3(fun_m, sut, way, hyp, pro); - } + return u3n_kick_on(u3i_molt(gat, + u3x_sam_2, + u3k(way), + u3x_sam_3, + u3k(hyp), + 0)); } -#endif - From 594944bd26960c9113a4ad96af8c0b112a655cec Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Thu, 7 Jan 2016 17:14:41 -0800 Subject: [PATCH 065/137] Switched ++seek and ++sick. --- jets/f/ut_mint.c | 2 +- jets/f/ut_mull.c | 4 ++-- jets/f/ut_nest.c | 3 ++- jets/f/ut_play.c | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index ed5513d26f..50c19a7515 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -628,7 +628,7 @@ case c3__cnts: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { - u3_noun lar = u3qfu_sick(van, sut, c3__read, p_gen); + u3_noun lar = u3qfu_seek(van, sut, c3__read, p_gen); u3_noun p_lar = u3h(lar); u3_noun q_lar = u3t(lar); u3_noun pq_lar = u3h(q_lar); diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index f08054d2c4..fcc7e797bd 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -570,8 +570,8 @@ case c3__cnts: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { - u3_noun lar = u3qfu_sick(van, sut, c3__read, p_gen); - u3_noun vug = u3qfu_sick(van, dox, c3__read, p_gen); + u3_noun lar = u3qfu_seek(van, sut, c3__read, p_gen); + u3_noun vug = u3qfu_seek(van, dox, c3__read, p_gen); u3_noun p_lar = u3h(lar); u3_noun q_lar = u3t(lar); u3_noun pq_lar = u3h(q_lar); diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index a6ebc47c4d..f4d321ffaf 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -323,12 +323,13 @@ if ( (c3y == tyn) || (c3n == tel) ) { return tyn; } else { +#if 0 u3_noun dun = u3qfu_dunq(van, "need", sut); u3_noun niz = u3qfu_dunq(van, "have", ref); u3t_push(u3nc(c3__mean, dun)); u3t_push(u3nc(c3__mean, niz)); - +#endif return u3m_error("nest-fail"); } } diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index 80daebf224..aad37d5c53 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -334,7 +334,7 @@ case c3__cnts: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { - u3_noun lar = u3qfu_sick(van, sut, c3__read, p_gen); + u3_noun lar = u3qfu_seek(van, sut, c3__read, p_gen); u3_noun q_lar = u3t(lar); u3_noun qq_lar = u3t(q_lar); u3_noun mew = q_gen; From 3721de8478b880ae7ed9017c170664f6b9c1034d Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Fri, 8 Jan 2016 12:22:42 -0800 Subject: [PATCH 066/137] Factor out %cnts for some adjustments. --- jets/f/ut_fire.c | 21 ++++++++++++++++++++- jets/f/ut_mull.c | 22 +--------------------- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/jets/f/ut_fire.c b/jets/f/ut_fire.c index 439186881c..b0aba3e989 100644 --- a/jets/f/ut_fire.c +++ b/jets/f/ut_fire.c @@ -6,6 +6,19 @@ /* logic */ + static u3_noun + _fire_vet(u3_noun van) + { + // u3_noun vet = u3j_hook(u3k(van), "vet"); + u3_noun vet = u3r_at(u3qfu_van_vet, van); + + switch ( vet ) { + case c3n: + case c3y: return vet; + default: return u3m_bail(c3__fail); + } + } + static u3_noun _fire_mull(u3_noun van, u3_noun sut, @@ -18,6 +31,9 @@ u3k(gen)); u3_noun ret; + if ( c3n == _fire_vet(van) ) { + ret = c3y; + } if ( c3y == u3qdi_has(rib, key) ) { ret = c3y; } @@ -27,8 +43,11 @@ u3qfu_van_rib, u3k(rob), 0); - ret = u3qfu_mull(von, sut, c3__noun, dox, gen); + u3_noun mul = u3qfu_mull(von, sut, c3__noun, dox, gen); + ret = c3y; + + u3z(mul); u3z(von); u3z(rob); } diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index fcc7e797bd..d3d662883c 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -9,19 +9,6 @@ static u3_noun _mull_in(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); - static u3_noun - _mull_vet(u3_noun van) - { - // u3_noun vet = u3j_hook(u3k(van), "vet"); - u3_noun vet = u3r_at(u3qfu_van_vet, van); - - switch ( vet ) { - case c3n: - case c3y: return vet; - default: return u3m_bail(c3__fail); - } - } - static u3_noun _mull_core(u3_noun pac, u3_noun con) @@ -698,14 +685,7 @@ u3_noun dox, u3_noun gen) { - if ( c3n == _mull_vet(van) ) { - return c3y; - } else { - u3_noun mul = _mull_in(van, sut, gol, dox, gen); - - u3z(mul); - return c3y; - } + return _mull_in(van, sut, gol, dox, gen); } /* boilerplate From e1619636cab7dd619364b450f16c53942dd63f7f Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Fri, 8 Jan 2016 16:27:41 -0800 Subject: [PATCH 067/137] Run soft code for %cnts in mint, mull, play. --- include/noun/xtract.h | 2 + jets/f/ut_mint.c | 158 ++++++++++++++++++++++++++---------------- jets/f/ut_mull.c | 103 ++++++++++++++++++--------- jets/f/ut_play.c | 56 +++++++++++---- 4 files changed, 213 insertions(+), 106 deletions(-) diff --git a/include/noun/xtract.h b/include/noun/xtract.h index 5832cc047b..fa6244f435 100644 --- a/include/noun/xtract.h +++ b/include/noun/xtract.h @@ -17,6 +17,8 @@ # define u3x_sam_12 52 # define u3x_sam_13 53 # define u3x_sam_7 27 +# define u3x_sam_14 54 +# define u3x_sam_15 55 # define u3x_con 7 // context # define u3x_con_2 14 // context # define u3x_con_3 15 // context diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index 50c19a7515..ba2783339c 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -3,6 +3,8 @@ */ #include "all.h" +#define CNTS + /* logic */ static u3_noun @@ -112,48 +114,6 @@ return axe; } - static u3_noun - _mint_edit(u3_noun van, - u3_noun sut, - u3_noun mew, - u3_noun p_lar, - u3_noun rag, - u3_noun hej) - { - while ( 1 ) { - if ( c3n == u3du(mew) ) { - u3_noun gim = u3qfu_fire(van, sut, rag); - u3_noun fol = u3qf_hike(p_lar, hej); - - u3z(rag); - u3z(hej); - - return u3nc(gim, fol); - } else { - u3_noun i_mew = u3h(mew); - u3_noun t_mew = u3t(mew); - u3_noun pi_mew = u3h(i_mew); - u3_noun qi_mew = u3t(i_mew); - u3_noun zil = u3qfu_mint(van, sut, c3__noun, qi_mew); - u3_noun p_zil = u3h(zil); - u3_noun q_zil = u3t(zil); - u3_noun wip = u3qfu_toss(van, sut, pi_mew, p_zil, rag); - - u3z(rag); - rag = u3k(u3t(wip)); - - hej = u3nc(u3nc(u3k(u3h(wip)), - u3k(q_zil)), - hej); - - u3z(zil); - u3z(wip); - - mew = t_mew; - } - } - } - static u3_noun _mint_brew(u3_noun van, u3_noun sut, @@ -275,6 +235,95 @@ return ret; } +#ifdef CNTS + static u3_noun + _mint_cnts_new(u3_noun van, + u3_noun sut, + u3_noun gol, + u3_noun hyp, + u3_noun rig) + { + u3_noun von = u3i_molt(u3k(van), u3x_sam, u3k(sut), 0); + u3_noun gat = u3j_hook(von, "emin"); + + return u3n_kick_on(u3i_molt(gat, + u3x_sam_2, + u3k(gol), + u3x_sam_6, + u3k(hyp), + u3x_sam_7, + u3k(rig), + 0)); + } +#else + static u3_noun + _mint_edit(u3_noun van, + u3_noun sut, + u3_noun mew, + u3_noun p_lar, + u3_noun rag, + u3_noun hej) + { + while ( 1 ) { + if ( c3n == u3du(mew) ) { + u3_noun gim = u3qfu_fire(van, sut, rag); + u3_noun fol = u3qf_hike(p_lar, hej); + + u3z(rag); + u3z(hej); + + return u3nc(gim, fol); + } else { + u3_noun i_mew = u3h(mew); + u3_noun t_mew = u3t(mew); + u3_noun pi_mew = u3h(i_mew); + u3_noun qi_mew = u3t(i_mew); + u3_noun zil = u3qfu_mint(van, sut, c3__noun, qi_mew); + u3_noun p_zil = u3h(zil); + u3_noun q_zil = u3t(zil); + u3_noun wip = u3qfu_toss(van, sut, pi_mew, p_zil, rag); + + u3z(rag); + rag = u3k(u3t(wip)); + + hej = u3nc(u3nc(u3k(u3h(wip)), + u3k(q_zil)), + hej); + + u3z(zil); + u3z(wip); + + mew = t_mew; + } + } + } + static u3_noun + _mint_cnts_old(u3_noun van, + u3_noun sut, + u3_noun gol, + u3_noun hyp, + u3_noun rig) + { + u3_noun lar = u3qfu_seek(van, sut, c3__read, hyp); + u3_noun p_lar = u3h(lar); + u3_noun q_lar = u3t(lar); + u3_noun pq_lar = u3h(q_lar); + u3_noun qq_lar = u3t(q_lar); + u3_noun mew = rig; + u3_noun yom = _mint_edit(van, sut, mew, p_lar, u3k(qq_lar), u3_nul); + u3_noun p_yom = u3h(yom); + u3_noun q_yom = u3t(yom); + u3_noun ret = u3nc(_mint_nice(van, gol, u3k(p_yom)), + (0 == pq_lar) ? u3k(q_yom) + : u3nt(9, u3k(pq_lar), u3k(q_yom))); + + u3z(yom); + u3z(lar); + + return ret; + } +#endif + # define _mint_used() static u3_noun @@ -287,7 +336,7 @@ u3_noun ret; if ( (c3__void == sut) && - !((c3y == u3du(gen)) && ((c3__zpcb == u3h(gen)) || (c3__dbug == u3h(gen)))) ) + !((c3y == u3du(gen)) && (c3__dbug == u3h(gen))) ) { if ( (c3n == _mint_vet(van)) || ((c3y == u3du(gen)) && @@ -627,25 +676,12 @@ } case c3__cnts: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); - { - u3_noun lar = u3qfu_seek(van, sut, c3__read, p_gen); - u3_noun p_lar = u3h(lar); - u3_noun q_lar = u3t(lar); - u3_noun pq_lar = u3h(q_lar); - u3_noun qq_lar = u3t(q_lar); - u3_noun mew = q_gen; - u3_noun yom = _mint_edit(van, sut, mew, p_lar, u3k(qq_lar), u3_nul); - u3_noun p_yom = u3h(yom); - u3_noun q_yom = u3t(yom); - u3_noun ret = u3nc(_mint_nice(van, gol, u3k(p_yom)), - (0 == pq_lar) ? u3k(q_yom) - : u3nt(9, u3k(pq_lar), u3k(q_yom))); +#ifdef CNTS + return _mint_cnts_new(van, sut, gol, p_gen, q_gen); +#else + return _mint_cnts_old(van, sut, gol, p_gen, q_gen); +#endif - u3z(yom); - u3z(lar); - - return ret; - } case c3__brcn: p_gen = u3t(gen); _mint_used(); { diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index d3d662883c..1ec7262775 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -3,6 +3,7 @@ */ #include "all.h" +#define CNTS /* functions */ @@ -187,6 +188,30 @@ typ); } +#ifdef CNTS + static u3_noun + _mull_cnts_new(u3_noun van, + u3_noun sut, + u3_noun gol, + u3_noun dox, + u3_noun hyp, + u3_noun rig) + { + u3_noun von = u3i_molt(u3k(van), u3x_sam, u3k(sut), 0); + u3_noun gat = u3j_hook(von, "emul"); + + return u3n_kick_on(u3i_molt(gat, + u3x_sam_2, + u3k(gol), + u3x_sam_6, + u3k(dox), + u3x_sam_14, + u3k(hyp), + u3x_sam_15, + u3k(rig), + 0)); + } +#else static u3_noun _mull_edit(u3_noun van, u3_noun sut, @@ -228,6 +253,47 @@ } } + static u3_noun + _mull_cnts_old(u3_noun van, + u3_noun sut, + u3_noun gol, + u3_noun dox, + u3_noun hyp, + u3_noun rig) + { + u3_noun lar = u3qfu_seek(van, sut, c3__read, hyp); + u3_noun vug = u3qfu_seek(van, dox, c3__read, hyp); + u3_noun p_lar = u3h(lar); + u3_noun q_lar = u3t(lar); + u3_noun pq_lar = u3h(q_lar); + u3_noun qq_lar = u3t(q_lar); + u3_noun p_vug = u3h(vug); + u3_noun q_vug = u3t(vug); + u3_noun pq_vug = u3h(q_vug); + u3_noun qq_vug = u3t(q_vug); + + if ( c3a(u3r_sing(p_lar, p_vug), u3r_sing(pq_lar, pq_vug)) ) { + u3m_error("mull-bonk-e"); + } + { + u3_noun mew = rig; + u3_noun yom = _mull_edit + (van, sut, dox, mew, u3k(qq_lar), + u3k(qq_vug)); + u3_noun von = u3i_molt(u3k(van), u3qfu_van_vet, c3n, 0); + u3_noun p_ret = u3qfu_fire(van, sut, u3h(yom)); + u3_noun q_ret = u3qfu_fire(von, sut, u3t(yom)); + + u3z(von); + u3z(yom); + u3z(vug); + u3z(lar); + + return u3nc(_mull_nice(van, gol, p_ret), q_ret); + } + } +#endif + # define _mull_used() static u3_noun @@ -556,38 +622,11 @@ } case c3__cnts: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); - { - u3_noun lar = u3qfu_seek(van, sut, c3__read, p_gen); - u3_noun vug = u3qfu_seek(van, dox, c3__read, p_gen); - u3_noun p_lar = u3h(lar); - u3_noun q_lar = u3t(lar); - u3_noun pq_lar = u3h(q_lar); - u3_noun qq_lar = u3t(q_lar); - u3_noun p_vug = u3h(vug); - u3_noun q_vug = u3t(vug); - u3_noun pq_vug = u3h(q_vug); - u3_noun qq_vug = u3t(q_vug); - - if ( c3a(u3r_sing(p_lar, p_vug), u3r_sing(pq_lar, pq_vug)) ) { - u3m_error("mull-bonk-e"); - } - { - u3_noun mew = q_gen; - u3_noun yom = _mull_edit - (van, sut, dox, mew, u3k(qq_lar), - u3k(qq_vug)); - u3_noun von = u3i_molt(u3k(van), u3qfu_van_vet, c3n, 0); - u3_noun p_ret = u3qfu_fire(van, sut, u3h(yom)); - u3_noun q_ret = u3qfu_fire(von, sut, u3t(yom)); - - u3z(von); - u3z(yom); - u3z(vug); - u3z(lar); - - return u3nc(_mull_nice(van, gol, p_ret), q_ret); - } - } +#ifdef CNTS + return _mull_cnts_new(van, sut, gol, dox, p_gen, q_gen); +#else + return _mull_cnts_old(van, sut, gol, dox, p_gen, q_gen); +#endif case c3__brcn: p_gen = u3t(gen); _mull_used(); { diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index aad37d5c53..08bad4ebbc 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -3,6 +3,7 @@ */ #include "all.h" +#define CNTS /* logic */ @@ -73,6 +74,24 @@ return ret; } +#ifdef CNTS + static u3_noun + _play_cnts_new(u3_noun van, + u3_noun sut, + u3_noun hyp, + u3_noun rig) + { + u3_noun von = u3i_molt(u3k(van), u3x_sam, u3k(sut), 0); + u3_noun gat = u3j_hook(von, "epla"); + + return u3n_kick_on(u3i_molt(gat, + u3x_sam_2, + u3k(hyp), + u3x_sam_3, + u3k(rig), + 0)); + } +#else static u3_noun _play_edit(u3_noun van, u3_noun sut, @@ -99,6 +118,25 @@ } } } + static u3_noun + _play_cnts_old(u3_noun van, + u3_noun sut, + u3_noun hyp, + u3_noun rig) + { + u3_noun lar = u3qfu_seek(van, sut, c3__read, hyp); + u3_noun q_lar = u3t(lar); + u3_noun qq_lar = u3t(q_lar); + u3_noun mew = rig; + u3_noun rag = _play_edit(van, sut, mew, u3k(qq_lar)); + u3_noun ret = u3qfu_fire(van, sut, rag); + + u3z(rag); + u3z(lar); + + return ret; + } +#endif static u3_noun _play_grow(u3_noun van, @@ -333,19 +371,11 @@ } case c3__cnts: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); - { - u3_noun lar = u3qfu_seek(van, sut, c3__read, p_gen); - u3_noun q_lar = u3t(lar); - u3_noun qq_lar = u3t(q_lar); - u3_noun mew = q_gen; - u3_noun rag = _play_edit(van, sut, mew, u3k(qq_lar)); - u3_noun ret = u3qfu_fire(van, sut, rag); - - u3z(rag); - u3z(lar); - - return ret; - } +#ifdef CNTS + return _play_cnts_new(van, sut, p_gen, q_gen); +#else + return _play_cnts_old(van, sut, p_gen, q_gen); +#endif case c3__brcn: p_gen = u3t(gen); _play_used(); { From 7f554bf20ea0914c5d72ce6d1dd0a078f5e4df98 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sat, 9 Jan 2016 16:22:25 -0800 Subject: [PATCH 068/137] Old seek system eradicated. --- Makefile | 1 - include/jets/q.h | 2 - include/jets/w.h | 2 - jets/f/ut_find.c | 372 +++++++++++++++++++++++++++++++++++++++++++++++ jets/f/ut_seek.c | 39 ----- 5 files changed, 372 insertions(+), 44 deletions(-) create mode 100644 jets/f/ut_find.c delete mode 100644 jets/f/ut_seek.c diff --git a/Makefile b/Makefile index 45b6faac2c..bd4fdb2cb7 100644 --- a/Makefile +++ b/Makefile @@ -303,7 +303,6 @@ J_F_OFILES_UT=\ jets/f/ut_play.o \ jets/f/ut_repo.o \ jets/f/ut_rest.o \ - jets/f/ut_seek.o \ jets/f/ut_tack.o \ jets/f/ut_toss.o \ jets/f/ut_wrap.o diff --git a/include/jets/q.h b/include/jets/q.h index eb4cba7e93..86640845eb 100644 --- a/include/jets/q.h +++ b/include/jets/q.h @@ -220,8 +220,6 @@ u3_noun u3qfu_play(u3_noun, 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_seek(u3_noun, u3_noun, u3_noun, u3_noun); - u3_noun u3qfu_sick(u3_noun, u3_noun, u3_noun, u3_noun); u3_noun u3qfu_shep(u3_noun, const c3_c*, u3_noun, u3_noun); u3_noun u3qfu_shew(u3_noun, u3_noun); u3_noun u3qfu_sift(u3_noun, u3_noun, u3_noun); diff --git a/include/jets/w.h b/include/jets/w.h index 1f9b46f127..b682997672 100644 --- a/include/jets/w.h +++ b/include/jets/w.h @@ -234,8 +234,6 @@ u3_noun u3wfu_play(u3_noun); u3_noun u3wfu_repo(u3_noun); u3_noun u3wfu_rest(u3_noun); - u3_noun u3wfu_seek(u3_noun); - u3_noun u3wfu_seep(u3_noun); u3_noun u3wfu_snub(u3_noun); u3_noun u3wfu_toss(u3_noun); u3_noun u3wfu_wrap(u3_noun); diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c new file mode 100644 index 0000000000..8734e68bc7 --- /dev/null +++ b/jets/f/ut_find.c @@ -0,0 +1,372 @@ +/* j/6/find.c +** +*/ +#include "all.h" + + + + static u3_noun + _find_in(u3_noun van, + u3_noun sut, + u3_noun dep, + u3_noun way, + u3_noun cug, + u3_noun gil) + { + u3_noun p_sut, q_sut; + + c3_assert(0); + if ( c3y == u3ud(sut) ) { + return u3nc(u3k(dep), u3_nul); + } + else switch ( u3h(sut) ) { + default: return u3nc(u3k(dep), u3_nul); + + case c3__bull: { + if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { + return u3m_bail(c3__fail); + } + else { + if ( (c3n == u3du(cug)) || + (c3n == u3r_sing(u3t(cug), u3h(p_sut))) ) { + return _find_in(van, q_sut, dep, way, cug, gil); + } + else { + if ( 0 == dep ) { + return u3nc(0, + u3nt(u3_nul, + 1, + u3nt(2, u3k(p_sut), + u3k(q_sut)))); + } else { + return _find_in(van, q_sut, u3qa_dec(dep), way, cug, gil); + } + } + } + } + case c3__cell: { + if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { + return u3m_bail(c3__fail); + } else { + u3_noun taf = _find_in(van, p_sut, dep, way, cug, gil); + u3_noun p_taf = u3h(taf); + u3_noun q_taf = u3t(taf); + u3_noun ret; + + if ( u3_nul == q_taf ) { + u3_noun bov = _find_in(van, q_sut, p_taf, way, cug, gil); + u3_noun p_bov = u3h(bov); + u3_noun q_bov = u3t(bov); + + if ( u3_nul == q_bov ) { + ret = u3k(bov); + } + else { + u3_noun puq_bov, quq_bov; + + u3r_mean(q_bov, 6, &puq_bov, 7, &quq_bov, 0); + ret = u3nq(u3k(p_bov), + u3_nul, + u3qc_peg(3, puq_bov), + u3k(quq_bov)); + } + u3z(bov); + } + else { + u3_noun puq_taf, quq_taf; + + u3r_mean(q_taf, 6, &puq_taf, 7, &quq_taf, 0); + ret = u3nq(u3k(p_taf), + u3_nul, + u3qc_peg(2, puq_taf), + u3k(quq_taf)); + } + u3z(taf); + return ret; + } + } + case c3__core: { + u3_noun pq_sut, qq_sut, rq_sut; + u3_noun prq_sut, qrq_sut; + + if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) || + (c3n == u3r_trel(q_sut, &pq_sut, &qq_sut, &rq_sut)) || + (c3n == u3r_cell(rq_sut, &prq_sut, &qrq_sut)) ) + { + return u3m_bail(c3__fail); + } else { + u3_noun zem = (c3n == u3du(cug)) + ? u3_nul + : u3qf_look(u3t(cug), qrq_sut); + + if ( (u3_nul != zem) && (0 != dep) ) { + u3_noun ped; + + ped = u3qa_dec(dep); + u3z(dep); dep = ped; + + u3z(zem); + zem = u3_nul; + } + + if ( u3_nul == zem ) { + u3_noun taf = _find_in(van, p_sut, dep, way, cug, gil); + u3_noun p_taf = u3h(taf); + u3_noun q_taf = u3t(taf); + + if ( u3_nul == q_taf ) { + u3z(taf); + return u3nc(u3k(dep), u3_nul); + } + else { + u3_noun puq_taf, quq_taf; + u3_noun pro; + + u3r_mean(q_taf, 6, &puq_taf, 7, &quq_taf, 0); + + if ( c3n == u3qfu_park(van, sut, way, puq_taf) ) + { + u3_noun weh = u3qfu_shep(van, "way", 'a', u3k(way)); + u3_noun waz = u3qfu_shep(van, "axis", 'd', u3k(puq_taf)); + + u3t_push(u3nc(c3__mean, weh)); + u3t_push(u3nc(c3__mean, waz)); + return u3m_error("find-park"); + } + else { + pro = u3nq(u3k(p_taf), + u3_nul, + u3qc_peg(3, puq_taf), + u3k(quq_taf)); + + u3z(taf); + return pro; + } + } + } + else { + u3_noun u_zem = u3t(zem); + u3_noun pu_zem = u3h(u_zem); + u3_noun qu_zem = u3t(u_zem); + u3_noun mut; + u3_noun pro; + + mut = u3nt(c3__core, + u3k(p_sut), + u3nt(c3__gold, + u3k(qq_sut), + u3k(rq_sut))); + + pro = u3nc(0, + u3nq(u3_nul, + 1, + 1, + u3nc(u3qc_peg(2, pu_zem), + u3nc(u3nc(mut, u3k(qu_zem)), + u3_nul)))); + u3z(zem); + return pro; + } + } + } + case c3__face: { + if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { + return u3m_bail(c3__fail); + } else { + if ( (c3n == u3du(cug)) || (c3n == u3r_sing(u3t(cug), p_sut)) ) { + return u3nc(u3k(dep), u3_nul); + } else { + if ( 0 == dep ) { + return u3nc(0, u3nq(u3_nul, 1, 0, u3k(q_sut))); + } else { + return u3nc + (u3qa_dec(dep), u3_nul); + } + } + } + } + case c3__cube: { + u3_noun fop = u3qfu_repo(van, sut); + u3_noun pro = _find_in(van, fop, dep, way, cug, gil); + + u3z(fop); + return pro; + } + case c3__fork: { + if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { + return u3m_bail(c3__fail); + } + + if ( (c3y == u3qdi_has(gil, q_sut)) ) { + return _find_in(van, p_sut, dep, way, cug, gil); + } + else if ( (c3y == u3qdi_has(gil, p_sut)) ) { + return _find_in(van, q_sut, dep, way, cug, gil); + } + else { + u3_noun hax = _find_in(van, p_sut, dep, way, cug, gil); + u3_noun yor = _find_in(van, q_sut, dep, way, cug, gil); + u3_noun p_hax = u3h(hax); + u3_noun p_yor = u3h(yor); + u3_noun q_hax = u3t(hax); + u3_noun q_yor = u3t(yor); + u3_noun puq_hax, quq_hax; + u3_noun puq_yor, quq_yor; + u3_noun ret = 0; + + if ( u3_nul != q_hax ) { + u3r_mean(q_hax, 6, &puq_hax, 7, &quq_hax, 0); + } + if ( u3_nul != q_yor ) { + u3r_mean(q_yor, 6, &puq_yor, 7, &quq_yor, 0); + } + + if ( c3y == u3r_sing(hax, yor) ) { + ret = u3k(hax); + } + else { + if ( (c3n == u3r_sing(p_hax, p_yor)) || + ((u3_nul == q_hax) || (u3_nul == q_yor)) || + (c3n == u3r_sing(puq_hax, puq_yor)) || + (c3n == u3r_sing(u3h(quq_hax), u3h(quq_yor))) ) + { + return u3m_error("find-fork"); + } + switch ( u3h(quq_hax) ) { + case 0: { + u3_noun pquq_hax = u3t(quq_hax); + u3_noun pquq_yor = u3t(quq_yor); + + ret = u3nc(u3k(p_hax), + u3nq(u3_nul, + u3k(puq_hax), + 0, + u3qf_fork(pquq_hax, pquq_yor))); + break; + } + case 1: { + u3_noun pquq_hax, qquq_hax, pquq_yor, qquq_yor; + + u3x_cell(u3t(quq_hax), &pquq_hax, &qquq_hax); + u3x_cell(u3t(quq_yor), &pquq_yor, &qquq_yor); + + if ( c3n == u3r_sing(pquq_hax, pquq_yor) ) { + return u3m_error("find-fork"); + } else { + ret = u3nc(u3k(p_hax), + u3nq(u3_nul, + u3k(puq_hax), + 1, + u3nc(u3k(pquq_hax), + u3qb_weld(qquq_hax, qquq_yor)))); + break; + } + } + case 2: { + u3_noun pquq_hax, qquq_hax, pquq_yor, qquq_yor; + u3_noun ppquq_hax, qpquq_hax, rpquq_hax, spquq_hax; + u3_noun ppquq_yor, qpquq_yor, rpquq_yor, spquq_yor; + + u3x_cell(u3t(quq_hax), &pquq_hax, &qquq_hax); + u3x_cell(u3t(quq_yor), &pquq_yor, &qquq_yor); + u3x_qual(pquq_hax, + &ppquq_hax, &qpquq_hax, &rpquq_hax, &spquq_hax); + u3x_qual(pquq_yor, + &ppquq_yor, &qpquq_yor, &rpquq_yor, &spquq_yor); + + if ( (c3n == u3r_sing(ppquq_hax, ppquq_yor)) || + (c3n == u3r_sing(qpquq_hax, qpquq_yor)) || + (c3n == u3r_sing(rpquq_hax, rpquq_yor)) ) + { + return u3m_error("find-fork"); + } + else { + ret = u3nc(u3k(p_hax), + u3nq(u3_nul, + u3k(puq_hax), + 2, + u3nc(u3nq(u3k(ppquq_hax), + u3k(qpquq_hax), + u3k(rpquq_hax), + u3qf_fork(spquq_hax, + spquq_yor)), + u3qf_fork(qquq_hax, qquq_yor)))); + break; + } + } + } + } + u3z(yor); + u3z(hax); + + return ret; + } + } + case c3__hold: p_sut = u3t(sut); + { + if ( (c3y == u3qdi_has(gil, sut)) ) { + return u3nc(u3k(dep), u3_nul); + } + else { + u3_noun zoc = u3qdi_put(gil, sut); + u3_noun fop = u3qfu_repo(van, sut); + u3_noun pro = _find_in(van, fop, dep, way, cug, zoc); + + u3z(fop); + u3z(zoc); + + return pro; + } + } + } + } + + u3_noun + _cqfu_find(u3_noun van, + u3_noun sut, + u3_noun dep, + u3_noun way, + u3_noun cug) + { + return _find_in(van, sut, dep, way, cug, u3_nul); + } + +/* boilerplate +*/ + u3_noun + u3wfu_find(u3_noun cor) + { + u3_noun sut, dep, way, cug, van; + + if ( (c3n == u3r_mean(cor, u3x_sam_2, &dep, + u3x_sam_6, &way, + u3x_sam_7, &cug, + u3x_con, &van, + 0)) || + (u3_none == (sut = u3r_at(u3x_sam, van))) ) + { + return u3m_bail(c3__fail); + } else { + return _cqfu_find(van, sut, dep, way, cug); + } + } + + u3_noun + u3qfu_find(u3_noun van, + u3_noun sut, + u3_noun dep, + u3_noun way, + u3_noun cug) + { + c3_m fun_m = c3__find + !!u3r_at(u3qfu_van_vet, van); + u3_noun pro = u3z_find_4(fun_m, sut, dep, way, cug); + + if ( u3_none != pro ) { + return pro; + } + else { + pro = _cqfu_find(van, sut, dep, way, cug); + + return u3z_save_4(fun_m, sut, dep, way, cug, pro); + } + } diff --git a/jets/f/ut_seek.c b/jets/f/ut_seek.c deleted file mode 100644 index fd2e4f2086..0000000000 --- a/jets/f/ut_seek.c +++ /dev/null @@ -1,39 +0,0 @@ -/* j/6/seek.c -** -*/ -#include "all.h" - - - u3_noun - u3qfu_seek(u3_noun van, - u3_noun sut, - u3_noun way, - u3_noun hyp) - { - u3_noun von = u3i_molt(u3k(van), u3x_sam, u3k(sut), 0); - u3_noun gat = u3j_hook(von, "seek"); - - return u3n_kick_on(u3i_molt(gat, - u3x_sam_2, - u3k(way), - u3x_sam_3, - u3k(hyp), - 0)); - } - - u3_noun - u3qfu_sick(u3_noun van, - u3_noun sut, - u3_noun way, - u3_noun hyp) - { - u3_noun von = u3i_molt(u3k(van), u3x_sam, u3k(sut), 0); - u3_noun gat = u3j_hook(von, "sick"); - - return u3n_kick_on(u3i_molt(gat, - u3x_sam_2, - u3k(way), - u3x_sam_3, - u3k(hyp), - 0)); - } From 05c2ec8a016cce3d7a39093efb439b7eb15049d3 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 10 Jan 2016 12:27:06 -0800 Subject: [PATCH 069/137] Fake wings complete in theory, though %wtts in mint.c still needs work. --- jets/tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jets/tree.c b/jets/tree.c index a0202aba90..6a56bef444 100644 --- a/jets/tree.c +++ b/jets/tree.c @@ -347,7 +347,7 @@ static u3j_harm _mood__hoon_look_a[] = {{".2", u3wf_look}, {}}; static u3j_harm _mood__hoon__ut_burn_a[] = {{".2", u3wfu_burn}, {}}; static u3j_harm _mood__hoon__ut_conk_a[] = {{".2", u3wfu_conk}, {}}; static u3j_harm _mood__hoon__ut_crop_a[] = {{".2", u3wfu_crop}, {}}; -static u3j_harm _mood__hoon__ut_fire_a[] = {{".2", u3wfu_fire}, {}}; +// static u3j_harm _mood__hoon__ut_fire_a[] = {{".2", u3wfu_fire}, {}}; static u3j_harm _mood__hoon__ut_fish_a[] = {{".2", u3wfu_fish}, {}}; static u3j_harm _mood__hoon__ut_fuse_a[] = {{".2", u3wfu_fuse}, {}}; static u3j_harm _mood__hoon__ut_mint_a[] = {{".2", u3wfu_mint}, {}}; @@ -365,7 +365,7 @@ static u3j_core _mood__hoon__ut_d[] = { "burn", _mood__hoon__ut_burn_a }, { "conk", _mood__hoon__ut_conk_a }, { "crop", _mood__hoon__ut_crop_a }, - { "fire", _mood__hoon__ut_fire_a }, + // { "fire", _mood__hoon__ut_fire_a }, { "fish", _mood__hoon__ut_fish_a }, { "fuse", _mood__hoon__ut_fuse_a }, { "mint", _mood__hoon__ut_mint_a }, From 921aef5e2916a369df2492c83e10d8ea6746a311 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 10 Jan 2016 16:27:36 -0800 Subject: [PATCH 070/137] Frog jets installed; still not generating frogs. --- include/c/motes.h | 1 + include/jets/q.h | 1 + include/jets/w.h | 1 + jets/f/fork.c | 28 ++++++++++++++++++++++++++++ jets/f/ut_burn.c | 4 ++++ jets/f/ut_crop.c | 35 +++++++++++++++++++++++++++++++++++ jets/f/ut_fish.c | 28 ++++++++++++++++++++++++++++ jets/f/ut_fuse.c | 16 ++++++++++++++++ jets/f/ut_nest.c | 42 ++++++++++++++++++++++++++++++++++++++++-- jets/f/ut_peek.c | 20 ++++++++++++++++++++ jets/f/ut_wrap.c | 17 +++++++++++++++++ 11 files changed, 191 insertions(+), 2 deletions(-) diff --git a/include/c/motes.h b/include/c/motes.h index 75cff85525..75af4e4aa4 100644 --- a/include/c/motes.h +++ b/include/c/motes.h @@ -407,6 +407,7 @@ # define c3__frez c3_s4('f','r','e','z') # define c3__frit c3_s4('f','r','i','t') # define c3__from c3_s4('f','r','o','m') +# define c3__frog c3_s4('f','r','o','g') # define c3__fron c3_s4('f','r','o','n') # define c3__fry c3_s3('f','r','y') # define c3__fuge c3_s4('f','u','g','e') diff --git a/include/jets/q.h b/include/jets/q.h index 86640845eb..342f5f05ec 100644 --- a/include/jets/q.h +++ b/include/jets/q.h @@ -172,6 +172,7 @@ u3_noun u3qf_flip(u3_noun); u3_noun u3qf_flor(u3_noun, u3_noun); u3_noun u3qf_fork(u3_noun, u3_noun); + u3_noun u3qf_frog(u3_noun); u3_noun u3qf_hike(u3_noun, u3_noun); u3_noun u3qf_look(u3_noun, u3_noun); u3_noun u3qf_slot(u3_atom, u3_noun); diff --git a/include/jets/w.h b/include/jets/w.h index b682997672..ccc2592874 100644 --- a/include/jets/w.h +++ b/include/jets/w.h @@ -201,6 +201,7 @@ u3_noun u3wf_flip(u3_noun); u3_noun u3wf_flor(u3_noun); u3_noun u3wf_fork(u3_noun); + u3_noun u3wf_frog(u3_noun); u3_noun u3wf_hike(u3_noun); u3_noun u3wf_look(u3_noun); diff --git a/jets/f/fork.c b/jets/f/fork.c index 7c6b38b1bc..4bcf9fe6c3 100644 --- a/jets/f/fork.c +++ b/jets/f/fork.c @@ -33,3 +33,31 @@ return u3qf_fork(hoz, bur); } } + + u3_noun + u3qf_frog(u3_noun yed) + { + u3_noun lez = u3_nul; + + while ( u3_nul != yed ) { + u3_noun i_yed = u3h(yed); + + if ( c3__void != i_yed ) { + lez = u3kdi_put(lez, u3k(u3h(yed))); + } + yed = u3t(yed); + } + + if ( u3_nul == lez ) { + return c3__void; + } + else if ( (u3_nul == u3h(u3t(lez))) && (u3_nul == u3t(u3t(lez))) ) { + u3_noun ret = u3k(u3h(lez)); + + u3z(lez); + return ret; + } + else { + return u3nc(c3__frog, u3kdi_tap(lez, u3_nul)); + } + } diff --git a/jets/f/ut_burn.c b/jets/f/ut_burn.c index f85147c9c3..0b8c047db4 100644 --- a/jets/f/ut_burn.c +++ b/jets/f/ut_burn.c @@ -54,6 +54,10 @@ { return _burn_in(van, p_sut, gil); } + case c3__frog: p_sut = u3t(sut); + { + return _burn_in(van, u3h(p_sut), gil); + } case c3__hold: p_sut = u3t(sut); { if ( (c3y == u3qdi_has(gil, sut)) ) { diff --git a/jets/f/ut_crop.c b/jets/f/ut_crop.c index 5393890aea..9d938648df 100644 --- a/jets/f/ut_crop.c +++ b/jets/f/ut_crop.c @@ -34,6 +34,32 @@ } } + static u3_noun + _crop_dext_frog(u3_noun van, u3_noun p_sut, u3_noun ref, u3_noun bix) + { + if ( u3_nul == p_sut ) { + return u3_nul; + } + else { + return u3nc(_crop_dext(van, u3h(p_sut), ref, bix), + _crop_dext_frog(van, u3t(p_sut), ref, bix)); + } + } + static u3_noun + _crop_sint_frog(u3_noun van, u3_noun sut, u3_noun p_ref, u3_noun bix) + { + if ( u3_nul == p_ref ) { + return u3k(sut); + } + else { + u3_noun tuz = _crop_dext(van, sut, u3h(p_ref), bix); + u3_noun zat = _crop_sint_frog(van, tuz, u3t(p_ref), bix); + + u3z(tuz); + return zat; + } + } + static u3_noun _crop_dext(u3_noun van, u3_noun sut, @@ -135,6 +161,11 @@ u3z(dat); return ret; } + case c3__frog: p_sut = u3t(sut); + { + return u3qf_frog(_crop_dext_frog(van, p_sut, ref, bix)); + } + case c3__hold: p_sut = u3t(sut); { u3_noun hud = u3nc(u3k(sut), u3k(ref)); @@ -185,6 +216,10 @@ u3z(hin); return ret; } + case c3__frog: p_ref = u3t(ref); + { + return _crop_sint_frog(van, sut, p_ref, bix); + } case c3__hold: p_ref = u3t(ref); { u3_noun rep = u3qfu_repo(van, ref); diff --git a/jets/f/ut_fish.c b/jets/f/ut_fish.c index e71e927a60..13c9c87771 100644 --- a/jets/f/ut_fish.c +++ b/jets/f/ut_fish.c @@ -6,6 +6,30 @@ /* functions */ + static u3_noun + _fish_in(u3_noun, u3_noun, u3_atom, u3_noun); + + static u3_noun + _fish_frog(u3_noun van, + u3_noun p_sut, + u3_atom axe, + u3_noun vit) + { + if ( u3_nul == p_sut ) { + return u3nc(1, 1); + } + else { + u3_noun hed = _fish_in(van, u3h(p_sut), axe, vit); + u3_noun tal = _fish_frog(van, u3t(p_sut), axe, vit); + u3_noun pro = u3qf_flor(hed, tal); + + u3z(hed); + u3z(tal); + + return pro; + } + } + static u3_noun _fish_in(u3_noun van, u3_noun sut, @@ -91,6 +115,10 @@ return pro; } } + case c3__frog: { + p_sut = u3t(sut); + return _fish_frog(van, p_sut, axe, vit); + } case c3__hold: { p_sut = u3t(sut); { diff --git a/jets/f/ut_fuse.c b/jets/f/ut_fuse.c index 73ac451478..86e0b5bdb7 100644 --- a/jets/f/ut_fuse.c +++ b/jets/f/ut_fuse.c @@ -32,6 +32,18 @@ } } + static u3_noun + _fuse_in_frog(u3_noun van, u3_noun p_sut, u3_noun ref, u3_noun bix) + { + if ( u3_nul == p_sut ) { + return u3_nul; + } + else { + return u3nc(_fuse_in(van, u3h(p_sut), ref, bix), + _fuse_in_frog(van, u3t(p_sut), ref, bix)); + } + } + static u3_noun _fuse_in(u3_noun van, u3_noun sut, @@ -131,6 +143,10 @@ u3z(dat); return ret; } + case c3__frog: p_sut = u3t(sut); + { + return _fuse_in_frog(van, p_sut, ref, bix); + } case c3__hold: p_sut = u3t(sut); { u3_noun hud = u3nc(u3k(sut), u3k(ref)); diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index f4d321ffaf..ec470eca1d 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -278,6 +278,32 @@ _nest_dext(van, q_sut, c3n, ref, seg, reg, gil)); } } + case c3__frog: p_sut = u3t(sut); + { + if ( c3n == u3du(ref) ) switch ( ref ) { + default: return _nest_sint(van, sut, tel, ref, seg, reg, gil); + + case c3__noun: + break; + } + else switch ( u3h(ref) ) { + default: return _nest_sint(van, sut, tel, ref, seg, reg, gil); + + case c3__atom: + case c3__cell: + case c3__core: + break; + } + + while ( u3_nul != p_sut ) { + if ( c3y == _nest_dext(van, u3h(p_sut), c3n, ref, seg, reg, gil) ) { + return c3y; + } else { + p_sut = u3t(p_sut); + } + } + return c3n; + } case c3__hold: p_sut = u3t(sut); { if ( c3y == u3qdi_has(seg, sut) ) { @@ -405,11 +431,23 @@ } case c3__fork: { if ( (c3y == u3r_mean(ref, 6, &p_ref, 7, &q_ref, 0)) ) { - return c3a(_nest_dext(van, sut, c3n, p_ref, seg, reg, gil), - _nest_dext(van, sut, c3n, q_ref, seg, reg, gil)); + return c3a(_nest_dext(van, sut, tel, p_ref, seg, reg, gil), + _nest_dext(van, sut, tel, q_ref, seg, reg, gil)); } else return u3m_bail(c3__fail); } + case c3__frog: { + p_ref = u3t(ref); + + while ( u3_nul != p_ref ) { + if ( c3n == _nest_dext(van, sut, c3n, u3h(p_ref), seg, reg, gil) ) { + return c3n; + } else { + p_ref = u3t(p_ref); + } + } + return c3y; + } case c3__hold: { if ( c3y == u3qdi_has(reg, ref) ) { return c3y; diff --git a/jets/f/ut_peek.c b/jets/f/ut_peek.c index 12f9d725ce..e0cfa5155e 100644 --- a/jets/f/ut_peek.c +++ b/jets/f/ut_peek.c @@ -9,6 +9,21 @@ u3_noun _cqfu_peek(u3_noun, u3_noun, u3_noun, u3_atom); + static u3_noun + _peek_in(u3_noun, u3_noun, u3_noun, u3_atom, u3_noun); + + static u3_noun + _peek_frog(u3_noun van, u3_noun p_sut, u3_noun way, u3_noun axe, u3_noun gil) + { + if ( u3_nul == p_sut ) { + return u3_nul; + } + else { + return u3nc(_peek_in(van, u3h(p_sut), way, axe, gil), + _peek_frog(van, u3t(p_sut), way, axe, gil)); + } + } + static u3_noun _peek_in(u3_noun van, u3_noun sut, @@ -112,6 +127,11 @@ return pro; } } + case c3__frog: { + p_sut = u3t(sut); + + return _peek_frog(van, p_sut, way, axe, gil); + } case c3__hold: { p_sut = u3t(sut); if ( (c3y == u3qdi_has(gil, sut)) ) { diff --git a/jets/f/ut_wrap.c b/jets/f/ut_wrap.c index 8bdeee284a..0a559ee2f8 100644 --- a/jets/f/ut_wrap.c +++ b/jets/f/ut_wrap.c @@ -3,6 +3,19 @@ */ #include "all.h" + static u3_noun _cqfu_wrap(u3_noun, u3_noun, u3_noun); + + static u3_noun + _wrap_frog(u3_noun van, u3_noun p_sut, u3_noun yoz) + { + if ( u3_nul == p_sut ) { + return u3_nul; + } + else { + return u3nc(_cqfu_wrap(van, u3h(p_sut), yoz), + _wrap_frog(van, u3t(p_sut), yoz)); + } + } static u3_noun _cqfu_wrap(u3_noun van, @@ -40,6 +53,10 @@ return u3qf_fork(_cqfu_wrap(van, p_sut, yoz), _cqfu_wrap(van, q_sut, yoz)); } + case c3__frog: p_sut = u3t(sut); + { + return u3qf_frog(_wrap_frog(van, p_sut, yoz)); + } case c3__hold: { u3_noun fop = u3qfu_repo(van, sut); From b86fb544da14508472049d570b6647c15505495f Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 10 Jan 2016 19:10:47 -0800 Subject: [PATCH 071/137] Double solid; about to incrementally refrog. --- include/jets/w.h | 1 + jets/f/fork.c | 28 ++++++++++++++++++++++++++++ jets/f/ut_find.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+) diff --git a/include/jets/w.h b/include/jets/w.h index ccc2592874..f0a1209394 100644 --- a/include/jets/w.h +++ b/include/jets/w.h @@ -201,6 +201,7 @@ u3_noun u3wf_flip(u3_noun); u3_noun u3wf_flor(u3_noun); u3_noun u3wf_fork(u3_noun); + u3_noun u3wf_forq(u3_noun); u3_noun u3wf_frog(u3_noun); u3_noun u3wf_hike(u3_noun); u3_noun u3wf_look(u3_noun); diff --git a/jets/f/fork.c b/jets/f/fork.c index 4bcf9fe6c3..da636681ec 100644 --- a/jets/f/fork.c +++ b/jets/f/fork.c @@ -34,6 +34,34 @@ } } + u3_noun + u3qf_forq(u3_noun hoz, + u3_noun bur) + { + if ( c3y == u3r_sing(hoz, bur) ) { + return u3k(hoz); + } + else if ( c3__void == bur ) { + return u3k(hoz); + } + else if ( c3__void == hoz ) { + return u3k(bur); + } + else return u3nq + (c3__frog, u3k(hoz), u3k(bur), u3_nul); + } + u3_noun + u3wf_forq(u3_noun cor) + { + u3_noun hoz, bur; + + if ( c3n == u3r_mean(cor, u3x_sam_2, &hoz, u3x_sam_3, &bur, 0) ) { + return u3m_bail(c3__fail); + } else { + return u3qf_forq(hoz, bur); + } + } + u3_noun u3qf_frog(u3_noun yed) { diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c index 8734e68bc7..1727523a19 100644 --- a/jets/f/ut_find.c +++ b/jets/f/ut_find.c @@ -3,7 +3,52 @@ */ #include "all.h" + static u3_noun + _find_outer(u3_noun van, + u3_noun sut, + u3_noun dep, + u3_noun way, + u3_noun cug, + u3_noun gil) + { + } +{ + u3_noun p_sut, q_sut, r_sut; + + if ( c3n == u3du(sut) ) switch ( sut ) { + default: return u3m_bail(c3__fail); + + case c3__noun: + { + } + case c3__void: + { + } + } + else switch ( u3h(sut) ) { + default: return u3m_bail(c3__fail); + + case c3__atom: u3x_cell(u3t(sut), &p_sut, &q_sut); + { + } + case c3__cell: u3x_cell(u3t(sut), &p_sut, &q_sut); + { + } + case c3__core: u3x_cell(u3t(sut), &p_sut, &q_sut); + { + } + case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); + { + } + case c3__fork: u3x_cell(u3t(sut), &p_sut, &q_sut); + { + } + case c3__hold: p_sut = u3t(sut); + { + } + } +} static u3_noun _find_in(u3_noun van, From 17e1196eb4a68473f3d8433610a6bf6d056042ec Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 10 Jan 2016 19:56:53 -0800 Subject: [PATCH 072/137] Jets use grof. Now ready to apply froqs piecemeal. --- include/jets/q.h | 2 ++ jets/f/fork.c | 18 ++++++++++++++++++ jets/f/ut_burn.c | 11 +++++++++++ jets/f/ut_crop.c | 26 ++++++++++++++++++++++++++ jets/f/ut_find.c | 5 +++-- jets/f/ut_fish.c | 14 ++++++++++++++ jets/f/ut_fuse.c | 14 ++++++++++++++ jets/f/ut_nest.c | 14 +++++++++++++- jets/f/ut_peek.c | 14 ++++++++++++++ jets/f/ut_wrap.c | 17 ++++++++++++++++- 10 files changed, 131 insertions(+), 4 deletions(-) diff --git a/include/jets/q.h b/include/jets/q.h index 342f5f05ec..2d7dfb8004 100644 --- a/include/jets/q.h +++ b/include/jets/q.h @@ -172,7 +172,9 @@ u3_noun u3qf_flip(u3_noun); u3_noun u3qf_flor(u3_noun, u3_noun); u3_noun u3qf_fork(u3_noun, u3_noun); + u3_noun u3qf_forq(u3_noun, u3_noun); u3_noun u3qf_frog(u3_noun); + u3_noun u3qf_grof(u3_noun); u3_noun u3qf_hike(u3_noun, u3_noun); u3_noun u3qf_look(u3_noun, u3_noun); u3_noun u3qf_slot(u3_atom, u3_noun); diff --git a/jets/f/fork.c b/jets/f/fork.c index da636681ec..596ab7afc9 100644 --- a/jets/f/fork.c +++ b/jets/f/fork.c @@ -62,6 +62,24 @@ } } + u3_noun + u3qf_grof(u3_noun yed) + { + if ( u3_nul == yed ) { + return c3__void; + } + else if ( u3_nul == u3t(yed) ) { + return u3k(u3h(yed)); + } + else { + u3_noun nex = u3qf_grof(u3t(yed)); + u3_noun ret = u3qf_fork(u3h(yed), nex); + + u3z(nex); + return ret; + } + } + u3_noun u3qf_frog(u3_noun yed) { diff --git a/jets/f/ut_burn.c b/jets/f/ut_burn.c index 0b8c047db4..e34f699c86 100644 --- a/jets/f/ut_burn.c +++ b/jets/f/ut_burn.c @@ -54,10 +54,21 @@ { return _burn_in(van, p_sut, gil); } +#if 0 case c3__frog: p_sut = u3t(sut); { return _burn_in(van, u3h(p_sut), gil); } +#else + case c3__frog: p_sut = u3t(sut); + { + u3_noun fag = u3qf_grof(p_sut); + u3_noun ret = _burn_in(van, fag, gil); + + u3z(fag); + return ret; + } +#endif case c3__hold: p_sut = u3t(sut); { if ( (c3y == u3qdi_has(gil, sut)) ) { diff --git a/jets/f/ut_crop.c b/jets/f/ut_crop.c index 9d938648df..6f9eac34c9 100644 --- a/jets/f/ut_crop.c +++ b/jets/f/ut_crop.c @@ -3,6 +3,7 @@ */ #include "all.h" +#undef FROG /* logic */ @@ -34,6 +35,7 @@ } } +#ifdef FROG static u3_noun _crop_dext_frog(u3_noun van, u3_noun p_sut, u3_noun ref, u3_noun bix) { @@ -59,6 +61,7 @@ return zat; } } +#endif static u3_noun _crop_dext(u3_noun van, @@ -161,10 +164,22 @@ u3z(dat); return ret; } + +#ifdef FROG case c3__frog: p_sut = u3t(sut); { return u3qf_frog(_crop_dext_frog(van, p_sut, ref, bix)); } +#else + case c3__frog: p_sut = u3t(sut); + { + u3_noun fag = u3qf_grof(p_sut); + u3_noun ret = _crop_dext(van, fag, ref, bix); + + u3z(fag); + return ret; + } +#endif case c3__hold: p_sut = u3t(sut); { @@ -216,10 +231,21 @@ u3z(hin); return ret; } +#if 0 case c3__frog: p_ref = u3t(ref); { return _crop_sint_frog(van, sut, p_ref, bix); } +#else + case c3__frog: p_ref = u3t(ref); + { + u3_noun fag = u3qf_grof(p_ref); + u3_noun ret = _crop_sint(van, sut, p_ref, bix); + + u3z(fag); + return ret; + } +#endif case c3__hold: p_ref = u3t(ref); { u3_noun rep = u3qfu_repo(van, ref); diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c index 1727523a19..50aeab6a11 100644 --- a/jets/f/ut_find.c +++ b/jets/f/ut_find.c @@ -8,9 +8,10 @@ u3_noun sut, u3_noun dep, u3_noun way, - u3_noun cug, + u3_noun hyp, u3_noun gil) { + } { @@ -55,7 +56,7 @@ u3_noun sut, u3_noun dep, u3_noun way, - u3_noun cug, + u3_noun hyp, u3_noun gil) { u3_noun p_sut, q_sut; diff --git a/jets/f/ut_fish.c b/jets/f/ut_fish.c index 13c9c87771..8089963bfc 100644 --- a/jets/f/ut_fish.c +++ b/jets/f/ut_fish.c @@ -3,12 +3,14 @@ */ #include "all.h" +#undef FROG /* functions */ static u3_noun _fish_in(u3_noun, u3_noun, u3_atom, u3_noun); +#ifdef FROG static u3_noun _fish_frog(u3_noun van, u3_noun p_sut, @@ -29,6 +31,7 @@ return pro; } } +#endif static u3_noun _fish_in(u3_noun van, @@ -115,10 +118,21 @@ return pro; } } +#ifdef FROG case c3__frog: { p_sut = u3t(sut); return _fish_frog(van, p_sut, axe, vit); } +#else + case c3__frog: p_sut = u3t(sut); + { + u3_noun fag = u3qf_grof(p_sut); + u3_noun ret = _fish_in(van, fag, axe, vit); + + u3z(fag); + return ret; + } +#endif case c3__hold: { p_sut = u3t(sut); { diff --git a/jets/f/ut_fuse.c b/jets/f/ut_fuse.c index 86e0b5bdb7..e573eb54dc 100644 --- a/jets/f/ut_fuse.c +++ b/jets/f/ut_fuse.c @@ -3,6 +3,7 @@ */ #include "all.h" +#undef FROG /* logic */ @@ -32,6 +33,7 @@ } } +#ifdef FROG static u3_noun _fuse_in_frog(u3_noun van, u3_noun p_sut, u3_noun ref, u3_noun bix) { @@ -43,6 +45,7 @@ _fuse_in_frog(van, u3t(p_sut), ref, bix)); } } +#endif static u3_noun _fuse_in(u3_noun van, @@ -143,10 +146,21 @@ u3z(dat); return ret; } +#ifdef FROG case c3__frog: p_sut = u3t(sut); { return _fuse_in_frog(van, p_sut, ref, bix); } +#else + case c3__frog: p_sut = u3t(sut); + { + u3_noun fag = u3qf_grof(p_sut); + u3_noun ret = _fuse_in(van, fag, ref, bix); + + u3z(fag); + return ret; + } +#endif case c3__hold: p_sut = u3t(sut); { u3_noun hud = u3nc(u3k(sut), u3k(ref)); diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index ec470eca1d..221e64146b 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -3,6 +3,7 @@ */ #include "all.h" +#undef FROG /* logic */ @@ -278,6 +279,7 @@ _nest_dext(van, q_sut, c3n, ref, seg, reg, gil)); } } +#ifdef FROG case c3__frog: p_sut = u3t(sut); { if ( c3n == u3du(ref) ) switch ( ref ) { @@ -304,6 +306,16 @@ } return c3n; } +#else + case c3__frog: p_sut = u3t(sut); + { + u3_noun fag = u3qf_grof(p_sut); + u3_noun ret = _nest_dext(van, fag, tel, ref, seg, reg, gil); + + u3z(fag); + return ret; + } +#endif case c3__hold: p_sut = u3t(sut); { if ( c3y == u3qdi_has(seg, sut) ) { @@ -349,7 +361,7 @@ if ( (c3y == tyn) || (c3n == tel) ) { return tyn; } else { -#if 0 +#ifdef FROG u3_noun dun = u3qfu_dunq(van, "need", sut); u3_noun niz = u3qfu_dunq(van, "have", ref); diff --git a/jets/f/ut_peek.c b/jets/f/ut_peek.c index e0cfa5155e..92af1a83b4 100644 --- a/jets/f/ut_peek.c +++ b/jets/f/ut_peek.c @@ -3,6 +3,7 @@ */ #include "all.h" +#undef FROG /* logic */ @@ -12,6 +13,7 @@ static u3_noun _peek_in(u3_noun, u3_noun, u3_noun, u3_atom, u3_noun); +#ifdef FROG static u3_noun _peek_frog(u3_noun van, u3_noun p_sut, u3_noun way, u3_noun axe, u3_noun gil) { @@ -23,6 +25,7 @@ _peek_frog(van, u3t(p_sut), way, axe, gil)); } } +#endif static u3_noun _peek_in(u3_noun van, @@ -127,11 +130,22 @@ return pro; } } +#ifdef FROG case c3__frog: { p_sut = u3t(sut); return _peek_frog(van, p_sut, way, axe, gil); } +#else + case c3__frog: p_sut = u3t(sut); + { + u3_noun fag = u3qf_grof(p_sut); + u3_noun ret = _peek_in(van, fag, way, axe, gil); + + u3z(fag); + return ret; + } +#endif case c3__hold: { p_sut = u3t(sut); if ( (c3y == u3qdi_has(gil, sut)) ) { diff --git a/jets/f/ut_wrap.c b/jets/f/ut_wrap.c index 0a559ee2f8..e87aaa58c0 100644 --- a/jets/f/ut_wrap.c +++ b/jets/f/ut_wrap.c @@ -3,8 +3,11 @@ */ #include "all.h" +#undef FROG + static u3_noun _cqfu_wrap(u3_noun, u3_noun, u3_noun); +#ifdef FROG static u3_noun _wrap_frog(u3_noun van, u3_noun p_sut, u3_noun yoz) { @@ -16,6 +19,7 @@ _wrap_frog(van, u3t(p_sut), yoz)); } } +#endif static u3_noun _cqfu_wrap(u3_noun van, @@ -50,13 +54,24 @@ } case c3__fork: u3x_cell(u3t(sut), &p_sut, &q_sut); { - return u3qf_fork(_cqfu_wrap(van, p_sut, yoz), + return u3qf_forq(_cqfu_wrap(van, p_sut, yoz), _cqfu_wrap(van, q_sut, yoz)); } +#ifdef FROG case c3__frog: p_sut = u3t(sut); { return u3qf_frog(_wrap_frog(van, p_sut, yoz)); } +#else + case c3__frog: p_sut = u3t(sut); + { + u3_noun fag = u3qf_grof(p_sut); + u3_noun ret = _cqfu_wrap(van, fag, yoz); + + u3z(fag); + return ret; + } +#endif case c3__hold: { u3_noun fop = u3qfu_repo(van, sut); From baaa74dae177e054a304f79a33e327afec81d32e Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 10 Jan 2016 20:23:32 -0800 Subject: [PATCH 073/137] Tentatively applying forq. --- jets/f/ut_crop.c | 4 ++-- jets/f/ut_nest.c | 11 +++++++++++ jets/f/ut_peek.c | 2 +- jets/f/ut_play.c | 2 +- noun/manage.c | 4 ++-- 5 files changed, 17 insertions(+), 6 deletions(-) diff --git a/jets/f/ut_crop.c b/jets/f/ut_crop.c index 6f9eac34c9..e0a95e68ec 100644 --- a/jets/f/ut_crop.c +++ b/jets/f/ut_crop.c @@ -231,7 +231,7 @@ u3z(hin); return ret; } -#if 0 +#ifdef FROG case c3__frog: p_ref = u3t(ref); { return _crop_sint_frog(van, sut, p_ref, bix); @@ -240,7 +240,7 @@ case c3__frog: p_ref = u3t(ref); { u3_noun fag = u3qf_grof(p_ref); - u3_noun ret = _crop_sint(van, sut, p_ref, bix); + u3_noun ret = _crop_sint(van, sut, fag, bix); u3z(fag); return ret; diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index 221e64146b..24824c8964 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -448,6 +448,7 @@ } else return u3m_bail(c3__fail); } +#ifdef FROG case c3__frog: { p_ref = u3t(ref); @@ -460,6 +461,16 @@ } return c3y; } +#else + case c3__frog: p_ref = u3t(ref); + { + u3_noun fag = u3qf_grof(p_ref); + u3_noun ret = _nest_dext(van, sut, tel, fag, seg, reg, gil); + + u3z(fag); + return ret; + } +#endif case c3__hold: { if ( c3y == u3qdi_has(reg, ref) ) { return c3y; diff --git a/jets/f/ut_peek.c b/jets/f/ut_peek.c index 92af1a83b4..2e5f045d22 100644 --- a/jets/f/ut_peek.c +++ b/jets/f/ut_peek.c @@ -122,7 +122,7 @@ u3_noun hed = _peek_in(van, p_sut, way, axe, gil); u3_noun tal = _peek_in(van, q_sut, way, axe, gil); - pro = u3qf_fork(hed, tal); + pro = u3qf_forq(hed, tal); u3z(hed); u3z(tal); diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index 08bad4ebbc..fc16273cf2 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -234,7 +234,7 @@ : _play_x(van, fex, q_gen); u3_noun doz = (wux == c3__void) ? c3__void : _play_x(van, wux, r_gen); - u3_noun ret = u3qf_fork(dez, doz); + u3_noun ret = u3qf_forq(dez, doz); u3z(dez); u3z(doz); u3z(fex); u3z(wux); diff --git a/noun/manage.c b/noun/manage.c index 6c2673e0d0..dcf8842a7d 100644 --- a/noun/manage.c +++ b/noun/manage.c @@ -604,9 +604,9 @@ u3m_bail(u3_noun how) } switch ( how ) { -#if 0 - case c3__meme: +#if 1 case c3__fail: + case c3__meme: #endif case c3__foul: case c3__oops: From 7447cc418b9e70480381271c2f98618c8b3c2f9b Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 10 Jan 2016 20:43:13 -0800 Subject: [PATCH 074/137] All forks now generated as frog. --- jets/f/ut_crop.c | 2 +- jets/f/ut_mint.c | 2 +- jets/f/ut_mull.c | 4 ++-- jets/f/ut_rest.c | 26 +++++--------------------- 4 files changed, 9 insertions(+), 25 deletions(-) diff --git a/jets/f/ut_crop.c b/jets/f/ut_crop.c index e0a95e68ec..8d672b1c8f 100644 --- a/jets/f/ut_crop.c +++ b/jets/f/ut_crop.c @@ -158,7 +158,7 @@ { u3_noun dis = _crop_dext(van, p_sut, ref, bix); u3_noun dat = _crop_dext(van, q_sut, ref, bix); - u3_noun ret = u3qf_fork(dis, dat); + u3_noun ret = u3qf_forq(dis, dat); u3z(dis); u3z(dat); diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index ba2783339c..5965d288c2 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -437,7 +437,7 @@ u3_noun hiq = _mint_in(van, fex, gol, q_gen); u3_noun ran = _mint_in(van, wux, gol, r_gen); - ret = u3nc(u3qf_fork(u3h(hiq), + ret = u3nc(u3qf_forq(u3h(hiq), u3h(ran)), _mint_cond(duy, u3k(u3t(hiq)), diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index 1ec7262775..16c4dcfbf4 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -413,8 +413,8 @@ } else ran = _mull_in(van, p_wux, gol, q_wux, r_gen); - dis = u3qf_fork(u3h(hiq), u3h(ran)); - dat = u3qf_fork(u3t(hiq), u3t(ran)); + dis = u3qf_forq(u3h(hiq), u3h(ran)); + dat = u3qf_forq(u3t(hiq), u3t(ran)); ret = u3nc(_mull_nice(van, gol, dis), dat); diff --git a/jets/f/ut_rest.c b/jets/f/ut_rest.c index 5df63fd131..5cc24b3c21 100644 --- a/jets/f/ut_rest.c +++ b/jets/f/ut_rest.c @@ -26,26 +26,10 @@ u3_noun gar) { u3_noun gun = u3qdi_gas(u3_nul, gar); - u3_noun nog = u3qdi_tap(gun, u3_nul); + u3_noun yed = u3qdi_tap(gun, u3_nul); u3z(gun); - return nog; - } - - static u3_noun - _rest_in_fork(u3_noun nog, - u3_noun fub) - { - if ( c3n == u3du(nog) ) { - return fub; - } else { - u3_noun buf = _rest_in_fork(u3t(nog), - u3qf_fork(u3h(nog), - fub)); - - u3z(fub); - return buf; - } + return yed; } static u3_noun @@ -53,11 +37,11 @@ u3_noun leg) { u3_noun gar = _rest_in_list(van, leg); - u3_noun nog = _rest_in_stil(van, gar); - u3_noun fub = _rest_in_fork(nog, c3__void); + u3_noun yed = _rest_in_stil(van, gar); + u3_noun fub = u3qf_frog(yed); u3z(gar); - u3z(nog); + u3z(yed); return fub; } From 4f31be75db246436a17b72ac8f8af7b43482bd9f Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 10 Jan 2016 21:08:03 -0800 Subject: [PATCH 075/137] Fully onto frog. Next, delete old %fork. --- include/jets/k.h | 6 +++++- jets/f/fork.c | 9 +++++++++ jets/f/ut_crop.c | 4 ++-- jets/f/ut_fish.c | 2 +- jets/f/ut_fuse.c | 4 ++-- jets/f/ut_nest.c | 2 +- jets/f/ut_peek.c | 4 ++-- jets/f/ut_wrap.c | 4 ++-- 8 files changed, 24 insertions(+), 11 deletions(-) diff --git a/include/jets/k.h b/include/jets/k.h index b7bcaf3a13..28eec1e8ff 100644 --- a/include/jets/k.h +++ b/include/jets/k.h @@ -89,8 +89,12 @@ u3_atom u3ke_jam(u3_noun a); - /* u3ke_trip: atom to tape. + /* u3ke_trip(): atom to tape. */ u3_noun u3ke_trip(u3_noun a); + /* u3kf_frog(): build %fork span. + */ + u3_noun + u3kf_frog(u3_noun yed); diff --git a/jets/f/fork.c b/jets/f/fork.c index 596ab7afc9..8a07ee77d1 100644 --- a/jets/f/fork.c +++ b/jets/f/fork.c @@ -107,3 +107,12 @@ return u3nc(c3__frog, u3kdi_tap(lez, u3_nul)); } } + + u3_noun + u3kf_frog(u3_noun yed) + { + u3_noun ret = u3qf_frog(yed); + + u3z(yed); + return ret; + } diff --git a/jets/f/ut_crop.c b/jets/f/ut_crop.c index 8d672b1c8f..d650e23c56 100644 --- a/jets/f/ut_crop.c +++ b/jets/f/ut_crop.c @@ -3,7 +3,7 @@ */ #include "all.h" -#undef FROG +#define FROG /* logic */ @@ -168,7 +168,7 @@ #ifdef FROG case c3__frog: p_sut = u3t(sut); { - return u3qf_frog(_crop_dext_frog(van, p_sut, ref, bix)); + return u3kf_frog(_crop_dext_frog(van, p_sut, ref, bix)); } #else case c3__frog: p_sut = u3t(sut); diff --git a/jets/f/ut_fish.c b/jets/f/ut_fish.c index 8089963bfc..932d0d6ecf 100644 --- a/jets/f/ut_fish.c +++ b/jets/f/ut_fish.c @@ -3,7 +3,7 @@ */ #include "all.h" -#undef FROG +#define FROG /* functions */ diff --git a/jets/f/ut_fuse.c b/jets/f/ut_fuse.c index e573eb54dc..dc030b9d55 100644 --- a/jets/f/ut_fuse.c +++ b/jets/f/ut_fuse.c @@ -3,7 +3,7 @@ */ #include "all.h" -#undef FROG +#define FROG /* logic */ @@ -149,7 +149,7 @@ #ifdef FROG case c3__frog: p_sut = u3t(sut); { - return _fuse_in_frog(van, p_sut, ref, bix); + return u3kf_frog(_fuse_in_frog(van, p_sut, ref, bix)); } #else case c3__frog: p_sut = u3t(sut); diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index 24824c8964..9dc490d79e 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -3,7 +3,7 @@ */ #include "all.h" -#undef FROG +#define FROG /* logic */ diff --git a/jets/f/ut_peek.c b/jets/f/ut_peek.c index 2e5f045d22..72d8b4fdf0 100644 --- a/jets/f/ut_peek.c +++ b/jets/f/ut_peek.c @@ -3,7 +3,7 @@ */ #include "all.h" -#undef FROG +#define FROG /* logic */ @@ -134,7 +134,7 @@ case c3__frog: { p_sut = u3t(sut); - return _peek_frog(van, p_sut, way, axe, gil); + return u3kf_frog(_peek_frog(van, p_sut, way, axe, gil)); } #else case c3__frog: p_sut = u3t(sut); diff --git a/jets/f/ut_wrap.c b/jets/f/ut_wrap.c index e87aaa58c0..6b4ff756f0 100644 --- a/jets/f/ut_wrap.c +++ b/jets/f/ut_wrap.c @@ -3,7 +3,7 @@ */ #include "all.h" -#undef FROG +#define FROG static u3_noun _cqfu_wrap(u3_noun, u3_noun, u3_noun); @@ -60,7 +60,7 @@ #ifdef FROG case c3__frog: p_sut = u3t(sut); { - return u3qf_frog(_wrap_frog(van, p_sut, yoz)); + return u3kf_frog(_wrap_frog(van, p_sut, yoz)); } #else case c3__frog: p_sut = u3t(sut); From 8cc712259e6ae247bda84fe1150fee34a7a975dc Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 10 Jan 2016 21:39:32 -0800 Subject: [PATCH 076/137] Now completely free of %fork. About to change over %hold. --- jets/f/fork.c | 69 +++++++++--------------------------------------- jets/f/type.c | 2 +- jets/f/ut_burn.c | 15 ----------- jets/f/ut_crop.c | 38 -------------------------- jets/f/ut_fish.c | 15 ----------- jets/f/ut_fuse.c | 25 ------------------ jets/f/ut_mint.c | 5 ++-- jets/f/ut_mull.c | 5 ++-- jets/f/ut_nest.c | 57 +-------------------------------------- jets/f/ut_peek.c | 29 -------------------- jets/f/ut_play.c | 5 ++-- jets/f/ut_repo.c | 5 ++-- jets/f/ut_wrap.c | 20 -------------- jets/tree.c | 4 +-- 14 files changed, 28 insertions(+), 266 deletions(-) diff --git a/jets/f/fork.c b/jets/f/fork.c index 8a07ee77d1..d46c285c2b 100644 --- a/jets/f/fork.c +++ b/jets/f/fork.c @@ -6,34 +6,6 @@ /* functions */ - u3_noun - u3qf_fork(u3_noun hoz, - u3_noun bur) - { - if ( c3y == u3r_sing(hoz, bur) ) { - return u3k(hoz); - } - else if ( c3__void == bur ) { - return u3k(hoz); - } - else if ( c3__void == hoz ) { - return u3k(bur); - } - else return u3nt - (c3__fork, u3k(hoz), u3k(bur)); - } - u3_noun - u3wf_fork(u3_noun cor) - { - u3_noun hoz, bur; - - if ( c3n == u3r_mean(cor, u3x_sam_2, &hoz, u3x_sam_3, &bur, 0) ) { - return u3m_bail(c3__fail); - } else { - return u3qf_fork(hoz, bur); - } - } - u3_noun u3qf_forq(u3_noun hoz, u3_noun bur) @@ -50,35 +22,6 @@ else return u3nq (c3__frog, u3k(hoz), u3k(bur), u3_nul); } - u3_noun - u3wf_forq(u3_noun cor) - { - u3_noun hoz, bur; - - if ( c3n == u3r_mean(cor, u3x_sam_2, &hoz, u3x_sam_3, &bur, 0) ) { - return u3m_bail(c3__fail); - } else { - return u3qf_forq(hoz, bur); - } - } - - u3_noun - u3qf_grof(u3_noun yed) - { - if ( u3_nul == yed ) { - return c3__void; - } - else if ( u3_nul == u3t(yed) ) { - return u3k(u3h(yed)); - } - else { - u3_noun nex = u3qf_grof(u3t(yed)); - u3_noun ret = u3qf_fork(u3h(yed), nex); - - u3z(nex); - return ret; - } - } u3_noun u3qf_frog(u3_noun yed) @@ -108,6 +51,18 @@ } } + u3_noun + u3wf_frog(u3_noun cor) + { + u3_noun yed; + + if ( c3n == u3r_mean(cor, u3x_sam, &yed, 0) ) { + return u3m_bail(c3__fail); + } else { + return u3qf_frog(yed); + } + } + u3_noun u3kf_frog(u3_noun yed) { diff --git a/jets/f/type.c b/jets/f/type.c index 7b6bad35cb..bcfb596165 100644 --- a/jets/f/type.c +++ b/jets/f/type.c @@ -32,7 +32,7 @@ case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); { } - case c3__fork: u3x_cell(u3t(sut), &p_sut, &q_sut); + case c3__frog: p_sut = u3t(sut); { } case c3__hold: p_sut = u3t(sut); diff --git a/jets/f/ut_burn.c b/jets/f/ut_burn.c index e34f699c86..5b2175521b 100644 --- a/jets/f/ut_burn.c +++ b/jets/f/ut_burn.c @@ -50,25 +50,10 @@ { return _burn_in(van, q_sut, gil); } - case c3__fork: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - return _burn_in(van, p_sut, gil); - } -#if 0 case c3__frog: p_sut = u3t(sut); { return _burn_in(van, u3h(p_sut), gil); } -#else - case c3__frog: p_sut = u3t(sut); - { - u3_noun fag = u3qf_grof(p_sut); - u3_noun ret = _burn_in(van, fag, gil); - - u3z(fag); - return ret; - } -#endif case c3__hold: p_sut = u3t(sut); { if ( (c3y == u3qdi_has(gil, sut)) ) { diff --git a/jets/f/ut_crop.c b/jets/f/ut_crop.c index d650e23c56..f9a791406e 100644 --- a/jets/f/ut_crop.c +++ b/jets/f/ut_crop.c @@ -3,8 +3,6 @@ */ #include "all.h" -#define FROG - /* logic */ static u3_noun @@ -35,7 +33,6 @@ } } -#ifdef FROG static u3_noun _crop_dext_frog(u3_noun van, u3_noun p_sut, u3_noun ref, u3_noun bix) { @@ -61,7 +58,6 @@ return zat; } } -#endif static u3_noun _crop_dext(u3_noun van, @@ -154,33 +150,10 @@ u3z(foz); return ret; } - case c3__fork: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - u3_noun dis = _crop_dext(van, p_sut, ref, bix); - u3_noun dat = _crop_dext(van, q_sut, ref, bix); - u3_noun ret = u3qf_forq(dis, dat); - - u3z(dis); - u3z(dat); - return ret; - } - -#ifdef FROG case c3__frog: p_sut = u3t(sut); { return u3kf_frog(_crop_dext_frog(van, p_sut, ref, bix)); } -#else - case c3__frog: p_sut = u3t(sut); - { - u3_noun fag = u3qf_grof(p_sut); - u3_noun ret = _crop_dext(van, fag, ref, bix); - - u3z(fag); - return ret; - } -#endif - case c3__hold: p_sut = u3t(sut); { u3_noun hud = u3nc(u3k(sut), u3k(ref)); @@ -231,21 +204,10 @@ u3z(hin); return ret; } -#ifdef FROG case c3__frog: p_ref = u3t(ref); { return _crop_sint_frog(van, sut, p_ref, bix); } -#else - case c3__frog: p_ref = u3t(ref); - { - u3_noun fag = u3qf_grof(p_ref); - u3_noun ret = _crop_sint(van, sut, fag, bix); - - u3z(fag); - return ret; - } -#endif case c3__hold: p_ref = u3t(ref); { u3_noun rep = u3qfu_repo(van, ref); diff --git a/jets/f/ut_fish.c b/jets/f/ut_fish.c index 932d0d6ecf..fbe67e605f 100644 --- a/jets/f/ut_fish.c +++ b/jets/f/ut_fish.c @@ -3,14 +3,11 @@ */ #include "all.h" -#define FROG - /* functions */ static u3_noun _fish_in(u3_noun, u3_noun, u3_atom, u3_noun); -#ifdef FROG static u3_noun _fish_frog(u3_noun van, u3_noun p_sut, @@ -31,7 +28,6 @@ return pro; } } -#endif static u3_noun _fish_in(u3_noun van, @@ -118,21 +114,10 @@ return pro; } } -#ifdef FROG case c3__frog: { p_sut = u3t(sut); return _fish_frog(van, p_sut, axe, vit); } -#else - case c3__frog: p_sut = u3t(sut); - { - u3_noun fag = u3qf_grof(p_sut); - u3_noun ret = _fish_in(van, fag, axe, vit); - - u3z(fag); - return ret; - } -#endif case c3__hold: { p_sut = u3t(sut); { diff --git a/jets/f/ut_fuse.c b/jets/f/ut_fuse.c index dc030b9d55..3bd8e7777f 100644 --- a/jets/f/ut_fuse.c +++ b/jets/f/ut_fuse.c @@ -3,8 +3,6 @@ */ #include "all.h" -#define FROG - /* logic */ static u3_noun @@ -33,7 +31,6 @@ } } -#ifdef FROG static u3_noun _fuse_in_frog(u3_noun van, u3_noun p_sut, u3_noun ref, u3_noun bix) { @@ -45,7 +42,6 @@ _fuse_in_frog(van, u3t(p_sut), ref, bix)); } } -#endif static u3_noun _fuse_in(u3_noun van, @@ -136,31 +132,10 @@ u3z(vot); return ret; } - case c3__fork: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - u3_noun dis = _fuse_in(van, p_sut, ref, bix); - u3_noun dat = _fuse_in(van, q_sut, ref, bix); - u3_noun ret = u3qf_fork(dis, dat); - - u3z(dis); - u3z(dat); - return ret; - } -#ifdef FROG case c3__frog: p_sut = u3t(sut); { return u3kf_frog(_fuse_in_frog(van, p_sut, ref, bix)); } -#else - case c3__frog: p_sut = u3t(sut); - { - u3_noun fag = u3qf_grof(p_sut); - u3_noun ret = _fuse_in(van, fag, ref, bix); - - u3z(fag); - return ret; - } -#endif case c3__hold: p_sut = u3t(sut); { u3_noun hud = u3nc(u3k(sut), u3k(ref)); diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index 5965d288c2..f5a382cdb0 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -13,9 +13,10 @@ static u3_noun _mint_bean() { - return u3nt(c3__fork, + return u3nq(c3__frog, u3nq(c3__atom, 'f', u3_nul, 0), - u3nq(c3__atom, 'f', u3_nul, 1)); + u3nq(c3__atom, 'f', u3_nul, 1), + u3_nul); } static u3_noun diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index 16c4dcfbf4..0d992e7e92 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -24,9 +24,10 @@ static u3_noun _mull_bean() { - return u3nt(c3__fork, + return u3nq(c3__frog, u3nq(c3__atom, 'f', u3_nul, 0), - u3nq(c3__atom, 'f', u3_nul, 1)); + u3nq(c3__atom, 'f', u3_nul, 1), + u3_nul); } static u3_noun diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index 9dc490d79e..4d40db0035 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -3,8 +3,6 @@ */ #include "all.h" -#define FROG - /* logic */ /* forward @@ -255,31 +253,6 @@ return _nest_dext(van, q_sut, tel, ref, seg, reg, gil); } } - case c3__fork: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { - return u3m_bail(c3__fail); - } - else { - if ( c3n == u3du(ref) ) switch ( ref ) { - default: return _nest_sint(van, sut, tel, ref, seg, reg, gil); - - case c3__noun: - break; - } - else switch ( u3h(ref) ) { - default: return _nest_sint(van, sut, tel, ref, seg, reg, gil); - - case c3__atom: - case c3__cell: - case c3__core: - break; - } - - return c3o(_nest_dext(van, p_sut, c3n, ref, seg, reg, gil), - _nest_dext(van, q_sut, c3n, ref, seg, reg, gil)); - } - } -#ifdef FROG case c3__frog: p_sut = u3t(sut); { if ( c3n == u3du(ref) ) switch ( ref ) { @@ -306,16 +279,6 @@ } return c3n; } -#else - case c3__frog: p_sut = u3t(sut); - { - u3_noun fag = u3qf_grof(p_sut); - u3_noun ret = _nest_dext(van, fag, tel, ref, seg, reg, gil); - - u3z(fag); - return ret; - } -#endif case c3__hold: p_sut = u3t(sut); { if ( c3y == u3qdi_has(seg, sut) ) { @@ -361,7 +324,7 @@ if ( (c3y == tyn) || (c3n == tel) ) { return tyn; } else { -#ifdef FROG +#if 0 u3_noun dun = u3qfu_dunq(van, "need", sut); u3_noun niz = u3qfu_dunq(van, "have", ref); @@ -441,14 +404,6 @@ return _nest_dext(van, sut, tel, q_ref, seg, reg, gil); } } - case c3__fork: { - if ( (c3y == u3r_mean(ref, 6, &p_ref, 7, &q_ref, 0)) ) { - return c3a(_nest_dext(van, sut, tel, p_ref, seg, reg, gil), - _nest_dext(van, sut, tel, q_ref, seg, reg, gil)); - } - else return u3m_bail(c3__fail); - } -#ifdef FROG case c3__frog: { p_ref = u3t(ref); @@ -461,16 +416,6 @@ } return c3y; } -#else - case c3__frog: p_ref = u3t(ref); - { - u3_noun fag = u3qf_grof(p_ref); - u3_noun ret = _nest_dext(van, sut, tel, fag, seg, reg, gil); - - u3z(fag); - return ret; - } -#endif case c3__hold: { if ( c3y == u3qdi_has(reg, ref) ) { return c3y; diff --git a/jets/f/ut_peek.c b/jets/f/ut_peek.c index 72d8b4fdf0..97a9f92664 100644 --- a/jets/f/ut_peek.c +++ b/jets/f/ut_peek.c @@ -3,7 +3,6 @@ */ #include "all.h" -#define FROG /* logic */ @@ -13,7 +12,6 @@ static u3_noun _peek_in(u3_noun, u3_noun, u3_noun, u3_atom, u3_noun); -#ifdef FROG static u3_noun _peek_frog(u3_noun van, u3_noun p_sut, u3_noun way, u3_noun axe, u3_noun gil) { @@ -25,7 +23,6 @@ _peek_frog(van, u3t(p_sut), way, axe, gil)); } } -#endif static u3_noun _peek_in(u3_noun van, @@ -115,37 +112,11 @@ return _peek_in(van, q_sut, way, axe, gil); } } - case c3__fork: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { - return u3m_bail(c3__fail); - } else { - u3_noun hed = _peek_in(van, p_sut, way, axe, gil); - u3_noun tal = _peek_in(van, q_sut, way, axe, gil); - - pro = u3qf_forq(hed, tal); - - u3z(hed); - u3z(tal); - - return pro; - } - } -#ifdef FROG case c3__frog: { p_sut = u3t(sut); return u3kf_frog(_peek_frog(van, p_sut, way, axe, gil)); } -#else - case c3__frog: p_sut = u3t(sut); - { - u3_noun fag = u3qf_grof(p_sut); - u3_noun ret = _peek_in(van, fag, way, axe, gil); - - u3z(fag); - return ret; - } -#endif case c3__hold: { p_sut = u3t(sut); if ( (c3y == u3qdi_has(gil, sut)) ) { diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index fc16273cf2..1577961483 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -15,9 +15,10 @@ static u3_noun _play_bean() { - return u3nt(c3__fork, + return u3nq(c3__frog, u3nq(c3__atom, 'f', u3_nul, 0), - u3nq(c3__atom, 'f', u3_nul, 1)); + u3nq(c3__atom, 'f', u3_nul, 1), + u3_nul); } static u3_noun diff --git a/jets/f/ut_repo.c b/jets/f/ut_repo.c index 32c13b3f4d..488925f996 100644 --- a/jets/f/ut_repo.c +++ b/jets/f/ut_repo.c @@ -16,9 +16,10 @@ default: return u3k(sut); case c3__noun: - return u3nt(c3__fork, + return u3nq(c3__frog, u3nt(c3__atom, u3_blip, u3_nul), - u3nt(c3__cell, c3__noun, c3__noun)); + u3nt(c3__cell, c3__noun, c3__noun), + u3_nul); } else switch ( u3h(sut) ) { default: { diff --git a/jets/f/ut_wrap.c b/jets/f/ut_wrap.c index 6b4ff756f0..cc7c920088 100644 --- a/jets/f/ut_wrap.c +++ b/jets/f/ut_wrap.c @@ -3,11 +3,8 @@ */ #include "all.h" -#define FROG - static u3_noun _cqfu_wrap(u3_noun, u3_noun, u3_noun); -#ifdef FROG static u3_noun _wrap_frog(u3_noun van, u3_noun p_sut, u3_noun yoz) { @@ -19,7 +16,6 @@ _wrap_frog(van, u3t(p_sut), yoz)); } } -#endif static u3_noun _cqfu_wrap(u3_noun van, @@ -52,26 +48,10 @@ u3k(rq_sut))); } } - case c3__fork: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - return u3qf_forq(_cqfu_wrap(van, p_sut, yoz), - _cqfu_wrap(van, q_sut, yoz)); - } -#ifdef FROG case c3__frog: p_sut = u3t(sut); { return u3kf_frog(_wrap_frog(van, p_sut, yoz)); } -#else - case c3__frog: p_sut = u3t(sut); - { - u3_noun fag = u3qf_grof(p_sut); - u3_noun ret = _cqfu_wrap(van, fag, yoz); - - u3z(fag); - return ret; - } -#endif case c3__hold: { u3_noun fop = u3qfu_repo(van, sut); diff --git a/jets/tree.c b/jets/tree.c index 6a56bef444..27aa200b6e 100644 --- a/jets/tree.c +++ b/jets/tree.c @@ -340,7 +340,7 @@ static u3j_harm _mood__hoon_fitz_a[] = {{".2", u3wf_fitz}, {}}; static u3j_harm _mood__hoon_flan_a[] = {{".2", u3wf_flan}, {}}; static u3j_harm _mood__hoon_flip_a[] = {{".2", u3wf_flip}, {}}; static u3j_harm _mood__hoon_flor_a[] = {{".2", u3wf_flor}, {}}; -static u3j_harm _mood__hoon_fork_a[] = {{".2", u3wf_fork}, {}}; +// static u3j_harm _mood__hoon_fork_a[] = {{".2", u3wf_fork}, {}}; static u3j_harm _mood__hoon_hike_a[] = {{".2", u3wf_hike}, {}}; static u3j_harm _mood__hoon_look_a[] = {{".2", u3wf_look}, {}}; @@ -531,7 +531,7 @@ static u3j_core _mood__hoon_d[] = { "flan", _mood__hoon_flan_a }, { "flip", _mood__hoon_flip_a }, { "flor", _mood__hoon_flor_a }, - { "fork", _mood__hoon_fork_a }, +// { "fork", _mood__hoon_fork_a }, { "hike", _mood__hoon_hike_a }, { "look", _mood__hoon_look_a }, From 2cb759d86dc7485a1fb5b76db6691ae8dc8914e7 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 10 Jan 2016 22:37:59 -0800 Subject: [PATCH 077/137] Old %hold now eradicated (as %holt). --- include/c/motes.h | 1 + jets/f/type.c | 3 +++ jets/f/ut_burn.c | 3 ++- jets/f/ut_crop.c | 6 ++++-- jets/f/ut_fire.c | 1 + jets/f/ut_fish.c | 5 +++-- jets/f/ut_fuse.c | 3 ++- jets/f/ut_nest.c | 6 ++++-- jets/f/ut_peek.c | 4 ++-- jets/f/ut_repo.c | 15 ++++++++++++--- jets/f/ut_wrap.c | 1 + 11 files changed, 35 insertions(+), 13 deletions(-) diff --git a/include/c/motes.h b/include/c/motes.h index 75af4e4aa4..72ea48fa6d 100644 --- a/include/c/motes.h +++ b/include/c/motes.h @@ -503,6 +503,7 @@ # define c3__hit c3_s3('h','i','t') # define c3__hmal c3_s4('h','m','a','l') # define c3__hold c3_s4('h','o','l','d') +# define c3__holt c3_s4('h','o','l','t') # define c3__hole c3_s4('h','o','l','e') # define c3__home c3_s4('h','o','m','e') # define c3__homp c3_s4('h','o','m','p') diff --git a/jets/f/type.c b/jets/f/type.c index bcfb596165..31d73df50c 100644 --- a/jets/f/type.c +++ b/jets/f/type.c @@ -38,5 +38,8 @@ case c3__hold: p_sut = u3t(sut); { } + case c3__holt: u3x_cell(u3t(sut), &p_sut, &q_sut); + { + } } } diff --git a/jets/f/ut_burn.c b/jets/f/ut_burn.c index 5b2175521b..d3cbda1886 100644 --- a/jets/f/ut_burn.c +++ b/jets/f/ut_burn.c @@ -54,7 +54,8 @@ { return _burn_in(van, u3h(p_sut), gil); } - case c3__hold: p_sut = u3t(sut); + case c3__hold: + case c3__holt: { if ( (c3y == u3qdi_has(gil, sut)) ) { u3_noun sux = u3qfu_dunq(van, "type", sut); diff --git a/jets/f/ut_crop.c b/jets/f/ut_crop.c index f9a791406e..bc787a3106 100644 --- a/jets/f/ut_crop.c +++ b/jets/f/ut_crop.c @@ -154,7 +154,8 @@ { return u3kf_frog(_crop_dext_frog(van, p_sut, ref, bix)); } - case c3__hold: p_sut = u3t(sut); + case c3__hold: + case c3__holt: { u3_noun hud = u3nc(u3k(sut), u3k(ref)); @@ -208,7 +209,8 @@ { return _crop_sint_frog(van, sut, p_ref, bix); } - case c3__hold: p_ref = u3t(ref); + case c3__hold: + case c3__holt: { u3_noun rep = u3qfu_repo(van, ref); u3_noun ret = _crop_dext(van, sut, rep, bix); diff --git a/jets/f/ut_fire.c b/jets/f/ut_fire.c index b0aba3e989..29816a4847 100644 --- a/jets/f/ut_fire.c +++ b/jets/f/ut_fire.c @@ -147,6 +147,7 @@ { u3_noun vet = u3r_at(u3qfu_van_vet, van); + c3_assert(!"not live"); { if ( (c3y == u3du(hag)) && (u3_nul == u3t(hag)) ) { u3_noun i_hag = u3h(hag); diff --git a/jets/f/ut_fish.c b/jets/f/ut_fish.c index fbe67e605f..4ad94dcddb 100644 --- a/jets/f/ut_fish.c +++ b/jets/f/ut_fish.c @@ -118,7 +118,8 @@ p_sut = u3t(sut); return _fish_frog(van, p_sut, axe, vit); } - case c3__hold: { + case c3__hold: + case c3__holt: { p_sut = u3t(sut); { if ( (c3y == u3qdi_has(vit, sut)) ) { @@ -132,7 +133,7 @@ return u3m_error("fish-loop"); } else { u3_noun zoc = u3qdi_put(vit, sut); - u3_noun fop = u3qfu_rest(van, sut, p_sut); + u3_noun fop = u3qfu_repo(van, sut); u3_noun pro = _fish_in(van, fop, axe, zoc); u3z(fop); diff --git a/jets/f/ut_fuse.c b/jets/f/ut_fuse.c index 3bd8e7777f..2353734d17 100644 --- a/jets/f/ut_fuse.c +++ b/jets/f/ut_fuse.c @@ -136,7 +136,8 @@ { return u3kf_frog(_fuse_in_frog(van, p_sut, ref, bix)); } - case c3__hold: p_sut = u3t(sut); + case c3__hold: + case c3__holt: { u3_noun hud = u3nc(u3k(sut), u3k(ref)); diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index 4d40db0035..cf60f832ac 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -279,7 +279,8 @@ } return c3n; } - case c3__hold: p_sut = u3t(sut); + case c3__hold: + case c3__holt: { if ( c3y == u3qdi_has(seg, sut) ) { return c3n; @@ -416,7 +417,8 @@ } return c3y; } - case c3__hold: { + case c3__hold: + case c3__holt: { if ( c3y == u3qdi_has(reg, ref) ) { return c3y; } diff --git a/jets/f/ut_peek.c b/jets/f/ut_peek.c index 97a9f92664..94f7fc1004 100644 --- a/jets/f/ut_peek.c +++ b/jets/f/ut_peek.c @@ -117,8 +117,8 @@ return u3kf_frog(_peek_frog(van, p_sut, way, axe, gil)); } - case c3__hold: { - p_sut = u3t(sut); + case c3__hold: + case c3__holt: { if ( (c3y == u3qdi_has(gil, sut)) ) { return c3__void; } diff --git a/jets/f/ut_repo.c b/jets/f/ut_repo.c index 488925f996..fe4846be65 100644 --- a/jets/f/ut_repo.c +++ b/jets/f/ut_repo.c @@ -40,9 +40,18 @@ return u3k(q_sut); } } - case c3__hold: { - p_sut = u3t(sut); - return u3qfu_rest(van, sut, p_sut); + case c3__hold: + case c3__holt: { + if ( c3n == u3r_cell(u3t(sut), &p_sut, &q_sut)) { + return u3m_bail(c3__fail); + } else { + u3_noun old = u3nc(u3nc(u3k(p_sut), u3k(q_sut)), u3_nul); + u3_noun ret; + + ret = u3qfu_rest(van, sut, old); + u3z(old); + return ret; + } } } } diff --git a/jets/f/ut_wrap.c b/jets/f/ut_wrap.c index cc7c920088..aefc49eb9e 100644 --- a/jets/f/ut_wrap.c +++ b/jets/f/ut_wrap.c @@ -53,6 +53,7 @@ return u3kf_frog(_wrap_frog(van, p_sut, yoz)); } case c3__hold: + case c3__holt: { u3_noun fop = u3qfu_repo(van, sut); u3_noun pro = _cqfu_wrap(van, fop, yoz); From e529506426997254d6d4554147dccf254b04c3d1 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 10 Jan 2016 23:04:34 -0800 Subject: [PATCH 078/137] New %hold now firmly in place. --- jets/f/ut_burn.c | 1 - jets/f/ut_crop.c | 2 -- jets/f/ut_fish.c | 3 +-- jets/f/ut_fuse.c | 1 - jets/f/ut_nest.c | 4 +--- jets/f/ut_peek.c | 3 +-- jets/f/ut_repo.c | 3 +-- jets/f/ut_wrap.c | 1 - 8 files changed, 4 insertions(+), 14 deletions(-) diff --git a/jets/f/ut_burn.c b/jets/f/ut_burn.c index d3cbda1886..3cf7bda615 100644 --- a/jets/f/ut_burn.c +++ b/jets/f/ut_burn.c @@ -55,7 +55,6 @@ return _burn_in(van, u3h(p_sut), gil); } case c3__hold: - case c3__holt: { if ( (c3y == u3qdi_has(gil, sut)) ) { u3_noun sux = u3qfu_dunq(van, "type", sut); diff --git a/jets/f/ut_crop.c b/jets/f/ut_crop.c index bc787a3106..15eebd5999 100644 --- a/jets/f/ut_crop.c +++ b/jets/f/ut_crop.c @@ -155,7 +155,6 @@ return u3kf_frog(_crop_dext_frog(van, p_sut, ref, bix)); } case c3__hold: - case c3__holt: { u3_noun hud = u3nc(u3k(sut), u3k(ref)); @@ -210,7 +209,6 @@ return _crop_sint_frog(van, sut, p_ref, bix); } case c3__hold: - case c3__holt: { u3_noun rep = u3qfu_repo(van, ref); u3_noun ret = _crop_dext(van, sut, rep, bix); diff --git a/jets/f/ut_fish.c b/jets/f/ut_fish.c index 4ad94dcddb..477e7d1aa2 100644 --- a/jets/f/ut_fish.c +++ b/jets/f/ut_fish.c @@ -118,8 +118,7 @@ p_sut = u3t(sut); return _fish_frog(van, p_sut, axe, vit); } - case c3__hold: - case c3__holt: { + case c3__hold: { p_sut = u3t(sut); { if ( (c3y == u3qdi_has(vit, sut)) ) { diff --git a/jets/f/ut_fuse.c b/jets/f/ut_fuse.c index 2353734d17..df94ed9d8e 100644 --- a/jets/f/ut_fuse.c +++ b/jets/f/ut_fuse.c @@ -137,7 +137,6 @@ return u3kf_frog(_fuse_in_frog(van, p_sut, ref, bix)); } case c3__hold: - case c3__holt: { u3_noun hud = u3nc(u3k(sut), u3k(ref)); diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index cf60f832ac..8cf1010281 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -280,7 +280,6 @@ return c3n; } case c3__hold: - case c3__holt: { if ( c3y == u3qdi_has(seg, sut) ) { return c3n; @@ -417,8 +416,7 @@ } return c3y; } - case c3__hold: - case c3__holt: { + case c3__hold: { if ( c3y == u3qdi_has(reg, ref) ) { return c3y; } diff --git a/jets/f/ut_peek.c b/jets/f/ut_peek.c index 94f7fc1004..0ba9c2bb12 100644 --- a/jets/f/ut_peek.c +++ b/jets/f/ut_peek.c @@ -117,8 +117,7 @@ return u3kf_frog(_peek_frog(van, p_sut, way, axe, gil)); } - case c3__hold: - case c3__holt: { + case c3__hold: { if ( (c3y == u3qdi_has(gil, sut)) ) { return c3__void; } diff --git a/jets/f/ut_repo.c b/jets/f/ut_repo.c index fe4846be65..f10094f676 100644 --- a/jets/f/ut_repo.c +++ b/jets/f/ut_repo.c @@ -40,8 +40,7 @@ return u3k(q_sut); } } - case c3__hold: - case c3__holt: { + case c3__hold: { if ( c3n == u3r_cell(u3t(sut), &p_sut, &q_sut)) { return u3m_bail(c3__fail); } else { diff --git a/jets/f/ut_wrap.c b/jets/f/ut_wrap.c index aefc49eb9e..cc7c920088 100644 --- a/jets/f/ut_wrap.c +++ b/jets/f/ut_wrap.c @@ -53,7 +53,6 @@ return u3kf_frog(_wrap_frog(van, p_sut, yoz)); } case c3__hold: - case c3__holt: { u3_noun fop = u3qfu_repo(van, sut); u3_noun pro = _cqfu_wrap(van, fop, yoz); From d52ec5125f19864fa677b26924d5f34c396e6532 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Mon, 11 Jan 2016 01:16:38 -0800 Subject: [PATCH 079/137] Handling forks trivially; about to make them. --- include/jets/k.h | 10 ++++++++++ jets/f/fork.c | 14 ++++++++++++++ jets/f/ut_burn.c | 8 ++++++++ jets/f/ut_crop.c | 16 ++++++++++++---- jets/f/ut_fish.c | 19 ++++++------------- jets/f/ut_fuse.c | 8 ++++++++ jets/f/ut_mint.c | 7 +++---- jets/f/ut_mull.c | 7 +++---- jets/f/ut_nest.c | 16 ++++++++++++++++ jets/f/ut_peek.c | 8 ++++++++ jets/f/ut_play.c | 7 +++---- jets/f/ut_repo.c | 1 + jets/f/ut_wrap.c | 8 ++++++++ 13 files changed, 100 insertions(+), 29 deletions(-) diff --git a/include/jets/k.h b/include/jets/k.h index 28eec1e8ff..8e176b2a42 100644 --- a/include/jets/k.h +++ b/include/jets/k.h @@ -98,3 +98,13 @@ */ u3_noun u3kf_frog(u3_noun yed); + + /* u3kf_grof(): build %fork span. + */ + u3_noun + u3kf_grof(u3_noun yed); + + /* u3kfu_repo(): + */ + u3_noun + u3kfu_repo(u3_noun, u3_noun); diff --git a/jets/f/fork.c b/jets/f/fork.c index d46c285c2b..bfd32a01b3 100644 --- a/jets/f/fork.c +++ b/jets/f/fork.c @@ -51,6 +51,20 @@ } } + u3_noun + u3qf_grof(u3_noun bez) + { + return u3nc(c3__frog, u3qdi_tap(bez, u3_nul)); + } + u3_noun + u3kf_grof(u3_noun bez) + { + u3_noun ret = u3qf_grof(bez); + + u3z(bez); + return ret; + } + u3_noun u3wf_frog(u3_noun cor) { diff --git a/jets/f/ut_burn.c b/jets/f/ut_burn.c index 3cf7bda615..5b3d46fc42 100644 --- a/jets/f/ut_burn.c +++ b/jets/f/ut_burn.c @@ -50,6 +50,14 @@ { return _burn_in(van, q_sut, gil); } + case c3__fork: p_sut = u3t(sut); + { + u3_noun fop = u3qfu_repo(van, sut); + u3_noun ret = _burn_in(van, fop, gil); + + u3z(fop); + return ret; + } case c3__frog: p_sut = u3t(sut); { return _burn_in(van, u3h(p_sut), gil); diff --git a/jets/f/ut_crop.c b/jets/f/ut_crop.c index 15eebd5999..bf7c96d774 100644 --- a/jets/f/ut_crop.c +++ b/jets/f/ut_crop.c @@ -150,6 +150,14 @@ u3z(foz); return ret; } + case c3__fork: p_sut = u3t(sut); + { + u3_noun fop = u3qfu_repo(van, sut); + u3_noun ret = _crop_dext(van, fop, ref, bix); + + u3z(fop); + return ret; + } case c3__frog: p_sut = u3t(sut); { return u3kf_frog(_crop_dext_frog(van, p_sut, ref, bix)); @@ -196,12 +204,12 @@ { return _crop_dext(van, sut, q_ref, bix); } - case c3__fork: u3x_cell(u3t(ref), &p_ref, &q_ref); + case c3__fork: p_ref = u3t(ref); { - u3_noun hin = _crop_dext(van, sut, p_ref, bix); - u3_noun ret = _crop_dext(van, hin, q_ref, bix); + u3_noun gif = u3qfu_repo(van, ref); + u3_noun ret = _crop_dext(van, sut, gif, bix); - u3z(hin); + u3z(gif); return ret; } case c3__frog: p_ref = u3t(ref); diff --git a/jets/f/ut_fish.c b/jets/f/ut_fish.c index 477e7d1aa2..2c52eb68c1 100644 --- a/jets/f/ut_fish.c +++ b/jets/f/ut_fish.c @@ -99,20 +99,13 @@ return _fish_in(van, q_sut, axe, vit); } } - case c3__fork: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { - return u3m_bail(c3__fail); - } - else { - u3_noun hed = _fish_in(van, p_sut, axe, vit); - u3_noun tal = _fish_in(van, q_sut, axe, vit); - u3_noun pro = u3qf_flor(hed, tal); + case c3__fork: p_sut = u3t(sut); + { + u3_noun fop = u3qfu_repo(van, sut); + u3_noun ret = _fish_in(van, fop, axe, vit); - u3z(hed); - u3z(tal); - - return pro; - } + u3z(fop); + return ret; } case c3__frog: { p_sut = u3t(sut); diff --git a/jets/f/ut_fuse.c b/jets/f/ut_fuse.c index df94ed9d8e..5c019ff9d6 100644 --- a/jets/f/ut_fuse.c +++ b/jets/f/ut_fuse.c @@ -132,6 +132,14 @@ u3z(vot); return ret; } + case c3__fork: p_sut = u3t(sut); + { + u3_noun fop = u3qfu_repo(van, sut); + u3_noun ret = _fuse_in(van, fop, ref, bix); + + u3z(fop); + return ret; + } case c3__frog: p_sut = u3t(sut); { return u3kf_frog(_fuse_in_frog(van, p_sut, ref, bix)); diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index f5a382cdb0..c7f53f9ee3 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -13,10 +13,9 @@ static u3_noun _mint_bean() { - return u3nq(c3__frog, - u3nq(c3__atom, 'f', u3_nul, 0), - u3nq(c3__atom, 'f', u3_nul, 1), - u3_nul); + return u3kf_frog(u3nt(u3nq(c3__atom, 'f', u3_nul, 0), + u3nq(c3__atom, 'f', u3_nul, 1), + u3_nul)); } static u3_noun diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index 0d992e7e92..3c790a3beb 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -24,10 +24,9 @@ static u3_noun _mull_bean() { - return u3nq(c3__frog, - u3nq(c3__atom, 'f', u3_nul, 0), - u3nq(c3__atom, 'f', u3_nul, 1), - u3_nul); + return u3kf_frog(u3nt(u3nq(c3__atom, 'f', u3_nul, 0), + u3nq(c3__atom, 'f', u3_nul, 1), + u3_nul)); } static u3_noun diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index 8cf1010281..c28cb40d54 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -253,6 +253,14 @@ return _nest_dext(van, q_sut, tel, ref, seg, reg, gil); } } + case c3__fork: p_sut = u3t(sut); + { + u3_noun fop = u3qfu_repo(van, sut); + u3_noun ret = _nest_dext(van, fop, tel, ref, seg, reg, gil); + + u3z(fop); + return ret; + } case c3__frog: p_sut = u3t(sut); { if ( c3n == u3du(ref) ) switch ( ref ) { @@ -404,6 +412,14 @@ return _nest_dext(van, sut, tel, q_ref, seg, reg, gil); } } + case c3__fork: p_ref = u3t(ref); + { + u3_noun gif = u3qfu_repo(van, ref); + u3_noun ret = _nest_sint(van, sut, tel, gif, seg, reg, gil); + + u3z(gif); + return ret; + } case c3__frog: { p_ref = u3t(ref); diff --git a/jets/f/ut_peek.c b/jets/f/ut_peek.c index 0ba9c2bb12..b27ac8ea17 100644 --- a/jets/f/ut_peek.c +++ b/jets/f/ut_peek.c @@ -112,6 +112,14 @@ return _peek_in(van, q_sut, way, axe, gil); } } + case c3__fork: p_sut = u3t(sut); + { + u3_noun fop = u3qfu_repo(van, sut); + u3_noun ret = _peek_in(van, fop, way, axe, gil); + + u3z(fop); + return ret; + } case c3__frog: { p_sut = u3t(sut); diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index 1577961483..dd7eb1275f 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -15,10 +15,9 @@ static u3_noun _play_bean() { - return u3nq(c3__frog, - u3nq(c3__atom, 'f', u3_nul, 0), - u3nq(c3__atom, 'f', u3_nul, 1), - u3_nul); + return u3kf_frog(u3nt(u3nq(c3__atom, 'f', u3_nul, 0), + u3nq(c3__atom, 'f', u3_nul, 1), + u3_nul)); } static u3_noun diff --git a/jets/f/ut_repo.c b/jets/f/ut_repo.c index f10094f676..22da21e971 100644 --- a/jets/f/ut_repo.c +++ b/jets/f/ut_repo.c @@ -40,6 +40,7 @@ return u3k(q_sut); } } + case c3__fork: return u3qf_grof(u3t(sut)); case c3__hold: { if ( c3n == u3r_cell(u3t(sut), &p_sut, &q_sut)) { return u3m_bail(c3__fail); diff --git a/jets/f/ut_wrap.c b/jets/f/ut_wrap.c index cc7c920088..83f648670c 100644 --- a/jets/f/ut_wrap.c +++ b/jets/f/ut_wrap.c @@ -48,6 +48,14 @@ u3k(rq_sut))); } } + case c3__fork: p_sut = u3t(sut); + { + u3_noun fop = u3qfu_repo(van, sut); + u3_noun ret = _cqfu_wrap(van, fop, yoz); + + u3z(fop); + return ret; + } case c3__frog: p_sut = u3t(sut); { return u3kf_frog(_wrap_frog(van, p_sut, yoz)); From 7a0ca2baf86aa2ee2e5a164ff1b6087c1d8cb812 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Mon, 11 Jan 2016 01:48:41 -0800 Subject: [PATCH 080/137] Jets are still using frogs; h.h is double-solid %fork. --- jets/f/fork.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jets/f/fork.c b/jets/f/fork.c index bfd32a01b3..4fd9fd0998 100644 --- a/jets/f/fork.c +++ b/jets/f/fork.c @@ -47,7 +47,8 @@ return ret; } else { - return u3nc(c3__frog, u3kdi_tap(lez, u3_nul)); + // return u3nc(c3__frog, u3kdi_tap(lez, u3_nul)); + return u3nc(c3__fork, lez); } } From a9ca366d63475f32e84d79a7f277acf09efb37a8 Mon Sep 17 00:00:00 2001 From: Galen Wolfe-Pauly Date: Mon, 11 Jan 2016 17:46:01 -0800 Subject: [PATCH 081/137] bootstrap template --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 2dd928b884..787ba55640 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,7 @@ GRTAGS /zod/ # dependencies node_modules/ +.sass-cache # OS .DS_Store # ?? From 72d8b26b9575ff6738307aa3f55ab45ea349584f Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Tue, 12 Jan 2016 15:31:02 -0800 Subject: [PATCH 082/137] First tier of jet defrogging. --- jets/f/ut_burn.c | 6 +----- jets/f/ut_crop.c | 12 ++++++------ jets/f/ut_fish.c | 6 +++--- jets/f/ut_fuse.c | 6 +++--- jets/f/ut_peek.c | 6 +++--- jets/f/ut_wrap.c | 6 +++--- 6 files changed, 19 insertions(+), 23 deletions(-) diff --git a/jets/f/ut_burn.c b/jets/f/ut_burn.c index 5b3d46fc42..ad73795ef6 100644 --- a/jets/f/ut_burn.c +++ b/jets/f/ut_burn.c @@ -52,11 +52,7 @@ } case c3__fork: p_sut = u3t(sut); { - u3_noun fop = u3qfu_repo(van, sut); - u3_noun ret = _burn_in(van, fop, gil); - - u3z(fop); - return ret; + return _burn_in(van, u3h(p_sut), gil); } case c3__frog: p_sut = u3t(sut); { diff --git a/jets/f/ut_crop.c b/jets/f/ut_crop.c index bf7c96d774..c38eb2011c 100644 --- a/jets/f/ut_crop.c +++ b/jets/f/ut_crop.c @@ -152,10 +152,10 @@ } case c3__fork: p_sut = u3t(sut); { - u3_noun fop = u3qfu_repo(van, sut); - u3_noun ret = _crop_dext(van, fop, ref, bix); + u3_noun yed = u3qdi_tap(p_sut, u3_nul); + u3_noun ret = u3kf_frog(_crop_dext_frog(van, yed, ref, bix)); - u3z(fop); + u3z(yed); return ret; } case c3__frog: p_sut = u3t(sut); @@ -206,10 +206,10 @@ } case c3__fork: p_ref = u3t(ref); { - u3_noun gif = u3qfu_repo(van, ref); - u3_noun ret = _crop_dext(van, sut, gif, bix); + u3_noun yed = u3qdi_tap(p_ref, u3_nul); + u3_noun ret = _crop_sint_frog(van, sut, yed, bix); - u3z(gif); + u3z(yed); return ret; } case c3__frog: p_ref = u3t(ref); diff --git a/jets/f/ut_fish.c b/jets/f/ut_fish.c index 2c52eb68c1..4756dae750 100644 --- a/jets/f/ut_fish.c +++ b/jets/f/ut_fish.c @@ -101,10 +101,10 @@ } case c3__fork: p_sut = u3t(sut); { - u3_noun fop = u3qfu_repo(van, sut); - u3_noun ret = _fish_in(van, fop, axe, vit); + u3_noun yed = u3qdi_tap(p_sut, u3_nul); + u3_noun ret = _fish_frog(van, yed, axe, vit); - u3z(fop); + u3z(yed); return ret; } case c3__frog: { diff --git a/jets/f/ut_fuse.c b/jets/f/ut_fuse.c index 5c019ff9d6..d5976e513a 100644 --- a/jets/f/ut_fuse.c +++ b/jets/f/ut_fuse.c @@ -134,10 +134,10 @@ } case c3__fork: p_sut = u3t(sut); { - u3_noun fop = u3qfu_repo(van, sut); - u3_noun ret = _fuse_in(van, fop, ref, bix); + u3_noun yed = u3qdi_tap(p_sut, u3_nul); + u3_noun ret = u3kf_frog(_fuse_in_frog(van, yed, ref, bix)); - u3z(fop); + u3z(yed); return ret; } case c3__frog: p_sut = u3t(sut); diff --git a/jets/f/ut_peek.c b/jets/f/ut_peek.c index b27ac8ea17..ccd7151de9 100644 --- a/jets/f/ut_peek.c +++ b/jets/f/ut_peek.c @@ -114,10 +114,10 @@ } case c3__fork: p_sut = u3t(sut); { - u3_noun fop = u3qfu_repo(van, sut); - u3_noun ret = _peek_in(van, fop, way, axe, gil); + u3_noun yed = u3qdi_tap(p_sut, u3_nul); + u3_noun ret = u3kf_frog(_peek_frog(van, yed, way, axe, gil)); - u3z(fop); + u3z(yed); return ret; } case c3__frog: { diff --git a/jets/f/ut_wrap.c b/jets/f/ut_wrap.c index 83f648670c..eda937fdfd 100644 --- a/jets/f/ut_wrap.c +++ b/jets/f/ut_wrap.c @@ -50,10 +50,10 @@ } case c3__fork: p_sut = u3t(sut); { - u3_noun fop = u3qfu_repo(van, sut); - u3_noun ret = _cqfu_wrap(van, fop, yoz); + u3_noun yed = u3qdi_tap(p_sut, u3_nul); + u3_noun ret = u3kf_frog(_wrap_frog(van, yed, yoz)); - u3z(fop); + u3z(yed); return ret; } case c3__frog: p_sut = u3t(sut); From d7c6eda7b4ad68870aaa6312b4556bfc4aec5421 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Tue, 12 Jan 2016 15:47:04 -0800 Subject: [PATCH 083/137] About to remove last traces of %frog. --- jets/f/ut_nest.c | 49 ++++++++++++++++++++++++++++++++++++++++-------- jets/f/ut_repo.c | 1 - 2 files changed, 41 insertions(+), 9 deletions(-) diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index c28cb40d54..48c2e409ef 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -255,11 +255,36 @@ } case c3__fork: p_sut = u3t(sut); { - u3_noun fop = u3qfu_repo(van, sut); - u3_noun ret = _nest_dext(van, fop, tel, ref, seg, reg, gil); + if ( c3n == u3du(ref) ) switch ( ref ) { + default: return _nest_sint(van, sut, tel, ref, seg, reg, gil); - u3z(fop); - return ret; + case c3__noun: + break; + } + else switch ( u3h(ref) ) { + default: return _nest_sint(van, sut, tel, ref, seg, reg, gil); + + case c3__atom: + case c3__cell: + case c3__core: + break; + } + + { + u3_noun dey = u3qdi_tap(p_sut, u3_nul); + u3_noun yed = dey; + + while ( u3_nul != yed ) { + if ( c3y == _nest_dext(van, u3h(yed), c3n, ref, seg, reg, gil) ) { + u3z(dey); + return c3y; + } else { + yed = u3t(yed); + } + } + u3z(dey); + return c3n; + } } case c3__frog: p_sut = u3t(sut); { @@ -414,11 +439,19 @@ } case c3__fork: p_ref = u3t(ref); { - u3_noun gif = u3qfu_repo(van, ref); - u3_noun ret = _nest_sint(van, sut, tel, gif, seg, reg, gil); + u3_noun dey = u3qdi_tap(p_ref, u3_nul); + u3_noun yed = dey; - u3z(gif); - return ret; + while ( u3_nul != yed ) { + if ( c3n == _nest_dext(van, sut, c3n, u3h(yed), seg, reg, gil) ) { + u3z(dey); + return c3n; + } else { + yed = u3t(yed); + } + } + u3z(dey); + return c3y; } case c3__frog: { p_ref = u3t(ref); diff --git a/jets/f/ut_repo.c b/jets/f/ut_repo.c index 22da21e971..f10094f676 100644 --- a/jets/f/ut_repo.c +++ b/jets/f/ut_repo.c @@ -40,7 +40,6 @@ return u3k(q_sut); } } - case c3__fork: return u3qf_grof(u3t(sut)); case c3__hold: { if ( c3n == u3r_cell(u3t(sut), &p_sut, &q_sut)) { return u3m_bail(c3__fail); From 42580bda5c6d27a1965dda3473fc949cfb4e5694 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Wed, 13 Jan 2016 10:06:42 -0800 Subject: [PATCH 084/137] Burn stuff builds, doesn't work... --- include/jets/k.h | 5 -- jets/f/fork.c | 16 +---- jets/f/ut_burn.c | 152 +++++++++++++++++++++++++++++++++++++++++++++++ jets/f/ut_repo.c | 11 ++-- 4 files changed, 159 insertions(+), 25 deletions(-) diff --git a/include/jets/k.h b/include/jets/k.h index 8e176b2a42..99f7bfbd8e 100644 --- a/include/jets/k.h +++ b/include/jets/k.h @@ -99,11 +99,6 @@ u3_noun u3kf_frog(u3_noun yed); - /* u3kf_grof(): build %fork span. - */ - u3_noun - u3kf_grof(u3_noun yed); - /* u3kfu_repo(): */ u3_noun diff --git a/jets/f/fork.c b/jets/f/fork.c index 4fd9fd0998..9f73da3ad0 100644 --- a/jets/f/fork.c +++ b/jets/f/fork.c @@ -19,6 +19,7 @@ else if ( c3__void == hoz ) { return u3k(bur); } + // else return u3kf_frog(u3nt(u3k(hoz), u3k(bur), u3_nul)); else return u3nq (c3__frog, u3k(hoz), u3k(bur), u3_nul); } @@ -47,25 +48,10 @@ return ret; } else { - // return u3nc(c3__frog, u3kdi_tap(lez, u3_nul)); return u3nc(c3__fork, lez); } } - u3_noun - u3qf_grof(u3_noun bez) - { - return u3nc(c3__frog, u3qdi_tap(bez, u3_nul)); - } - u3_noun - u3kf_grof(u3_noun bez) - { - u3_noun ret = u3qf_grof(bez); - - u3z(bez); - return ret; - } - u3_noun u3wf_frog(u3_noun cor) { diff --git a/jets/f/ut_burn.c b/jets/f/ut_burn.c index ad73795ef6..5fcbc06764 100644 --- a/jets/f/ut_burn.c +++ b/jets/f/ut_burn.c @@ -6,6 +6,157 @@ /* logic */ +#if 0 + static u3_noun + _burn_in(u3_noun van, u3_noun sut, u3_noun gil); + + static u3_noun + _burn_frog(u3_noun van, + u3_noun yed, + u3_noun gil) + { + if ( u3_nul == yed ) { + return u3_nul; + } else { + u3_noun dis = _burn_in(van, u3h(yed), gil); + u3_noun mor = _burn_frog(van, u3t(yed), gil); + + if ( u3_nul == dis ) return mor; + if ( u3_nul == mor ) return dis; + { + u3_noun u_dis = u3t(dis); + u3_noun u_mor = u3t(mor); + + if ( u3du(u_dis) == u3du(u_mor) ) { + if ( c3y == u3qc_gor(u_mor, u_dis) ) { + u3z(dis); + return mor; + } else { + u3z(mor); + return dis; + } + } else { + if ( c3y == u3ud(u_dis) ) { + u3z(mor); + return dis; + } + else { + u3z(dis); + return mor; + } + } + } + } + } + + static u3_noun + _burn_in(u3_noun van, + u3_noun sut, + u3_noun gil) + { + u3_noun p_sut, q_sut, pq_sut, qq_sut, rq_sut, prq_sut, qrq_sut; + + if ( c3n == u3du(sut) ) switch ( sut ) { + default: return u3m_bail(c3__fail); + + case c3__noun: return u3nc(u3_nul, 0); + case c3__void: { + return u3_nul; + } + } + else switch ( u3h(sut) ) { + default: return u3m_bail(c3__fail); + + case c3__atom: u3x_cell(u3t(sut), &p_sut, &q_sut); + { + if ( c3y == u3du(q_sut) ) { + return u3nc(u3_nul, u3k(u3t(q_sut))); + } else { + return u3nc(u3_nul, 0); + } + } + case c3__cell: u3x_cell(u3t(sut), &p_sut, &q_sut); + { + u3_noun hed = _burn_in(van, p_sut, gil); + + if ( u3_nul == hed ) { + return u3_nul; + } + else { + u3_noun tal = _burn_in(van, q_sut, gil); + + if ( u3_nul == tal ) { + u3z(hed); + return u3_nul; + } + else return u3nt(u3_nul, hed, tal); + } + } + case c3__core: u3x_cell(u3t(sut), &p_sut, &q_sut); + u3x_trel(q_sut, &pq_sut, &qq_sut, &rq_sut); + u3x_cell(rq_sut, &prq_sut, &qrq_sut); + { + u3_noun pay = _burn_in(van, p_sut, gil); + + if ( u3_nul == pay ) { + return u3_nul; + } + else { + return u3nt(u3_nul, u3k(prq_sut), pay); + } + } + case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); + { + return _burn_in(van, q_sut, gil); + } + case c3__fork: p_sut = u3t(sut); + { + u3_noun yed = u3qdi_tap(p_sut, u3_nul); + u3_noun ret = _burn_frog(van, yed, gil); + + u3z(yed); + return ret; + } + case c3__frog: p_sut = u3t(sut); + { + return _burn_in(van, u3h(p_sut), gil); + } + case c3__hold: + { + if ( (c3y == u3qdi_has(gil, sut)) ) { + return u3_nul; + } + else { + u3_noun zoc = u3qdi_put(gil, sut); + u3_noun fop = u3qfu_repo(van, sut); + u3_noun pro = _burn_in(van, fop, zoc); + + u3z(fop); + u3z(zoc); + + return pro; + } + } + } + } + + u3_noun + _cqfu_burn(u3_noun van, + u3_noun sut) + { + u3_noun unt = _burn_in(van, sut, u3_nul); + + if ( u3_nul == unt ) { + return u3m_error("burn"); + } + else { + u3_noun ret = u3k(u3t(unt)); + + u3z(unt); + return ret; + } + } +#else static u3_noun _burn_in(u3_noun van, u3_noun sut, @@ -86,6 +237,7 @@ { return _burn_in(van, sut, u3_nul); } +#endif u3_noun u3qfu_burn(u3_noun van, diff --git a/jets/f/ut_repo.c b/jets/f/ut_repo.c index f10094f676..f0c926d39e 100644 --- a/jets/f/ut_repo.c +++ b/jets/f/ut_repo.c @@ -15,14 +15,15 @@ if ( c3n == u3du(sut) ) switch ( sut ) { default: return u3k(sut); - case c3__noun: - return u3nq(c3__frog, - u3nt(c3__atom, u3_blip, u3_nul), - u3nt(c3__cell, c3__noun, c3__noun), - u3_nul); + case c3__noun: { + return u3kf_frog(u3nt(u3nt(c3__atom, u3_blip, u3_nul), + u3nt(c3__cell, c3__noun, c3__noun), + u3_nul)); + } } else switch ( u3h(sut) ) { default: { + u3m_p("head", u3h(sut)); return u3m_error("repo-flat"); } From 45e16630a5941d6a8c99dd5f40aec89d325ae360 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Wed, 13 Jan 2016 17:46:01 -0800 Subject: [PATCH 085/137] Stash commit; in middle of debugging nest bug. --- include/jets/q.h | 1 + jets/f/fork.c | 6 ++--- jets/f/ut.c | 13 ++++++++++ jets/f/ut_burn.c | 63 ++++++++++++++++++++++++++++++++---------------- jets/f/ut_nest.c | 35 ++++++++++++++++++++++++--- 5 files changed, 91 insertions(+), 27 deletions(-) diff --git a/include/jets/q.h b/include/jets/q.h index 2d7dfb8004..802f24d81e 100644 --- a/include/jets/q.h +++ b/include/jets/q.h @@ -203,6 +203,7 @@ u3_noun u3qfu_duck(u3_noun, u3_noun); u3_noun u3qfu_dung(u3_noun, u3_noun cap, u3_noun); u3_noun u3qfu_dunq(u3_noun, const c3_c*, u3_noun); + void u3qfu_dump(u3_noun, const c3_c*, u3_noun); u3_noun u3qfu_find(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); u3_noun u3qfu_finc(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); u3_noun u3qfu_fink(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); diff --git a/jets/f/fork.c b/jets/f/fork.c index 9f73da3ad0..cecec68caa 100644 --- a/jets/f/fork.c +++ b/jets/f/fork.c @@ -19,9 +19,9 @@ else if ( c3__void == hoz ) { return u3k(bur); } - // else return u3kf_frog(u3nt(u3k(hoz), u3k(bur), u3_nul)); - else return u3nq - (c3__frog, u3k(hoz), u3k(bur), u3_nul); + else return u3kf_frog(u3nt(u3k(hoz), u3k(bur), u3_nul)); + // else return u3nq + // (c3__frog, u3k(hoz), u3k(bur), u3_nul); } u3_noun diff --git a/jets/f/ut.c b/jets/f/ut.c index 3f650a6673..219cd2bcef 100644 --- a/jets/f/ut.c +++ b/jets/f/ut.c @@ -3,6 +3,9 @@ */ #include "all.h" + extern void + u3_lo_tank(c3_l tab_l, u3_noun tac); + // duck: create a duck core for mean. // @@ -51,6 +54,16 @@ return ret; } + // dump: dump a type. + // + void + u3qfu_dump(u3_noun van, + const c3_c* paz_c, + u3_noun typ) + { + u3_lo_tank(0, u3n_kick_on(u3qfu_dunq(van, paz_c, typ))); + } + // shew: create a show core for mean // u3_noun diff --git a/jets/f/ut_burn.c b/jets/f/ut_burn.c index 5fcbc06764..5d03662e7c 100644 --- a/jets/f/ut_burn.c +++ b/jets/f/ut_burn.c @@ -6,20 +6,19 @@ /* logic */ -#if 0 static u3_noun - _burn_in(u3_noun van, u3_noun sut, u3_noun gil); + _bran_in(u3_noun van, u3_noun sut, u3_noun gil); static u3_noun - _burn_frog(u3_noun van, + _bran_frog(u3_noun van, u3_noun yed, u3_noun gil) { if ( u3_nul == yed ) { return u3_nul; } else { - u3_noun dis = _burn_in(van, u3h(yed), gil); - u3_noun mor = _burn_frog(van, u3t(yed), gil); + u3_noun dis = _bran_in(van, u3h(yed), gil); + u3_noun mor = _bran_frog(van, u3t(yed), gil); if ( u3_nul == dis ) return mor; if ( u3_nul == mor ) return dis; @@ -50,7 +49,7 @@ } static u3_noun - _burn_in(u3_noun van, + _bran_in(u3_noun van, u3_noun sut, u3_noun gil) { @@ -77,49 +76,58 @@ } case c3__cell: u3x_cell(u3t(sut), &p_sut, &q_sut); { - u3_noun hed = _burn_in(van, p_sut, gil); + u3_noun hed = _bran_in(van, p_sut, gil); if ( u3_nul == hed ) { return u3_nul; } else { - u3_noun tal = _burn_in(van, q_sut, gil); + u3_noun tal = _bran_in(van, q_sut, gil); if ( u3_nul == tal ) { u3z(hed); return u3_nul; } - else return u3nt(u3_nul, hed, tal); + else { + u3_noun ret = u3nt(u3_nul, u3k(u3t(hed)), u3k(u3t(tal))); + + u3z(hed); + u3z(tal); + return ret; + } } } case c3__core: u3x_cell(u3t(sut), &p_sut, &q_sut); u3x_trel(q_sut, &pq_sut, &qq_sut, &rq_sut); u3x_cell(rq_sut, &prq_sut, &qrq_sut); { - u3_noun pay = _burn_in(van, p_sut, gil); + u3_noun pay = _bran_in(van, p_sut, gil); if ( u3_nul == pay ) { return u3_nul; } else { - return u3nt(u3_nul, u3k(prq_sut), pay); + u3_noun ret = u3nt(u3_nul, u3k(prq_sut), u3k(u3t(pay))); + + u3z(pay); + return ret; } } case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); { - return _burn_in(van, q_sut, gil); + return _bran_in(van, q_sut, gil); } case c3__fork: p_sut = u3t(sut); { u3_noun yed = u3qdi_tap(p_sut, u3_nul); - u3_noun ret = _burn_frog(van, yed, gil); + u3_noun ret = _bran_frog(van, yed, gil); u3z(yed); return ret; } case c3__frog: p_sut = u3t(sut); { - return _burn_in(van, u3h(p_sut), gil); + return _bran_in(van, u3h(p_sut), gil); } case c3__hold: { @@ -129,7 +137,7 @@ else { u3_noun zoc = u3qdi_put(gil, sut); u3_noun fop = u3qfu_repo(van, sut); - u3_noun pro = _burn_in(van, fop, zoc); + u3_noun pro = _bran_in(van, fop, zoc); u3z(fop); u3z(zoc); @@ -141,13 +149,13 @@ } u3_noun - _cqfu_burn(u3_noun van, + _cqfu_bran(u3_noun van, u3_noun sut) { - u3_noun unt = _burn_in(van, sut, u3_nul); + u3_noun unt = _bran_in(van, sut, u3_nul); if ( u3_nul == unt ) { - return u3m_error("burn"); + return u3m_error("bran"); } else { u3_noun ret = u3k(u3t(unt)); @@ -156,7 +164,8 @@ return ret; } } -#else + +#if 0 static u3_noun _burn_in(u3_noun van, u3_noun sut, @@ -230,14 +239,26 @@ } } } +#endif u3_noun _cqfu_burn(u3_noun van, u3_noun sut) { - return _burn_in(van, sut, u3_nul); - } +#if 1 + return _cqfu_bran(van, sut); +#else + u3_noun old = _burn_in(van, sut, u3_nul); + u3_noun new = _cqfu_bran(van, sut); + + if ( c3n == u3r_sing(old, new) ) { + u3m_p("burn: old", u3r_mug(old)); + u3m_p("burn: new", u3r_mug(new)); + } + u3z(old); + return new; #endif + } u3_noun u3qfu_burn(u3_noun van, diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index 48c2e409ef..d863d664c7 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -253,6 +253,16 @@ return _nest_dext(van, q_sut, tel, ref, seg, reg, gil); } } +#if 1 + case c3__fork: p_sut = u3t(sut); + { + u3_noun fop = u3nc(c3__frog, u3qdi_tap(p_sut, u3_nul)); + u3_noun ret = _nest_dext(van, fop, tel, ref, seg, reg, gil); + + u3z(fop); + return ret; + } +#else case c3__fork: p_sut = u3t(sut); { if ( c3n == u3du(ref) ) switch ( ref ) { @@ -286,6 +296,7 @@ return c3n; } } +#endif case c3__frog: p_sut = u3t(sut); { if ( c3n == u3du(ref) ) switch ( ref ) { @@ -315,6 +326,7 @@ case c3__hold: { if ( c3y == u3qdi_has(seg, sut) ) { + u3qfu_dump(van, "segd", u3nt(c3__cell, u3k(sut), u3k(ref))); return c3n; } else { @@ -355,9 +367,12 @@ u3_noun tyn = _nest_dext_in(van, sut, tel, ref, seg, reg, gil); if ( (c3y == tyn) || (c3n == tel) ) { + if ( c3n == tyn ) { + u3qfu_dump(van, "dext", u3nt(c3__cell, u3k(sut), u3k(ref))); + } return tyn; } else { -#if 0 +#if 1 u3_noun dun = u3qfu_dunq(van, "need", sut); u3_noun niz = u3qfu_dunq(van, "have", ref); @@ -437,6 +452,16 @@ return _nest_dext(van, sut, tel, q_ref, seg, reg, gil); } } +#if 1 + case c3__fork: p_ref = u3t(ref); + { + u3_noun gif = u3nc(c3__frog, u3qdi_tap(p_ref, u3_nul)); + u3_noun ret = _nest_sint(van, sut, tel, gif, seg, reg, gil); + + u3z(gif); + return ret; + } +#else case c3__fork: p_ref = u3t(ref); { u3_noun dey = u3qdi_tap(p_ref, u3_nul); @@ -453,13 +478,17 @@ u3z(dey); return c3y; } +#endif case c3__frog: { p_ref = u3t(ref); while ( u3_nul != p_ref ) { - if ( c3n == _nest_dext(van, sut, c3n, u3h(p_ref), seg, reg, gil) ) { + if ( c3n == _nest_dext(van, sut, tel, u3h(p_ref), seg, reg, gil) ) { + u3qfu_dump(van, "fail", + u3nt(c3__cell, u3k(sut), u3k(u3h(p_ref)))); return c3n; - } else { + } + else { p_ref = u3t(p_ref); } } From 8b4f549e1ae04abe1ea448e4edee729e172a61ea Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Thu, 14 Jan 2016 00:55:12 -0800 Subject: [PATCH 086/137] We appear to be beyond frog; must double check. --- jets/f/fork.c | 2 -- jets/f/ut.c | 8 +++++++- jets/f/ut_nest.c | 15 +++++++-------- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/jets/f/fork.c b/jets/f/fork.c index cecec68caa..8ad8f785c6 100644 --- a/jets/f/fork.c +++ b/jets/f/fork.c @@ -20,8 +20,6 @@ return u3k(bur); } else return u3kf_frog(u3nt(u3k(hoz), u3k(bur), u3_nul)); - // else return u3nq - // (c3__frog, u3k(hoz), u3k(bur), u3_nul); } u3_noun diff --git a/jets/f/ut.c b/jets/f/ut.c index 219cd2bcef..9d5eeece8a 100644 --- a/jets/f/ut.c +++ b/jets/f/ut.c @@ -61,7 +61,13 @@ const c3_c* paz_c, u3_noun typ) { - u3_lo_tank(0, u3n_kick_on(u3qfu_dunq(van, paz_c, typ))); + c3_c* pfix_c = u3r_string((c3y == u3du(typ)) ? u3h(typ) : typ); + c3_c ugh_c[1024]; + + sprintf(ugh_c, "%s: %s: 0x%8x:", + paz_c, pfix_c, u3r_mug(typ)); + + u3_lo_tank(0, u3n_kick_on(u3qfu_dunq(van, ugh_c, typ))); } // shew: create a show core for mean diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index d863d664c7..b1c2d9466d 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -326,7 +326,6 @@ case c3__hold: { if ( c3y == u3qdi_has(seg, sut) ) { - u3qfu_dump(van, "segd", u3nt(c3__cell, u3k(sut), u3k(ref))); return c3n; } else { @@ -367,12 +366,9 @@ u3_noun tyn = _nest_dext_in(van, sut, tel, ref, seg, reg, gil); if ( (c3y == tyn) || (c3n == tel) ) { - if ( c3n == tyn ) { - u3qfu_dump(van, "dext", u3nt(c3__cell, u3k(sut), u3k(ref))); - } return tyn; } else { -#if 1 +#if 0 u3_noun dun = u3qfu_dunq(van, "need", sut); u3_noun niz = u3qfu_dunq(van, "have", ref); @@ -407,7 +403,12 @@ else { pro = _nest_dext_to(van, sut, tel, ref, seg, reg, gil); - return u3z_save_2(fun_m, sut, ref, pro); + if ( ((c3y == pro) && (u3_nul == reg)) || + ((c3n == pro) && (u3_nul == seg)) ) + { + return u3z_save_2(fun_m, sut, ref, pro); + } + else return pro; } } } @@ -484,8 +485,6 @@ while ( u3_nul != p_ref ) { if ( c3n == _nest_dext(van, sut, tel, u3h(p_ref), seg, reg, gil) ) { - u3qfu_dump(van, "fail", - u3nt(c3__cell, u3k(sut), u3k(u3h(p_ref)))); return c3n; } else { From 9ed837f4157b35ed6e99ff127e5105432a779b1b Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Thu, 14 Jan 2016 01:13:01 -0800 Subject: [PATCH 087/137] Slightly more cleansed. --- include/jets/q.h | 2 +- jets/f/ut_nest.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/jets/q.h b/include/jets/q.h index 802f24d81e..2f377e4260 100644 --- a/include/jets/q.h +++ b/include/jets/q.h @@ -171,7 +171,7 @@ u3_noun u3qf_flay(u3_noun); u3_noun u3qf_flip(u3_noun); u3_noun u3qf_flor(u3_noun, u3_noun); - u3_noun u3qf_fork(u3_noun, u3_noun); + u3_noun u3qf_fork(u3_noun); u3_noun u3qf_forq(u3_noun, u3_noun); u3_noun u3qf_frog(u3_noun); u3_noun u3qf_grof(u3_noun); diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index b1c2d9466d..822ec5c512 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -253,7 +253,7 @@ return _nest_dext(van, q_sut, tel, ref, seg, reg, gil); } } -#if 1 +#if 0 case c3__fork: p_sut = u3t(sut); { u3_noun fop = u3nc(c3__frog, u3qdi_tap(p_sut, u3_nul)); @@ -453,7 +453,7 @@ return _nest_dext(van, sut, tel, q_ref, seg, reg, gil); } } -#if 1 +#if 0 case c3__fork: p_ref = u3t(ref); { u3_noun gif = u3nc(c3__frog, u3qdi_tap(p_ref, u3_nul)); From 2e8e02779c3007336597f35822d100339e0765b3 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Thu, 14 Jan 2016 01:41:32 -0800 Subject: [PATCH 088/137] Forgot to change dojo. Also, clean burn. --- jets/f/ut_burn.c | 135 +++++++---------------------------------------- 1 file changed, 20 insertions(+), 115 deletions(-) diff --git a/jets/f/ut_burn.c b/jets/f/ut_burn.c index 5d03662e7c..c98b37d2bc 100644 --- a/jets/f/ut_burn.c +++ b/jets/f/ut_burn.c @@ -7,18 +7,18 @@ /* logic */ static u3_noun - _bran_in(u3_noun van, u3_noun sut, u3_noun gil); + _burn_in(u3_noun van, u3_noun sut, u3_noun gil); static u3_noun - _bran_frog(u3_noun van, + _burn_frog(u3_noun van, u3_noun yed, u3_noun gil) { if ( u3_nul == yed ) { return u3_nul; } else { - u3_noun dis = _bran_in(van, u3h(yed), gil); - u3_noun mor = _bran_frog(van, u3t(yed), gil); + u3_noun dis = _burn_in(van, u3h(yed), gil); + u3_noun mor = _burn_frog(van, u3t(yed), gil); if ( u3_nul == dis ) return mor; if ( u3_nul == mor ) return dis; @@ -49,7 +49,7 @@ } static u3_noun - _bran_in(u3_noun van, + _burn_in(u3_noun van, u3_noun sut, u3_noun gil) { @@ -76,13 +76,13 @@ } case c3__cell: u3x_cell(u3t(sut), &p_sut, &q_sut); { - u3_noun hed = _bran_in(van, p_sut, gil); + u3_noun hed = _burn_in(van, p_sut, gil); if ( u3_nul == hed ) { return u3_nul; } else { - u3_noun tal = _bran_in(van, q_sut, gil); + u3_noun tal = _burn_in(van, q_sut, gil); if ( u3_nul == tal ) { u3z(hed); @@ -101,7 +101,7 @@ u3x_trel(q_sut, &pq_sut, &qq_sut, &rq_sut); u3x_cell(rq_sut, &prq_sut, &qrq_sut); { - u3_noun pay = _bran_in(van, p_sut, gil); + u3_noun pay = _burn_in(van, p_sut, gil); if ( u3_nul == pay ) { return u3_nul; @@ -115,117 +115,25 @@ } case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); { - return _bran_in(van, q_sut, gil); + return _burn_in(van, q_sut, gil); } case c3__fork: p_sut = u3t(sut); { u3_noun yed = u3qdi_tap(p_sut, u3_nul); - u3_noun ret = _bran_frog(van, yed, gil); + u3_noun ret = _burn_frog(van, yed, gil); u3z(yed); return ret; } case c3__frog: p_sut = u3t(sut); { - return _bran_in(van, u3h(p_sut), gil); + return _burn_in(van, u3h(p_sut), gil); } case c3__hold: { if ( (c3y == u3qdi_has(gil, sut)) ) { return u3_nul; } - else { - u3_noun zoc = u3qdi_put(gil, sut); - u3_noun fop = u3qfu_repo(van, sut); - u3_noun pro = _bran_in(van, fop, zoc); - - u3z(fop); - u3z(zoc); - - return pro; - } - } - } - } - - u3_noun - _cqfu_bran(u3_noun van, - u3_noun sut) - { - u3_noun unt = _bran_in(van, sut, u3_nul); - - if ( u3_nul == unt ) { - return u3m_error("bran"); - } - else { - u3_noun ret = u3k(u3t(unt)); - - u3z(unt); - return ret; - } - } - -#if 0 - static u3_noun - _burn_in(u3_noun van, - u3_noun sut, - u3_noun gil) - { - u3_noun p_sut, q_sut, pq_sut, qq_sut, rq_sut, prq_sut, qrq_sut; - - if ( c3n == u3du(sut) ) switch ( sut ) { - default: return u3m_bail(c3__fail); - - case c3__noun: return 0; - case c3__void: { - return u3m_error("burn-void"); - } - } - else switch ( u3h(sut) ) { - default: return u3m_bail(c3__fail); - - case c3__atom: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - if ( c3y == u3du(q_sut) ) { - return u3k(u3t(q_sut)); - } else { - return 0; - } - } - case c3__cell: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - return u3nc - (_burn_in(van, p_sut, gil), - _burn_in(van, q_sut, gil)); - } - case c3__core: u3x_cell(u3t(sut), &p_sut, &q_sut); - u3x_trel(q_sut, &pq_sut, &qq_sut, &rq_sut); - u3x_cell(rq_sut, &prq_sut, &qrq_sut); - { - return u3nc - (u3k(prq_sut), - _burn_in(van, p_sut, gil)); - } - case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - return _burn_in(van, q_sut, gil); - } - case c3__fork: p_sut = u3t(sut); - { - return _burn_in(van, u3h(p_sut), gil); - } - case c3__frog: p_sut = u3t(sut); - { - return _burn_in(van, u3h(p_sut), gil); - } - case c3__hold: - { - if ( (c3y == u3qdi_has(gil, sut)) ) { - u3_noun sux = u3qfu_dunq(van, "type", sut); - - u3t_push(u3nc(c3__mean, sux)); - return u3m_error("burn-loop"); - } else { u3_noun zoc = u3qdi_put(gil, sut); u3_noun fop = u3qfu_repo(van, sut); @@ -239,25 +147,22 @@ } } } -#endif u3_noun _cqfu_burn(u3_noun van, u3_noun sut) { -#if 1 - return _cqfu_bran(van, sut); -#else - u3_noun old = _burn_in(van, sut, u3_nul); - u3_noun new = _cqfu_bran(van, sut); + u3_noun unt = _burn_in(van, sut, u3_nul); - if ( c3n == u3r_sing(old, new) ) { - u3m_p("burn: old", u3r_mug(old)); - u3m_p("burn: new", u3r_mug(new)); + if ( u3_nul == unt ) { + return u3m_error("burn"); + } + else { + u3_noun ret = u3k(u3t(unt)); + + u3z(unt); + return ret; } - u3z(old); - return new; -#endif } u3_noun From 23273b4d12a655072fee9bba9384fe2db2f9ae0e Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Thu, 14 Jan 2016 01:52:50 -0800 Subject: [PATCH 089/137] Now entirely frog-free. --- include/jets/k.h | 4 ++-- include/jets/q.h | 3 +-- include/jets/w.h | 3 +-- jets/f/fork.c | 12 +++++----- jets/f/type.c | 5 +--- jets/f/ut_burn.c | 10 +++----- jets/f/ut_crop.c | 20 +++++----------- jets/f/ut_fish.c | 10 +++----- jets/f/ut_fuse.c | 10 +++----- jets/f/ut_mint.c | 2 +- jets/f/ut_mull.c | 2 +- jets/f/ut_nest.c | 61 ------------------------------------------------ jets/f/ut_peek.c | 11 +++------ jets/f/ut_play.c | 2 +- jets/f/ut_repo.c | 2 +- jets/f/ut_rest.c | 2 +- jets/f/ut_wrap.c | 10 +++----- jets/tree.c | 4 ++-- 18 files changed, 39 insertions(+), 134 deletions(-) diff --git a/include/jets/k.h b/include/jets/k.h index 99f7bfbd8e..7eaa8583fe 100644 --- a/include/jets/k.h +++ b/include/jets/k.h @@ -94,10 +94,10 @@ u3_noun u3ke_trip(u3_noun a); - /* u3kf_frog(): build %fork span. + /* u3kf_fork(): build %fork span. */ u3_noun - u3kf_frog(u3_noun yed); + u3kf_fork(u3_noun yed); /* u3kfu_repo(): */ diff --git a/include/jets/q.h b/include/jets/q.h index 2f377e4260..5cf0537a50 100644 --- a/include/jets/q.h +++ b/include/jets/q.h @@ -171,9 +171,8 @@ u3_noun u3qf_flay(u3_noun); u3_noun u3qf_flip(u3_noun); u3_noun u3qf_flor(u3_noun, u3_noun); - u3_noun u3qf_fork(u3_noun); u3_noun u3qf_forq(u3_noun, u3_noun); - u3_noun u3qf_frog(u3_noun); + u3_noun u3qf_fork(u3_noun); u3_noun u3qf_grof(u3_noun); u3_noun u3qf_hike(u3_noun, u3_noun); u3_noun u3qf_look(u3_noun, u3_noun); diff --git a/include/jets/w.h b/include/jets/w.h index f0a1209394..f968c9086a 100644 --- a/include/jets/w.h +++ b/include/jets/w.h @@ -200,9 +200,8 @@ u3_noun u3wf_flay(u3_noun); u3_noun u3wf_flip(u3_noun); u3_noun u3wf_flor(u3_noun); - u3_noun u3wf_fork(u3_noun); u3_noun u3wf_forq(u3_noun); - u3_noun u3wf_frog(u3_noun); + u3_noun u3wf_fork(u3_noun); u3_noun u3wf_hike(u3_noun); u3_noun u3wf_look(u3_noun); diff --git a/jets/f/fork.c b/jets/f/fork.c index 8ad8f785c6..ff75c35343 100644 --- a/jets/f/fork.c +++ b/jets/f/fork.c @@ -19,11 +19,11 @@ else if ( c3__void == hoz ) { return u3k(bur); } - else return u3kf_frog(u3nt(u3k(hoz), u3k(bur), u3_nul)); + else return u3kf_fork(u3nt(u3k(hoz), u3k(bur), u3_nul)); } u3_noun - u3qf_frog(u3_noun yed) + u3qf_fork(u3_noun yed) { u3_noun lez = u3_nul; @@ -51,21 +51,21 @@ } u3_noun - u3wf_frog(u3_noun cor) + u3wf_fork(u3_noun cor) { u3_noun yed; if ( c3n == u3r_mean(cor, u3x_sam, &yed, 0) ) { return u3m_bail(c3__fail); } else { - return u3qf_frog(yed); + return u3qf_fork(yed); } } u3_noun - u3kf_frog(u3_noun yed) + u3kf_fork(u3_noun yed) { - u3_noun ret = u3qf_frog(yed); + u3_noun ret = u3qf_fork(yed); u3z(yed); return ret; diff --git a/jets/f/type.c b/jets/f/type.c index 31d73df50c..d8eaa518e7 100644 --- a/jets/f/type.c +++ b/jets/f/type.c @@ -32,14 +32,11 @@ case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); { } - case c3__frog: p_sut = u3t(sut); + case c3__fork: p_sut = u3t(sut); { } case c3__hold: p_sut = u3t(sut); { } - case c3__holt: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - } } } diff --git a/jets/f/ut_burn.c b/jets/f/ut_burn.c index c98b37d2bc..2af7d4b481 100644 --- a/jets/f/ut_burn.c +++ b/jets/f/ut_burn.c @@ -10,7 +10,7 @@ _burn_in(u3_noun van, u3_noun sut, u3_noun gil); static u3_noun - _burn_frog(u3_noun van, + _burn_fork(u3_noun van, u3_noun yed, u3_noun gil) { @@ -18,7 +18,7 @@ return u3_nul; } else { u3_noun dis = _burn_in(van, u3h(yed), gil); - u3_noun mor = _burn_frog(van, u3t(yed), gil); + u3_noun mor = _burn_fork(van, u3t(yed), gil); if ( u3_nul == dis ) return mor; if ( u3_nul == mor ) return dis; @@ -120,15 +120,11 @@ case c3__fork: p_sut = u3t(sut); { u3_noun yed = u3qdi_tap(p_sut, u3_nul); - u3_noun ret = _burn_frog(van, yed, gil); + u3_noun ret = _burn_fork(van, yed, gil); u3z(yed); return ret; } - case c3__frog: p_sut = u3t(sut); - { - return _burn_in(van, u3h(p_sut), gil); - } case c3__hold: { if ( (c3y == u3qdi_has(gil, sut)) ) { diff --git a/jets/f/ut_crop.c b/jets/f/ut_crop.c index c38eb2011c..8aaa65089d 100644 --- a/jets/f/ut_crop.c +++ b/jets/f/ut_crop.c @@ -34,25 +34,25 @@ } static u3_noun - _crop_dext_frog(u3_noun van, u3_noun p_sut, u3_noun ref, u3_noun bix) + _crop_dext_fork(u3_noun van, u3_noun p_sut, u3_noun ref, u3_noun bix) { if ( u3_nul == p_sut ) { return u3_nul; } else { return u3nc(_crop_dext(van, u3h(p_sut), ref, bix), - _crop_dext_frog(van, u3t(p_sut), ref, bix)); + _crop_dext_fork(van, u3t(p_sut), ref, bix)); } } static u3_noun - _crop_sint_frog(u3_noun van, u3_noun sut, u3_noun p_ref, u3_noun bix) + _crop_sint_fork(u3_noun van, u3_noun sut, u3_noun p_ref, u3_noun bix) { if ( u3_nul == p_ref ) { return u3k(sut); } else { u3_noun tuz = _crop_dext(van, sut, u3h(p_ref), bix); - u3_noun zat = _crop_sint_frog(van, tuz, u3t(p_ref), bix); + u3_noun zat = _crop_sint_fork(van, tuz, u3t(p_ref), bix); u3z(tuz); return zat; @@ -153,15 +153,11 @@ case c3__fork: p_sut = u3t(sut); { u3_noun yed = u3qdi_tap(p_sut, u3_nul); - u3_noun ret = u3kf_frog(_crop_dext_frog(van, yed, ref, bix)); + u3_noun ret = u3kf_fork(_crop_dext_fork(van, yed, ref, bix)); u3z(yed); return ret; } - case c3__frog: p_sut = u3t(sut); - { - return u3kf_frog(_crop_dext_frog(van, p_sut, ref, bix)); - } case c3__hold: { u3_noun hud = u3nc(u3k(sut), u3k(ref)); @@ -207,15 +203,11 @@ case c3__fork: p_ref = u3t(ref); { u3_noun yed = u3qdi_tap(p_ref, u3_nul); - u3_noun ret = _crop_sint_frog(van, sut, yed, bix); + u3_noun ret = _crop_sint_fork(van, sut, yed, bix); u3z(yed); return ret; } - case c3__frog: p_ref = u3t(ref); - { - return _crop_sint_frog(van, sut, p_ref, bix); - } case c3__hold: { u3_noun rep = u3qfu_repo(van, ref); diff --git a/jets/f/ut_fish.c b/jets/f/ut_fish.c index 4756dae750..7d3f1cf6ad 100644 --- a/jets/f/ut_fish.c +++ b/jets/f/ut_fish.c @@ -9,7 +9,7 @@ _fish_in(u3_noun, u3_noun, u3_atom, u3_noun); static u3_noun - _fish_frog(u3_noun van, + _fish_fork(u3_noun van, u3_noun p_sut, u3_atom axe, u3_noun vit) @@ -19,7 +19,7 @@ } else { u3_noun hed = _fish_in(van, u3h(p_sut), axe, vit); - u3_noun tal = _fish_frog(van, u3t(p_sut), axe, vit); + u3_noun tal = _fish_fork(van, u3t(p_sut), axe, vit); u3_noun pro = u3qf_flor(hed, tal); u3z(hed); @@ -102,15 +102,11 @@ case c3__fork: p_sut = u3t(sut); { u3_noun yed = u3qdi_tap(p_sut, u3_nul); - u3_noun ret = _fish_frog(van, yed, axe, vit); + u3_noun ret = _fish_fork(van, yed, axe, vit); u3z(yed); return ret; } - case c3__frog: { - p_sut = u3t(sut); - return _fish_frog(van, p_sut, axe, vit); - } case c3__hold: { p_sut = u3t(sut); { diff --git a/jets/f/ut_fuse.c b/jets/f/ut_fuse.c index d5976e513a..7ea0733862 100644 --- a/jets/f/ut_fuse.c +++ b/jets/f/ut_fuse.c @@ -32,14 +32,14 @@ } static u3_noun - _fuse_in_frog(u3_noun van, u3_noun p_sut, u3_noun ref, u3_noun bix) + _fuse_in_fork(u3_noun van, u3_noun p_sut, u3_noun ref, u3_noun bix) { if ( u3_nul == p_sut ) { return u3_nul; } else { return u3nc(_fuse_in(van, u3h(p_sut), ref, bix), - _fuse_in_frog(van, u3t(p_sut), ref, bix)); + _fuse_in_fork(van, u3t(p_sut), ref, bix)); } } @@ -135,15 +135,11 @@ case c3__fork: p_sut = u3t(sut); { u3_noun yed = u3qdi_tap(p_sut, u3_nul); - u3_noun ret = u3kf_frog(_fuse_in_frog(van, yed, ref, bix)); + u3_noun ret = u3kf_fork(_fuse_in_fork(van, yed, ref, bix)); u3z(yed); return ret; } - case c3__frog: p_sut = u3t(sut); - { - return u3kf_frog(_fuse_in_frog(van, p_sut, ref, bix)); - } case c3__hold: { u3_noun hud = u3nc(u3k(sut), u3k(ref)); diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index c7f53f9ee3..0514a90840 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -13,7 +13,7 @@ static u3_noun _mint_bean() { - return u3kf_frog(u3nt(u3nq(c3__atom, 'f', u3_nul, 0), + return u3kf_fork(u3nt(u3nq(c3__atom, 'f', u3_nul, 0), u3nq(c3__atom, 'f', u3_nul, 1), u3_nul)); } diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index 3c790a3beb..271dd4dacd 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -24,7 +24,7 @@ static u3_noun _mull_bean() { - return u3kf_frog(u3nt(u3nq(c3__atom, 'f', u3_nul, 0), + return u3kf_fork(u3nt(u3nq(c3__atom, 'f', u3_nul, 0), u3nq(c3__atom, 'f', u3_nul, 1), u3_nul)); } diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index 822ec5c512..897adacae6 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -253,16 +253,6 @@ return _nest_dext(van, q_sut, tel, ref, seg, reg, gil); } } -#if 0 - case c3__fork: p_sut = u3t(sut); - { - u3_noun fop = u3nc(c3__frog, u3qdi_tap(p_sut, u3_nul)); - u3_noun ret = _nest_dext(van, fop, tel, ref, seg, reg, gil); - - u3z(fop); - return ret; - } -#else case c3__fork: p_sut = u3t(sut); { if ( c3n == u3du(ref) ) switch ( ref ) { @@ -296,33 +286,6 @@ return c3n; } } -#endif - case c3__frog: p_sut = u3t(sut); - { - if ( c3n == u3du(ref) ) switch ( ref ) { - default: return _nest_sint(van, sut, tel, ref, seg, reg, gil); - - case c3__noun: - break; - } - else switch ( u3h(ref) ) { - default: return _nest_sint(van, sut, tel, ref, seg, reg, gil); - - case c3__atom: - case c3__cell: - case c3__core: - break; - } - - while ( u3_nul != p_sut ) { - if ( c3y == _nest_dext(van, u3h(p_sut), c3n, ref, seg, reg, gil) ) { - return c3y; - } else { - p_sut = u3t(p_sut); - } - } - return c3n; - } case c3__hold: { if ( c3y == u3qdi_has(seg, sut) ) { @@ -453,16 +416,6 @@ return _nest_dext(van, sut, tel, q_ref, seg, reg, gil); } } -#if 0 - case c3__fork: p_ref = u3t(ref); - { - u3_noun gif = u3nc(c3__frog, u3qdi_tap(p_ref, u3_nul)); - u3_noun ret = _nest_sint(van, sut, tel, gif, seg, reg, gil); - - u3z(gif); - return ret; - } -#else case c3__fork: p_ref = u3t(ref); { u3_noun dey = u3qdi_tap(p_ref, u3_nul); @@ -479,20 +432,6 @@ u3z(dey); return c3y; } -#endif - case c3__frog: { - p_ref = u3t(ref); - - while ( u3_nul != p_ref ) { - if ( c3n == _nest_dext(van, sut, tel, u3h(p_ref), seg, reg, gil) ) { - return c3n; - } - else { - p_ref = u3t(p_ref); - } - } - return c3y; - } case c3__hold: { if ( c3y == u3qdi_has(reg, ref) ) { return c3y; diff --git a/jets/f/ut_peek.c b/jets/f/ut_peek.c index ccd7151de9..41c0c5b8d4 100644 --- a/jets/f/ut_peek.c +++ b/jets/f/ut_peek.c @@ -13,14 +13,14 @@ _peek_in(u3_noun, u3_noun, u3_noun, u3_atom, u3_noun); static u3_noun - _peek_frog(u3_noun van, u3_noun p_sut, u3_noun way, u3_noun axe, u3_noun gil) + _peek_fork(u3_noun van, u3_noun p_sut, u3_noun way, u3_noun axe, u3_noun gil) { if ( u3_nul == p_sut ) { return u3_nul; } else { return u3nc(_peek_in(van, u3h(p_sut), way, axe, gil), - _peek_frog(van, u3t(p_sut), way, axe, gil)); + _peek_fork(van, u3t(p_sut), way, axe, gil)); } } @@ -115,16 +115,11 @@ case c3__fork: p_sut = u3t(sut); { u3_noun yed = u3qdi_tap(p_sut, u3_nul); - u3_noun ret = u3kf_frog(_peek_frog(van, yed, way, axe, gil)); + u3_noun ret = u3kf_fork(_peek_fork(van, yed, way, axe, gil)); u3z(yed); return ret; } - case c3__frog: { - p_sut = u3t(sut); - - return u3kf_frog(_peek_frog(van, p_sut, way, axe, gil)); - } case c3__hold: { if ( (c3y == u3qdi_has(gil, sut)) ) { return c3__void; diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index dd7eb1275f..85314421da 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -15,7 +15,7 @@ static u3_noun _play_bean() { - return u3kf_frog(u3nt(u3nq(c3__atom, 'f', u3_nul, 0), + return u3kf_fork(u3nt(u3nq(c3__atom, 'f', u3_nul, 0), u3nq(c3__atom, 'f', u3_nul, 1), u3_nul)); } diff --git a/jets/f/ut_repo.c b/jets/f/ut_repo.c index f0c926d39e..8f296c897f 100644 --- a/jets/f/ut_repo.c +++ b/jets/f/ut_repo.c @@ -16,7 +16,7 @@ default: return u3k(sut); case c3__noun: { - return u3kf_frog(u3nt(u3nt(c3__atom, u3_blip, u3_nul), + return u3kf_fork(u3nt(u3nt(c3__atom, u3_blip, u3_nul), u3nt(c3__cell, c3__noun, c3__noun), u3_nul)); } diff --git a/jets/f/ut_rest.c b/jets/f/ut_rest.c index 5cc24b3c21..15c93d59e1 100644 --- a/jets/f/ut_rest.c +++ b/jets/f/ut_rest.c @@ -38,7 +38,7 @@ { u3_noun gar = _rest_in_list(van, leg); u3_noun yed = _rest_in_stil(van, gar); - u3_noun fub = u3qf_frog(yed); + u3_noun fub = u3qf_fork(yed); u3z(gar); u3z(yed); diff --git a/jets/f/ut_wrap.c b/jets/f/ut_wrap.c index eda937fdfd..71e01910e7 100644 --- a/jets/f/ut_wrap.c +++ b/jets/f/ut_wrap.c @@ -6,14 +6,14 @@ static u3_noun _cqfu_wrap(u3_noun, u3_noun, u3_noun); static u3_noun - _wrap_frog(u3_noun van, u3_noun p_sut, u3_noun yoz) + _wrap_fork(u3_noun van, u3_noun p_sut, u3_noun yoz) { if ( u3_nul == p_sut ) { return u3_nul; } else { return u3nc(_cqfu_wrap(van, u3h(p_sut), yoz), - _wrap_frog(van, u3t(p_sut), yoz)); + _wrap_fork(van, u3t(p_sut), yoz)); } } @@ -51,15 +51,11 @@ case c3__fork: p_sut = u3t(sut); { u3_noun yed = u3qdi_tap(p_sut, u3_nul); - u3_noun ret = u3kf_frog(_wrap_frog(van, yed, yoz)); + u3_noun ret = u3kf_fork(_wrap_fork(van, yed, yoz)); u3z(yed); return ret; } - case c3__frog: p_sut = u3t(sut); - { - return u3kf_frog(_wrap_frog(van, p_sut, yoz)); - } case c3__hold: { u3_noun fop = u3qfu_repo(van, sut); diff --git a/jets/tree.c b/jets/tree.c index 27aa200b6e..6a56bef444 100644 --- a/jets/tree.c +++ b/jets/tree.c @@ -340,7 +340,7 @@ static u3j_harm _mood__hoon_fitz_a[] = {{".2", u3wf_fitz}, {}}; static u3j_harm _mood__hoon_flan_a[] = {{".2", u3wf_flan}, {}}; static u3j_harm _mood__hoon_flip_a[] = {{".2", u3wf_flip}, {}}; static u3j_harm _mood__hoon_flor_a[] = {{".2", u3wf_flor}, {}}; -// static u3j_harm _mood__hoon_fork_a[] = {{".2", u3wf_fork}, {}}; +static u3j_harm _mood__hoon_fork_a[] = {{".2", u3wf_fork}, {}}; static u3j_harm _mood__hoon_hike_a[] = {{".2", u3wf_hike}, {}}; static u3j_harm _mood__hoon_look_a[] = {{".2", u3wf_look}, {}}; @@ -531,7 +531,7 @@ static u3j_core _mood__hoon_d[] = { "flan", _mood__hoon_flan_a }, { "flip", _mood__hoon_flip_a }, { "flor", _mood__hoon_flor_a }, -// { "fork", _mood__hoon_fork_a }, + { "fork", _mood__hoon_fork_a }, { "hike", _mood__hoon_hike_a }, { "look", _mood__hoon_look_a }, From 848c891db9cc48090b58ddd3b24bdc02737f3af9 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Thu, 14 Jan 2016 20:37:58 -0800 Subject: [PATCH 090/137] Not compiling, but finished first stage of adding fuss. --- include/c/motes.h | 1 + include/jets/q.h | 1 + jets/f/face.c | 25 +++++++++++++++++++++++++ jets/f/type.c | 3 +++ jets/f/ut_burn.c | 1 + jets/f/ut_crop.c | 9 +++++++++ jets/f/ut_fish.c | 1 + jets/f/ut_fuse.c | 8 ++++++++ jets/f/ut_nest.c | 2 ++ jets/f/ut_peek.c | 1 + jets/f/ut_repo.c | 1 + 11 files changed, 53 insertions(+) diff --git a/include/c/motes.h b/include/c/motes.h index 72ea48fa6d..81b323251e 100644 --- a/include/c/motes.h +++ b/include/c/motes.h @@ -418,6 +418,7 @@ # define c3__fung c3_s4('f','u','n','g') # define c3__funk c3_s4('f','u','n','k') # define c3__fuse c3_s4('f','u','s','e') +# define c3__fuss c3_s4('f','u','s','s') # define c3__gab c3_s3('g','a','b') # define c3__galb c3_s4('g','a','l','b') # define c3__gald c3_s4('g','a','l','d') diff --git a/include/jets/q.h b/include/jets/q.h index 5cf0537a50..4419252922 100644 --- a/include/jets/q.h +++ b/include/jets/q.h @@ -165,6 +165,7 @@ u3_noun u3qf_core(u3_noun, u3_noun); u3_noun u3qf_cube(u3_noun, u3_noun); u3_noun u3qf_face(u3_noun, u3_noun); + u3_noun u3qf_fuss(u3_noun, u3_noun); u3_noun u3qf_fine(u3_noun, u3_noun, u3_noun); u3_noun u3qf_fitz(u3_noun, u3_noun); u3_noun u3qf_flan(u3_noun, u3_noun); diff --git a/jets/f/face.c b/jets/f/face.c index abec7b8f77..ab153c02f2 100644 --- a/jets/f/face.c +++ b/jets/f/face.c @@ -28,3 +28,28 @@ return u3qf_face(sag, tip); } } + + + u3_noun + u3qf_fuss(u3_noun sag, + u3_noun tip) + { + if ( c3__void == tip ) { + return c3__void; + } + else return u3nt(c3__fuss, + u3k(sag), + u3k(tip)); + } + u3_noun + u3wf_fuss(u3_noun cor) + { + u3_noun sag, tip; + + if ( c3n == u3r_mean(cor, u3x_sam_2, &sag, u3x_sam_3, &tip, 0) ) { + return u3m_bail(c3__fail); + } else { + return u3qf_fuss(sag, tip); + } + } + diff --git a/jets/f/type.c b/jets/f/type.c index d8eaa518e7..14fb6df755 100644 --- a/jets/f/type.c +++ b/jets/f/type.c @@ -32,6 +32,9 @@ case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); { } + case c3__fuss: u3x_cell(u3t(sut), &p_sut, &q_sut); + { + } case c3__fork: p_sut = u3t(sut); { } diff --git a/jets/f/ut_burn.c b/jets/f/ut_burn.c index 2af7d4b481..5e07a797a8 100644 --- a/jets/f/ut_burn.c +++ b/jets/f/ut_burn.c @@ -113,6 +113,7 @@ return ret; } } + case c3__fuss: case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); { return _burn_in(van, q_sut, gil); diff --git a/jets/f/ut_crop.c b/jets/f/ut_crop.c index 8aaa65089d..481839af21 100644 --- a/jets/f/ut_crop.c +++ b/jets/f/ut_crop.c @@ -150,6 +150,14 @@ u3z(foz); return ret; } + case c3__fuss: u3x_cell(u3t(sut), &p_sut, &q_sut); + { + u3_noun foz = _crop_dext(van, q_sut, ref, bix); + u3_noun ret = u3qf_fuss(p_sut, foz); + + u3z(foz); + return ret; + } case c3__fork: p_sut = u3t(sut); { u3_noun yed = u3qdi_tap(p_sut, u3_nul); @@ -196,6 +204,7 @@ default: return u3m_bail(c3__fail); case c3__core: + case c3__fuss: case c3__face: u3x_cell(u3t(ref), &p_ref, &q_ref); { return _crop_dext(van, sut, q_ref, bix); diff --git a/jets/f/ut_fish.c b/jets/f/ut_fish.c index 7d3f1cf6ad..d5a8267357 100644 --- a/jets/f/ut_fish.c +++ b/jets/f/ut_fish.c @@ -92,6 +92,7 @@ case c3__core: { return u3nc(0, 0); } + case c3__fuss: case c3__face: { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { return u3m_bail(c3__fail); diff --git a/jets/f/ut_fuse.c b/jets/f/ut_fuse.c index 7ea0733862..545add4f2f 100644 --- a/jets/f/ut_fuse.c +++ b/jets/f/ut_fuse.c @@ -132,6 +132,14 @@ u3z(vot); return ret; } + case c3__fuss: u3x_cell(u3t(sut), &p_sut, &q_sut); + { + u3_noun vot = _fuse_in(van, q_sut, ref, bix); + u3_noun ret = u3qf_fuss(p_sut, vot); + + u3z(vot); + return ret; + } case c3__fork: p_sut = u3t(sut); { u3_noun yed = u3qdi_tap(p_sut, u3_nul); diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index 897adacae6..d858390dfd 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -246,6 +246,7 @@ else return _nest_sint(van, sut, tel, ref, seg, reg, gil); } } + case c3__fuss: case c3__face: { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { return u3m_bail(c3__fail); @@ -409,6 +410,7 @@ u3z(gam); return hiv; } + case c3__fuss: case c3__face: { if ( c3n == u3r_trel(ref, 0, &p_ref, &q_ref) ) { return u3m_bail(c3__fail); diff --git a/jets/f/ut_peek.c b/jets/f/ut_peek.c index 41c0c5b8d4..a0018153c0 100644 --- a/jets/f/ut_peek.c +++ b/jets/f/ut_peek.c @@ -105,6 +105,7 @@ return pro; } } + case c3__fuss: case c3__face: { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { return u3m_bail(c3__fail); diff --git a/jets/f/ut_repo.c b/jets/f/ut_repo.c index 8f296c897f..d5f9932ad7 100644 --- a/jets/f/ut_repo.c +++ b/jets/f/ut_repo.c @@ -34,6 +34,7 @@ return u3nt(c3__cell, c3__noun, u3k(p_sut)); } } + case c3__fuss: case c3__face: { if ( c3n == u3r_cell(u3t(sut), &p_sut, &q_sut)) { return u3m_bail(c3__fail); From 2d4045f3c9607db090a4d3206f8ce2f052a17608 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Fri, 15 Jan 2016 17:42:50 -0800 Subject: [PATCH 091/137] Testing =#. --- Makefile | 1 + include/c/motes.h | 1 + include/jets/q.h | 2 +- jets/f/ut_buss.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++ jets/f/ut_mint.c | 32 +++++++++++++++------------- jets/f/ut_mull.c | 36 +++++++++++++++++++------------- jets/f/ut_play.c | 29 +++++++++++++++----------- 7 files changed, 113 insertions(+), 41 deletions(-) create mode 100644 jets/f/ut_buss.c diff --git a/Makefile b/Makefile index bd4fdb2cb7..fb4c2c2b13 100644 --- a/Makefile +++ b/Makefile @@ -288,6 +288,7 @@ J_F_OFILES=\ J_F_OFILES_UT=\ jets/f/ut.o \ jets/f/ut_burn.o \ + jets/f/ut_buss.o \ jets/f/ut_conk.o \ jets/f/ut_crop.o \ jets/f/ut_fire.o \ diff --git a/include/c/motes.h b/include/c/motes.h index 81b323251e..987c4845fa 100644 --- a/include/c/motes.h +++ b/include/c/motes.h @@ -1100,6 +1100,7 @@ # define c3__tsgl c3_s4('t','s','g','l') # define c3__tsgr c3_s4('t','s','g','r') # define c3__tshp c3_s4('t','s','h','p') +# define c3__tshx c3_s4('t','s','h','x') # define c3__tsls c3_s4('t','s','l','s') # define c3__tsms c3_s4('t','s','m','s') # define c3__tssg c3_s4('t','s','s','g') diff --git a/include/jets/q.h b/include/jets/q.h index 4419252922..3864875670 100644 --- a/include/jets/q.h +++ b/include/jets/q.h @@ -195,7 +195,7 @@ # define u3qfu_van_fab 119 u3_noun u3qfu_burn(u3_noun, u3_noun); - u3_noun u3qfu_busk(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_conk(u3_noun, u3_noun, u3_noun); u3_noun u3qfu_crop(u3_noun, u3_noun, u3_noun); diff --git a/jets/f/ut_buss.c b/jets/f/ut_buss.c new file mode 100644 index 0000000000..89478b2448 --- /dev/null +++ b/jets/f/ut_buss.c @@ -0,0 +1,53 @@ +/* j/6/ut_buss.c +** +*/ +#include "all.h" + + +/* logic +*/ + u3_noun + _cqfu_buss(u3_noun van, + u3_noun sut, + u3_noun cog, + u3_noun gen) + { + u3_noun von = u3i_molt(u3k(van), u3x_sam, u3k(sut), 0); + u3_noun gat = u3j_hook(von, "buss"); + + return u3n_kick_on(u3i_molt(gat, + u3x_sam_2, + u3k(cog), + u3x_sam_3, + u3k(gen), + 0)); + } + +/* boilerplate +*/ + u3_noun + u3wfu_buss(u3_noun cor) + { + u3_noun sut, cog, gen, van; + + if ( (c3n == u3r_mean(cor, u3x_sam_2, &cog, + u3x_sam_3, &gen, + u3x_con, &van, + 0)) || + (c3n == u3ud(cog)) || + (u3_none == (sut = u3r_at(u3x_sam, van))) ) + { + return u3m_bail(c3__fail); + } else { + return _cqfu_buss(van, sut, cog, gen); + } + } + + u3_noun + u3qfu_buss(u3_noun van, + u3_noun sut, + u3_noun cog, + u3_noun gen) + { + return _cqfu_buss(van, sut, cog, gen); + } diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index 0514a90840..a6e516a437 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -3,8 +3,6 @@ */ #include "all.h" -#define CNTS - /* logic */ static u3_noun @@ -235,13 +233,13 @@ return ret; } -#ifdef CNTS +#if 1 static u3_noun - _mint_cnts_new(u3_noun van, - u3_noun sut, - u3_noun gol, - u3_noun hyp, - u3_noun rig) + _mint_cnts(u3_noun van, + u3_noun sut, + u3_noun gol, + u3_noun hyp, + u3_noun rig) { u3_noun von = u3i_molt(u3k(van), u3x_sam, u3k(sut), 0); u3_noun gat = u3j_hook(von, "emin"); @@ -674,14 +672,20 @@ u3z(boc); return ret; } + case c3__tshx: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); + _mint_used(); + { + u3_noun boc = u3qfu_buss(van, sut, p_gen, q_gen); + u3_noun ret = _mint_in(van, boc, gol, r_gen); + + u3z(boc); + return ret; + } case c3__cnts: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); -#ifdef CNTS - return _mint_cnts_new(van, sut, gol, p_gen, q_gen); -#else - return _mint_cnts_old(van, sut, gol, p_gen, q_gen); -#endif - + { + return _mint_cnts(van, sut, gol, p_gen, q_gen); + } case c3__brcn: p_gen = u3t(gen); _mint_used(); { diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index 271dd4dacd..547433adfc 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -3,8 +3,6 @@ */ #include "all.h" -#define CNTS - /* functions */ static u3_noun @@ -188,14 +186,14 @@ typ); } -#ifdef CNTS +#if 1 static u3_noun - _mull_cnts_new(u3_noun van, - u3_noun sut, - u3_noun gol, - u3_noun dox, - u3_noun hyp, - u3_noun rig) + _mull_cnts(u3_noun van, + u3_noun sut, + u3_noun gol, + u3_noun dox, + u3_noun hyp, + u3_noun rig) { u3_noun von = u3i_molt(u3k(van), u3x_sam, u3k(sut), 0); u3_noun gat = u3j_hook(von, "emul"); @@ -620,13 +618,23 @@ return ret; } + case c3__tshx: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); + _mull_used(); + { + u3_noun boc = u3qfu_buss(van, sut, p_gen, q_gen); + u3_noun nuf = u3qfu_buss(van, dox, p_gen, q_gen); + u3_noun ret = _mull_in(van, boc, gol, nuf, r_gen); + + u3z(boc); + u3z(nuf); + + return ret; + } case c3__cnts: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); -#ifdef CNTS - return _mull_cnts_new(van, sut, gol, dox, p_gen, q_gen); -#else - return _mull_cnts_old(van, sut, gol, dox, p_gen, q_gen); -#endif + { + return _mull_cnts(van, sut, gol, dox, p_gen, q_gen); + } case c3__brcn: p_gen = u3t(gen); _mull_used(); { diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index 85314421da..ea2a3077c5 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -3,8 +3,6 @@ */ #include "all.h" -#define CNTS - /* logic */ # define _play_used() @@ -74,12 +72,12 @@ return ret; } -#ifdef CNTS +#if 1 static u3_noun - _play_cnts_new(u3_noun van, - u3_noun sut, - u3_noun hyp, - u3_noun rig) + _play_cnts(u3_noun van, + u3_noun sut, + u3_noun hyp, + u3_noun rig) { u3_noun von = u3i_molt(u3k(van), u3x_sam, u3k(sut), 0); u3_noun gat = u3j_hook(von, "epla"); @@ -369,13 +367,20 @@ return ret; } + case c3__tshx: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); + _play_used(); + { + u3_noun boc = u3qfu_buss(van, sut, p_gen, q_gen); + u3_noun ret = _play_x(van, boc, r_gen); + + u3z(boc); + return ret; + } case c3__cnts: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); -#ifdef CNTS - return _play_cnts_new(van, sut, p_gen, q_gen); -#else - return _play_cnts_old(van, sut, p_gen, q_gen); -#endif + { + return _play_cnts(van, sut, p_gen, q_gen); + } case c3__brcn: p_gen = u3t(gen); _play_used(); { From 0c597de19443fd27f8cfbe0b88741ef6c04589d1 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sat, 16 Jan 2016 00:30:22 -0800 Subject: [PATCH 092/137] About to move tshx to tstr. --- jets/f/ut_mint.c | 15 +-------------- jets/f/ut_mull.c | 18 +----------------- jets/f/ut_play.c | 16 +--------------- 3 files changed, 3 insertions(+), 46 deletions(-) diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index a6e516a437..2b15623fbe 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -659,20 +659,7 @@ u3z(dov); return ret; } - case c3__tstr: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); - _mint_used(); - { - u3_noun sag = u3nt(u3nt(u3nc(u3k(p_gen), u3k(q_gen)), u3_nul, u3_nul), - u3_nul, - u3_nul); - u3_noun boc = u3qf_face(sag, sut); - u3_noun ret = _mint_in(van, boc, gol, r_gen); - - u3z(sag); - u3z(boc); - return ret; - } - case c3__tshx: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); + case c3__tstr: case c3__tshx: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); _mint_used(); { u3_noun boc = u3qfu_buss(van, sut, p_gen, q_gen); diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index 547433adfc..87973d5620 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -602,23 +602,7 @@ u3z(lem); return ret; } - case c3__tstr: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); - _mull_used(); - { - u3_noun sag = u3nt(u3nt(u3nc(u3k(p_gen), u3k(q_gen)), u3_nul, u3_nul), - u3_nul, - u3_nul); - u3_noun boc = u3qf_face(sag, sut); - u3_noun nuf = u3qf_face(sag, dox); - u3_noun ret = _mull_in(van, boc, gol, nuf, r_gen); - - u3z(sag); - u3z(boc); - u3z(nuf); - - return ret; - } - case c3__tshx: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); + case c3__tstr: case c3__tshx: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); _mull_used(); { u3_noun boc = u3qfu_buss(van, sut, p_gen, q_gen); diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index ea2a3077c5..a8fd5595d7 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -353,21 +353,7 @@ u3z(boc); return ret; } - case c3__tstr: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); - _play_used(); - { - u3_noun sag = u3nt(u3nt(u3nc(u3k(p_gen), u3k(q_gen)), u3_nul, u3_nul), - u3_nul, - u3_nul); - u3_noun boc = u3qf_face(sag, sut); - u3_noun ret = _play_x(van, boc, r_gen); - - u3z(sag); - u3z(boc); - - return ret; - } - case c3__tshx: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); + case c3__tstr: case c3__tshx: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); _play_used(); { u3_noun boc = u3qfu_buss(van, sut, p_gen, q_gen); From 2e064c388cf712e39e3e02f30d908c0635360e1f Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sat, 16 Jan 2016 16:20:54 -0800 Subject: [PATCH 093/137] %face entirely replaced with %fuss. --- jets/f/face.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jets/f/face.c b/jets/f/face.c index ab153c02f2..dda0c7df5a 100644 --- a/jets/f/face.c +++ b/jets/f/face.c @@ -13,7 +13,7 @@ if ( c3__void == tip ) { return c3__void; } - else return u3nt(c3__face, + else return u3nt(c3__fuss, u3k(sag), u3k(tip)); } From 6d79d60739595c5c209bf6eb05553ff84252af96 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sat, 16 Jan 2016 16:30:07 -0800 Subject: [PATCH 094/137] With both face and fuss. --- jets/f/face.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jets/f/face.c b/jets/f/face.c index dda0c7df5a..8aafa683d7 100644 --- a/jets/f/face.c +++ b/jets/f/face.c @@ -13,7 +13,7 @@ if ( c3__void == tip ) { return c3__void; } - else return u3nt(c3__fuss, + else return u3nt(c3__face, u3k(sag), u3k(tip)); } @@ -37,7 +37,7 @@ if ( c3__void == tip ) { return c3__void; } - else return u3nt(c3__fuss, + else return u3nt(c3__face, u3k(sag), u3k(tip)); } From 9d9255d870d0736355317373ddf77fc94d1132c4 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sat, 16 Jan 2016 16:47:36 -0800 Subject: [PATCH 095/137] %fuss entirely shifted to %face. --- include/jets/q.h | 1 - jets/f/face.c | 25 ------------------------- jets/f/ut_burn.c | 1 - jets/f/ut_crop.c | 9 --------- jets/f/ut_fish.c | 1 - jets/f/ut_fuse.c | 8 -------- jets/f/ut_nest.c | 2 -- jets/f/ut_peek.c | 1 - jets/f/ut_repo.c | 1 - 9 files changed, 49 deletions(-) diff --git a/include/jets/q.h b/include/jets/q.h index 3864875670..82f048d5c9 100644 --- a/include/jets/q.h +++ b/include/jets/q.h @@ -165,7 +165,6 @@ u3_noun u3qf_core(u3_noun, u3_noun); u3_noun u3qf_cube(u3_noun, u3_noun); u3_noun u3qf_face(u3_noun, u3_noun); - u3_noun u3qf_fuss(u3_noun, u3_noun); u3_noun u3qf_fine(u3_noun, u3_noun, u3_noun); u3_noun u3qf_fitz(u3_noun, u3_noun); u3_noun u3qf_flan(u3_noun, u3_noun); diff --git a/jets/f/face.c b/jets/f/face.c index 8aafa683d7..abec7b8f77 100644 --- a/jets/f/face.c +++ b/jets/f/face.c @@ -28,28 +28,3 @@ return u3qf_face(sag, tip); } } - - - u3_noun - u3qf_fuss(u3_noun sag, - u3_noun tip) - { - if ( c3__void == tip ) { - return c3__void; - } - else return u3nt(c3__face, - u3k(sag), - u3k(tip)); - } - u3_noun - u3wf_fuss(u3_noun cor) - { - u3_noun sag, tip; - - if ( c3n == u3r_mean(cor, u3x_sam_2, &sag, u3x_sam_3, &tip, 0) ) { - return u3m_bail(c3__fail); - } else { - return u3qf_fuss(sag, tip); - } - } - diff --git a/jets/f/ut_burn.c b/jets/f/ut_burn.c index 5e07a797a8..2af7d4b481 100644 --- a/jets/f/ut_burn.c +++ b/jets/f/ut_burn.c @@ -113,7 +113,6 @@ return ret; } } - case c3__fuss: case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); { return _burn_in(van, q_sut, gil); diff --git a/jets/f/ut_crop.c b/jets/f/ut_crop.c index 481839af21..8aaa65089d 100644 --- a/jets/f/ut_crop.c +++ b/jets/f/ut_crop.c @@ -150,14 +150,6 @@ u3z(foz); return ret; } - case c3__fuss: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - u3_noun foz = _crop_dext(van, q_sut, ref, bix); - u3_noun ret = u3qf_fuss(p_sut, foz); - - u3z(foz); - return ret; - } case c3__fork: p_sut = u3t(sut); { u3_noun yed = u3qdi_tap(p_sut, u3_nul); @@ -204,7 +196,6 @@ default: return u3m_bail(c3__fail); case c3__core: - case c3__fuss: case c3__face: u3x_cell(u3t(ref), &p_ref, &q_ref); { return _crop_dext(van, sut, q_ref, bix); diff --git a/jets/f/ut_fish.c b/jets/f/ut_fish.c index d5a8267357..7d3f1cf6ad 100644 --- a/jets/f/ut_fish.c +++ b/jets/f/ut_fish.c @@ -92,7 +92,6 @@ case c3__core: { return u3nc(0, 0); } - case c3__fuss: case c3__face: { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { return u3m_bail(c3__fail); diff --git a/jets/f/ut_fuse.c b/jets/f/ut_fuse.c index 545add4f2f..7ea0733862 100644 --- a/jets/f/ut_fuse.c +++ b/jets/f/ut_fuse.c @@ -132,14 +132,6 @@ u3z(vot); return ret; } - case c3__fuss: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - u3_noun vot = _fuse_in(van, q_sut, ref, bix); - u3_noun ret = u3qf_fuss(p_sut, vot); - - u3z(vot); - return ret; - } case c3__fork: p_sut = u3t(sut); { u3_noun yed = u3qdi_tap(p_sut, u3_nul); diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index d858390dfd..897adacae6 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -246,7 +246,6 @@ else return _nest_sint(van, sut, tel, ref, seg, reg, gil); } } - case c3__fuss: case c3__face: { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { return u3m_bail(c3__fail); @@ -410,7 +409,6 @@ u3z(gam); return hiv; } - case c3__fuss: case c3__face: { if ( c3n == u3r_trel(ref, 0, &p_ref, &q_ref) ) { return u3m_bail(c3__fail); diff --git a/jets/f/ut_peek.c b/jets/f/ut_peek.c index a0018153c0..41c0c5b8d4 100644 --- a/jets/f/ut_peek.c +++ b/jets/f/ut_peek.c @@ -105,7 +105,6 @@ return pro; } } - case c3__fuss: case c3__face: { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { return u3m_bail(c3__fail); diff --git a/jets/f/ut_repo.c b/jets/f/ut_repo.c index d5f9932ad7..8f296c897f 100644 --- a/jets/f/ut_repo.c +++ b/jets/f/ut_repo.c @@ -34,7 +34,6 @@ return u3nt(c3__cell, c3__noun, u3k(p_sut)); } } - case c3__fuss: case c3__face: { if ( c3n == u3r_cell(u3t(sut), &p_sut, &q_sut)) { return u3m_bail(c3__fail); From 8b2e4c16939a8cbdbce0af96e9d92816bdf3a474 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 17 Jan 2016 20:55:11 -0800 Subject: [PATCH 096/137] Some change. --- jets/f/ut_find.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c index 50aeab6a11..0e9db6341e 100644 --- a/jets/f/ut_find.c +++ b/jets/f/ut_find.c @@ -9,9 +9,17 @@ u3_noun dep, u3_noun way, u3_noun hyp, + u3_noun nol, u3_noun gil) { - + if ( u3_nul == hyp ) { + return u3nq(c3y, u3k(nol), c3y, u3k(sut)); + } + else { + u3_noun i_hyp = u3h(hyp); + u3_noun t_hyp = u3t(hyp); + u3_noun mor = _find_outer(van, sut, dep, way, t_hyp, nol, gil); + } } { From 33c93dbb25a565b83b8faec53abe7adb5dde92e6 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 17 Jan 2016 23:41:59 -0800 Subject: [PATCH 097/137] Looking a little smoother. --- jets/f/ut_find.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c index 0e9db6341e..ce1bc63e2d 100644 --- a/jets/f/ut_find.c +++ b/jets/f/ut_find.c @@ -19,6 +19,15 @@ u3_noun i_hyp = u3h(hyp); u3_noun t_hyp = u3t(hyp); u3_noun mor = _find_outer(van, sut, dep, way, t_hyp, nol, gil); + + if ( c3n == u3h(mor) ) { + return _find_outer_sint( + + u3_noun t_mor = u3t(mor); + } + else { + u3_noun ref = c3__ + } } } From 03f5d3b762d8911134f93fb7f6db381d2cb70732 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Mon, 18 Jan 2016 14:31:02 -0800 Subject: [PATCH 098/137] Cleaned-up ++ad. --- jets/f/ut_find.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c index ce1bc63e2d..4c4fea73d1 100644 --- a/jets/f/ut_find.c +++ b/jets/f/ut_find.c @@ -21,12 +21,12 @@ u3_noun mor = _find_outer(van, sut, dep, way, t_hyp, nol, gil); if ( c3n == u3h(mor) ) { - return _find_outer_sint( + u3_noun ret = _find_outer_sint( u3_noun t_mor = u3t(mor); } else { - u3_noun ref = c3__ + } } } From b97118ffd8812122ad6be91b24bc804b1a6f58dc Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Mon, 18 Jan 2016 20:11:17 -0800 Subject: [PATCH 099/137] Ecco is here but doesn't compile. --- jets/f/type.c | 3 - jets/f/ut_find.c | 145 ++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 136 insertions(+), 12 deletions(-) diff --git a/jets/f/type.c b/jets/f/type.c index 14fb6df755..d8eaa518e7 100644 --- a/jets/f/type.c +++ b/jets/f/type.c @@ -32,9 +32,6 @@ case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); { } - case c3__fuss: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - } case c3__fork: p_sut = u3t(sut); { } diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c index 4c4fea73d1..cca0f1e77b 100644 --- a/jets/f/ut_find.c +++ b/jets/f/ut_find.c @@ -3,34 +3,161 @@ */ #include "all.h" + static u3_noun + u3qfu_felt(u3_noun van, + u3_noun sut, + u3_noun lap) + { + u3_noun von = u3i_molt(u3k(van), u3x_sam, u3k(sut), 0); + u3_noun gat = u3j_hook(von, "felt"); + + return u3n_kick_on(u3i_molt(gat, + u3x_sam, + u3k(lap), + 0)); + } + + static u3_noun + _find_no(u3_noun van, + u3_noun sut, + u3_noun way, + u3_noun hyp, + u3_noun p_mor) + { + } + + static u3_noun + _find_buck_stop(u3_noun van, + u3_noun sut, + u3_noun way, + u3_noun p_heg, + u3_noun q_heg, + u3_noun gil) + + static u3_noun + _find_buck(u3_noun van, + u3_noun sut, + u3_noun way, + u3_noun p_heg, + u3_noun q_heg, + u3_noun gil) + { + u3_noun p_sut, q_sut, r_sut; + + if ( c3n == u3du(sut) ) switch ( sut ) { + default: return u3m_bail(c3__fail); + + case c3__noun: + { + } + case c3__void: + { + } + } + else switch ( u3h(sut) ) { + default: return u3m_bail(c3__fail); + + case c3__atom: u3x_cell(u3t(sut), &p_sut, &q_sut); + { + } + case c3__cell: u3x_cell(u3t(sut), &p_sut, &q_sut); + { + } + case c3__core: u3x_cell(u3t(sut), &p_sut, &q_sut); + { + } + case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); + { + } + case c3__fuss: u3x_cell(u3t(sut), &p_sut, &q_sut); + { + } + case c3__fork: p_sut = u3t(sut); + { + } + case c3__hold: p_sut = u3t(sut); + { + } + } + } + + + static u3_noun + _find_yes(u3_noun van, + u3_noun sut, // span + u3_noun way, // ?(%read %rite %free %both) + u3_noun i_hyp, // limb + u3_noun p_mor) // palo + { + u3_noun pp_mor = u3h(p_mor); // vein + u3_noun qp_mor = u3t(p_mor); // opal + { + u3_noun ref = u3qfu_felt(van, sut, qp_mor); + u3_noun lon = u3k(pp_mor); + u3_noun heg = (c3y == u3du(i_hyp)) + ? u3k(i_hyp) + : u3nq(c3n, 0, u3_nul, u3k(i_hyp)); + u3_noun ret; + + if ( c3y == u3h(heg) ) { + u3_noun p_heg = u3(heg); // axis + + ret = u3nq + (c3y, + u3nc(u3nc(u3_nul, u3k(p_heg)), u3k(lon)), + c3y, + u3qfu_peek(van, ref, way, p_heg); + } + else { + u3_noun p_heg = u3h(u3t(heg)); // @ud + u3_noun q_heg = u3h(u3t(heg)); // (unit term) + + ret = _find_buck + (van, ref, way, lon, p_heg, q_heg, u3_nul); + } + u3z(heg); + u3z(lon); + u3z(ref); + + return ret; + } + } + static u3_noun _find_outer(u3_noun van, u3_noun sut, - u3_noun dep, u3_noun way, - u3_noun hyp, - u3_noun nol, - u3_noun gil) + u3_noun hyp) { if ( u3_nul == hyp ) { - return u3nq(c3y, u3k(nol), c3y, u3k(sut)); + return u3nq(c3y, u3_nul, c3y, u3k(sut)); } else { u3_noun i_hyp = u3h(hyp); u3_noun t_hyp = u3t(hyp); - u3_noun mor = _find_outer(van, sut, dep, way, t_hyp, nol, gil); + u3_noun mor = _find_outer(van, sut, way, t_hyp); + u3_noun p_mor = u3t(mor); if ( c3n == u3h(mor) ) { - u3_noun ret = _find_outer_sint( + u3_noun ret = _find_no(van, sut, way, i_hyp, p_mor); - u3_noun t_mor = u3t(mor); + u3z(mor); + return ret; } else { - + u3_noun ret = _find_yes(van, sut, way, i_hyp, p_mor); + + u3z(mor); + return ret; } } } + + + + + { u3_noun p_sut, q_sut, r_sut; From 7e5f9393c8f3fb874a900640cf5fbef206494654 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Mon, 18 Jan 2016 20:50:49 -0800 Subject: [PATCH 100/137] About to test final pyramid structure. --- jets/f/ut_find.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c index cca0f1e77b..487994072f 100644 --- a/jets/f/ut_find.c +++ b/jets/f/ut_find.c @@ -32,7 +32,11 @@ u3_noun way, u3_noun p_heg, u3_noun q_heg, + u3_noun axe, + u3_noun lon, u3_noun gil) + { + } static u3_noun _find_buck(u3_noun van, @@ -113,7 +117,7 @@ u3_noun q_heg = u3h(u3t(heg)); // (unit term) ret = _find_buck - (van, ref, way, lon, p_heg, q_heg, u3_nul); + (van, ref, way, 1, lon, p_heg, q_heg, u3_nul); } u3z(heg); u3z(lon); From c547343a2425ab7f92207ffdb311099478d93e18 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Tue, 19 Jan 2016 09:34:43 -0800 Subject: [PATCH 101/137] ++ad actually works. --- jets/f/ut_find.c | 131 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 123 insertions(+), 8 deletions(-) diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c index 487994072f..409bb17c56 100644 --- a/jets/f/ut_find.c +++ b/jets/f/ut_find.c @@ -26,6 +26,42 @@ { } + static u3_noun + _find_buck_here(u3_noun van, + u3_noun sut, + u3_noun way, + u3_noun p_heg, + u3_noun q_heg, + u3_noun axe, + u3_noun lon, + u3_noun gil) + { + if ( 0 == p_heg ) { + return u3nq + (c3y, + u3nt(u3_nul, + u3nc(u3_nul, u3k(axe)), + u3k(lon)), + c3y, + u3k(sut); + } + else { + return u3nt + (c3n, c3y, u3qa_dec(p_heg)); + } + } + static u3_noun + _find_buck_lose(u3_noun van, + u3_noun sut, + u3_noun way, + u3_noun p_heg, + u3_noun q_heg, + u3_noun axe, + u3_noun lon, + u3_noun gil) + { + return u3nt(c3n, c3y, u3k(p_heg)); + } static u3_noun _find_buck_stop(u3_noun van, u3_noun sut, @@ -36,14 +72,61 @@ u3_noun lon, u3_noun gil) { + if ( u3_nul == q_heg ) { + return _find_buck_here(van, sut, way, p_heg, q_heg, axe, lon, gil); + } + else { + return _find_buck_lose(van, sut, way, p_heg, q_heg, axe, lon, gil); + } } - + + static u3_noun + _find_buck_cell(u3_noun van, + u3_noun p_sut, + u3_noun q_sut, + u3_noun way, + u3_noun p_heg, + u3_noun q_heg, + u3_noun axe, + u3_noun lon, + u3_noun gil) + { + } + + static u3_noun + _find_buck_core(u3_noun van, + u3_noun p_sut, + u3_noun q_sut, + u3_noun way, + u3_noun p_heg, + u3_noun q_heg, + u3_noun axe, + u3_noun lon, + u3_noun gil) + { + } + + static u3_noun + _find_buck_face(u3_noun van, + u3_noun p_sut, + u3_noun q_sut, + u3_noun way, + u3_noun p_heg, + u3_noun q_heg, + u3_noun axe, + u3_noun lon, + u3_noun gil) + { + } + static u3_noun _find_buck(u3_noun van, u3_noun sut, u3_noun way, u3_noun p_heg, u3_noun q_heg, + u3_noun axe, + u3_noun lon, u3_noun gil) { u3_noun p_sut, q_sut, r_sut; @@ -51,11 +134,11 @@ if ( c3n == u3du(sut) ) switch ( sut ) { default: return u3m_bail(c3__fail); - case c3__noun: - { + case c3__noun: { + return _find_buck_stop(van, sut, way, p_heg, axe, lon, gil); } - case c3__void: - { + case c3__void: { + return _find_buck_stop(van, sut, way, p_heg, axe, lon, gil); } } else switch ( u3h(sut) ) { @@ -63,24 +146,55 @@ case c3__atom: u3x_cell(u3t(sut), &p_sut, &q_sut); { + return _find_buck_stop(van, sut, way, p_heg, axe, lon, gil); } case c3__cell: u3x_cell(u3t(sut), &p_sut, &q_sut); { + if ( u3_nul == q_heg ) { + return _find_buck_here(van, sut, way, p_heg, q_heg, axe, lon, gil); + } + else { + return _find_buck_cell + (van, sut, way, p_heg, q_heg, axe, lon, gil); + } } case c3__core: u3x_cell(u3t(sut), &p_sut, &q_sut); { + if ( u3_nul == q_heg ) { + return _find_buck_here(van, sut, way, p_heg, q_heg, axe, lon, gil); + } + else { + return _find_buck_core + (van, p_sut, q_sut, way, p_heg, q_heg, axe, lon, gil); + } } case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); { - } - case c3__fuss: u3x_cell(u3t(sut), &p_sut, &q_sut); - { + if ( u3_nul == q_heg ) { + return _find_buck_here(van, q_sut, way, p_heg, q_heg, axe, lon, gil); + } + return _find_buck_face + (van, p_sut, q_sut, way, p_heg, q_heg, axe, lon, gil); } case c3__fork: p_sut = u3t(sut); { + return _find_buck_fork(van, p_sut, way, p_heg, q_heg, axe, lon, gil); } case c3__hold: p_sut = u3t(sut); { + if ( (c3y == u3qdi_has(gil, sut)) ) { + return u3nt(c3n, c3y, u3k(p_heg)); + } + else { + u3_noun zoc = u3qdi_put(gil, sut); + u3_noun fop = u3qfu_repo(van, sut); + u3_noun pro = _find_buck(van, sut, way, p_heg, q_heg, axe, lon, zoc); + + u3z(fop); + u3z(zoc); + + return pro; + } } } } @@ -194,6 +308,7 @@ { } case c3__hold: p_sut = u3t(sut); + } { } } From 5622a1f312efa55d5e71d5ba64d47e73320364cf Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Tue, 19 Jan 2016 14:36:57 -0800 Subject: [PATCH 102/137] Some cleanups. --- jets/f/ut_find.c | 249 ++++++++++++++++++++++++++++++++++------------- jets/f/ut_tack.c | 4 +- 2 files changed, 182 insertions(+), 71 deletions(-) diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c index 409bb17c56..c9d8eae45f 100644 --- a/jets/f/ut_find.c +++ b/jets/f/ut_find.c @@ -17,6 +17,57 @@ 0)); } + static u3_noun + u3qfu_perk(u3_noun van, + u3_noun sut, + u3_noun way, + u3_noun met) + { + u3_noun von = u3i_molt(u3k(van), u3x_sam, u3k(sut), 0); + u3_noun gat = u3j_hook(von, "perk"); + + return u3n_kick_on(u3i_molt(gat, + u3x_sam_2, + u3k(way), + u3x_sam_3, + u3k(met), + 0)); + } + + static u3_noun + _find_twin(u3_noun hax, + u3_noun yor) + { + if ( c3y == u3r_sing(hax, yor) ) { + return hax; + } + if ( c3n == u3h(hax) ) { + return u3m_error("find-fork"); + } + else { + u3_noun p_hax = u3t(hax); + u3_noun p_yor = u3t(yor); + u3_noun pp_hax = u3h(u3t(hax)); + u3_noun pp_yor = u3h(u3t(yor)); + u3_noun qp_hax = u3t(u3t(hax)); + u3_noun qp_yor = u3t(u3t(yor)); + + if ( c3n == u3r_sing(pp_hax, pp_yor) ) { + return u3m_error("find-fork"); + } + else { + + } + } + pq_hax, pp_yor, pq_yor; + + u3x_cell(u3t_ + else return hax; + } + else { + } + } + static u3_noun _find_no(u3_noun van, u3_noun sut, @@ -82,8 +133,7 @@ static u3_noun _find_buck_cell(u3_noun van, - u3_noun p_sut, - u3_noun q_sut, + u3_noun sut, u3_noun way, u3_noun p_heg, u3_noun q_heg, @@ -91,12 +141,39 @@ u3_noun lon, u3_noun gil) { + u3_noun p_sut, q_sut; + + u3x_cell(u3t(sut), &p_sut, &q_sut); + { + if ( u3_nul == q_heg ) { + return _find_buck_here(van, sut, way, p_heg, q_heg, axe, lon, gil); + } + else { + u3_noun exa = u3qc_peg(axe, 2); + u3_noun hed = _find_buck(van, p_sut, way, p_heg, q_heg, exa, lon, gil); + u3_noun fat; + + u3z(exa); + if ( (c3y == u3h(hed)) || (c3n == u3h(u3t(hed))) ) { + return hed; + } + else { + u3_noun exa = u3qc_peg(axe, 3); + u3_noun tal = _find_buck + (van, q_sut, way, u3t(u3t(hed)), q_heg, exa, lon, gil); + + u3z(exa); + u3z(hed); + + return tal; + } + } + } } static u3_noun _find_buck_core(u3_noun van, - u3_noun p_sut, - u3_noun q_sut, + u3_noun sut, u3_noun way, u3_noun p_heg, u3_noun q_heg, @@ -104,12 +181,81 @@ u3_noun lon, u3_noun gil) { + u3_noun p_sut, q_sut, pq_sut, qq_sut, rq_sut, prq_sut, qrq_sut; + + u3x_cell(u3t(sut), &p_sut, &q_sut); + u3x_trel(q_sut, &pq_sut, &qq_sut, &rq_sut); + u3x_cell(rq_sut, &prq_sut, &qrq_sut); + { + if ( u3_nul == q_heg ) { + return _find_buck_here(van, sut, way, p_heg, q_heg, axe, lon, gil); + } + else { + u3_noun zem = u3qf_look(u3t(q_heg), qrq_sut); + + if ( (u3_nul != zem) && (0 != p_heg) ) { + u3_noun ped; + + ped = u3qa_dec(p_heg); + u3z(p_heg); p_heg = ped; + + u3z(zem); + zem = u3_nul; + } + } + if ( u3_nul != zem ) { + u3_noun u_zem = u3t(zem); + u3_noun pu_zem = u3h(u_zem); + u3_noun qu_zem = u3t(u_zem); + u3_noun mut; + u3_noun pro; + + mut = u3nt(c3__core, + u3k(p_sut), + u3nt(c3__gold, + u3k(qq_sut), + u3k(rq_sut))); + + pro = u3nt + (c3y, + u3nc(u3nc(u3_nul, u3k(axe)), u3k(lon)), + u3nt(c3n, + u3qc_peg(2, pu_zem), + u3nt(u3nc(mut, u3k(qu_zem)), u3_nul, u3_nul))); + + u3z(zem); + return pro; + } + else { + u3_noun pec = u3qfu_perk(van, sut, way, pq_sut); + u3_noun pro; + + if ( c3n == u3h(pec) ) { + pro = _find_buck_lose(van, sut, way, p_heg, q_heg, axe, lon, gil); + } + else if ( c3y == u3t(pec) ) { + u3_noun exa = u3qc_peg(axe, 3); + + pro = _find_buck(van, p_sut, way, p_heg, q_heg, exa, lon, gil); + u3z(exa); + } + else { + u3_noun sam = u3qfu_peek(van, p_sut, way, 2); + u3_noun exa = u3qc_peg(axe, 6); + + pro = _find_buck(van, sam, way, p_heg, q_heg, exa, lon, gil); + u3z(exa); + u3z(sam); + } + u3z(pec); + return pro; + } + } } static u3_noun _find_buck_face(u3_noun van, - u3_noun p_sut, - u3_noun q_sut, + u3_noun sut, u3_noun way, u3_noun p_heg, u3_noun q_heg, @@ -117,6 +263,15 @@ u3_noun lon, u3_noun gil) { + u3_noun p_sut, q_sut; + + u3x_cell(u3t(sut), &p_sut, &q_sut); + + if ( u3_nul == q_heg ) { + return _find_buck_here(van, q_sut, way, p_heg, q_heg, axe, lon, gil); + } + else { + } } static u3_noun @@ -135,50 +290,34 @@ default: return u3m_bail(c3__fail); case c3__noun: { - return _find_buck_stop(van, sut, way, p_heg, axe, lon, gil); + return _find_buck_stop(van, sut, way, p_heg, q_heg, axe, lon, gil); } case c3__void: { - return _find_buck_stop(van, sut, way, p_heg, axe, lon, gil); + return _find_buck_stop(van, sut, way, p_heg, q_heg, axe, lon, gil); } } else switch ( u3h(sut) ) { default: return u3m_bail(c3__fail); - case c3__atom: u3x_cell(u3t(sut), &p_sut, &q_sut); + case c3__atom: { - return _find_buck_stop(van, sut, way, p_heg, axe, lon, gil); + return _find_buck_stop(van, sut, way, p_heg, q_heg, axe, lon, gil); } - case c3__cell: u3x_cell(u3t(sut), &p_sut, &q_sut); + case c3__cell: { - if ( u3_nul == q_heg ) { - return _find_buck_here(van, sut, way, p_heg, q_heg, axe, lon, gil); - } - else { - return _find_buck_cell - (van, sut, way, p_heg, q_heg, axe, lon, gil); - } + return _find_buck_cell(van, sut, way, p_heg, q_heg, axe, lon, gil); } - case c3__core: u3x_cell(u3t(sut), &p_sut, &q_sut); + case c3__core: { - if ( u3_nul == q_heg ) { - return _find_buck_here(van, sut, way, p_heg, q_heg, axe, lon, gil); - } - else { - return _find_buck_core - (van, p_sut, q_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__face: u3x_cell(u3t(sut), &p_sut, &q_sut); + case c3__face: { - if ( u3_nul == q_heg ) { - return _find_buck_here(van, q_sut, way, p_heg, q_heg, axe, lon, gil); - } - return _find_buck_face - (van, p_sut, q_sut, way, p_heg, q_heg, axe, lon, gil); + return _find_buck_face(van, sut, way, p_heg, q_heg, axe, lon, gil); } - case c3__fork: p_sut = u3t(sut); + case c3__fork: { - return _find_buck_fork(van, p_sut, way, p_heg, q_heg, axe, lon, gil); + return _find_buck_fork(van, sut, way, p_heg, q_heg, axe, lon, gil); } case c3__hold: p_sut = u3t(sut); { @@ -218,7 +357,7 @@ u3_noun ret; if ( c3y == u3h(heg) ) { - u3_noun p_heg = u3(heg); // axis + u3_noun p_heg = u3t(heg); // axis ret = u3nq (c3y, @@ -276,43 +415,15 @@ -{ - u3_noun p_sut, q_sut, r_sut; - if ( c3n == u3du(sut) ) switch ( sut ) { - default: return u3m_bail(c3__fail); - case c3__noun: - { - } - case c3__void: - { - } - } - else switch ( u3h(sut) ) { - default: return u3m_bail(c3__fail); - case c3__atom: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - } - case c3__cell: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - } - case c3__core: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - } - case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - } - case c3__fork: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - } - case c3__hold: p_sut = u3t(sut); - } - { - } - } -} + + + + + + static u3_noun _find_in(u3_noun van, diff --git a/jets/f/ut_tack.c b/jets/f/ut_tack.c index d7df575ac4..6aebab50bc 100644 --- a/jets/f/ut_tack.c +++ b/jets/f/ut_tack.c @@ -3,7 +3,7 @@ */ #include "all.h" - u3_noun + u3_noun u3qfu_tack(u3_noun van, u3_noun sut, u3_noun hyp, @@ -18,4 +18,4 @@ u3x_sam_3, u3k(mur), 0)); - } + } From 1847272320bafdeabfff3a70ca00ab8bc018ae69 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Tue, 19 Jan 2016 15:01:36 -0800 Subject: [PATCH 103/137] Remove some old cruft. --- jets/f/ut_find.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c index c9d8eae45f..8cd5f83cee 100644 --- a/jets/f/ut_find.c +++ b/jets/f/ut_find.c @@ -56,7 +56,7 @@ return u3m_error("find-fork"); } else { - + } } pq_hax, pp_yor, pq_yor; From 8d3fa060409bd94622ed8cfd860eca99c644659e Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Wed, 20 Jan 2016 11:34:35 -0800 Subject: [PATCH 104/137] Moar cleanup. --- jets/f/ut_find.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c index 8cd5f83cee..ea482818b5 100644 --- a/jets/f/ut_find.c +++ b/jets/f/ut_find.c @@ -39,7 +39,27 @@ u3_noun yor) { if ( c3y == u3r_sing(hax, yor) ) { - return hax; + return u3k(hax); + } + else if ( u3_nul == hax ) { + return u3k(yor); + } + else if ( u3_nul == yor ) { + return u3k(hax); + } + else if ( c3n == u3h(hax) ) { + if ( (c3n != u3h(yor)) ) { + goto error; + } + else { + u3_noun p_hax = u3t(hax); + u3_noun p_yor = u3t(yor); + + if ( (c3n != u3h(p_hax)) || + (c3n != u3h(p_yor)) ) + { + } + } } if ( c3n == u3h(hax) ) { return u3m_error("find-fork"); @@ -56,7 +76,7 @@ return u3m_error("find-fork"); } else { - + } } pq_hax, pp_yor, pq_yor; @@ -66,6 +86,9 @@ } else { } + + error: + return u3m_error("find-fork"); } static u3_noun From 1931b4d46c8b883e8a52a7bf07692d863db6f6c1 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Wed, 20 Jan 2016 13:33:07 -0800 Subject: [PATCH 105/137] Double solid. --- jets/f/ut_find.c | 52 +++++++++++++++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 18 deletions(-) diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c index ea482818b5..db1371139e 100644 --- a/jets/f/ut_find.c +++ b/jets/f/ut_find.c @@ -52,33 +52,49 @@ goto error; } else { - u3_noun p_hax = u3t(hax); - u3_noun p_yor = u3t(yor); + u3_noun p_hax = u3t(hax); // (each @ud {span nock}) + u3_noun p_yor = u3t(yor); // (each @ud {span nock}) - if ( (c3n != u3h(p_hax)) || - (c3n != u3h(p_yor)) ) - { + if ( (c3n != u3h(p_hax)) || (c3n != u3h(p_yor)) ) { + goto error; + } + else { + u3_noun pp_hax = u3t(p_hax); // {span nock} + u3_noun pp_yor = u3t(p_yor); // {span nock} + u3_noun ppp_hax = u3h(pp_hax); // span + u3_noun ppp_yor = u3h(pp_yor); // span + u3_noun qpp_hax = u3h(pp_hax); // nock + u3_noun qpp_yor = u3h(pp_yor); // nock + + if ( c3n == u3r_sing(qpp_hax, qpp_yor) ) { + goto error; + } + return u3nq(c3n, + c3n, + u3kf_fork(u3nt(u3k(ppp_hax), u3k(ppp_yor), u3_nul)), + u3k(qpp_hax)); } } } - if ( c3n == u3h(hax) ) { - return u3m_error("find-fork"); - } else { - u3_noun p_hax = u3t(hax); - u3_noun p_yor = u3t(yor); - u3_noun pp_hax = u3h(u3t(hax)); - u3_noun pp_yor = u3h(u3t(yor)); - u3_noun qp_hax = u3t(u3t(hax)); - u3_noun qp_yor = u3t(u3t(yor)); - - if ( c3n == u3r_sing(pp_hax, pp_yor) ) { + if ( c3n == u3h(yor) ) { return u3m_error("find-fork"); } else { - + u3_noun p_hax = u3t(hax); + u3_noun p_yor = u3t(yor); + u3_noun pp_hax = u3h(u3t(hax)); + u3_noun pp_yor = u3h(u3t(yor)); + u3_noun qp_hax = u3t(u3t(hax)); + u3_noun qp_yor = u3t(u3t(yor)); + + if ( c3n == u3r_sing(pp_hax, pp_yor) ) { + return u3m_error("find-fork"); + } + else { + + } } - } pq_hax, pp_yor, pq_yor; u3x_cell(u3t_ From d93f96a21af0bb8e560e06a606038823f10ca979 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Wed, 20 Jan 2016 17:35:11 -0800 Subject: [PATCH 106/137] ut_find.c compiles, not yet activated. --- Makefile | 1 + include/jets/q.h | 2 +- jets/f/ut_find.c | 902 ++++++++++++++++++++++------------------------- 3 files changed, 417 insertions(+), 488 deletions(-) diff --git a/Makefile b/Makefile index fb4c2c2b13..a613658953 100644 --- a/Makefile +++ b/Makefile @@ -291,6 +291,7 @@ J_F_OFILES_UT=\ jets/f/ut_buss.o \ jets/f/ut_conk.o \ jets/f/ut_crop.o \ + jets/f/ut_find.o \ jets/f/ut_fire.o \ jets/f/ut_fish.o \ jets/f/ut_fuse.o \ diff --git a/include/jets/q.h b/include/jets/q.h index 82f048d5c9..cd27630080 100644 --- a/include/jets/q.h +++ b/include/jets/q.h @@ -203,7 +203,7 @@ u3_noun u3qfu_dung(u3_noun, u3_noun cap, u3_noun); u3_noun u3qfu_dunq(u3_noun, const c3_c*, u3_noun); void u3qfu_dump(u3_noun, const c3_c*, u3_noun); - u3_noun u3qfu_find(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); + u3_noun u3qfu_find(u3_noun, u3_noun, u3_noun, u3_noun); u3_noun u3qfu_finc(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); u3_noun u3qfu_fink(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); u3_noun u3qfu_fire(u3_noun, u3_noun, u3_noun); diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c index db1371139e..aeda561fb7 100644 --- a/jets/f/ut_find.c +++ b/jets/f/ut_find.c @@ -3,6 +3,16 @@ */ #include "all.h" + static u3_noun + _find_buck(u3_noun van, + u3_noun sut, + u3_noun way, + u3_noun p_heg, + u3_noun q_heg, + u3_noun axe, + u3_noun lon, + u3_noun gil); + static u3_noun u3qfu_felt(u3_noun van, u3_noun sut, @@ -17,6 +27,20 @@ 0)); } + static u3_noun + u3qfu_fine(u3_noun van, + u3_noun sut, + u3_noun tor) + { + u3_noun von = u3i_molt(u3k(van), u3x_sam, u3k(sut), 0); + u3_noun gat = u3j_hook(von, "fine"); + + return u3n_kick_on(u3i_molt(gat, + u3x_sam, + u3k(tor), + 0)); + } + static u3_noun u3qfu_perk(u3_noun van, u3_noun sut, @@ -34,87 +58,6 @@ 0)); } - static u3_noun - _find_twin(u3_noun hax, - u3_noun yor) - { - if ( c3y == u3r_sing(hax, yor) ) { - return u3k(hax); - } - else if ( u3_nul == hax ) { - return u3k(yor); - } - else if ( u3_nul == yor ) { - return u3k(hax); - } - else if ( c3n == u3h(hax) ) { - if ( (c3n != u3h(yor)) ) { - goto error; - } - else { - u3_noun p_hax = u3t(hax); // (each @ud {span nock}) - u3_noun p_yor = u3t(yor); // (each @ud {span nock}) - - if ( (c3n != u3h(p_hax)) || (c3n != u3h(p_yor)) ) { - goto error; - } - else { - u3_noun pp_hax = u3t(p_hax); // {span nock} - u3_noun pp_yor = u3t(p_yor); // {span nock} - u3_noun ppp_hax = u3h(pp_hax); // span - u3_noun ppp_yor = u3h(pp_yor); // span - u3_noun qpp_hax = u3h(pp_hax); // nock - u3_noun qpp_yor = u3h(pp_yor); // nock - - if ( c3n == u3r_sing(qpp_hax, qpp_yor) ) { - goto error; - } - return u3nq(c3n, - c3n, - u3kf_fork(u3nt(u3k(ppp_hax), u3k(ppp_yor), u3_nul)), - u3k(qpp_hax)); - } - } - } - else { - if ( c3n == u3h(yor) ) { - return u3m_error("find-fork"); - } - else { - u3_noun p_hax = u3t(hax); - u3_noun p_yor = u3t(yor); - u3_noun pp_hax = u3h(u3t(hax)); - u3_noun pp_yor = u3h(u3t(yor)); - u3_noun qp_hax = u3t(u3t(hax)); - u3_noun qp_yor = u3t(u3t(yor)); - - if ( c3n == u3r_sing(pp_hax, pp_yor) ) { - return u3m_error("find-fork"); - } - else { - - } - } - pq_hax, pp_yor, pq_yor; - - u3x_cell(u3t_ - else return hax; - } - else { - } - - error: - return u3m_error("find-fork"); - } - - static u3_noun - _find_no(u3_noun van, - u3_noun sut, - u3_noun way, - u3_noun hyp, - u3_noun p_mor) - { - } static u3_noun _find_buck_here(u3_noun van, @@ -133,7 +76,7 @@ u3nc(u3_nul, u3k(axe)), u3k(lon)), c3y, - u3k(sut); + u3k(sut)); } else { return u3nt @@ -190,10 +133,9 @@ else { u3_noun exa = u3qc_peg(axe, 2); u3_noun hed = _find_buck(van, p_sut, way, p_heg, q_heg, exa, lon, gil); - u3_noun fat; u3z(exa); - if ( (c3y == u3h(hed)) || (c3n == u3h(u3t(hed))) ) { + if ( (u3_nul == hed) || (c3y == u3h(hed)) || (c3n == u3h(u3t(hed))) ) { return hed; } else { @@ -241,53 +183,271 @@ u3z(zem); zem = u3_nul; } - } - if ( u3_nul != zem ) { - u3_noun u_zem = u3t(zem); - u3_noun pu_zem = u3h(u_zem); - u3_noun qu_zem = u3t(u_zem); - u3_noun mut; - u3_noun pro; - mut = u3nt(c3__core, - u3k(p_sut), - u3nt(c3__gold, - u3k(qq_sut), - u3k(rq_sut))); + if ( u3_nul != zem ) { + u3_noun u_zem = u3t(zem); + u3_noun pu_zem = u3h(u_zem); + u3_noun qu_zem = u3t(u_zem); + u3_noun mut; + u3_noun pro; - pro = u3nt - (c3y, - u3nc(u3nc(u3_nul, u3k(axe)), u3k(lon)), - u3nt(c3n, - u3qc_peg(2, pu_zem), - u3nt(u3nc(mut, u3k(qu_zem)), u3_nul, u3_nul))); - - u3z(zem); - return pro; - } - else { - u3_noun pec = u3qfu_perk(van, sut, way, pq_sut); - u3_noun pro; + mut = u3nt(c3__core, + u3k(p_sut), + u3nt(c3__gold, + u3k(qq_sut), + u3k(rq_sut))); - if ( c3n == u3h(pec) ) { - pro = _find_buck_lose(van, sut, way, p_heg, q_heg, axe, lon, gil); - } - else if ( c3y == u3t(pec) ) { - u3_noun exa = u3qc_peg(axe, 3); - - pro = _find_buck(van, p_sut, way, p_heg, q_heg, exa, lon, gil); - u3z(exa); + pro = u3nt + (c3y, + u3nc(u3nc(u3_nul, u3k(axe)), u3k(lon)), + u3nt(c3n, + u3qc_peg(2, pu_zem), + u3nt(u3nc(mut, u3k(qu_zem)), u3_nul, u3_nul))); + + u3z(zem); + return pro; } else { - u3_noun sam = u3qfu_peek(van, p_sut, way, 2); - u3_noun exa = u3qc_peg(axe, 6); + u3_noun pec = u3qfu_perk(van, sut, way, pq_sut); + u3_noun pro; - pro = _find_buck(van, sam, way, p_heg, q_heg, exa, lon, gil); - u3z(exa); - u3z(sam); + if ( c3n == u3h(pec) ) { + pro = _find_buck_lose(van, sut, way, p_heg, q_heg, axe, lon, gil); + } + else if ( c3y == u3t(pec) ) { + u3_noun exa = u3qc_peg(axe, 3); + + pro = _find_buck(van, p_sut, way, p_heg, q_heg, exa, lon, gil); + u3z(exa); + } + else { + u3_noun sam = u3qfu_peek(van, p_sut, way, 2); + u3_noun exa = u3qc_peg(axe, 6); + + pro = _find_buck(van, sam, way, p_heg, q_heg, exa, lon, gil); + u3z(exa); + u3z(sam); + } + u3z(pec); + return pro; } - u3z(pec); - return pro; + } + } + } + + static u3_noun + _find_twin(u3_noun hax, + u3_noun yor) + { + if ( c3y == u3r_sing(hax, yor) ) { + return u3k(hax); + } + else if ( u3_nul == hax ) { + return u3k(yor); + } + else if ( u3_nul == yor ) { + return u3k(hax); + } + else if ( c3n == u3h(hax) ) { + if ( (c3n != u3h(yor)) ) { + goto error; + } + else { + u3_noun p_hax = u3t(hax); // (each @ud {span nock}) + u3_noun p_yor = u3t(yor); // (each @ud {span nock}) + + if ( (c3n != u3h(p_hax)) || (c3n != u3h(p_yor)) ) { + goto error; + } + else { + u3_noun pp_hax = u3t(p_hax); // {span nock} + u3_noun pp_yor = u3t(p_yor); // {span nock} + u3_noun ppp_hax = u3h(pp_hax); // span + u3_noun ppp_yor = u3h(pp_yor); // span + u3_noun qpp_hax = u3h(pp_hax); // nock + u3_noun qpp_yor = u3h(pp_yor); // nock + + if ( c3n == u3r_sing(qpp_hax, qpp_yor) ) { + goto error; + } + return u3nq(c3n, + c3n, + u3kf_fork(u3nt(u3k(ppp_hax), u3k(ppp_yor), u3_nul)), + u3k(qpp_hax)); + } + } + } + else { + if ( c3n == u3h(yor) ) { + return u3m_error("find-fork"); + } + else { + u3_noun p_hax = u3t(hax); // {vein opal} + u3_noun p_yor = u3t(yor); // {vein opal} + u3_noun pp_hax = u3h(p_hax); // vein + u3_noun pp_yor = u3h(p_yor); // vein + u3_noun qp_hax = u3t(p_hax); // opal + u3_noun qp_yor = u3t(p_yor); // opal + + if ( c3n == u3r_sing(pp_hax, pp_yor) ) { + goto error; + } + else { + if ( c3y == u3h(qp_hax) ) { + if ( c3y != u3h(qp_yor) ) { + goto error; + } else { + u3_noun pqp_hax = u3t(qp_hax); // span + u3_noun pqp_yor = u3t(qp_yor); // span + + return + u3nt(c3y, + u3k(pp_hax), + u3kf_fork(u3nt(u3k(pqp_hax), u3k(pqp_yor), u3_nul))); + } + } + else if ( c3n != u3h(qp_yor) ) { + goto error; + } else { + u3_noun pqp_hax = u3h(u3t(qp_hax)); // axis + u3_noun pqp_yor = u3h(u3t(qp_yor)); // axis + u3_noun qqp_hax = u3t(u3t(qp_hax)); // (set {span foot}) + u3_noun qqp_yor = u3t(u3t(qp_yor)); // (set {span foot}) + + if ( c3n == u3r_sing(pqp_hax, pqp_yor) ) { + goto error; + } else { + return + u3nt(c3y, + u3k(pp_hax), + u3nt(c3n, u3k(pqp_hax), u3qdi_uni(qqp_hax, qqp_yor))); + } + } + } + } + } + error: { + return u3m_error("find-fork"); + } + } + + static u3_noun + _find_buck_fork_twin(u3_noun wiz) + { + if ( u3_nul == wiz ) { + return u3_nul; + } + else if ( u3_nul == u3t(wiz) ) { + return u3h(wiz); + } + else return _find_twin(u3h(wiz), _find_buck_fork_twin(u3t(wiz))); + } + + static u3_noun + _find_buck_fork_turn(u3_noun van, + u3_noun yed, + u3_noun way, + u3_noun p_heg, + u3_noun q_heg, + u3_noun axe, + u3_noun lon, + u3_noun gil) + { + if ( u3_nul == yed ) { + return u3_nul; + } else { + return u3nc + (_find_buck(van, u3h(yed), way, p_heg, q_heg, axe, lon, gil), + _find_buck_fork_turn(van, u3t(yed), way, p_heg, q_heg, axe, lon, gil)); + } + } + + static u3_noun + _find_buck_fork(u3_noun van, + u3_noun sut, + u3_noun way, + u3_noun p_heg, + u3_noun q_heg, + u3_noun axe, + u3_noun lon, + u3_noun gil) + { + u3_noun p_sut = u3t(sut); + u3_noun yed = u3qdi_tap(p_sut, u3_nul); + u3_noun wiz; + u3_noun ret; + + wiz = _find_buck_fork_turn(van, yed, way, p_heg, q_heg, axe, lon, gil); + u3z(yed); + + ret = _find_buck_fork_twin(wiz); + u3z(wiz); + + return ret; + } + + static u3_noun + _find_buck_face_next(u3_noun van, + u3_noun q_sut, + u3_noun qp_sut, + u3_noun way, + u3_noun p_heg, + u3_noun q_heg, + u3_noun axe, + u3_noun lon, + u3_noun gil) + { + if ( u3_nul == qp_sut ) { + u3_noun nol = u3nc(u3_nul, u3k(lon)); + u3_noun ret = _find_buck(van, q_sut, way, p_heg, q_heg, axe, nol, gil); + u3z(nol); + return ret; + } + else { + u3_noun iqp_sut = u3h(qp_sut); // (pair span nock) + u3_noun tqp_sut = u3t(qp_sut); // (list (pair span nock)) + u3_noun piqp_sut = u3h(iqp_sut); // span + u3_noun qiqp_sut = u3t(iqp_sut); // nock + u3_noun fid = _find_buck // pony + (van, piqp_sut, way, p_heg, q_heg, 1, u3_nul, u3_nul); + + if ( u3_nul == fid ) { + return u3_nul; + } + else if ( (c3n == u3h(fid)) && (c3y == u3h(u3t(fid))) ) { + u3_noun ret; + + ret = _find_buck_face_next + (van, q_sut, tqp_sut, way, p_heg, q_heg, u3t(u3t(fid)), lon, gil); + u3z(fid); + return ret; + } + else { + u3_noun tor; // port + u3_noun vat; // (pair span nock) + u3_noun ret; + u3_noun dog = u3nc(0, u3k(axe)); // nock + + if ( c3y == u3h(fid) ) { + tor = u3k(fid); + } else { + tor = u3nc(c3n, u3k(u3t(u3t(fid)))); + } + u3z(fid); + + vat = u3qfu_fine(van, q_sut, tor); + u3z(tor); + + ret = u3nq + (c3n, + c3n, + u3k(u3h(vat)), + u3qf_comb(u3t(vat), u3qf_comb(dog, qiqp_sut))); + + u3z(vat); + u3z(dog); + + return ret; } } } @@ -310,6 +470,68 @@ return _find_buck_here(van, q_sut, way, p_heg, q_heg, axe, lon, gil); } else { + u3_noun uq_heg = u3t(q_heg); // term + + if ( c3y == u3ud(p_sut) ) { + if ( c3y == u3r_sing(p_sut, uq_heg) ) { + return _find_buck_here(van, q_sut, way, p_heg, q_heg, axe, lon, gil); + } + else { + return _find_buck_lose(van, sut, way, p_heg, q_heg, axe, lon, gil); + } + } + else { + u3_noun pp_sut = u3h(p_heg); // (map term (unit port)) + u3_noun qp_sut = u3h(p_heg); // (list (pair span nock)) + u3_noun tyr = u3qdb_get(pp_sut, uq_heg); // (unit (unit port)) + + if ( u3_nul == tyr ) { + return _find_buck_face_next + (van, q_sut, qp_sut, way, p_heg, q_heg, axe, lon, gil); + } + else { + u3_noun u_tyr = u3t(tyr); // (unit port) + + if ( u3_nul == u_tyr ) { + u3_noun nol = u3nc(u3_nul, u3k(lon)); + u3_noun dep = u3qa_inc(p_heg); + u3_noun ret = _find_buck + (van, q_sut, way, dep, q_heg, axe, nol, gil); + + u3z(dep); + u3z(nol); + return ret; + } + else { + u3_noun uu_tyr = u3t(u_tyr); + + if ( c3y == u3h(uu_tyr) ) { + u3_noun puu_tyr = u3t(uu_tyr); // (pair vein opal) + u3_noun ppuu_tyr = u3h(puu_tyr); // vein + u3_noun qpuu_tyr = u3t(puu_tyr); // opal + u3_noun nol = // vein + u3nt(u3_nul, u3nc(u3_nul, u3k(axe)), u3k(lon)); + u3_noun ret; + + ret = u3nt(c3y, u3qb_weld(ppuu_tyr, nol), u3k(qpuu_tyr)); + u3z(nol); + return ret; + } + else { + u3_noun puu_tyr = u3t(uu_tyr); // (pair span nock) + u3_noun ppuu_tyr = u3h(puu_tyr); // span + u3_noun qpuu_tyr = u3t(puu_tyr); // nock + u3_noun dog = u3nc(0, u3k(axe)); // nock + u3_noun ret; + + ret = u3nq(c3n, c3n, u3k(ppuu_tyr), u3qf_comb(dog, qpuu_tyr)); + u3z(dog); + + return ret; + } + } + } + } } } @@ -323,8 +545,6 @@ u3_noun lon, u3_noun gil) { - u3_noun p_sut, q_sut, r_sut; - if ( c3n == u3du(sut) ) switch ( sut ) { default: return u3m_bail(c3__fail); @@ -358,7 +578,7 @@ { return _find_buck_fork(van, sut, way, p_heg, q_heg, axe, lon, gil); } - case c3__hold: p_sut = u3t(sut); + case c3__hold: { if ( (c3y == u3qdi_has(gil, sut)) ) { return u3nt(c3n, c3y, u3k(p_heg)); @@ -379,11 +599,11 @@ static u3_noun - _find_yes(u3_noun van, - u3_noun sut, // span - u3_noun way, // ?(%read %rite %free %both) - u3_noun i_hyp, // limb - u3_noun p_mor) // palo + _find_limb(u3_noun van, + u3_noun sut, // span + u3_noun way, // ?(%read %rite %free %both) + u3_noun i_hyp, // limb + u3_noun p_mor) // palo { u3_noun pp_mor = u3h(p_mor); // vein u3_noun qp_mor = u3t(p_mor); // opal @@ -402,7 +622,7 @@ (c3y, u3nc(u3nc(u3_nul, u3k(p_heg)), u3k(lon)), c3y, - u3qfu_peek(van, ref, way, p_heg); + u3qfu_peek(van, ref, way, p_heg)); } else { u3_noun p_heg = u3h(u3t(heg)); // @ud @@ -420,10 +640,10 @@ } static u3_noun - _find_outer(u3_noun van, - u3_noun sut, - u3_noun way, - u3_noun hyp) + _find_pony(u3_noun van, + u3_noun sut, + u3_noun way, + u3_noun hyp) { if ( u3_nul == hyp ) { return u3nq(c3y, u3_nul, c3y, u3k(sut)); @@ -431,17 +651,34 @@ else { u3_noun i_hyp = u3h(hyp); u3_noun t_hyp = u3t(hyp); - u3_noun mor = _find_outer(van, sut, way, t_hyp); - u3_noun p_mor = u3t(mor); + u3_noun mor = _find_pony(van, sut, way, t_hyp); if ( c3n == u3h(mor) ) { - u3_noun ret = _find_no(van, sut, way, i_hyp, p_mor); + u3_noun p_mor = u3t(mor); - u3z(mor); - return ret; + if ( c3y == u3h(p_mor) ) { + return mor; + } + else { + u3_noun pp_mor = u3t(p_mor); // {span nock} + u3_noun ppp_mor = u3h(pp_mor); // span + u3_noun qpp_mor = u3h(pp_mor); // nock + u3_noun gen = u3nt(c3__wing, u3k(i_hyp), u3_nul); + u3_noun fex = u3qfu_mint(van, ppp_mor, c3__noun, gen); + u3_noun ret = u3nq(c3n, + c3n, + u3k(u3h(fex)), + u3qf_comb(qpp_mor, u3t(fex))); + u3z(fex); + u3z(gen); + u3z(mor); + + return ret; + } } else { - u3_noun ret = _find_yes(van, sut, way, i_hyp, p_mor); + u3_noun p_mor = u3t(mor); + u3_noun ret = _find_limb(van, sut, way, i_hyp, p_mor); u3z(mor); return ret; @@ -449,345 +686,38 @@ } } - - - - - - - - - - - - - - - - static u3_noun - _find_in(u3_noun van, - u3_noun sut, - u3_noun dep, - u3_noun way, - u3_noun hyp, - u3_noun gil) - { - u3_noun p_sut, q_sut; - - c3_assert(0); - if ( c3y == u3ud(sut) ) { - return u3nc(u3k(dep), u3_nul); - } - else switch ( u3h(sut) ) { - default: return u3nc(u3k(dep), u3_nul); - - case c3__bull: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { - return u3m_bail(c3__fail); - } - else { - if ( (c3n == u3du(cug)) || - (c3n == u3r_sing(u3t(cug), u3h(p_sut))) ) { - return _find_in(van, q_sut, dep, way, cug, gil); - } - else { - if ( 0 == dep ) { - return u3nc(0, - u3nt(u3_nul, - 1, - u3nt(2, u3k(p_sut), - u3k(q_sut)))); - } else { - return _find_in(van, q_sut, u3qa_dec(dep), way, cug, gil); - } - } - } - } - case c3__cell: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { - return u3m_bail(c3__fail); - } else { - u3_noun taf = _find_in(van, p_sut, dep, way, cug, gil); - u3_noun p_taf = u3h(taf); - u3_noun q_taf = u3t(taf); - u3_noun ret; - - if ( u3_nul == q_taf ) { - u3_noun bov = _find_in(van, q_sut, p_taf, way, cug, gil); - u3_noun p_bov = u3h(bov); - u3_noun q_bov = u3t(bov); - - if ( u3_nul == q_bov ) { - ret = u3k(bov); - } - else { - u3_noun puq_bov, quq_bov; - - u3r_mean(q_bov, 6, &puq_bov, 7, &quq_bov, 0); - ret = u3nq(u3k(p_bov), - u3_nul, - u3qc_peg(3, puq_bov), - u3k(quq_bov)); - } - u3z(bov); - } - else { - u3_noun puq_taf, quq_taf; - - u3r_mean(q_taf, 6, &puq_taf, 7, &quq_taf, 0); - ret = u3nq(u3k(p_taf), - u3_nul, - u3qc_peg(2, puq_taf), - u3k(quq_taf)); - } - u3z(taf); - return ret; - } - } - case c3__core: { - u3_noun pq_sut, qq_sut, rq_sut; - u3_noun prq_sut, qrq_sut; - - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) || - (c3n == u3r_trel(q_sut, &pq_sut, &qq_sut, &rq_sut)) || - (c3n == u3r_cell(rq_sut, &prq_sut, &qrq_sut)) ) - { - return u3m_bail(c3__fail); - } else { - u3_noun zem = (c3n == u3du(cug)) - ? u3_nul - : u3qf_look(u3t(cug), qrq_sut); - - if ( (u3_nul != zem) && (0 != dep) ) { - u3_noun ped; - - ped = u3qa_dec(dep); - u3z(dep); dep = ped; - - u3z(zem); - zem = u3_nul; - } - - if ( u3_nul == zem ) { - u3_noun taf = _find_in(van, p_sut, dep, way, cug, gil); - u3_noun p_taf = u3h(taf); - u3_noun q_taf = u3t(taf); - - if ( u3_nul == q_taf ) { - u3z(taf); - return u3nc(u3k(dep), u3_nul); - } - else { - u3_noun puq_taf, quq_taf; - u3_noun pro; - - u3r_mean(q_taf, 6, &puq_taf, 7, &quq_taf, 0); - - if ( c3n == u3qfu_park(van, sut, way, puq_taf) ) - { - u3_noun weh = u3qfu_shep(van, "way", 'a', u3k(way)); - u3_noun waz = u3qfu_shep(van, "axis", 'd', u3k(puq_taf)); - - u3t_push(u3nc(c3__mean, weh)); - u3t_push(u3nc(c3__mean, waz)); - return u3m_error("find-park"); - } - else { - pro = u3nq(u3k(p_taf), - u3_nul, - u3qc_peg(3, puq_taf), - u3k(quq_taf)); - - u3z(taf); - return pro; - } - } - } - else { - u3_noun u_zem = u3t(zem); - u3_noun pu_zem = u3h(u_zem); - u3_noun qu_zem = u3t(u_zem); - u3_noun mut; - u3_noun pro; - - mut = u3nt(c3__core, - u3k(p_sut), - u3nt(c3__gold, - u3k(qq_sut), - u3k(rq_sut))); - - pro = u3nc(0, - u3nq(u3_nul, - 1, - 1, - u3nc(u3qc_peg(2, pu_zem), - u3nc(u3nc(mut, u3k(qu_zem)), - u3_nul)))); - u3z(zem); - return pro; - } - } - } - case c3__face: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { - return u3m_bail(c3__fail); - } else { - if ( (c3n == u3du(cug)) || (c3n == u3r_sing(u3t(cug), p_sut)) ) { - return u3nc(u3k(dep), u3_nul); - } else { - if ( 0 == dep ) { - return u3nc(0, u3nq(u3_nul, 1, 0, u3k(q_sut))); - } else { - return u3nc - (u3qa_dec(dep), u3_nul); - } - } - } - } - case c3__cube: { - u3_noun fop = u3qfu_repo(van, sut); - u3_noun pro = _find_in(van, fop, dep, way, cug, gil); - - u3z(fop); - return pro; - } - case c3__fork: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { - return u3m_bail(c3__fail); - } - - if ( (c3y == u3qdi_has(gil, q_sut)) ) { - return _find_in(van, p_sut, dep, way, cug, gil); - } - else if ( (c3y == u3qdi_has(gil, p_sut)) ) { - return _find_in(van, q_sut, dep, way, cug, gil); - } - else { - u3_noun hax = _find_in(van, p_sut, dep, way, cug, gil); - u3_noun yor = _find_in(van, q_sut, dep, way, cug, gil); - u3_noun p_hax = u3h(hax); - u3_noun p_yor = u3h(yor); - u3_noun q_hax = u3t(hax); - u3_noun q_yor = u3t(yor); - u3_noun puq_hax, quq_hax; - u3_noun puq_yor, quq_yor; - u3_noun ret = 0; - - if ( u3_nul != q_hax ) { - u3r_mean(q_hax, 6, &puq_hax, 7, &quq_hax, 0); - } - if ( u3_nul != q_yor ) { - u3r_mean(q_yor, 6, &puq_yor, 7, &quq_yor, 0); - } - - if ( c3y == u3r_sing(hax, yor) ) { - ret = u3k(hax); - } - else { - if ( (c3n == u3r_sing(p_hax, p_yor)) || - ((u3_nul == q_hax) || (u3_nul == q_yor)) || - (c3n == u3r_sing(puq_hax, puq_yor)) || - (c3n == u3r_sing(u3h(quq_hax), u3h(quq_yor))) ) - { - return u3m_error("find-fork"); - } - switch ( u3h(quq_hax) ) { - case 0: { - u3_noun pquq_hax = u3t(quq_hax); - u3_noun pquq_yor = u3t(quq_yor); - - ret = u3nc(u3k(p_hax), - u3nq(u3_nul, - u3k(puq_hax), - 0, - u3qf_fork(pquq_hax, pquq_yor))); - break; - } - case 1: { - u3_noun pquq_hax, qquq_hax, pquq_yor, qquq_yor; - - u3x_cell(u3t(quq_hax), &pquq_hax, &qquq_hax); - u3x_cell(u3t(quq_yor), &pquq_yor, &qquq_yor); - - if ( c3n == u3r_sing(pquq_hax, pquq_yor) ) { - return u3m_error("find-fork"); - } else { - ret = u3nc(u3k(p_hax), - u3nq(u3_nul, - u3k(puq_hax), - 1, - u3nc(u3k(pquq_hax), - u3qb_weld(qquq_hax, qquq_yor)))); - break; - } - } - case 2: { - u3_noun pquq_hax, qquq_hax, pquq_yor, qquq_yor; - u3_noun ppquq_hax, qpquq_hax, rpquq_hax, spquq_hax; - u3_noun ppquq_yor, qpquq_yor, rpquq_yor, spquq_yor; - - u3x_cell(u3t(quq_hax), &pquq_hax, &qquq_hax); - u3x_cell(u3t(quq_yor), &pquq_yor, &qquq_yor); - u3x_qual(pquq_hax, - &ppquq_hax, &qpquq_hax, &rpquq_hax, &spquq_hax); - u3x_qual(pquq_yor, - &ppquq_yor, &qpquq_yor, &rpquq_yor, &spquq_yor); - - if ( (c3n == u3r_sing(ppquq_hax, ppquq_yor)) || - (c3n == u3r_sing(qpquq_hax, qpquq_yor)) || - (c3n == u3r_sing(rpquq_hax, rpquq_yor)) ) - { - return u3m_error("find-fork"); - } - else { - ret = u3nc(u3k(p_hax), - u3nq(u3_nul, - u3k(puq_hax), - 2, - u3nc(u3nq(u3k(ppquq_hax), - u3k(qpquq_hax), - u3k(rpquq_hax), - u3qf_fork(spquq_hax, - spquq_yor)), - u3qf_fork(qquq_hax, qquq_yor)))); - break; - } - } - } - } - u3z(yor); - u3z(hax); - - return ret; - } - } - case c3__hold: p_sut = u3t(sut); - { - if ( (c3y == u3qdi_has(gil, sut)) ) { - return u3nc(u3k(dep), u3_nul); - } - else { - u3_noun zoc = u3qdi_put(gil, sut); - u3_noun fop = u3qfu_repo(van, sut); - u3_noun pro = _find_in(van, fop, dep, way, cug, zoc); - - u3z(fop); - u3z(zoc); - - return pro; - } - } - } - } - u3_noun _cqfu_find(u3_noun van, u3_noun sut, - u3_noun dep, u3_noun way, - u3_noun cug) + u3_noun hyp) { - return _find_in(van, sut, dep, way, cug, u3_nul); + u3_noun taf = _find_pony(van, sut, way, hyp); + + if ( u3_nul == taf ) { + goto error; + } + else { + if ( c3y == u3h(taf) ) { + return taf; + } + else { + if ( c3n == u3h(u3t(taf)) ) { + u3_noun fat = u3nc(c3n, u3k(u3t(u3t(taf)))); + + u3z(taf); + return fat; + } + else { + goto error; + } + } + } + error: { + u3m_p("wing", hyp); + + return u3m_error("find"); + } } /* boilerplate @@ -795,37 +725,35 @@ u3_noun u3wfu_find(u3_noun cor) { - u3_noun sut, dep, way, cug, van; + u3_noun sut, way, hyp, van; - if ( (c3n == u3r_mean(cor, u3x_sam_2, &dep, - u3x_sam_6, &way, - u3x_sam_7, &cug, + if ( (c3n == u3r_mean(cor, u3x_sam_2, &way, + u3x_sam_3, &hyp, u3x_con, &van, 0)) || (u3_none == (sut = u3r_at(u3x_sam, van))) ) { return u3m_bail(c3__fail); } else { - return _cqfu_find(van, sut, dep, way, cug); + return _cqfu_find(van, sut, way, hyp); } } u3_noun u3qfu_find(u3_noun van, u3_noun sut, - u3_noun dep, u3_noun way, - u3_noun cug) + u3_noun hyp) { c3_m fun_m = c3__find + !!u3r_at(u3qfu_van_vet, van); - u3_noun pro = u3z_find_4(fun_m, sut, dep, way, cug); + u3_noun pro = u3z_find_3(fun_m, sut, way, hyp); if ( u3_none != pro ) { return pro; } else { - pro = _cqfu_find(van, sut, dep, way, cug); + pro = _cqfu_find(van, sut, way, hyp); - return u3z_save_4(fun_m, sut, dep, way, cug, pro); + return u3z_save_3(fun_m, sut, way, hyp, pro); } } From 70976954a13034571d35293003922ed66c726e54 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Thu, 21 Jan 2016 09:39:50 -0800 Subject: [PATCH 107/137] Some cleanups; still debugging ++find. --- jets/tree.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jets/tree.c b/jets/tree.c index 6a56bef444..9f6f1e8277 100644 --- a/jets/tree.c +++ b/jets/tree.c @@ -348,6 +348,7 @@ static u3j_harm _mood__hoon__ut_burn_a[] = {{".2", u3wfu_burn}, {}}; static u3j_harm _mood__hoon__ut_conk_a[] = {{".2", u3wfu_conk}, {}}; static u3j_harm _mood__hoon__ut_crop_a[] = {{".2", u3wfu_crop}, {}}; // static u3j_harm _mood__hoon__ut_fire_a[] = {{".2", u3wfu_fire}, {}}; +static u3j_harm _mood__hoon__ut_find_a[] = {{".2", u3wfu_find, c3n}, {}}; static u3j_harm _mood__hoon__ut_fish_a[] = {{".2", u3wfu_fish}, {}}; static u3j_harm _mood__hoon__ut_fuse_a[] = {{".2", u3wfu_fuse}, {}}; static u3j_harm _mood__hoon__ut_mint_a[] = {{".2", u3wfu_mint}, {}}; @@ -365,6 +366,7 @@ static u3j_core _mood__hoon__ut_d[] = { "burn", _mood__hoon__ut_burn_a }, { "conk", _mood__hoon__ut_conk_a }, { "crop", _mood__hoon__ut_crop_a }, + { "find", _mood__hoon__ut_find_a }, // { "fire", _mood__hoon__ut_fire_a }, { "fish", _mood__hoon__ut_fish_a }, { "fuse", _mood__hoon__ut_fuse_a }, From 7b75e647da909c3894374e6a4645c96bbdde6a3b Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Thu, 21 Jan 2016 11:13:27 -0800 Subject: [PATCH 108/137] Better wiring for find testing. --- include/c/motes.h | 1 + include/jets/q.h | 2 +- include/jets/w.h | 1 + jets/f/ut_find.c | 96 +++++++++++++++++++++++++++++++++++++++++++++++ jets/tree.c | 4 +- noun/jets.c | 2 +- 6 files changed, 102 insertions(+), 4 deletions(-) diff --git a/include/c/motes.h b/include/c/motes.h index 987c4845fa..b39a60a888 100644 --- a/include/c/motes.h +++ b/include/c/motes.h @@ -396,6 +396,7 @@ # define c3__flot c3_s4('f','l','o','t') # define c3__flow c3_s4('f','l','o','w') # define c3__fon c3_s3('f','o','n') +# define c3__fond c3_s4('f','o','n','d') # define c3__for c3_s3('f','o','r') # define c3__forb c3_s4('f','o','r','b') # define c3__fore c3_s4('f','o','r','e') diff --git a/include/jets/q.h b/include/jets/q.h index cd27630080..96b954fd00 100644 --- a/include/jets/q.h +++ b/include/jets/q.h @@ -203,7 +203,7 @@ u3_noun u3qfu_dung(u3_noun, u3_noun cap, u3_noun); u3_noun u3qfu_dunq(u3_noun, const c3_c*, u3_noun); void u3qfu_dump(u3_noun, const c3_c*, u3_noun); - u3_noun u3qfu_find(u3_noun, u3_noun, u3_noun, u3_noun); + u3_noun u3qfu_fond(u3_noun, u3_noun, u3_noun, u3_noun); u3_noun u3qfu_finc(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); u3_noun u3qfu_fink(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); u3_noun u3qfu_fire(u3_noun, u3_noun, u3_noun); diff --git a/include/jets/w.h b/include/jets/w.h index f968c9086a..b4d24134b1 100644 --- a/include/jets/w.h +++ b/include/jets/w.h @@ -221,6 +221,7 @@ u3_noun u3wfu_cull(u3_noun); u3_noun u3wfu_duck(u3_noun); u3_noun u3wfu_find(u3_noun); + u3_noun u3wfu_fond(u3_noun); u3_noun u3wfu_fink(u3_noun); u3_noun u3wfu_fire(u3_noun); u3_noun u3wfu_firm(u3_noun); diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c index aeda561fb7..8b2f45e850 100644 --- a/jets/f/ut_find.c +++ b/jets/f/ut_find.c @@ -41,6 +41,37 @@ 0)); } + static u3_noun + u3qfu_funk(u3_noun van, + u3_noun sut, + u3_noun tor) + { + u3_noun von = u3i_molt(u3k(van), u3x_sam, u3k(sut), 0); + u3_noun gat = u3j_hook(von, "funk"); + + return u3n_kick_on(u3i_molt(gat, + u3x_sam, + u3k(tor), + 0)); + } + + static u3_noun + u3qfu_fund(u3_noun van, + u3_noun sut, + u3_noun way, + u3_noun hyp) + { + u3_noun von = u3i_molt(u3k(van), u3x_sam, u3k(sut), 0); + u3_noun gat = u3j_hook(von, "fund"); + + return u3n_kick_on(u3i_molt(gat, + u3x_sam_2, + u3k(way), + u3x_sam_3, + u3k(hyp), + 0)); + } + static u3_noun u3qfu_perk(u3_noun van, u3_noun sut, @@ -686,6 +717,33 @@ } } + extern void + u3_lo_tank(c3_l tab_l, u3_noun tac); + + static u3_noun + _cqfu_fond(u3_noun van, + u3_noun sut, + u3_noun way, + u3_noun hyp) + { + u3_noun old = u3qfu_fund(van, sut, way, hyp); + u3_noun new = _find_pony(van, sut, way, hyp); + + if ( c3n == u3r_sing(old, new) ) { + u3_noun olf = u3qfu_funk(van, sut, old); + u3_noun nef = u3qfu_funk(van, sut, new); + + u3qfu_dump(van, "sut", sut); + u3qfu_dump(van, "hyp", hyp); + + fprintf(stderr, "old:\r\n"); + u3_lo_tank(1, olf); + fprintf(stderr, "new:\r\n"); + u3_lo_tank(1, nef); + } + return _find_pony(van, sut, way, hyp); + } + u3_noun _cqfu_find(u3_noun van, u3_noun sut, @@ -757,3 +815,41 @@ return u3z_save_3(fun_m, sut, way, hyp, pro); } } + +/* boilerplate +*/ + u3_noun + u3wfu_fond(u3_noun cor) + { + u3_noun sut, way, hyp, van; + + if ( (c3n == u3r_mean(cor, u3x_sam_2, &way, + u3x_sam_3, &hyp, + u3x_con, &van, + 0)) || + (u3_none == (sut = u3r_at(u3x_sam, van))) ) + { + return u3m_bail(c3__fail); + } else { + return _cqfu_fond(van, sut, way, hyp); + } + } + + u3_noun + u3qfu_fond(u3_noun van, + u3_noun sut, + u3_noun way, + u3_noun hyp) + { + c3_m fun_m = c3__fond + !!u3r_at(u3qfu_van_vet, van); + u3_noun pro = u3z_find_3(fun_m, sut, way, hyp); + + if ( u3_none != pro ) { + return pro; + } + else { + pro = _cqfu_fond(van, sut, way, hyp); + + return u3z_save_3(fun_m, sut, way, hyp, pro); + } + } diff --git a/jets/tree.c b/jets/tree.c index 9f6f1e8277..3abea9b426 100644 --- a/jets/tree.c +++ b/jets/tree.c @@ -348,7 +348,7 @@ static u3j_harm _mood__hoon__ut_burn_a[] = {{".2", u3wfu_burn}, {}}; static u3j_harm _mood__hoon__ut_conk_a[] = {{".2", u3wfu_conk}, {}}; static u3j_harm _mood__hoon__ut_crop_a[] = {{".2", u3wfu_crop}, {}}; // static u3j_harm _mood__hoon__ut_fire_a[] = {{".2", u3wfu_fire}, {}}; -static u3j_harm _mood__hoon__ut_find_a[] = {{".2", u3wfu_find, c3n}, {}}; +// static u3j_harm _mood__hoon__ut_fond_a[] = {{".2", u3wfu_fond, c3n}, {}}; static u3j_harm _mood__hoon__ut_fish_a[] = {{".2", u3wfu_fish}, {}}; static u3j_harm _mood__hoon__ut_fuse_a[] = {{".2", u3wfu_fuse}, {}}; static u3j_harm _mood__hoon__ut_mint_a[] = {{".2", u3wfu_mint}, {}}; @@ -366,7 +366,7 @@ static u3j_core _mood__hoon__ut_d[] = { "burn", _mood__hoon__ut_burn_a }, { "conk", _mood__hoon__ut_conk_a }, { "crop", _mood__hoon__ut_crop_a }, - { "find", _mood__hoon__ut_find_a }, + { "fond", _mood__hoon__ut_fond_a }, // { "fire", _mood__hoon__ut_fire_a }, { "fish", _mood__hoon__ut_fish_a }, { "fuse", _mood__hoon__ut_fuse_a }, diff --git a/noun/jets.c b/noun/jets.c index 05819f5f39..87dc22798d 100644 --- a/noun/jets.c +++ b/noun/jets.c @@ -402,7 +402,7 @@ _cj_kick_z(u3_noun cor, u3j_core* cop_u, u3j_harm* ham_u, u3_atom axe) (!strcmp(".2", ham_u->fcs_c)) ? "$" : ham_u->fcs_c, u3r_mug(ame), u3r_mug(pro)); - + c3_assert(0); return u3m_bail(c3__fail); } From 7c7c4a0368a2b9022913a6fc757d4335a991d639 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Fri, 22 Jan 2016 15:43:56 -0800 Subject: [PATCH 109/137] ut_find *almost* works, but can't self-compile... --- jets/f/ut_find.c | 182 ++++++++++++++++++++++++++++++++--------------- jets/tree.c | 2 +- noun/jets.c | 9 ++- 3 files changed, 133 insertions(+), 60 deletions(-) diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c index 8b2f45e850..95ea1998b2 100644 --- a/jets/f/ut_find.c +++ b/jets/f/ut_find.c @@ -43,33 +43,30 @@ static u3_noun u3qfu_funk(u3_noun van, - u3_noun sut, - u3_noun tor) + u3_noun fid) { - u3_noun von = u3i_molt(u3k(van), u3x_sam, u3k(sut), 0); - u3_noun gat = u3j_hook(von, "funk"); + u3_noun gat = u3j_hook(u3k(van), "funk"); return u3n_kick_on(u3i_molt(gat, u3x_sam, - u3k(tor), + u3k(fid), 0)); } - static u3_noun - u3qfu_fund(u3_noun van, - u3_noun sut, - u3_noun way, - u3_noun hyp) - { - u3_noun von = u3i_molt(u3k(van), u3x_sam, u3k(sut), 0); - u3_noun gat = u3j_hook(von, "fund"); + extern void + u3_lo_tank(c3_l tab_l, u3_noun tac); - return u3n_kick_on(u3i_molt(gat, - u3x_sam_2, - u3k(way), - u3x_sam_3, - u3k(hyp), - 0)); + void + _funk_dump(u3_noun van, + c3_c* cap_c, + u3_noun fid) + { + u3_noun foj; + + fprintf(stderr, "%s\r\n", cap_c); + + foj = u3qfu_funk(van, fid); + u3_lo_tank(1, foj); } static u3_noun @@ -267,7 +264,8 @@ } static u3_noun - _find_twin(u3_noun hax, + _find_twin(u3_noun van, + u3_noun hax, u3_noun yor) { if ( c3y == u3r_sing(hax, yor) ) { @@ -281,14 +279,14 @@ } else if ( c3n == u3h(hax) ) { if ( (c3n != u3h(yor)) ) { - goto error; + return u3m_error("find-fork-a"); } else { u3_noun p_hax = u3t(hax); // (each @ud {span nock}) u3_noun p_yor = u3t(yor); // (each @ud {span nock}) if ( (c3n != u3h(p_hax)) || (c3n != u3h(p_yor)) ) { - goto error; + return u3m_error("find-fork-b"); } else { u3_noun pp_hax = u3t(p_hax); // {span nock} @@ -299,7 +297,7 @@ u3_noun qpp_yor = u3h(pp_yor); // nock if ( c3n == u3r_sing(qpp_hax, qpp_yor) ) { - goto error; + return u3m_error("find-fork-c"); } return u3nq(c3n, c3n, @@ -310,7 +308,7 @@ } else { if ( c3n == u3h(yor) ) { - return u3m_error("find-fork"); + return u3m_error("find-fork-d"); } else { u3_noun p_hax = u3t(hax); // {vein opal} @@ -321,24 +319,25 @@ u3_noun qp_yor = u3t(p_yor); // opal if ( c3n == u3r_sing(pp_hax, pp_yor) ) { - goto error; + return u3m_error("find-fork-e"); } else { if ( c3y == u3h(qp_hax) ) { if ( c3y != u3h(qp_yor) ) { - goto error; + return u3m_error("find-fork-f"); } else { u3_noun pqp_hax = u3t(qp_hax); // span u3_noun pqp_yor = u3t(qp_yor); // span return - u3nt(c3y, + u3nq(c3y, u3k(pp_hax), + c3y, u3kf_fork(u3nt(u3k(pqp_hax), u3k(pqp_yor), u3_nul))); } } else if ( c3n != u3h(qp_yor) ) { - goto error; + return u3m_error("find-fork-g"); } else { u3_noun pqp_hax = u3h(u3t(qp_hax)); // axis u3_noun pqp_yor = u3h(u3t(qp_yor)); // axis @@ -346,7 +345,7 @@ u3_noun qqp_yor = u3t(u3t(qp_yor)); // (set {span foot}) if ( c3n == u3r_sing(pqp_hax, pqp_yor) ) { - goto error; + return u3m_error("find-fork-h"); } else { return u3nt(c3y, @@ -357,21 +356,28 @@ } } } - error: { - return u3m_error("find-fork"); - } + // error: { return u3m_error("find-fork"); } } static u3_noun - _find_buck_fork_twin(u3_noun wiz) + _find_buck_fork_twin(u3_noun van, u3_noun wiz) { if ( u3_nul == wiz ) { return u3_nul; } else if ( u3_nul == u3t(wiz) ) { - return u3h(wiz); + return u3k(u3h(wiz)); + } + else { + u3_noun hax = u3k(u3h(wiz)); + u3_noun yor = _find_buck_fork_twin(van, u3t(wiz)); + u3_noun fid = _find_twin(van, hax, yor); + + u3z(hax); + u3z(yor); + + return fid; } - else return _find_twin(u3h(wiz), _find_buck_fork_twin(u3t(wiz))); } static u3_noun @@ -386,10 +392,14 @@ { if ( u3_nul == yed ) { return u3_nul; - } else { + } + else { + u3_noun fid = _find_buck(van, u3h(yed), way, p_heg, q_heg, axe, lon, gil); + return u3nc - (_find_buck(van, u3h(yed), way, p_heg, q_heg, axe, lon, gil), - _find_buck_fork_turn(van, u3t(yed), way, p_heg, q_heg, axe, lon, gil)); + (fid, + _find_buck_fork_turn + (van, u3t(yed), way, p_heg, q_heg, axe, lon, gil)); } } @@ -407,13 +417,13 @@ u3_noun yed = u3qdi_tap(p_sut, u3_nul); u3_noun wiz; u3_noun ret; - + wiz = _find_buck_fork_turn(van, yed, way, p_heg, q_heg, axe, lon, gil); u3z(yed); - - ret = _find_buck_fork_twin(wiz); + + ret = _find_buck_fork_twin(van, wiz); u3z(wiz); - + return ret; } @@ -512,8 +522,8 @@ } } else { - u3_noun pp_sut = u3h(p_heg); // (map term (unit port)) - u3_noun qp_sut = u3h(p_heg); // (list (pair span nock)) + u3_noun pp_sut = u3h(p_sut); // (map term (unit port)) + u3_noun qp_sut = u3t(p_sut); // (list (pair span nock)) u3_noun tyr = u3qdb_get(pp_sut, uq_heg); // (unit (unit port)) if ( u3_nul == tyr ) { @@ -580,9 +590,11 @@ default: return u3m_bail(c3__fail); case c3__noun: { + // fprintf(stderr, "noun\r\n"); return _find_buck_stop(van, sut, way, p_heg, q_heg, axe, lon, gil); } case c3__void: { + // fprintf(stderr, "void\r\n"); return _find_buck_stop(van, sut, way, p_heg, q_heg, axe, lon, gil); } } @@ -591,33 +603,39 @@ case c3__atom: { + // fprintf(stderr, "atom\r\n"); return _find_buck_stop(van, sut, way, p_heg, q_heg, axe, lon, gil); } case c3__cell: { + // fprintf(stderr, "cell\r\n"); return _find_buck_cell(van, sut, way, p_heg, q_heg, axe, lon, gil); } case c3__core: { + // fprintf(stderr, "core\r\n"); return _find_buck_core(van, sut, way, p_heg, q_heg, axe, lon, gil); } case c3__face: { + // fprintf(stderr, "face\r\n"); return _find_buck_face(van, sut, way, p_heg, q_heg, axe, lon, gil); } case c3__fork: { + // fprintf(stderr, "fork\r\n"); return _find_buck_fork(van, sut, way, p_heg, q_heg, axe, lon, gil); } case c3__hold: { + // fprintf(stderr, "hold\r\n"); if ( (c3y == u3qdi_has(gil, sut)) ) { return u3nt(c3n, c3y, u3k(p_heg)); } else { u3_noun zoc = u3qdi_put(gil, sut); u3_noun fop = u3qfu_repo(van, sut); - u3_noun pro = _find_buck(van, sut, way, p_heg, q_heg, axe, lon, zoc); + u3_noun pro = _find_buck(van, fop, way, p_heg, q_heg, axe, lon, zoc); u3z(fop); u3z(zoc); @@ -657,10 +675,10 @@ } else { u3_noun p_heg = u3h(u3t(heg)); // @ud - u3_noun q_heg = u3h(u3t(heg)); // (unit term) + u3_noun q_heg = u3t(u3t(heg)); // (unit term) ret = _find_buck - (van, ref, way, 1, lon, p_heg, q_heg, u3_nul); + (van, ref, way, p_heg, q_heg, 1, lon, u3_nul); } u3z(heg); u3z(lon); @@ -717,8 +735,49 @@ } } - extern void - u3_lo_tank(c3_l tab_l, u3_noun tac); +#if 0 + static u3_noun + u3qfu_fund(u3_noun van, + u3_noun sut, + u3_noun way, + u3_noun hyp) + { + u3_noun von = u3i_molt(u3k(van), u3x_sam, u3k(sut), 0); + u3_noun gat = u3j_hook(von, "fund"); + + return u3n_kick_on(u3i_molt(gat, + u3x_sam_2, + u3k(way), + u3x_sam_3, + u3k(hyp), + 0)); + } +#endif + + void + find_error(u3_noun cor, + u3_noun old, + u3_noun new) + { + u3_noun sut, way, hyp, van; + + if ( (c3n == u3r_mean(cor, u3x_sam_2, &way, + u3x_sam_3, &hyp, + u3x_con, &van, + 0)) || + (u3_none == (sut = u3r_at(u3x_sam, van))) ) + { + c3_assert(0); + } + u3m_p("hyp", hyp); + u3a_wash(old); + u3a_wash(new); + fprintf(stderr, "old mug %x, new mug %x\r\n", + u3r_mug(old), u3r_mug(new)); + u3qfu_dump(van, "sut", sut); + _funk_dump(van, "old", old); + _funk_dump(van, "new", new); + } static u3_noun _cqfu_fond(u3_noun van, @@ -726,22 +785,29 @@ u3_noun way, u3_noun hyp) { + return _find_pony(van, sut, way, hyp); +#if 0 + u3_noun old = u3qfu_fund(van, sut, way, hyp); + u3_noun new = _find_pony(van, sut, way, hyp); + + u3z(new); + return old; + u3_noun old = u3qfu_fund(van, sut, way, hyp); u3_noun new = _find_pony(van, sut, way, hyp); if ( c3n == u3r_sing(old, new) ) { - u3_noun olf = u3qfu_funk(van, sut, old); - u3_noun nef = u3qfu_funk(van, sut, new); - + u3m_p("hyp", hyp); u3qfu_dump(van, "sut", sut); - u3qfu_dump(van, "hyp", hyp); + _funk_dump(van, "old", old); + _funk_dump(van, "new", new); - fprintf(stderr, "old:\r\n"); - u3_lo_tank(1, olf); - fprintf(stderr, "new:\r\n"); - u3_lo_tank(1, nef); + exit(1); } - return _find_pony(van, sut, way, hyp); + else fprintf(stderr, "correct\r\n"); + u3z(new); + return old; +#endif } u3_noun diff --git a/jets/tree.c b/jets/tree.c index 3abea9b426..3fee65ff4e 100644 --- a/jets/tree.c +++ b/jets/tree.c @@ -366,7 +366,7 @@ static u3j_core _mood__hoon__ut_d[] = { "burn", _mood__hoon__ut_burn_a }, { "conk", _mood__hoon__ut_conk_a }, { "crop", _mood__hoon__ut_crop_a }, - { "fond", _mood__hoon__ut_fond_a }, + // { "fond", _mood__hoon__ut_fond_a }, // { "fire", _mood__hoon__ut_fire_a }, { "fish", _mood__hoon__ut_fish_a }, { "fuse", _mood__hoon__ut_fuse_a }, diff --git a/noun/jets.c b/noun/jets.c index 87dc22798d..98ac193bc3 100644 --- a/noun/jets.c +++ b/noun/jets.c @@ -357,6 +357,11 @@ _cj_soft(u3_noun cor, u3_noun axe) return u3n_nock_on(cor, u3k(arm)); } + void + find_error(u3_noun cor, + u3_noun old, + u3_noun new); + /* _cj_kick_z(): try to kick by jet. If no kick, produce u3_none. ** ** `cor` is RETAINED iff there is no kick, TRANSFERRED if one. @@ -402,7 +407,9 @@ _cj_kick_z(u3_noun cor, u3j_core* cop_u, u3j_harm* ham_u, u3_atom axe) (!strcmp(".2", ham_u->fcs_c)) ? "$" : ham_u->fcs_c, u3r_mug(ame), u3r_mug(pro)); - + ham_u->liv = c3n; + find_error(cor, ame, pro); + c3_assert(0); return u3m_bail(c3__fail); } From 2a12fd48025c5b978039cba1152b5d571e3be358 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Fri, 22 Jan 2016 20:59:49 -0800 Subject: [PATCH 110/137] Fixed some uni bugs. ++fond jet still overflows when on. --- jets/d/in_uni.c | 83 ++++++++++++++++++++++++++++-------------------- jets/f/ut_find.c | 2 ++ jets/tree.c | 4 +-- 3 files changed, 52 insertions(+), 37 deletions(-) diff --git a/jets/d/in_uni.c b/jets/d/in_uni.c index 5af775b731..f8b49ff099 100644 --- a/jets/d/in_uni.c +++ b/jets/d/in_uni.c @@ -6,6 +6,17 @@ /* functions */ + u3_noun + u3kdi_uni(u3_noun a, + u3_noun b) + { + u3_noun c = u3qdi_uni(a, b); + + u3z(a); + u3z(b); + return c; + } + u3_noun u3qdi_uni(u3_noun a, u3_noun b) @@ -36,56 +47,58 @@ } else if ( c3y == u3r_sing(n_a, n_b) ) { return u3nt(u3k(n_b), - u3qdi_uni(u3k(l_a), u3k(l_b)), - u3qdi_uni(u3k(r_a), u3k(r_b))); + u3kdi_uni(u3k(l_a), u3k(l_b)), + u3kdi_uni(u3k(r_a), u3k(r_b))); } else if ( c3y == u3qc_hor(n_b, n_a) ) { - return u3qdi_uni(u3nt(u3k(n_a), - u3qdi_uni(u3k(l_a), + return u3kdi_uni(u3nt(u3k(n_a), + u3kdi_uni(u3k(l_a), u3nt(u3k(n_b), u3k(l_b), - u3k(u3_nul))), + u3_nul)), u3k(r_a)), u3k(r_b)); } else { - return u3qdi_uni(u3nt(u3k(n_a), + return u3kdi_uni(u3nt(u3k(n_a), u3k(l_a), - u3qdi_uni(u3k(r_a), + u3kdi_uni(u3k(r_a), u3nt(u3k(n_b), - u3k(u3_nul), + u3_nul, u3k(r_b)))), u3k(l_b)); } } - else if ( c3n == u3r_cell(lr_b, &l_b, &r_b) ) { - return u3m_bail(c3__exit); - } - else if ( c3n == u3r_cell(lr_a, &l_a, &r_a) ) { - return u3m_bail(c3__exit); - } - else if ( c3y == u3r_sing(n_b, n_a) ) { - return u3nt(u3k(n_b), - u3qdi_uni(u3k(r_b), u3k(r_a)), - u3qdi_uni(u3k(l_b), u3k(l_a))); - } - else if ( c3y == u3qc_hor(n_a, n_b) ) { - return u3qdi_uni(u3k(r_a), - u3nt(u3k(n_b), - u3qdi_uni(u3nt(u3k(n_a), - u3k(l_a), - u3_nul), - u3k(l_b)), - u3k(r_b))); - } else { - return u3qdi_uni(u3k(l_a), - u3nt(u3k(n_b), - u3k(l_b), - u3qdi_uni(u3nt(u3k(n_a), - u3k(u3_nul), - u3k(r_a)), - u3k(r_b)))); + if ( c3n == u3r_cell(lr_b, &l_b, &r_b) ) { + return u3m_bail(c3__exit); + } + else if ( c3n == u3r_cell(lr_a, &l_a, &r_a) ) { + return u3m_bail(c3__exit); + } + else if ( c3y == u3r_sing(n_b, n_a) ) { + return u3nt(u3k(n_b), + u3kdi_uni(u3k(l_a), u3k(l_b)), + u3kdi_uni(u3k(r_a), u3k(r_b))); + } + else if ( c3y == u3qc_hor(n_a, n_b) ) { + return u3kdi_uni(u3k(r_a), + u3nt(u3k(n_b), + u3kdi_uni(u3nt(u3k(n_a), + u3k(l_a), + u3_nul), + u3k(l_b)), + u3k(r_b))); + } + else { + return u3kdi_uni(u3k(l_a), + u3nt(u3k(n_b), + u3k(l_b), + u3kdi_uni(u3nt(u3k(n_a), + u3_nul, + u3k(r_a)), + u3k(r_b)))); + } } } } diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c index 95ea1998b2..4d3bbc40b8 100644 --- a/jets/f/ut_find.c +++ b/jets/f/ut_find.c @@ -586,6 +586,8 @@ u3_noun lon, u3_noun gil) { + fprintf(stderr, "fond %x\r\n", u3r_mug(sut)); + if ( c3n == u3du(sut) ) switch ( sut ) { default: return u3m_bail(c3__fail); diff --git a/jets/tree.c b/jets/tree.c index 3fee65ff4e..0623812311 100644 --- a/jets/tree.c +++ b/jets/tree.c @@ -348,7 +348,7 @@ static u3j_harm _mood__hoon__ut_burn_a[] = {{".2", u3wfu_burn}, {}}; static u3j_harm _mood__hoon__ut_conk_a[] = {{".2", u3wfu_conk}, {}}; static u3j_harm _mood__hoon__ut_crop_a[] = {{".2", u3wfu_crop}, {}}; // static u3j_harm _mood__hoon__ut_fire_a[] = {{".2", u3wfu_fire}, {}}; -// static u3j_harm _mood__hoon__ut_fond_a[] = {{".2", u3wfu_fond, c3n}, {}}; +// static u3j_harm _mood__hoon__ut_fond_a[] = {{".2", u3wfu_fond}, {}}; static u3j_harm _mood__hoon__ut_fish_a[] = {{".2", u3wfu_fish}, {}}; static u3j_harm _mood__hoon__ut_fuse_a[] = {{".2", u3wfu_fuse}, {}}; static u3j_harm _mood__hoon__ut_mint_a[] = {{".2", u3wfu_mint}, {}}; @@ -366,7 +366,7 @@ static u3j_core _mood__hoon__ut_d[] = { "burn", _mood__hoon__ut_burn_a }, { "conk", _mood__hoon__ut_conk_a }, { "crop", _mood__hoon__ut_crop_a }, - // { "fond", _mood__hoon__ut_fond_a }, + // { "fond", _mood__hoon__ut_fond_a }, // { "fire", _mood__hoon__ut_fire_a }, { "fish", _mood__hoon__ut_fish_a }, { "fuse", _mood__hoon__ut_fuse_a }, From 8f390ff3abfa0e9a3408ce1a8a40e2c9a263f6f4 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sat, 23 Jan 2016 17:35:54 -0800 Subject: [PATCH 111/137] Fix a memory leak. --- jets/f/ut_find.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c index 4d3bbc40b8..5b4d90332b 100644 --- a/jets/f/ut_find.c +++ b/jets/f/ut_find.c @@ -541,6 +541,7 @@ u3z(dep); u3z(nol); + u3z(tyr); return ret; } else { @@ -556,6 +557,7 @@ ret = u3nt(c3y, u3qb_weld(ppuu_tyr, nol), u3k(qpuu_tyr)); u3z(nol); + u3z(tyr); return ret; } else { @@ -567,6 +569,7 @@ ret = u3nq(c3n, c3n, u3k(ppuu_tyr), u3qf_comb(dog, qpuu_tyr)); u3z(dog); + u3z(tyr); return ret; } From 6485aa13c62c7b8533379b90028e6b5b10ab9038 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sat, 23 Jan 2016 17:37:49 -0800 Subject: [PATCH 112/137] Clean up more leak. --- noun/jets.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/noun/jets.c b/noun/jets.c index 98ac193bc3..d9c19f7cde 100644 --- a/noun/jets.c +++ b/noun/jets.c @@ -419,6 +419,8 @@ _cj_kick_z(u3_noun cor, u3j_core* cop_u, u3j_harm* ham_u, u3_atom axe) cop_u->cos_c, (!strcmp(".2", ham_u->fcs_c)) ? "$" : ham_u->fcs_c); #endif + u3z(ame); + return pro; } } return u3_none; From fdcd58776879624323753410384c05a7f0a3a4db Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sat, 23 Jan 2016 17:43:15 -0800 Subject: [PATCH 113/137] Now this is strange. Committing NO_OVERFLOW. --- noun/manage.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/noun/manage.c b/noun/manage.c index dcf8842a7d..a188d8f636 100644 --- a/noun/manage.c +++ b/noun/manage.c @@ -9,6 +9,8 @@ #include "all.h" +#define NO_OVERFLOW + /* (u3_noun)setjmp(u3R->esc.buf): setjmp within road. */ #if 0 @@ -73,7 +75,9 @@ static sigjmp_buf u3_Signal; #ifndef SIGSTKSZ # define SIGSTKSZ 16384 #endif +#ifndef NO_OVERFLOW static uint8_t Sigstk[SIGSTKSZ]; +#endif void u3_unix_ef_hold(void); // suspend system signal regime void u3_unix_ef_move(void); // restore system signal regime @@ -131,11 +135,13 @@ _cm_signal_handle(c3_l sig_l) } } +#ifndef NO_OVERFLOW static void _cm_signal_handle_over(int emergency, stackoverflow_context_t scp) { _cm_signal_handle(c3__over); } +#endif static void _cm_signal_handle_term(int x) @@ -294,7 +300,9 @@ _cm_signal_deep(c3_w sec_w) { u3_unix_ef_hold(); +#ifndef NO_OVERFLOW stackoverflow_install_handler(_cm_signal_handle_over, Sigstk, SIGSTKSZ); +#endif signal(SIGINT, _cm_signal_handle_intr); signal(SIGTERM, _cm_signal_handle_term); From c51553dfa7bb328e808f42b31bfb2febb4cb2cdc Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sat, 23 Jan 2016 19:11:42 -0800 Subject: [PATCH 114/137] Vanquish a find jet bug, hopefully the last. --- jets/f/ut_find.c | 10 +++++----- jets/tree.c | 4 ++-- noun/jets.c | 1 - noun/nock.c | 40 ++++++++++++++++++++++++++++++++++------ 4 files changed, 41 insertions(+), 14 deletions(-) diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c index 5b4d90332b..eda7de66fa 100644 --- a/jets/f/ut_find.c +++ b/jets/f/ut_find.c @@ -41,6 +41,7 @@ 0)); } +#if 0 static u3_noun u3qfu_funk(u3_noun van, u3_noun fid) @@ -68,6 +69,7 @@ foj = u3qfu_funk(van, fid); u3_lo_tank(1, foj); } +#endif static u3_noun u3qfu_perk(u3_noun van, @@ -589,8 +591,6 @@ u3_noun lon, u3_noun gil) { - fprintf(stderr, "fond %x\r\n", u3r_mug(sut)); - if ( c3n == u3du(sut) ) switch ( sut ) { default: return u3m_bail(c3__fail); @@ -635,7 +635,7 @@ { // fprintf(stderr, "hold\r\n"); if ( (c3y == u3qdi_has(gil, sut)) ) { - return u3nt(c3n, c3y, u3k(p_heg)); + return u3_nul; } else { u3_noun zoc = u3qdi_put(gil, sut); @@ -780,8 +780,8 @@ fprintf(stderr, "old mug %x, new mug %x\r\n", u3r_mug(old), u3r_mug(new)); u3qfu_dump(van, "sut", sut); - _funk_dump(van, "old", old); - _funk_dump(van, "new", new); + // _funk_dump(van, "old", old); + // _funk_dump(van, "new", new); } static u3_noun diff --git a/jets/tree.c b/jets/tree.c index 0623812311..180b30dae9 100644 --- a/jets/tree.c +++ b/jets/tree.c @@ -348,7 +348,7 @@ static u3j_harm _mood__hoon__ut_burn_a[] = {{".2", u3wfu_burn}, {}}; static u3j_harm _mood__hoon__ut_conk_a[] = {{".2", u3wfu_conk}, {}}; static u3j_harm _mood__hoon__ut_crop_a[] = {{".2", u3wfu_crop}, {}}; // static u3j_harm _mood__hoon__ut_fire_a[] = {{".2", u3wfu_fire}, {}}; -// static u3j_harm _mood__hoon__ut_fond_a[] = {{".2", u3wfu_fond}, {}}; +static u3j_harm _mood__hoon__ut_fond_a[] = {{".2", u3wfu_fond}, {}}; static u3j_harm _mood__hoon__ut_fish_a[] = {{".2", u3wfu_fish}, {}}; static u3j_harm _mood__hoon__ut_fuse_a[] = {{".2", u3wfu_fuse}, {}}; static u3j_harm _mood__hoon__ut_mint_a[] = {{".2", u3wfu_mint}, {}}; @@ -366,7 +366,7 @@ static u3j_core _mood__hoon__ut_d[] = { "burn", _mood__hoon__ut_burn_a }, { "conk", _mood__hoon__ut_conk_a }, { "crop", _mood__hoon__ut_crop_a }, - // { "fond", _mood__hoon__ut_fond_a }, + { "fond", _mood__hoon__ut_fond_a }, // { "fire", _mood__hoon__ut_fire_a }, { "fish", _mood__hoon__ut_fish_a }, { "fuse", _mood__hoon__ut_fuse_a }, diff --git a/noun/jets.c b/noun/jets.c index d9c19f7cde..419452cfd1 100644 --- a/noun/jets.c +++ b/noun/jets.c @@ -408,7 +408,6 @@ _cj_kick_z(u3_noun cor, u3j_core* cop_u, u3j_harm* ham_u, u3_atom axe) u3r_mug(ame), u3r_mug(pro)); ham_u->liv = c3n; - find_error(cor, ame, pro); c3_assert(0); return u3m_bail(c3__fail); diff --git a/noun/nock.c b/noun/nock.c index 0d2b1ff4ed..c5febcfe28 100644 --- a/noun/nock.c +++ b/noun/nock.c @@ -5,6 +5,24 @@ static u3_noun _n_nock_on(u3_noun bus, u3_noun fol); + /* u3_term_io_hija(): hijack console for cooked print. + */ + FILE* + u3_term_io_hija(void); + + /* u3_term_io_loja(): release console from cooked print. + */ + void + u3_term_io_loja(int x); + + /* uL, uH: wrap hijack/lojack around fprintf. + ** + ** uL(fprintf(uH, ...)); + */ +# define uH u3_term_io_hija() +# define uL(x) u3_term_io_loja(x) + + /* _n_hint(): process hint. */ static u3_noun @@ -31,12 +49,22 @@ _n_hint(u3_noun zep, u3t_push(tac); #if 0 - if ( c3__spot == zep ) { - printf("spot %d/%d : %d/%d\r\n", - u3h(u3h(u3t(hod))), - u3t(u3h(u3t(hod))), - u3h(u3t(u3t(hod))), - u3t(u3t(u3t(hod)))); + { + static int low_i; + + if ( !low_i ) { + low_i = 1; + if ( 0 == (u3R->pro.nox_d % 65536ULL) ) { + if ( c3__spot == zep ) { + uL(fprintf(uH, "spot %d/%d : %d/%d\r\n", + u3h(u3h(u3t(hod))), + u3t(u3h(u3t(hod))), + u3h(u3t(u3t(hod))), + u3t(u3t(u3t(hod))))); + } + } + low_i = 0; + } } #endif pro = _n_nock_on(bus, nex); From 9ff6fe676f48fc0384c137a59192bf4c63411005 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 24 Jan 2016 14:05:55 -0800 Subject: [PATCH 115/137] Make ++fork actually build set-shaped things. --- include/jets/k.h | 5 +++ jets/f/fork.c | 8 +++- jets/f/ut_find.c | 96 ------------------------------------------------ 3 files changed, 12 insertions(+), 97 deletions(-) diff --git a/include/jets/k.h b/include/jets/k.h index 7eaa8583fe..372e2ba233 100644 --- a/include/jets/k.h +++ b/include/jets/k.h @@ -75,6 +75,11 @@ u3_weak u3kdi_put(u3_noun a, u3_noun b); + /* u3kdi_uni(): set union. + */ + u3_noun + u3kdi_uni(u3_noun a, u3_noun b); + # define u3kdb_tap(a, b) u3kdi_tap(a, b) /* u3ke: tier 5 functions diff --git a/jets/f/fork.c b/jets/f/fork.c index ff75c35343..37aaad2366 100644 --- a/jets/f/fork.c +++ b/jets/f/fork.c @@ -31,8 +31,14 @@ u3_noun i_yed = u3h(yed); if ( c3__void != i_yed ) { - lez = u3kdi_put(lez, u3k(u3h(yed))); + if ( (c3y == u3du(i_yed)) && (c3__fork == u3h(i_yed)) ) { + lez = u3kdi_uni(lez, u3k(u3t(i_yed))); + } + else { + lez = u3kdi_put(lez, u3k(i_yed)); + } } + yed = u3t(yed); } diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c index eda7de66fa..fd3ff16188 100644 --- a/jets/f/ut_find.c +++ b/jets/f/ut_find.c @@ -41,36 +41,6 @@ 0)); } -#if 0 - static u3_noun - u3qfu_funk(u3_noun van, - u3_noun fid) - { - u3_noun gat = u3j_hook(u3k(van), "funk"); - - return u3n_kick_on(u3i_molt(gat, - u3x_sam, - u3k(fid), - 0)); - } - - extern void - u3_lo_tank(c3_l tab_l, u3_noun tac); - - void - _funk_dump(u3_noun van, - c3_c* cap_c, - u3_noun fid) - { - u3_noun foj; - - fprintf(stderr, "%s\r\n", cap_c); - - foj = u3qfu_funk(van, fid); - u3_lo_tank(1, foj); - } -#endif - static u3_noun u3qfu_perk(u3_noun van, u3_noun sut, @@ -740,50 +710,6 @@ } } -#if 0 - static u3_noun - u3qfu_fund(u3_noun van, - u3_noun sut, - u3_noun way, - u3_noun hyp) - { - u3_noun von = u3i_molt(u3k(van), u3x_sam, u3k(sut), 0); - u3_noun gat = u3j_hook(von, "fund"); - - return u3n_kick_on(u3i_molt(gat, - u3x_sam_2, - u3k(way), - u3x_sam_3, - u3k(hyp), - 0)); - } -#endif - - void - find_error(u3_noun cor, - u3_noun old, - u3_noun new) - { - u3_noun sut, way, hyp, van; - - if ( (c3n == u3r_mean(cor, u3x_sam_2, &way, - u3x_sam_3, &hyp, - u3x_con, &van, - 0)) || - (u3_none == (sut = u3r_at(u3x_sam, van))) ) - { - c3_assert(0); - } - u3m_p("hyp", hyp); - u3a_wash(old); - u3a_wash(new); - fprintf(stderr, "old mug %x, new mug %x\r\n", - u3r_mug(old), u3r_mug(new)); - u3qfu_dump(van, "sut", sut); - // _funk_dump(van, "old", old); - // _funk_dump(van, "new", new); - } - static u3_noun _cqfu_fond(u3_noun van, u3_noun sut, @@ -791,28 +717,6 @@ u3_noun hyp) { return _find_pony(van, sut, way, hyp); -#if 0 - u3_noun old = u3qfu_fund(van, sut, way, hyp); - u3_noun new = _find_pony(van, sut, way, hyp); - - u3z(new); - return old; - - u3_noun old = u3qfu_fund(van, sut, way, hyp); - u3_noun new = _find_pony(van, sut, way, hyp); - - if ( c3n == u3r_sing(old, new) ) { - u3m_p("hyp", hyp); - u3qfu_dump(van, "sut", sut); - _funk_dump(van, "old", old); - _funk_dump(van, "new", new); - - exit(1); - } - else fprintf(stderr, "correct\r\n"); - u3z(new); - return old; -#endif } u3_noun From 844df4a5aaf4e04d2f96e79a0caf53f6d9e73b9a Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 24 Jan 2016 19:37:41 -0800 Subject: [PATCH 116/137] Enforce type sanity on .=. --- jets/f/ut_mint.c | 38 ++++++++++++++------------------------ 1 file changed, 14 insertions(+), 24 deletions(-) diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index 2b15623fbe..5804e838a1 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -470,10 +470,21 @@ _mint_used(); { u3_noun typ = _mint_nice(van, gol, _mint_bean()); - u3_noun one = _mint_corn(van, sut, p_gen); - u3_noun two = _mint_corn(van, sut, q_gen); + u3_noun one = _mint_in(van, sut, c3__noun, p_gen); + u3_noun two = _mint_in(van, sut, c3__noun, q_gen); + u3_noun ret; - return u3nc(typ, u3nt(5, one, two)); + if ( (c3y == _mint_vet(van)) && + (c3n == u3qfu_nest(van, u3h(one), c3n, u3h(two))) && + (c3n == u3qfu_nest(van, u3h(two), c3y, u3h(one))) ) + { + return u3m_error("nest"); + } + ret = u3nc(typ, u3nt(5, u3k(u3t(one)), u3k(u3t(two)))); + u3z(one); + u3z(two); + + return ret; } case c3__dtwt: p_gen = u3t(gen); _mint_used(); @@ -621,27 +632,6 @@ u3z(zel); return ret; } - case c3__kthx: u3x_cell(u3t(gen), &p_gen, &q_gen); - _mint_used(); - { - u3_noun huz = u3qfu_play(van, sut, p_gen); - u3_noun hif = _mint_nice(van, gol, huz); - u3_noun zel = _mint_in(van, sut, c3__noun, q_gen); - - if ( (c3y == _mint_vet(van)) && - (c3n == u3qfu_nest(van, hif, c3y, u3h(zel))) ) - { - u3z(hif); - u3z(zel); - return u3m_bail(c3__exit); - } - else { - u3_noun ret = u3nc(hif, u3k(u3t(zel))); - - u3z(zel); - return ret; - } - } case c3__tsgr: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { From 3d3e1ebb4d9d9b35f57829feab5b477a1f924b1b Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Mon, 25 Jan 2016 13:29:30 -0800 Subject: [PATCH 117/137] Double solid with .# support, still a bit flaky. --- include/c/motes.h | 1 + jets/f/ut_mint.c | 15 +++++++++++++++ jets/f/ut_mull.c | 12 ++++++++++++ jets/f/ut_play.c | 9 +++++++++ noun/manage.c | 10 ++++++++++ noun/nock.c | 24 ++++++++++++++++++++++++ 6 files changed, 71 insertions(+) diff --git a/include/c/motes.h b/include/c/motes.h index b39a60a888..54a4bb7fd9 100644 --- a/include/c/motes.h +++ b/include/c/motes.h @@ -322,6 +322,7 @@ # define c3__dtbn c3_s4('d','t','b','n') # define c3__dtcs c3_s4('d','t','c','s') # define c3__dtdt c3_s4('d','t','d','t') +# define c3__dthx c3_s4('d','t','h','x') # define c3__dtkt c3_s4('d','t','k','t') # define c3__dtlc c3_s4('d','t','l','c') # define c3__dtls c3_s4('d','t','l','s') diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index 5804e838a1..f0e8e9ddbe 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -506,6 +506,21 @@ u3z(sam); return ret; } + case c3__dthx: u3x_cell(u3t(gen), &p_gen, &q_gen); + _mint_used(); + { + u3_noun nog = u3nc(c3__cnbc, p_gen); + u3_noun nef = _mint_in(van, sut, gol, nog); + u3_noun viz = _mint_in(van, sut, c3__noun, q_gen); + + ret = u3nc(u3k(u3h(nef)), + u3nt(12, u3nc(1, u3k(u3h(nef))), u3k(u3t(viz)))); + + u3z(viz); + u3z(nef); + u3z(nog); + return ret; + } case c3__dtls: p_gen = u3t(gen); _mint_used(); { diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index 87973d5620..39d3a0335e 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -469,6 +469,18 @@ u3z(vay); return _mull_both(van, gol, wuq); } + case c3__dthx: u3x_cell(u3t(gen), &p_gen, &q_gen); + _mull_used(); + { + u3_noun nog = u3nc(c3__cnbc, p_gen); + u3_noun vay = _mull_in(van, sut, c3__noun, dox, q_gen); + u3_noun ret; + + u3z(vay); + ret = _mull_in(van, sut, gol, dox, nog); + u3z(nog); + return ret; + } case c3__dtls: p_gen = u3t(gen); _mull_used(); { diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index a8fd5595d7..35815d4e5b 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -254,6 +254,15 @@ { return c3__noun; } + case c3__dthx: u3x_cell(u3t(gen), &p_gen, &q_gen); + _play_used(); + { + u3_noun nog = u3nc(c3__cnbc, p_gen); + u3_noun ret = _play_x(van, sut, nog); + + u3z(nog); + return ret; + } case c3__dtwt: p_gen = u3t(gen); _play_used(); { diff --git a/noun/manage.c b/noun/manage.c index a188d8f636..0eb3c8129e 100644 --- a/noun/manage.c +++ b/noun/manage.c @@ -616,6 +616,16 @@ u3m_bail(u3_noun how) case c3__fail: case c3__meme: #endif + case c3__exit: { + static c3_w xuc_w = 0; + + { + // fprintf(stderr, "exit %d\r\n", xuc_w); + // if ( 49 == xuc_w ) { abort(); } + xuc_w++; + break; + } + } case c3__foul: case c3__oops: abort(); diff --git a/noun/nock.c b/noun/nock.c index c5febcfe28..c1296a5797 100644 --- a/noun/nock.c +++ b/noun/nock.c @@ -366,6 +366,30 @@ _n_nock_on(u3_noun bus, u3_noun fol) return pro; } } + + case 12: { + u3_noun gof = _n_nock_on(bus, u3k(u3t(gal))); + u3_noun val; + + u3t_off(noc_o); + val = u3m_soft_esc(u3k(gof)); + u3t_on(noc_o); + + if ( !_(u3du(val)) ) { + u3m_bail(u3nt(1, gof, 0)); + } + else { + u3_noun pro; + + u3z(gof); + u3z(fol); + pro = u3k(u3t(val)); + u3z(val); + + return pro; + } + } + c3_assert(!"not reached"); } } From e7187ea7713549b103e5cb5a64bc0bd28124dfed Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Mon, 25 Jan 2016 16:47:58 -0800 Subject: [PATCH 118/137] .^ fully transitioned. --- jets/f/ut_mint.c | 19 ++++--------------- jets/f/ut_mull.c | 13 ++----------- jets/f/ut_play.c | 9 ++------- noun/manage.c | 2 +- 4 files changed, 9 insertions(+), 34 deletions(-) diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index f0e8e9ddbe..149af46300 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -494,27 +494,16 @@ return u3nc(typ, u3nc(3, _mint_corn(van, sut, p_gen))); } - case c3__dtkt: p_gen = u3t(gen); + case c3__dtkt: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { - u3_noun tom = c3__noun; - u3_noun sam = _mint_in(van, sut, tom, p_gen); - - ret = u3nc(_mint_nice(van, gol, tom), - u3nc(11, u3k(u3t(sam)))); - - u3z(sam); - return ret; - } - case c3__dthx: u3x_cell(u3t(gen), &p_gen, &q_gen); - _mint_used(); - { - u3_noun nog = u3nc(c3__cnbc, p_gen); + u3_noun nog = u3nc(c3__cnbc, u3k(p_gen)); u3_noun nef = _mint_in(van, sut, gol, nog); u3_noun viz = _mint_in(van, sut, c3__noun, q_gen); ret = u3nc(u3k(u3h(nef)), - u3nt(12, u3nc(1, u3k(u3h(nef))), u3k(u3t(viz)))); + u3nt(12, u3nc(1, 0), u3k(u3t(viz)))); + // u3nt(12, u3nc(1, u3k(u3h(nef))), u3k(u3t(viz)))); u3z(viz); u3z(nef); diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index 39d3a0335e..5f9824c306 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -460,19 +460,10 @@ u3z(vay); return _mull_both(van, gol, _mull_bean()); } - case c3__dtkt: p_gen = u3t(gen); + case c3__dtkt: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { - u3_noun wuq = c3__noun; - u3_noun vay = _mull_in(van, sut, wuq, dox, p_gen); - - u3z(vay); - return _mull_both(van, gol, wuq); - } - case c3__dthx: u3x_cell(u3t(gen), &p_gen, &q_gen); - _mull_used(); - { - u3_noun nog = u3nc(c3__cnbc, p_gen); + u3_noun nog = u3nc(c3__cnbc, u3k(p_gen)); u3_noun vay = _mull_in(van, sut, c3__noun, dox, q_gen); u3_noun ret; diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index 35815d4e5b..726860089f 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -249,15 +249,10 @@ u3z(dat); return ret; } - case c3__dtkt: p_gen = u3t(gen); + case c3__dtkt: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { - return c3__noun; - } - case c3__dthx: u3x_cell(u3t(gen), &p_gen, &q_gen); - _play_used(); - { - u3_noun nog = u3nc(c3__cnbc, p_gen); + u3_noun nog = u3nc(c3__cnbc, u3k(p_gen)); u3_noun ret = _play_x(van, sut, nog); u3z(nog); diff --git a/noun/manage.c b/noun/manage.c index 0eb3c8129e..9e2eaaae53 100644 --- a/noun/manage.c +++ b/noun/manage.c @@ -9,7 +9,7 @@ #include "all.h" -#define NO_OVERFLOW +#undef NO_OVERFLOW /* (u3_noun)setjmp(u3R->esc.buf): setjmp within road. */ From eca8938c2bdba14db35cab4377efd8a523d2cf4d Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Tue, 26 Jan 2016 11:03:05 -0800 Subject: [PATCH 119/137] Some zpgr rationalization. --- jets/f/ut_mint.c | 8 ++++++-- jets/f/ut_mull.c | 5 +++++ jets/f/ut_play.c | 5 +++++ noun/nock.c | 4 +++- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index 149af46300..2354e476b3 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -502,8 +502,7 @@ u3_noun viz = _mint_in(van, sut, c3__noun, q_gen); ret = u3nc(u3k(u3h(nef)), - u3nt(12, u3nc(1, 0), u3k(u3t(viz)))); - // u3nt(12, u3nc(1, u3k(u3h(nef))), u3k(u3t(viz)))); + u3nt(12, u3nc(1, u3k(u3h(nef))), u3k(u3t(viz)))); u3z(viz); u3z(nef); @@ -549,6 +548,11 @@ return ret; } + case c3__hand: + _mint_used(); + { + return u3k(u3t(gen)); + } case c3__ktbr: p_gen = u3t(gen); _mint_used(); { diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index 5f9824c306..b7eac91c9a 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -505,6 +505,11 @@ u3_noun typ = u3qfu_play(van, sut, gen); return _mull_both(van, gol, typ); } + case c3__hand: u3x_cell(u3t(gen), &p_gen, &q_gen); + _mull_used(); + { + return u3nc(u3k(p_gen), u3k(p_gen)); + } case c3__ktbr: p_gen = u3t(gen); _mull_used(); { diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index 726860089f..361819477b 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -288,6 +288,11 @@ { return _play_sand(p_gen, q_gen); } + case c3__hand: u3x_cell(u3t(gen), &p_gen, &q_gen); + _play_used(); + { + return u3k(p_gen); + } case c3__ktbr: p_gen = u3t(gen); _play_used(); { diff --git a/noun/nock.c b/noun/nock.c index c1296a5797..54010b7a3e 100644 --- a/noun/nock.c +++ b/noun/nock.c @@ -345,10 +345,12 @@ _n_nock_on(u3_noun bus, u3_noun fol) } case 11: { - u3_noun gof = _n_nock_on(bus, u3k(gal)); + u3_noun ref = _n_nock_on(u3k(bus), u3k(u3h(gal))); + u3_noun gof = _n_nock_on(bus, u3k(u3t(gal))); u3_noun val; u3t_off(noc_o); + u3z(ref); val = u3m_soft_esc(u3k(gof)); u3t_on(noc_o); From e3a0446634b6eda12e16f5617ef9084d660f25fe Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Fri, 29 Jan 2016 18:25:52 -0800 Subject: [PATCH 120/137] In the middle of internal merge. --- Spec/nock/5.txt | 6 +- bad/ape/oct3.hoon | 116 +++++++++++++ bad/ape/oct4.hoon | 139 ++++++++++++++++ bad/lib/oct3.hoon | 60 +++++++ bad/lib/oct4.hoon | 60 +++++++ bad/mar/down.hoon | 36 ++++ bad/mar/oct3/move.hoon | 16 ++ bad/mar/oct3/update.hoon | 35 ++++ bad/mar/oct4/move.hoon | 16 ++ bad/mar/oct4/update.hoon | 35 ++++ bad/mar/react-snip.hoon | 31 ++++ bad/mar/react.hoon | 23 +++ bad/mar/sched.hoon | 28 ++++ bad/mar/snip.hoon | 60 +++++++ bad/mar/sole/action.hoon | 38 +++++ bad/mar/sole/effect.hoon | 60 +++++++ bad/mar/talk/command.hoon | 119 ++++++++++++++ bad/mar/talk/report.hoon | 144 ++++++++++++++++ bad/mar/talk/telegrams.hoon | 320 ++++++++++++++++++++++++++++++++++++ bad/mar/work/command.hoon | 104 ++++++++++++ bad/mar/work/report.hoon | 55 +++++++ bad/mar/work/task.hoon | 106 ++++++++++++ jets/tree.c | 4 +- 23 files changed, 1606 insertions(+), 5 deletions(-) create mode 100644 bad/ape/oct3.hoon create mode 100644 bad/ape/oct4.hoon create mode 100644 bad/lib/oct3.hoon create mode 100644 bad/lib/oct4.hoon create mode 100644 bad/mar/down.hoon create mode 100644 bad/mar/oct3/move.hoon create mode 100644 bad/mar/oct3/update.hoon create mode 100644 bad/mar/oct4/move.hoon create mode 100644 bad/mar/oct4/update.hoon create mode 100644 bad/mar/react-snip.hoon create mode 100644 bad/mar/react.hoon create mode 100644 bad/mar/sched.hoon create mode 100644 bad/mar/snip.hoon create mode 100644 bad/mar/sole/action.hoon create mode 100644 bad/mar/sole/effect.hoon create mode 100644 bad/mar/talk/command.hoon create mode 100644 bad/mar/talk/report.hoon create mode 100644 bad/mar/talk/telegrams.hoon create mode 100644 bad/mar/work/command.hoon create mode 100644 bad/mar/work/report.hoon create mode 100644 bad/mar/work/task.hoon diff --git a/Spec/nock/5.txt b/Spec/nock/5.txt index f466e47f74..6ebfaac030 100644 --- a/Spec/nock/5.txt +++ b/Spec/nock/5.txt @@ -1,6 +1,5 @@ -A noun is an atom or a cell. -An atom is a natural number. -A cell is an ordered pair of nouns. +A noun is an atom or a cell. An atom is a natural number. A cell is an ordered +pair of nouns. nock(a) *a [a b c] [a [b c]] @@ -37,3 +36,4 @@ nock(a) *a *[a 10 b c] *[a c] *a *a + diff --git a/bad/ape/oct3.hoon b/bad/ape/oct3.hoon new file mode 100644 index 0000000000..43c2d82754 --- /dev/null +++ b/bad/ape/oct3.hoon @@ -0,0 +1,116 @@ +:: :: :: +:::: /hoon+oct3/ape :::::: dependencies + :: :: :: +/? 310 :: arvo version +/- sole, oct3 :: structures +/+ sole, oct3 :: libraries +[. sole oct3] :: :: +:: :: :: +:::: :::::: interfaces + !: :: :: +=> |% :: + ++ axle {eye/face gam/game} :: agent state + ++ card $% {$diff lime} :: update + {$quit $~} :: cancel + == :: + ++ face (map bone sole-share) :: console state + ++ lime $% {$sole-effect sole-effect} :: :sole update + {$oct3-update play} :: :oct3 update + == :: + ++ move (pair bone card) :: cause and action + -- :: +:: :: :: +:::: :::::: past state + :: :: :: +=> |% :: + ++ axon $%({$1 axle} {$0 axle-0}) :: all states + ++ axle-0 {eye/face gam/game-0} :: old axle + ++ game-0 {who/? box/board boo/board} :: old game + ++ wake |= axon :- %1 ?- +<- $1 +<+ :: coarse upgrade + $0 [eye [who ~^~ ~ box boo]:gam]:+<+ :: + == -- :: +:: :: :: +:::: :::::: parsers + :: :: :: +=> |% :: + ++ colm (cook |=(a/@ (sub a '1')) (shim '1' '3')) :: row or column + ++ come ;~(plug colm ;~(pfix fas colm)) :: coordinate + ++ cope |=(? ?:(+< (stag %| (cold ~ sig)) come)) :: with wait mode + -- :: +:: :: :: +:::: :::::: process core + :: :: :: +|_ $: bowl :: + moz/(list move) :: pending actions + {$1 axle} :: process state v1 + == :: +:: :: :: +:::: :::::: process tools + :: :: :: +++ abet [(flop moz) .(moz ~)] :: resolve +++ bike $+(_. _+>) :: self-transformer +++ dish |=(cad/card %_(+> moz [[ost cad] moz])) :: request +++ echo |= {all/(list sink) fun/bike} =+ old=+>+<- :: publish to all + |- ^+ +>.^$ ?~ all +>.^$(+<- old) :: + => .(ost p.i.all, src q.i.all) :: + $(all t.all, +>.^$ (fun +>.^$)) :: +++ eels (~(tap by sup)) :: all clients +++ elfs (prey /oct3 +<-) :: network clients +++ elks (prey /sole +<-) :: console clients +++ flap |= {net/bike con/bike} :: update all clients + (echo:(echo elks con) elfs net) :: +++ here ~(. go src gam) :: game core +:: :: :: +:::: :::::: server logic + :: :: :: +++ fail ?:(soul (fect %bel ~) ~|(%invalid-move !!)) :: user error +++ fect |=(sole-effect (dish %diff %sole-effect +<)) :: update console +++ fact |=(play (dish %diff %oct3-update +<)) :: update partner +++ hail |=(? tame(gam (hey:here +<))) :: toggle subscriber +++ heal |= old/axon =. +>+<+> (wake old) :: complete update + =- +>.$(gam -) ?. !=(1 +<-) gam :: + (muy:here (turn eels |=(sink q))) :: +++ kick |= point =^ dud gam ~(m at:here +<) :: + ?.(dud fail wild:kind) :: +++ kind =+(res:here ?~(- + (word(gam new:here) ->))) :: move result +++ prom (fect %pro %& %oct3 voy:here) :: update prompt +++ rend (turn `wall`tab:here |=(tape txt++<)) :: table print +++ sawn (hail(eye (~(del by eye) ost)) |) :: console unsubscribe +++ seen (hail(eye (~(put by eye) ost *sole-share)) &) :: console subscribe +++ show prom:(fect %mor rend) :: update console +++ soul =+((~(get by sup) ost) ?=([~ * %sole *] -)) :: is console +++ tame (flap |=(_. (fact:+< &/gam)) |=(_. prom:+<)) :: light update +++ wild (flap |=(_. (fact:+< &/gam)) |=(_. show:+<)) :: full update +++ word |= txt/tape %+ flap :: game message + |=(_+> (fact:+< |/txt)) :: + |=(_+> (fect:+< txt+txt)) :: +:: :: :: +:::: :::::: console UI + :: :: :: +++ work :: console action + |= act/sole-action :: + =+ say=(~(got by eye) ost) :: + |^ ?+(-.act abet $det (delt +.act), $ret dive) :: + ++ abet ..work(eye (~(put by eye) ost say)) :: resolve + ++ cusp (cope !ept:here) :: parsing rule + ++ delt |= cal/sole-change :: edit command line + =^ cul say (~(remit sole say) cal good) :: + ?~(cul abet fail:(fect:abet det+u.cul)) :: + ++ dive =+ (rust (tufa buf.say) (punt come)) :: apply command line + ?~(- fail ?~(-> show (kick:wipe ->+))) :: + ++ good |=((list @c) -:(rose (tufa +<) cusp)) :: validate input + ++ wipe =^ cal say (~(transmit sole say) set+~) :: clear line + (fect:abet %det cal) :: + -- :: +:: :: :: +:::: :::::: arvo handlers + :: :: :: +++ peer-oct3 |=(* abet:tame:(hail &)) :: urbit subscribe +++ peer-sole |=(* abet:show:seen) :: console subscribe +++ poke-sole-action |=(sole-action abet:(work +<)) :: console input +++ poke-oct3-move |=(point abet:wild:(kick +<)) :: urbit move +++ prep |= (unit (pair (list move) axon)) :: update self + abet:?~(+< +> wild:(heal +<+>)) :: +++ pull-oct3 |=(* abet:(hail |)) :: urbit unsubscribe +++ pull-sole |=(* abet:sawn) :: console unsubscribe +-- diff --git a/bad/ape/oct4.hoon b/bad/ape/oct4.hoon new file mode 100644 index 0000000000..28144dc62c --- /dev/null +++ b/bad/ape/oct4.hoon @@ -0,0 +1,139 @@ +:: :: :: +:::: /hoon+oct4/ape :::::: dependencies + :: :: :: +/? 310 :: arvo version +/- sole, oct4 :: structures +/+ sole, oct4 :: libraries +[. sole oct4] :: :: +:: :: :: +:::: :::::: interfaces + !: :: :: +=> |% :: + ++ axle {eye/face rem/(unit ship) gam/game} :: agent state + ++ card $% {$diff lime} :: update + {$quit $~} :: cancel + {$peer wire dock path} :: subscribe + {$poke wire dock pear} :: send move + {$pull wire dock $~} :: unsubscribe + == :: + ++ face (map bone sole-share) :: console state + ++ lime $% {$sole-effect sole-effect} :: :sole update + {$oct4-update play} :: :oct4 update + == :: + ++ move (pair bone card) :: cause and action + ++ pear {$oct4-move point} :: outgoing move + -- :: +:: :: :: +:::: :::::: past state + :: :: :: +=> |% :: + ++ agon (unit {(list move) axon}) :: boot argument + ++ axon $%({$1 axle} {$0 axle-0}) :: all states + ++ axle-0 {eye/face gam/game-0} :: old axle + ++ game-0 {who/? box/board boo/board} :: old game + ++ wake |= axon :- %1 ?- +<- $1 +<+ :: coarse upgrade + $0 [eye ~ [who ~^~ ~ box boo]:gam]:+<+ :: + == -- :: +:: :: :: +:::: :::::: parsers + :: :: :: +=> |% :: + ++ colm (cook |=(a/@ (sub a '1')) (shim '1' '3')) :: row or column + ++ come ;~(plug colm ;~(pfix fas colm)) :: coordinate + ++ comb (pick come ;~(pfix sig (punt fed:ag))) :: all command input + ++ cope |=(? ?:(+< (stag %| (cold ~ sig)) comb)) :: with wait mode + -- :: +:: :: :: +:::: :::::: process core + :: :: :: +|_ $: bowl :: + moz/(list move) :: pending actions + {$1 axle} :: process state v1 + == :: +:: :: :: +:::: :::::: process tools + :: :: :: +++ abet [(flop moz) .(moz ~)] :: resolve +++ bike $+(_. _+>) :: self-transformer +++ dish |=(cad/card %_(+> moz [[ost cad] moz])) :: request +++ done (echo eels |=(_. (dish:+< %quit ~))) :: cancel everyone +++ echo |= {all/(list sink) fun/bike} =+ old=+>+<- :: publish to all + |- ^+ +>.^$ ?~ all +>.^$(+<- old) :: + => .(ost p.i.all, src q.i.all) :: + $(all t.all, +>.^$ (fun +>.^$)) :: +++ eels (~(tap by sup)) :: all clients +++ elfs (prey /oct4 +<-) :: network clients +++ elks (prey /sole +<-) :: console clients +++ emit |=(lime (dish %diff +<)) :: publish +++ flap |= {net/bike con/bike} :: update all clients + (echo:(echo elks con) elfs net) :: +++ here ~(. go src gam) :: game core +:: :: :: +:::: :::::: server logic + :: :: :: +++ fail ?:(soul (fect %bel ~) ~|(%invalid-move !!)) :: user error +++ fect |=(sole-effect (emit %sole-effect +<)) :: update console +++ fact |=(play (emit %oct4-update +<)) :: update partner +++ hail |=(? ?^(rem +> tame(gam (hey:here +<)))) :: toggle subscriber +++ harp |=(game ?:(=(gam +<) +> wild(gam +<))) :: update game +++ heal |= old/axon =. +>+<+> (wake old) :: complete update + =- +>.$(gam -) ?. !=(1 +<-) gam :: + (muy:here (turn eels |=(sink q))) :: +++ hear |=(play ?-(+<- $| (word +<+), $& (harp +<+))) :: network update +++ kick |= point =^ dud gam ~(m at:here +<) :: + ?.(dud fail wild:?~(rem kind (send +>-))) :: +++ kind =+(res:here ?~(- + (word(gam new:here) ->))) :: move result +++ plan |= (unit ship) ?~ +< stop(gam new:here) :: link+unlink + ?^(rem fail link(rem +<)) :: +++ plot |= (each point (unit ship)) :: apply command + ?-(+<- $& (kick +<+), $| (plan +<+)) :: +++ like |*(* [/oct4 [+.rem dap] +<]) :: friend message +++ link (dish peer+(like /oct4)) :: subscribe to friend +++ prom (fect %pro %& %oct4 stat) :: update prompt +++ rend (turn `wall`tab:here |=(tape txt++<)) :: table print +++ sawn (hail(eye (~(del by eye) ost)) |) :: console unsubscribe +++ seen (hail(eye (~(put by eye) ost *sole-share)) &) :: console subscribe +++ send |=(point (dish poke+(like %oct4-move +<))) :: send move +++ show prom:(fect %mor rend) :: update console +++ soul =+((~(get by sup) ost) ?=([~ * %sole *] -)) :: is console +++ stat (weld ?~(rem ~ "@{(scow p+u.rem)}") voy:here) :: prompt line +++ stop ?~(rem done wild:(dish pull+(like ~))) :: unsubscribe +++ tame (flap |=(_. (fact:+< &/gam)) |=(_. prom:+<)) :: light update +++ wild (flap |=(_. (fact:+< &/gam)) |=(_. show:+<)) :: full update +++ with |=(? (word(rem ?:(+< rem ~)) "{<[+< src]>}")) :: +++ word |= txt/tape %+ flap :: game message + |=(_+> (fact:+< |/txt)) :: + |=(_+> (fect:+< txt+txt)) :: +:: :: :: +:::: :::::: console UI + :: :: :: +++ work :: console action + |= act/sole-action :: + =+ say=(~(got by eye) ost) :: + |^ ?+(-.act abet $det (delt +.act), $ret dive) :: + ++ abet ..work(eye (~(put by eye) ost say)) :: resolve + ++ cusp (cope !ept:here) :: parsing rule + ++ delt |= cal/sole-change :: edit command line + =^ cul say (~(remit sole say) cal good) :: + ?~(cul abet fail:(fect:abet det+u.cul)) :: + ++ dive =+ (rust (tufa buf.say) (punt comb)) :: apply command line + ?~(- fail ?~(-> show (plot:wipe ->+))) :: + ++ good |=((list @c) -:(rose (tufa +<) cusp)) :: validate input + ++ wipe =^ cal say (~(transmit sole say) set+~) :: clear line + (fect:abet %det cal) :: + -- :: +:: :: :: +:::: :::::: arvo handlers + :: :: :: +++ reap-oct4 |=({* (unit)} abet:(with =(~ +<+))) :: linked to friend +++ coup-oct4 |=({* (unit)} abet:?~(+<+ +> fail)) :: move acknowledge +++ diff-oct4-update |=({* play} abet:(hear +<+)) :: network update +++ peer-oct4 |=(* abet:tame:(hail &)) :: urbit subscribe +++ peer-sole |=(* abet:show:seen) :: console subscribe +++ poke-sole-action |=(sole-action abet:(work +<)) :: console input +++ poke-oct4-move |=(point abet:wild:(kick +<)) :: urbit move +++ prep |=(agon abet:?~(+< +> (heal +<+>))) :: load state +++ pull-oct4 |=(* abet:(hail |)) :: urbit unsubscribe +++ pull-sole |=(* abet:sawn) :: console unsubscribe +++ quit-oct4 |=(* abet:?~(rem +> wild(rem ~))) :: unlinked by friend +-- diff --git a/bad/lib/oct3.hoon b/bad/lib/oct3.hoon new file mode 100644 index 0000000000..f3e3c13903 --- /dev/null +++ b/bad/lib/oct3.hoon @@ -0,0 +1,60 @@ +:: :: :: +:::: /hoon+oct3/lib :::::: dependencies + :: :: :: +/? 310 :: arvo version +/- oct3 :: structures +:: :: :: +:::: :::::: semantics + !: :: :: +[. ^oct3] +|% :: +++ icon |=(? ?:(+< 'X' 'O')) :: display at +++ bo :: per board + |_ bud/board :: + ++ bit |=(@ =(1 (cut 0 [+< 1] bud))) :: moved at address + ++ get |=(point (bit (off +<))) :: get point + ++ jon a+(turn (gulf 0 9) |=(@ b+(bit +<))) :: to json + ++ off |=(point (add x (mul 3 y))) :: bitfield address + ++ set |=(point (con bud (bex (off +<)))) :: set point + ++ win %- lien :_ |=(a/@ =(a (dis a bud))) :: test for win + (rip 4 0wl04h0.4A0Aw.4A00s.0e070) :: with bitmasks + -- :: +++ go :: play from + |_ {src/ship game} :: + ++ at |_ point :: per point + ++ g `game`+>+<+ :: game + ++ k &(!|(x o) ept) :: legal move + ++ m ?.(k [| g] [& g:t:?:(who y p)]) :: move + ++ o (~(get bo boo) +<) :: old at o + ++ p .(boo (~(set bo boo) +<), q.sag `src) :: play at o + ++ t .(who !who) :: take turn + ++ v ?:(x (icon &) ?:(o (icon |) '.')) :: view + ++ x (~(get bo box) +<) :: old at x + ++ y .(box (~(set bo box) +<), p.sag `src) :: play at x + -- :: + ++ ept =+(own |(&(=(~ -) !=(oth `src)) =(`src -))) :: we can play + ++ hey |=(? +>+<+(aud ((stat ship) +< src aud))) :: enter+leave + ++ muy |= (list ship) ?~ +< +>+<+ :: many in audience + $(+< t.+<, aud ((stat ship) & i.+< aud)) :: + ++ nam =+ ?: =(p.sag `src) ['=' (icon &) ~] :: print name + ?: =(q.sag `src) ['=' (icon |) ~] :: + "" (welp (scow %p src) `tape`-) :: + ++ new +<+(boo 0, box 0, who &, sag [~ ~]) :: reset game + ++ oth own(who !who) :: who owns other turn + ++ own ?:(who p.sag q.sag) :: who owns this turn + ++ res ?. |(~(win bo box) ~(win bo boo)) :: possible result + ?: =(511 (con boo box)) :: + `"tie :-(" ~ `"{} wins" :: + ++ row |= y/@ :- (add y '1') %- zing :: print row + (turn (gulf 0 3) |=(@ ~[' ' ~(v at y +<)])) :: + ++ str =+ [own ~[(icon who)]] ^- tape :: print player + ?~(-< -> (scow %p u.-<)) :: + ++ tab ~["+ 1 2 3" (row 0) (row 1) (row 2)] :: print table + ++ vew =- ?: =(~ -) ~ :(weld "[" - "]") :: print watchers + =+ dow=(~(tap by aud)) |- ^- tape :: + ?~ dow ~ =+ mor=$(dow t.dow) :: + :(weld nam(src p.i.dow) ?~(mor "" ", ") mor) :: + ++ voy =+ ~[(icon who)] %+ weld vew :: print prompt + ?.(ept " ({-}'s turn) " ": {-} (row+col): "):: + -- +-- diff --git a/bad/lib/oct4.hoon b/bad/lib/oct4.hoon new file mode 100644 index 0000000000..20db78ff5f --- /dev/null +++ b/bad/lib/oct4.hoon @@ -0,0 +1,60 @@ +:: :: :: +:::: /hoon+oct4/lib :: :: dependencies + :: :: :: +/? 310 :: arvo version +/- oct4 :: structures +:: :: :: +:::: :: :: semantics + !: :: :: +[. ^oct4] +|% +++ icon |=(? ?:(+< 'X' 'O')) :: display at +++ bo :: per board + |_ bud/board :: + ++ bit |=(@ =(1 (cut 0 [+< 1] bud))) :: moved at address + ++ get |=(point (bit (off +<))) :: get point + ++ jon a+(turn (gulf 0 9) |=(@ b+(bit +<))) :: to json + ++ off |=(point (add x (mul 3 y))) :: bitfield address + ++ set |=(point (con bud (bex (off +<)))) :: set point + ++ win %- lien :_ |=(a/@ =(a (dis a bud))) :: test for win + (rip 4 0wl04h0.4A0Aw.4A00s.0e070) :: with bitmasks + -- :: +++ go :: play from + |_ {src/ship game} :: + ++ at |_ point :: per point + ++ g `game`+>+<+ :: game + ++ k &(!|(x o) ept) :: legal move + ++ m ?.(k [| g] [& g:t:?:(who y p)]) :: move + ++ o (~(get bo boo) +<) :: old at o + ++ p .(boo (~(set bo boo) +<), q.sag `src) :: play at o + ++ t .(who !who) :: take turn + ++ v ?:(x (icon &) ?:(o (icon |) '.')) :: view + ++ x (~(get bo box) +<) :: old at x + ++ y .(box (~(set bo box) +<), p.sag `src) :: play at x + -- :: + ++ ept =+(own |(&(=(~ -) !=(oth `src)) =(`src -))) :: we can play + ++ hey |=(? +>+<+(aud ((stat ship) +< src aud))) :: enter+leave + ++ muy |= (list ship) ?~ +< +>+<+ :: many in audience + $(+< t.+<, aud ((stat ship) & i.+< aud)) :: + ++ nam =+ ?: =(p.sag `src) ['=' (icon &) ~] :: print name + ?: =(q.sag `src) ['=' (icon |) ~] :: + "" (welp (scow %p src) `tape`-) :: + ++ new +<+(boo 0, box 0, who &, sag [~ ~]) :: reset game + ++ oth own(who !who) :: who owns other turn + ++ own ?:(who p.sag q.sag) :: who owns this turn + ++ res ?. |(~(win bo box) ~(win bo boo)) :: possible result + ?: =(511 (con boo box)) :: + `"tie :-(" ~ `"{} wins" :: + ++ row |= y/@ :- (add y '1') %- zing :: print row + (turn (gulf 0 3) |=(@ ~[' ' ~(v at y +<)])) :: + ++ str =+ [own ~[(icon who)]] ^- tape :: print player + ?~(-< -> (scow %p u.-<)) :: + ++ tab ~["+ 1 2 3" (row 0) (row 1) (row 2)] :: print table + ++ vew =- ?: =(~ -) ~ :(weld "[" - "]") :: print watchers + =+ dow=(~(tap by aud)) |- ^- tape :: + ?~ dow ~ =+ mor=$(dow t.dow) :: + :(weld nam(src p.i.dow) ?~(mor "" ", ") mor) :: + ++ voy =+ ~[(icon who)] %+ weld vew :: print prompt + ?.(ept " ({-}'s turn) " ": {-} (row+col): "):: + -- +-- diff --git a/bad/mar/down.hoon b/bad/mar/down.hoon new file mode 100644 index 0000000000..9f0e21805b --- /dev/null +++ b/bad/mar/down.hoon @@ -0,0 +1,36 @@ +:: +:::: /hoon+down+mar + :: +/? 314 +/- markdown +/+ down-jet, frontmatter +:: +:::: + :: +[markdown .] +|_ don/down +++ grab :: convert from + |% + ++ noun down :: clam from %noun + ++ md + |= src/@t + =+ [atr mud]=(parse:frontmatter (lore src)) + [[%meta atr] (mark:down-jet mud)] + -- +:: +++ grow :: convert into + |% + ++ hymn :: convert to %hymn + ;html + ;head:title:"Untitled" + ;body + ;* (print:down-jet don) + == + == + ++ elem :: convert to %elem + ;div + ;* (print:down-jet don) + == + :: ++ react elem + -- +-- diff --git a/bad/mar/oct3/move.hoon b/bad/mar/oct3/move.hoon new file mode 100644 index 0000000000..1bef44e248 --- /dev/null +++ b/bad/mar/oct3/move.hoon @@ -0,0 +1,16 @@ +:: +:::: /hoon+oct3-move+mar + :: +/? 314 +!: +:::: + :: +=+ point={x/@ y/@} +|_ point +:: +++ grab :: convert from + |% + ++ json (corl need (at ni ni ~):jo) :: reparse from %json + ++ noun point :: clam from %noun + -- +-- diff --git a/bad/mar/oct3/update.hoon b/bad/mar/oct3/update.hoon new file mode 100644 index 0000000000..9b89f1c1f0 --- /dev/null +++ b/bad/mar/oct3/update.hoon @@ -0,0 +1,35 @@ +:: :: :: +:::: /hoon+oct3-update+mar :::::: dependencies + :: :: :: +/? 310 :: arvo +/- oct3 :: structures +/+ oct3 :: libraries +[. oct3 ^oct3] +!: :: :: +:::: :: :: protocol + :: :: :: +|_ play :: game +++ grab :: convert from + |% + ++ noun play :: from %noun + -- +++ grow :: convert to + |% + ++ json ^- ^json :: to %json + ~! +>-< + ?: ?=({$|} +>-<) + ~! +>-< + ~! p + s+(crip p) + =+ she=|=(ship s+(scot %p +<)) + =+ hes=|=({ship *} (she +<-)) + %- jobe + :~ who+s+?:(who.p %x %o) + plx+?~(p.sag.p ~ (she u.p.sag.p)) + plo+?~(q.sag.p ~ (she u.q.sag.p)) + aud+a+(turn (~(tap by aud.p)) hes) + box+~(jon bo box.p) + boo+~(jon bo boo.p) + == + -- +-- diff --git a/bad/mar/oct4/move.hoon b/bad/mar/oct4/move.hoon new file mode 100644 index 0000000000..61f6b8b3a7 --- /dev/null +++ b/bad/mar/oct4/move.hoon @@ -0,0 +1,16 @@ +:: +:::: /hoon+oct4-move+mar + :: +/? 314 +!: +:::: + :: +=+ point={x/@ y/@} +|_ point +:: +++ grab :: convert from + |% + ++ json (corl need (at ni ni ~):jo) :: reparse from %json + ++ noun point :: clam from %noun + -- +-- diff --git a/bad/mar/oct4/update.hoon b/bad/mar/oct4/update.hoon new file mode 100644 index 0000000000..e593c58f99 --- /dev/null +++ b/bad/mar/oct4/update.hoon @@ -0,0 +1,35 @@ +:: :: :: +:::: /hoon+oct4-update+mar :::::: dependencies + :: :: :: +/? 310 :: arvo +/- oct4 :: structures +/+ oct4 :: libraries +!: :: :: +:::: :: :: protocol + :: :: :: +[oct4 ^oct4 .] +|_ play :: game +++ grab :: convert from + |% + ++ noun play :: from %noun + -- +++ grow :: convert to + |% + ++ json ^- ^json :: to %json + ~! +>-< + ?: ?=($| +>-<) + ~! +>-< + ~! p + s+(crip p) + =+ she=|=(ship s+(scot %p +<)) + =+ hes=|=({ship *} (she +<-)) + %- jobe + :~ who+s+?:(who.p %x %o) + plx+?~(p.sag.p ~ (she u.p.sag.p)) + plo+?~(q.sag.p ~ (she u.q.sag.p)) + aud+a+(turn (~(tap by aud.p)) hes) + box+~(jon bo box.p) + boo+~(jon bo boo.p) + == + -- +-- diff --git a/bad/mar/react-snip.hoon b/bad/mar/react-snip.hoon new file mode 100644 index 0000000000..ebea325f84 --- /dev/null +++ b/bad/mar/react-snip.hoon @@ -0,0 +1,31 @@ +:: +:::: /hoon/core/react-snip/mar + :: +/? 314 +/+ react +!: +:::: + :: +[. react] +|_ {hed/marl tal/marl} +:: +++ grow :: convert to + |% + ++ mime [/application/json (tact tape)] + ++ tape (pojo react-snips-json) + ++ elem ;div:(h1:"*{hed}" div:"*{tal}") + ++ react-snip-js (crip (react-to-tape elem)) + ++ react-snips-json + ::?> ?=([[%div ~] [[%h1 ~] *] [[%div ~] *] ~]] own) :: xx mystery fish-loop + %^ jobe + head+react-head-json + body+react-snip-json + ~ + :: + ++ react-head-json (react-to-json ;h1:"*{hed}") + ++ react-snip-json (react-to-json ;div:"*{tal}") + -- +++ grab |% :: convert from + ++ noun manx :: clam from %noun + ++ snip |=(a/{marl marl} a) +-- -- diff --git a/bad/mar/react.hoon b/bad/mar/react.hoon new file mode 100644 index 0000000000..9c65276710 --- /dev/null +++ b/bad/mar/react.hoon @@ -0,0 +1,23 @@ +:: +:::: /hoon/core/react/mar + :: +/? 314 +/+ react +!: +:::: + :: +[. react] +|_ own/manx +:: +++ grow :: convert to + |% + ++ tape (pojo react-json) + ++ react-js (crip (react-to-tape own)) +:: ++ js react-js :: convert to %js + ++ react-json (react-to-json own) + ++ mime [/application/json (tact tape)] :: convert to %mime + -- +++ grab |% :: convert from + ++ noun manx :: clam from %noun + ++ elem |= a/manx a +-- -- diff --git a/bad/mar/sched.hoon b/bad/mar/sched.hoon new file mode 100644 index 0000000000..b48c1eeff3 --- /dev/null +++ b/bad/mar/sched.hoon @@ -0,0 +1,28 @@ +!: +:::: /hoon/core/sched/mar + :: +|_ dat/(map @da cord) +++ grow :: convert to + |% ++ mime [/text/x-sched (tact tape)] + ++ tape + (zing `wall`(turn sorted-list |=({a/@da b/cord} "{} {(trip b)}\0a"))) + ++ elem =< ;ul: *{(turn sorted-list .)} + |= {tym/@da ite/cord} ^- manx + ;li: ;{b "{}"}: {(trip ite)} + ++ sorted-list + (sort (~(tap by dat)) |=({{l/@ @} {r/@ @}} (lth l r))) + -- +++ grab + |% :: convert from + ++ mime + |= {p/mite q/octs} ^+ dat + =< (mo (turn (lore q.q) .)) + |= a/@t ^- {@da @t} + %+ rash a + ;~ (glue ace) + (cook |=(a/coin ?>(?=({$~ $da @} a) `@da`q.p.a)) nuck:so) + (cook crip (star prn)) + == + -- +++ grad %mime +-- diff --git a/bad/mar/snip.hoon b/bad/mar/snip.hoon new file mode 100644 index 0000000000..5a9a21606f --- /dev/null +++ b/bad/mar/snip.hoon @@ -0,0 +1,60 @@ +:: +:::: /hoon+core+elem+mar + :: +/? 314 +!: +|% + ++ words 1 + ++ hedtal + =| met/marl + |= a/marl ^- {hed/marl tal/marl} + ?~ a [~ ~] + ?. ?=($h1 n.g.i.a) + ?: ?=($meta n.g.i.a) + $(a t.a, met [i.a met]) + =+ had=$(a c.i.a) + ?^ -.had had + $(a t.a) + [c.i.a (weld (flop met) (limit words t.a))] + :: + ++ limit + |= {lim/@u mal/marl} + =< res + |- ^- {rem/@u res/marl} + ?~ mal [lim ~] + ?~ lim [0 ~] + =+ ^- {lam/@u hed/manx} + ?: ?=(_:/(**) i.mal) + [lim :/(tay)]:(deword lim v.i.a.g.i.mal) + [rem ele(c res)]:[ele=i.mal $(mal c.i.mal)] + [rem - res]:[hed $(lim lam, mal t.mal)] + :: + ++ deword + |= {lim/@u tay/tape} ^- {lim/@u tay/tape} + ?~ tay [lim tay] + ?~ lim [0 ~] + =+ wer=(dot 1^1 tay) + ?~ q.wer + [lim - tay]:[i.tay $(tay t.tay)] + =+ nex=$(lim (dec lim), tay q.q.u.q.wer) + [-.nex [(wonk wer) +.nex]] +-- +:: +!: +|_ {hed/marl tal/marl} +:: +++ grow :: convert to + |% + ++ mime + =< mime + |% + ++ elem ;div:(h1:"*{hed}" div:"*{tal}") :: convert to %elem + ++ hymn ;html:(head:title:"snip" body:"+{elem}") :: convert to %hymn + ++ html (crip (poxo hymn)) :: convert to %html + ++ mime [/text/html (taco html)] :: convert to %mime + -- + -- +++ grab |% :: convert from + ++ noun {marl marl} :: clam from $noun + ++ elem |=(a/manx (hedtal +.a)) +-- -- diff --git a/bad/mar/sole/action.hoon b/bad/mar/sole/action.hoon new file mode 100644 index 0000000000..a74efe8cca --- /dev/null +++ b/bad/mar/sole/action.hoon @@ -0,0 +1,38 @@ +:: +:::: /hoon+sole-action+mar + :: +/? 314 +/- sole +!: +:::: + :: +[sole .] +|_ sole-action +:: +++ grab :: convert from + |% + ++ json + |= jon/^json ^- sole-action + %- need %. jon + => [jo ..sole-action] + |^ (fo %ret (of det+change ~)) + ++ fo + |* {a/term b/fist} + |=(c/json ?.(=([%s a] c) (b c) (some [a ~]))) + :: + ++ ra + |* {a/{p/term q/fist} b/fist} + |= c/json %. c + ?.(=(%a -.c) b (pe p.a (ar q.a))) + :: + ++ change (ot ler+(at ni ni ~) ted+(cu |*(a/* [0v0 a]) edit) ~) + ++ char (cu turf so) + ++ edit + %+ fo %nop + %+ ra mor+|=(json (edit +<)) + (of del+ni set+(cu tuba sa) ins+(ot at+ni cha+char ~) ~) + -- + :: + ++ noun sole-action :: clam from %noun + -- +-- diff --git a/bad/mar/sole/effect.hoon b/bad/mar/sole/effect.hoon new file mode 100644 index 0000000000..113644148a --- /dev/null +++ b/bad/mar/sole/effect.hoon @@ -0,0 +1,60 @@ +:: +:::: /hoon+sole-effect+mar + :: +/? 314 +/- sole +!: +:::: + :: +[sole .] +|% +++ mar-sole-change :: XX dependency + |_ cha/sole-change + ++ grow + |% ++ json + ^- ^json + =+ cha + =< (jobe ted+(. ted) ler+a+~[(jone own.ler) (jone his.ler)] ~) + |= det/sole-edit + ?- -.det + $nop [%s 'nop'] + $mor [%a (turn p.det ..$)] + $del (joba %del (jone p.det)) + $set (joba %set (jape (tufa p.det))) + $ins (joba %ins (jobe at+(jone p.det) cha+s+(tuft q.det) ~)) + == + -- + -- +++ wush + |= {wid/@u tan/tang} + ^- tape + =+ rolt=|=(a/wall `tape`?~(a ~ ?~(t.a i.a :(weld i.a "\0a" $(a t.a))))) + (rolt (turn (flop tan) |=(a/tank (rolt (wash 0^wid a))))) +:: +-- +!: +|_ sef/sole-effect +:: +++ grab :: convert from + |% + ++ noun sole-effect :: clam from %noun + -- +++ grow + |% + ++ json + ^- ^json + ?+ -.sef + ~|(unsupported-effect+-.sef !!) + $mor [%a (turn p.sef |=(a/sole-effect json(sef a)))] + $err (joba %hop (jone p.sef)) + $txt (joba %txt (jape p.sef)) + $tan (joba %tan (jape (wush 160 p.sef))) + $det (joba %det json:~(grow mar-sole-change +.sef)) + $pro + (joba %pro (jobe vis+b+vis.sef tag+s+tag.sef cad+(jape cad.sef) ~)) + :: + ?($bel $clr $nex) + (joba %act %s -.sef) + == + -- +-- diff --git a/bad/mar/talk/command.hoon b/bad/mar/talk/command.hoon new file mode 100644 index 0000000000..777c790205 --- /dev/null +++ b/bad/mar/talk/command.hoon @@ -0,0 +1,119 @@ +:: +:::: /hoon+talk-command+mar + :: +/? 314 +/- talk +!: +[talk .] +|_ cod/command +:: +++ grab :: convert from + |% + ++ noun command :: clam from %noun + ++ json + => [jo ..command] + |= a/json ^- command + =- (need ((of -) a)) + =< :~ publish+(ar thot) + review+(ar thot) + design+(ot party+so config+(mu conf) ~) + == + |% + ++ op :: parse keys of map + |* {fel/rule wit/fist} + %+ cu mo + %- ci :_ (om wit) + |= a/(map cord _(need *wit)) + ^- (unit (list _[(wonk *fel) (need *wit)])) + (zl (turn (~(tap by a)) (head-rush fel))) + :: + ++ ke :: callbacks + |* {gar/* sef/_|.(fist)} + |= jon/json + ^- (unit _gar) + =- ~! gar ~! (need -) - + ((sef) jon) + :: + ++ as :: array as set + :: |*(a=fist (cu sa (ar a))) :: XX types + |* a/fist + %- cu :_ (ar a) + ~(gas in *(set _(need *a))) + :: + ++ lake |*(a/_* $+(json (unit a))) + ++ peach + |* a/{rule rule} + |= tub/nail + ^- (like (each _(wonk (-.a)) _(wonk (+.a)))) + %. tub + ;~(pose (stag %& -.a) (stag %| +.a)) + :: + ++ head-rush + |* a/rule + |* {b/cord c/*} + =+ nit=(rush b a) + ?~ nit ~ + (some [u.nit c]) + :: + :: + ++ thot + ^- $+(json (unit thought)) + %- ot :~ + serial+(ci (slat %uv) so) + audience+audi + statement+stam + == + :: + ++ audi (op parn memb) :: audience + ++ auri (op parn (ci (soft presence) so)) + ++ memb (ot envelope+lope delivery+(ci (soft delivery) so) ~) + ++ lope (ot visible+bo sender+(mu (su parn)) ~) + :: + ++ parn + ^- $+(nail (like partner)) + %+ peach + ;~((glue fas) ;~(pfix sig fed:ag) urs:ab) + %+ sear (soft passport) + ;~((glue fas) sym urs:ab) :: XX [a-z0-9_]{1,15} + :: + ++ speech-or-eval $?(speech {$eval p/@t} {$mor p/(list speech-or-eval)}) + ++ eval + |= a/(trel @da bouquet speech-or-eval) + ^- statement + %= a r ^- speech + |- + ?: ?=($mor -.r.a) + [%mor (turn p.r.a |=(b/speech-or-eval ^$(r.a b)))] + ?. ?=($eval -.r.a) r.a + =- [%fat tank+- %exp p.r.a] + =+ pax=[&1:% &2:% (scot %da p.a) |3:%] + p:(mule |.([(sell (slap !>(..zuse) (rain pax p.r.a)))]~)) + == + :: + ++ stam + ^- $+(json (unit statement)) + %+ cu eval + (ot date+di bouquet+(as (ar so)) speech+spec ~) + :: + ++ spec + %+ ke *speech-or-eval |. + %- of + :~ lin+(ot say+bo txt+so ~) + url+(su aurf:urlp) + eval+so + mor+(ar spec) + :: exp+(cu |=(a=cord [a ~]) so) + :: inv+(ot ship+(su fed:ag) party+(su urs:ab) ~) + == + :: + ++ conf + ^- $+(json (unit config)) + %- ot :~ + sources+(as (su parn)) + caption+so + :- %cordon + (ot posture+(ci (soft posture) so) list+(as (su fed:ag)) ~) + == + -- +-- -- + diff --git a/bad/mar/talk/report.hoon b/bad/mar/talk/report.hoon new file mode 100644 index 0000000000..d148f31e88 --- /dev/null +++ b/bad/mar/talk/report.hoon @@ -0,0 +1,144 @@ +:: +:::: /hoon/talk-report/mar + :: +/? 314 +/- talk +/+ talk +!: +[talk .] +|_ rep/report +:: +++ grab :: convert from + |% + ++ noun report :: clam from %noun + -- +++ grow + |% + ++ mime [/text/json (taco (crip (pojo json)))] + ++ json + => + + |^ %+ joba -.rep + ?- -.rep + $cabal (cabl +.rep) + $house a+(turn (~(tap by +.rep)) jose) + $glyph ((jome |=(a/char a) nack) +.rep) + $grams (jobe num+(jone p.rep) tele+[%a (turn q.rep gram)] ~) + $group (jobe local+(grop p.rep) global+%.(q.rep (jome parn grop)) ~) + == + ++ joce |=(a/span [%s a]) + ++ jose + |= {a/span b/posture c/cord} + (jobe name+[%s a] posture+[%s a] caption+[%s b] ~) + :: + ++ jove + |= {a/envelope b/delivery} + %- jobe :~ + envelope+(jobe visible+[%b p.a] sender+?~(q.a ~ s+(parn u.q.a)) ~) + delivery+[%s b] + == + ++ jope |=(a/ship (jape +:)) ::[%s (crip +:(scow %p a))]) + ++ joke |=(a/tank [%s (role (turn (wash 0^80 a) crip))]) + ++ jode |=(a/time (jone (div (mul (sub a ~1970.1.1) 1.000) ~s1))) +:: ++ jase +:: |* a=,json +:: |= b=(set ,$+<.a) ^- json +:: ~! b +:: [%a (turn (~(tap in b)) a)] + :: + ++ jome :: stringify keys + |* {a/_cord b/_json} + |= c/(map _+<.a _+<.b) + (jobe (turn (~(tap by c)) (both a b))) + :: + ++ both :: cons two gates + |* {a/_* b/_*} + |=(c/_[+<.a +<.b] [(a -.c) (b +.c)]) + :: + :: + ++ nack |=(a/(set (set partner)) [%a (turn (~(tap in a)) sorc)]) + ++ grop (jome phon stas) :: (map ship status) + ++ phon |=(a/ship (scot %p a)) + ++ stas |=(status (jobe presence+(joce p) human+(huma q) ~)) + ++ gram |=(telegram (jobe ship+(jope p) thought+(thot q) ~)) + ++ thot + |= thought + (jobe serial+(jape

) audience+(audi q) statement+(stam r) ~) + :: + ++ audi (jome parn jove) + ++ bouq + |= a/bouquet + a+(turn (~(tap in a)) |=(b/path a+(turn b |=(c/span s+c)))) + :: + ++ parn + |= a/partner ^- cord + ?- -.a + $& (stat p.a) + $| %- crip + ?- -.p.a + $twitter "{(trip -.p.a)}/{(trip p.p.a)}" + == + == + :: + ++ stat + |= a/station ^- cord + (crip "{}/{(trip q.a)}") + :: + ++ stam + |= statement + (jobe date+(jode p) bouquet+(bouq q) speech+(spec r) ~) + :: + ++ spec + |= a/speech + %+ joba -.a + ?+ -.a ~|(stub+-.a !!) + $lin (jobe txt+[%s q.a] say+[%b p.a] ~) + $url (joba txt+[%s (crip (earf p.a))]) + $exp (joba txt+[%s p.a]) + $tax (joba txt+(jape (rend-work-duty p.a))) + $app (jobe txt+[%s q.a] src+[%s p.a] ~) + $fat (jobe tor+(tors p.a) taf+$(a q.a) ~) + $mor a+(turn p.a spec) + :: %inv (jobe ship+(jope p.a) party+[%s q.a] ~) + == + :: + ++ tors + |= a/torso + %+ joba -.a + ?- -.a + $text [%s (role +.a)] + $tank [%a (turn +.a joke)] + $name (jobe nom+s+p.a mon+$(a q.a) ~) + == + :: + ++ huma + |= human + %^ jobe + hand+?~(hand ~ [%s u.hand]) + :- %true + ?~ true ~ + =+ u.true + (jobe first+[%s p] middle+?~(q ~ [%s u.q]) last+[%s r] ~) + ~ + :: + ++ cabl + |= cabal + %- jobe :~ + loc+(conf loc) + ham+((jome stat conf) ham) + == + :: + ++ sorc + |= a/(set partner) ^- json + [%a (turn (~(tap in a)) |=(b/partner s+(parn b)))] + :: + ++ conf + |= config + %- jobe :~ + sources+(sorc sources) + caption+[%s caption] + =- cordon+(jobe posture+[%s -.cordon] list+[%a -] ~) + (turn (~(tap in q.cordon)) jope) :: XX jase + == + -- +-- -- + diff --git a/bad/mar/talk/telegrams.hoon b/bad/mar/talk/telegrams.hoon new file mode 100644 index 0000000000..05e22d1147 --- /dev/null +++ b/bad/mar/talk/telegrams.hoon @@ -0,0 +1,320 @@ +:: +:::: /hoon/talk-telegrams/mar + :: +/? 314 +/- talk +/+ talk +!: +=+ talk +|_ gam/(list telegram) +:: +++ grab-work-duty => [jo work-stuff] + |^ dute + ++ as + :: |*(a/fist (cu sa (ar a))) :: XX types + |* a/fist + %- cu :_ (ar a) + ~(gas in *(set _(need *a))) + ++ ot + |* a/(pole {@tas fist}) + |= b/json + %. ((^ot a) b) + %- slog + ?+ b ~ + {$o *} + %+ murn `(list {@tas fist})`a + |= {c/term d/fist} ^- (unit tank) + =+ (~(get by p.b) c) + ?~ - (some >[c (turn (~(tap by p.b)) head)]<) + =+ (d u) + ?~ - (some >[c u]<) + ~ + == + ++ of + |* a/(pole {@tas fist}) + |= b/json + %. ((of:jo a) b) + %- slog + ?+ b ~ + {$o *} + %+ murn `(list {@tas fist})`a + |= {c/term d/fist} ^- (unit tank) + =+ (~(get by p.b) c) + ?~ - ~ + =+ (d u) + ?~ - (some >[c u]<) + ~ + == + ++ id (ci (slat %uv) so) + ++ ship (su fed:ag) + ++ dute + %- of :~ + create+task change+(ot id+id meat+uppd ~) + archive+id update+(ot id+id version+ni her+(su fed:ag) meat+uppd ~) + == + ++ task + %- ot :~ + id+id 'date_created'^di + version+ni 'date_modified'^di + creator+ship doer+(mu ship) + tags+(as so) 'date_due'^(mu di) + done+(mu di) title+so + description+so discussion+(ar (ot date+di ship+ship body+so ~)) + == + ++ audi (as stan) + ++ stan (su ;~((glue fas) ;~(pfix sig fed:ag) urs:ab)) + ++ uppd + %- of :~ + set-doer+(mu (su fed:ag)) + set-date-due+(mu di) + set-tags+(as so) + set-title+so + set-description+so + set-done+bo + add-comment+(ot ship+(su fed:ag) com+so ~) + == + -- +++ grow-work-duty + => work-stuff + =+ jope=|=(a/ship [%s (rsh 3 1 (scot %p a))]) + =+ jove=|=(a/@uvI [%s (scot %uv a)]) + =< |= duty + %+ joba +<- + ?- +<- + $create (task tax) + $archive (jove id) + $change (jobe id+(jove id) meat+(flesh meat) ~) + $update + %- jobe :~ + id+(jove id) + version+(jone version) + her+(jope her) + meat+(flesh meat) + == + == + |% + ++ tags + |= a/(set @t) + [%a (turn (sort (~(tap in a)) aor) |=(b/cord s+b))] + :: + ++ task + |= ^task + %- jobe :~ id+[%s (scot %uv id)] + tags+(^tags tags) + doer+?~(doer ~ (jope u.doer)) + title+[%s title] + creator+(jope creator) + version+(jone version) + 'date_created'^(jode date-created) + 'date_modified'^(jode date-modified) + description+[%s description] + =< discussion+[%a (turn discussion .)] + |=(comment (jobe date+(jode date) ship+(jope ship) body+[%s body] ~)) + 'date_due'^?~(date-due ~ (jode u.date-due)) + done+?~(done ~ (jode u.done)) + == + ++ flesh + |= ^flesh + %+ joba +<- + ?- +<- + $set-doer ?~(her ~ (jope u.her)) + $set-date-due ?~(wen ~ (jode u.wen)) + $set-tags (tags tag) + $set-title [%s til] + $set-description [%s des] + $set-done [%b don] + $add-comment (jobe ship+(jope who) com+[%s com] ~) + == + -- +++ grab + |% + ++ noun (list telegram) + ++ mime |=(^mime (json (rash q.q apex:poja))) + ++ json + => [jo ..telegram dute=grab-work-duty] + |= a/json ^- (list telegram) + =- (need ((ar (ot ship+(su fed:ag) thought+thot ~)) a)) + |% + ++ of + |* a/(pole {@tas fist}) + |= b/json + %. ((of:jo a) b) + %- slog + ?+ b ~ + {$o *} + %+ murn `(list {@tas fist})`a + |= {c/term d/fist} ^- (unit tank) + =+ (~(get by p.b) c) + ?~ - ~ + =+ (d u) + ?~ - (some >[c u]<) + ~ + == + ++ op :: parse keys of map + |* {fel/rule wit/fist} + %+ cu mo + %- ci :_ (om wit) + |= a/(map cord _(need *wit)) + ^- (unit (list _[(wonk *fel) (need *wit)])) + (zl (turn (~(tap by a)) (head-rush fel))) + :: + ++ as :: array as set + :: |*(a/fist (cu sa (ar a))) :: XX types + |* a/fist + %- cu :_ (ar a) + ~(gas in *(set _(need *a))) + :: + ++ ke :: callbacks + |* {gar/* sef/_|.(fist)} + |= jon/json + ^- (unit _gar) + =- ~! gar ~! (need -) - + ((sef) jon) + :: + ++ lake |*(a/_* $+(json (unit a))) + ++ head-rush + |* a/rule + |* {b/cord c/*} + =+ nit=(rush b a) + ?~ nit ~ + (some [u.nit c]) + :: + :: + ++ thot + ^- $+(json (unit thought)) + %- ot :~ + serial+(ci (slat %uv) so) + audience+audi + statement+stam + == + :: + ++ audi (op parn memb) :: audience + ++ auri (op parn (ci (soft presence) so)) + ++ memb (ot envelope+lope delivery+(ci (soft delivery) so) ~) + ++ lope (ot visible+bo sender+(mu (su parn)) ~) + :: + ++ parn + ^- $+(nail (like partner)) + %+ pick + ;~((glue fas) ;~(pfix sig fed:ag) urs:ab) + %+ sear (soft passport) + ;~((glue fas) sym urs:ab) :: XX [a-z0-9_]{1,15} + :: + ++ stam (ot date+di bouquet+(as (ar so)) speech+spec ~) + ++ spec + %+ ke *speech |. ~+ + %- of :~ + lin+(ot say+bo txt+so ~) + url+(ot txt+(su aurf:urlp) ~) + exp+(ot txt+so ~) + tax+(ot xat+dute ~) + app+(ot txt+so src+so ~) + fat+(ot tor+tors taf+spec ~) + ext+(ot nom+so txe+blob ~) + non+ul + :: inv+(ot ship+(su fed:ag) party+(su urs:ab) ~) + == + ++ tors + %+ ke *torso |. ~+ + %- of :~ + name+(ot nom+so mon+tors ~) + text+(cu lore so) + tank+(ot dat+(cu (hard (list tank)) blob) ~) + == + :: + ++ blob (cu cue (su fel:ofis)) + -- + -- +:: +++ grow + |% + ++ mime [/text/json (taco (crip (pojo json)))] + ++ json + => + + |^ + :- %a + %+ turn gam + |= telegram + (jobe ship+(jope p) thought+(thot q) ~) + :: + ++ jove + |= {a/envelope b/delivery} + %- jobe :~ + envelope+(jobe visible+[%b p.a] sender+?~(q.a ~ s+(parn u.q.a)) ~) + delivery+[%s b] + == + :: + ++ jope |=(a/ship (jape +:)) ::[%s (crip +:(scow %p a))]) + ++ joke |=(a/tank [%s (role (turn (wash 0^80 a) crip))]) + ++ jode |=(a/time (jone (div (mul (sub a ~1970.1.1) 1.000) ~s1))) + ++ jome :: stringify keys + |* {a/_cord b/_json} + |= c/(map _+<.a _+<.b) + (jobe (turn (~(tap by c)) (both a b))) + :: + ++ both :: cons two gates + |* {a/_* b/_*} + |=(c/_[+<.a +<.b] [(a -.c) (b +.c)]) + :: + ++ thot + |= thought + (jobe serial+(jape

) audience+(audi q) statement+(stam r) ~) + :: + ++ audi (jome parn jove) + ++ bouq + |= a/bouquet + a+(turn (~(tap in a)) |=(b/path a+(turn b |=(c/knot s+c)))) + :: + ++ parn + |= a/partner ^- cord + ?- -.a + $& (stat p.a) + $| %- crip + ?- -.p.a + $twitter "{(trip -.p.a)}/{(trip p.p.a)}" + == + == + :: + ++ stat + |= a/station ^- cord + (crip "{}/{(trip q.a)}") + :: + ++ stam + |= statement + (jobe date+(jode p) bouquet+(bouq q) speech+(spec r) ~) + :: + ++ spec + |= a/speech + %+ joba -.a + ?+ -.a ~|(stub+-.a !!) + $lin (jobe txt+[%s q.a] say+[%b p.a] ~) + $url (joba txt+(jape (earf p.a))) + $exp (joba txt+[%s p.a]) + $tax (jobe txt+(jape (rend-work-duty p.a)) xat+(grow-work-duty p.a) ~) + $app (jobe txt+[%s q.a] src+[%s p.a] ~) + $fat (jobe tor+(tors p.a) taf+$(a q.a) ~) + $ext (jobe nom+[%s p.a] txe+(jape (sifo (jam +.a))) ~) + $non ~ + :: $inv (jobe ship+(jope p.a) party+[%s q.a] ~) + == + :: + ++ tors + |= a/torso + %+ joba -.a + ?- -.a + $text [%s (role +.a)] + $tank (jobe txt+[%a (turn +.a joke)] dat+(jape (sifo (jam +.a))) ~) + $name (jobe nom+s+p.a mon+$(a q.a) ~) + == + :: + -- + -- +:: +++ grad + |% + ++ form %talk-telegrams + ++ diff |=((list telegram) +<) + ++ pact |=((list telegram) +<) + ++ join |=({(list telegram) (list telegram)} `(unit mime)`~) + -- +-- diff --git a/bad/mar/work/command.hoon b/bad/mar/work/command.hoon new file mode 100644 index 0000000000..c2e26e457d --- /dev/null +++ b/bad/mar/work/command.hoon @@ -0,0 +1,104 @@ +:: +:::: /hoon+command+work+mar + :: +/- work +!: +:::: + :: +[work .] +|_ mad/command +++ grab + |% ++ noun command + ++ json + => [jo ..command] + =< (corl need (cu |=(a/command a) coma)) + |% + ++ as + :: |*(a/fist (cu sa (ar a))) :: XX types + |* a/fist + %- cu :_ (ar a) + ~(gas in *(set _(need *a))) + ++ ot + |* a/(pole {@tas fist}) + |= b/json + %. ((^ot a) b) + %- slog + ?+ b ~ + {$o *} + %+ murn `(list {@tas fist})`a + |= {c/term d/fist} ^- (unit tank) + =+ (~(get by p.b) c) + ?~ - (some >[c (turn (~(tap by p.b)) head)]<) + =+ (d u) + ?~ - (some >[c u]<) + ~ + == + ++ of + |* a/(pole {@tas fist}) + |= b/json + %. ((of:jo a) b) + %- slog + ?+ b ~ + {$o *} + %+ murn `(list {@tas fist})`a + |= {c/term d/fist} ^- (unit tank) + =+ (~(get by p.b) c) + ?~ - ~ + =+ (d u) + ?~ - (some >[c u]<) + ~ + == + ++ id (ci (slat %uv) so) + ++ ship (su fed:ag) + ++ coma + %- of :~ + new+task old+(ot id+id dif+uppd ~) + sort+(ar id) + == + ++ task + %- ot :~ + ::index+ni + audience+audi + id+id 'date_created'^di + version+ni 'date_modified'^di + creator+ship doer+(mu ship) + tags+(as so) 'date_due'^(mu di) + done+(mu di) title+so + description+so discussion+(ar (ot date+di ship+ship body+so ~)) + == + ++ audi (as stan) + ++ stan (su ;~((glue fas) ;~(pfix sig fed:ag) urs:ab)) + ++ uppd + %- of :~ + doer+(of release+ul claim+ul ~) + add+(of comment+so ~) + :- %set + %- of :~ + audience+audi + date-due+(mu di) + title+so + description+so + tags+(as so) + done+bo + == + == + -- + -- +++ grow + |% + ++ elem ;pre: {(zing `wall`(turn (wash 0^120 >mad<) |=(a/tape ['\0a' a])))} + -- +-- +:: {new: { +:: id:'0vaof.6df9u.2agc3.d0dp1', +:: date-created:1440011611215, +:: version:1, +:: date-modified:1440011611215, +:: creator:'fyr', +:: tags:['tag'], +:: date-due:null, +:: done:false, +:: title:'Test task', +:: description:'The converter owrks right?', +:: discussion:[{date:1440011611215,ship:'sondel',body:'hi'}] +:: } } diff --git a/bad/mar/work/report.hoon b/bad/mar/work/report.hoon new file mode 100644 index 0000000000..d1dc1a4c9f --- /dev/null +++ b/bad/mar/work/report.hoon @@ -0,0 +1,55 @@ +:: +:::: /hoon+report+work+mar + :: +/- work +!: +:::: + :: +[work .] +|_ client +++ grow +|% ++ json + =+ jope=|=(a/ship [%s (rsh 3 1 (scot %p a))]) + %- jobe :~ + sort+[%a (turn sort |=(a/@uv [%s (scot %uv a)]))] + =< tasks+(jobe (turn (~(tap by tasks)) .)) + |= {@ client-task} + =+ tax + :- (scot %uv id) + %- jobe :~ id+[%s (scot %uv id)] + tags+[%a (turn (^sort (~(tap in tags)) aor) |=(a/cord s+a))] + doer+?~(doer ~ (jope u.doer)) + title+[%s title] + creator+(jope creator) + version+(jone version) + archived+[%b archived] + =< audience+[%a (turn (~(tap in audience)) .)] + |=(a/station:talk [%s (crip "{}/{(trip q.a)}")]) + 'date_created'^(jode date-created) + 'date_modified'^(jode date-modified) + description+[%s description] + =< discussion+[%a (turn discussion .)] + |=(comment (jobe date+(jode date) ship+(jope ship) body+[%s body] ~)) + 'date_due'^?~(date-due ~ (jode u.date-due)) + done+?~(done ~ (jode u.done)) + == + == +-- -- +:: sort: ["0v111id" ...] +:: tasks: [ { +:: id:"0v111id" +:: tags:["str" ...] +:: doer:|("~ship" null) +:: title:"str" +:: creator:"~ship" +:: version:12345 +:: archived:false +:: audience:["~ship+chan" ...] +:: date_created:1262304000000 +:: date_modified:1262304000000 +:: description:"str" +:: discussion:[{date:1262304000000 ship:"~ship" body:"str"} ...] +:: date_due:?(1262304000000 null) +:: done:?(1262304000000 null) +:: } +:: ...] diff --git a/bad/mar/work/task.hoon b/bad/mar/work/task.hoon new file mode 100644 index 0000000000..b3d89fac29 --- /dev/null +++ b/bad/mar/work/task.hoon @@ -0,0 +1,106 @@ +:: +:::: /hoon/task/work/mar + :: +/- work +!: +:::: + :: +[work .] +|% +++ rend + |= a/(list $@(char dime)) ^- cord + %- crip + |- ^- tape + ?~ a ~ + ?@ i.a [i.a $(a t.a)] + (weld (scow i.a) $(a t.a)) +:: +++ indent |=(a/wain (turn a |=(b/cord (cat 3 ' ' b)))) +:: +++ undent + |* {a/wain b/$+(wain *)} ^+ [*b a] + =^ c a + |- ^- {c/wain a/wain} + ?~ a [~ a] + ?. =(' ' (end 3 2 i.a)) + [~ a] + [[- c] a]:[(rsh 3 2 i.a) $(a t.a)] + [(b `wain`c) a] +:: +++ keen |*({a/* b/rule} |=(c/nail `(like a)`(b c))) +++ parse + |* {hed/$?($~ $@(@tas tape)) tal/(pole)} + ?~ hed (..$ tal) + ?^ hed ;~(pfix (just (crip hed)) (..$ tal)) + =- ?~(tal had ;~(plug had (..$ tal))) + =< had=(sear . nuck:so) + |= a/coin ^- (unit (odo:raid hed)) + ?. &(?=({$$ @ @} a) =(hed p.p.a)) ~ + (some q.p.a) +:: +++ advance + |* {a/wain b/rule} ^+ [(wonk *b) a] + ?~(a !! ~|(i.a [(rash i.a b) t.a])) +-- +!: +:::: + :: +|_ taz/task +++ grab + |% ++ txt + |= a/wain ^+ taz + =+ ~[id=%uv "_" date-created=%da " " version=%ud date-modified=%da] + =^ b a (advance a ;~(plug (parse -) (punt (parse " " %da ~)))) + =+ [-.b `date-due/(unit @da)`+.b] + =^ tags a (undent a ~(gas in *(set cord))) + =^ title a ?~(a !! a) + =^ b a %+ advance a + ;~(plug (parse %p ~) (punt (parse ">" %p ~)) (punt (parse "X" %da ~))) + =+ `{creator/@p doer/(unit @p) done/(unit @da)}`b + =^ description a (undent a role) + :* id date-created version date-modified creator + doer tags date-due done title description :: XX done + |- ^- (list comment) + ?: =(~ a) ~ + =^ b a (advance a (parse ship=%p " " date=%da ~)) + =+ b + =^ body a (undent a role) + [[date ship body] $] + == + -- +++ grow + |% + ++ elem ;pre: {(zing `wall`(turn (wash 0^120 >taz<) |=(a/tape ['\0a' a])))} + ++ mime [/text/x-task (taco (role txt))] + ++ txt + =+ taz + =+ due=?~(date-due ~ ~[' ' da+u.date-due]) + :- (rend uv+id '_' da+date-created ' ' ud+version da+date-modified due) + %+ welp (indent (sort (~(tap in tags)) aor)) + :- title + =+ do=[=-(?~(doer - ['>' p+u.doer -]) ?~(done ~ ~['X' da+u.done]))] + :- (rend p+creator do) + %- zing ^- (list wain) + :- (indent (lore description)) + %+ turn discussion + |= comment ^- wain + [(rend p+ship ' ' da+date ~) (indent (lore body))] + -- +++ grad %txt +-- +:: {id}_{date-created} {version}{date-modified}{|(" {date-due}" ~)} +:: {tag1} +:: {tag2} +:: ... +:: {title} +:: {creator}{|(">{doer}" ~)}{|("X{done}" ~)} +:: {description} +:: {more description} +:: {ship1} {date} +:: {comment} +:: {more comment} +:: {more comment} +:: {ship2} {date} +:: {comment} +:: {more comment} +:: {more comment} diff --git a/jets/tree.c b/jets/tree.c index 180b30dae9..1348647a62 100644 --- a/jets/tree.c +++ b/jets/tree.c @@ -348,7 +348,7 @@ static u3j_harm _mood__hoon__ut_burn_a[] = {{".2", u3wfu_burn}, {}}; static u3j_harm _mood__hoon__ut_conk_a[] = {{".2", u3wfu_conk}, {}}; static u3j_harm _mood__hoon__ut_crop_a[] = {{".2", u3wfu_crop}, {}}; // static u3j_harm _mood__hoon__ut_fire_a[] = {{".2", u3wfu_fire}, {}}; -static u3j_harm _mood__hoon__ut_fond_a[] = {{".2", u3wfu_fond}, {}}; +// static u3j_harm _mood__hoon__ut_fond_a[] = {{".2", u3wfu_fond}, {}}; static u3j_harm _mood__hoon__ut_fish_a[] = {{".2", u3wfu_fish}, {}}; static u3j_harm _mood__hoon__ut_fuse_a[] = {{".2", u3wfu_fuse}, {}}; static u3j_harm _mood__hoon__ut_mint_a[] = {{".2", u3wfu_mint}, {}}; @@ -366,7 +366,7 @@ static u3j_core _mood__hoon__ut_d[] = { "burn", _mood__hoon__ut_burn_a }, { "conk", _mood__hoon__ut_conk_a }, { "crop", _mood__hoon__ut_crop_a }, - { "fond", _mood__hoon__ut_fond_a }, +// { "fond", _mood__hoon__ut_fond_a }, // { "fire", _mood__hoon__ut_fire_a }, { "fish", _mood__hoon__ut_fish_a }, { "fuse", _mood__hoon__ut_fuse_a }, From cdf1f86e01a42d980b4f230cf1273049277e4b17 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Fri, 29 Jan 2016 20:40:01 -0800 Subject: [PATCH 121/137] Fix some shit code in lib/tree.hoon. --- bad/pub/test.sched | 3 +++ bad/pub/test.work-task | 8 ++++++++ jets/f/ut_nest.c | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 bad/pub/test.sched create mode 100644 bad/pub/test.work-task diff --git a/bad/pub/test.sched b/bad/pub/test.sched new file mode 100644 index 0000000000..799b477070 --- /dev/null +++ b/bad/pub/test.sched @@ -0,0 +1,3 @@ +~1970.1.1 Hello world +~1970.1.2 Reordered for goo reason +~1970.2.1 Hallo world? diff --git a/bad/pub/test.work-task b/bad/pub/test.work-task new file mode 100644 index 0000000000..fcf9438a30 --- /dev/null +++ b/bad/pub/test.work-task @@ -0,0 +1,8 @@ +0v0_~1999.1.1 2~1999.1.2 ~1999.5.20 + Tagged! +Yoooo +~fyr>~zod + Testin +~doznec ~2015.1.3 + how long has + this been around? diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index 897adacae6..3e574d2550 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -331,7 +331,7 @@ if ( (c3y == tyn) || (c3n == tel) ) { return tyn; } else { -#if 0 +#if 1 u3_noun dun = u3qfu_dunq(van, "need", sut); u3_noun niz = u3qfu_dunq(van, "have", ref); From cf813ad46d763d1db64569ac2756dd673ee0a118 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sat, 30 Jan 2016 15:44:22 -0800 Subject: [PATCH 122/137] Fix oct*. Check in %work to delete it. --- bad/ape/oct3.hoon | 116 ------------------------------- bad/ape/oct4.hoon | 139 -------------------------------------- bad/lib/oct3.hoon | 60 ---------------- bad/lib/oct4.hoon | 60 ---------------- bad/mar/oct3/move.hoon | 16 ----- bad/mar/oct3/update.hoon | 35 ---------- bad/mar/oct4/move.hoon | 16 ----- bad/mar/oct4/update.hoon | 35 ---------- bad/mar/work/command.hoon | 104 ---------------------------- bad/mar/work/report.hoon | 55 --------------- bad/mar/work/task.hoon | 106 ----------------------------- 11 files changed, 742 deletions(-) delete mode 100644 bad/ape/oct3.hoon delete mode 100644 bad/ape/oct4.hoon delete mode 100644 bad/lib/oct3.hoon delete mode 100644 bad/lib/oct4.hoon delete mode 100644 bad/mar/oct3/move.hoon delete mode 100644 bad/mar/oct3/update.hoon delete mode 100644 bad/mar/oct4/move.hoon delete mode 100644 bad/mar/oct4/update.hoon delete mode 100644 bad/mar/work/command.hoon delete mode 100644 bad/mar/work/report.hoon delete mode 100644 bad/mar/work/task.hoon diff --git a/bad/ape/oct3.hoon b/bad/ape/oct3.hoon deleted file mode 100644 index 43c2d82754..0000000000 --- a/bad/ape/oct3.hoon +++ /dev/null @@ -1,116 +0,0 @@ -:: :: :: -:::: /hoon+oct3/ape :::::: dependencies - :: :: :: -/? 310 :: arvo version -/- sole, oct3 :: structures -/+ sole, oct3 :: libraries -[. sole oct3] :: :: -:: :: :: -:::: :::::: interfaces - !: :: :: -=> |% :: - ++ axle {eye/face gam/game} :: agent state - ++ card $% {$diff lime} :: update - {$quit $~} :: cancel - == :: - ++ face (map bone sole-share) :: console state - ++ lime $% {$sole-effect sole-effect} :: :sole update - {$oct3-update play} :: :oct3 update - == :: - ++ move (pair bone card) :: cause and action - -- :: -:: :: :: -:::: :::::: past state - :: :: :: -=> |% :: - ++ axon $%({$1 axle} {$0 axle-0}) :: all states - ++ axle-0 {eye/face gam/game-0} :: old axle - ++ game-0 {who/? box/board boo/board} :: old game - ++ wake |= axon :- %1 ?- +<- $1 +<+ :: coarse upgrade - $0 [eye [who ~^~ ~ box boo]:gam]:+<+ :: - == -- :: -:: :: :: -:::: :::::: parsers - :: :: :: -=> |% :: - ++ colm (cook |=(a/@ (sub a '1')) (shim '1' '3')) :: row or column - ++ come ;~(plug colm ;~(pfix fas colm)) :: coordinate - ++ cope |=(? ?:(+< (stag %| (cold ~ sig)) come)) :: with wait mode - -- :: -:: :: :: -:::: :::::: process core - :: :: :: -|_ $: bowl :: - moz/(list move) :: pending actions - {$1 axle} :: process state v1 - == :: -:: :: :: -:::: :::::: process tools - :: :: :: -++ abet [(flop moz) .(moz ~)] :: resolve -++ bike $+(_. _+>) :: self-transformer -++ dish |=(cad/card %_(+> moz [[ost cad] moz])) :: request -++ echo |= {all/(list sink) fun/bike} =+ old=+>+<- :: publish to all - |- ^+ +>.^$ ?~ all +>.^$(+<- old) :: - => .(ost p.i.all, src q.i.all) :: - $(all t.all, +>.^$ (fun +>.^$)) :: -++ eels (~(tap by sup)) :: all clients -++ elfs (prey /oct3 +<-) :: network clients -++ elks (prey /sole +<-) :: console clients -++ flap |= {net/bike con/bike} :: update all clients - (echo:(echo elks con) elfs net) :: -++ here ~(. go src gam) :: game core -:: :: :: -:::: :::::: server logic - :: :: :: -++ fail ?:(soul (fect %bel ~) ~|(%invalid-move !!)) :: user error -++ fect |=(sole-effect (dish %diff %sole-effect +<)) :: update console -++ fact |=(play (dish %diff %oct3-update +<)) :: update partner -++ hail |=(? tame(gam (hey:here +<))) :: toggle subscriber -++ heal |= old/axon =. +>+<+> (wake old) :: complete update - =- +>.$(gam -) ?. !=(1 +<-) gam :: - (muy:here (turn eels |=(sink q))) :: -++ kick |= point =^ dud gam ~(m at:here +<) :: - ?.(dud fail wild:kind) :: -++ kind =+(res:here ?~(- + (word(gam new:here) ->))) :: move result -++ prom (fect %pro %& %oct3 voy:here) :: update prompt -++ rend (turn `wall`tab:here |=(tape txt++<)) :: table print -++ sawn (hail(eye (~(del by eye) ost)) |) :: console unsubscribe -++ seen (hail(eye (~(put by eye) ost *sole-share)) &) :: console subscribe -++ show prom:(fect %mor rend) :: update console -++ soul =+((~(get by sup) ost) ?=([~ * %sole *] -)) :: is console -++ tame (flap |=(_. (fact:+< &/gam)) |=(_. prom:+<)) :: light update -++ wild (flap |=(_. (fact:+< &/gam)) |=(_. show:+<)) :: full update -++ word |= txt/tape %+ flap :: game message - |=(_+> (fact:+< |/txt)) :: - |=(_+> (fect:+< txt+txt)) :: -:: :: :: -:::: :::::: console UI - :: :: :: -++ work :: console action - |= act/sole-action :: - =+ say=(~(got by eye) ost) :: - |^ ?+(-.act abet $det (delt +.act), $ret dive) :: - ++ abet ..work(eye (~(put by eye) ost say)) :: resolve - ++ cusp (cope !ept:here) :: parsing rule - ++ delt |= cal/sole-change :: edit command line - =^ cul say (~(remit sole say) cal good) :: - ?~(cul abet fail:(fect:abet det+u.cul)) :: - ++ dive =+ (rust (tufa buf.say) (punt come)) :: apply command line - ?~(- fail ?~(-> show (kick:wipe ->+))) :: - ++ good |=((list @c) -:(rose (tufa +<) cusp)) :: validate input - ++ wipe =^ cal say (~(transmit sole say) set+~) :: clear line - (fect:abet %det cal) :: - -- :: -:: :: :: -:::: :::::: arvo handlers - :: :: :: -++ peer-oct3 |=(* abet:tame:(hail &)) :: urbit subscribe -++ peer-sole |=(* abet:show:seen) :: console subscribe -++ poke-sole-action |=(sole-action abet:(work +<)) :: console input -++ poke-oct3-move |=(point abet:wild:(kick +<)) :: urbit move -++ prep |= (unit (pair (list move) axon)) :: update self - abet:?~(+< +> wild:(heal +<+>)) :: -++ pull-oct3 |=(* abet:(hail |)) :: urbit unsubscribe -++ pull-sole |=(* abet:sawn) :: console unsubscribe --- diff --git a/bad/ape/oct4.hoon b/bad/ape/oct4.hoon deleted file mode 100644 index 28144dc62c..0000000000 --- a/bad/ape/oct4.hoon +++ /dev/null @@ -1,139 +0,0 @@ -:: :: :: -:::: /hoon+oct4/ape :::::: dependencies - :: :: :: -/? 310 :: arvo version -/- sole, oct4 :: structures -/+ sole, oct4 :: libraries -[. sole oct4] :: :: -:: :: :: -:::: :::::: interfaces - !: :: :: -=> |% :: - ++ axle {eye/face rem/(unit ship) gam/game} :: agent state - ++ card $% {$diff lime} :: update - {$quit $~} :: cancel - {$peer wire dock path} :: subscribe - {$poke wire dock pear} :: send move - {$pull wire dock $~} :: unsubscribe - == :: - ++ face (map bone sole-share) :: console state - ++ lime $% {$sole-effect sole-effect} :: :sole update - {$oct4-update play} :: :oct4 update - == :: - ++ move (pair bone card) :: cause and action - ++ pear {$oct4-move point} :: outgoing move - -- :: -:: :: :: -:::: :::::: past state - :: :: :: -=> |% :: - ++ agon (unit {(list move) axon}) :: boot argument - ++ axon $%({$1 axle} {$0 axle-0}) :: all states - ++ axle-0 {eye/face gam/game-0} :: old axle - ++ game-0 {who/? box/board boo/board} :: old game - ++ wake |= axon :- %1 ?- +<- $1 +<+ :: coarse upgrade - $0 [eye ~ [who ~^~ ~ box boo]:gam]:+<+ :: - == -- :: -:: :: :: -:::: :::::: parsers - :: :: :: -=> |% :: - ++ colm (cook |=(a/@ (sub a '1')) (shim '1' '3')) :: row or column - ++ come ;~(plug colm ;~(pfix fas colm)) :: coordinate - ++ comb (pick come ;~(pfix sig (punt fed:ag))) :: all command input - ++ cope |=(? ?:(+< (stag %| (cold ~ sig)) comb)) :: with wait mode - -- :: -:: :: :: -:::: :::::: process core - :: :: :: -|_ $: bowl :: - moz/(list move) :: pending actions - {$1 axle} :: process state v1 - == :: -:: :: :: -:::: :::::: process tools - :: :: :: -++ abet [(flop moz) .(moz ~)] :: resolve -++ bike $+(_. _+>) :: self-transformer -++ dish |=(cad/card %_(+> moz [[ost cad] moz])) :: request -++ done (echo eels |=(_. (dish:+< %quit ~))) :: cancel everyone -++ echo |= {all/(list sink) fun/bike} =+ old=+>+<- :: publish to all - |- ^+ +>.^$ ?~ all +>.^$(+<- old) :: - => .(ost p.i.all, src q.i.all) :: - $(all t.all, +>.^$ (fun +>.^$)) :: -++ eels (~(tap by sup)) :: all clients -++ elfs (prey /oct4 +<-) :: network clients -++ elks (prey /sole +<-) :: console clients -++ emit |=(lime (dish %diff +<)) :: publish -++ flap |= {net/bike con/bike} :: update all clients - (echo:(echo elks con) elfs net) :: -++ here ~(. go src gam) :: game core -:: :: :: -:::: :::::: server logic - :: :: :: -++ fail ?:(soul (fect %bel ~) ~|(%invalid-move !!)) :: user error -++ fect |=(sole-effect (emit %sole-effect +<)) :: update console -++ fact |=(play (emit %oct4-update +<)) :: update partner -++ hail |=(? ?^(rem +> tame(gam (hey:here +<)))) :: toggle subscriber -++ harp |=(game ?:(=(gam +<) +> wild(gam +<))) :: update game -++ heal |= old/axon =. +>+<+> (wake old) :: complete update - =- +>.$(gam -) ?. !=(1 +<-) gam :: - (muy:here (turn eels |=(sink q))) :: -++ hear |=(play ?-(+<- $| (word +<+), $& (harp +<+))) :: network update -++ kick |= point =^ dud gam ~(m at:here +<) :: - ?.(dud fail wild:?~(rem kind (send +>-))) :: -++ kind =+(res:here ?~(- + (word(gam new:here) ->))) :: move result -++ plan |= (unit ship) ?~ +< stop(gam new:here) :: link+unlink - ?^(rem fail link(rem +<)) :: -++ plot |= (each point (unit ship)) :: apply command - ?-(+<- $& (kick +<+), $| (plan +<+)) :: -++ like |*(* [/oct4 [+.rem dap] +<]) :: friend message -++ link (dish peer+(like /oct4)) :: subscribe to friend -++ prom (fect %pro %& %oct4 stat) :: update prompt -++ rend (turn `wall`tab:here |=(tape txt++<)) :: table print -++ sawn (hail(eye (~(del by eye) ost)) |) :: console unsubscribe -++ seen (hail(eye (~(put by eye) ost *sole-share)) &) :: console subscribe -++ send |=(point (dish poke+(like %oct4-move +<))) :: send move -++ show prom:(fect %mor rend) :: update console -++ soul =+((~(get by sup) ost) ?=([~ * %sole *] -)) :: is console -++ stat (weld ?~(rem ~ "@{(scow p+u.rem)}") voy:here) :: prompt line -++ stop ?~(rem done wild:(dish pull+(like ~))) :: unsubscribe -++ tame (flap |=(_. (fact:+< &/gam)) |=(_. prom:+<)) :: light update -++ wild (flap |=(_. (fact:+< &/gam)) |=(_. show:+<)) :: full update -++ with |=(? (word(rem ?:(+< rem ~)) "{<[+< src]>}")) :: -++ word |= txt/tape %+ flap :: game message - |=(_+> (fact:+< |/txt)) :: - |=(_+> (fect:+< txt+txt)) :: -:: :: :: -:::: :::::: console UI - :: :: :: -++ work :: console action - |= act/sole-action :: - =+ say=(~(got by eye) ost) :: - |^ ?+(-.act abet $det (delt +.act), $ret dive) :: - ++ abet ..work(eye (~(put by eye) ost say)) :: resolve - ++ cusp (cope !ept:here) :: parsing rule - ++ delt |= cal/sole-change :: edit command line - =^ cul say (~(remit sole say) cal good) :: - ?~(cul abet fail:(fect:abet det+u.cul)) :: - ++ dive =+ (rust (tufa buf.say) (punt comb)) :: apply command line - ?~(- fail ?~(-> show (plot:wipe ->+))) :: - ++ good |=((list @c) -:(rose (tufa +<) cusp)) :: validate input - ++ wipe =^ cal say (~(transmit sole say) set+~) :: clear line - (fect:abet %det cal) :: - -- :: -:: :: :: -:::: :::::: arvo handlers - :: :: :: -++ reap-oct4 |=({* (unit)} abet:(with =(~ +<+))) :: linked to friend -++ coup-oct4 |=({* (unit)} abet:?~(+<+ +> fail)) :: move acknowledge -++ diff-oct4-update |=({* play} abet:(hear +<+)) :: network update -++ peer-oct4 |=(* abet:tame:(hail &)) :: urbit subscribe -++ peer-sole |=(* abet:show:seen) :: console subscribe -++ poke-sole-action |=(sole-action abet:(work +<)) :: console input -++ poke-oct4-move |=(point abet:wild:(kick +<)) :: urbit move -++ prep |=(agon abet:?~(+< +> (heal +<+>))) :: load state -++ pull-oct4 |=(* abet:(hail |)) :: urbit unsubscribe -++ pull-sole |=(* abet:sawn) :: console unsubscribe -++ quit-oct4 |=(* abet:?~(rem +> wild(rem ~))) :: unlinked by friend --- diff --git a/bad/lib/oct3.hoon b/bad/lib/oct3.hoon deleted file mode 100644 index f3e3c13903..0000000000 --- a/bad/lib/oct3.hoon +++ /dev/null @@ -1,60 +0,0 @@ -:: :: :: -:::: /hoon+oct3/lib :::::: dependencies - :: :: :: -/? 310 :: arvo version -/- oct3 :: structures -:: :: :: -:::: :::::: semantics - !: :: :: -[. ^oct3] -|% :: -++ icon |=(? ?:(+< 'X' 'O')) :: display at -++ bo :: per board - |_ bud/board :: - ++ bit |=(@ =(1 (cut 0 [+< 1] bud))) :: moved at address - ++ get |=(point (bit (off +<))) :: get point - ++ jon a+(turn (gulf 0 9) |=(@ b+(bit +<))) :: to json - ++ off |=(point (add x (mul 3 y))) :: bitfield address - ++ set |=(point (con bud (bex (off +<)))) :: set point - ++ win %- lien :_ |=(a/@ =(a (dis a bud))) :: test for win - (rip 4 0wl04h0.4A0Aw.4A00s.0e070) :: with bitmasks - -- :: -++ go :: play from - |_ {src/ship game} :: - ++ at |_ point :: per point - ++ g `game`+>+<+ :: game - ++ k &(!|(x o) ept) :: legal move - ++ m ?.(k [| g] [& g:t:?:(who y p)]) :: move - ++ o (~(get bo boo) +<) :: old at o - ++ p .(boo (~(set bo boo) +<), q.sag `src) :: play at o - ++ t .(who !who) :: take turn - ++ v ?:(x (icon &) ?:(o (icon |) '.')) :: view - ++ x (~(get bo box) +<) :: old at x - ++ y .(box (~(set bo box) +<), p.sag `src) :: play at x - -- :: - ++ ept =+(own |(&(=(~ -) !=(oth `src)) =(`src -))) :: we can play - ++ hey |=(? +>+<+(aud ((stat ship) +< src aud))) :: enter+leave - ++ muy |= (list ship) ?~ +< +>+<+ :: many in audience - $(+< t.+<, aud ((stat ship) & i.+< aud)) :: - ++ nam =+ ?: =(p.sag `src) ['=' (icon &) ~] :: print name - ?: =(q.sag `src) ['=' (icon |) ~] :: - "" (welp (scow %p src) `tape`-) :: - ++ new +<+(boo 0, box 0, who &, sag [~ ~]) :: reset game - ++ oth own(who !who) :: who owns other turn - ++ own ?:(who p.sag q.sag) :: who owns this turn - ++ res ?. |(~(win bo box) ~(win bo boo)) :: possible result - ?: =(511 (con boo box)) :: - `"tie :-(" ~ `"{} wins" :: - ++ row |= y/@ :- (add y '1') %- zing :: print row - (turn (gulf 0 3) |=(@ ~[' ' ~(v at y +<)])) :: - ++ str =+ [own ~[(icon who)]] ^- tape :: print player - ?~(-< -> (scow %p u.-<)) :: - ++ tab ~["+ 1 2 3" (row 0) (row 1) (row 2)] :: print table - ++ vew =- ?: =(~ -) ~ :(weld "[" - "]") :: print watchers - =+ dow=(~(tap by aud)) |- ^- tape :: - ?~ dow ~ =+ mor=$(dow t.dow) :: - :(weld nam(src p.i.dow) ?~(mor "" ", ") mor) :: - ++ voy =+ ~[(icon who)] %+ weld vew :: print prompt - ?.(ept " ({-}'s turn) " ": {-} (row+col): "):: - -- --- diff --git a/bad/lib/oct4.hoon b/bad/lib/oct4.hoon deleted file mode 100644 index 20db78ff5f..0000000000 --- a/bad/lib/oct4.hoon +++ /dev/null @@ -1,60 +0,0 @@ -:: :: :: -:::: /hoon+oct4/lib :: :: dependencies - :: :: :: -/? 310 :: arvo version -/- oct4 :: structures -:: :: :: -:::: :: :: semantics - !: :: :: -[. ^oct4] -|% -++ icon |=(? ?:(+< 'X' 'O')) :: display at -++ bo :: per board - |_ bud/board :: - ++ bit |=(@ =(1 (cut 0 [+< 1] bud))) :: moved at address - ++ get |=(point (bit (off +<))) :: get point - ++ jon a+(turn (gulf 0 9) |=(@ b+(bit +<))) :: to json - ++ off |=(point (add x (mul 3 y))) :: bitfield address - ++ set |=(point (con bud (bex (off +<)))) :: set point - ++ win %- lien :_ |=(a/@ =(a (dis a bud))) :: test for win - (rip 4 0wl04h0.4A0Aw.4A00s.0e070) :: with bitmasks - -- :: -++ go :: play from - |_ {src/ship game} :: - ++ at |_ point :: per point - ++ g `game`+>+<+ :: game - ++ k &(!|(x o) ept) :: legal move - ++ m ?.(k [| g] [& g:t:?:(who y p)]) :: move - ++ o (~(get bo boo) +<) :: old at o - ++ p .(boo (~(set bo boo) +<), q.sag `src) :: play at o - ++ t .(who !who) :: take turn - ++ v ?:(x (icon &) ?:(o (icon |) '.')) :: view - ++ x (~(get bo box) +<) :: old at x - ++ y .(box (~(set bo box) +<), p.sag `src) :: play at x - -- :: - ++ ept =+(own |(&(=(~ -) !=(oth `src)) =(`src -))) :: we can play - ++ hey |=(? +>+<+(aud ((stat ship) +< src aud))) :: enter+leave - ++ muy |= (list ship) ?~ +< +>+<+ :: many in audience - $(+< t.+<, aud ((stat ship) & i.+< aud)) :: - ++ nam =+ ?: =(p.sag `src) ['=' (icon &) ~] :: print name - ?: =(q.sag `src) ['=' (icon |) ~] :: - "" (welp (scow %p src) `tape`-) :: - ++ new +<+(boo 0, box 0, who &, sag [~ ~]) :: reset game - ++ oth own(who !who) :: who owns other turn - ++ own ?:(who p.sag q.sag) :: who owns this turn - ++ res ?. |(~(win bo box) ~(win bo boo)) :: possible result - ?: =(511 (con boo box)) :: - `"tie :-(" ~ `"{} wins" :: - ++ row |= y/@ :- (add y '1') %- zing :: print row - (turn (gulf 0 3) |=(@ ~[' ' ~(v at y +<)])) :: - ++ str =+ [own ~[(icon who)]] ^- tape :: print player - ?~(-< -> (scow %p u.-<)) :: - ++ tab ~["+ 1 2 3" (row 0) (row 1) (row 2)] :: print table - ++ vew =- ?: =(~ -) ~ :(weld "[" - "]") :: print watchers - =+ dow=(~(tap by aud)) |- ^- tape :: - ?~ dow ~ =+ mor=$(dow t.dow) :: - :(weld nam(src p.i.dow) ?~(mor "" ", ") mor) :: - ++ voy =+ ~[(icon who)] %+ weld vew :: print prompt - ?.(ept " ({-}'s turn) " ": {-} (row+col): "):: - -- --- diff --git a/bad/mar/oct3/move.hoon b/bad/mar/oct3/move.hoon deleted file mode 100644 index 1bef44e248..0000000000 --- a/bad/mar/oct3/move.hoon +++ /dev/null @@ -1,16 +0,0 @@ -:: -:::: /hoon+oct3-move+mar - :: -/? 314 -!: -:::: - :: -=+ point={x/@ y/@} -|_ point -:: -++ grab :: convert from - |% - ++ json (corl need (at ni ni ~):jo) :: reparse from %json - ++ noun point :: clam from %noun - -- --- diff --git a/bad/mar/oct3/update.hoon b/bad/mar/oct3/update.hoon deleted file mode 100644 index 9b89f1c1f0..0000000000 --- a/bad/mar/oct3/update.hoon +++ /dev/null @@ -1,35 +0,0 @@ -:: :: :: -:::: /hoon+oct3-update+mar :::::: dependencies - :: :: :: -/? 310 :: arvo -/- oct3 :: structures -/+ oct3 :: libraries -[. oct3 ^oct3] -!: :: :: -:::: :: :: protocol - :: :: :: -|_ play :: game -++ grab :: convert from - |% - ++ noun play :: from %noun - -- -++ grow :: convert to - |% - ++ json ^- ^json :: to %json - ~! +>-< - ?: ?=({$|} +>-<) - ~! +>-< - ~! p - s+(crip p) - =+ she=|=(ship s+(scot %p +<)) - =+ hes=|=({ship *} (she +<-)) - %- jobe - :~ who+s+?:(who.p %x %o) - plx+?~(p.sag.p ~ (she u.p.sag.p)) - plo+?~(q.sag.p ~ (she u.q.sag.p)) - aud+a+(turn (~(tap by aud.p)) hes) - box+~(jon bo box.p) - boo+~(jon bo boo.p) - == - -- --- diff --git a/bad/mar/oct4/move.hoon b/bad/mar/oct4/move.hoon deleted file mode 100644 index 61f6b8b3a7..0000000000 --- a/bad/mar/oct4/move.hoon +++ /dev/null @@ -1,16 +0,0 @@ -:: -:::: /hoon+oct4-move+mar - :: -/? 314 -!: -:::: - :: -=+ point={x/@ y/@} -|_ point -:: -++ grab :: convert from - |% - ++ json (corl need (at ni ni ~):jo) :: reparse from %json - ++ noun point :: clam from %noun - -- --- diff --git a/bad/mar/oct4/update.hoon b/bad/mar/oct4/update.hoon deleted file mode 100644 index e593c58f99..0000000000 --- a/bad/mar/oct4/update.hoon +++ /dev/null @@ -1,35 +0,0 @@ -:: :: :: -:::: /hoon+oct4-update+mar :::::: dependencies - :: :: :: -/? 310 :: arvo -/- oct4 :: structures -/+ oct4 :: libraries -!: :: :: -:::: :: :: protocol - :: :: :: -[oct4 ^oct4 .] -|_ play :: game -++ grab :: convert from - |% - ++ noun play :: from %noun - -- -++ grow :: convert to - |% - ++ json ^- ^json :: to %json - ~! +>-< - ?: ?=($| +>-<) - ~! +>-< - ~! p - s+(crip p) - =+ she=|=(ship s+(scot %p +<)) - =+ hes=|=({ship *} (she +<-)) - %- jobe - :~ who+s+?:(who.p %x %o) - plx+?~(p.sag.p ~ (she u.p.sag.p)) - plo+?~(q.sag.p ~ (she u.q.sag.p)) - aud+a+(turn (~(tap by aud.p)) hes) - box+~(jon bo box.p) - boo+~(jon bo boo.p) - == - -- --- diff --git a/bad/mar/work/command.hoon b/bad/mar/work/command.hoon deleted file mode 100644 index c2e26e457d..0000000000 --- a/bad/mar/work/command.hoon +++ /dev/null @@ -1,104 +0,0 @@ -:: -:::: /hoon+command+work+mar - :: -/- work -!: -:::: - :: -[work .] -|_ mad/command -++ grab - |% ++ noun command - ++ json - => [jo ..command] - =< (corl need (cu |=(a/command a) coma)) - |% - ++ as - :: |*(a/fist (cu sa (ar a))) :: XX types - |* a/fist - %- cu :_ (ar a) - ~(gas in *(set _(need *a))) - ++ ot - |* a/(pole {@tas fist}) - |= b/json - %. ((^ot a) b) - %- slog - ?+ b ~ - {$o *} - %+ murn `(list {@tas fist})`a - |= {c/term d/fist} ^- (unit tank) - =+ (~(get by p.b) c) - ?~ - (some >[c (turn (~(tap by p.b)) head)]<) - =+ (d u) - ?~ - (some >[c u]<) - ~ - == - ++ of - |* a/(pole {@tas fist}) - |= b/json - %. ((of:jo a) b) - %- slog - ?+ b ~ - {$o *} - %+ murn `(list {@tas fist})`a - |= {c/term d/fist} ^- (unit tank) - =+ (~(get by p.b) c) - ?~ - ~ - =+ (d u) - ?~ - (some >[c u]<) - ~ - == - ++ id (ci (slat %uv) so) - ++ ship (su fed:ag) - ++ coma - %- of :~ - new+task old+(ot id+id dif+uppd ~) - sort+(ar id) - == - ++ task - %- ot :~ - ::index+ni - audience+audi - id+id 'date_created'^di - version+ni 'date_modified'^di - creator+ship doer+(mu ship) - tags+(as so) 'date_due'^(mu di) - done+(mu di) title+so - description+so discussion+(ar (ot date+di ship+ship body+so ~)) - == - ++ audi (as stan) - ++ stan (su ;~((glue fas) ;~(pfix sig fed:ag) urs:ab)) - ++ uppd - %- of :~ - doer+(of release+ul claim+ul ~) - add+(of comment+so ~) - :- %set - %- of :~ - audience+audi - date-due+(mu di) - title+so - description+so - tags+(as so) - done+bo - == - == - -- - -- -++ grow - |% - ++ elem ;pre: {(zing `wall`(turn (wash 0^120 >mad<) |=(a/tape ['\0a' a])))} - -- --- -:: {new: { -:: id:'0vaof.6df9u.2agc3.d0dp1', -:: date-created:1440011611215, -:: version:1, -:: date-modified:1440011611215, -:: creator:'fyr', -:: tags:['tag'], -:: date-due:null, -:: done:false, -:: title:'Test task', -:: description:'The converter owrks right?', -:: discussion:[{date:1440011611215,ship:'sondel',body:'hi'}] -:: } } diff --git a/bad/mar/work/report.hoon b/bad/mar/work/report.hoon deleted file mode 100644 index d1dc1a4c9f..0000000000 --- a/bad/mar/work/report.hoon +++ /dev/null @@ -1,55 +0,0 @@ -:: -:::: /hoon+report+work+mar - :: -/- work -!: -:::: - :: -[work .] -|_ client -++ grow -|% ++ json - =+ jope=|=(a/ship [%s (rsh 3 1 (scot %p a))]) - %- jobe :~ - sort+[%a (turn sort |=(a/@uv [%s (scot %uv a)]))] - =< tasks+(jobe (turn (~(tap by tasks)) .)) - |= {@ client-task} - =+ tax - :- (scot %uv id) - %- jobe :~ id+[%s (scot %uv id)] - tags+[%a (turn (^sort (~(tap in tags)) aor) |=(a/cord s+a))] - doer+?~(doer ~ (jope u.doer)) - title+[%s title] - creator+(jope creator) - version+(jone version) - archived+[%b archived] - =< audience+[%a (turn (~(tap in audience)) .)] - |=(a/station:talk [%s (crip "{}/{(trip q.a)}")]) - 'date_created'^(jode date-created) - 'date_modified'^(jode date-modified) - description+[%s description] - =< discussion+[%a (turn discussion .)] - |=(comment (jobe date+(jode date) ship+(jope ship) body+[%s body] ~)) - 'date_due'^?~(date-due ~ (jode u.date-due)) - done+?~(done ~ (jode u.done)) - == - == --- -- -:: sort: ["0v111id" ...] -:: tasks: [ { -:: id:"0v111id" -:: tags:["str" ...] -:: doer:|("~ship" null) -:: title:"str" -:: creator:"~ship" -:: version:12345 -:: archived:false -:: audience:["~ship+chan" ...] -:: date_created:1262304000000 -:: date_modified:1262304000000 -:: description:"str" -:: discussion:[{date:1262304000000 ship:"~ship" body:"str"} ...] -:: date_due:?(1262304000000 null) -:: done:?(1262304000000 null) -:: } -:: ...] diff --git a/bad/mar/work/task.hoon b/bad/mar/work/task.hoon deleted file mode 100644 index b3d89fac29..0000000000 --- a/bad/mar/work/task.hoon +++ /dev/null @@ -1,106 +0,0 @@ -:: -:::: /hoon/task/work/mar - :: -/- work -!: -:::: - :: -[work .] -|% -++ rend - |= a/(list $@(char dime)) ^- cord - %- crip - |- ^- tape - ?~ a ~ - ?@ i.a [i.a $(a t.a)] - (weld (scow i.a) $(a t.a)) -:: -++ indent |=(a/wain (turn a |=(b/cord (cat 3 ' ' b)))) -:: -++ undent - |* {a/wain b/$+(wain *)} ^+ [*b a] - =^ c a - |- ^- {c/wain a/wain} - ?~ a [~ a] - ?. =(' ' (end 3 2 i.a)) - [~ a] - [[- c] a]:[(rsh 3 2 i.a) $(a t.a)] - [(b `wain`c) a] -:: -++ keen |*({a/* b/rule} |=(c/nail `(like a)`(b c))) -++ parse - |* {hed/$?($~ $@(@tas tape)) tal/(pole)} - ?~ hed (..$ tal) - ?^ hed ;~(pfix (just (crip hed)) (..$ tal)) - =- ?~(tal had ;~(plug had (..$ tal))) - =< had=(sear . nuck:so) - |= a/coin ^- (unit (odo:raid hed)) - ?. &(?=({$$ @ @} a) =(hed p.p.a)) ~ - (some q.p.a) -:: -++ advance - |* {a/wain b/rule} ^+ [(wonk *b) a] - ?~(a !! ~|(i.a [(rash i.a b) t.a])) --- -!: -:::: - :: -|_ taz/task -++ grab - |% ++ txt - |= a/wain ^+ taz - =+ ~[id=%uv "_" date-created=%da " " version=%ud date-modified=%da] - =^ b a (advance a ;~(plug (parse -) (punt (parse " " %da ~)))) - =+ [-.b `date-due/(unit @da)`+.b] - =^ tags a (undent a ~(gas in *(set cord))) - =^ title a ?~(a !! a) - =^ b a %+ advance a - ;~(plug (parse %p ~) (punt (parse ">" %p ~)) (punt (parse "X" %da ~))) - =+ `{creator/@p doer/(unit @p) done/(unit @da)}`b - =^ description a (undent a role) - :* id date-created version date-modified creator - doer tags date-due done title description :: XX done - |- ^- (list comment) - ?: =(~ a) ~ - =^ b a (advance a (parse ship=%p " " date=%da ~)) - =+ b - =^ body a (undent a role) - [[date ship body] $] - == - -- -++ grow - |% - ++ elem ;pre: {(zing `wall`(turn (wash 0^120 >taz<) |=(a/tape ['\0a' a])))} - ++ mime [/text/x-task (taco (role txt))] - ++ txt - =+ taz - =+ due=?~(date-due ~ ~[' ' da+u.date-due]) - :- (rend uv+id '_' da+date-created ' ' ud+version da+date-modified due) - %+ welp (indent (sort (~(tap in tags)) aor)) - :- title - =+ do=[=-(?~(doer - ['>' p+u.doer -]) ?~(done ~ ~['X' da+u.done]))] - :- (rend p+creator do) - %- zing ^- (list wain) - :- (indent (lore description)) - %+ turn discussion - |= comment ^- wain - [(rend p+ship ' ' da+date ~) (indent (lore body))] - -- -++ grad %txt --- -:: {id}_{date-created} {version}{date-modified}{|(" {date-due}" ~)} -:: {tag1} -:: {tag2} -:: ... -:: {title} -:: {creator}{|(">{doer}" ~)}{|("X{done}" ~)} -:: {description} -:: {more description} -:: {ship1} {date} -:: {comment} -:: {more comment} -:: {more comment} -:: {ship2} {date} -:: {comment} -:: {more comment} -:: {more comment} From 55d1d29b56e0a76dc14e4af02c61185899318f3d Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sat, 30 Jan 2016 19:37:03 -0800 Subject: [PATCH 123/137] Fix various marks, etc. --- bad/mar/down.hoon | 36 ---- bad/mar/react-snip.hoon | 31 ---- bad/mar/react.hoon | 23 --- bad/mar/sched.hoon | 28 ---- bad/mar/snip.hoon | 60 ------- bad/mar/sole/action.hoon | 38 ----- bad/mar/sole/effect.hoon | 60 ------- bad/mar/talk/command.hoon | 119 -------------- bad/mar/talk/report.hoon | 144 ---------------- bad/mar/talk/telegrams.hoon | 320 ------------------------------------ jets/f/ut_nest.c | 2 +- 11 files changed, 1 insertion(+), 860 deletions(-) delete mode 100644 bad/mar/down.hoon delete mode 100644 bad/mar/react-snip.hoon delete mode 100644 bad/mar/react.hoon delete mode 100644 bad/mar/sched.hoon delete mode 100644 bad/mar/snip.hoon delete mode 100644 bad/mar/sole/action.hoon delete mode 100644 bad/mar/sole/effect.hoon delete mode 100644 bad/mar/talk/command.hoon delete mode 100644 bad/mar/talk/report.hoon delete mode 100644 bad/mar/talk/telegrams.hoon diff --git a/bad/mar/down.hoon b/bad/mar/down.hoon deleted file mode 100644 index 9f0e21805b..0000000000 --- a/bad/mar/down.hoon +++ /dev/null @@ -1,36 +0,0 @@ -:: -:::: /hoon+down+mar - :: -/? 314 -/- markdown -/+ down-jet, frontmatter -:: -:::: - :: -[markdown .] -|_ don/down -++ grab :: convert from - |% - ++ noun down :: clam from %noun - ++ md - |= src/@t - =+ [atr mud]=(parse:frontmatter (lore src)) - [[%meta atr] (mark:down-jet mud)] - -- -:: -++ grow :: convert into - |% - ++ hymn :: convert to %hymn - ;html - ;head:title:"Untitled" - ;body - ;* (print:down-jet don) - == - == - ++ elem :: convert to %elem - ;div - ;* (print:down-jet don) - == - :: ++ react elem - -- --- diff --git a/bad/mar/react-snip.hoon b/bad/mar/react-snip.hoon deleted file mode 100644 index ebea325f84..0000000000 --- a/bad/mar/react-snip.hoon +++ /dev/null @@ -1,31 +0,0 @@ -:: -:::: /hoon/core/react-snip/mar - :: -/? 314 -/+ react -!: -:::: - :: -[. react] -|_ {hed/marl tal/marl} -:: -++ grow :: convert to - |% - ++ mime [/application/json (tact tape)] - ++ tape (pojo react-snips-json) - ++ elem ;div:(h1:"*{hed}" div:"*{tal}") - ++ react-snip-js (crip (react-to-tape elem)) - ++ react-snips-json - ::?> ?=([[%div ~] [[%h1 ~] *] [[%div ~] *] ~]] own) :: xx mystery fish-loop - %^ jobe - head+react-head-json - body+react-snip-json - ~ - :: - ++ react-head-json (react-to-json ;h1:"*{hed}") - ++ react-snip-json (react-to-json ;div:"*{tal}") - -- -++ grab |% :: convert from - ++ noun manx :: clam from %noun - ++ snip |=(a/{marl marl} a) --- -- diff --git a/bad/mar/react.hoon b/bad/mar/react.hoon deleted file mode 100644 index 9c65276710..0000000000 --- a/bad/mar/react.hoon +++ /dev/null @@ -1,23 +0,0 @@ -:: -:::: /hoon/core/react/mar - :: -/? 314 -/+ react -!: -:::: - :: -[. react] -|_ own/manx -:: -++ grow :: convert to - |% - ++ tape (pojo react-json) - ++ react-js (crip (react-to-tape own)) -:: ++ js react-js :: convert to %js - ++ react-json (react-to-json own) - ++ mime [/application/json (tact tape)] :: convert to %mime - -- -++ grab |% :: convert from - ++ noun manx :: clam from %noun - ++ elem |= a/manx a --- -- diff --git a/bad/mar/sched.hoon b/bad/mar/sched.hoon deleted file mode 100644 index b48c1eeff3..0000000000 --- a/bad/mar/sched.hoon +++ /dev/null @@ -1,28 +0,0 @@ -!: -:::: /hoon/core/sched/mar - :: -|_ dat/(map @da cord) -++ grow :: convert to - |% ++ mime [/text/x-sched (tact tape)] - ++ tape - (zing `wall`(turn sorted-list |=({a/@da b/cord} "{} {(trip b)}\0a"))) - ++ elem =< ;ul: *{(turn sorted-list .)} - |= {tym/@da ite/cord} ^- manx - ;li: ;{b "{}"}: {(trip ite)} - ++ sorted-list - (sort (~(tap by dat)) |=({{l/@ @} {r/@ @}} (lth l r))) - -- -++ grab - |% :: convert from - ++ mime - |= {p/mite q/octs} ^+ dat - =< (mo (turn (lore q.q) .)) - |= a/@t ^- {@da @t} - %+ rash a - ;~ (glue ace) - (cook |=(a/coin ?>(?=({$~ $da @} a) `@da`q.p.a)) nuck:so) - (cook crip (star prn)) - == - -- -++ grad %mime --- diff --git a/bad/mar/snip.hoon b/bad/mar/snip.hoon deleted file mode 100644 index 5a9a21606f..0000000000 --- a/bad/mar/snip.hoon +++ /dev/null @@ -1,60 +0,0 @@ -:: -:::: /hoon+core+elem+mar - :: -/? 314 -!: -|% - ++ words 1 - ++ hedtal - =| met/marl - |= a/marl ^- {hed/marl tal/marl} - ?~ a [~ ~] - ?. ?=($h1 n.g.i.a) - ?: ?=($meta n.g.i.a) - $(a t.a, met [i.a met]) - =+ had=$(a c.i.a) - ?^ -.had had - $(a t.a) - [c.i.a (weld (flop met) (limit words t.a))] - :: - ++ limit - |= {lim/@u mal/marl} - =< res - |- ^- {rem/@u res/marl} - ?~ mal [lim ~] - ?~ lim [0 ~] - =+ ^- {lam/@u hed/manx} - ?: ?=(_:/(**) i.mal) - [lim :/(tay)]:(deword lim v.i.a.g.i.mal) - [rem ele(c res)]:[ele=i.mal $(mal c.i.mal)] - [rem - res]:[hed $(lim lam, mal t.mal)] - :: - ++ deword - |= {lim/@u tay/tape} ^- {lim/@u tay/tape} - ?~ tay [lim tay] - ?~ lim [0 ~] - =+ wer=(dot 1^1 tay) - ?~ q.wer - [lim - tay]:[i.tay $(tay t.tay)] - =+ nex=$(lim (dec lim), tay q.q.u.q.wer) - [-.nex [(wonk wer) +.nex]] --- -:: -!: -|_ {hed/marl tal/marl} -:: -++ grow :: convert to - |% - ++ mime - =< mime - |% - ++ elem ;div:(h1:"*{hed}" div:"*{tal}") :: convert to %elem - ++ hymn ;html:(head:title:"snip" body:"+{elem}") :: convert to %hymn - ++ html (crip (poxo hymn)) :: convert to %html - ++ mime [/text/html (taco html)] :: convert to %mime - -- - -- -++ grab |% :: convert from - ++ noun {marl marl} :: clam from $noun - ++ elem |=(a/manx (hedtal +.a)) --- -- diff --git a/bad/mar/sole/action.hoon b/bad/mar/sole/action.hoon deleted file mode 100644 index a74efe8cca..0000000000 --- a/bad/mar/sole/action.hoon +++ /dev/null @@ -1,38 +0,0 @@ -:: -:::: /hoon+sole-action+mar - :: -/? 314 -/- sole -!: -:::: - :: -[sole .] -|_ sole-action -:: -++ grab :: convert from - |% - ++ json - |= jon/^json ^- sole-action - %- need %. jon - => [jo ..sole-action] - |^ (fo %ret (of det+change ~)) - ++ fo - |* {a/term b/fist} - |=(c/json ?.(=([%s a] c) (b c) (some [a ~]))) - :: - ++ ra - |* {a/{p/term q/fist} b/fist} - |= c/json %. c - ?.(=(%a -.c) b (pe p.a (ar q.a))) - :: - ++ change (ot ler+(at ni ni ~) ted+(cu |*(a/* [0v0 a]) edit) ~) - ++ char (cu turf so) - ++ edit - %+ fo %nop - %+ ra mor+|=(json (edit +<)) - (of del+ni set+(cu tuba sa) ins+(ot at+ni cha+char ~) ~) - -- - :: - ++ noun sole-action :: clam from %noun - -- --- diff --git a/bad/mar/sole/effect.hoon b/bad/mar/sole/effect.hoon deleted file mode 100644 index 113644148a..0000000000 --- a/bad/mar/sole/effect.hoon +++ /dev/null @@ -1,60 +0,0 @@ -:: -:::: /hoon+sole-effect+mar - :: -/? 314 -/- sole -!: -:::: - :: -[sole .] -|% -++ mar-sole-change :: XX dependency - |_ cha/sole-change - ++ grow - |% ++ json - ^- ^json - =+ cha - =< (jobe ted+(. ted) ler+a+~[(jone own.ler) (jone his.ler)] ~) - |= det/sole-edit - ?- -.det - $nop [%s 'nop'] - $mor [%a (turn p.det ..$)] - $del (joba %del (jone p.det)) - $set (joba %set (jape (tufa p.det))) - $ins (joba %ins (jobe at+(jone p.det) cha+s+(tuft q.det) ~)) - == - -- - -- -++ wush - |= {wid/@u tan/tang} - ^- tape - =+ rolt=|=(a/wall `tape`?~(a ~ ?~(t.a i.a :(weld i.a "\0a" $(a t.a))))) - (rolt (turn (flop tan) |=(a/tank (rolt (wash 0^wid a))))) -:: --- -!: -|_ sef/sole-effect -:: -++ grab :: convert from - |% - ++ noun sole-effect :: clam from %noun - -- -++ grow - |% - ++ json - ^- ^json - ?+ -.sef - ~|(unsupported-effect+-.sef !!) - $mor [%a (turn p.sef |=(a/sole-effect json(sef a)))] - $err (joba %hop (jone p.sef)) - $txt (joba %txt (jape p.sef)) - $tan (joba %tan (jape (wush 160 p.sef))) - $det (joba %det json:~(grow mar-sole-change +.sef)) - $pro - (joba %pro (jobe vis+b+vis.sef tag+s+tag.sef cad+(jape cad.sef) ~)) - :: - ?($bel $clr $nex) - (joba %act %s -.sef) - == - -- --- diff --git a/bad/mar/talk/command.hoon b/bad/mar/talk/command.hoon deleted file mode 100644 index 777c790205..0000000000 --- a/bad/mar/talk/command.hoon +++ /dev/null @@ -1,119 +0,0 @@ -:: -:::: /hoon+talk-command+mar - :: -/? 314 -/- talk -!: -[talk .] -|_ cod/command -:: -++ grab :: convert from - |% - ++ noun command :: clam from %noun - ++ json - => [jo ..command] - |= a/json ^- command - =- (need ((of -) a)) - =< :~ publish+(ar thot) - review+(ar thot) - design+(ot party+so config+(mu conf) ~) - == - |% - ++ op :: parse keys of map - |* {fel/rule wit/fist} - %+ cu mo - %- ci :_ (om wit) - |= a/(map cord _(need *wit)) - ^- (unit (list _[(wonk *fel) (need *wit)])) - (zl (turn (~(tap by a)) (head-rush fel))) - :: - ++ ke :: callbacks - |* {gar/* sef/_|.(fist)} - |= jon/json - ^- (unit _gar) - =- ~! gar ~! (need -) - - ((sef) jon) - :: - ++ as :: array as set - :: |*(a=fist (cu sa (ar a))) :: XX types - |* a/fist - %- cu :_ (ar a) - ~(gas in *(set _(need *a))) - :: - ++ lake |*(a/_* $+(json (unit a))) - ++ peach - |* a/{rule rule} - |= tub/nail - ^- (like (each _(wonk (-.a)) _(wonk (+.a)))) - %. tub - ;~(pose (stag %& -.a) (stag %| +.a)) - :: - ++ head-rush - |* a/rule - |* {b/cord c/*} - =+ nit=(rush b a) - ?~ nit ~ - (some [u.nit c]) - :: - :: - ++ thot - ^- $+(json (unit thought)) - %- ot :~ - serial+(ci (slat %uv) so) - audience+audi - statement+stam - == - :: - ++ audi (op parn memb) :: audience - ++ auri (op parn (ci (soft presence) so)) - ++ memb (ot envelope+lope delivery+(ci (soft delivery) so) ~) - ++ lope (ot visible+bo sender+(mu (su parn)) ~) - :: - ++ parn - ^- $+(nail (like partner)) - %+ peach - ;~((glue fas) ;~(pfix sig fed:ag) urs:ab) - %+ sear (soft passport) - ;~((glue fas) sym urs:ab) :: XX [a-z0-9_]{1,15} - :: - ++ speech-or-eval $?(speech {$eval p/@t} {$mor p/(list speech-or-eval)}) - ++ eval - |= a/(trel @da bouquet speech-or-eval) - ^- statement - %= a r ^- speech - |- - ?: ?=($mor -.r.a) - [%mor (turn p.r.a |=(b/speech-or-eval ^$(r.a b)))] - ?. ?=($eval -.r.a) r.a - =- [%fat tank+- %exp p.r.a] - =+ pax=[&1:% &2:% (scot %da p.a) |3:%] - p:(mule |.([(sell (slap !>(..zuse) (rain pax p.r.a)))]~)) - == - :: - ++ stam - ^- $+(json (unit statement)) - %+ cu eval - (ot date+di bouquet+(as (ar so)) speech+spec ~) - :: - ++ spec - %+ ke *speech-or-eval |. - %- of - :~ lin+(ot say+bo txt+so ~) - url+(su aurf:urlp) - eval+so - mor+(ar spec) - :: exp+(cu |=(a=cord [a ~]) so) - :: inv+(ot ship+(su fed:ag) party+(su urs:ab) ~) - == - :: - ++ conf - ^- $+(json (unit config)) - %- ot :~ - sources+(as (su parn)) - caption+so - :- %cordon - (ot posture+(ci (soft posture) so) list+(as (su fed:ag)) ~) - == - -- --- -- - diff --git a/bad/mar/talk/report.hoon b/bad/mar/talk/report.hoon deleted file mode 100644 index d148f31e88..0000000000 --- a/bad/mar/talk/report.hoon +++ /dev/null @@ -1,144 +0,0 @@ -:: -:::: /hoon/talk-report/mar - :: -/? 314 -/- talk -/+ talk -!: -[talk .] -|_ rep/report -:: -++ grab :: convert from - |% - ++ noun report :: clam from %noun - -- -++ grow - |% - ++ mime [/text/json (taco (crip (pojo json)))] - ++ json - => + - |^ %+ joba -.rep - ?- -.rep - $cabal (cabl +.rep) - $house a+(turn (~(tap by +.rep)) jose) - $glyph ((jome |=(a/char a) nack) +.rep) - $grams (jobe num+(jone p.rep) tele+[%a (turn q.rep gram)] ~) - $group (jobe local+(grop p.rep) global+%.(q.rep (jome parn grop)) ~) - == - ++ joce |=(a/span [%s a]) - ++ jose - |= {a/span b/posture c/cord} - (jobe name+[%s a] posture+[%s a] caption+[%s b] ~) - :: - ++ jove - |= {a/envelope b/delivery} - %- jobe :~ - envelope+(jobe visible+[%b p.a] sender+?~(q.a ~ s+(parn u.q.a)) ~) - delivery+[%s b] - == - ++ jope |=(a/ship (jape +:)) ::[%s (crip +:(scow %p a))]) - ++ joke |=(a/tank [%s (role (turn (wash 0^80 a) crip))]) - ++ jode |=(a/time (jone (div (mul (sub a ~1970.1.1) 1.000) ~s1))) -:: ++ jase -:: |* a=,json -:: |= b=(set ,$+<.a) ^- json -:: ~! b -:: [%a (turn (~(tap in b)) a)] - :: - ++ jome :: stringify keys - |* {a/_cord b/_json} - |= c/(map _+<.a _+<.b) - (jobe (turn (~(tap by c)) (both a b))) - :: - ++ both :: cons two gates - |* {a/_* b/_*} - |=(c/_[+<.a +<.b] [(a -.c) (b +.c)]) - :: - :: - ++ nack |=(a/(set (set partner)) [%a (turn (~(tap in a)) sorc)]) - ++ grop (jome phon stas) :: (map ship status) - ++ phon |=(a/ship (scot %p a)) - ++ stas |=(status (jobe presence+(joce p) human+(huma q) ~)) - ++ gram |=(telegram (jobe ship+(jope p) thought+(thot q) ~)) - ++ thot - |= thought - (jobe serial+(jape

) audience+(audi q) statement+(stam r) ~) - :: - ++ audi (jome parn jove) - ++ bouq - |= a/bouquet - a+(turn (~(tap in a)) |=(b/path a+(turn b |=(c/span s+c)))) - :: - ++ parn - |= a/partner ^- cord - ?- -.a - $& (stat p.a) - $| %- crip - ?- -.p.a - $twitter "{(trip -.p.a)}/{(trip p.p.a)}" - == - == - :: - ++ stat - |= a/station ^- cord - (crip "{}/{(trip q.a)}") - :: - ++ stam - |= statement - (jobe date+(jode p) bouquet+(bouq q) speech+(spec r) ~) - :: - ++ spec - |= a/speech - %+ joba -.a - ?+ -.a ~|(stub+-.a !!) - $lin (jobe txt+[%s q.a] say+[%b p.a] ~) - $url (joba txt+[%s (crip (earf p.a))]) - $exp (joba txt+[%s p.a]) - $tax (joba txt+(jape (rend-work-duty p.a))) - $app (jobe txt+[%s q.a] src+[%s p.a] ~) - $fat (jobe tor+(tors p.a) taf+$(a q.a) ~) - $mor a+(turn p.a spec) - :: %inv (jobe ship+(jope p.a) party+[%s q.a] ~) - == - :: - ++ tors - |= a/torso - %+ joba -.a - ?- -.a - $text [%s (role +.a)] - $tank [%a (turn +.a joke)] - $name (jobe nom+s+p.a mon+$(a q.a) ~) - == - :: - ++ huma - |= human - %^ jobe - hand+?~(hand ~ [%s u.hand]) - :- %true - ?~ true ~ - =+ u.true - (jobe first+[%s p] middle+?~(q ~ [%s u.q]) last+[%s r] ~) - ~ - :: - ++ cabl - |= cabal - %- jobe :~ - loc+(conf loc) - ham+((jome stat conf) ham) - == - :: - ++ sorc - |= a/(set partner) ^- json - [%a (turn (~(tap in a)) |=(b/partner s+(parn b)))] - :: - ++ conf - |= config - %- jobe :~ - sources+(sorc sources) - caption+[%s caption] - =- cordon+(jobe posture+[%s -.cordon] list+[%a -] ~) - (turn (~(tap in q.cordon)) jope) :: XX jase - == - -- --- -- - diff --git a/bad/mar/talk/telegrams.hoon b/bad/mar/talk/telegrams.hoon deleted file mode 100644 index 05e22d1147..0000000000 --- a/bad/mar/talk/telegrams.hoon +++ /dev/null @@ -1,320 +0,0 @@ -:: -:::: /hoon/talk-telegrams/mar - :: -/? 314 -/- talk -/+ talk -!: -=+ talk -|_ gam/(list telegram) -:: -++ grab-work-duty => [jo work-stuff] - |^ dute - ++ as - :: |*(a/fist (cu sa (ar a))) :: XX types - |* a/fist - %- cu :_ (ar a) - ~(gas in *(set _(need *a))) - ++ ot - |* a/(pole {@tas fist}) - |= b/json - %. ((^ot a) b) - %- slog - ?+ b ~ - {$o *} - %+ murn `(list {@tas fist})`a - |= {c/term d/fist} ^- (unit tank) - =+ (~(get by p.b) c) - ?~ - (some >[c (turn (~(tap by p.b)) head)]<) - =+ (d u) - ?~ - (some >[c u]<) - ~ - == - ++ of - |* a/(pole {@tas fist}) - |= b/json - %. ((of:jo a) b) - %- slog - ?+ b ~ - {$o *} - %+ murn `(list {@tas fist})`a - |= {c/term d/fist} ^- (unit tank) - =+ (~(get by p.b) c) - ?~ - ~ - =+ (d u) - ?~ - (some >[c u]<) - ~ - == - ++ id (ci (slat %uv) so) - ++ ship (su fed:ag) - ++ dute - %- of :~ - create+task change+(ot id+id meat+uppd ~) - archive+id update+(ot id+id version+ni her+(su fed:ag) meat+uppd ~) - == - ++ task - %- ot :~ - id+id 'date_created'^di - version+ni 'date_modified'^di - creator+ship doer+(mu ship) - tags+(as so) 'date_due'^(mu di) - done+(mu di) title+so - description+so discussion+(ar (ot date+di ship+ship body+so ~)) - == - ++ audi (as stan) - ++ stan (su ;~((glue fas) ;~(pfix sig fed:ag) urs:ab)) - ++ uppd - %- of :~ - set-doer+(mu (su fed:ag)) - set-date-due+(mu di) - set-tags+(as so) - set-title+so - set-description+so - set-done+bo - add-comment+(ot ship+(su fed:ag) com+so ~) - == - -- -++ grow-work-duty - => work-stuff - =+ jope=|=(a/ship [%s (rsh 3 1 (scot %p a))]) - =+ jove=|=(a/@uvI [%s (scot %uv a)]) - =< |= duty - %+ joba +<- - ?- +<- - $create (task tax) - $archive (jove id) - $change (jobe id+(jove id) meat+(flesh meat) ~) - $update - %- jobe :~ - id+(jove id) - version+(jone version) - her+(jope her) - meat+(flesh meat) - == - == - |% - ++ tags - |= a/(set @t) - [%a (turn (sort (~(tap in a)) aor) |=(b/cord s+b))] - :: - ++ task - |= ^task - %- jobe :~ id+[%s (scot %uv id)] - tags+(^tags tags) - doer+?~(doer ~ (jope u.doer)) - title+[%s title] - creator+(jope creator) - version+(jone version) - 'date_created'^(jode date-created) - 'date_modified'^(jode date-modified) - description+[%s description] - =< discussion+[%a (turn discussion .)] - |=(comment (jobe date+(jode date) ship+(jope ship) body+[%s body] ~)) - 'date_due'^?~(date-due ~ (jode u.date-due)) - done+?~(done ~ (jode u.done)) - == - ++ flesh - |= ^flesh - %+ joba +<- - ?- +<- - $set-doer ?~(her ~ (jope u.her)) - $set-date-due ?~(wen ~ (jode u.wen)) - $set-tags (tags tag) - $set-title [%s til] - $set-description [%s des] - $set-done [%b don] - $add-comment (jobe ship+(jope who) com+[%s com] ~) - == - -- -++ grab - |% - ++ noun (list telegram) - ++ mime |=(^mime (json (rash q.q apex:poja))) - ++ json - => [jo ..telegram dute=grab-work-duty] - |= a/json ^- (list telegram) - =- (need ((ar (ot ship+(su fed:ag) thought+thot ~)) a)) - |% - ++ of - |* a/(pole {@tas fist}) - |= b/json - %. ((of:jo a) b) - %- slog - ?+ b ~ - {$o *} - %+ murn `(list {@tas fist})`a - |= {c/term d/fist} ^- (unit tank) - =+ (~(get by p.b) c) - ?~ - ~ - =+ (d u) - ?~ - (some >[c u]<) - ~ - == - ++ op :: parse keys of map - |* {fel/rule wit/fist} - %+ cu mo - %- ci :_ (om wit) - |= a/(map cord _(need *wit)) - ^- (unit (list _[(wonk *fel) (need *wit)])) - (zl (turn (~(tap by a)) (head-rush fel))) - :: - ++ as :: array as set - :: |*(a/fist (cu sa (ar a))) :: XX types - |* a/fist - %- cu :_ (ar a) - ~(gas in *(set _(need *a))) - :: - ++ ke :: callbacks - |* {gar/* sef/_|.(fist)} - |= jon/json - ^- (unit _gar) - =- ~! gar ~! (need -) - - ((sef) jon) - :: - ++ lake |*(a/_* $+(json (unit a))) - ++ head-rush - |* a/rule - |* {b/cord c/*} - =+ nit=(rush b a) - ?~ nit ~ - (some [u.nit c]) - :: - :: - ++ thot - ^- $+(json (unit thought)) - %- ot :~ - serial+(ci (slat %uv) so) - audience+audi - statement+stam - == - :: - ++ audi (op parn memb) :: audience - ++ auri (op parn (ci (soft presence) so)) - ++ memb (ot envelope+lope delivery+(ci (soft delivery) so) ~) - ++ lope (ot visible+bo sender+(mu (su parn)) ~) - :: - ++ parn - ^- $+(nail (like partner)) - %+ pick - ;~((glue fas) ;~(pfix sig fed:ag) urs:ab) - %+ sear (soft passport) - ;~((glue fas) sym urs:ab) :: XX [a-z0-9_]{1,15} - :: - ++ stam (ot date+di bouquet+(as (ar so)) speech+spec ~) - ++ spec - %+ ke *speech |. ~+ - %- of :~ - lin+(ot say+bo txt+so ~) - url+(ot txt+(su aurf:urlp) ~) - exp+(ot txt+so ~) - tax+(ot xat+dute ~) - app+(ot txt+so src+so ~) - fat+(ot tor+tors taf+spec ~) - ext+(ot nom+so txe+blob ~) - non+ul - :: inv+(ot ship+(su fed:ag) party+(su urs:ab) ~) - == - ++ tors - %+ ke *torso |. ~+ - %- of :~ - name+(ot nom+so mon+tors ~) - text+(cu lore so) - tank+(ot dat+(cu (hard (list tank)) blob) ~) - == - :: - ++ blob (cu cue (su fel:ofis)) - -- - -- -:: -++ grow - |% - ++ mime [/text/json (taco (crip (pojo json)))] - ++ json - => + - |^ - :- %a - %+ turn gam - |= telegram - (jobe ship+(jope p) thought+(thot q) ~) - :: - ++ jove - |= {a/envelope b/delivery} - %- jobe :~ - envelope+(jobe visible+[%b p.a] sender+?~(q.a ~ s+(parn u.q.a)) ~) - delivery+[%s b] - == - :: - ++ jope |=(a/ship (jape +:)) ::[%s (crip +:(scow %p a))]) - ++ joke |=(a/tank [%s (role (turn (wash 0^80 a) crip))]) - ++ jode |=(a/time (jone (div (mul (sub a ~1970.1.1) 1.000) ~s1))) - ++ jome :: stringify keys - |* {a/_cord b/_json} - |= c/(map _+<.a _+<.b) - (jobe (turn (~(tap by c)) (both a b))) - :: - ++ both :: cons two gates - |* {a/_* b/_*} - |=(c/_[+<.a +<.b] [(a -.c) (b +.c)]) - :: - ++ thot - |= thought - (jobe serial+(jape

) audience+(audi q) statement+(stam r) ~) - :: - ++ audi (jome parn jove) - ++ bouq - |= a/bouquet - a+(turn (~(tap in a)) |=(b/path a+(turn b |=(c/knot s+c)))) - :: - ++ parn - |= a/partner ^- cord - ?- -.a - $& (stat p.a) - $| %- crip - ?- -.p.a - $twitter "{(trip -.p.a)}/{(trip p.p.a)}" - == - == - :: - ++ stat - |= a/station ^- cord - (crip "{}/{(trip q.a)}") - :: - ++ stam - |= statement - (jobe date+(jode p) bouquet+(bouq q) speech+(spec r) ~) - :: - ++ spec - |= a/speech - %+ joba -.a - ?+ -.a ~|(stub+-.a !!) - $lin (jobe txt+[%s q.a] say+[%b p.a] ~) - $url (joba txt+(jape (earf p.a))) - $exp (joba txt+[%s p.a]) - $tax (jobe txt+(jape (rend-work-duty p.a)) xat+(grow-work-duty p.a) ~) - $app (jobe txt+[%s q.a] src+[%s p.a] ~) - $fat (jobe tor+(tors p.a) taf+$(a q.a) ~) - $ext (jobe nom+[%s p.a] txe+(jape (sifo (jam +.a))) ~) - $non ~ - :: $inv (jobe ship+(jope p.a) party+[%s q.a] ~) - == - :: - ++ tors - |= a/torso - %+ joba -.a - ?- -.a - $text [%s (role +.a)] - $tank (jobe txt+[%a (turn +.a joke)] dat+(jape (sifo (jam +.a))) ~) - $name (jobe nom+s+p.a mon+$(a q.a) ~) - == - :: - -- - -- -:: -++ grad - |% - ++ form %talk-telegrams - ++ diff |=((list telegram) +<) - ++ pact |=((list telegram) +<) - ++ join |=({(list telegram) (list telegram)} `(unit mime)`~) - -- --- diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index 3e574d2550..897adacae6 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -331,7 +331,7 @@ if ( (c3y == tyn) || (c3n == tel) ) { return tyn; } else { -#if 1 +#if 0 u3_noun dun = u3qfu_dunq(van, "need", sut); u3_noun niz = u3qfu_dunq(van, "have", ref); From 4b92cd268553d2bd47c122a2e96ef41fe41a5ef7 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Tue, 2 Feb 2016 11:52:10 -0800 Subject: [PATCH 124/137] Making typed .^ a little less fake. --- include/jets/w.h | 1 + include/noun/allocate.h | 3 ++- include/noun/manage.h | 3 ++- include/noun/nock.h | 20 ++++++++++---------- jets/e/mink.c | 21 +++++++++++++++++++++ jets/tree.c | 2 ++ noun/manage.c | 18 +++++++++++++++--- noun/nock.c | 35 +++++++++++++++-------------------- 8 files changed, 68 insertions(+), 35 deletions(-) diff --git a/include/jets/w.h b/include/jets/w.h index b4d24134b1..0fab2fa72a 100644 --- a/include/jets/w.h +++ b/include/jets/w.h @@ -102,6 +102,7 @@ u3_noun u3we_rub(u3_noun); u3_noun u3we_lore(u3_noun); u3_noun u3we_loss(u3_noun); + u3_noun u3we_mick(u3_noun); u3_noun u3we_mink(u3_noun); u3_noun u3we_mule(u3_noun); u3_noun u3we_repg(u3_noun); diff --git a/include/noun/allocate.h b/include/noun/allocate.h index 9f0b66c342..7d7d293141 100644 --- a/include/noun/allocate.h +++ b/include/noun/allocate.h @@ -146,7 +146,8 @@ } jed; struct { // namespace - u3_noun flu; // (list $+(* (unit))), inward + u3_noun flu; // (list $+(* (unit))), old + u3_noun sea; // (list $+(* (unit))), new } ski; struct { // trace stack diff --git a/include/noun/manage.h b/include/noun/manage.h index 0495b4d0ea..4cc95b7f06 100644 --- a/include/noun/manage.h +++ b/include/noun/manage.h @@ -72,6 +72,7 @@ */ u3_noun u3m_soft_run(u3_noun fly, + u3_noun sea, u3_funq fun_f, u3_noun aga, u3_noun agb); @@ -79,7 +80,7 @@ /* u3m_soft_esc(): namespace lookup to (unit ,*). */ u3_noun - u3m_soft_esc(u3_noun sam); + u3m_soft_esc(u3_noun ref, u3_noun sam); /* u3m_mark(): mark all nouns in the road. */ diff --git a/include/noun/nock.h b/include/noun/nock.h index ccb36c1bff..89d49c2fab 100644 --- a/include/noun/nock.h +++ b/include/noun/nock.h @@ -19,26 +19,26 @@ u3_noun u3n_kick_on(u3_noun gat); - /* u3n_nock_un(): produce .*(bus fol), as ++toon. - */ - u3_noun - u3n_nock_un(u3_noun bus, u3_noun fol); - - /* u3n_slam_un(): produce (gat sam), as ++toon. - */ - u3_noun - u3n_slam_un(u3_noun gat, u3_noun sam); - /* u3n_nock_in(): produce .*(bus fol), as ++toon, in namespace. */ u3_noun u3n_nock_in(u3_noun fly, u3_noun bus, u3_noun fol); + /* u3n_nock_it(): produce .*(bus fol), as ++toon, in namespace. + */ + u3_noun + u3n_nock_it(u3_noun sea, u3_noun bus, u3_noun fol); + /* u3n_slam_in(): produce (gat sam), as ++toon, in namespace. */ u3_noun u3n_slam_in(u3_noun fly, u3_noun gat, u3_noun sam); + /* u3n_slam_it(): produce (gat sam), as ++toon, in namespace. + */ + u3_noun + u3n_slam_it(u3_noun sea, u3_noun gat, u3_noun sam); + /* u3n_nock_an(): as slam_in(), but with empty fly. */ u3_noun diff --git a/jets/e/mink.c b/jets/e/mink.c index 6906ca383f..0823633088 100644 --- a/jets/e/mink.c +++ b/jets/e/mink.c @@ -24,3 +24,24 @@ return som; } } + + u3_noun + u3we_mick(u3_noun cor) + { + u3_noun bus, fol, sea; + + if ( c3n == u3r_mean(cor, u3x_sam_4, &bus, + u3x_sam_5, &fol, + u3x_sam_3, &sea, + 0) ) + { + return u3m_bail(c3__exit); + } + else { + u3_noun som; + + som = u3n_nock_it(u3k(sea), u3k(bus), u3k(fol)); + + return som; + } + } diff --git a/jets/tree.c b/jets/tree.c index 1348647a62..398d202918 100644 --- a/jets/tree.c +++ b/jets/tree.c @@ -124,6 +124,7 @@ static u3j_harm _mood__hoon_mat_a[] = {{".2", u3we_mat}, {}}; static u3j_harm _mood__hoon_rub_a[] = {{".2", u3we_rub}, {}}; static u3j_harm _mood__hoon_lore_a[] = {{".2", u3we_lore}, {}}; static u3j_harm _mood__hoon_loss_a[] = {{".2", u3we_loss}, {}}; +static u3j_harm _mood__hoon_mick_a[] = {{".2", u3we_mick}, {}}; static u3j_harm _mood__hoon_mink_a[] = {{".2", u3we_mink}, {}}; static u3j_harm _mood__hoon_mule_a[] = {{".2", u3we_mule}, {}}; static u3j_harm _mood__hoon_repg_a[] = {{".2", u3we_repg}, {}}; @@ -485,6 +486,7 @@ static u3j_core _mood__hoon_d[] = { "lore", _mood__hoon_lore_a }, { "loss", _mood__hoon_loss_a }, { "mink", _mood__hoon_mink_a }, + { "mick", _mood__hoon_mick_a }, { "mule", _mood__hoon_mule_a }, { "repg", _mood__hoon_repg_a }, { "rexp", _mood__hoon_rexp_a }, diff --git a/noun/manage.c b/noun/manage.c index 9e2eaaae53..6140cdd941 100644 --- a/noun/manage.c +++ b/noun/manage.c @@ -470,6 +470,7 @@ u3m_mark(void) tot_w += u3h_mark(u3R->jed.har_p); tot_w += u3a_mark_noun(u3R->jed.das); tot_w += u3a_mark_noun(u3R->ski.flu); + tot_w += u3a_mark_noun(u3R->ski.sea); tot_w += u3a_mark_noun(u3R->bug.tax); tot_w += u3a_mark_noun(u3R->bug.mer); tot_w += u3a_mark_noun(u3R->pro.don); @@ -969,6 +970,7 @@ u3m_soft_nock(u3_noun bus, u3_noun fol) */ u3_noun u3m_soft_run(u3_noun fly, + u3_noun sea, u3_funq fun_f, u3_noun aga, u3_noun agb) @@ -983,6 +985,7 @@ u3m_soft_run(u3_noun fly, */ { u3R->ski.flu = u3nc(fly, u3to(u3_road, u3R->par_p)->ski.flu); + u3R->ski.sea = u3nc(sea, u3to(u3_road, u3R->par_p)->ski.sea); u3R->pro.don = u3to(u3_road, u3R->par_p)->pro.don; u3R->bug.tax = 0; } @@ -1045,6 +1048,7 @@ u3m_soft_run(u3_noun fly, */ { u3z(fly); + u3z(sea); u3z(aga); u3z(agb); } @@ -1057,14 +1061,16 @@ u3m_soft_run(u3_noun fly, /* u3m_soft_esc(): namespace lookup. Produces direct result. */ u3_noun -u3m_soft_esc(u3_noun sam) +u3m_soft_esc(u3_noun ref, u3_noun sam) { - u3_noun why, fly, pro; + u3_noun why, fly, sea, pro; /* Assert preconditions. */ { c3_assert(0 != u3R->ski.flu); + c3_assert(0 != u3R->ski.sea); + sea = u3h(u3R->ski.sea); fly = u3h(u3R->ski.flu); } @@ -1076,6 +1082,7 @@ u3m_soft_esc(u3_noun sam) */ { u3R->ski.flu = u3t(u3to(u3_road, u3R->par_p)->ski.flu); + u3R->ski.sea = u3t(u3to(u3_road, u3R->par_p)->ski.sea); u3R->pro.don = u3to(u3_road, u3R->par_p)->pro.don; u3R->bug.tax = 0; } @@ -1083,7 +1090,11 @@ u3m_soft_esc(u3_noun sam) /* Trap for exceptions. */ if ( 0 == (why = (u3_noun)_setjmp(u3R->esc.buf)) ) { - pro = u3n_slam_on(fly, sam); + if ( 0 == sea ) { + pro = u3n_slam_on(fly, sam); + } else { + pro = u3n_slam_on(sea, u3nc(ref, sam)); + } /* Fall back to the old road, leaving temporary memory intact. */ @@ -1100,6 +1111,7 @@ u3m_soft_esc(u3_noun sam) /* Release the sample. */ + u3z(ref); u3z(sam); /* Return the product. diff --git a/noun/nock.c b/noun/nock.c index 54010b7a3e..05b5e7d658 100644 --- a/noun/nock.c +++ b/noun/nock.c @@ -350,8 +350,7 @@ _n_nock_on(u3_noun bus, u3_noun fol) u3_noun val; u3t_off(noc_o); - u3z(ref); - val = u3m_soft_esc(u3k(gof)); + val = u3m_soft_esc(ref, u3k(gof)); u3t_on(noc_o); if ( !_(u3du(val)) ) { @@ -374,7 +373,7 @@ _n_nock_on(u3_noun bus, u3_noun fol) u3_noun val; u3t_off(noc_o); - val = u3m_soft_esc(u3k(gof)); + val = u3m_soft_esc(0, u3k(gof)); u3t_on(noc_o); if ( !_(u3du(val)) ) { @@ -440,24 +439,12 @@ u3n_slam_on(u3_noun gat, u3_noun sam) return u3n_kick_on(cor); } -/* u3n_nock_un(): produce .*(bus fol), as ++toon. +/* u3n_nock_it(): produce .*(bus fol), as ++toon, in namespace. */ u3_noun -u3n_nock_un(u3_noun bus, u3_noun fol) +u3n_nock_it(u3_noun sea, u3_noun bus, u3_noun fol) { - u3_noun fly = u3nt(u3nt(11, 0, 6), 0, 0); // |=(a=* .^(a)) - - return u3n_nock_in(fly, bus, fol); -} - -/* u3n_slam_un(): produce (gat sam), as ++toon. -*/ -u3_noun -u3n_slam_un(u3_noun gat, u3_noun sam) -{ - u3_noun fly = u3nt(u3nt(11, 0, 6), 0, 0); // |=(a=* .^(a)) - - return u3n_slam_in(fly, gat, sam); + return u3m_soft_run(0, sea, u3n_nock_on, bus, fol); } /* u3n_nock_in(): produce .*(bus fol), as ++toon, in namespace. @@ -465,7 +452,15 @@ u3n_slam_un(u3_noun gat, u3_noun sam) u3_noun u3n_nock_in(u3_noun fly, u3_noun bus, u3_noun fol) { - return u3m_soft_run(fly, u3n_nock_on, bus, fol); + return u3m_soft_run(fly, 0, u3n_nock_on, bus, fol); +} + +/* u3n_slam_it(): produce (gat sam), as ++toon, in namespace. +*/ +u3_noun +u3n_slam_it(u3_noun sea, u3_noun gat, u3_noun sam) +{ + return u3m_soft_run(0, sea, u3n_slam_on, gat, sam); } /* u3n_slam_in(): produce (gat sam), as ++toon, in namespace. @@ -473,7 +468,7 @@ u3n_nock_in(u3_noun fly, u3_noun bus, u3_noun fol) u3_noun u3n_slam_in(u3_noun fly, u3_noun gat, u3_noun sam) { - return u3m_soft_run(fly, u3n_slam_on, gat, sam); + return u3m_soft_run(fly, 0, u3n_slam_on, gat, sam); } /* u3n_nock_an(): as slam_in(), but with empty fly. From 0838818881440b047faedb326ca01bae05bb03e7 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Tue, 2 Feb 2016 17:50:34 -0800 Subject: [PATCH 125/137] %face to %fuss. Next change back. --- include/jets/q.h | 1 + include/jets/w.h | 1 + jets/f/face.c | 33 ++++++++- jets/f/type.c | 3 + jets/f/ut_burn.c | 1 + jets/f/ut_crop.c | 9 +++ jets/f/ut_find.c | 183 +++++++++++++++++++++++++++++++++++++++++++++++ jets/f/ut_fish.c | 1 + jets/f/ut_fuse.c | 8 +++ jets/f/ut_nest.c | 2 + jets/f/ut_peek.c | 1 + jets/f/ut_repo.c | 1 + jets/tree.c | 4 +- 13 files changed, 244 insertions(+), 4 deletions(-) diff --git a/include/jets/q.h b/include/jets/q.h index 96b954fd00..0a8a6c6642 100644 --- a/include/jets/q.h +++ b/include/jets/q.h @@ -165,6 +165,7 @@ u3_noun u3qf_core(u3_noun, u3_noun); u3_noun u3qf_cube(u3_noun, u3_noun); u3_noun u3qf_face(u3_noun, u3_noun); + u3_noun u3qf_fuss(u3_noun, u3_noun); u3_noun u3qf_fine(u3_noun, u3_noun, u3_noun); u3_noun u3qf_fitz(u3_noun, u3_noun); u3_noun u3qf_flan(u3_noun, u3_noun); diff --git a/include/jets/w.h b/include/jets/w.h index 0fab2fa72a..9754cd98d0 100644 --- a/include/jets/w.h +++ b/include/jets/w.h @@ -195,6 +195,7 @@ u3_noun u3wf_core(u3_noun); u3_noun u3wf_cube(u3_noun); u3_noun u3wf_face(u3_noun); + u3_noun u3wf_fuss(u3_noun); u3_noun u3wf_fine(u3_noun); u3_noun u3wf_fitz(u3_noun); u3_noun u3wf_flan(u3_noun); diff --git a/jets/f/face.c b/jets/f/face.c index abec7b8f77..16ea876915 100644 --- a/jets/f/face.c +++ b/jets/f/face.c @@ -1,4 +1,4 @@ -/* j/6/face.c +/* j/6/fuss.c ** */ #include "all.h" @@ -13,9 +13,13 @@ if ( c3__void == tip ) { return c3__void; } - else return u3nt(c3__face, + else if ( c3y == u3du(sag) ) { + return u3m_bail(c3__fail); + } else { + return u3nt(c3__fuss, u3k(sag), u3k(tip)); + } } u3_noun u3wf_face(u3_noun cor) @@ -28,3 +32,28 @@ return u3qf_face(sag, tip); } } + +/* functions +*/ + u3_noun + u3qf_fuss(u3_noun sag, + u3_noun tip) + { + if ( c3__void == tip ) { + return c3__void; + } + else return u3nt(c3__fuss, + u3k(sag), + u3k(tip)); + } + u3_noun + u3wf_fuss(u3_noun cor) + { + u3_noun sag, tip; + + if ( c3n == u3r_mean(cor, u3x_sam_2, &sag, u3x_sam_3, &tip, 0) ) { + return u3m_bail(c3__fail); + } else { + return u3qf_fuss(sag, tip); + } + } diff --git a/jets/f/type.c b/jets/f/type.c index d8eaa518e7..14fb6df755 100644 --- a/jets/f/type.c +++ b/jets/f/type.c @@ -32,6 +32,9 @@ case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); { } + case c3__fuss: u3x_cell(u3t(sut), &p_sut, &q_sut); + { + } case c3__fork: p_sut = u3t(sut); { } diff --git a/jets/f/ut_burn.c b/jets/f/ut_burn.c index 2af7d4b481..5e07a797a8 100644 --- a/jets/f/ut_burn.c +++ b/jets/f/ut_burn.c @@ -113,6 +113,7 @@ return ret; } } + case c3__fuss: case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); { return _burn_in(van, q_sut, gil); diff --git a/jets/f/ut_crop.c b/jets/f/ut_crop.c index 8aaa65089d..481839af21 100644 --- a/jets/f/ut_crop.c +++ b/jets/f/ut_crop.c @@ -150,6 +150,14 @@ u3z(foz); return ret; } + case c3__fuss: u3x_cell(u3t(sut), &p_sut, &q_sut); + { + u3_noun foz = _crop_dext(van, q_sut, ref, bix); + u3_noun ret = u3qf_fuss(p_sut, foz); + + u3z(foz); + return ret; + } case c3__fork: p_sut = u3t(sut); { u3_noun yed = u3qdi_tap(p_sut, u3_nul); @@ -196,6 +204,7 @@ default: return u3m_bail(c3__fail); case c3__core: + case c3__fuss: case c3__face: u3x_cell(u3t(ref), &p_ref, &q_ref); { return _crop_dext(van, sut, q_ref, bix); diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c index fd3ff16188..c7392ded33 100644 --- a/jets/f/ut_find.c +++ b/jets/f/ut_find.c @@ -27,6 +27,23 @@ 0)); } + static u3_noun + u3qfu_fund(u3_noun van, + u3_noun sut, + u3_noun way, + u3_noun gen) + { + u3_noun von = u3i_molt(u3k(van), u3x_sam, u3k(sut), 0); + u3_noun gat = u3j_hook(von, "fund"); + + return u3n_kick_on(u3i_molt(gat, + u3x_sam_2, + u3k(way), + u3x_sam_3, + u3k(gen), + 0)); + } + static u3_noun u3qfu_fine(u3_noun van, u3_noun sut, @@ -399,6 +416,78 @@ return ret; } + static u3_noun + _find_buck_fuss_next(u3_noun van, + u3_noun sut, + u3_noun q_sut, + u3_noun qp_sut, + u3_noun way, + u3_noun p_heg, + u3_noun q_heg, + u3_noun axe, + u3_noun lon, + u3_noun gil) + { + if ( u3_nul == qp_sut ) { + u3_noun nol = u3nc(u3_nul, u3k(lon)); + u3_noun ret = _find_buck(van, q_sut, way, p_heg, q_heg, axe, nol, gil); + u3z(nol); + return ret; + } + else { + u3_noun iqp_sut = u3h(qp_sut); // twig + u3_noun tiv = u3qfu_mint // (pair span nock) + (van, sut, c3__noun, iqp_sut); + u3_noun tqp_sut = u3t(qp_sut); // (list (pair span nock)) + u3_noun p_tiv = u3h(tiv); // span + u3_noun q_tiv = u3t(tiv); // nock + u3_noun fid = _find_buck // pony + (van, p_tiv, way, p_heg, q_heg, 1, u3_nul, u3_nul); + + if ( u3_nul == fid ) { + u3z(tiv); + return u3_nul; + } + else if ( (c3n == u3h(fid)) && (c3y == u3h(u3t(fid))) ) { + u3_noun ret; + + ret = _find_buck_fuss_next + (van, sut, q_sut, tqp_sut, way, p_heg, q_heg, u3t(u3t(fid)), lon, gil); + u3z(fid); + u3z(tiv); + return ret; + } + else { + u3_noun tor; // port + u3_noun vat; // (pair span nock) + u3_noun ret; + u3_noun dog = u3nc(0, u3k(axe)); // nock + + if ( c3y == u3h(fid) ) { + tor = u3k(fid); + } else { + tor = u3nc(c3n, u3k(u3t(u3t(fid)))); + } + u3z(fid); + + vat = u3qfu_fine(van, q_sut, tor); + u3z(tor); + + ret = u3nq + (c3n, + c3n, + u3k(u3h(vat)), + u3qf_comb(u3t(vat), u3qf_comb(dog, q_tiv))); + + u3z(vat); + u3z(dog); + u3z(tiv); + + return ret; + } + } + } + static u3_noun _find_buck_face_next(u3_noun van, u3_noun q_sut, @@ -465,6 +554,95 @@ } } + static u3_noun + _find_buck_fuss(u3_noun van, + u3_noun sut, + u3_noun way, + u3_noun p_heg, + u3_noun q_heg, + u3_noun axe, + u3_noun lon, + u3_noun gil) + { + u3_noun p_sut, q_sut; + + u3x_cell(u3t(sut), &p_sut, &q_sut); + + if ( u3_nul == q_heg ) { + return _find_buck_here(van, q_sut, way, p_heg, q_heg, axe, lon, gil); + } + else { + u3_noun uq_heg = u3t(q_heg); // term + + if ( c3y == u3ud(p_sut) ) { + if ( c3y == u3r_sing(p_sut, uq_heg) ) { + return _find_buck_here(van, q_sut, way, p_heg, q_heg, axe, lon, gil); + } + else { + return _find_buck_lose(van, sut, way, p_heg, q_heg, axe, lon, gil); + } + } + else { + u3_noun pp_sut = u3h(p_sut); // (map term (unit port)) + u3_noun qp_sut = u3t(p_sut); // (list (pair span nock)) + u3_noun tyr = u3qdb_get(pp_sut, uq_heg); // (unit (unit port)) + + if ( u3_nul == tyr ) { + return _find_buck_fuss_next + (van, sut, q_sut, qp_sut, way, p_heg, q_heg, axe, lon, gil); + } + else { + u3_noun u_tyr = u3t(tyr); // (unit port) + + if ( u3_nul == u_tyr ) { + u3_noun nol = u3nc(u3_nul, u3k(lon)); + u3_noun dep = u3qa_inc(p_heg); + u3_noun ret = _find_buck + (van, q_sut, way, dep, q_heg, axe, nol, gil); + + u3z(dep); + u3z(nol); + u3z(tyr); + return ret; + } + else { + u3_noun uu_tyr = u3t(u_tyr); + u3_noun tor = u3qfu_fund(van, sut, way, uu_tyr); + + if ( c3y == u3h(tor) ) { + u3_noun p_tor = u3t(tor); // (pair vein opal) + u3_noun pp_tor = u3h(p_tor); // vein + u3_noun qp_tor = u3t(p_tor); // opal + u3_noun nol = // vein + u3nt(u3_nul, u3nc(u3_nul, u3k(axe)), u3k(lon)); + u3_noun ret; + + ret = u3nt(c3y, u3qb_weld(pp_tor, nol), u3k(qp_tor)); + u3z(nol); + u3z(tor); + u3z(tyr); + return ret; + } + else { + u3_noun p_tor = u3t(tor); // (pair span nock) + u3_noun pp_tor = u3h(p_tor); // span + u3_noun qp_tor = u3t(p_tor); // nock + u3_noun dog = u3nc(0, u3k(axe)); // nock + u3_noun ret; + + ret = u3nq(c3n, c3n, u3k(pp_tor), u3qf_comb(dog, qp_tor)); + u3z(dog); + u3z(tor); + u3z(tyr); + + return ret; + } + } + } + } + } + } + static u3_noun _find_buck_face(u3_noun van, u3_noun sut, @@ -596,6 +774,11 @@ // fprintf(stderr, "face\r\n"); return _find_buck_face(van, sut, way, p_heg, q_heg, axe, lon, gil); } + case c3__fuss: + { + // fprintf(stderr, "face\r\n"); + return _find_buck_fuss(van, sut, way, p_heg, q_heg, axe, lon, gil); + } case c3__fork: { // fprintf(stderr, "fork\r\n"); diff --git a/jets/f/ut_fish.c b/jets/f/ut_fish.c index 7d3f1cf6ad..d5a8267357 100644 --- a/jets/f/ut_fish.c +++ b/jets/f/ut_fish.c @@ -92,6 +92,7 @@ case c3__core: { return u3nc(0, 0); } + case c3__fuss: case c3__face: { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { return u3m_bail(c3__fail); diff --git a/jets/f/ut_fuse.c b/jets/f/ut_fuse.c index 7ea0733862..545add4f2f 100644 --- a/jets/f/ut_fuse.c +++ b/jets/f/ut_fuse.c @@ -132,6 +132,14 @@ u3z(vot); return ret; } + case c3__fuss: u3x_cell(u3t(sut), &p_sut, &q_sut); + { + u3_noun vot = _fuse_in(van, q_sut, ref, bix); + u3_noun ret = u3qf_fuss(p_sut, vot); + + u3z(vot); + return ret; + } case c3__fork: p_sut = u3t(sut); { u3_noun yed = u3qdi_tap(p_sut, u3_nul); diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index 897adacae6..d858390dfd 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -246,6 +246,7 @@ else return _nest_sint(van, sut, tel, ref, seg, reg, gil); } } + case c3__fuss: case c3__face: { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { return u3m_bail(c3__fail); @@ -409,6 +410,7 @@ u3z(gam); return hiv; } + case c3__fuss: case c3__face: { if ( c3n == u3r_trel(ref, 0, &p_ref, &q_ref) ) { return u3m_bail(c3__fail); diff --git a/jets/f/ut_peek.c b/jets/f/ut_peek.c index 41c0c5b8d4..a0018153c0 100644 --- a/jets/f/ut_peek.c +++ b/jets/f/ut_peek.c @@ -105,6 +105,7 @@ return pro; } } + case c3__fuss: case c3__face: { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { return u3m_bail(c3__fail); diff --git a/jets/f/ut_repo.c b/jets/f/ut_repo.c index 8f296c897f..d5f9932ad7 100644 --- a/jets/f/ut_repo.c +++ b/jets/f/ut_repo.c @@ -34,6 +34,7 @@ return u3nt(c3__cell, c3__noun, u3k(p_sut)); } } + case c3__fuss: case c3__face: { if ( c3n == u3r_cell(u3t(sut), &p_sut, &q_sut)) { return u3m_bail(c3__fail); diff --git a/jets/tree.c b/jets/tree.c index 398d202918..7a8f3f57d4 100644 --- a/jets/tree.c +++ b/jets/tree.c @@ -349,7 +349,7 @@ static u3j_harm _mood__hoon__ut_burn_a[] = {{".2", u3wfu_burn}, {}}; static u3j_harm _mood__hoon__ut_conk_a[] = {{".2", u3wfu_conk}, {}}; static u3j_harm _mood__hoon__ut_crop_a[] = {{".2", u3wfu_crop}, {}}; // static u3j_harm _mood__hoon__ut_fire_a[] = {{".2", u3wfu_fire}, {}}; -// static u3j_harm _mood__hoon__ut_fond_a[] = {{".2", u3wfu_fond}, {}}; +static u3j_harm _mood__hoon__ut_fond_a[] = {{".2", u3wfu_fond}, {}}; static u3j_harm _mood__hoon__ut_fish_a[] = {{".2", u3wfu_fish}, {}}; static u3j_harm _mood__hoon__ut_fuse_a[] = {{".2", u3wfu_fuse}, {}}; static u3j_harm _mood__hoon__ut_mint_a[] = {{".2", u3wfu_mint}, {}}; @@ -367,7 +367,7 @@ static u3j_core _mood__hoon__ut_d[] = { "burn", _mood__hoon__ut_burn_a }, { "conk", _mood__hoon__ut_conk_a }, { "crop", _mood__hoon__ut_crop_a }, -// { "fond", _mood__hoon__ut_fond_a }, + { "fond", _mood__hoon__ut_fond_a }, // { "fire", _mood__hoon__ut_fire_a }, { "fish", _mood__hoon__ut_fish_a }, { "fuse", _mood__hoon__ut_fuse_a }, From df6da0fbf7de56491d7609b9545585182e84fc65 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Tue, 2 Feb 2016 18:26:22 -0800 Subject: [PATCH 126/137] Ready to remove temporary %fuss. --- jets/f/face.c | 8 +-- jets/f/ut_find.c | 166 ++--------------------------------------------- 2 files changed, 7 insertions(+), 167 deletions(-) diff --git a/jets/f/face.c b/jets/f/face.c index 16ea876915..140a67e7ed 100644 --- a/jets/f/face.c +++ b/jets/f/face.c @@ -13,13 +13,9 @@ if ( c3__void == tip ) { return c3__void; } - else if ( c3y == u3du(sag) ) { - return u3m_bail(c3__fail); - } else { - return u3nt(c3__fuss, + else return u3nt(c3__face, u3k(sag), u3k(tip)); - } } u3_noun u3wf_face(u3_noun cor) @@ -42,7 +38,7 @@ if ( c3__void == tip ) { return c3__void; } - else return u3nt(c3__fuss, + else return u3nt(c3__face, u3k(sag), u3k(tip)); } diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c index c7392ded33..9445bb6a3f 100644 --- a/jets/f/ut_find.c +++ b/jets/f/ut_find.c @@ -417,7 +417,7 @@ } static u3_noun - _find_buck_fuss_next(u3_noun van, + _find_buck_face_next(u3_noun van, u3_noun sut, u3_noun q_sut, u3_noun qp_sut, @@ -451,7 +451,7 @@ else if ( (c3n == u3h(fid)) && (c3y == u3h(u3t(fid))) ) { u3_noun ret; - ret = _find_buck_fuss_next + ret = _find_buck_face_next (van, sut, q_sut, tqp_sut, way, p_heg, q_heg, u3t(u3t(fid)), lon, gil); u3z(fid); u3z(tiv); @@ -489,73 +489,7 @@ } static u3_noun - _find_buck_face_next(u3_noun van, - u3_noun q_sut, - u3_noun qp_sut, - u3_noun way, - u3_noun p_heg, - u3_noun q_heg, - u3_noun axe, - u3_noun lon, - u3_noun gil) - { - if ( u3_nul == qp_sut ) { - u3_noun nol = u3nc(u3_nul, u3k(lon)); - u3_noun ret = _find_buck(van, q_sut, way, p_heg, q_heg, axe, nol, gil); - u3z(nol); - return ret; - } - else { - u3_noun iqp_sut = u3h(qp_sut); // (pair span nock) - u3_noun tqp_sut = u3t(qp_sut); // (list (pair span nock)) - u3_noun piqp_sut = u3h(iqp_sut); // span - u3_noun qiqp_sut = u3t(iqp_sut); // nock - u3_noun fid = _find_buck // pony - (van, piqp_sut, way, p_heg, q_heg, 1, u3_nul, u3_nul); - - if ( u3_nul == fid ) { - return u3_nul; - } - else if ( (c3n == u3h(fid)) && (c3y == u3h(u3t(fid))) ) { - u3_noun ret; - - ret = _find_buck_face_next - (van, q_sut, tqp_sut, way, p_heg, q_heg, u3t(u3t(fid)), lon, gil); - u3z(fid); - return ret; - } - else { - u3_noun tor; // port - u3_noun vat; // (pair span nock) - u3_noun ret; - u3_noun dog = u3nc(0, u3k(axe)); // nock - - if ( c3y == u3h(fid) ) { - tor = u3k(fid); - } else { - tor = u3nc(c3n, u3k(u3t(u3t(fid)))); - } - u3z(fid); - - vat = u3qfu_fine(van, q_sut, tor); - u3z(tor); - - ret = u3nq - (c3n, - c3n, - u3k(u3h(vat)), - u3qf_comb(u3t(vat), u3qf_comb(dog, qiqp_sut))); - - u3z(vat); - u3z(dog); - - return ret; - } - } - } - - static u3_noun - _find_buck_fuss(u3_noun van, + _find_buck_face(u3_noun van, u3_noun sut, u3_noun way, u3_noun p_heg, @@ -588,7 +522,7 @@ u3_noun tyr = u3qdb_get(pp_sut, uq_heg); // (unit (unit port)) if ( u3_nul == tyr ) { - return _find_buck_fuss_next + return _find_buck_face_next (van, sut, q_sut, qp_sut, way, p_heg, q_heg, axe, lon, gil); } else { @@ -643,92 +577,6 @@ } } - static u3_noun - _find_buck_face(u3_noun van, - u3_noun sut, - u3_noun way, - u3_noun p_heg, - u3_noun q_heg, - u3_noun axe, - u3_noun lon, - u3_noun gil) - { - u3_noun p_sut, q_sut; - - u3x_cell(u3t(sut), &p_sut, &q_sut); - - if ( u3_nul == q_heg ) { - return _find_buck_here(van, q_sut, way, p_heg, q_heg, axe, lon, gil); - } - else { - u3_noun uq_heg = u3t(q_heg); // term - - if ( c3y == u3ud(p_sut) ) { - if ( c3y == u3r_sing(p_sut, uq_heg) ) { - return _find_buck_here(van, q_sut, way, p_heg, q_heg, axe, lon, gil); - } - else { - return _find_buck_lose(van, sut, way, p_heg, q_heg, axe, lon, gil); - } - } - else { - u3_noun pp_sut = u3h(p_sut); // (map term (unit port)) - u3_noun qp_sut = u3t(p_sut); // (list (pair span nock)) - u3_noun tyr = u3qdb_get(pp_sut, uq_heg); // (unit (unit port)) - - if ( u3_nul == tyr ) { - return _find_buck_face_next - (van, q_sut, qp_sut, way, p_heg, q_heg, axe, lon, gil); - } - else { - u3_noun u_tyr = u3t(tyr); // (unit port) - - if ( u3_nul == u_tyr ) { - u3_noun nol = u3nc(u3_nul, u3k(lon)); - u3_noun dep = u3qa_inc(p_heg); - u3_noun ret = _find_buck - (van, q_sut, way, dep, q_heg, axe, nol, gil); - - u3z(dep); - u3z(nol); - u3z(tyr); - return ret; - } - else { - u3_noun uu_tyr = u3t(u_tyr); - - if ( c3y == u3h(uu_tyr) ) { - u3_noun puu_tyr = u3t(uu_tyr); // (pair vein opal) - u3_noun ppuu_tyr = u3h(puu_tyr); // vein - u3_noun qpuu_tyr = u3t(puu_tyr); // opal - u3_noun nol = // vein - u3nt(u3_nul, u3nc(u3_nul, u3k(axe)), u3k(lon)); - u3_noun ret; - - ret = u3nt(c3y, u3qb_weld(ppuu_tyr, nol), u3k(qpuu_tyr)); - u3z(nol); - u3z(tyr); - return ret; - } - else { - u3_noun puu_tyr = u3t(uu_tyr); // (pair span nock) - u3_noun ppuu_tyr = u3h(puu_tyr); // span - u3_noun qpuu_tyr = u3t(puu_tyr); // nock - u3_noun dog = u3nc(0, u3k(axe)); // nock - u3_noun ret; - - ret = u3nq(c3n, c3n, u3k(ppuu_tyr), u3qf_comb(dog, qpuu_tyr)); - u3z(dog); - u3z(tyr); - - return ret; - } - } - } - } - } - } - static u3_noun _find_buck(u3_noun van, u3_noun sut, @@ -769,16 +617,12 @@ // fprintf(stderr, "core\r\n"); return _find_buck_core(van, sut, way, p_heg, q_heg, axe, lon, gil); } + case c3__fuss: case c3__face: { // fprintf(stderr, "face\r\n"); return _find_buck_face(van, sut, way, p_heg, q_heg, axe, lon, gil); } - case c3__fuss: - { - // fprintf(stderr, "face\r\n"); - return _find_buck_fuss(van, sut, way, p_heg, q_heg, axe, lon, gil); - } case c3__fork: { // fprintf(stderr, "fork\r\n"); From 326fd27db8a25e5316fca632b2c46437df3aef4e Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Tue, 2 Feb 2016 18:45:11 -0800 Subject: [PATCH 127/137] Fully transitioned to correct %face. --- include/jets/q.h | 1 - include/jets/w.h | 1 - jets/f/face.c | 26 +------------------------- jets/f/type.c | 3 --- jets/f/ut_burn.c | 1 - jets/f/ut_crop.c | 9 --------- jets/f/ut_find.c | 1 - jets/f/ut_fish.c | 1 - jets/f/ut_fuse.c | 8 -------- jets/f/ut_nest.c | 2 -- jets/f/ut_peek.c | 1 - jets/f/ut_repo.c | 1 - 12 files changed, 1 insertion(+), 54 deletions(-) diff --git a/include/jets/q.h b/include/jets/q.h index 0a8a6c6642..96b954fd00 100644 --- a/include/jets/q.h +++ b/include/jets/q.h @@ -165,7 +165,6 @@ u3_noun u3qf_core(u3_noun, u3_noun); u3_noun u3qf_cube(u3_noun, u3_noun); u3_noun u3qf_face(u3_noun, u3_noun); - u3_noun u3qf_fuss(u3_noun, u3_noun); u3_noun u3qf_fine(u3_noun, u3_noun, u3_noun); u3_noun u3qf_fitz(u3_noun, u3_noun); u3_noun u3qf_flan(u3_noun, u3_noun); diff --git a/include/jets/w.h b/include/jets/w.h index 9754cd98d0..0fab2fa72a 100644 --- a/include/jets/w.h +++ b/include/jets/w.h @@ -195,7 +195,6 @@ u3_noun u3wf_core(u3_noun); u3_noun u3wf_cube(u3_noun); u3_noun u3wf_face(u3_noun); - u3_noun u3wf_fuss(u3_noun); u3_noun u3wf_fine(u3_noun); u3_noun u3wf_fitz(u3_noun); u3_noun u3wf_flan(u3_noun); diff --git a/jets/f/face.c b/jets/f/face.c index 140a67e7ed..4e7fe7fdac 100644 --- a/jets/f/face.c +++ b/jets/f/face.c @@ -1,4 +1,4 @@ -/* j/6/fuss.c +/* j/6/face.c ** */ #include "all.h" @@ -29,27 +29,3 @@ } } -/* functions -*/ - u3_noun - u3qf_fuss(u3_noun sag, - u3_noun tip) - { - if ( c3__void == tip ) { - return c3__void; - } - else return u3nt(c3__face, - u3k(sag), - u3k(tip)); - } - u3_noun - u3wf_fuss(u3_noun cor) - { - u3_noun sag, tip; - - if ( c3n == u3r_mean(cor, u3x_sam_2, &sag, u3x_sam_3, &tip, 0) ) { - return u3m_bail(c3__fail); - } else { - return u3qf_fuss(sag, tip); - } - } diff --git a/jets/f/type.c b/jets/f/type.c index 14fb6df755..d8eaa518e7 100644 --- a/jets/f/type.c +++ b/jets/f/type.c @@ -32,9 +32,6 @@ case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); { } - case c3__fuss: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - } case c3__fork: p_sut = u3t(sut); { } diff --git a/jets/f/ut_burn.c b/jets/f/ut_burn.c index 5e07a797a8..2af7d4b481 100644 --- a/jets/f/ut_burn.c +++ b/jets/f/ut_burn.c @@ -113,7 +113,6 @@ return ret; } } - case c3__fuss: case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); { return _burn_in(van, q_sut, gil); diff --git a/jets/f/ut_crop.c b/jets/f/ut_crop.c index 481839af21..8aaa65089d 100644 --- a/jets/f/ut_crop.c +++ b/jets/f/ut_crop.c @@ -150,14 +150,6 @@ u3z(foz); return ret; } - case c3__fuss: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - u3_noun foz = _crop_dext(van, q_sut, ref, bix); - u3_noun ret = u3qf_fuss(p_sut, foz); - - u3z(foz); - return ret; - } case c3__fork: p_sut = u3t(sut); { u3_noun yed = u3qdi_tap(p_sut, u3_nul); @@ -204,7 +196,6 @@ default: return u3m_bail(c3__fail); case c3__core: - case c3__fuss: case c3__face: u3x_cell(u3t(ref), &p_ref, &q_ref); { return _crop_dext(van, sut, q_ref, bix); diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c index 9445bb6a3f..1e498a8253 100644 --- a/jets/f/ut_find.c +++ b/jets/f/ut_find.c @@ -617,7 +617,6 @@ // fprintf(stderr, "core\r\n"); return _find_buck_core(van, sut, way, p_heg, q_heg, axe, lon, gil); } - case c3__fuss: case c3__face: { // fprintf(stderr, "face\r\n"); diff --git a/jets/f/ut_fish.c b/jets/f/ut_fish.c index d5a8267357..7d3f1cf6ad 100644 --- a/jets/f/ut_fish.c +++ b/jets/f/ut_fish.c @@ -92,7 +92,6 @@ case c3__core: { return u3nc(0, 0); } - case c3__fuss: case c3__face: { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { return u3m_bail(c3__fail); diff --git a/jets/f/ut_fuse.c b/jets/f/ut_fuse.c index 545add4f2f..7ea0733862 100644 --- a/jets/f/ut_fuse.c +++ b/jets/f/ut_fuse.c @@ -132,14 +132,6 @@ u3z(vot); return ret; } - case c3__fuss: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - u3_noun vot = _fuse_in(van, q_sut, ref, bix); - u3_noun ret = u3qf_fuss(p_sut, vot); - - u3z(vot); - return ret; - } case c3__fork: p_sut = u3t(sut); { u3_noun yed = u3qdi_tap(p_sut, u3_nul); diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index d858390dfd..897adacae6 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -246,7 +246,6 @@ else return _nest_sint(van, sut, tel, ref, seg, reg, gil); } } - case c3__fuss: case c3__face: { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { return u3m_bail(c3__fail); @@ -410,7 +409,6 @@ u3z(gam); return hiv; } - case c3__fuss: case c3__face: { if ( c3n == u3r_trel(ref, 0, &p_ref, &q_ref) ) { return u3m_bail(c3__fail); diff --git a/jets/f/ut_peek.c b/jets/f/ut_peek.c index a0018153c0..41c0c5b8d4 100644 --- a/jets/f/ut_peek.c +++ b/jets/f/ut_peek.c @@ -105,7 +105,6 @@ return pro; } } - case c3__fuss: case c3__face: { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { return u3m_bail(c3__fail); diff --git a/jets/f/ut_repo.c b/jets/f/ut_repo.c index d5f9932ad7..8f296c897f 100644 --- a/jets/f/ut_repo.c +++ b/jets/f/ut_repo.c @@ -34,7 +34,6 @@ return u3nt(c3__cell, c3__noun, u3k(p_sut)); } } - case c3__fuss: case c3__face: { if ( c3n == u3r_cell(u3t(sut), &p_sut, &q_sut)) { return u3m_bail(c3__fail); From b26fd406363b87c99886cb661bec1ed3d7e780a1 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Wed, 3 Feb 2016 13:33:43 -0800 Subject: [PATCH 128/137] More typed .^. --- include/jets/w.h | 1 + include/noun/allocate.h | 1 + include/noun/manage.h | 1 + include/noun/nock.h | 10 ++++++++ jets/e/mink.c | 21 +++++++++++++++ jets/f/ut_mint.c | 2 +- jets/tree.c | 2 ++ noun/manage.c | 30 +++++++++++++++++++--- noun/nock.c | 57 ++++++++++++++++++++--------------------- 9 files changed, 91 insertions(+), 34 deletions(-) diff --git a/include/jets/w.h b/include/jets/w.h index 0fab2fa72a..8c8ffe2d7a 100644 --- a/include/jets/w.h +++ b/include/jets/w.h @@ -102,6 +102,7 @@ u3_noun u3we_rub(u3_noun); u3_noun u3we_lore(u3_noun); u3_noun u3we_loss(u3_noun); + u3_noun u3we_micq(u3_noun); u3_noun u3we_mick(u3_noun); u3_noun u3we_mink(u3_noun); u3_noun u3we_mule(u3_noun); diff --git a/include/noun/allocate.h b/include/noun/allocate.h index 7d7d293141..ed716b3738 100644 --- a/include/noun/allocate.h +++ b/include/noun/allocate.h @@ -148,6 +148,7 @@ struct { // namespace u3_noun flu; // (list $+(* (unit))), old u3_noun sea; // (list $+(* (unit))), new + u3_noun gul; // (list $+(* (unit (unit)))) now } ski; struct { // trace stack diff --git a/include/noun/manage.h b/include/noun/manage.h index 4cc95b7f06..a5decfe2cd 100644 --- a/include/noun/manage.h +++ b/include/noun/manage.h @@ -73,6 +73,7 @@ u3_noun u3m_soft_run(u3_noun fly, u3_noun sea, + u3_noun gul, u3_funq fun_f, u3_noun aga, u3_noun agb); diff --git a/include/noun/nock.h b/include/noun/nock.h index 89d49c2fab..2234778d96 100644 --- a/include/noun/nock.h +++ b/include/noun/nock.h @@ -29,6 +29,11 @@ u3_noun u3n_nock_it(u3_noun sea, u3_noun bus, u3_noun fol); + /* u3n_nock_et(): produce .*(bus fol), as ++toon, in namespace. + */ + u3_noun + u3n_nock_et(u3_noun gul, u3_noun bus, u3_noun fol); + /* u3n_slam_in(): produce (gat sam), as ++toon, in namespace. */ u3_noun @@ -39,6 +44,11 @@ u3_noun u3n_slam_it(u3_noun sea, u3_noun gat, u3_noun sam); + /* u3n_slam_et(): produce (gat sam), as ++toon, in namespace. + */ + u3_noun + u3n_slam_it(u3_noun gul, u3_noun gat, u3_noun sam); + /* u3n_nock_an(): as slam_in(), but with empty fly. */ u3_noun diff --git a/jets/e/mink.c b/jets/e/mink.c index 0823633088..1c9e7057d2 100644 --- a/jets/e/mink.c +++ b/jets/e/mink.c @@ -45,3 +45,24 @@ return som; } } + + u3_noun + u3we_micq(u3_noun cor) + { + u3_noun bus, fol, gul; + + if ( c3n == u3r_mean(cor, u3x_sam_4, &bus, + u3x_sam_5, &fol, + u3x_sam_3, &gul, + 0) ) + { + return u3m_bail(c3__exit); + } + else { + u3_noun som; + + som = u3n_nock_et(u3k(gul), u3k(bus), u3k(fol)); + + return som; + } + } diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index 2354e476b3..6e37e6fbf8 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -502,7 +502,7 @@ u3_noun viz = _mint_in(van, sut, c3__noun, q_gen); ret = u3nc(u3k(u3h(nef)), - u3nt(12, u3nc(1, u3k(u3h(nef))), u3k(u3t(viz)))); + u3nt(11, u3nc(1, u3nc(151, u3k(u3h(nef)))), u3k(u3t(viz)))); u3z(viz); u3z(nef); diff --git a/jets/tree.c b/jets/tree.c index 7a8f3f57d4..a5393f5b7d 100644 --- a/jets/tree.c +++ b/jets/tree.c @@ -125,6 +125,7 @@ static u3j_harm _mood__hoon_rub_a[] = {{".2", u3we_rub}, {}}; static u3j_harm _mood__hoon_lore_a[] = {{".2", u3we_lore}, {}}; static u3j_harm _mood__hoon_loss_a[] = {{".2", u3we_loss}, {}}; static u3j_harm _mood__hoon_mick_a[] = {{".2", u3we_mick}, {}}; +static u3j_harm _mood__hoon_micq_a[] = {{".2", u3we_micq}, {}}; static u3j_harm _mood__hoon_mink_a[] = {{".2", u3we_mink}, {}}; static u3j_harm _mood__hoon_mule_a[] = {{".2", u3we_mule}, {}}; static u3j_harm _mood__hoon_repg_a[] = {{".2", u3we_repg}, {}}; @@ -487,6 +488,7 @@ static u3j_core _mood__hoon_d[] = { "loss", _mood__hoon_loss_a }, { "mink", _mood__hoon_mink_a }, { "mick", _mood__hoon_mick_a }, + { "micq", _mood__hoon_micq_a }, { "mule", _mood__hoon_mule_a }, { "repg", _mood__hoon_repg_a }, { "rexp", _mood__hoon_rexp_a }, diff --git a/noun/manage.c b/noun/manage.c index 6140cdd941..5dc57459ce 100644 --- a/noun/manage.c +++ b/noun/manage.c @@ -471,6 +471,7 @@ u3m_mark(void) tot_w += u3a_mark_noun(u3R->jed.das); tot_w += u3a_mark_noun(u3R->ski.flu); tot_w += u3a_mark_noun(u3R->ski.sea); + tot_w += u3a_mark_noun(u3R->ski.gul); tot_w += u3a_mark_noun(u3R->bug.tax); tot_w += u3a_mark_noun(u3R->bug.mer); tot_w += u3a_mark_noun(u3R->pro.don); @@ -971,6 +972,7 @@ u3m_soft_nock(u3_noun bus, u3_noun fol) u3_noun u3m_soft_run(u3_noun fly, u3_noun sea, + u3_noun gul, u3_funq fun_f, u3_noun aga, u3_noun agb) @@ -986,6 +988,7 @@ u3m_soft_run(u3_noun fly, { u3R->ski.flu = u3nc(fly, u3to(u3_road, u3R->par_p)->ski.flu); u3R->ski.sea = u3nc(sea, u3to(u3_road, u3R->par_p)->ski.sea); + u3R->ski.gul = u3nc(gul, u3to(u3_road, u3R->par_p)->ski.gul); u3R->pro.don = u3to(u3_road, u3R->par_p)->pro.don; u3R->bug.tax = 0; } @@ -1049,6 +1052,7 @@ u3m_soft_run(u3_noun fly, { u3z(fly); u3z(sea); + u3z(gul); u3z(aga); u3z(agb); } @@ -1063,13 +1067,15 @@ u3m_soft_run(u3_noun fly, u3_noun u3m_soft_esc(u3_noun ref, u3_noun sam) { - u3_noun why, fly, sea, pro; + u3_noun why, fly, sea, gul, pro; /* Assert preconditions. */ { c3_assert(0 != u3R->ski.flu); c3_assert(0 != u3R->ski.sea); + c3_assert(0 != u3R->ski.gul); + gul = u3h(u3R->ski.gul); sea = u3h(u3R->ski.sea); fly = u3h(u3R->ski.flu); } @@ -1083,6 +1089,7 @@ u3m_soft_esc(u3_noun ref, u3_noun sam) { u3R->ski.flu = u3t(u3to(u3_road, u3R->par_p)->ski.flu); u3R->ski.sea = u3t(u3to(u3_road, u3R->par_p)->ski.sea); + u3R->ski.gul = u3t(u3to(u3_road, u3R->par_p)->ski.gul); u3R->pro.don = u3to(u3_road, u3R->par_p)->pro.don; u3R->bug.tax = 0; } @@ -1090,10 +1097,24 @@ u3m_soft_esc(u3_noun ref, u3_noun sam) /* Trap for exceptions. */ if ( 0 == (why = (u3_noun)_setjmp(u3R->esc.buf)) ) { - if ( 0 == sea ) { + if ( 0 != fly ) { + // fprintf(stderr, "fly escape\r\n"); pro = u3n_slam_on(fly, sam); - } else { + if ( u3_nul != pro ) { + pro = u3nc(u3_nul, pro); + } + } else if ( 0 != sea ) { + // fprintf(stderr, "sea escape\r\n"); pro = u3n_slam_on(sea, u3nc(ref, sam)); + if ( u3_nul != pro ) { + pro = u3nc(u3_nul, pro); + } + } else if ( 0 != gul ) { + // fprintf(stderr, "gul escape\r\n"); + pro = u3n_slam_on(gul, u3nc(ref, sam)); + } + else { + return u3m_bail(c3__oops); } /* Fall back to the old road, leaving temporary memory intact. @@ -1109,7 +1130,8 @@ u3m_soft_esc(u3_noun ref, u3_noun sam) u3m_bail(u3nc(4, u3m_love(why))); } - /* Release the sample. + /* Release the sample. Note that we used it above, but in a junior + ** road, so its refcount is intact. */ u3z(ref); u3z(sam); diff --git a/noun/nock.c b/noun/nock.c index 05b5e7d658..3fa0387d6a 100644 --- a/noun/nock.c +++ b/noun/nock.c @@ -356,41 +356,24 @@ _n_nock_on(u3_noun bus, u3_noun fol) if ( !_(u3du(val)) ) { u3m_bail(u3nt(1, gof, 0)); } + if ( !_(u3du(u3t(val))) ) { + // + // replace with proper error stack push + // + u3m_p("lost", gof); + return u3m_bail(c3__exit); + } else { u3_noun pro; u3z(gof); u3z(fol); - pro = u3k(u3t(val)); + pro = u3k(u3t(u3t(val))); u3z(val); return pro; } } - - case 12: { - u3_noun gof = _n_nock_on(bus, u3k(u3t(gal))); - u3_noun val; - - u3t_off(noc_o); - val = u3m_soft_esc(0, u3k(gof)); - u3t_on(noc_o); - - if ( !_(u3du(val)) ) { - u3m_bail(u3nt(1, gof, 0)); - } - else { - u3_noun pro; - - u3z(gof); - u3z(fol); - pro = u3k(u3t(val)); - u3z(val); - - return pro; - } - } - c3_assert(!"not reached"); } } @@ -444,7 +427,15 @@ u3n_slam_on(u3_noun gat, u3_noun sam) u3_noun u3n_nock_it(u3_noun sea, u3_noun bus, u3_noun fol) { - return u3m_soft_run(0, sea, u3n_nock_on, bus, fol); + return u3m_soft_run(0, sea, 0, u3n_nock_on, bus, fol); +} + +/* u3n_nock_et(): produce .*(bus fol), as ++toon, in namespace. +*/ +u3_noun +u3n_nock_et(u3_noun gul, u3_noun bus, u3_noun fol) +{ + return u3m_soft_run(0, 0, gul, u3n_nock_on, bus, fol); } /* u3n_nock_in(): produce .*(bus fol), as ++toon, in namespace. @@ -452,7 +443,7 @@ u3n_nock_it(u3_noun sea, u3_noun bus, u3_noun fol) u3_noun u3n_nock_in(u3_noun fly, u3_noun bus, u3_noun fol) { - return u3m_soft_run(fly, 0, u3n_nock_on, bus, fol); + return u3m_soft_run(fly, 0, 0, u3n_nock_on, bus, fol); } /* u3n_slam_it(): produce (gat sam), as ++toon, in namespace. @@ -460,7 +451,15 @@ u3n_nock_in(u3_noun fly, u3_noun bus, u3_noun fol) u3_noun u3n_slam_it(u3_noun sea, u3_noun gat, u3_noun sam) { - return u3m_soft_run(0, sea, u3n_slam_on, gat, sam); + return u3m_soft_run(0, sea, 0, u3n_slam_on, gat, sam); +} + +/* u3n_slam_et(): produce (gat sam), as ++toon, in namespace. +*/ +u3_noun +u3n_slam_et(u3_noun gul, u3_noun gat, u3_noun sam) +{ + return u3m_soft_run(0, 0, gul, u3n_slam_on, gat, sam); } /* u3n_slam_in(): produce (gat sam), as ++toon, in namespace. @@ -468,7 +467,7 @@ u3n_slam_it(u3_noun sea, u3_noun gat, u3_noun sam) u3_noun u3n_slam_in(u3_noun fly, u3_noun gat, u3_noun sam) { - return u3m_soft_run(fly, 0, u3n_slam_on, gat, sam); + return u3m_soft_run(fly, 0, 0, u3n_slam_on, gat, sam); } /* u3n_nock_an(): as slam_in(), but with empty fly. From 35a385e81c6afac70f4437fcc2a563eb139118aa Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Wed, 3 Feb 2016 20:51:01 -0800 Subject: [PATCH 129/137] Fully shifted over to modern typed namespace. --- include/jets/w.h | 2 -- include/noun/allocate.h | 2 -- include/noun/manage.h | 4 +--- jets/e/mink.c | 43 ----------------------------------------- jets/tree.c | 4 ---- noun/manage.c | 38 +++--------------------------------- noun/nock.c | 40 ++++---------------------------------- vere/raft.c | 8 ++++---- 8 files changed, 12 insertions(+), 129 deletions(-) diff --git a/include/jets/w.h b/include/jets/w.h index 8c8ffe2d7a..b4d24134b1 100644 --- a/include/jets/w.h +++ b/include/jets/w.h @@ -102,8 +102,6 @@ u3_noun u3we_rub(u3_noun); u3_noun u3we_lore(u3_noun); u3_noun u3we_loss(u3_noun); - u3_noun u3we_micq(u3_noun); - u3_noun u3we_mick(u3_noun); u3_noun u3we_mink(u3_noun); u3_noun u3we_mule(u3_noun); u3_noun u3we_repg(u3_noun); diff --git a/include/noun/allocate.h b/include/noun/allocate.h index ed716b3738..7ab6b2139d 100644 --- a/include/noun/allocate.h +++ b/include/noun/allocate.h @@ -146,8 +146,6 @@ } jed; struct { // namespace - u3_noun flu; // (list $+(* (unit))), old - u3_noun sea; // (list $+(* (unit))), new u3_noun gul; // (list $+(* (unit (unit)))) now } ski; diff --git a/include/noun/manage.h b/include/noun/manage.h index a5decfe2cd..48960afd2b 100644 --- a/include/noun/manage.h +++ b/include/noun/manage.h @@ -71,9 +71,7 @@ /* u3m_soft_run(): descend into virtualization context. */ u3_noun - u3m_soft_run(u3_noun fly, - u3_noun sea, - u3_noun gul, + u3m_soft_run(u3_noun gul, u3_funq fun_f, u3_noun aga, u3_noun agb); diff --git a/jets/e/mink.c b/jets/e/mink.c index 1c9e7057d2..c17a024273 100644 --- a/jets/e/mink.c +++ b/jets/e/mink.c @@ -3,51 +3,8 @@ */ #include "all.h" - u3_noun u3we_mink(u3_noun cor) - { - u3_noun bus, fol, fly; - - if ( c3n == u3r_mean(cor, u3x_sam_4, &bus, - u3x_sam_5, &fol, - u3x_sam_3, &fly, - 0) ) - { - return u3m_bail(c3__exit); - } - else { - u3_noun som; - - som = u3n_nock_in(u3k(fly), u3k(bus), u3k(fol)); - - return som; - } - } - - u3_noun - u3we_mick(u3_noun cor) - { - u3_noun bus, fol, sea; - - if ( c3n == u3r_mean(cor, u3x_sam_4, &bus, - u3x_sam_5, &fol, - u3x_sam_3, &sea, - 0) ) - { - return u3m_bail(c3__exit); - } - else { - u3_noun som; - - som = u3n_nock_it(u3k(sea), u3k(bus), u3k(fol)); - - return som; - } - } - - u3_noun - u3we_micq(u3_noun cor) { u3_noun bus, fol, gul; diff --git a/jets/tree.c b/jets/tree.c index a5393f5b7d..180b30dae9 100644 --- a/jets/tree.c +++ b/jets/tree.c @@ -124,8 +124,6 @@ static u3j_harm _mood__hoon_mat_a[] = {{".2", u3we_mat}, {}}; static u3j_harm _mood__hoon_rub_a[] = {{".2", u3we_rub}, {}}; static u3j_harm _mood__hoon_lore_a[] = {{".2", u3we_lore}, {}}; static u3j_harm _mood__hoon_loss_a[] = {{".2", u3we_loss}, {}}; -static u3j_harm _mood__hoon_mick_a[] = {{".2", u3we_mick}, {}}; -static u3j_harm _mood__hoon_micq_a[] = {{".2", u3we_micq}, {}}; static u3j_harm _mood__hoon_mink_a[] = {{".2", u3we_mink}, {}}; static u3j_harm _mood__hoon_mule_a[] = {{".2", u3we_mule}, {}}; static u3j_harm _mood__hoon_repg_a[] = {{".2", u3we_repg}, {}}; @@ -487,8 +485,6 @@ static u3j_core _mood__hoon_d[] = { "lore", _mood__hoon_lore_a }, { "loss", _mood__hoon_loss_a }, { "mink", _mood__hoon_mink_a }, - { "mick", _mood__hoon_mick_a }, - { "micq", _mood__hoon_micq_a }, { "mule", _mood__hoon_mule_a }, { "repg", _mood__hoon_repg_a }, { "rexp", _mood__hoon_rexp_a }, diff --git a/noun/manage.c b/noun/manage.c index 5dc57459ce..9fa3e98a8a 100644 --- a/noun/manage.c +++ b/noun/manage.c @@ -469,8 +469,6 @@ u3m_mark(void) c3_w tot_w = 0; tot_w += u3h_mark(u3R->jed.har_p); tot_w += u3a_mark_noun(u3R->jed.das); - tot_w += u3a_mark_noun(u3R->ski.flu); - tot_w += u3a_mark_noun(u3R->ski.sea); tot_w += u3a_mark_noun(u3R->ski.gul); tot_w += u3a_mark_noun(u3R->bug.tax); tot_w += u3a_mark_noun(u3R->bug.mer); @@ -970,9 +968,7 @@ u3m_soft_nock(u3_noun bus, u3_noun fol) /* u3m_soft_run(): descend into virtualization context. */ u3_noun -u3m_soft_run(u3_noun fly, - u3_noun sea, - u3_noun gul, +u3m_soft_run(u3_noun gul, u3_funq fun_f, u3_noun aga, u3_noun agb) @@ -986,8 +982,6 @@ u3m_soft_run(u3_noun fly, /* Configure the new road. */ { - u3R->ski.flu = u3nc(fly, u3to(u3_road, u3R->par_p)->ski.flu); - u3R->ski.sea = u3nc(sea, u3to(u3_road, u3R->par_p)->ski.sea); u3R->ski.gul = u3nc(gul, u3to(u3_road, u3R->par_p)->ski.gul); u3R->pro.don = u3to(u3_road, u3R->par_p)->pro.don; u3R->bug.tax = 0; @@ -1050,8 +1044,6 @@ u3m_soft_run(u3_noun fly, /* Release the arguments. */ { - u3z(fly); - u3z(sea); u3z(gul); u3z(aga); u3z(agb); @@ -1067,17 +1059,13 @@ u3m_soft_run(u3_noun fly, u3_noun u3m_soft_esc(u3_noun ref, u3_noun sam) { - u3_noun why, fly, sea, gul, pro; + u3_noun why, gul, pro; /* Assert preconditions. */ { - c3_assert(0 != u3R->ski.flu); - c3_assert(0 != u3R->ski.sea); c3_assert(0 != u3R->ski.gul); gul = u3h(u3R->ski.gul); - sea = u3h(u3R->ski.sea); - fly = u3h(u3R->ski.flu); } /* Record the cap, and leap. @@ -1087,8 +1075,6 @@ u3m_soft_esc(u3_noun ref, u3_noun sam) /* Configure the new road. */ { - u3R->ski.flu = u3t(u3to(u3_road, u3R->par_p)->ski.flu); - u3R->ski.sea = u3t(u3to(u3_road, u3R->par_p)->ski.sea); u3R->ski.gul = u3t(u3to(u3_road, u3R->par_p)->ski.gul); u3R->pro.don = u3to(u3_road, u3R->par_p)->pro.don; u3R->bug.tax = 0; @@ -1097,25 +1083,7 @@ u3m_soft_esc(u3_noun ref, u3_noun sam) /* Trap for exceptions. */ if ( 0 == (why = (u3_noun)_setjmp(u3R->esc.buf)) ) { - if ( 0 != fly ) { - // fprintf(stderr, "fly escape\r\n"); - pro = u3n_slam_on(fly, sam); - if ( u3_nul != pro ) { - pro = u3nc(u3_nul, pro); - } - } else if ( 0 != sea ) { - // fprintf(stderr, "sea escape\r\n"); - pro = u3n_slam_on(sea, u3nc(ref, sam)); - if ( u3_nul != pro ) { - pro = u3nc(u3_nul, pro); - } - } else if ( 0 != gul ) { - // fprintf(stderr, "gul escape\r\n"); - pro = u3n_slam_on(gul, u3nc(ref, sam)); - } - else { - return u3m_bail(c3__oops); - } + pro = u3n_slam_on(gul, u3nc(ref, sam)); /* Fall back to the old road, leaving temporary memory intact. */ diff --git a/noun/nock.c b/noun/nock.c index 3fa0387d6a..53df806a49 100644 --- a/noun/nock.c +++ b/noun/nock.c @@ -422,36 +422,12 @@ u3n_slam_on(u3_noun gat, u3_noun sam) return u3n_kick_on(cor); } -/* u3n_nock_it(): produce .*(bus fol), as ++toon, in namespace. -*/ -u3_noun -u3n_nock_it(u3_noun sea, u3_noun bus, u3_noun fol) -{ - return u3m_soft_run(0, sea, 0, u3n_nock_on, bus, fol); -} - /* u3n_nock_et(): produce .*(bus fol), as ++toon, in namespace. */ u3_noun u3n_nock_et(u3_noun gul, u3_noun bus, u3_noun fol) { - return u3m_soft_run(0, 0, gul, u3n_nock_on, bus, fol); -} - -/* u3n_nock_in(): produce .*(bus fol), as ++toon, in namespace. -*/ -u3_noun -u3n_nock_in(u3_noun fly, u3_noun bus, u3_noun fol) -{ - return u3m_soft_run(fly, 0, 0, u3n_nock_on, bus, fol); -} - -/* u3n_slam_it(): produce (gat sam), as ++toon, in namespace. -*/ -u3_noun -u3n_slam_it(u3_noun sea, u3_noun gat, u3_noun sam) -{ - return u3m_soft_run(0, sea, 0, u3n_slam_on, gat, sam); + return u3m_soft_run(gul, u3n_nock_on, bus, fol); } /* u3n_slam_et(): produce (gat sam), as ++toon, in namespace. @@ -459,15 +435,7 @@ u3n_slam_it(u3_noun sea, u3_noun gat, u3_noun sam) u3_noun u3n_slam_et(u3_noun gul, u3_noun gat, u3_noun sam) { - return u3m_soft_run(0, 0, gul, u3n_slam_on, gat, sam); -} - -/* u3n_slam_in(): produce (gat sam), as ++toon, in namespace. -*/ -u3_noun -u3n_slam_in(u3_noun fly, u3_noun gat, u3_noun sam) -{ - return u3m_soft_run(fly, 0, 0, u3n_slam_on, gat, sam); + return u3m_soft_run(gul, u3n_slam_on, gat, sam); } /* u3n_nock_an(): as slam_in(), but with empty fly. @@ -475,7 +443,7 @@ u3n_slam_in(u3_noun fly, u3_noun gat, u3_noun sam) u3_noun u3n_nock_an(u3_noun bus, u3_noun fol) { - u3_noun fly = u3nt(u3nc(1, 0), 0, 0); // |=(a=* ~) + u3_noun gul = u3nt(u3nt(1, 0, 0), 0, 0); // |=(a/{* *} ~) - return u3n_nock_in(fly, bus, fol); + return u3n_nock_et(gul, bus, fol); } diff --git a/vere/raft.c b/vere/raft.c index 82d1bed595..e89a2ae871 100644 --- a/vere/raft.c +++ b/vere/raft.c @@ -1856,7 +1856,7 @@ _raft_grab(u3_noun ova) { if ( u3_nul != u3A->sac ) { c3_w usr_w = 0, ova_w = 0, sac_w = 0, utv_w = 0, utm_w = 0, wep_w = 0, - har_w = 0, das_w = 0, flu_w = 0, tax_w = 0, mer_w = 0, don_w = 0, + har_w = 0, das_w = 0, gul_w = 0, tax_w = 0, mer_w = 0, don_w = 0, day_w = 0, car_w = 0; c3_assert( u3R == &(u3H->rod_u) ); @@ -1886,9 +1886,9 @@ _raft_grab(u3_noun ova) fprintf(stderr, " cold jet state: "); _raft_print_memory(das_w); - flu_w = u3a_mark_noun(u3R->ski.flu); + gul_w = u3a_mark_noun(u3R->ski.gul); fprintf(stderr, " namespace: "); - _raft_print_memory(flu_w); + _raft_print_memory(gul_w); tax_w = u3a_mark_noun(u3R->bug.tax); fprintf(stderr, " trace stack list: "); @@ -1910,7 +1910,7 @@ _raft_grab(u3_noun ova) fprintf(stderr, " memoization: "); _raft_print_memory(car_w); - utm_w = har_w + das_w + flu_w + tax_w + mer_w + don_w + day_w + car_w; + utm_w = har_w + das_w + gul_w + tax_w + mer_w + don_w + day_w + car_w; fprintf(stderr, "total road stuff: "); _raft_print_memory(utm_w); From 417bd8834d1b05657d80fce1b0dfba6f974deeaa Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Thu, 4 Feb 2016 16:38:18 -0800 Subject: [PATCH 130/137] ape -> app --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7cb7c08976..189b321306 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,7 +32,7 @@ install the new kernel is `|reset` in `dojo`. This rebuilds from the `arvo` directory in the `home` desk in `%clay`. Currently, `|reset` does not reload apps like `dojo` itself, which will still reference the old kernel. To force them to reload, make a trivial edit to their main -source file (under the `ape` directory) in `%clay`. +source file (under the `app` directory) in `%clay`. If you do any kernel development, be sure to read the section below about pills. From c7e9b8676ff0c30a5a753aa432e7c5a05bd834e3 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Fri, 5 Feb 2016 01:25:58 -0800 Subject: [PATCH 131/137] Keyword stems, step 1. --- include/c/motes.h | 7 ++- jets/f/ut_mint.c | 118 ++++++++++++++++++++++++++----------------- jets/f/ut_mull.c | 124 +++++++++++++++++++++++++++------------------- jets/f/ut_play.c | 114 ++++++++++++++++++++++++++---------------- 4 files changed, 221 insertions(+), 142 deletions(-) diff --git a/include/c/motes.h b/include/c/motes.h index 4ad52f8d88..8909e5425b 100644 --- a/include/c/motes.h +++ b/include/c/motes.h @@ -10,6 +10,7 @@ # define c3__abo c3_s3('a','b','o') # define c3__actd c3_s4('a','c','t','d') # define c3__add c3_s3('a','d','d') +# define c3__aka c3_s3('a','k','a') # define c3__all c3_s3('a','l','l') # define c3__alrm c3_s4('a','l','r','m') # define c3__amat c3_s4('a','m','a','t') @@ -788,6 +789,7 @@ # define c3__peg c3_s3('p','e','g') # define c3__peld c3_s4('p','e','l','d') # define c3__pen c3_s3('p','e','n') +# define c3__per c3_s3('p','e','r') # define c3__perd c3_s4('p','e','r','d') # define c3__pesk c3_s4('p','e','s','k') # define c3__pfix c3_s4('p','f','i','x') @@ -1002,6 +1004,7 @@ # define c3__spig c3_s4('s','p','i','g') # define c3__spil c3_s4('s','p','i','l') # define c3__spin c3_s4('s','p','i','n') +# define c3__spit c3_s4('s','p','i','t') # define c3__spot c3_s4('s','p','o','t') # define c3__stam c3_s4('s','t','a','m') # define c3__star c3_s4('s','t','a','r') @@ -1117,7 +1120,7 @@ # define c3__tupl c3_s4('t','u','p','l') # define c3__turd c3_s4('t','u','r','d') # define c3__turn c3_s4('t','u','r','n') -# define c3__twin c3_s4('t','w','i','n') +# define c3__twig c3_s4('t','w','i','g') # define c3__twix c3_s4('t','w','i','x') # define c3__txt c3_s3('t','x','t') # define c3__type c3_s4('t','y','p','e') @@ -1153,6 +1156,7 @@ # define c3__vint c3_s4('v','i','n','t') # define c3__void c3_s4('v','o','i','d') # define c3__vorp c3_s4('v','o','r','p') +# define c3__way c3_s3('w','a','y') # define c3__wail c3_s4('w','a','i','l') # define c3__wake c3_s4('w','a','k','e') # define c3__wamp c3_s4('w','a','m','p') @@ -1170,6 +1174,7 @@ # define c3__wild c3_s4('w','i','l','d') # define c3__win c3_s3('w','i','n') # define c3__wipe c3_s4('w','i','p','e') +# define c3__wish c3_s4('w','i','s','h') # define c3__with c3_s4('w','i','t','h') # define c3__wnut c3_s4('w','n','u','t') # define c3__wood c3_s4('w','o','o','d') diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index 6e37e6fbf8..3cebe575e4 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -396,7 +396,8 @@ return ret; } - case c3__wtts: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__wtts: + case c3__fit: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { u3_noun heb = u3nc(c3__herb, u3k(p_gen)); @@ -418,7 +419,8 @@ return ret; } - case c3__wtcl: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); + case c3__wtcl: + case c3__if: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); _mint_used(); { u3_noun bol = _mint_bean(); @@ -450,7 +452,9 @@ return ret; } - case c3__clhp: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__clhp: + case c3__dub: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { u3_noun hed = _mint_in(van, sut, c3__noun, p_gen); @@ -466,7 +470,9 @@ return ret; } - case c3__dtts: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__dtts: + case c3__same: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { u3_noun typ = _mint_nice(van, gol, _mint_bean()); @@ -486,7 +492,9 @@ return ret; } - case c3__dtwt: p_gen = u3t(gen); + + case c3__dtwt: + case c3__deep: p_gen = u3t(gen); _mint_used(); { u3_noun typ = _mint_nice(van, gol, _mint_bean()); @@ -494,7 +502,9 @@ return u3nc(typ, u3nc(3, _mint_corn(van, sut, p_gen))); } - case c3__dtkt: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__dtkt: + case c3__wish: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { u3_noun nog = u3nc(c3__cnbc, u3k(p_gen)); @@ -509,7 +519,9 @@ u3z(nog); return ret; } - case c3__dtls: p_gen = u3t(gen); + + case c3__dtls: + case c3__bump: p_gen = u3t(gen); _mint_used(); { u3_noun tom = u3nt(c3__atom, u3_blip, u3_nul); @@ -521,6 +533,7 @@ u3z(sam); return ret; } + case c3__rock: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { @@ -530,7 +543,9 @@ return ret; } - case c3__dttr: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__dttr: + case c3__kick: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { u3_noun one = _mint_corn(van, sut, p_gen); @@ -539,6 +554,7 @@ return u3nc(_mint_nice(van, gol, c3__noun), u3nt(2, one, two)); } + case c3__sand: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { @@ -548,12 +564,15 @@ return ret; } + case c3__hand: _mint_used(); { return u3k(u3t(gen)); } - case c3__ktbr: p_gen = u3t(gen); + + case c3__ktbr: + case c3__iron: p_gen = u3t(gen); _mint_used(); { u3_noun ryd = _mint_in(van, sut, gol, p_gen); @@ -563,7 +582,9 @@ u3z(ryd); return pro; } - case c3__ktpm: p_gen = u3t(gen); + + case c3__ktpm: + case c3__zinc: p_gen = u3t(gen); _mint_used(); { u3_noun ryd = _mint_in(van, sut, gol, p_gen); @@ -573,7 +594,9 @@ u3z(ryd); return pro; } - case c3__ktwt: p_gen = u3t(gen); + + case c3__ktwt: + case c3__lead: p_gen = u3t(gen); _mint_used(); { u3_noun ryd = _mint_in(van, sut, gol, p_gen); @@ -583,7 +606,9 @@ u3z(ryd); return pro; } - case c3__ktts: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__ktts: + case c3__name: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { u3_noun vat = _mint_in(van, sut, gol, q_gen); @@ -594,18 +619,9 @@ u3z(vat); return ret; } - case c3__ktzp: u3x_cell(u3t(gen), &p_gen, &q_gen); - _mint_used(); - { - u3_noun vat = _mint_in(van, sut, gol, q_gen); - ret = u3nc(u3qfu_conk(van, u3h(vat), p_gen), - u3k(u3t(vat))); - - u3z(vat); - return ret; - } - case c3__ktsg: p_gen = u3t(gen); + case c3__ktsg: + case c3__burn: p_gen = u3t(gen); _mint_used(); { u3_noun nef = _mint_in(van, sut, gol, p_gen); @@ -629,7 +645,9 @@ u3z(nef); return ret; } - case c3__ktls: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__ktls: + case c3__like: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { u3_noun huz = u3qfu_play(van, sut, p_gen); @@ -640,7 +658,9 @@ u3z(zel); return ret; } - case c3__tsgr: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__tsgr: + case c3__per: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { u3_noun fid = _mint_in(van, sut, c3__noun, p_gen); @@ -657,7 +677,9 @@ u3z(dov); return ret; } - case c3__tstr: case c3__tshx: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); + + case c3__tstr: + case c3__aka: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); _mint_used(); { u3_noun boc = u3qfu_buss(van, sut, p_gen, q_gen); @@ -666,12 +688,16 @@ u3z(boc); return ret; } - case c3__cnts: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__cnts: + case c3__make: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { return _mint_cnts(van, sut, gol, p_gen, q_gen); } - case c3__brcn: p_gen = u3t(gen); + + case c3__brcn: + case c3__core: p_gen = u3t(gen); _mint_used(); { u3_noun ruf = u3nc(u3_nul, 1); @@ -681,7 +707,9 @@ return ret; } - case c3__sgzp: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__sgzp: + case c3__type: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { u3_noun typ = u3qfu_play(van, sut, p_gen); @@ -696,7 +724,9 @@ u3z(typ); return ret; } - case c3__sggr: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__sggr: + case c3__hint: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { u3_noun hum = _mint_in(van, sut, gol, q_gen); @@ -714,7 +744,9 @@ u3z(hum); return ret; } - case c3__zpts: p_gen = u3t(gen); + + case c3__zpts: + case c3__nock: p_gen = u3t(gen); _mint_used(); { u3_noun von = u3i_molt(u3k(van), u3qfu_van_vet, c3n, 0); @@ -723,7 +755,9 @@ u3z(von); return u3nc(c3__noun, u3nc(1, sev)); } - case c3__zpcm: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__zpcm: + case c3__twig: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { return u3nc(_mint_nice(van, @@ -731,6 +765,7 @@ u3qfu_play(van, sut, p_gen)), u3nc(1, u3k(q_gen))); } + case c3__dbug: u3x_cell(u3t(gen), &p_gen, &q_gen); { u3t_push(u3nc(c3__mean, _mint_loc(van, p_gen))); @@ -744,21 +779,9 @@ u3t_drop(); return ret; } - case c3__zpcn: - _mint_used(); - { - u3_noun pet = u3j_hook(u3k(van), "seed"); - u3_noun p_pet = u3h(pet); - u3_noun q_pet = u3t(pet); - u3_noun ret; - ret = u3nc(_mint_nice(van, gol, u3k(p_pet)), - u3nc(1, u3k(q_pet))); - - u3z(pet); - return ret; - } - case c3__zpsm: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__zpsm: + case c3__spit: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { u3_noun vos = _mint_in(van, sut, c3__noun, q_gen); @@ -780,6 +803,7 @@ return ret; } + case c3__lost: p_gen = u3t(gen); _mint_used(); { @@ -794,7 +818,9 @@ return u3nt(c3__void, 0, 0); } } + case c3__zpzp: + case c3__fail: _mint_used(); { return u3nt(c3__void, 0, 0); diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index b7eac91c9a..3336a59f83 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -350,7 +350,8 @@ return ret; } - case c3__wtts: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__wtts: + case c3__fit: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { u3_noun heb = u3nc(c3__herb, u3k(p_gen)); @@ -378,7 +379,8 @@ return _mull_both(van, gol, _mull_bean()); } - case c3__wtcl: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); + case c3__wtcl: + case c3__if: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); _mull_used(); { u3_noun bol = _mull_bean(); @@ -427,7 +429,9 @@ return ret; } - case c3__clhp: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__clhp: + case c3__dub: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { u3_noun hed = _mull_in(van, sut, c3__noun, dox, p_gen); @@ -441,7 +445,9 @@ return ret; } - case c3__dtts: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__dtts: + case c3__same: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { u3_noun hed = _mull_in(van, sut, c3__noun, dox, p_gen); @@ -452,7 +458,9 @@ return _mull_both(van, gol, _mull_bean()); } - case c3__dtwt: p_gen = u3t(gen); + + case c3__dtwt: + case c3__deep: p_gen = u3t(gen); _mull_used(); { u3_noun vay = _mull_in(van, sut, c3__noun, dox, p_gen); @@ -460,7 +468,9 @@ u3z(vay); return _mull_both(van, gol, _mull_bean()); } - case c3__dtkt: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__dtkt: + case c3__wish: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { u3_noun nog = u3nc(c3__cnbc, u3k(p_gen)); @@ -472,7 +482,9 @@ u3z(nog); return ret; } - case c3__dtls: p_gen = u3t(gen); + + case c3__dtls: + case c3__bump: p_gen = u3t(gen); _mull_used(); { u3_noun wuq = u3nt(c3__atom, u3_blip, u3_nul); @@ -481,6 +493,7 @@ u3z(vay); return _mull_both(van, gol, wuq); } + case c3__rock: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { @@ -488,7 +501,9 @@ return _mull_both(van, gol, typ); } - case c3__dttr: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__dttr: + case c3__kick: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { u3_noun hed = _mull_in(van, sut, c3__noun, dox, p_gen); @@ -499,18 +514,22 @@ return _mull_both(van, gol, c3__noun); } + case c3__sand: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { u3_noun typ = u3qfu_play(van, sut, gen); return _mull_both(van, gol, typ); } + case c3__hand: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { return u3nc(u3k(p_gen), u3k(p_gen)); } - case c3__ktbr: p_gen = u3t(gen); + + case c3__ktbr: + case c3__iron: p_gen = u3t(gen); _mull_used(); { u3_noun vat = _mull_in(van, sut, gol, dox, p_gen); @@ -524,7 +543,9 @@ u3z(vat); return pro; } - case c3__ktpm: p_gen = u3t(gen); + + case c3__ktpm: + case c3__zinc: p_gen = u3t(gen); _mull_used(); { u3_noun vat = _mull_in(van, sut, gol, dox, p_gen); @@ -538,7 +559,9 @@ u3z(vat); return pro; } - case c3__ktwt: p_gen = u3t(gen); + + case c3__ktwt: + case c3__lead: p_gen = u3t(gen); _mull_used(); { u3_noun vat = _mull_in(van, sut, gol, dox, p_gen); @@ -552,7 +575,9 @@ u3z(vat); return pro; } - case c3__ktts: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__ktts: + case c3__name: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { u3_noun vat = _mull_in(van, sut, gol, dox, q_gen); @@ -562,12 +587,16 @@ u3z(vat); return ret; } - case c3__ktsg: p_gen = u3t(gen); + + case c3__ktsg: + case c3__burn: p_gen = u3t(gen); _mull_used(); { return _mull_in(van, sut, gol, dox, p_gen); } - case c3__ktls: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__ktls: + case c3__like: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { u3_noun p_hif = _mull_nice(van, gol, u3qfu_play(van, sut, p_gen)); @@ -578,28 +607,9 @@ u3z(zel); return ret; } - case c3__kthx: u3x_cell(u3t(gen), &p_gen, &q_gen); - _mull_used(); - { - u3_noun p_hif = _mull_nice(van, gol, u3qfu_play(van, sut, p_gen)); - u3_noun q_hif = u3qfu_play(van, dox, p_gen); - u3_noun zel = _mull_in(van, sut, c3__noun, dox, q_gen); - u3_noun kek = u3qfu_nest(van, p_hif, c3y, u3h(zel)); - - if ( c3n == kek ) { - u3z(p_hif); - u3z(q_hif); - u3z(zel); - return u3m_bail(c3__exit); - } - else { - u3_noun ret = u3nc(p_hif, q_hif); - u3z(zel); - return ret; - } - } - case c3__tsgr: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__tsgr: + case c3__per: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { u3_noun lem = _mull_in(van, sut, c3__noun, dox, p_gen); @@ -610,7 +620,9 @@ u3z(lem); return ret; } - case c3__tstr: case c3__tshx: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); + + case c3__tstr: + case c3__aka: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); _mull_used(); { u3_noun boc = u3qfu_buss(van, sut, p_gen, q_gen); @@ -622,12 +634,16 @@ return ret; } - case c3__cnts: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__cnts: + case c3__make: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { return _mull_cnts(van, sut, gol, dox, p_gen, q_gen); } - case c3__brcn: p_gen = u3t(gen); + + case c3__brcn: + case c3__core: p_gen = u3t(gen); _mull_used(); { u3_noun ruf = u3nc(u3_nul, 1); @@ -637,7 +653,9 @@ return ret; } - case c3__sgzp: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__sgzp: + case c3__type: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { u3_noun typ = u3qfu_play(van, sut, p_gen); @@ -653,12 +671,16 @@ u3z(typ); return ret; } - case c3__sggr: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__sggr: + case c3__hint: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { return _mull_in(van, sut, gol, dox, q_gen); } - case c3__zpcm: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__zpcm: + case c3__twig: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { u3_noun p_ret = u3qfu_play(van, sut, p_gen); @@ -667,6 +689,7 @@ return u3nc(_mull_nice(van, gol, p_ret), q_ret); } + case c3__dbug: u3x_cell(u3t(gen), &p_gen, &q_gen); { u3_noun ret; @@ -678,21 +701,16 @@ u3t_drop(); return ret; } - case c3__zpts: p_gen = u3t(gen); + + case c3__zpts: + case c3__nock: p_gen = u3t(gen); _mull_used(); { return _mull_both(van, gol, c3__noun); } - case c3__zpcn: - _mull_used(); - { - u3_noun pet = u3j_hook(u3k(van), "seed"); - u3_noun peq = u3k(u3h(pet)); - u3z(pet); - return _mull_both(van, gol, peq); - } - case c3__zpsm: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__zpsm: + case c3__spit: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { u3_noun p_zur = u3qfu_play(van, sut, p_gen); @@ -708,8 +726,10 @@ return u3nc (_mull_nice(van, gol, p_ret), q_ret); } - case c3__lost: + case c3__zpzp: + case c3__lost: + case c3__fail: _mull_used(); { return u3nc(c3__void, c3__void); diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index 361819477b..57d89bfd1d 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -218,12 +218,15 @@ else switch ( u3h(gen) ) { default: goto open; - case c3__wtts: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__wtts: + case c3__fit: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { return _play_bean(); } - case c3__wtcl: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); + + case c3__wtcl: + case c3__if: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); _play_used(); { u3_noun fex = u3qfu_gain(van, sut, p_gen); @@ -238,7 +241,9 @@ u3z(fex); u3z(wux); return ret; } - case c3__clhp: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__clhp: + case c3__dub: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { u3_noun dis = _play_x(van, sut, p_gen); @@ -249,7 +254,9 @@ u3z(dat); return ret; } - case c3__dtkt: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__dtkt: + case c3__wish: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { u3_noun nog = u3nc(c3__cnbc, u3k(p_gen)); @@ -258,42 +265,55 @@ u3z(nog); return ret; } - case c3__dtwt: p_gen = u3t(gen); + + case c3__dtwt: + case c3__deep: p_gen = u3t(gen); _play_used(); { return _play_bean(); } - case c3__dtts: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__dtts: + case c3__same: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { return _play_bean(); } + + case c3__bump: case c3__dtls: p_gen = u3t(gen); _play_used(); { return u3nt(c3__atom, u3_blip, u3_nul); } + case c3__rock: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { return _play_rock(p_gen, q_gen); } - case c3__dttr: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__dttr: + case c3__kick: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { return c3__noun; } + case c3__sand: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { return _play_sand(p_gen, q_gen); } + case c3__hand: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { return u3k(p_gen); } - case c3__ktbr: p_gen = u3t(gen); + + case c3__ktbr: + case c3__iron: p_gen = u3t(gen); _play_used(); { u3_noun boc = _play_x(van, sut, p_gen); @@ -302,7 +322,9 @@ u3z(boc); return pro; } - case c3__ktpm: p_gen = u3t(gen); + + case c3__ktpm: + case c3__zinc: p_gen = u3t(gen); _play_used(); { u3_noun boc = _play_x(van, sut, p_gen); @@ -311,7 +333,9 @@ u3z(boc); return pro; } - case c3__ktwt: p_gen = u3t(gen); + + case c3__ktwt: + case c3__lead: p_gen = u3t(gen); _play_used(); { u3_noun boc = _play_x(van, sut, p_gen); @@ -320,7 +344,9 @@ u3z(boc); return pro; } - case c3__ktts: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__ktts: + case c3__name: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { u3_noun boc = _play_x(van, sut, q_gen); @@ -329,31 +355,23 @@ u3z(boc); return ret; } - case c3__ktzp: u3x_cell(u3t(gen), &p_gen, &q_gen); - _play_used(); - { - u3_noun boc = _play_x(van, sut, q_gen); - u3_noun ret = u3qfu_conk(van, boc, p_gen); - u3z(boc); - return ret; - } - case c3__ktsg: p_gen = u3t(gen); + case c3__ktsg: + case c3__burn: p_gen = u3t(gen); _play_used(); { return _play_x(van, sut, p_gen); } - case c3__ktls: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__ktls: + case c3__like: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { return _play_x(van, sut, p_gen); } - case c3__kthx: u3x_cell(u3t(gen), &p_gen, &q_gen); - _play_used(); - { - return _play_x(van, sut, p_gen); - } - case c3__tsgr: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__tsgr: + case c3__per: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { u3_noun boc = _play_x(van, sut, p_gen); @@ -362,7 +380,9 @@ u3z(boc); return ret; } - case c3__tstr: case c3__tshx: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); + + case c3__tstr: + case c3__aka: case c3__tshx: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); _play_used(); { u3_noun boc = u3qfu_buss(van, sut, p_gen, q_gen); @@ -371,12 +391,16 @@ u3z(boc); return ret; } - case c3__cnts: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__cnts: + case c3__make: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { return _play_cnts(van, sut, p_gen, q_gen); } - case c3__brcn: p_gen = u3t(gen); + + case c3__brcn: + case c3__core: p_gen = u3t(gen); _play_used(); { u3_noun ruf = u3nc(u3_nul, 1); @@ -385,7 +409,9 @@ u3z(ruf); return ret; } - case c3__sgzp: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__sgzp: + case c3__type: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { u3_noun typ = u3qfu_play(van, sut, p_gen); @@ -401,21 +427,28 @@ u3z(typ); return ret; } - case c3__sggr: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__sggr: + case c3__hint: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { return _play_x(van, sut, q_gen); } - case c3__zpts: p_gen = u3t(gen); + + case c3__zpts: + case c3__nock: p_gen = u3t(gen); _play_used(); { return c3__noun; } - case c3__zpcm: u3x_cell(u3t(gen), &p_gen, &q_gen); + + case c3__zpcm: + case c3__twig: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { return _play_x(van, sut, p_gen); } + case c3__dbug: u3x_cell(u3t(gen), &p_gen, &q_gen); { u3_noun ret; @@ -427,16 +460,9 @@ u3t_drop(); return ret; } - case c3__zpcn: - _play_used(); - { - u3_noun pet = u3j_hook(u3k(van), "seed"); - u3_noun ret = u3k(u3h(pet)); - u3z(pet); - return ret; - } - case c3__zpsm: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__zpsm: + case c3__spit: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { u3_noun zur = _play_x(van, sut, p_gen); @@ -448,8 +474,10 @@ return ret; } + case c3__lost: case c3__zpzp: + case c3__fail: _play_used(); { return c3__void; From 180c350cdcdb99f69b12178b67305735bf2fd0af Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Fri, 5 Feb 2016 02:32:37 -0800 Subject: [PATCH 132/137] Everything except %tsgl through %wtdt. --- jets/f/ut_mint.c | 1 + 1 file changed, 1 insertion(+) diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index 3cebe575e4..3380f30ff9 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -340,6 +340,7 @@ || ((c3y == u3du(gen)) && ((c3__zpfs == u3h(gen)) || (c3__lost == u3h(gen)) || + (c3__fail == u3h(gen)) || (c3__zpzp == u3h(gen)))) ) { return u3nt(c3__void, 0, 0); From 9425766ec09be8fc6c51085019fdd46ca0891037 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Fri, 5 Feb 2016 03:10:07 -0800 Subject: [PATCH 133/137] Modified all stems. About to remove old. --- jets/f/ut_play.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index 57d89bfd1d..9915897b9b 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -382,7 +382,7 @@ } case c3__tstr: - case c3__aka: case c3__tshx: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); + case c3__aka: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); _play_used(); { u3_noun boc = u3qfu_buss(van, sut, p_gen, q_gen); From 016b5931e5d60b355abe34a4f5084206f20b50b7 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Fri, 5 Feb 2016 03:27:26 -0800 Subject: [PATCH 134/137] All stems changed over. --- jets/f/ut_mint.c | 2 +- jets/f/ut_mull.c | 2 +- jets/f/ut_play.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index 3380f30ff9..c98027803e 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -508,7 +508,7 @@ case c3__wish: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { - u3_noun nog = u3nc(c3__cnbc, u3k(p_gen)); + u3_noun nog = u3nc(c3__cold, u3k(p_gen)); u3_noun nef = _mint_in(van, sut, gol, nog); u3_noun viz = _mint_in(van, sut, c3__noun, q_gen); diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index 3336a59f83..0b6e3dfc14 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -473,7 +473,7 @@ case c3__wish: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { - u3_noun nog = u3nc(c3__cnbc, u3k(p_gen)); + u3_noun nog = u3nc(c3__cold, u3k(p_gen)); u3_noun vay = _mull_in(van, sut, c3__noun, dox, q_gen); u3_noun ret; diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index 9915897b9b..53a625bdc0 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -259,7 +259,7 @@ case c3__wish: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { - u3_noun nog = u3nc(c3__cnbc, u3k(p_gen)); + u3_noun nog = u3nc(c3__cold, u3k(p_gen)); u3_noun ret = _play_x(van, sut, nog); u3z(nog); From 97a4d5abdb9e758a777552142d1459d237eed656 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sat, 6 Feb 2016 22:44:56 -0800 Subject: [PATCH 135/137] Some naming improvements. --- Spec/flw.txt | 1039 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1039 insertions(+) diff --git a/Spec/flw.txt b/Spec/flw.txt index 85935fd1fc..88daa84dd7 100644 --- a/Spec/flw.txt +++ b/Spec/flw.txt @@ -49,3 +49,1042 @@ XRAY XYST YAAR YABA YACK YADS YAFF YAGI YAGS YAHS YAKS YALD YALE YAMS YANG YANK YAPP YAPS YARD YARE YARK YARN YARR YATE YAUD YAUP YAWL YAWN YAWP YAWS YAWY YAYS YBET YEAD YEAH YEAN YEAR YEAS YEBO YECH YEDE YEED YEGG YELD YELK YELL YELM YELP YELT YENS YEPS YERD YERK YESK YEST YETI YETT YEUK YEVE YEWS YGOE YIDS YIKE YILL YINS YIPE YIPS YIRD YIRK YIRR YITE YLEM YLKE YMPE YMPT YOBS YOCK YODE YODH YODS YOGA YOGH YOGI YOKE YOKS YOLD YOLK YOMP YOND YONI YONT YOOF YOOP YORE YORK YORP YOUK YOUR YOUS YOWE YOWL YOWS YUAN YUCA YUCH YUCK YUFT YUGA YUGS YUKE YUKO YUKS YUKY YULE YUMP YUNX YUPS YURT YUTZ YUZU YWIS ZACK ZAGS ZANY ZAPS ZARF ZARI ZATI ZEAL ZEAS ZEBU ZEDS ZEES ZEIN ZEKS ZELS ZEPS ZERK ZERO ZEST ZETA ZEZE ZHOS ZIFF ZIGS ZILA ZILL ZIMB ZINC ZINE ZING ZINS ZIPS ZITE ZITI ZITS ZIZZ ZOBO ZOBU ZOEA ZOIC ZOLS ZONA ZONE ZONK ZOOM ZOON ZOOS ZOOT ZORI ZOUK ZULU ZUPA ZURF ZYGA ZYME ZZZS + + +San Jose Scrabble(r) Club No. 21 + +Three-Letter Word List + +Effective March 1st, 2006. +Includes all 3-letter words acceptable in U.S. Club and +Tournament Play as of 2009. +Copyright (c) 1996-2009 San Jose Scrabble Club No. 21 + + +AAH to exclaim in delight +AAL East Indian shrub +AAS [aa] (rough, cindery lava) +ABA sleeveless garment +ABO aborigine {offensive} +ABS [ab] (abdominal muscle) {OSPD3} +ABY to pay the penalty for (abye) +ACE to make a perfect shot +ACT to perform by action +ADD to perform addition +ADO bustle +ADS [ad] (advertisement) +ADZ cutting tool (adze) +AFF off +AFT toward the stern +AGA Turkish military officer +AGE to grow old +AGO in the past +AGS [ag] (agriculture) {OSPD4} +AHA intj. expressing sudden realization +AHI tuna {OSPD4} +AHS [ah] (to exclaim in amazement) {OSPD4} +AID to help +AIL to suffer pain +AIM to point in a direction +AIN Hebrew letter (ayin) +AIR to broadcast +AIS [ai] (three-toed sloth) +AIT small island +ALA wing +ALB long-sleeved vestment +ALE alcoholic beverage +ALL everything one has +ALP high mountain +ALS [al] (East Indian tree) +ALT high-pitched note +AMA Oriental nurse (amah) +AMI friend +AMP unit of electric current strength (ampere) +AMU atomic mass unit +ANA collection of information on a subject +AND added condition +ANE one +ANI tropical American black cuckoo +ANT small insect +ANY one or another +APE to mimic +APO type of protein {OSPD4} +APP computer program (application) {OSPD4} +APT appropriate +ARB stock trader +ARC to travel a curved course +ARE unit of surface measure/conj. of be +ARF dog's bark +ARK large boat +ARM to supply with weapons +ARS [ar] (letter 'r') +ART skill acquired by experience +ASH tree/to burn into ashes +ASK to question +ASP venemous snake +ASS donkey +ATE reckless impulse driving one to ruin +ATT Laotian monetary unit {OSPD3} +AUK diving seabird +AVA at all +AVE expression of greeting +AVO monetary unit of Macau +AWA away +AWE to inspire with awe +AWL pointed punching tool +AWN bristlelike appendage of certain grasses +AXE to cut with an axe +AYE affirmative vote +AYS [ay] (affirmative vote) +AZO containing nitrogen +BAA [baa] (to bleat) +BAD something bad +BAG to put into a bag +BAH intj. expressing disgust +BAL type of shoe (balmoral) +BAM to strike with a dull sound +BAN to prohibit/Rumanian coin +BAP small roll {OSPD3} +BAR to exclude +BAS [ba] (eternal soul in Egyptian mythology) +BAT to hit a baseball +BAY to howl +BED to provide with a bed +BEE winged insect +BEG to plead +BEL unit of power +BEN inner room +BES Hebrew letter (beth) {OSPD4} +BET to wager +BEY Turkish ruler +BIB to drink alcohol +BID to make a bid +BIG large +BIN to store in a bin +BIO biography +BIS [bi] (bisexual) +BIT to restrain with a bit +BIZ business +BOA large snake +BOB to move up and down +BOD body +BOG to impede +BOO to deride +BOP to hit +BOS [bo] (pal) +BOT botfly larva +BOW to bend forward at the waist +BOX to put into a box +BOY male child +BRA brassiere +BRO brother {OSPD3} +BRR intj. used to indicate coldness (brrr) +BUB young fellow +BUD to grow buds +BUG to annoy +BUM to live idly +BUN small bread roll +BUR to remove a rough edge from (burr) +BUS to transport by bus +BUT flatfish +BUY to purchase +BYE free advance to next tournament round +BYS [by] (side issue) +CAB to drive a taxi +CAD ungentlemanly man +CAM rotating machine part +CAN to be able/to put into a can +CAP to put a cover onto +CAR automobile +CAT to anchor to a cathead +CAW to caw like a crow +CAY small low island +CEE letter 'c' +CEL drawn frame of animation {OSPD3} +CEP large mushroom (cepe) +CHI Greek letter +CIG cigarette {OSPD4} +CIS having certain atoms on same side of molecule +COB corncob +COD to fool +COG to cheat at dice +COL depression between two mountains +CON to swindle +COO to make the sound of a dove +COP to steal +COR intj. expressing surprise +COS lettuce variety +COT lightweight bed +COW to intimidate +COX to direct a racing boat (coxswain) +COY shy/to caress +COZ cousin +CRU French wine classification {OSPD4} +CRY to weep +CUB young of certain animals +CUD food portion to be chewed again +CUE to signal a start +CUM together with +CUP to place into a cup +CUR mongrel dog +CUT to make an incision +CWM circular basin with steep walls (cirque) +DAB to touch lightly +DAD father +DAG hanging shred +DAH dash in Morse code +DAK transportion by relay +DAL lentil dish +DAM to build a dam +DAN skill level in martial arts {OSPD4} +DAP to dip into water +DAW to dawn +DAY 24 hours +DEB debutante +DEE letter 'd' +DEF excellent {OSPD4} +DEL differential calculus operator +DEN to live in a lair +DEV Hindu god (deva) +DEW to wet with dew +DEX sulfate used as stimulant +DEY former North African ruler +DIB to fish +DID [do-conj] (to execute) +DIE to cease living/to make a die +DIF difference {OSPD4} +DIG to scoop earth from the ground +DIM obscure/to make obscure +DIN to make a loud noise +DIP to immerse briefly +DIS to disrespect {OSPD3} +DIT dot in Morse code +DOC doctor +DOE female deer +DOG to follow after like a dog +DOL unit of pain intensity +DOM title given to certain monks +DON to put on +DOR black European beetle +DOS [do] (first tone of diatonic musical scale) +DOT to cover with dots +DOW to prosper +DRY having no moisture/prohibitionist/to make dry + +DUB to confer knighthood upon +DUD bomb that fails to explode +DUE something owed +DUG teat, udder +DUH intj. expressing patent obviousness of a preceding statement +{OSPD4} +DUI [duo-pl] (instrumental duet) +DUN of a dull brown color/to demand payment +DUO instrumental duet +DUP to open +DYE to color +EAR hearing organ +EAT to consume +EAU water +EBB to recede +ECU old French coin +EDH Old English letter +EDS [ed] (education) {OSPD4} +EEK intj. expressing fright {OSPD4} +EEL snakelike fish +EFF letter 'f' (ef) +EFS [ef] (letter 'f') +EFT newt +EGG to throw eggs at +EGO conscious self +EKE to get with great difficulty +ELD old age +ELF small, often mischievous fairy +ELK large deer +ELL letter 'l' +ELM deciduous tree +ELS [el] (letter 'l') +EME uncle +EMS [em] (printer's measurement) +EMU large, flightless bird +END to terminate +ENG phonetic symbol +ENS entity +EON long period of time (aeon) +ERA chronological period (epoch) +ERE previous to; before +ERG unit of work or energy +ERN erne +ERR to make a mistake +ERS European climbing plant (ervil) + +ESS letter 's' (es) +ETA Greek letter +ETH Old English letter (edh) +EVE evening +EWE female sheep +EYE organ of sight/to watch closely +FAB fabulous/something fabricated {OSPD4} +FAD passing fancy +FAG to make weary by hard work +FAN to use a fan to cool +FAR at or to a great distance +FAS [fa] (fourth tone of diatonic musical scale) +FAT obese/to make fat +FAX to reproduce by electronic means +FAY to join closely +FED federal agent +FEE to pay a fee to +FEH Hebrew letter (pe) +FEM passive homosexual +FEN marsh +FER for +FES [fe] (Hebrew letter-feh) {OSPD4} +FET to fetch +FEU to grant land to under Scottish feudal law +FEW amounting to or consisting of a small number +FEY crazy +FEZ brimless cap worn by men in the Near East +FIB to tell a white lie +FID topmast support bar +FIE intj. expressing disapproval +FIG to adorn +FIL coin of Iraq, Jordan +FIN to equip with fins +FIR evergreen tree +FIT healthy/to be suitable for +FIX to repair +FIZ hissing or sputtering sound +FLU virus disease +FLY clever/to hit a ball high into the air in baseball/to move +through the air +FOB to deceive +FOE enemy +FOG to cover with fog +FOH intj. faugh +FON warm, dry wind (foehn) +FOP to deceive +FOR directed or sent to +FOU drunk +FOX to outwit +FOY farewell feast or gift +FRO away +FRY to cook over direct heat in hot fat or oil +FUB to fob +FUD old-fashioned person +FUG to make stuffy +FUN to act playfully +FUR to cover with fur +GAB to chatter +GAD to roam about restlessly +GAE to go +GAG to prevent from talking +GAL girl +GAM to visit socially +GAN [gin-conj] (to begin) +GAP to make an opening in +GAR to compel +GAS to supply with gas +GAT pistol +GAY merry/homosexual +GED food fish +GEE to turn right +GEL to become like jelly +GEM to adorn with gemstones +GEN knowledge obtained by investigation {OSPD3} +GET to obtain +GEY very +GHI liquid butter made in India (ghee) +GIB to fasten with a wedge +GID disease of sheep +GIE to give +GIG to catch fish with a pronged spear +GIN to begin/to remove seeds from cotton +GIP to gyp +GIT intj. used as an order of dismissal +GNU large antelope +GOA Asian gazelle +GOB to fill a pit with waste +GOD to treat as a god (a supernatural being) +GOO slimy stuff +GOR intj. used as a mild oath +GOS [go] (Japanese board game) {OSPD4} +GOT [get-conj] (to obtain) +GOX gaseous oxygen +GOY non-Jewish person +GUL design in oriental carpets +GUM to chew without teeth +GUN to shoot with a gun +GUT to remove the guts of +GUV governor +GUY to ridicule +GYM large room for sports activities +GYP to swindle +HAD [have-conj] (to possess) +HAE to have +HAG to hack +HAH ha +HAJ pilgrimage to Mecca (hadj) +HAM to overact +HAO Vietnamese monetary unit +HAP to happen +HAS [ha] (sound expressing triumph) +HAT to provide with a hat +HAW to turn left +HAY to make into hay +HEH Hebrew letter (heth) +HEM to add an edge to +HEN female chicken +HEP hip +HER objective or possessive case of the pronoun she +HES [he] (male person) +HET Hebrew letter (heth) +HEW to cut with an ax +HEX to cast an evil spell upon +HEY intj. used to attract attention +HIC intj. used to represent a hiccup +HID [hide-conj] (to conceal) +HIE to hurry +HIM objective case of the pronoun he +HIN Hebrew unit of liquid measure +HIP aware of the most current styles and trends/to build a type +of roof +HIS possessive form of the pronoun he +HIT to strike +HMM intj. expressing thought +HOB to provide with hobnails +HOD portable trough +HOE to use a hoe +HOG to take more than one's share +HON honeybun +HOP to move by jumping on one foot +HOT having a high temperature/to heat +HOW method of doing something +HOY heavy barge +HUB center of a wheel +HUE color +HUG to grasp with both arms +HUH intj. expressing surprise +HUM to sing without words +HUN barbarian +HUP intj. used to mark a marching cadence +HUT to live in a hut +HYP hypochondria +ICE to cover with ice +ICH fish disease +ICK intj. expressing distaste +ICY covered with ice +IDS [id] (part of psyche) +IFF if and only if {OSPD3} +IFS [if] (possible condition) +IGG to ignore {OSPD4} +ILK kind +ILL evil +IMP to graft feathers onto a bird's wing +INK to apply ink to +INN to house at an inn +INS [in] (influence) +ION electrically charged atom +IRE to anger +IRK to annoy +ISM doctrine +ITS possesive form of [it] +IVY climbing vine +JAB to poke +JAG to cut unevenly +JAM to force together tightly +JAR to cause to shake +JAW to jabber +JAY corvine bird +JEE to turn right (gee) +JET to fly in a jet +JEU game +JEW to bargain with {offensive} +JIB to refuse to proceed further +JIG to bob +JIN Muslim supernatural being (jinn) +JOB to work by the piece +JOE fellow +JOG to run slowly +JOT to write down quickly +JOW to toll +JOY to rejoice +JUG to put into a jug +JUN coin of North Korea +JUS legal right +JUT to protrude +KAB ancient Hebrew unit of measure +KAE crow-like bird +KAF Hebrew letter (kaph) +KAS large cupboard/pl. of ka +KAT evergreen shrub +KAY letter 'k' +KEA parrot +KEF marijuana +KEG small barrel +KEN to know +KEP to catch +KEX dry, hollow stalk +KEY to provide with a key +KHI Greek letter (chi) +KID to tease +KIF marijuana (kef) +KIN group of related people +KIP to sleep +KIR alcoholic beverage +KIS [ki] (vital life-sustaining energy force) {OSPD4} +KIT to equip +KOA timber tree +KOB reddish brown antelope +KOI large Japanese carp {OSPD3} +KOP hill +KOR Hebrew unit of measure +KOS land measure in India +KUE letter 'q' +KYE private Korean-American banking club {OSPD4} +LAB laboratory +LAC resinous substance secreted by insects +LAD boy +LAG to fall behind +LAM to flee +LAP to drink with the tongue +LAR Roman tutelary god +LAS [la] (sixth tone of diatonic musical scale) +LAT former Latvian monetary unit +LAV lavatory +LAW to sue +LAX not strict or stringent +LAY to place +LEA meadow +LED [lead-conj] (to show the way) +LEE shelter from the wind +LEG to walk hurriedly +LEI flower necklace +LEK Albanian monetary unit +LET to rent +LEU monetary unit of Rumania +LEV Bulgarian monetary unit +LEX law +LEY lea +LEZ lesbian +LIB liberation +LID to provide with a lid +LIE to become horizontal/to tell untruths +LIN waterfall (linn) +LIP to touch with the lips +LIS [li] (Chinese unit of distance) +LIT [light] (to illuminate)/former Lithuanian monetary unit +(litas) +LOB to throw in a high arc +LOG to cut down trees for timber +LOO to subject to a forfeit at the card game loo +LOP to chop off +LOT to distribute proportionately +LOW close to the ground/to make the sound of cattle +LOX to supply with lox (liquid oxygen) +LUG to pull with effort +LUM chimney +LUV sweetheart +LUX unit of illumination +LYE solution used to make soap +MAC raincoat +MAD insane/to madden +MAE more +MAG magazine +MAN adult human male/to supply with men +MAP to draw a map +MAR to destroy the perfection of +MAS [ma] (mother) +MAT to pack into a dense mass +MAW to mow +MAX maximum {OSPD3} +MAY to have permission/to gather flowers during Spring +MED medical +MEG megabyte {OSPD4} +MEL honey +MEM Hebrew letter +MEN [man] (adult human male) +MET [meet-conj] (to make the acquaintance of) +MEW to meow +MHO unit of electrical conductance +MIB playing marble +MIC microphone {OSPD4} +MID middle +MIG playing marble +MIL unit of length +MIM primly demure +MIR Russian peasant commune +MIS [mi] (third tone of diatonic musical scale) +MIX to combine +MOA extinct flightless bird +MOB to crowd about +MOC soft leather heelless shoe (moccasin) {OSPD3} +MOD one who wears boldly stylish clothes +MOG to move away +MOL unit of quantity in chemistry (mole) +MOM mother +MON man +MOO to make the sound of a cow +MOP to wipe with a mop +MOR forest humus +MOS [mo] (moment) +MOT witty saying +MOW to cut down grass +MUD to cover with mud +MUG to assault with intent to rob +MUM to act in disguise +MUN man +MUS [mu] (Greek letter) +MUT mutt +MYC gene that regulates other genes {OSPD4} +NAB to capture +NAE no; not +NAG to find fault incessantly +NAH no +NAM [nim-conj] (to steal) +NAN Indian flat round leavened bread {OSPD3} +NAP to sleep briefly +NAW no +NAY negative vote +NEB bird beak +NEE born with the name of +NEG photographic negative {OSPD4} +NET to catch in a net +NEW existing only a short time/something that is new +NIB to provide with a penpoint +NIL nothing +NIM to steal +NIP to bite quickly +NIT insect egg +NIX to veto/water sprite +NOB wealthy person +NOD to move the head downward +NOG strong ale/to fill space with bricks +NOH classical drama of Japan +NOM name +NOO now +NOR and not +NOS [no] (negative reply) +NOT in no way +NOW present time +NTH pert. to item number n +NUB protuberance +NUN woman belonging to a religious order +NUS [nu] (Greek letter) +NUT to gather nuts +OAF clumsy person +OAK hardwood tree +OAR to row with oars +OAT cereal grass +OBA hereditary African chief {OSPD4} +OBE African sorcery (obeah) +OBI African sorcery (obeah) +OCA South American herb +ODA harem room {OSPD4} +ODD one that is odd/unusual +ODE lyric poem +ODS [od] (hypothetical force of natural power) +OES [oe] (Faroean wind) +OFF to kill +OFT often +OHM unit of electrical resistance +OHO intj. expressing surprise +OHS [oh] (to exclaim "oh") +OIL to supply with oil +OKA Turkish unit of weight +OKE Turkish unit of weight (oka) +OLD individual of a specified age/living or existing for a +relatively long time +OLE shout of approval +OMS [om] (mantra used in meditation) +ONE number 1 +ONO large mackerel {OSPD4} +ONS [on] (side of wicket in cricket) +OOH to exclaim in amazement +OOT out +OPE to open +OPS [op] (style of abstract art) +OPT to choose +ORA [os-pl] (orifice) +ORB to form into a sphere +ORC marine mammal (orca) +ORE mineral or rock containing valuable metal +ORS [or] (heraldic color gold) +ORT table scrap +OSE ridge of sand (esker) +OUD stringed instrument of northern Africa +OUR belonging to us +OUT to be revealed +OVA [ovum-pl] (female reproductive cell) +OWE to be under obligation to pay +OWL nocturnal bird +OWN to possess +OXO containing oxygen +OXY containing oxygen +PAC shoe patterned after a moccasin +PAD to line with padding +PAH intj. used as an exclamation of disgust +PAL to hang around with as friends +PAM jack of clubs +PAN to criticize harshly +PAP soft food for infants +PAR to shoot par on a hole +PAS [pa] (father) +PAT to touch lightly +PAW to scrape at with a paw +PAX ceremonial embrace given to signify Christian love and unity +PAY to give money in order to buy something +PEA edible seed of an annual herb +PEC pectoral muscle {OSPD3} +PED natural soil aggregate +PEE to urinate {offensive} +PEG to nail (a wooden pin) +PEH Hebrew letter (pe) +PEN to write +PEP to fill with energy +PER for each +PES foot/pl. of pe (Hebrew letter) +PET to caress with the hand +PEW bench for seating people in church +PHI Greek letter +PHT intj. used as an expression of mild anger or annoyance +PIA brain membrane +PIC photograph +PIE to pi +PIG to bear pigs (cloven-hoofed mammals) +PIN to fasten with a pin +PIP to break through the shell of an egg +PIS [pi] (Greek letter) +PIT to mark with cavities or depressions +PIU more used as a musical direction +PIX container for the Eucharist (pyx) +PLY to supply with or offer repeatedly +POD to produce seed vessels +POH intj. expressing disgust +POI Hawaiian food +POL politician +POM English immigrant in Australia {offensive} +POP to make a sharp, explosive sound +POT to put into a pot +POW explosive sound +POX to infect with syphilis +PRO argument or vote in favor of something +PRY to inquire impertinently into private matters +PSI Greek letter +PST intj. used to attract attention (psst) {OSPD4} +PUB tavern +PUD pudding +PUG to fill in with clay or mortar +PUL coin of Afghanistan +PUN to make a pun (a play on words) +PUP to give birth to puppies +PUR to purr +PUS viscous fluid formed in infected tissue +PUT to place in a particular position +PYA copper coin of Burma +PYE book of ecclesiastical rules in the pre reformation english +church +PYX container for the Eucharist +QAT evergreen shrub (kat) +QIS [qi] (vital life-sustaining energy force) {OSPD4} +QUA in the capacity of +RAD to fear +RAG to scold +RAH intj. used to cheer on a team or player +RAI style of popular Algerian music {OSPD4} +RAJ dominion; sovereignty +RAM to strike with great force +RAN [run-conj] (to move by rapid steps) +RAP to strike sharply +RAS Ethiopian prince +RAT to hunt rats (long-tailed rodents) +RAW uncooked/sore or irritated spot +RAX to stretch out +RAY to emit rays +REB Confederate soldier +REC recreation +RED of the color red/to put into order +REE female Eurasian sandpiper +REF to referee +REG regulation +REI erroneous form of former Portuguese coin +REM quantity of ionizing radiation +REP cross-ribbed fabric +RES thing or matter +RET to soak in order to loosen the fiber from the woody tissue +REV to increase the speed of +REX animal with a single wavy layer of hair/king +RHO Greek letter +RIA long, narrow inlet +RIB to poke fun at +RID to free from something objectionable +RIF to lay off from employment +RIG to put in proper condition for use +RIM to provide with a rim (an outer edge) +RIN to run or melt +RIP to tear or cut apart roughly +ROB to take property from illegally +ROC lengendary bird of prey +ROD to provide with a rod +ROE mass of eggs within a female fish +ROM male gypsy +ROT to decompose +ROW to propel by means of oars +RUB to move along the surface of a body with pressure +RUE to feel sorrow or remorse for +RUG to tear roughly +RUM alcoholic liquor/odd +RUN to move by rapid steps +RUT to make ruts (grooves) in +RYA Scandinavian handwoven rug +RYE cereal grass +SAB to sob +SAC pouchlike structure in an animal or plant +SAD unhappy +SAE so +SAG to bend or sink downward from weight or pressure +SAL salt +SAP to weaken gradually +SAT [sit-conj] (to rest on the buttocks) +SAU xu +SAW to cut or divide with a saw +SAX saxophone +SAY to utter +SEA ocean +SEC secant +SEE to perceive with the eyes +SEG advocate of racial segregation +SEI large whale (rorqual) +SEL self +SEN monetary unit of Japan +SER unit of weight of India +SET to put in a particular position +SEW to mend or fasten with a needle and thread +SEX to determine the sex of +SHA intj. used to urge silence (shh) +SHE female person +SHH intj. used to urge silence +SHY timid/to move suddenly back in fear +SIB sibling +SIC to urge to attack +SIM simulation +SIN to commit a sin +SIP to drink in small quantities +SIR respectful form of address used to a man +SIS sister +SIT to rest on the buttocks +SIX number 6 +SKA Jamaican music +SKI to travel on skis +SKY to hit or throw toward the sky +SLY crafty +SOB to cry with a convulsive catching of the breath +SOD to cover with sod (turf) +SOL fifth tone of diatonic musical scale (so) +SOM Kyrgyzstan monetary unit {OSPD4} +SON male child +SOP to dip or soak in a liquid +SOS [so] (fifth tone of diatonic musical scale) +SOT habitual drunkard +SOU former French coin +SOW to scatter over land for growth, as seed +SOX [sock-pl] (knitted or woven covering for the foot) +SOY soybean +SPA mineral spring +SPY to watch secretly +SRI mister; sir used as a Hindu title of respect +STY to keep in a pigpen +SUB to act as a substitute +SUE to institute legal proceedings against +SUK marketplace (souk) {OSPD4} +SUM to add into one total +SUN to expose to the sun +SUP to eat supper +SUQ marketplace (souk) {OSPD3} +SYN syne +TAB to name or designate +TAD small boy +TAE to +TAG to provide with a tag +TAJ tall, conical cap worn in Muslim countries +TAM tight-fitting Scottish cap +TAN brown from the sun's rays/to convert hide into leather by +soaking in chemicals +TAO path of virtuous conduct according to a Chinese philosophy +TAP to strike gently +TAR to cover with tar +TAS [ta] (thanks) +TAT to make tatting +TAU greek letter +TAV Hebrew letter +TAW to convert into white leather by the application of minerals +TAX to place a tax on +TEA beverage made by infusing dried leaves in boiling water +TED to spread for drying +TEE to place a golf ball on a small peg +TEG yearling sheep +TEL ancient mound in the Middle East +TEN number 10 +TET Hebrew letter (teth) +TEW to work hard +THE article used to specify or make particular +THO though +THY possessive form of the pronoun thou +TIC involuntary muscular contraction +TIE to fasten with a cord or rope +TIL sesame plant +TIN to coat with tin +TIP to tilt +TIS [ti] (seventh tone of diatonic musical scale) +TIT small bird +TOD British unit of weight +TOE to touch with the toe +TOG to clothe +TOM male of various animals +TON unit of weight +TOO in addition +TOP to cut off the top +TOR high, craggy hill +TOT to total +TOW to pull by means of a rope or chain +TOY to amuse oneself as if with a toy +TRY to attempt +TSK to utter a scolding exclamation +TUB to wash in a tub +TUG to pull with force +TUI bird of New Zealand +TUN to store in a large cask +TUP to copulate with a ewe +TUT to utter an exclamation of impatience +TUX tuxedo +TWA two +TWO number 2 +TYE chain on a ship +UDO Japanese herb +UGH sound of a cough or grunt +UKE ukulele +ULU Eskimo knife +UMM intj. expressing hesitation (um) +UMP to umpire +UNS [un] (one) +UPO upon +UPS [up] (to raise) +URB urban area +URD annual bean grown in India +URN type of vase +URP to vomit {OSPD4} +USE to put into service +UTA large lizard +UTE utility vehicle {OSPD4} +UTS [ut] (musical tone) +VAC vacuum cleaner +VAN large motor vehicle +VAR unit of reactive power +VAS anatomical duct +VAT to put into a vat +VAU Hebrew letter (vav) +VAV Hebrew letter +VAW Hebrew letter (vav) +VEE letter 'v' +VEG vegetable +VET to treat animals medically +VEX to annoy +VIA by way of +VID video {OSPD4} +VIE to strive for superiority +VIG charge paid to a bookie on a bet (vigorish) +VIM energy +VIS force or power +VOE small bay, creek, or inlet +VOW to make a vow +VOX voice +VUG small cavity in a rock or lode +VUM intj. expressing surprise {OSPD4} +WAB web +WAD to form into a wad +WAE woe +WAG to move briskly up and down or to and fro +WAN to become wan/unnaturally pale +WAP to wrap +WAR to engage in war +WAS [be-conj] (to exist) +WAT hare/wet +WAW Hebrew letter (vav) +WAX to coat with wax +WAY method of doing something +WEB to provide with a web +WED to marry +WEE short time/very small +WEN benign skin tumor +WET soaked with a liquid/to make wet +WHA who +WHO what or which person or persons +WHY reason or cause of something +WIG to provide with a wig +WIN to be victorious/to winnow +WIS to know +WIT intelligence/to know +WIZ wizard +WOE tremendous grief +WOG dark-skinned foreigner +WOK cooking utensil +WON to dwell +WOO to seek the affection of +WOP Italian {offensive} +WOS [wo] (woe) +WOT to know +WOW to excite to enthusiastic approval +WRY contorted/to contort +WUD insane +WYE letter 'y' +WYN rune for 'W' (wynn) +XIS [xi] (Greek letter) +YAG synthetic garnet {OSPD4} +YAH intj. used as an exclamation of disgust +YAK to chatter +YAM plant having an edible root +YAP to bark shrilly +YAR yare +YAW to deviate from an intended course +YAY to this extent +YEA affirmative vote +YEH yeah +YEN to yearn +YEP yes +YES to give an affirmative reply to +YET up to now +YEW evergreen tree or shrub +YID Jew {offensive} +YIN feminine passive principle {Chinese} +YIP to yelp +YOB hoodlum +YOD Hebrew letter +YOK boisterous laugh +YOM day +YON yonder +YOU 2d person sing. or pl. pronoun +YOW to yowl +YUK to laugh loudly +YUM intj. expressing tasteful pleasure +YUP yep +ZAG to turn sharply +ZAP to kill or destroy +ZAS [za] (pizza) {OSPD4} +ZAX tool for cutting roof slates +ZED letter 'z' +ZEE letter 'z' +ZEK inmate in a Soviet labor camp +ZEP long sandwich {OSPD4} +ZIG to turn sharply +ZIN zinfandel {OSPD3} +ZIP to move rapidly +ZIT pimple +ZOA [zoon-pl] (whole product of a fertilized egg) +ZOO place where animals are kept for public exhibition +ZUZ ancient Hebrew silver coin {OSPD4} +ZZZ intj. representing the sound of snoring {OSPD4} + +---------------------------------------------------------------------- +San Jose Scrabble® Club No. 21 +Director: Rick Wong +Last modified: T2Q (26 Feb 2009) Clarified status of this list. +S5G (16 May 2008) Updated for TWL2006 From 52004a4f973fc18b14e132a148c8f5657eadeb4d Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Mon, 8 Feb 2016 18:17:17 -0800 Subject: [PATCH 136/137] Generating new stems, double solid. --- include/c/motes.h | 2 ++ jets/f/ut_mint.c | 10 +++++----- jets/f/ut_mull.c | 10 +++++----- jets/f/ut_play.c | 12 ++++++------ 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/include/c/motes.h b/include/c/motes.h index 8909e5425b..821c1061c2 100644 --- a/include/c/motes.h +++ b/include/c/motes.h @@ -385,6 +385,7 @@ # define c3__fish c3_s4('f','i','s','h') # define c3__fist c3_s4('f','i','s','t') # define c3__fit c3_s3('f','i','t') +# define c3__fits c3_s4('f','i','t','s') # define c3__fix c3_s3('f','i','x') # define c3__fl c3_s2('f','l') # define c3__flac c3_s4('f','l','a','c') @@ -785,6 +786,7 @@ # define c3__pass c3_s4('p','a','s','s') # define c3__past c3_s4('p','a','s','t') # define c3__peek c3_s4('p','e','e','k') +# define c3__peep c3_s4('p','e','e','p') # define c3__peft c3_s4('p','e','f','t') # define c3__peg c3_s3('p','e','g') # define c3__peld c3_s4('p','e','l','d') diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index c98027803e..64a3fc4536 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -397,8 +397,8 @@ return ret; } - case c3__wtts: case c3__fit: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__fits: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { u3_noun heb = u3nc(c3__herb, u3k(p_gen)); @@ -709,8 +709,8 @@ return ret; } - case c3__sgzp: - case c3__type: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__type: + case c3__peep: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { u3_noun typ = u3qfu_play(van, sut, p_gen); @@ -746,8 +746,8 @@ return ret; } - case c3__zpts: - case c3__nock: p_gen = u3t(gen); + case c3__nock: + case c3__code: p_gen = u3t(gen); _mint_used(); { u3_noun von = u3i_molt(u3k(van), u3qfu_van_vet, c3n, 0); diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index 0b6e3dfc14..f8e802ac10 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -350,8 +350,8 @@ return ret; } - case c3__wtts: case c3__fit: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__fits: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { u3_noun heb = u3nc(c3__herb, u3k(p_gen)); @@ -654,8 +654,8 @@ return ret; } - case c3__sgzp: - case c3__type: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__type: + case c3__peep: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { u3_noun typ = u3qfu_play(van, sut, p_gen); @@ -702,8 +702,8 @@ return ret; } - case c3__zpts: - case c3__nock: p_gen = u3t(gen); + case c3__nock: + case c3__code: p_gen = u3t(gen); _mull_used(); { return _mull_both(van, gol, c3__noun); diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index 53a625bdc0..2e9e208840 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -218,8 +218,8 @@ else switch ( u3h(gen) ) { default: goto open; - case c3__wtts: - case c3__fit: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__fit: + case c3__fits: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { return _play_bean(); @@ -410,8 +410,8 @@ return ret; } - case c3__sgzp: - case c3__type: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__type: + case c3__peep: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { u3_noun typ = u3qfu_play(van, sut, p_gen); @@ -435,8 +435,8 @@ return _play_x(van, sut, q_gen); } - case c3__zpts: - case c3__nock: p_gen = u3t(gen); + case c3__nock: + case c3__code: p_gen = u3t(gen); _play_used(); { return c3__noun; From fd001d55ef3a8687c5fd831a9f70944d7d8f841c Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Mon, 8 Feb 2016 19:35:13 -0800 Subject: [PATCH 137/137] Keyword/stem changes, final draft. --- include/c/motes.h | 1 + jets/f/ut_mint.c | 30 +++--------------------------- jets/f/ut_mull.c | 30 +++--------------------------- jets/f/ut_play.c | 32 ++++---------------------------- 4 files changed, 11 insertions(+), 82 deletions(-) diff --git a/include/c/motes.h b/include/c/motes.h index 821c1061c2..ac9fb968e7 100644 --- a/include/c/motes.h +++ b/include/c/motes.h @@ -147,6 +147,7 @@ # define c3__bump c3_s4('b','u','m','p') # define c3__bund c3_s4('b','u','n','d') # define c3__bung c3_s4('b','u','n','g') +# define c3__bunt c3_s4('b','u','n','t') # define c3__bunk c3_s4('b','u','n','k') # define c3__burn c3_s4('b','u','r','n') # define c3__busk c3_s4('b','u','s','k') diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index 64a3fc4536..52101c283e 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -397,7 +397,6 @@ return ret; } - case c3__fit: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__fits: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { @@ -420,7 +419,6 @@ return ret; } - case c3__wtcl: case c3__if: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); _mint_used(); { @@ -454,8 +452,7 @@ return ret; } - case c3__clhp: - case c3__dub: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__cons: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { u3_noun hed = _mint_in(van, sut, c3__noun, p_gen); @@ -472,7 +469,6 @@ return ret; } - case c3__dtts: case c3__same: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { @@ -494,7 +490,6 @@ return ret; } - case c3__dtwt: case c3__deep: p_gen = u3t(gen); _mint_used(); { @@ -504,11 +499,10 @@ u3nc(3, _mint_corn(van, sut, p_gen))); } - case c3__dtkt: case c3__wish: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { - u3_noun nog = u3nc(c3__cold, u3k(p_gen)); + u3_noun nog = u3nc(c3__bunt, u3k(p_gen)); u3_noun nef = _mint_in(van, sut, gol, nog); u3_noun viz = _mint_in(van, sut, c3__noun, q_gen); @@ -521,7 +515,6 @@ return ret; } - case c3__dtls: case c3__bump: p_gen = u3t(gen); _mint_used(); { @@ -545,8 +538,7 @@ return ret; } - case c3__dttr: - case c3__kick: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__nock: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { u3_noun one = _mint_corn(van, sut, p_gen); @@ -572,7 +564,6 @@ return u3k(u3t(gen)); } - case c3__ktbr: case c3__iron: p_gen = u3t(gen); _mint_used(); { @@ -584,7 +575,6 @@ return pro; } - case c3__ktpm: case c3__zinc: p_gen = u3t(gen); _mint_used(); { @@ -596,7 +586,6 @@ return pro; } - case c3__ktwt: case c3__lead: p_gen = u3t(gen); _mint_used(); { @@ -608,7 +597,6 @@ return pro; } - case c3__ktts: case c3__name: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { @@ -621,7 +609,6 @@ return ret; } - case c3__ktsg: case c3__burn: p_gen = u3t(gen); _mint_used(); { @@ -647,7 +634,6 @@ return ret; } - case c3__ktls: case c3__like: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { @@ -660,7 +646,6 @@ return ret; } - case c3__tsgr: case c3__per: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { @@ -679,7 +664,6 @@ return ret; } - case c3__tstr: case c3__aka: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); _mint_used(); { @@ -690,14 +674,12 @@ return ret; } - case c3__cnts: case c3__make: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { return _mint_cnts(van, sut, gol, p_gen, q_gen); } - case c3__brcn: case c3__core: p_gen = u3t(gen); _mint_used(); { @@ -709,7 +691,6 @@ return ret; } - case c3__type: case c3__peep: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { @@ -726,7 +707,6 @@ return ret; } - case c3__sggr: case c3__hint: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { @@ -746,7 +726,6 @@ return ret; } - case c3__nock: case c3__code: p_gen = u3t(gen); _mint_used(); { @@ -757,7 +736,6 @@ return u3nc(c3__noun, u3nc(1, sev)); } - case c3__zpcm: case c3__twig: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { @@ -781,7 +759,6 @@ return ret; } - case c3__zpsm: case c3__spit: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { @@ -820,7 +797,6 @@ } } - case c3__zpzp: case c3__fail: _mint_used(); { diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index f8e802ac10..fcafb8ca93 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -350,7 +350,6 @@ return ret; } - case c3__fit: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__fits: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { @@ -379,7 +378,6 @@ return _mull_both(van, gol, _mull_bean()); } - case c3__wtcl: case c3__if: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); _mull_used(); { @@ -430,8 +428,7 @@ return ret; } - case c3__clhp: - case c3__dub: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__cons: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { u3_noun hed = _mull_in(van, sut, c3__noun, dox, p_gen); @@ -446,7 +443,6 @@ return ret; } - case c3__dtts: case c3__same: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { @@ -459,7 +455,6 @@ return _mull_both(van, gol, _mull_bean()); } - case c3__dtwt: case c3__deep: p_gen = u3t(gen); _mull_used(); { @@ -469,11 +464,10 @@ return _mull_both(van, gol, _mull_bean()); } - case c3__dtkt: case c3__wish: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { - u3_noun nog = u3nc(c3__cold, u3k(p_gen)); + u3_noun nog = u3nc(c3__bunt, u3k(p_gen)); u3_noun vay = _mull_in(van, sut, c3__noun, dox, q_gen); u3_noun ret; @@ -483,7 +477,6 @@ return ret; } - case c3__dtls: case c3__bump: p_gen = u3t(gen); _mull_used(); { @@ -502,8 +495,7 @@ return _mull_both(van, gol, typ); } - case c3__dttr: - case c3__kick: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__nock: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { u3_noun hed = _mull_in(van, sut, c3__noun, dox, p_gen); @@ -528,7 +520,6 @@ return u3nc(u3k(p_gen), u3k(p_gen)); } - case c3__ktbr: case c3__iron: p_gen = u3t(gen); _mull_used(); { @@ -544,7 +535,6 @@ return pro; } - case c3__ktpm: case c3__zinc: p_gen = u3t(gen); _mull_used(); { @@ -560,7 +550,6 @@ return pro; } - case c3__ktwt: case c3__lead: p_gen = u3t(gen); _mull_used(); { @@ -576,7 +565,6 @@ return pro; } - case c3__ktts: case c3__name: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { @@ -588,14 +576,12 @@ return ret; } - case c3__ktsg: case c3__burn: p_gen = u3t(gen); _mull_used(); { return _mull_in(van, sut, gol, dox, p_gen); } - case c3__ktls: case c3__like: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { @@ -608,7 +594,6 @@ return ret; } - case c3__tsgr: case c3__per: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { @@ -621,7 +606,6 @@ return ret; } - case c3__tstr: case c3__aka: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); _mull_used(); { @@ -635,14 +619,12 @@ return ret; } - case c3__cnts: case c3__make: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { return _mull_cnts(van, sut, gol, dox, p_gen, q_gen); } - case c3__brcn: case c3__core: p_gen = u3t(gen); _mull_used(); { @@ -654,7 +636,6 @@ return ret; } - case c3__type: case c3__peep: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { @@ -672,14 +653,12 @@ return ret; } - case c3__sggr: case c3__hint: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { return _mull_in(van, sut, gol, dox, q_gen); } - case c3__zpcm: case c3__twig: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { @@ -702,14 +681,12 @@ return ret; } - case c3__nock: case c3__code: p_gen = u3t(gen); _mull_used(); { return _mull_both(van, gol, c3__noun); } - case c3__zpsm: case c3__spit: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { @@ -727,7 +704,6 @@ (_mull_nice(van, gol, p_ret), q_ret); } - case c3__zpzp: case c3__lost: case c3__fail: _mull_used(); diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index 2e9e208840..48d4da2b04 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -218,14 +218,12 @@ else switch ( u3h(gen) ) { default: goto open; - case c3__fit: case c3__fits: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { return _play_bean(); } - case c3__wtcl: case c3__if: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); _play_used(); { @@ -242,8 +240,7 @@ return ret; } - case c3__clhp: - case c3__dub: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__cons: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { u3_noun dis = _play_x(van, sut, p_gen); @@ -255,33 +252,29 @@ return ret; } - case c3__dtkt: case c3__wish: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { - u3_noun nog = u3nc(c3__cold, u3k(p_gen)); + u3_noun nog = u3nc(c3__bunt, u3k(p_gen)); u3_noun ret = _play_x(van, sut, nog); u3z(nog); return ret; } - case c3__dtwt: case c3__deep: p_gen = u3t(gen); _play_used(); { return _play_bean(); } - case c3__dtts: case c3__same: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { return _play_bean(); } - case c3__bump: - case c3__dtls: p_gen = u3t(gen); + case c3__bump: p_gen = u3t(gen); _play_used(); { return u3nt(c3__atom, u3_blip, u3_nul); @@ -293,8 +286,7 @@ return _play_rock(p_gen, q_gen); } - case c3__dttr: - case c3__kick: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__nock: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { return c3__noun; @@ -312,7 +304,6 @@ return u3k(p_gen); } - case c3__ktbr: case c3__iron: p_gen = u3t(gen); _play_used(); { @@ -323,7 +314,6 @@ return pro; } - case c3__ktpm: case c3__zinc: p_gen = u3t(gen); _play_used(); { @@ -334,7 +324,6 @@ return pro; } - case c3__ktwt: case c3__lead: p_gen = u3t(gen); _play_used(); { @@ -345,7 +334,6 @@ return pro; } - case c3__ktts: case c3__name: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { @@ -356,21 +344,18 @@ return ret; } - case c3__ktsg: case c3__burn: p_gen = u3t(gen); _play_used(); { return _play_x(van, sut, p_gen); } - case c3__ktls: case c3__like: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { return _play_x(van, sut, p_gen); } - case c3__tsgr: case c3__per: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { @@ -381,7 +366,6 @@ return ret; } - case c3__tstr: case c3__aka: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen); _play_used(); { @@ -392,14 +376,12 @@ return ret; } - case c3__cnts: case c3__make: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { return _play_cnts(van, sut, p_gen, q_gen); } - case c3__brcn: case c3__core: p_gen = u3t(gen); _play_used(); { @@ -410,7 +392,6 @@ return ret; } - case c3__type: case c3__peep: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { @@ -428,21 +409,18 @@ return ret; } - case c3__sggr: case c3__hint: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { return _play_x(van, sut, q_gen); } - case c3__nock: case c3__code: p_gen = u3t(gen); _play_used(); { return c3__noun; } - case c3__zpcm: case c3__twig: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { @@ -461,7 +439,6 @@ return ret; } - case c3__zpsm: case c3__spit: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { @@ -476,7 +453,6 @@ } case c3__lost: - case c3__zpzp: case c3__fail: _play_used(); {