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

Open
wants to merge 60 commits into
base: master
Choose a base branch
from

Commits on Mar 11, 2024

  1. Configuration menu
    Copy the full SHA
    da0c3b4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cd73f72 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f7636c5 View commit details
    Browse the repository at this point in the history
  4. Use a real debug logger.

    jcguu95 committed Mar 11, 2024
    Configuration menu
    Copy the full SHA
    4b537f7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    402065f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3de4bbf View commit details
    Browse the repository at this point in the history
  7. Finish: let* (prim-opt).

    jcguu95 committed Mar 11, 2024
    Configuration menu
    Copy the full SHA
    6da0cf5 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ad88939 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    abc1538 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    cef411e View commit details
    Browse the repository at this point in the history
  11. Remove comments.

    jcguu95 committed Mar 11, 2024
    Configuration menu
    Copy the full SHA
    e512847 View commit details
    Browse the repository at this point in the history
  12. Seperate COMPILE and EXEC.

    This took me a while.. and I need to redo the other operators. So far
    only def! and +-*/ works.
    jcguu95 committed Mar 11, 2024
    Configuration menu
    Copy the full SHA
    8d62557 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    3db8a6b View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    479d9d9 View commit details
    Browse the repository at this point in the history
  15. Scatter debugger in the compiled codes as well.

    Make it verbose and more easily debuggable.
    jcguu95 committed Mar 11, 2024
    Configuration menu
    Copy the full SHA
    57cfc0b View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    ed23b00 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    32ccb66 View commit details
    Browse the repository at this point in the history
  18. Refactor

    1. Remove old commented code.
    2. Give repls new prompts.
    3. Refactor COMPILE in to smaller functions.
    jcguu95 committed Mar 11, 2024
    Configuration menu
    Copy the full SHA
    bc11d01 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    4df900d View commit details
    Browse the repository at this point in the history
  20. Fix bug in last commit.

    jcguu95 committed Mar 11, 2024
    Configuration menu
    Copy the full SHA
    70f7b4d View commit details
    Browse the repository at this point in the history
  21. Support nil.

    jcguu95 committed Mar 11, 2024
    Configuration menu
    Copy the full SHA
    aa05747 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    bce3712 View commit details
    Browse the repository at this point in the history

Commits on Mar 12, 2024

  1. Configuration menu
    Copy the full SHA
    980fe72 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a4668dc View commit details
    Browse the repository at this point in the history
  3. I'm concerned.. is this step cheating?

    I feel the compiler should do more work, other than just delegating.
    jcguu95 committed Mar 12, 2024
    Configuration menu
    Copy the full SHA
    61ae0bb View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6b6d20e View commit details
    Browse the repository at this point in the history
  5. Two things:

    1. COMPILE now takes ast of function type.
    2. Support eval and debugger toggle.
    jcguu95 committed Mar 12, 2024
    Configuration menu
    Copy the full SHA
    1858659 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    58a6879 View commit details
    Browse the repository at this point in the history
  7. Tested reader @ as deref.

    jcguu95 committed Mar 12, 2024
    Configuration menu
    Copy the full SHA
    c384cf1 View commit details
    Browse the repository at this point in the history
  8. Support primopt quote.

    jcguu95 committed Mar 12, 2024
    Configuration menu
    Copy the full SHA
    f627b37 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    58f3a6b View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    a46552f View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    404376f View commit details
    Browse the repository at this point in the history
  12. Implement fn* the right way without cheating.

    (by cheating I mean deferring compilation)
    jcguu95 committed Mar 12, 2024
    Configuration menu
    Copy the full SHA
    f404182 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    07278d4 View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2024

  1. Try implementing defmacro!

    Made some changes that I don't fully understand.
    It's not working yet.
    I think I know what to do in the following ocmmits.
    jcguu95 committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    66c2dfd View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2024

  1. Temporary Commit

    It's still a mess and unusable now. But I know what to do now.
    
    When an AST (A) gets compiled, the end result is a code (C) to be
    executed. Execution of C should return a *closure* (not a function,
    which I've been doing, which is wrong), that holds a slot telling the
    function where to look for literals (e.g. scalars, functions, objects..
    etc). So far I've been trying to save those literals in a global
    constant _consts. It was why my code failed so far because some compiled
    ASTs may be alive even after the next compilation. As a consequence, as
    they are reading from the global _consts, they read the wrong data.
    jcguu95 committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    9aec4f8 View commit details
    Browse the repository at this point in the history
  2. DONE defmacro! All tests passed :)

    The closure way is the right way to go. Woo hoo :)
    jcguu95 committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    39f897f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0b484ec View commit details
    Browse the repository at this point in the history
  4. Update README location.

    jcguu95 committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    0e38138 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    500bcfc View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    39acea6 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a2b062c View commit details
    Browse the repository at this point in the history
  8. Define load-file. Pass all test 6.

    make "test^python-compile^step6"
    jcguu95 committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    864d13a View commit details
    Browse the repository at this point in the history
  9. Support vectors properly.

    Pass test 4, 5 (except the last one), 6.
    jcguu95 committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    4444bbb View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2024

  1. Pass all hard tests from 3~7.

    test^python-compile^step3~7
    jcguu95 committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    55f3a2a View commit details
    Browse the repository at this point in the history
  2. Add tests for 7~9

    jcguu95 committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    0c89eb1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f99c682 View commit details
    Browse the repository at this point in the history
  4. Passed tests 2~8.

    jcguu95 committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    2745b97 View commit details
    Browse the repository at this point in the history
  5. Passed step 2,3,4,5,6,7,8,A

    jcguu95 committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    882c32d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4f6e497 View commit details
    Browse the repository at this point in the history
  7. Clean up readme.

    jcguu95 committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    7222e7c View commit details
    Browse the repository at this point in the history
  8. Add a todo.

    jcguu95 committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    f6de0e3 View commit details
    Browse the repository at this point in the history
  9. Finished file compiler.

    jcguu95 committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    2153aa8 View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2024

  1. Raise recursion limit.

    jcguu95 committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    b86e213 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c07b337 View commit details
    Browse the repository at this point in the history
  3. Add TODOs.

    jcguu95 committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    b801b2d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    87272da View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    02fe154 View commit details
    Browse the repository at this point in the history
  6. Update readme.

    jcguu95 committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    ad5928d View commit details
    Browse the repository at this point in the history