Commit Graph

29 Commits

Author SHA1 Message Date
Sage Vaillancourt 1d5621923c Further flesh-out structs.
Temporarily disable http due to buggy Ubuntu libmicrohttpd.
Add a way to access their fields with `'s`.
 - Uses some fairly hacky parseAtom additions. Needs to be refined.
Add structCapacity to Environment.
Add global Environment pointer.
Use structDef indexes instead of direct pointers.
 - Easier to increase capacity this way
strcpy struct field names
2022-03-15 15:27:02 -04:00
Sage Vaillancourt 11f39bf136 Add simple webserver functionality. 2022-03-14 23:46:20 -04:00
Sage Vaillancourt e2c977e95a Finally some consistent styling.
Centralized printf/printd defines in object.h
Removed null/isList checking from FOR_POINTER_IN_LIST
2022-01-07 16:55:03 -05:00
Sage Vaillancourt 49bf4aa1a2 Add system calls and some char processing.
Color REPL error output.
Add 'clear' shorthand to REPL.
Add basic switch to lib.
2021-12-10 16:38:44 -05:00
= 3d8e2d30d4 Add LOW_MEM and SIMPLE_ERRORS flags for aplite.
LOW_MEM drops some functionality (like `defe`) for very low memory devices like
aplite. SIMPLE_ERRORS is enabled when compiling with LOW_MEM, and overrides the
new error-with-context functionality with older, less intensive methods.
Also marked more code for standalone compilation only.
2021-07-21 19:31:40 +01:00
Sage Vaillancourt 3d48c2eae0 Added `loadfile` to standalone.
Tests now manually load the library file, instead of needing it to be
installed.
2021-07-04 21:49:41 -04:00
Sage Vaillancourt 7c7a68df5f Add `iserr`, `defe`. Fix `eval`. Increase env size
`iserr` is a basic type-check like `isnum`
`defe` adds a string to the environment as the equivalent symbol
`eval` can take in variables or functions, instead of just raw strings
Broke type-printing into its own function
Errors maxing out an environment. Likely extending incorrectly
2020-11-06 15:07:12 -05:00
Sage Vaillancourt e0153528a1 Take input in standalone. Print numbers as chars 2020-11-02 16:38:37 -05:00
Sage Vaillancourt 963996f3a0 Add (eval) function, for evaluating strings
Added a few tests for this new function
2020-11-02 15:46:17 -05:00
Sage Vaillancourt 875228a2b6 Add `isstr` to type-checking collection 2020-11-02 15:29:03 -05:00
Sage Vaillancourt 3319fdf2c3 Lambdas return only last item. EOL file comments
Added (penv) to print the current environment
Changed "Duplicate" test to work with new Lambda structure
2020-11-02 12:40:42 -05:00
Sage Vaillancourt 54e2e09c5c Add explicit (print) function 2020-10-30 14:36:44 -04:00
Sage Vaillancourt b443a54822 Add `pre` for prepending to lists 2020-10-29 11:23:35 -04:00
Sage Vaillancourt 7b649fdf16 Add `isnum` and some tests 2020-10-28 18:09:57 -04:00
= a5ecb1b3aa Added TODO. Text size adjusts with code length
Can handle hex and binary. Other cleanup

All tests pass
2020-08-02 21:16:26 +01:00
= 81d5a545cf Some new list functions and better error handling
New list functions include (append) (at) (rest) and (reverse). Single quotes now supported for strings.
2020-05-28 15:28:28 +01:00
= 44c9c7a8a1 Use malloc'd strings. Add filter function 2020-05-22 06:16:45 +01:00
= 1c82c6f726 Fixed some parsing (tests pass!). Some clean up. 2020-05-15 04:51:59 +01:00
= 340af00a29 Enable multi-statements in one line. Break out env 2020-05-10 18:52:22 +01:00
= 874420b3d5 Adjusted func types to account for possible eval
Basic ops work with lists. For example (+ 5 (10 15)) => (15 20)
2020-05-10 04:53:10 +01:00
= a286943984 Busted `map` with less malloc 2020-05-08 01:32:01 +01:00
= 42c9f24f85 Added PC makefile, and defines for debug on/off 2020-05-06 05:47:14 +01:00
Sage Vaillancourt 17a85a3931 Script UI now mostly added 2020-05-06 04:33:24 +01:00
Sage Vaillancourt 359d8ed439 Lambdas begin to work! 2020-05-06 04:33:24 +01:00
Sage Vaillancourt a3bf8ab864 Decent `if` and `def` support! 2020-05-06 04:33:24 +01:00
Sage Vaillancourt 77ff84fd30 Before breaking lists 2020-05-06 04:33:24 +01:00
Sage Vaillancourt 9ab907d014 Got results-as-operands working 2020-05-06 04:33:24 +01:00
Sage Vaillancourt 17b6bf12b4 The very basics work! 2020-05-06 04:33:24 +01:00
Michael E 7579d0b30c Initial Commit 2020-05-06 04:33:24 +01:00