| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Convert comments about magic constants into metadata.
|
|
|
|
|
|
| |
Also square roots.
But there's a bug in rendering floats without precision.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
We're still busted, but on the right track.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Bug fixed; I had to reinitialize the table of bindings.
Interesting debugging experience.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
https://github.com/akkartik/mu/issues/45#issuecomment-719990879, task 2.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
Requires a quick hacky change to Mu compiler.
|
|
|
|
|
| |
Stack display is messed up when file contents contain newlines. Ignoring
that for now.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This found several bugs due to me not checking for null strings.
|
| |
|
|
|
|
|
| |
Lesson learned: functions store args in _reverse_ order. Since evaluation
is very frequent, it's worth optimizing for it.
|
|
|
|
|
| |
Snapshot; things seem to be working besides ctrl-r, but we aren't yet rendering
only the final line.
|
|
|
|
| |
We can now create new bindings for names while evaluating lines.
|
| |
|
|
|
|
| |
Extract a new function.
|
|
|
|
| |
Back to commit 6872.
|
|
|
|
| |
Now saving the subsidiary stack.
|
|
|
|
| |
Segfault now fixed. Everything seems to be working again.
|
|
|
|
|
|
| |
Emit a stack of not ints but more complex objects containing the int payload.
Function calls again segfaulting.
|
|
|
|
| |
First function call working in apps/tile!
|
|
|
|
| |
Segfault fixed. This shouldn't have been so hard.
|
|
|
|
|
| |
Snapshot: tile currently segfaulting. I need to back up and make it easier
to debug.
|
| |
|
| |
|
|
|
|
| |
I actually deleted a test here! Hard-core prototype mode.
|