Commit Graph

8669 Commits

Author SHA1 Message Date
Kartik K. Agaram e55d3f5814 maintain aspect ratio when rendering images 2021-07-29 08:24:27 -07:00
Kartik K. Agaram 54765018be . 2021-07-29 08:05:24 -07:00
Kartik K. Agaram 63c7d5c4e0 downsampling photos makes the dithering seem worse
We support 128px, so let's use the whole 128px.
2021-07-29 07:55:54 -07:00
Kartik K. Agaram c9382ee2c9 . 2021-07-29 07:55:45 -07:00
Kartik K. Agaram 295e50f025 shell: reliable image rendering 2021-07-29 07:55:28 -07:00
Kartik K. Agaram e9fb7e4453 shell: rendering image definitions
Not quite working yet. Only the very first rendering succeeds. After
that any keypress triggers a second render which aborts. Image is
getting corrupted in memory somehow.
2021-07-29 00:41:19 -07:00
Kartik K. Agaram fc951149a0 shell: support loading 128x128px images
I'm loading them in uncompressed ASCII format, and all streams and gap
buffers all over the place need to get massively scaled up to 256KB
capacity. But the tests don't yet run out of RAM, so I'll keep going.
2021-07-28 23:58:46 -07:00
Kartik K. Agaram e2f18e8866 shell: literal images 2021-07-28 23:28:29 -07:00
Kartik K. Agaram e2f6e9011e saving definitions containing string literals
This was the whole proximal goal in implementing balanced terminals.

Printing these is still unreliable. It always surrounds in [], which may
not work.
2021-07-28 23:08:07 -07:00
Kartik K. Agaram 9f52758dfe . 2021-07-28 22:57:20 -07:00
Kartik K. Agaram 04134396a3 . 2021-07-28 22:51:31 -07:00
Kartik K. Agaram bec33a7067 shell: second notation for string literals
I've always been dissatisfied with the notion of escaping. It introduces
a special-case meta-notation within the tokenizer, and the conventional
approach leads to exponential "leaning toothpick syndrome" with each
level of escaping.

One potential "correct" solution is to keep string terminals
parameterizable:

  [abc]           => abc
  [=]             => =
  [=[abc]=]       => abc
  [=[a]bc]=]      => a]bc
  [==[a]=]bc]==]  => a]=]bc

..and so on. Basically the terminals grow linearly as the number of
escapings grow.

While this is workable, I'd like to wait until I actually need it, and
then gauge whether the need is a sign of the stack growing too complex,
with too many layers of notation/parsing. Mu's goal is just 3 notations,
and it's going to require constant vigilance to keep that from growing.

Therefore, for now, there are two notations for string literals, one
symmetric and one balanced:

  "abc"           => abc
  [abc]           => abc

The balancing notation permits nested brackets as long as they balance.
  [abc [def]]     => abc [def]

If you need unbalanced square brackets, use the symmetric terminals:
  "abc [def"      => abc [def

If you need double quotes inside strings, use the balanced notation:
  [abc "def]      => abc "def

If you need _both_ square brackets (whether balanced or unbalanced) and
double quotes, you're currently shit outta luck.
2021-07-28 20:44:02 -07:00
Kartik K. Agaram 267c74b59a shell: render image from pbm data stream 2021-07-27 22:38:26 -07:00
Kartik K. Agaram 6199445243 . 2021-07-26 21:13:19 -07:00
Kartik K. Agaram a0432bf589 . 2021-07-26 20:33:31 -07:00
Kartik K. Agaram bade3ae86c . 2021-07-26 17:37:44 -07:00
Kartik K. Agaram a5cbf871ea . 2021-07-26 17:28:49 -07:00
Kartik K. Agaram bfa0efb7d1 game of life in lisp
Super slow; each frame is cleared as a sort of progress indicator while
it computes the next frame.

In the process I realize I need to adjust every single trace in the
shell sources to be more fault-tolerant to a filled-up trace stream.
2021-07-26 17:19:04 -07:00
Kartik K. Agaram 46441d7204 .
Smoked out some issues by rendering a single frame of Game of Life.
Incredibly slow.
2021-07-26 02:27:32 -07:00
Kartik K. Agaram 81c3678515 gracefully trace large multi-dimensional arrays 2021-07-26 02:08:09 -07:00
Kartik K. Agaram 6a92f3b535 gracefully trace large arrays 2021-07-26 02:06:48 -07:00
Kartik K. Agaram 6b57715502 palette operations now a bit faster 2021-07-26 01:33:48 -07:00
Kartik K. Agaram 438c00fd1f . 2021-07-26 01:21:46 -07:00
Kartik K. Agaram ef637b6bab . 2021-07-26 01:12:04 -07:00
Kartik K. Agaram 3e76e0540b shell primitive: initialize array of some size 2021-07-26 00:56:30 -07:00
Kartik K. Agaram 4c224c5375 shell primitive: iset to mutate array at index 2021-07-25 16:46:12 -07:00
Kartik K. Agaram f7a890d435 shell primitive: array index 2021-07-25 16:35:21 -07:00
Kartik K. Agaram 17e50d27d4 shell: array type 2021-07-25 16:24:45 -07:00
Kartik K. Agaram 7ed4a6aed9 . 2021-07-25 16:24:45 -07:00
Kartik K. Agaram ff24d7b810 . 2021-07-25 16:24:45 -07:00
Kartik K. Agaram 251f317c38 . 2021-07-25 16:24:45 -07:00
Kartik K. Agaram 170b6787c5 shell: starting to implement arrays 2021-07-25 16:24:45 -07:00
Kartik K. Agaram 492f7bd0b7 . 2021-07-25 12:36:18 -07:00
Kartik K. Agaram 99cc27200f . 2021-07-24 21:35:52 -07:00
Kartik K. Agaram 4f60a4a6b2 . 2021-07-24 21:10:37 -07:00
Kartik K. Agaram 4d3c9f6b1a . 2021-07-22 22:33:45 -07:00
Kartik K. Agaram 5aea0c11b7 update memory map doc and anticipate a gotcha 2021-07-22 03:58:54 -07:00
Kartik K. Agaram d0f39e75ca . 2021-07-20 08:43:25 -07:00
Kartik K. Agaram 13ef425825 . 2021-07-20 08:43:25 -07:00
Kartik K. Agaram 5f254d0d02 .
Update run instructions for linux/app/ examples, and make sure they are
correct.
2021-07-20 08:43:25 -07:00
Kartik K. Agaram 0b9ea19c98 .
Delete the examples from Crenshaw. They're extremely rudimentary, and
they were really just trial runs for the Mu toolchain.
2021-07-20 08:43:25 -07:00
Kartik K. Agaram de5e1931ed start work on running the Mu toolchain atop Mu 2021-07-19 23:24:03 -07:00
Kartik K. Agaram 1eb1ac81ea . 2021-07-19 20:08:30 -07:00
Kartik K. Agaram 4b5a6f6c30 . 2021-07-19 20:05:00 -07:00
Kartik K. Agaram 8be28fdd46 error message when trying to jump to primitive 2021-07-19 19:58:10 -07:00
Kartik K. Agaram 7204135203 . 2021-07-19 19:55:10 -07:00
Kartik K. Agaram 916d011753 . 2021-07-19 19:52:24 -07:00
Kartik K. Agaram c0db806820 . 2021-07-19 19:46:04 -07:00
Kartik K. Agaram a4c28e1bfb . 2021-07-19 17:57:41 -07:00
Kartik K. Agaram 542773df2f render functions in MRU order 2021-07-19 15:39:36 -07:00