about summary refs log tree commit diff stats
path: root/081run_interactive.cc
Commit message (Collapse)AuthorAgeFilesLines
* 2312Kartik K. Agaram2015-10-291-1/+1
|
* 2271 - bugfix: traces cross-contaminating errorsKartik K. Agaram2015-10-191-0/+5
| | | | | | | | | | | | | | | | | | 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.
* 2269Kartik K. Agaram2015-10-091-1/+12
| | | | Another bugfix. Thanks Jack and Caleb Couch.
* 2262 - strengthen some type checksKartik K. Agaram2015-10-071-10/+11
|
* 2260 - start tracing by depth rather than labelKartik K. Agaram2015-10-061-19/+7
| | | | Now we can collect all traces, just modulating the depth.
* 2258 - separate warnings from errorsKartik K. Agaram2015-10-061-17/+49
| | | | | | | 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.
* 2247 - type-check products of non-primitive recipesKartik K. Agaram2015-10-051-3/+3
| | | | | | | | We still can't check ingredient types, and even this is still a run-time check. We'll need to start tracking recipe signatures at some point. I've had to introduce a hack called /skiptypecheck. Time to get generics working.
* 2232Kartik K. Agaram2015-10-011-10/+38
|
* 2226 - standardize warning formatKartik K. Agaram2015-10-011-4/+8
| | | | | | | | 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?
* 2202 - don't let editor die on syntax errorsKartik K. Agaram2015-09-151-34/+48
| | | | | Bugfix to 2186. I hadn't taken care of 'reload' as cleanly as I had 'run-interactive'.
* 2199 - stop printing numbers in scientific notationKartik K. Agaram2015-09-141-3/+3
| | | | | | | | | | | 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.
* 2186 - kill the current routine on first errorKartik K. Agaram2015-09-121-4/+10
| | | | | Exception: allow run-interactive to continue even if it encounters errors in parsing its ingredient as mu code.
* 2165Kartik K. Agaram2015-09-051-1/+1
|
* 2125 - bugfix for containers in the environmentKartik K. Agaram2015-09-011-0/+5
| | | | | We don't want to add duplicate fields to the container everytime we hit F4.
* 2095Kartik K. Agaram2015-08-281-4/+0
| | | | | | | | | | | | 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.
* 2074 - don't die on over-long errorsKartik K. Agaram2015-08-241-3/+14
|
* 2073Kartik K. Agaram2015-08-241-1/+10
|
* 2072Kartik K. Agaram2015-08-241-1/+9
| | | | | Right after I lectured Caleb about not just adding random deltas to make a program correct, too.
* 2070Kartik K. Agaram2015-08-241-1/+1
|
* 2063Kartik K. Agaram2015-08-241-1/+1
| | | | Extend deadline for run-interactive.
* 2039 - warn on unbalanced '['Kartik K. Agaram2015-08-191-1/+2
|
* 2024 - mu environment now handles infinite loops gracefullyKartik K. Agaram2015-08-161-2/+6
|
* 2022 - run sandboxes in separate routinesKartik K. Agaram2015-08-161-36/+88
|
* 2021Kartik K. Agaram2015-08-161-5/+3
|
* 2020Kartik K. Agaram2015-08-161-11/+2
|
* 2019 - simplify run-interactive furtherKartik K. Agaram2015-08-161-41/+25
| | | | | | | | | | | | | | | | | This time I'm getting rid of all the intricate SCREEN hacking. Now run-interactive is idiomatic: it creates a recipe on the fly, runs it, and returns various results and stats about it. One big consequence of the recipe now running interactively inside a local-scope: you can't just use numeric addresses anymore -- not without using /raw. Fixed one of the tests to reflect this. I realize now that I don't really want my students to be using raw addresses in their sandboxes, even if that was my idiom for lower-level scenarios. Hopefully running sandboxes in separate (synchronous) routines will be easy now.
* 2018Kartik K. Agaram2015-08-151-1/+0
| | | | | Still trying to minimize the work around run-interactive so I can build it with a sandboxed routine rather than a call in editor space.
* 2017Kartik K. Agaram2015-08-151-11/+11
|
* 1993Kartik K. Agaram2015-08-141-1/+4
| | | | Thanks Caleb Couch.
* 1975 - let's start using traces in lessonsKartik K. Agaram2015-08-101-18/+0
| | | | | More friendly way to 'stash' stuff in the trace so that you can toggle lines of code to see their stashed traces.
* 1923Kartik K. Agaram2015-08-021-2/+10
| | | | | | | | | | 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.
* 1921 - show trace by clicking on codeKartik K. Agaram2015-08-021-7/+20
| | | | | | | 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.
* 1919Kartik K. Agaram2015-08-021-6/+6
| | | | | Generalize a little layer as a first step to providing traces for other layers.
* 1913 - save expected response for each sandboxKartik K. Agaram2015-08-011-2/+2
|
* 1886 - gracefully handle malformed ingredientsKartik K. Agaram2015-07-291-2/+2
| | | | | | | | For example: x:number <- index y:address:array:number, 3 (forgetting to do a lookup) Thanks Caleb Couch.
* 1869 - rename the /deref property to /lookupKartik K. Agaram2015-07-281-3/+3
| | | | Should be a little bit more mnemonic.
* 1868 - start using naked literals everywhereKartik K. Agaram2015-07-281-3/+3
| | | | First step to reducing typing burden. Next step: inferring types.
* 1852Kartik K. Agaram2015-07-251-1/+1
|
* 1849Kartik K. Agaram2015-07-251-1/+1
|
* 1848 - core instructions now check for ingredientsKartik K. Agaram2015-07-251-3/+16
| | | | Also standardized warnings.
* 1846Kartik K. Agaram2015-07-251-2/+2
|
* 1841 - reenable old layersKartik K. Agaram2015-07-241-6/+2
|
* 1826 - edit: start carefully showing all errorsKartik K. Agaram2015-07-211-0/+11
| | | | | | | | | | | | | | | | | | | | | Eventually we might be able to get rid of die entirely. This is just a preliminary stab at a random error. In the process I ran into two issues that have impeded debugging before: a) Naming conflicts within scenarios are a real no-no. I need to warn on them, but the rules are getting complicated: Always print warnings on redefine But not in interactive mode Or in scenarios checking warning behavior Unless the scenario recipe itself is overridden b) Now that we've added collect_layers and a long time can go between traces, debugging is a minefield because trace lines don't print to screen immediately after they're created. Need to do something about that. Maybe explicitly trigger collection by tracing '\n' or something. These are the next two items on my todo list.
* 1822Kartik K. Agaram2015-07-191-7/+7
|
* 1802 - cleanupKartik K. Agaram2015-07-171-7/+3
|
* 1799 - continue to debug memory corruption of 1795Kartik K. Agaram2015-07-171-21/+55
| | | | | | | | | | | | Things I figured out: - 'row' in render-screen doesn't perfectly track cursor-row in screen - proximal cause was forgetting to add left:number to stop-printing - trying to print to screen outside bounds was silently succeeding and corrupting simulated memory - if we silently ignore prints outside bounds things are fine But why are prints outside screen bounds working? We should be accessing screen data using 'index', and that's checking its bounds.
* 1796 - temporarily undo 1795Kartik K. Agaram2015-07-161-49/+21
| | | | | Debugging simulated-screen support is taking too long, and I suddenly have a few higher priorities.
* 1795 - still debugging screen-in-screen renderingKartik K. Agaram2015-07-161-21/+49
| | | | I'm writing to location 'screen' somehow that's not the raw location.
* 1793 - rudimentary sandboxing for scenarios in the environmentKartik K. Agaram2015-07-151-1/+10
|
* 1787 - clear warnings between runsKartik K. Agaram2015-07-151-29/+9
|