Commit Graph

243 Commits

Author SHA1 Message Date
Kartik Agaram 6e1eeeebfb 5485 - promote SubX to top-level 2019-07-27 17:47:59 -07:00
Kartik Agaram 23d3a02226 4266 - space for alloc-id in heap allocations
This has taken me almost 6 weeks :(
2018-06-24 09:18:20 -07:00
Kartik Agaram 01ce563dfe 4262 - literal 'null' 2018-06-17 15:57:37 -07:00
Kartik Agaram dd66068298 4261 - start using literals for 'true' and 'false'
They uncovered one bug: in edit/003-shortcuts.mu
  <scroll-down> was returning 0 for an address in one place where I
  thought it was returning 0 for a boolean.

Now we've eliminated this bad interaction between tangling and punning
literals.
2018-06-17 00:29:22 -07:00
Kartik Agaram ce9b2b0515 4258 - undo 4257 2018-06-15 22:16:09 -07:00
Kartik Agaram 0edd9b9fc6 4257 - abortive attempt at safe fat pointers
I've been working on this slowly over several weeks, but it's too hard
to support 0 as the null value for addresses. I constantly have to add
exceptions for scalar value corresponding to an address type (now
occupying 2 locations). The final straw is the test for 'reload':

  x:num <- reload text

'reload' returns an address. But there's no way to know that for
arbitrary instructions.

New plan: let's put this off for a bit and first create support for
literals. Then use 'null' instead of '0' for addresses everywhere. Then
it'll be easy to just change what 'null' means.
2018-06-15 22:12:03 -07:00
Kartik K. Agaram cbeb3ca796 4208
edit/ app: Fix a bug introduced in commit 3954 (June 2017)

Turns out commit 4206 wasn't really necessary to fix this, after all.
2018-02-17 23:30:01 -08:00
Kartik K. Agaram aae1071005 4207 2018-02-15 23:52:29 -08:00
Kartik K. Agaram 3eaca80834 4206 - edit/ app: consistent cursor positioning 2018-02-15 23:45:24 -08:00
Kartik K. Agaram 43ac7bef4b 4205 2018-02-15 21:14:30 -08:00
Kartik K. Agaram ddf378d49e 4169 2017-12-30 20:52:43 -08:00
Kartik K. Agaram 4a48bedcd1 4134 - 'input' = 'ingredient' 2017-12-03 23:25:40 -08:00
Kartik K. Agaram 0899b237b0 3984 - bugfix: display errors when scrolling recipe side
This regression was (also) introduced by commit 3902 in June.
2017-08-25 02:02:56 -07:00
Kartik K. Agaram fc97f6670d 3982 - bugfix: clear old recipe errors on F4
This regression was introduced by commit 3902 in June.

Making this commit clean took the last 4 commits of reorganizing.
2017-08-22 09:19:40 -07:00
Kartik K. Agaram 115c608001 3981
It's always been ugly that I referred to a later layer/feature in a
label name.
2017-08-22 09:18:15 -07:00
Kartik K. Agaram 736b26a73f 3980 2017-08-22 08:39:53 -07:00
Kartik K. Agaram fd25687532 3979 2017-08-22 08:08:31 -07:00
Kartik K. Agaram cf0839eaa9 3978 2017-08-22 07:49:08 -07:00
Kartik K. Agaram 90668776a9 3977 2017-08-22 07:48:09 -07:00
Kartik K. Agaram 0f0be736fb 3962
Yet another regression, this time cascading from commit 3953. My
scenario wasn't actually testing what I thought it was testing.
2017-06-27 11:16:36 -07:00
Kartik K. Agaram 67160f82f2 3960
Don't refresh entire sandbox side when toggling the expected result for
a single sandbox.
2017-06-25 14:50:16 -07:00
Kartik K. Agaram e3c9e15361 3959
Don't unnecessarily write sandboxes to disk on F4.

This seems to save almost 20% time when processing a large lesson
directory with 36 sandboxes.
2017-06-25 13:04:04 -07:00
Kartik K. Agaram dc5f112c3e 3958
Improvement on fix 3957: rather than put a band-aid over a slow
operation, eliminate the slowdown entirely.

In this case it turns out we're unnecessarily saving files to disk when
they could never be modified. Are we doing this on F4 as well?!
2017-06-25 11:02:15 -07:00
Kartik K. Agaram d2f0704962 3957
Marking sandbox responses as expected can take a long time if there are
many sandboxes. Indicate when a click is being worked on.
2017-06-25 10:15:48 -07:00
Kartik K. Agaram 77304fcbeb 3955
Move a scenario which is after commit 3954 applicable to both editors,
not just the recipe side.
2017-06-25 09:31:03 -07:00
Kartik K. Agaram 5405a972e4 3954
As a blanket rule, down-arrow now stops scrolling once the bottom margin
comes on screen.

Now that we have page-wise scrolling with ctrl-f/b and line-wise
scrolling with ctrl-s/x, we don't need to conflate scroll positioning
with the arrow keys. And as a result, early students no longer have to
struggle with accidentally scrolling part of the sandbox off the screen
when there's tons of empty space available.

`move-to-next-line` is still super messy and will need further
rethinking, but this commit simplifies the codebase as a whole by
eliminating a couple of historical accidents:

  a) We only introduced scrolling past the bottom of the screen to allow
  more sandboxes to come into view before we had scrolling for the
  sandbox side.

  b) We undid scrolling past the bottom in just the recipe side to allow
  errors to come into view.

Since these historical details are now irrelevant, we no longer need
separate logic for the recipe and sandbox sides, and we don't need to
keep track of the recipe-bottom separate from the bottom margin of
arbitrary editors.
2017-06-25 01:48:56 -07:00
Kartik K. Agaram d5a492d384 3953
Redo cursor-down to fix a bug.

This should be the final bug I find as part of my audit of everywhere we
compare characters to newlines in layer 3 of the edit/ app.

Pretty messy implementation, but we'll clean it up now.
2017-06-24 23:49:11 -07:00
Kartik K. Agaram 66e512b485 3952 2017-06-24 20:19:43 -07:00
Kartik K. Agaram d467b0a5b2 3950
Fix a regression caused by commit 3919.

Thanks Juan Crispin Hernandez for running into this.
2017-06-24 15:48:57 -07:00
Kartik K. Agaram 3d4fb62a12 3946
Fix the failing scenario of commit 3944.
2017-06-23 23:20:37 -07:00
Kartik K. Agaram bb97f580fb 3944
Reintroduce the failing test of commit 3938. It has two problems:

a) it's failing, and
b) it's not failing the same way as with a real screen.
2017-06-23 23:06:21 -07:00
Kartik K. Agaram 54edd3d25e 3943
Undo commit 3938 and almost everything after. Let's do this right.
2017-06-23 23:03:56 -07:00
Kartik K. Agaram b2eff9f97e 3942
No, my conclusion in the previous commit was wrong. When you print a
character on the right margin, the cursor coordinates always wrap around
to the left margin on the next row. It's just that if you're at the
bottom of the screen, scrolling gives the impression that the row didn't
change.
2017-06-23 19:47:09 -07:00
Kartik K. Agaram b1e558cfe4 3941
Even though the bug of commit 3938 is now fixed, I'm still trying to
track down why the failure looked different on the fake screen than on
the real one. Snapshot as I try to track down the difference.

One key lesson is that the approach of commit 3860 -- updating the
cursor before rather than after printing each character -- turns out to
be untenable. A sequence of `print` followed by `cursor-position` needs
to behave the same as the real screen.

But it's still not clear how the real screen. When you get to the end of
a line the cursor position wraps after print to the left margin (column
0) on the next row. When you get to the bottom right the cursor position
wraps to the *bottom left* margin. How the heck does it know to scroll
on the next print, then? Is there some hidden state in the terminal?
2017-06-23 15:39:14 -07:00
Kartik K. Agaram 0bf322d6f0 3940 2017-06-22 23:09:53 -07:00
Kartik K. Agaram a4020a806f 3939 2017-06-22 11:37:52 -07:00
Kartik K. Agaram bde85557ac 3938
Fix an out-of-bounds write to the screen when sandboxes aligned just
right.

Thanks Ella Couch for reporting this issue.
2017-06-22 11:35:22 -07:00
Kartik K. Agaram 5aac71e875 3935 2017-06-22 09:33:29 -07:00
Kartik K. Agaram a59f20f866 3928 2017-06-19 14:42:33 -07:00
Kartik K. Agaram b755631561 3926
Bugfix: when you hit `enter`, the cursor-row does not increment in *one*
special situation: when the line wraps and the cursor is right at the
start of one of the wrapped lines.
2017-06-19 11:19:21 -07:00
Kartik K. Agaram 458dbc54a2 3925
Bugfix: adjust row when hitting ctrl-u on wrapped lines.
2017-06-19 10:09:11 -07:00
Kartik K. Agaram 7fe1833571 3924 2017-06-18 10:53:53 -07:00
Kartik K. Agaram 17a68d8004 3923
Bugfix: ctrl-a leaves things consistent in the presence of wrapped
lines.
2017-06-18 10:51:29 -07:00
Kartik K. Agaram 8fce01c150 3922 2017-06-17 00:07:53 -07:00
Kartik K. Agaram d2e606f42f 3921 2017-06-16 23:41:41 -07:00
Kartik K. Agaram b51797773d 3919
Bugfix: up-arrow in combination with wrapped lines.
2017-06-16 23:19:11 -07:00
Kartik K. Agaram 0f64a45c35 3918
Bugfix: handle wrapped lines when moving to end of line.
2017-06-16 21:48:16 -07:00
Kartik K. Agaram 960e75d0c6 3916 - minimal prints when commenting lines 2017-06-16 15:58:38 -07:00
Kartik K. Agaram 816a782afe 3915 2017-06-16 09:29:08 -07:00
Kartik K. Agaram 836f70647e 3914
Remember that `before-previous-line` deals with wrapped screen lines.
2017-06-16 08:26:51 -07:00