about summary refs log tree commit diff stats
path: root/038scheduler.cc
Commit message (Collapse)AuthorAgeFilesLines
* 2039 - warn on unbalanced '['Kartik K. Agaram2015-08-191-2/+2
|
* 2023 - give routines time limitsKartik K. Agaram2015-08-161-0/+63
|
* 2022 - run sandboxes in separate routinesKartik K. Agaram2015-08-161-0/+12
|
* 1923Kartik K. Agaram2015-08-021-1/+1
| | | | | | | | | | 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.
* 1886 - gracefully handle malformed ingredientsKartik K. Agaram2015-07-291-1/+1
| | | | | | | | For example: x:number <- index y:address:array:number, 3 (forgetting to do a lookup) Thanks Caleb Couch.
* 1868 - start using naked literals everywhereKartik K. Agaram2015-07-281-26/+26
| | | | First step to reducing typing burden. Next step: inferring types.
* 1849Kartik K. Agaram2015-07-251-23/+0
|
* 1848 - core instructions now check for ingredientsKartik K. Agaram2015-07-251-3/+24
| | | | Also standardized warnings.
* 1844 - explicitly end each trace lineKartik K. Agaram2015-07-251-11/+11
| | | | | | | | | 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.
* 1702 - experiment: start using 'ordinal' in namesKartik K. Agaram2015-07-041-9/+9
| | | | | | | 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!
* 1699 - first-class recipe typesKartik K. Agaram2015-07-031-7/+1
| | | | | It should now be easy to do dynamic dispatch, create higher-order functions, etc.
* 1620Kartik K. Agaram2015-06-221-0/+1
| | | | | | | | 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.
* 1585Kartik K. Agaram2015-06-171-1/+1
|
* 1518 - still horribly brokenKartik K. Agaram2015-06-011-0/+3
| | | | | | Just figured out why a first keystroke of backspace was sending me out for a spin: run_interactive needs all early exits that don't actually run anything to increment the current_step_index(). FML, this is lousy..
* 1483 - *really* check color screens in scenariosKartik K. Agaram2015-05-271-2/+2
| | | | | | | | | | | | | | | | | 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.
* 1414 - traces now robust to new recipes/typesKartik K. Agaram2015-05-211-9/+9
|
* 1391 - avoid unsigned integersKartik K. Agaram2015-05-171-26/+26
|
* 1383 - warn on unknown typeKartik K. Agaram2015-05-161-0/+4
| | | | | | | | | | | | | This bit me in the last commit for the first time. Layer 010vm.cc is starting to look weird. It has references to stuff that gets implemented much later, like containers and exclusive containers. Its helpers are getting an increasing amount of logic. And it has no tests. I'm still inclined to think it's useful to have major data structures in one place, even if they aren't used for a bit. But those helpers should perhaps move out somehow or get some tests in the same layer.
* 1364 - trace call-stack when switching routinesKartik K. Agaram2015-05-131-2/+12
| | | | Drop the #$%# 'encapsulated' stack ADT.
* 1363 - rename 'integer' to 'number'Kartik K. Agaram2015-05-131-23/+24
| | | | ..now that we support non-integers.
* 1361Kartik K. Agaram2015-05-121-2/+2
| | | | | This one layer had grown a dependency on a later layer. I could swear I ran all the tests when I fixed the test harness in 1358..
* 1357 - temporarily revert floating-point supportKartik K. Agaram2015-05-121-2/+2
|
* 1356 - snapshot #2: floating point supportKartik K. Agaram2015-05-121-2/+2
| | | | | | | | | | | | | | | 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.
* 1321 - *finally*, fixed the chessboard sluggishnessKartik K. Agaram2015-05-101-0/+17
|
* 1318 - 1317 actually works nowKartik K. Agaram2015-05-101-7/+38
|
* 1317 - all tests passingKartik K. Agaram2015-05-091-6/+34
| | | | Hacky new way to turn off child threads.
* 1315 - chessboard now working interactivelyKartik K. Agaram2015-05-091-0/+6
| | | | | | | | | | | | | | | | | | | | I tried to bring too much into this commit, and paid the price with some debugging effort. Still havent't tried to enable line buffering, but I'll take a snapshot. Some tests are failing because of the huge hack in the scheduler. For a while I thought there was a bug in termbox because I kept seeing segfaults and valgrind complained about out-of-bounds access. But that was just subsidiary threads trying to print to the screen after I'd returned to console mode. Maybe I should add a test for send-keys-to-channel. Or just use a fake keyboard rather than a channel. And *then* there's the fact that the interaction is molasses slow. Slower than the arc version even though the tests run so much faster. And what's with the long pauses in printing strings to screen?
* 1308Kartik K. Agaram2015-05-081-0/+13
|
* 1301 - back to the chessboardKartik K. Agaram2015-05-071-0/+17
| | | | Still need a nice syntax for managing the routine under test.
* 1299 - stop using [] in any vectorKartik K. Agaram2015-05-071-8/+8
| | | | | | | | | 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 '[^ ]\['
* 1298 - better ingredient/product handlingKartik K. Agaram2015-05-071-13/+12
| | | | | | | | | | | | | | | | | | | 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
* 1296 - roll back 1295Kartik K. Agaram2015-05-071-31/+3
|
* 1295 - broken snapshotKartik K. Agaram2015-05-071-3/+31
| | | | | I spent a couple of hours debugging this because routine-state only sometimes writes to its product. This is unacceptable. Fix this first.
* 1290Kartik K. Agaram2015-05-061-5/+4
|
* 1276 - make C++ version the defaultKartik K. Agaram2015-05-051-0/+244
I've tried to update the Readme, but there are at least a couple of issues.