Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A practical Scheme interpreter written in JavaScript.
JavaScript Scheme
branch: master

This branch is 17 commits ahead, 223 commits behind biwascheme:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
demo
node_modules
release
src
test
tuplespace
website
.gitignore
History.txt
MIT-LICENSE.txt
Makefile
Makefile.orig
README.mkd
README.mkd.orig
TODO.mkd
VERSION
biwascheme-0.5.7.tar.gz
repl.html
repl.html.orig

README.mkd

BiwaScheme

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

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">
(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.scm:

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

  3. create a file server.js:

    var BiwaScheme = require("biwascheme").BiwaScheme; BiwaScheme.run("a.scm");

  4. $ node server.js

Files

  • release/
    • biwascheme.js : The latest release version, uncompressed
    • biwascheme-min.js : The latest release version, compressed
  • node_modules/
    • Files for npm package
  • demo/
    • Demos
  • src/
    • deps/
      • Dependencies (jQuery, underscore)
    • system/
      • Source code of the interpreter
    • library/
      • Built-in library functions
    • platform/
      • Platform dependent code (browser, node, etc.)
  • test/
    • Unit tests
  • tuplespace/
    • (experimental) TupleSpace implemented in Scheme
  • website/

Building biwascheme.js

Prerequisites:

  • make
  • sed
  • node (Node.js)
  • uglifyjs ($ npm install uglify-js -g)

Make compiles src/*.js into release/biwascheme.js.

$ make

Development

How to add a new file (memo)

  • edit Makefile
  • edit src/development_loader.js

How to release (memo)

  1. Edit History.txt
  2. Edit VERSION
  3. Edit node_modules/biwascheme/package.json
  4. $ make -B
  5. Make sure it is working:
    • run tests
      • open test/spec.html
      • open test/spec.html#release
      • open test/spec.html#min
      • run test/browser_functions/
        • $ cd test/browser_functions && node server.js && open http://localhost:7001/
    • run demos
      • demo/*
      • open repl.html
      • open website/i.html
    • try npm package
      • $ npm install node_modules/biwascheme/ -g
      • $ biwas -v
  6. $ git tag x.y.z
  7. Push changes to github (with --tags)
  8. Update website ($ git pull)
  9. Copy generated files (release/) to web server
  10. Publish npm package
    • $ npm publish node_modules/biwascheme/

License

MIT-LICENSE

Acknowledgements

Contact

https://github.com/biwascheme/biwascheme

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

Something went wrong with that request. Please try again.