about summary refs log tree commit diff stats
path: root/mu.arc
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* 536 - introduce a notion of helper routinesKartik K. Agaram2015-01-111-1/+16
| | | | When all you have left to run are helper routines, end the simulation.
* 535 - reading keyboard input from a channelKartik K. Agaram2015-01-111-2/+23
| | | | | | | | The problem is that once main exits it takes two characters at minimum to truly quit: one to fill the buffer and another to overflow it and trigger the deadlock detector. Not the cleanest way to exit in the world either, death by deadlock.
* 534 - this is how we test blocking channelsKartik K. Agaram2015-01-111-4/+2
| | | | Time to write some tests for the chessboard app.
* 533Kartik K. Agaram2015-01-111-1/+3
|
* 532Kartik K. Agaram2015-01-111-4/+6
|
* 531Kartik K. Agaram2015-01-101-1/+1
|
* 530Kartik K. Agaram2015-01-101-1/+3
|
* 529 - 'sleep' can now wait for a routine to completeKartik K. Agaram2015-01-101-0/+5
|
* 528Kartik K. Agaram2015-01-101-3/+3
|
* 527Kartik K. Agaram2015-01-101-3/+3
|
* 526Kartik K. Agaram2015-01-101-2/+0
|
* 525 - 'fork' now returns a routine idKartik K. Agaram2015-01-101-3/+5
|
* 523 - debugging aide: dump just one test a timeKartik K. Agaram2015-01-101-0/+3
|
* 522 - another arg for 'fork'Kartik K. Agaram2015-01-101-1/+2
| | | | Fork syntax is now: fork <function> [global space] [max cycle limit] args*
* 521 - check 'sleep' syntaxKartik K. Agaram2015-01-101-0/+2
|
* 517Kartik K. Agaram2015-01-101-25/+19
| | | | Cleaner trace for 'convert-braces'.
* 516Kartik K. Agaram2015-01-101-20/+6
| | | | Cleanup trace a little.
* 515 - support time limits for threadsKartik K. Agaram2015-01-101-4/+40
| | | | | Disquieting that I can't make each of these five tests fail in isolation. We have to fix them all at once.
* 513Kartik K. Agaram2015-01-091-2/+2
|
* 511 - make 'sleep' clearerKartik K. Agaram2015-01-081-17/+19
|
* 505 - simplify tagged-valueKartik K. Agaram2015-01-051-0/+2
| | | | | | | I could swear there was an issue earlier where tagged-values had to contain pointers for some core function. But I can't find it anymore. Ok, assume we can store primitives in it and pointers only for aggregates (and-records and arrays).
* 504 - give up on graphics for nowKartik K. Agaram2015-01-051-28/+20
|
* 503 - start of a solution for drawing piecesKartik K. Agaram2015-01-051-12/+35
| | | | | | | | | | | Dog slow, though. Drawing the sprite for a single piece takes 12s or 30ms/pixel for 400 pixels. A third of that is the actual racket overhead of drawing pixel by pixel, which would in itself be too much. We need bitblts. (Black queen pixels derived from http://www.wpclipart.com/recreation/games/chess/chess_set_1, after scaling down to 40x40 and replacing external white pixels with transparent ones in Gimp.)
* 502 - start of a graphic chessboard appKartik K. Agaram2015-01-041-5/+28
| | | | Just prints an empty board so far.
* 497 - strengthen the concept of 'space'Kartik K. Agaram2015-01-021-36/+37
| | | | | | | | | | | | | | | | | | | | 'default-scope' is now 'default-space' 'closure-generator' is now 'next-space-generator' The connection to high-level syntax for closures is now tenuous, so we'll call the 'outer scope' the 'next space'. So, let's try to create a few sentences with all these related ideas: Names map to addresses offset from a default-space when it's provided. Spaces can be strung together. The zeroth variable points to the next space, the one that is accessed when a variable has /space:1. To map a name to an address in the next space, you need to know what function generated that space. A corollary is that the space passed in to a function should always be generated by a single function. Spaces can be used to construct lexical scopes and objects.
* 495Kartik K. Agaram2015-01-021-0/+3
|
* 493Kartik K. Agaram2015-01-021-0/+2
|