Commit Graph

20 Commits

Author SHA1 Message Date
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 a59ce1646f More comprehensive webby.pl
Allow for longer strings, but there's still another limiting element somewhere.
2022-03-15 16:03:23 -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 8d22bf575c Add history and ok/err functionality to REPL. 2021-12-15 14:40:49 -05:00
Sage Vaillancourt f3a69989fa Better switch functionality. 2021-12-15 14:39:13 -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
= a6f3fc96e6 Fixed bug where all func calls require an argument
Certain I/O functions (like `inp` or `repl`) do not need arguments, but
previously all functions required at least one argument to called correctly
(i.e. `(inp 0)` or `(repl "banana")`). Now, these can be called as intended:
`(inp)` or `(repl)`.
2021-07-13 21:46:15 +01:00
Sage Vaillancourt 811e9e3dd2 Breaking: Stop `def` adding vars to higher scopes
Fixed OOP error in allocating lambda environments. Add ability to disable test
groups. Disabled forbble tests and `switch` implementation (broken by `def`
change)
2021-07-12 20:34:54 -04:00
Sage Vaillancourt ce28c84696 Slightly better error-handling in Forbble 2021-07-12 20:13:02 -04:00
Sage Vaillancourt 77cb35f961 Add newline print to lib and use it in examples 2021-07-10 23:35:05 -04:00
Sage Vaillancourt 4974e87273 Disable Forbble REPL. Add Forbble-based tests 2021-07-05 05:09:32 -04:00
Sage Vaillancourt c7d3d7f457 forbble stability and usability 2021-07-05 01:15:01 -04:00
Sage Vaillancourt 166c9d4889 Add simple 'switch' implemented in pbl 2021-07-05 01:14:39 -04:00
Sage Vaillancourt cc199b0e57 Add Forbble comment 2020-11-08 16:44:53 -05:00
Sage Vaillancourt 35f0a94f40 Add dup, rot, and over to Forbble example 2020-11-08 13:12:00 -05:00
Sage Vaillancourt fe86f7c836 Add Forbble example code
Forbble is a very, very, simple implementation of Forth, written in PebbLisp.
Forbble isn't very practical, but has been a great test-bed for finding areas
where PebbLisp is particularly lacking in features, or expressiveness.
2020-11-08 12:31:45 -05:00
Sage Vaillancourt 0962601976 Move library-like functions into examples/lib.pbl
Remove `tip` demo function for now. May make a move toward a folder of
.pbl files to test with, and it will be re-included then.
2020-11-06 16:12:52 -05:00
Sage Vaillancourt 775be84f5f Add examples/. Install to system on `make install`
Installs examples/* to /usr/share/pebblisp
A basic REPL is one of these examples, replacing the built-in C version
with one actually written in PebbLisp. It can be invoked the same way:
running `pl` without any arguments.
2020-11-06 15:40:41 -05:00