From 776de8b3d962a8884795870bdbe2b4d65d606f37 Mon Sep 17 00:00:00 2001 From: fang Date: Sun, 20 Dec 2020 13:40:29 +0100 Subject: [PATCH] lull: make dill-blit explicit superset of blit Likewise for belt. This necessitates renaming the %mor blit for newlines to %nel, making this require a new runtime version. That's fine, more breaking changes are to follow. --- pkg/arvo/lib/hood/drum.hoon | 10 +++------ pkg/arvo/mar/blit.hoon | 2 +- pkg/arvo/sys/lull.hoon | 26 ++++++---------------- pkg/arvo/sys/vane/dill.hoon | 4 ++-- pkg/interface/src/views/apps/term/store.js | 2 +- pkg/urbit/include/c/motes.h | 1 + pkg/urbit/vere/io/term.c | 2 +- 7 files changed, 16 insertions(+), 31 deletions(-) diff --git a/pkg/arvo/lib/hood/drum.hoon b/pkg/arvo/lib/hood/drum.hoon index e3c33eda90..801b8559d6 100644 --- a/pkg/arvo/lib/hood/drum.hoon +++ b/pkg/arvo/lib/hood/drum.hoon @@ -725,7 +725,7 @@ (ta-hom %del (dec pos.inp)) :: ++ ta-ctl :: hear control - |= key=@ud + |= key=@c ^+ +> =. ris ?.(?=(?(%g %r) key) ~ ris) ?+ key ta-bel @@ -790,11 +790,10 @@ ++ ta-fec :: apply effect |= fec=sole-effect ^+ +> - ?- fec + ?+ fec +>(..ta (se-blit fec)) [%bel *] ta-bel [%blk *] +> [%bye *] +>(..ta (se-klin gyl)) - [%clr *] +>(..ta (se-blit fec)) [%det *] (ta-got +.fec) [%err *] (ta-err p.fec) [%klr *] +>(..ta (se-blit %klr (make:klr p.fec))) @@ -805,10 +804,7 @@ [%pro *] (ta-pro +.fec) [%tab *] +>(..ta (se-tab p.fec)) [%tan *] +>(..ta (se-dump p.fec)) - [%sag *] +>(..ta (se-blit fec)) - [%sav *] +>(..ta (se-blit fec)) [%txt *] +>(..ta (se-text p.fec)) - [%url *] +>(..ta (se-blit fec)) == :: ++ ta-dog :: change cursor @@ -878,7 +874,7 @@ == :: ++ ta-met :: meta key - |= key=@ud + |= key=@c ^+ +> =. ris ~ ?+ key ta-bel diff --git a/pkg/arvo/mar/blit.hoon b/pkg/arvo/mar/blit.hoon index 4c23c5705e..b50c0fa7d7 100644 --- a/pkg/arvo/mar/blit.hoon +++ b/pkg/arvo/mar/blit.hoon @@ -22,7 +22,7 @@ %clr b+& %hop (numb p.blit) %lin a+(turn p.blit |=(c=@c s+(tuft c))) - %mor b+& + %nel b+& %url s+p.blit :: %sag diff --git a/pkg/arvo/sys/lull.hoon b/pkg/arvo/sys/lull.hoon index 92f45dfa2a..76af8fd43b 100644 --- a/pkg/arvo/sys/lull.hoon +++ b/pkg/arvo/sys/lull.hoon @@ -1045,7 +1045,7 @@ :::: :: (1d2) :: +$ blew [p=@ud q=@ud] :: columns rows - +$ belt :: old belt + +$ belt :: outside belt $% [%aro p=?(%d %l %r %u)] :: arrow key [%bac ~] :: true backspace [%ctl p=@c] :: control-key @@ -1054,43 +1054,31 @@ [%ret ~] :: return [%txt p=(list @c)] :: utf32 text == :: - +$ blit :: old blit + +$ blit :: outside blit $% [%bel ~] :: make a noise [%clr ~] :: clear the screen [%hop p=@ud] :: set cursor position [%klr p=stub] :: set styled line [%lin p=(list @c)] :: set current line - [%mor ~] :: newline + [%nel ~] :: newline [%sag p=path q=*] :: save to jamfile [%sav p=path q=@] :: save to file [%url p=@t] :: activate url == :: - +$ dill-belt :: new belt - $% [%aro p=?(%d %l %r %u)] :: arrow key - [%bac ~] :: true backspace + +$ dill-belt :: inside belt + $% belt :: outside belt [%cru p=@tas q=(list tank)] :: echo error - [%ctl p=@] :: control-key - [%del ~] :: true delete [%hey ~] :: refresh - [%met p=@] :: meta-key - [%ret ~] :: return [%rez p=@ud q=@ud] :: resize, cols, rows - [%txt p=(list @c)] :: utf32 text [%yow p=gill:gall] :: connect to app == :: - +$ dill-blit :: new blit - $% [%bel ~] :: make a noise - [%clr ~] :: clear the screen - [%hop p=@ud] :: set cursor position - [%klr p=stub] :: styled text + +$ dill-blit :: inside blit + $% blit :: outside blit [%mor p=(list dill-blit)] :: multiple blits [%pom p=stub] :: styled prompt [%pro p=(list @c)] :: show as cursor+line [%qit ~] :: close console [%out p=(list @c)] :: send output line - [%sag p=path q=*] :: save to jamfile - [%sav p=path q=@] :: save to file - [%url p=@t] :: activate url == :: +$ flog :: sent to %dill $% [%crop p=@ud] :: trim kernel state diff --git a/pkg/arvo/sys/vane/dill.hoon b/pkg/arvo/sys/vane/dill.hoon index 4e08fc0e09..c30d581acf 100644 --- a/pkg/arvo/sys/vane/dill.hoon +++ b/pkg/arvo/sys/vane/dill.hoon @@ -169,14 +169,14 @@ ?: ?=(%out -.bit) %+ done %blit :~ [%lin p.bit] - [%mor ~] + [%nel ~] see [%hop pos] == ?: ?=(%klr -.bit) %+ done %blit :~ [%klr p.bit] - [%mor ~] + [%nel ~] see [%hop pos] == diff --git a/pkg/interface/src/views/apps/term/store.js b/pkg/interface/src/views/apps/term/store.js index ac74cafe2a..795f5bc463 100644 --- a/pkg/interface/src/views/apps/term/store.js +++ b/pkg/interface/src/views/apps/term/store.js @@ -63,7 +63,7 @@ export default class Store { this.state.lines[this.state.lines.length - 1] = blit; this.setState({ lines: this.state.lines }); break; - case 'mor': + case 'nel': this.state.lines.push(''); this.setState({ lines: this.state.lines }); break; diff --git a/pkg/urbit/include/c/motes.h b/pkg/urbit/include/c/motes.h index 240086ec9f..0ff014ec7c 100644 --- a/pkg/urbit/include/c/motes.h +++ b/pkg/urbit/include/c/motes.h @@ -770,6 +770,7 @@ # define c3__ne c3_s2('n','e') # define c3__need c3_s4('n','e','e','d') # define c3__neft c3_s4('n','e','f','t') +# define c3__nel c3_s3('n','e','l') # define c3__nest c3_s4('n','e','s','t') # define c3__netd c3_s4('n','e','t','d') # define c3__new c3_s3('n','e','w') diff --git a/pkg/urbit/vere/io/term.c b/pkg/urbit/vere/io/term.c index fe58abc32c..45ff0c809b 100644 --- a/pkg/urbit/vere/io/term.c +++ b/pkg/urbit/vere/io/term.c @@ -1405,7 +1405,7 @@ _term_ef_blit(u3_utty* uty_u, _term_it_show_tour(uty_u, u3k(u3t(blt))); } break; - case c3__mor: { + case c3__nel: { _term_it_show_more(uty_u); } break;