Bud is yet another Scheme-like Lisp dialect implemented in Java. It is simple, lightweight and embeddable. Most of the special forms including quote, lambda, if, cond, and, or and built-in functions like car, cdr, eq?, type predicates and arithmetic functions specified in R5RS are implemented.
Like Scheme,
A list of data types that are currently supported are shown below.
Use the Maven wrapper to compile and execute,
./mvnw clean compile exec:java -Dexec.mainClass='me.predatorray.bud.lisp.BudRepl'
If the docker cli is available on your computer, you can just run the lastest zetaplusae/bud image published on Docker Hub,
docker run -it --rm zetaplusae/bud:latest
Or, you can try the REPL online.
Finally, type your Lisp expressions.
bud> "Hello, Bud!"
"Hello, Bud!"
Install the artifact to your local repository.
mvn clean install
Add the dependency in you pom.xml.
<dependency>
<groupId>me.predatorray</groupId>
<artifactId>bud</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
And, here is an example of interpreting source code:
String sourceCode = "(+ 1 1)"
BudInterpreter interpreter = new BudInterpreter();
BudObject result = interpreter.execute(sourceCode);
assert new BudNumber(new BigDecimal(2)).equals(result);
Content type
Image
Digest
Size
264.2 MB
Last updated
over 9 years ago
docker pull zetaplusae/bud