diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-11-10 19:32:54 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-11-10 19:32:54 -0800 |
commit | 3ae62cfd79a5435a2c230da5a8dfd8a1a8fa4abd (patch) | |
tree | 83684e8f7a31216f32d91e7812cc9155ce61cdc5 /html/apps/tile | |
parent | 021c2975aa45e653125c3ba8bcd477d7cb7f43cb (diff) | |
download | mu-3ae62cfd79a5435a2c230da5a8dfd8a1a8fa4abd.tar.gz |
7222
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
Diffstat (limited to 'html/apps/tile')
0 files changed, 0 insertions, 0 deletions