Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

I'm building an R5RS compliant Scheme interpreter in order to brush up on Ruby and Lisp.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 lib
Octocat-spinner-32 script
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 History.txt
Octocat-spinner-32 Manifest.txt
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 Rakefile
README.rdoc

yascheme

DESCRIPTION:

YAScheme - Yet Another Scheme - is a simple Scheme interpreter built to learn more about Lisp, Ruby and programming language construction in general. The implementation targets the R5RS standard. We'll see how far I get.

USAGE:

Not packaged/published as a proper gem yet. For now, run it by navigating to /bin and calling either

1) 'ruby yascheme' to start REPL or 2) 'ruby yascheme <FILEPATH>' to run scheme code from file

FEATURES/PROBLEMS:

I'll use this readme file as my TODO list.

DONE

  • Lists, numbers, strings, symbols, booleans, quotes

  • Comments

  • Define and call lambdas (procedures/functions)

  • Global and block/local scope

  • Lexical scope & closures

  • car, cdr, cons

  • Variable binding (set!, define)

  • if conditional

  • Global memory/scope across multiple invocations to interpreter

  • Loading library procedures from external scheme source code

  • Can run Yascheme script on specified file or start REPL

TODO

  • Add “expects” validation to already impl procedures

  • Most essential primitive procedures for numbers, strings, lists

  • Rest of datatypes w. most essential core procs: vector, pair, character, port+I/O

  • Quasiquote (and backquote reader macro expansion)

  • Macros aka syntactic extensions

  • Continuations

  • Tail call optimization

  • Impl rest of primitive procedures

  • Impl library procedures/syntax in Scheme itself

  • Package and publish as proper gem

  • Way better error handling, validation, diagnostics

  • Implement nitty gritty: string escape chars, R5RS indentifier rules, etc etc

REQUIREMENTS:

TODO

INSTALL:

TODO

LICENSE:

(The MIT License)

Copyright © 2011 YAScheme

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Something went wrong with that request. Please try again.