Commit Graph

131 Commits

Author SHA1 Message Date
Kartik K. Agaram d253a31828 rename grapheme to code-point-utf8
Longer name, but it doesn't lie. We have no data structure right now for
combining multiple code points. And it makes no sense for the notion of
a grapheme to conflate its Unicode encoding.
2021-11-09 08:12:11 -08:00
Kartik K. Agaram 6e05a8fa27 fix bad terminology: grapheme -> code point
Unix text-mode terminals transparently support utf-8 these days, and so
I treat utf-8 sequences (which I call graphemes in Mu) as fundamental.

I then blindly carried over this state of affairs to bare-metal Mu,
where it makes no sense. If you don't have a terminal handling
font-rendering for you, fonts are most often indexed by code points and
not utf-8 sequences.
2021-08-29 22:20:09 -07:00
Kartik K. Agaram bc859a7ca4 . 2021-08-28 22:57:22 -07:00
Kartik K. Agaram 4692c48f40 better error handling on stray commas 2021-08-01 18:26:35 -07:00
Kartik K. Agaram fc951149a0 shell: support loading 128x128px images
I'm loading them in uncompressed ASCII format, and all streams and gap
buffers all over the place need to get massively scaled up to 256KB
capacity. But the tests don't yet run out of RAM, so I'll keep going.
2021-07-28 23:58:46 -07:00
Kartik K. Agaram c8fb6d6aca clean up final abort in macroexpand 2021-06-30 20:43:34 -07:00
Kartik K. Agaram 6a65f6f233 one more bug, and documentation for infix
One error message gets a bit worse.
2021-06-23 10:06:57 -07:00
Kartik K. Agaram 74d6a4d382 . 2021-06-21 22:02:47 -07:00
Kartik K. Agaram 9ae724e1ec preserve indentation of the sandbox 2021-06-20 23:07:23 -07:00
Kartik K. Agaram 29795a0db4 start emitting indent tokens 2021-06-18 21:42:01 -07:00
Kartik K. Agaram 6280749410 always print black pixels when rendering screens
This is an old 'optimization' that turns out to not actually matter.
2021-06-15 15:37:37 -07:00
Kartik K. Agaram c2c6f4c7ab flickerlessly render fake screens in environment
Font rendering now happens off the real screen, which provides the effect
of double-buffering.

Apps can now also use convert-graphemes-to-pixels for more traditional
double-buffering.
2021-06-15 10:33:18 -07:00
Kartik K. Agaram 0dda332ce3 .
Roll back to commit 70919b45f0. Recent commits add lots of extra function
args for dubious benefit.
2021-06-12 21:11:22 -07:00
Kartik K. Agaram 82fdf176c1 snapshot
Looks like what's slowing down screen rendering is in fact _font_ rendering.
2021-06-12 21:11:03 -07:00
Kartik K. Agaram 85bcf050e7 . 2021-06-12 17:50:30 -07:00
Kartik K. Agaram 9b5b3bccd1 trying to eliminate flicker when rendering screen
Two interesting things:
- We don't really need double-buffering for rendering the screen on the
  sandbox as a progress indicator. Everything else is untouched, and render-screen
  should be doing that as well.

- Rendering just pixels of the fake screen is buttery smooth. It's the
  _graphemes_ that are slowing things down. Even though there's so many
  fewer of them!

As a result, drawing the fake screen less frequently in `evaluate` doesn't
actually help with flicker. Even though it'll make the debug cycle shorter.
So my current plan is to attack flicker in isolation before I mess with
the render frequency.

In this commit I optimized away the cursor handling. Still doesn't seem
to be helping. In fact it actually seems _worse_.
2021-06-12 17:40:53 -07:00
Kartik K. Agaram 286819685e eliminate some implicit writes to real screen 2021-06-12 16:24:27 -07:00
Kartik K. Agaram 70919b45f0 .
Rename cells containing screens to screen vars because of the ambiguity
that each grapheme in fake screens is represented by a type screen-cell.
While we're at it, we also analogously rename keyboard vars.
2021-06-12 15:16:50 -07:00
Kartik K. Agaram 4bd1785c86 shell: larger fake screen 2021-06-12 10:46:28 -07:00
Kartik K. Agaram 4de136fb85 . 2021-06-11 17:50:34 -07:00
Kartik K. Agaram 177fa96a93 . 2021-06-11 17:48:12 -07:00
Kartik K. Agaram c6e3bce981 . 2021-06-11 17:37:28 -07:00
Kartik K. Agaram 14f00ab369 . 2021-06-11 17:34:45 -07:00
Kartik K. Agaram d5ae556a0c . 2021-06-11 17:31:29 -07:00
Kartik K. Agaram 9487b2dde7 . 2021-06-11 17:19:48 -07:00
Kartik K. Agaram f8c5b63cb9 . 2021-06-11 17:17:13 -07:00
Kartik K. Agaram 3e32a1b808 . 2021-06-09 21:52:07 -07:00
Kartik K. Agaram eb8260b227 . 2021-06-09 21:38:30 -07:00
Kartik K. Agaram a2d4e41583 . 2021-06-09 21:28:45 -07:00
Kartik K. Agaram 117229ae17 . 2021-06-09 21:21:47 -07:00
Kartik K. Agaram be9fa3780a .
Add argument to a few functions.
2021-06-09 21:05:29 -07:00
Kartik K. Agaram 139620e3d2 shell: function modal now also creates functions 2021-06-08 20:47:07 -07:00
Kartik K. Agaram 67aeff8934 .
I wrote a comment about how some code was not covered by tests, and then
promptly forgot what it was for. This is why we need tests.

Now the hack is gone.
2021-06-08 15:06:08 -07:00
Kartik K. Agaram 8014210316 shell: support negative integer literals
We still don't support _any_ fractional literals, positive or negative.
2021-06-06 12:39:03 -07:00
Kartik K. Agaram c4cf38773f more space for definitions 2021-06-06 10:54:50 -07:00
Kartik K. Agaram 1f05bdcc34 conditionally display cursor in sandbox 2021-06-04 21:47:53 -07:00
Kartik K. Agaram 846664c4dd . 2021-06-04 20:15:11 -07:00
Kartik K. Agaram 6f7846ebc4 .
Menu shortcut for jumping to function definition.
2021-06-04 20:13:13 -07:00
Kartik K. Agaram f47051ae57 . 2021-06-04 20:08:29 -07:00
Kartik K. Agaram cd4d0ae5b6 .
Keep hotkeys stable when different elements are in focus.
2021-06-04 20:07:10 -07:00
Kartik K. Agaram 81b3f72fb8 . 2021-06-04 19:58:20 -07:00
Kartik K. Agaram 4bb826b40e . 2021-06-03 20:55:42 -07:00
Kartik K. Agaram b9ad848cff . 2021-06-03 14:49:49 -07:00
Kartik K. Agaram 63cd30d806 . 2021-06-03 14:42:07 -07:00
Kartik K. Agaram bd49d5c35c shell: more stable trace when rerunning 2021-06-02 23:57:23 -07:00
Kartik K. Agaram ee536ff3e8 . 2021-05-31 15:18:25 -07:00
Kartik K. Agaram 35e0613849 shell: raise errors when loading code on boot 2021-05-30 19:12:20 -07:00
Kartik K. Agaram 067fa9c725 bugfix: unbound variables were not raising error
Since we switched error trace semantics from a designated label to a designated
depth (commit 9831a8cef9 on May 19).
2021-05-30 18:02:40 -07:00
Kartik K. Agaram cde14438e0 first test re-running sandbox with a deeper trace 2021-05-30 16:38:20 -07:00
Kartik K. Agaram 46009cd1bb . 2021-05-30 10:13:53 -07:00