about summary refs log tree commit diff stats
path: root/054dilated_reagent.cc
Commit message (Collapse)AuthorAgeFilesLines
* 2685Kartik K. Agaram2016-02-221-2/+2
|
* 2681 - drop reagent types from reagent propertiesKartik K. Agaram2016-02-211-10/+17
| | | | | | | | | | | | | | | | | All my attempts at staging this change failed with this humongous commit that took all day and involved debugging three monstrous bugs. Two of the bugs had to do with forgetting to check the type name in the implementation of shape-shifting recipes. Bug #2 in particular would cause core tests in layer 59 to fail -- only when I loaded up edit/! It got me to just hack directly on mu.cc until I figured out the cause (snapshot saved in mu.cc.modified). The problem turned out to be that I accidentally saved a type ingredient in the Type table during specialization. Now I know that that can be very bad. I've checked the traces for any stray type numbers (rather than names). I also found what might be a bug from last November (labeled TODO), but we'll verify after this commit.
* 2569Kartik K. Agaram2016-01-181-1/+1
|
* 2568Kartik K. Agaram2016-01-181-0/+17
|
* 2614 - still fixing bugs with missing '['Kartik K. Agaram2015-12-021-1/+1
| | | | | | When skipping past some text (usually whitespace, but also commas and comments) I need to always be aware of whether it's ok to switch to the next line or not.
* 2454Kartik K. Agaram2015-11-171-1/+1
| | | | | | Another gotcha uncovered in the process of sorting out the previous commit: I keep using eof() but forgetting that there are two other states an istream can get into. Just never use eof().
* 2453 - bugfix: trailing space after curly bracketKartik K. Agaram2015-11-171-3/+9
| | | | | | | I ran into this when edit/ couldn't handle spaces after curly brackets, even though .mu files could. Turns out edit/ loads code using istringstreams rather than ifstreams, and you can't putback a different character than you read from an istringstream. Craptastic gotcha..
* 2452Kartik K. Agaram2015-11-161-5/+5
|
* 2431Kartik K. Agaram2015-11-131-1/+2
|
* 2379 - further improvements to map operationsKartik K. Agaram2015-11-061-1/+1
| | | | | | | Commands run: $ sed -i 's/\([^. (]*\)\.find(\([^)]*\)) != [^.]*\.end()/contains_key(\1, \2)/g' 0[^0]*cc $ sed -i 's/\([^. (]*\)\.find(\([^)]*\)) == [^.]*\.end()/!contains_key(\1, \2)/g' 0[^0]*cc
* 2377 - stop using operator[] in mapKartik K. Agaram2015-11-061-2/+2
| | | | | | | | | | | | | | | | 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.
* 2352Kartik K. Agaram2015-11-041-2/+3
|
* 2305Kartik K. Agaram2015-10-281-1/+1
|
* 2291 - parsing property treesKartik K. Agaram2015-10-271-8/+2
|
* 2290Kartik K. Agaram2015-10-271-10/+7
|
* 2289Kartik K. Agaram2015-10-271-11/+3
| | | | | | | | | | | | | | | | Now dilated reagent parsing is much simpler. We still can't parse nested hashes. We may never need that. For now the syntax model is: program = collection of top levels top-level contains a list of lines lines may be instructions instructions have reagents reagents can be in compressed or dilated syntax (or literal strings) property values inside reagents can be s-expression trees We balance {} inside top-levels, [] inside strings, and () inside property values.
* 2286Kartik K. Agaram2015-10-271-1/+1
|
* 2283 - represent each /property as a treeKartik K. Agaram2015-10-261-4/+2
|
* 2282Kartik K. Agaram2015-10-261-3/+3
| | | | | Switch format for tracing reagents in preparation for trees rather than arrays of properties.
* 2277 - reagents now have a tree of typesKartik K. Agaram2015-10-251-4/+4
|
* 2275Kartik K. Agaram2015-10-251-0/+1
|
* 2274Kartik K. Agaram2015-10-251-0/+7
|
* 2273 - start expanding the type systemKartik K. Agaram2015-10-251-0/+113
Current plan: parsing {x: foo, y: bar} syntax for reagents parsing s-expr syntax for properties supporting reverse instructions (<-) parsing s-expr syntax for recipe headers (recipe number number -> number) static dispatch generic functions type-checking higher-order functions type of delimited continuations? need more type information First step is done, and the second partially so.