Commit Graph

7688 Commits

Author SHA1 Message Date
Kartik K. Agaram
fdc3df0430 7788 2021-02-22 22:32:12 -08:00
Kartik K. Agaram
a4bc5df080 7787 - baremetal/shell: moving cursor into trace 2021-02-22 22:02:28 -08:00
Kartik K. Agaram
06e4b1be9b 7786 - baremetal/shell: render error messages 2021-02-22 21:25:30 -08:00
Kartik K. Agaram
2387a8fba4 7785 - baremetal/shell: trace primitives done
Rendering traces will be an ongoing journey.
2021-02-22 20:23:43 -08:00
Kartik K. Agaram
421ed4651f 7784 - baremetal/shell: start of trace 2021-02-22 19:46:23 -08:00
Kartik K. Agaram
5ddc9dfd9c 7783 - baremetal: no, delete trace stream
What we need in baremetal is subtly different. We need depths in each line.
Just rebuild it from scratch.
2021-02-22 19:02:56 -08:00
Kartik K. Agaram
90806a7587 7782 - baremetal: provide a trace stream 2021-02-22 12:59:57 -08:00
Kartik K. Agaram
588d6df651 7781 - baremetal/shell: tokenize numbers
We've now reached a point where we need to start thinking of error handling,
and tests for error handling. The top-level has `stop`, but that's really
just for working with Unix's exit(). Here we have the opportunity to bake
errors into the trace. Which might also be a good opportunity for fleshing
out the UX for the trace.
2021-02-21 22:49:39 -08:00
Kartik K. Agaram
e3f7765cb7 7780
Start trimming whitespace from the input.

It's probably a bad idea to rebuild all our primitives for gap buffers.
2021-02-21 22:28:35 -08:00
Kartik K. Agaram
87fe53e691 7779 2021-02-21 22:17:26 -08:00
Kartik K. Agaram
37e8e05721 7778 2021-02-21 22:10:19 -08:00
Kartik K. Agaram
210c48370a 7777
Same identity REPL, but now going through some symbol processing.
2021-02-21 22:08:13 -08:00
Kartik K. Agaram
19f93c7457 7776 2021-02-21 21:44:34 -08:00
Kartik K. Agaram
668bec391c 7775 2021-02-21 21:36:33 -08:00
Kartik K. Agaram
70def3209b 7774
YAGNI over premature optimization. Avoid unnecessary copies.
2021-02-21 21:30:57 -08:00
Kartik K. Agaram
61c47f6db6 7773 2021-02-21 21:27:42 -08:00
Kartik K. Agaram
8b8d0fc771 7772 2021-02-21 21:26:08 -08:00
Kartik K. Agaram
7e9e65eece 7771
We might not scan directly through the gap buffer after all. Premature
optimization?
2021-02-21 21:21:39 -08:00
Kartik K. Agaram
d7c7488398 7770 - baremetal/shell: scanning through gap buffer 2021-02-21 16:25:43 -08:00
Kartik K. Agaram
f173379a75 7769 2021-02-21 15:31:23 -08:00
Kartik K. Agaram
dbfbaafe1c 7768 - baremetal/shell: assume multi-line from the start 2021-02-21 14:32:46 -08:00
Kartik K. Agaram
995dc380c8 7767 - baremetal/shell: skeleton repl
Prints a fixed value for now, regardless of what is typed.
2021-02-21 12:32:57 -08:00
Kartik K. Agaram
e78f801e72 7766 2021-02-21 12:07:37 -08:00
Kartik K. Agaram
954fc11c18 7765 - baremetal: ctrl keys 2021-02-21 01:22:39 -08:00
Kartik K. Agaram
b21f1787a0 7764 2021-02-21 01:17:00 -08:00
Kartik K. Agaram
b70748960e 7763 - baremetal/shell: newline 2021-02-20 23:40:32 -08:00
Kartik K. Agaram
cf5c8bc6b0 7762 - baremetal/shell: backspace
The text buffer can now shrink, which means we need to be careful to erase
the old location of the cursor. Just clear screen before render each time.
Which means we need to be more efficient with our rendering.
2021-02-20 22:45:35 -08:00
Kartik K. Agaram
684c096203 7761 - baremetal/shell: read input from keyboard 2021-02-20 22:37:44 -08:00
Kartik K. Agaram
c7c8eb0cb4 7760
Some settings in my vimrc, now that I plan to move closer to Lisp:

  inoremap <buffer> [ (
  inoremap <buffer> ] )
  inoremap <buffer> ( [
  inoremap <buffer> ) ]
2021-02-20 22:37:08 -08:00
Kartik K. Agaram
4a37291e2d 7759 - changing course; delete the postfix shell
It might be too ambitious for an initial Mu system, and I also want to
watch my novelty budget. I also have great doubts about the ability of
this live-updating postfix system to scale to interesting programs. Conditionals,
loops, multi-line functions, all this requires further work.

Instead, I'm going to recenter around Mu's original goals:
  - saying no to most features
  - encouraging/teaching testing
  - traces as a unifying metaphor

In particular, instead of a live-updating system, the new debug loop will
be:
  - generate a trace
  - browse the trace
  - modify the program
  - generate a trace
  - ...

The only persistence we'll need here is a way to track what the programmer
has drilled into in the trace. That might have some commonalities with
the old system of expanded words.
2021-02-20 22:14:09 -08:00
Kartik K. Agaram
bcb2190ec3 7758
Just some temporary files before I blow them away.
2021-02-20 21:51:33 -08:00
Kartik K. Agaram
446a6704cb 7757 2021-02-19 02:39:22 -08:00
Kartik Agaram
3b1686b610 7756 2021-02-18 08:58:37 -08:00
Kartik Agaram
abb3e174b3 7755 2021-02-18 00:15:51 -08:00
Kartik Agaram
517a01c95a 7754 2021-02-17 23:48:59 -08:00
Kartik K. Agaram
e848f3688f 7753 2021-02-15 13:27:02 -08:00
Kartik K. Agaram
6aaeadfee8 7752 2021-02-15 13:21:28 -08:00
Kartik K. Agaram
d83dce3b98 7751 2021-02-15 13:17:50 -08:00
Kartik K. Agaram
f365875fa4 7750 2021-02-15 13:11:22 -08:00
Kartik K. Agaram
b15f1b73e8 7749
Forget about support for quitting for now. Quit by rebooting the computer
or VM.
2021-02-15 13:08:19 -08:00
Kartik K. Agaram
d6e2ba80dd 7748
Bug in code-size check.

It costs 18 bytes in the boot sector to load 2 tracks of disk (63KB). At
that rate I can load 6 more tracks before I need to perform the drudgery
again of recalculating offsets.
2021-02-15 12:54:38 -08:00
Kartik K. Agaram
1ec98d402b 7747 2021-02-15 12:47:48 -08:00
Kartik Agaram
74ed21ab14 7746 2021-02-14 16:48:02 -08:00
Kartik Agaram
8cff1c04e3 7745 2021-02-14 16:29:19 -08:00
Kartik K. Agaram
247fb5951a 7744 2021-02-14 15:20:02 -08:00
Kartik K. Agaram
72f9fdbd16 7743
First bugfix in baremetal/shell. Already it's much easier to debug.
2021-02-14 15:09:16 -08:00
Kartik K. Agaram
1010b50bb8 7742 - baremetal/shell is alive 2021-02-14 14:41:35 -08:00
Kartik K. Agaram
4961a020b4 7741 - baremetal/shell: first run: single number 2021-02-14 14:30:46 -08:00
Kartik K. Agaram
1a9d3cb7ef 7740 - baremetal/shell: eval and render line 2021-02-14 13:20:37 -08:00
Kartik K. Agaram
90a8d404af 7739 - baremetal/shell: first draft of loop
This is quite new and speculative. I tried to list out some potential future
tests later when we add 'return'. We'll see how it goes.
2021-02-14 00:05:12 -08:00