BiwaScheme

用 JavaScript 编写的 Scheme 解释器。「Scheme interpreter written in JavaScript」

Github stars Tracking Chart

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

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

  3. $ node server.js

Files

  • release/
    • the following files are generated here with $ make
      • biwascheme.js
      • biwascheme-min.js
      • node_biwascheme.js
  • 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
  • web/
  • www.biwascheme.org.js
    • web server

Building biwascheme.js

Prerequisites:

  • make
  • sed
  • node, npm, npx (Node.js)

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

$ npm install
$ make

Links

Development memos

How to add a new file

  • edit Makefile
  • edit src/development_loader.js

How to release

(moved to doc/dev/release.md)

How to upgrade dependencies

jQuery:

  • update src/deps/jquery.js

underscore:

  • update src/deps/underscore.js
  • update node_modules/biwascheme/package.json

underscore.string:

  • update src/deps/underscore.string.js
  • update node_modules/biwascheme/package.json

Website

The source of www.biwascheme.org is in ./website.

Run local website

You can run the website locally with Node and express.

$ make
$ make website
$ npm install
$ node local_website.js
$ open http://localhost:7001

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

Overview

Name With Ownerbiwascheme/biwascheme
Primary LanguageJavaScript
Program languageMakefile (Language Count: 6)
PlatformLinux, Mac, Windows
License:MIT License
Release Count32
Last Release Namev0.8.0 (Posted on )
First Release Name0.5.1 (Posted on 2009-08-28 17:14:37)
Created At2011-08-08 02:40:34
Pushed At2024-04-19 09:19:39
Last Commit At2023-03-31 22:09:12
Stargazers Count722
Watchers Count39
Fork Count127
Commits Count1.3k
Has Issues Enabled
Issues Count198
Issue Open Count43
Pull Requests Count123
Pull Requests Open Count2
Pull Requests Close Count12
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private
To the top