Commit graph

44 commits

Author SHA1 Message Date
Simon Brooke b35eb8f5c7 Unit tests for maps 2019-02-07 14:19:49 +00:00
Simon Brooke f36436a9e1 #8: Done
I'm now of the opinion that this is done at the wrong level in the stack and needs to be redone later; but it works for now.

There's a regression in `open`, but I can't see why.
2019-02-07 09:22:44 +00:00
Simon Brooke 10098a83bf Made the slurp unit test more robust. 2019-01-28 19:00:29 +00:00
Simon Brooke 3470f27585 Can now read files from the filesystem. 2019-01-27 18:54:23 +00:00
Simon Brooke a355a28ffa Tactical commit whilst converting to URL_FILE 2019-01-24 19:36:00 +00:00
Simon Brooke 64fc43e9fc OK, my idea that long multiplication is like long addition is wrong.
It's still broken, but it's broken because of fundamental misunderstanding which tinkering won't solve.
2019-01-20 23:34:46 +00:00
Simon Brooke 22fa7314d6 Mostly fixing and standardising documentation. 2019-01-20 20:37:44 +00:00
Simon Brooke 0f8bc990f2 Much investigation of bignum problems
bignum multiply is still not working, but as bignum read and bignum divide depend on it, it's the problem to hit first.
2019-01-19 16:28:15 +00:00
Simon Brooke 000ae3c392 Not really a unit test, just trying to find where the problem is 2019-01-19 10:55:24 +00:00
Simon Brooke 46a4132823 Made it easier to run individual unit tests 2019-01-18 20:55:03 +00:00
Simon Brooke b433171fb6 Problem is that reading bignums depends on multiplying bignums...
Which doesn't work for the second digit into bignum territory - so it's fine at the boundary...
2019-01-18 14:25:32 +00:00
Simon Brooke d8991e8823 H'mmm. But although two-cell bignums work, n-cell do not.
Both add and print fail with numbers larger than 2^120
2019-01-18 14:09:26 +00:00
Simon Brooke c74b9cc162 Bignum subtraction does NOT work
Also subtraction of large numbers which are not beyond the bignum barrier does not work.
2019-01-18 13:57:41 +00:00
Simon Brooke c209abb4f9 Added unit tests to establish that bignum addition and print work
the bug must be in multiplication.
2019-01-18 13:39:12 +00:00
Simon Brooke d9d789fdd0 Now creating the correct internal bignum representation
add_integers returns an integer which by inspection of the internal representation is correct, but the print representation is not correct.
2019-01-03 11:21:08 +00:00
Simon Brooke 87007362f3 Fixed unit tests which were failing because of the change in formatting integers 2018-12-31 16:29:11 +00:00
Simon Brooke 02fe5669d8 Complete reworking of the REPL
which is good in itself, but not what I was meant to be working on.
2018-12-30 17:56:15 +00:00
Simon Brooke 342f0308d3 The beginning of bignums is in place, tests still pass. 2018-12-29 22:30:07 +00:00
Simon Brooke 9ff2f14c7d Reverse 2018-12-25 14:44:38 +00:00
Simon Brooke 813b24406d Ratio addition now works 2018-12-23 20:54:57 +00:00
Simon Brooke 98120d045b All unit tests now pass 2018-12-23 14:16:51 +00:00
Simon Brooke 5a84f5e305 Fixed the eval-real test
So that it passes provided the answer is right to within one part in a million. Also worked on a solution to returning exceptions from make_stack_frame
2018-12-21 21:36:37 +00:00
Simon Brooke 637d78fb1b Much work, all I think positive, but defun still doesn't work. 2018-12-18 21:10:03 +00:00
Simon Brooke cec32eff54 Progress, but there's something wrong with nlambdas 2018-12-13 23:20:34 +00:00
Simon Brooke 0550b0168f And now the interpreter works (I think) correctly! 2018-12-13 13:31:04 +00:00
Simon Brooke 27fd678888 Tried to get more sensible printing of floating point numbers
Results are quite disappointing. Resolution on long doubles is nothing like as good as I hoped; they're out by one part in 10^20.

All unit tests except one pass, and the one that doesn't is a very minor rounding issue, so I'm calling it good.
2018-12-08 00:29:05 +00:00
Simon Brooke 93b84087ce There's an enormous lot of good stuff in this, but I've messed up print
almost certainly by writing a non-wide character to a wide stream.
2018-12-07 20:09:33 +00:00
Simon Brooke 7e40d65df0 Fixed misnamed unit test file; upversioned to 0.0.2 2018-12-07 06:51:00 +00:00
Simon Brooke 15ded8c821 Several new unit tests 2018-12-07 06:32:51 +00:00
Simon Brooke 1307c65e94 And the answer was, eval is a function, not a special form. 2018-12-07 06:32:02 +00:00
Simon Brooke 7f29c11592 Added new unit test for a failing behaviour in eval 2018-12-05 09:33:37 +00:00
simon 01cf08b100 COND working 2017-10-16 14:37:09 +01:00
simon b989b5e041 PROGN working 2017-10-16 12:22:49 +01:00
simon 8e7d1ab913 More work on apply, also trying to read dotted pairs. 2017-10-15 17:01:03 +01:00
Simon Brooke ba4a31c25a All tests passing except 'apply', which is genuinely broken; I'm not yet sure
what's wrong.
2017-10-15 14:17:54 +01:00
Simon Brooke c396370e51 Fixed a number of unit tests (problems were output format, not actual bugs) 2017-10-07 15:11:07 +01:00
Simon Brooke 832ae3be0d New unit tests. 2017-09-25 10:01:25 +01:00
simon 0826dcfdda Huge progress. Now actually working. 2017-09-13 15:58:59 +01:00
Simon Brooke 5dee093e65 All tests still pass and a lot of debugging junk is gone 2017-09-13 00:25:11 +01:00
simon 31176e1f39 Some improvement, but two unit tests fail. 2017-08-14 17:57:23 +01:00
Simon Brooke e968b30bbc Sorted out some interesting buglets in read and print (although there is
still one I know of). More unit tests, and all pass. Not evalling yet.

Good day's work.
2017-01-20 18:24:48 +00:00
Simon Brooke 2d9f4b0439 All unit tests passing! This is slightly a fix because there is a bug with
the character read after reading a number not being correctly pushed back
onto the input stream, but...
2017-01-07 12:24:54 +00:00
Simon Brooke 6eab3a531a Added more unit tests. 2017-01-07 11:13:06 +00:00
Simon Brooke 8026138b9c Added primitive unit testing. 2017-01-07 10:48:28 +00:00