| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
One new issue: the traces for all tests are perturbed by the .mu files we
choose to load.
|
| |
|
| |
|
|
|
|
|
| |
Fix that stray issue with a better phase ordering.
Another thing I'm not testing.
|
|
|
|
|
|
|
|
|
|
|
| |
Still some spurious warnings.
This was an insane experience building out generics. Time to reflect.
Where did I go wrong? How did I end up writing no tests? Let's take some
time and go over the last 50 commits with a fine-tooth comb.
Generics seems to be the feature that has moved mu from a VM project to
a compiler project.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Got that idea to work with a special-case for 'new'. Requires parsing
new's first ingredient, performing the replacement, and then turning it
back into a string. I didn't want to replace NEW with ALLOCATE right
here, because then it messes with my invariant that transform should
never see a naked ALLOCATE.
Layer 11 still not working, but everything else is. Let's clean up
before we diagnose the new breakage.
|
|
|
|
| |
Yup, type ingredients were taking size 1 by default.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
No, my idea was abortive. My new plan was to run no transforms for
generic recipes, and instead only run them on concrete specializations
as they're created.
The trouble with this approach is that new contains a type specification
in its ingredient which apparently needed to be transformed into an
allocate before specialization.
But no, how was that working? How was new computing size based on type
ingredients? It might have been wrong all along.
|
|
|
|
| |
Starting to leave commented out prints again out of desperation.
|
| |
|
|
|
|
|
|
|
|
| |
New assertions still failing during tests.
This whole implementation of generic recipes is like an extended spike.
I don't have nearly enough tests. Ideally I'd have confidence in
generics once layer 59 passed its tests.
|
|
|
|
|
|
|
| |
Commands run:
$ sed -i 's/\([^. (]*\)\.find(\([^)]*\)) != [^.]*\.end()/contains_key(\1, \2)/g' 0[^0]*cc
$ sed -i 's/\([^. (]*\)\.find(\([^)]*\)) == [^.]*\.end()/!contains_key(\1, \2)/g' 0[^0]*cc
|
|
|
|
|
|
| |
Now we're starting to run up against the misbehavior introduced by
generics: Type tries to insert rows for type ingredients. That is a
no-no.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I'm still seeing all sorts of failures in turning on layer 11 of edit/,
so I'm backing away and nailing down every culprit I run into. First up:
stop accidentally inserting empty objects into maps during lookups.
Commands run:
$ sed -i 's/\(Recipe_ordinal\|Recipe\|Type_ordinal\|Type\|Memory\)\[\([^]]*\)\] = \(.*\);/put(\1, \2, \3);/' 0[1-9]*
$ vi 075scenario_console.cc # manually fix up Memory[Memory[CONSOLE]]
$ sed -i 's/\(Memory\)\[\([^]]*\)\]/get_or_insert(\1, \2)/' 0[1-9]*
$ sed -i 's/\(Recipe_ordinal\|Type_ordinal\)\[\([^]]*\)\]/get(\1, \2)/' 0[1-9]*
$ sed -i 's/\(Recipe\|Type\)\[\([^]]*\)\]/get(\1, \2)/' 0[1-9]*
Now mu dies pretty quickly because of all the places I try to lookup a
missing value.
|
| |
|
| |
|
|
|
|
|
| |
Deduce operation id from name during transform rather than load, so that
earlier transforms have a chance to modify the name.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Once a student has gotten used to recipes and ingredients using the
staged 'next-ingredient' approach there's no reason to avoid
conventional function headers. As an added bonus we can now:
a) check that all 'reply' instructions in a recipe are consistent
b) deduce what to reply without needing to say so everytime
c) start thinking about type parameters for recipes (generic functions!)
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Switch format for tracing reagents in preparation for trees rather than
arrays of properties.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Turns out the default format for printing floating point numbers is
neither 'scientific' nor 'fixed' even though those are the only two
options offered. Reading the C++ standard I found out that the default
(modulo locale changes) is basically the same as the printf "%g" format.
And "%g" is basically the shorter of:
a) %f with trailing zeros trimmed
b) %e
So we'll just do %f and trim trailing zeros.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Finally terminate the experiment of keeping debug prints around. I'm
also going to give up on maintaining counts.
What we really need is two kinds of tracing:
a) For tests, just the domain-specific facts, organized by labels.
b) For debugging, just transient dumps to stdout.
b) only works if stdout is clean by default.
Hmm, I think this means 'stash' should be the transient kind of trace.
|
|
|
|
|
| |
Traces were changing based on whether I was loading a .mu file with
'main' or not.
|
|
|
|
|
| |
Not strictly necessary, but it might help me stage the introduction of
arrays and 'new'.
|
|
|
|
|
|
| |
Turns out it is indeed useful to insert code at multiple duplicate
labels within a single (long) recipe. Like handle-keyboard-event in
edit.mu.
|
| |
|
|
|
|
|
| |
Also, turns out I haven't been building 999spaces.cc in my default
build. Now fixed.
|
|
|
|
|
|
|
| |
Very rudimentary ability to read/write from file+version control. No
control over name.
Recipes now saved. But what to do about sandboxes?
|
|
|
|
|
| |
Profiling shows the bulk of time is spent in read_memory, canonize,
absolutize. But I'm not sure how to optimize those places.
|
|
|
|
| |
Quick hack for demo at balisp meetup today.
|
| |
|
|
|
|
|
|
|
| |
It comes up pretty early in the codebase, but hopefully won't come up
in the mu level until we get to higher-order recipes. Potentially
intimidating name, but such prime real estate with no confusing
overloadings in other projects!
|
| |
|
| |
|
|
|
|
| |
Make it possible to check multi-line string literals in the trace.
|
|
|
|
| |
More concise traces for literal strings.
|
| |
|
| |
|