/!\ READ FULL COMMIT MESSAGE /!\

The history on the second parent of this commit is not guaranteed to be
useful or bootable. It was created somewhat outside the normal
development process. This commit runs as normal with the corresponding
/!\ commit in the arvo repository.

NB: requires -m to boot.

We apologize for the inconvenience.
This commit is contained in:
Raymond Pasco 2016-12-05 16:13:10 -05:00
commit 3902c0527e
26 changed files with 1455 additions and 683 deletions

View File

@ -327,7 +327,7 @@ J_F_OFILES_UT=\
jets/f/ut_mull.o \
jets/f/ut_nest.o \
jets/f/ut_peek.o \
jets/f/ut_perk.o \
jets/f/ut_peel.o \
jets/f/ut_play.o \
jets/f/ut_repo.o \
jets/f/ut_rest.o \

View File

@ -702,6 +702,7 @@
# 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')
# define c3__mook c3_s4('m','o','o','k')
# define c3__moot c3_s4('m','o','o','t')
# define c3__mor c3_s3('m','o','r')
# define c3__moze c3_s4('m','o','z','e')
@ -963,6 +964,7 @@
# define c3__sgts c3_s4('s','g','t','s')
# define c3__sgwt c3_s4('s','g','w','t')
# define c3__sgzp c3_s4('s','g','z','p')
# define c3__shiv c3_s4('s','h','i','v')
# define c3__show c3_s4('s','h','o','w')
# define c3__shud c3_s4('s','h','u','d')
# define c3__shut c3_s4('s','h','u','t')

View File

@ -211,6 +211,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 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);
@ -236,7 +237,7 @@
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_peek(u3_noun, u3_noun, u3_noun, u3_noun);
u3_noun u3qfu_perk(u3_noun, u3_noun, u3_noun, u3_noun);
u3_noun u3qfu_peel(u3_noun, u3_noun, u3_noun, u3_noun);
u3_noun u3qfu_play(u3_noun, u3_noun, u3_noun);
u3_noun u3qfu_repo(u3_noun, u3_noun);
u3_noun u3qfu_rest(u3_noun, u3_noun, u3_noun);

View File

@ -250,7 +250,7 @@
u3_noun u3wfu_mull(u3_noun);
u3_noun u3wfu_nest(u3_noun);
u3_noun u3wfu_peek(u3_noun);
u3_noun u3wfu_perk(u3_noun);
u3_noun u3wfu_peel(u3_noun);
u3_noun u3wfu_play(u3_noun);
u3_noun u3wfu_repo(u3_noun);
u3_noun u3wfu_rest(u3_noun);

View File

@ -7,7 +7,7 @@
/* u3m_boot(): start the u3 system.
*/
void
u3m_boot(c3_o nuu_o, c3_o bug_o, c3_c* dir_c, c3_c *pil_c);
u3m_boot(c3_o nuu_o, c3_o bug_o, c3_o mad_o, c3_c* dir_c, c3_c *pil_c);
/* u3m_bail(): bail out. Does not return.
**

View File

@ -69,6 +69,11 @@
void
u3t_slog(u3_noun hod);
/* u3t_shiv(): atom-only print.
*/
void
u3t_shiv(u3_noun hod);
/* u3t_heck(): profile point.
*/
void

View File

@ -64,6 +64,11 @@
u3_noun
u3v_do(const c3_c* txt_c, u3_noun arg);
/* u3v_boot(): make a new pier by loading a pill.
*/
void
u3v_boot(c3_c* pas_c);
/* u3v_make(): make a new pier by loading a pill.
*/
void

View File

@ -553,6 +553,7 @@
c3_o loh; // -L, local-only networking
c3_o pro; // -P, profile
c3_o veb; // -v, verbose (inverse of -q)
c3_o mad; // -m, mad pill
c3_o nuu; // -c, new pier
c3_o qui; // -q, quiet
c3_o vno; // -V, turn on +verb

View File

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

View File

@ -207,7 +207,7 @@
return pro;
}
else {
u3_noun pec = u3qfu_perk(van, sut, way, pq_sut);
u3_noun pec = u3qfu_peel(van, sut, way, pq_sut);
u3_noun pro;
if ( c3n == u3h(pec) ) {
@ -411,6 +411,7 @@
u3_noun gil)
{
if ( u3_nul == qp_sut ) {
// if ( 1 ) {
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);
@ -419,8 +420,8 @@
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))
(van, q_sut, c3__noun, iqp_sut);
u3_noun tqp_sut = u3t(qp_sut); // (list twig)
u3_noun p_tiv = u3h(tiv); // span
u3_noun q_tiv = u3t(tiv); // nock
u3_noun fid = _find_buck // pony
@ -434,7 +435,7 @@
u3_noun ret;
ret = _find_buck_face_next
(van, sut, q_sut, tqp_sut, way, p_heg, q_heg, u3t(u3t(fid)), lon, gil);
(van, sut, q_sut, tqp_sut, way, u3t(u3t(fid)), q_heg, axe, lon, gil);
u3z(fid);
u3z(tiv);
return ret;
@ -452,14 +453,14 @@
}
u3z(fid);
vat = u3qfu_fine(van, q_sut, tor);
vat = u3qfu_fine(van, sut, tor);
u3z(tor);
ret = u3nq
(c3n,
c3n,
u3k(u3h(vat)),
u3qf_comb(u3t(vat), u3qf_comb(dog, q_tiv)));
u3qf_comb(u3qf_comb(dog, q_tiv), u3t(vat)));
u3z(vat);
u3z(dog);

View File

@ -605,6 +605,12 @@
return ret;
}
case c3__tune: p_gen = u3t(gen);
_mint_used();
{
return u3nc(u3qf_face(p_gen, sut), u3nc(0, 1));
}
case c3__burn: p_gen = u3t(gen);
_mint_used();
{
@ -670,6 +676,16 @@
return ret;
}
case c3__use: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mint_used();
{
u3_noun boc = u3qfu_busk(van, sut, p_gen);
u3_noun ret = _mint_in(van, boc, gol, q_gen);
u3z(boc);
return ret;
}
case c3__make: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mint_used();
{

View File

@ -570,6 +570,12 @@
u3z(vat);
return ret;
}
case c3__tune: p_gen = u3t(gen);
_mull_used();
{
return u3nc(u3qf_face(p_gen, sut), u3qf_face(p_gen, sut));
}
case c3__burn: p_gen = u3t(gen);
_mull_used();
@ -614,6 +620,19 @@
return ret;
}
case c3__use: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mull_used();
{
u3_noun boc = u3qfu_busk(van, sut, p_gen);
u3_noun nuf = u3qfu_busk(van, dox, p_gen);
u3_noun ret = _mull_in(van, boc, gol, nuf, q_gen);
u3z(boc);
u3z(nuf);
return ret;
}
case c3__make: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mull_used();
{

View File

@ -83,7 +83,7 @@
u3_atom lat = u3qc_mas(axe);
if ( 3 == now ) {
u3_noun pec = u3qfu_perk(van, sut, way, pq_sut);
u3_noun pec = u3qfu_peel(van, sut, way, pq_sut);
u3_noun sam = u3h(pec);
u3_noun con = u3t(pec);

View File

@ -1,4 +1,4 @@
/* j/6/ut_perk.c
/* j/6/ut_peel.c
**
*/
#include "all.h"
@ -7,7 +7,7 @@
/* logic
*/
u3_noun
_cqfu_perk(u3_noun van,
_cqfu_peel(u3_noun van,
u3_noun sut,
u3_noun way,
u3_noun met)
@ -28,7 +28,7 @@
/* boilerplate
*/
u3_noun
u3wfu_perk(u3_noun cor)
u3wfu_peel(u3_noun cor)
{
u3_noun sut, way, met, van;
@ -40,16 +40,16 @@
{
return u3m_bail(c3__fail);
} else {
return _cqfu_perk(van, sut, way, met);
return _cqfu_peel(van, sut, way, met);
}
}
u3_noun
u3qfu_perk(u3_noun van,
u3qfu_peel(u3_noun van,
u3_noun sut,
u3_noun way,
u3_noun met)
{
return _cqfu_perk(van, sut, way, met);
return _cqfu_peel(van, sut, way, met);
}

View File

@ -351,6 +351,12 @@
return ret;
}
case c3__tune: p_gen = u3t(gen);
_play_used();
{
return u3qf_face(p_gen, sut);
}
case c3__burn: p_gen = u3t(gen);
_play_used();
{
@ -383,6 +389,16 @@
return ret;
}
case c3__use: u3x_cell(u3t(gen), &p_gen, &q_gen);
_play_used();
{
u3_noun boc = u3qfu_busk(van, sut, p_gen);
u3_noun ret = _play_x(van, boc, q_gen);
u3z(boc);
return ret;
}
case c3__make: u3x_cell(u3t(gen), &p_gen, &q_gen);
_play_used();
{

File diff suppressed because it is too large Load Diff

View File

@ -770,7 +770,7 @@ _cj_mine(u3_noun cey, u3_noun cor)
#if 0
u3m_p("new jet", bal);
fprintf(stderr, " bat %x, jax %d\r\n", u3r_mug(bat), jax_l);
// fprintf(stderr, " bat %x, jax %d\r\n", u3r_mug(bat), jax_l);
#endif
u3h_put(u3R->jed.har_p,

View File

@ -1144,8 +1144,8 @@ u3m_grab(u3_noun som, ...) // terminate with u3_none
*/
u3_noun
u3m_soft(c3_w sec_w,
u3_funk fun_f,
u3_noun arg)
u3_funk fun_f,
u3_noun arg)
{
u3_noun why;
@ -1497,10 +1497,12 @@ _cm_init(c3_o chk_o)
}
}
/* _boot_home(): create ship directory. */
/* _boot_home(): create ship directory.
*/
static void
_boot_home(c3_c *dir_c, c3_c *pil_c)
_boot_home(c3_o mad_o, c3_c *dir_c, c3_c *pil_c)
{
c3_c* nam_c = _(mad_o) ? "events.pill" : "urbit.pill";
c3_c ful_c[2048];
/* Create subdirectories. */
@ -1524,7 +1526,7 @@ _boot_home(c3_c *dir_c, c3_c *pil_c)
{
{
struct stat s;
snprintf(ful_c, 2048, "%s/.urb/urbit.pill", dir_c);
snprintf(ful_c, 2048, "%s/.urb/%s", dir_c, nam_c);
if ( stat(ful_c, &s) == 0 ) {
/* we're in a "logical boot". awful hack, but bail here */
printf("%s confirmed to exist\r\n", ful_c);
@ -1532,8 +1534,8 @@ _boot_home(c3_c *dir_c, c3_c *pil_c)
}
}
if ( pil_c != 0 ) {
snprintf(ful_c, 2048, "cp %s %s/.urb/urbit.pill",
pil_c, dir_c);
snprintf(ful_c, 2048, "cp %s %s/.urb/%s",
pil_c, dir_c, nam_c);
printf("%s\r\n", ful_c);
if ( 0 != system(ful_c) ) {
fprintf(stderr, "could not %s\n", ful_c);
@ -1545,7 +1547,7 @@ _boot_home(c3_c *dir_c, c3_c *pil_c)
CURLcode result;
FILE *file;
snprintf(ful_c, 2048, "%s/.urb/urbit.pill", dir_c);
snprintf(ful_c, 2048, "%s/.urb/%s", dir_c, nam_c);
printf("fetching %s to %s\r\n", url_c, ful_c);
if ( !(curl = curl_easy_init()) ) {
fprintf(stderr, "failed to initialize libcurl\n");
@ -1560,8 +1562,10 @@ _boot_home(c3_c *dir_c, c3_c *pil_c)
result = curl_easy_perform(curl);
fclose(file);
if ( result != CURLE_OK ) {
fprintf(stderr, "failed to fetch %s: %s\n", url_c, curl_easy_strerror(result));
fprintf(stderr, "please fetch it manually and specify the location with -B\n");
fprintf(stderr, "failed to fetch %s: %s\n",
url_c,
curl_easy_strerror(result));
fprintf(stderr, "please fetch it by hand, then run -B $filename\n");
exit(1);
}
curl_easy_cleanup(curl);
@ -1572,7 +1576,7 @@ _boot_home(c3_c *dir_c, c3_c *pil_c)
/* u3m_boot(): start the u3 system.
*/
void
u3m_boot(c3_o nuu_o, c3_o bug_o, c3_c* dir_c, c3_c *pil_c)
u3m_boot(c3_o nuu_o, c3_o bug_o, c3_o mad_o, c3_c* dir_c, c3_c *pil_c)
{
/* Activate the loom.
*/
@ -1599,14 +1603,23 @@ u3m_boot(c3_o nuu_o, c3_o bug_o, c3_c* dir_c, c3_c *pil_c)
if ( _(nuu_o) ) {
c3_c ful_c[2048];
_boot_home(dir_c, pil_c);
_boot_home(mad_o, dir_c, pil_c);
snprintf(ful_c, 2048, "%s/.urb/urbit.pill", dir_c);
if ( _(mad_o) ) {
snprintf(ful_c, 2048, "%s/.urb/events.pill", dir_c);
printf("boot: loading %s\r\n", ful_c);
u3v_make(ful_c);
printf("boot: loading %s\r\n", ful_c);
u3v_boot(ful_c);
}
else {
snprintf(ful_c, 2048, "%s/.urb/urbit.pill", dir_c);
printf("boot: loading %s\r\n", ful_c);
u3v_make(ful_c);
u3v_jack();
}
u3v_jack();
}
else {
u3v_hose();

View File

@ -93,6 +93,14 @@ _n_hint(u3_noun zep,
return _n_nock_on(bus, nex);
}
case c3__shiv: {
u3t_off(noc_o);
u3t_shiv(hod);
u3t_on(noc_o);
return _n_nock_on(bus, nex);
}
case c3__germ: {
u3_noun pro = _n_nock_on(bus, nex);

View File

@ -590,51 +590,66 @@ _sang_x(u3_noun a, u3_noun b)
static void
_sung_one(u3_noun* a, u3_noun* b)
{
if ( *a == *b ) {
return;
}
else {
c3_o asr_o = u3a_is_senior(u3R, *a);
c3_o bsr_o = u3a_is_senior(u3R, *b);
if ( _(asr_o) && _(bsr_o) ) {
// You shouldn't have let this happen. We don't want to
// descend down to a lower road and free there, because
// synchronization - though this could be revisited under
// certain circumstances.
} else {
u3_road* rod_u = u3R;
while ( 1 ) {
//
return;
}
if ( _(asr_o) && !_(bsr_o) ){
u3z(*b);
*b = *a;
}
if ( _(bsr_o) && !_(asr_o) ) {
u3z(*a);
*a = *b;
}
if ( u3a_is_north(u3R) ) {
if ( *a <= *b ) {
u3k(*a);
u3z(*b);
*b = *a;
} else {
u3k(*b);
u3z(*a);
*a = *b;
}
}
else {
if ( *a >= *b ) {
u3k(*a);
u3z(*b);
*b = *a;
} else {
u3k(*b);
u3z(*a);
*a = *b;
// we can't perform this kind of butchery on the home road,
// where asynchronous things can allocate.
//
if ( u3R == &u3H->rod_u ) {
break;
}
else {
c3_o asr_o = u3a_is_senior(u3R, *a);
c3_o bsr_o = u3a_is_senior(u3R, *b);
if ( _(asr_o) && _(bsr_o) ) {
//
// both are senior, so we address them on a higher road
// if possible.
//
u3R = u3to(u3_road, u3R->par_p);
continue;
}
if ( _(asr_o) && !_(bsr_o) ){
u3z(*b);
*b = *a;
}
if ( _(bsr_o) && !_(asr_o) ) {
u3z(*a);
*a = *b;
}
if ( u3a_is_north(u3R) ) {
if ( *a <= *b ) {
u3k(*a);
u3z(*b);
*b = *a;
} else {
u3k(*b);
u3z(*a);
*a = *b;
}
}
else {
if ( *a >= *b ) {
u3k(*a);
u3z(*b);
*b = *a;
} else {
u3k(*b);
u3z(*a);
*a = *b;
}
}
break;
}
}
u3R = rod_u;
}
}
@ -838,6 +853,13 @@ u3r_sing(u3_noun a, u3_noun b)
c3_o
u3r_sung(u3_noun a, u3_noun b)
{
if ( a == b ) { return c3y; }
#if 0
if ( u3r_mug(a) == u3r_mug(b) ) {
fprintf(stderr, "collision on %x: %x/%x\r\n", u3r_mug(a), a, b);
}
#endif
return _sung_x(a, b);
}

View File

@ -38,32 +38,54 @@ u3t_drop(void)
extern void
u3_lo_tank(c3_l tab_l, u3_noun tac);
/* u3t_slog(): print directly.
#ifdef GHETTO
/* _t_ghetto(): ghetto timelapse.
*/
void
u3t_slog(u3_noun hod)
_t_ghetto(void)
{
#ifdef GHETTO
static int old;
static struct timeval b4, f2, d0;
static c3_d b4_d;
c3_w ms_w;
if ( old ) {
gettimeofday(&f2, 0);
timersub(&f2, &b4, &d0);
ms_w = (d0.tv_sec * 1000) + (d0.tv_usec / 1000);
if (ms_w > 10) {
printf("%6d.%02dms ", ms_w, (int) (d0.tv_usec % 1000) / 10);
if (ms_w > 1) {
#if 0
printf("%6d.%02dms: %9d ",
ms_w, (int) (d0.tv_usec % 1000) / 10,
((int) (u3R->pro.nox_d - b4_d)));
#else
printf("%6d.%02dms ",
ms_w, (int) (d0.tv_usec % 1000) / 10);
#endif
gettimeofday(&b4, 0);
b4_d = u3R->pro.nox_d;
}
else {
printf(" ");
}
}
else gettimeofday(&b4, 0);
else {
gettimeofday(&b4, 0);
b4_d = u3R->pro.nox_d;
}
old = 1;
}
#endif
/* u3t_slog(): print directly.
*/
void
u3t_slog(u3_noun hod)
{
#ifdef GHETTO
_t_ghetto();
#endif
if ( c3y == u3du(hod) ) {
u3_noun pri = u3h(hod);
@ -77,6 +99,24 @@ u3t_slog(u3_noun hod)
u3z(hod);
}
/* u3t_shiv(): quick print.
*/
void
u3t_shiv(u3_noun hod)
{
#ifdef GHETTO
_t_ghetto();
#endif
if ( c3n == u3ud(hod) ) {
}
else {
c3_c *str_c = u3r_string(hod);
printf("%s\r\n", str_c);
free(str_c);
}
}
/* u3t_heck(): profile point.
*/
void

View File

@ -4,7 +4,6 @@
#include <stdio.h>
#include "all.h"
int WISH;
/* _cv_nock_wish(): call wish through hardcoded interface.
*/
static u3_noun
@ -12,10 +11,8 @@ _cv_nock_wish(u3_noun txt)
{
u3_noun fun, pro;
WISH = 1;
fun = u3n_nock_on(u3k(u3A->roc), u3k(u3x_at(20, u3A->roc)));
pro = u3n_slam_on(fun, txt);
WISH = 0;
return pro;
}
@ -33,6 +30,52 @@ u3v_make(c3_c* pas_c)
u3z(sys);
}
/* u3v_fire(): execute initial lifecycle.
*/
u3_noun
u3v_fire(u3_noun sys)
{
u3_noun fol = u3nt(2, u3nc(0, 3), u3nc(0, 2));
return u3n_nock_on(sys, fol);
}
/* u3v_load(): loading sequence.
*/
u3_noun
u3v_load(u3_noun pil)
{
u3_noun sys = u3ke_cue(pil);
u3_noun cor = u3v_fire(sys);
u3_noun pro;
pro = u3k(u3r_at(7, cor));
u3z(cor);
return pro;
}
/* u3v_boot(): correct bootstrap sequence.
*/
void
u3v_boot(c3_c* pas_c)
{
u3_noun pil = u3m_file(pas_c);
u3_noun pru = u3m_soft(0, u3v_load, pil);
if ( u3h(pru) != 0 ) {
fprintf(stderr, "boot failed\r\n");
exit(1);
}
fprintf(stderr, "final state %x\r\n", u3r_mug(u3t(pru)));
u3A->ken = 0;
u3A->roc = u3k(u3t(pru));
u3z(pru);
}
/* u3v_jack(): execute kernel formula to bind jets.
*/
void

View File

@ -327,7 +327,7 @@ _lo_tape(FILE* fil_u, u3_noun tep)
{
u3_noun tap = tep;
while ( u3_nul != tap ) {
while ( c3y == u3du(tap) ) {
c3_c car_c;
if ( u3h(tap) >= 127 ) {
@ -380,9 +380,24 @@ u3_lo_punt(c3_l tab_l, u3_noun tac)
// We are calling nock here, but hopefully need no protection.
//
while ( c3y == u3r_du(cat) ) {
u3_noun wol = u3dc("wash", u3nc(tab_l, col_l), u3k(u3h(cat)));
if ( 0 == u3A->roc ) {
u3_noun act = u3h(cat);
_lo_wall(wol);
if ( c3__leaf == u3h(act) ) {
FILE* fil_u = u3_term_io_hija();
_lo_tape(fil_u, u3k(u3t(act)));
putc(13, fil_u);
putc(10, fil_u);
u3_term_io_loja(0);
}
}
else {
u3_noun wol = u3dc("wash", u3nc(tab_l, col_l), u3k(u3h(cat)));
_lo_wall(wol);
}
cat = u3t(cat);
}
u3z(tac);

View File

@ -68,6 +68,7 @@ _main_getopt(c3_i argc, c3_c** argv)
u3_Host.ops_u.abo = c3n;
u3_Host.ops_u.bat = c3n;
u3_Host.ops_u.gab = c3n;
u3_Host.ops_u.mad = c3n;
u3_Host.ops_u.loh = c3n;
u3_Host.ops_u.dem = c3n;
u3_Host.ops_u.fog = c3n;
@ -82,7 +83,7 @@ _main_getopt(c3_i argc, c3_c** argv)
u3_Host.ops_u.rep = c3n;
u3_Host.ops_u.kno_w = DefaultKernel;
while ( (ch_i=getopt(argc, argv,"G:B:A:I:w:t:f:k:l:n:p:r:LabcdgqvxFMPDXR")) != -1 ) {
while ( (ch_i=getopt(argc, argv,"G:B:A:I:w:t:f:k:l:n:p:r:LabcdgmqvxFMPDXR")) != -1 ) {
switch ( ch_i ) {
case 'M': {
u3_Host.ops_u.mem = c3y;
@ -117,6 +118,10 @@ _main_getopt(c3_i argc, c3_c** argv)
u3_Host.ops_u.tex = c3y;
break;
}
case 'm': {
u3_Host.ops_u.mad = c3y;
break;
}
case 'X': {
u3_Host.ops_u.fog = c3y;
break;
@ -540,6 +545,7 @@ main(c3_i argc,
}
u3m_boot(u3_Host.ops_u.nuu,
u3_Host.ops_u.gab,
u3_Host.ops_u.mad,
u3_Host.dir_c,
u3_Host.ops_u.pil_c);

View File

@ -1566,9 +1566,6 @@ _raft_punk(u3_noun ovo)
#ifdef GHETTO
struct timeval b4, f2, d0;
gettimeofday(&b4, 0);
if( c3__belt != u3h(u3t(ovo)) ){
uL(fprintf(uH, "%%soft %s\n", txt_c));
}
#endif
gon = u3m_soft(sec_w, u3v_poke, u3k(ovo));
@ -1582,7 +1579,7 @@ _raft_punk(u3_noun ovo)
ms_w = (d0.tv_sec * 1000) + (d0.tv_usec / 1000);
clr_w = ms_w > 1000 ? 1 : ms_w < 100 ? 2 : 3; // red, green, yellow
if(c3__belt != u3h(u3t(ovo)) || clr_w != 2){
uL(fprintf(uH, "\x1b[3%dm%%punk %s %4d.%02dms\x1b[0m\n",
uL(fprintf(uH, "\x1b[3%dm%%%s %4d.%02dms\x1b[0m\n",
clr_w, txt_c, ms_w, (int) (d0.tv_usec % 1000) / 10));
}
free(txt_c);
@ -1660,7 +1657,26 @@ _raft_push(u3_raft* raf_u, c3_w* bob_w, c3_w len_w)
if ( 1 == raf_u->pop_w ) {
c3_assert(u3_raty_lead == raf_u->typ_e);
#ifdef GHETTO
struct timeval b4, f2, d0;
gettimeofday(&b4, 0);
#endif
raf_u->ent_d = u3_sist_pack(raf_u->tem_w, c3__ov, bob_w, len_w);
#ifdef GHETTO
c3_w ms_w;
c3_w clr_w;
gettimeofday(&f2, 0);
timersub(&f2, &b4, &d0);
ms_w = (d0.tv_sec * 1000) + (d0.tv_usec / 1000);
clr_w = ms_w > 1000 ? 1 : ms_w < 100 ? 2 : 3; // red, green, yellow
uL(fprintf(uH, "\x1b[3%dm %4d.%02dms\x1b[0m\n",
clr_w, ms_w, (int) (d0.tv_usec % 1000) / 10));
#endif
raf_u->lat_w = raf_u->tem_w; // XX
if ( !uv_is_active((uv_handle_t*)&raf_u->tim_u) ) {
@ -2029,7 +2045,7 @@ u3_raft_work(void)
ron = u3ke_jam(u3nc(u3k(u3A->now), ovo));
c3_assert(u3A->key);
ron = u3dc("en:crua", u3k(u3A->key), ron);
ron = u3dc("en:crua:crypto:ames", u3k(u3A->key), ron);
len_w = u3r_met(5, ron);
bob_w = c3_malloc(len_w * 4L);

View File

@ -985,7 +985,7 @@ _sist_rest()
if ( u3A->key ) {
u3_noun dep;
dep = u3dc("de:crua", u3k(u3A->key), ron);
dep = u3dc("de:crua:crypto:ames", u3k(u3A->key), ron);
if ( c3n == u3du(dep) ) {
uL(fprintf(uH, "record (%s) is corrupt (k)\n", ful_c));
u3_lo_bail();