Commit Graph

354 Commits

Author SHA1 Message Date
Kartik K. Agaram
3af0919dc6 471 - experiment: chessboard app
No tests. Let's have some fun.
As a first step, a 'list-length' function. Iterative version is 25% faster
than recursive (60 vs 45 seconds).
2014-12-30 23:15:37 -08:00
Kartik K. Agaram
ddc3dd1408 470 2014-12-30 19:04:01 -08:00
Kartik K. Agaram
edb6fcbb35 469 - warn on the bug of 464 2014-12-30 18:51:34 -08:00
Kartik K. Agaram
3ccfdb38ae 468 - slice test time by 65%
We achieve this by separating out the freezing of system software, which
we needed to do anyway to address the duplication in 'init-fn'.
2014-12-30 15:13:51 -08:00
Kartik K. Agaram
2858b43647 467 - 'convert-names' now supports space metadata
To inform it about space metadata you have to tag environments with the
function that generated them. Every function can only ever be called
with environments generated by a single function. As an assembly-like
language, mu requires closures to be called with an explicit
environment, but it warns when the environment might not be what the
function expects.
2014-12-30 14:52:58 -08:00
Kartik K. Agaram
92d239247f 466 2014-12-30 14:46:33 -08:00
Kartik K. Agaram
e17817c7e0 465 2014-12-30 14:41:12 -08:00
Kartik K. Agaram
1f00ad3730 464 - reply broken in channel 'write'
How did this work until now? The reply was being treated as a label, and
if 'write' returned nothing it would still work fine because the output
is already present, and a missing 'reply' leaves oargs as-is.

Should we do something to catch this? Perhaps we should track args
modified and check that there are oargs for them. But that seems quite
heavyweight.. Maybe we should clear oargs when missing a 'reply'?
2014-12-30 14:37:04 -08:00
Kartik K. Agaram
9c729fb446 463 - mu now has closures 2014-12-30 01:27:26 -08:00
Kartik K. Agaram
7f6a670209 462 2014-12-29 09:24:11 -08:00
Kartik K. Agaram
5b07014681 461 - create room for an index '0' in scopes
This wasn't working until I fixed 459.
2014-12-29 09:20:51 -08:00
Kartik K. Agaram
6846d160df 460 2014-12-29 09:17:12 -08:00
Kartik K. Agaram
613455f6f8 459 - stop recycling memory between routines
I forgot that we have a test with multiple calls to 'run' without
intervening 'reset'.
2014-12-29 09:15:42 -08:00
Kartik K. Agaram
0529508068 457 - finally, redirection works
No need for a separate channels array; just pass channels in globals.
The global space is a superset of unix's fd array.
2014-12-28 16:43:18 -08:00
Kartik K. Agaram
05a2cf45a5 456 - routines can now have routine globals
But we don't do nonsense like copy all state from the parent routine.
2014-12-28 15:57:55 -08:00
Kartik K. Agaram
1ccde82e8d 455 2014-12-28 14:09:25 -08:00
Kartik K. Agaram
32de6ad74a 454 2014-12-28 14:07:30 -08:00
Kartik K. Agaram
3513e03850 453 2014-12-28 13:03:50 -08:00
Kartik K. Agaram
82d0a1f2c1 452 2014-12-28 12:29:35 -08:00
Kartik K. Agaram
38e1f0bd01 451 - start of support for per-routine globals 2014-12-27 18:27:54 -08:00
Kartik K. Agaram
1f32d0e9cc 450 2014-12-27 18:20:13 -08:00
Kartik K. Agaram
3e167e879c 449 2014-12-27 18:20:00 -08:00
Kartik K. Agaram
e9f916bb0a 448 2014-12-26 22:21:25 -08:00
Kartik K. Agaram
19f02639b5 446
Clear up that ancient todo.

We don't particularly care about what abstraction we write tests at, as
long as we do so at *some* layer and document the intent. That lets us
move tests up or down in the future when we know more/have better taste.
2014-12-25 19:39:39 -08:00
Kartik K. Agaram
9e15e4df4c 444 - bring back dispatch based on operand/result types
Was dropped in commit 149. But we need it for more convenient
overloading, especially now that the right way to build tagged-values is
unclear.

The original concern was that type/otype would make code harder to
'assemble' down to native. But we should be able to insert CALL
instructions to the right clause inside a function's code. So keep it
around in the toolbox.
2014-12-24 01:00:36 -08:00
Kartik K. Agaram
ef55a41466 443 - simple graphics primitives
http://docs.racket-lang.org/graphics/Mouse_Operations.html

Like with the text mode primitives, we still don't have a story for
writing white-box tests for code using these.
2014-12-23 23:52:37 -08:00
Kartik K. Agaram
4630b4aee8 442 - string 'split' 2014-12-19 22:22:17 -08:00
Kartik K. Agaram
f45ea0cb5c 441 - string 'find-next' for characters 2014-12-19 19:03:35 -08:00
Kartik K. Agaram
4fc54b3d98 440 2014-12-17 23:14:58 -08:00
Kartik K. Agaram
63892e6e03 439 2014-12-17 23:11:51 -08:00
Kartik K. Agaram
420d3d420a 438 - unbelievable typo 2014-12-17 23:09:51 -08:00
Kartik K. Agaram
7c7d7d22a7 437 2014-12-17 17:03:34 -08:00
Kartik K. Agaram
8360714552 436 - types* table can now contain integer-array:3, etc.
Biggest change was to the interface to the 'sizeof' helper. Where it
used to accept either a type symbol or a cons operand, it now always
accepts an operand, though the value of the operand can be _. In the
process the implementation is radically simpler.

Also reorg'd unit tests a little, putting those for 'deref' before
'sizeof'.

Finally, I'm giving in and enabling the printing of test names as
they're run. We still need this all the time in our surgery.
2014-12-17 14:08:30 -08:00
Kartik K. Agaram
a0bb6c0420 435 - starting to allow type definitions 2014-12-17 11:01:38 -08:00
Kartik K. Agaram
b93d2cd357 434 2014-12-17 10:52:54 -08:00
Kartik K. Agaram
68daae8c25 433 2014-12-17 10:47:04 -08:00
Kartik K. Agaram
9eedf0348d 432 2014-12-17 10:41:43 -08:00
Kartik K. Agaram
4725111d23 431 - rename 'record' (struct) to 'and-record'
Now we can call unions 'or-record'.
2014-12-17 10:39:58 -08:00
Kartik K. Agaram
faad417b11 430 - cache common functions for tests
Tests now take 21s instead of 76s, reclaiming recent losses and more.
2014-12-15 02:00:18 -08:00
Kartik K. Agaram
6c8f19d2be 427 - ..and we're back. All mu.arc.t tests passing. 2014-12-14 12:41:03 -08:00
Kartik K. Agaram
7b2a710e32 426 2014-12-14 09:50:10 -08:00
Kartik K. Agaram
decedd0b1e 425 2014-12-14 09:49:57 -08:00
Kartik K. Agaram
f558373712 424 - layer 20 passing
Seemingly large diff but most changes are peephole.
2014-12-14 09:48:17 -08:00
Kartik K. Agaram
b87a623b57 423 2014-12-14 08:34:43 -08:00
Kartik K. Agaram
0274f7d8ef 421 2014-12-14 08:14:13 -08:00
Kartik K. Agaram
b613977c76 419 - layer 11 now passing 2014-12-14 08:06:32 -08:00
Kartik K. Agaram
04c7870e59 417 - partially through layer 11 2014-12-14 07:38:14 -08:00
Kartik K. Agaram
431f8bcd3d 415 2014-12-13 23:26:15 -08:00
Kartik K. Agaram
f721fc48f8 412 - tests passing at level 10 2014-12-13 14:00:14 -08:00
Kartik K. Agaram
8aeb317f46 411 - 'tokenize-args' must handle blocks 2014-12-13 02:31:57 -08:00