Commit Graph

39 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 Agaram b89b822439 4260 - make address coercions explicit
'deaddress' is a terrible name. Hopefully I'll come up with something
better.
2018-06-16 23:19:59 -07:00
Kartik K. Agaram 4a48bedcd1 4134 - 'input' = 'ingredient' 2017-12-03 23:25:40 -08:00
Kartik K. Agaram a0f7723236 4121 2017-11-15 16:39:15 -08:00
Kartik K. Agaram aa68aeb34e 4098
Finally, make the seemingly-trivial change to buffer methods that I was
envisioning 2 days ago.

I still have zero confidence in our heuristic for picking the generic
method to specialize for a call-site. Waiting for issues to reveal
themselves.
2017-10-30 13:45:17 -07:00
Kartik K. Agaram 925b20c497 4004 2017-09-23 20:39:19 -07:00
Kartik K. Agaram 72cf994869 4002 2017-09-23 18:41:47 -07:00
Kartik K. Agaram f53746f801 3901 2017-06-09 00:13:39 -07:00
Kartik K. Agaram f8b0b04da1 3833
Loosen type-checking slightly to accomodate type abbreviations.
2017-04-18 18:04:50 -07:00
Kartik K. Agaram 04683e4ece 3832
More fixes for commit 3828 (supporting buffers of something other than
characters).
2017-04-18 18:02:07 -07:00
Kartik K. Agaram d6ae00788a 3828 - make buffers shape-shifting (generic) 2017-04-18 10:47:35 -07:00
Kartik K. Agaram 9bf79d64d3 3787 2017-03-12 00:08:41 -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 8bd3f99fc3 3688
Move my todos over the past couple of years into the codebase now that
it might be going dormant.

Surprising how few todos left undone!
2016-11-25 11:33:13 -08:00
Kartik K. Agaram ca4210b479 3683 2016-11-23 14:01:07 -08:00
Kartik K. Agaram 293732951a 3674 2016-11-13 19:27:12 -08:00
Kartik K. Agaram a513c19fd6 3672 2016-11-13 09:28:00 -08:00
Kartik K. Agaram 5f1e13b530 3670 - parsing whole numbers from text
Thanks Ella Couch for contributing this function.
2016-11-11 23:34:50 -08:00
Kartik K. Agaram ada5eb55cb 3552
Stop requiring jump instructions to explicitly provide a ':label' type
for jump targets.

This has been a source of repeated confusion for my students:
  a) They'd add the ':label' to the label definition rather than the
  jump target (label use)
  b) They'd spend time thinking about whether the initial '+' prefix was
  part of the label name.

In the process I cleaned up a couple of things:

  - the space of names is more cleanly partitioned into labels and
    non-labels (clarifying that '_' and '-' are non-label prefixes)
  - you can't use label names as regular variables anymore
  - you can infer the type of a label just from its name
2016-10-22 12:08:10 -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 a0331a9b0e 3390 2016-09-17 13:00:39 -07:00
Kartik K. Agaram 760f683f27 3389 2016-09-17 12:55:10 -07:00
Kartik K. Agaram 51b0936fc7 3386 2016-09-17 10:30:24 -07:00
Kartik K. Agaram 7a84094adb 3385 2016-09-17 10:28:25 -07:00
Kartik K. Agaram 08f4628e8b 3379
Can't use type abbreviations inside 'memory-should-contain'.
2016-09-17 00:31:55 -07:00
Kartik K. Agaram 864cbf9d0c 3368
Decouple layer 61 test from layer 62 dependency.
2016-09-15 17:43:10 -07:00
Kartik K. Agaram b75d9d456c 3365 - create strings out of arbitrary types
The implementation is quite hacky. Let's see how future needs develop
before we try to clean it up.
2016-09-15 14:04:22 -07:00
Kartik K. Agaram 02796d320d 3357 - multi-ary 'append' 2016-09-15 09:55:14 -07:00
Kartik K. Agaram cd93f2dd80 3356 2016-09-15 09:25:52 -07:00
Kartik K. Agaram 17ec401647 3344 2016-09-12 23:06:37 -07:00
Kartik K. Agaram db01afa844 3343
Reorganize layers a bit so I can add a couple of scenarios testing
static dispatch *before* I add `stash` into the mix.
2016-09-12 21:02:38 -07:00
Kartik K. Agaram 59e47aca14 3341
Process type abbreviations in function headers.

Still a couple of places where doing this causes strange errors. We'll
track those down next.
2016-09-12 10:00:43 -07:00
Kartik K. Agaram e2b367dc25 3338
Process type abbreviations in container definitions.
2016-09-12 00:47:44 -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 cdf0f349d1 3324 - completely redo type abbreviations
The old approach with '&' and '@' modifiers turned out to be a bad idea
because it introduces notions of precedence. Worse, it turns out you
want different precedence rules at different times as the old test
alluded:

  x:@number:3  # we want this to mean (address number 3)
  x:address:@number  # we want this to mean (address array number)

Instead we'll give up and focus on a single extensible mechanism that
allows us to say this instead:

  x:@:number:3
  x:address:@:number

In addition it allows us to shorten other types as well:

  x:&:@:num

  type board = &:@:&:@:char  # for tic-tac-toe

Hmm, that last example reminds me that we don't handle abbreviations
inside type abbreviation definitions so far..
2016-09-11 17:50:36 -07:00
Kartik K. Agaram df32a04c40 3186 - handle 'new-buffer' without ingredients 2016-08-14 05:24:04 -07:00
Kartik K. Agaram 814333e288 3155 2016-07-27 22:20:12 -07:00
Kartik K. Agaram 5e15a74f06 3055 2016-06-13 16:25:45 -07:00