| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
Ah, I was indeed double-rendering, but somehow it was still hard to see
the problem past that preliminary diagnosis.
Still two failing tests to fix.
|
|
|
|
| |
$ ./mu test run-instruction-and-print-warnings
|
|
|
|
|
|
|
|
|
|
| |
Still ugly as hell. Some tests failing, but they're most likely
wrong. We need to test cursor positioning at the level of the
environment and take it away from the responsibilities of individual
editors. Also bring back the line at the bottom of each editor.
The non-test run ('main' in edit.mu) is completely borked. Sluggish as
hell, and I can't seem to switch focus to the sandbox editor.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
We will need many other forms of isolation for these. For starters we're
going to have to replace most asserts with warnings that can be traced
so that the environment doesn't crash because of illegal code typed into
it.
New test is still failing. Just getting it to fail right was hard
enough.
|
|
|
|
|
|
|
| |
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!
|
| |
|
|
|
|
|
| |
Requires better support for special variable names in scenarios like
'screen' and 'console'.
|
|
|
|
| |
For starters start making the test fail when building until layer 41.
|
|
|
|
|
|
|
|
| |
repl.mu now passing again. But still I have concerns:
a) Doubling backslashes in tests. Hard to tell how many levels to add.
b) I think the read-key interface needs to go. But then how do we handle
send-keys-to-channel and other flows like that in the chessboard app?
|
|
|
|
|
|
|
|
| |
chessboard finally passing all its tests. What made this hard was that
for some reason one of the background routines in the main chessboard
test wasn't terminating like it used to. And so it was polluting *later*
tests. Just clean up that source of contamination for now. Later we'll
think about routine termination.
|
|
|
|
|
| |
Some tests weren't actually running for the past 5 days.
Performed 5 why's.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our new heuristic is: all string literals are the same. If they contain
newline before non-whitespace, we scan for comments assuming there might
be code inside:
foofoofoo [
... # ']' inside comment ignored
]
If they contain non-whitespace first, then we ignore comments assuming
it's just a regular string:
foofoofoo [abc#def] # valid string literal
The big hole in this approach:
foofoofoo [ # what about comments here containing ']'?
... # abc
]
Currently this reads as a 'code comment' and terminates before the
newline or '?' and will probably trigger errors down the line.
Temporary workaround: don't start code strings with a comment on the
same line as the '['. Eventually we'll tighten up the logic.
We're still not using the new heuristic in scenarios, but that's up
next.
|
|
|
|
| |
Cleaner to delegate as much as possible to slurp_quoted.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Required fixing two levels of bugs:
a) The hack in tangle to drop initial comments a '%' directive..
b) ..was masking a bug where run_mu_scenario wasn't robust to initial
comments.
Mildly concerned that neither of the sub-issues have their own tests,
but I'm just removing hacks, and writing tests for that throwaway
function like run_mu_scenario seems pointless. Instead I've solved the
problem by disallowing comments before '%' directives.
I've also taken this opportunity to at least try to document the
'scenarios' and '%' directives at the first layer where they appear.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Many features of my trace layer were just inherited blindly from wart
but lying unused in this project. Throw them out while we're at it.
|
|
|
|
| |
It was all going to laboriously writing out 300+ MB to disk.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
After like 40 seconds (because of the 120-column screen), but whatever.
The final bug was that clear-screen wasn't actually working right for
fake screens.
(The trace is too large for github, so I'm going to leave it out for
now.)
|
|
|
|
| |
Drop the #$%# 'encapsulated' stack ADT.
|
|
|
|
| |
..now that we support non-integers.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I added one test to check that divide can return a float, then hacked at
the rippling failures across the entire entire codebase until all tests
pass. Now I need to look at the changes I made and see if there's a
system to them, identify other places that I missed, and figure out the
best way to cover all cases. I also need to show real rather than
encoded values in the traces, but I can't use value() inside reagent
methods because of the name clash with the member variable. So let's
take a snapshot before we attempt any refactoring. This was non-trivial
to get right.
Even if I convince myself that I've gotten it right, I might back this
all out if I can't easily *persuade others* that I've gotten it right.
|
| |
|
| |
|
|
|
|
|
| |
Also a bugfix in break to label, because I noticed the screen wasn't
being cleaned up on quit.
|
|
|
|
|
|
| |
Lots mixed into this commit:
some off-by-one errors in display.cc
a new transform to translate jump labels that I'd somehow never gotten around to supporting
|
|
|
|
|
|
|
|
|
| |
Useful check:
$ grep "[^ '\"]\[[^\"]" *.cc \
|perl -pwe 's/\Wargv\[|\WTests\[|\Wframe\[|\WMemory\[|\WName\[|\WSurrounding_space\[|\WRecipe\[|\WType\[|\WRecipe_number\[|\WType_number\[|\WBefore_fragments\[|\WAfter_fragments\[//g' \
|perl -pwe 's/\Wargv\[|\WTests\[|\Wframe\[|\WMemory\[|\WName\[|\WSurrounding_space\[|\WRecipe\[|\WType\[|\WRecipe_number\[|\WType_number\[|\WBefore_fragments\[|\WAfter_fragments\[//g' \
|grep '[^ ]\['
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All primitives now always write to all their products. If a product is
not used that's fine, but if an instruction seems to expect too many
products mu will complain.
In the process, many primitives can operate on more than two ingredients
where it seems intuitive. You can add or divide more than two numbers
together, copy or negate multiple corresponding locations, etc.
There's one remaining bit of ugliness. Some instructions like
get/get-address, index/index-address, wait-for-location, these can
unnecessarily load values from memory when they don't need to.
Useful vim commands:
%s/ingredients\[\([^\]]*\)\]/ingredients.at(\1)/gc
%s/products\[\([^\]]*\)\]/products.at(\1)/gc
.,$s/\[\(.\)]/.at(\1)/gc
|
|
I've tried to update the Readme, but there are at least a couple of issues.
|