about summary refs log tree commit diff stats
path: root/mu.arc
Commit message (Collapse)AuthorAgeFilesLines
* 623 - 'nochange' to guard against race conditionsKartik K. Agaram2015-01-251-9/+17
| | | | | | | | | I dunno, this may all be a wild goose chase. I haven't been disciplined in tagging in-out arguments in 'read-move' and its helpers. Maybe I should just drop those 'nochange' oargs in 'read' and 'write'. Maybe I should reserve output args only for return values that callers might actually care about, and use more conventional metadata like 'const' or 'unique' or 'inout' on other args.
* 621 - fix race condition in buffered-stdin.muKartik K. Agaram2015-01-251-16/+21
|
* 620 - fix broken examples and tests againKartik K. Agaram2015-01-251-5/+34
| | | | | | | | | I just did this in 611; what's the point of all this if tests can't stay passing? I don't understand why buffered-stdin.mu needs to preempt itself. stdin and buffered-stdin somehow end up sharing a single circular buffer, that's probably causing a race condition.
* 619 - chessboard now working rightKartik K. Agaram2015-01-251-3/+10
| | | | | | 2 bugs found: a) Have to slurp the newlines. b) Have to clear the line-buffer at the start of each line.
* 616 - buffered-stdin handles backspaceKartik K. Agaram2015-01-251-0/+7
| | | | Chessboard now *almost* handles backspace perfectly.
* 615 - eliminate scheduler non-determinismKartik K. Agaram2015-01-241-2/+5
|
* 614Kartik K. Agaram2015-01-241-0/+1
|
* 613 - support for interrupting with ctrl-cKartik K. Agaram2015-01-241-0/+3
|
* 612 - support for the backspace keyKartik K. Agaram2015-01-241-0/+7
|
* 610 - all examples working againKartik K. Agaram2015-01-241-3/+3
|
* 609Kartik K. Agaram2015-01-241-7/+7
| | | | Shove the complexity of reading newlines as low as possible.
* 608Kartik K. Agaram2015-01-241-3/+2
|
* 607Kartik K. Agaram2015-01-241-3/+9
| | | | | | Shove the complexity of printing newlines as low as possible. Definite instability in that one trace.
* 605 - example program for line-oriented inputKartik K. Agaram2015-01-241-2/+15
| | | | | | | | | | We need the hack of printing characters typed to screen right after we see them. But only when it's the real screen. And there's no way to write a test for that because it explicitly shouldn't happen for fake terminals :( Never mind, we'll be able to test it when we provide some mechanism for suppressing print. The equivalent of 'stty -echo'.
* 604 - new function to buffer stdinKartik K. Agaram2015-01-241-5/+57
| | | | | Still surprisingly hard to debug. We might be barking up the wrong tree. Or we might just need to lump it. System software is hard.
* 603Kartik K. Agaram2015-01-241-9/+12
|
* 602Kartik K. Agaram2015-01-241-6/+9
|
* 601 - fix callers of 'read-key'Kartik K. Agaram2015-01-241-1/+2
|
* 600 - fake keyboardKartik K. Agaram2015-01-221-6/+30
| | | | | Use asynchronous channels like 'stdin' for most tests. Use the synchronous fakes for testing low-level stdin helpers.
* 598 - clear up a minor mysteryKartik K. Agaram2015-01-211-4/+5
|
* 597Kartik K. Agaram2015-01-211-8/+0
|
* 595 - tests can now interrupt and restart routinesKartik K. Agaram2015-01-211-71/+37
| | | | Also cleaned up much of the mess in 594.
* 594 - random snapshot after a lengthy debugKartik K. Agaram2015-01-211-13/+80
| | | | | | I'd caused a bug in Arc: https://github.com/arclanguage/anarki/commit/97b3464256 Almost done interrupting and restarting routines.
* 588Kartik K. Agaram2015-01-181-0/+2
| | | | | Now that there isn't a stdout channel we can postpone the test showing the need to flush-stdout before clearing screen.
* 582 - first tests for printing to screenKartik K. Agaram2015-01-171-6/+68
|
* 580Kartik K. Agaram2015-01-171-1/+1
|
* 578 - switch to non-polymorphic 'print' functionsKartik K. Agaram2015-01-171-43/+78
| | | | | Also clean up various prints from last few commits. As a convention, for debugging we always print directly to host.
* 577 - bounds-check on per-routine spaceKartik K. Agaram2015-01-171-7/+19
| | | | | | | | I discovered the problem when playing more than 3 moves in the chessboard app. But it turns out we've been clobbering each other willy-nilly even in the chessboard-retro app.
* 576 - helper for printing integersKartik K. Agaram2015-01-171-0/+125
| | | | | | | | | | | | | | | This requires creating a new data structure called buffer, because strings are too inefficient for appending to, and we need to know how long they need to be before we clear them. But I'm not gonna bother to write tests for all the new primitives I just introduced, because that's not expedient. One test for mu is how nicely it handles situations like this without requiring perfect test hygiene. In this case, I can imagine tools that will extract tests for a particular function out of all known tests. Especially if it's a pure function that should be easy. Then just show each test to the programmer and ask him to give it a reasonable name.
* 575Kartik K. Agaram2015-01-171-14/+12
| | | | | | | Minimize use of 'unless' forms, they're harder to follow. Also, using one-sided checks like greater-or-equal or lesser-or-equal is more defensive.
* 574 - printing string literals is a hack; hard-code it in for nowKartik K. Agaram2015-01-161-24/+24
|
* 571 - screen primitives take an explicit terminalKartik K. Agaram2015-01-151-40/+64
| | | | | | | | | | | | | | | | | This will let me swap in a fake in tests. Still hacky, though. I'm sure I'm not managing the parameter right in the chessboard app. And then there's the question of whether it should also appear as an output operand. But it's a start. And using nil to mean 'real' is a reasonable convention. If I ever need to handle multiple screens perhaps we'll have to switch to 1:literal/terminal and 2:literal/terminal, etc. But those are equally easy to guard on.
* 570 - warn on potential name conflictKartik K. Agaram2015-01-141-0/+2
|
* 569 - ah, the right way to do generic functionsKartik K. Agaram2015-01-141-1/+4
| | | | | | | | | | Each clause creates its own default-space for local variables. Now we can justify prepending bodies on every 'function' form. Later we can optimize away the duplicate default-spaces. Another cost: we can't mindlessly use 'next-input' anymore. Pity.
* 568Kartik K. Agaram2015-01-141-0/+3
|
* 566Kartik K. Agaram2015-01-141-4/+25
|
* 565Kartik K. Agaram2015-01-141-10/+4
| | | | Reduce printing primitives before I start messing with fake versions.
* 563 - check actual errors during move validationKartik K. Agaram2015-01-141-2/+5
|
* 559Kartik K. Agaram2015-01-131-1/+0
|
* 554 - tedious to have to check for routine errors on every forkKartik K. Agaram2015-01-131-1/+1
|
* 550 - another bugfix, another pending testKartik K. Agaram2015-01-131-0/+4
|
* 549 - suppress prints in read-moveKartik K. Agaram2015-01-131-1/+11
| | | | | | This is the sort of thing we want to make super easy. But there's a bug at the moment: chessboard prints junk input at second move.
* 545 - graphics mode is now called bringing up a windowKartik K. Agaram2015-01-121-2/+2
|
* 544 - text modes now called 'retro' & 'cursor'Kartik K. Agaram2015-01-121-2/+2
| | | | | | | | | | | | | Other options considered for 'retro': 'teletype': perhaps most accurate, but arcane 'chat': captures that you have to hit 'enter', but not the rendering 'wrap': captures the auto-wrap when printing text but not that you have to hit 'enter' when typing 'text': useful as a synonym of 'chat' while conveying more information in other meanings, but too generic, nobody will get it Why do the input and output options have to be entangled like this?
* 542Kartik K. Agaram2015-01-121-3/+23
| | | | Tests for terminating when there's just helpers left.
* 541Kartik K. Agaram2015-01-111-3/+3
|
* 540Kartik K. Agaram2015-01-111-1/+1
|
* 539Kartik K. Agaram2015-01-111-6/+3
| | | | Simpler to just always sleep, whether or not a character was received.
* 538 - stdin app now responsiveKartik K. Agaram2015-01-111-1/+6
|
* 537Kartik K. Agaram2015-01-111-5/+0
|