miloignis
c1a0608b7c
threading trace throughout
2023-07-13 23:38:42 -04:00
miloignis
15cab8799d
swap to single struct wrapper scaffolding
2023-07-13 22:52:49 -04:00
miloignis
6edbe7d2c8
Continue moving stuff around to simplify before opt, and then start sketching out wrapped values and trace - just realized we might need all values to be wrapped tohande side effects that don't depend on input but still have effects (mutation, now ugh and assert)
2023-07-09 00:24:50 -04:00
miloignis
b077daf12e
Split eval.rs out of ast.rs, and rename ast.rs to basic.rs. Copy it over to opt.rs, and hook up a From<> impl and a congruent(x)->bool function, and add to main.rs and test.rs. Now we actually have to make opt.rs optimize...
2023-07-06 01:11:56 -04:00
miloignis
f4ae4db92d
Move call inside form to allow for tracing (might still need a way to get out of the end of tracing)
2023-07-04 12:23:31 -04:00
miloignis
b03122c7b8
Move entire Form out of eval into Trait
2023-07-04 10:16:38 -04:00
miloignis
d6cf6a6b64
Dependency update
2023-07-02 18:09:34 -04:00
miloignis
3b858eda98
Move primitives to enum - defunctionalized
2023-06-06 01:10:01 -04:00
miloignis
8b9a0a0f2d
Start sketching bytecode generation
2023-05-25 02:07:01 -04:00
miloignis
ce5ab1dd99
Implemented shift/reset delimited continuations using a defunctionalized double-CPS transformation! Basic tests work at least, there certinally could be bugs
2023-05-22 01:23:17 -04:00
miloignis
4126e25463
everything uses continuations now, skeleton for shift/reset
2023-05-21 04:14:29 -04:00
miloignis
d44480bf6c
contemplate parameter eval cont
2023-05-16 23:48:26 -04:00
miloignis
093f3c0453
Basic continuation-ification of primitives, finally work out the Cursor/Cont devide. Still need to figure out which Cont's we need for evaluation (possibly a subset of) parameters
2023-05-16 23:31:58 -04:00
miloignis
f82101e63f
Start moving eval to explicit continuation based
2023-05-16 01:15:09 -04:00
miloignis
ea1516fbd1
Started new kv impl with support for mutable cells, just the basic interpreter. Going to add the lazy bytecode interperter next
2023-05-14 23:50:27 -04:00
miloignis
82bfb5bc7b
small syntax expl in How it works
2023-04-26 00:39:08 -04:00
miloignis
7431dbe4b7
Add examples
2023-04-26 00:33:08 -04:00
miloignis
b2216f7574
Implemented many of Chris and Sharjeel's suggestions - still need to insert a worked example, and if I have time, benchmarks re-run with numbers and memory usage
2023-04-25 21:58:25 -04:00
miloignis
9ec99a94eb
presentation updates
2023-04-24 10:48:24 -04:00
miloignis
c994f1b1af
forgot the images
2023-04-23 17:25:45 -04:00
miloignis
febe356575
new slides
2023-04-23 13:02:01 -04:00
miloignis
0df6ce49fe
spell checks, adjenda
2023-04-18 13:02:13 -04:00
miloignis
87763fad40
Tons of slide work, unfortunately depend on external MathJax - need to pull that down later
2023-04-18 01:47:10 -04:00
miloignis
5054441625
More work including brain dumping more slides and bugfixes for memo - have found current problem, which is that a non-env se can prevent a DeriComb from pulling in valeus from a real Env frame which it's being returned from - even though this is caught, the resulting call still depends on it, marks it as such, and then it depends on a call that was real and now no longer exists.
2023-04-16 00:02:29 -04:00
miloignis
3dcebe5297
Bunch of new slides with examples comparing Fexprs to Lisp's macros and special forms
2023-04-15 15:41:11 -04:00
miloignis
f55dd236b6
Fix one bug, or part of one - dericomb wasn't advancing if se wasn't a legal env, but was still unioning the body IDs into it's ids which could convince it that it should be able to progress
2023-04-15 00:52:52 -04:00
miloignis
f4b99067d4
More working memo that tracks used env-ids and env, fixed bugs with it too. Currently trying to track down some infinate loops caused by something that thinks it should make progress and doesn't, have an assert that notices doubles
2023-04-15 00:19:51 -04:00
miloignis
a990809e21
Some slide work
2023-04-11 23:17:55 -04:00
miloignis
f567172099
share background color
2023-04-08 14:23:56 -04:00
miloignis
ee4add2fee
Gah my comment messed up the CSS again
2023-04-08 14:16:59 -04:00
miloignis
ab700c12b1
and the RemarkJS license
2023-04-08 14:07:41 -04:00
miloignis
cad202551b
Forgot we moved out to the standalone js
2023-04-08 14:06:07 -04:00
miloignis
4e7825cb2b
Hack in copying code between the two editors and fix recursive.css's body style overridding the slides
2023-04-08 14:05:48 -04:00
miloignis
6ef3392aa0
prototype remarkjs slides with Kraken formatting and auto-execute code in browser on slide change! Some rough edges, including two different editors between the first slide and the reveal slide
2023-04-08 13:38:21 -04:00
miloignis
b89b831983
Website with changes made with/based on my graphic designer Mom's suggestions (thanks Mom!)
2023-04-05 21:10:04 -04:00
miloignis
a06c5854c8
The big exponential thing was ironically Hash which was being called for memo which existed to prevent exponential behavior. Reimplmenented the caching hash, and much much faster. Still some failing tests, and bvau might be looping
2023-04-04 23:40:09 -04:00
miloignis
8ccdfd8ab2
new invariant: when returned, each form is as evaluated as it can be. This means that union_into_tail is more rare, and only for recursion (if or deri) stopped items. If now also captures its environment if it's rec_stopped. Added memoization for legal env forms to try to deal with it, has helped some, still exponential behavior.
2023-04-02 12:48:02 -04:00
miloignis
3c5bb127e2
Work on saving env on calls and suspended symbols, only use as env if legal. Seemingly causing exponential behavior, need to have it done incrementally... todo
2023-03-29 01:58:07 -04:00
miloignis
8fa7acbdf1
Actually using the evaled param lookups with cons pairs etc - Tests failing - need to figure out how to really handle the *weird* case, and also the failing tests if the *wierd* case isn't the cause. Not sure if we need to track to prevent the dropping of the *not* redundant veval, or if the suspended symbol should hold onto the half-done env, or what
2023-03-27 01:27:25 -04:00
miloignis
664b336a48
trac suspended param eval, with proper back conversion
2023-03-27 00:28:44 -04:00
miloignis
70ac3e3633
Add theming and a 'slick' theme based on Inter and JetBrains Mono
2023-03-25 16:59:24 -04:00
miloignis
049624a840
Baby steps towards handling non-val car/cdr (eventually cons)
2023-03-22 01:06:24 -04:00
miloignis
85454fda79
unneeded anchors
2023-03-22 00:27:22 -04:00
miloignis
30c4d4b28c
some website edits
2023-03-22 00:24:38 -04:00
miloignis
92bcb6f358
All tests passing when run with --release. Not sure if this is really correct, or if the algorithm is being too wasteful and re-executing versions of functions taht should have been inlined or something (this may esp be true without the parameter/wrap_level stuff, and also I'm a little sus of the env chains - oh hay, it might even just be becasue only legal env chains are allowed which prevents pe-ing)
2023-03-20 01:06:24 -04:00
miloignis
48de9517c9
An unvaled Pair should have a True override for its IDs
2023-03-19 11:15:22 -04:00
miloignis
9162b456d2
Oh some were just changes in formatting. First real issue looks like it's VMAP
2023-03-19 02:03:41 -04:00
miloignis
1df3acccd7
Some tests passing again, namely all of basic and fact
2023-03-19 01:52:18 -04:00
miloignis
7b334e96df
Finally finished sketching out the new version, lets get on the compile errors
2023-03-19 00:59:46 -04:00
miloignis
04bf1c6249
Website reformat - content still TBD
2023-03-18 14:57:31 -04:00
miloignis
d4920ec4b6
Notes for hopefully the full simple kraken PE, with initial implementation of new NeededIds (split between head and tails (heads are ids for which progress will be made, tails might not progress but are contained), body_under and if_under).
2023-03-15 01:16:37 -04:00
miloignis
865fc1b4b6
Update flake, split ast out into ast & pe_ast, and main into main & test
2023-03-14 20:14:17 -04:00
miloignis
46e6e27f88
pre change
2023-03-14 20:05:39 -04:00
miloignis
d836a66e66
more numbers of evals/calls
2023-03-01 00:33:43 -05:00
miloignis
3df2d02286
Merge branch 'master' into partially_broken
2023-02-28 01:15:48 -05:00
miloignis
3d6082503c
track evals, dyn 0 calls, dyn 1 calls
2023-02-28 01:15:36 -05:00
miloignis
af2fb537c7
saving remaining before
2023-02-28 01:14:03 -05:00
miloignis
4752dde4af
Added recursive If tracking, but that still doesn't seem to have solved the problem. Have to dig deeper into the actual failed tests now...
2023-02-24 01:19:55 -05:00
miloignis
abddf1db06
transition to fake-ids instead of rec-hashes. Still have infinate recursion, need to check on it
2023-02-23 13:14:10 -05:00
miloignis
6357297cd1
been going down withat's probs the wrong path for solving infinate recursion for bvau, did a lot on suspended IF but that doesn't seem to be the issue... Not sure if this was done in vain
2023-02-23 02:48:40 -05:00
miloignis
bb6b15c156
some bugfixes, and moving towards a reconstruct-on-error. More bugs remain though, ?uncovered? by this, including another infinate loop. Fixed a tricky one where a function would recursively call it self for real while evaluating itself fake, and create an environment that had a loop indirected through subbing itself in for SuspendedEnv (since the real and the fake had the same ID).
2023-02-23 01:38:46 -05:00
miloignis
e327ed7314
Found the bug. All tests pass PE, except for those that overflow the stack. Those are disabled, and the remaning must be run with --release. Can maybe improve PE tail call to prevent that
2023-02-22 20:16:08 -05:00
miloignis
bde04e94df
Still buggy, but implemented a more tail-recursive PE with non-recursive drop_redundent_veval, special forms SuspendedEval and SuspendedIf, simplification of how primitives work, and more
2023-02-22 01:22:57 -05:00
miloignis
45a869b09b
Remove year and weird (c) from copyright line, concensus is it's not needed these days
2023-02-21 10:53:07 -05:00
miloignis
21fb47470a
Too much debugging to find out PE assert was broken and debugging printlns were overflowing the stack. Some of the other tests also overflow the stack if not built in release mode, and I disabled the stack-testing tests for PE
2023-02-21 10:32:26 -05:00
miloignis
67feab10bc
Add rec-hash-stopping for SuspendedPair calls
2023-02-21 01:48:04 -05:00
miloignis
76b68e28d8
Implement cached hashes
2023-02-20 22:20:00 -05:00
miloignis
7f10d111ac
Fix attempted in SuspendedPair, a lot more tests also work PE-wise now. Many are overflowing the stack, might be recursion causing or just really bad lack of tail calls, or a bug...
2023-02-20 00:22:29 -05:00
miloignis
5107c1d7e4
Add in evaling of DeriComb, first let test in fib passes now (but not fib itself)
2023-02-19 23:16:10 -05:00
miloignis
4d251964a2
Sketch combiner_return_ok and fix DeriComb ids
2023-02-19 20:33:09 -05:00
miloignis
5df87a53cf
Proper progress decisionmaking via NeededIDs and DCtx taking into account ids and hashes (not that we're storing hashes yet)
2023-02-19 19:28:48 -05:00
miloignis
71326738fa
First basic use of suspended lookup progress using the environment, basic tests passing again for pe
2023-02-19 18:52:39 -05:00
miloignis
91e0641045
Split Ctx into BCtx (bi-directional ctx, must be returned) and DCtx (downwards-ctx, only passed down). Env goes in DCtx, so you don't have to play a replace-back game with ctx when returning from function calls.
2023-02-19 12:37:12 -05:00
miloignis
283c0232b0
Some steps forward, some back - add sanity testing that eval(e,x) == parial_eval(ctx, x.unval()), start fixing the bugs it reveals, split SuspendedLookup into SuspendedEnvLookup and SuspendedParamLookup
2023-02-19 01:18:59 -05:00
miloignis
fdaca7f807
Implement basic derived calls, and fix eval not unvaling bug
2023-02-19 00:46:54 -05:00
miloignis
c5f7a52a38
Implment basic function calling pe
2023-02-18 22:46:23 -05:00
miloignis
b893787a1b
move towards just MarkedForm (with no Value(Form)), with Attempted and MarkedIDs, and sketch out the MarkedForm::PrimComb versions of all the primitives with translation from PrimComb
2023-02-18 19:32:59 -05:00
miloignis
8b59d5a16a
reorginze, start sketching partial eval
2023-02-16 18:21:13 -05:00
miloignis
520e473415
Add RBTREE and test, along with <, >, <=, >=
2023-02-14 13:18:19 -05:00
miloignis
f568ee3d50
Add len, finish match
2023-02-14 12:47:48 -05:00
miloignis
66fc1db606
Implemented Display for Form, then first sketch of MarkedForm, NeededIds, and unval, and Display for MarkedForm
2023-02-14 00:50:05 -05:00
miloignis
ad3c251ba9
implement non-varidic and/or and start porting match. Need to make and/or varidac and continue match work
2023-02-13 01:08:34 -05:00
miloignis
3df7d6e0ec
Finish converting into individual tests (mostly) - might need to split out and uncomment some should-fail tests
2023-02-13 00:42:54 -05:00
miloignis
e9b8f636cf
Start splitting out the tests into multiples, with the library code at top level in once_cell's Lazy
2023-02-12 16:16:59 -05:00
miloignis
5838cf0bdd
Added 'assert', and changed match_params to assert that when the param tree is nil so are the passed params, which should handle exact length for functions etc.
...
Added unwrap, lapply, array, the Y combinator, and rlambda. Y and rlambda were almost verbatim copies from old Kraken, with a change for how variadic functions are declared ( '( & args )' vs 'args' ) and a name change.
2023-02-12 13:30:45 -05:00
miloignis
5512ab8804
Fix warnings, add destructuring let1
2023-02-12 12:19:56 -05:00
miloignis
30964bf4ec
Better BVAU, which does full trees-of-symbols destructuring with varidic support!
2023-02-12 11:56:32 -05:00
miloignis
c028e975d4
Add wrap, vfoldl, zipd, concat, bvau, and lambda! Need to add varidac handling to bvau, but getting tired
2023-02-11 00:34:24 -05:00
miloignis
1b813e39fb
Fix vapply bug, write vmap, add debug
2023-02-10 23:05:08 -05:00
miloignis
606972a38b
Implement vapply, got around the ever-growing environment
2023-02-10 22:34:04 -05:00
miloignis
3c2dfbf8a7
Add tail call recursion - works, but if a datastructure is too deep (say, because env keeps growing on the heap) Rc::drop will end up overflowing the stack when trying to deallocate
2023-02-10 19:38:44 -05:00
miloignis
ba67b8c67b
Add "!" syntatic form - a bit like the single quote, but !(a b c) d => !(a b c d). Useful for like !(let a 1) (+ a 3) or w/e. Break out some of the infinate nesting"
2023-02-10 01:01:04 -05:00
miloignis
3b5cc2c506
Implement a new style of let1 based on direct env manipulation
2023-02-09 01:20:19 -05:00
miloignis
02e359f42d
Finish out the basic primitives along with testing infra for both parsing and evalaution, with some slick Into<> impls to make Rust values Kraken values, which is esp useful for testing
2023-02-08 23:37:23 -05:00
miloignis
d861d91397
Fix ', add if and = along with bools
2023-02-08 01:54:53 -05:00
miloignis
c801f604c2
Add derived combiners and fix some bugs with eval, vau, quote, cons, car, cdr
2023-02-07 13:00:15 -05:00
miloignis
60dad101f8
Speed sketch beginnings of a Rust implementation of new stripped-down Scheme-like Kraken
2023-02-07 02:07:53 -05:00
miloignis
3807381ceb
Sketch out call-info, realized it and function-analysis needs pectx and also err threaded through it, since it can fail (which must be recoverable) and needs env and pectx for partial_eval inside
2023-02-02 01:18:17 -05:00
miloignis
bea48eb18b
Reviewing and making notes about analysises, looking to see if they can be implemented with a generic traversal or something
2023-02-01 01:01:37 -05:00
miloignis
a038a8cebf
Ensure proper env care during memo short circuiting
2023-01-31 22:54:53 -05:00