Sage Vaillancourt
8e30b24e8f
Start work on hash-table objects.
2022-04-18 16:59:35 -04:00
Sage Vaillancourt
4ea3b1d36d
Start work on forbble2.
...
Keep the old version around for now.
Add (indexOf) and (split) to lib.pbl
Distinct addToEnv() and setInEnv().
Add .clangd to gitignore.
2022-04-18 15:37:34 -04:00
Sage Vaillancourt
80255af52e
Split up some of the native testing code.
...
Makes running specific tests a little cleaner.
2022-04-13 16:48:37 -04:00
Sage Vaillancourt
54410030f7
Add throw() macro.
...
Simplifies the creation of complex error messages.
2022-04-13 15:17:59 -04:00
Sage Vaillancourt
7b014ebafa
Fix (reduce) with lambdas.
...
Fix await memory leak.
Allow running specific tests with --run-test x (for valgrinding).
2022-04-11 16:38:49 -04:00
Sage Vaillancourt
5a34bcbfbd
Add setGlobal() call to calc.c
...
Add vgcore files to gitignore.
Add tags alias to pebblisp.pbl
2022-04-09 17:24:18 -04:00
Sage Vaillancourt
85fb91b4ed
Use stripped Objects in hash.c
...
These lack the unused .forward field, reducing table memory by ~25%.
Also bump Object.number up to a long, and add a generic Object.data field.
2022-04-08 11:49:14 -04:00
Sage Vaillancourt
7a0433aa68
Add funcyEval() for equivalent Func/Lambda eval.
...
Still a bit buggy.
Some general renaming for clarification.
2022-04-07 01:20:59 -04:00
Sage Vaillancourt
deca6045ff
More useful type-error messages.
...
BAD_PARAMS_ON -> BAD_PARAMS
Replace printType() with getTypeName().
Use --ignore-config in testing.
Add type-checking (and missing clone) to (await).
2022-04-06 09:51:53 -04:00
Sage Vaillancourt
caaa6c53f6
Add simple object hashtable for env.
...
Currently has some issues with accessing parameters in recursive calls.
2022-04-04 14:15:44 -04:00
=
d625944e8d
Fixes to run on Pebble hardware.
...
Correct cloneObject(TYPE_OTHER) behavior.
2022-04-04 00:17:02 +01:00
Sage Vaillancourt
1a13fe4814
Add `unused` macro.
...
Prefer malloc() over calloc() in env.c
2022-04-01 15:07:19 -04:00
Sage Vaillancourt
ac04fa1a96
Make pointer-printing in (penv) optional.
...
Colorize (penv) output.
2022-03-31 13:23:45 -04:00
Sage Vaillancourt
857219a4e8
Remove readFromEnvironment().
...
Something about it was buggy. Might be worth coming back to.
2022-03-29 16:31:23 -04:00
Sage Vaillancourt
2b09187a94
Add readFromEnvironment() for reading without cloning.
...
Define the REPL prompt in the environment.
2022-03-29 15:49:53 -04:00
Sage Vaillancourt
803935c637
Move help directly into env.
...
Fix repl leak.
2022-03-29 15:09:36 -04:00
Sage Vaillancourt
af7a2e6265
Cleanup and a couple (micro) optimizations.
2022-03-28 23:51:05 -04:00
Sage Vaillancourt
34032cb1c6
Simplify Environment struct.
...
Fill in envForLambda with errorObjects if not enough are provided.
Move addStructDef() into env.c
Add dedicated Dictionary struct to env.c
env->size -> env->capacity
2022-03-27 18:52:56 -04:00
Sage Vaillancourt
9a454e6a30
Small optimizations and cleanup.
2022-03-27 00:03:34 -04:00
Sage Vaillancourt
158c21f441
Reference count LAMBDAS.
...
Remove more unused code/checks.
Simplify evalList (though it could use more work).
2022-03-26 19:51:52 -04:00
Sage Vaillancourt
5226640fb6
Some stringing cleanup and unused code removal.
2022-03-26 12:54:38 -04:00
Sage Vaillancourt
502b9349fe
Fix some busted tests.
...
Better styling of native test printing.
Add `detail` parameter to runTests().
2022-03-25 16:11:25 -04:00
Sage Vaillancourt
59c6ff50b5
Break printColored() into own function.
...
Replace (pch) with (ch).
Fix error memory bug.
Add sugar for (? fil) => (? "fil").
Inline some of (fil).
Simplify (print) and allow for varargs.
Total up valgrind errors when testing.
2022-03-25 13:33:30 -04:00
Sage Vaillancourt
0a649095ab
Start switch to array-based functions.
...
No more mandatory two-params, though several things are still busted.
2022-03-24 16:59:59 -04:00
Sage Vaillancourt
5a622736d3
Handle more testing stuff statically.
...
Remove fnt and just have centralized fn.
Longer printObj temp string.
`?` now shows tests.
Add more internal testing.
2022-03-22 11:45:02 -04:00
Sage Vaillancourt
097cbf6a5c
Start some internal testing frameworking.
2022-03-21 12:33:57 -04:00
Sage Vaillancourt
3bf65577c0
Add help text for STANDALONE.
...
Pull most user functions into the new plfunc.
Could integrate some tests directly into pl with --run-tests
2022-03-20 03:50:43 -04:00
Sage Vaillancourt
30e8c87e66
General code clean-up.
2022-03-19 22:25:20 -04:00
Sage Vaillancourt
ee8eaf2d28
Fix web struct handling.
...
Typedef to handle different versions of libmicrohttpd.
Add getStructIndex().
Fix small print() mem leak.
2022-03-18 11:23:19 -04:00
Sage Vaillancourt
b4584fa377
Start work on adding queryParams, etc.
2022-03-17 16:59:08 -04:00
Sage Vaillancourt
f37969418d
Add simple web server implementation.
...
Adjust global Environment implementation.
Example `webby.pl` is now a simple server program.
Only limit stringNObj outside of STANDALONE implementations.
Larger catObjects sizes.
Parsing files ignores semicolons inside of quotes.
2022-03-15 21:48:04 -04:00
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
6c8ff04711
Extremely barebones struct object implementation.
2022-03-14 16:52:08 -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
=
8bdf42f6fd
Revert "Add basic struct notion and tests."
...
This reverts commit 95762976c5
.
Turns out these structs are not implemented well.
2020-05-18 02:22:39 +01:00
=
95762976c5
Add basic struct notion and tests.
...
Don't auto-run tests in debug mode. Some new tests fail for list-related reasons (some work in the REPL).
2020-05-18 00:00:19 +01:00
=
340af00a29
Enable multi-statements in one line. Break out env
2020-05-10 18:52:22 +01:00