Commit Graph

6806 Commits

Author SHA1 Message Date
Kartik Agaram 72e8240a23 6806 - tile: place-holder for bottom of stack 2020-09-19 19:56:54 -07:00
Kartik Agaram ecb9ac7bd8 6805 2020-09-19 19:44:55 -07:00
Kartik Agaram a553a5e201 6804 - tile: render all words 2020-09-19 18:27:29 -07:00
Kartik Agaram abfd0bad29 6803 - RPN: typing a single word now works 2020-09-19 16:49:17 -07:00
Kartik Agaram a83cde9663 6802 - plug a gaping hole in the Mu translator
This issue hasn't been noticed until now because I haven't been using variables
on the stack much.
2020-09-19 16:24:28 -07:00
Kartik Agaram a0deaa1cb1 6801 - snapshot: RPN structured editor
There's some worrisome memory corruption here between the call to max-stack-depth
and the callee picking up its args.

All this code is incredibly ugly as I start to wrestle with the challenges
of structured editors. I keep wanting to keep business logic separate from
rendering, but there are feedback loops from wanting to know where to render
the cursor. And I haven't even started trying to avoid full-screen renders
yet. That'll complect things even more. For now the data path for every
iteration of the render loop is:
  process key
  compute max depth needed (or any other global information needed for rendering)
  render
2020-09-19 09:02:40 -07:00
Kartik Agaram c9093dbb08 6800 2020-09-19 09:01:42 -07:00
Kartik Agaram 469259657b 6799 2020-09-18 18:37:19 -07:00
Kartik Agaram 3b928346b8 6798
Simplify the app for now.

I'm not actually sure what sort of language I want to create here. So let's
not get ahead of ourselves inventing a whole new grid model and everything.
2020-09-17 22:13:09 -07:00
Kartik Agaram 47821f1bdd 6797 2020-09-17 22:00:09 -07:00
Kartik Agaram 7ecfd5eba9 6796
Extremely hacky initial stab at a 1-line editor.
2020-09-16 23:46:25 -07:00
Kartik Agaram deda3f49cf 6795
Fix CI since commit 6787.
2020-09-16 19:29:07 -07:00
Kartik Agaram e403d15732 6794 - cleaner interface for keyboard
So far I've been assuming that read-key only works for ascii, and that
I'd need to get more sophisticated both for multi-byte utf-8 and multi-byte
terminal escape codes like arrow keys. Rather to my surprise, both work
fine. We just need to adjust the types to reflect this fact.
2020-09-16 18:54:12 -07:00
Kartik Agaram 797c93e054 6793 2020-09-16 18:34:54 -07:00
Kartik Agaram 9b873e3bcd 6792
Roll back all buffering of Stdout.
2020-09-16 16:52:26 -07:00
Kartik Agaram 9f8f2731df 6791
Yeah, this isn't working.
2020-09-16 16:47:53 -07:00
Kartik Agaram f4fb198af3 6790 experiment: explicit flush
tile is already visibly slow (49x212 screen) :/ So programmer needs more
control over performance.

But this may not be the right approach. That extra flush-stdout in tui.mu
suggests it's either going to be finicky, or we have to flush on every
attribute change. And going through a buffered-file may be slower. May.
2020-09-16 16:43:52 -07:00
Kartik Agaram 5029dac235 6789 - tile: print keystrokes to screen 2020-09-16 15:39:05 -07:00
Kartik Agaram 985e85cc56 6788 2020-09-16 09:36:38 -07:00
Kartik Agaram fecb649b9a 6787 2020-09-16 09:26:38 -07:00
Kartik Agaram 1f2ebeb44f 6786 2020-09-16 09:19:46 -07:00
Kartik Agaram d165ccc377 6785 2020-09-16 09:18:51 -07:00
Kartik Agaram c0ea27e40e 6784 2020-09-16 08:45:43 -07:00
Kartik Agaram 37fd51f754 6783
An extra test that should have been in commit 6781.
2020-09-16 08:31:10 -07:00
Kartik Agaram ccbda3fffd 6782
Regression: segfault on `fn foo` without a block

I really need to turn the list of scenarios considered before populate-mu-function-header
into tests.
2020-09-15 22:56:15 -07:00
Kartik Agaram ae470b42f1 6781 - new app: RPN (postfix) calculator
This was surprisingly hard; bugs discovered all over the place.
2020-09-15 22:52:41 -07:00
Kartik Agaram 8815cf7d57 6780 2020-09-14 22:26:56 -07:00
Kartik Agaram abfdaf58bb 6779
Looks like Linux turns reads from stdout/stderr into stdin!
2020-09-14 21:56:10 -07:00
Kartik Agaram ad1e53df8b 6778 2020-09-14 21:42:31 -07:00
Kartik Agaram 6b41ca6d95 6777
Print answers in decimal in apps/arith.mu
2020-09-14 21:14:04 -07:00
Kartik Agaram 40d40b83de 6776 - new app: a programming environment
This will take a while.
2020-09-13 00:41:09 -07:00
Kartik Agaram e99f527da0 6775 2020-09-11 16:11:04 -07:00
Kartik Agaram 91a5f3e103 6774 2020-09-11 00:59:56 -07:00
Kartik Agaram 3a4be20aba 6773 - markdown browser now seems fully tested 2020-09-11 00:40:07 -07:00
Kartik Agaram 13cbff7589 6772 - test for markdown headers 2020-09-11 00:36:24 -07:00
Kartik Agaram 9818804c1f 6771 - first passing test for the browser itself
In the process I had to go back and redo the `done-drawing?` logic everywhere.
2020-09-11 00:29:20 -07:00
Kartik Agaram a03daa83f5 6770 2020-09-10 23:32:40 -07:00
Kartik Agaram 492fb2783f 6769 - support for creating fake files in Mu tests 2020-09-10 23:00:19 -07:00
Kartik Agaram 094b33c107 6768 - better error messages when checking screen state 2020-09-10 21:44:29 -07:00
Kartik Agaram 1ef8d4dba7 6767 2020-09-10 21:09:23 -07:00
Kartik Agaram 1aa476634d 6766 2020-09-10 20:38:28 -07:00
Kartik Agaram 20b1594206 6765
Starting to gain confidence.
2020-09-10 20:36:42 -07:00
Kartik Agaram 282e327774 6764 2020-09-10 20:20:51 -07:00
Kartik Agaram 4eedb6803a 6763 2020-09-10 20:14:17 -07:00
Kartik Agaram 3f4aedd8c9 6762 2020-09-10 01:07:14 -07:00
Kartik Agaram 8617fa2ff8 6761 2020-09-08 22:49:52 -07:00
Kartik Agaram 6b36e4dbc7 6760
Fix a couple of subtle bugs.

- the VM was conditionally reading from the instruction stream, so that
  other bugs got masked by decoding errors.
- push-n-bytes was clobbering eax.
2020-09-08 22:48:47 -07:00
Kartik Agaram d9a05dfbb7 6759 - first test for app/browse/ 2020-09-07 23:51:09 -07:00
Kartik Agaram 8c9b8e8f77 6758 2020-09-07 23:43:23 -07:00
Kartik Agaram 571ff107a2 6757 2020-09-07 23:35:18 -07:00