about summary refs log tree commit diff stats
path: root/059shape_shifting_recipe.cc
Commit message (Collapse)AuthorAgeFilesLines
* 2778 - fix all layersKartik K. Agaram2016-03-141-974/+0
|
* 2773 - switch to 'int'Kartik K. Agaram2016-03-131-40/+40
| | | | This should eradicate the issue of 2771.
* 2735 - define recipes using 'def'Kartik K. Agaram2016-03-081-77/+77
| | | | | | | | | | | | 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.
* 2720 - hash table teetering but aliveKartik K. Agaram2016-02-281-0/+1
| | | | More bugs fixed in generics to make this work.
* 2719 - improvements to genericsKartik K. Agaram2016-02-281-17/+65
|
* 2712Kartik K. Agaram2016-02-261-8/+8
|
* 2709Kartik K. Agaram2016-02-251-1/+0
| | | | | Only Hide_errors when strictly necessary. In other places let test failures directly show the unexpected error.
* 2703Kartik K. Agaram2016-02-251-1/+1
|
* 2696 - start work on hash 'table' data structureKartik K. Agaram2016-02-241-4/+0
| | | | | | Very cool that I thought I didn't support type ingredients in arbitrary positions in container definitions, but I really did. I just didn't have a test for it, and now I do.
* 2689 - fix a memory leakKartik K. Agaram2016-02-221-1/+1
| | | | | | | That same line that caused me so much grief in 2681! I just ran edit/ through valgrind for the first time, and found more memory leaks breeding while I wasn't looking. That's next.
* 2685Kartik K. Agaram2016-02-221-1/+1
|
* 2682Kartik K. Agaram2016-02-211-3/+3
|
* 2681 - drop reagent types from reagent propertiesKartik K. Agaram2016-02-211-66/+99
| | | | | | | | | | | | | | | | | All my attempts at staging this change failed with this humongous commit that took all day and involved debugging three monstrous bugs. Two of the bugs had to do with forgetting to check the type name in the implementation of shape-shifting recipes. Bug #2 in particular would cause core tests in layer 59 to fail -- only when I loaded up edit/! It got me to just hack directly on mu.cc until I figured out the cause (snapshot saved in mu.cc.modified). The problem turned out to be that I accidentally saved a type ingredient in the Type table during specialization. Now I know that that can be very bad. I've checked the traces for any stray type numbers (rather than names). I also found what might be a bug from last November (labeled TODO), but we'll verify after this commit.
* 2679Kartik K. Agaram2016-02-201-0/+22
|
* 2678Kartik K. Agaram2016-02-201-32/+32
| | | | | | | Start using type names from the type tree rather than the property tree in most places. Hopefully the only occurrences of 'properties.at(0).second' left are ones where we're managing it. Next we can stop writing to it.
* 2677Kartik K. Agaram2016-02-201-1/+1
| | | | Include type names in the type tree. Though we aren't using them yet.
* 2671 - never use debug_string() in tracesKartik K. Agaram2016-02-191-21/+1
| | | | It's only for transient debugging.
* 2670 - better names for string conversionsKartik K. Agaram2016-02-191-6/+6
| | | | | | to_string(): relatively stable fields only; for trace() debug_string(): all fields; for debugging inspect(): for a form that can be parsed back later
* 2685Kartik K. Agaram2016-02-191-5/+5
| | | | | | | | | | | | | | | | Stack of plans for cleaning up replace_type_ingredients() and a couple of other things, from main problem to subproblems: include type names in the type_tree rather than in the separate properties vector make type_tree and string_tree real cons cells, with separate leaf nodes redo the vocabulary for dumping various objects: do we really need to_string and debug_string? can we have a version with *all* information? can we have to_string not call debug_string? This commit nibbles at the edges of the final task, switching from member method syntax to global function like almost everything else. I'm mostly using methods just for STL in this project.
* 2649Kartik K. Agaram2016-02-111-1/+1
| | | | More tweaks to the trace after all my debugging.
* 2648Kartik K. Agaram2016-02-111-1/+1
|
* 2647 - more tests while improving commit 2640Kartik K. Agaram2016-02-111-0/+72
| | | | | Very cool that these passed without trouble after the previous change. This is on the right track.
* 2646 - redo static dispatch algorithmKartik K. Agaram2016-02-111-91/+90
| | | | | | | | 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.
* 2644Kartik K. Agaram2016-02-101-1/+1
| | | | More tweaking of traces as I debug recipe specialization.
* 2643Kartik K. Agaram2016-02-101-1/+1
|
* 2642Kartik K. Agaram2016-02-091-4/+2
|
* 2621 - bugfix: empty shape-shifting recipesKartik K. Agaram2016-01-301-6/+17
| | | | | My transform pipeline ignores empty recipes, but when I specialized shape-shifting ones I forgot that check.
* 2620Kartik K. Agaram2016-01-301-20/+20
| | | | | I was finding it hard to wrap around the directionality of calls with 'lhs' and 'rhs'. Seems to work better with 'to' and 'from'. Let's see.
* 2596 - experiment: no unique addresses in callsKartik K. Agaram2016-01-231-3/+3
| | | | | | | | | | Reading http://www.jonathanturner.org/2016/01/rust-and-blub-paradox.html, I realize there's nothing currently stopping mu programs from taking a unique (non-shared) address into a shared allocation, abandoning the allocation and being left with an invalid address. No fix for this yet, but let's try to minimize its effect by limiting lifetimes of unique addresses. We really should only be using them to write to array or container elements.
* 2576 - distinguish allocated addresses from othersKartik K. Agaram2016-01-191-14/+14
| | | | | | | | | | | | | | | | 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.
* 2553 - keep failed specializations from generating spurious errorsKartik K. Agaram2015-12-281-7/+3
| | | | Thanks Caleb Couch.
* 2552Kartik K. Agaram2015-12-281-4/+4
|
* three bugs fixedKartik K. Agaram2015-12-151-5/+26
| | | | | | | | | | | | | | | | | - notes bug in edit/ triggers in immutable but not master branch bug triggered by changes to layer 059: we're finding an unspecialized call to 'length' in 'append_6' hard to debug because trace isn't complete just bring out the big hammer: use a new log file length_2 from recipes.mu is not being deleted (bug #1) so reload doesn't switch length to length_2 when variant_already_exists (bug #2) so we end up saving in Recipe for a primitive ordinal so no valid specialization is found for 'length' (bug #3) why doesn't it trigger in a non-interactive scenario? argh, wasn't checking for an empty line at end. ok, confidence restored.
* layer 3 of edit/ now workingKartik K. Agaram2015-12-151-0/+12
| | | | | Now I complain before running if a call somewhere doesn't line up with its ingredients, or if no specialization can be made to match it.
* 2622Kartik K. Agaram2015-12-131-8/+8
|
* 2489 - another ambiguous specializationKartik K. Agaram2015-11-281-5/+49
|
* 2486Kartik K. Agaram2015-11-271-2/+3
| | | | | More cleanup. Haven't bothered to figure out why the trace for specialize_with_literal_4 is repeatedly perturbed.
* 2484Kartik K. Agaram2015-11-271-2/+1
| | | | | Eliminate one of several hacky type-check helpers; they've been proliferating lately.
* 2483 - to-text can now handle listsKartik K. Agaram2015-11-271-8/+30
| | | | | 'append' also implicitly calls 'to-text' unless there's a better variant.
* 2480Kartik K. Agaram2015-11-271-4/+11
| | | | | | | A long-standing question resolved: why specializations sometimes skipped some names. Turns out cleanup is incomplete if Recipe_ordinal and Recipe aren't exactly lined up with each other, and the early exit in new_variant was breaking that constraint.
* 2479 - bugfix: recursive shape-shifting recipesKartik K. Agaram2015-11-271-6/+24
|
* 2472Kartik K. Agaram2015-11-221-12/+0
|
* 2464: edit/: update errors in shape-shifting recipesKartik K. Agaram2015-11-191-2/+15
| | | | | Requires carefully deleting specializations so that they can be reintroduced each time.
* 2456Kartik K. Agaram2015-11-171-0/+19
|
* 2455 - first fix of another batch of crashesKartik K. Agaram2015-11-171-14/+37
|
* 2449Kartik K. Agaram2015-11-151-0/+1
|
* 2445 - dispatch between shape-shifting variantsKartik K. Agaram2015-11-151-5/+103
| | | | | Starting to leave debug prints around once again, just in case one of them is worth promoting to the trace..
* 2444Kartik K. Agaram2015-11-151-0/+12
| | | | Yet another bugfix as I trace through the last session with Caleb.
* 2443Kartik K. Agaram2015-11-151-12/+28
| | | | | Another little bit of polish: if a call doesn't do enough for a complete specialization, show a decent error message and above all: don't die!
* 2442Kartik K. Agaram2015-11-151-1/+17
| | | | | | Fix the drawback in the previous commit: if an ingredient is just a literal 0 we'll skip its type-checking and hope to map type ingredients elsewhere.