Commit Graph

302 Commits

Author SHA1 Message Date
Kartik Agaram
ccadba5b95 .
Until we get scrolling on functions, it's a little cleaner to draw the
primitives on top.
2021-05-31 20:40:08 -07:00
Kartik K. Agaram
7640a77c5f interrupt repl on keypress 2021-05-31 15:18:25 -07:00
Kartik K. Agaram
0c0541d709 . 2021-05-31 15:18:25 -07:00
Kartik K. Agaram
ee536ff3e8 . 2021-05-31 15:18:25 -07:00
Kartik K. Agaram
e3c7445330 clean up trace depth in a few places
It turns out the problem was that `and` wasn't cleaning up after itself
when it short-circuited evaluation. Similar problems in a couple more places.
2021-05-31 10:38:39 -07:00
Kartik K. Agaram
940401ff9e . 2021-05-31 10:19:38 -07:00
Kartik K. Agaram
0ea329da1f bugfix for disappearing trace
It turns out I have a problem with trace depth somewhere which I just wasn't
noticing before. Running certain sandboxes (line; maybe loops?) twice was
causing traces to no longer start at depth 1, which implies that they weren't
terminating at depth 1. This became a lot more obvious since I instituted
a max-depth.
2021-05-31 10:14:09 -07:00
Kartik K. Agaram
650f417de2 . 2021-05-31 08:59:09 -07:00
Kartik K. Agaram
3331144395 data.limg now loading properly again 2021-05-31 08:09:19 -07:00
Kartik K. Agaram
d2094133aa clearer test
It actually has nothing to do with macros. I just wasn't supporting backquotes
outside macros before.
2021-05-31 08:01:09 -07:00
Kartik K. Agaram
e9d2f00edb multi-macroexpanding backquote != nested backquote
This was quite difficult to diagnose. The issue I noticed was that brline
had stopped working. All the bugs in previous commits were hiding the cause.
Once I cleaned them up, I realized the problem was that the `(,x0 ,y0)
was triggering the nested-backquote check. The fix was fairly straightforward
then (even though I didn't yet understand why). But how to write a test
for this? I spent some time trying to do so without defining a macro using
literal macros, before I realized:

  You can't call literal macros; we don't have first-class macros.

Trying to insert literal macro support just breaks everything because we
have no way to distinguish between a literal macro call and the stage in
macroexpand where a symbol has been replaced with its macro definition.

How do you explain stuff like this? I grow weary of Lisp.

There's still some issue in loading the entire definition of brline from
data.limg.
2021-05-31 08:00:26 -07:00
Kartik K. Agaram
f691782d11 clean up a few things in macro tests 2021-05-31 07:24:51 -07:00
Kartik K. Agaram
af6fc79959 . 2021-05-30 21:52:31 -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
961ce67569 . 2021-05-30 17:20:42 -07:00
Kartik K. Agaram
4cc603deeb unconditionally trace errors
Now that we never have a null trace, tracing errors is always safe. And
now that we're running with low trace max-depth we're more likely to run
into problems with missing errors in the trace.
2021-05-30 17:15:21 -07:00
Kartik K. Agaram
b699982fb4 . 2021-05-30 16:45:38 -07:00
Kartik K. Agaram
40c6066324 . 2021-05-30 16:41:38 -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
9062eeb554 . 2021-05-29 21:45:33 -07:00
Kartik K. Agaram
10e41d00d8 . 2021-05-29 21:39:18 -07:00
Kartik K. Agaram
1eb74e2d5d shell: scrolling the trace 2021-05-29 20:52:57 -07:00
Kartik K. Agaram
9516dfa0b0 shell: skeleton for scrolling 2021-05-29 17:23:04 -07:00
Kartik K. Agaram
d85529f3fa cache visibility for all lines in trace
So far we were only doing so for the first few lines, just enough to render
one page's worth of lines. We'd have probably noticed if we collapsed some
lines after re-evaluating.
2021-05-29 17:13:06 -07:00
Kartik K. Agaram
fde296ca3c . 2021-05-29 17:03:22 -07:00
Kartik K. Agaram
58c801db0f . 2021-05-29 16:49:36 -07:00
Kartik K. Agaram
af46771821 . 2021-05-29 16:42:15 -07:00
Kartik K. Agaram
91ddc3a82d . 2021-05-29 16:41:47 -07:00
Kartik K. Agaram
c8b2424f45 shell: start implementing scrolling in the trace
I've been stymied for a week wondering how to reliably compute trace-line
identity. A trace can have multiple identical lines. Only some of them
may be visible at any point. How to remember which is which across re-evaluations?

There's no easy answer. I'm just going to keep things ad hoc. When you
re-evaluate, new lines can currently pop into visibility. However we guarantee
that just moving around the trace will be stable, thanks to the visible
bit being cached within each trace-line. Scrolling will be similar. Reevaluating
may cause the trace to be perturbed up or down. However, just scrolling
around will work reliably.
2021-05-29 16:37:32 -07:00
Kartik K. Agaram
4de6f80334 . 2021-05-29 16:25:38 -07:00
Kartik K. Agaram
9b131ce02b . 2021-05-29 16:22:08 -07:00
Kartik K. Agaram
7b84872380 shell: non-stream tokens are now small 2021-05-29 16:07:39 -07:00
Kartik K. Agaram
0bba6ccfc2 . 2021-05-29 16:04:30 -07:00
Kartik K. Agaram
aceb526b50 . 2021-05-29 16:01:50 -07:00
Kartik K. Agaram
c2e59bbf9d . 2021-05-29 16:00:59 -07:00
Kartik K. Agaram
6b212ed6e7 . 2021-05-29 15:54:41 -07:00
Kartik K. Agaram
d8f306c30c . 2021-05-29 15:53:31 -07:00
Kartik K. Agaram
2ad0a98f94 . 2021-05-29 15:53:21 -07:00
Kartik K. Agaram
56c621b6f1 shell: start reducing the waste in tokenize 2021-05-29 15:49:58 -07:00
Kartik K. Agaram
210553ac68 .
slightly improve colors
2021-05-23 22:53:54 -07:00
Kartik K. Agaram
bda55a3eec ctrl-s in trace: show entire current line 2021-05-23 22:47:40 -07:00
Kartik K. Agaram
f32e8035c7 . 2021-05-23 22:26:49 -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
d474128db1 shrink trace menu 2021-05-23 22:07:50 -07:00
Kartik K. Agaram
b2dd7e6a91 start truncating trace lines 2021-05-23 22:04:31 -07:00