about summary refs log tree commit diff stats
path: root/070text.mu
Commit message (Collapse)AuthorAgeFilesLines
* 2864 - replace all address:shared with just addressKartik K. Agaram2016-04-241-221/+221
| | | | | | | Now that we no longer have non-shared addresses, we can just always track refcounts for all addresses. Phew!
* 2860 - rename 'index-address' to 'put-index'Kartik K. Agaram2016-04-231-26/+14
|
* 2840Kartik K. Agaram2016-04-161-2/+2
|
* 2829 - issues while switching to 'put'Kartik K. Agaram2016-04-101-14/+15
| | | | | | | | | | | | | | | | 1. It turns out we couldn't overload 'get' and 'get-address' until now, because transform_names looks for those names, and the resolve_ambiguous_calls transform happens before transform_names. Why does resolve_ambiguous_calls happen before transform_names? Because if my students made mistakes in the ingredients to an instruction they got overzealous errors from resolve_ambiguous_calls. Now this impacts 'put' as well, which is already overloaded for tables. Not sure what to do about this; I'm going to go back to the overzealous errors, and just teach students to visually scan past them for now. 2. I need addresses in a third place besides storing to containers and arrays, and managing the heap -- to synchronize routines. wait-for-location requires an address. Not sure what to do about this..
* 2804 - support stashing arraysKartik K. Agaram2016-03-211-0/+7
| | | | | Now to extend 'stash' for arrays, just extend array-to-text-line instead and perform the lookup inside it.
* 2735 - define recipes using 'def'Kartik K. Agaram2016-03-081-73/+73
| | | | | | | | | | | | 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.
* 2707Kartik K. Agaram2016-02-251-4/+0
|
* 2646 - redo static dispatch algorithmKartik K. Agaram2016-02-111-1/+2
| | | | | | | | The old approach of ad hoc boosts and penalties based on various features was repeatedly running into exceptions and bugs. New organization: multiple tiered scores interleaved with tie-breaks. The moment one tier yields one or more candidates, we stop scanning further tiers. Just break ties and return.
* 2640 - fix some testsKartik K. Agaram2016-02-081-7/+14
| | | | | | | | | | Thanks Caleb Couch for finding this. These tests were breaking only when some other code somewhere has already triggered the specialization of 'append' for numbers. How to test this? Perhaps the right fix is to warn when character variants are used with literals. Or only when there's also a generic variant that could conceivably be specialized for numbers.
* 2634Kartik K. Agaram2016-02-061-0/+6
|
* 2618 - support stashing booleansKartik K. Agaram2016-01-301-0/+8
|
* 2576 - distinguish allocated addresses from othersKartik K. Agaram2016-01-191-228/+228
| | | | | | | | | | | | | | | | 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.
* 2573 - check product type of 'new'Kartik K. Agaram2016-01-191-2/+2
| | | | | | | | | | | I realize that my current doesn't allow nesting a:b:c linear type syntax inside a dilated property. So you can't currently say: (recipe address:number) Need to fix that at some point. Non-trivial since linear syntax is oblivious to dilated syntax. I should probably make the dilated syntax more fundamental and introduce it at an earlier layer.
* 2559 - stop using 'next-ingredient' explicitlyKartik K. Agaram2016-01-121-12/+9
| | | | | I still need it in some situations because I have no way to set a non-zero default for an optional ingredient. Open question..
* 2606 - handle cycles inside stashKartik K. Agaram2015-11-291-1/+9
| | | | | | | | | The idea is that to-text-line should truncate blindly past some threshold, even if to-text isn't smart enough to avoid infinite loops. Maybe I should define a 'truncating buffer' which stops once it fills up. That would be an easy way to eliminate all infinite loops in to-text-line.
* 2483 - to-text can now handle listsKartik K. Agaram2015-11-271-0/+28
| | | | | 'append' also implicitly calls 'to-text' unless there's a better variant.
* 2477Kartik K. Agaram2015-11-271-5/+4
|
* 2476Kartik K. Agaram2015-11-271-10/+10
|
* 2474 - overload 'copy' and 'equal' for textKartik K. Agaram2015-11-221-15/+13
| | | | 2473 was the final bugfix holding this back.
* 2467 - rename 'string' to 'text' everywhereKartik K. Agaram2015-11-211-0/+1280
Not entirely happy with this. Maybe we'll find a better name. But at least it's an improvement. One part I *am* happy with is renaming string-replace to replace, string-append to append, etc. Overdue, now that we have static dispatch.