Code Monkey home page Code Monkey logo

rbscheme's People

Contributors

loris1123 avatar

Stargazers

 avatar

Watchers

 avatar

rbscheme's Issues

Fancy Invalid Syntax

Try to show where the syntax mistake was.
Something like:

==============================================

Scheme Error

----------------------------------------------

Invalid Syntax: 2.3.
                   ^
==============================================

CDR 2)

When calling cdr-function you get a bracket around the cdr.

(cdr (cons 1 2))
    => 2)

Multiline support

When writing scheme code it would be cool to do something like this:

(define (plusone x)
    (+ x 1)
)

At the moment only single-line is allowed:

(define (plusone x) (+ x 1))

Singleton objects

Objects like true, false, nil, void should exist only one time.
At the moment, every time I enter #t a new SchemeTrue object is generated.

History

Create a history for interactive mode to nagivate with ArrowUp/Down to previous inputs

GUI result print to console

The result when evaluation a statement in GUI will be printed to the console, instead of the GUI.

This is a result of the new printer

TCO

Tail Call Optimization should be enabled for RbScheme.

To enable TCO in Ruby use this:

RubyVM::InstructionSequence.compile_option = {
  tailcall_optimization: true,
  trace_instruction: false
}

I have to debug if this will enable TCO in my Scheme-Recursions. For this I first have to do #10

Faculty not working

(define (fac n)(if (eq? n 1) 1 (* n (fac (- n 1)))))

This is a working faculty function using recursion. When I enter this I get the error Invalid number of arguments for SchemeDefine. Need between 2 and 2. Got 5, which is obviously wrong.

Do not print when define

Defining a function or variable will result in a print.
But when doing a define, scheme should not print. It should be only printed when the function/variable is actually called

Define functions in functions

Not working:

(define (aFunc x y)
  (define (bFunc a b)
    (+ a b))
  (bFunc x y))

define allows only 1 argument as a function body. Should allow * expressions.

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.