Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Mar 16, 2021
2 parents 6d77bbf + fb5de2d commit cf80fc4
Show file tree
Hide file tree
Showing 50 changed files with 6,454 additions and 1,976 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.* text eol=lf
dist/* binary
package-lock.json binary
assets/classDiagram.svg binary
52 changes: 52 additions & 0 deletions CHANGELOG.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,55 @@
## 1.0.0-beta.12
### Breaking
* `env` and `dir` now returns symbols instead of strings
* `repr` and `type` of quoted promises now return `#<promise>` and `promise`
* numbers and characters properties are immutable
### Features
* create minfied std scheme file for faster bootstrap
* add `list-copy`
* add `define-record-type`
* add `escape-regex` function
* make `apropos` accept symbol as argument
* add doc strings for `**interaction-environment**` and `**internal-env**`
* add `letrec*` that in LIPS is exactly the same as `letrec`
* add `pragma->sxml` macro that define `sxml` macro (default is `h`)
* hide `fs` in internal env
* automatic bootstrapping of `fs` with BrowserFS if exists
* `pprint` in both REPLs now print in color [#33](https://github.com/jcubic/lips/issues/33)
* add `nan?`, `infinite?` and `finite?` functions
* add `+nan.0` and `-nan.0` (R7RS)
* properly handle negative inexact zero
* new `environment?` function
* add `current-directory` and `set-...` from SRFI-170
* add gensym literals (e.g. `#:foo`)
* fix pretty print of different cases of `let`
* add binary input/output procedures from R7RS
* update vector functions that in R7RS get start and end arguments
* add state props and better repr to quotedPromise
### Bugfix
* fix prism highlighting of names (for new context help)
* fix error when using help in node REPL and there are no doc string
* fix escaping regex operators when using string with `apropos`
* fix typechecking of number operators [#128](https://github.com/jcubic/lips/issues/128)
* fix indent of call-with- (input-file, output-file and port)
* fix eq? and type of NaN [#130](https://github.com/jcubic/lips/issues/130)
* fix number predicates
* fix `real-part` function
* fix parsing complex with 0 inexact imaginary part
* fix option -t --trace in Node REPL
* fix `eqv?` on exact and inexact numbers according to R7RS spec
* fix `exact->inexact` on complex numbers
* fix arithmetic with single complex value
* fix parsing regex that have escape slash and parenthesis (`#/( \\/)/g`)
* fix parsing regex that have single slash in class brackets (`#/\/[^/]+$/`)
* fix division on single argument (now `(/ n)` == `(/ 1 n)`)
* fix complex operation that result in real (e.g. multiplication over conjugation)
* fix `list-ref` according to R7RS errata
* fix formatter (pretty print) on multiline strings and atoms
* fix formatter indent of `let*`
* fix repr of vectors (arrays with empty value)
* fix promise quotation of object macro call [#139](https://github.com/jcubic/lips/issues/139)
* fix unquote-splicing inside direct quasiquote vector [#140](https://github.com/jcubic/lips/issues/140)

## 1.0.0-beta.11
### Breaking
* remove repr of HTMLElement (it's now default instance of a class)
Expand Down
14 changes: 9 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ MERMAID=./node_modules/.bin/mmdc
NPM=npm
UGLIFY=./node_modules/.bin/uglifyjs
ROLLUP=./node_modules/.bin/rollup
LIPS=./bin/lips.js

ALL: Makefile package.json .$(VERSION) assets/classDiagram.svg dist/lips.js dist/lips.min.js README.md dist/std.scm
ALL: Makefile package.json .$(VERSION) assets/classDiagram.svg dist/lips.js dist/lips.min.js README.md dist/std.min.scm

dist/lips.js: src/lips.js .$(VERSION) rollup.config.js
$(ROLLUP) -c
Expand All @@ -45,8 +46,11 @@ dist/lips.js: src/lips.js .$(VERSION) rollup.config.js
dist/lips.min.js: dist/lips.js .$(VERSION)
$(UGLIFY) -o dist/lips.min.js --comments --mangle -- dist/lips.js

dist/std.scm: lib/bootstrap.scm lib/R5RS.scm lib/byte-vectors.scm lib/R7RS.scm
$(CAT) lib/bootstrap.scm lib/R5RS.scm lib/byte-vectors.scm lib/R7RS.scm > dist/std.scm
dist/std.scm: lib/bootstrap.scm lib/R5RS.scm lib/byte-vectors.scm lib/R7RS.scm lib/srfi.scm
$(CAT) lib/bootstrap.scm lib/R5RS.scm lib/byte-vectors.scm lib/R7RS.scm lib/srfi.scm > dist/std.scm

dist/std.min.scm: dist/std.scm
$(LIPS) ./scripts/minify.scm dist/std.scm > dist/std.min.scm

Makefile: templates/Makefile
$(SED) -e "s/{{VER""SION}}/"$(VERSION)"/g" templates/Makefile > Makefile
Expand Down Expand Up @@ -82,10 +86,10 @@ publish:
jest-test: dist/lips.js
@$(JEST) --coverage spec/*.spec.js

test: dist/lips.js dist/std.scm
test: dist/lips.js dist/std.min.scm
@$(NPM) run test

test-file: dist/lips.js dist/std.scm
test-file: dist/lips.js dist/std.min.scm
@$(NPM) run test -- -- -f $(FILE)

test-update: dist/lips.js dist/std.scm
Expand Down
28 changes: 23 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
![LIPS - Scheme Based Powerful Lisp Language](https://github.com/jcubic/lips/blob/master/assets/lips.svg?raw=true)
![LIPS - Scheme Based Powerful Lisp Language](https://github.com/jcubic/lips/blob/devel/assets/lips.svg?raw=true)

[![npm](https://img.shields.io/badge/npm-1.0.0%E2%80%93beta.11-blue.svg)](https://www.npmjs.com/package/@jcubic/lips)
![1.0.0 Complete](https://img.shields.io/github/milestones/progress-percent/jcubic/lips/1?label=1.0.0%20Complete)
[![travis](https://travis-ci.org/jcubic/lips.svg?branch=master&8ee545979e1ab3696ae39b50f89705148478b3a9)](https://travis-ci.org/jcubic/lips)
[![Coverage Status](https://coveralls.io/repos/github/jcubic/lips/badge.svg?branch=master&83772d306416614a34e010475a6264c0)](https://coveralls.io/github/jcubic/lips?branch=master)
[![travis](https://travis-ci.org/jcubic/lips.svg?branch=devel&a2ecde1c90338410808edb4f6f18383b2f90a393)](https://travis-ci.org/jcubic/lips)
[![Coverage Status](https://coveralls.io/repos/github/jcubic/lips/badge.svg?branch=devel&1d824f61301ea2d85162361f0502128a)](https://coveralls.io/github/jcubic/lips?branch=devel)
[![Join Gitter Chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/jcubic/lips)
[![GitHub license](https://img.shields.io/github/license/jcubic/lips.svg)](https://github.com/jcubic/lips/blob/master/LICENSE)
[![GitHub stars](https://img.shields.io/github/stars/jcubic/lips.svg?style=social&label=Star&maxAge=2592000)](https://GitHub.com/jcubic/lips/stargazers/)
<a href="https://twitter.com/intent/tweet?text=Powerful%20Scheme%20based%20lisp%20language%20written%20in%20JavaScript.%20It%20makes%20life%20easier%20by%20better%20interaction%20with%20JS.%20Use%20full%20power%20of%20JS%2C%20lisp%20and%20npm%20to%20create%20your%20applications%20via%20@lips_lang&url=https://github.com/jcubic/lips&hashtags=javascript,opensource,lisp,scheme,language,programming">
<img src="https://github.com/jcubic/lips/blob/master/assets/tweet-shield.svg?raw=true" alt="Tweet" height="20"/>
<img src="https://github.com/jcubic/lips/blob/devel/assets/tweet-shield.svg?raw=true" alt="Tweet" height="20"/>
</a>
![NPM Download Count](https://img.shields.io/npm/dm/@jcubic/lips)
![JSDelivr Download count](https://img.shields.io/jsdelivr/npm/hm/@jcubic/lips)
Expand Down Expand Up @@ -143,7 +143,7 @@ npm install -g @jcubic/lips@beta

you can run the interpreter from the terminal:

![LIPS: Scheme interactive terminal](https://github.com/jcubic/lips/blob/master/assets/screencast.gif?raw=true)
![LIPS: Scheme interactive terminal](https://github.com/jcubic/lips/blob/devel/assets/screencast.gif?raw=true)


You can also run code in a string with:
Expand Down Expand Up @@ -185,6 +185,24 @@ Executables also return a S-Expression according to SRFI-176 use `lips --version
* [Git Repository](https://github.com/jcubic/lips)
* [Official Website](https://lips.js.org/)

## Roadmap

### 1.0
- [x] Full support for R5RS
- [ ] Full support for R7RS
- [ ] Continuations.
- [ ] Tail Call Optimization (TCO).
- [ ] Fully tested Numerical Tower.
- [ ] R7RS libraries (`import`/`export`/`define-library`).
- [ ] All recursive function in JS don't consume stack.
- [ ] Finish `syntax-rules` (ignore limitations of current approach).
- [ ] Objects.
- [ ] Vectors.

### 1.1
- [ ] Proper expansion time for both macro system.
- [ ] Fully working and tested R7RS hygienic Macros (`syntax-rules`).

## Acknowledgments
* Font used in logo is [Telegrafico](https://www.dafont.com/telegrafico.font) by [ficod](https://www.deviantart.com/ficod).
* Current parser is inspired by implementation in [BiwaScheme](https://www.biwascheme.org/) by Yutaka HARA (yhara).
Expand Down
Loading

0 comments on commit cf80fc4

Please sign in to comment.