| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
Always show recipe name where error occurred. But don't show internal
'interactive' name for sandboxes, that's just confusing.
What started out as warnings are now ossifying into errors that halt all
execution. Is this how things went with C and Unix as well?
|
| |
|
|
|
|
|
|
|
|
|
| |
Front-loads it a bit more than I'd like, but the payoff is that other
recipes will now be able to describe the type checks right next to their
operation.
I'm also introducing a new use of /raw with literals to indicate unsafe
typecasts.
|
| |
|
|
|
|
|
| |
That way we only have to check each static instruction once, rather than
every time it runs.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Ingredients of 'main' are always strings (type address:array:character),
and are delineated from .mu files to load by a "--", e.g.:
$ ./mu x.mu y.mu -- a b c
Here 'main' must be defined in one of x.mu and y.mu, and will receive
the ingredients "a", "b", and "c".
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Follow-up to 2147, which switched transform_all to only run once, after
loading all layers.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
edit.mu is now over 9k lines long. Only 2.6k of them are code. Plan:
chunk it into multiple files inside say an 'edit' directory. Then you
can run it with:
$ mu edit/*
I also want to be able to test just a few layers:
$ mu edit/00[1-5]*
When I try to chunk it into files, the first issue I run into is that
before/after can't refer back to previous layers. Solution:
transform_all at one shot after loading all files.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Termbox had been taking shortcuts when it thinks the screen hasn't
changed, which doesn't work if some other process messes up the screen.
The Go version has a Sync method in addition to Flush/tb_present for
precisely this eventuality. But it feels like an unnecessary
optimization given C's general speed. Just drop it altogether.
---
This took me a long time to track down, and interestingly I found myself
writing a new tracing primitive before I remembered how to selectively
trace just certain layers during manual tests. I'm scared of generating
traces not because of performance but because of the visual noise. Be
aware of this. I'm going to clean up $log now.
Maybe I should also stop using $print..
|
|
|
|
|
|
|
| |
If I try to run a single test and it triggers an error the trace gets
saved in the current directory, as if I was trying to log an interactive
run. Then when I try to rerun the test the trace tries to load as mu
code, and hilarity ensues. Just log interactive runs in .traces/ as well.
|
|
|
|
| |
Turn off profiling.
|
| |
|
|
|
|
|
| |
Still worth trying to optimize, though. Current lowest-hanging fruit:
stop having index/index-address copy entire arrays around.
|
| |
|
| |
|
|
|
|
|
| |
The slowness of the environment -- even for code spanning just a couple
hundred lines -- is the biggest priority right now.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Still iterating on the right way to handle incorrect number of
ingredients. My first idea of creating null results doesn't really work
once they're used in later instructions. Just add a warning at one place
in the run loop, but otherwise only add products when there's something
to save in them.
Undoes some work around commit 1886.
|
|
|
|
|
|
|
| |
Region to click on to edit is now reduced to just the menu bar for the
sandbox (excluding the 'x' for deleting the sandbox). The symmetry there
might be useful, but we'll see if the relative click area is
in line with how commonly the actions are performed.
|
|
|
|
|
| |
Don't swamp edit.mu with warnings when something writes to address 0.
Warn once, then keep going.
|
|
|
|
| |
That should avoid many issues with typos in names.
|
|
|
|
| |
First step to reducing typing burden. Next step: inferring types.
|
|
|
|
|
| |
Forgot to show screen after delete, and 'release' events were causing
double deletions.
|
|
|
|
|
|
|
|
|
| |
More verbose, but it saves trouble when debugging; there's never
something you thought should be traced but just never came out the other
end.
Also got rid of fatal errors entirely. Everything's a warning now, and
code after a warning isn't guaranteed to run.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Very rudimentary ability to read/write from file+version control. No
control over name.
Recipes now saved. But what to do about sandboxes?
|
|
|
|
|
|
|
|
|
| |
Speeds up edit.mu tests by 10x, and shrinks memory usage by 100x.
We need a more efficient implementation of traces, but we can keep going
for now.
We didn't really need to reclaim memory just yet, after all. Mu is
pretty memory-efficient.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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!
|
|
|
|
|
| |
It should now be easy to do dynamic dispatch, create higher-order
functions, etc.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Only core layers currently passing. Console apps are probably still
broken.
|
| |
|
| |
|
| |
|