Commit Graph

122 Commits

Author SHA1 Message Date
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
Kartik K. Agaram 158b53eb8f first attempt doesn't work
I was aware of some complications. The various indexes and y coordinates
in the trace's cache would be unstable and need to be recomputed. But it's
surprising that the trace _completely disappears_.
2021-05-30 09:23:36 -07:00
Kartik K. Agaram 1496548287 start progressively increasing trace depth
The goal: the sandbox initially maintains a shallow trace. As you expand
into the trace, the environment reruns the sandbox at greater depth as
needed.

The challenge: expanding happens within edit-trace, which doesn't have
the whole sandbox needed to re-run the sandbox. We'll either need to expand
the trace's capabilities to include the whole sandbox, or duplicate some
logic to decide when to run the sandbox.
2021-05-30 08:51:58 -07:00
Kartik K. Agaram 7fa0163941 disable ctrl-s when browsing trace
We're soon going to be dynamically rerunning the sandbox in other ways
when browsing the trace.
2021-05-23 22:18:51 -07:00
Kartik K. Agaram d3103378c5 . 2021-05-23 22:17:05 -07:00
Kartik K. Agaram 7a04c8104d shell: reduce trace depth in sandbox
We'll gradually make this more dynamic.
2021-05-22 10:28:21 -07:00
Kartik K. Agaram e2ab1b30b1 disallow null traces
We now use traces everywhere for error-checking. Null traces introduce
the possibility of changing a functions error response, and therefore its
semantics.
2021-05-19 20:56:37 -07:00
Kartik K. Agaram ec2dab7801 shell: traces track a maximum depth to record 2021-05-19 01:26:25 -07:00
Kartik K. Agaram 837926751a shell: add a lot of error-checking 2021-05-18 20:01:11 -07:00
Kartik K. Agaram 19dd573a92 . 2021-05-07 20:02:01 -07:00