Giter Club home page Giter Club logo

aquario's People

Contributors

hikarin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

aquario's Issues

Restore GC

Currently GC is not working at VM branch.

Problems with aquari0

The email link did'nt work, so I try it this way.

I am trying to get your aquario program running. When I try e.g. (fib 20), then the GC should happen, but no sign of this is shown. It seems like no GC is done at all, only after a (gc) statement. Then again there is no feedback.
Could you please augment the README such that an uninformed user like me knows what to do? Also it appears that the do_test.lsp example does'nt run, e.g 'begin' and 'equal?' are not understood.

Thanks for your answer, with kind regards,
Wouter Boeke
[email protected]

Error handling

  • categorize various errors: syntax error, type error, etc.
  • when an error is detected, immediately return to REPL.

Implement macro system

The file do_test.lsp defines procedure "assert-equal" for test cases. It should be written not by lambda expression but by macro.

But Aquario doesn't have macro system so far... After macro system is implemented, "assert-equal" should be replaced as a macro.

Parsing failure

Parsing S-expression below fails.

(define m "
" <= a space
)

Mark-Sweep exhausts heap

Mark-Sweep collector exhausts heap memory when expressions below are evaluated:

(define inf-gc (lambda (x) (gc) (inf-gc x)))
(inf-gc 1)

Other collectors work fine.

Dot form

Aquario cannot parse dot form correctly.

'(1 . 2)
(1 . 2) <= O.K.
(cons 1 . 2)
Segmentation fault: 11 <= Bad
(define test (lambda (x . y) (cons x y)))

t

(test 1 2)
Segmentation fault: 11 <= Bad

Directly call closure

((lambda (x) (if (<= x 2) 1 100)) 30)

gives an error. Compiling lambda is not working properly.

New options

-Heap XXX: Specify heap size at startup time
-MT: use multithread version (if possible)

Tail Call Optimization

is necessary for infinite function call like:

(define gc-infinite (lambda () (gc) (gc-infinite)))
(gc-infinite)

Main flow improvement

bytecode is not generated -> generate bytecode.
bytecode is already generated but older than script -> generate bytecode.
bytecode is already generated and newer than script -> nothing will be generated.

tak.lsp causes SEGV

It fails to run tak.lsp with every single collector.


GC: copy
./run-test.sh: line 6: 844 Segmentation fault: 11 ./aquario -GC copy $SCRIPT

real 0m1.002s
user 0m0.744s
sys 0m0.084s
GC: gen
./run-test.sh: line 9: 846 Segmentation fault: 11 ./aquario -GC gen $SCRIPT

real 0m0.175s
user 0m0.122s
sys 0m0.024s
GC: ms
Heap Exhausted.

real 0m3.118s
user 0m3.367s
sys 0m0.088s
GC: mc
[ERROR]Heap Exhausted

real 0m2.823s
user 0m2.735s
sys 0m0.084s
GC: ref
[ERROR]Heap Exhausted

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.