about summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
* 3865Kartik K. Agaram2017-05-194-4/+0
|
* 3864Kartik K. Agaram2017-05-191-2/+2
| | | | | | | | Being able to `cout` directly in raw mode isn't going to be more than a neat gimmick; we need to maintain control over colors. (The sandbox/ app was getting messed up because it just so happened that the next thing being printed to screen after the `Run` button was clear-display-from, which used `cout` with the same colors as the button.)
* 3863Kartik K. Agaram2017-05-192-9/+22
| | | | Thanks Lakshman Swaminathan for running into this bug.
* 3862Kartik K. Agaram2017-05-194-46/+48
| | | | | As the finishing touch on commit 3860, completely decouple the termbox API between moving the cursor and printing at the cursor.
* 3861 - screen untouched when entering console modeKartik K. Agaram2017-05-1814-2/+14
|
* 3860 - stop buffering the screen in termboxKartik K. Agaram2017-05-1824-395/+277
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To achieve this we have to switch to a model of the screen in termbox that is closer to the underlying terminal. Before: a screen is a grid of characters writing out of bounds does nothing After: a screen is a scrolling raster of characters writing out of bounds wraps to next line and scrolls if necessary To move to the new model, it was essential that I migrate my fake screen at the same time to mimic it. This is why the first attempt (commit 3824) failed (commit 3858). This is also why this commit can't be split into smaller pieces. The fake screen now 'scrolls' by rotating screen lines from top to bottom. There's still no notion of a scrollback buffer. The newer model is richer; it permits repl-like apps that upstream termbox can't do easily. It also permits us to simply use `printf` or `cout` to write to the screen, and everything mostly works as you would expect. Exceptions: a) '\n' won't do what you expect. You need to explicitly print both '\n' and '\r'. b) backspace won't do what you expect. It only moves the cursor back, without erasing the previous character. It does not wrap. Both behaviors exactly mimic my existing terminal's emulation of vt100. The catch: it's easy to accidentally scroll in apps. Out-of-bounds prints didn't matter before, but they're bugs now. To help track them down, use the `save-top-idx`, `assert-no-scroll` pair of helpers. An important trick is to wrap the cursor before rather after printing a character. Otherwise we end up scrolling every time we print to the bottom-right character. This means that the cursor position can be invalid at the start of a print, and we need to handle that. In the process we also lose the ability to hide and show the screen. We have to show the prints happening. Seems apt for a "white-box" platform like Mu.
* 3859Kartik K. Agaram2017-05-132-0/+2
|
* 3858Kartik K. Agaram2017-05-134-56/+3
| | | | | | | Lose the ability to hide the cursor. If we want to stop buffering the screen in termbox, it needs to go. What's more, it has no tests.
* 3857Kartik K. Agaram2017-05-136-61/+2
|
* 3856Kartik K. Agaram2017-05-1310-448/+451
| | | | | Bugfix on commit 3853: clear `render-all-on-no-more-events` once you've actually run the `render-all`.
* 3855Kartik K. Agaram2017-05-1318-3501/+3679
|
* 3854Kartik K. Agaram2017-05-1324-115/+402
| | | | Revert commits 3824, 3850 and 3852. We'll redo them more carefully.
* 3853Kartik K. Agaram2017-05-123-6/+32
| | | | | | Bring back commit 3844, albeit in simplified form. I'd forgotten that the one place where we still need to buffer rendering is when people hold down up/down arrow keys.
* 3852Kartik K. Agaram2017-05-123-2/+35
| | | | | | | | | | | | | Bugfix of commit 3850 for the sandbox/ app. I'd hoped to just quickly move past this ugly approach, but a cleaner way is more involved than I thought. This way is ugly partly because I'm introducing a bunch of conditionals without testing them. One or more of my additions may well be hiding bugs. Or I may need to add them in a few other places. The clean way is to update the fake screen model to accurately mimic the new real screen, where out of bounds prints aren't silently ignored, and where scrolling is a fact of life.
* 3851Kartik K. Agaram2017-05-101-1/+1
|
* 3850Kartik K. Agaram2017-05-104-6/+58
| | | | | Bugfix: writes out of bounds used to be skipped, but started clobbering the screen on commit 3824.
* 3849Kartik K. Agaram2017-05-102-376/+376
|
* 3848Kartik K. Agaram2017-05-064-157/+151
| | | | | Improve an error message. Still lots of room for improving how we render reagents in errors.
* 3847Kartik K. Agaram2017-05-064-150/+166
| | | | | Fix a crash on an invalid program. Thanks Lakshman Swaminathan for reporting this issue.
* 3846Kartik K. Agaram2017-05-061-1/+1
| | | | Be more robust to stray files with numeric prefixes.
* 3845Kartik K. Agaram2017-05-0625-1457/+1364
|
* 3844Kartik K. Agaram2017-05-064-107/+13
| | | | | Once I start optimizing most events to not repaint everything there's no need to be smart about queued-up events.
* 3843Kartik K. Agaram2017-05-064-18/+27
|
* 3842Kartik K. Agaram2017-05-045-67/+8
| | | | | | | Always start with an untouched screen that can scroll on printing "\r\n". We can still clear the screen as needed. Also drop support for hiding the cursor.
* 3841Kartik K. Agaram2017-04-2714-34/+34
| | | | | Use the real original instruction in error messages. Thanks Ella Couch.
* 3840Kartik K. Agaram2017-04-204-1559/+1555
| | | | | | | | Fix CI. Our previous approach was breaking because a test was generating different results depending on what layer you stopped at. Turns out we rename instructions in layer 54. So let's save the original_name in the same layer.
* 3839Kartik K. Agaram2017-04-206-1050/+1071
| | | | | | Fix CI. In the process I also fixed a bug in the tangle/ utility.
* 3838 - further improve an error messageKartik K. Agaram2017-04-202-487/+497
| | | | | | | Expanded instructions don't seem to be worth the space they take up. Let people think through the types of variables for themselves. Thanks again to Ella Couch.
* 3837Kartik K. Agaram2017-04-1913-1674/+1720
|
* 3836Kartik K. Agaram2017-04-191-0/+2
| | | | Fix CI.
* 3835Kartik K. Agaram2017-04-181-9/+3
|
* 3834Kartik K. Agaram2017-04-181-0/+2
|
* 3833Kartik K. Agaram2017-04-183-3/+28
| | | | Loosen type-checking slightly to accomodate type abbreviations.
* 3832Kartik K. Agaram2017-04-181-8/+27
| | | | | More fixes for commit 3828 (supporting buffers of something other than characters).
* 3831Kartik K. Agaram2017-04-187-15/+15
| | | | Fix CI.
* 3830 - crosslink shape-shifting containers in htmlKartik K. Agaram2017-04-1827-567/+567
|
* 3829Kartik K. Agaram2017-04-1811-1345/+1345
|
* 3828 - make buffers shape-shifting (generic)Kartik K. Agaram2017-04-184-24/+23
|
* 3827Kartik K. Agaram2017-04-181-0/+1
|
* 3826Kartik K. Agaram2017-04-161-173/+0
|
* 3825Kartik K. Agaram2017-04-1619-3654/+3541
|
* 3824 - experiment: stop buffering in termboxKartik K. Agaram2017-04-1623-344/+25
| | | | | | | | | | | | | | | | Now it's much more apparent why things are slow. You can see each repaint happening. Already I fixed one performance bug -- in clear-rest-of-screen. Since this subverts Mu's fake screen there may be bugs. Another salubrious side effect: I've finally internalized that switching to raw mode doesn't have to clear the screen. That was just an artifact of how termbox abstracted operations. Now I can conceive of using termbox to build a repl as well. (I was inspired to poke into termbox internals by http://viewsourcecode.org/snaptoken/kilo and https://github.com/antirez/linenoise)
* 3823Kartik K. Agaram2017-04-148-1561/+1571
|
* 3822Kartik K. Agaram2017-04-142-0/+9
| | | | | | Provide an option to disable memory reclamation. This makes edit/ *much* more responsive. The cost: memory use grows monotonically. Since we no longer have a safe way to reclaim heap allocations, we never do so.
* 3821Kartik K. Agaram2017-04-131-0/+1
| | | | Fix CI.
* 3820Kartik K. Agaram2017-04-1318-2561/+2609
|
* 3819Kartik K. Agaram2017-04-134-16/+18
| | | | | | | Yet another attempt at trying to clean up commit 3216. I think this solution might finally let me stop agonizing over the problem. State variables for distinguishing call-sites are a reasonable mechanism, orthogonal to waypoints and the hook functions to hold them.
* 3818 - better error messages on type mismatchKartik K. Agaram2017-04-131-1/+50
| | | | Thanks Ella Couch for suggesting this approach.
* 3817 - better errors on streams from null textsKartik K. Agaram2017-04-131-0/+6
| | | | Thanks Ella Couch for reporting this issue.
* 3816Kartik K. Agaram2017-04-061-12/+2
| | | | | | | | Resize events don't actually seem to ever get queued up, so they're still super slow. Dump all our extra smarts about skipping repaints. We need to focus on speeding up repaints in general. Thanks Andrew Owen for reporting this issue.