Commit Graph

72 Commits

Author SHA1 Message Date
Kartik Agaram 86a124769d 6808 2020-09-19 21:53:52 -07:00
Kartik Agaram 8e4b4f2013 6807 - tile: render intermediate stack state 2020-09-19 21:44:48 -07:00
Kartik Agaram c9093dbb08 6800 2020-09-19 09:01:42 -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 9b873e3bcd 6792
Roll back all buffering of Stdout.
2020-09-16 16:52:26 -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 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 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 492fb2783f 6769 - support for creating fake files in Mu tests 2020-09-10 23:00:19 -07:00
Kartik Agaram 5462619d96 6742 - support for formatting in fake screens
We still need a few primitives, but we can implement these as needed. I'm
ready to call the fake screen done.
2020-09-07 14:18:48 -07:00
Kartik Agaram cd94852dbc 6733 - read utf-8 'grapheme' from byte stream
No support for combining characters. Graphemes are currently just utf-8
encodings of a single Unicode code-point. No support for code-points that
require more than 32 bits in utf-8.
2020-08-28 23:24:04 -07:00
Kartik Agaram d07dfdd40c 6731 2020-08-28 22:34:07 -07:00
Kartik Agaram be2a94d9b8 6718 2020-08-16 22:43:03 -07:00
Kartik Agaram 0452b05f5a 6703 - new types: code-point and grapheme
Both have the same size: 4 bytes.

So far I've just renamed print-byte to print-grapheme, but it still behaves
the same.

I'm going to support printing code-points next, but grapheme 'clusters'
spanning multiple code-points won't be supported for some time.
2020-08-02 15:11:52 -07:00
Kartik Agaram 6b343a82f2 6699 - start building out fake screen
We now have all existing apps and prototypes going through the dependency-injected
wrapper, even though it doesn't actually implement the fake screen yet.
2020-08-01 23:39:57 -07:00
Kartik Agaram 3001235028 6687 - stream-empty? and stream-full? 2020-07-30 19:34:29 -07:00
Kartik Agaram b8df5340fa 6682 - experimental support for streams and slices
Slices contain `addr`s so the same rules apply to them. They can't be stored
in structs and so on. But they may be an efficient temporary while parsing.

Streams are currently a second generic type after arrays, and gradually
strengthening the case to just bite the bullet and support first-class
generics in Mu.
2020-07-28 21:37:32 -07:00
Kartik Agaram 01b72aa064 6659
Tighten up some function signatures.
2020-07-18 19:33:39 -07:00
Kartik Agaram e2b55208b2 6643 2020-07-13 21:52:26 -07:00
Kartik Agaram efe641a030 6632 2020-07-11 00:11:39 -07:00
Kartik Agaram c5a3f65502 6630 - define type signatures for SubX functions
This was easier than I'd feared.
2020-07-10 23:41:34 -07:00