about summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
* 3895Kartik K. Agaram2017-05-2925-8774/+9151
|
* 3894 - comment/uncomment lines in edit appKartik K. Agaram2017-05-294-6/+268
|
* 3893Kartik K. Agaram2017-05-292-115/+147
|
* 3892Kartik K. Agaram2017-05-291-4/+4
| | | | Fix a keyboard shortcut conflict in commit 3884.
* 3891Kartik K. Agaram2017-05-292-12/+12
|
* 3890Kartik K. Agaram2017-05-291-1/+0
|
* 3889 - profile refcount updates by recipeKartik K. Agaram2017-05-293-3/+49
| | | | | We're currently spending 50% of our time in `mu edit` performing refcount updates.
* 3888 - beginnings of a profilerKartik K. Agaram2017-05-284-22/+60
| | | | Time to make my ad hoc commented out code fragments a first-class feature.
* 3887 - clean up early exits in interpreter loopKartik K. Agaram2017-05-287-33/+57
| | | | | | | | | | It's always confusing when `break` refers to a `switch` but `continue` refers to the loop around the `switch`. But we've done ugly things like this and `goto` for expedience. However, we're starting to run into cases where we now need to insert code at every `continue` or `continue`-mimicking `goto` inside the core interpreter loop. Better to make the loop single-entry-single-exit. Common things to run after every instruction will now happen inside the `finish_instruction` function rather than at the `finish_instruction` label.
* 3886Kartik K. Agaram2017-05-281-5/+5
|
* 3885Kartik K. Agaram2017-05-281-0/+21
|
* 3884 - per-line scroll in edit/ appKartik K. Agaram2017-05-282-0/+63
|
* 3883Kartik K. Agaram2017-05-2717-1740/+1977
|
* 3882Kartik K. Agaram2017-05-271-9/+32
| | | | | | | Hook up fake screen to scroll properly on cursor-down. Thanks Lakshman Swaminathan for finding this hole in commit 3860 with your incessant fidgeting :)
* 3881 - allow students to turn sandboxes into recipesKartik K. Agaram2017-05-2710-101/+302
| | | | Thanks Juan Crispin Hernandez for the suggestion.
* 3880Kartik K. Agaram2017-05-273-32/+24
|
* 3879Kartik K. Agaram2017-05-266-80/+68
|
* 3878Kartik K. Agaram2017-05-262-105/+111
|
* 3877Kartik K. Agaram2017-05-2680-644/+634
|
* 3876Kartik K. Agaram2017-05-216-377/+393
| | | | Thanks Ella Couch for reporting this issue.
* 3875Kartik K. Agaram2017-05-215-994/+992
|
* 3874Kartik K. Agaram2017-05-201-2/+1
| | | | Improve fix of commit 3866.
* 3873Kartik K. Agaram2017-05-202-3/+4
|
* 3872Kartik K. Agaram2017-05-204-506/+536
| | | | Starting to look for lack of organization in the edit/ app.
* 3871Kartik K. Agaram2017-05-208-917/+905
| | | | | | | | Strange race condition: if I repeatedly press <enter> and <backspace> so the screen is constantly playing catch up, it will sometimes fail these assertions when it does eventually catch up. Somehow the cursor ends up misplaced. Let's just take them out. It's likely some low-level implementation detail of the terminal.
* 3870 - seldom draw both sides of edit/Kartik K. Agaram2017-05-209-533/+547
|
* 3869Kartik K. Agaram2017-05-1912-2770/+3024
| | | | Clean up a few superficial things in Caleb's commit.
* 3868 - make ctrl-k and ctrl-u fasterCaleb Couch2017-05-201-2/+131
|
* 3867Kartik K. Agaram2017-05-1927-6281/+6313
|
* 3866Kartik K. Agaram2017-05-192-2/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Yet another bugfix, this time in just the sandbox/ app: open sandbox/ with empty lesson/ directory type 'a' press backspace cursor was not moving left Now fixed. Turns out the sandbox/ app hadn't been working right since commit 3854. (Which ironically was a revert but clearly didn't revert enough; the last truly good commit was 3823, and we're still clawing our way back to the sunlight.) The issue in this case was that commit 3853 disabled update-cursor in some situations when it shouldn't have. To be safe, just always update-cursor one very event. I should probably reorganize this in edit/ as well, but it's not necessary for this particular bug. --- Incidentally, as part of my git bisecting I realized that the bug fixed in the trace browser as part of commit 3862 was very old: press '/' press some key press ctrl-u to erase press some key = out of bounds string access
* 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.