about summary refs log tree commit diff stats
path: root/050scenario.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* 1846Kartik K. Agaram2015-07-251-1/+1
|
* 1845 - never ever redefine the scenario's recipeKartik K. Agaram2015-07-251-2/+19
| | | | | | A couple of times now I've accidentally named a scenario the same thing as a recipe inside it that I define using 'run' or something. The resulting infinite loop is invariably non-trivial to debug.
* 1844 - explicitly end each trace lineKartik K. Agaram2015-07-251-13/+13
| | | | | | | | | 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.
* 1796 - temporarily undo 1795Kartik K. Agaram2015-07-161-1/+1
| | | | | 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-1/+1
| | | | 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/+1
|
* 1754Kartik K. Agaram2015-07-101-1/+1
|
* 1751 - sluggishness fixedKartik K. Agaram2015-07-101-1/+1
| | | | | | | Ah, I was indeed double-rendering, but somehow it was still hard to see the problem past that preliminary diagnosis. Still two failing tests to fix.
* 1746 - load file and run a single testKartik K. Agaram2015-07-101-7/+6
| | | | $ ./mu test run-instruction-and-print-warnings
* 1745 - hoist warning/response strings out of editor-dataKartik K. Agaram2015-07-101-1/+1
| | | | | | | | | | Still ugly as hell. Some tests failing, but they're most likely wrong. We need to test cursor positioning at the level of the environment and take it away from the responsibilities of individual editors. Also bring back the line at the bottom of each editor. The non-test run ('main' in edit.mu) is completely borked. Sluggish as hell, and I can't seem to switch focus to the sandbox editor.
* 1743Kartik K. Agaram2015-07-091-1/+1
|
* 1721 - hide warnings inside interactive routinesKartik K. Agaram2015-07-081-10/+20
| | | | | | | | | | We will need many other forms of isolation for these. For starters we're going to have to replace most asserts with warnings that can be traced so that the environment doesn't crash because of illegal code typed into it. New test is still failing. Just getting it to fail right was hard enough.
* 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!
* 1672 - begin support for multiple editors at onceKartik K. Agaram2015-06-281-1/+1
|
* 1671 - better separate setup from code under testKartik K. Agaram2015-06-271-5/+13
| | | | | Requires better support for special variable names in scenarios like 'screen' and 'console'.
* 1668 - there's a bug in CHECK_TRACE_DOESNT_CONTAINKartik K. Agaram2015-06-271-1/+3
| | | | For starters start making the test fail when building until layer 41.
* 1621Kartik K. Agaram2015-06-221-1/+1
| | | | | | | | repl.mu now passing again. But still I have concerns: a) Doubling backslashes in tests. Hard to tell how many levels to add. b) I think the read-key interface needs to go. But then how do we handle send-keys-to-channel and other flows like that in the chessboard app?
* 1620Kartik K. Agaram2015-06-221-1/+3
| | | | | | | | 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.
* 1598Kartik K. Agaram2015-06-191-2/+5
| | | | | Some tests weren't actually running for the past 5 days. Performed 5 why's.
* 1569Kartik K. Agaram2015-06-161-0/+1
|
* 1566 - fake mouse clicks in scenariosKartik K. Agaram2015-06-151-1/+1
|
* 1565Kartik K. Agaram2015-06-141-31/+4
|
* 1564 - a better way to support string literalsKartik K. Agaram2015-06-141-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our new heuristic is: all string literals are the same. If they contain newline before non-whitespace, we scan for comments assuming there might be code inside: foofoofoo [ ... # ']' inside comment ignored ] If they contain non-whitespace first, then we ignore comments assuming it's just a regular string: foofoofoo [abc#def] # valid string literal The big hole in this approach: foofoofoo [ # what about comments here containing ']'? ... # abc ] Currently this reads as a 'code comment' and terminates before the newline or '?' and will probably trigger errors down the line. Temporary workaround: don't start code strings with a comment on the same line as the '['. Eventually we'll tighten up the logic. We're still not using the new heuristic in scenarios, but that's up next.
* 1498Kartik K. Agaram2015-05-281-8/+20
| | | | Cleaner to delegate as much as possible to slurp_quoted.
* 1497 - 2 boneheaded bugs in parsing scenariosKartik K. Agaram2015-05-281-6/+30
|
* 1494Kartik K. Agaram2015-05-271-1/+1
|
* 1491Kartik K. Agaram2015-05-271-0/+3
|
* 1483 - *really* check color screens in scenariosKartik K. Agaram2015-05-271-1/+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.
* 1475Kartik K. Agaram2015-05-261-5/+16
|
* 1434 - support all unicode spacesKartik K. Agaram2015-05-231-4/+22
|
* 1417 - draft zoom levels in tracesKartik K. Agaram2015-05-211-3/+3
|
* 1416Kartik K. Agaram2015-05-211-12/+12
|
* 1414 - traces now robust to new recipes/typesKartik K. Agaram2015-05-211-14/+0
|
* 1412 - starting to clean up trace formatKartik K. Agaram2015-05-211-2/+2
| | | | | Many features of my trace layer were just inherited blindly from wart but lying unused in this project. Throw them out while we're at it.
* 1401 - shave 80% off chessboard test timeKartik K. Agaram2015-05-181-1/+1
| | | | It was all going to laboriously writing out 300+ MB to disk.
* 1391 - avoid unsigned integersKartik K. Agaram2015-05-171-14/+14
|
* 1387Kartik K. Agaram2015-05-161-3/+3
|
* 1374 - chessboard end-to-end test passes!Kartik K. Agaram2015-05-141-1/+1
| | | | | | | | | | After like 40 seconds (because of the 120-column screen), but whatever. The final bug was that clear-screen wasn't actually working right for fake screens. (The trace is too large for github, so I'm going to leave it out for now.)
* 1364 - trace call-stack when switching routinesKartik K. Agaram2015-05-131-1/+1
| | | | Drop the #$%# 'encapsulated' stack ADT.
* 1363 - rename 'integer' to 'number'Kartik K. Agaram2015-05-131-15/+15
| | | | ..now that we support non-integers.
* 1357 - temporarily revert floating-point supportKartik K. Agaram2015-05-121-10/+10
|
* 1356 - snapshot #2: floating point supportKartik K. Agaram2015-05-121-10/+10
| | | | | | | | | | | | | | | 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.
* 1355Kartik K. Agaram2015-05-121-0/+11
|
* 1343Kartik K. Agaram2015-05-111-2/+2
|
* 1327 - better error handling in chessboardKartik K. Agaram2015-05-101-2/+11
| | | | | Also a bugfix in break to label, because I noticed the screen wasn't being cleaned up on quit.
* 1323 - keyboard supports backspace and newlineKartik K. Agaram2015-05-101-0/+1
| | | | | | Lots mixed into this commit: some off-by-one errors in display.cc a new transform to translate jump labels that I'd somehow never gotten around to supporting
* 1299 - stop using [] in any vectorKartik K. Agaram2015-05-071-6/+6
| | | | | | | | | 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-19/+19
| | | | | | | | | | | | | | | | | | | 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/+477
I've tried to update the Readme, but there are at least a couple of issues.
='n1172' href='#n1172'>1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784