Commit Graph

46 Commits

Author SHA1 Message Date
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 K. Agaram
43ac7bef4b 4205 2018-02-15 21:14:30 -08:00
Kartik K. Agaram
4a48bedcd1 4134 - 'input' = 'ingredient' 2017-12-03 23:25:40 -08:00
Kartik K. Agaram
736b26a73f 3980 2017-08-22 08:39:53 -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
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
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
458dbc54a2 3925
Bugfix: adjust row when hitting ctrl-u on wrapped lines.
2017-06-19 10:09:11 -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
94c54a07a1 3920 2017-06-16 23:22:03 -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
a39f59548a 3913
Bugfix in ctrl-u.
2017-06-15 21:02:51 -07:00
Kartik K. Agaram
778787eadf 3912 2017-06-15 20:43:22 -07:00
Kartik K. Agaram
284e557649 3894 - comment/uncomment lines in edit app 2017-05-29 02:13:43 -07:00
Kartik K. Agaram
63662f7109 3891 2017-05-29 01:10:04 -07:00
Kartik K. Agaram
27bd7e76a2 3869
Clean up a few superficial things in Caleb's commit.
2017-05-19 23:39:07 -07:00
Kartik K. Agaram
d81fcff205 3706 2016-12-11 16:19:37 -08:00
Kartik K. Agaram
c76b0066fb 3700
Reorder products of some functions in the edit/ and sandbox/ apps. My
recent realization: always return 'real' products before ones that just
indicate an ingredient is mutable.
2016-11-28 01:13:59 -08:00
Kartik K. Agaram
06ef635e8a 3699
Delete some obsolete /same-as-ingredient attributes. We should always
let Mu deduce those at this point.
2016-11-28 00:42:24 -08:00
Kartik K. Agaram
970df30262 3698
Update sandbox/ with recent changes to edit/ (commit 3695 onwards).

[Incidentally, this is the first commit to be made while running on
OpenBSD. Simulated and host systems are going to blur together from now
on.]
2016-11-27 22:21:18 -08:00
Kartik K. Agaram
71056d6150 3489
Revert commit 3457, where I switched the unicode characters used in the
edit/ app to something that doesn't render double-wide in html. It turns
out that the new unicode characters made iTerm2 sluggish in alt-tabbing
between windows. (Commit 3488 only fixed the screen-clearing issue.)

I haven't reverted the html files. I'm going to redo commit 3457 next so
the html files continue to render like they do now.
2016-10-08 23:58:56 -07:00
Kartik K. Agaram
4a70fb39cc 3457
Switch around some unicode characters in the edit/ app so that it
renders more cleanly in html (with monospace fonts).
2016-10-06 23:51:55 -07:00
Kartik K. Agaram
55479bc29d 3445
Ugly that we didn't need 'screen' to provide a type in scenarios
(because assume-screen expands to a definition of 'screen') but we did
need a type for 'console'. Just never require types for special names in
scenarios.
2016-10-06 10:52:37 -07:00
Kartik K. Agaram
6f65d5918f 3429 - standardize Mu scenarios
A long-standing problem has been that I couldn't spread code across
'run' blocks because they were separate scopes, so I've ended up making
them effectively comments. Running code inside a 'run' block is
identical in every way to simply running the code directly. The 'run'
block is merely a visual aid to separate setup from the component under
test.

In the process I've also standardized all Mu scenarios to always run in
a local scope, and only use (raw) numeric addresses for values they want
to check later.
2016-09-28 19:48:56 -07:00
Kartik K. Agaram
2d91279bac 3396 2016-09-17 17:54:55 -07:00
Kartik K. Agaram
3d8b137c87 3391 - type abbreviations everywhere
Well, almost. I can't use them in some places in C++ where I'm just
creating a temporary reagent without passing it through transforms. Like
in some unit tests. I can't use them in memory-should-contain.

And there's one remaining bug: I can't use abbreviations in a couple of
places in 075channel.mu.
2016-09-17 13:25:40 -07:00
Kartik K. Agaram
ea19d0dc2c 3337 - first use of type abbreviations: text
In the process I've uncover a couple of situations we don't support type
abbreviations yet. They're next.
2016-09-12 00:38:36 -07:00
Kartik K. Agaram
1156971774 2953 - use pgup/pgdn to scroll through sandboxes
In the process I've also simplified the sandbox/ app. Since it's
impossible for sandbox editors to span multiple pages, we can drop all
scroll support altogether.
2016-05-11 18:00:11 -07:00
Kartik K. Agaram
b0bf5321de 2864 - replace all address:shared with just address
Now that we no longer have non-shared addresses, we can just always
track refcounts for all addresses.

Phew!
2016-04-24 11:54:30 -07:00
Kartik K. Agaram
7bf9212fd4 2861 - 'maybe-convert' no longer returns address 2016-04-23 17:15:16 -07:00
Kartik K. Agaram
d31037ffdc 2854 - purge get-address from sandbox/ app 2016-04-22 22:53:39 -07:00
Kartik K. Agaram
1ead356219 2735 - define recipes using 'def'
I'm dropping all mention of 'recipe' terminology from the Readme. That
way I hope to avoid further bike-shedding discussions while I very
slowly decide on the right terminology with my students.

I could be smarter in my error messages and use 'recipe' when code uses
it and 'function' otherwise. But what about other words like ingredient?
It would all add complexity that I'm not yet sure is worthwhile. But I
do want separate experiences for veteran programmers reading about Mu on
github and for people learning programming using Mu.
2016-03-08 01:46:47 -08:00
Kartik K. Agaram
4637d58f6c 2661 - warn if a reply doesn't match recipe header
Thanks Nicolas Léveillé for running up against this bug:
  https://news.ycombinator.com/item?id=11094837

(Also noticed and fixed several subsidiary issues. This whole aspect
doesn't seem fully baked yet.)
2016-02-15 14:07:23 -08:00
Kartik K. Agaram
34a2336e41 2622 - bugfix: left-arrow
Moving back to wrapped line was overflowing the right margin.
2016-01-31 12:34:42 -08:00
Kartik K. Agaram
455fbac64f 2576 - distinguish allocated addresses from others
This is the one major refinement on the C programming model I'm planning
to introduce in mu. Instead of Rust's menagerie of pointer types and
static checking, I want to introduce just one new type, and use it to
perform ref-counting at runtime.

So far all we're doing is updating new's interface. The actual
ref-counting implementation is next.

One implication: I might sometimes need duplicate implementations for a
recipe with allocated vs vanilla addresses of the same type. So far it
seems I can get away with just always passing in allocated addresses;
the situations when you want to pass an unallocated address to a recipe
should be few and far between.
2016-01-19 23:18:03 -08:00
Kartik K. Agaram
bbe0801ab1 2548 - teach 'print' to print integers
Still can't print non-integer numbers, so this is a bit hacky.

The big consequence is that you can't print literal characters anymore
because of our rules about how we pick which variant to statically
dispatch to. You have to save to a character variable first.

Maybe I can add an annotation to literals..
2015-12-28 08:44:36 -08:00
Kartik K. Agaram
62a390ca0a support immutability checks in sandbox/ app 2015-12-15 10:20:41 -08:00
Kartik K. Agaram
136412d263 2468 - overload print-character as just 'print' 2015-11-21 10:19:34 -08:00
Kartik K. Agaram
741ef43e4c 2446 - drop '-duplex' namespacing in recipes
Great that it just worked after the previous commit.
2015-11-15 12:43:11 -08:00
Kartik K. Agaram
be422222cd 2428 - sandbox/ working again 2015-11-12 22:31:49 -08:00
Kartik K. Agaram
e330f85455 2309 2015-10-28 18:35:39 -07:00
Kartik K. Agaram
fa94f4d923 2183 - environment + external editor using tmux
Thanks Jack and Caleb Couch for the idea.
2015-09-12 13:51:25 -07:00