GithubHelp home page GithubHelp logo

ischeme's Introduction

IScheme

This is a Scheme interpreter I'm writing in Ioke as I read through Peter Norvig's two articles about doing the same thing in Python. This is a personal project for myself and will never be a complete/standardized Scheme interpreter, but maybe you'll find it interesting anyway.

REPL Example

It can do bare basics. Will add more soon.

$ ioke ~/Code/ischeme/lib/main.ik
ischeme> (define fact (lambda (n) (if (<= n 1) 1 (* n (fact (- n 1))))))
#<LexicalBlock:147E0BA>
ischeme> (fact 10)
3628800
ischeme> (define my_list (list 1 2 3 4 5))
(1 2 3 4 5)
ischeme> (cons (cdr my_list) 6)
(2 3 4 5 6)
ischeme> (if (boolean? #t) "is a boolean" "not a boolean")
"is a boolean"
ischeme> (quit)

To Do

  • Add more data types, syntax, macros and recursion (as outlined in Norvig's second article)
  • Test coverage with ISpec
  • Figure out how to use Ioke's Java integration to circumvent the STDIN-reading issue I'm facing

Installation

You'll need a Java runtime if you want to install Ioke. If you're on Linux/OSX you could use your package manager to install the openjdk-7-jre package. There are more instructions on Ioke's website.

Once you have everything set up, you can just run the main.ik file to access the read-eval-print loop!

License

See LICENSE

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.