Commit Graph

158 Commits

Author SHA1 Message Date
Sage Vaillancourt a3fe0b075d Remove lingering printObj() from defe 2020-11-08 11:48:50 -05:00
Sage Vaillancourt 18b1e28185 Script dir set in Makefile. Rename exec to `pl`
Changed install dir.
General cleanup of Makefile.
Added `make uninstall` to Makefile.
Tests still require that lib scripts already be installed to pass.
2020-11-07 00:14:19 -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
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 31fcf0c2d8 Try to skip double evaluations in list 2020-11-04 15:24:09 -05:00
Sage Vaillancourt 9da87f5674 Clean up after adding `codes[]` 2020-11-03 15:20:09 -05:00
Sage Vaillancourt 68705da88f No longer evals (x) to x 2020-11-03 14:44:37 -05:00
Sage Vaillancourt d8d8231f0d Break up evalList() and document the new functions 2020-11-03 14:35:47 -05:00
Sage Vaillancourt a39c6b2c53 Comments and renaming in evalDefArgs() 2020-11-03 09:46:34 -05:00
Sage Vaillancourt 8c71fd2242 Use more cloneObject() 2020-11-03 00:07:08 -05:00
Sage Vaillancourt e0153528a1 Take input in standalone. Print numbers as chars 2020-11-02 16:38:37 -05:00
Sage Vaillancourt f8176fef4f Add plain stringFromSlice()
Doesn't try to ignore quote marks. objFromSlice() utilizes it, but should have the same behavior as before.
2020-11-02 15:55:55 -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 78f5b98f9f Don't print newlines on (prn) or last expr in file 2020-11-02 15:23:04 -05:00
Sage Vaillancourt 058bd302df `def` can bind multiple vars at once
For example `(def (a b) (10 15))` binds `a` to 10, and `b` to 15
2020-11-02 13:42:37 -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 ba74561bed Increase MAX_TOK_CNT. Impact on watch unsure 2020-11-02 12:38:51 -05:00
Sage Vaillancourt a408472494 Add '->' to lambda printing 2020-11-02 12:38:38 -05:00
Sage Vaillancourt 3a413c28fc Attempting to correct some (def) weirdness 2020-11-02 07:58:09 -05:00
Sage Vaillancourt f9cb2d544a More robust comment processing 2020-11-02 07:57:13 -05:00
Sage Vaillancourt 54e2e09c5c Add explicit (print) function 2020-10-30 14:36:44 -04:00
Sage Vaillancourt 99fc088d3e Try to be less strict about whitespace in files 2020-10-30 09:52:46 -04:00
Sage Vaillancourt b5648963a7 Correct string equality check 2020-10-30 09:07:09 -04:00
Sage Vaillancourt b443a54822 Add `pre` for prepending to lists 2020-10-29 11:23:35 -04:00
Sage Vaillancourt 9486854267 Basic file execution 2020-10-29 11:18:06 -04:00
Sage Vaillancourt 94555e4497 Adding to env checks outer env for existing Object 2020-10-29 10:26:44 -04:00
Sage Vaillancourt cb87fbdae6 Print missed symbol's name 2020-10-29 10:00:25 -04:00
Sage Vaillancourt ef8e2cbc79 Remove wrong makefile listing 2020-10-29 09:11:34 -04:00
Sage Vaillancourt 130da5a70e Merge branch 'master' of https://gitlab.com/sagev9000/pebblisp 2020-10-29 09:06:28 -04:00
Sage Vaillancourt 46516461eb Add 'install' to Makefile 2020-10-29 09:04:32 -04:00
Sage Vaillancourt 7b649fdf16 Add `isnum` and some tests 2020-10-28 18:09:57 -04:00
= ca51937926 Update README for recent changes. Remove aliases. 2020-08-09 23:37:28 +01:00
= 68e062e2e0 Add TYPE_OTHER, subscriptions, and PebbleObjects
Move most file-local variables from calc.h to calc.c (so calc.h can be included)
Quick hack to get simple TYPE_LAMBDA evaluated
Add pebcom files for time/vibe/eventually battery etc. functions
Add TYPE_OTHER, so that pebble-specific (and potentially other) objects can be used in PebbLisp
Created PebbleObject/PebbleType to work as a sort of tagged pointer, to be used as a TYPE_OTHER object
Add some functions for creating/editing windows and textlayers from within PebbLisp
Added subscribe(), enabling lambdas to be run at set time intervals
2020-08-09 20:03:02 +01:00
= 3f9d24c617 Fix signed/unsigned comparison 2020-08-04 22:04:11 +01:00
= d87322b6a5 Some env.c refactoring and clean-up 2020-08-04 20:26:47 +01:00
= b92768c5ec Add script-calling. Tweak font size thresholds
Other clean-up
2020-08-04 18:30:40 +01:00
= 5644a46c3c Add OTHER type. Auto-open script 0 on code-send 2020-08-03 16:21:04 +01:00
= 05d86d81be Merge branch 'master' of https://gitlab.com/sagev9000/pebblisp 2020-08-03 14:18:16 +01:00
= f318eb6b49 User-created windows close with back button 2020-08-03 14:17:49 +01:00
Sage Vaillancourt 40541fd410 Move TODO to end of file 2020-08-03 13:14:51 +00:00
Sage Vaillancourt 3c6d98cd79 Update README.md 2020-08-03 13:13:10 +00:00
Sage Vaillancourt ab095694d0 Add link to Android apk 2020-08-03 13:12:28 +00:00
= e586018284 Bump version number 2020-08-02 21:54:21 +01:00
= c0f7213110 Can now receive code snippets from a phone!
Font adjustment tries (cheaply) to account for newlines
2020-08-02 21:53:30 +01:00
= dd7efae6b1 Converted to package.json format 2020-08-02 21:18:24 +01: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
= 796a4cdc91 Added some expected-error tests 2020-06-12 23:50:36 +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