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
d2a0abeff3
Cleaner and more optimized (cat) implementation.
...
stringObj() will now _add_ to its length parameter.
More global scalloc and smalloc.
Bit of Makefile re-org.
2022-03-31 11:41:08 -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
b4e0f57029
Use (env "HOME") in pebblisp.pbl for reload.
...
Show current working directory in prompt.
2022-03-30 16:59:05 -04:00
Sage Vaillancourt
b5f6a7d951
Add more colors to pebblisp.pbl
...
Plus a type comment on (time)
2022-03-30 16:54:17 -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
75ba0ac5ee
Dedicated getPrompt() function.
...
Can now handle strings or lambdas.
2022-03-30 14:41:53 -04:00
Sage Vaillancourt
92daee1d0d
Skip past func-y objects in REPL, too.
2022-03-29 23:01:50 -04:00
Sage Vaillancourt
f48e1bf5c9
REPL defers to sh when a symbol isn't found.
2022-03-29 22:51:13 -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
52c928846d
Fix `rf` string-offsetting bug.
2022-03-29 16:57:59 -04:00
Sage Vaillancourt
32a2254da9
Tweak some help text.
2022-03-29 16:44:21 -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
f12d8bea7f
Start reading from HOME/.pebblisp.pbl for config.
2022-03-29 16:06:57 -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
bedf525dcb
Patch some bits of calc.c for new stringObj()
2022-03-29 14:02:07 -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
ded215a1cb
Add missing clone.
2022-03-27 22:09:04 -04:00
Sage Vaillancourt
71623db37c
Fix prnl in lib.pbl
2022-03-27 20:00:55 -04:00
Sage Vaillancourt
806f63e8ae
Inline some of web.h into web.c
2022-03-27 19:36:45 -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
69cf9212d7
Simplify several functions.
...
Namely, printObj() and _copyList().
Remove separate cloneList() function.
2022-03-27 00:49:10 -04:00
Sage Vaillancourt
b715b2116a
Remove unnecessary listLength type checking.
2022-03-27 00:13:04 -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
03920147d4
Add idea/ and pl executable to gitignore.
2022-03-26 12:59:35 -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
581dfed359
Combine fn macros.
...
Toying with storing fn types in the code.
2022-03-24 23:58:54 -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
3398729ab8
Track length of stringObj().
...
Use this to simplify catObjects().
2022-03-24 23:07:34 -04:00
Sage Vaillancourt
68a7a55fc0
Continue FUNC transition.
...
Removing some list-func features, at least for now. e.g. (+ 5 (1 2 3)).
Disable related tests.
Improve (reduce) syntax.
2022-03-24 21:50:18 -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
e00d706522
Add function to read a file into a string object.
...
Move webby.pl into dedicate examples/web/ dir.
Pull out styles.css into its own file.
Fix small parseEval leak.
2022-03-24 16:59:58 -04:00
Sage Vaillancourt
06389ac5fc
Manual specification of color-highlighting order.
2022-03-24 16:59:57 -04:00
Sage Vaillancourt
6c7132aa46
Exit code of `./pl --run-tests` is the number of failed tests.
2022-03-23 01:02:27 -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