Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An Implementation in Python with a Compiler #653

Closed
wants to merge 72 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
da0c3b4
Copy files for rpl in to main dir
jcguu95 Mar 11, 2024
cd73f72
Add debug support to step1 (now main.py).
jcguu95 Mar 11, 2024
f7636c5
Import env, and worked on COMPILE.
jcguu95 Mar 11, 2024
4b537f7
Use a real debug logger.
jcguu95 Mar 11, 2024
402065f
Finish: def! (prim-opt), +-*/ (function).
jcguu95 Mar 11, 2024
3de4bbf
Clean the code. No logics changed.
jcguu95 Mar 11, 2024
6da0cf5
Finish: let* (prim-opt).
jcguu95 Mar 11, 2024
ad88939
Finish: do, if, fn* (prim-opts).
jcguu95 Mar 11, 2024
abc1538
Clean code. No logics changed.
jcguu95 Mar 11, 2024
cef411e
Add automatic tests and FIXME comments.
jcguu95 Mar 11, 2024
e512847
Remove comments.
jcguu95 Mar 11, 2024
8d62557
Seperate COMPILE and EXEC.
jcguu95 Mar 11, 2024
3db8a6b
Prevent compiler from polluting global bindings.
jcguu95 Mar 11, 2024
479d9d9
Finish: let* in the new setting.
jcguu95 Mar 11, 2024
57cfc0b
Scatter debugger in the compiled codes as well.
jcguu95 Mar 11, 2024
ed23b00
Renamed counter as i, and finish "do" primopt.
jcguu95 Mar 11, 2024
32ccb66
Fix bugs for arithmetics and result printing.
jcguu95 Mar 11, 2024
bc11d01
Refactor
jcguu95 Mar 11, 2024
4df900d
Make the compile switch clearer.
jcguu95 Mar 11, 2024
70f7b4d
Fix bug in last commit.
jcguu95 Mar 11, 2024
aa05747
Support nil.
jcguu95 Mar 11, 2024
bce3712
Shorter code. No logic changed.
jcguu95 Mar 11, 2024
980fe72
fn* is almost done, but there are some weird bugs.
jcguu95 Mar 12, 2024
a4668dc
Found subtle bug in `def!`; all tests passed.
jcguu95 Mar 12, 2024
61ae0bb
I'm concerned.. is this step cheating?
jcguu95 Mar 12, 2024
6b6d20e
Import core, and support scalars.
jcguu95 Mar 12, 2024
1858659
Two things:
jcguu95 Mar 12, 2024
58a6879
Tested atom, atom?, swap!, reset!, deref.
jcguu95 Mar 12, 2024
c384cf1
Tested reader @ as deref.
jcguu95 Mar 12, 2024
f627b37
Support primopt `quote`.
jcguu95 Mar 12, 2024
58f3a6b
Add major TODOs and clean up some comments.
jcguu95 Mar 12, 2024
a46552f
Try symlinking readme to front.
jcguu95 Mar 12, 2024
404376f
Rewrite TODOs and description in readme.
jcguu95 Mar 12, 2024
f404182
Implement fn* the right way without cheating.
jcguu95 Mar 12, 2024
07278d4
Try implementing defmacro! as a macro.
jcguu95 Mar 12, 2024
66c2dfd
Try implementing defmacro!
jcguu95 Mar 13, 2024
9aec4f8
Temporary Commit
jcguu95 Mar 14, 2024
39f897f
DONE defmacro! All tests passed :)
jcguu95 Mar 14, 2024
0b484ec
Move python\/compile to python-compile.
jcguu95 Mar 14, 2024
0e38138
Update README location.
jcguu95 Mar 14, 2024
500bcfc
Move codes around. No logic change.
jcguu95 Mar 14, 2024
39acea6
Support dict and vect compilation.
jcguu95 Mar 14, 2024
a2b062c
Add symlinks for testing easier.
jcguu95 Mar 14, 2024
864d13a
Define load-file. Pass all test 6.
jcguu95 Mar 14, 2024
4444bbb
Support vectors properly.
jcguu95 Mar 14, 2024
55f3a2a
Pass all hard tests from 3~7.
jcguu95 Mar 15, 2024
0c89eb1
Add tests for 7~9
jcguu95 Mar 15, 2024
f99c682
Passed all tests in step8 as well.
jcguu95 Mar 15, 2024
2745b97
Passed tests 2~8.
jcguu95 Mar 15, 2024
882c32d
Passed step 2,3,4,5,6,7,8,A
jcguu95 Mar 15, 2024
4f6e497
Refactor. All tests passed (23456789A)!
jcguu95 Mar 15, 2024
7222e7c
Clean up readme.
jcguu95 Mar 15, 2024
f6de0e3
Add a todo.
jcguu95 Mar 15, 2024
2153aa8
Finished file compiler.
jcguu95 Mar 15, 2024
b86e213
Raise recursion limit.
jcguu95 Mar 20, 2024
c07b337
Refactor. Logic Unchanged. Tests Passed.
jcguu95 Mar 20, 2024
b801b2d
Add TODOs.
jcguu95 Mar 20, 2024
87272da
Use compileall in compile_file. All tests passed.
jcguu95 Mar 20, 2024
02fe154
Remove logger, and compare performance.
jcguu95 Mar 20, 2024
ad5928d
Update readme.
jcguu95 Mar 20, 2024
ce198b9
Matching with upstream.
jcguu95 Dec 20, 2024
daf4005
Try resolve conflicts.
jcguu95 Dec 20, 2024
d005fe1
Merge branch 'kanaka:master' into python-compile
jcguu95 Dec 20, 2024
7f1bda1
Add impls info back.
jcguu95 Dec 20, 2024
de8289e
Remove original README. We no longer need it.
jcguu95 Dec 20, 2024
c129b43
Passed step0 test.
jcguu95 Dec 20, 2024
40977fe
Remove readme symlink.
jcguu95 Dec 20, 2024
ec8c941
Put python-compile readme to main page.
jcguu95 Dec 21, 2024
21189bd
Update readme.
jcguu95 Dec 21, 2024
f87119b
Update readme.
jcguu95 Dec 21, 2024
e2282a4
Add a TODO.
jcguu95 Dec 21, 2024
5125f0e
Clarify a todo.
jcguu95 Dec 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Clarify a todo.
jcguu95 committed Dec 21, 2024
commit 5125f0e718fb7a3d2ce16787cc38c06b19031fea
3 changes: 2 additions & 1 deletion impls/python-compile/readme.md
Original file line number Diff line number Diff line change
@@ -53,7 +53,8 @@ iters over 10 seconds: 148519
## TODO

+ Document how the design of the compiler.
+ Wait for being mentioned in the official MAL main page, and write a section here.
+ [Wait](https://github.com/kanaka/mal/pull/653) for being mentioned in the
official MAL main page, and write a section here.

## Footnotes