Commit Graph

238 Commits

Author SHA1 Message Date
Kartik K. Agaram c4475d83b7 shell: roll back a change to the 'when' macro
Introduced in commit 1adc904ef3 from a week ago, but it turns out brcircle
has been consistently broken ever since.
2021-05-15 12:43:35 -07:00
Kartik K. Agaram 183010779c A 'bowboard', a chessboard of rainbow circles
Compare with (chessboard screen 256)
2021-05-08 08:33:22 -07:00
Kartik K. Agaram 665b1e8f07 a full-circle rainbow 2021-05-08 07:58:56 -07:00
Kartik K. Agaram 1adc904ef3 new shell macro: do 2021-05-07 21:13:24 -07:00
Kartik K. Agaram 61a68452ae all apps working again after null get check 2021-05-07 20:40:42 -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 150db8d56a some boot-time heartbeat messages
This will help us with some common debug scenarios.
2021-05-07 12:27:20 -07:00
Kartik K. Agaram dd192dd52c . 2021-05-07 12:11:59 -07:00
Kartik K. Agaram e42ae8219e clean up all definitions 2021-05-07 12:08:07 -07:00
Kartik K. Agaram d605ba1f9a clean up chessboard
We still benefit from some helpers here because of the unrolling and multiple
calls to helpers.
2021-05-07 11:56:43 -07:00
Kartik K. Agaram d8298d1a2a clean up read_line 2021-05-07 11:37:48 -07:00
Kartik K. Agaram 91f76e6b22 clean up Bresenham line-drawing 2021-05-07 11:28:59 -07:00
Kartik K. Agaram 25eb9c580e . 2021-05-07 11:02:55 -07:00
Kartik K. Agaram 92fb55d50f no, we need hline1 for fill_rect 2021-05-07 10:14:51 -07:00
Kartik K. Agaram c651bbeffc clean up hline and vline 2021-05-07 10:05:20 -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 7105b73fd3 give up on nested backquotes for now 2021-05-07 09:22:54 -07:00
Kartik K. Agaram f791cd9da9 macros almost done
Just one case left: macros within unquote.
2021-05-06 22:09:30 -07:00
Kartik K. Agaram 57fd40d500 some more cases 2021-05-06 21:41:03 -07:00
Kartik K. Agaram a1cfadc749 first passing test for macroexpand
In the process I spent a long time tracking down a stray TODO in 108write.subx
that I thought would abort but didn't since the switch to baremetal.

Then after I reintroduced that assertion I had to go track down a bunch
of buffer sizes. Stream sizes continue to be a huge mess.
2021-05-06 21:38:02 -07:00
Kartik K. Agaram 7c8ad5a419 more paranoia in shell/globals.mu 2021-05-06 19:38:54 -07:00
Kartik K. Agaram edae464db5 shell: macroexpand outermost call 2021-05-06 18:13:27 -07:00
Kartik K. Agaram 1648a04cc0 literal macros
Current plan:
- some way to define macros. For now:
    (def f (litmac litfn () (a b) `(+ ,a , b)))
- macroexpand will expand calls by passing them through the cdr
    (f 3 4)
    macroexpand: ((litfn () (a b) `(+ ,a ,b)) 3 4)
      => (+ 3 4)
    eval: (+ 3 4) => 7
2021-05-06 17:29:51 -07:00
Kartik K. Agaram e9981404da . 2021-05-06 17:27:17 -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 a54c6f2ee7 belatedly migrate stale example definitions
Also bare-bones syntax highlighting for .limg files. Doesn't work when
.limg file is first file opened with Vim.
2021-05-06 16:42:08 -07:00
Kartik K. Agaram effbe423a7 . 2021-05-06 15:10:56 -07:00
Kartik K. Agaram ba5f556543 . 2021-05-04 20:20:03 -07:00
Kartik K. Agaram 5e0f459848 . 2021-05-04 20:09:07 -07:00
Kartik K. Agaram 0069028dae . 2021-05-04 20:00:03 -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 66c18fda1d shell: unquote splice 2021-05-04 04:28:04 -07:00
Kartik K. Agaram bb9f4e4e1d shell: unquote 2021-05-04 03:53:00 -07:00
Kartik K. Agaram de94891356 shell: start evaluating backquote 2021-05-03 21:01:50 -07:00
Kartik K. Agaram 1c69a13a88 . 2021-05-03 20:31:57 -07:00
Kartik K. Agaram a08658f218 . 2021-05-03 18:16:15 -07:00
Kartik K. Agaram 1048729a6e . 2021-05-03 17:31:19 -07:00
Kartik K. Agaram 93f1bee02c reading and printing backquotes and unquotes 2021-05-03 12:02:12 -07:00
Kartik K. Agaram 71a04056a8 printing quoted expressions 2021-05-02 22:31:19 -07:00
Kartik K. Agaram 27691024c4 . 2021-05-02 22:25:47 -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 c426cc0327 .
Clean up trace colors.
2021-05-01 15:49:48 -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
Kartik K. Agaram bf4c19f053 shell: squeeze menu 2021-04-30 00:00:55 -07:00
Kartik K. Agaram 3385febc11 shell: allow 'def' to overwrite 2021-04-29 23:53:28 -07:00