about summary refs log tree commit diff stats
path: root/031address.cc
Commit message (Collapse)AuthorAgeFilesLines
* 2399 - consistent debug_string vocabularyKartik K. Agaram2015-11-081-2/+1
|
* 2393 - redo 2391Kartik K. Agaram2015-11-071-1/+2
| | | | | | | | | | | Got that idea to work with a special-case for 'new'. Requires parsing new's first ingredient, performing the replacement, and then turning it back into a string. I didn't want to replace NEW with ALLOCATE right here, because then it messes with my invariant that transform should never see a naked ALLOCATE. Layer 11 still not working, but everything else is. Let's clean up before we diagnose the new breakage.
* 2392 - undo 2391Kartik K. Agaram2015-11-071-2/+1
| | | | Yup, type ingredients were taking size 1 by default.
* 2391Kartik K. Agaram2015-11-071-1/+2
| | | | | | | | | | | | | No, my idea was abortive. My new plan was to run no transforms for generic recipes, and instead only run them on concrete specializations as they're created. The trouble with this approach is that new contains a type specification in its ingredient which apparently needed to be transformed into an allocate before specialization. But no, how was that working? How was new computing size based on type ingredients? It might have been wrong all along.
* 2388 - final layer of edit/ loaded successfullyKartik K. Agaram2015-11-071-0/+7
|
* 2377 - stop using operator[] in mapKartik K. Agaram2015-11-061-8/+8
| | | | | | | | | | | | | | | | 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.
* 2373 - bad bug: instruction was losing /lookupKartik K. Agaram2015-11-051-0/+12
|
* 2313Kartik K. Agaram2015-10-291-1/+1
|
* 2283 - represent each /property as a treeKartik K. Agaram2015-10-261-2/+2
|
* 2277 - reagents now have a tree of typesKartik K. Agaram2015-10-251-42/+29
|
* 2258 - separate warnings from errorsKartik K. Agaram2015-10-061-9/+9
| | | | | | | 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.
* 2243Kartik K. Agaram2015-10-051-0/+2
|
* 2241 - back to type-checking get-addressKartik K. Agaram2015-10-051-1/+1
| | | | | Now duplex-list is fully non-generic and only works with characters. But we'll fix that in a bit..
* 2237Kartik K. Agaram2015-10-041-1/+1
|
* 2234 - check type of get's productKartik K. Agaram2015-10-021-0/+2
| | | | Already I'm finding type errors in the programming environment.
* 2227 - offset-checking for containersKartik K. Agaram2015-10-011-2/+6
|
* 2226 - standardize warning formatKartik K. Agaram2015-10-011-3/+3
| | | | | | | | 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?
* 2220Kartik K. Agaram2015-09-301-0/+3
|
* 2219Kartik K. Agaram2015-09-301-12/+4
|
* 2218 - check types in instructions much earlierKartik K. Agaram2015-09-301-3/+48
| | | | | | | | | 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.
* 2213 - start moving type checks out of 'run'Kartik K. Agaram2015-09-281-4/+1
| | | | | That way we only have to check each static instruction once, rather than every time it runs.
* 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.
* 2095Kartik K. Agaram2015-08-281-3/+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.
* 1988 - handle reagents without typesKartik K. Agaram2015-08-131-1/+1
| | | | | | This can happen if 'canonize' fails. Make sure it doesn't kill mu. Thanks Caleb Couch.
* 1951 - warn when copying scalars to arrays, etc.Kartik K. Agaram2015-08-071-0/+3
|
* 1921 - show trace by clicking on codeKartik K. Agaram2015-08-021-2/+2
| | | | | | | 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.
* 1902Kartik K. Agaram2015-07-301-0/+14
| | | | Now fix the proximal cause of the write to address 0.
* 1877 - shorten /lookup property to prefix '*'Kartik K. Agaram2015-07-281-0/+20
|
* 1869 - rename the /deref property to /lookupKartik K. Agaram2015-07-281-17/+17
| | | | Should be a little bit more mnemonic.
* 1868 - start using naked literals everywhereKartik K. Agaram2015-07-281-13/+13
| | | | First step to reducing typing burden. Next step: inferring types.
* 1864Kartik K. Agaram2015-07-281-1/+13
|
* 1862Kartik K. Agaram2015-07-281-1/+1
|
* 1860 - new primitive: $systemKartik K. Agaram2015-07-271-47/+1
| | | | Also reorganize my miscellaneous hacky primitives.
* 1848 - core instructions now check for ingredientsKartik K. Agaram2015-07-251-2/+8
| | | | Also standardized warnings.
* 1844 - explicitly end each trace lineKartik K. Agaram2015-07-251-1/+1
| | | | | | | | | 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.
* 1842 - get layers building again after 2 weeksKartik K. Agaram2015-07-241-12/+61
| | | | | Also, turns out I haven't been building 999spaces.cc in my default build. Now fixed.
* 1702 - experiment: start using 'ordinal' in namesKartik K. Agaram2015-07-041-1/+1
| | | | | | | 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!
* 1585Kartik K. Agaram2015-06-171-1/+1
|
* 1434 - support all unicode spacesKartik K. Agaram2015-05-231-2/+2
|
* 1417 - draft zoom levels in tracesKartik K. Agaram2015-05-211-1/+1
|
* 1414 - traces now robust to new recipes/typesKartik K. Agaram2015-05-211-14/+1
|
* 1391 - avoid unsigned integersKartik K. Agaram2015-05-171-6/+6
|
* 1363 - rename 'integer' to 'number'Kartik K. Agaram2015-05-131-17/+17
| | | | ..now that we support non-integers.
* 1360 - store doubles in memoryKartik K. Agaram2015-05-121-2/+2
| | | | | | | | | | | | | This is a far cleaner way to provide *some* floating-point support. We can only represent signed integers up to 2^51 rather than 2^63. But in exchange we don't have to worry about it elsewhere, and it's probably faster than checking tag bits in every operation. Hmm, yeah, surprised how easy this was. I think I'll give up on the other approach. I still don't have non-integer literals. But we won't bother with those until we need them. `3.14159:literal` seems ugly.
* 1357 - temporarily revert floating-point supportKartik K. Agaram2015-05-121-1/+1
|
* 1356 - snapshot #2: floating point supportKartik K. Agaram2015-05-121-1/+1
| | | | | | | | | | | | | | | 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.
* 1299 - stop using [] in any vectorKartik K. Agaram2015-05-071-7/+7
| | | | | | | | | 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-3/+3
| | | | | | | | | | | | | | | | | | | 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
* 1276 - make C++ version the defaultKartik K. Agaram2015-05-051-0/+130
I've tried to update the Readme, but there are at least a couple of issues.