aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormryouse2023-05-26 03:17:33 +0000
committermryouse2023-05-26 03:17:33 +0000
commit6261be78421d6a842b21653b069ca7b032f8fecc (patch)
tree96c6514e192c1979cce60e60eee8467e04572fe3
parent2ffc9959f3324a234d8337f05643c8e531154081 (diff)
5/25/2023 update
-rw-r--r--README.md22
-rw-r--r--functions.txt30
2 files changed, 27 insertions, 25 deletions
diff --git a/README.md b/README.md
index c3f3957..399b142 100644
--- a/README.md
+++ b/README.md
@@ -3,17 +3,19 @@
now in bytecode
## broken things
- - [x] VM immediately returns after a `def` (fixed with [d13ae11c4f](https://git.rawtext.club/mryouse/neb-d/commit/d13ae11c4f7cccd8f5e3ad072597c55c9471a638)?)
- - [ ] lists work for atoms like `(list 1 2 3)` but not evaluated expressions
- like `(list (+ 2 3) 4 5)` (i think that only includes 3 4 5). might need
- something like a MAKE_LIST op, followed by a length of how many items?
- i feel like i'm really bastardizing bytecode instructions.
+ - [x] ~~VM immediately returns after a `def`~~ (fixed with [d13ae11c4f](https://git.rawtext.club/mryouse/neb-d/commit/d13ae11c4f7cccd8f5e3ad072597c55c9471a638)?)
+ - [x] ~~lists work for atoms like `(list 1 2 3)` but not evaluated expressions
+ like `(list (+ 2 3) 4 5)`~~ fixed with [d95e4f6f98](https://git.rawtext.club/mryouse/neb-d/commit/d95e4f6f988b16bbd95a9c78c0355d190390f003)
+ and [9fe6496202](https://git.rawtext.club/mryouse/neb-d/commit/9fe6496202bd95d252ed2323a88fd24781780b64).
+ i'm almost definitely still bastardizing bytecode.
- [ ] the emitted code is lousy with runtime typechecks. these are good to have,
generally speaking, but a) should be able to do more compile time type
checks to avoid some of them, b) should only need to type check certain
things once (so long as variables can't change type), and c) should probably
generalize the typecheck op with a parameter to enable more flexibility
- - [ ] compiler errors don't stop the VM from running, and are not particularly helpful
+ - [-] ~~compiler errors don't stop the VM from running, and are not particularly helpful~~
+ 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?
- [ ] i mean, nearly nothing works
@@ -22,6 +24,12 @@ now in bytecode
- [x] subtraction!
- [x] `if`/`and`/`or`!
- [x] `>`/`<` and co.
- - [x] `func` to define a function, assuming it only has ^^ those things
+ - [x] `func` to define a function, `lambda` to make one on the fly
- [x] `def`, globally and locally
- [x] `block`? maybe?
+ - [-] lists/strings:
+ - [x] `first`
+ - [x] `rest`
+ - [x] `length`
+ - [x] `concat`/`append`
+ - [x] `in?` (membership for lists, substrings for strings)
diff --git a/functions.txt b/functions.txt
index 6c18c60..81dd8d0 100644
--- a/functions.txt
+++ b/functions.txt
@@ -43,26 +43,17 @@ LISP-Y:
[ ] quote
LISTS:
-[ ] append
[ ] empty?
-[x] first
-[ ] in?
-[ ] last
-[ ] length
[x] list
-[ ] most
[ ] prepend
-[x] rest
-[ ] reverse
[ ] shuf
-[ ] slice
LOGIC:
[x] <
[x] <=
[x] >
[x] >=
-[ ] eq?
+[x] eq?
[x] not
MATH:
@@ -80,18 +71,21 @@ META:
[ ] user-funcs
[ ] user-symbols
-STRINGS:
-[-] concat (accepts a single string) (this should be a Native function)
-[ ] first
-[ ] join
+SEQUENCES:
+[-] append/concat (only accepts one value)
+[x] first
+[x] in?
[ ] last
-[ ] length
+[x] length
[ ] most
-[ ] ord
-[ ] raw
-[ ] rest
+[x] rest
[ ] reverse
[ ] slice
+
+STRINGS:
+[ ] join
+[ ] ord
+[ ] raw
[ ] split
[ ] strip