Skip to content

Commit

Permalink
version 0.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Sep 15, 2018
1 parent 2f42740 commit f97d41a
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 40 deletions.
2 changes: 1 addition & 1 deletion Makefile
@@ -1,6 +1,6 @@
.PHONY: publish test coveralls lint

VERSION=0.5.0
VERSION=0.5.1
BRANCH=`git branch | grep '^*' | sed 's/* //'`
DATE=`date -uR`
SPEC_CHECKSUM=`md5sum spec/lips.spec.js | cut -d' ' -f 1`
Expand Down
8 changes: 4 additions & 4 deletions README.md
@@ -1,8 +1,8 @@
## LIPS is Pretty Simple

[![npm](https://img.shields.io/badge/npm-DEV-blue.svg)](https://www.npmjs.com/package/@jcubic/lips)
[![travis](https://travis-ci.org/jcubic/jquery.terminal.svg?branch=devel&b6bddb437e5f151c2340c00b8c49638b2822392d)](https://travis-ci.org/jcubic/jquery.terminal)
[![Coverage Status](https://coveralls.io/repos/github/jcubic/lips/badge.svg?branch=devel&4711c8a3b57e87bbde828a94afb311db)](https://coveralls.io/github/jcubic/lips?branch=devel)
[![npm](https://img.shields.io/badge/npm-0.5.1-blue.svg)](https://www.npmjs.com/package/@jcubic/lips)
[![travis](https://travis-ci.org/jcubic/jquery.terminal.svg?branch=master&2f42740d06b27e65e526a889f1e88c43e9d3c2a3)](https://travis-ci.org/jcubic/jquery.terminal)
[![Coverage Status](https://coveralls.io/repos/github/jcubic/lips/badge.svg?branch=master&60344fd3539909db22af3efb7138097d)](https://coveralls.io/github/jcubic/lips?branch=master)


LIPS is very simple Lisp, similar to Scheme written in JavaScript.
Expand Down Expand Up @@ -36,7 +36,7 @@ https://unpkg.com/@jcubic/lips
or from rawgit

```
https://cdn.rawgit.com/jcubic/lips/devel/dist/lips.min.js
https://cdn.rawgit.com/jcubic/lips/master/dist/lips.min.js
```

## Usage
Expand Down
32 changes: 4 additions & 28 deletions demo.html
Expand Up @@ -44,8 +44,7 @@
}
};
</script>
<!-- <script src="src/lips.js"></script> -->
<script src="dist/lips.js"></script>
<script src="src/lips.js"></script>
<script src="https://unpkg.com/bn.js@4.11.8/lib/bn.js"></script>
<script>
(function() {
Expand All @@ -58,31 +57,6 @@
parse,
evaluate
} = lips;
var result = lips.exec(`(define Y
(lambda (h)
((lambda (x) (x x))
(lambda (g)
(h (lambda args (apply (g g) args)))))))
(define (trampoline f)
(lambda args
(let ((result (apply f args)))
(while (eq? (type result) "function")
(set result (result)))
result)))
(define (! n)
((trampoline (Y (lambda (f)
(lambda (n acc)
(if (== n 0)
acc
(lambda ()
(f (- n 1) (* n acc)))))))) n 1))
(print (! 1000))`, env, env);
result.then((result) => console.log(result));
var env = new Environment({
stdout: {
write: function(...args) {
Expand Down Expand Up @@ -110,13 +84,15 @@
var code = list.shift();
if (code) {
try {
var ret = evaluate(code, env);
var ret = evaluate(code, env, env);
if (ret instanceof Promise) {
ret.then((ret) => {
if (ret !== undefined) {
env.get('print').call(env, ret)
}
next();
}).catch(e => {
term.error(e.message);
});
} else {
if (ret !== undefined) {
Expand Down
4 changes: 2 additions & 2 deletions dist/lips.js
@@ -1,10 +1,10 @@
/**@license
* LIPS is Pretty Simple - version DEV
* LIPS is Pretty Simple - version 0.5.1
*
* Copyright (c) 2018 Jakub Jankiewicz <http://jcubic.pl/me>
* Released under the MIT license
*
* build: Sat, 15 Sep 2018 10:52:49 +0000
* build: Sat, 15 Sep 2018 10:59:24 +0000
*/
(function () {
'use strict';
Expand Down
4 changes: 2 additions & 2 deletions dist/lips.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "@jcubic/lips",
"version": "0.5.0",
"version": "0.5.1",
"description": "Simple Scheme Like Lisp in JavaScript",
"main": "dist/lips.js",
"scripts": {},
Expand Down Expand Up @@ -205,7 +205,6 @@
"uglify-js": "^3.3.12"
},
"dependencies": {
"bn.js": "^4.11.8",
"node-fetch": "^2.2.0"
"bn.js": "^4.11.8"
}
}

0 comments on commit f97d41a

Please sign in to comment.