about summary refs log tree commit diff stats
path: root/020run.cc
Commit message (Collapse)AuthorAgeFilesLines
* 2461Kartik K. Agaram2015-11-191-4/+2
|
* 2416Kartik K. Agaram2015-11-101-1/+1
|
* 2406Kartik K. Agaram2015-11-081-0/+4
| | | | | One new issue: the traces for all tests are perturbed by the .mu files we choose to load.
* 2398Kartik K. Agaram2015-11-081-2/+2
|
* 2396 - edit working again!!Kartik K. Agaram2015-11-081-2/+2
| | | | | | | | | | | 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.
* 2390 - undo 2389Kartik K. Agaram2015-11-071-2/+2
| | | | Ooh, I think I see a solution.
* 2389Kartik K. Agaram2015-11-071-2/+2
| | | | | | | | Now we're back to trying to rerunning idempotent transforms on specialized recipes. Still doesn't work, but at least we don't see different results depending on whether the trace is enabled inside the test or right at the start. That got fixed by the more disciplined insertion into maps, looks like.
* 2388 - final layer of edit/ loaded successfullyKartik K. Agaram2015-11-071-0/+1
|
* 2377 - stop using operator[] in mapKartik K. Agaram2015-11-061-9/+9
| | | | | | | | | | | | | | | | 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.
* 2321 - more preparations for static dispatchKartik K. Agaram2015-10-291-5/+0
| | | | | Deduce operation id from name during transform rather than load, so that earlier transforms have a chance to modify the name.
* 2315Kartik K. Agaram2015-10-291-2/+2
|
* 2314 - final tweaks to traceKartik K. Agaram2015-10-291-0/+1
| | | | | | | | I checked these commands: $ mu x.mu $ grep "===" .traces/interactive $ grep "===\|---" .traces/interactive
* 2313Kartik K. Agaram2015-10-291-2/+2
|
* 2310 - add some more tracingKartik K. Agaram2015-10-291-0/+3
| | | | | | | | | | | I've been growing lax on white-box testing when it's one of the three big thrusts of this whole effort. Perhaps it was because I got too obsessed with keeping traces stable and didn't notice that stable doesn't mean "not changing". Or perhaps it's because I still don't have a zoomable trace browser that can parse traces from disk. Or perhaps $trace-browser is too clunky and discourages me from using it. Regardless, I need to make the trace useable again before I work much more on the next few rewriting transforms.
* 2301 - test_all_layers fixesKartik K. Agaram2015-10-281-2/+9
|
* 2277 - reagents now have a tree of typesKartik K. Agaram2015-10-251-8/+11
|
* 2272Kartik K. Agaram2015-10-191-1/+0
|
* 2271 - bugfix: traces cross-contaminating errorsKartik K. Agaram2015-10-191-1/+1
| | | | | | | | | | | | | | | | | | There were several places where we push a call on to a routine without incrementing call-stack depth, which was used to compute the depth at which to trace an instruction. So sometimes you ended up one depth lower than you started a call with. Do this enough times and instructions that should be traced at level 100 end up at level 0 and pop up as errors. Solution: since call-stack depth is only used for tracing, include it in the trace stream and make sure we reset it along with the trace stream. Then catch all places where we forget to increment call-stack depth and make sure we catch such places in the future. When I first ran into this with Caleb I thought there must be some way that we're writing some output into the warnings result. I didn't recognize that the spurious output as part of the trace, just at the wrong level.
* 2258 - separate warnings from errorsKartik K. Agaram2015-10-061-6/+6
| | | | | | | At the lowest level I'm reluctantly starting to see the need for errors that stop the program in its tracks. Only way to avoid memory corruption and security issues. But beyond that core I still want to be as lenient as possible at higher levels of abstraction.
* 2246Kartik K. Agaram2015-10-051-1/+1
|
* 2238 - dump recipes after tanglingKartik K. Agaram2015-10-041-0/+1
|
* 2226 - standardize warning formatKartik K. Agaram2015-10-011-1/+6
| | | | | | | | 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?
* 2221Kartik K. Agaram2015-09-301-1/+0
|
* 2218 - check types in instructions much earlierKartik K. Agaram2015-09-301-0/+363
| | | | | | | | | 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.
* 2214Kartik K. Agaram2015-09-281-362/+0
|
* 2213 - start moving type checks out of 'run'Kartik K. Agaram2015-09-281-39/+0
| | | | | That way we only have to check each static instruction once, rather than every time it runs.
* 2209Kartik K. Agaram2015-09-261-4/+4
|
* 2199 - stop printing numbers in scientific notationKartik K. Agaram2015-09-141-2/+2
| | | | | | | | | | | 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.
* 2196Kartik K. Agaram2015-09-141-0/+1
|
* 2171 - 'main' can take ingredients from the shellKartik K. Agaram2015-09-061-4/+15
| | | | | | | | | | 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".
* 2170Kartik K. Agaram2015-09-061-15/+22
|
* 2169Kartik K. Agaram2015-09-061-1/+0
|
* 2168Kartik K. Agaram2015-09-061-1/+0
|
* 2155 - `mu` can now load all files in a directoryKartik K. Agaram2015-09-051-0/+25
|
* 2154 - check types only after loading all layersKartik K. Agaram2015-09-051-1/+1
| | | | | Follow-up to 2147, which switched transform_all to only run once, after loading all layers.
* 2152 - never warn about redefining main in testsKartik K. Agaram2015-09-051-0/+1
|
* 2147 - starting to split edit.mu into layersKartik K. Agaram2015-09-051-1/+2
| | | | | | | | | | | | | | | | 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.
* 2126Kartik K. Agaram2015-09-011-1/+1
|
* 2095Kartik K. Agaram2015-08-281-11/+9
| | | | | | | | | | | | 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.
* 2078 - update entire screen on tb_present()Kartik K. Agaram2015-08-261-3/+3
| | | | | | | | | | | | | | | | | | | 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..
* 2052Kartik K. Agaram2015-08-211-1/+1
| | | | | | | 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.
* 2005Kartik K. Agaram2015-08-141-4/+4
| | | | Turn off profiling.
* 2000 - stop constantly copying large arrays aroundKartik K. Agaram2015-08-141-4/+11
|
* 1999Kartik K. Agaram2015-08-141-0/+12
| | | | | Still worth trying to optimize, though. Current lowest-hanging fruit: stop having index/index-address copy entire arrays around.
* 1997Kartik K. Agaram2015-08-141-2/+1
|
* 1996Kartik K. Agaram2015-08-141-8/+8
|
* 1995 - simple profile of instruction spendKartik K. Agaram2015-08-141-0/+11
| | | | | The slowness of the environment -- even for code spanning just a couple hundred lines -- is the biggest priority right now.
* 1973Kartik K. Agaram2015-08-101-0/+27
|
* 1951 - warn when copying scalars to arrays, etc.Kartik K. Agaram2015-08-071-0/+40
|
* 1933 - bugfix: backspace now works on right sideKartik K. Agaram2015-08-041-12/+1
|