about summary refs log tree commit diff stats
path: root/apps/tile
Commit message (Collapse)AuthorAgeFilesLines
* 7692Kartik Agaram2021-02-071-2/+2
| | | | | It's bad enough that metadata comments are restricted to integer literals; let's at least make them work on _all_ integer literals.
* 7690Kartik Agaram2021-02-0713-227/+227
| | | | Convert comments about magic constants into metadata.
* 7354 - tile: stop trying to center menuKartik Agaram2020-12-141-15/+7
|
* 7353Kartik Agaram2020-12-141-1/+1
|
* 7352Kartik Agaram2020-12-143-37/+15
|
* 7347 - tile: separate sandbox and function menusKartik Agaram2020-12-061-0/+38
|
* 7346Kartik Agaram2020-12-061-2/+25
|
* 7345Kartik Agaram2020-12-061-14/+14
|
* 7344Kartik Agaram2020-12-061-3/+15
|
* 7343Kartik Agaram2020-12-061-5/+4
|
* 7342 - tile: hotkeys for ending function editKartik Agaram2020-12-061-0/+20
|
* 7341 - tile: function editing doneKartik Agaram2020-12-062-22/+6
| | | | | A tiny modicum of reuse amidst all this copypasta: I'm able to reuse the same function that renders lines without stacks in the sandbox.
* 7340 - tile: function editing almost doneKartik Agaram2020-12-062-4/+215
| | | | | Still a bug in cursor positioning. It's always shown at the start of the function body.
* 7339 - tile: position cursor in correct functionKartik Agaram2020-12-062-8/+77
| | | | Still can't edit functions, but we're getting there.
* 7338 - tile: architecture starting to crystallizeKartik Agaram2020-12-052-21/+54
| | | | | | | | | In particular, I'm starting to have opinions about how to scalably position the cursor at the end of each frame. One advantage of text mode without a pointer device (mouse/trackpad): only one cursor to track. UI can't be modified anywhere. That simplifies any reactive UI framework.
* 7337 - tile: jumping to a functionKartik Agaram2020-12-051-18/+147
| | | | We can't yet edit the function once we jump to it.
* 7336 - tile: back to function editingKartik Agaram2020-12-052-17/+5
|
* 7327Kartik Agaram2020-12-031-6/+6
|
* 7326Kartik Agaram2020-12-031-5/+9
|
* 7325 - tile: start implementing function editingKartik Agaram2020-12-031-22/+28
|
* 7309 - tile: parsing strings into wordsKartik Agaram2020-11-302-156/+39
|
* 7308Kartik Agaram2020-11-291-0/+8
|
* 7305 - make float-size more consistent as wellKartik Agaram2020-11-291-0/+4
|
* 7302 - tile: at long last, divisionKartik Agaram2020-11-292-1/+21
| | | | | | Also square roots. But there's a bug in rendering floats without precision.
* 7301 - tile: float computations now workingKartik Agaram2020-11-292-3/+6
|
* 7297 - tile: use floats everywhereKartik Agaram2020-11-298-124/+131
|
* 7290Kartik Agaram2020-11-271-2/+4
| | | | | | | I've wrestled for a long time with how to support integer division with its hard-coded registers. The answer's always been staring me in the face: just turn it into a function! We already expect function outputs to go to hard-coded registers.
* 7269Kartik Agaram2020-11-213-55/+45
|
* 7248 - mu.subx: new primitive 'clear-object'Kartik Agaram2020-11-152-17/+8
|
* 7246 - tile: segment each function's areaKartik Agaram2020-11-151-2/+14
|
* 7245 - tile: right-align functionsKartik Agaram2020-11-153-13/+102
|
* 7244 - tile: new layout for primitivesKartik Agaram2020-11-151-16/+48
|
* 7243 - tile: starting to make functions editableKartik Agaram2020-11-151-14/+24
|
* 7242Kartik Agaram2020-11-151-1/+1
|
* 7237Kartik Agaram2020-11-141-2/+0
| | | | | | | Minor tweaks to get Mu shell running nicely on a Linux console atop Qemu. We also need to switch a few 256-color codes to 8-color mode. I'm not sure whether/how to patch the repo for those.
* 7229 - tile: fix ctrl-eKartik Agaram2020-11-122-7/+20
|
* 7228Kartik Agaram2020-11-121-3/+7
|
* 7226Kartik Agaram2020-11-114-81/+0
|
* 7225Kartik Agaram2020-11-117-60/+217
| | | | | | | Both manual tests described in commit 7222 now work. To make them work I had to figure out how to copy a file. It requires a dependency on a new syscall: lseek.
* 7222Kartik Agaram2020-11-103-43/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ok, I found a failing manual test for files as well. Here are the two steelman tests, one for screens and one for files: 1. 5 5 fake-screen =s s 1 down 1 right ctrl-d foo expand final state: s foo foo s 1 down 1 right ⇗ ┌─────┐ ┌─────┐ ┌─────┐ 1 ┌─────┐ 1 ┌─────┐ │ ┌─────┐ │ ┌─────┐ │ ─ │ │ │ │ ─ └─────┘ └─────┘ └─────┘ └─────┘ └─────┘ └─────┘ └─────┘ 2. "x" open =f f read f read ctrl-d read2 expand final state: f read2 read2 f read f read ⇗ FILE ❝def❞ FILE ❝abc❞ FILE ❝❞ ❝def❞ ❝ghi❞ In both cases there are 3 levels of issues: - getting a single-line expression to work - getting a single-line expression to work when operating on a binding defined in a previous line - getting an expanded function call to work The third is where the rub is right now. And what both examples above share is that the function performs 2 mutations to the screen/file. So we need a deep copy after all. And it's not very clear how to copy a file descriptor including the seek location. Linux's dup() syscall creates an alias to the file descriptor. And opening /proc seems awfully Linux-specific: https://stackoverflow.com/questions/54727231/duplicating-file-descriptor-and-seeking-through-both-of-them-independently/54727424#54727424
* 7221Kartik Agaram2020-11-091-62/+0
| | | | | I can't get file values to exhibit the same problem. Why are fake screens special?
* 7220Kartik Agaram2020-11-091-5/+12
| | | | | | | | | Even this isn't enough. While shallow copies keep us from transferring new bindings to callers, the screen object is still the same, so mutations to bindings are contagious. Basically I'm losing IQ points from programming in a language that encourages mutation over copying.
* 7219Kartik Agaram2020-11-093-69/+69
| | | | We're still busted, but on the right track.
* 7218Kartik Agaram2020-11-095-11/+139
| | | | | | | | | | | | | | | This bug was incredibly painful to track down: the one-line fix is to replace 'line' with 'first-line' in the call to 'evaluate' in render-line before recursing. Things that made it challenging: - A high degree of coiling with recursive calls and multiple places of evaluation. - An accidental aliasing in bindings (when rendering the main column in render-line) that masked the underlying bug and made things seem to work most of the time. - Too many fucking arguments to render-line, a maze of twisty line objects all alike.
* 7215Kartik Agaram2020-11-072-2/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attempt #3: always create a copy of the bindings before each column/evaluate. The details are fuzzy in my head, but it seemed worth trying. I figured I'd either see the old duplication behavior or everything will work. Instead I'm seeing new problems. commit 7208: 5 5 fake-screen =s s 1 down 1 right expected: | - observed: | | - commit 7210-7212: 5 5 fake-screen =s s 1 down 1 right [define foo] s foo [expand foo] observed: no bindings available when rendering foo expanded commit 7213: 5 5 fake-screen =s s 1 down 1 right [define foo] s foo [expand foo] expected within foo: | - observed within foo: | | - commit 7215: 5 5 fake-screen =s s 1 down 1 right [define foo] s foo [expand foo] observed: no bindings available when rendering foo expanded
* 7214 - undo 7213Kartik Agaram2020-11-072-5/+7
| | | | | | | | | | Turns out even that doesn't work. There are two distinct use cases here: 1. Keeping columns from infecting each other. 2. Expanding function calls. Perhaps ping-ponging between them is a sign I need tests.
* 7213 - redo the bugfix of 7210Kartik Agaram2020-11-072-7/+5
| | | | | | | | It turns out deciding when to initialize the table of bindings is quite a thorny problem in the presence of function calls (since they need their args bound). In time I should probably support a linked list of tables. For now I'll just continue to reuse tables, but perform lookups in reverse order so that the correct binding is always returned.
* 7212Kartik Agaram2020-11-071-1/+1
|
* 7211Kartik Agaram2020-11-071-0/+24
|
* 7210Kartik Agaram2020-11-074-11/+40
| | | | | Bug fixed; I had to reinitialize the table of bindings. Interesting debugging experience.