Commit Graph

16 Commits

Author SHA1 Message Date
Kartik Agaram c71073ebfe 7234 2020-11-14 00:40:04 -08:00
Kartik Agaram b8d613e7c2 6946 - print floats somewhat intuitively in hex 2020-10-04 11:18:23 -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 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 6b41ca6d95 6777
Print answers in decimal in apps/arith.mu
2020-09-14 21:14:04 -07:00
Kartik Agaram be2a94d9b8 6718 2020-08-16 22:43:03 -07:00
Kartik Agaram 89c9ed80f9 6706 - support utf-8
For example:

  fn main -> r/ebx: int {
    var x/eax: grapheme <- copy 0x9286e2  # code point 0x2192 in utf-8
    print-grapheme-to-real-screen x
    print-string-to-real-screen "\n"
  }

Graphemes must fit in 4 bytes (21 bits for code points). Unclear what we
should do for longer clusters since graphemes are a fixed-size type at
the moment.
2020-08-02 15:50:19 -07:00
Kartik Agaram 0f5d0ec519 6705
Another stupid bug: I've been printing out 3 nulls for every byte of ascii.
2020-08-02 15:30:59 -07:00
Kartik Agaram 0a8e8f4e2f 6704
This is stupid; all this while I've been writing escape sequences to the
screen they've been going out on stderr.
2020-08-02 15:19:27 -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 f7a90521d1 6680 2020-07-26 22:08:22 -07:00
Kartik Agaram a3bfbb99f8 6624 2020-07-09 07:57:03 -07:00
Kartik Agaram c09c91e185 6612 - reorganize layers 2020-07-05 12:13:28 -07:00