Commit Graph

7100 Commits

Author SHA1 Message Date
Kartik Agaram 1c441baf96 7000 - tile: previous-word also bumps up to caller 2020-10-11 00:11:04 -07:00
Kartik Agaram 28d99f031d 6999 - tile: move to previous word 2020-10-10 23:38:42 -07:00
Kartik Agaram cfad9c494e 6998 2020-10-10 22:08:23 -07:00
Kartik Agaram 4b75c6b554 6997 2020-10-10 22:07:13 -07:00
Kartik Agaram 3d203a4484 6996 2020-10-10 21:43:34 -07:00
Kartik Agaram 7c2d5dc88b 6995 2020-10-10 21:40:03 -07:00
Kartik Agaram 24c4854223 6994 2020-10-10 21:32:43 -07:00
Kartik Agaram 818512d15a 6993 2020-10-10 21:31:33 -07:00
Kartik Agaram 07faf800ac 6992
Left arrow key out of an expanded word now working.

Still to fix: left arrow key out of the first word in the first word.
2020-10-10 21:30:02 -07:00
Kartik Agaram ae6340f225 6991 - tile: nested calls now expanding
I just needed to remove an obsolete guardrail in render-line.

Still seeing some bugs with left-arrow when playing around with the full
expansion of `1 2+`.
2020-10-10 21:22:00 -07:00
Kartik Agaram 831a133a4b 6990
Bring back definitions for 1+ and 2+. Expanding nested calls still doesn't
work.
2020-10-10 02:08:46 -07:00
Kartik Agaram dae19c9fe6 6989 - tile: arrow keys now seem to handle calls 2020-10-10 02:00:46 -07:00
Kartik Agaram b25167a9ae 6988
Oh, of course. I can't compare the word with the word at the cursor. Not
even its interned pointer. We have to track the call path.
2020-10-10 01:43:12 -07:00
Kartik Agaram e8367b2bc2 6987 - left-arrow to jump to caller/callee
Starting to work. I'm still seeing problems in lines with multiple expanded
calls, but perhaps that's a rendering issue.

The code is absolutely ghastly.
2020-10-10 01:42:58 -07:00
Kartik Agaram f864cf0874 6986
Cursor now stays on the right row as we bounce in and out of function calls.
2020-10-09 23:43:24 -07:00
Kartik Agaram 5b7ccbc8f4 6985 - tile: make calls read-only 2020-10-09 23:35:19 -07:00
Kartik Agaram cbd076e02c 6984 2020-10-09 23:32:50 -07:00
Kartik Agaram 6e93444ff4 6983 - tile: right-arrow can now move out of calls 2020-10-09 23:30:19 -07:00
Kartik Agaram 5ba974b4e5 6982 - right-arrow now moves into expanded calls
Rendering is still ugly. Cursor isn't on the right row. But the hard part
is behind us.

This was a stupid mistake in function-body, and it happened because I've
been getting lazy and passing (addr handle) objects when I should be passing
in "constant" addr objects.

I'm not sure why I was so resistant to debugging by print here. I spent
3 days waffling about with this bug.
2020-10-09 23:24:00 -07:00
Kartik Agaram 8c43582fb2 6981
Tile: simplify the contract for render-column.
2020-10-09 22:27:22 -07:00
Kartik Agaram ec6221b485 6980
Changing tack..
2020-10-09 22:15:14 -07:00
Kartik Agaram 315926f732 6979
Use the fake-screen infrastructure we already have for non-interactive
mode.
2020-10-09 21:43:42 -07:00
Kartik Agaram cb01075a2e 6978
We don't have tests yet in the tile prototype, mostly because we don't
yet feel confident about what desired behavior should be. But it's still
helpful to have a non-interactive mode for tracking down segfaults.
2020-10-09 21:25:32 -07:00
Kartik Agaram 7c6bb4d316 6977
Snapshot. We've gotten arrow keys navigating, but segfault when getting
to the second word in an expanded function call body.
2020-10-09 21:17:51 -07:00
Kartik Agaram eb2ccccceb 6976 2020-10-09 21:10:14 -07:00
Kartik Agaram 0c465d1dcc 6975 2020-10-09 21:08:40 -07:00
Kartik Agaram 5659eccded 6974 2020-10-08 20:32:49 -07:00
Kartik Agaram d906d5fd38 6973 2020-10-08 20:32:44 -07:00
Kartik Agaram e9957c78da 6972 - tile: stop persisting cursor-word
Rather surprisingly, this transformation worked the first time!
2020-10-08 20:32:34 -07:00
Kartik Agaram be11737062
Merge pull request #42 from jimmyhmiller/patch-1
Fix broken link
2020-10-08 19:15:14 -07:00
Jimmy Miller 97f4d3ed95
Fix broken link 2020-10-08 20:05:56 -04:00
Kartik Agaram b8fd119b78 6969
Fix and cleanup.
2020-10-06 00:41:20 -07:00
Kartik Agaram ce094a5d82 6968
Snapshot that requires a check in the Mu compiler.

Currently I don't spill a register if it could possibly be over-written
by a function output within. However, find-in-call-path is a good example
of where this constraint is too lenient and results in unsafe code. The
variable `curr` gets clobbered during loop update by the variable `match?`.

What's the answer? Perhaps we should ban all conditional updates to function
outputs? That'd be dashed inconvenient.
2020-10-06 00:36:28 -07:00
Kartik Agaram e41bc160a0 6967
Function expand/contract still works, but the implementation is totally
different under the hood.
2020-10-05 22:21:27 -07:00
Kartik Agaram a9e56c46c6 6966 2020-10-05 21:35:46 -07:00
Kartik Agaram 88e23b97df 6965 2020-10-05 21:32:45 -07:00
Kartik Agaram c2844535f3 6964 - tile: start tracking word index in fn body 2020-10-05 21:22:42 -07:00
Kartik Agaram 21387ef514 6963 - tile: more idiomatic conventional repl 2020-10-05 21:09:42 -07:00
Kartik Agaram 6833b4542c 6962
Slowly hoist cursor-word from environment to sandbox. This isn't its final
destination.
2020-10-05 20:44:50 -07:00
Kartik Agaram c626219e3f 6961 2020-10-05 20:37:47 -07:00
Kartik Agaram 5fa8e972d6 6960 2020-10-05 18:36:28 -07:00
Kartik Agaram 4f5562c243 6959 2020-10-05 11:01:25 -07:00
Kartik Agaram d3a9db3aff 6958 2020-10-05 11:00:05 -07:00
Kartik Agaram f13576b5d2 6957
The final fix to the raytracing program involves rounding modes. It turns
out x86 processors round floats by default, unlike C which has trained
me to expect truncation. Rather than mess with the MXCSR register, I added
another instruction for truncation. Now milestone 3 emits perfectly correct
results.
2020-10-05 10:25:25 -07:00
Kartik Agaram bb3ce6cdea 6956 2020-10-05 10:16:46 -07:00
Kartik Agaram fe34dc4718 6955 2020-10-05 10:12:34 -07:00
Kartik Agaram 5c3d495dbe 6954 2020-10-05 09:28:19 -07:00
Kartik Agaram fa2092a024 6953 2020-10-05 09:26:54 -07:00
Kartik Agaram cdff5d73ce 6952 - raytracing: much better
The image is now visually indistinguishable from the baseline, though the
file isn't quite bit-for-bit correct.

I found 3 bugs:
a) I forgot to normalize the ray. After creating a helper to "automatically"
do it for me, it turns out said helper requires manually using.
b) I forgot to multiply by t at one place.
c) vec3-length was half-written.

For the umpteenth time, the bugs were all in the last place I looked. I
was worried about spending a lot of time transcribing `main` without any
feedback, but that turned out to be perfect.
2020-10-04 23:12:21 -07:00
Kartik Agaram 00af72ccb0 6951 - 4 colors for Mu as well 2020-10-04 21:24:46 -07:00