aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2022-07-03Update a comment in compare.csc.Rose Hogenson1-4/+0
2022-07-03Add a diff library.Rose Hogenson12-191/+549
I was hesitant to add a diff library, but it was surprisingly easy. A straightforward application of dynamic programming.
2022-07-02Write closure conversion.Rose Hogenson8-163/+356
I desperately need a diffing library.
2022-07-01Add update conversion.Rose Hogenson3-145/+345
Now variables can't be updated after they're created, so they can be freely copied into closures.
2022-06-30Remove unsafe code.Rose Hogenson1-57/+48
I'm partially doing it because I'm not sure if what I had was really safe, but also it just looks much cleaner this way.
2022-06-30Add a function for getting the gensym ID.Rose Hogenson1-2/+3
2022-06-29Add pattern matching for record types.Rose Hogenson5-152/+233
I like scheme because it's possible to add any convenient language feature I can think of.
2022-06-28Improve CPS.Rose Hogenson9-431/+357
Goodbye soup. Thanks to "Compiling with Continuations" by Appel.
2022-06-26Finish CPS.Rose Hogenson6-12/+182
Wow we actually finished CPS. Next is closure conversion, then codegen, and then we should be able to run some end to end tests. Then we can look at garbage collection, and from there continue building features down the long road to self hosting.
2022-06-26More CPS.Rose Hogenson3-62/+151
I improved the abstraction in to-cps.
2022-06-25More CPS.Rose Hogenson5-4/+72
2022-06-25Continue work on continuation passing style.Rose Hogenson6-43/+235
2022-06-21Add shell.nix.Rose Hogenson1-0/+5
2022-06-21More progress on CPS.Rose Hogenson3-69/+57
2022-06-21Comment expand-body.Rose Hogenson1-0/+1
2022-06-21Start CPS :)Rose Hogenson2-0/+30
2022-04-22Add notes on the build process and CLI interface.Rose Hogenson1-0/+38
2022-04-22Small update.Rose Hogenson1-2/+2
2022-04-22Fix image caption.Rose Hogenson1-2/+4
I think this will look the best, just repeating the same information in the alt text and in the main text. The pandoc generated version will be slightly repetitive, but it's not too bad.
2022-04-22Add a diagram of the compiler phases.Rose Hogenson2-1/+298
2022-04-22Improve the README for Github.Rose Hogenson1-3/+3
2022-04-22Update the README for Github markdown.Rose Hogenson1-12/+8
2022-04-22Update the README.Rose Hogenson1-3/+351
2022-04-22Remove the void type.Rose Hogenson3-23/+11
Why have void? We will just use #f.
2022-04-07Add libraries.Rose Hogenson3-126/+189
Gone is toplevel. Now everyone lives in a library.
2022-04-02Write a test for case-lambda.Rose Hogenson3-18/+49
I'm realizing that I should have started with builtin-exit and implemented the hard stuff later.
2022-03-31Improvements in macros and IR1.Rose Hogenson4-184/+171
We're omitting libraries for now, and I'll add them in later.
2022-03-31Allow overriding the cmp function in assert-equal.Rose Hogenson2-93/+6
2022-03-03Write the compiler frontend.Rose Hogenson4-54/+186
2022-03-03Start the garbage collector.Rose Hogenson7-77/+561
I don't think we finished it, but I wrote this code a while ago and I'm just trying to get it committed.
2022-01-25Nitpick on loop style.Rose Hogenson1-3/+4
2022-01-25Use an exception for loop return.Rose Hogenson1-18/+12
This makes everything a lot easier, as it handles nested loops automatically. My brain wave was storing the returned values in a thunk.
2022-01-25Fix the bugs in loop.Rose Hogenson2-44/+230
It works! Sometimes it emits nested loops!
2022-01-24Implement lambda?Rose Hogenson2-12/+209
2022-01-24Finish the loop macro.Rose Hogenson3-164/+362
I also cleaned everything up a lot. Maybe there are still bugs because the test coverage is awful, but for now I'm happy to be done.
2022-01-22Store the list length in sort.Rose Hogenson1-8/+12
Computing length each time is very unnecessary.
2022-01-22Add a loop macro.Rose Hogenson3-12/+313
2022-01-15Finish the macro expander.Rose Hogenson6-105/+501
It works!! At least it passes all the test cases. Next I will: 1. finish the builtins, 2. add a conversion to IR2 in continuation passing style, 3. add a compiler from IR2 to bytecode, 4. and add an option to the frontend compiler to generate a standalone executable.
2022-01-14Write a first draft macro expander.Rose Hogenson6-161/+414
Committing it because it compiles. I have to write tests and debug it still.
2022-01-13Rewrite match to use exceptions.Rose Hogenson1-17/+43
This makes the control flow more clear, and eliminates the need to scan the pattern twice. It also makes it easier to add new forms by consolidating the pattern logic in one procedure.
2022-01-13Use := instead of = for variable assignment.Rose Hogenson1-1/+1
I was reading about the difference, and := does what you want more often than not.
2022-01-13Generalize the hash map.Rose Hogenson3-35/+48
Before we were assuming keys could be compared with eqv?. But it seems like that assumption isn't true when we want to hold identifiers in the hash map.
2022-01-11Add a README.Rose Hogenson1-0/+5
2022-01-11Move scheme compiler into a separate directory.Rose Hogenson27-0/+0
2022-01-11Add a first implementation of a macro expander.Rose Hogenson3-0/+422
This half-finished macro expander is the most satisfying piece of code I have ever written.
2022-01-11Make bindings visible while a guard is evaluated.Rose Hogenson2-5/+15
The current implementation repeats the bindings twice, but I guess it's fine. It seems to work.
2022-01-11Add guards to the match syntax.Rose Hogenson2-1/+20
I'm not sure the syntax is great, but it's very helpful to have.
2022-01-09Write the linker.Rose Hogenson13-102/+450
2022-01-09Remove str- prefixes from the strings library.Rose Hogenson3-47/+45
Not very scheme.
2022-01-09Redo the testing framework.Rose Hogenson9-637/+310
We can lean more on the power of scheme to make the testing framework a little less verbose.