=
323b3113d7
Patch to compile for Pebble devices.
...
Mostly throwing ifdef Standalone all over the place.
2022-04-02 11:51:06 +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
980a1c42ab
Add (cd) and (cwd).
...
Handle quotes in printColored().
2022-03-31 21:31:24 -04:00
Sage Vaillancourt
2fb6643326
A bit of cleanup and warning-hushing.
2022-03-31 14:12:52 -04:00
Sage Vaillancourt
ac04fa1a96
Make pointer-printing in (penv) optional.
...
Colorize (penv) output.
2022-03-31 13:23:45 -04:00
Sage Vaillancourt
fb2e1811ff
Rename possessive to structAccess.
...
Gives better error messages.
Use typical type-checking in structAccess.
Make checkTypes() more global, and move to pebblisp.c
2022-03-31 12:09:23 -04:00
Sage Vaillancourt
32e21bf758
Replace (struct's field) with (struct.field)
...
It was cute, but hard to read in space-delimited lists.
Convert (map) to a normal pl function.
Add trueObject() falseObject() macros.
2022-03-31 10:29:10 -04:00
Sage Vaillancourt
f2742e8411
Add (env var_name)
...
Add make: release
2022-03-30 16:47:54 -04:00
Sage Vaillancourt
d76e3f5341
Make (def) a normal function.
...
Remove (defe) for now.
2022-03-30 16:32:42 -04:00
Sage Vaillancourt
342eba3a0d
Add basic (time) function and Time struct.
...
Also add pebblisp.pbl config file to examples/
2022-03-30 16:04:30 -04:00
Sage Vaillancourt
85d8ee73e7
Add docs/tests to the old BASIC_OP functions.
...
Also test `poss`.
2022-03-29 20:00:57 -04:00
Sage Vaillancourt
5779ad5427
Define function symbols at their declaration.
2022-03-29 19:00:01 -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
79a2d09995
Adjust repl to allow dropping the parens around `?`
...
`?` with no arg also returns its own help text.
Improve web help texts.
2022-03-29 15:30:28 -04:00
Sage Vaillancourt
803935c637
Move help directly into env.
...
Fix repl leak.
2022-03-29 15:09:36 -04:00
Sage Vaillancourt
ce6c536567
Fix env memory bug.
...
Fix webby.pl::singleton.
Add basic-auth user/pw to Request plstruct.
2022-03-29 14:40:28 -04:00
Sage Vaillancourt
a444bc11bb
Use dynamically-sized strings for stringObj.
...
Fix webby.pl's `reduce` usage and web.c's struct creation.
2022-03-29 14:01:44 -04:00
Sage Vaillancourt
af7a2e6265
Cleanup and a couple (micro) optimizations.
2022-03-28 23:51:05 -04:00
Sage Vaillancourt
66a07e395c
Add some runtime type-checking.
...
Adjust simple-ops structure.
2022-03-28 13:19:44 -04:00
Sage Vaillancourt
e22e022cd8
Reference count strings.
2022-03-28 09:56:34 -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
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
62e430af69
Adjust test formatting.
...
Replace plfunc.h comments with simple type hints.
2022-03-24 23:32:51 -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
06389ac5fc
Manual specification of color-highlighting order.
2022-03-24 16:59:57 -04:00
Sage Vaillancourt
d743970b1a
Tweak (eval) to accept SLIST arguments.
...
Tweak implicit-cat detection.
Explicit empty-string notation in test display.
A couple more tests.
2022-03-23 01:00:11 -04:00
Sage Vaillancourt
bf2b9504a6
Better handle deeply nested help highlighting.
2022-03-22 12:01:24 -04:00
Sage Vaillancourt
86f3f4b32c
Do some simple depth highlighting in help text.
2022-03-22 11:54:26 -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
c9be701b19
Fix no-param lambda environment bug.
...
Put allocation cap behind an ifdef
2022-03-19 21:28:17 -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
13a7ad97b5
Correct known memory leaks.
2022-03-17 13:23:19 -04:00
Sage Vaillancourt
011ed937fe
Some memory fixes.
...
Also removed unnecessary comments.
2022-03-16 23:31:14 -04:00
Sage Vaillancourt
711719289f
Several changes.
...
Add `reduce` and `islist`.
- Reduce is broken with lambdas for some reason.
Remove `switch` from lib (breaks `penv`).
More detailed lambda to-stringing.
A bit of fixing for lambdas that return lambdas.
Re-org Object fields for simpler visual debugging.
Let `cat` work with one argument.
Add prompt option for `inp`.
Some more refinement of the webby.pl example.
2022-03-16 16:50:55 -04:00
Sage Vaillancourt
7faf2ebbb3
Add POST method.
...
Rename `addroute` to `get`.
2022-03-15 23:22:28 -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
Sage Vaillancourt
d73247a471
Fix deleteEnv null-pointer bug.
2021-12-15 14:25:47 -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
=
c142730837
Errors can have context to make them more useful.
...
External:
Error changes.
User windows will show string reps of all object types
Internal:
Some re-org and renames in calc.
Add stringNObj for more controlled string-receiving.
Note: currently aplite has a hard time with larger scripts, possibly because of
recent changes. Not sure how much can be done about it, but I'm investigating.
2021-07-21 16:26:04 +01:00