naganeko / biwascheme

Scheme interpreter written in JavaScript

Home Page:http://www.biwascheme.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BiwaScheme

biwascheme logo

BiwaScheme is a Scheme interpreter written in JavaScript.

Works with web browsers (including mobile devices) and Node.js.

Demos

see http://www.biwascheme.org/

Download

(Or you can just copy the file from ./release.)

How to use

Just load biwascheme.js (or biwascheme-min.js) and write Scheme code.

<!DOCTYPE html>
<html>
<body>

<div id="bs-console"></div>

<script src="biwascheme.js"></script>
<script type="text/biwascheme">
(display "hello, world!")
</script>

</body>
</html>

How to use with node.js to run a biwa script

  1. $ npm install biwascheme

  2. create a file a.scm:

    (display "Hello, world!") (newline)

  3. $ biwas a.scm

How to use from inside node.js as a module

  1. $ npm install biwascheme

  2. create a file a.js:

    var BiwaScheme = require("biwascheme"); BiwaScheme.run("(+ 1 2)"); // or BiwaScheme.run_file("a.scm");

  3. $ node a.js

Conformance

BiwaScheme implements most of the features of R7RS small, including first-class continuation and tail call optimization.

Major lacking features are:

  • syntax-rules
  • Exceptions
  • Library system

There are two limitations that arise from JavaScript. These will not be fixed (it's technically possible to fix but will be very inefficient).

  • Strings are immutable
  • Integers are not distinguished from float

Building biwascheme.js

See doc/dev/build.md

Links

License

MIT-LICENSE

BiwaScheme logo by @jcubic: Creative Commons Attribution 3.0

Acknowledgements

Contact

https://github.com/biwascheme/biwascheme

Yutaka HARA (yhara) yutaka.hara.gmail.com http://twitter.com/yhara_en

About

Scheme interpreter written in JavaScript

http://www.biwascheme.org/

License:MIT License


Languages

Language:JavaScript 95.7%Language:Scheme 2.3%Language:HTML 1.0%Language:CSS 0.8%Language:Makefile 0.2%Language:Ruby 0.0%