about summary refs log tree commit diff stats
path: root/shell/global.mu
Commit message (Collapse)AuthorAgeFilesLines
* rename grapheme to code-point-utf8Kartik K. Agaram2021-11-091-1/+1
| | | | | | Longer name, but it doesn't lie. We have no data structure right now for combining multiple code points. And it makes no sense for the notion of a grapheme to conflate its Unicode encoding.
* maintain aspect ratio when rendering imagesKartik K. Agaram2021-07-291-8/+18
|
* downsampling photos makes the dithering seem worseKartik K. Agaram2021-07-291-2/+2
| | | | We support 128px, so let's use the whole 128px.
* shell: rendering image definitionsKartik K. Agaram2021-07-291-1/+68
| | | | | | Not quite working yet. Only the very first rendering succeeds. After that any keypress triggers a second render which aborts. Image is getting corrupted in memory somehow.
* shell: support loading 128x128px imagesKartik K. Agaram2021-07-281-1/+1
| | | | | | I'm loading them in uncompressed ASCII format, and all streams and gap buffers all over the place need to get massively scaled up to 256KB capacity. But the tests don't yet run out of RAM, so I'll keep going.
* saving definitions containing string literalsKartik K. Agaram2021-07-281-2/+0
| | | | | | | This was the whole proximal goal in implementing balanced terminals. Printing these is still unreliable. It always surrounds in [], which may not work.
* .Kartik K. Agaram2021-07-191-21/+0
|
* .Kartik K. Agaram2021-07-191-1/+1
|
* render functions in MRU orderKartik K. Agaram2021-07-191-39/+62
|
* .Kartik K. Agaram2021-07-171-2/+2
|
* .Kartik K. Agaram2021-06-121-2/+2
| | | | | Roll back to commit 70919b45f0. Recent commits add lots of extra function args for dubious benefit.
* eliminate some implicit writes to real screenKartik K. Agaram2021-06-121-2/+2
|
* .Kartik K. Agaram2021-06-121-8/+8
| | | | | | Rename cells containing screens to screen vars because of the ambiguity that each grapheme in fake screens is represented by a type screen-cell. While we're at it, we also analogously rename keyboard vars.
* better nameKartik K. Agaram2021-06-111-2/+3
|
* back to the pending testKartik K. Agaram2021-06-111-60/+4
| | | | I'm ready again to take on commit 6169ec59c after lots of refactoring.
* .Kartik K. Agaram2021-06-111-3/+25
| | | | | | | | Save a single trace to potentially multiple globals just like a gap buffer (if say we have a single let binding defining multiple functions). I don't have a strong use for this yet, but it seems cleaner. Maybe it's redundant or wrong.
* .Kartik K. Agaram2021-06-111-1/+0
|
* .Kartik K. Agaram2021-06-111-2/+2
|
* .Kartik K. Agaram2021-06-111-82/+6
|
* .Kartik K. Agaram2021-06-111-2/+2
|
* .Kartik K. Agaram2021-06-111-4/+0
|
* .Kartik K. Agaram2021-06-111-54/+50
| | | | | | Inline a function by patching a few variable names. I don't even have to worry about `return` statements if there's a single call and it's in tail position in the caller.
* .Kartik K. Agaram2021-06-111-11/+13
|
* start showing parse errors under definitionsKartik K. Agaram2021-06-111-2/+10
| | | | | | We don't have support for browsing them yet. Just errors for now, which should only be a line or two. Larger traces might be useful for inspecting results of macroexpansion.
* .Kartik K. Agaram2021-06-111-6/+6
|
* .Kartik K. Agaram2021-06-111-13/+34
|
* .Kartik K. Agaram2021-06-091-0/+36
|
* .Kartik K. Agaram2021-06-091-41/+19
|
* .Kartik K. Agaram2021-06-091-14/+7
|
* .Kartik K. Agaram2021-06-091-3/+4
| | | | Add argument to a few functions.
* .Kartik K. Agaram2021-06-091-2/+2
|
* make tests pass againKartik K. Agaram2021-06-091-0/+5
| | | | | I'm temporarily disabling the pending state. I'm also providing a clearer error message when we encounter the bug.
* snapshot: attempt at modifying a function nameKartik K. Agaram2021-06-091-11/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out there's another problem, and it predates the ability to create new definitions: ctrl-s triggers a call to `evaluate`, which inserts a new definition into globals. which has a null gap buffer. All this happens long before the new code in this commit, resulting in a null gap buffer by the time we get to word-at-cursor. Which in turn happens because we perform a raw `evaluate`, which doesn't update the gap buffer like `run` does (using `maybe-stash-gap-buffer-to-global`). And arguably `evaluate` shouldn't mess with the gap buffer. Gap buffers are a UI concern. The hardest version of this immediate scenario: It's unclear how to guarantee that every definition have a gap buffer, when two definitions may share one (closures sharing a lexical environment). New plan: - improve the logic for detecting definitions. Looking at the outermost layer isn't enough. And a single expression can create multiple definitions. - extract a helper to attach a single gap buffer to multiple definitions. - have the UI detect conflicts in gap buffers and prompt the user for a decision if a different gap buffer already exists for a definition.
* .Kartik K. Agaram2021-06-081-11/+11
|
* shell: function modal now also creates functionsKartik K. Agaram2021-06-081-0/+19
|
* shell: fleshing out the 'standard library'Kartik K. Agaram2021-06-061-1/+1
| | | | | | Based loosely on Arc's arc.arc: http://arclanguage.org https://github.com/arclanguage/anarki/blob/official/arc.arc
* refresh edited definitions on ctrl-sKartik K. Agaram2021-06-051-0/+41
|
* start editing function definitionsKartik K. Agaram2021-06-041-1/+11
|
* .Kartik K. Agaram2021-06-041-0/+24
| | | | Menu when cursor is within a function.
* select function to render firstKartik K. Agaram2021-06-041-0/+10
|
* always render functions starting at the cursorKartik K. Agaram2021-06-041-2/+4
| | | | For now we just never render definitions above it. That will improve.
* record the definition the cursor is currently atKartik K. Agaram2021-06-041-1/+10
|
* conditionally display cursor on function sideKartik K. Agaram2021-06-041-3/+4
| | | | | Always shows at top-most function. Can't actually do any editing yet.
* .Kartik K. Agaram2021-06-041-1/+1
|
* rename the definition primitive to 'def'Kartik K. Agaram2021-06-041-4/+4
|
* .Kartik K. Agaram2021-06-031-0/+3
|
* starting to support function editingKartik K. Agaram2021-06-031-0/+3
|
* .Kartik K. Agaram2021-06-031-1597/+1
|
* .Kartik K. Agaram2021-06-031-5/+5
|
* .Kartik Agaram2021-05-311-3/+5
| | | | | Until we get scrolling on functions, it's a little cleaner to draw the primitives on top.