Giter Site home page Giter Site logo

cpscm's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cpscm's Issues

bug?

hi

this might be a bug:

echo "(cadr '(define (f x)) )" > t.sc
echo '(scm2scm:compile "t.sc" "tt.sc")' | sisc scm2scm.scm

SISC (1.16.6)
#;> Error: (no expressions in body ())
---------------------------
To enable more detailed stack tracing, set the dynamic parameter
max-stack-trace-depth to a non-zero value, e.g. 16.
---------------------------
Some stack trace entries may have been suppressed. To see all entries set
the dynamic parameter suppressed-stack-trace-source-kinds to '().
#;> 


Original issue reported on code.google.com by [email protected] on 27 Aug 2008 at 1:30

Expression simplification error

I use chicken. This bug should be replicable using SISC in the same way.
Run chicken in the <checkout-root>/cpscm-read-only/scm directory as follows:
$ csi danm/chicken-prelude.scm cpscm.scm

At the REPL try:
#;1> (define exp '(lambda (foo) ((lambda (bar) (if (= bar 0) 0 (+ foo
foo))) foo)))
#;2> (simplify-sexp exp)
=> (lambda (bar) (if (= bar 0) 0 (+ foo foo)))

Because the second lambda in exp is a closure which captures the binding to
foo, the expression cannot be simplified and the expected output is exp
unchanged.

The problem may be that the computation? routine returns false for lambda
and define expressions. The attached patch fixes the problem for all the
cases I tried. I have not fully grokked the simplification code, however,
so this is a quick fix that almost certainly prevents other valid
simplifications.

This bug affects all the output backends for cpscm. I have actual practical
scheme code that will not properly compile with cpscheme before the
application of the patch.

Original issue reported on code.google.com by [email protected] on 14 Aug 2008 at 8:12

Attachments:

what I did wrong?

Hi

I've got cpscm compiled without problem, 
but the first sample code I tried gives this error:

echo '(define list-index (lambda (pred lst)
  (call/cc (lambda (return)
    (for-each (lambda (i x)
                (if (pred x) (return i))
              ) (idx-interval lst) lst)
  #f))))' > t.sc
echo '(import scm2scm)(scm2scm:compile "t.sc" "tt.sc")' |
 csi -q danm/chicken-prelude.scm cpscm.scm

; visiting scm2scm.scm ...
Error: unbound variable: 14598332513316644$$scm2scm:compile

NOTE: (import scm2scm) was evaluated OK

what I did wrong?

Thanks

Original issue reported on code.google.com by [email protected] on 26 Aug 2008 at 4:30

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.