From 82df87bda882fadf7d5c11de50f8fe7628aa0448 Mon Sep 17 00:00:00 2001 From: mryouse Date: Sat, 27 May 2023 02:00:22 +0000 Subject: 5/26/2023 update --- README.md | 19 ++++++++++++++----- functions.txt | 10 +++++----- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 399b142..44efcfb 100644 --- a/README.md +++ b/README.md @@ -17,14 +17,18 @@ now in bytecode stopped running with [11e9f1d854](https://git.rawtext.club/mryouse/neb-d/commit/11e9f1d854602aae7cb895cfb2f9fc5dd338e6f8), helful? not really, not yet. - [ ] defining multiple functions in a script doesn't seem to work? + - [ ] there are many instances of popping on an empty stack. i have a warning emitted, + which should help me track it down *at some point*, but at least it doesn't crash. + - [ ] `append` on an empty list segfaults + - [ ] arity checking is entirely arbitrary for builtins, non-existant for user-defined functions + - [ ] parsing does not handle types correctly, or comments at all - [ ] i mean, nearly nothing works ## things that hopefully work - - [x] addition! - - [x] subtraction! - - [x] `if`/`and`/`or`! - - [x] `>`/`<` and co. - - [x] `func` to define a function, `lambda` to make one on the fly + - [x] math (\*+/-) + - [x] control flow (`if`/`and`/`or`) + - [x] logic (`>`/`<`/`eq?`/`not` and co.) + - [-] `func` to define a function (global only?), `lambda` to make one on the fly - [x] `def`, globally and locally - [x] `block`? maybe? - [-] lists/strings: @@ -33,3 +37,8 @@ now in bytecode - [x] `length` - [x] `concat`/`append` - [x] `in?` (membership for lists, substrings for strings) + - [-] types: + - [x] `any?`/`nil?` + - [-] higher-order functions + - [x] `map`! (i'm particularly excited about figuring out how to do this on the stack, + though i'm sure it's quite a naive implementation) diff --git a/functions.txt b/functions.txt index 81dd8d0..7fd8aea 100644 --- a/functions.txt +++ b/functions.txt @@ -31,7 +31,7 @@ FILES: HOF: [ ] filter -[ ] map +[x] map [ ] reduce LISP-Y: @@ -57,10 +57,10 @@ LOGIC: [x] not MATH: -[ ] * +[x] * [x] + [x] - -[ ] / +[x] / [ ] floor META: @@ -101,14 +101,14 @@ TERMINAL: TYPES: [ ] ->string -[ ] any? +[x] any? [ ] bool? [ ] float? [ ] handle? [ ] int? [ ] list? [ ] literal? -[ ] nil? +[x] nil? [ ] number? [ ] string->float [ ] string->int -- cgit v1.2.3