Commit Graph

112 Commits

Author SHA1 Message Date
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
Kartik K. Agaram
d3f17627d8 an often-overflowing stream when running brcircle
We really need to systematically check our trace streams.
2021-05-07 15:12:56 -07:00
Kartik K. Agaram
c5f50f05b7 . 2021-05-07 12:46:41 -07:00
Kartik K. Agaram
74be534e2b starting to implement first macros
Another commit, another bugfix.

Some snippets from my currently exploding todo list:

- always investigate lookup errors immediately. Beyond the root cause, they should never happen at the moment, while we aren't reclaiming memory.
  we should always return a more precise error message. Usually involving null pointer checks.

- on abort, print out stack trace
  - emit mapping of labels to addresses during survey
  - store a mapping of symbols somewhere in the code image

- stop allocating 1KB per token; expand space for tokens as needed
2021-05-07 09:49:16 -07:00
Kartik K. Agaram
6df53d463c back to macros; switch macroexpand to operate in place 2021-05-06 17:00:18 -07:00
Kartik K. Agaram
9156823c5d shell: start implementing macros 2021-05-04 19:49:21 -07:00
Kartik K. Agaram
7465fbb19f . 2021-05-04 19:46:49 -07:00
Kartik K. Agaram
83847e9f0a .
Clean up menus.
2021-05-01 16:20:44 -07:00
Kartik K. Agaram
d0e2d093f7 cleaner rendering of fake screens and keyboards
I don't understand why a second line in the keyboard is visible now where
it wasn't before. That whole aspect has unclear desires. What exactly do
I want to happen on newlines?
2021-05-01 16:12:49 -07:00
Kartik K. Agaram
719b6acf3d .
Use sandbox background in the top line on the right.
2021-05-01 15:54:02 -07:00
Kartik K. Agaram
2b616894fd move color scheme closer to Solarized dark
sed -i 's,0x12/bg=almost-black,0xdc/bg=green-bg,g' shell/*.mu
sed -i 's, 0/bg, 0xc5/bg=blue-bg,g' shell/*.mu
sed -i 's, 7/fg=trace, 0x38/fg=trace,g' shell/*.mu
sed -i 's, 7/bg=grey, 0x5c/bg=black,g' shell/*.mu

Still a few issues.

Thanks Adrian Cochrane and Zach DeCook.
  https://floss.social/@alcinnz/106152068473019933
  https://social.librem.one/@zachdecook/106159988837603417
2021-05-01 15:37:55 -07:00