Commit Graph

8813 Commits

Author SHA1 Message Date
Kartik K. Agaram
791a71e27e fix a long-standing bug in Mu's translator
While all test pass, this change is disquieting. When I first designed
Mu I deliberately chose to exclude literal strings from most primitive
instructions both for type-checking and to avoid silently passing
through strange constructions. Nobody really needs to add a string to a
number, and am I sure no SubX instruction will cause a memory safety
issue when passed a string literal instead of a number?

But clearly I have no tests encoding this desire. And any string literal
could be replaced by an integer literal containing the exact same value,
so what are we protecting against anyway.

Let me fix the bug for now. If I run into problems I'll come back and do
this right.
2021-08-22 22:10:02 -07:00
Kartik K. Agaram
ba4a3c5be7 start throwing error on labels too far for /disp8
While I'm doing this I might as well lay out a story I don't seem to
have told before in this commit log.

I translated Mu programs to Linux before I did so to bare metal like I
do in the top-level these days. The translator programs still run from
the linux/ directory. However they don't always have good error
messages. As long as I was translating to Linux this wasn't a huge deal
because I always translated Mu programs using the bootstrap translator
in linux/bootstrap/ -- which has great error messages. However,
linux/bootstrap/ can't build bare-metal programs because boot.subx uses
real-mode instructions that aren't supported. As a hack I created a
script called misc_checks that at least tries to run everything besides
boot.subx -- even though translation can never succeed. If I run it and
get to errors about unknown variables I know everything besides
boot.subx raised no errors.

Having labels too far in /disp8 args is is the single biggest reason we
need the misc_checks hack. Hopefully it's now obsolete.
2021-08-22 21:40:03 -07:00
Kartik K. Agaram
5c26d765c7 . 2021-08-22 21:24:36 -07:00
Kartik K. Agaram
827dd4a7fe start throwing error on duplicate label
One less error that's only in the bootstrap phase.

On the other hand, for simplicity I got rid of the ability to override
the Entry label. One less special case, but we're also going further
from the ability to run subsets of layers. We haven't really been
exercising it for a long time, though (commit 7842, March 2021 when we
made baremetal the default).
2021-08-22 21:09:28 -07:00
Kartik K. Agaram
b41aed4a9a . 2021-08-22 20:24:37 -07:00
Kartik Agaram
52e3ea8a4b . 2021-08-15 23:44:43 -07:00
Kartik K. Agaram
8765064d69 move gap buffer code to top-level
Now that it's been used in a second app without needing any changes.
2021-08-15 21:09:17 -07:00
Kartik K. Agaram
412a68d0c1 minimize repaints when navigating between channels 2021-08-15 04:24:36 -07:00
Kartik K. Agaram
7282b475ae . 2021-08-15 04:22:57 -07:00
Kartik K. Agaram
31ef51d92a correct menu when first entering search mode
Test required.
2021-08-15 04:22:57 -07:00
Kartik K. Agaram
553d2ffc8e .
Make it more obvious that we always do a full repaint if dirty is set.
2021-08-15 04:22:57 -07:00
Kartik K. Agaram
8086b7b603 keep cursor stable when switching to thread view
Test required.
2021-08-15 04:02:42 -07:00
Kartik K. Agaram
6684112972 missing code: selecting a thread in channel view
Test required. And a clean fixture.
2021-08-15 04:02:23 -07:00
Kartik K. Agaram
7d3f2722ff no, we can't just sort lines in the slack archive
Comments contain indices back to the parent. Reordering items completely
messes up the indices.
2021-08-14 19:56:09 -07:00
Kartik K. Agaram
ef3881ab5a slack: navigation for thread screens 2021-08-14 18:29:15 -07:00
Kartik K. Agaram
bfe3a175be slack: quick 'n' dirty thread screen 2021-08-14 18:02:57 -07:00
Kartik K. Agaram
a3ffd93c57 slack: data structures for single-thread view 2021-08-14 17:49:36 -07:00
Kartik K. Agaram
444da164b0 slack: ensure single cursor on screen at any time
This is worth a first test.
2021-08-14 17:20:52 -07:00
Kartik K. Agaram
6c46da31fb slack: delete intra-item cursor state
I don't actually have per-user feeds yet. Just drop the feature for now.
2021-08-14 16:53:14 -07:00
Kartik K. Agaram
48afc51faf slack: menu options for browsing intra-item 2021-08-14 16:29:25 -07:00
Kartik K. Agaram
29b268c359 slack: hacky intra-item cursor
Pretty klunky that it's always on the topmost item. But it gets us
going.
2021-08-14 16:18:44 -07:00
Kartik K. Agaram
e531be4d0b slack: introduce state for intra-item cursor 2021-08-14 16:09:54 -07:00
Kartik K. Agaram
576bad403c slack: start rendering cursor on main pane 2021-08-14 15:49:40 -07:00
Kartik K. Agaram
e6f893811e . 2021-08-14 15:43:44 -07:00
Kartik K. Agaram
55cac9e7a9 slack: start building a cursor for the main pane
First step: switch to arrow keys for navigating by item.
2021-08-14 15:39:14 -07:00
Kartik K. Agaram
6706c69407 . 2021-08-14 15:32:04 -07:00
Kartik K. Agaram
aaf9984039 bug: allow '/' in search 2021-08-14 08:18:30 -07:00
Kartik K. Agaram
fc7eb937f3 bug in reusing tabs 2021-08-14 08:16:17 -07:00
Kartik K. Agaram
3b1017dae5 .
Bug in channel view.
2021-08-13 23:06:46 -07:00
Kartik K. Agaram
82a223f58f slack: search cursor handling 2021-08-13 22:53:52 -07:00
Kartik K. Agaram
41b4966961 slack: notify when too many results 2021-08-13 22:53:52 -07:00
Kartik K. Agaram
a3559ebcc3 slack: degrade gracefully when too many results 2021-08-13 22:42:47 -07:00
Kartik K. Agaram
c02d45e8d4 slack: escaping from search dialog 2021-08-13 22:11:31 -07:00
Kartik K. Agaram
29361ac54e slack: more responsive typing 2021-08-13 22:11:11 -07:00
Kartik K. Agaram
daedeb44fd slack: scrolling in search screens 2021-08-13 21:38:44 -07:00
Kartik K. Agaram
75927f3034 . 2021-08-13 21:22:50 -07:00
Kartik K. Agaram
4bf781e86d slack: search 2021-08-13 21:22:25 -07:00
Kartik K. Agaram
3aea1483c9 . 2021-08-13 21:10:59 -07:00
Kartik K. Agaram
7465f6867b this might explain the bug
I think I was just typing with the the status bar outside the display
when it seemed to work. Easy to forget to hit '/' at the start.
Particularly if it seems to work fine.
2021-08-13 20:57:27 -07:00
Kartik K. Agaram
8773d07278 . 2021-08-13 18:44:14 -07:00
Kartik K. Agaram
f7087904c0 start saving and restoring search terms with tabs 2021-08-13 18:22:14 -07:00
Kartik K. Agaram
baf6c7545f disquieting bug: typing search terms is unreliable 2021-08-13 18:00:59 -07:00
Kartik K. Agaram
d5f9329b65 slack: UI flow for search
Everything works, I think, _except_ actually performing the search.
2021-08-13 17:48:38 -07:00
Kartik K. Agaram
234039e34d . 2021-08-13 17:14:36 -07:00
Kartik K. Agaram
d626043a2d . 2021-08-13 16:58:01 -07:00
Kartik K. Agaram
028b7aa783 slack: esc to go back to previous screen 2021-08-13 16:54:58 -07:00
Kartik K. Agaram
1f8341fdd6 slack: use tab to bounce between channels 2021-08-13 16:44:08 -07:00
Kartik K. Agaram
1da16ed6c3 slack: page-up on channel screen 2021-08-13 15:43:35 -07:00
Kartik K. Agaram
ae01fd8c70 slack: page-down on channel screen 2021-08-13 15:24:30 -07:00
Kartik K. Agaram
cd6a049f62 slack: restructure page-down handler 2021-08-13 14:38:38 -07:00