Commit Graph

61 Commits

Author SHA1 Message Date
c3e1fad491 Automatically gc during evaluation + perf improvements
Still ~25x slower than Python when calculating fib 27
2022-11-29 23:40:50 -05:00
afaa53bb7f Implement pin-based gc
This will allow for cleanup to occur mid-calculation when used throughout
2022-11-29 21:21:16 -05:00
13704fae2c Improve memory efficiency via plain ints for length 2022-11-29 20:57:50 -05:00
d965ca142d Minor restructure for platformio compatibility 2022-11-25 21:59:10 -05:00
6cc27427cf Use c11 standard + GNU extensions 2022-11-22 21:19:00 -05:00
2510c7f36a Enable more pedantic compiler flags 2022-11-22 21:11:06 -05:00
e02d8433fa Use pinned, immutable errors
This allows for extra refactoring to reduce the reliance on 'struct ucl'
for allocation strictly for allocating error responses.
2022-11-22 16:55:41 -05:00
7a2cbb2f26 Replace obj "reachable" with flags 2022-11-22 16:23:03 -05:00
5320c70dea Refactor to encapsulate all state in a 'ucl' 2022-11-22 16:19:47 -05:00
13062a5b86 Refactor headers, distinguish public and private 2022-11-22 15:50:18 -05:00
f19f672d05 Separate public header 2022-11-20 22:31:23 -05:00
31c7ee156c Build and use a static library for repl & tests 2022-11-20 22:27:10 -05:00
5cf8a55156 Support multiple build variants, add ARM variant 2022-11-17 23:22:21 -05:00
e1048c3ca4 Add -Wextra compiler flag 2022-11-16 23:06:44 -05:00
c67d4f4583 Add -Wall,-Werror compiler flags 2022-11-16 23:01:50 -05:00
d2c59352bb Minor parsing cleanup 2022-11-16 22:55:55 -05:00
2ae4e38400 Make setq bind locally 2022-11-16 22:55:44 -05:00
a093fb0b9c Add reduce and filter 2022-11-16 22:55:06 -05:00
1f7034c0c2 Add append, add 'equal' to repl 2022-11-16 21:38:41 -05:00
fd5aad95dc Add iteration (dotimes, dolist, while) 2022-11-16 21:38:01 -05:00
13f6d66d2b Fixes for 'equal' 2022-11-16 21:37:08 -05:00
542366f74e Improve int parsing and allow negatives 2022-11-16 09:52:03 -05:00
41bebd1472 Optimize list appends O(n^2)->O(n) 2022-11-15 23:04:45 -05:00
1595a6310d Minor refactor to parsing and testing cleanup 2022-11-15 22:57:25 -05:00
086d6f9106 Return fewer NULLs in parsing 2022-11-15 15:42:01 -05:00
785dbf06f6 Improve parser errors slightly 2022-11-15 15:18:37 -05:00
583367ee9d Update TODO statuses 2022-11-15 00:15:48 -05:00
af88471b3a Rename 'state' to 'scope' 2022-11-14 23:42:48 -05:00
706b4a586d Add seemingly functional but hacky gc 2022-11-14 22:43:49 -05:00
fbc1055659 Use readline for repl 2022-11-14 22:35:49 -05:00
2af3c15785 Handle division by zero 2022-11-14 22:34:37 -05:00
f13d23c528 Minor SConstruct refactoring 2022-11-14 22:34:16 -05:00
a87cab2452 Add arena allocator 2022-11-14 22:33:56 -05:00
6af4e67309 Add boolean, comparison, and equality functions 2022-11-07 09:18:59 -05:00
4da62ad2da Add mapcar builtin, more tests, fixes 2022-11-05 20:47:33 -04:00
f9ace289f1 Add nth builtin 2022-11-04 22:44:17 -04:00
a5ef5c9fa0 Add printl, car, cdr builtins 2022-11-04 22:22:08 -04:00
2527c34ddf Add quote special form 2022-11-04 22:03:47 -04:00
2344a7d498 Add lambda special form 2022-11-04 21:51:25 -04:00
c37e46e354 Add progn special form 2022-11-04 09:49:37 -04:00
4dab281b1f Add setq special form 2022-11-04 09:34:39 -04:00
d5b1729deb Add function evaluation 2022-11-04 09:16:02 -04:00
ddb5a8f842 Add defun without evaluation 2022-11-03 09:46:23 -04:00
37a614515e Run python 'black' on SConstruct 2022-11-02 21:41:31 -04:00
2cf4cd9587 Add 'list' and 'print' builtins 2022-11-02 21:26:52 -04:00
3b7bef779b Clean up many strdups 2022-11-02 20:36:07 -04:00
9c1a81811c Add more tests for lets with errors 2022-11-02 20:22:32 -04:00
1451970ca8 Add more "integration" tests 2022-11-02 20:16:29 -04:00
6c652b195c WIP: Hack in support for let binds 2022-11-02 11:10:28 -04:00
5dbe3c67af Wire up more builtins and slightly improve printing 2022-10-28 23:45:08 -04:00