about summary refs log tree commit diff stats
path: root/apps/tile/rpn.mu
Commit message (Collapse)AuthorAgeFilesLines
* 7302 - tile: at long last, divisionKartik Agaram2020-11-291-0/+20
| | | | | | Also square roots. But there's a bug in rendering floats without precision.
* 7297 - tile: use floats everywhereKartik Agaram2020-11-291-36/+41
|
* 7248 - mu.subx: new primitive 'clear-object'Kartik Agaram2020-11-151-10/+5
|
* 7226Kartik Agaram2020-11-111-12/+0
|
* 7225Kartik Agaram2020-11-111-0/+14
| | | | | | | 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-101-13/+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
* 7219Kartik Agaram2020-11-091-3/+3
| | | | We're still busted, but on the right track.
* 7218Kartik Agaram2020-11-091-2/+4
| | | | | | | | | | | | | | | 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.
* 7210Kartik Agaram2020-11-071-0/+12
| | | | | Bug fixed; I had to reinitialize the table of bindings. Interesting debugging experience.
* 7209Kartik Agaram2020-11-071-1/+1
|
* 7206 - tile: up/down/left/right now print linesKartik Agaram2020-11-071-20/+57
|
* 7205 - tile: magnitudes for up/down/left/rightKartik Agaram2020-11-071-17/+41
|
* 7200 - tile: cursor movement helpersKartik Agaram2020-11-061-0/+116
|
* 7199 - tile: primitive 'move'Kartik Agaram2020-11-061-1/+30
|
* 7198 - tile: primitive 'print'Kartik Agaram2020-11-061-0/+37
|
* 7195 - tile: create 'screen' objectsKartik Agaram2020-11-061-0/+33
|
* 7194Kartik Agaram2020-11-061-45/+47
|
* 7159 - explicitly use 'return' everywhereKartik Agaram2020-11-021-2/+3
| | | | https://github.com/akkartik/mu/issues/45#issuecomment-719990879, task 2.
* 7129 - tile: allow bindings anywhereKartik Agaram2020-10-271-7/+7
| | | | | | | | | | Amazing how easy this was. And it does feel more intuitive. If I decide at some point that I want to bind something to a name I don't usually want to lose the entire line after that point. It also sidesteps for now the thorny question of whether to permit organically switching to a new line (rather than using the 'name value' hotkey), and how that should work.
* 7127Kartik Agaram2020-10-271-1/+1
|
* 7124 - tiles: better 'lines' primitiveKartik Agaram2020-10-271-14/+17
|
* 7120 - tile: array of lines from fileKartik Agaram2020-10-261-0/+46
| | | | Requires a quick hacky change to Mu compiler.
* 7119 - tile: new primitive to slurp file contentsKartik Agaram2020-10-261-0/+36
| | | | | Stack display is messed up when file contents contain newlines. Ignoring that for now.
* 7115Kartik Agaram2020-10-261-5/+5
|
* 7112 - tile: arrays of non-integersKartik Agaram2020-10-261-12/+37
|
* 7110Kartik Agaram2020-10-261-0/+54
| | | | | | | | | | Some more helpers that I want to avoid using, but they help me gain confidence in the current implementation of file handles. Manual test: "x" open dup read swap read Assumes there's a file called `x` in the current directory that contains at least two (short!) lines.
* 7108 - tile: read from file handleKartik Agaram2020-10-251-0/+36
|
* 7107 - tile: file handlesKartik Agaram2020-10-251-0/+32
|
* 7106 - tile: arrays of intsKartik Agaram2020-10-251-23/+54
|
* 7105 - tile: define-function works with stringsKartik Agaram2020-10-251-12/+33
|
* 7104 - tile: word-rename works with stringsKartik Agaram2020-10-251-3/+11
|
* 7103 - tile: first primitive for stringsKartik Agaram2020-10-251-0/+38
|
* 7101 - tile: remove quotes when evaluating stringsKartik Agaram2020-10-251-1/+1
| | | | This found several bugs due to me not checking for null strings.
* 7100 - tile: render string literalsKartik Agaram2020-10-251-0/+14
|
* 7066 - tile: some more primitives for testingKartik Agaram2020-10-191-0/+2
| | | | | Lesson learned: functions store args in _reverse_ order. Since evaluation is very frequent, it's worth optimizing for it.
* 7058Kartik Agaram2020-10-181-0/+3
| | | | | Snapshot; things seem to be working besides ctrl-r, but we aren't yet rendering only the final line.
* 7057 - tile: back to namesKartik Agaram2020-10-181-5/+44
| | | | We can now create new bindings for names while evaluating lines.
* 6965Kartik Agaram2020-10-051-5/+5
|
* 6879Kartik Agaram2020-09-261-14/+18
| | | | Extract a new function.
* 6876Kartik Agaram2020-09-261-21/+8
| | | | Back to commit 6872.
* 6873Kartik Agaram2020-09-261-8/+21
| | | | Now saving the subsidiary stack.
* 6871Kartik Agaram2020-09-261-2/+2
| | | | Segfault now fixed. Everything seems to be working again.
* 6870Kartik Agaram2020-09-261-29/+29
| | | | | | Emit a stack of not ints but more complex objects containing the int payload. Function calls again segfaulting.
* 6868Kartik Agaram2020-09-261-14/+42
| | | | First function call working in apps/tile!
* 6867Kartik Agaram2020-09-261-2/+5
| | | | Segfault fixed. This shouldn't have been so hard.
* 6860Kartik Agaram2020-09-261-2/+71
| | | | | Snapshot: tile currently segfaulting. I need to back up and make it easier to debug.
* 6853 - tile: initialize a test function definitionKartik Agaram2020-09-241-0/+3
|
* 6852 - tile: placeholder for lexical scopesKartik Agaram2020-09-241-1/+1
|
* 6844 - tile: initial data modelKartik Agaram2020-09-231-23/+4
| | | | I actually deleted a test here! Hard-core prototype mode.
* 6815 - tile: get actual calculations workingKartik Agaram2020-09-191-30/+32
|