| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
More bugs fixed in generics to make this work.
|
| |
|
|
|
|
|
| |
Only Hide_errors when strictly necessary. In other places let test
failures directly show the unexpected error.
|
|
|
|
|
|
| |
Ok, we don't need that check after all, because the
type_ingredient_names.empty() check earlier in the layer prevents it
from ever triggering.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
But I realize that this won't actually streamline
replace_type_ingredients(), which needs that 'if (curr->left)
curr = curr->left' dance for an unrelated reason. So there's no
justification for entering into this big refactoring.
|
|
|
|
| |
It's only for transient debugging.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Attempts at improving the superficial looks of replace_type_ingredients().
These don't change the underlying complexity, but perhaps they help gain
confidence that all cases have been covered.
There's a mini version-history of prior attempts in tmp directories.
But really, the ugliness and duplication here stems from earlier design
choices:
a) Keeping type ordinals and type names in separate trees.
b) Even further back, choosing to duplicate types at properties[0].
|
|
|
|
|
|
|
|
|
| |
New test after yesterday's changes already passing, which helps me gain
some confidence.
There's some redundancy in the shape_shifting_container layer. I'm
probably testing the same things at the level of element_type(), MERGE,
and GET..
|
| |
|
|
|
|
| |
Memory leaks fixed.
|
|
|
|
|
|
|
|
|
|
| |
Still not done, though:
a) There's a few memory leaks to track down, including one in hash from
2668.
b) replace_type_ingredients has gotten *even* uglier. I need to rethink
it.
|
|
|
|
| |
Now I've fixed the type-checker, but it fails while running.
|
|
|
|
|
| |
Getting warmer. The unit tests for element_type now work, and the larger
test too seems to get further.
|
|
|
|
| |
Inline nth_type and nth_type_name.
|
|
|
|
|
| |
Make nth_type non-recursive in advance of hoisting the call into the
caller.
|
|
|
|
|
|
|
|
|
|
| |
Make it explicit that I don't currently intend to further replace type
ingredients inside replacements.
That might well make sense, but I've not thought up any use cases or
tests for it, and it seems excessive at the moment. And when I find bugs
I keep wondering if the repeated replace might be the problem. No
longer.
|
| |
|
|
|
|
|
| |
Also exercise the breaking part in a couple of the unit tests for
replace_type_ingredient. Now we need to fix all three.
|
|
|
|
|
|
| |
Fix the pending test while trying to fix the warning about 'merge'.
Warning still present.
|
|
|
|
|
|
|
|
|
|
|
| |
Eliminated a few holes, gained more clarity on the shape of others.
Maybe I was sleep-deprived, but this was really hard until I wrote a few
unit tests directly on replace_type_ingredient.
Still one flaw remaining: the type-checker isn't smart enough to handle
'merge' for all the new cases. Tests pass since we don't use those
features outside C++ tests yet.
|
|
|
|
| |
I've been gradually Greenspunning reagents. Just go all the way.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Another gotcha uncovered in the process of sorting out the previous
commit: I keep using eof() but forgetting that there are two other
states an istream can get into. Just never use eof().
|
|
|
|
|
| |
Starting to leave debug prints around once again, just in case one of
them is worth promoting to the trace..
|
| |
|
|
More evocative, less jargony.
|